aclocal.m4 revision 2f39173d
12f39173dSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2209ff23fSmrg
3209ff23fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
42f39173dSmrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5209ff23fSmrg# This file is free software; the Free Software Foundation
6209ff23fSmrg# gives unlimited permission to copy and/or distribute it,
7209ff23fSmrg# with or without modifications, as long as this notice is preserved.
8209ff23fSmrg
9209ff23fSmrg# This program is distributed in the hope that it will be useful,
10209ff23fSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11209ff23fSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12209ff23fSmrg# PARTICULAR PURPOSE.
13209ff23fSmrg
14209ff23fSmrgm4_ifndef([AC_AUTOCONF_VERSION],
15209ff23fSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
162f39173dSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
172f39173dSmrg[m4_warning([this file was generated for autoconf 2.63.
18209ff23fSmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
19209ff23fSmrgIf you have problems, you may need to regenerate the build system entirely.
20209ff23fSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21209ff23fSmrg
22209ff23fSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23ad43ddacSmrg#
24ad43ddacSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
25ad43ddacSmrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
26ad43ddacSmrg#   Written by Gordon Matzigkeit, 1996
27ad43ddacSmrg#
28ad43ddacSmrg# This file is free software; the Free Software Foundation gives
29ad43ddacSmrg# unlimited permission to copy and/or distribute it, with or without
30ad43ddacSmrg# modifications, as long as this notice is preserved.
31ad43ddacSmrg
32ad43ddacSmrgm4_define([_LT_COPYING], [dnl
33ad43ddacSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
34ad43ddacSmrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
35ad43ddacSmrg#   Written by Gordon Matzigkeit, 1996
36ad43ddacSmrg#
37ad43ddacSmrg#   This file is part of GNU Libtool.
38ad43ddacSmrg#
39ad43ddacSmrg# GNU Libtool is free software; you can redistribute it and/or
40ad43ddacSmrg# modify it under the terms of the GNU General Public License as
41ad43ddacSmrg# published by the Free Software Foundation; either version 2 of
42ad43ddacSmrg# the License, or (at your option) any later version.
43ad43ddacSmrg#
44ad43ddacSmrg# As a special exception to the GNU General Public License,
45ad43ddacSmrg# if you distribute this file as part of a program or library that
46ad43ddacSmrg# is built using GNU Libtool, you may include this file under the
47ad43ddacSmrg# same distribution terms that you use for the rest of that program.
48ad43ddacSmrg#
49ad43ddacSmrg# GNU Libtool is distributed in the hope that it will be useful,
50ad43ddacSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
51ad43ddacSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
52ad43ddacSmrg# GNU General Public License for more details.
53ad43ddacSmrg#
54ad43ddacSmrg# You should have received a copy of the GNU General Public License
55ad43ddacSmrg# along with GNU Libtool; see the file COPYING.  If not, a copy
56ad43ddacSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
57ad43ddacSmrg# obtained by writing to the Free Software Foundation, Inc.,
58ad43ddacSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
59ad43ddacSmrg])
60209ff23fSmrg
61ad43ddacSmrg# serial 56 LT_INIT
62209ff23fSmrg
63209ff23fSmrg
64ad43ddacSmrg# LT_PREREQ(VERSION)
65ad43ddacSmrg# ------------------
66ad43ddacSmrg# Complain and exit if this libtool version is less that VERSION.
67ad43ddacSmrgm4_defun([LT_PREREQ],
68ad43ddacSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
69ad43ddacSmrg       [m4_default([$3],
70ad43ddacSmrg		   [m4_fatal([Libtool version $1 or higher is required],
71ad43ddacSmrg		             63)])],
72ad43ddacSmrg       [$2])])
73209ff23fSmrg
74209ff23fSmrg
75ad43ddacSmrg# _LT_CHECK_BUILDDIR
76ad43ddacSmrg# ------------------
77ad43ddacSmrg# Complain if the absolute build directory name contains unusual characters
78ad43ddacSmrgm4_defun([_LT_CHECK_BUILDDIR],
79ad43ddacSmrg[case `pwd` in
80ad43ddacSmrg  *\ * | *\	*)
81ad43ddacSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
82ad43ddacSmrgesac
83ad43ddacSmrg])
84ad43ddacSmrg
85ad43ddacSmrg
86ad43ddacSmrg# LT_INIT([OPTIONS])
87ad43ddacSmrg# ------------------
88ad43ddacSmrgAC_DEFUN([LT_INIT],
89ad43ddacSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
90ad43ddacSmrgAC_BEFORE([$0], [LT_LANG])dnl
91ad43ddacSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
92ad43ddacSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
93ad43ddacSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
94ad43ddacSmrg
95ad43ddacSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
96ad43ddacSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
97ad43ddacSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
98ad43ddacSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
99ad43ddacSmrgdnl unless we require an AC_DEFUNed macro:
100ad43ddacSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
101ad43ddacSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
102ad43ddacSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
103ad43ddacSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
104ad43ddacSmrgm4_require([_LT_PROG_LTMAIN])dnl
105ad43ddacSmrg
106ad43ddacSmrgdnl Parse OPTIONS
107ad43ddacSmrg_LT_SET_OPTIONS([$0], [$1])
108209ff23fSmrg
109209ff23fSmrg# This can be used to rebuild libtool when needed
110ad43ddacSmrgLIBTOOL_DEPS="$ltmain"
111209ff23fSmrg
112209ff23fSmrg# Always use our own libtool.
113209ff23fSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
114209ff23fSmrgAC_SUBST(LIBTOOL)dnl
115209ff23fSmrg
116ad43ddacSmrg_LT_SETUP
117209ff23fSmrg
118ad43ddacSmrg# Only expand once:
119ad43ddacSmrgm4_define([LT_INIT])
120ad43ddacSmrg])# LT_INIT
121209ff23fSmrg
122ad43ddacSmrg# Old names:
123ad43ddacSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
124ad43ddacSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
125ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
126ad43ddacSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
127ad43ddacSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
128ad43ddacSmrg
129ad43ddacSmrg
130ad43ddacSmrg# _LT_CC_BASENAME(CC)
131ad43ddacSmrg# -------------------
132ad43ddacSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
133ad43ddacSmrgm4_defun([_LT_CC_BASENAME],
134ad43ddacSmrg[for cc_temp in $1""; do
135ad43ddacSmrg  case $cc_temp in
136ad43ddacSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
137ad43ddacSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
138ad43ddacSmrg    \-*) ;;
139ad43ddacSmrg    *) break;;
140ad43ddacSmrg  esac
141ad43ddacSmrgdone
142ad43ddacSmrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
143ad43ddacSmrg])
144ad43ddacSmrg
145ad43ddacSmrg
146ad43ddacSmrg# _LT_FILEUTILS_DEFAULTS
147ad43ddacSmrg# ----------------------
148ad43ddacSmrg# It is okay to use these file commands and assume they have been set
149ad43ddacSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
150ad43ddacSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
151ad43ddacSmrg[: ${CP="cp -f"}
152ad43ddacSmrg: ${MV="mv -f"}
153ad43ddacSmrg: ${RM="rm -f"}
154ad43ddacSmrg])# _LT_FILEUTILS_DEFAULTS
155ad43ddacSmrg
156ad43ddacSmrg
157ad43ddacSmrg# _LT_SETUP
158ad43ddacSmrg# ---------
159ad43ddacSmrgm4_defun([_LT_SETUP],
160ad43ddacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
161209ff23fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
162ad43ddacSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
163ad43ddacSmrg_LT_DECL([], [host], [0])dnl
164ad43ddacSmrg_LT_DECL([], [host_os], [0])dnl
165ad43ddacSmrgdnl
166ad43ddacSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
167ad43ddacSmrg_LT_DECL([], [build], [0])dnl
168ad43ddacSmrg_LT_DECL([], [build_os], [0])dnl
169ad43ddacSmrgdnl
170209ff23fSmrgAC_REQUIRE([AC_PROG_CC])dnl
171ad43ddacSmrgAC_REQUIRE([LT_PATH_LD])dnl
172ad43ddacSmrgAC_REQUIRE([LT_PATH_NM])dnl
173ad43ddacSmrgdnl
174209ff23fSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
175ad43ddacSmrgtest -z "$LN_S" && LN_S="ln -s"
176ad43ddacSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
177209ff23fSmrgdnl
178ad43ddacSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
179ad43ddacSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
180ad43ddacSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
181ad43ddacSmrgdnl
182ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
183ad43ddacSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
184ad43ddacSmrgm4_require([_LT_CMD_RELOAD])dnl
185ad43ddacSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
186ad43ddacSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
187ad43ddacSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
188ad43ddacSmrg
189ad43ddacSmrg_LT_CONFIG_LIBTOOL_INIT([
190ad43ddacSmrg# See if we are running on zsh, and set the options which allow our
191ad43ddacSmrg# commands through without removal of \ escapes INIT.
192ad43ddacSmrgif test -n "\${ZSH_VERSION+set}" ; then
193ad43ddacSmrg   setopt NO_GLOB_SUBST
194ad43ddacSmrgfi
195ad43ddacSmrg])
196ad43ddacSmrgif test -n "${ZSH_VERSION+set}" ; then
197ad43ddacSmrg   setopt NO_GLOB_SUBST
198ad43ddacSmrgfi
199209ff23fSmrg
200ad43ddacSmrg_LT_CHECK_OBJDIR
201ad43ddacSmrg
202ad43ddacSmrgm4_require([_LT_TAG_COMPILER])dnl
203ad43ddacSmrg_LT_PROG_ECHO_BACKSLASH
204209ff23fSmrg
205209ff23fSmrgcase $host_os in
206209ff23fSmrgaix3*)
207209ff23fSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
208209ff23fSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
209209ff23fSmrg  # vanish in a puff of smoke.
210209ff23fSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
211209ff23fSmrg    COLLECT_NAMES=
212209ff23fSmrg    export COLLECT_NAMES
213209ff23fSmrg  fi
214209ff23fSmrg  ;;
215209ff23fSmrgesac
216209ff23fSmrg
217209ff23fSmrg# Sed substitution that helps us do robust quoting.  It backslashifies
218209ff23fSmrg# metacharacters that are still active within double-quoted strings.
219ad43ddacSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
220209ff23fSmrg
221209ff23fSmrg# Same as above, but do not quote variable references.
222ad43ddacSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
223209ff23fSmrg
224209ff23fSmrg# Sed substitution to delay expansion of an escaped shell variable in a
225209ff23fSmrg# double_quote_subst'ed string.
226209ff23fSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
227209ff23fSmrg
228ad43ddacSmrg# Sed substitution to delay expansion of an escaped single quote.
229ad43ddacSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
230ad43ddacSmrg
231209ff23fSmrg# Sed substitution to avoid accidental globbing in evaled expressions
232209ff23fSmrgno_glob_subst='s/\*/\\\*/g'
233209ff23fSmrg
234209ff23fSmrg# Global variables:
235ad43ddacSmrgofile=libtool
236209ff23fSmrgcan_build_shared=yes
237209ff23fSmrg
238209ff23fSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
239209ff23fSmrg# which needs '.lib').
240209ff23fSmrglibext=a
241209ff23fSmrg
242ad43ddacSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
243209ff23fSmrg
244209ff23fSmrgold_CC="$CC"
245209ff23fSmrgold_CFLAGS="$CFLAGS"
246209ff23fSmrg
247209ff23fSmrg# Set sane defaults for various variables
248209ff23fSmrgtest -z "$CC" && CC=cc
249209ff23fSmrgtest -z "$LTCC" && LTCC=$CC
250209ff23fSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
251209ff23fSmrgtest -z "$LD" && LD=ld
252209ff23fSmrgtest -z "$ac_objext" && ac_objext=o
253209ff23fSmrg
254209ff23fSmrg_LT_CC_BASENAME([$compiler])
255209ff23fSmrg
256209ff23fSmrg# Only perform the check for file, if the check method requires it
257ad43ddacSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
258209ff23fSmrgcase $deplibs_check_method in
259209ff23fSmrgfile_magic*)
260209ff23fSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
261ad43ddacSmrg    _LT_PATH_MAGIC
262209ff23fSmrg  fi
263209ff23fSmrg  ;;
264209ff23fSmrgesac
265209ff23fSmrg
266ad43ddacSmrg# Use C for the default configuration in the libtool script
267ad43ddacSmrgLT_SUPPORTED_TAG([CC])
268ad43ddacSmrg_LT_LANG_C_CONFIG
269ad43ddacSmrg_LT_LANG_DEFAULT_CONFIG
270ad43ddacSmrg_LT_CONFIG_COMMANDS
271ad43ddacSmrg])# _LT_SETUP
272209ff23fSmrg
273209ff23fSmrg
274ad43ddacSmrg# _LT_PROG_LTMAIN
275ad43ddacSmrg# ---------------
276ad43ddacSmrg# Note that this code is called both from `configure', and `config.status'
277ad43ddacSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
278ad43ddacSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
279ad43ddacSmrg# so we pass a copy along to make sure it has a sensible value anyway.
280ad43ddacSmrgm4_defun([_LT_PROG_LTMAIN],
281ad43ddacSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
282ad43ddacSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
283ad43ddacSmrgltmain="$ac_aux_dir/ltmain.sh"
284ad43ddacSmrg])# _LT_PROG_LTMAIN
285209ff23fSmrg
286209ff23fSmrg
287ad43ddacSmrg
288ad43ddacSmrg# So that we can recreate a full libtool script including additional
289ad43ddacSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
290ad43ddacSmrg# in macros and then make a single call at the end using the `libtool'
291ad43ddacSmrg# label.
292ad43ddacSmrg
293ad43ddacSmrg
294ad43ddacSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
295ad43ddacSmrg# ----------------------------------------
296ad43ddacSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
297ad43ddacSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
298ad43ddacSmrg[m4_ifval([$1],
299ad43ddacSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
300ad43ddacSmrg                     [$1
301ad43ddacSmrg])])])
302ad43ddacSmrg
303ad43ddacSmrg# Initialize.
304ad43ddacSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
305ad43ddacSmrg
306ad43ddacSmrg
307ad43ddacSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
308ad43ddacSmrg# ------------------------------
309ad43ddacSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
310ad43ddacSmrgm4_define([_LT_CONFIG_LIBTOOL],
311ad43ddacSmrg[m4_ifval([$1],
312ad43ddacSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
313ad43ddacSmrg                     [$1
314ad43ddacSmrg])])])
315ad43ddacSmrg
316ad43ddacSmrg# Initialize.
317ad43ddacSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
318ad43ddacSmrg
319ad43ddacSmrg
320ad43ddacSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
321ad43ddacSmrg# -----------------------------------------------------
322ad43ddacSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
323ad43ddacSmrg[_LT_CONFIG_LIBTOOL([$1])
324ad43ddacSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
325ad43ddacSmrg])
326ad43ddacSmrg
327ad43ddacSmrg
328ad43ddacSmrg# _LT_FORMAT_COMMENT([COMMENT])
329ad43ddacSmrg# -----------------------------
330ad43ddacSmrg# Add leading comment marks to the start of each line, and a trailing
331ad43ddacSmrg# full-stop to the whole comment if one is not present already.
332ad43ddacSmrgm4_define([_LT_FORMAT_COMMENT],
333ad43ddacSmrg[m4_ifval([$1], [
334ad43ddacSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
335ad43ddacSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
336ad43ddacSmrg)])
337ad43ddacSmrg
338ad43ddacSmrg
339ad43ddacSmrg
340ad43ddacSmrg
341ad43ddacSmrg
342ad43ddacSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
343ad43ddacSmrg# -------------------------------------------------------------------
344ad43ddacSmrg# CONFIGNAME is the name given to the value in the libtool script.
345ad43ddacSmrg# VARNAME is the (base) name used in the configure script.
346ad43ddacSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
347ad43ddacSmrg# VARNAME.  Any other value will be used directly.
348ad43ddacSmrgm4_define([_LT_DECL],
349ad43ddacSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
350ad43ddacSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
351ad43ddacSmrg	[m4_ifval([$1], [$1], [$2])])
352ad43ddacSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
353ad43ddacSmrg    m4_ifval([$4],
354ad43ddacSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
355ad43ddacSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
356ad43ddacSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
357ad43ddacSmrg])
358ad43ddacSmrg
359ad43ddacSmrg
360ad43ddacSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
361ad43ddacSmrg# --------------------------------------------------------
362ad43ddacSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
363ad43ddacSmrg
364ad43ddacSmrg
365ad43ddacSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
366ad43ddacSmrg# ------------------------------------------------
367ad43ddacSmrgm4_define([lt_decl_tag_varnames],
368ad43ddacSmrg[_lt_decl_filter([tagged?], [yes], $@)])
369ad43ddacSmrg
370ad43ddacSmrg
371ad43ddacSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
372ad43ddacSmrg# ---------------------------------------------------------
373ad43ddacSmrgm4_define([_lt_decl_filter],
374ad43ddacSmrg[m4_case([$#],
375ad43ddacSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
376ad43ddacSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
377ad43ddacSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
378ad43ddacSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
379ad43ddacSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
380ad43ddacSmrg])
381ad43ddacSmrg
382ad43ddacSmrg
383ad43ddacSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
384ad43ddacSmrg# --------------------------------------------------
385ad43ddacSmrgm4_define([lt_decl_quote_varnames],
386ad43ddacSmrg[_lt_decl_filter([value], [1], $@)])
387ad43ddacSmrg
388ad43ddacSmrg
389ad43ddacSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
390ad43ddacSmrg# ---------------------------------------------------
391ad43ddacSmrgm4_define([lt_decl_dquote_varnames],
392ad43ddacSmrg[_lt_decl_filter([value], [2], $@)])
393ad43ddacSmrg
394ad43ddacSmrg
395ad43ddacSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
396ad43ddacSmrg# ---------------------------------------------------
397ad43ddacSmrgm4_define([lt_decl_varnames_tagged],
3982f39173dSmrg[m4_assert([$# <= 2])dnl
3992f39173dSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
4002f39173dSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
4012f39173dSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
4022f39173dSmrgm4_define([_lt_decl_varnames_tagged],
4032f39173dSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
404ad43ddacSmrg
405ad43ddacSmrg
406ad43ddacSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
407ad43ddacSmrg# ------------------------------------------------
408ad43ddacSmrgm4_define([lt_decl_all_varnames],
409ad43ddacSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
410ad43ddacSmrg     m4_if([$2], [],
411ad43ddacSmrg	   m4_quote(lt_decl_varnames),
412ad43ddacSmrg	m4_quote(m4_shift($@))))[]dnl
413ad43ddacSmrg])
414ad43ddacSmrgm4_define([_lt_decl_all_varnames],
415ad43ddacSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
416ad43ddacSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
417ad43ddacSmrg])
418ad43ddacSmrg
419ad43ddacSmrg
420ad43ddacSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
421ad43ddacSmrg# ------------------------------------
422ad43ddacSmrg# Quote a variable value, and forward it to `config.status' so that its
423ad43ddacSmrg# declaration there will have the same value as in `configure'.  VARNAME
424ad43ddacSmrg# must have a single quote delimited value for this to work.
425ad43ddacSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
426ad43ddacSmrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
427ad43ddacSmrg
428ad43ddacSmrg
429ad43ddacSmrg# _LT_CONFIG_STATUS_DECLARATIONS
430ad43ddacSmrg# ------------------------------
431ad43ddacSmrg# We delimit libtool config variables with single quotes, so when
432ad43ddacSmrg# we write them to config.status, we have to be sure to quote all
433ad43ddacSmrg# embedded single quotes properly.  In configure, this macro expands
434ad43ddacSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
435ad43ddacSmrg#
436ad43ddacSmrg#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
437ad43ddacSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
438ad43ddacSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
439ad43ddacSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
440ad43ddacSmrg
441ad43ddacSmrg
442ad43ddacSmrg# _LT_LIBTOOL_TAGS
443ad43ddacSmrg# ----------------
444ad43ddacSmrg# Output comment and list of tags supported by the script
445ad43ddacSmrgm4_defun([_LT_LIBTOOL_TAGS],
446ad43ddacSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
447ad43ddacSmrgavailable_tags="_LT_TAGS"dnl
448ad43ddacSmrg])
449ad43ddacSmrg
450ad43ddacSmrg
451ad43ddacSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
452ad43ddacSmrg# -----------------------------------
453ad43ddacSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
454ad43ddacSmrg# expand to a commented shell variable setting:
455ad43ddacSmrg#
456ad43ddacSmrg#    # Some comment about what VAR is for.
457ad43ddacSmrg#    visible_name=$lt_internal_name
458ad43ddacSmrgm4_define([_LT_LIBTOOL_DECLARE],
459ad43ddacSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
460ad43ddacSmrg					   [description])))[]dnl
461ad43ddacSmrgm4_pushdef([_libtool_name],
462ad43ddacSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
463ad43ddacSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
464ad43ddacSmrg    [0], [_libtool_name=[$]$1],
465ad43ddacSmrg    [1], [_libtool_name=$lt_[]$1],
466ad43ddacSmrg    [2], [_libtool_name=$lt_[]$1],
467ad43ddacSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
468ad43ddacSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
469ad43ddacSmrg])
470ad43ddacSmrg
471ad43ddacSmrg
472ad43ddacSmrg# _LT_LIBTOOL_CONFIG_VARS
473ad43ddacSmrg# -----------------------
474ad43ddacSmrg# Produce commented declarations of non-tagged libtool config variables
475ad43ddacSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
476ad43ddacSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
477ad43ddacSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
478ad43ddacSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
479ad43ddacSmrg[m4_foreach([_lt_var],
480ad43ddacSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
481ad43ddacSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
482ad43ddacSmrg
483ad43ddacSmrg
484ad43ddacSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
485ad43ddacSmrg# -------------------------
486ad43ddacSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
487ad43ddacSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
488ad43ddacSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
489209ff23fSmrg
490209ff23fSmrg
491ad43ddacSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
492ad43ddacSmrg# ------------------------------
493ad43ddacSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
494ad43ddacSmrg
495ad43ddacSmrg
496ad43ddacSmrg# _LT_CONFIG_COMMANDS
497209ff23fSmrg# -------------------
498ad43ddacSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
499ad43ddacSmrg# variables for single and double quote escaping we saved from calls
500ad43ddacSmrg# to _LT_DECL, we can put quote escaped variables declarations
501ad43ddacSmrg# into `config.status', and then the shell code to quote escape them in
502ad43ddacSmrg# for loops in `config.status'.  Finally, any additional code accumulated
503ad43ddacSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
504ad43ddacSmrgm4_defun([_LT_CONFIG_COMMANDS],
505ad43ddacSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
506ad43ddacSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
507ad43ddacSmrg	dnl instead of duplicating it all over again into config.status,
508ad43ddacSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
509ad43ddacSmrg	dnl needs to know what name is stored there:
510ad43ddacSmrg        [AC_CONFIG_COMMANDS([libtool],
511ad43ddacSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
512ad43ddacSmrg    dnl If the libtool generation code is destined for config.status,
513ad43ddacSmrg    dnl expand the accumulated commands and init code now:
514ad43ddacSmrg    [AC_CONFIG_COMMANDS([libtool],
515ad43ddacSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
516ad43ddacSmrg])#_LT_CONFIG_COMMANDS
517ad43ddacSmrg
518ad43ddacSmrg
519ad43ddacSmrg# Initialize.
520ad43ddacSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
521ad43ddacSmrg[
522ad43ddacSmrg
523ad43ddacSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
524ad43ddacSmrg# if CDPATH is set.
525ad43ddacSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
526ad43ddacSmrg
527ad43ddacSmrgsed_quote_subst='$sed_quote_subst'
528ad43ddacSmrgdouble_quote_subst='$double_quote_subst'
529ad43ddacSmrgdelay_variable_subst='$delay_variable_subst'
530ad43ddacSmrg_LT_CONFIG_STATUS_DECLARATIONS
531ad43ddacSmrgLTCC='$LTCC'
532ad43ddacSmrgLTCFLAGS='$LTCFLAGS'
533ad43ddacSmrgcompiler='$compiler_DEFAULT'
534ad43ddacSmrg
535ad43ddacSmrg# Quote evaled strings.
536ad43ddacSmrgfor var in lt_decl_all_varnames([[ \
537ad43ddacSmrg]], lt_decl_quote_varnames); do
538ad43ddacSmrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
539ad43ddacSmrg    *[[\\\\\\\`\\"\\\$]]*)
540ad43ddacSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
541ad43ddacSmrg      ;;
542ad43ddacSmrg    *)
543ad43ddacSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
544ad43ddacSmrg      ;;
545ad43ddacSmrg    esac
546ad43ddacSmrgdone
547ad43ddacSmrg
548ad43ddacSmrg# Double-quote double-evaled strings.
549ad43ddacSmrgfor var in lt_decl_all_varnames([[ \
550ad43ddacSmrg]], lt_decl_dquote_varnames); do
551ad43ddacSmrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
552ad43ddacSmrg    *[[\\\\\\\`\\"\\\$]]*)
553ad43ddacSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
554ad43ddacSmrg      ;;
555ad43ddacSmrg    *)
556ad43ddacSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
557ad43ddacSmrg      ;;
558ad43ddacSmrg    esac
559ad43ddacSmrgdone
560ad43ddacSmrg
561ad43ddacSmrg# Fix-up fallback echo if it was mangled by the above quoting rules.
562ad43ddacSmrgcase \$lt_ECHO in
563ad43ddacSmrg*'\\\[$]0 --fallback-echo"')dnl "
564ad43ddacSmrg  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
565ad43ddacSmrg  ;;
566ad43ddacSmrgesac
567ad43ddacSmrg
568ad43ddacSmrg_LT_OUTPUT_LIBTOOL_INIT
569ad43ddacSmrg])
570ad43ddacSmrg
571ad43ddacSmrg
572ad43ddacSmrg# LT_OUTPUT
573ad43ddacSmrg# ---------
574ad43ddacSmrg# This macro allows early generation of the libtool script (before
575ad43ddacSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
576ad43ddacSmrg# tests.
577ad43ddacSmrgAC_DEFUN([LT_OUTPUT],
578ad43ddacSmrg[: ${CONFIG_LT=./config.lt}
579ad43ddacSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
580ad43ddacSmrgcat >"$CONFIG_LT" <<_LTEOF
581ad43ddacSmrg#! $SHELL
582ad43ddacSmrg# Generated by $as_me.
583ad43ddacSmrg# Run this file to recreate a libtool stub with the current configuration.
584ad43ddacSmrg
585ad43ddacSmrglt_cl_silent=false
586ad43ddacSmrgSHELL=\${CONFIG_SHELL-$SHELL}
587ad43ddacSmrg_LTEOF
588ad43ddacSmrg
589ad43ddacSmrgcat >>"$CONFIG_LT" <<\_LTEOF
590ad43ddacSmrgAS_SHELL_SANITIZE
591ad43ddacSmrg_AS_PREPARE
592ad43ddacSmrg
593ad43ddacSmrgexec AS_MESSAGE_FD>&1
594ad43ddacSmrgexec AS_MESSAGE_LOG_FD>>config.log
595ad43ddacSmrg{
596ad43ddacSmrg  echo
597ad43ddacSmrg  AS_BOX([Running $as_me.])
598ad43ddacSmrg} >&AS_MESSAGE_LOG_FD
599ad43ddacSmrg
600ad43ddacSmrglt_cl_help="\
601ad43ddacSmrg\`$as_me' creates a local libtool stub from the current configuration,
602ad43ddacSmrgfor use in further configure time tests before the real libtool is
603ad43ddacSmrggenerated.
604ad43ddacSmrg
605ad43ddacSmrgUsage: $[0] [[OPTIONS]]
606ad43ddacSmrg
607ad43ddacSmrg  -h, --help      print this help, then exit
608ad43ddacSmrg  -V, --version   print version number, then exit
609ad43ddacSmrg  -q, --quiet     do not print progress messages
610ad43ddacSmrg  -d, --debug     don't remove temporary files
611ad43ddacSmrg
612ad43ddacSmrgReport bugs to <bug-libtool@gnu.org>."
613ad43ddacSmrg
614ad43ddacSmrglt_cl_version="\
615ad43ddacSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
616ad43ddacSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
617ad43ddacSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
618ad43ddacSmrg
619ad43ddacSmrgCopyright (C) 2008 Free Software Foundation, Inc.
620ad43ddacSmrgThis config.lt script is free software; the Free Software Foundation
621ad43ddacSmrggives unlimited permision to copy, distribute and modify it."
622ad43ddacSmrg
623ad43ddacSmrgwhile test $[#] != 0
624ad43ddacSmrgdo
625ad43ddacSmrg  case $[1] in
626ad43ddacSmrg    --version | --v* | -V )
627ad43ddacSmrg      echo "$lt_cl_version"; exit 0 ;;
628ad43ddacSmrg    --help | --h* | -h )
629ad43ddacSmrg      echo "$lt_cl_help"; exit 0 ;;
630ad43ddacSmrg    --debug | --d* | -d )
631ad43ddacSmrg      debug=: ;;
632ad43ddacSmrg    --quiet | --q* | --silent | --s* | -q )
633ad43ddacSmrg      lt_cl_silent=: ;;
634ad43ddacSmrg
635ad43ddacSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
636ad43ddacSmrgTry \`$[0] --help' for more information.]) ;;
637ad43ddacSmrg
638ad43ddacSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
639ad43ddacSmrgTry \`$[0] --help' for more information.]) ;;
640ad43ddacSmrg  esac
641ad43ddacSmrg  shift
642ad43ddacSmrgdone
643ad43ddacSmrg
644ad43ddacSmrgif $lt_cl_silent; then
645ad43ddacSmrg  exec AS_MESSAGE_FD>/dev/null
646ad43ddacSmrgfi
647ad43ddacSmrg_LTEOF
648ad43ddacSmrg
649ad43ddacSmrgcat >>"$CONFIG_LT" <<_LTEOF
650ad43ddacSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
651ad43ddacSmrg_LTEOF
652ad43ddacSmrg
653ad43ddacSmrgcat >>"$CONFIG_LT" <<\_LTEOF
654ad43ddacSmrgAC_MSG_NOTICE([creating $ofile])
655ad43ddacSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
656ad43ddacSmrgAS_EXIT(0)
657ad43ddacSmrg_LTEOF
658ad43ddacSmrgchmod +x "$CONFIG_LT"
659ad43ddacSmrg
660ad43ddacSmrg# configure is writing to config.log, but config.lt does its own redirection,
661ad43ddacSmrg# appending to config.log, which fails on DOS, as config.log is still kept
662ad43ddacSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
663ad43ddacSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
664ad43ddacSmrgif test "$no_create" != yes; then
665ad43ddacSmrg  lt_cl_success=:
666ad43ddacSmrg  test "$silent" = yes &&
667ad43ddacSmrg    lt_config_lt_args="$lt_config_lt_args --quiet"
668ad43ddacSmrg  exec AS_MESSAGE_LOG_FD>/dev/null
669ad43ddacSmrg  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
670ad43ddacSmrg  exec AS_MESSAGE_LOG_FD>>config.log
671ad43ddacSmrg  $lt_cl_success || AS_EXIT(1)
672ad43ddacSmrgfi
673ad43ddacSmrg])# LT_OUTPUT
674ad43ddacSmrg
675ad43ddacSmrg
676ad43ddacSmrg# _LT_CONFIG(TAG)
677ad43ddacSmrg# ---------------
678ad43ddacSmrg# If TAG is the built-in tag, create an initial libtool script with a
679ad43ddacSmrg# default configuration from the untagged config vars.  Otherwise add code
680ad43ddacSmrg# to config.status for appending the configuration named by TAG from the
681ad43ddacSmrg# matching tagged config vars.
682ad43ddacSmrgm4_defun([_LT_CONFIG],
683ad43ddacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
684ad43ddacSmrg_LT_CONFIG_SAVE_COMMANDS([
685ad43ddacSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
686ad43ddacSmrg  m4_if(_LT_TAG, [C], [
687ad43ddacSmrg    # See if we are running on zsh, and set the options which allow our
688ad43ddacSmrg    # commands through without removal of \ escapes.
689ad43ddacSmrg    if test -n "${ZSH_VERSION+set}" ; then
690ad43ddacSmrg      setopt NO_GLOB_SUBST
691ad43ddacSmrg    fi
692ad43ddacSmrg
693ad43ddacSmrg    cfgfile="${ofile}T"
694ad43ddacSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
695ad43ddacSmrg    $RM "$cfgfile"
696ad43ddacSmrg
697ad43ddacSmrg    cat <<_LT_EOF >> "$cfgfile"
698ad43ddacSmrg#! $SHELL
699ad43ddacSmrg
700ad43ddacSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
701ad43ddacSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
702ad43ddacSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
703ad43ddacSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
704ad43ddacSmrg#
705ad43ddacSmrg_LT_COPYING
706ad43ddacSmrg_LT_LIBTOOL_TAGS
707ad43ddacSmrg
708ad43ddacSmrg# ### BEGIN LIBTOOL CONFIG
709ad43ddacSmrg_LT_LIBTOOL_CONFIG_VARS
710ad43ddacSmrg_LT_LIBTOOL_TAG_VARS
711ad43ddacSmrg# ### END LIBTOOL CONFIG
712ad43ddacSmrg
713ad43ddacSmrg_LT_EOF
714ad43ddacSmrg
715ad43ddacSmrg  case $host_os in
716ad43ddacSmrg  aix3*)
717ad43ddacSmrg    cat <<\_LT_EOF >> "$cfgfile"
718ad43ddacSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
719ad43ddacSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
720ad43ddacSmrg# vanish in a puff of smoke.
721ad43ddacSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
722ad43ddacSmrg  COLLECT_NAMES=
723ad43ddacSmrg  export COLLECT_NAMES
724ad43ddacSmrgfi
725ad43ddacSmrg_LT_EOF
726ad43ddacSmrg    ;;
727ad43ddacSmrg  esac
728ad43ddacSmrg
729ad43ddacSmrg  _LT_PROG_LTMAIN
730ad43ddacSmrg
731ad43ddacSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
732ad43ddacSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
733ad43ddacSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
734ad43ddacSmrg  # is reportedly fixed, but why not run on old versions too?
735ad43ddacSmrg  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
736ad43ddacSmrg    || (rm -f "$cfgfile"; exit 1)
737ad43ddacSmrg
738ad43ddacSmrg  _LT_PROG_XSI_SHELLFNS
739ad43ddacSmrg
740ad43ddacSmrg  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
741ad43ddacSmrg    || (rm -f "$cfgfile"; exit 1)
742ad43ddacSmrg
743ad43ddacSmrg  mv -f "$cfgfile" "$ofile" ||
744ad43ddacSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
745ad43ddacSmrg  chmod +x "$ofile"
746ad43ddacSmrg],
747ad43ddacSmrg[cat <<_LT_EOF >> "$ofile"
748ad43ddacSmrg
749ad43ddacSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
750ad43ddacSmrgdnl in a comment (ie after a #).
751ad43ddacSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
752ad43ddacSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
753ad43ddacSmrg# ### END LIBTOOL TAG CONFIG: $1
754ad43ddacSmrg_LT_EOF
755ad43ddacSmrg])dnl /m4_if
756ad43ddacSmrg],
757ad43ddacSmrg[m4_if([$1], [], [
758ad43ddacSmrg    PACKAGE='$PACKAGE'
759ad43ddacSmrg    VERSION='$VERSION'
760ad43ddacSmrg    TIMESTAMP='$TIMESTAMP'
761ad43ddacSmrg    RM='$RM'
762ad43ddacSmrg    ofile='$ofile'], [])
763ad43ddacSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
764ad43ddacSmrg])# _LT_CONFIG
765ad43ddacSmrg
766ad43ddacSmrg
767ad43ddacSmrg# LT_SUPPORTED_TAG(TAG)
768ad43ddacSmrg# ---------------------
769ad43ddacSmrg# Trace this macro to discover what tags are supported by the libtool
770ad43ddacSmrg# --tag option, using:
771ad43ddacSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
772ad43ddacSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
773ad43ddacSmrg
774ad43ddacSmrg
775ad43ddacSmrg# C support is built-in for now
776ad43ddacSmrgm4_define([_LT_LANG_C_enabled], [])
777ad43ddacSmrgm4_define([_LT_TAGS], [])
778ad43ddacSmrg
779ad43ddacSmrg
780ad43ddacSmrg# LT_LANG(LANG)
781ad43ddacSmrg# -------------
782ad43ddacSmrg# Enable libtool support for the given language if not already enabled.
783ad43ddacSmrgAC_DEFUN([LT_LANG],
784ad43ddacSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
785ad43ddacSmrgm4_case([$1],
786ad43ddacSmrg  [C],			[_LT_LANG(C)],
787ad43ddacSmrg  [C++],		[_LT_LANG(CXX)],
788ad43ddacSmrg  [Java],		[_LT_LANG(GCJ)],
789ad43ddacSmrg  [Fortran 77],		[_LT_LANG(F77)],
790ad43ddacSmrg  [Fortran],		[_LT_LANG(FC)],
791ad43ddacSmrg  [Windows Resource],	[_LT_LANG(RC)],
792ad43ddacSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
793ad43ddacSmrg    [_LT_LANG($1)],
794ad43ddacSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
795ad43ddacSmrg])# LT_LANG
796ad43ddacSmrg
797ad43ddacSmrg
798ad43ddacSmrg# _LT_LANG(LANGNAME)
799ad43ddacSmrg# ------------------
800ad43ddacSmrgm4_defun([_LT_LANG],
801ad43ddacSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
802ad43ddacSmrg  [LT_SUPPORTED_TAG([$1])dnl
803ad43ddacSmrg  m4_append([_LT_TAGS], [$1 ])dnl
804ad43ddacSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
805ad43ddacSmrg  _LT_LANG_$1_CONFIG($1)])dnl
806ad43ddacSmrg])# _LT_LANG
807ad43ddacSmrg
808ad43ddacSmrg
809ad43ddacSmrg# _LT_LANG_DEFAULT_CONFIG
810ad43ddacSmrg# -----------------------
811ad43ddacSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
812ad43ddacSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
813ad43ddacSmrg  [LT_LANG(CXX)],
814ad43ddacSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
815ad43ddacSmrg
816ad43ddacSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
817ad43ddacSmrg  [LT_LANG(F77)],
818ad43ddacSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
819ad43ddacSmrg
820ad43ddacSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
821ad43ddacSmrg  [LT_LANG(FC)],
822ad43ddacSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
823ad43ddacSmrg
824ad43ddacSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
825ad43ddacSmrgdnl pulling things in needlessly.
826ad43ddacSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
827ad43ddacSmrg  [LT_LANG(GCJ)],
828ad43ddacSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
829ad43ddacSmrg    [LT_LANG(GCJ)],
830ad43ddacSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
831ad43ddacSmrg      [LT_LANG(GCJ)],
832ad43ddacSmrg      [m4_ifdef([AC_PROG_GCJ],
833ad43ddacSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
834ad43ddacSmrg       m4_ifdef([A][M_PROG_GCJ],
835ad43ddacSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
836ad43ddacSmrg       m4_ifdef([LT_PROG_GCJ],
837ad43ddacSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
838ad43ddacSmrg
839ad43ddacSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
840ad43ddacSmrg  [LT_LANG(RC)],
841ad43ddacSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
842ad43ddacSmrg])# _LT_LANG_DEFAULT_CONFIG
843ad43ddacSmrg
844ad43ddacSmrg# Obsolete macros:
845ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
846ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
847ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
848ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
849ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
850ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
851ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
852ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
853ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
854ad43ddacSmrg
855ad43ddacSmrg
856ad43ddacSmrg# _LT_TAG_COMPILER
857ad43ddacSmrg# ----------------
858ad43ddacSmrgm4_defun([_LT_TAG_COMPILER],
859209ff23fSmrg[AC_REQUIRE([AC_PROG_CC])dnl
860209ff23fSmrg
861ad43ddacSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
862ad43ddacSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
863ad43ddacSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
864ad43ddacSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
865ad43ddacSmrg
866209ff23fSmrg# If no C compiler was specified, use CC.
867209ff23fSmrgLTCC=${LTCC-"$CC"}
868209ff23fSmrg
869209ff23fSmrg# If no C compiler flags were specified, use CFLAGS.
870209ff23fSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
871209ff23fSmrg
872209ff23fSmrg# Allow CC to be a program name with arguments.
873209ff23fSmrgcompiler=$CC
874ad43ddacSmrg])# _LT_TAG_COMPILER
875209ff23fSmrg
876209ff23fSmrg
877209ff23fSmrg# _LT_COMPILER_BOILERPLATE
878209ff23fSmrg# ------------------------
879209ff23fSmrg# Check for compiler boilerplate output or warnings with
880209ff23fSmrg# the simple compiler test code.
881ad43ddacSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
882ad43ddacSmrg[m4_require([_LT_DECL_SED])dnl
883209ff23fSmrgac_outfile=conftest.$ac_objext
884209ff23fSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
885209ff23fSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
886209ff23fSmrg_lt_compiler_boilerplate=`cat conftest.err`
887ad43ddacSmrg$RM conftest*
888209ff23fSmrg])# _LT_COMPILER_BOILERPLATE
889209ff23fSmrg
890209ff23fSmrg
891209ff23fSmrg# _LT_LINKER_BOILERPLATE
892209ff23fSmrg# ----------------------
893209ff23fSmrg# Check for linker boilerplate output or warnings with
894209ff23fSmrg# the simple link test code.
895ad43ddacSmrgm4_defun([_LT_LINKER_BOILERPLATE],
896ad43ddacSmrg[m4_require([_LT_DECL_SED])dnl
897209ff23fSmrgac_outfile=conftest.$ac_objext
898209ff23fSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
899209ff23fSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
900209ff23fSmrg_lt_linker_boilerplate=`cat conftest.err`
901ad43ddacSmrg$RM -r conftest*
902209ff23fSmrg])# _LT_LINKER_BOILERPLATE
903209ff23fSmrg
904209ff23fSmrg# _LT_REQUIRED_DARWIN_CHECKS
905ad43ddacSmrg# -------------------------
906ad43ddacSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
907209ff23fSmrg  case $host_os in
908209ff23fSmrg    rhapsody* | darwin*)
909209ff23fSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
910209ff23fSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
911ad43ddacSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
912ad43ddacSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
913ad43ddacSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
914ad43ddacSmrg    _LT_DECL([], [DSYMUTIL], [1],
915ad43ddacSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
916ad43ddacSmrg    _LT_DECL([], [NMEDIT], [1],
917ad43ddacSmrg      [Tool to change global to local symbols on Mac OS X])
918ad43ddacSmrg    _LT_DECL([], [LIPO], [1],
919ad43ddacSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
920ad43ddacSmrg    _LT_DECL([], [OTOOL], [1],
921ad43ddacSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
922ad43ddacSmrg    _LT_DECL([], [OTOOL64], [1],
923ad43ddacSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
924209ff23fSmrg
925209ff23fSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
926209ff23fSmrg      [lt_cv_apple_cc_single_mod=no
927209ff23fSmrg      if test -z "${LT_MULTI_MODULE}"; then
928ad43ddacSmrg	# By default we will add the -single_module flag. You can override
929ad43ddacSmrg	# by either setting the environment variable LT_MULTI_MODULE
930ad43ddacSmrg	# non-empty at configure time, or by adding -multi_module to the
931ad43ddacSmrg	# link flags.
932ad43ddacSmrg	rm -rf libconftest.dylib*
933ad43ddacSmrg	echo "int foo(void){return 1;}" > conftest.c
934ad43ddacSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
935ad43ddacSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
936ad43ddacSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
937ad43ddacSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
938ad43ddacSmrg        _lt_result=$?
939ad43ddacSmrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
940ad43ddacSmrg	  lt_cv_apple_cc_single_mod=yes
941ad43ddacSmrg	else
942ad43ddacSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
943ad43ddacSmrg	fi
944ad43ddacSmrg	rm -rf libconftest.dylib*
945ad43ddacSmrg	rm -f conftest.*
946209ff23fSmrg      fi])
947209ff23fSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
948209ff23fSmrg      [lt_cv_ld_exported_symbols_list],
949209ff23fSmrg      [lt_cv_ld_exported_symbols_list=no
950209ff23fSmrg      save_LDFLAGS=$LDFLAGS
951209ff23fSmrg      echo "_main" > conftest.sym
952209ff23fSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
953209ff23fSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
954ad43ddacSmrg	[lt_cv_ld_exported_symbols_list=yes],
955ad43ddacSmrg	[lt_cv_ld_exported_symbols_list=no])
956ad43ddacSmrg	LDFLAGS="$save_LDFLAGS"
957209ff23fSmrg    ])
958209ff23fSmrg    case $host_os in
959ad43ddacSmrg    rhapsody* | darwin1.[[012]])
960209ff23fSmrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
961209ff23fSmrg    darwin1.*)
962ad43ddacSmrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
9632f39173dSmrg    darwin*) # darwin 5.x on
964209ff23fSmrg      # if running on 10.5 or later, the deployment target defaults
965209ff23fSmrg      # to the OS version, if on x86, and 10.4, the deployment
9662f39173dSmrg      # target defaults to 10.4. Don't you love it?
967209ff23fSmrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
968ad43ddacSmrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
969ad43ddacSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
970ad43ddacSmrg	10.[[012]]*)
971ad43ddacSmrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
972ad43ddacSmrg	10.*)
973ad43ddacSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
974209ff23fSmrg      esac
975209ff23fSmrg    ;;
976209ff23fSmrg  esac
977209ff23fSmrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
978209ff23fSmrg      _lt_dar_single_mod='$single_module'
979209ff23fSmrg    fi
980209ff23fSmrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
981209ff23fSmrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
982209ff23fSmrg    else
983ad43ddacSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
984209ff23fSmrg    fi
985209ff23fSmrg    if test "$DSYMUTIL" != ":"; then
986ad43ddacSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
987209ff23fSmrg    else
988209ff23fSmrg      _lt_dsymutil=
989209ff23fSmrg    fi
990209ff23fSmrg    ;;
991209ff23fSmrg  esac
992209ff23fSmrg])
993209ff23fSmrg
994ad43ddacSmrg
995ad43ddacSmrg# _LT_DARWIN_LINKER_FEATURES
996ad43ddacSmrg# --------------------------
997ad43ddacSmrg# Checks for linker and compiler features on darwin
998ad43ddacSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
999ad43ddacSmrg[
1000ad43ddacSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1001ad43ddacSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1002ad43ddacSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
1003ad43ddacSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
1004ad43ddacSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1005ad43ddacSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1006ad43ddacSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
1007ad43ddacSmrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
10082f39173dSmrg  case $cc_basename in
10092f39173dSmrg     ifort*) _lt_dar_can_shared=yes ;;
10102f39173dSmrg     *) _lt_dar_can_shared=$GCC ;;
10112f39173dSmrg  esac
10122f39173dSmrg  if test "$_lt_dar_can_shared" = "yes"; then
1013ad43ddacSmrg    output_verbose_link_cmd=echo
1014ad43ddacSmrg    _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}"
1015ad43ddacSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1016ad43ddacSmrg    _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}"
1017ad43ddacSmrg    _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}"
1018ad43ddacSmrg    m4_if([$1], [CXX],
1019ad43ddacSmrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1020ad43ddacSmrg      _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}"
1021ad43ddacSmrg      _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}"
1022ad43ddacSmrg    fi
1023ad43ddacSmrg],[])
1024ad43ddacSmrg  else
1025ad43ddacSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
1026ad43ddacSmrg  fi
1027ad43ddacSmrg])
1028ad43ddacSmrg
1029ad43ddacSmrg# _LT_SYS_MODULE_PATH_AIX
1030ad43ddacSmrg# -----------------------
1031209ff23fSmrg# Links a minimal program and checks the executable
1032209ff23fSmrg# for the system default hardcoded library path. In most cases,
1033209ff23fSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
1034209ff23fSmrg# the location of the communication and MPI libs are included too.
1035209ff23fSmrg# If we don't find anything, use the default library path according
1036209ff23fSmrg# to the aix ld manual.
1037ad43ddacSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
1038ad43ddacSmrg[m4_require([_LT_DECL_SED])dnl
1039209ff23fSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
1040209ff23fSmrglt_aix_libpath_sed='
1041209ff23fSmrg    /Import File Strings/,/^$/ {
1042209ff23fSmrg	/^0/ {
1043209ff23fSmrg	    s/^0  *\(.*\)$/\1/
1044209ff23fSmrg	    p
1045209ff23fSmrg	}
1046209ff23fSmrg    }'
1047209ff23fSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1048209ff23fSmrg# Check for a 64-bit object if we didn't find anything.
1049209ff23fSmrgif test -z "$aix_libpath"; then
1050209ff23fSmrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1051209ff23fSmrgfi],[])
1052209ff23fSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1053ad43ddacSmrg])# _LT_SYS_MODULE_PATH_AIX
1054209ff23fSmrg
1055209ff23fSmrg
1056ad43ddacSmrg# _LT_SHELL_INIT(ARG)
1057ad43ddacSmrg# -------------------
1058ad43ddacSmrgm4_define([_LT_SHELL_INIT],
1059209ff23fSmrg[ifdef([AC_DIVERSION_NOTICE],
1060209ff23fSmrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1061209ff23fSmrg	 [AC_DIVERT_PUSH(NOTICE)])
1062209ff23fSmrg$1
1063209ff23fSmrgAC_DIVERT_POP
1064ad43ddacSmrg])# _LT_SHELL_INIT
1065209ff23fSmrg
1066209ff23fSmrg
1067ad43ddacSmrg# _LT_PROG_ECHO_BACKSLASH
1068ad43ddacSmrg# -----------------------
1069209ff23fSmrg# Add some code to the start of the generated configure script which
1070209ff23fSmrg# will find an echo command which doesn't interpret backslashes.
1071ad43ddacSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
1072ad43ddacSmrg[_LT_SHELL_INIT([
1073209ff23fSmrg# Check that we are running under the correct shell.
1074209ff23fSmrgSHELL=${CONFIG_SHELL-/bin/sh}
1075209ff23fSmrg
1076ad43ddacSmrgcase X$lt_ECHO in
1077209ff23fSmrgX*--fallback-echo)
1078209ff23fSmrg  # Remove one level of quotation (which was required for Make).
1079ad43ddacSmrg  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1080209ff23fSmrg  ;;
1081209ff23fSmrgesac
1082209ff23fSmrg
1083ad43ddacSmrgECHO=${lt_ECHO-echo}
1084209ff23fSmrgif test "X[$]1" = X--no-reexec; then
1085209ff23fSmrg  # Discard the --no-reexec flag, and continue.
1086209ff23fSmrg  shift
1087209ff23fSmrgelif test "X[$]1" = X--fallback-echo; then
1088209ff23fSmrg  # Avoid inline document here, it may be left over
1089209ff23fSmrg  :
1090ad43ddacSmrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1091ad43ddacSmrg  # Yippee, $ECHO works!
1092209ff23fSmrg  :
1093209ff23fSmrgelse
1094209ff23fSmrg  # Restart under the correct shell.
1095209ff23fSmrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1096209ff23fSmrgfi
1097209ff23fSmrg
1098209ff23fSmrgif test "X[$]1" = X--fallback-echo; then
1099209ff23fSmrg  # used as fallback echo
1100209ff23fSmrg  shift
1101ad43ddacSmrg  cat <<_LT_EOF
1102209ff23fSmrg[$]*
1103ad43ddacSmrg_LT_EOF
1104209ff23fSmrg  exit 0
1105209ff23fSmrgfi
1106209ff23fSmrg
1107209ff23fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
1108209ff23fSmrg# if CDPATH is set.
1109209ff23fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1110209ff23fSmrg
1111ad43ddacSmrgif test -z "$lt_ECHO"; then
1112ad43ddacSmrg  if test "X${echo_test_string+set}" != Xset; then
1113ad43ddacSmrg    # find a string as large as possible, as long as the shell can cope with it
1114ad43ddacSmrg    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1115ad43ddacSmrg      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1116ad43ddacSmrg      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1117ad43ddacSmrg	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1118ad43ddacSmrg      then
1119ad43ddacSmrg        break
1120ad43ddacSmrg      fi
1121ad43ddacSmrg    done
1122ad43ddacSmrg  fi
1123209ff23fSmrg
1124ad43ddacSmrg  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1125ad43ddacSmrg     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1126ad43ddacSmrg     test "X$echo_testing_string" = "X$echo_test_string"; then
1127ad43ddacSmrg    :
1128ad43ddacSmrg  else
1129ad43ddacSmrg    # The Solaris, AIX, and Digital Unix default echo programs unquote
1130ad43ddacSmrg    # backslashes.  This makes it impossible to quote backslashes using
1131ad43ddacSmrg    #   echo "$something" | sed 's/\\/\\\\/g'
1132ad43ddacSmrg    #
1133ad43ddacSmrg    # So, first we look for a working echo in the user's PATH.
1134209ff23fSmrg
1135ad43ddacSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1136ad43ddacSmrg    for dir in $PATH /usr/ucb; do
1137ad43ddacSmrg      IFS="$lt_save_ifs"
1138ad43ddacSmrg      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1139ad43ddacSmrg         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1140ad43ddacSmrg         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1141ad43ddacSmrg         test "X$echo_testing_string" = "X$echo_test_string"; then
1142ad43ddacSmrg        ECHO="$dir/echo"
1143ad43ddacSmrg        break
1144ad43ddacSmrg      fi
1145ad43ddacSmrg    done
1146209ff23fSmrg    IFS="$lt_save_ifs"
1147209ff23fSmrg
1148ad43ddacSmrg    if test "X$ECHO" = Xecho; then
1149ad43ddacSmrg      # We didn't find a better echo, so look for alternatives.
1150ad43ddacSmrg      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1151ad43ddacSmrg         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1152ad43ddacSmrg         test "X$echo_testing_string" = "X$echo_test_string"; then
1153ad43ddacSmrg        # This shell has a builtin print -r that does the trick.
1154ad43ddacSmrg        ECHO='print -r'
1155ad43ddacSmrg      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1156ad43ddacSmrg	   test "X$CONFIG_SHELL" != X/bin/ksh; then
1157ad43ddacSmrg        # If we have ksh, try running configure again with it.
1158ad43ddacSmrg        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1159ad43ddacSmrg        export ORIGINAL_CONFIG_SHELL
1160ad43ddacSmrg        CONFIG_SHELL=/bin/ksh
1161ad43ddacSmrg        export CONFIG_SHELL
1162ad43ddacSmrg        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1163209ff23fSmrg      else
1164ad43ddacSmrg        # Try using printf.
1165ad43ddacSmrg        ECHO='printf %s\n'
1166ad43ddacSmrg        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1167ad43ddacSmrg	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1168ad43ddacSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
1169ad43ddacSmrg	  # Cool, printf works
1170ad43ddacSmrg	  :
1171ad43ddacSmrg        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1172ad43ddacSmrg	     test "X$echo_testing_string" = 'X\t' &&
1173ad43ddacSmrg	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1174ad43ddacSmrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
1175ad43ddacSmrg	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1176ad43ddacSmrg	  export CONFIG_SHELL
1177ad43ddacSmrg	  SHELL="$CONFIG_SHELL"
1178ad43ddacSmrg	  export SHELL
1179ad43ddacSmrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1180ad43ddacSmrg        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1181ad43ddacSmrg	     test "X$echo_testing_string" = 'X\t' &&
1182ad43ddacSmrg	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1183ad43ddacSmrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
1184ad43ddacSmrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1185ad43ddacSmrg        else
1186ad43ddacSmrg	  # maybe with a smaller string...
1187ad43ddacSmrg	  prev=:
1188209ff23fSmrg
1189ad43ddacSmrg	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1190ad43ddacSmrg	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1191ad43ddacSmrg	    then
1192ad43ddacSmrg	      break
1193ad43ddacSmrg	    fi
1194ad43ddacSmrg	    prev="$cmd"
1195ad43ddacSmrg	  done
1196209ff23fSmrg
1197ad43ddacSmrg	  if test "$prev" != 'sed 50q "[$]0"'; then
1198ad43ddacSmrg	    echo_test_string=`eval $prev`
1199ad43ddacSmrg	    export echo_test_string
1200ad43ddacSmrg	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1201ad43ddacSmrg	  else
1202ad43ddacSmrg	    # Oops.  We lost completely, so just stick with echo.
1203ad43ddacSmrg	    ECHO=echo
1204ad43ddacSmrg	  fi
1205ad43ddacSmrg        fi
1206209ff23fSmrg      fi
1207209ff23fSmrg    fi
1208209ff23fSmrg  fi
1209209ff23fSmrgfi
1210209ff23fSmrg
1211209ff23fSmrg# Copy echo and quote the copy suitably for passing to libtool from
1212209ff23fSmrg# the Makefile, instead of quoting the original, which is used later.
1213ad43ddacSmrglt_ECHO=$ECHO
1214ad43ddacSmrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1215ad43ddacSmrg   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1216209ff23fSmrgfi
1217209ff23fSmrg
1218ad43ddacSmrgAC_SUBST(lt_ECHO)
1219ad43ddacSmrg])
1220ad43ddacSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1221ad43ddacSmrg_LT_DECL([], [ECHO], [1],
1222ad43ddacSmrg    [An echo program that does not interpret backslashes])
1223ad43ddacSmrg])# _LT_PROG_ECHO_BACKSLASH
1224209ff23fSmrg
1225209ff23fSmrg
1226ad43ddacSmrg# _LT_ENABLE_LOCK
1227ad43ddacSmrg# ---------------
1228ad43ddacSmrgm4_defun([_LT_ENABLE_LOCK],
1229209ff23fSmrg[AC_ARG_ENABLE([libtool-lock],
1230ad43ddacSmrg  [AS_HELP_STRING([--disable-libtool-lock],
1231ad43ddacSmrg    [avoid locking (might break parallel builds)])])
1232209ff23fSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1233209ff23fSmrg
1234209ff23fSmrg# Some flags need to be propagated to the compiler or linker for good
1235209ff23fSmrg# libtool support.
1236209ff23fSmrgcase $host in
1237209ff23fSmrgia64-*-hpux*)
1238209ff23fSmrg  # Find out which ABI we are using.
1239209ff23fSmrg  echo 'int i;' > conftest.$ac_ext
1240209ff23fSmrg  if AC_TRY_EVAL(ac_compile); then
1241209ff23fSmrg    case `/usr/bin/file conftest.$ac_objext` in
1242ad43ddacSmrg      *ELF-32*)
1243ad43ddacSmrg	HPUX_IA64_MODE="32"
1244ad43ddacSmrg	;;
1245ad43ddacSmrg      *ELF-64*)
1246ad43ddacSmrg	HPUX_IA64_MODE="64"
1247ad43ddacSmrg	;;
1248209ff23fSmrg    esac
1249209ff23fSmrg  fi
1250209ff23fSmrg  rm -rf conftest*
1251209ff23fSmrg  ;;
1252209ff23fSmrg*-*-irix6*)
1253209ff23fSmrg  # Find out which ABI we are using.
1254209ff23fSmrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1255209ff23fSmrg  if AC_TRY_EVAL(ac_compile); then
1256ad43ddacSmrg    if test "$lt_cv_prog_gnu_ld" = yes; then
1257ad43ddacSmrg      case `/usr/bin/file conftest.$ac_objext` in
1258ad43ddacSmrg	*32-bit*)
1259ad43ddacSmrg	  LD="${LD-ld} -melf32bsmip"
1260ad43ddacSmrg	  ;;
1261ad43ddacSmrg	*N32*)
1262ad43ddacSmrg	  LD="${LD-ld} -melf32bmipn32"
1263ad43ddacSmrg	  ;;
1264ad43ddacSmrg	*64-bit*)
1265ad43ddacSmrg	  LD="${LD-ld} -melf64bmip"
1266ad43ddacSmrg	;;
1267ad43ddacSmrg      esac
1268ad43ddacSmrg    else
1269ad43ddacSmrg      case `/usr/bin/file conftest.$ac_objext` in
1270ad43ddacSmrg	*32-bit*)
1271ad43ddacSmrg	  LD="${LD-ld} -32"
1272ad43ddacSmrg	  ;;
1273ad43ddacSmrg	*N32*)
1274ad43ddacSmrg	  LD="${LD-ld} -n32"
1275ad43ddacSmrg	  ;;
1276ad43ddacSmrg	*64-bit*)
1277ad43ddacSmrg	  LD="${LD-ld} -64"
1278ad43ddacSmrg	  ;;
1279ad43ddacSmrg      esac
1280ad43ddacSmrg    fi
1281209ff23fSmrg  fi
1282209ff23fSmrg  rm -rf conftest*
1283209ff23fSmrg  ;;
1284209ff23fSmrg
1285209ff23fSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1286ad43ddacSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1287209ff23fSmrg  # Find out which ABI we are using.
1288209ff23fSmrg  echo 'int i;' > conftest.$ac_ext
1289209ff23fSmrg  if AC_TRY_EVAL(ac_compile); then
1290209ff23fSmrg    case `/usr/bin/file conftest.o` in
1291ad43ddacSmrg      *32-bit*)
1292ad43ddacSmrg	case $host in
1293ad43ddacSmrg	  x86_64-*kfreebsd*-gnu)
1294ad43ddacSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
1295ad43ddacSmrg	    ;;
1296ad43ddacSmrg	  x86_64-*linux*)
1297ad43ddacSmrg	    LD="${LD-ld} -m elf_i386"
1298ad43ddacSmrg	    ;;
1299ad43ddacSmrg	  ppc64-*linux*|powerpc64-*linux*)
1300ad43ddacSmrg	    LD="${LD-ld} -m elf32ppclinux"
1301ad43ddacSmrg	    ;;
1302ad43ddacSmrg	  s390x-*linux*)
1303ad43ddacSmrg	    LD="${LD-ld} -m elf_s390"
1304ad43ddacSmrg	    ;;
1305ad43ddacSmrg	  sparc64-*linux*)
1306ad43ddacSmrg	    LD="${LD-ld} -m elf32_sparc"
1307ad43ddacSmrg	    ;;
1308ad43ddacSmrg	esac
1309ad43ddacSmrg	;;
1310ad43ddacSmrg      *64-bit*)
1311ad43ddacSmrg	case $host in
1312ad43ddacSmrg	  x86_64-*kfreebsd*-gnu)
1313ad43ddacSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
1314ad43ddacSmrg	    ;;
1315ad43ddacSmrg	  x86_64-*linux*)
1316ad43ddacSmrg	    LD="${LD-ld} -m elf_x86_64"
1317ad43ddacSmrg	    ;;
1318ad43ddacSmrg	  ppc*-*linux*|powerpc*-*linux*)
1319ad43ddacSmrg	    LD="${LD-ld} -m elf64ppc"
1320ad43ddacSmrg	    ;;
1321ad43ddacSmrg	  s390*-*linux*|s390*-*tpf*)
1322ad43ddacSmrg	    LD="${LD-ld} -m elf64_s390"
1323ad43ddacSmrg	    ;;
1324ad43ddacSmrg	  sparc*-*linux*)
1325ad43ddacSmrg	    LD="${LD-ld} -m elf64_sparc"
1326ad43ddacSmrg	    ;;
1327ad43ddacSmrg	esac
1328ad43ddacSmrg	;;
1329209ff23fSmrg    esac
1330209ff23fSmrg  fi
1331209ff23fSmrg  rm -rf conftest*
1332209ff23fSmrg  ;;
1333209ff23fSmrg
1334209ff23fSmrg*-*-sco3.2v5*)
1335209ff23fSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1336209ff23fSmrg  SAVE_CFLAGS="$CFLAGS"
1337209ff23fSmrg  CFLAGS="$CFLAGS -belf"
1338209ff23fSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1339209ff23fSmrg    [AC_LANG_PUSH(C)
1340ad43ddacSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1341209ff23fSmrg     AC_LANG_POP])
1342209ff23fSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1343209ff23fSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1344209ff23fSmrg    CFLAGS="$SAVE_CFLAGS"
1345209ff23fSmrg  fi
1346209ff23fSmrg  ;;
1347209ff23fSmrgsparc*-*solaris*)
1348209ff23fSmrg  # Find out which ABI we are using.
1349209ff23fSmrg  echo 'int i;' > conftest.$ac_ext
1350209ff23fSmrg  if AC_TRY_EVAL(ac_compile); then
1351209ff23fSmrg    case `/usr/bin/file conftest.o` in
1352209ff23fSmrg    *64-bit*)
1353209ff23fSmrg      case $lt_cv_prog_gnu_ld in
1354209ff23fSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1355209ff23fSmrg      *)
1356ad43ddacSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1357209ff23fSmrg	  LD="${LD-ld} -64"
1358209ff23fSmrg	fi
1359209ff23fSmrg	;;
1360209ff23fSmrg      esac
1361209ff23fSmrg      ;;
1362209ff23fSmrg    esac
1363209ff23fSmrg  fi
1364209ff23fSmrg  rm -rf conftest*
1365209ff23fSmrg  ;;
1366209ff23fSmrgesac
1367209ff23fSmrg
1368209ff23fSmrgneed_locks="$enable_libtool_lock"
1369ad43ddacSmrg])# _LT_ENABLE_LOCK
1370ad43ddacSmrg
1371ad43ddacSmrg
1372ad43ddacSmrg# _LT_CMD_OLD_ARCHIVE
1373ad43ddacSmrg# -------------------
1374ad43ddacSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
1375ad43ddacSmrg[AC_CHECK_TOOL(AR, ar, false)
1376ad43ddacSmrgtest -z "$AR" && AR=ar
1377ad43ddacSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
1378ad43ddacSmrg_LT_DECL([], [AR], [1], [The archiver])
1379ad43ddacSmrg_LT_DECL([], [AR_FLAGS], [1])
1380ad43ddacSmrg
1381ad43ddacSmrgAC_CHECK_TOOL(STRIP, strip, :)
1382ad43ddacSmrgtest -z "$STRIP" && STRIP=:
1383ad43ddacSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1384ad43ddacSmrg
1385ad43ddacSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1386ad43ddacSmrgtest -z "$RANLIB" && RANLIB=:
1387ad43ddacSmrg_LT_DECL([], [RANLIB], [1],
1388ad43ddacSmrg    [Commands used to install an old-style archive])
1389ad43ddacSmrg
1390ad43ddacSmrg# Determine commands to create old-style static archives.
1391ad43ddacSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1392ad43ddacSmrgold_postinstall_cmds='chmod 644 $oldlib'
1393ad43ddacSmrgold_postuninstall_cmds=
1394209ff23fSmrg
1395ad43ddacSmrgif test -n "$RANLIB"; then
1396ad43ddacSmrg  case $host_os in
1397ad43ddacSmrg  openbsd*)
1398ad43ddacSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1399ad43ddacSmrg    ;;
1400ad43ddacSmrg  *)
1401ad43ddacSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1402ad43ddacSmrg    ;;
1403ad43ddacSmrg  esac
1404ad43ddacSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1405ad43ddacSmrgfi
1406ad43ddacSmrg_LT_DECL([], [old_postinstall_cmds], [2])
1407ad43ddacSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
1408ad43ddacSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
1409ad43ddacSmrg    [Commands used to build an old-style archive])
1410ad43ddacSmrg])# _LT_CMD_OLD_ARCHIVE
1411209ff23fSmrg
1412209ff23fSmrg
1413ad43ddacSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1414209ff23fSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1415209ff23fSmrg# ----------------------------------------------------------------
1416209ff23fSmrg# Check whether the given compiler option works
1417ad43ddacSmrgAC_DEFUN([_LT_COMPILER_OPTION],
1418ad43ddacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1419ad43ddacSmrgm4_require([_LT_DECL_SED])dnl
1420209ff23fSmrgAC_CACHE_CHECK([$1], [$2],
1421209ff23fSmrg  [$2=no
1422ad43ddacSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1423209ff23fSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1424209ff23fSmrg   lt_compiler_flag="$3"
1425209ff23fSmrg   # Insert the option either (1) after the last *FLAGS variable, or
1426209ff23fSmrg   # (2) before a word containing "conftest.", or (3) at the end.
1427209ff23fSmrg   # Note that $ac_compile itself does not contain backslashes and begins
1428209ff23fSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1429209ff23fSmrg   # The option is referenced via a variable to avoid confusing sed.
1430209ff23fSmrg   lt_compile=`echo "$ac_compile" | $SED \
1431209ff23fSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1432209ff23fSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1433209ff23fSmrg   -e 's:$: $lt_compiler_flag:'`
1434209ff23fSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1435209ff23fSmrg   (eval "$lt_compile" 2>conftest.err)
1436209ff23fSmrg   ac_status=$?
1437209ff23fSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
1438209ff23fSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1439209ff23fSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
1440209ff23fSmrg     # The compiler can only warn and ignore the option if not recognized
1441209ff23fSmrg     # So say no if there are warnings other than the usual output.
1442ad43ddacSmrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1443209ff23fSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1444209ff23fSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1445209ff23fSmrg       $2=yes
1446209ff23fSmrg     fi
1447209ff23fSmrg   fi
1448ad43ddacSmrg   $RM conftest*
1449209ff23fSmrg])
1450209ff23fSmrg
1451209ff23fSmrgif test x"[$]$2" = xyes; then
1452ad43ddacSmrg    m4_if([$5], , :, [$5])
1453209ff23fSmrgelse
1454ad43ddacSmrg    m4_if([$6], , :, [$6])
1455209ff23fSmrgfi
1456ad43ddacSmrg])# _LT_COMPILER_OPTION
1457209ff23fSmrg
1458ad43ddacSmrg# Old name:
1459ad43ddacSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1460ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
1461ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1462209ff23fSmrg
1463ad43ddacSmrg
1464ad43ddacSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1465ad43ddacSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1466ad43ddacSmrg# ----------------------------------------------------
1467ad43ddacSmrg# Check whether the given linker option works
1468ad43ddacSmrgAC_DEFUN([_LT_LINKER_OPTION],
1469ad43ddacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1470ad43ddacSmrgm4_require([_LT_DECL_SED])dnl
1471209ff23fSmrgAC_CACHE_CHECK([$1], [$2],
1472209ff23fSmrg  [$2=no
1473209ff23fSmrg   save_LDFLAGS="$LDFLAGS"
1474209ff23fSmrg   LDFLAGS="$LDFLAGS $3"
1475209ff23fSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1476209ff23fSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1477209ff23fSmrg     # The linker can only warn and ignore the option if not recognized
1478209ff23fSmrg     # So say no if there are warnings
1479209ff23fSmrg     if test -s conftest.err; then
1480209ff23fSmrg       # Append any errors to the config.log.
1481209ff23fSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1482ad43ddacSmrg       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1483209ff23fSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1484209ff23fSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
1485209ff23fSmrg         $2=yes
1486209ff23fSmrg       fi
1487209ff23fSmrg     else
1488209ff23fSmrg       $2=yes
1489209ff23fSmrg     fi
1490209ff23fSmrg   fi
1491ad43ddacSmrg   $RM -r conftest*
1492209ff23fSmrg   LDFLAGS="$save_LDFLAGS"
1493209ff23fSmrg])
1494209ff23fSmrg
1495209ff23fSmrgif test x"[$]$2" = xyes; then
1496ad43ddacSmrg    m4_if([$4], , :, [$4])
1497209ff23fSmrgelse
1498ad43ddacSmrg    m4_if([$5], , :, [$5])
1499209ff23fSmrgfi
1500ad43ddacSmrg])# _LT_LINKER_OPTION
1501209ff23fSmrg
1502ad43ddacSmrg# Old name:
1503ad43ddacSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1504ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
1505ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1506209ff23fSmrg
1507ad43ddacSmrg
1508ad43ddacSmrg# LT_CMD_MAX_LEN
1509ad43ddacSmrg#---------------
1510ad43ddacSmrgAC_DEFUN([LT_CMD_MAX_LEN],
1511ad43ddacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1512ad43ddacSmrg# find the maximum length of command line arguments
1513209ff23fSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
1514209ff23fSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1515209ff23fSmrg  i=0
1516209ff23fSmrg  teststring="ABCD"
1517209ff23fSmrg
1518209ff23fSmrg  case $build_os in
1519209ff23fSmrg  msdosdjgpp*)
1520209ff23fSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
1521209ff23fSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
1522209ff23fSmrg    # during glob expansion).  Even if it were fixed, the result of this
1523209ff23fSmrg    # check would be larger than it should be.
1524209ff23fSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1525209ff23fSmrg    ;;
1526209ff23fSmrg
1527209ff23fSmrg  gnu*)
1528209ff23fSmrg    # Under GNU Hurd, this test is not required because there is
1529209ff23fSmrg    # no limit to the length of command line arguments.
1530209ff23fSmrg    # Libtool will interpret -1 as no limit whatsoever
1531209ff23fSmrg    lt_cv_sys_max_cmd_len=-1;
1532209ff23fSmrg    ;;
1533209ff23fSmrg
15342f39173dSmrg  cygwin* | mingw* | cegcc*)
1535209ff23fSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
1536209ff23fSmrg    # about 5 minutes as the teststring grows exponentially.
1537209ff23fSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
1538209ff23fSmrg    # you end up with a "frozen" computer, even though with patience
1539209ff23fSmrg    # the test eventually succeeds (with a max line length of 256k).
1540209ff23fSmrg    # Instead, let's just punt: use the minimum linelength reported by
1541209ff23fSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
1542209ff23fSmrg    lt_cv_sys_max_cmd_len=8192;
1543209ff23fSmrg    ;;
1544209ff23fSmrg
1545209ff23fSmrg  amigaos*)
1546209ff23fSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
1547209ff23fSmrg    # So we just punt and use a minimum line length of 8192.
1548209ff23fSmrg    lt_cv_sys_max_cmd_len=8192;
1549209ff23fSmrg    ;;
1550209ff23fSmrg
1551209ff23fSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1552209ff23fSmrg    # This has been around since 386BSD, at least.  Likely further.
1553209ff23fSmrg    if test -x /sbin/sysctl; then
1554209ff23fSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1555209ff23fSmrg    elif test -x /usr/sbin/sysctl; then
1556209ff23fSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1557209ff23fSmrg    else
1558209ff23fSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1559209ff23fSmrg    fi
1560209ff23fSmrg    # And add a safety zone
1561209ff23fSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1562209ff23fSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1563209ff23fSmrg    ;;
1564209ff23fSmrg
1565209ff23fSmrg  interix*)
1566209ff23fSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1567209ff23fSmrg    lt_cv_sys_max_cmd_len=196608
1568209ff23fSmrg    ;;
1569209ff23fSmrg
1570209ff23fSmrg  osf*)
1571209ff23fSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1572209ff23fSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1573209ff23fSmrg    # nice to cause kernel panics so lets avoid the loop below.
1574209ff23fSmrg    # First set a reasonable default.
1575209ff23fSmrg    lt_cv_sys_max_cmd_len=16384
1576209ff23fSmrg    #
1577209ff23fSmrg    if test -x /sbin/sysconfig; then
1578209ff23fSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1579209ff23fSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1580209ff23fSmrg      esac
1581209ff23fSmrg    fi
1582209ff23fSmrg    ;;
1583209ff23fSmrg  sco3.2v5*)
1584209ff23fSmrg    lt_cv_sys_max_cmd_len=102400
1585209ff23fSmrg    ;;
1586209ff23fSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
1587209ff23fSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1588209ff23fSmrg    if test -n "$kargmax"; then
1589ad43ddacSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1590209ff23fSmrg    else
1591209ff23fSmrg      lt_cv_sys_max_cmd_len=32768
1592209ff23fSmrg    fi
1593209ff23fSmrg    ;;
1594209ff23fSmrg  *)
1595209ff23fSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1596209ff23fSmrg    if test -n "$lt_cv_sys_max_cmd_len"; then
1597209ff23fSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1598209ff23fSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1599209ff23fSmrg    else
1600ad43ddacSmrg      # Make teststring a little bigger before we do anything with it.
1601ad43ddacSmrg      # a 1K string should be a reasonable start.
1602ad43ddacSmrg      for i in 1 2 3 4 5 6 7 8 ; do
1603ad43ddacSmrg        teststring=$teststring$teststring
1604ad43ddacSmrg      done
1605209ff23fSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1606ad43ddacSmrg      # If test is not a shell built-in, we'll probably end up computing a
1607ad43ddacSmrg      # maximum length that is only half of the actual maximum length, but
1608ad43ddacSmrg      # we can't tell.
1609ad43ddacSmrg      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1610ad43ddacSmrg	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1611209ff23fSmrg	      test $i != 17 # 1/2 MB should be enough
1612209ff23fSmrg      do
1613209ff23fSmrg        i=`expr $i + 1`
1614209ff23fSmrg        teststring=$teststring$teststring
1615209ff23fSmrg      done
1616ad43ddacSmrg      # Only check the string length outside the loop.
1617ad43ddacSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1618209ff23fSmrg      teststring=
1619ad43ddacSmrg      # Add a significant safety factor because C++ compilers can tack on
1620ad43ddacSmrg      # massive amounts of additional arguments before passing them to the
1621ad43ddacSmrg      # linker.  It appears as though 1/2 is a usable value.
1622209ff23fSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1623209ff23fSmrg    fi
1624209ff23fSmrg    ;;
1625209ff23fSmrg  esac
1626209ff23fSmrg])
1627209ff23fSmrgif test -n $lt_cv_sys_max_cmd_len ; then
1628209ff23fSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1629209ff23fSmrgelse
1630209ff23fSmrg  AC_MSG_RESULT(none)
1631209ff23fSmrgfi
1632ad43ddacSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
1633ad43ddacSmrg_LT_DECL([], [max_cmd_len], [0],
1634ad43ddacSmrg    [What is the maximum length of a command?])
1635ad43ddacSmrg])# LT_CMD_MAX_LEN
1636209ff23fSmrg
1637ad43ddacSmrg# Old name:
1638ad43ddacSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1639ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
1640ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1641209ff23fSmrg
1642ad43ddacSmrg
1643ad43ddacSmrg# _LT_HEADER_DLFCN
1644ad43ddacSmrg# ----------------
1645ad43ddacSmrgm4_defun([_LT_HEADER_DLFCN],
1646ad43ddacSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1647ad43ddacSmrg])# _LT_HEADER_DLFCN
1648209ff23fSmrg
1649209ff23fSmrg
1650ad43ddacSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1651ad43ddacSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1652ad43ddacSmrg# ----------------------------------------------------------------
1653ad43ddacSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
1654ad43ddacSmrg[m4_require([_LT_HEADER_DLFCN])dnl
1655209ff23fSmrgif test "$cross_compiling" = yes; then :
1656209ff23fSmrg  [$4]
1657209ff23fSmrgelse
1658209ff23fSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1659209ff23fSmrg  lt_status=$lt_dlunknown
1660ad43ddacSmrg  cat > conftest.$ac_ext <<_LT_EOF
1661209ff23fSmrg[#line __oline__ "configure"
1662209ff23fSmrg#include "confdefs.h"
1663209ff23fSmrg
1664209ff23fSmrg#if HAVE_DLFCN_H
1665209ff23fSmrg#include <dlfcn.h>
1666209ff23fSmrg#endif
1667209ff23fSmrg
1668209ff23fSmrg#include <stdio.h>
1669209ff23fSmrg
1670209ff23fSmrg#ifdef RTLD_GLOBAL
1671209ff23fSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
1672209ff23fSmrg#else
1673209ff23fSmrg#  ifdef DL_GLOBAL
1674209ff23fSmrg#    define LT_DLGLOBAL		DL_GLOBAL
1675209ff23fSmrg#  else
1676209ff23fSmrg#    define LT_DLGLOBAL		0
1677209ff23fSmrg#  endif
1678209ff23fSmrg#endif
1679209ff23fSmrg
1680209ff23fSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1681209ff23fSmrg   find out it does not work in some platform. */
1682209ff23fSmrg#ifndef LT_DLLAZY_OR_NOW
1683209ff23fSmrg#  ifdef RTLD_LAZY
1684209ff23fSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1685209ff23fSmrg#  else
1686209ff23fSmrg#    ifdef DL_LAZY
1687209ff23fSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
1688209ff23fSmrg#    else
1689209ff23fSmrg#      ifdef RTLD_NOW
1690209ff23fSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1691209ff23fSmrg#      else
1692209ff23fSmrg#        ifdef DL_NOW
1693209ff23fSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
1694209ff23fSmrg#        else
1695209ff23fSmrg#          define LT_DLLAZY_OR_NOW	0
1696209ff23fSmrg#        endif
1697209ff23fSmrg#      endif
1698209ff23fSmrg#    endif
1699209ff23fSmrg#  endif
1700209ff23fSmrg#endif
1701209ff23fSmrg
1702209ff23fSmrgvoid fnord() { int i=42;}
1703209ff23fSmrgint main ()
1704209ff23fSmrg{
1705209ff23fSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1706209ff23fSmrg  int status = $lt_dlunknown;
1707209ff23fSmrg
1708209ff23fSmrg  if (self)
1709209ff23fSmrg    {
1710209ff23fSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1711209ff23fSmrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1712209ff23fSmrg      /* dlclose (self); */
1713209ff23fSmrg    }
1714209ff23fSmrg  else
1715209ff23fSmrg    puts (dlerror ());
1716209ff23fSmrg
17172f39173dSmrg  return status;
1718209ff23fSmrg}]
1719ad43ddacSmrg_LT_EOF
1720209ff23fSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1721209ff23fSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1722209ff23fSmrg    lt_status=$?
1723209ff23fSmrg    case x$lt_status in
1724209ff23fSmrg      x$lt_dlno_uscore) $1 ;;
1725209ff23fSmrg      x$lt_dlneed_uscore) $2 ;;
1726209ff23fSmrg      x$lt_dlunknown|x*) $3 ;;
1727209ff23fSmrg    esac
1728209ff23fSmrg  else :
1729209ff23fSmrg    # compilation failed
1730209ff23fSmrg    $3
1731209ff23fSmrg  fi
1732209ff23fSmrgfi
1733209ff23fSmrgrm -fr conftest*
1734ad43ddacSmrg])# _LT_TRY_DLOPEN_SELF
1735209ff23fSmrg
1736209ff23fSmrg
1737ad43ddacSmrg# LT_SYS_DLOPEN_SELF
1738ad43ddacSmrg# ------------------
1739ad43ddacSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
1740ad43ddacSmrg[m4_require([_LT_HEADER_DLFCN])dnl
1741209ff23fSmrgif test "x$enable_dlopen" != xyes; then
1742209ff23fSmrg  enable_dlopen=unknown
1743209ff23fSmrg  enable_dlopen_self=unknown
1744209ff23fSmrg  enable_dlopen_self_static=unknown
1745209ff23fSmrgelse
1746209ff23fSmrg  lt_cv_dlopen=no
1747209ff23fSmrg  lt_cv_dlopen_libs=
1748209ff23fSmrg
1749209ff23fSmrg  case $host_os in
1750209ff23fSmrg  beos*)
1751209ff23fSmrg    lt_cv_dlopen="load_add_on"
1752209ff23fSmrg    lt_cv_dlopen_libs=
1753209ff23fSmrg    lt_cv_dlopen_self=yes
1754209ff23fSmrg    ;;
1755209ff23fSmrg
17562f39173dSmrg  mingw* | pw32* | cegcc*)
1757209ff23fSmrg    lt_cv_dlopen="LoadLibrary"
1758209ff23fSmrg    lt_cv_dlopen_libs=
1759ad43ddacSmrg    ;;
1760209ff23fSmrg
1761209ff23fSmrg  cygwin*)
1762209ff23fSmrg    lt_cv_dlopen="dlopen"
1763209ff23fSmrg    lt_cv_dlopen_libs=
1764ad43ddacSmrg    ;;
1765209ff23fSmrg
1766209ff23fSmrg  darwin*)
1767209ff23fSmrg  # if libdl is installed we need to link against it
1768209ff23fSmrg    AC_CHECK_LIB([dl], [dlopen],
1769209ff23fSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1770209ff23fSmrg    lt_cv_dlopen="dyld"
1771209ff23fSmrg    lt_cv_dlopen_libs=
1772209ff23fSmrg    lt_cv_dlopen_self=yes
1773209ff23fSmrg    ])
1774ad43ddacSmrg    ;;
1775209ff23fSmrg
1776209ff23fSmrg  *)
1777209ff23fSmrg    AC_CHECK_FUNC([shl_load],
1778209ff23fSmrg	  [lt_cv_dlopen="shl_load"],
1779209ff23fSmrg      [AC_CHECK_LIB([dld], [shl_load],
1780209ff23fSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1781209ff23fSmrg	[AC_CHECK_FUNC([dlopen],
1782209ff23fSmrg	      [lt_cv_dlopen="dlopen"],
1783209ff23fSmrg	  [AC_CHECK_LIB([dl], [dlopen],
1784209ff23fSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1785209ff23fSmrg	    [AC_CHECK_LIB([svld], [dlopen],
1786209ff23fSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1787209ff23fSmrg	      [AC_CHECK_LIB([dld], [dld_link],
1788209ff23fSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1789209ff23fSmrg	      ])
1790209ff23fSmrg	    ])
1791209ff23fSmrg	  ])
1792209ff23fSmrg	])
1793209ff23fSmrg      ])
1794209ff23fSmrg    ;;
1795209ff23fSmrg  esac
1796209ff23fSmrg
1797209ff23fSmrg  if test "x$lt_cv_dlopen" != xno; then
1798209ff23fSmrg    enable_dlopen=yes
1799209ff23fSmrg  else
1800209ff23fSmrg    enable_dlopen=no
1801209ff23fSmrg  fi
1802209ff23fSmrg
1803209ff23fSmrg  case $lt_cv_dlopen in
1804209ff23fSmrg  dlopen)
1805209ff23fSmrg    save_CPPFLAGS="$CPPFLAGS"
1806209ff23fSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1807209ff23fSmrg
1808209ff23fSmrg    save_LDFLAGS="$LDFLAGS"
1809209ff23fSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1810209ff23fSmrg
1811209ff23fSmrg    save_LIBS="$LIBS"
1812209ff23fSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
1813209ff23fSmrg
1814209ff23fSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
1815209ff23fSmrg	  lt_cv_dlopen_self, [dnl
1816ad43ddacSmrg	  _LT_TRY_DLOPEN_SELF(
1817209ff23fSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1818209ff23fSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1819209ff23fSmrg    ])
1820209ff23fSmrg
1821209ff23fSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
1822209ff23fSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1823209ff23fSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1824ad43ddacSmrg	  lt_cv_dlopen_self_static, [dnl
1825ad43ddacSmrg	  _LT_TRY_DLOPEN_SELF(
1826209ff23fSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1827209ff23fSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1828209ff23fSmrg      ])
1829209ff23fSmrg    fi
1830209ff23fSmrg
1831209ff23fSmrg    CPPFLAGS="$save_CPPFLAGS"
1832209ff23fSmrg    LDFLAGS="$save_LDFLAGS"
1833209ff23fSmrg    LIBS="$save_LIBS"
1834209ff23fSmrg    ;;
1835209ff23fSmrg  esac
1836209ff23fSmrg
1837209ff23fSmrg  case $lt_cv_dlopen_self in
1838209ff23fSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1839209ff23fSmrg  *) enable_dlopen_self=unknown ;;
1840209ff23fSmrg  esac
1841209ff23fSmrg
1842209ff23fSmrg  case $lt_cv_dlopen_self_static in
1843209ff23fSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1844209ff23fSmrg  *) enable_dlopen_self_static=unknown ;;
1845209ff23fSmrg  esac
1846209ff23fSmrgfi
1847ad43ddacSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
1848ad43ddacSmrg	 [Whether dlopen is supported])
1849ad43ddacSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1850ad43ddacSmrg	 [Whether dlopen of programs is supported])
1851ad43ddacSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1852ad43ddacSmrg	 [Whether dlopen of statically linked programs is supported])
1853ad43ddacSmrg])# LT_SYS_DLOPEN_SELF
1854209ff23fSmrg
1855ad43ddacSmrg# Old name:
1856ad43ddacSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1857ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
1858ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1859209ff23fSmrg
1860ad43ddacSmrg
1861ad43ddacSmrg# _LT_COMPILER_C_O([TAGNAME])
1862ad43ddacSmrg# ---------------------------
1863ad43ddacSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
1864ad43ddacSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
1865ad43ddacSmrgm4_defun([_LT_COMPILER_C_O],
1866ad43ddacSmrg[m4_require([_LT_DECL_SED])dnl
1867ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1868ad43ddacSmrgm4_require([_LT_TAG_COMPILER])dnl
1869209ff23fSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1870ad43ddacSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1871ad43ddacSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1872ad43ddacSmrg   $RM -r conftest 2>/dev/null
1873209ff23fSmrg   mkdir conftest
1874209ff23fSmrg   cd conftest
1875209ff23fSmrg   mkdir out
1876209ff23fSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1877209ff23fSmrg
1878209ff23fSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
1879209ff23fSmrg   # Insert the option either (1) after the last *FLAGS variable, or
1880209ff23fSmrg   # (2) before a word containing "conftest.", or (3) at the end.
1881209ff23fSmrg   # Note that $ac_compile itself does not contain backslashes and begins
1882209ff23fSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1883209ff23fSmrg   lt_compile=`echo "$ac_compile" | $SED \
1884209ff23fSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1885209ff23fSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1886209ff23fSmrg   -e 's:$: $lt_compiler_flag:'`
1887209ff23fSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1888209ff23fSmrg   (eval "$lt_compile" 2>out/conftest.err)
1889209ff23fSmrg   ac_status=$?
1890209ff23fSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1891209ff23fSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1892209ff23fSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1893209ff23fSmrg   then
1894209ff23fSmrg     # The compiler can only warn and ignore the option if not recognized
1895209ff23fSmrg     # So say no if there are warnings
1896ad43ddacSmrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1897209ff23fSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1898209ff23fSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1899ad43ddacSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1900209ff23fSmrg     fi
1901209ff23fSmrg   fi
1902209ff23fSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1903ad43ddacSmrg   $RM conftest*
1904209ff23fSmrg   # SGI C++ compiler will create directory out/ii_files/ for
1905209ff23fSmrg   # template instantiation
1906ad43ddacSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1907ad43ddacSmrg   $RM out/* && rmdir out
1908209ff23fSmrg   cd ..
1909ad43ddacSmrg   $RM -r conftest
1910ad43ddacSmrg   $RM conftest*
1911209ff23fSmrg])
1912ad43ddacSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1913ad43ddacSmrg	[Does compiler simultaneously support -c and -o options?])
1914ad43ddacSmrg])# _LT_COMPILER_C_O
1915209ff23fSmrg
1916209ff23fSmrg
1917ad43ddacSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
1918ad43ddacSmrg# ----------------------------------
1919209ff23fSmrg# Check to see if we can do hard links to lock some files if needed
1920ad43ddacSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
1921ad43ddacSmrg[m4_require([_LT_ENABLE_LOCK])dnl
1922ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1923ad43ddacSmrg_LT_COMPILER_C_O([$1])
1924209ff23fSmrg
1925209ff23fSmrghard_links="nottested"
1926ad43ddacSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1927209ff23fSmrg  # do not overwrite the value of need_locks provided by the user
1928209ff23fSmrg  AC_MSG_CHECKING([if we can lock with hard links])
1929209ff23fSmrg  hard_links=yes
1930ad43ddacSmrg  $RM conftest*
1931209ff23fSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1932209ff23fSmrg  touch conftest.a
1933209ff23fSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
1934209ff23fSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1935209ff23fSmrg  AC_MSG_RESULT([$hard_links])
1936209ff23fSmrg  if test "$hard_links" = no; then
1937209ff23fSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1938209ff23fSmrg    need_locks=warn
1939209ff23fSmrg  fi
1940209ff23fSmrgelse
1941209ff23fSmrg  need_locks=no
1942209ff23fSmrgfi
1943ad43ddacSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1944ad43ddacSmrg])# _LT_COMPILER_FILE_LOCKS
1945209ff23fSmrg
1946209ff23fSmrg
1947ad43ddacSmrg# _LT_CHECK_OBJDIR
1948ad43ddacSmrg# ----------------
1949ad43ddacSmrgm4_defun([_LT_CHECK_OBJDIR],
1950209ff23fSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1951209ff23fSmrg[rm -f .libs 2>/dev/null
1952209ff23fSmrgmkdir .libs 2>/dev/null
1953209ff23fSmrgif test -d .libs; then
1954209ff23fSmrg  lt_cv_objdir=.libs
1955209ff23fSmrgelse
1956209ff23fSmrg  # MS-DOS does not allow filenames that begin with a dot.
1957209ff23fSmrg  lt_cv_objdir=_libs
1958209ff23fSmrgfi
1959209ff23fSmrgrmdir .libs 2>/dev/null])
1960209ff23fSmrgobjdir=$lt_cv_objdir
1961ad43ddacSmrg_LT_DECL([], [objdir], [0],
1962ad43ddacSmrg         [The name of the directory that contains temporary libtool files])dnl
1963ad43ddacSmrgm4_pattern_allow([LT_OBJDIR])dnl
1964ad43ddacSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1965ad43ddacSmrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
1966ad43ddacSmrg])# _LT_CHECK_OBJDIR
1967209ff23fSmrg
1968209ff23fSmrg
1969ad43ddacSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1970ad43ddacSmrg# --------------------------------------
1971209ff23fSmrg# Check hardcoding attributes.
1972ad43ddacSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1973209ff23fSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
1974ad43ddacSmrg_LT_TAGVAR(hardcode_action, $1)=
1975ad43ddacSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1976ad43ddacSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1977ad43ddacSmrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1978209ff23fSmrg
1979ad43ddacSmrg  # We can hardcode non-existent directories.
1980ad43ddacSmrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1981209ff23fSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1982209ff23fSmrg     # have to relink, otherwise we might link with an installed library
1983209ff23fSmrg     # when we should be linking with a yet-to-be-installed one
1984ad43ddacSmrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1985ad43ddacSmrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1986209ff23fSmrg    # Linking always hardcodes the temporary library directory.
1987ad43ddacSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
1988209ff23fSmrg  else
1989209ff23fSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1990ad43ddacSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
1991209ff23fSmrg  fi
1992209ff23fSmrgelse
1993209ff23fSmrg  # We cannot hardcode anything, or else we can only hardcode existing
1994209ff23fSmrg  # directories.
1995ad43ddacSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
1996209ff23fSmrgfi
1997ad43ddacSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1998209ff23fSmrg
1999ad43ddacSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2000ad43ddacSmrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2001209ff23fSmrg  # Fast installation is not supported
2002209ff23fSmrg  enable_fast_install=no
2003209ff23fSmrgelif test "$shlibpath_overrides_runpath" = yes ||
2004209ff23fSmrg     test "$enable_shared" = no; then
2005209ff23fSmrg  # Fast installation is not necessary
2006209ff23fSmrg  enable_fast_install=needless
2007209ff23fSmrgfi
2008ad43ddacSmrg_LT_TAGDECL([], [hardcode_action], [0],
2009ad43ddacSmrg    [How to hardcode a shared library path into an executable])
2010ad43ddacSmrg])# _LT_LINKER_HARDCODE_LIBPATH
2011209ff23fSmrg
2012209ff23fSmrg
2013ad43ddacSmrg# _LT_CMD_STRIPLIB
2014ad43ddacSmrg# ----------------
2015ad43ddacSmrgm4_defun([_LT_CMD_STRIPLIB],
2016ad43ddacSmrg[m4_require([_LT_DECL_EGREP])
2017ad43ddacSmrgstriplib=
2018209ff23fSmrgold_striplib=
2019209ff23fSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
2020ad43ddacSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2021209ff23fSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2022209ff23fSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2023209ff23fSmrg  AC_MSG_RESULT([yes])
2024209ff23fSmrgelse
2025209ff23fSmrg# FIXME - insert some real tests, host_os isn't really good enough
2026209ff23fSmrg  case $host_os in
2027ad43ddacSmrg  darwin*)
2028ad43ddacSmrg    if test -n "$STRIP" ; then
2029ad43ddacSmrg      striplib="$STRIP -x"
2030ad43ddacSmrg      old_striplib="$STRIP -S"
2031ad43ddacSmrg      AC_MSG_RESULT([yes])
2032ad43ddacSmrg    else
2033ad43ddacSmrg      AC_MSG_RESULT([no])
2034ad43ddacSmrg    fi
2035ad43ddacSmrg    ;;
2036ad43ddacSmrg  *)
2037ad43ddacSmrg    AC_MSG_RESULT([no])
2038209ff23fSmrg    ;;
2039209ff23fSmrg  esac
2040209ff23fSmrgfi
2041ad43ddacSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2042ad43ddacSmrg_LT_DECL([], [striplib], [1])
2043ad43ddacSmrg])# _LT_CMD_STRIPLIB
2044209ff23fSmrg
2045209ff23fSmrg
2046ad43ddacSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
2047209ff23fSmrg# -----------------------------
2048209ff23fSmrg# PORTME Fill in your ld.so characteristics
2049ad43ddacSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
2050ad43ddacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2051ad43ddacSmrgm4_require([_LT_DECL_EGREP])dnl
2052ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
20532f39173dSmrgm4_require([_LT_DECL_OBJDUMP])dnl
2054ad43ddacSmrgm4_require([_LT_DECL_SED])dnl
2055209ff23fSmrgAC_MSG_CHECKING([dynamic linker characteristics])
2056ad43ddacSmrgm4_if([$1],
2057ad43ddacSmrg	[], [
2058209ff23fSmrgif test "$GCC" = yes; then
2059209ff23fSmrg  case $host_os in
2060209ff23fSmrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2061209ff23fSmrg    *) lt_awk_arg="/^libraries:/" ;;
2062209ff23fSmrg  esac
2063209ff23fSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2064ad43ddacSmrg  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2065209ff23fSmrg    # if the path contains ";" then we assume it to be the separator
2066209ff23fSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
2067209ff23fSmrg    # assumed that no part of a normal pathname contains ";" but that should
2068209ff23fSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
2069ad43ddacSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2070209ff23fSmrg  else
2071ad43ddacSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2072209ff23fSmrg  fi
2073209ff23fSmrg  # Ok, now we have the path, separated by spaces, we can step through it
2074209ff23fSmrg  # and add multilib dir if necessary.
2075209ff23fSmrg  lt_tmp_lt_search_path_spec=
2076209ff23fSmrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2077209ff23fSmrg  for lt_sys_path in $lt_search_path_spec; do
2078209ff23fSmrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2079209ff23fSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2080209ff23fSmrg    else
2081209ff23fSmrg      test -d "$lt_sys_path" && \
2082209ff23fSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2083209ff23fSmrg    fi
2084209ff23fSmrg  done
2085ad43ddacSmrg  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2086209ff23fSmrgBEGIN {RS=" "; FS="/|\n";} {
2087209ff23fSmrg  lt_foo="";
2088209ff23fSmrg  lt_count=0;
2089209ff23fSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
2090209ff23fSmrg    if ($lt_i != "" && $lt_i != ".") {
2091209ff23fSmrg      if ($lt_i == "..") {
2092209ff23fSmrg        lt_count++;
2093209ff23fSmrg      } else {
2094209ff23fSmrg        if (lt_count == 0) {
2095209ff23fSmrg          lt_foo="/" $lt_i lt_foo;
2096209ff23fSmrg        } else {
2097209ff23fSmrg          lt_count--;
2098209ff23fSmrg        }
2099209ff23fSmrg      }
2100209ff23fSmrg    }
2101209ff23fSmrg  }
2102209ff23fSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2103209ff23fSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2104209ff23fSmrg}'`
2105ad43ddacSmrg  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2106209ff23fSmrgelse
2107209ff23fSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2108209ff23fSmrgfi])
2109ad43ddacSmrglibrary_names_spec=
2110ad43ddacSmrglibname_spec='lib$name'
2111ad43ddacSmrgsoname_spec=
2112ad43ddacSmrgshrext_cmds=".so"
2113ad43ddacSmrgpostinstall_cmds=
2114ad43ddacSmrgpostuninstall_cmds=
2115ad43ddacSmrgfinish_cmds=
2116ad43ddacSmrgfinish_eval=
2117ad43ddacSmrgshlibpath_var=
2118ad43ddacSmrgshlibpath_overrides_runpath=unknown
2119ad43ddacSmrgversion_type=none
2120ad43ddacSmrgdynamic_linker="$host_os ld.so"
2121ad43ddacSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
2122209ff23fSmrgneed_lib_prefix=unknown
2123209ff23fSmrghardcode_into_libs=no
2124209ff23fSmrg
2125209ff23fSmrg# when you set need_version to no, make sure it does not cause -set_version
2126209ff23fSmrg# flags to be left without arguments
2127209ff23fSmrgneed_version=unknown
2128209ff23fSmrg
2129209ff23fSmrgcase $host_os in
2130209ff23fSmrgaix3*)
2131209ff23fSmrg  version_type=linux
2132209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2133209ff23fSmrg  shlibpath_var=LIBPATH
2134209ff23fSmrg
2135209ff23fSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
2136209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2137209ff23fSmrg  ;;
2138209ff23fSmrg
2139209ff23fSmrgaix[[4-9]]*)
2140209ff23fSmrg  version_type=linux
2141209ff23fSmrg  need_lib_prefix=no
2142209ff23fSmrg  need_version=no
2143209ff23fSmrg  hardcode_into_libs=yes
2144209ff23fSmrg  if test "$host_cpu" = ia64; then
2145209ff23fSmrg    # AIX 5 supports IA64
2146209ff23fSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2147209ff23fSmrg    shlibpath_var=LD_LIBRARY_PATH
2148209ff23fSmrg  else
2149209ff23fSmrg    # With GCC up to 2.95.x, collect2 would create an import file
2150209ff23fSmrg    # for dependence libraries.  The import file would start with
2151209ff23fSmrg    # the line `#! .'.  This would cause the generated library to
2152209ff23fSmrg    # depend on `.', always an invalid library.  This was fixed in
2153209ff23fSmrg    # development snapshots of GCC prior to 3.0.
2154209ff23fSmrg    case $host_os in
2155209ff23fSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
2156209ff23fSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2157209ff23fSmrg	   echo ' yes '
2158ad43ddacSmrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2159209ff23fSmrg	:
2160209ff23fSmrg      else
2161209ff23fSmrg	can_build_shared=no
2162209ff23fSmrg      fi
2163209ff23fSmrg      ;;
2164209ff23fSmrg    esac
2165209ff23fSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2166209ff23fSmrg    # soname into executable. Probably we can add versioning support to
2167209ff23fSmrg    # collect2, so additional links can be useful in future.
2168209ff23fSmrg    if test "$aix_use_runtimelinking" = yes; then
2169209ff23fSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2170209ff23fSmrg      # instead of lib<name>.a to let people know that these are not
2171209ff23fSmrg      # typical AIX shared libraries.
2172209ff23fSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2173209ff23fSmrg    else
2174209ff23fSmrg      # We preserve .a as extension for shared libraries through AIX4.2
2175209ff23fSmrg      # and later when we are not doing run time linking.
2176209ff23fSmrg      library_names_spec='${libname}${release}.a $libname.a'
2177209ff23fSmrg      soname_spec='${libname}${release}${shared_ext}$major'
2178209ff23fSmrg    fi
2179209ff23fSmrg    shlibpath_var=LIBPATH
2180209ff23fSmrg  fi
2181209ff23fSmrg  ;;
2182209ff23fSmrg
2183209ff23fSmrgamigaos*)
2184ad43ddacSmrg  case $host_cpu in
2185ad43ddacSmrg  powerpc)
2186ad43ddacSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
2187ad43ddacSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2188ad43ddacSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2189ad43ddacSmrg    ;;
2190ad43ddacSmrg  m68k)
2191ad43ddacSmrg    library_names_spec='$libname.ixlibrary $libname.a'
2192ad43ddacSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2193ad43ddacSmrg    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'
2194ad43ddacSmrg    ;;
2195ad43ddacSmrg  esac
2196209ff23fSmrg  ;;
2197209ff23fSmrg
2198209ff23fSmrgbeos*)
2199209ff23fSmrg  library_names_spec='${libname}${shared_ext}'
2200209ff23fSmrg  dynamic_linker="$host_os ld.so"
2201209ff23fSmrg  shlibpath_var=LIBRARY_PATH
2202209ff23fSmrg  ;;
2203209ff23fSmrg
2204209ff23fSmrgbsdi[[45]]*)
2205209ff23fSmrg  version_type=linux
2206209ff23fSmrg  need_version=no
2207209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2208209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2209209ff23fSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2210209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
2211209ff23fSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2212209ff23fSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2213209ff23fSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
2214209ff23fSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2215209ff23fSmrg  # libtool to hard-code these into programs
2216209ff23fSmrg  ;;
2217209ff23fSmrg
22182f39173dSmrgcygwin* | mingw* | pw32* | cegcc*)
2219209ff23fSmrg  version_type=windows
2220209ff23fSmrg  shrext_cmds=".dll"
2221209ff23fSmrg  need_version=no
2222209ff23fSmrg  need_lib_prefix=no
2223209ff23fSmrg
2224209ff23fSmrg  case $GCC,$host_os in
22252f39173dSmrg  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2226209ff23fSmrg    library_names_spec='$libname.dll.a'
2227209ff23fSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2228209ff23fSmrg    postinstall_cmds='base_file=`basename \${file}`~
2229ad43ddacSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2230209ff23fSmrg      dldir=$destdir/`dirname \$dlpath`~
2231209ff23fSmrg      test -d \$dldir || mkdir -p \$dldir~
2232209ff23fSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
2233ad43ddacSmrg      chmod a+x \$dldir/$dlname~
2234ad43ddacSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2235ad43ddacSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2236ad43ddacSmrg      fi'
2237209ff23fSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2238209ff23fSmrg      dlpath=$dir/\$dldll~
2239ad43ddacSmrg       $RM \$dlpath'
2240209ff23fSmrg    shlibpath_overrides_runpath=yes
2241209ff23fSmrg
2242209ff23fSmrg    case $host_os in
2243209ff23fSmrg    cygwin*)
2244209ff23fSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2245209ff23fSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2246209ff23fSmrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2247209ff23fSmrg      ;;
22482f39173dSmrg    mingw* | cegcc*)
2249209ff23fSmrg      # MinGW DLLs use traditional 'lib' prefix
2250209ff23fSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2251ad43ddacSmrg      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2252ad43ddacSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2253209ff23fSmrg        # It is most probably a Windows format PATH printed by
2254209ff23fSmrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2255209ff23fSmrg        # path with ; separators, and with drive letters. We can handle the
2256209ff23fSmrg        # drive letters (cygwin fileutils understands them), so leave them,
2257209ff23fSmrg        # especially as we might pass files found there to a mingw objdump,
2258209ff23fSmrg        # which wouldn't understand a cygwinified path. Ahh.
2259ad43ddacSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2260209ff23fSmrg      else
2261ad43ddacSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2262209ff23fSmrg      fi
2263209ff23fSmrg      ;;
2264209ff23fSmrg    pw32*)
2265209ff23fSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
2266209ff23fSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2267209ff23fSmrg      ;;
2268209ff23fSmrg    esac
2269209ff23fSmrg    ;;
2270209ff23fSmrg
2271209ff23fSmrg  *)
2272209ff23fSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2273209ff23fSmrg    ;;
2274209ff23fSmrg  esac
2275209ff23fSmrg  dynamic_linker='Win32 ld.exe'
2276209ff23fSmrg  # FIXME: first we should search . and the directory the executable is in
2277209ff23fSmrg  shlibpath_var=PATH
2278209ff23fSmrg  ;;
2279209ff23fSmrg
2280209ff23fSmrgdarwin* | rhapsody*)
2281209ff23fSmrg  dynamic_linker="$host_os dyld"
2282209ff23fSmrg  version_type=darwin
2283209ff23fSmrg  need_lib_prefix=no
2284209ff23fSmrg  need_version=no
2285ad43ddacSmrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2286209ff23fSmrg  soname_spec='${libname}${release}${major}$shared_ext'
2287209ff23fSmrg  shlibpath_overrides_runpath=yes
2288209ff23fSmrg  shlibpath_var=DYLD_LIBRARY_PATH
2289209ff23fSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2290ad43ddacSmrgm4_if([$1], [],[
2291ad43ddacSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2292209ff23fSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2293209ff23fSmrg  ;;
2294209ff23fSmrg
2295209ff23fSmrgdgux*)
2296209ff23fSmrg  version_type=linux
2297209ff23fSmrg  need_lib_prefix=no
2298209ff23fSmrg  need_version=no
2299209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2300209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2301209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
2302209ff23fSmrg  ;;
2303209ff23fSmrg
2304209ff23fSmrgfreebsd1*)
2305209ff23fSmrg  dynamic_linker=no
2306209ff23fSmrg  ;;
2307209ff23fSmrg
2308209ff23fSmrgfreebsd* | dragonfly*)
2309209ff23fSmrg  # DragonFly does not have aout.  When/if they implement a new
2310209ff23fSmrg  # versioning mechanism, adjust this.
2311209ff23fSmrg  if test -x /usr/bin/objformat; then
2312209ff23fSmrg    objformat=`/usr/bin/objformat`
2313209ff23fSmrg  else
2314209ff23fSmrg    case $host_os in
2315209ff23fSmrg    freebsd[[123]]*) objformat=aout ;;
2316209ff23fSmrg    *) objformat=elf ;;
2317209ff23fSmrg    esac
2318209ff23fSmrg  fi
2319209ff23fSmrg  version_type=freebsd-$objformat
2320209ff23fSmrg  case $version_type in
2321209ff23fSmrg    freebsd-elf*)
2322209ff23fSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2323209ff23fSmrg      need_version=no
2324209ff23fSmrg      need_lib_prefix=no
2325209ff23fSmrg      ;;
2326209ff23fSmrg    freebsd-*)
2327209ff23fSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2328209ff23fSmrg      need_version=yes
2329209ff23fSmrg      ;;
2330209ff23fSmrg  esac
2331209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
2332209ff23fSmrg  case $host_os in
2333209ff23fSmrg  freebsd2*)
2334209ff23fSmrg    shlibpath_overrides_runpath=yes
2335209ff23fSmrg    ;;
2336209ff23fSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2337209ff23fSmrg    shlibpath_overrides_runpath=yes
2338209ff23fSmrg    hardcode_into_libs=yes
2339209ff23fSmrg    ;;
2340209ff23fSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2341209ff23fSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2342209ff23fSmrg    shlibpath_overrides_runpath=no
2343209ff23fSmrg    hardcode_into_libs=yes
2344209ff23fSmrg    ;;
2345209ff23fSmrg  *) # from 4.6 on, and DragonFly
2346209ff23fSmrg    shlibpath_overrides_runpath=yes
2347209ff23fSmrg    hardcode_into_libs=yes
2348209ff23fSmrg    ;;
2349209ff23fSmrg  esac
2350209ff23fSmrg  ;;
2351209ff23fSmrg
2352209ff23fSmrggnu*)
2353209ff23fSmrg  version_type=linux
2354209ff23fSmrg  need_lib_prefix=no
2355209ff23fSmrg  need_version=no
2356209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2357209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2358209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
2359209ff23fSmrg  hardcode_into_libs=yes
2360209ff23fSmrg  ;;
2361209ff23fSmrg
2362209ff23fSmrghpux9* | hpux10* | hpux11*)
2363209ff23fSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
2364209ff23fSmrg  # link against other versions.
2365209ff23fSmrg  version_type=sunos
2366209ff23fSmrg  need_lib_prefix=no
2367209ff23fSmrg  need_version=no
2368209ff23fSmrg  case $host_cpu in
2369209ff23fSmrg  ia64*)
2370209ff23fSmrg    shrext_cmds='.so'
2371209ff23fSmrg    hardcode_into_libs=yes
2372209ff23fSmrg    dynamic_linker="$host_os dld.so"
2373209ff23fSmrg    shlibpath_var=LD_LIBRARY_PATH
2374209ff23fSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2375209ff23fSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2376209ff23fSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2377209ff23fSmrg    if test "X$HPUX_IA64_MODE" = X32; then
2378209ff23fSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2379209ff23fSmrg    else
2380209ff23fSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2381209ff23fSmrg    fi
2382209ff23fSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2383209ff23fSmrg    ;;
2384ad43ddacSmrg  hppa*64*)
2385ad43ddacSmrg    shrext_cmds='.sl'
2386ad43ddacSmrg    hardcode_into_libs=yes
2387ad43ddacSmrg    dynamic_linker="$host_os dld.sl"
2388ad43ddacSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2389ad43ddacSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2390ad43ddacSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2391ad43ddacSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2392ad43ddacSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2393ad43ddacSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2394ad43ddacSmrg    ;;
2395ad43ddacSmrg  *)
2396209ff23fSmrg    shrext_cmds='.sl'
2397209ff23fSmrg    dynamic_linker="$host_os dld.sl"
2398209ff23fSmrg    shlibpath_var=SHLIB_PATH
2399209ff23fSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2400209ff23fSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2401209ff23fSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2402209ff23fSmrg    ;;
2403209ff23fSmrg  esac
2404209ff23fSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2405209ff23fSmrg  postinstall_cmds='chmod 555 $lib'
2406209ff23fSmrg  ;;
2407209ff23fSmrg
2408209ff23fSmrginterix[[3-9]]*)
2409209ff23fSmrg  version_type=linux
2410209ff23fSmrg  need_lib_prefix=no
2411209ff23fSmrg  need_version=no
2412209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2413209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2414209ff23fSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2415209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
2416209ff23fSmrg  shlibpath_overrides_runpath=no
2417209ff23fSmrg  hardcode_into_libs=yes
2418209ff23fSmrg  ;;
2419209ff23fSmrg
2420209ff23fSmrgirix5* | irix6* | nonstopux*)
2421209ff23fSmrg  case $host_os in
2422209ff23fSmrg    nonstopux*) version_type=nonstopux ;;
2423209ff23fSmrg    *)
2424209ff23fSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
2425209ff23fSmrg		version_type=linux
2426209ff23fSmrg	else
2427209ff23fSmrg		version_type=irix
2428209ff23fSmrg	fi ;;
2429209ff23fSmrg  esac
2430209ff23fSmrg  need_lib_prefix=no
2431209ff23fSmrg  need_version=no
2432209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2433209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2434209ff23fSmrg  case $host_os in
2435209ff23fSmrg  irix5* | nonstopux*)
2436209ff23fSmrg    libsuff= shlibsuff=
2437209ff23fSmrg    ;;
2438209ff23fSmrg  *)
2439209ff23fSmrg    case $LD in # libtool.m4 will add one of these switches to LD
2440209ff23fSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2441209ff23fSmrg      libsuff= shlibsuff= libmagic=32-bit;;
2442209ff23fSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2443209ff23fSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
2444209ff23fSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2445209ff23fSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2446209ff23fSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
2447209ff23fSmrg    esac
2448209ff23fSmrg    ;;
2449209ff23fSmrg  esac
2450209ff23fSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2451209ff23fSmrg  shlibpath_overrides_runpath=no
2452209ff23fSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2453209ff23fSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2454209ff23fSmrg  hardcode_into_libs=yes
2455209ff23fSmrg  ;;
2456209ff23fSmrg
2457209ff23fSmrg# No shared lib support for Linux oldld, aout, or coff.
2458209ff23fSmrglinux*oldld* | linux*aout* | linux*coff*)
2459209ff23fSmrg  dynamic_linker=no
2460209ff23fSmrg  ;;
2461209ff23fSmrg
2462209ff23fSmrg# This must be Linux ELF.
2463209ff23fSmrglinux* | k*bsd*-gnu)
2464209ff23fSmrg  version_type=linux
2465209ff23fSmrg  need_lib_prefix=no
2466209ff23fSmrg  need_version=no
2467209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2468209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2469209ff23fSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2470209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
2471209ff23fSmrg  shlibpath_overrides_runpath=no
2472ad43ddacSmrg  # Some binutils ld are patched to set DT_RUNPATH
2473ad43ddacSmrg  save_LDFLAGS=$LDFLAGS
2474ad43ddacSmrg  save_libdir=$libdir
2475ad43ddacSmrg  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2476ad43ddacSmrg       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2477ad43ddacSmrg  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2478ad43ddacSmrg    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2479ad43ddacSmrg       [shlibpath_overrides_runpath=yes])])
2480ad43ddacSmrg  LDFLAGS=$save_LDFLAGS
2481ad43ddacSmrg  libdir=$save_libdir
2482ad43ddacSmrg
2483209ff23fSmrg  # This implies no fast_install, which is unacceptable.
2484209ff23fSmrg  # Some rework will be needed to allow for fast_install
2485209ff23fSmrg  # before this can be enabled.
2486209ff23fSmrg  hardcode_into_libs=yes
2487209ff23fSmrg
24882f39173dSmrg  # Add ABI-specific directories to the system library path.
24892f39173dSmrg  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
24902f39173dSmrg
2491209ff23fSmrg  # Append ld.so.conf contents to the search path
2492209ff23fSmrg  if test -f /etc/ld.so.conf; then
2493ad43ddacSmrg    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' ' '`
24942f39173dSmrg    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
2495209ff23fSmrg  fi
2496209ff23fSmrg
2497209ff23fSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
2498209ff23fSmrg  # powerpc, because MkLinux only supported shared libraries with the
2499209ff23fSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
2500209ff23fSmrg  # most powerpc-linux boxes support dynamic linking these days and
2501209ff23fSmrg  # people can always --disable-shared, the test was removed, and we
2502209ff23fSmrg  # assume the GNU/Linux dynamic linker is in use.
2503209ff23fSmrg  dynamic_linker='GNU/Linux ld.so'
2504209ff23fSmrg  ;;
2505209ff23fSmrg
2506209ff23fSmrgnetbsd*)
2507209ff23fSmrg  version_type=sunos
2508209ff23fSmrg  need_lib_prefix=no
2509209ff23fSmrg  need_version=no
2510ad43ddacSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2511209ff23fSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2512209ff23fSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2513209ff23fSmrg    dynamic_linker='NetBSD (a.out) ld.so'
2514209ff23fSmrg  else
2515209ff23fSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2516209ff23fSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2517209ff23fSmrg    dynamic_linker='NetBSD ld.elf_so'
2518209ff23fSmrg  fi
2519209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
2520209ff23fSmrg  shlibpath_overrides_runpath=yes
2521209ff23fSmrg  hardcode_into_libs=yes
2522209ff23fSmrg  ;;
2523209ff23fSmrg
2524209ff23fSmrgnewsos6)
2525209ff23fSmrg  version_type=linux
2526209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2527209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
2528209ff23fSmrg  shlibpath_overrides_runpath=yes
2529209ff23fSmrg  ;;
2530209ff23fSmrg
2531ad43ddacSmrg*nto* | *qnx*)
2532ad43ddacSmrg  version_type=qnx
2533209ff23fSmrg  need_lib_prefix=no
2534209ff23fSmrg  need_version=no
2535209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2536209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2537209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
2538ad43ddacSmrg  shlibpath_overrides_runpath=no
2539ad43ddacSmrg  hardcode_into_libs=yes
2540ad43ddacSmrg  dynamic_linker='ldqnx.so'
2541209ff23fSmrg  ;;
2542209ff23fSmrg
2543209ff23fSmrgopenbsd*)
2544209ff23fSmrg  version_type=sunos
2545209ff23fSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
2546209ff23fSmrg  need_lib_prefix=no
2547209ff23fSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2548209ff23fSmrg  case $host_os in
2549ad43ddacSmrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
2550ad43ddacSmrg    *)				need_version=no  ;;
2551209ff23fSmrg  esac
2552209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2553209ff23fSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2554209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
2555ad43ddacSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2556209ff23fSmrg    case $host_os in
2557209ff23fSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
2558209ff23fSmrg	shlibpath_overrides_runpath=no
2559209ff23fSmrg	;;
2560209ff23fSmrg      *)
2561209ff23fSmrg	shlibpath_overrides_runpath=yes
2562209ff23fSmrg	;;
2563209ff23fSmrg      esac
2564209ff23fSmrg  else
2565209ff23fSmrg    shlibpath_overrides_runpath=yes
2566209ff23fSmrg  fi
2567209ff23fSmrg  ;;
2568209ff23fSmrg
2569209ff23fSmrgos2*)
2570209ff23fSmrg  libname_spec='$name'
2571209ff23fSmrg  shrext_cmds=".dll"
2572209ff23fSmrg  need_lib_prefix=no
2573209ff23fSmrg  library_names_spec='$libname${shared_ext} $libname.a'
2574209ff23fSmrg  dynamic_linker='OS/2 ld.exe'
2575209ff23fSmrg  shlibpath_var=LIBPATH
2576209ff23fSmrg  ;;
2577209ff23fSmrg
2578209ff23fSmrgosf3* | osf4* | osf5*)
2579209ff23fSmrg  version_type=osf
2580209ff23fSmrg  need_lib_prefix=no
2581209ff23fSmrg  need_version=no
2582209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2583209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2584209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
2585209ff23fSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2586209ff23fSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2587209ff23fSmrg  ;;
2588209ff23fSmrg
2589209ff23fSmrgrdos*)
2590209ff23fSmrg  dynamic_linker=no
2591209ff23fSmrg  ;;
2592209ff23fSmrg
2593209ff23fSmrgsolaris*)
2594209ff23fSmrg  version_type=linux
2595209ff23fSmrg  need_lib_prefix=no
2596209ff23fSmrg  need_version=no
2597209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2598209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2599209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
2600209ff23fSmrg  shlibpath_overrides_runpath=yes
2601209ff23fSmrg  hardcode_into_libs=yes
2602209ff23fSmrg  # ldd complains unless libraries are executable
2603209ff23fSmrg  postinstall_cmds='chmod +x $lib'
2604209ff23fSmrg  ;;
2605209ff23fSmrg
2606209ff23fSmrgsunos4*)
2607209ff23fSmrg  version_type=sunos
2608209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2609209ff23fSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2610209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
2611209ff23fSmrg  shlibpath_overrides_runpath=yes
2612209ff23fSmrg  if test "$with_gnu_ld" = yes; then
2613209ff23fSmrg    need_lib_prefix=no
2614209ff23fSmrg  fi
2615209ff23fSmrg  need_version=yes
2616209ff23fSmrg  ;;
2617209ff23fSmrg
2618209ff23fSmrgsysv4 | sysv4.3*)
2619209ff23fSmrg  version_type=linux
2620209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2621209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2622209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
2623209ff23fSmrg  case $host_vendor in
2624209ff23fSmrg    sni)
2625209ff23fSmrg      shlibpath_overrides_runpath=no
2626209ff23fSmrg      need_lib_prefix=no
2627209ff23fSmrg      runpath_var=LD_RUN_PATH
2628209ff23fSmrg      ;;
2629209ff23fSmrg    siemens)
2630209ff23fSmrg      need_lib_prefix=no
2631209ff23fSmrg      ;;
2632209ff23fSmrg    motorola)
2633209ff23fSmrg      need_lib_prefix=no
2634209ff23fSmrg      need_version=no
2635209ff23fSmrg      shlibpath_overrides_runpath=no
2636209ff23fSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2637209ff23fSmrg      ;;
2638209ff23fSmrg  esac
2639209ff23fSmrg  ;;
2640209ff23fSmrg
2641209ff23fSmrgsysv4*MP*)
2642209ff23fSmrg  if test -d /usr/nec ;then
2643209ff23fSmrg    version_type=linux
2644209ff23fSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2645209ff23fSmrg    soname_spec='$libname${shared_ext}.$major'
2646209ff23fSmrg    shlibpath_var=LD_LIBRARY_PATH
2647209ff23fSmrg  fi
2648209ff23fSmrg  ;;
2649209ff23fSmrg
2650209ff23fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2651209ff23fSmrg  version_type=freebsd-elf
2652209ff23fSmrg  need_lib_prefix=no
2653209ff23fSmrg  need_version=no
2654209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2655209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2656209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
2657ad43ddacSmrg  shlibpath_overrides_runpath=yes
2658209ff23fSmrg  hardcode_into_libs=yes
2659209ff23fSmrg  if test "$with_gnu_ld" = yes; then
2660209ff23fSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2661209ff23fSmrg  else
2662209ff23fSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2663209ff23fSmrg    case $host_os in
2664209ff23fSmrg      sco3.2v5*)
2665209ff23fSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2666209ff23fSmrg	;;
2667209ff23fSmrg    esac
2668209ff23fSmrg  fi
2669209ff23fSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
2670209ff23fSmrg  ;;
2671209ff23fSmrg
2672ad43ddacSmrgtpf*)
2673ad43ddacSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
2674ad43ddacSmrg  version_type=linux
2675ad43ddacSmrg  need_lib_prefix=no
2676ad43ddacSmrg  need_version=no
26772f39173dSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2678ad43ddacSmrg  shlibpath_var=LD_LIBRARY_PATH
2679ad43ddacSmrg  shlibpath_overrides_runpath=no
2680ad43ddacSmrg  hardcode_into_libs=yes
2681ad43ddacSmrg  ;;
2682ad43ddacSmrg
2683209ff23fSmrguts4*)
2684209ff23fSmrg  version_type=linux
2685209ff23fSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2686209ff23fSmrg  soname_spec='${libname}${release}${shared_ext}$major'
2687209ff23fSmrg  shlibpath_var=LD_LIBRARY_PATH
2688209ff23fSmrg  ;;
2689209ff23fSmrg
2690209ff23fSmrg*)
2691209ff23fSmrg  dynamic_linker=no
2692209ff23fSmrg  ;;
2693209ff23fSmrgesac
2694209ff23fSmrgAC_MSG_RESULT([$dynamic_linker])
2695209ff23fSmrgtest "$dynamic_linker" = no && can_build_shared=no
2696209ff23fSmrg
2697209ff23fSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2698209ff23fSmrgif test "$GCC" = yes; then
2699209ff23fSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2700209ff23fSmrgfi
27012f39173dSmrg
2702ad43ddacSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2703ad43ddacSmrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2704ad43ddacSmrgfi
2705ad43ddacSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2706ad43ddacSmrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2707ad43ddacSmrgfi
2708209ff23fSmrg
2709ad43ddacSmrg_LT_DECL([], [variables_saved_for_relink], [1],
2710ad43ddacSmrg    [Variables whose values should be saved in libtool wrapper scripts and
2711ad43ddacSmrg    restored at link time])
2712ad43ddacSmrg_LT_DECL([], [need_lib_prefix], [0],
2713ad43ddacSmrg    [Do we need the "lib" prefix for modules?])
2714ad43ddacSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2715ad43ddacSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
2716ad43ddacSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
2717ad43ddacSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2718ad43ddacSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
2719ad43ddacSmrg    [Is shlibpath searched before the hard-coded library search path?])
2720ad43ddacSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2721ad43ddacSmrg_LT_DECL([], [library_names_spec], [1],
2722ad43ddacSmrg    [[List of archive names.  First name is the real one, the rest are links.
2723ad43ddacSmrg    The last name is the one that the linker finds with -lNAME]])
2724ad43ddacSmrg_LT_DECL([], [soname_spec], [1],
2725ad43ddacSmrg    [[The coded name of the library, if different from the real name]])
2726ad43ddacSmrg_LT_DECL([], [postinstall_cmds], [2],
2727ad43ddacSmrg    [Command to use after installation of a shared archive])
2728ad43ddacSmrg_LT_DECL([], [postuninstall_cmds], [2],
2729ad43ddacSmrg    [Command to use after uninstallation of a shared archive])
2730ad43ddacSmrg_LT_DECL([], [finish_cmds], [2],
2731ad43ddacSmrg    [Commands used to finish a libtool library installation in a directory])
2732ad43ddacSmrg_LT_DECL([], [finish_eval], [1],
2733ad43ddacSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
2734ad43ddacSmrg    not shown]])
2735ad43ddacSmrg_LT_DECL([], [hardcode_into_libs], [0],
2736ad43ddacSmrg    [Whether we should hardcode library paths into libraries])
2737ad43ddacSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
2738ad43ddacSmrg    [Compile-time system search path for libraries])
2739ad43ddacSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2740ad43ddacSmrg    [Run-time system search path for libraries])
2741ad43ddacSmrg])# _LT_SYS_DYNAMIC_LINKER
2742ad43ddacSmrg
2743ad43ddacSmrg
2744ad43ddacSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
2745209ff23fSmrg# --------------------------
2746209ff23fSmrg# find a file program which can recognize shared library
2747ad43ddacSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
2748ad43ddacSmrg[m4_require([_LT_DECL_EGREP])dnl
2749209ff23fSmrgAC_MSG_CHECKING([for $1])
2750209ff23fSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2751209ff23fSmrg[case $MAGIC_CMD in
2752209ff23fSmrg[[\\/*] |  ?:[\\/]*])
2753209ff23fSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2754209ff23fSmrg  ;;
2755209ff23fSmrg*)
2756209ff23fSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
2757209ff23fSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2758209ff23fSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
2759209ff23fSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
2760209ff23fSmrgdnl not every word.  This closes a longstanding sh security hole.
2761ad43ddacSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
2762209ff23fSmrg  for ac_dir in $ac_dummy; do
2763209ff23fSmrg    IFS="$lt_save_ifs"
2764209ff23fSmrg    test -z "$ac_dir" && ac_dir=.
2765209ff23fSmrg    if test -f $ac_dir/$1; then
2766209ff23fSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2767209ff23fSmrg      if test -n "$file_magic_test_file"; then
2768209ff23fSmrg	case $deplibs_check_method in
2769209ff23fSmrg	"file_magic "*)
2770209ff23fSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2771209ff23fSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2772209ff23fSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2773209ff23fSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
2774209ff23fSmrg	    :
2775209ff23fSmrg	  else
2776ad43ddacSmrg	    cat <<_LT_EOF 1>&2
2777209ff23fSmrg
2778209ff23fSmrg*** Warning: the command libtool uses to detect shared libraries,
2779209ff23fSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
2780209ff23fSmrg*** The result is that libtool may fail to recognize shared libraries
2781209ff23fSmrg*** as such.  This will affect the creation of libtool libraries that
2782209ff23fSmrg*** depend on shared libraries, but programs linked with such libtool
2783209ff23fSmrg*** libraries will work regardless of this problem.  Nevertheless, you
2784209ff23fSmrg*** may want to report the problem to your system manager and/or to
2785209ff23fSmrg*** bug-libtool@gnu.org
2786209ff23fSmrg
2787ad43ddacSmrg_LT_EOF
2788209ff23fSmrg	  fi ;;
2789209ff23fSmrg	esac
2790209ff23fSmrg      fi
2791209ff23fSmrg      break
2792209ff23fSmrg    fi
2793209ff23fSmrg  done
2794209ff23fSmrg  IFS="$lt_save_ifs"
2795209ff23fSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
2796209ff23fSmrg  ;;
2797209ff23fSmrgesac])
2798209ff23fSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2799209ff23fSmrgif test -n "$MAGIC_CMD"; then
2800209ff23fSmrg  AC_MSG_RESULT($MAGIC_CMD)
2801209ff23fSmrgelse
2802209ff23fSmrg  AC_MSG_RESULT(no)
2803209ff23fSmrgfi
2804ad43ddacSmrg_LT_DECL([], [MAGIC_CMD], [0],
2805ad43ddacSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2806ad43ddacSmrg])# _LT_PATH_TOOL_PREFIX
2807209ff23fSmrg
2808ad43ddacSmrg# Old name:
2809ad43ddacSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2810ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
2811ad43ddacSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2812209ff23fSmrg
2813ad43ddacSmrg
2814ad43ddacSmrg# _LT_PATH_MAGIC
2815ad43ddacSmrg# --------------
2816209ff23fSmrg# find a file program which can recognize a shared library
2817ad43ddacSmrgm4_defun([_LT_PATH_MAGIC],
2818ad43ddacSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2819209ff23fSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
2820209ff23fSmrg  if test -n "$ac_tool_prefix"; then
2821ad43ddacSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2822209ff23fSmrg  else
2823209ff23fSmrg    MAGIC_CMD=:
2824209ff23fSmrg  fi
2825209ff23fSmrgfi
2826ad43ddacSmrg])# _LT_PATH_MAGIC
2827209ff23fSmrg
2828209ff23fSmrg
2829ad43ddacSmrg# LT_PATH_LD
2830209ff23fSmrg# ----------
2831209ff23fSmrg# find the pathname to the GNU or non-GNU linker
2832ad43ddacSmrgAC_DEFUN([LT_PATH_LD],
2833ad43ddacSmrg[AC_REQUIRE([AC_PROG_CC])dnl
2834209ff23fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
2835209ff23fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2836ad43ddacSmrgm4_require([_LT_DECL_SED])dnl
2837ad43ddacSmrgm4_require([_LT_DECL_EGREP])dnl
2838ad43ddacSmrg
2839ad43ddacSmrgAC_ARG_WITH([gnu-ld],
2840ad43ddacSmrg    [AS_HELP_STRING([--with-gnu-ld],
2841ad43ddacSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2842ad43ddacSmrg    [test "$withval" = no || with_gnu_ld=yes],
2843ad43ddacSmrg    [with_gnu_ld=no])dnl
2844ad43ddacSmrg
2845209ff23fSmrgac_prog=ld
2846209ff23fSmrgif test "$GCC" = yes; then
2847209ff23fSmrg  # Check if gcc -print-prog-name=ld gives a path.
2848209ff23fSmrg  AC_MSG_CHECKING([for ld used by $CC])
2849209ff23fSmrg  case $host in
2850209ff23fSmrg  *-*-mingw*)
2851209ff23fSmrg    # gcc leaves a trailing carriage return which upsets mingw
2852209ff23fSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2853209ff23fSmrg  *)
2854209ff23fSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2855209ff23fSmrg  esac
2856209ff23fSmrg  case $ac_prog in
2857209ff23fSmrg    # Accept absolute paths.
2858209ff23fSmrg    [[\\/]]* | ?:[[\\/]]*)
2859209ff23fSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
2860209ff23fSmrg      # Canonicalize the pathname of ld
2861ad43ddacSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2862ad43ddacSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2863ad43ddacSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2864209ff23fSmrg      done
2865209ff23fSmrg      test -z "$LD" && LD="$ac_prog"
2866209ff23fSmrg      ;;
2867209ff23fSmrg  "")
2868209ff23fSmrg    # If it fails, then pretend we aren't using GCC.
2869209ff23fSmrg    ac_prog=ld
2870209ff23fSmrg    ;;
2871209ff23fSmrg  *)
2872209ff23fSmrg    # If it is relative, then search for the first ld in PATH.
2873209ff23fSmrg    with_gnu_ld=unknown
2874209ff23fSmrg    ;;
2875209ff23fSmrg  esac
2876209ff23fSmrgelif test "$with_gnu_ld" = yes; then
2877209ff23fSmrg  AC_MSG_CHECKING([for GNU ld])
2878209ff23fSmrgelse
2879209ff23fSmrg  AC_MSG_CHECKING([for non-GNU ld])
2880209ff23fSmrgfi
2881209ff23fSmrgAC_CACHE_VAL(lt_cv_path_LD,
2882209ff23fSmrg[if test -z "$LD"; then
2883209ff23fSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2884209ff23fSmrg  for ac_dir in $PATH; do
2885209ff23fSmrg    IFS="$lt_save_ifs"
2886209ff23fSmrg    test -z "$ac_dir" && ac_dir=.
2887209ff23fSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2888209ff23fSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
2889209ff23fSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
2890209ff23fSmrg      # but apparently some variants of GNU ld only accept -v.
2891209ff23fSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
2892209ff23fSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2893209ff23fSmrg      *GNU* | *'with BFD'*)
2894209ff23fSmrg	test "$with_gnu_ld" != no && break
2895209ff23fSmrg	;;
2896209ff23fSmrg      *)
2897209ff23fSmrg	test "$with_gnu_ld" != yes && break
2898209ff23fSmrg	;;
2899209ff23fSmrg      esac
2900209ff23fSmrg    fi
2901209ff23fSmrg  done
2902209ff23fSmrg  IFS="$lt_save_ifs"
2903209ff23fSmrgelse
2904209ff23fSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2905209ff23fSmrgfi])
2906209ff23fSmrgLD="$lt_cv_path_LD"
2907209ff23fSmrgif test -n "$LD"; then
2908209ff23fSmrg  AC_MSG_RESULT($LD)
2909209ff23fSmrgelse
2910209ff23fSmrg  AC_MSG_RESULT(no)
2911209ff23fSmrgfi
2912209ff23fSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2913ad43ddacSmrg_LT_PATH_LD_GNU
2914ad43ddacSmrgAC_SUBST([LD])
2915209ff23fSmrg
2916ad43ddacSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2917ad43ddacSmrg])# LT_PATH_LD
2918209ff23fSmrg
2919ad43ddacSmrg# Old names:
2920ad43ddacSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2921ad43ddacSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2922ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
2923ad43ddacSmrgdnl AC_DEFUN([AM_PROG_LD], [])
2924ad43ddacSmrgdnl AC_DEFUN([AC_PROG_LD], [])
2925ad43ddacSmrg
2926ad43ddacSmrg
2927ad43ddacSmrg# _LT_PATH_LD_GNU
2928ad43ddacSmrg#- --------------
2929ad43ddacSmrgm4_defun([_LT_PATH_LD_GNU],
2930ad43ddacSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2931209ff23fSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2932209ff23fSmrgcase `$LD -v 2>&1 </dev/null` in
2933209ff23fSmrg*GNU* | *'with BFD'*)
2934209ff23fSmrg  lt_cv_prog_gnu_ld=yes
2935209ff23fSmrg  ;;
2936209ff23fSmrg*)
2937209ff23fSmrg  lt_cv_prog_gnu_ld=no
2938209ff23fSmrg  ;;
2939209ff23fSmrgesac])
2940209ff23fSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2941ad43ddacSmrg])# _LT_PATH_LD_GNU
2942209ff23fSmrg
2943209ff23fSmrg
2944ad43ddacSmrg# _LT_CMD_RELOAD
2945ad43ddacSmrg# --------------
2946209ff23fSmrg# find reload flag for linker
2947209ff23fSmrg#   -- PORTME Some linkers may need a different reload flag.
2948ad43ddacSmrgm4_defun([_LT_CMD_RELOAD],
2949209ff23fSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
2950209ff23fSmrg  lt_cv_ld_reload_flag,
2951209ff23fSmrg  [lt_cv_ld_reload_flag='-r'])
2952209ff23fSmrgreload_flag=$lt_cv_ld_reload_flag
2953209ff23fSmrgcase $reload_flag in
2954209ff23fSmrg"" | " "*) ;;
2955209ff23fSmrg*) reload_flag=" $reload_flag" ;;
2956209ff23fSmrgesac
2957209ff23fSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
2958209ff23fSmrgcase $host_os in
2959209ff23fSmrg  darwin*)
2960209ff23fSmrg    if test "$GCC" = yes; then
2961209ff23fSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2962209ff23fSmrg    else
2963209ff23fSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2964209ff23fSmrg    fi
2965209ff23fSmrg    ;;
2966209ff23fSmrgesac
2967ad43ddacSmrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2968ad43ddacSmrg_LT_DECL([], [reload_cmds], [2])dnl
2969ad43ddacSmrg])# _LT_CMD_RELOAD
2970209ff23fSmrg
2971209ff23fSmrg
2972ad43ddacSmrg# _LT_CHECK_MAGIC_METHOD
2973ad43ddacSmrg# ----------------------
2974209ff23fSmrg# how to check for library dependencies
2975209ff23fSmrg#  -- PORTME fill in with the dynamic library characteristics
2976ad43ddacSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
2977ad43ddacSmrg[m4_require([_LT_DECL_EGREP])
29782f39173dSmrgm4_require([_LT_DECL_OBJDUMP])
2979ad43ddacSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
2980209ff23fSmrglt_cv_deplibs_check_method,
2981209ff23fSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
2982209ff23fSmrglt_cv_file_magic_test_file=
2983209ff23fSmrglt_cv_deplibs_check_method='unknown'
2984209ff23fSmrg# Need to set the preceding variable on all platforms that support
2985209ff23fSmrg# interlibrary dependencies.
2986209ff23fSmrg# 'none' -- dependencies not supported.
2987209ff23fSmrg# `unknown' -- same as none, but documents that we really don't know.
2988209ff23fSmrg# 'pass_all' -- all dependencies passed with no checks.
2989209ff23fSmrg# 'test_compile' -- check by making test program.
2990209ff23fSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
2991209ff23fSmrg# which responds to the $file_magic_cmd with a given extended regex.
2992209ff23fSmrg# If you have `file' or equivalent on your system and you're not sure
2993209ff23fSmrg# whether `pass_all' will *always* work, you probably want this one.
2994209ff23fSmrg
2995209ff23fSmrgcase $host_os in
2996209ff23fSmrgaix[[4-9]]*)
2997209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
2998209ff23fSmrg  ;;
2999209ff23fSmrg
3000209ff23fSmrgbeos*)
3001209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
3002209ff23fSmrg  ;;
3003209ff23fSmrg
3004209ff23fSmrgbsdi[[45]]*)
3005209ff23fSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3006209ff23fSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
3007209ff23fSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
3008209ff23fSmrg  ;;
3009209ff23fSmrg
3010209ff23fSmrgcygwin*)
3011209ff23fSmrg  # func_win32_libid is a shell function defined in ltmain.sh
3012209ff23fSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3013209ff23fSmrg  lt_cv_file_magic_cmd='func_win32_libid'
3014209ff23fSmrg  ;;
3015209ff23fSmrg
3016209ff23fSmrgmingw* | pw32*)
3017209ff23fSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
3018209ff23fSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3019209ff23fSmrg  # unless we find 'file', for example because we are cross-compiling.
3020209ff23fSmrg  if ( file / ) >/dev/null 2>&1; then
3021209ff23fSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3022209ff23fSmrg    lt_cv_file_magic_cmd='func_win32_libid'
3023209ff23fSmrg  else
3024209ff23fSmrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3025209ff23fSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
3026209ff23fSmrg  fi
3027209ff23fSmrg  ;;
3028209ff23fSmrg
30292f39173dSmrgcegcc)
30302f39173dSmrg  # use the weaker test based on 'objdump'. See mingw*.
30312f39173dSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
30322f39173dSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
30332f39173dSmrg  ;;
30342f39173dSmrg
3035209ff23fSmrgdarwin* | rhapsody*)
3036209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
3037209ff23fSmrg  ;;
3038209ff23fSmrg
3039209ff23fSmrgfreebsd* | dragonfly*)
3040ad43ddacSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3041209ff23fSmrg    case $host_cpu in
3042209ff23fSmrg    i*86 )
3043209ff23fSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
3044209ff23fSmrg      # Let's accept both of them until this is cleared up.
3045209ff23fSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3046209ff23fSmrg      lt_cv_file_magic_cmd=/usr/bin/file
3047209ff23fSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3048209ff23fSmrg      ;;
3049209ff23fSmrg    esac
3050209ff23fSmrg  else
3051209ff23fSmrg    lt_cv_deplibs_check_method=pass_all
3052209ff23fSmrg  fi
3053209ff23fSmrg  ;;
3054209ff23fSmrg
3055209ff23fSmrggnu*)
3056209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
3057209ff23fSmrg  ;;
3058209ff23fSmrg
3059209ff23fSmrghpux10.20* | hpux11*)
3060209ff23fSmrg  lt_cv_file_magic_cmd=/usr/bin/file
3061209ff23fSmrg  case $host_cpu in
3062209ff23fSmrg  ia64*)
3063209ff23fSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3064209ff23fSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3065209ff23fSmrg    ;;
3066209ff23fSmrg  hppa*64*)
3067209ff23fSmrg    [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]']
3068209ff23fSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3069209ff23fSmrg    ;;
3070209ff23fSmrg  *)
3071209ff23fSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3072209ff23fSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3073209ff23fSmrg    ;;
3074209ff23fSmrg  esac
3075209ff23fSmrg  ;;
3076209ff23fSmrg
3077209ff23fSmrginterix[[3-9]]*)
3078209ff23fSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3079209ff23fSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3080209ff23fSmrg  ;;
3081209ff23fSmrg
3082209ff23fSmrgirix5* | irix6* | nonstopux*)
3083209ff23fSmrg  case $LD in
3084209ff23fSmrg  *-32|*"-32 ") libmagic=32-bit;;
3085209ff23fSmrg  *-n32|*"-n32 ") libmagic=N32;;
3086209ff23fSmrg  *-64|*"-64 ") libmagic=64-bit;;
3087209ff23fSmrg  *) libmagic=never-match;;
3088209ff23fSmrg  esac
3089209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
3090209ff23fSmrg  ;;
3091209ff23fSmrg
3092209ff23fSmrg# This must be Linux ELF.
3093209ff23fSmrglinux* | k*bsd*-gnu)
3094209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
3095209ff23fSmrg  ;;
3096209ff23fSmrg
30972f39173dSmrgnetbsd*)
3098ad43ddacSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3099209ff23fSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3100209ff23fSmrg  else
3101209ff23fSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3102209ff23fSmrg  fi
3103209ff23fSmrg  ;;
3104209ff23fSmrg
3105209ff23fSmrgnewos6*)
3106209ff23fSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3107209ff23fSmrg  lt_cv_file_magic_cmd=/usr/bin/file
3108209ff23fSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3109209ff23fSmrg  ;;
3110209ff23fSmrg
3111ad43ddacSmrg*nto* | *qnx*)
3112ad43ddacSmrg  lt_cv_deplibs_check_method=pass_all
3113209ff23fSmrg  ;;
3114209ff23fSmrg
3115209ff23fSmrgopenbsd*)
3116ad43ddacSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3117209ff23fSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3118209ff23fSmrg  else
3119209ff23fSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3120209ff23fSmrg  fi
3121209ff23fSmrg  ;;
3122209ff23fSmrg
3123209ff23fSmrgosf3* | osf4* | osf5*)
3124209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
3125209ff23fSmrg  ;;
3126209ff23fSmrg
3127209ff23fSmrgrdos*)
3128209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
3129209ff23fSmrg  ;;
3130209ff23fSmrg
3131209ff23fSmrgsolaris*)
3132209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
3133209ff23fSmrg  ;;
3134209ff23fSmrg
3135ad43ddacSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3136ad43ddacSmrg  lt_cv_deplibs_check_method=pass_all
3137ad43ddacSmrg  ;;
3138ad43ddacSmrg
3139209ff23fSmrgsysv4 | sysv4.3*)
3140209ff23fSmrg  case $host_vendor in
3141209ff23fSmrg  motorola)
3142209ff23fSmrg    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]]'
3143209ff23fSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3144209ff23fSmrg    ;;
3145209ff23fSmrg  ncr)
3146209ff23fSmrg    lt_cv_deplibs_check_method=pass_all
3147209ff23fSmrg    ;;
3148209ff23fSmrg  sequent)
3149209ff23fSmrg    lt_cv_file_magic_cmd='/bin/file'
3150209ff23fSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3151209ff23fSmrg    ;;
3152209ff23fSmrg  sni)
3153209ff23fSmrg    lt_cv_file_magic_cmd='/bin/file'
3154209ff23fSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3155209ff23fSmrg    lt_cv_file_magic_test_file=/lib/libc.so
3156209ff23fSmrg    ;;
3157209ff23fSmrg  siemens)
3158209ff23fSmrg    lt_cv_deplibs_check_method=pass_all
3159209ff23fSmrg    ;;
3160209ff23fSmrg  pc)
3161209ff23fSmrg    lt_cv_deplibs_check_method=pass_all
3162209ff23fSmrg    ;;
3163209ff23fSmrg  esac
3164209ff23fSmrg  ;;
3165209ff23fSmrg
3166ad43ddacSmrgtpf*)
3167209ff23fSmrg  lt_cv_deplibs_check_method=pass_all
3168209ff23fSmrg  ;;
3169209ff23fSmrgesac
3170209ff23fSmrg])
3171209ff23fSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
3172209ff23fSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
3173209ff23fSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
3174209ff23fSmrg
3175ad43ddacSmrg_LT_DECL([], [deplibs_check_method], [1],
3176ad43ddacSmrg    [Method to check whether dependent libraries are shared objects])
3177ad43ddacSmrg_LT_DECL([], [file_magic_cmd], [1],
3178ad43ddacSmrg    [Command to use when deplibs_check_method == "file_magic"])
3179ad43ddacSmrg])# _LT_CHECK_MAGIC_METHOD
3180209ff23fSmrg
3181ad43ddacSmrg
3182ad43ddacSmrg# LT_PATH_NM
3183209ff23fSmrg# ----------
3184ad43ddacSmrg# find the pathname to a BSD- or MS-compatible name lister
3185ad43ddacSmrgAC_DEFUN([LT_PATH_NM],
3186ad43ddacSmrg[AC_REQUIRE([AC_PROG_CC])dnl
3187ad43ddacSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3188209ff23fSmrg[if test -n "$NM"; then
3189209ff23fSmrg  # Let the user override the test.
3190209ff23fSmrg  lt_cv_path_NM="$NM"
3191209ff23fSmrgelse
3192209ff23fSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
3193209ff23fSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3194209ff23fSmrg    lt_nm_to_check="$lt_nm_to_check nm"
3195209ff23fSmrg  fi
3196209ff23fSmrg  for lt_tmp_nm in $lt_nm_to_check; do
3197209ff23fSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3198209ff23fSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3199209ff23fSmrg      IFS="$lt_save_ifs"
3200209ff23fSmrg      test -z "$ac_dir" && ac_dir=.
3201209ff23fSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
3202209ff23fSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3203209ff23fSmrg	# Check to see if the nm accepts a BSD-compat flag.
3204209ff23fSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3205209ff23fSmrg	#   nm: unknown option "B" ignored
3206209ff23fSmrg	# Tru64's nm complains that /dev/null is an invalid object file
3207209ff23fSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3208209ff23fSmrg	*/dev/null* | *'Invalid file or object type'*)
3209209ff23fSmrg	  lt_cv_path_NM="$tmp_nm -B"
3210209ff23fSmrg	  break
3211209ff23fSmrg	  ;;
3212209ff23fSmrg	*)
3213209ff23fSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3214209ff23fSmrg	  */dev/null*)
3215209ff23fSmrg	    lt_cv_path_NM="$tmp_nm -p"
3216209ff23fSmrg	    break
3217209ff23fSmrg	    ;;
3218209ff23fSmrg	  *)
3219209ff23fSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3220209ff23fSmrg	    continue # so that we can try to find one that supports BSD flags
3221209ff23fSmrg	    ;;
3222209ff23fSmrg	  esac
3223209ff23fSmrg	  ;;
3224209ff23fSmrg	esac
3225209ff23fSmrg      fi
3226209ff23fSmrg    done
3227209ff23fSmrg    IFS="$lt_save_ifs"
3228209ff23fSmrg  done
3229ad43ddacSmrg  : ${lt_cv_path_NM=no}
3230209ff23fSmrgfi])
3231ad43ddacSmrgif test "$lt_cv_path_NM" != "no"; then
3232ad43ddacSmrg  NM="$lt_cv_path_NM"
3233ad43ddacSmrgelse
3234ad43ddacSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
3235ad43ddacSmrg  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3236ad43ddacSmrg  AC_SUBST([DUMPBIN])
3237ad43ddacSmrg  if test "$DUMPBIN" != ":"; then
3238ad43ddacSmrg    NM="$DUMPBIN"
3239ad43ddacSmrg  fi
3240ad43ddacSmrgfi
3241ad43ddacSmrgtest -z "$NM" && NM=nm
3242ad43ddacSmrgAC_SUBST([NM])
3243ad43ddacSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3244ad43ddacSmrg
3245ad43ddacSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3246ad43ddacSmrg  [lt_cv_nm_interface="BSD nm"
3247ad43ddacSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
3248ad43ddacSmrg  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3249ad43ddacSmrg  (eval "$ac_compile" 2>conftest.err)
3250ad43ddacSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3251ad43ddacSmrg  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3252ad43ddacSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3253ad43ddacSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3254ad43ddacSmrg  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3255ad43ddacSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
3256ad43ddacSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3257ad43ddacSmrg    lt_cv_nm_interface="MS dumpbin"
3258ad43ddacSmrg  fi
3259ad43ddacSmrg  rm -f conftest*])
3260ad43ddacSmrg])# LT_PATH_NM
3261209ff23fSmrg
3262ad43ddacSmrg# Old names:
3263ad43ddacSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3264ad43ddacSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3265ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
3266ad43ddacSmrgdnl AC_DEFUN([AM_PROG_NM], [])
3267ad43ddacSmrgdnl AC_DEFUN([AC_PROG_NM], [])
3268209ff23fSmrg
3269ad43ddacSmrg
3270ad43ddacSmrg# LT_LIB_M
3271ad43ddacSmrg# --------
3272209ff23fSmrg# check for math library
3273ad43ddacSmrgAC_DEFUN([LT_LIB_M],
3274209ff23fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3275209ff23fSmrgLIBM=
3276209ff23fSmrgcase $host in
3277209ff23fSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3278209ff23fSmrg  # These system don't have libm, or don't need it
3279209ff23fSmrg  ;;
3280209ff23fSmrg*-ncr-sysv4.3*)
3281209ff23fSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3282209ff23fSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3283209ff23fSmrg  ;;
3284209ff23fSmrg*)
3285209ff23fSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
3286209ff23fSmrg  ;;
3287209ff23fSmrgesac
3288ad43ddacSmrgAC_SUBST([LIBM])
3289ad43ddacSmrg])# LT_LIB_M
3290209ff23fSmrg
3291ad43ddacSmrg# Old name:
3292ad43ddacSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3293ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
3294ad43ddacSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
3295209ff23fSmrg
3296209ff23fSmrg
3297ad43ddacSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
3298ad43ddacSmrg# -------------------------------
3299ad43ddacSmrgm4_defun([_LT_COMPILER_NO_RTTI],
3300ad43ddacSmrg[m4_require([_LT_TAG_COMPILER])dnl
3301209ff23fSmrg
3302ad43ddacSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3303209ff23fSmrg
3304ad43ddacSmrgif test "$GCC" = yes; then
3305ad43ddacSmrg  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3306209ff23fSmrg
3307ad43ddacSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3308ad43ddacSmrg    lt_cv_prog_compiler_rtti_exceptions,
3309ad43ddacSmrg    [-fno-rtti -fno-exceptions], [],
3310ad43ddacSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3311ad43ddacSmrgfi
3312ad43ddacSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3313ad43ddacSmrg	[Compiler flag to turn off builtin functions])
3314ad43ddacSmrg])# _LT_COMPILER_NO_RTTI
3315209ff23fSmrg
3316209ff23fSmrg
3317ad43ddacSmrg# _LT_CMD_GLOBAL_SYMBOLS
3318ad43ddacSmrg# ----------------------
3319ad43ddacSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3320ad43ddacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3321ad43ddacSmrgAC_REQUIRE([AC_PROG_CC])dnl
3322ad43ddacSmrgAC_REQUIRE([LT_PATH_NM])dnl
3323ad43ddacSmrgAC_REQUIRE([LT_PATH_LD])dnl
3324ad43ddacSmrgm4_require([_LT_DECL_SED])dnl
3325ad43ddacSmrgm4_require([_LT_DECL_EGREP])dnl
3326ad43ddacSmrgm4_require([_LT_TAG_COMPILER])dnl
3327209ff23fSmrg
3328ad43ddacSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
3329ad43ddacSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
3330ad43ddacSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3331209ff23fSmrg[
3332ad43ddacSmrg# These are sane defaults that work on at least a few old systems.
3333ad43ddacSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3334209ff23fSmrg
3335ad43ddacSmrg# Character class describing NM global symbol codes.
3336ad43ddacSmrgsymcode='[[BCDEGRST]]'
3337209ff23fSmrg
3338ad43ddacSmrg# Regexp to match symbols that can be accessed directly from C.
3339ad43ddacSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3340209ff23fSmrg
3341ad43ddacSmrg# Define system-specific variables.
3342ad43ddacSmrgcase $host_os in
3343ad43ddacSmrgaix*)
3344ad43ddacSmrg  symcode='[[BCDT]]'
3345ad43ddacSmrg  ;;
33462f39173dSmrgcygwin* | mingw* | pw32* | cegcc*)
3347ad43ddacSmrg  symcode='[[ABCDGISTW]]'
3348ad43ddacSmrg  ;;
3349ad43ddacSmrghpux*)
3350ad43ddacSmrg  if test "$host_cpu" = ia64; then
3351ad43ddacSmrg    symcode='[[ABCDEGRST]]'
3352ad43ddacSmrg  fi
3353ad43ddacSmrg  ;;
3354ad43ddacSmrgirix* | nonstopux*)
3355ad43ddacSmrg  symcode='[[BCDEGRST]]'
3356ad43ddacSmrg  ;;
3357ad43ddacSmrgosf*)
3358ad43ddacSmrg  symcode='[[BCDEGQRST]]'
3359ad43ddacSmrg  ;;
3360ad43ddacSmrgsolaris*)
3361ad43ddacSmrg  symcode='[[BDRT]]'
3362ad43ddacSmrg  ;;
3363ad43ddacSmrgsco3.2v5*)
3364ad43ddacSmrg  symcode='[[DT]]'
3365ad43ddacSmrg  ;;
3366ad43ddacSmrgsysv4.2uw2*)
3367ad43ddacSmrg  symcode='[[DT]]'
3368ad43ddacSmrg  ;;
3369ad43ddacSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
3370ad43ddacSmrg  symcode='[[ABDT]]'
3371ad43ddacSmrg  ;;
3372ad43ddacSmrgsysv4)
3373ad43ddacSmrg  symcode='[[DFNSTU]]'
3374ad43ddacSmrg  ;;
3375ad43ddacSmrgesac
3376209ff23fSmrg
3377ad43ddacSmrg# If we're using GNU nm, then use its standard symbol codes.
3378ad43ddacSmrgcase `$NM -V 2>&1` in
3379ad43ddacSmrg*GNU* | *'with BFD'*)
3380ad43ddacSmrg  symcode='[[ABCDGIRSTW]]' ;;
3381ad43ddacSmrgesac
3382209ff23fSmrg
3383ad43ddacSmrg# Transform an extracted symbol line into a proper C declaration.
3384ad43ddacSmrg# Some systems (esp. on ia64) link data and code symbols differently,
3385ad43ddacSmrg# so use this general approach.
3386ad43ddacSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3387209ff23fSmrg
3388ad43ddacSmrg# Transform an extracted symbol line into symbol name and symbol address
3389ad43ddacSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3390ad43ddacSmrglt_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'"
3391209ff23fSmrg
3392ad43ddacSmrg# Handle CRLF in mingw tool chain
3393ad43ddacSmrgopt_cr=
3394ad43ddacSmrgcase $build_os in
3395ad43ddacSmrgmingw*)
3396ad43ddacSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3397ad43ddacSmrg  ;;
3398ad43ddacSmrgesac
3399209ff23fSmrg
3400ad43ddacSmrg# Try without a prefix underscore, then with it.
3401ad43ddacSmrgfor ac_symprfx in "" "_"; do
3402209ff23fSmrg
3403ad43ddacSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3404ad43ddacSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
3405209ff23fSmrg
3406ad43ddacSmrg  # Write the raw and C identifiers.
3407ad43ddacSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3408ad43ddacSmrg    # Fake it for dumpbin and say T for any non-static function
3409ad43ddacSmrg    # and D for any global variable.
3410ad43ddacSmrg    # Also find C++ and __fastcall symbols from MSVC++,
3411ad43ddacSmrg    # which start with @ or ?.
3412ad43ddacSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
3413ad43ddacSmrg"     {last_section=section; section=\$ 3};"\
3414ad43ddacSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3415ad43ddacSmrg"     \$ 0!~/External *\|/{next};"\
3416ad43ddacSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3417ad43ddacSmrg"     {if(hide[section]) next};"\
3418ad43ddacSmrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3419ad43ddacSmrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3420ad43ddacSmrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
3421ad43ddacSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3422ad43ddacSmrg"     ' prfx=^$ac_symprfx]"
3423ad43ddacSmrg  else
3424ad43ddacSmrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3425209ff23fSmrg  fi
3426209ff23fSmrg
3427ad43ddacSmrg  # Check to see that the pipe works correctly.
3428ad43ddacSmrg  pipe_works=no
3429209ff23fSmrg
3430ad43ddacSmrg  rm -f conftest*
3431ad43ddacSmrg  cat > conftest.$ac_ext <<_LT_EOF
3432ad43ddacSmrg#ifdef __cplusplus
3433ad43ddacSmrgextern "C" {
3434ad43ddacSmrg#endif
3435ad43ddacSmrgchar nm_test_var;
3436ad43ddacSmrgvoid nm_test_func(void);
3437ad43ddacSmrgvoid nm_test_func(void){}
3438ad43ddacSmrg#ifdef __cplusplus
3439ad43ddacSmrg}
3440ad43ddacSmrg#endif
3441ad43ddacSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
3442ad43ddacSmrg_LT_EOF
3443209ff23fSmrg
3444ad43ddacSmrg  if AC_TRY_EVAL(ac_compile); then
3445ad43ddacSmrg    # Now try to grab the symbols.
3446ad43ddacSmrg    nlist=conftest.nm
3447ad43ddacSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3448ad43ddacSmrg      # Try sorting and uniquifying the output.
3449ad43ddacSmrg      if sort "$nlist" | uniq > "$nlist"T; then
3450ad43ddacSmrg	mv -f "$nlist"T "$nlist"
3451ad43ddacSmrg      else
3452ad43ddacSmrg	rm -f "$nlist"T
3453ad43ddacSmrg      fi
3454209ff23fSmrg
3455ad43ddacSmrg      # Make sure that we snagged all the symbols we need.
3456ad43ddacSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3457ad43ddacSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3458ad43ddacSmrg	  cat <<_LT_EOF > conftest.$ac_ext
3459ad43ddacSmrg#ifdef __cplusplus
3460ad43ddacSmrgextern "C" {
3461ad43ddacSmrg#endif
3462209ff23fSmrg
3463ad43ddacSmrg_LT_EOF
3464ad43ddacSmrg	  # Now generate the symbol file.
3465ad43ddacSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3466209ff23fSmrg
3467ad43ddacSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
3468209ff23fSmrg
3469ad43ddacSmrg/* The mapping between symbol names and symbols.  */
3470ad43ddacSmrgconst struct {
3471ad43ddacSmrg  const char *name;
3472ad43ddacSmrg  void       *address;
3473ad43ddacSmrg}
3474ad43ddacSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
3475ad43ddacSmrg{
3476ad43ddacSmrg  { "@PROGRAM@", (void *) 0 },
3477ad43ddacSmrg_LT_EOF
3478ad43ddacSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3479ad43ddacSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
3480ad43ddacSmrg  {0, (void *) 0}
3481ad43ddacSmrg};
3482209ff23fSmrg
3483ad43ddacSmrg/* This works around a problem in FreeBSD linker */
3484ad43ddacSmrg#ifdef FREEBSD_WORKAROUND
3485ad43ddacSmrgstatic const void *lt_preloaded_setup() {
3486ad43ddacSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
3487ad43ddacSmrg}
3488ad43ddacSmrg#endif
3489209ff23fSmrg
3490ad43ddacSmrg#ifdef __cplusplus
3491ad43ddacSmrg}
3492ad43ddacSmrg#endif
3493ad43ddacSmrg_LT_EOF
3494ad43ddacSmrg	  # Now try linking the two files.
3495ad43ddacSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
3496ad43ddacSmrg	  lt_save_LIBS="$LIBS"
3497ad43ddacSmrg	  lt_save_CFLAGS="$CFLAGS"
3498ad43ddacSmrg	  LIBS="conftstm.$ac_objext"
3499ad43ddacSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3500ad43ddacSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3501ad43ddacSmrg	    pipe_works=yes
3502ad43ddacSmrg	  fi
3503ad43ddacSmrg	  LIBS="$lt_save_LIBS"
3504ad43ddacSmrg	  CFLAGS="$lt_save_CFLAGS"
3505ad43ddacSmrg	else
3506ad43ddacSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3507ad43ddacSmrg	fi
3508ad43ddacSmrg      else
3509ad43ddacSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3510ad43ddacSmrg      fi
3511209ff23fSmrg    else
3512ad43ddacSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3513209ff23fSmrg    fi
3514209ff23fSmrg  else
3515ad43ddacSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3516ad43ddacSmrg    cat conftest.$ac_ext >&5
3517209ff23fSmrg  fi
3518ad43ddacSmrg  rm -rf conftest* conftst*
3519209ff23fSmrg
3520ad43ddacSmrg  # Do not use the global_symbol_pipe unless it works.
3521ad43ddacSmrg  if test "$pipe_works" = yes; then
3522ad43ddacSmrg    break
3523ad43ddacSmrg  else
3524ad43ddacSmrg    lt_cv_sys_global_symbol_pipe=
3525ad43ddacSmrg  fi
3526ad43ddacSmrgdone
3527ad43ddacSmrg])
3528ad43ddacSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
3529ad43ddacSmrg  lt_cv_sys_global_symbol_to_cdecl=
3530ad43ddacSmrgfi
3531ad43ddacSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3532ad43ddacSmrg  AC_MSG_RESULT(failed)
3533209ff23fSmrgelse
3534ad43ddacSmrg  AC_MSG_RESULT(ok)
3535209ff23fSmrgfi
3536209ff23fSmrg
3537ad43ddacSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3538ad43ddacSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
3539ad43ddacSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3540ad43ddacSmrg    [Transform the output of nm in a proper C declaration])
3541ad43ddacSmrg_LT_DECL([global_symbol_to_c_name_address],
3542ad43ddacSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
3543ad43ddacSmrg    [Transform the output of nm in a C name address pair])
3544ad43ddacSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3545ad43ddacSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3546ad43ddacSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
3547ad43ddacSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
3548209ff23fSmrg
3549209ff23fSmrg
3550ad43ddacSmrg# _LT_COMPILER_PIC([TAGNAME])
3551ad43ddacSmrg# ---------------------------
3552ad43ddacSmrgm4_defun([_LT_COMPILER_PIC],
3553ad43ddacSmrg[m4_require([_LT_TAG_COMPILER])dnl
3554ad43ddacSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
3555ad43ddacSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3556ad43ddacSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
3557209ff23fSmrg
3558ad43ddacSmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
3559ad43ddacSmrgm4_if([$1], [CXX], [
3560ad43ddacSmrg  # C++ specific cases for pic, static, wl, etc.
3561ad43ddacSmrg  if test "$GXX" = yes; then
3562ad43ddacSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3563ad43ddacSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3564209ff23fSmrg
3565ad43ddacSmrg    case $host_os in
3566ad43ddacSmrg    aix*)
3567ad43ddacSmrg      # All AIX code is PIC.
3568209ff23fSmrg      if test "$host_cpu" = ia64; then
3569ad43ddacSmrg	# AIX 5 now supports IA64 processor
3570ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3571209ff23fSmrg      fi
3572209ff23fSmrg      ;;
3573209ff23fSmrg
3574ad43ddacSmrg    amigaos*)
3575209ff23fSmrg      case $host_cpu in
3576ad43ddacSmrg      powerpc)
3577ad43ddacSmrg            # see comment about AmigaOS4 .so support
3578ad43ddacSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3579ad43ddacSmrg        ;;
3580ad43ddacSmrg      m68k)
3581ad43ddacSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
3582ad43ddacSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
3583ad43ddacSmrg            # like `-m68040'.
3584ad43ddacSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3585209ff23fSmrg        ;;
3586209ff23fSmrg      esac
3587209ff23fSmrg      ;;
3588209ff23fSmrg
3589ad43ddacSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3590ad43ddacSmrg      # PIC is the default for these OSes.
3591ad43ddacSmrg      ;;
35922f39173dSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
3593ad43ddacSmrg      # This hack is so that the source file can tell whether it is being
3594ad43ddacSmrg      # built for inclusion in a dll (and should export symbols for example).
3595ad43ddacSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3596ad43ddacSmrg      # (--disable-auto-import) libraries
3597ad43ddacSmrg      m4_if([$1], [GCJ], [],
3598ad43ddacSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3599ad43ddacSmrg      ;;
3600ad43ddacSmrg    darwin* | rhapsody*)
3601ad43ddacSmrg      # PIC is the default on this platform
3602ad43ddacSmrg      # Common symbols not allowed in MH_DYLIB files
3603ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3604ad43ddacSmrg      ;;
3605ad43ddacSmrg    *djgpp*)
3606ad43ddacSmrg      # DJGPP does not support shared libraries at all
3607ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3608ad43ddacSmrg      ;;
3609ad43ddacSmrg    interix[[3-9]]*)
3610ad43ddacSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3611ad43ddacSmrg      # Instead, we relocate shared libraries at runtime.
3612ad43ddacSmrg      ;;
3613ad43ddacSmrg    sysv4*MP*)
3614ad43ddacSmrg      if test -d /usr/nec; then
3615ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3616ad43ddacSmrg      fi
3617ad43ddacSmrg      ;;
3618ad43ddacSmrg    hpux*)
36192f39173dSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
36202f39173dSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
36212f39173dSmrg      # sets the default TLS model and affects inlining.
3622ad43ddacSmrg      case $host_cpu in
36232f39173dSmrg      hppa*64*)
3624209ff23fSmrg	;;
3625209ff23fSmrg      *)
3626ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3627209ff23fSmrg	;;
3628ad43ddacSmrg      esac
3629ad43ddacSmrg      ;;
3630ad43ddacSmrg    *qnx* | *nto*)
3631ad43ddacSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
3632ad43ddacSmrg      # it will coredump.
3633ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3634ad43ddacSmrg      ;;
3635ad43ddacSmrg    *)
3636ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3637ad43ddacSmrg      ;;
3638209ff23fSmrg    esac
3639ad43ddacSmrg  else
3640ad43ddacSmrg    case $host_os in
3641ad43ddacSmrg      aix[[4-9]]*)
3642ad43ddacSmrg	# All AIX code is PIC.
3643ad43ddacSmrg	if test "$host_cpu" = ia64; then
3644ad43ddacSmrg	  # AIX 5 now supports IA64 processor
3645ad43ddacSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3646ad43ddacSmrg	else
3647ad43ddacSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3648209ff23fSmrg	fi
3649209ff23fSmrg	;;
3650ad43ddacSmrg      chorus*)
3651ad43ddacSmrg	case $cc_basename in
3652ad43ddacSmrg	cxch68*)
3653ad43ddacSmrg	  # Green Hills C++ Compiler
3654ad43ddacSmrg	  # _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"
3655209ff23fSmrg	  ;;
3656209ff23fSmrg	esac
3657209ff23fSmrg	;;
3658ad43ddacSmrg      dgux*)
3659ad43ddacSmrg	case $cc_basename in
3660ad43ddacSmrg	  ec++*)
3661ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3662ad43ddacSmrg	    ;;
3663ad43ddacSmrg	  ghcx*)
3664ad43ddacSmrg	    # Green Hills C++ Compiler
3665ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3666ad43ddacSmrg	    ;;
3667ad43ddacSmrg	  *)
3668ad43ddacSmrg	    ;;
3669209ff23fSmrg	esac
3670209ff23fSmrg	;;
3671ad43ddacSmrg      freebsd* | dragonfly*)
3672ad43ddacSmrg	# FreeBSD uses GNU C++
3673209ff23fSmrg	;;
3674ad43ddacSmrg      hpux9* | hpux10* | hpux11*)
3675ad43ddacSmrg	case $cc_basename in
3676ad43ddacSmrg	  CC*)
3677ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3678ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3679ad43ddacSmrg	    if test "$host_cpu" != ia64; then
3680ad43ddacSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3681ad43ddacSmrg	    fi
3682ad43ddacSmrg	    ;;
3683ad43ddacSmrg	  aCC*)
3684ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3685ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3686ad43ddacSmrg	    case $host_cpu in
3687ad43ddacSmrg	    hppa*64*|ia64*)
3688ad43ddacSmrg	      # +Z the default
3689ad43ddacSmrg	      ;;
3690ad43ddacSmrg	    *)
3691ad43ddacSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3692ad43ddacSmrg	      ;;
3693ad43ddacSmrg	    esac
3694ad43ddacSmrg	    ;;
3695ad43ddacSmrg	  *)
3696ad43ddacSmrg	    ;;
3697ad43ddacSmrg	esac
3698209ff23fSmrg	;;
3699ad43ddacSmrg      interix*)
3700ad43ddacSmrg	# This is c89, which is MS Visual C++ (no shared libs)
3701ad43ddacSmrg	# Anyone wants to do a port?
3702209ff23fSmrg	;;
3703ad43ddacSmrg      irix5* | irix6* | nonstopux*)
3704ad43ddacSmrg	case $cc_basename in
3705ad43ddacSmrg	  CC*)
3706ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3707ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3708ad43ddacSmrg	    # CC pic flag -KPIC is the default.
3709ad43ddacSmrg	    ;;
3710ad43ddacSmrg	  *)
3711ad43ddacSmrg	    ;;
3712ad43ddacSmrg	esac
3713209ff23fSmrg	;;
3714ad43ddacSmrg      linux* | k*bsd*-gnu)
3715ad43ddacSmrg	case $cc_basename in
3716ad43ddacSmrg	  KCC*)
3717ad43ddacSmrg	    # KAI C++ Compiler
3718ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3719ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3720ad43ddacSmrg	    ;;
37212f39173dSmrg	  ecpc* )
37222f39173dSmrg	    # old Intel C++ for x86_64 which still supported -KPIC.
3723ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3724ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3725ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3726ad43ddacSmrg	    ;;
37272f39173dSmrg	  icpc* )
37282f39173dSmrg	    # Intel C++, used to be incompatible with GCC.
37292f39173dSmrg	    # ICC 10 doesn't accept -KPIC any more.
37302f39173dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
37312f39173dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
37322f39173dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
37332f39173dSmrg	    ;;
3734ad43ddacSmrg	  pgCC* | pgcpp*)
3735ad43ddacSmrg	    # Portland Group C++ compiler
3736ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3737ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3738ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3739ad43ddacSmrg	    ;;
3740ad43ddacSmrg	  cxx*)
3741ad43ddacSmrg	    # Compaq C++
3742ad43ddacSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
3743ad43ddacSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
3744ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3745ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3746ad43ddacSmrg	    ;;
3747ad43ddacSmrg	  xlc* | xlC*)
3748ad43ddacSmrg	    # IBM XL 8.0 on PPC
3749ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3750ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3751ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3752ad43ddacSmrg	    ;;
3753ad43ddacSmrg	  *)
3754ad43ddacSmrg	    case `$CC -V 2>&1 | sed 5q` in
3755ad43ddacSmrg	    *Sun\ C*)
3756ad43ddacSmrg	      # Sun C++ 5.9
3757ad43ddacSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3758ad43ddacSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3759ad43ddacSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3760ad43ddacSmrg	      ;;
3761ad43ddacSmrg	    esac
3762ad43ddacSmrg	    ;;
3763ad43ddacSmrg	esac
3764209ff23fSmrg	;;
3765ad43ddacSmrg      lynxos*)
3766209ff23fSmrg	;;
3767ad43ddacSmrg      m88k*)
3768209ff23fSmrg	;;
3769ad43ddacSmrg      mvs*)
3770ad43ddacSmrg	case $cc_basename in
3771ad43ddacSmrg	  cxx*)
3772ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3773ad43ddacSmrg	    ;;
3774ad43ddacSmrg	  *)
3775ad43ddacSmrg	    ;;
3776ad43ddacSmrg	esac
3777209ff23fSmrg	;;
37782f39173dSmrg      netbsd*)
3779209ff23fSmrg	;;
3780ad43ddacSmrg      *qnx* | *nto*)
3781ad43ddacSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
3782ad43ddacSmrg        # it will coredump.
3783ad43ddacSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3784ad43ddacSmrg        ;;
3785ad43ddacSmrg      osf3* | osf4* | osf5*)
3786ad43ddacSmrg	case $cc_basename in
3787ad43ddacSmrg	  KCC*)
3788ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3789ad43ddacSmrg	    ;;
3790ad43ddacSmrg	  RCC*)
3791ad43ddacSmrg	    # Rational C++ 2.4.1
3792ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3793ad43ddacSmrg	    ;;
3794ad43ddacSmrg	  cxx*)
3795ad43ddacSmrg	    # Digital/Compaq C++
3796ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3797ad43ddacSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
3798ad43ddacSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
3799ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3800ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3801ad43ddacSmrg	    ;;
3802ad43ddacSmrg	  *)
3803ad43ddacSmrg	    ;;
3804ad43ddacSmrg	esac
3805209ff23fSmrg	;;
3806ad43ddacSmrg      psos*)
3807209ff23fSmrg	;;
3808ad43ddacSmrg      solaris*)
3809ad43ddacSmrg	case $cc_basename in
3810ad43ddacSmrg	  CC*)
3811ad43ddacSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
3812ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3813ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3814ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3815ad43ddacSmrg	    ;;
3816ad43ddacSmrg	  gcx*)
3817ad43ddacSmrg	    # Green Hills C++ Compiler
3818ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3819ad43ddacSmrg	    ;;
3820ad43ddacSmrg	  *)
3821ad43ddacSmrg	    ;;
3822ad43ddacSmrg	esac
3823209ff23fSmrg	;;
3824ad43ddacSmrg      sunos4*)
3825ad43ddacSmrg	case $cc_basename in
3826ad43ddacSmrg	  CC*)
3827ad43ddacSmrg	    # Sun C++ 4.x
3828ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3829ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3830ad43ddacSmrg	    ;;
3831ad43ddacSmrg	  lcc*)
3832ad43ddacSmrg	    # Lucid
3833ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3834ad43ddacSmrg	    ;;
3835ad43ddacSmrg	  *)
3836ad43ddacSmrg	    ;;
3837ad43ddacSmrg	esac
3838209ff23fSmrg	;;
3839ad43ddacSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3840ad43ddacSmrg	case $cc_basename in
3841ad43ddacSmrg	  CC*)
3842ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3843ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3844ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3845ad43ddacSmrg	    ;;
3846ad43ddacSmrg	esac
3847ad43ddacSmrg	;;
3848ad43ddacSmrg      tandem*)
3849ad43ddacSmrg	case $cc_basename in
3850ad43ddacSmrg	  NCC*)
3851ad43ddacSmrg	    # NonStop-UX NCC 3.20
3852ad43ddacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3853ad43ddacSmrg	    ;;
3854209ff23fSmrg	  *)
3855209ff23fSmrg	    ;;
3856209ff23fSmrg	esac
3857209ff23fSmrg	;;
3858ad43ddacSmrg      vxworks*)
3859209ff23fSmrg	;;
3860209ff23fSmrg      *)
3861ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3862ad43ddacSmrg	;;
3863ad43ddacSmrg    esac
3864ad43ddacSmrg  fi
3865ad43ddacSmrg],
3866ad43ddacSmrg[
3867ad43ddacSmrg  if test "$GCC" = yes; then
3868ad43ddacSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3869ad43ddacSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3870209ff23fSmrg
3871ad43ddacSmrg    case $host_os in
3872ad43ddacSmrg      aix*)
3873ad43ddacSmrg      # All AIX code is PIC.
3874ad43ddacSmrg      if test "$host_cpu" = ia64; then
3875ad43ddacSmrg	# AIX 5 now supports IA64 processor
3876ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3877ad43ddacSmrg      fi
3878ad43ddacSmrg      ;;
3879209ff23fSmrg
3880ad43ddacSmrg    amigaos*)
3881ad43ddacSmrg      case $host_cpu in
3882ad43ddacSmrg      powerpc)
3883ad43ddacSmrg            # see comment about AmigaOS4 .so support
3884ad43ddacSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3885ad43ddacSmrg        ;;
3886ad43ddacSmrg      m68k)
3887ad43ddacSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
3888ad43ddacSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
3889ad43ddacSmrg            # like `-m68040'.
3890ad43ddacSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3891ad43ddacSmrg        ;;
3892ad43ddacSmrg      esac
3893ad43ddacSmrg      ;;
3894209ff23fSmrg
3895ad43ddacSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3896ad43ddacSmrg      # PIC is the default for these OSes.
3897ad43ddacSmrg      ;;
3898ad43ddacSmrg
38992f39173dSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
3900ad43ddacSmrg      # This hack is so that the source file can tell whether it is being
3901ad43ddacSmrg      # built for inclusion in a dll (and should export symbols for example).
3902ad43ddacSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3903ad43ddacSmrg      # (--disable-auto-import) libraries
3904ad43ddacSmrg      m4_if([$1], [GCJ], [],
3905ad43ddacSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3906ad43ddacSmrg      ;;
3907ad43ddacSmrg
3908ad43ddacSmrg    darwin* | rhapsody*)
3909ad43ddacSmrg      # PIC is the default on this platform
3910ad43ddacSmrg      # Common symbols not allowed in MH_DYLIB files
3911ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3912ad43ddacSmrg      ;;
3913ad43ddacSmrg
3914ad43ddacSmrg    hpux*)
39152f39173dSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
39162f39173dSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
39172f39173dSmrg      # sets the default TLS model and affects inlining.
3918ad43ddacSmrg      case $host_cpu in
39192f39173dSmrg      hppa*64*)
3920ad43ddacSmrg	# +Z the default
3921209ff23fSmrg	;;
3922209ff23fSmrg      *)
3923ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3924209ff23fSmrg	;;
3925ad43ddacSmrg      esac
3926ad43ddacSmrg      ;;
3927ad43ddacSmrg
3928ad43ddacSmrg    interix[[3-9]]*)
3929ad43ddacSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3930ad43ddacSmrg      # Instead, we relocate shared libraries at runtime.
3931ad43ddacSmrg      ;;
3932ad43ddacSmrg
3933ad43ddacSmrg    msdosdjgpp*)
3934ad43ddacSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
3935ad43ddacSmrg      # on systems that don't support them.
3936ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3937ad43ddacSmrg      enable_shared=no
3938ad43ddacSmrg      ;;
3939ad43ddacSmrg
3940ad43ddacSmrg    *nto* | *qnx*)
3941ad43ddacSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
3942ad43ddacSmrg      # it will coredump.
3943ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3944ad43ddacSmrg      ;;
3945ad43ddacSmrg
3946ad43ddacSmrg    sysv4*MP*)
3947ad43ddacSmrg      if test -d /usr/nec; then
3948ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3949ad43ddacSmrg      fi
3950ad43ddacSmrg      ;;
3951ad43ddacSmrg
3952ad43ddacSmrg    *)
3953ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3954ad43ddacSmrg      ;;
3955209ff23fSmrg    esac
3956ad43ddacSmrg  else
3957ad43ddacSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
3958ad43ddacSmrg    case $host_os in
3959ad43ddacSmrg    aix*)
3960ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3961ad43ddacSmrg      if test "$host_cpu" = ia64; then
3962ad43ddacSmrg	# AIX 5 now supports IA64 processor
3963ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3964ad43ddacSmrg      else
3965ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3966ad43ddacSmrg      fi
3967ad43ddacSmrg      ;;
3968ad43ddacSmrg
39692f39173dSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
3970ad43ddacSmrg      # This hack is so that the source file can tell whether it is being
3971ad43ddacSmrg      # built for inclusion in a dll (and should export symbols for example).
3972ad43ddacSmrg      m4_if([$1], [GCJ], [],
3973ad43ddacSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3974ad43ddacSmrg      ;;
3975ad43ddacSmrg
3976ad43ddacSmrg    hpux9* | hpux10* | hpux11*)
3977ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3978ad43ddacSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3979ad43ddacSmrg      # not for PA HP-UX.
3980ad43ddacSmrg      case $host_cpu in
3981ad43ddacSmrg      hppa*64*|ia64*)
3982ad43ddacSmrg	# +Z the default
3983209ff23fSmrg	;;
3984209ff23fSmrg      *)
3985ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3986209ff23fSmrg	;;
3987ad43ddacSmrg      esac
3988ad43ddacSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
3989ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3990ad43ddacSmrg      ;;
3991ad43ddacSmrg
3992ad43ddacSmrg    irix5* | irix6* | nonstopux*)
3993ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3994ad43ddacSmrg      # PIC (with -KPIC) is the default.
3995ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3996ad43ddacSmrg      ;;
3997ad43ddacSmrg
3998ad43ddacSmrg    linux* | k*bsd*-gnu)
3999ad43ddacSmrg      case $cc_basename in
40002f39173dSmrg      # old Intel for x86_64 which still supported -KPIC.
40012f39173dSmrg      ecc*)
4002ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4003ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4004ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4005ad43ddacSmrg        ;;
40062f39173dSmrg      # icc used to be incompatible with GCC.
40072f39173dSmrg      # ICC 10 doesn't accept -KPIC any more.
40082f39173dSmrg      icc* | ifort*)
40092f39173dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40102f39173dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
40112f39173dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
40122f39173dSmrg        ;;
40132f39173dSmrg      # Lahey Fortran 8.1.
40142f39173dSmrg      lf95*)
40152f39173dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40162f39173dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
40172f39173dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
40182f39173dSmrg	;;
4019ad43ddacSmrg      pgcc* | pgf77* | pgf90* | pgf95*)
4020ad43ddacSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
4021ad43ddacSmrg	# which looks to be a dead project)
4022ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4023ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4024ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4025ad43ddacSmrg        ;;
4026ad43ddacSmrg      ccc*)
4027ad43ddacSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4028ad43ddacSmrg        # All Alpha code is PIC.
4029ad43ddacSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4030ad43ddacSmrg        ;;
4031ad43ddacSmrg      xl*)
4032ad43ddacSmrg	# IBM XL C 8.0/Fortran 10.1 on PPC
4033ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4034ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4035ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4036209ff23fSmrg	;;
4037209ff23fSmrg      *)
4038ad43ddacSmrg	case `$CC -V 2>&1 | sed 5q` in
4039ad43ddacSmrg	*Sun\ C*)
4040ad43ddacSmrg	  # Sun C 5.9
4041ad43ddacSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4042ad43ddacSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4043ad43ddacSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4044ad43ddacSmrg	  ;;
4045ad43ddacSmrg	*Sun\ F*)
4046ad43ddacSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4047ad43ddacSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4048ad43ddacSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4049ad43ddacSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4050ad43ddacSmrg	  ;;
4051ad43ddacSmrg	esac
4052209ff23fSmrg	;;
4053ad43ddacSmrg      esac
4054ad43ddacSmrg      ;;
4055209ff23fSmrg
4056ad43ddacSmrg    newsos6)
4057ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4058ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4059ad43ddacSmrg      ;;
4060209ff23fSmrg
4061ad43ddacSmrg    *nto* | *qnx*)
4062ad43ddacSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
4063ad43ddacSmrg      # it will coredump.
4064ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4065ad43ddacSmrg      ;;
4066209ff23fSmrg
4067ad43ddacSmrg    osf3* | osf4* | osf5*)
4068ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4069ad43ddacSmrg      # All OSF/1 code is PIC.
4070ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4071ad43ddacSmrg      ;;
4072209ff23fSmrg
4073ad43ddacSmrg    rdos*)
4074ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4075ad43ddacSmrg      ;;
4076209ff23fSmrg
4077ad43ddacSmrg    solaris*)
4078ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4079ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4080ad43ddacSmrg      case $cc_basename in
4081ad43ddacSmrg      f77* | f90* | f95*)
4082ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4083ad43ddacSmrg      *)
4084ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4085ad43ddacSmrg      esac
4086ad43ddacSmrg      ;;
4087209ff23fSmrg
4088ad43ddacSmrg    sunos4*)
4089ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4090ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4091ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4092ad43ddacSmrg      ;;
4093209ff23fSmrg
4094ad43ddacSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
4095ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4096ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4097ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4098ad43ddacSmrg      ;;
4099209ff23fSmrg
4100ad43ddacSmrg    sysv4*MP*)
4101ad43ddacSmrg      if test -d /usr/nec ;then
4102ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4103ad43ddacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4104ad43ddacSmrg      fi
4105ad43ddacSmrg      ;;
4106209ff23fSmrg
4107ad43ddacSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4108ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4109ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4110ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4111ad43ddacSmrg      ;;
4112209ff23fSmrg
4113ad43ddacSmrg    unicos*)
4114ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4115ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4116ad43ddacSmrg      ;;
4117209ff23fSmrg
4118ad43ddacSmrg    uts4*)
4119ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4120ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4121ad43ddacSmrg      ;;
4122209ff23fSmrg
4123ad43ddacSmrg    *)
4124ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4125ad43ddacSmrg      ;;
4126209ff23fSmrg    esac
4127ad43ddacSmrg  fi
4128ad43ddacSmrg])
4129ad43ddacSmrgcase $host_os in
4130ad43ddacSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
4131ad43ddacSmrg  *djgpp*)
4132ad43ddacSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4133ad43ddacSmrg    ;;
4134ad43ddacSmrg  *)
4135ad43ddacSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4136ad43ddacSmrg    ;;
4137ad43ddacSmrgesac
4138ad43ddacSmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4139ad43ddacSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4140ad43ddacSmrg	[How to pass a linker flag through the compiler])
4141209ff23fSmrg
4142ad43ddacSmrg#
4143ad43ddacSmrg# Check to make sure the PIC flag actually works.
4144ad43ddacSmrg#
4145ad43ddacSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4146ad43ddacSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4147ad43ddacSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4148ad43ddacSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4149ad43ddacSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4150ad43ddacSmrg     "" | " "*) ;;
4151ad43ddacSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4152ad43ddacSmrg     esac],
4153ad43ddacSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4154ad43ddacSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4155209ff23fSmrgfi
4156ad43ddacSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4157ad43ddacSmrg	[Additional compiler flags for building library objects])
4158209ff23fSmrg
4159ad43ddacSmrg#
4160ad43ddacSmrg# Check to make sure the static flag actually works.
4161ad43ddacSmrg#
4162ad43ddacSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4163ad43ddacSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4164ad43ddacSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4165ad43ddacSmrg  $lt_tmp_static_flag,
4166ad43ddacSmrg  [],
4167ad43ddacSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4168ad43ddacSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4169ad43ddacSmrg	[Compiler flag to prevent dynamic linking])
4170ad43ddacSmrg])# _LT_COMPILER_PIC
4171209ff23fSmrg
4172ad43ddacSmrg
4173ad43ddacSmrg# _LT_LINKER_SHLIBS([TAGNAME])
4174ad43ddacSmrg# ----------------------------
4175ad43ddacSmrg# See if the linker supports building shared libraries.
4176ad43ddacSmrgm4_defun([_LT_LINKER_SHLIBS],
4177ad43ddacSmrg[AC_REQUIRE([LT_PATH_LD])dnl
4178ad43ddacSmrgAC_REQUIRE([LT_PATH_NM])dnl
4179ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4180ad43ddacSmrgm4_require([_LT_DECL_EGREP])dnl
4181ad43ddacSmrgm4_require([_LT_DECL_SED])dnl
4182ad43ddacSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4183ad43ddacSmrgm4_require([_LT_TAG_COMPILER])dnl
4184ad43ddacSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4185ad43ddacSmrgm4_if([$1], [CXX], [
4186ad43ddacSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4187ad43ddacSmrg  case $host_os in
4188ad43ddacSmrg  aix[[4-9]]*)
4189ad43ddacSmrg    # If we're using GNU nm, then we don't want the "-C" option.
4190ad43ddacSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4191ad43ddacSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4192ad43ddacSmrg      _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'
4193ad43ddacSmrg    else
4194ad43ddacSmrg      _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'
4195209ff23fSmrg    fi
4196209ff23fSmrg    ;;
4197ad43ddacSmrg  pw32*)
4198ad43ddacSmrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4199209ff23fSmrg  ;;
42002f39173dSmrg  cygwin* | mingw* | cegcc*)
4201ad43ddacSmrg    _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'
4202ad43ddacSmrg  ;;
4203ad43ddacSmrg  *)
4204ad43ddacSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4205ad43ddacSmrg  ;;
4206ad43ddacSmrg  esac
4207ad43ddacSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4208ad43ddacSmrg], [
4209ad43ddacSmrg  runpath_var=
4210ad43ddacSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
4211ad43ddacSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
4212ad43ddacSmrg  _LT_TAGVAR(archive_cmds, $1)=
4213ad43ddacSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
4214ad43ddacSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
4215ad43ddacSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4216ad43ddacSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4217ad43ddacSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4218ad43ddacSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
4219ad43ddacSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
4220ad43ddacSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4221ad43ddacSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4222ad43ddacSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4223ad43ddacSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4224ad43ddacSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
4225ad43ddacSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4226ad43ddacSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
4227ad43ddacSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4228ad43ddacSmrg  _LT_TAGVAR(module_cmds, $1)=
4229ad43ddacSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
4230ad43ddacSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4231ad43ddacSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4232ad43ddacSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4233ad43ddacSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4234ad43ddacSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
4235ad43ddacSmrg  # included in the symbol list
4236ad43ddacSmrg  _LT_TAGVAR(include_expsyms, $1)=
4237ad43ddacSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
4238ad43ddacSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4239ad43ddacSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4240ad43ddacSmrg  # as well as any symbol that contains `d'.
4241ad43ddacSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4242ad43ddacSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4243ad43ddacSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
4244ad43ddacSmrg  # the symbol is explicitly referenced.  Since portable code cannot
4245ad43ddacSmrg  # rely on this symbol name, it's probably fine to never include it in
4246ad43ddacSmrg  # preloaded symbol tables.
4247ad43ddacSmrg  # Exclude shared library initialization/finalization symbols.
4248ad43ddacSmrgdnl Note also adjust exclude_expsyms for C++ above.
4249ad43ddacSmrg  extract_expsyms_cmds=
4250209ff23fSmrg
4251ad43ddacSmrg  case $host_os in
42522f39173dSmrg  cygwin* | mingw* | pw32* | cegcc*)
4253ad43ddacSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4254ad43ddacSmrg    # When not using gcc, we currently assume that we are using
4255ad43ddacSmrg    # Microsoft Visual C++.
4256ad43ddacSmrg    if test "$GCC" != yes; then
4257ad43ddacSmrg      with_gnu_ld=no
4258209ff23fSmrg    fi
4259209ff23fSmrg    ;;
4260ad43ddacSmrg  interix*)
4261ad43ddacSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
4262ad43ddacSmrg    with_gnu_ld=yes
4263ad43ddacSmrg    ;;
4264ad43ddacSmrg  openbsd*)
4265ad43ddacSmrg    with_gnu_ld=no
4266ad43ddacSmrg    ;;
4267209ff23fSmrg  esac
4268209ff23fSmrg
4269ad43ddacSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
4270ad43ddacSmrg  if test "$with_gnu_ld" = yes; then
4271ad43ddacSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
4272ad43ddacSmrg    wlarc='${wl}'
4273209ff23fSmrg
4274ad43ddacSmrg    # Set some defaults for GNU ld with shared library support. These
4275ad43ddacSmrg    # are reset later if shared libraries are not supported. Putting them
4276ad43ddacSmrg    # here allows them to be overridden if necessary.
4277ad43ddacSmrg    runpath_var=LD_RUN_PATH
4278ad43ddacSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4279ad43ddacSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4280ad43ddacSmrg    # ancient GNU ld didn't support --whole-archive et. al.
4281ad43ddacSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4282ad43ddacSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4283ad43ddacSmrg    else
4284ad43ddacSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4285ad43ddacSmrg    fi
4286ad43ddacSmrg    supports_anon_versioning=no
4287ad43ddacSmrg    case `$LD -v 2>&1` in
4288ad43ddacSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4289ad43ddacSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4290ad43ddacSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4291ad43ddacSmrg      *\ 2.11.*) ;; # other 2.11 versions
4292ad43ddacSmrg      *) supports_anon_versioning=yes ;;
4293ad43ddacSmrg    esac
4294209ff23fSmrg
4295ad43ddacSmrg    # See if GNU ld supports shared libraries.
4296ad43ddacSmrg    case $host_os in
4297ad43ddacSmrg    aix[[3-9]]*)
4298ad43ddacSmrg      # On AIX/PPC, the GNU linker is very broken
4299ad43ddacSmrg      if test "$host_cpu" != ia64; then
4300ad43ddacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4301ad43ddacSmrg	cat <<_LT_EOF 1>&2
4302209ff23fSmrg
4303ad43ddacSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4304ad43ddacSmrg*** to be unable to reliably create shared libraries on AIX.
4305ad43ddacSmrg*** Therefore, libtool is disabling shared libraries support.  If you
4306ad43ddacSmrg*** really care for shared libraries, you may want to modify your PATH
4307ad43ddacSmrg*** so that a non-GNU linker is found, and then restart.
4308209ff23fSmrg
4309ad43ddacSmrg_LT_EOF
4310ad43ddacSmrg      fi
4311ad43ddacSmrg      ;;
4312209ff23fSmrg
4313ad43ddacSmrg    amigaos*)
4314ad43ddacSmrg      case $host_cpu in
4315ad43ddacSmrg      powerpc)
4316ad43ddacSmrg            # see comment about AmigaOS4 .so support
4317ad43ddacSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4318ad43ddacSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4319ad43ddacSmrg        ;;
4320ad43ddacSmrg      m68k)
4321ad43ddacSmrg            _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)'
4322ad43ddacSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4323ad43ddacSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4324ad43ddacSmrg        ;;
4325ad43ddacSmrg      esac
4326ad43ddacSmrg      ;;
4327209ff23fSmrg
4328ad43ddacSmrg    beos*)
4329ad43ddacSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4330ad43ddacSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4331ad43ddacSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4332ad43ddacSmrg	# support --undefined.  This deserves some investigation.  FIXME
4333ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4334ad43ddacSmrg      else
4335ad43ddacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4336ad43ddacSmrg      fi
4337ad43ddacSmrg      ;;
4338209ff23fSmrg
43392f39173dSmrg    cygwin* | mingw* | pw32* | cegcc*)
4340ad43ddacSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4341ad43ddacSmrg      # as there is no search path for DLLs.
4342ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4343ad43ddacSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4344ad43ddacSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
4345ad43ddacSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4346ad43ddacSmrg      _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'
4347ad43ddacSmrg
4348ad43ddacSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4349ad43ddacSmrg        _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'
4350ad43ddacSmrg	# If the export-symbols file already is a .def file (1st line
4351ad43ddacSmrg	# is EXPORTS), use it as is; otherwise, prepend...
4352ad43ddacSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4353ad43ddacSmrg	  cp $export_symbols $output_objdir/$soname.def;
4354ad43ddacSmrg	else
4355ad43ddacSmrg	  echo EXPORTS > $output_objdir/$soname.def;
4356ad43ddacSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
4357ad43ddacSmrg	fi~
4358ad43ddacSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4359ad43ddacSmrg      else
4360ad43ddacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4361ad43ddacSmrg      fi
4362ad43ddacSmrg      ;;
4363209ff23fSmrg
4364ad43ddacSmrg    interix[[3-9]]*)
4365ad43ddacSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
4366ad43ddacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4367ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4368ad43ddacSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4369ad43ddacSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4370ad43ddacSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
4371ad43ddacSmrg      # default) and relocated if they conflict, which is a slow very memory
4372ad43ddacSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
4373ad43ddacSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4374ad43ddacSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4375ad43ddacSmrg      _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'
4376ad43ddacSmrg      _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'
4377ad43ddacSmrg      ;;
4378209ff23fSmrg
4379ad43ddacSmrg    gnu* | linux* | tpf* | k*bsd*-gnu)
4380ad43ddacSmrg      tmp_diet=no
4381ad43ddacSmrg      if test "$host_os" = linux-dietlibc; then
4382ad43ddacSmrg	case $cc_basename in
4383ad43ddacSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
4384ad43ddacSmrg	esac
4385ad43ddacSmrg      fi
4386ad43ddacSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4387ad43ddacSmrg	 && test "$tmp_diet" = no
4388ad43ddacSmrg      then
4389ad43ddacSmrg	tmp_addflag=
4390ad43ddacSmrg	tmp_sharedflag='-shared'
4391ad43ddacSmrg	case $cc_basename,$host_cpu in
4392ad43ddacSmrg        pgcc*)				# Portland Group C compiler
4393ad43ddacSmrg	  _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'
4394ad43ddacSmrg	  tmp_addflag=' $pic_flag'
4395ad43ddacSmrg	  ;;
4396ad43ddacSmrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
4397ad43ddacSmrg	  _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'
4398ad43ddacSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
4399ad43ddacSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
4400ad43ddacSmrg	  tmp_addflag=' -i_dynamic' ;;
4401ad43ddacSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
4402ad43ddacSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
4403ad43ddacSmrg	ifc* | ifort*)			# Intel Fortran compiler
4404ad43ddacSmrg	  tmp_addflag=' -nofor_main' ;;
44052f39173dSmrg	lf95*)				# Lahey Fortran 8.1
44062f39173dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
44072f39173dSmrg	  tmp_sharedflag='--shared' ;;
4408ad43ddacSmrg	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
4409ad43ddacSmrg	  tmp_sharedflag='-qmkshrobj'
4410ad43ddacSmrg	  tmp_addflag= ;;
4411ad43ddacSmrg	esac
4412ad43ddacSmrg	case `$CC -V 2>&1 | sed 5q` in
4413ad43ddacSmrg	*Sun\ C*)			# Sun C 5.9
4414ad43ddacSmrg	  _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'
4415ad43ddacSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4416ad43ddacSmrg	  tmp_sharedflag='-G' ;;
4417ad43ddacSmrg	*Sun\ F*)			# Sun Fortran 8.3
4418ad43ddacSmrg	  tmp_sharedflag='-G' ;;
4419ad43ddacSmrg	esac
4420ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4421209ff23fSmrg
4422ad43ddacSmrg        if test "x$supports_anon_versioning" = xyes; then
4423ad43ddacSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4424ad43ddacSmrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4425ad43ddacSmrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
4426ad43ddacSmrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4427ad43ddacSmrg        fi
4428209ff23fSmrg
4429ad43ddacSmrg	case $cc_basename in
4430ad43ddacSmrg	xlf*)
4431ad43ddacSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4432ad43ddacSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4433ad43ddacSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4434ad43ddacSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4435ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4436ad43ddacSmrg	  if test "x$supports_anon_versioning" = xyes; then
4437ad43ddacSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4438ad43ddacSmrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4439ad43ddacSmrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
4440ad43ddacSmrg	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4441ad43ddacSmrg	  fi
4442ad43ddacSmrg	  ;;
4443ad43ddacSmrg	esac
4444ad43ddacSmrg      else
4445ad43ddacSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
4446ad43ddacSmrg      fi
4447ad43ddacSmrg      ;;
4448209ff23fSmrg
44492f39173dSmrg    netbsd*)
4450ad43ddacSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4451ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4452ad43ddacSmrg	wlarc=
4453ad43ddacSmrg      else
4454ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4455ad43ddacSmrg	_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'
4456ad43ddacSmrg      fi
4457ad43ddacSmrg      ;;
4458209ff23fSmrg
4459ad43ddacSmrg    solaris*)
4460ad43ddacSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4461ad43ddacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4462ad43ddacSmrg	cat <<_LT_EOF 1>&2
4463209ff23fSmrg
4464ad43ddacSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4465ad43ddacSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
4466ad43ddacSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
4467ad43ddacSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
4468ad43ddacSmrg*** your PATH or compiler configuration so that the native linker is
4469ad43ddacSmrg*** used, and then restart.
4470209ff23fSmrg
4471ad43ddacSmrg_LT_EOF
4472ad43ddacSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4473ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4474ad43ddacSmrg	_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'
4475ad43ddacSmrg      else
4476ad43ddacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4477ad43ddacSmrg      fi
4478ad43ddacSmrg      ;;
4479209ff23fSmrg
4480ad43ddacSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4481ad43ddacSmrg      case `$LD -v 2>&1` in
4482ad43ddacSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4483ad43ddacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4484ad43ddacSmrg	cat <<_LT_EOF 1>&2
4485209ff23fSmrg
4486ad43ddacSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4487ad43ddacSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
4488ad43ddacSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
4489ad43ddacSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
4490ad43ddacSmrg*** your PATH or compiler configuration so that the native linker is
4491ad43ddacSmrg*** used, and then restart.
4492209ff23fSmrg
4493ad43ddacSmrg_LT_EOF
4494ad43ddacSmrg	;;
4495ad43ddacSmrg	*)
4496ad43ddacSmrg	  # For security reasons, it is highly recommended that you always
4497ad43ddacSmrg	  # use absolute paths for naming shared libraries, and exclude the
4498ad43ddacSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
4499ad43ddacSmrg	  # requires that you compile everything twice, which is a pain.
4500ad43ddacSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4501ad43ddacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4502ad43ddacSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4503ad43ddacSmrg	    _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'
4504ad43ddacSmrg	  else
4505ad43ddacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
4506ad43ddacSmrg	  fi
4507ad43ddacSmrg	;;
4508ad43ddacSmrg      esac
4509ad43ddacSmrg      ;;
4510209ff23fSmrg
4511ad43ddacSmrg    sunos4*)
4512ad43ddacSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4513ad43ddacSmrg      wlarc=
4514ad43ddacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4515ad43ddacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4516ad43ddacSmrg      ;;
4517209ff23fSmrg
4518ad43ddacSmrg    *)
4519ad43ddacSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4520ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4521ad43ddacSmrg	_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'
4522ad43ddacSmrg      else
4523ad43ddacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4524ad43ddacSmrg      fi
4525ad43ddacSmrg      ;;
4526ad43ddacSmrg    esac
4527209ff23fSmrg
4528ad43ddacSmrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4529ad43ddacSmrg      runpath_var=
4530ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4531ad43ddacSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4532ad43ddacSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4533ad43ddacSmrg    fi
4534ad43ddacSmrg  else
4535ad43ddacSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
4536ad43ddacSmrg    case $host_os in
4537ad43ddacSmrg    aix3*)
4538ad43ddacSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4539ad43ddacSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
4540ad43ddacSmrg      _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'
4541ad43ddacSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
4542ad43ddacSmrg      # are no directories specified by -L.
4543ad43ddacSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4544ad43ddacSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4545ad43ddacSmrg	# Neither direct hardcoding nor static linking is supported with a
4546ad43ddacSmrg	# broken collect2.
4547ad43ddacSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
4548ad43ddacSmrg      fi
4549ad43ddacSmrg      ;;
4550209ff23fSmrg
4551ad43ddacSmrg    aix[[4-9]]*)
4552ad43ddacSmrg      if test "$host_cpu" = ia64; then
4553ad43ddacSmrg	# On IA64, the linker does run time linking by default, so we don't
4554ad43ddacSmrg	# have to do anything special.
4555ad43ddacSmrg	aix_use_runtimelinking=no
4556ad43ddacSmrg	exp_sym_flag='-Bexport'
4557ad43ddacSmrg	no_entry_flag=""
4558ad43ddacSmrg      else
4559ad43ddacSmrg	# If we're using GNU nm, then we don't want the "-C" option.
4560ad43ddacSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
4561ad43ddacSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4562ad43ddacSmrg	  _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'
4563ad43ddacSmrg	else
4564ad43ddacSmrg	  _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'
4565ad43ddacSmrg	fi
4566ad43ddacSmrg	aix_use_runtimelinking=no
4567209ff23fSmrg
4568ad43ddacSmrg	# Test if we are trying to use run time linking or normal
4569ad43ddacSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
4570ad43ddacSmrg	# need to do runtime linking.
4571ad43ddacSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4572ad43ddacSmrg	  for ld_flag in $LDFLAGS; do
4573ad43ddacSmrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4574ad43ddacSmrg	    aix_use_runtimelinking=yes
4575ad43ddacSmrg	    break
4576ad43ddacSmrg	  fi
4577ad43ddacSmrg	  done
4578ad43ddacSmrg	  ;;
4579ad43ddacSmrg	esac
4580209ff23fSmrg
4581ad43ddacSmrg	exp_sym_flag='-bexport'
4582ad43ddacSmrg	no_entry_flag='-bnoentry'
4583ad43ddacSmrg      fi
4584209ff23fSmrg
4585ad43ddacSmrg      # When large executables or shared objects are built, AIX ld can
4586ad43ddacSmrg      # have problems creating the table of contents.  If linking a library
4587ad43ddacSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
4588ad43ddacSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4589ad43ddacSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4590209ff23fSmrg
4591ad43ddacSmrg      _LT_TAGVAR(archive_cmds, $1)=''
4592ad43ddacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4593ad43ddacSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4594ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4595ad43ddacSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4596ad43ddacSmrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4597209ff23fSmrg
4598ad43ddacSmrg      if test "$GCC" = yes; then
4599ad43ddacSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
4600ad43ddacSmrg	# We only want to do this on AIX 4.2 and lower, the check
4601ad43ddacSmrg	# below for broken collect2 doesn't work under 4.3+
4602ad43ddacSmrg	  collect2name=`${CC} -print-prog-name=collect2`
4603ad43ddacSmrg	  if test -f "$collect2name" &&
4604ad43ddacSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4605ad43ddacSmrg	  then
4606ad43ddacSmrg	  # We have reworked collect2
4607ad43ddacSmrg	  :
4608ad43ddacSmrg	  else
4609ad43ddacSmrg	  # We have old collect2
4610ad43ddacSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
4611ad43ddacSmrg	  # It fails to find uninstalled libraries when the uninstalled
4612ad43ddacSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
4613ad43ddacSmrg	  # to unsupported forces relinking
4614ad43ddacSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4615ad43ddacSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4616ad43ddacSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4617ad43ddacSmrg	  fi
4618ad43ddacSmrg	  ;;
4619ad43ddacSmrg	esac
4620ad43ddacSmrg	shared_flag='-shared'
4621ad43ddacSmrg	if test "$aix_use_runtimelinking" = yes; then
4622ad43ddacSmrg	  shared_flag="$shared_flag "'${wl}-G'
4623ad43ddacSmrg	fi
4624ad43ddacSmrg      else
4625ad43ddacSmrg	# not using gcc
4626ad43ddacSmrg	if test "$host_cpu" = ia64; then
4627ad43ddacSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4628ad43ddacSmrg	# chokes on -Wl,-G. The following line is correct:
4629ad43ddacSmrg	  shared_flag='-G'
4630ad43ddacSmrg	else
4631ad43ddacSmrg	  if test "$aix_use_runtimelinking" = yes; then
4632ad43ddacSmrg	    shared_flag='${wl}-G'
4633ad43ddacSmrg	  else
4634ad43ddacSmrg	    shared_flag='${wl}-bM:SRE'
4635ad43ddacSmrg	  fi
4636ad43ddacSmrg	fi
4637ad43ddacSmrg      fi
4638209ff23fSmrg
46392f39173dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4640ad43ddacSmrg      # It seems that -bexpall does not export symbols beginning with
4641ad43ddacSmrg      # underscore (_), so it is better to generate a list of symbols to export.
4642ad43ddacSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
4643ad43ddacSmrg      if test "$aix_use_runtimelinking" = yes; then
4644ad43ddacSmrg	# Warning - without using the other runtime loading flags (-brtl),
4645ad43ddacSmrg	# -berok will link without error, but may produce a broken library.
4646ad43ddacSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4647ad43ddacSmrg        # Determine the default libpath from the value encoded in an
4648ad43ddacSmrg        # empty executable.
4649ad43ddacSmrg        _LT_SYS_MODULE_PATH_AIX
4650ad43ddacSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4651ad43ddacSmrg        _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"
4652ad43ddacSmrg      else
4653ad43ddacSmrg	if test "$host_cpu" = ia64; then
4654ad43ddacSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4655ad43ddacSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4656ad43ddacSmrg	  _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"
4657ad43ddacSmrg	else
4658ad43ddacSmrg	 # Determine the default libpath from the value encoded in an
4659ad43ddacSmrg	 # empty executable.
4660ad43ddacSmrg	 _LT_SYS_MODULE_PATH_AIX
4661ad43ddacSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4662ad43ddacSmrg	  # Warning - without using the other run time loading flags,
4663ad43ddacSmrg	  # -berok will link without error, but may produce a broken library.
4664ad43ddacSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4665ad43ddacSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4666ad43ddacSmrg	  # Exported symbols can be pulled into shared objects from archives
4667ad43ddacSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4668ad43ddacSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4669ad43ddacSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
4670ad43ddacSmrg	  _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'
4671ad43ddacSmrg	fi
4672ad43ddacSmrg      fi
4673ad43ddacSmrg      ;;
4674209ff23fSmrg
4675ad43ddacSmrg    amigaos*)
4676ad43ddacSmrg      case $host_cpu in
4677ad43ddacSmrg      powerpc)
4678ad43ddacSmrg            # see comment about AmigaOS4 .so support
4679ad43ddacSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4680ad43ddacSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4681ad43ddacSmrg        ;;
4682ad43ddacSmrg      m68k)
4683ad43ddacSmrg            _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)'
4684ad43ddacSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4685ad43ddacSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4686ad43ddacSmrg        ;;
4687ad43ddacSmrg      esac
4688ad43ddacSmrg      ;;
4689209ff23fSmrg
4690ad43ddacSmrg    bsdi[[45]]*)
4691ad43ddacSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4692ad43ddacSmrg      ;;
4693209ff23fSmrg
46942f39173dSmrg    cygwin* | mingw* | pw32* | cegcc*)
4695ad43ddacSmrg      # When not using gcc, we currently assume that we are using
4696ad43ddacSmrg      # Microsoft Visual C++.
4697ad43ddacSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
4698ad43ddacSmrg      # no search path for DLLs.
4699ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4700ad43ddacSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4701ad43ddacSmrg      # Tell ltmain to make .lib files, not .a files.
4702ad43ddacSmrg      libext=lib
4703ad43ddacSmrg      # Tell ltmain to make .dll files, not .so files.
4704ad43ddacSmrg      shrext_cmds=".dll"
4705ad43ddacSmrg      # FIXME: Setting linknames here is a bad hack.
4706ad43ddacSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4707ad43ddacSmrg      # The linker will automatically build a .lib file if we build a DLL.
4708ad43ddacSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4709ad43ddacSmrg      # FIXME: Should let the user specify the lib program.
4710ad43ddacSmrg      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4711ad43ddacSmrg      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4712ad43ddacSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4713ad43ddacSmrg      ;;
4714209ff23fSmrg
4715ad43ddacSmrg    darwin* | rhapsody*)
4716ad43ddacSmrg      _LT_DARWIN_LINKER_FEATURES($1)
4717ad43ddacSmrg      ;;
4718209ff23fSmrg
4719ad43ddacSmrg    dgux*)
4720ad43ddacSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4721ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4722ad43ddacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4723ad43ddacSmrg      ;;
4724209ff23fSmrg
4725ad43ddacSmrg    freebsd1*)
4726ad43ddacSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
4727ad43ddacSmrg      ;;
4728209ff23fSmrg
4729ad43ddacSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4730ad43ddacSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
4731ad43ddacSmrg    # does not break anything, and helps significantly (at the cost of a little
4732ad43ddacSmrg    # extra space).
4733ad43ddacSmrg    freebsd2.2*)
4734ad43ddacSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4735ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4736ad43ddacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4737ad43ddacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4738ad43ddacSmrg      ;;
4739209ff23fSmrg
4740ad43ddacSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4741ad43ddacSmrg    freebsd2*)
4742ad43ddacSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4743ad43ddacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4744ad43ddacSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4745ad43ddacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4746ad43ddacSmrg      ;;
4747209ff23fSmrg
4748ad43ddacSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4749ad43ddacSmrg    freebsd* | dragonfly*)
4750ad43ddacSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4751ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4752ad43ddacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4753ad43ddacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4754ad43ddacSmrg      ;;
4755209ff23fSmrg
4756ad43ddacSmrg    hpux9*)
4757ad43ddacSmrg      if test "$GCC" = yes; then
4758ad43ddacSmrg	_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'
4759ad43ddacSmrg      else
4760ad43ddacSmrg	_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'
4761ad43ddacSmrg      fi
4762ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4763ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4764ad43ddacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4765209ff23fSmrg
4766ad43ddacSmrg      # hardcode_minus_L: Not really in the search PATH,
4767ad43ddacSmrg      # but as the default location of the library.
4768ad43ddacSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4769ad43ddacSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4770ad43ddacSmrg      ;;
4771209ff23fSmrg
4772ad43ddacSmrg    hpux10*)
4773ad43ddacSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4774ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4775ad43ddacSmrg      else
4776ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4777ad43ddacSmrg      fi
4778ad43ddacSmrg      if test "$with_gnu_ld" = no; then
4779ad43ddacSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4780ad43ddacSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4781ad43ddacSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
4782ad43ddacSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
4783ad43ddacSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4784ad43ddacSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4785ad43ddacSmrg	# hardcode_minus_L: Not really in the search PATH,
4786ad43ddacSmrg	# but as the default location of the library.
4787ad43ddacSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
4788ad43ddacSmrg      fi
4789ad43ddacSmrg      ;;
4790209ff23fSmrg
4791ad43ddacSmrg    hpux11*)
4792ad43ddacSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4793ad43ddacSmrg	case $host_cpu in
4794ad43ddacSmrg	hppa*64*)
4795ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4796ad43ddacSmrg	  ;;
4797ad43ddacSmrg	ia64*)
47982f39173dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4799ad43ddacSmrg	  ;;
4800ad43ddacSmrg	*)
4801ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4802ad43ddacSmrg	  ;;
4803ad43ddacSmrg	esac
4804ad43ddacSmrg      else
4805ad43ddacSmrg	case $host_cpu in
4806ad43ddacSmrg	hppa*64*)
4807ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4808ad43ddacSmrg	  ;;
4809ad43ddacSmrg	ia64*)
4810ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4811ad43ddacSmrg	  ;;
4812ad43ddacSmrg	*)
4813ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4814ad43ddacSmrg	  ;;
4815ad43ddacSmrg	esac
4816ad43ddacSmrg      fi
4817ad43ddacSmrg      if test "$with_gnu_ld" = no; then
4818ad43ddacSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4819ad43ddacSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
4820209ff23fSmrg
4821ad43ddacSmrg	case $host_cpu in
4822ad43ddacSmrg	hppa*64*|ia64*)
4823ad43ddacSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
4824ad43ddacSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4825ad43ddacSmrg	  ;;
4826ad43ddacSmrg	*)
4827ad43ddacSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
4828ad43ddacSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4829ad43ddacSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4830209ff23fSmrg
4831ad43ddacSmrg	  # hardcode_minus_L: Not really in the search PATH,
4832ad43ddacSmrg	  # but as the default location of the library.
4833ad43ddacSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4834ad43ddacSmrg	  ;;
4835ad43ddacSmrg	esac
4836ad43ddacSmrg      fi
4837209ff23fSmrg      ;;
4838209ff23fSmrg
4839ad43ddacSmrg    irix5* | irix6* | nonstopux*)
4840ad43ddacSmrg      if test "$GCC" = yes; then
4841ad43ddacSmrg	_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'
4842ad43ddacSmrg	# Try to use the -exported_symbol ld option, if it does not
4843ad43ddacSmrg	# work, assume that -exports_file does not work either and
4844ad43ddacSmrg	# implicitly export all symbols.
4845ad43ddacSmrg        save_LDFLAGS="$LDFLAGS"
4846ad43ddacSmrg        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4847ad43ddacSmrg        AC_LINK_IFELSE(int foo(void) {},
4848ad43ddacSmrg          _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'
4849ad43ddacSmrg        )
4850ad43ddacSmrg        LDFLAGS="$save_LDFLAGS"
4851ad43ddacSmrg      else
4852ad43ddacSmrg	_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'
4853ad43ddacSmrg	_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'
4854ad43ddacSmrg      fi
4855ad43ddacSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4856ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4857ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4858ad43ddacSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
4859ad43ddacSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4860ad43ddacSmrg      ;;
4861209ff23fSmrg
48622f39173dSmrg    netbsd*)
4863ad43ddacSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4864ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
4865ad43ddacSmrg      else
4866ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
4867ad43ddacSmrg      fi
4868ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4869ad43ddacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4870ad43ddacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4871ad43ddacSmrg      ;;
4872209ff23fSmrg
4873ad43ddacSmrg    newsos6)
4874ad43ddacSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4875ad43ddacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4876ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4877ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4878ad43ddacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4879ad43ddacSmrg      ;;
4880209ff23fSmrg
4881ad43ddacSmrg    *nto* | *qnx*)
4882ad43ddacSmrg      ;;
4883209ff23fSmrg
4884ad43ddacSmrg    openbsd*)
4885ad43ddacSmrg      if test -f /usr/libexec/ld.so; then
4886ad43ddacSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
4887ad43ddacSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4888ad43ddacSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4889ad43ddacSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4890ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4891ad43ddacSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4892ad43ddacSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4893ad43ddacSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4894ad43ddacSmrg	else
4895ad43ddacSmrg	  case $host_os in
4896ad43ddacSmrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4897ad43ddacSmrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4898ad43ddacSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4899ad43ddacSmrg	     ;;
4900ad43ddacSmrg	   *)
4901ad43ddacSmrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4902ad43ddacSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4903ad43ddacSmrg	     ;;
4904ad43ddacSmrg	  esac
4905ad43ddacSmrg	fi
4906ad43ddacSmrg      else
4907ad43ddacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4908ad43ddacSmrg      fi
4909ad43ddacSmrg      ;;
4910209ff23fSmrg
4911ad43ddacSmrg    os2*)
4912ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4913ad43ddacSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4914ad43ddacSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4915ad43ddacSmrg      _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'
4916ad43ddacSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4917ad43ddacSmrg      ;;
4918209ff23fSmrg
4919ad43ddacSmrg    osf3*)
4920ad43ddacSmrg      if test "$GCC" = yes; then
4921ad43ddacSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4922ad43ddacSmrg	_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'
4923ad43ddacSmrg      else
4924ad43ddacSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4925ad43ddacSmrg	_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'
4926ad43ddacSmrg      fi
4927ad43ddacSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4928ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4929ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4930ad43ddacSmrg      ;;
4931209ff23fSmrg
4932ad43ddacSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
4933ad43ddacSmrg      if test "$GCC" = yes; then
4934ad43ddacSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4935ad43ddacSmrg	_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'
4936ad43ddacSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4937ad43ddacSmrg      else
4938ad43ddacSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4939ad43ddacSmrg	_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'
4940ad43ddacSmrg	_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~
4941ad43ddacSmrg	$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'
4942209ff23fSmrg
4943ad43ddacSmrg	# Both c and cxx compiler support -rpath directly
4944ad43ddacSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4945ad43ddacSmrg      fi
4946ad43ddacSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4947ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4948ad43ddacSmrg      ;;
4949209ff23fSmrg
4950ad43ddacSmrg    solaris*)
4951ad43ddacSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4952ad43ddacSmrg      if test "$GCC" = yes; then
4953ad43ddacSmrg	wlarc='${wl}'
4954ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4955ad43ddacSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4956ad43ddacSmrg	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4957ad43ddacSmrg      else
4958ad43ddacSmrg	case `$CC -V 2>&1` in
4959ad43ddacSmrg	*"Compilers 5.0"*)
4960ad43ddacSmrg	  wlarc=''
4961ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4962ad43ddacSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4963ad43ddacSmrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4964ad43ddacSmrg	  ;;
4965ad43ddacSmrg	*)
4966ad43ddacSmrg	  wlarc='${wl}'
4967ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4968ad43ddacSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4969ad43ddacSmrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4970ad43ddacSmrg	  ;;
4971ad43ddacSmrg	esac
4972ad43ddacSmrg      fi
4973ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4974ad43ddacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4975ad43ddacSmrg      case $host_os in
4976ad43ddacSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4977ad43ddacSmrg      *)
4978ad43ddacSmrg	# The compiler driver will combine and reorder linker options,
4979ad43ddacSmrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
4980ad43ddacSmrg	# but is careful enough not to reorder.
4981ad43ddacSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
4982ad43ddacSmrg	if test "$GCC" = yes; then
4983ad43ddacSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4984ad43ddacSmrg	else
4985ad43ddacSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4986ad43ddacSmrg	fi
4987ad43ddacSmrg	;;
4988ad43ddacSmrg      esac
4989ad43ddacSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4990ad43ddacSmrg      ;;
4991209ff23fSmrg
4992ad43ddacSmrg    sunos4*)
4993ad43ddacSmrg      if test "x$host_vendor" = xsequent; then
4994ad43ddacSmrg	# Use $CC to link under sequent, because it throws in some extra .o
4995ad43ddacSmrg	# files that make .init and .fini sections work.
4996ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4997ad43ddacSmrg      else
4998ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4999ad43ddacSmrg      fi
5000ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5001ad43ddacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5002ad43ddacSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5003ad43ddacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5004ad43ddacSmrg      ;;
5005209ff23fSmrg
5006ad43ddacSmrg    sysv4)
5007ad43ddacSmrg      case $host_vendor in
5008ad43ddacSmrg	sni)
5009ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5010ad43ddacSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5011ad43ddacSmrg	;;
5012ad43ddacSmrg	siemens)
5013ad43ddacSmrg	  ## LD is ld it makes a PLAMLIB
5014ad43ddacSmrg	  ## CC just makes a GrossModule.
5015ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5016ad43ddacSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5017ad43ddacSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
5018ad43ddacSmrg        ;;
5019ad43ddacSmrg	motorola)
5020ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5021ad43ddacSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5022ad43ddacSmrg	;;
5023ad43ddacSmrg      esac
5024ad43ddacSmrg      runpath_var='LD_RUN_PATH'
5025ad43ddacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5026ad43ddacSmrg      ;;
5027209ff23fSmrg
5028ad43ddacSmrg    sysv4.3*)
5029ad43ddacSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5030ad43ddacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5031ad43ddacSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5032ad43ddacSmrg      ;;
5033209ff23fSmrg
5034ad43ddacSmrg    sysv4*MP*)
5035ad43ddacSmrg      if test -d /usr/nec; then
5036ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5037ad43ddacSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5038ad43ddacSmrg	runpath_var=LD_RUN_PATH
5039ad43ddacSmrg	hardcode_runpath_var=yes
5040ad43ddacSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
5041ad43ddacSmrg      fi
5042ad43ddacSmrg      ;;
5043209ff23fSmrg
5044ad43ddacSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5045ad43ddacSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5046ad43ddacSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5047ad43ddacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5048ad43ddacSmrg      runpath_var='LD_RUN_PATH'
5049209ff23fSmrg
5050ad43ddacSmrg      if test "$GCC" = yes; then
5051ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5052ad43ddacSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5053ad43ddacSmrg      else
5054ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5055ad43ddacSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5056ad43ddacSmrg      fi
5057ad43ddacSmrg      ;;
5058209ff23fSmrg
5059ad43ddacSmrg    sysv5* | sco3.2v5* | sco5v6*)
5060ad43ddacSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
5061ad43ddacSmrg      # link with -lc, and that would cause any symbols used from libc to
5062ad43ddacSmrg      # always be unresolved, which means just about no library would
5063ad43ddacSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
5064ad43ddacSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
5065ad43ddacSmrg      # as -z defs.
5066ad43ddacSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5067ad43ddacSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5068ad43ddacSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5069ad43ddacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5070ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5071ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5072ad43ddacSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5073ad43ddacSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5074ad43ddacSmrg      runpath_var='LD_RUN_PATH'
5075209ff23fSmrg
5076ad43ddacSmrg      if test "$GCC" = yes; then
5077ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5078ad43ddacSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5079ad43ddacSmrg      else
5080ad43ddacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5081ad43ddacSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5082ad43ddacSmrg      fi
5083ad43ddacSmrg      ;;
5084209ff23fSmrg
5085ad43ddacSmrg    uts4*)
5086ad43ddacSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5087ad43ddacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5088ad43ddacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5089ad43ddacSmrg      ;;
5090209ff23fSmrg
5091ad43ddacSmrg    *)
5092ad43ddacSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
5093ad43ddacSmrg      ;;
5094ad43ddacSmrg    esac
5095209ff23fSmrg
5096ad43ddacSmrg    if test x$host_vendor = xsni; then
5097ad43ddacSmrg      case $host in
5098ad43ddacSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5099ad43ddacSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5100ad43ddacSmrg	;;
5101ad43ddacSmrg      esac
5102ad43ddacSmrg    fi
5103ad43ddacSmrg  fi
5104ad43ddacSmrg])
5105ad43ddacSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5106ad43ddacSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5107209ff23fSmrg
5108ad43ddacSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5109209ff23fSmrg
5110ad43ddacSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5111ad43ddacSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5112ad43ddacSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
5113ad43ddacSmrg    [The commands to extract the exported symbol list from a shared archive])
5114209ff23fSmrg
5115ad43ddacSmrg#
5116ad43ddacSmrg# Do we need to explicitly link libc?
5117ad43ddacSmrg#
5118ad43ddacSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5119ad43ddacSmrgx|xyes)
5120ad43ddacSmrg  # Assume -lc should be added
5121ad43ddacSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5122209ff23fSmrg
5123ad43ddacSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
5124ad43ddacSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
5125ad43ddacSmrg    *'~'*)
5126ad43ddacSmrg      # FIXME: we may have to deal with multi-command sequences.
5127ad43ddacSmrg      ;;
5128ad43ddacSmrg    '$CC '*)
5129ad43ddacSmrg      # Test whether the compiler implicitly links with -lc since on some
5130ad43ddacSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5131ad43ddacSmrg      # to ld, don't add -lc before -lgcc.
5132ad43ddacSmrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5133ad43ddacSmrg      $RM conftest*
5134ad43ddacSmrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5135209ff23fSmrg
5136ad43ddacSmrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5137ad43ddacSmrg        soname=conftest
5138ad43ddacSmrg        lib=conftest
5139ad43ddacSmrg        libobjs=conftest.$ac_objext
5140ad43ddacSmrg        deplibs=
5141ad43ddacSmrg        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5142ad43ddacSmrg	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5143ad43ddacSmrg        compiler_flags=-v
5144ad43ddacSmrg        linker_flags=-v
5145ad43ddacSmrg        verstring=
5146ad43ddacSmrg        output_objdir=.
5147ad43ddacSmrg        libname=conftest
5148ad43ddacSmrg        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5149ad43ddacSmrg        _LT_TAGVAR(allow_undefined_flag, $1)=
5150ad43ddacSmrg        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5151ad43ddacSmrg        then
5152ad43ddacSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5153ad43ddacSmrg        else
5154ad43ddacSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5155ad43ddacSmrg        fi
5156ad43ddacSmrg        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5157ad43ddacSmrg      else
5158ad43ddacSmrg        cat conftest.err 1>&5
5159ad43ddacSmrg      fi
5160ad43ddacSmrg      $RM conftest*
5161ad43ddacSmrg      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5162ad43ddacSmrg      ;;
5163ad43ddacSmrg    esac
5164ad43ddacSmrg  fi
5165ad43ddacSmrg  ;;
5166ad43ddacSmrgesac
5167209ff23fSmrg
5168ad43ddacSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5169ad43ddacSmrg    [Whether or not to add -lc for building shared libraries])
5170ad43ddacSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5171ad43ddacSmrg    [enable_shared_with_static_runtimes], [0],
5172ad43ddacSmrg    [Whether or not to disallow shared libs when runtime libs are static])
5173ad43ddacSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5174ad43ddacSmrg    [Compiler flag to allow reflexive dlopens])
5175ad43ddacSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5176ad43ddacSmrg    [Compiler flag to generate shared objects directly from archives])
5177ad43ddacSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
5178ad43ddacSmrg    [Whether the compiler copes with passing no objects directly])
5179ad43ddacSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5180ad43ddacSmrg    [Create an old-style archive from a shared archive])
5181ad43ddacSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5182ad43ddacSmrg    [Create a temporary old-style archive to link instead of a shared archive])
5183ad43ddacSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5184ad43ddacSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
5185ad43ddacSmrg_LT_TAGDECL([], [module_cmds], [2],
5186ad43ddacSmrg    [Commands used to build a loadable module if different from building
5187ad43ddacSmrg    a shared archive.])
5188ad43ddacSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
5189ad43ddacSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
5190ad43ddacSmrg    [Whether we are building with GNU ld or not])
5191ad43ddacSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
5192ad43ddacSmrg    [Flag that allows shared libraries with undefined symbols to be built])
5193ad43ddacSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
5194ad43ddacSmrg    [Flag that enforces no undefined symbols])
5195ad43ddacSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5196ad43ddacSmrg    [Flag to hardcode $libdir into a binary during linking.
5197ad43ddacSmrg    This must work even if $libdir does not exist])
5198ad43ddacSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5199ad43ddacSmrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
5200ad43ddacSmrg    during linking.  This must work even if $libdir does not exist]])
5201ad43ddacSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5202ad43ddacSmrg    [Whether we need a single "-rpath" flag with a separated argument])
5203ad43ddacSmrg_LT_TAGDECL([], [hardcode_direct], [0],
5204ad43ddacSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5205ad43ddacSmrg    DIR into the resulting binary])
5206ad43ddacSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5207ad43ddacSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5208ad43ddacSmrg    DIR into the resulting binary and the resulting library dependency is
5209ad43ddacSmrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5210ad43ddacSmrg    library is relocated])
5211ad43ddacSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
5212ad43ddacSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5213ad43ddacSmrg    into the resulting binary])
5214ad43ddacSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5215ad43ddacSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5216ad43ddacSmrg    into the resulting binary])
5217ad43ddacSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
5218ad43ddacSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
5219ad43ddacSmrg    into the library and all subsequent libraries and executables linked
5220ad43ddacSmrg    against it])
5221ad43ddacSmrg_LT_TAGDECL([], [inherit_rpath], [0],
5222ad43ddacSmrg    [Set to yes if linker adds runtime paths of dependent libraries
5223ad43ddacSmrg    to runtime path list])
5224ad43ddacSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
5225ad43ddacSmrg    [Whether libtool must link a program against all its dependency libraries])
5226ad43ddacSmrg_LT_TAGDECL([], [fix_srcfile_path], [1],
5227ad43ddacSmrg    [Fix the shell variable $srcfile for the compiler])
5228ad43ddacSmrg_LT_TAGDECL([], [always_export_symbols], [0],
5229ad43ddacSmrg    [Set to "yes" if exported symbols are required])
5230ad43ddacSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
5231ad43ddacSmrg    [The commands to list exported symbols])
5232ad43ddacSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
5233ad43ddacSmrg    [Symbols that should not be listed in the preloaded symbols])
5234ad43ddacSmrg_LT_TAGDECL([], [include_expsyms], [1],
5235ad43ddacSmrg    [Symbols that must always be exported])
5236ad43ddacSmrg_LT_TAGDECL([], [prelink_cmds], [2],
5237ad43ddacSmrg    [Commands necessary for linking programs (against libraries) with templates])
5238ad43ddacSmrg_LT_TAGDECL([], [file_list_spec], [1],
5239ad43ddacSmrg    [Specify filename containing input files])
5240ad43ddacSmrgdnl FIXME: Not yet implemented
5241ad43ddacSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5242ad43ddacSmrgdnl    [Compiler flag to generate thread safe objects])
5243ad43ddacSmrg])# _LT_LINKER_SHLIBS
5244ad43ddacSmrg
5245ad43ddacSmrg
5246ad43ddacSmrg# _LT_LANG_C_CONFIG([TAG])
5247ad43ddacSmrg# ------------------------
5248ad43ddacSmrg# Ensure that the configuration variables for a C compiler are suitably
5249ad43ddacSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
5250ad43ddacSmrg# the compiler configuration to `libtool'.
5251ad43ddacSmrgm4_defun([_LT_LANG_C_CONFIG],
5252ad43ddacSmrg[m4_require([_LT_DECL_EGREP])dnl
5253ad43ddacSmrglt_save_CC="$CC"
5254ad43ddacSmrgAC_LANG_PUSH(C)
5255209ff23fSmrg
5256ad43ddacSmrg# Source file extension for C test sources.
5257ad43ddacSmrgac_ext=c
5258209ff23fSmrg
5259ad43ddacSmrg# Object file extension for compiled C test sources.
5260ad43ddacSmrgobjext=o
5261ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext
5262209ff23fSmrg
5263ad43ddacSmrg# Code to be used in simple compile tests
5264ad43ddacSmrglt_simple_compile_test_code="int some_variable = 0;"
5265209ff23fSmrg
5266ad43ddacSmrg# Code to be used in simple link tests
5267ad43ddacSmrglt_simple_link_test_code='int main(){return(0);}'
5268209ff23fSmrg
5269ad43ddacSmrg_LT_TAG_COMPILER
5270ad43ddacSmrg# Save the default compiler, since it gets overwritten when the other
5271ad43ddacSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5272ad43ddacSmrgcompiler_DEFAULT=$CC
5273209ff23fSmrg
5274ad43ddacSmrg# save warnings/boilerplate of simple test code
5275ad43ddacSmrg_LT_COMPILER_BOILERPLATE
5276ad43ddacSmrg_LT_LINKER_BOILERPLATE
5277209ff23fSmrg
5278ad43ddacSmrgif test -n "$compiler"; then
5279ad43ddacSmrg  _LT_COMPILER_NO_RTTI($1)
5280ad43ddacSmrg  _LT_COMPILER_PIC($1)
5281ad43ddacSmrg  _LT_COMPILER_C_O($1)
5282ad43ddacSmrg  _LT_COMPILER_FILE_LOCKS($1)
5283ad43ddacSmrg  _LT_LINKER_SHLIBS($1)
5284ad43ddacSmrg  _LT_SYS_DYNAMIC_LINKER($1)
5285ad43ddacSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
5286ad43ddacSmrg  LT_SYS_DLOPEN_SELF
5287ad43ddacSmrg  _LT_CMD_STRIPLIB
5288ad43ddacSmrg
5289ad43ddacSmrg  # Report which library types will actually be built
5290ad43ddacSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
5291ad43ddacSmrg  AC_MSG_RESULT([$can_build_shared])
5292ad43ddacSmrg
5293ad43ddacSmrg  AC_MSG_CHECKING([whether to build shared libraries])
5294ad43ddacSmrg  test "$can_build_shared" = "no" && enable_shared=no
5295ad43ddacSmrg
5296ad43ddacSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
5297ad43ddacSmrg  # are all built from PIC.
5298ad43ddacSmrg  case $host_os in
5299ad43ddacSmrg  aix3*)
5300ad43ddacSmrg    test "$enable_shared" = yes && enable_static=no
5301ad43ddacSmrg    if test -n "$RANLIB"; then
5302ad43ddacSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
5303ad43ddacSmrg      postinstall_cmds='$RANLIB $lib'
5304ad43ddacSmrg    fi
5305ad43ddacSmrg    ;;
5306209ff23fSmrg
5307ad43ddacSmrg  aix[[4-9]]*)
5308ad43ddacSmrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5309ad43ddacSmrg      test "$enable_shared" = yes && enable_static=no
5310ad43ddacSmrg    fi
5311ad43ddacSmrg    ;;
5312ad43ddacSmrg  esac
5313ad43ddacSmrg  AC_MSG_RESULT([$enable_shared])
5314209ff23fSmrg
5315ad43ddacSmrg  AC_MSG_CHECKING([whether to build static libraries])
5316ad43ddacSmrg  # Make sure either enable_shared or enable_static is yes.
5317ad43ddacSmrg  test "$enable_shared" = yes || enable_static=yes
5318ad43ddacSmrg  AC_MSG_RESULT([$enable_static])
5319209ff23fSmrg
5320ad43ddacSmrg  _LT_CONFIG($1)
5321ad43ddacSmrgfi
5322ad43ddacSmrgAC_LANG_POP
5323ad43ddacSmrgCC="$lt_save_CC"
5324ad43ddacSmrg])# _LT_LANG_C_CONFIG
5325209ff23fSmrg
5326209ff23fSmrg
5327ad43ddacSmrg# _LT_PROG_CXX
5328ad43ddacSmrg# ------------
5329ad43ddacSmrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5330ad43ddacSmrg# compiler, we have our own version here.
5331ad43ddacSmrgm4_defun([_LT_PROG_CXX],
5332ad43ddacSmrg[
5333ad43ddacSmrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5334ad43ddacSmrgAC_PROG_CXX
5335ad43ddacSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5336ad43ddacSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5337ad43ddacSmrg    (test "X$CXX" != "Xg++"))) ; then
5338ad43ddacSmrg  AC_PROG_CXXCPP
5339ad43ddacSmrgelse
5340ad43ddacSmrg  _lt_caught_CXX_error=yes
5341ad43ddacSmrgfi
5342ad43ddacSmrgpopdef([AC_MSG_ERROR])
5343ad43ddacSmrg])# _LT_PROG_CXX
5344209ff23fSmrg
5345ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
5346ad43ddacSmrgdnl AC_DEFUN([_LT_PROG_CXX], [])
5347209ff23fSmrg
5348209ff23fSmrg
5349ad43ddacSmrg# _LT_LANG_CXX_CONFIG([TAG])
5350ad43ddacSmrg# --------------------------
5351ad43ddacSmrg# Ensure that the configuration variables for a C++ compiler are suitably
5352ad43ddacSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
5353ad43ddacSmrg# the compiler configuration to `libtool'.
5354ad43ddacSmrgm4_defun([_LT_LANG_CXX_CONFIG],
5355ad43ddacSmrg[AC_REQUIRE([_LT_PROG_CXX])dnl
5356ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
5357ad43ddacSmrgm4_require([_LT_DECL_EGREP])dnl
5358ad43ddacSmrg
5359ad43ddacSmrgAC_LANG_PUSH(C++)
5360ad43ddacSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5361ad43ddacSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
5362ad43ddacSmrg_LT_TAGVAR(always_export_symbols, $1)=no
5363ad43ddacSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
5364ad43ddacSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
5365ad43ddacSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5366ad43ddacSmrg_LT_TAGVAR(hardcode_direct, $1)=no
5367ad43ddacSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5368ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5369ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5370ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
5371ad43ddacSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
5372ad43ddacSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5373ad43ddacSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
5374ad43ddacSmrg_LT_TAGVAR(inherit_rpath, $1)=no
5375ad43ddacSmrg_LT_TAGVAR(module_cmds, $1)=
5376ad43ddacSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
5377ad43ddacSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
5378ad43ddacSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5379ad43ddacSmrg_LT_TAGVAR(no_undefined_flag, $1)=
5380ad43ddacSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
5381ad43ddacSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5382209ff23fSmrg
5383ad43ddacSmrg# Source file extension for C++ test sources.
5384ad43ddacSmrgac_ext=cpp
5385209ff23fSmrg
5386ad43ddacSmrg# Object file extension for compiled C++ test sources.
5387ad43ddacSmrgobjext=o
5388ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext
5389ad43ddacSmrg
5390ad43ddacSmrg# No sense in running all these tests if we already determined that
5391ad43ddacSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
5392ad43ddacSmrg# are currently assumed to apply to all compilers on this platform,
5393ad43ddacSmrg# and will be corrupted by setting them based on a non-working compiler.
5394ad43ddacSmrgif test "$_lt_caught_CXX_error" != yes; then
5395ad43ddacSmrg  # Code to be used in simple compile tests
5396ad43ddacSmrg  lt_simple_compile_test_code="int some_variable = 0;"
5397ad43ddacSmrg
5398ad43ddacSmrg  # Code to be used in simple link tests
5399ad43ddacSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5400ad43ddacSmrg
5401ad43ddacSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5402ad43ddacSmrg  _LT_TAG_COMPILER
5403ad43ddacSmrg
5404ad43ddacSmrg  # save warnings/boilerplate of simple test code
5405ad43ddacSmrg  _LT_COMPILER_BOILERPLATE
5406ad43ddacSmrg  _LT_LINKER_BOILERPLATE
5407ad43ddacSmrg
5408ad43ddacSmrg  # Allow CC to be a program name with arguments.
5409ad43ddacSmrg  lt_save_CC=$CC
5410ad43ddacSmrg  lt_save_LD=$LD
5411ad43ddacSmrg  lt_save_GCC=$GCC
5412ad43ddacSmrg  GCC=$GXX
5413ad43ddacSmrg  lt_save_with_gnu_ld=$with_gnu_ld
5414ad43ddacSmrg  lt_save_path_LD=$lt_cv_path_LD
5415ad43ddacSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5416ad43ddacSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5417ad43ddacSmrg  else
5418ad43ddacSmrg    $as_unset lt_cv_prog_gnu_ld
5419ad43ddacSmrg  fi
5420ad43ddacSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
5421ad43ddacSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
5422ad43ddacSmrg  else
5423ad43ddacSmrg    $as_unset lt_cv_path_LD
5424ad43ddacSmrg  fi
5425ad43ddacSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
5426ad43ddacSmrg  CC=${CXX-"c++"}
5427ad43ddacSmrg  compiler=$CC
5428ad43ddacSmrg  _LT_TAGVAR(compiler, $1)=$CC
5429ad43ddacSmrg  _LT_CC_BASENAME([$compiler])
5430209ff23fSmrg
5431ad43ddacSmrg  if test -n "$compiler"; then
5432ad43ddacSmrg    # We don't want -fno-exception when compiling C++ code, so set the
5433ad43ddacSmrg    # no_builtin_flag separately
5434ad43ddacSmrg    if test "$GXX" = yes; then
5435ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5436ad43ddacSmrg    else
5437ad43ddacSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5438ad43ddacSmrg    fi
5439209ff23fSmrg
5440ad43ddacSmrg    if test "$GXX" = yes; then
5441ad43ddacSmrg      # Set up default GNU C++ configuration
5442209ff23fSmrg
5443ad43ddacSmrg      LT_PATH_LD
5444209ff23fSmrg
5445ad43ddacSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
5446ad43ddacSmrg      # archiving commands below assume that GNU ld is being used.
5447ad43ddacSmrg      if test "$with_gnu_ld" = yes; then
5448ad43ddacSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5449ad43ddacSmrg        _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'
5450209ff23fSmrg
5451ad43ddacSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5452ad43ddacSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5453209ff23fSmrg
5454ad43ddacSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
5455ad43ddacSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5456ad43ddacSmrg        #     investigate it a little bit more. (MM)
5457ad43ddacSmrg        wlarc='${wl}'
5458209ff23fSmrg
5459ad43ddacSmrg        # ancient GNU ld didn't support --whole-archive et. al.
5460ad43ddacSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5461ad43ddacSmrg	  $GREP 'no-whole-archive' > /dev/null; then
5462ad43ddacSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5463ad43ddacSmrg        else
5464ad43ddacSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
5465ad43ddacSmrg        fi
5466ad43ddacSmrg      else
5467ad43ddacSmrg        with_gnu_ld=no
5468ad43ddacSmrg        wlarc=
5469ad43ddacSmrg
5470ad43ddacSmrg        # A generic and very simple default shared library creation
5471ad43ddacSmrg        # command for GNU C++ for the case where it uses the native
5472ad43ddacSmrg        # linker, instead of GNU ld.  If possible, this setting should
5473ad43ddacSmrg        # overridden to take advantage of the native linker features on
5474ad43ddacSmrg        # the platform it is being used on.
5475ad43ddacSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5476ad43ddacSmrg      fi
5477209ff23fSmrg
5478ad43ddacSmrg      # Commands to make compiler produce verbose output that lists
5479ad43ddacSmrg      # what "hidden" libraries, object files and flags are used when
5480ad43ddacSmrg      # linking a shared library.
5481ad43ddacSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5482209ff23fSmrg
5483ad43ddacSmrg    else
5484ad43ddacSmrg      GXX=no
5485ad43ddacSmrg      with_gnu_ld=no
5486ad43ddacSmrg      wlarc=
5487ad43ddacSmrg    fi
5488209ff23fSmrg
5489ad43ddacSmrg    # PORTME: fill in a description of your system's C++ link characteristics
5490ad43ddacSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5491ad43ddacSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
5492ad43ddacSmrg    case $host_os in
5493ad43ddacSmrg      aix3*)
5494ad43ddacSmrg        # FIXME: insert proper C++ library support
5495ad43ddacSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
5496ad43ddacSmrg        ;;
5497ad43ddacSmrg      aix[[4-9]]*)
5498ad43ddacSmrg        if test "$host_cpu" = ia64; then
5499ad43ddacSmrg          # On IA64, the linker does run time linking by default, so we don't
5500ad43ddacSmrg          # have to do anything special.
5501ad43ddacSmrg          aix_use_runtimelinking=no
5502ad43ddacSmrg          exp_sym_flag='-Bexport'
5503ad43ddacSmrg          no_entry_flag=""
5504ad43ddacSmrg        else
5505ad43ddacSmrg          aix_use_runtimelinking=no
5506ad43ddacSmrg
5507ad43ddacSmrg          # Test if we are trying to use run time linking or normal
5508ad43ddacSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5509ad43ddacSmrg          # need to do runtime linking.
5510ad43ddacSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5511ad43ddacSmrg	    for ld_flag in $LDFLAGS; do
5512ad43ddacSmrg	      case $ld_flag in
5513ad43ddacSmrg	      *-brtl*)
5514ad43ddacSmrg	        aix_use_runtimelinking=yes
5515ad43ddacSmrg	        break
5516ad43ddacSmrg	        ;;
5517ad43ddacSmrg	      esac
5518ad43ddacSmrg	    done
5519ad43ddacSmrg	    ;;
5520ad43ddacSmrg          esac
5521209ff23fSmrg
5522ad43ddacSmrg          exp_sym_flag='-bexport'
5523ad43ddacSmrg          no_entry_flag='-bnoentry'
5524ad43ddacSmrg        fi
5525209ff23fSmrg
5526ad43ddacSmrg        # When large executables or shared objects are built, AIX ld can
5527ad43ddacSmrg        # have problems creating the table of contents.  If linking a library
5528ad43ddacSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
5529ad43ddacSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5530ad43ddacSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5531ad43ddacSmrg
5532ad43ddacSmrg        _LT_TAGVAR(archive_cmds, $1)=''
5533ad43ddacSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
5534ad43ddacSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5535ad43ddacSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5536ad43ddacSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
5537ad43ddacSmrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5538ad43ddacSmrg
5539ad43ddacSmrg        if test "$GXX" = yes; then
5540ad43ddacSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
5541ad43ddacSmrg          # We only want to do this on AIX 4.2 and lower, the check
5542ad43ddacSmrg          # below for broken collect2 doesn't work under 4.3+
5543ad43ddacSmrg	  collect2name=`${CC} -print-prog-name=collect2`
5544ad43ddacSmrg	  if test -f "$collect2name" &&
5545ad43ddacSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5546ad43ddacSmrg	  then
5547ad43ddacSmrg	    # We have reworked collect2
5548ad43ddacSmrg	    :
5549ad43ddacSmrg	  else
5550ad43ddacSmrg	    # We have old collect2
5551ad43ddacSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
5552ad43ddacSmrg	    # It fails to find uninstalled libraries when the uninstalled
5553ad43ddacSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
5554ad43ddacSmrg	    # to unsupported forces relinking
5555ad43ddacSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
5556ad43ddacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5557ad43ddacSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
5558ad43ddacSmrg	  fi
5559ad43ddacSmrg          esac
5560ad43ddacSmrg          shared_flag='-shared'
5561ad43ddacSmrg	  if test "$aix_use_runtimelinking" = yes; then
5562ad43ddacSmrg	    shared_flag="$shared_flag "'${wl}-G'
5563ad43ddacSmrg	  fi
5564ad43ddacSmrg        else
5565ad43ddacSmrg          # not using gcc
5566ad43ddacSmrg          if test "$host_cpu" = ia64; then
5567ad43ddacSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5568ad43ddacSmrg	  # chokes on -Wl,-G. The following line is correct:
5569ad43ddacSmrg	  shared_flag='-G'
5570ad43ddacSmrg          else
5571ad43ddacSmrg	    if test "$aix_use_runtimelinking" = yes; then
5572ad43ddacSmrg	      shared_flag='${wl}-G'
5573ad43ddacSmrg	    else
5574ad43ddacSmrg	      shared_flag='${wl}-bM:SRE'
5575ad43ddacSmrg	    fi
5576ad43ddacSmrg          fi
5577ad43ddacSmrg        fi
5578209ff23fSmrg
55792f39173dSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5580ad43ddacSmrg        # It seems that -bexpall does not export symbols beginning with
5581ad43ddacSmrg        # underscore (_), so it is better to generate a list of symbols to
5582ad43ddacSmrg	# export.
5583ad43ddacSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
5584ad43ddacSmrg        if test "$aix_use_runtimelinking" = yes; then
5585ad43ddacSmrg          # Warning - without using the other runtime loading flags (-brtl),
5586ad43ddacSmrg          # -berok will link without error, but may produce a broken library.
5587ad43ddacSmrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5588ad43ddacSmrg          # Determine the default libpath from the value encoded in an empty
5589ad43ddacSmrg          # executable.
5590ad43ddacSmrg          _LT_SYS_MODULE_PATH_AIX
5591ad43ddacSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5592ad43ddacSmrg
5593ad43ddacSmrg          _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"
5594ad43ddacSmrg        else
5595ad43ddacSmrg          if test "$host_cpu" = ia64; then
5596ad43ddacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5597ad43ddacSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5598ad43ddacSmrg	    _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"
5599ad43ddacSmrg          else
5600ad43ddacSmrg	    # Determine the default libpath from the value encoded in an
5601ad43ddacSmrg	    # empty executable.
5602ad43ddacSmrg	    _LT_SYS_MODULE_PATH_AIX
5603ad43ddacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5604ad43ddacSmrg	    # Warning - without using the other run time loading flags,
5605ad43ddacSmrg	    # -berok will link without error, but may produce a broken library.
5606ad43ddacSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5607ad43ddacSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5608ad43ddacSmrg	    # Exported symbols can be pulled into shared objects from archives
5609ad43ddacSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5610ad43ddacSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5611ad43ddacSmrg	    # This is similar to how AIX traditionally builds its shared
5612ad43ddacSmrg	    # libraries.
5613ad43ddacSmrg	    _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'
5614ad43ddacSmrg          fi
5615ad43ddacSmrg        fi
5616ad43ddacSmrg        ;;
5617209ff23fSmrg
5618ad43ddacSmrg      beos*)
5619ad43ddacSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5620ad43ddacSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5621ad43ddacSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5622ad43ddacSmrg	  # support --undefined.  This deserves some investigation.  FIXME
5623ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5624ad43ddacSmrg	else
5625ad43ddacSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
5626ad43ddacSmrg	fi
5627ad43ddacSmrg	;;
5628209ff23fSmrg
5629ad43ddacSmrg      chorus*)
5630ad43ddacSmrg        case $cc_basename in
5631ad43ddacSmrg          *)
5632ad43ddacSmrg	  # FIXME: insert proper C++ library support
5633ad43ddacSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
5634ad43ddacSmrg	  ;;
5635ad43ddacSmrg        esac
5636ad43ddacSmrg        ;;
5637209ff23fSmrg
56382f39173dSmrg      cygwin* | mingw* | pw32* | cegcc*)
5639ad43ddacSmrg        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5640ad43ddacSmrg        # as there is no search path for DLLs.
5641ad43ddacSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5642ad43ddacSmrg        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5643ad43ddacSmrg        _LT_TAGVAR(always_export_symbols, $1)=no
5644ad43ddacSmrg        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5645ad43ddacSmrg
5646ad43ddacSmrg        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5647ad43ddacSmrg          _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'
5648ad43ddacSmrg          # If the export-symbols file already is a .def file (1st line
5649ad43ddacSmrg          # is EXPORTS), use it as is; otherwise, prepend...
5650ad43ddacSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5651ad43ddacSmrg	    cp $export_symbols $output_objdir/$soname.def;
5652ad43ddacSmrg          else
5653ad43ddacSmrg	    echo EXPORTS > $output_objdir/$soname.def;
5654ad43ddacSmrg	    cat $export_symbols >> $output_objdir/$soname.def;
5655ad43ddacSmrg          fi~
5656ad43ddacSmrg          $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'
5657ad43ddacSmrg        else
5658ad43ddacSmrg          _LT_TAGVAR(ld_shlibs, $1)=no
5659ad43ddacSmrg        fi
5660ad43ddacSmrg        ;;
5661ad43ddacSmrg      darwin* | rhapsody*)
5662ad43ddacSmrg        _LT_DARWIN_LINKER_FEATURES($1)
5663ad43ddacSmrg	;;
5664209ff23fSmrg
5665ad43ddacSmrg      dgux*)
5666ad43ddacSmrg        case $cc_basename in
5667ad43ddacSmrg          ec++*)
5668ad43ddacSmrg	    # FIXME: insert proper C++ library support
5669ad43ddacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5670ad43ddacSmrg	    ;;
5671ad43ddacSmrg          ghcx*)
5672ad43ddacSmrg	    # Green Hills C++ Compiler
5673ad43ddacSmrg	    # FIXME: insert proper C++ library support
5674ad43ddacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5675ad43ddacSmrg	    ;;
5676ad43ddacSmrg          *)
5677ad43ddacSmrg	    # FIXME: insert proper C++ library support
5678ad43ddacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5679ad43ddacSmrg	    ;;
5680ad43ddacSmrg        esac
5681ad43ddacSmrg        ;;
5682209ff23fSmrg
5683ad43ddacSmrg      freebsd[[12]]*)
5684ad43ddacSmrg        # C++ shared libraries reported to be fairly broken before
5685ad43ddacSmrg	# switch to ELF
5686ad43ddacSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
5687ad43ddacSmrg        ;;
5688209ff23fSmrg
5689ad43ddacSmrg      freebsd-elf*)
5690ad43ddacSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5691ad43ddacSmrg        ;;
5692209ff23fSmrg
5693ad43ddacSmrg      freebsd* | dragonfly*)
5694ad43ddacSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5695ad43ddacSmrg        # conventions
5696ad43ddacSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
5697ad43ddacSmrg        ;;
5698209ff23fSmrg
5699ad43ddacSmrg      gnu*)
5700ad43ddacSmrg        ;;
5701209ff23fSmrg
5702ad43ddacSmrg      hpux9*)
5703ad43ddacSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5704ad43ddacSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5705ad43ddacSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5706ad43ddacSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
5707ad43ddacSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5708ad43ddacSmrg				             # but as the default
5709ad43ddacSmrg				             # location of the library.
5710ad43ddacSmrg
5711ad43ddacSmrg        case $cc_basename in
5712ad43ddacSmrg          CC*)
5713ad43ddacSmrg            # FIXME: insert proper C++ library support
5714ad43ddacSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
5715ad43ddacSmrg            ;;
5716ad43ddacSmrg          aCC*)
5717ad43ddacSmrg            _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'
5718ad43ddacSmrg            # Commands to make compiler produce verbose output that lists
5719ad43ddacSmrg            # what "hidden" libraries, object files and flags are used when
5720ad43ddacSmrg            # linking a shared library.
5721ad43ddacSmrg            #
5722ad43ddacSmrg            # There doesn't appear to be a way to prevent this compiler from
5723ad43ddacSmrg            # explicitly linking system object files so we need to strip them
5724ad43ddacSmrg            # from the output so that they don't get included in the library
5725ad43ddacSmrg            # dependencies.
5726ad43ddacSmrg            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'
5727ad43ddacSmrg            ;;
5728ad43ddacSmrg          *)
5729ad43ddacSmrg            if test "$GXX" = yes; then
5730ad43ddacSmrg              _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'
5731ad43ddacSmrg            else
5732ad43ddacSmrg              # FIXME: insert proper C++ library support
5733ad43ddacSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
5734ad43ddacSmrg            fi
5735ad43ddacSmrg            ;;
5736ad43ddacSmrg        esac
5737ad43ddacSmrg        ;;
5738209ff23fSmrg
5739ad43ddacSmrg      hpux10*|hpux11*)
5740ad43ddacSmrg        if test $with_gnu_ld = no; then
5741ad43ddacSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5742ad43ddacSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5743ad43ddacSmrg
5744ad43ddacSmrg          case $host_cpu in
5745ad43ddacSmrg            hppa*64*|ia64*)
5746ad43ddacSmrg              ;;
5747ad43ddacSmrg            *)
5748ad43ddacSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5749ad43ddacSmrg              ;;
5750ad43ddacSmrg          esac
5751ad43ddacSmrg        fi
5752ad43ddacSmrg        case $host_cpu in
5753ad43ddacSmrg          hppa*64*|ia64*)
5754ad43ddacSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
5755ad43ddacSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5756ad43ddacSmrg            ;;
5757ad43ddacSmrg          *)
5758ad43ddacSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
5759ad43ddacSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5760ad43ddacSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5761ad43ddacSmrg					         # but as the default
5762ad43ddacSmrg					         # location of the library.
5763ad43ddacSmrg            ;;
5764ad43ddacSmrg        esac
5765ad43ddacSmrg
5766ad43ddacSmrg        case $cc_basename in
5767ad43ddacSmrg          CC*)
5768ad43ddacSmrg	    # FIXME: insert proper C++ library support
5769ad43ddacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5770ad43ddacSmrg	    ;;
5771ad43ddacSmrg          aCC*)
5772ad43ddacSmrg	    case $host_cpu in
5773ad43ddacSmrg	      hppa*64*)
5774ad43ddacSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5775ad43ddacSmrg	        ;;
5776ad43ddacSmrg	      ia64*)
5777ad43ddacSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5778ad43ddacSmrg	        ;;
5779ad43ddacSmrg	      *)
5780ad43ddacSmrg	        _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'
5781ad43ddacSmrg	        ;;
5782ad43ddacSmrg	    esac
5783ad43ddacSmrg	    # Commands to make compiler produce verbose output that lists
5784ad43ddacSmrg	    # what "hidden" libraries, object files and flags are used when
5785ad43ddacSmrg	    # linking a shared library.
5786ad43ddacSmrg	    #
5787ad43ddacSmrg	    # There doesn't appear to be a way to prevent this compiler from
5788ad43ddacSmrg	    # explicitly linking system object files so we need to strip them
5789ad43ddacSmrg	    # from the output so that they don't get included in the library
5790ad43ddacSmrg	    # dependencies.
5791ad43ddacSmrg	    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'
5792ad43ddacSmrg	    ;;
5793ad43ddacSmrg          *)
5794ad43ddacSmrg	    if test "$GXX" = yes; then
5795ad43ddacSmrg	      if test $with_gnu_ld = no; then
5796ad43ddacSmrg	        case $host_cpu in
5797ad43ddacSmrg	          hppa*64*)
5798ad43ddacSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5799ad43ddacSmrg	            ;;
5800ad43ddacSmrg	          ia64*)
5801ad43ddacSmrg	            _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'
5802ad43ddacSmrg	            ;;
5803ad43ddacSmrg	          *)
5804ad43ddacSmrg	            _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'
5805ad43ddacSmrg	            ;;
5806ad43ddacSmrg	        esac
5807ad43ddacSmrg	      fi
5808ad43ddacSmrg	    else
5809ad43ddacSmrg	      # FIXME: insert proper C++ library support
5810ad43ddacSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
5811ad43ddacSmrg	    fi
5812ad43ddacSmrg	    ;;
5813ad43ddacSmrg        esac
5814ad43ddacSmrg        ;;
5815209ff23fSmrg
5816ad43ddacSmrg      interix[[3-9]]*)
5817ad43ddacSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
5818ad43ddacSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5819ad43ddacSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5820ad43ddacSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5821ad43ddacSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5822ad43ddacSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
5823ad43ddacSmrg	# default) and relocated if they conflict, which is a slow very memory
5824ad43ddacSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
5825ad43ddacSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5826ad43ddacSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5827ad43ddacSmrg	_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'
5828ad43ddacSmrg	_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'
5829ad43ddacSmrg	;;
5830ad43ddacSmrg      irix5* | irix6*)
5831ad43ddacSmrg        case $cc_basename in
5832ad43ddacSmrg          CC*)
5833ad43ddacSmrg	    # SGI C++
5834ad43ddacSmrg	    _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'
5835ad43ddacSmrg
5836ad43ddacSmrg	    # Archives containing C++ object files must be created using
5837ad43ddacSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
5838ad43ddacSmrg	    # necessary to make sure instantiated templates are included
5839ad43ddacSmrg	    # in the archive.
5840ad43ddacSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5841ad43ddacSmrg	    ;;
5842ad43ddacSmrg          *)
5843ad43ddacSmrg	    if test "$GXX" = yes; then
5844ad43ddacSmrg	      if test "$with_gnu_ld" = no; then
5845ad43ddacSmrg	        _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'
5846ad43ddacSmrg	      else
5847ad43ddacSmrg	        _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'
5848ad43ddacSmrg	      fi
5849ad43ddacSmrg	    fi
5850ad43ddacSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
5851ad43ddacSmrg	    ;;
5852ad43ddacSmrg        esac
5853ad43ddacSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5854ad43ddacSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5855ad43ddacSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
5856ad43ddacSmrg        ;;
5857209ff23fSmrg
5858ad43ddacSmrg      linux* | k*bsd*-gnu)
5859ad43ddacSmrg        case $cc_basename in
5860ad43ddacSmrg          KCC*)
5861ad43ddacSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
5862ad43ddacSmrg
5863ad43ddacSmrg	    # KCC will only create a shared library if the output file
5864ad43ddacSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
5865ad43ddacSmrg	    # to its proper name (with version) after linking.
5866ad43ddacSmrg	    _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'
5867ad43ddacSmrg	    _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'
5868ad43ddacSmrg	    # Commands to make compiler produce verbose output that lists
5869ad43ddacSmrg	    # what "hidden" libraries, object files and flags are used when
5870ad43ddacSmrg	    # linking a shared library.
5871ad43ddacSmrg	    #
5872ad43ddacSmrg	    # There doesn't appear to be a way to prevent this compiler from
5873ad43ddacSmrg	    # explicitly linking system object files so we need to strip them
5874ad43ddacSmrg	    # from the output so that they don't get included in the library
5875ad43ddacSmrg	    # dependencies.
5876ad43ddacSmrg	    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'
5877ad43ddacSmrg
5878ad43ddacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5879ad43ddacSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5880ad43ddacSmrg
5881ad43ddacSmrg	    # Archives containing C++ object files must be created using
5882ad43ddacSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5883ad43ddacSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5884ad43ddacSmrg	    ;;
5885ad43ddacSmrg	  icpc* | ecpc* )
5886ad43ddacSmrg	    # Intel C++
5887ad43ddacSmrg	    with_gnu_ld=yes
5888ad43ddacSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
5889ad43ddacSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
5890ad43ddacSmrg	    # earlier do not add the objects themselves.
5891ad43ddacSmrg	    case `$CC -V 2>&1` in
5892ad43ddacSmrg	      *"Version 7."*)
5893ad43ddacSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5894ad43ddacSmrg		_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'
5895ad43ddacSmrg		;;
5896ad43ddacSmrg	      *)  # Version 8.0 or newer
5897ad43ddacSmrg	        tmp_idyn=
5898ad43ddacSmrg	        case $host_cpu in
5899ad43ddacSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
5900ad43ddacSmrg		esac
5901ad43ddacSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5902ad43ddacSmrg		_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'
5903ad43ddacSmrg		;;
5904ad43ddacSmrg	    esac
5905ad43ddacSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5906ad43ddacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5907ad43ddacSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5908ad43ddacSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5909ad43ddacSmrg	    ;;
5910ad43ddacSmrg          pgCC* | pgcpp*)
5911ad43ddacSmrg            # Portland Group C++ compiler
5912ad43ddacSmrg	    case `$CC -V` in
5913ad43ddacSmrg	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
5914ad43ddacSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5915ad43ddacSmrg		rm -rf $tpldir~
5916ad43ddacSmrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5917ad43ddacSmrg		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5918ad43ddacSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5919ad43ddacSmrg		rm -rf $tpldir~
5920ad43ddacSmrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5921ad43ddacSmrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5922ad43ddacSmrg		$RANLIB $oldlib'
5923ad43ddacSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5924ad43ddacSmrg		rm -rf $tpldir~
5925ad43ddacSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5926ad43ddacSmrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5927ad43ddacSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5928ad43ddacSmrg		rm -rf $tpldir~
5929ad43ddacSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5930ad43ddacSmrg		$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'
5931ad43ddacSmrg	      ;;
5932ad43ddacSmrg	    *) # Version 6 will use weak symbols
5933ad43ddacSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5934ad43ddacSmrg	      _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'
5935ad43ddacSmrg	      ;;
5936ad43ddacSmrg	    esac
5937209ff23fSmrg
5938ad43ddacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5939ad43ddacSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5940ad43ddacSmrg	    _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'
5941ad43ddacSmrg            ;;
5942ad43ddacSmrg	  cxx*)
5943ad43ddacSmrg	    # Compaq C++
5944ad43ddacSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5945ad43ddacSmrg	    _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'
5946209ff23fSmrg
5947ad43ddacSmrg	    runpath_var=LD_RUN_PATH
5948ad43ddacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5949ad43ddacSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5950209ff23fSmrg
5951ad43ddacSmrg	    # Commands to make compiler produce verbose output that lists
5952ad43ddacSmrg	    # what "hidden" libraries, object files and flags are used when
5953ad43ddacSmrg	    # linking a shared library.
5954ad43ddacSmrg	    #
5955ad43ddacSmrg	    # There doesn't appear to be a way to prevent this compiler from
5956ad43ddacSmrg	    # explicitly linking system object files so we need to strip them
5957ad43ddacSmrg	    # from the output so that they don't get included in the library
5958ad43ddacSmrg	    # dependencies.
5959ad43ddacSmrg	    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'
5960ad43ddacSmrg	    ;;
5961ad43ddacSmrg	  xl*)
5962ad43ddacSmrg	    # IBM XL 8.0 on PPC, with GNU ld
5963ad43ddacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5964ad43ddacSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5965ad43ddacSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5966ad43ddacSmrg	    if test "x$supports_anon_versioning" = xyes; then
5967ad43ddacSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5968ad43ddacSmrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5969ad43ddacSmrg		echo "local: *; };" >> $output_objdir/$libname.ver~
5970ad43ddacSmrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5971ad43ddacSmrg	    fi
5972ad43ddacSmrg	    ;;
5973ad43ddacSmrg	  *)
5974ad43ddacSmrg	    case `$CC -V 2>&1 | sed 5q` in
5975ad43ddacSmrg	    *Sun\ C*)
5976ad43ddacSmrg	      # Sun C++ 5.9
5977ad43ddacSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5978ad43ddacSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5979ad43ddacSmrg	      _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'
5980ad43ddacSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5981ad43ddacSmrg	      _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'
5982ad43ddacSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
5983ad43ddacSmrg
5984ad43ddacSmrg	      # Not sure whether something based on
5985ad43ddacSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5986ad43ddacSmrg	      # would be better.
5987ad43ddacSmrg	      output_verbose_link_cmd='echo'
5988ad43ddacSmrg
5989ad43ddacSmrg	      # Archives containing C++ object files must be created using
5990ad43ddacSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
5991ad43ddacSmrg	      # necessary to make sure instantiated templates are included
5992ad43ddacSmrg	      # in the archive.
5993ad43ddacSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5994ad43ddacSmrg	      ;;
5995ad43ddacSmrg	    esac
5996ad43ddacSmrg	    ;;
5997ad43ddacSmrg	esac
5998ad43ddacSmrg	;;
5999209ff23fSmrg
6000ad43ddacSmrg      lynxos*)
6001ad43ddacSmrg        # FIXME: insert proper C++ library support
6002ad43ddacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
6003ad43ddacSmrg	;;
6004209ff23fSmrg
6005ad43ddacSmrg      m88k*)
6006ad43ddacSmrg        # FIXME: insert proper C++ library support
6007ad43ddacSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6008ad43ddacSmrg	;;
6009209ff23fSmrg
6010ad43ddacSmrg      mvs*)
6011ad43ddacSmrg        case $cc_basename in
6012ad43ddacSmrg          cxx*)
6013ad43ddacSmrg	    # FIXME: insert proper C++ library support
6014ad43ddacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6015ad43ddacSmrg	    ;;
6016ad43ddacSmrg	  *)
6017ad43ddacSmrg	    # FIXME: insert proper C++ library support
6018ad43ddacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6019ad43ddacSmrg	    ;;
6020ad43ddacSmrg	esac
6021ad43ddacSmrg	;;
6022209ff23fSmrg
6023ad43ddacSmrg      netbsd*)
6024ad43ddacSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6025ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6026ad43ddacSmrg	  wlarc=
6027ad43ddacSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6028ad43ddacSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6029ad43ddacSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6030ad43ddacSmrg	fi
6031ad43ddacSmrg	# Workaround some broken pre-1.5 toolchains
6032ad43ddacSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6033ad43ddacSmrg	;;
6034209ff23fSmrg
6035ad43ddacSmrg      *nto* | *qnx*)
6036ad43ddacSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
6037ad43ddacSmrg	;;
6038209ff23fSmrg
6039ad43ddacSmrg      openbsd2*)
6040ad43ddacSmrg        # C++ shared libraries are fairly broken
6041ad43ddacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
6042ad43ddacSmrg	;;
6043209ff23fSmrg
6044ad43ddacSmrg      openbsd*)
6045ad43ddacSmrg	if test -f /usr/libexec/ld.so; then
6046ad43ddacSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6047ad43ddacSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6048ad43ddacSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6049ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6050ad43ddacSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6051ad43ddacSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6052ad43ddacSmrg	    _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'
6053ad43ddacSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6054ad43ddacSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6055ad43ddacSmrg	  fi
6056ad43ddacSmrg	  output_verbose_link_cmd=echo
6057ad43ddacSmrg	else
6058ad43ddacSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
6059ad43ddacSmrg	fi
6060ad43ddacSmrg	;;
6061209ff23fSmrg
6062ad43ddacSmrg      osf3* | osf4* | osf5*)
6063ad43ddacSmrg        case $cc_basename in
6064ad43ddacSmrg          KCC*)
6065ad43ddacSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6066ad43ddacSmrg
6067ad43ddacSmrg	    # KCC will only create a shared library if the output file
6068ad43ddacSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6069ad43ddacSmrg	    # to its proper name (with version) after linking.
6070ad43ddacSmrg	    _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'
6071ad43ddacSmrg
6072ad43ddacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6073ad43ddacSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6074ad43ddacSmrg
6075ad43ddacSmrg	    # Archives containing C++ object files must be created using
6076ad43ddacSmrg	    # the KAI C++ compiler.
6077ad43ddacSmrg	    case $host in
6078ad43ddacSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6079ad43ddacSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6080ad43ddacSmrg	    esac
6081ad43ddacSmrg	    ;;
6082ad43ddacSmrg          RCC*)
6083ad43ddacSmrg	    # Rational C++ 2.4.1
6084ad43ddacSmrg	    # FIXME: insert proper C++ library support
6085ad43ddacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6086ad43ddacSmrg	    ;;
6087ad43ddacSmrg          cxx*)
6088ad43ddacSmrg	    case $host in
6089ad43ddacSmrg	      osf3*)
6090ad43ddacSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6091ad43ddacSmrg	        _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'
6092ad43ddacSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6093ad43ddacSmrg		;;
6094ad43ddacSmrg	      *)
6095ad43ddacSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6096ad43ddacSmrg	        _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'
6097ad43ddacSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6098ad43ddacSmrg	          echo "-hidden">> $lib.exp~
6099ad43ddacSmrg	          $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~
6100ad43ddacSmrg	          $RM $lib.exp'
6101ad43ddacSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6102ad43ddacSmrg		;;
6103ad43ddacSmrg	    esac
6104209ff23fSmrg
6105ad43ddacSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6106209ff23fSmrg
6107ad43ddacSmrg	    # Commands to make compiler produce verbose output that lists
6108ad43ddacSmrg	    # what "hidden" libraries, object files and flags are used when
6109ad43ddacSmrg	    # linking a shared library.
6110ad43ddacSmrg	    #
6111ad43ddacSmrg	    # There doesn't appear to be a way to prevent this compiler from
6112ad43ddacSmrg	    # explicitly linking system object files so we need to strip them
6113ad43ddacSmrg	    # from the output so that they don't get included in the library
6114ad43ddacSmrg	    # dependencies.
6115ad43ddacSmrg	    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'
6116ad43ddacSmrg	    ;;
6117ad43ddacSmrg	  *)
6118ad43ddacSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6119ad43ddacSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6120ad43ddacSmrg	      case $host in
6121ad43ddacSmrg	        osf3*)
6122ad43ddacSmrg	          _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'
6123ad43ddacSmrg		  ;;
6124ad43ddacSmrg	        *)
6125ad43ddacSmrg	          _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'
6126ad43ddacSmrg		  ;;
6127ad43ddacSmrg	      esac
6128ad43ddacSmrg
6129ad43ddacSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6130ad43ddacSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6131ad43ddacSmrg
6132ad43ddacSmrg	      # Commands to make compiler produce verbose output that lists
6133ad43ddacSmrg	      # what "hidden" libraries, object files and flags are used when
6134ad43ddacSmrg	      # linking a shared library.
6135ad43ddacSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6136ad43ddacSmrg
6137ad43ddacSmrg	    else
6138ad43ddacSmrg	      # FIXME: insert proper C++ library support
6139ad43ddacSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
6140ad43ddacSmrg	    fi
6141ad43ddacSmrg	    ;;
6142ad43ddacSmrg        esac
6143ad43ddacSmrg        ;;
6144209ff23fSmrg
6145ad43ddacSmrg      psos*)
6146ad43ddacSmrg        # FIXME: insert proper C++ library support
6147ad43ddacSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6148ad43ddacSmrg        ;;
6149209ff23fSmrg
6150ad43ddacSmrg      sunos4*)
6151ad43ddacSmrg        case $cc_basename in
6152ad43ddacSmrg          CC*)
6153ad43ddacSmrg	    # Sun C++ 4.x
6154ad43ddacSmrg	    # FIXME: insert proper C++ library support
6155ad43ddacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6156ad43ddacSmrg	    ;;
6157ad43ddacSmrg          lcc*)
6158ad43ddacSmrg	    # Lucid
6159ad43ddacSmrg	    # FIXME: insert proper C++ library support
6160ad43ddacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6161ad43ddacSmrg	    ;;
6162ad43ddacSmrg          *)
6163ad43ddacSmrg	    # FIXME: insert proper C++ library support
6164ad43ddacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6165ad43ddacSmrg	    ;;
6166ad43ddacSmrg        esac
6167ad43ddacSmrg        ;;
6168209ff23fSmrg
6169ad43ddacSmrg      solaris*)
6170ad43ddacSmrg        case $cc_basename in
6171ad43ddacSmrg          CC*)
6172ad43ddacSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
6173ad43ddacSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6174ad43ddacSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6175ad43ddacSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6176ad43ddacSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6177ad43ddacSmrg	      $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'
6178ad43ddacSmrg
6179ad43ddacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6180ad43ddacSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6181ad43ddacSmrg	    case $host_os in
6182ad43ddacSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6183ad43ddacSmrg	      *)
6184ad43ddacSmrg		# The compiler driver will combine and reorder linker options,
6185ad43ddacSmrg		# but understands `-z linker_flag'.
6186ad43ddacSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6187ad43ddacSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6188ad43ddacSmrg	        ;;
6189ad43ddacSmrg	    esac
6190ad43ddacSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6191209ff23fSmrg
6192ad43ddacSmrg	    output_verbose_link_cmd='echo'
6193209ff23fSmrg
6194ad43ddacSmrg	    # Archives containing C++ object files must be created using
6195ad43ddacSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6196ad43ddacSmrg	    # necessary to make sure instantiated templates are included
6197ad43ddacSmrg	    # in the archive.
6198ad43ddacSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6199ad43ddacSmrg	    ;;
6200ad43ddacSmrg          gcx*)
6201ad43ddacSmrg	    # Green Hills C++ Compiler
6202ad43ddacSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6203209ff23fSmrg
6204ad43ddacSmrg	    # The C++ compiler must be used to create the archive.
6205ad43ddacSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6206ad43ddacSmrg	    ;;
6207ad43ddacSmrg          *)
6208ad43ddacSmrg	    # GNU C++ compiler with Solaris linker
6209ad43ddacSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6210ad43ddacSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6211ad43ddacSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6212ad43ddacSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6213ad43ddacSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6214ad43ddacSmrg		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6215ad43ddacSmrg
6216ad43ddacSmrg	        # Commands to make compiler produce verbose output that lists
6217ad43ddacSmrg	        # what "hidden" libraries, object files and flags are used when
6218ad43ddacSmrg	        # linking a shared library.
6219ad43ddacSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6220ad43ddacSmrg	      else
6221ad43ddacSmrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6222ad43ddacSmrg	        # platform.
6223ad43ddacSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6224ad43ddacSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6225ad43ddacSmrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6226ad43ddacSmrg
6227ad43ddacSmrg	        # Commands to make compiler produce verbose output that lists
6228ad43ddacSmrg	        # what "hidden" libraries, object files and flags are used when
6229ad43ddacSmrg	        # linking a shared library.
6230ad43ddacSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6231ad43ddacSmrg	      fi
6232ad43ddacSmrg
6233ad43ddacSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6234ad43ddacSmrg	      case $host_os in
6235ad43ddacSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6236ad43ddacSmrg		*)
6237ad43ddacSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6238ad43ddacSmrg		  ;;
6239ad43ddacSmrg	      esac
6240ad43ddacSmrg	    fi
6241ad43ddacSmrg	    ;;
6242ad43ddacSmrg        esac
6243ad43ddacSmrg        ;;
6244209ff23fSmrg
6245ad43ddacSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6246ad43ddacSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6247ad43ddacSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6248ad43ddacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6249ad43ddacSmrg      runpath_var='LD_RUN_PATH'
6250209ff23fSmrg
6251ad43ddacSmrg      case $cc_basename in
6252ad43ddacSmrg        CC*)
6253ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6254ad43ddacSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6255ad43ddacSmrg	  ;;
6256ad43ddacSmrg	*)
6257ad43ddacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6258ad43ddacSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6259ad43ddacSmrg	  ;;
6260ad43ddacSmrg      esac
6261ad43ddacSmrg      ;;
6262209ff23fSmrg
6263ad43ddacSmrg      sysv5* | sco3.2v5* | sco5v6*)
6264ad43ddacSmrg	# Note: We can NOT use -z defs as we might desire, because we do not
6265ad43ddacSmrg	# link with -lc, and that would cause any symbols used from libc to
6266ad43ddacSmrg	# always be unresolved, which means just about no library would
6267ad43ddacSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
6268ad43ddacSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
6269ad43ddacSmrg	# as -z defs.
6270ad43ddacSmrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6271ad43ddacSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6272ad43ddacSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6273ad43ddacSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6274ad43ddacSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6275ad43ddacSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6276ad43ddacSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
6277ad43ddacSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6278ad43ddacSmrg	runpath_var='LD_RUN_PATH'
6279209ff23fSmrg
6280ad43ddacSmrg	case $cc_basename in
6281ad43ddacSmrg          CC*)
6282ad43ddacSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6283ad43ddacSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6284ad43ddacSmrg	    ;;
6285ad43ddacSmrg	  *)
6286ad43ddacSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6287ad43ddacSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6288ad43ddacSmrg	    ;;
6289ad43ddacSmrg	esac
6290ad43ddacSmrg      ;;
6291209ff23fSmrg
6292ad43ddacSmrg      tandem*)
6293ad43ddacSmrg        case $cc_basename in
6294ad43ddacSmrg          NCC*)
6295ad43ddacSmrg	    # NonStop-UX NCC 3.20
6296ad43ddacSmrg	    # FIXME: insert proper C++ library support
6297ad43ddacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6298ad43ddacSmrg	    ;;
6299ad43ddacSmrg          *)
6300ad43ddacSmrg	    # FIXME: insert proper C++ library support
6301ad43ddacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6302ad43ddacSmrg	    ;;
6303ad43ddacSmrg        esac
6304ad43ddacSmrg        ;;
6305209ff23fSmrg
6306ad43ddacSmrg      vxworks*)
6307ad43ddacSmrg        # FIXME: insert proper C++ library support
6308ad43ddacSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6309ad43ddacSmrg        ;;
6310209ff23fSmrg
6311ad43ddacSmrg      *)
6312ad43ddacSmrg        # FIXME: insert proper C++ library support
6313ad43ddacSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6314ad43ddacSmrg        ;;
6315ad43ddacSmrg    esac
6316209ff23fSmrg
6317ad43ddacSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6318ad43ddacSmrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6319ad43ddacSmrg
6320ad43ddacSmrg    _LT_TAGVAR(GCC, $1)="$GXX"
6321ad43ddacSmrg    _LT_TAGVAR(LD, $1)="$LD"
6322ad43ddacSmrg
6323ad43ddacSmrg    ## CAVEAT EMPTOR:
6324ad43ddacSmrg    ## There is no encapsulation within the following macros, do not change
6325ad43ddacSmrg    ## the running order or otherwise move them around unless you know exactly
6326ad43ddacSmrg    ## what you are doing...
6327ad43ddacSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
6328ad43ddacSmrg    _LT_COMPILER_PIC($1)
6329ad43ddacSmrg    _LT_COMPILER_C_O($1)
6330ad43ddacSmrg    _LT_COMPILER_FILE_LOCKS($1)
6331ad43ddacSmrg    _LT_LINKER_SHLIBS($1)
6332ad43ddacSmrg    _LT_SYS_DYNAMIC_LINKER($1)
6333ad43ddacSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6334ad43ddacSmrg
6335ad43ddacSmrg    _LT_CONFIG($1)
6336ad43ddacSmrg  fi # test -n "$compiler"
6337ad43ddacSmrg
6338ad43ddacSmrg  CC=$lt_save_CC
6339ad43ddacSmrg  LDCXX=$LD
6340ad43ddacSmrg  LD=$lt_save_LD
6341ad43ddacSmrg  GCC=$lt_save_GCC
6342ad43ddacSmrg  with_gnu_ld=$lt_save_with_gnu_ld
6343ad43ddacSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
6344ad43ddacSmrg  lt_cv_path_LD=$lt_save_path_LD
6345ad43ddacSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6346ad43ddacSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6347ad43ddacSmrgfi # test "$_lt_caught_CXX_error" != yes
6348209ff23fSmrg
6349ad43ddacSmrgAC_LANG_POP
6350ad43ddacSmrg])# _LT_LANG_CXX_CONFIG
6351209ff23fSmrg
6352209ff23fSmrg
6353ad43ddacSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6354ad43ddacSmrg# ---------------------------------
6355ad43ddacSmrg# Figure out "hidden" library dependencies from verbose
6356ad43ddacSmrg# compiler output when linking a shared library.
6357ad43ddacSmrg# Parse the compiler output and extract the necessary
6358ad43ddacSmrg# objects, libraries and library flags.
6359ad43ddacSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6360ad43ddacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6361ad43ddacSmrg# Dependencies to place before and after the object being linked:
6362ad43ddacSmrg_LT_TAGVAR(predep_objects, $1)=
6363ad43ddacSmrg_LT_TAGVAR(postdep_objects, $1)=
6364ad43ddacSmrg_LT_TAGVAR(predeps, $1)=
6365ad43ddacSmrg_LT_TAGVAR(postdeps, $1)=
6366ad43ddacSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
6367209ff23fSmrg
6368ad43ddacSmrgdnl we can't use the lt_simple_compile_test_code here,
6369ad43ddacSmrgdnl because it contains code intended for an executable,
6370ad43ddacSmrgdnl not a library.  It's possible we should let each
6371ad43ddacSmrgdnl tag define a new lt_????_link_test_code variable,
6372ad43ddacSmrgdnl but it's only used here...
6373ad43ddacSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6374ad43ddacSmrgint a;
6375ad43ddacSmrgvoid foo (void) { a = 0; }
6376ad43ddacSmrg_LT_EOF
6377ad43ddacSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6378ad43ddacSmrgclass Foo
6379ad43ddacSmrg{
6380ad43ddacSmrgpublic:
6381ad43ddacSmrg  Foo (void) { a = 0; }
6382ad43ddacSmrgprivate:
6383ad43ddacSmrg  int a;
6384ad43ddacSmrg};
6385ad43ddacSmrg_LT_EOF
6386ad43ddacSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6387ad43ddacSmrg      subroutine foo
6388ad43ddacSmrg      implicit none
6389ad43ddacSmrg      integer*4 a
6390ad43ddacSmrg      a=0
6391ad43ddacSmrg      return
6392ad43ddacSmrg      end
6393ad43ddacSmrg_LT_EOF
6394ad43ddacSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6395ad43ddacSmrg      subroutine foo
6396ad43ddacSmrg      implicit none
6397ad43ddacSmrg      integer a
6398ad43ddacSmrg      a=0
6399ad43ddacSmrg      return
6400ad43ddacSmrg      end
6401ad43ddacSmrg_LT_EOF
6402ad43ddacSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6403ad43ddacSmrgpublic class foo {
6404ad43ddacSmrg  private int a;
6405ad43ddacSmrg  public void bar (void) {
6406ad43ddacSmrg    a = 0;
6407ad43ddacSmrg  }
6408ad43ddacSmrg};
6409ad43ddacSmrg_LT_EOF
6410209ff23fSmrg])
6411ad43ddacSmrgdnl Parse the compiler output and extract the necessary
6412ad43ddacSmrgdnl objects, libraries and library flags.
6413ad43ddacSmrgif AC_TRY_EVAL(ac_compile); then
6414ad43ddacSmrg  # Parse the compiler output and extract the necessary
6415ad43ddacSmrg  # objects, libraries and library flags.
6416209ff23fSmrg
6417ad43ddacSmrg  # Sentinel used to keep track of whether or not we are before
6418ad43ddacSmrg  # the conftest object file.
6419ad43ddacSmrg  pre_test_object_deps_done=no
6420209ff23fSmrg
6421ad43ddacSmrg  for p in `eval "$output_verbose_link_cmd"`; do
6422ad43ddacSmrg    case $p in
6423209ff23fSmrg
6424ad43ddacSmrg    -L* | -R* | -l*)
6425ad43ddacSmrg       # Some compilers place space between "-{L,R}" and the path.
6426ad43ddacSmrg       # Remove the space.
6427ad43ddacSmrg       if test $p = "-L" ||
6428ad43ddacSmrg          test $p = "-R"; then
6429ad43ddacSmrg	 prev=$p
6430ad43ddacSmrg	 continue
6431ad43ddacSmrg       else
6432ad43ddacSmrg	 prev=
6433ad43ddacSmrg       fi
6434209ff23fSmrg
6435ad43ddacSmrg       if test "$pre_test_object_deps_done" = no; then
6436ad43ddacSmrg	 case $p in
6437ad43ddacSmrg	 -L* | -R*)
6438ad43ddacSmrg	   # Internal compiler library paths should come after those
6439ad43ddacSmrg	   # provided the user.  The postdeps already come after the
6440ad43ddacSmrg	   # user supplied libs so there is no need to process them.
6441ad43ddacSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6442ad43ddacSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6443ad43ddacSmrg	   else
6444ad43ddacSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6445ad43ddacSmrg	   fi
6446ad43ddacSmrg	   ;;
6447ad43ddacSmrg	 # The "-l" case would never come before the object being
6448ad43ddacSmrg	 # linked, so don't bother handling this case.
6449ad43ddacSmrg	 esac
6450ad43ddacSmrg       else
6451ad43ddacSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6452ad43ddacSmrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6453ad43ddacSmrg	 else
6454ad43ddacSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6455ad43ddacSmrg	 fi
6456ad43ddacSmrg       fi
6457ad43ddacSmrg       ;;
6458209ff23fSmrg
6459ad43ddacSmrg    *.$objext)
6460ad43ddacSmrg       # This assumes that the test object file only shows up
6461ad43ddacSmrg       # once in the compiler output.
6462ad43ddacSmrg       if test "$p" = "conftest.$objext"; then
6463ad43ddacSmrg	 pre_test_object_deps_done=yes
6464ad43ddacSmrg	 continue
6465ad43ddacSmrg       fi
6466209ff23fSmrg
6467ad43ddacSmrg       if test "$pre_test_object_deps_done" = no; then
6468ad43ddacSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6469ad43ddacSmrg	   _LT_TAGVAR(predep_objects, $1)="$p"
6470ad43ddacSmrg	 else
6471ad43ddacSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6472ad43ddacSmrg	 fi
6473ad43ddacSmrg       else
6474ad43ddacSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6475ad43ddacSmrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
6476ad43ddacSmrg	 else
6477ad43ddacSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6478ad43ddacSmrg	 fi
6479ad43ddacSmrg       fi
6480ad43ddacSmrg       ;;
6481209ff23fSmrg
6482ad43ddacSmrg    *) ;; # Ignore the rest.
6483209ff23fSmrg
6484ad43ddacSmrg    esac
6485ad43ddacSmrg  done
6486209ff23fSmrg
6487ad43ddacSmrg  # Clean up.
6488ad43ddacSmrg  rm -f a.out a.exe
6489ad43ddacSmrgelse
6490ad43ddacSmrg  echo "libtool.m4: error: problem compiling $1 test program"
6491ad43ddacSmrgfi
6492209ff23fSmrg
6493ad43ddacSmrg$RM -f confest.$objext
6494209ff23fSmrg
6495ad43ddacSmrg# PORTME: override above test on systems where it is broken
6496ad43ddacSmrgm4_if([$1], [CXX],
6497ad43ddacSmrg[case $host_os in
6498ad43ddacSmrginterix[[3-9]]*)
6499ad43ddacSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
6500ad43ddacSmrg  # hack all around it, let's just trust "g++" to DTRT.
6501ad43ddacSmrg  _LT_TAGVAR(predep_objects,$1)=
6502ad43ddacSmrg  _LT_TAGVAR(postdep_objects,$1)=
6503ad43ddacSmrg  _LT_TAGVAR(postdeps,$1)=
6504209ff23fSmrg  ;;
6505ad43ddacSmrg
6506ad43ddacSmrglinux*)
6507ad43ddacSmrg  case `$CC -V 2>&1 | sed 5q` in
6508ad43ddacSmrg  *Sun\ C*)
6509ad43ddacSmrg    # Sun C++ 5.9
6510ad43ddacSmrg
6511ad43ddacSmrg    # The more standards-conforming stlport4 library is
6512ad43ddacSmrg    # incompatible with the Cstd library. Avoid specifying
6513ad43ddacSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
6514ad43ddacSmrg    # -library=stlport4 depends on it.
6515ad43ddacSmrg    case " $CXX $CXXFLAGS " in
6516ad43ddacSmrg    *" -library=stlport4 "*)
6517ad43ddacSmrg      solaris_use_stlport4=yes
6518ad43ddacSmrg      ;;
6519ad43ddacSmrg    esac
6520ad43ddacSmrg
6521ad43ddacSmrg    if test "$solaris_use_stlport4" != yes; then
6522ad43ddacSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6523ad43ddacSmrg    fi
6524ad43ddacSmrg    ;;
6525ad43ddacSmrg  esac
6526209ff23fSmrg  ;;
6527ad43ddacSmrg
6528209ff23fSmrgsolaris*)
6529ad43ddacSmrg  case $cc_basename in
6530ad43ddacSmrg  CC*)
6531ad43ddacSmrg    # The more standards-conforming stlport4 library is
6532ad43ddacSmrg    # incompatible with the Cstd library. Avoid specifying
6533ad43ddacSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
6534ad43ddacSmrg    # -library=stlport4 depends on it.
6535ad43ddacSmrg    case " $CXX $CXXFLAGS " in
6536ad43ddacSmrg    *" -library=stlport4 "*)
6537ad43ddacSmrg      solaris_use_stlport4=yes
6538ad43ddacSmrg      ;;
6539ad43ddacSmrg    esac
6540209ff23fSmrg
6541ad43ddacSmrg    # Adding this requires a known-good setup of shared libraries for
6542ad43ddacSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
6543ad43ddacSmrg    # archive will be linked into the output, leading to subtle bugs.
6544ad43ddacSmrg    if test "$solaris_use_stlport4" != yes; then
6545ad43ddacSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6546ad43ddacSmrg    fi
6547ad43ddacSmrg    ;;
6548ad43ddacSmrg  esac
6549209ff23fSmrg  ;;
6550209ff23fSmrgesac
6551ad43ddacSmrg])
6552209ff23fSmrg
6553ad43ddacSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
6554ad43ddacSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6555209ff23fSmrgesac
6556ad43ddacSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6557ad43ddacSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6558ad43ddacSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6559ad43ddacSmrgfi
6560ad43ddacSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6561ad43ddacSmrg    [The directories searched by this compiler when creating a shared library])
6562ad43ddacSmrg_LT_TAGDECL([], [predep_objects], [1],
6563ad43ddacSmrg    [Dependencies to place before and after the objects being linked to
6564ad43ddacSmrg    create a shared library])
6565ad43ddacSmrg_LT_TAGDECL([], [postdep_objects], [1])
6566ad43ddacSmrg_LT_TAGDECL([], [predeps], [1])
6567ad43ddacSmrg_LT_TAGDECL([], [postdeps], [1])
6568ad43ddacSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
6569ad43ddacSmrg    [The library search path used internally by the compiler when linking
6570ad43ddacSmrg    a shared library])
6571ad43ddacSmrg])# _LT_SYS_HIDDEN_LIBDEPS
6572ad43ddacSmrg
6573ad43ddacSmrg
6574ad43ddacSmrg# _LT_PROG_F77
6575ad43ddacSmrg# ------------
6576ad43ddacSmrg# Since AC_PROG_F77 is broken, in that it returns the empty string
6577ad43ddacSmrg# if there is no fortran compiler, we have our own version here.
6578ad43ddacSmrgm4_defun([_LT_PROG_F77],
6579ad43ddacSmrg[
6580ad43ddacSmrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6581ad43ddacSmrgAC_PROG_F77
6582ad43ddacSmrgif test -z "$F77" || test "X$F77" = "Xno"; then
6583ad43ddacSmrg  _lt_disable_F77=yes
6584ad43ddacSmrgfi
6585ad43ddacSmrgpopdef([AC_MSG_ERROR])
6586ad43ddacSmrg])# _LT_PROG_F77
6587209ff23fSmrg
6588ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
6589ad43ddacSmrgdnl AC_DEFUN([_LT_PROG_F77], [])
6590209ff23fSmrg
6591209ff23fSmrg
6592ad43ddacSmrg# _LT_LANG_F77_CONFIG([TAG])
6593ad43ddacSmrg# --------------------------
6594ad43ddacSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
6595ad43ddacSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
6596ad43ddacSmrg# to write the compiler configuration to `libtool'.
6597ad43ddacSmrgm4_defun([_LT_LANG_F77_CONFIG],
6598ad43ddacSmrg[AC_REQUIRE([_LT_PROG_F77])dnl
6599ad43ddacSmrgAC_LANG_PUSH(Fortran 77)
6600209ff23fSmrg
6601ad43ddacSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6602ad43ddacSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
6603ad43ddacSmrg_LT_TAGVAR(always_export_symbols, $1)=no
6604ad43ddacSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6605ad43ddacSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6606ad43ddacSmrg_LT_TAGVAR(hardcode_direct, $1)=no
6607ad43ddacSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6608ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6609ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6610ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6611ad43ddacSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6612ad43ddacSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
6613ad43ddacSmrg_LT_TAGVAR(inherit_rpath, $1)=no
6614ad43ddacSmrg_LT_TAGVAR(module_cmds, $1)=
6615ad43ddacSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
6616ad43ddacSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6617ad43ddacSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6618ad43ddacSmrg_LT_TAGVAR(no_undefined_flag, $1)=
6619ad43ddacSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6620ad43ddacSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6621209ff23fSmrg
6622ad43ddacSmrg# Source file extension for f77 test sources.
6623ad43ddacSmrgac_ext=f
6624209ff23fSmrg
6625ad43ddacSmrg# Object file extension for compiled f77 test sources.
6626ad43ddacSmrgobjext=o
6627ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext
6628ad43ddacSmrg
6629ad43ddacSmrg# No sense in running all these tests if we already determined that
6630ad43ddacSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
6631ad43ddacSmrg# are currently assumed to apply to all compilers on this platform,
6632ad43ddacSmrg# and will be corrupted by setting them based on a non-working compiler.
6633ad43ddacSmrgif test "$_lt_disable_F77" != yes; then
6634ad43ddacSmrg  # Code to be used in simple compile tests
6635ad43ddacSmrg  lt_simple_compile_test_code="\
6636ad43ddacSmrg      subroutine t
6637ad43ddacSmrg      return
6638ad43ddacSmrg      end
6639ad43ddacSmrg"
6640209ff23fSmrg
6641ad43ddacSmrg  # Code to be used in simple link tests
6642ad43ddacSmrg  lt_simple_link_test_code="\
6643ad43ddacSmrg      program t
6644ad43ddacSmrg      end
6645ad43ddacSmrg"
6646209ff23fSmrg
6647ad43ddacSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6648ad43ddacSmrg  _LT_TAG_COMPILER
6649209ff23fSmrg
6650ad43ddacSmrg  # save warnings/boilerplate of simple test code
6651ad43ddacSmrg  _LT_COMPILER_BOILERPLATE
6652ad43ddacSmrg  _LT_LINKER_BOILERPLATE
6653209ff23fSmrg
6654ad43ddacSmrg  # Allow CC to be a program name with arguments.
6655ad43ddacSmrg  lt_save_CC="$CC"
6656ad43ddacSmrg  lt_save_GCC=$GCC
6657ad43ddacSmrg  CC=${F77-"f77"}
6658ad43ddacSmrg  compiler=$CC
6659ad43ddacSmrg  _LT_TAGVAR(compiler, $1)=$CC
6660ad43ddacSmrg  _LT_CC_BASENAME([$compiler])
6661ad43ddacSmrg  GCC=$G77
6662ad43ddacSmrg  if test -n "$compiler"; then
6663ad43ddacSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
6664ad43ddacSmrg    AC_MSG_RESULT([$can_build_shared])
6665209ff23fSmrg
6666ad43ddacSmrg    AC_MSG_CHECKING([whether to build shared libraries])
6667ad43ddacSmrg    test "$can_build_shared" = "no" && enable_shared=no
6668ad43ddacSmrg
6669ad43ddacSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
6670ad43ddacSmrg    # are all built from PIC.
6671ad43ddacSmrg    case $host_os in
6672ad43ddacSmrg      aix3*)
6673ad43ddacSmrg        test "$enable_shared" = yes && enable_static=no
6674ad43ddacSmrg        if test -n "$RANLIB"; then
6675ad43ddacSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6676ad43ddacSmrg          postinstall_cmds='$RANLIB $lib'
6677ad43ddacSmrg        fi
6678ad43ddacSmrg        ;;
6679ad43ddacSmrg      aix[[4-9]]*)
6680ad43ddacSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6681ad43ddacSmrg	  test "$enable_shared" = yes && enable_static=no
6682209ff23fSmrg	fi
6683ad43ddacSmrg        ;;
6684ad43ddacSmrg    esac
6685ad43ddacSmrg    AC_MSG_RESULT([$enable_shared])
6686ad43ddacSmrg
6687ad43ddacSmrg    AC_MSG_CHECKING([whether to build static libraries])
6688ad43ddacSmrg    # Make sure either enable_shared or enable_static is yes.
6689ad43ddacSmrg    test "$enable_shared" = yes || enable_static=yes
6690ad43ddacSmrg    AC_MSG_RESULT([$enable_static])
6691ad43ddacSmrg
6692ad43ddacSmrg    _LT_TAGVAR(GCC, $1)="$G77"
6693ad43ddacSmrg    _LT_TAGVAR(LD, $1)="$LD"
6694ad43ddacSmrg
6695ad43ddacSmrg    ## CAVEAT EMPTOR:
6696ad43ddacSmrg    ## There is no encapsulation within the following macros, do not change
6697ad43ddacSmrg    ## the running order or otherwise move them around unless you know exactly
6698ad43ddacSmrg    ## what you are doing...
6699ad43ddacSmrg    _LT_COMPILER_PIC($1)
6700ad43ddacSmrg    _LT_COMPILER_C_O($1)
6701ad43ddacSmrg    _LT_COMPILER_FILE_LOCKS($1)
6702ad43ddacSmrg    _LT_LINKER_SHLIBS($1)
6703ad43ddacSmrg    _LT_SYS_DYNAMIC_LINKER($1)
6704ad43ddacSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6705ad43ddacSmrg
6706ad43ddacSmrg    _LT_CONFIG($1)
6707ad43ddacSmrg  fi # test -n "$compiler"
6708ad43ddacSmrg
6709ad43ddacSmrg  GCC=$lt_save_GCC
6710ad43ddacSmrg  CC="$lt_save_CC"
6711ad43ddacSmrgfi # test "$_lt_disable_F77" != yes
6712209ff23fSmrg
6713ad43ddacSmrgAC_LANG_POP
6714ad43ddacSmrg])# _LT_LANG_F77_CONFIG
6715ad43ddacSmrg
6716ad43ddacSmrg
6717ad43ddacSmrg# _LT_PROG_FC
6718ad43ddacSmrg# -----------
6719ad43ddacSmrg# Since AC_PROG_FC is broken, in that it returns the empty string
6720ad43ddacSmrg# if there is no fortran compiler, we have our own version here.
6721ad43ddacSmrgm4_defun([_LT_PROG_FC],
6722ad43ddacSmrg[
6723ad43ddacSmrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6724ad43ddacSmrgAC_PROG_FC
6725ad43ddacSmrgif test -z "$FC" || test "X$FC" = "Xno"; then
6726ad43ddacSmrg  _lt_disable_FC=yes
6727209ff23fSmrgfi
6728ad43ddacSmrgpopdef([AC_MSG_ERROR])
6729ad43ddacSmrg])# _LT_PROG_FC
6730209ff23fSmrg
6731ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
6732ad43ddacSmrgdnl AC_DEFUN([_LT_PROG_FC], [])
6733209ff23fSmrg
6734209ff23fSmrg
6735ad43ddacSmrg# _LT_LANG_FC_CONFIG([TAG])
6736ad43ddacSmrg# -------------------------
6737ad43ddacSmrg# Ensure that the configuration variables for a Fortran compiler are
6738ad43ddacSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
6739ad43ddacSmrg# to write the compiler configuration to `libtool'.
6740ad43ddacSmrgm4_defun([_LT_LANG_FC_CONFIG],
6741ad43ddacSmrg[AC_REQUIRE([_LT_PROG_FC])dnl
6742ad43ddacSmrgAC_LANG_PUSH(Fortran)
6743ad43ddacSmrg
6744ad43ddacSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6745ad43ddacSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
6746ad43ddacSmrg_LT_TAGVAR(always_export_symbols, $1)=no
6747ad43ddacSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6748ad43ddacSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6749ad43ddacSmrg_LT_TAGVAR(hardcode_direct, $1)=no
6750ad43ddacSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6751ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6752ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6753ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6754ad43ddacSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6755ad43ddacSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
6756ad43ddacSmrg_LT_TAGVAR(inherit_rpath, $1)=no
6757ad43ddacSmrg_LT_TAGVAR(module_cmds, $1)=
6758ad43ddacSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
6759ad43ddacSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6760ad43ddacSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6761ad43ddacSmrg_LT_TAGVAR(no_undefined_flag, $1)=
6762ad43ddacSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6763ad43ddacSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6764ad43ddacSmrg
6765ad43ddacSmrg# Source file extension for fc test sources.
6766ad43ddacSmrgac_ext=${ac_fc_srcext-f}
6767ad43ddacSmrg
6768ad43ddacSmrg# Object file extension for compiled fc test sources.
6769ad43ddacSmrgobjext=o
6770ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext
6771ad43ddacSmrg
6772ad43ddacSmrg# No sense in running all these tests if we already determined that
6773ad43ddacSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
6774ad43ddacSmrg# are currently assumed to apply to all compilers on this platform,
6775ad43ddacSmrg# and will be corrupted by setting them based on a non-working compiler.
6776ad43ddacSmrgif test "$_lt_disable_FC" != yes; then
6777ad43ddacSmrg  # Code to be used in simple compile tests
6778ad43ddacSmrg  lt_simple_compile_test_code="\
6779ad43ddacSmrg      subroutine t
6780ad43ddacSmrg      return
6781ad43ddacSmrg      end
6782ad43ddacSmrg"
6783ad43ddacSmrg
6784ad43ddacSmrg  # Code to be used in simple link tests
6785ad43ddacSmrg  lt_simple_link_test_code="\
6786ad43ddacSmrg      program t
6787ad43ddacSmrg      end
6788ad43ddacSmrg"
6789ad43ddacSmrg
6790ad43ddacSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6791ad43ddacSmrg  _LT_TAG_COMPILER
6792ad43ddacSmrg
6793ad43ddacSmrg  # save warnings/boilerplate of simple test code
6794ad43ddacSmrg  _LT_COMPILER_BOILERPLATE
6795ad43ddacSmrg  _LT_LINKER_BOILERPLATE
6796209ff23fSmrg
6797ad43ddacSmrg  # Allow CC to be a program name with arguments.
6798ad43ddacSmrg  lt_save_CC="$CC"
6799ad43ddacSmrg  lt_save_GCC=$GCC
6800ad43ddacSmrg  CC=${FC-"f95"}
6801ad43ddacSmrg  compiler=$CC
6802ad43ddacSmrg  GCC=$ac_cv_fc_compiler_gnu
6803ad43ddacSmrg
6804ad43ddacSmrg  _LT_TAGVAR(compiler, $1)=$CC
6805ad43ddacSmrg  _LT_CC_BASENAME([$compiler])
6806ad43ddacSmrg
6807ad43ddacSmrg  if test -n "$compiler"; then
6808ad43ddacSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
6809ad43ddacSmrg    AC_MSG_RESULT([$can_build_shared])
6810ad43ddacSmrg
6811ad43ddacSmrg    AC_MSG_CHECKING([whether to build shared libraries])
6812ad43ddacSmrg    test "$can_build_shared" = "no" && enable_shared=no
6813ad43ddacSmrg
6814ad43ddacSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
6815ad43ddacSmrg    # are all built from PIC.
6816209ff23fSmrg    case $host_os in
6817ad43ddacSmrg      aix3*)
6818ad43ddacSmrg        test "$enable_shared" = yes && enable_static=no
6819ad43ddacSmrg        if test -n "$RANLIB"; then
6820ad43ddacSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6821ad43ddacSmrg          postinstall_cmds='$RANLIB $lib'
6822ad43ddacSmrg        fi
6823ad43ddacSmrg        ;;
6824209ff23fSmrg      aix[[4-9]]*)
6825ad43ddacSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6826ad43ddacSmrg	  test "$enable_shared" = yes && enable_static=no
6827209ff23fSmrg	fi
6828ad43ddacSmrg        ;;
6829209ff23fSmrg    esac
6830ad43ddacSmrg    AC_MSG_RESULT([$enable_shared])
6831ad43ddacSmrg
6832ad43ddacSmrg    AC_MSG_CHECKING([whether to build static libraries])
6833ad43ddacSmrg    # Make sure either enable_shared or enable_static is yes.
6834ad43ddacSmrg    test "$enable_shared" = yes || enable_static=yes
6835ad43ddacSmrg    AC_MSG_RESULT([$enable_static])
6836ad43ddacSmrg
6837ad43ddacSmrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6838ad43ddacSmrg    _LT_TAGVAR(LD, $1)="$LD"
6839ad43ddacSmrg
6840ad43ddacSmrg    ## CAVEAT EMPTOR:
6841ad43ddacSmrg    ## There is no encapsulation within the following macros, do not change
6842ad43ddacSmrg    ## the running order or otherwise move them around unless you know exactly
6843ad43ddacSmrg    ## what you are doing...
6844ad43ddacSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
6845ad43ddacSmrg    _LT_COMPILER_PIC($1)
6846ad43ddacSmrg    _LT_COMPILER_C_O($1)
6847ad43ddacSmrg    _LT_COMPILER_FILE_LOCKS($1)
6848ad43ddacSmrg    _LT_LINKER_SHLIBS($1)
6849ad43ddacSmrg    _LT_SYS_DYNAMIC_LINKER($1)
6850ad43ddacSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6851ad43ddacSmrg
6852ad43ddacSmrg    _LT_CONFIG($1)
6853ad43ddacSmrg  fi # test -n "$compiler"
6854ad43ddacSmrg
6855ad43ddacSmrg  GCC=$lt_save_GCC
6856ad43ddacSmrg  CC="$lt_save_CC"
6857ad43ddacSmrgfi # test "$_lt_disable_FC" != yes
6858209ff23fSmrg
6859ad43ddacSmrgAC_LANG_POP
6860ad43ddacSmrg])# _LT_LANG_FC_CONFIG
6861209ff23fSmrg
6862209ff23fSmrg
6863ad43ddacSmrg# _LT_LANG_GCJ_CONFIG([TAG])
6864ad43ddacSmrg# --------------------------
6865ad43ddacSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
6866ad43ddacSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
6867ad43ddacSmrg# to write the compiler configuration to `libtool'.
6868ad43ddacSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
6869ad43ddacSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
6870ad43ddacSmrgAC_LANG_SAVE
6871209ff23fSmrg
6872ad43ddacSmrg# Source file extension for Java test sources.
6873ad43ddacSmrgac_ext=java
6874209ff23fSmrg
6875ad43ddacSmrg# Object file extension for compiled Java test sources.
6876ad43ddacSmrgobjext=o
6877ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext
6878209ff23fSmrg
6879ad43ddacSmrg# Code to be used in simple compile tests
6880ad43ddacSmrglt_simple_compile_test_code="class foo {}"
6881209ff23fSmrg
6882ad43ddacSmrg# Code to be used in simple link tests
6883ad43ddacSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
6884209ff23fSmrg
6885ad43ddacSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6886ad43ddacSmrg_LT_TAG_COMPILER
6887209ff23fSmrg
6888ad43ddacSmrg# save warnings/boilerplate of simple test code
6889ad43ddacSmrg_LT_COMPILER_BOILERPLATE
6890ad43ddacSmrg_LT_LINKER_BOILERPLATE
6891209ff23fSmrg
6892ad43ddacSmrg# Allow CC to be a program name with arguments.
6893ad43ddacSmrglt_save_CC="$CC"
6894ad43ddacSmrglt_save_GCC=$GCC
6895ad43ddacSmrgGCC=yes
6896ad43ddacSmrgCC=${GCJ-"gcj"}
6897ad43ddacSmrgcompiler=$CC
6898ad43ddacSmrg_LT_TAGVAR(compiler, $1)=$CC
6899ad43ddacSmrg_LT_TAGVAR(LD, $1)="$LD"
6900ad43ddacSmrg_LT_CC_BASENAME([$compiler])
6901209ff23fSmrg
6902ad43ddacSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
6903ad43ddacSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6904209ff23fSmrg
6905ad43ddacSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6906209ff23fSmrg
6907ad43ddacSmrgif test -n "$compiler"; then
6908ad43ddacSmrg  _LT_COMPILER_NO_RTTI($1)
6909ad43ddacSmrg  _LT_COMPILER_PIC($1)
6910ad43ddacSmrg  _LT_COMPILER_C_O($1)
6911ad43ddacSmrg  _LT_COMPILER_FILE_LOCKS($1)
6912ad43ddacSmrg  _LT_LINKER_SHLIBS($1)
6913ad43ddacSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
6914209ff23fSmrg
6915ad43ddacSmrg  _LT_CONFIG($1)
6916ad43ddacSmrgfi
6917209ff23fSmrg
6918ad43ddacSmrgAC_LANG_RESTORE
6919209ff23fSmrg
6920ad43ddacSmrgGCC=$lt_save_GCC
6921ad43ddacSmrgCC="$lt_save_CC"
6922ad43ddacSmrg])# _LT_LANG_GCJ_CONFIG
6923209ff23fSmrg
6924209ff23fSmrg
6925ad43ddacSmrg# _LT_LANG_RC_CONFIG([TAG])
6926ad43ddacSmrg# -------------------------
6927ad43ddacSmrg# Ensure that the configuration variables for the Windows resource compiler
6928ad43ddacSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
6929ad43ddacSmrg# to write the compiler configuration to `libtool'.
6930ad43ddacSmrgm4_defun([_LT_LANG_RC_CONFIG],
6931ad43ddacSmrg[AC_REQUIRE([LT_PROG_RC])dnl
6932ad43ddacSmrgAC_LANG_SAVE
6933209ff23fSmrg
6934ad43ddacSmrg# Source file extension for RC test sources.
6935ad43ddacSmrgac_ext=rc
6936209ff23fSmrg
6937ad43ddacSmrg# Object file extension for compiled RC test sources.
6938ad43ddacSmrgobjext=o
6939ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext
6940209ff23fSmrg
6941ad43ddacSmrg# Code to be used in simple compile tests
6942ad43ddacSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
6943209ff23fSmrg
6944ad43ddacSmrg# Code to be used in simple link tests
6945ad43ddacSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
6946209ff23fSmrg
6947ad43ddacSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6948ad43ddacSmrg_LT_TAG_COMPILER
6949ad43ddacSmrg
6950ad43ddacSmrg# save warnings/boilerplate of simple test code
6951ad43ddacSmrg_LT_COMPILER_BOILERPLATE
6952ad43ddacSmrg_LT_LINKER_BOILERPLATE
6953ad43ddacSmrg
6954ad43ddacSmrg# Allow CC to be a program name with arguments.
6955ad43ddacSmrglt_save_CC="$CC"
6956ad43ddacSmrglt_save_GCC=$GCC
6957ad43ddacSmrgGCC=
6958ad43ddacSmrgCC=${RC-"windres"}
6959ad43ddacSmrgcompiler=$CC
6960ad43ddacSmrg_LT_TAGVAR(compiler, $1)=$CC
6961ad43ddacSmrg_LT_CC_BASENAME([$compiler])
6962ad43ddacSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6963ad43ddacSmrg
6964ad43ddacSmrgif test -n "$compiler"; then
6965ad43ddacSmrg  :
6966ad43ddacSmrg  _LT_CONFIG($1)
6967ad43ddacSmrgfi
6968ad43ddacSmrg
6969ad43ddacSmrgGCC=$lt_save_GCC
6970ad43ddacSmrgAC_LANG_RESTORE
6971ad43ddacSmrgCC="$lt_save_CC"
6972ad43ddacSmrg])# _LT_LANG_RC_CONFIG
6973ad43ddacSmrg
6974ad43ddacSmrg
6975ad43ddacSmrg# LT_PROG_GCJ
6976ad43ddacSmrg# -----------
6977ad43ddacSmrgAC_DEFUN([LT_PROG_GCJ],
6978ad43ddacSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6979ad43ddacSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6980ad43ddacSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
6981ad43ddacSmrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6982ad43ddacSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
6983ad43ddacSmrg])
6984ad43ddacSmrg
6985ad43ddacSmrg# Old name:
6986ad43ddacSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
6987ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
6988ad43ddacSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
6989ad43ddacSmrg
6990ad43ddacSmrg
6991ad43ddacSmrg# LT_PROG_RC
6992ad43ddacSmrg# ----------
6993ad43ddacSmrgAC_DEFUN([LT_PROG_RC],
6994ad43ddacSmrg[AC_CHECK_TOOL(RC, windres,)
6995ad43ddacSmrg])
6996ad43ddacSmrg
6997ad43ddacSmrg# Old name:
6998ad43ddacSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
6999ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
7000ad43ddacSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
7001ad43ddacSmrg
7002ad43ddacSmrg
7003ad43ddacSmrg# _LT_DECL_EGREP
7004ad43ddacSmrg# --------------
7005ad43ddacSmrg# If we don't have a new enough Autoconf to choose the best grep
7006ad43ddacSmrg# available, choose the one first in the user's PATH.
7007ad43ddacSmrgm4_defun([_LT_DECL_EGREP],
7008ad43ddacSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
7009ad43ddacSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
7010ad43ddacSmrgtest -z "$GREP" && GREP=grep
7011ad43ddacSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7012ad43ddacSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
7013ad43ddacSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
7014ad43ddacSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7015ad43ddacSmrgAC_SUBST([GREP])
7016ad43ddacSmrg])
7017ad43ddacSmrg
7018ad43ddacSmrg
70192f39173dSmrg# _LT_DECL_OBJDUMP
70202f39173dSmrg# --------------
70212f39173dSmrg# If we don't have a new enough Autoconf to choose the best objdump
70222f39173dSmrg# available, choose the one first in the user's PATH.
70232f39173dSmrgm4_defun([_LT_DECL_OBJDUMP],
70242f39173dSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
70252f39173dSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
70262f39173dSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
70272f39173dSmrgAC_SUBST([OBJDUMP])
70282f39173dSmrg])
70292f39173dSmrg
70302f39173dSmrg
7031ad43ddacSmrg# _LT_DECL_SED
7032ad43ddacSmrg# ------------
7033ad43ddacSmrg# Check for a fully-functional sed program, that truncates
7034ad43ddacSmrg# as few characters as possible.  Prefer GNU sed if found.
7035ad43ddacSmrgm4_defun([_LT_DECL_SED],
7036ad43ddacSmrg[AC_PROG_SED
7037ad43ddacSmrgtest -z "$SED" && SED=sed
7038ad43ddacSmrgXsed="$SED -e 1s/^X//"
7039ad43ddacSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7040ad43ddacSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7041ad43ddacSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7042ad43ddacSmrg])# _LT_DECL_SED
7043ad43ddacSmrg
7044ad43ddacSmrgm4_ifndef([AC_PROG_SED], [
7045ad43ddacSmrg# NOTE: This macro has been submitted for inclusion into   #
7046ad43ddacSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7047ad43ddacSmrg#  a released version of Autoconf we should remove this    #
7048ad43ddacSmrg#  macro and use it instead.                               #
7049ad43ddacSmrg
7050ad43ddacSmrgm4_defun([AC_PROG_SED],
7051ad43ddacSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
7052ad43ddacSmrgAC_CACHE_VAL(lt_cv_path_SED,
7053ad43ddacSmrg[# Loop through the user's path and test for sed and gsed.
7054ad43ddacSmrg# Then use that list of sed's as ones to test for truncation.
7055ad43ddacSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7056ad43ddacSmrgfor as_dir in $PATH
7057ad43ddacSmrgdo
7058ad43ddacSmrg  IFS=$as_save_IFS
7059ad43ddacSmrg  test -z "$as_dir" && as_dir=.
7060ad43ddacSmrg  for lt_ac_prog in sed gsed; do
7061ad43ddacSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
7062ad43ddacSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7063ad43ddacSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7064ad43ddacSmrg      fi
7065ad43ddacSmrg    done
7066ad43ddacSmrg  done
7067ad43ddacSmrgdone
7068ad43ddacSmrgIFS=$as_save_IFS
7069ad43ddacSmrglt_ac_max=0
7070ad43ddacSmrglt_ac_count=0
7071ad43ddacSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7072ad43ddacSmrg# along with /bin/sed that truncates output.
7073ad43ddacSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7074ad43ddacSmrg  test ! -f $lt_ac_sed && continue
7075ad43ddacSmrg  cat /dev/null > conftest.in
7076ad43ddacSmrg  lt_ac_count=0
7077ad43ddacSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7078ad43ddacSmrg  # Check for GNU sed and select it if it is found.
7079ad43ddacSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7080ad43ddacSmrg    lt_cv_path_SED=$lt_ac_sed
7081ad43ddacSmrg    break
7082ad43ddacSmrg  fi
7083ad43ddacSmrg  while true; do
7084ad43ddacSmrg    cat conftest.in conftest.in >conftest.tmp
7085ad43ddacSmrg    mv conftest.tmp conftest.in
7086ad43ddacSmrg    cp conftest.in conftest.nl
7087ad43ddacSmrg    echo >>conftest.nl
7088ad43ddacSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7089ad43ddacSmrg    cmp -s conftest.out conftest.nl || break
7090ad43ddacSmrg    # 10000 chars as input seems more than enough
7091ad43ddacSmrg    test $lt_ac_count -gt 10 && break
7092ad43ddacSmrg    lt_ac_count=`expr $lt_ac_count + 1`
7093ad43ddacSmrg    if test $lt_ac_count -gt $lt_ac_max; then
7094ad43ddacSmrg      lt_ac_max=$lt_ac_count
7095ad43ddacSmrg      lt_cv_path_SED=$lt_ac_sed
7096ad43ddacSmrg    fi
7097ad43ddacSmrg  done
7098ad43ddacSmrgdone
7099ad43ddacSmrg])
7100ad43ddacSmrgSED=$lt_cv_path_SED
7101ad43ddacSmrgAC_SUBST([SED])
7102ad43ddacSmrgAC_MSG_RESULT([$SED])
7103ad43ddacSmrg])#AC_PROG_SED
7104ad43ddacSmrg])#m4_ifndef
7105209ff23fSmrg
7106ad43ddacSmrg# Old name:
7107ad43ddacSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7108ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
7109ad43ddacSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
7110209ff23fSmrg
7111209ff23fSmrg
7112ad43ddacSmrg# _LT_CHECK_SHELL_FEATURES
7113ad43ddacSmrg# ------------------------
7114ad43ddacSmrg# Find out whether the shell is Bourne or XSI compatible,
7115ad43ddacSmrg# or has some other useful features.
7116ad43ddacSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
7117ad43ddacSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7118ad43ddacSmrg# Try some XSI features
7119ad43ddacSmrgxsi_shell=no
7120ad43ddacSmrg( _lt_dummy="a/b/c"
7121ad43ddacSmrg  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7122ad43ddacSmrg      = c,a/b,, \
7123ad43ddacSmrg    && eval 'test $(( 1 + 1 )) -eq 2 \
7124ad43ddacSmrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7125ad43ddacSmrg  && xsi_shell=yes
7126ad43ddacSmrgAC_MSG_RESULT([$xsi_shell])
7127ad43ddacSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7128ad43ddacSmrg
7129ad43ddacSmrgAC_MSG_CHECKING([whether the shell understands "+="])
7130ad43ddacSmrglt_shell_append=no
7131ad43ddacSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7132ad43ddacSmrg    >/dev/null 2>&1 \
7133ad43ddacSmrg  && lt_shell_append=yes
7134ad43ddacSmrgAC_MSG_RESULT([$lt_shell_append])
7135ad43ddacSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7136ad43ddacSmrg
7137ad43ddacSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7138ad43ddacSmrg  lt_unset=unset
7139ad43ddacSmrgelse
7140ad43ddacSmrg  lt_unset=false
7141209ff23fSmrgfi
7142ad43ddacSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7143ad43ddacSmrg
7144ad43ddacSmrg# test EBCDIC or ASCII
7145ad43ddacSmrgcase `echo X|tr X '\101'` in
7146ad43ddacSmrg A) # ASCII based system
7147ad43ddacSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7148ad43ddacSmrg  lt_SP2NL='tr \040 \012'
7149ad43ddacSmrg  lt_NL2SP='tr \015\012 \040\040'
7150ad43ddacSmrg  ;;
7151ad43ddacSmrg *) # EBCDIC based system
7152ad43ddacSmrg  lt_SP2NL='tr \100 \n'
7153ad43ddacSmrg  lt_NL2SP='tr \r\n \100\100'
7154ad43ddacSmrg  ;;
7155209ff23fSmrgesac
7156ad43ddacSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7157ad43ddacSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7158ad43ddacSmrg])# _LT_CHECK_SHELL_FEATURES
7159209ff23fSmrg
7160209ff23fSmrg
7161ad43ddacSmrg# _LT_PROG_XSI_SHELLFNS
7162ad43ddacSmrg# ---------------------
7163ad43ddacSmrg# Bourne and XSI compatible variants of some useful shell functions.
7164ad43ddacSmrgm4_defun([_LT_PROG_XSI_SHELLFNS],
7165ad43ddacSmrg[case $xsi_shell in
7166ad43ddacSmrg  yes)
7167ad43ddacSmrg    cat << \_LT_EOF >> "$cfgfile"
7168ad43ddacSmrg
7169ad43ddacSmrg# func_dirname file append nondir_replacement
7170ad43ddacSmrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7171ad43ddacSmrg# otherwise set result to NONDIR_REPLACEMENT.
7172ad43ddacSmrgfunc_dirname ()
7173ad43ddacSmrg{
7174ad43ddacSmrg  case ${1} in
7175ad43ddacSmrg    */*) func_dirname_result="${1%/*}${2}" ;;
7176ad43ddacSmrg    *  ) func_dirname_result="${3}" ;;
7177ad43ddacSmrg  esac
7178ad43ddacSmrg}
7179209ff23fSmrg
7180ad43ddacSmrg# func_basename file
7181ad43ddacSmrgfunc_basename ()
7182ad43ddacSmrg{
7183ad43ddacSmrg  func_basename_result="${1##*/}"
7184ad43ddacSmrg}
7185ad43ddacSmrg
7186ad43ddacSmrg# func_dirname_and_basename file append nondir_replacement
7187ad43ddacSmrg# perform func_basename and func_dirname in a single function
7188ad43ddacSmrg# call:
7189ad43ddacSmrg#   dirname:  Compute the dirname of FILE.  If nonempty,
7190ad43ddacSmrg#             add APPEND to the result, otherwise set result
7191ad43ddacSmrg#             to NONDIR_REPLACEMENT.
7192ad43ddacSmrg#             value returned in "$func_dirname_result"
7193ad43ddacSmrg#   basename: Compute filename of FILE.
7194ad43ddacSmrg#             value retuned in "$func_basename_result"
7195ad43ddacSmrg# Implementation must be kept synchronized with func_dirname
7196ad43ddacSmrg# and func_basename. For efficiency, we do not delegate to
7197ad43ddacSmrg# those functions but instead duplicate the functionality here.
7198ad43ddacSmrgfunc_dirname_and_basename ()
7199ad43ddacSmrg{
7200ad43ddacSmrg  case ${1} in
7201ad43ddacSmrg    */*) func_dirname_result="${1%/*}${2}" ;;
7202ad43ddacSmrg    *  ) func_dirname_result="${3}" ;;
7203209ff23fSmrg  esac
7204ad43ddacSmrg  func_basename_result="${1##*/}"
7205ad43ddacSmrg}
7206ad43ddacSmrg
7207ad43ddacSmrg# func_stripname prefix suffix name
7208ad43ddacSmrg# strip PREFIX and SUFFIX off of NAME.
7209ad43ddacSmrg# PREFIX and SUFFIX must not contain globbing or regex special
7210ad43ddacSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7211ad43ddacSmrg# dot (in which case that matches only a dot).
7212ad43ddacSmrgfunc_stripname ()
7213ad43ddacSmrg{
7214ad43ddacSmrg  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7215ad43ddacSmrg  # positional parameters, so assign one to ordinary parameter first.
7216ad43ddacSmrg  func_stripname_result=${3}
7217ad43ddacSmrg  func_stripname_result=${func_stripname_result#"${1}"}
7218ad43ddacSmrg  func_stripname_result=${func_stripname_result%"${2}"}
7219ad43ddacSmrg}
7220ad43ddacSmrg
7221ad43ddacSmrg# func_opt_split
7222ad43ddacSmrgfunc_opt_split ()
7223ad43ddacSmrg{
7224ad43ddacSmrg  func_opt_split_opt=${1%%=*}
7225ad43ddacSmrg  func_opt_split_arg=${1#*=}
7226ad43ddacSmrg}
7227ad43ddacSmrg
7228ad43ddacSmrg# func_lo2o object
7229ad43ddacSmrgfunc_lo2o ()
7230ad43ddacSmrg{
7231ad43ddacSmrg  case ${1} in
7232ad43ddacSmrg    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7233ad43ddacSmrg    *)    func_lo2o_result=${1} ;;
7234209ff23fSmrg  esac
7235ad43ddacSmrg}
7236209ff23fSmrg
7237ad43ddacSmrg# func_xform libobj-or-source
7238ad43ddacSmrgfunc_xform ()
7239ad43ddacSmrg{
7240ad43ddacSmrg  func_xform_result=${1%.*}.lo
7241ad43ddacSmrg}
7242209ff23fSmrg
7243ad43ddacSmrg# func_arith arithmetic-term...
7244ad43ddacSmrgfunc_arith ()
7245ad43ddacSmrg{
7246ad43ddacSmrg  func_arith_result=$(( $[*] ))
7247ad43ddacSmrg}
7248209ff23fSmrg
7249ad43ddacSmrg# func_len string
7250ad43ddacSmrg# STRING may not start with a hyphen.
7251ad43ddacSmrgfunc_len ()
7252ad43ddacSmrg{
7253ad43ddacSmrg  func_len_result=${#1}
7254ad43ddacSmrg}
7255209ff23fSmrg
7256ad43ddacSmrg_LT_EOF
7257ad43ddacSmrg    ;;
7258ad43ddacSmrg  *) # Bourne compatible functions.
7259ad43ddacSmrg    cat << \_LT_EOF >> "$cfgfile"
7260209ff23fSmrg
7261ad43ddacSmrg# func_dirname file append nondir_replacement
7262ad43ddacSmrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7263ad43ddacSmrg# otherwise set result to NONDIR_REPLACEMENT.
7264ad43ddacSmrgfunc_dirname ()
7265ad43ddacSmrg{
7266ad43ddacSmrg  # Extract subdirectory from the argument.
7267ad43ddacSmrg  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7268ad43ddacSmrg  if test "X$func_dirname_result" = "X${1}"; then
7269ad43ddacSmrg    func_dirname_result="${3}"
7270ad43ddacSmrg  else
7271ad43ddacSmrg    func_dirname_result="$func_dirname_result${2}"
7272ad43ddacSmrg  fi
7273ad43ddacSmrg}
7274209ff23fSmrg
7275ad43ddacSmrg# func_basename file
7276ad43ddacSmrgfunc_basename ()
7277ad43ddacSmrg{
7278ad43ddacSmrg  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7279ad43ddacSmrg}
7280209ff23fSmrg
7281ad43ddacSmrgdnl func_dirname_and_basename
7282ad43ddacSmrgdnl A portable version of this function is already defined in general.m4sh
7283ad43ddacSmrgdnl so there is no need for it here.
7284ad43ddacSmrg
7285ad43ddacSmrg# func_stripname prefix suffix name
7286ad43ddacSmrg# strip PREFIX and SUFFIX off of NAME.
7287ad43ddacSmrg# PREFIX and SUFFIX must not contain globbing or regex special
7288ad43ddacSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7289ad43ddacSmrg# dot (in which case that matches only a dot).
7290ad43ddacSmrg# func_strip_suffix prefix name
7291ad43ddacSmrgfunc_stripname ()
7292ad43ddacSmrg{
7293ad43ddacSmrg  case ${2} in
7294ad43ddacSmrg    .*) func_stripname_result=`$ECHO "X${3}" \
7295ad43ddacSmrg           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7296ad43ddacSmrg    *)  func_stripname_result=`$ECHO "X${3}" \
7297ad43ddacSmrg           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7298ad43ddacSmrg  esac
7299ad43ddacSmrg}
7300209ff23fSmrg
7301ad43ddacSmrg# sed scripts:
7302ad43ddacSmrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7303ad43ddacSmrgmy_sed_long_arg='1s/^-[[^=]]*=//'
7304209ff23fSmrg
7305ad43ddacSmrg# func_opt_split
7306ad43ddacSmrgfunc_opt_split ()
7307ad43ddacSmrg{
7308ad43ddacSmrg  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7309ad43ddacSmrg  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7310ad43ddacSmrg}
7311209ff23fSmrg
7312ad43ddacSmrg# func_lo2o object
7313ad43ddacSmrgfunc_lo2o ()
7314ad43ddacSmrg{
7315ad43ddacSmrg  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7316ad43ddacSmrg}
7317209ff23fSmrg
7318ad43ddacSmrg# func_xform libobj-or-source
7319ad43ddacSmrgfunc_xform ()
7320ad43ddacSmrg{
7321ad43ddacSmrg  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7322ad43ddacSmrg}
7323209ff23fSmrg
7324ad43ddacSmrg# func_arith arithmetic-term...
7325ad43ddacSmrgfunc_arith ()
7326ad43ddacSmrg{
7327ad43ddacSmrg  func_arith_result=`expr "$[@]"`
7328ad43ddacSmrg}
7329209ff23fSmrg
7330ad43ddacSmrg# func_len string
7331ad43ddacSmrg# STRING may not start with a hyphen.
7332ad43ddacSmrgfunc_len ()
7333ad43ddacSmrg{
7334ad43ddacSmrg  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7335ad43ddacSmrg}
7336209ff23fSmrg
7337ad43ddacSmrg_LT_EOF
7338ad43ddacSmrgesac
7339209ff23fSmrg
7340ad43ddacSmrgcase $lt_shell_append in
7341ad43ddacSmrg  yes)
7342ad43ddacSmrg    cat << \_LT_EOF >> "$cfgfile"
7343209ff23fSmrg
7344ad43ddacSmrg# func_append var value
7345ad43ddacSmrg# Append VALUE to the end of shell variable VAR.
7346ad43ddacSmrgfunc_append ()
7347ad43ddacSmrg{
7348ad43ddacSmrg  eval "$[1]+=\$[2]"
7349ad43ddacSmrg}
7350ad43ddacSmrg_LT_EOF
7351ad43ddacSmrg    ;;
7352ad43ddacSmrg  *)
7353ad43ddacSmrg    cat << \_LT_EOF >> "$cfgfile"
7354209ff23fSmrg
7355ad43ddacSmrg# func_append var value
7356ad43ddacSmrg# Append VALUE to the end of shell variable VAR.
7357ad43ddacSmrgfunc_append ()
7358ad43ddacSmrg{
7359ad43ddacSmrg  eval "$[1]=\$$[1]\$[2]"
7360ad43ddacSmrg}
7361209ff23fSmrg
7362209ff23fSmrg_LT_EOF
7363ad43ddacSmrg    ;;
7364ad43ddacSmrg  esac
7365ad43ddacSmrg])
7366ad43ddacSmrg
7367ad43ddacSmrg# Helper functions for option handling.                    -*- Autoconf -*-
7368ad43ddacSmrg#
7369ad43ddacSmrg#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7370ad43ddacSmrg#   Written by Gary V. Vaughan, 2004
7371ad43ddacSmrg#
7372ad43ddacSmrg# This file is free software; the Free Software Foundation gives
7373ad43ddacSmrg# unlimited permission to copy and/or distribute it, with or without
7374ad43ddacSmrg# modifications, as long as this notice is preserved.
7375ad43ddacSmrg
7376ad43ddacSmrg# serial 6 ltoptions.m4
7377ad43ddacSmrg
7378ad43ddacSmrg# This is to help aclocal find these macros, as it can't see m4_define.
7379ad43ddacSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7380ad43ddacSmrg
7381209ff23fSmrg
7382ad43ddacSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
7383ad43ddacSmrg# ------------------------------------------
7384ad43ddacSmrgm4_define([_LT_MANGLE_OPTION],
7385ad43ddacSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
7386209ff23fSmrg
7387209ff23fSmrg
7388ad43ddacSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
7389ad43ddacSmrg# ---------------------------------------
7390ad43ddacSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
7391ad43ddacSmrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
7392ad43ddacSmrg# saved as a flag.
7393ad43ddacSmrgm4_define([_LT_SET_OPTION],
7394ad43ddacSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
7395ad43ddacSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
7396ad43ddacSmrg        _LT_MANGLE_DEFUN([$1], [$2]),
7397ad43ddacSmrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
7398ad43ddacSmrg])
7399209ff23fSmrg
7400209ff23fSmrg
7401ad43ddacSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
7402ad43ddacSmrg# ------------------------------------------------------------
7403ad43ddacSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7404ad43ddacSmrgm4_define([_LT_IF_OPTION],
7405ad43ddacSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
7406ad43ddacSmrg
7407ad43ddacSmrg
7408ad43ddacSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
7409ad43ddacSmrg# -------------------------------------------------------
7410ad43ddacSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
7411ad43ddacSmrg# are set.
7412ad43ddacSmrgm4_define([_LT_UNLESS_OPTIONS],
7413ad43ddacSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7414ad43ddacSmrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
7415ad43ddacSmrg		      [m4_define([$0_found])])])[]dnl
7416ad43ddacSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
7417ad43ddacSmrg])[]dnl
7418ad43ddacSmrg])
7419209ff23fSmrg
7420209ff23fSmrg
7421ad43ddacSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
7422ad43ddacSmrg# ----------------------------------------
7423ad43ddacSmrg# OPTION-LIST is a space-separated list of Libtool options associated
7424ad43ddacSmrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
7425ad43ddacSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
7426ad43ddacSmrg# the unknown option and exit.
7427ad43ddacSmrgm4_defun([_LT_SET_OPTIONS],
7428ad43ddacSmrg[# Set options
7429ad43ddacSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7430ad43ddacSmrg    [_LT_SET_OPTION([$1], _LT_Option)])
7431ad43ddacSmrg
7432ad43ddacSmrgm4_if([$1],[LT_INIT],[
7433ad43ddacSmrg  dnl
7434ad43ddacSmrg  dnl Simply set some default values (i.e off) if boolean options were not
7435ad43ddacSmrg  dnl specified:
7436ad43ddacSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
7437ad43ddacSmrg  ])
7438ad43ddacSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
7439ad43ddacSmrg  ])
7440ad43ddacSmrg  dnl
7441ad43ddacSmrg  dnl If no reference was made to various pairs of opposing options, then
7442ad43ddacSmrg  dnl we run the default mode handler for the pair.  For example, if neither
7443ad43ddacSmrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
7444ad43ddacSmrg  dnl archives by default:
7445ad43ddacSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
7446ad43ddacSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
7447ad43ddacSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
7448ad43ddacSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
7449ad43ddacSmrg  		   [_LT_ENABLE_FAST_INSTALL])
7450ad43ddacSmrg  ])
7451ad43ddacSmrg])# _LT_SET_OPTIONS
7452209ff23fSmrg
7453209ff23fSmrg
7454209ff23fSmrg
7455ad43ddacSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
7456ad43ddacSmrg# -----------------------------------------
7457ad43ddacSmrgm4_define([_LT_MANGLE_DEFUN],
7458ad43ddacSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
7459209ff23fSmrg
7460209ff23fSmrg
7461ad43ddacSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
7462ad43ddacSmrg# -----------------------------------------------
7463ad43ddacSmrgm4_define([LT_OPTION_DEFINE],
7464ad43ddacSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
7465ad43ddacSmrg])# LT_OPTION_DEFINE
7466209ff23fSmrg
7467209ff23fSmrg
7468ad43ddacSmrg# dlopen
7469ad43ddacSmrg# ------
7470ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
7471ad43ddacSmrg])
7472209ff23fSmrg
7473ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
7474ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], [dlopen])
7475ad43ddacSmrgAC_DIAGNOSE([obsolete],
7476ad43ddacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7477ad43ddacSmrgput the `dlopen' option into LT_INIT's first parameter.])
7478ad43ddacSmrg])
7479209ff23fSmrg
7480ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
7481ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
7482209ff23fSmrg
7483209ff23fSmrg
7484ad43ddacSmrg# win32-dll
7485ad43ddacSmrg# ---------
7486ad43ddacSmrg# Declare package support for building win32 dll's.
7487ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
7488ad43ddacSmrg[enable_win32_dll=yes
7489209ff23fSmrg
7490ad43ddacSmrgcase $host in
74912f39173dSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
7492ad43ddacSmrg  AC_CHECK_TOOL(AS, as, false)
7493ad43ddacSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7494ad43ddacSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
7495ad43ddacSmrg  ;;
7496ad43ddacSmrgesac
7497209ff23fSmrg
7498ad43ddacSmrgtest -z "$AS" && AS=as
7499ad43ddacSmrg_LT_DECL([], [AS],      [0], [Assembler program])dnl
7500209ff23fSmrg
7501ad43ddacSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
7502ad43ddacSmrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
7503209ff23fSmrg
7504ad43ddacSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
7505ad43ddacSmrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
7506ad43ddacSmrg])# win32-dll
7507209ff23fSmrg
7508ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
7509ad43ddacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7510ad43ddacSmrg_LT_SET_OPTION([LT_INIT], [win32-dll])
7511ad43ddacSmrgAC_DIAGNOSE([obsolete],
7512ad43ddacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7513ad43ddacSmrgput the `win32-dll' option into LT_INIT's first parameter.])
7514ad43ddacSmrg])
7515209ff23fSmrg
7516ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
7517ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
7518ad43ddacSmrg
7519ad43ddacSmrg
7520ad43ddacSmrg# _LT_ENABLE_SHARED([DEFAULT])
7521ad43ddacSmrg# ----------------------------
7522ad43ddacSmrg# implement the --enable-shared flag, and supports the `shared' and
7523ad43ddacSmrg# `disable-shared' LT_INIT options.
7524ad43ddacSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7525ad43ddacSmrgm4_define([_LT_ENABLE_SHARED],
7526ad43ddacSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
7527ad43ddacSmrgAC_ARG_ENABLE([shared],
7528ad43ddacSmrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7529ad43ddacSmrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
7530ad43ddacSmrg    [p=${PACKAGE-default}
7531ad43ddacSmrg    case $enableval in
7532ad43ddacSmrg    yes) enable_shared=yes ;;
7533ad43ddacSmrg    no) enable_shared=no ;;
7534ad43ddacSmrg    *)
7535ad43ddacSmrg      enable_shared=no
7536ad43ddacSmrg      # Look at the argument we got.  We use all the common list separators.
7537ad43ddacSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7538ad43ddacSmrg      for pkg in $enableval; do
7539ad43ddacSmrg	IFS="$lt_save_ifs"
7540ad43ddacSmrg	if test "X$pkg" = "X$p"; then
7541ad43ddacSmrg	  enable_shared=yes
7542ad43ddacSmrg	fi
7543ad43ddacSmrg      done
7544ad43ddacSmrg      IFS="$lt_save_ifs"
7545209ff23fSmrg      ;;
7546ad43ddacSmrg    esac],
7547ad43ddacSmrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
7548209ff23fSmrg
7549ad43ddacSmrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
7550ad43ddacSmrg	[Whether or not to build shared libraries])
7551ad43ddacSmrg])# _LT_ENABLE_SHARED
7552209ff23fSmrg
7553ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
7554ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
7555209ff23fSmrg
7556ad43ddacSmrg# Old names:
7557ad43ddacSmrgAC_DEFUN([AC_ENABLE_SHARED],
7558ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
7559ad43ddacSmrg])
7560209ff23fSmrg
7561ad43ddacSmrgAC_DEFUN([AC_DISABLE_SHARED],
7562ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
7563ad43ddacSmrg])
7564209ff23fSmrg
7565ad43ddacSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7566ad43ddacSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7567209ff23fSmrg
7568ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
7569ad43ddacSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
7570ad43ddacSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
7571ad43ddacSmrg
7572ad43ddacSmrg
7573ad43ddacSmrg
7574ad43ddacSmrg# _LT_ENABLE_STATIC([DEFAULT])
7575ad43ddacSmrg# ----------------------------
7576ad43ddacSmrg# implement the --enable-static flag, and support the `static' and
7577ad43ddacSmrg# `disable-static' LT_INIT options.
7578ad43ddacSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7579ad43ddacSmrgm4_define([_LT_ENABLE_STATIC],
7580ad43ddacSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
7581ad43ddacSmrgAC_ARG_ENABLE([static],
7582ad43ddacSmrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7583ad43ddacSmrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
7584ad43ddacSmrg    [p=${PACKAGE-default}
7585ad43ddacSmrg    case $enableval in
7586ad43ddacSmrg    yes) enable_static=yes ;;
7587ad43ddacSmrg    no) enable_static=no ;;
7588ad43ddacSmrg    *)
7589ad43ddacSmrg     enable_static=no
7590ad43ddacSmrg      # Look at the argument we got.  We use all the common list separators.
7591ad43ddacSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7592ad43ddacSmrg      for pkg in $enableval; do
7593ad43ddacSmrg	IFS="$lt_save_ifs"
7594ad43ddacSmrg	if test "X$pkg" = "X$p"; then
7595ad43ddacSmrg	  enable_static=yes
7596ad43ddacSmrg	fi
7597ad43ddacSmrg      done
7598ad43ddacSmrg      IFS="$lt_save_ifs"
7599209ff23fSmrg      ;;
7600ad43ddacSmrg    esac],
7601ad43ddacSmrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
7602209ff23fSmrg
7603ad43ddacSmrg    _LT_DECL([build_old_libs], [enable_static], [0],
7604ad43ddacSmrg	[Whether or not to build static libraries])
7605ad43ddacSmrg])# _LT_ENABLE_STATIC
7606209ff23fSmrg
7607ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
7608ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
7609209ff23fSmrg
7610ad43ddacSmrg# Old names:
7611ad43ddacSmrgAC_DEFUN([AC_ENABLE_STATIC],
7612ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
7613ad43ddacSmrg])
7614209ff23fSmrg
7615ad43ddacSmrgAC_DEFUN([AC_DISABLE_STATIC],
7616ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], [disable-static])
7617ad43ddacSmrg])
7618209ff23fSmrg
7619ad43ddacSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7620ad43ddacSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7621209ff23fSmrg
7622ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
7623ad43ddacSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
7624ad43ddacSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
7625ad43ddacSmrg
7626ad43ddacSmrg
7627ad43ddacSmrg
7628ad43ddacSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
7629ad43ddacSmrg# ----------------------------------
7630ad43ddacSmrg# implement the --enable-fast-install flag, and support the `fast-install'
7631ad43ddacSmrg# and `disable-fast-install' LT_INIT options.
7632ad43ddacSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7633ad43ddacSmrgm4_define([_LT_ENABLE_FAST_INSTALL],
7634ad43ddacSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
7635ad43ddacSmrgAC_ARG_ENABLE([fast-install],
7636ad43ddacSmrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7637ad43ddacSmrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7638ad43ddacSmrg    [p=${PACKAGE-default}
7639ad43ddacSmrg    case $enableval in
7640ad43ddacSmrg    yes) enable_fast_install=yes ;;
7641ad43ddacSmrg    no) enable_fast_install=no ;;
7642ad43ddacSmrg    *)
7643ad43ddacSmrg      enable_fast_install=no
7644ad43ddacSmrg      # Look at the argument we got.  We use all the common list separators.
7645ad43ddacSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7646ad43ddacSmrg      for pkg in $enableval; do
7647ad43ddacSmrg	IFS="$lt_save_ifs"
7648ad43ddacSmrg	if test "X$pkg" = "X$p"; then
7649ad43ddacSmrg	  enable_fast_install=yes
7650209ff23fSmrg	fi
7651ad43ddacSmrg      done
7652ad43ddacSmrg      IFS="$lt_save_ifs"
7653209ff23fSmrg      ;;
7654ad43ddacSmrg    esac],
7655ad43ddacSmrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
7656209ff23fSmrg
7657ad43ddacSmrg_LT_DECL([fast_install], [enable_fast_install], [0],
7658ad43ddacSmrg	 [Whether or not to optimize for fast installation])dnl
7659ad43ddacSmrg])# _LT_ENABLE_FAST_INSTALL
7660209ff23fSmrg
7661ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
7662ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
7663209ff23fSmrg
7664ad43ddacSmrg# Old names:
7665ad43ddacSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
7666ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
7667ad43ddacSmrgAC_DIAGNOSE([obsolete],
7668ad43ddacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
7669ad43ddacSmrgthe `fast-install' option into LT_INIT's first parameter.])
7670ad43ddacSmrg])
7671209ff23fSmrg
7672ad43ddacSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
7673ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
7674ad43ddacSmrgAC_DIAGNOSE([obsolete],
7675ad43ddacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
7676ad43ddacSmrgthe `disable-fast-install' option into LT_INIT's first parameter.])
7677ad43ddacSmrg])
7678209ff23fSmrg
7679ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
7680ad43ddacSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
7681ad43ddacSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
7682209ff23fSmrg
7683209ff23fSmrg
7684ad43ddacSmrg# _LT_WITH_PIC([MODE])
7685ad43ddacSmrg# --------------------
7686ad43ddacSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
7687ad43ddacSmrg# LT_INIT options.
7688ad43ddacSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
7689ad43ddacSmrgm4_define([_LT_WITH_PIC],
7690ad43ddacSmrg[AC_ARG_WITH([pic],
7691ad43ddacSmrg    [AS_HELP_STRING([--with-pic],
7692ad43ddacSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
7693ad43ddacSmrg    [pic_mode="$withval"],
7694ad43ddacSmrg    [pic_mode=default])
7695209ff23fSmrg
7696ad43ddacSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
7697209ff23fSmrg
7698ad43ddacSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
7699ad43ddacSmrg])# _LT_WITH_PIC
7700209ff23fSmrg
7701ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
7702ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
7703ad43ddacSmrg
7704ad43ddacSmrg# Old name:
7705ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
7706ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], [pic-only])
7707ad43ddacSmrgAC_DIAGNOSE([obsolete],
7708ad43ddacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7709ad43ddacSmrgput the `pic-only' option into LT_INIT's first parameter.])
7710209ff23fSmrg])
7711209ff23fSmrg
7712ad43ddacSmrgdnl aclocal-1.4 backwards compatibility:
7713ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
7714209ff23fSmrg
7715209ff23fSmrg
7716ad43ddacSmrgm4_define([_LTDL_MODE], [])
7717ad43ddacSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
7718ad43ddacSmrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
7719ad43ddacSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
7720ad43ddacSmrg		 [m4_define([_LTDL_MODE], [recursive])])
7721ad43ddacSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
7722ad43ddacSmrg		 [m4_define([_LTDL_MODE], [subproject])])
7723209ff23fSmrg
7724ad43ddacSmrgm4_define([_LTDL_TYPE], [])
7725ad43ddacSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
7726ad43ddacSmrg		 [m4_define([_LTDL_TYPE], [installable])])
7727ad43ddacSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
7728ad43ddacSmrg		 [m4_define([_LTDL_TYPE], [convenience])])
7729209ff23fSmrg
7730ad43ddacSmrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
7731209ff23fSmrg#
77322f39173dSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
77332f39173dSmrg# Written by Gary V. Vaughan, 2004
7734209ff23fSmrg#
7735ad43ddacSmrg# This file is free software; the Free Software Foundation gives
7736ad43ddacSmrg# unlimited permission to copy and/or distribute it, with or without
7737ad43ddacSmrg# modifications, as long as this notice is preserved.
7738ad43ddacSmrg
77392f39173dSmrg# serial 6 ltsugar.m4
7740ad43ddacSmrg
7741ad43ddacSmrg# This is to help aclocal find these macros, as it can't see m4_define.
7742ad43ddacSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
7743ad43ddacSmrg
7744ad43ddacSmrg
7745ad43ddacSmrg# lt_join(SEP, ARG1, [ARG2...])
7746ad43ddacSmrg# -----------------------------
7747ad43ddacSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
7748ad43ddacSmrg# associated separator.
7749ad43ddacSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
7750ad43ddacSmrg# versions in m4sugar had bugs.
7751ad43ddacSmrgm4_define([lt_join],
7752ad43ddacSmrg[m4_if([$#], [1], [],
7753ad43ddacSmrg       [$#], [2], [[$2]],
7754ad43ddacSmrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
7755ad43ddacSmrgm4_define([_lt_join],
7756ad43ddacSmrg[m4_if([$#$2], [2], [],
7757ad43ddacSmrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
7758ad43ddacSmrg
7759ad43ddacSmrg
7760ad43ddacSmrg# lt_car(LIST)
7761ad43ddacSmrg# lt_cdr(LIST)
7762ad43ddacSmrg# ------------
7763ad43ddacSmrg# Manipulate m4 lists.
7764ad43ddacSmrg# These macros are necessary as long as will still need to support
7765ad43ddacSmrg# Autoconf-2.59 which quotes differently.
7766ad43ddacSmrgm4_define([lt_car], [[$1]])
7767ad43ddacSmrgm4_define([lt_cdr],
7768ad43ddacSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
7769ad43ddacSmrg       [$#], 1, [],
7770ad43ddacSmrg       [m4_dquote(m4_shift($@))])])
7771ad43ddacSmrgm4_define([lt_unquote], $1)
7772ad43ddacSmrg
7773ad43ddacSmrg
7774ad43ddacSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
7775ad43ddacSmrg# ------------------------------------------
7776ad43ddacSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
7777ad43ddacSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
7778ad43ddacSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
7779ad43ddacSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
7780ad43ddacSmrg# than defined and empty).
7781209ff23fSmrg#
7782ad43ddacSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
7783ad43ddacSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
7784ad43ddacSmrgm4_define([lt_append],
7785ad43ddacSmrg[m4_define([$1],
7786ad43ddacSmrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
7787ad43ddacSmrg
7788ad43ddacSmrg
7789ad43ddacSmrg
7790ad43ddacSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
7791ad43ddacSmrg# ----------------------------------------------------------
7792ad43ddacSmrg# Produce a SEP delimited list of all paired combinations of elements of
7793ad43ddacSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
7794ad43ddacSmrg# has the form PREFIXmINFIXSUFFIXn.
77952f39173dSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
7796ad43ddacSmrgm4_define([lt_combine],
77972f39173dSmrg[m4_if(m4_eval([$# > 3]), [1],
77982f39173dSmrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
77992f39173dSmrg[[m4_foreach([_Lt_prefix], [$2],
78002f39173dSmrg	     [m4_foreach([_Lt_suffix],
78012f39173dSmrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
78022f39173dSmrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
7803209ff23fSmrg
7804209ff23fSmrg
7805ad43ddacSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
7806ad43ddacSmrg# -----------------------------------------------------------------------
7807ad43ddacSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
7808ad43ddacSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
7809ad43ddacSmrgm4_define([lt_if_append_uniq],
7810ad43ddacSmrg[m4_ifdef([$1],
7811ad43ddacSmrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
7812ad43ddacSmrg		 [lt_append([$1], [$2], [$3])$4],
7813ad43ddacSmrg		 [$5])],
7814ad43ddacSmrg	  [lt_append([$1], [$2], [$3])$4])])
7815209ff23fSmrg
7816209ff23fSmrg
7817ad43ddacSmrg# lt_dict_add(DICT, KEY, VALUE)
7818ad43ddacSmrg# -----------------------------
7819ad43ddacSmrgm4_define([lt_dict_add],
7820ad43ddacSmrg[m4_define([$1($2)], [$3])])
7821209ff23fSmrg
7822209ff23fSmrg
7823ad43ddacSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
7824ad43ddacSmrg# --------------------------------------------
7825ad43ddacSmrgm4_define([lt_dict_add_subkey],
7826ad43ddacSmrg[m4_define([$1($2:$3)], [$4])])
7827209ff23fSmrg
7828209ff23fSmrg
7829ad43ddacSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
7830ad43ddacSmrg# ----------------------------------
7831ad43ddacSmrgm4_define([lt_dict_fetch],
7832ad43ddacSmrg[m4_ifval([$3],
7833ad43ddacSmrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
7834ad43ddacSmrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
7835209ff23fSmrg
7836209ff23fSmrg
7837ad43ddacSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
7838ad43ddacSmrg# -----------------------------------------------------------------
7839ad43ddacSmrgm4_define([lt_if_dict_fetch],
7840ad43ddacSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
7841ad43ddacSmrg	[$5],
7842ad43ddacSmrg    [$6])])
7843209ff23fSmrg
7844209ff23fSmrg
7845ad43ddacSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
7846ad43ddacSmrg# --------------------------------------------------------------
7847ad43ddacSmrgm4_define([lt_dict_filter],
7848ad43ddacSmrg[m4_if([$5], [], [],
7849ad43ddacSmrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
7850ad43ddacSmrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
7851ad43ddacSmrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
7852209ff23fSmrg])
7853ad43ddacSmrg
7854ad43ddacSmrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
7855ad43ddacSmrg#
7856ad43ddacSmrg#   Copyright (C) 2004 Free Software Foundation, Inc.
7857ad43ddacSmrg#   Written by Scott James Remnant, 2004
7858ad43ddacSmrg#
7859ad43ddacSmrg# This file is free software; the Free Software Foundation gives
7860ad43ddacSmrg# unlimited permission to copy and/or distribute it, with or without
7861ad43ddacSmrg# modifications, as long as this notice is preserved.
7862ad43ddacSmrg
7863ad43ddacSmrg# Generated from ltversion.in.
7864ad43ddacSmrg
78652f39173dSmrg# serial 3017 ltversion.m4
7866ad43ddacSmrg# This file is part of GNU Libtool
7867ad43ddacSmrg
78682f39173dSmrgm4_define([LT_PACKAGE_VERSION], [2.2.6b])
78692f39173dSmrgm4_define([LT_PACKAGE_REVISION], [1.3017])
7870ad43ddacSmrg
7871ad43ddacSmrgAC_DEFUN([LTVERSION_VERSION],
78722f39173dSmrg[macro_version='2.2.6b'
78732f39173dSmrgmacro_revision='1.3017'
7874ad43ddacSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
7875ad43ddacSmrg_LT_DECL(, macro_revision, 0)
7876209ff23fSmrg])
7877209ff23fSmrg
7878ad43ddacSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
7879ad43ddacSmrg#
7880ad43ddacSmrg#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
7881ad43ddacSmrg#   Written by Scott James Remnant, 2004.
7882ad43ddacSmrg#
7883ad43ddacSmrg# This file is free software; the Free Software Foundation gives
7884ad43ddacSmrg# unlimited permission to copy and/or distribute it, with or without
7885ad43ddacSmrg# modifications, as long as this notice is preserved.
7886ad43ddacSmrg
7887ad43ddacSmrg# serial 4 lt~obsolete.m4
7888ad43ddacSmrg
7889ad43ddacSmrg# These exist entirely to fool aclocal when bootstrapping libtool.
7890ad43ddacSmrg#
7891ad43ddacSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
7892ad43ddacSmrg# which have later been changed to m4_define as they aren't part of the
7893ad43ddacSmrg# exported API, or moved to Autoconf or Automake where they belong.
7894ad43ddacSmrg#
7895ad43ddacSmrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
7896ad43ddacSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
7897ad43ddacSmrg# using a macro with the same name in our local m4/libtool.m4 it'll
7898ad43ddacSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
7899ad43ddacSmrg# and doesn't know about Autoconf macros at all.)
7900ad43ddacSmrg#
7901ad43ddacSmrg# So we provide this file, which has a silly filename so it's always
7902ad43ddacSmrg# included after everything else.  This provides aclocal with the
7903ad43ddacSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
7904ad43ddacSmrg# because those macros already exist, or will be overwritten later.
7905ad43ddacSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
7906ad43ddacSmrg#
7907ad43ddacSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
7908ad43ddacSmrg# Yes, that means every name once taken will need to remain here until
7909ad43ddacSmrg# we give up compatibility with versions before 1.7, at which point
7910ad43ddacSmrg# we need to keep only those names which we still refer to.
7911ad43ddacSmrg
7912ad43ddacSmrg# This is to help aclocal find these macros, as it can't see m4_define.
7913ad43ddacSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
7914ad43ddacSmrg
7915ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
7916ad43ddacSmrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
7917ad43ddacSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
7918ad43ddacSmrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
7919ad43ddacSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
7920ad43ddacSmrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
7921ad43ddacSmrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
7922ad43ddacSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
7923ad43ddacSmrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
7924ad43ddacSmrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
7925ad43ddacSmrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
7926ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
7927ad43ddacSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
7928ad43ddacSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
7929ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
7930ad43ddacSmrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
7931ad43ddacSmrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
7932ad43ddacSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
7933ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
7934ad43ddacSmrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
7935ad43ddacSmrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
7936ad43ddacSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
7937ad43ddacSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
7938ad43ddacSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
7939ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
7940ad43ddacSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
7941ad43ddacSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
7942ad43ddacSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
7943ad43ddacSmrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
7944ad43ddacSmrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
7945ad43ddacSmrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
7946ad43ddacSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
7947ad43ddacSmrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
7948ad43ddacSmrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
7949ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
7950ad43ddacSmrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
7951ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
7952ad43ddacSmrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
7953ad43ddacSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
7954ad43ddacSmrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
7955ad43ddacSmrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
7956ad43ddacSmrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
7957ad43ddacSmrgm4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
7958ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
7959ad43ddacSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
7960ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
7961ad43ddacSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
7962ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
7963ad43ddacSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
7964ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
7965ad43ddacSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
7966ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
7967ad43ddacSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
7968ad43ddacSmrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
7969ad43ddacSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
7970ad43ddacSmrg
7971209ff23fSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
7972209ff23fSmrg# 
7973209ff23fSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7974209ff23fSmrg#
7975209ff23fSmrg# This program is free software; you can redistribute it and/or modify
7976209ff23fSmrg# it under the terms of the GNU General Public License as published by
7977209ff23fSmrg# the Free Software Foundation; either version 2 of the License, or
7978209ff23fSmrg# (at your option) any later version.
7979209ff23fSmrg#
7980209ff23fSmrg# This program is distributed in the hope that it will be useful, but
7981209ff23fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
7982209ff23fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7983209ff23fSmrg# General Public License for more details.
7984209ff23fSmrg#
7985209ff23fSmrg# You should have received a copy of the GNU General Public License
7986209ff23fSmrg# along with this program; if not, write to the Free Software
7987209ff23fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7988209ff23fSmrg#
7989209ff23fSmrg# As a special exception to the GNU General Public License, if you
7990209ff23fSmrg# distribute this file as part of a program that contains a
7991209ff23fSmrg# configuration script generated by Autoconf, you may include it under
7992209ff23fSmrg# the same distribution terms that you use for the rest of that program.
7993209ff23fSmrg
7994209ff23fSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
7995209ff23fSmrg# ----------------------------------
7996209ff23fSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
7997209ff23fSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7998209ff23fSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7999209ff23fSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8000209ff23fSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8001209ff23fSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8002209ff23fSmrgfi
8003209ff23fSmrgif test -n "$PKG_CONFIG"; then
8004209ff23fSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
8005209ff23fSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8006209ff23fSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8007209ff23fSmrg		AC_MSG_RESULT([yes])
8008209ff23fSmrg	else
8009209ff23fSmrg		AC_MSG_RESULT([no])
8010209ff23fSmrg		PKG_CONFIG=""
8011209ff23fSmrg	fi
8012209ff23fSmrg		
8013209ff23fSmrgfi[]dnl
8014209ff23fSmrg])# PKG_PROG_PKG_CONFIG
8015209ff23fSmrg
8016209ff23fSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8017209ff23fSmrg#
8018209ff23fSmrg# Check to see whether a particular set of modules exists.  Similar
8019209ff23fSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8020209ff23fSmrg#
8021209ff23fSmrg#
8022209ff23fSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8023209ff23fSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
8024209ff23fSmrg# PKG_CHECK_EXISTS manually
8025209ff23fSmrg# --------------------------------------------------------------
8026209ff23fSmrgAC_DEFUN([PKG_CHECK_EXISTS],
8027209ff23fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8028209ff23fSmrgif test -n "$PKG_CONFIG" && \
8029209ff23fSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8030209ff23fSmrg  m4_ifval([$2], [$2], [:])
8031209ff23fSmrgm4_ifvaln([$3], [else
8032209ff23fSmrg  $3])dnl
8033209ff23fSmrgfi])
8034209ff23fSmrg
8035209ff23fSmrg
8036209ff23fSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8037209ff23fSmrg# ---------------------------------------------
8038209ff23fSmrgm4_define([_PKG_CONFIG],
80392f39173dSmrg[if test -n "$$1"; then
80402f39173dSmrg    pkg_cv_[]$1="$$1"
80412f39173dSmrg elif test -n "$PKG_CONFIG"; then
80422f39173dSmrg    PKG_CHECK_EXISTS([$3],
80432f39173dSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
80442f39173dSmrg		     [pkg_failed=yes])
80452f39173dSmrg else
80462f39173dSmrg    pkg_failed=untried
8047209ff23fSmrgfi[]dnl
8048209ff23fSmrg])# _PKG_CONFIG
8049209ff23fSmrg
8050209ff23fSmrg# _PKG_SHORT_ERRORS_SUPPORTED
8051209ff23fSmrg# -----------------------------
8052209ff23fSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8053209ff23fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8054209ff23fSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8055209ff23fSmrg        _pkg_short_errors_supported=yes
8056209ff23fSmrgelse
8057209ff23fSmrg        _pkg_short_errors_supported=no
8058209ff23fSmrgfi[]dnl
8059209ff23fSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
8060209ff23fSmrg
8061209ff23fSmrg
8062209ff23fSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8063209ff23fSmrg# [ACTION-IF-NOT-FOUND])
8064209ff23fSmrg#
8065209ff23fSmrg#
8066209ff23fSmrg# Note that if there is a possibility the first call to
8067209ff23fSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
8068209ff23fSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8069209ff23fSmrg#
8070209ff23fSmrg#
8071209ff23fSmrg# --------------------------------------------------------------
8072209ff23fSmrgAC_DEFUN([PKG_CHECK_MODULES],
8073209ff23fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8074209ff23fSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8075209ff23fSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8076209ff23fSmrg
8077209ff23fSmrgpkg_failed=no
8078209ff23fSmrgAC_MSG_CHECKING([for $1])
8079209ff23fSmrg
8080209ff23fSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8081209ff23fSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8082209ff23fSmrg
8083209ff23fSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8084209ff23fSmrgand $1[]_LIBS to avoid the need to call pkg-config.
8085209ff23fSmrgSee the pkg-config man page for more details.])
8086209ff23fSmrg
8087209ff23fSmrgif test $pkg_failed = yes; then
8088209ff23fSmrg        _PKG_SHORT_ERRORS_SUPPORTED
8089209ff23fSmrg        if test $_pkg_short_errors_supported = yes; then
80902f39173dSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
8091209ff23fSmrg        else 
80922f39173dSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
8093209ff23fSmrg        fi
8094209ff23fSmrg	# Put the nasty error message in config.log where it belongs
8095209ff23fSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8096209ff23fSmrg
8097209ff23fSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
8098209ff23fSmrg[Package requirements ($2) were not met:
8099209ff23fSmrg
8100209ff23fSmrg$$1_PKG_ERRORS
8101209ff23fSmrg
8102209ff23fSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
8103209ff23fSmrginstalled software in a non-standard prefix.
8104209ff23fSmrg
8105209ff23fSmrg_PKG_TEXT
8106209ff23fSmrg])],
8107209ff23fSmrg		[AC_MSG_RESULT([no])
8108209ff23fSmrg                $4])
8109209ff23fSmrgelif test $pkg_failed = untried; then
8110209ff23fSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
8111209ff23fSmrg[The pkg-config script could not be found or is too old.  Make sure it
8112209ff23fSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
8113209ff23fSmrgpath to pkg-config.
8114209ff23fSmrg
8115209ff23fSmrg_PKG_TEXT
8116209ff23fSmrg
8117209ff23fSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8118209ff23fSmrg		[$4])
8119209ff23fSmrgelse
8120209ff23fSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8121209ff23fSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8122209ff23fSmrg        AC_MSG_RESULT([yes])
8123209ff23fSmrg	ifelse([$3], , :, [$3])
8124209ff23fSmrgfi[]dnl
8125209ff23fSmrg])# PKG_CHECK_MODULES
8126209ff23fSmrg
81272f39173dSmrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
8128c503f109Smrgdnl
8129c503f109Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
8130c503f109Smrgdnl 
8131c503f109Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
81322f39173dSmrgdnl copy of this software and associated documentation files (the "Software"),
81332f39173dSmrgdnl to deal in the Software without restriction, including without limitation
81342f39173dSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
81352f39173dSmrgdnl and/or sell copies of the Software, and to permit persons to whom the
81362f39173dSmrgdnl Software is furnished to do so, subject to the following conditions:
8137c503f109Smrgdnl
81382f39173dSmrgdnl The above copyright notice and this permission notice (including the next
81392f39173dSmrgdnl paragraph) shall be included in all copies or substantial portions of the
81402f39173dSmrgdnl Software.
8141c503f109Smrgdnl
81422f39173dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
81432f39173dSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
81442f39173dSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
81452f39173dSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
81462f39173dSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
81472f39173dSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
81482f39173dSmrgdnl DEALINGS IN THE SOFTWARE.
8149209ff23fSmrg
8150c503f109Smrg# XORG_MACROS_VERSION(required-version)
8151c503f109Smrg# -------------------------------------
8152c503f109Smrg# Minimum version: 1.1.0
8153209ff23fSmrg#
8154c503f109Smrg# If you're using a macro added in Version 1.1 or newer, include this in
8155c503f109Smrg# your configure.ac with the minimum required version, such as:
8156c503f109Smrg# XORG_MACROS_VERSION(1.1)
8157209ff23fSmrg#
81582f39173dSmrg# To ensure that this macro is defined, also add:
81592f39173dSmrg# m4_ifndef([XORG_MACROS_VERSION],
81602f39173dSmrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
8161209ff23fSmrg#
8162209ff23fSmrg#
8163c503f109Smrg# See the "minimum version" comment for each macro you use to see what 
8164c503f109Smrg# version you require.
81652f39173dSmrgm4_defun([XORG_MACROS_VERSION],[
81662f39173dSmrgm4_define([vers_have], [1.8.0])
81672f39173dSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
81682f39173dSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
81692f39173dSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
81702f39173dSmrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
81712f39173dSmrgm4_if(m4_version_compare(vers_have, [$1]), -1,
81722f39173dSmrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
81732f39173dSmrgm4_undefine([vers_have])
81742f39173dSmrgm4_undefine([maj_have])
81752f39173dSmrgm4_undefine([maj_needed])
8176c503f109Smrg]) # XORG_MACROS_VERSION
8177209ff23fSmrg
8178c503f109Smrg# XORG_PROG_RAWCPP()
8179c503f109Smrg# ------------------
8180c503f109Smrg# Minimum version: 1.0.0
8181209ff23fSmrg#
8182c503f109Smrg# Find cpp program and necessary flags for use in pre-processing text files
8183c503f109Smrg# such as man pages and config files
8184c503f109SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
8185c503f109SmrgAC_REQUIRE([AC_PROG_CPP])
8186c503f109SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
8187c503f109Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
8188209ff23fSmrg
8189c503f109Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
8190c503f109Smrg# which is not the best choice for supporting other OS'es, but covers most
8191c503f109Smrg# of the ones we need for now.
8192c503f109SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
8193c503f109SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
8194c503f109Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
8195c503f109Smrg	AC_MSG_RESULT([no])
8196c503f109Smrgelse
8197c503f109Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
8198c503f109Smrg		RAWCPPFLAGS=-undef
8199c503f109Smrg		AC_MSG_RESULT([yes])
82002f39173dSmrg	# under Cygwin unix is still defined even with -undef
82012f39173dSmrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
82022f39173dSmrg		RAWCPPFLAGS="-undef -ansi"
82032f39173dSmrg		AC_MSG_RESULT([yes, with -ansi])
8204c503f109Smrg	else
8205c503f109Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
8206c503f109Smrg	fi
8207c503f109Smrgfi
8208c503f109Smrgrm -f conftest.$ac_ext
8209209ff23fSmrg
8210c503f109SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
8211c503f109SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
8212c503f109Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
8213c503f109Smrg	AC_MSG_RESULT([no])
8214209ff23fSmrgelse
8215c503f109Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
8216c503f109Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
8217c503f109Smrg		AC_MSG_RESULT([yes])
8218c503f109Smrg	else
8219c503f109Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
8220c503f109Smrg	fi
8221209ff23fSmrgfi
8222c503f109Smrgrm -f conftest.$ac_ext
8223c503f109SmrgAC_SUBST(RAWCPPFLAGS)
8224c503f109Smrg]) # XORG_PROG_RAWCPP
8225209ff23fSmrg
8226c503f109Smrg# XORG_MANPAGE_SECTIONS()
8227c503f109Smrg# -----------------------
8228c503f109Smrg# Minimum version: 1.0.0
8229209ff23fSmrg#
8230c503f109Smrg# Determine which sections man pages go in for the different man page types
8231c503f109Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
8232c503f109Smrg# Not sure if there's any better way than just hardcoding by OS name.
8233c503f109Smrg# Override default settings by setting environment variables
82342f39173dSmrg# Added MAN_SUBSTS in version 1.8
82352f39173dSmrg# Added AC_PROG_SED in version 1.8
8236209ff23fSmrg
8237c503f109SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
8238c503f109SmrgAC_REQUIRE([AC_CANONICAL_HOST])
82392f39173dSmrgAC_REQUIRE([AC_PROG_SED])
8240209ff23fSmrg
8241c503f109Smrgif test x$APP_MAN_SUFFIX = x    ; then
8242c503f109Smrg    APP_MAN_SUFFIX=1
8243c503f109Smrgfi
8244c503f109Smrgif test x$APP_MAN_DIR = x    ; then
8245c503f109Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
8246c503f109Smrgfi
8247209ff23fSmrg
8248c503f109Smrgif test x$LIB_MAN_SUFFIX = x    ; then
8249c503f109Smrg    LIB_MAN_SUFFIX=3
8250c503f109Smrgfi
8251c503f109Smrgif test x$LIB_MAN_DIR = x    ; then
8252c503f109Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
8253c503f109Smrgfi
8254209ff23fSmrg
8255c503f109Smrgif test x$FILE_MAN_SUFFIX = x    ; then
8256c503f109Smrg    case $host_os in
8257c503f109Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
8258c503f109Smrg	*)		FILE_MAN_SUFFIX=5  ;;
8259c503f109Smrg    esac
8260c503f109Smrgfi
8261c503f109Smrgif test x$FILE_MAN_DIR = x    ; then
8262c503f109Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
8263c503f109Smrgfi
8264209ff23fSmrg
8265c503f109Smrgif test x$MISC_MAN_SUFFIX = x    ; then
8266c503f109Smrg    case $host_os in
8267c503f109Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
8268c503f109Smrg	*)		MISC_MAN_SUFFIX=7  ;;
8269209ff23fSmrg    esac
8270c503f109Smrgfi
8271c503f109Smrgif test x$MISC_MAN_DIR = x    ; then
8272c503f109Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
8273c503f109Smrgfi
8274209ff23fSmrg
8275c503f109Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
8276c503f109Smrg    case $host_os in
8277c503f109Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
8278c503f109Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
8279c503f109Smrg    esac
8280c503f109Smrgfi
8281c503f109Smrgif test x$DRIVER_MAN_DIR = x    ; then
8282c503f109Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
8283209ff23fSmrgfi
8284209ff23fSmrg
8285c503f109Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
8286c503f109Smrg    case $host_os in
8287c503f109Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
8288c503f109Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
8289c503f109Smrg    esac
8290c503f109Smrgfi
8291c503f109Smrgif test x$ADMIN_MAN_DIR = x    ; then
8292c503f109Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
8293c503f109Smrgfi
8294209ff23fSmrg
8295209ff23fSmrg
8296c503f109SmrgAC_SUBST([APP_MAN_SUFFIX])
8297c503f109SmrgAC_SUBST([LIB_MAN_SUFFIX])
8298c503f109SmrgAC_SUBST([FILE_MAN_SUFFIX])
8299c503f109SmrgAC_SUBST([MISC_MAN_SUFFIX])
8300c503f109SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
8301c503f109SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
8302c503f109SmrgAC_SUBST([APP_MAN_DIR])
8303c503f109SmrgAC_SUBST([LIB_MAN_DIR])
8304c503f109SmrgAC_SUBST([FILE_MAN_DIR])
8305c503f109SmrgAC_SUBST([MISC_MAN_DIR])
8306c503f109SmrgAC_SUBST([DRIVER_MAN_DIR])
8307c503f109SmrgAC_SUBST([ADMIN_MAN_DIR])
83082f39173dSmrg
83092f39173dSmrgXORG_MAN_PAGE="X Version 11"
83102f39173dSmrgAC_SUBST([XORG_MAN_PAGE])
83112f39173dSmrgMAN_SUBSTS="\
83122f39173dSmrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
83132f39173dSmrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
83142f39173dSmrg	-e 's|__xservername__|Xorg|g' \
83152f39173dSmrg	-e 's|__xconfigfile__|xorg.conf|g' \
83162f39173dSmrg	-e 's|__projectroot__|\$(prefix)|g' \
83172f39173dSmrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
83182f39173dSmrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
83192f39173dSmrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
83202f39173dSmrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
83212f39173dSmrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
83222f39173dSmrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
83232f39173dSmrgAC_SUBST([MAN_SUBSTS])
83242f39173dSmrg
8325c503f109Smrg]) # XORG_MANPAGE_SECTIONS
8326209ff23fSmrg
83272f39173dSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
83282f39173dSmrg# ------------------------
83292f39173dSmrg# Minimum version: 1.7.0
83302f39173dSmrg#
83312f39173dSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
83322f39173dSmrg# provided by xorg-sgml-doctools, if installed.
83332f39173dSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
83342f39173dSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
83352f39173dSmrgXORG_SGML_PATH=
83362f39173dSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
83372f39173dSmrg    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
83382f39173dSmrg    [m4_ifval([$1],[:],
83392f39173dSmrg        [if test x"$cross_compiling" != x"yes" ; then
83402f39173dSmrg            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
83412f39173dSmrg                          [XORG_SGML_PATH=$prefix/share/sgml])
83422f39173dSmrg         fi])
83432f39173dSmrg    ])
83442f39173dSmrg
83452f39173dSmrgif test "x$XORG_SGML_PATH" != "x" ; then
83462f39173dSmrg   AC_MSG_RESULT([$XORG_SGML_PATH])
83472f39173dSmrgelse
83482f39173dSmrg   AC_MSG_RESULT([no])
83492f39173dSmrgfi
83502f39173dSmrg
83512f39173dSmrgAC_SUBST(XORG_SGML_PATH)
83522f39173dSmrg]) # XORG_CHECK_SGML_DOCTOOLS
83532f39173dSmrg
8354c503f109Smrg# XORG_CHECK_LINUXDOC
8355c503f109Smrg# -------------------
8356c503f109Smrg# Minimum version: 1.0.0
8357c503f109Smrg#
8358c503f109Smrg# Defines the variable MAKE_TEXT if the necessary tools and
8359c503f109Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
8360c503f109Smrg# Whether or not the necessary tools and files are found can be checked
8361c503f109Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
8362c503f109SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
83632f39173dSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
83642f39173dSmrgAC_REQUIRE([XORG_WITH_PS2PDF])
8365209ff23fSmrg
8366c503f109SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
8367209ff23fSmrg
83682f39173dSmrgAC_MSG_CHECKING([whether to build documentation])
8369209ff23fSmrg
83702f39173dSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
8371c503f109Smrg   BUILDDOC=yes
8372c503f109Smrgelse
8373c503f109Smrg   BUILDDOC=no
8374c503f109Smrgfi
8375209ff23fSmrg
8376c503f109SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
8377209ff23fSmrg
8378c503f109SmrgAC_MSG_RESULT([$BUILDDOC])
8379209ff23fSmrg
83802f39173dSmrgAC_MSG_CHECKING([whether to build pdf documentation])
8381209ff23fSmrg
83822f39173dSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
8383c503f109Smrg   BUILDPDFDOC=yes
8384c503f109Smrgelse
8385c503f109Smrg   BUILDPDFDOC=no
8386c503f109Smrgfi
8387209ff23fSmrg
8388c503f109SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
8389209ff23fSmrg
8390c503f109SmrgAC_MSG_RESULT([$BUILDPDFDOC])
8391209ff23fSmrg
83922f39173dSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
8393c503f109SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
8394c503f109SmrgMAKE_PDF="$PS2PDF"
8395c503f109SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
8396209ff23fSmrg
8397c503f109SmrgAC_SUBST(MAKE_TEXT)
8398c503f109SmrgAC_SUBST(MAKE_PS)
8399c503f109SmrgAC_SUBST(MAKE_PDF)
8400c503f109SmrgAC_SUBST(MAKE_HTML)
8401c503f109Smrg]) # XORG_CHECK_LINUXDOC
8402209ff23fSmrg
8403c503f109Smrg# XORG_CHECK_DOCBOOK
8404c503f109Smrg# -------------------
8405c503f109Smrg# Minimum version: 1.0.0
8406c503f109Smrg#
8407c503f109Smrg# Checks for the ability to build output formats from SGML DocBook source.
8408c503f109Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
8409c503f109Smrg# indicates whether the necessary tools and files are found and, if set,
8410c503f109Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
8411c503f109SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
84122f39173dSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
84132f39173dSmrg
8414c503f109SmrgBUILDTXTDOC=no
8415c503f109SmrgBUILDPDFDOC=no
8416c503f109SmrgBUILDPSDOC=no
8417c503f109SmrgBUILDHTMLDOC=no
8418209ff23fSmrg
8419c503f109SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
8420c503f109SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
8421c503f109SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
8422c503f109SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
8423209ff23fSmrg
84242f39173dSmrgAC_MSG_CHECKING([whether to build text documentation])
84252f39173dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
8426c503f109Smrg   test x$BUILD_TXTDOC != xno; then
8427c503f109Smrg	BUILDTXTDOC=yes
8428c503f109Smrgfi
8429c503f109SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
8430c503f109SmrgAC_MSG_RESULT([$BUILDTXTDOC])
8431209ff23fSmrg
84322f39173dSmrgAC_MSG_CHECKING([whether to build PDF documentation])
84332f39173dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
8434ad43ddacSmrg   test x$BUILD_PDFDOC != xno; then
8435ad43ddacSmrg	BUILDPDFDOC=yes
8436ad43ddacSmrgfi
8437ad43ddacSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
8438ad43ddacSmrgAC_MSG_RESULT([$BUILDPDFDOC])
8439ad43ddacSmrg
84402f39173dSmrgAC_MSG_CHECKING([whether to build PostScript documentation])
84412f39173dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
8442ad43ddacSmrg   test x$BUILD_PSDOC != xno; then
8443ad43ddacSmrg	BUILDPSDOC=yes
8444ad43ddacSmrgfi
8445ad43ddacSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
8446ad43ddacSmrgAC_MSG_RESULT([$BUILDPSDOC])
8447ad43ddacSmrg
84482f39173dSmrgAC_MSG_CHECKING([whether to build HTML documentation])
84492f39173dSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
8450ad43ddacSmrg   test x$BUILD_HTMLDOC != xno; then
8451ad43ddacSmrg	BUILDHTMLDOC=yes
8452ad43ddacSmrgfi
8453ad43ddacSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
8454ad43ddacSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
8455ad43ddacSmrg
8456ad43ddacSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
8457ad43ddacSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
8458ad43ddacSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
8459ad43ddacSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
8460ad43ddacSmrg
8461ad43ddacSmrgAC_SUBST(MAKE_TEXT)
8462ad43ddacSmrgAC_SUBST(MAKE_PS)
8463ad43ddacSmrgAC_SUBST(MAKE_PDF)
8464ad43ddacSmrgAC_SUBST(MAKE_HTML)
8465ad43ddacSmrg]) # XORG_CHECK_DOCBOOK
8466ad43ddacSmrg
84672f39173dSmrg# XORG_WITH_XMLTO([MIN-VERSION])
84682f39173dSmrg# ----------------
84692f39173dSmrg# Minimum version: 1.5.0
84702f39173dSmrg#
84712f39173dSmrg# Documentation tools are not always available on all platforms and sometimes
84722f39173dSmrg# not at the appropriate level. This macro enables a module to test for the
84732f39173dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
84742f39173dSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions
84752f39173dSmrg# as whether or not to use the xmlto package.
84762f39173dSmrg#
84772f39173dSmrg# Interface to module:
84782f39173dSmrg# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
84792f39173dSmrg# XMLTO:	returns the path of the xmlto program found
84802f39173dSmrg#		returns the path set by the user in the environment
84812f39173dSmrg# --with-xmlto:	'yes' user instructs the module to use xmlto
84822f39173dSmrg#		'no' user instructs the module not to use xmlto
84832f39173dSmrg#
84842f39173dSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
84852f39173dSmrg#
84862f39173dSmrgAC_DEFUN([XORG_WITH_XMLTO],[
84872f39173dSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command])
84882f39173dSmrgAC_ARG_WITH(xmlto,
84892f39173dSmrg	AS_HELP_STRING([--with-xmlto],
84902f39173dSmrg	   [Use xmlto to regenerate documentation (default: yes, if installed)]),
84912f39173dSmrg	   [use_xmlto=$withval], [use_xmlto=auto])
84922f39173dSmrg
84932f39173dSmrgif test "x$use_xmlto" = x"auto"; then
84942f39173dSmrg   AC_PATH_PROG([XMLTO], [xmlto])
84952f39173dSmrg   if test "x$XMLTO" = "x"; then
84962f39173dSmrg        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
84972f39173dSmrg	have_xmlto=no
84982f39173dSmrg   else
84992f39173dSmrg        have_xmlto=yes
85002f39173dSmrg   fi
85012f39173dSmrgelif test "x$use_xmlto" = x"yes" ; then
85022f39173dSmrg   AC_PATH_PROG([XMLTO], [xmlto])
85032f39173dSmrg   if test "x$XMLTO" = "x"; then
85042f39173dSmrg        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
85052f39173dSmrg   fi
85062f39173dSmrg   have_xmlto=yes
85072f39173dSmrgelif test "x$use_xmlto" = x"no" ; then
85082f39173dSmrg   if test "x$XMLTO" != "x"; then
85092f39173dSmrg      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
85102f39173dSmrg   fi
85112f39173dSmrg   have_xmlto=no
85122f39173dSmrgelse
85132f39173dSmrg   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
85142f39173dSmrgfi
85152f39173dSmrgm4_ifval([$1],
85162f39173dSmrg[if test "$have_xmlto" = yes; then
85172f39173dSmrg    # scrape the xmlto version
85182f39173dSmrg    AC_MSG_CHECKING([the xmlto version])
85192f39173dSmrg    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
85202f39173dSmrg    AC_MSG_RESULT([$xmlto_version])
85212f39173dSmrg    AS_VERSION_COMPARE([$xmlto_version], [$1],
85222f39173dSmrg        [if test "x$use_xmlto" = xauto; then
85232f39173dSmrg            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
85242f39173dSmrg            have_xmlto=no
85252f39173dSmrg        else
85262f39173dSmrg            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
85272f39173dSmrg        fi])
85282f39173dSmrgfi])
85292f39173dSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
85302f39173dSmrg]) # XORG_WITH_XMLTO
85312f39173dSmrg
85322f39173dSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION])
85332f39173dSmrg# ----------------
85342f39173dSmrg# Minimum version: 1.5.0
85352f39173dSmrg#
85362f39173dSmrg# Documentation tools are not always available on all platforms and sometimes
85372f39173dSmrg# not at the appropriate level. This macro enables a module to test for the
85382f39173dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
85392f39173dSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions
85402f39173dSmrg# as whether or not to use the asciidoc package.
85412f39173dSmrg#
85422f39173dSmrg# Interface to module:
85432f39173dSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
85442f39173dSmrg# ASCIIDOC:	 returns the path of the asciidoc program found
85452f39173dSmrg#		 returns the path set by the user in the environment
85462f39173dSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc
85472f39173dSmrg#		  'no' user instructs the module not to use asciidoc
85482f39173dSmrg#
85492f39173dSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
85502f39173dSmrg#
85512f39173dSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[
85522f39173dSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
85532f39173dSmrgAC_ARG_WITH(asciidoc,
85542f39173dSmrg	AS_HELP_STRING([--with-asciidoc],
85552f39173dSmrg	   [Use asciidoc to regenerate documentation (default: yes, if installed)]),
85562f39173dSmrg	   [use_asciidoc=$withval], [use_asciidoc=auto])
85572f39173dSmrg
85582f39173dSmrgif test "x$use_asciidoc" = x"auto"; then
85592f39173dSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
85602f39173dSmrg   if test "x$ASCIIDOC" = "x"; then
85612f39173dSmrg        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
85622f39173dSmrg	have_asciidoc=no
85632f39173dSmrg   else
85642f39173dSmrg        have_asciidoc=yes
85652f39173dSmrg   fi
85662f39173dSmrgelif test "x$use_asciidoc" = x"yes" ; then
85672f39173dSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
85682f39173dSmrg   if test "x$ASCIIDOC" = "x"; then
85692f39173dSmrg        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
85702f39173dSmrg   fi
85712f39173dSmrg   have_asciidoc=yes
85722f39173dSmrgelif test "x$use_asciidoc" = x"no" ; then
85732f39173dSmrg   if test "x$ASCIIDOC" != "x"; then
85742f39173dSmrg      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
85752f39173dSmrg   fi
85762f39173dSmrg   have_asciidoc=no
85772f39173dSmrgelse
85782f39173dSmrg   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
85792f39173dSmrgfi
85802f39173dSmrgm4_ifval([$1],
85812f39173dSmrg[if test "$have_asciidoc" = yes; then
85822f39173dSmrg    # scrape the asciidoc version
85832f39173dSmrg    AC_MSG_CHECKING([the asciidoc version])
85842f39173dSmrg    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
85852f39173dSmrg    AC_MSG_RESULT([$asciidoc_version])
85862f39173dSmrg    AS_VERSION_COMPARE([$asciidoc_version], [$1],
85872f39173dSmrg        [if test "x$use_asciidoc" = xauto; then
85882f39173dSmrg            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
85892f39173dSmrg            have_asciidoc=no
85902f39173dSmrg        else
85912f39173dSmrg            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
85922f39173dSmrg        fi])
85932f39173dSmrgfi])
85942f39173dSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
85952f39173dSmrg]) # XORG_WITH_ASCIIDOC
85962f39173dSmrg
85972f39173dSmrg# XORG_WITH_DOXYGEN([MIN-VERSION])
85982f39173dSmrg# --------------------------------
85992f39173dSmrg# Minimum version: 1.5.0
86002f39173dSmrg#
86012f39173dSmrg# Documentation tools are not always available on all platforms and sometimes
86022f39173dSmrg# not at the appropriate level. This macro enables a module to test for the
86032f39173dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
86042f39173dSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions
86052f39173dSmrg# as whether or not to use the doxygen package.
86062f39173dSmrg#
86072f39173dSmrg# Interface to module:
86082f39173dSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
86092f39173dSmrg# DOXYGEN:	 returns the path of the doxygen program found
86102f39173dSmrg#		 returns the path set by the user in the environment
86112f39173dSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen
86122f39173dSmrg#		  'no' user instructs the module not to use doxygen
86132f39173dSmrg#
86142f39173dSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
86152f39173dSmrg#
86162f39173dSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[
86172f39173dSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command])
86182f39173dSmrgAC_ARG_WITH(doxygen,
86192f39173dSmrg	AS_HELP_STRING([--with-doxygen],
86202f39173dSmrg	   [Use doxygen to regenerate documentation (default: yes, if installed)]),
86212f39173dSmrg	   [use_doxygen=$withval], [use_doxygen=auto])
86222f39173dSmrg
86232f39173dSmrgif test "x$use_doxygen" = x"auto"; then
86242f39173dSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
86252f39173dSmrg   if test "x$DOXYGEN" = "x"; then
86262f39173dSmrg        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
86272f39173dSmrg	have_doxygen=no
86282f39173dSmrg   else
86292f39173dSmrg        have_doxygen=yes
86302f39173dSmrg   fi
86312f39173dSmrgelif test "x$use_doxygen" = x"yes" ; then
86322f39173dSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
86332f39173dSmrg   if test "x$DOXYGEN" = "x"; then
86342f39173dSmrg        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
86352f39173dSmrg   fi
86362f39173dSmrg   have_doxygen=yes
86372f39173dSmrgelif test "x$use_doxygen" = x"no" ; then
86382f39173dSmrg   if test "x$DOXYGEN" != "x"; then
86392f39173dSmrg      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
86402f39173dSmrg   fi
86412f39173dSmrg   have_doxygen=no
86422f39173dSmrgelse
86432f39173dSmrg   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
86442f39173dSmrgfi
86452f39173dSmrgm4_ifval([$1],
86462f39173dSmrg[if test "$have_doxygen" = yes; then
86472f39173dSmrg    # scrape the doxygen version
86482f39173dSmrg    AC_MSG_CHECKING([the doxygen version])
86492f39173dSmrg    doxygen_version=`$DOXYGEN --version 2>/dev/null`
86502f39173dSmrg    AC_MSG_RESULT([$doxygen_version])
86512f39173dSmrg    AS_VERSION_COMPARE([$doxygen_version], [$1],
86522f39173dSmrg        [if test "x$use_doxygen" = xauto; then
86532f39173dSmrg            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
86542f39173dSmrg            have_doxygen=no
86552f39173dSmrg        else
86562f39173dSmrg            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
86572f39173dSmrg        fi])
86582f39173dSmrgfi])
86592f39173dSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
86602f39173dSmrg]) # XORG_WITH_DOXYGEN
86612f39173dSmrg
86622f39173dSmrg# XORG_WITH_GROFF
86632f39173dSmrg# ----------------
86642f39173dSmrg# Minimum version: 1.6.0
86652f39173dSmrg#
86662f39173dSmrg# Documentation tools are not always available on all platforms and sometimes
86672f39173dSmrg# not at the appropriate level. This macro enables a module to test for the
86682f39173dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
86692f39173dSmrg# the --with-groff option, it allows maximum flexibilty in making decisions
86702f39173dSmrg# as whether or not to use the groff package.
86712f39173dSmrg#
86722f39173dSmrg# Interface to module:
86732f39173dSmrg# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
86742f39173dSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package
86752f39173dSmrg# HAVE_GROFF_MS: the -ms macros package
86762f39173dSmrg# GROFF:	 returns the path of the groff program found
86772f39173dSmrg#		 returns the path set by the user in the environment
86782f39173dSmrg# --with-groff:	 'yes' user instructs the module to use groff
86792f39173dSmrg#		 'no' user instructs the module not to use groff
86802f39173dSmrg#
86812f39173dSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
86822f39173dSmrg#
86832f39173dSmrg# OS and distros often splits groff in a basic and full package, the former
86842f39173dSmrg# having the groff program and the later having devices, fonts and macros
86852f39173dSmrg# Checking for the groff executable is not enough.
86862f39173dSmrg#
86872f39173dSmrg# If macros are missing, we cannot assume that groff is useless, so we don't
86882f39173dSmrg# unset HAVE_GROFF or GROFF env variables.
86892f39173dSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
86902f39173dSmrg#
86912f39173dSmrgAC_DEFUN([XORG_WITH_GROFF],[
86922f39173dSmrgAC_ARG_VAR([GROFF], [Path to groff command])
86932f39173dSmrgAC_ARG_WITH(groff,
86942f39173dSmrg	AS_HELP_STRING([--with-groff],
86952f39173dSmrg	   [Use groff to regenerate documentation (default: yes, if installed)]),
86962f39173dSmrg	   [use_groff=$withval], [use_groff=auto])
86972f39173dSmrg
86982f39173dSmrgif test "x$use_groff" = x"auto"; then
86992f39173dSmrg   AC_PATH_PROG([GROFF], [groff])
87002f39173dSmrg   if test "x$GROFF" = "x"; then
87012f39173dSmrg        AC_MSG_WARN([groff not found - documentation targets will be skipped])
87022f39173dSmrg	have_groff=no
87032f39173dSmrg   else
87042f39173dSmrg        have_groff=yes
87052f39173dSmrg   fi
87062f39173dSmrgelif test "x$use_groff" = x"yes" ; then
87072f39173dSmrg   AC_PATH_PROG([GROFF], [groff])
87082f39173dSmrg   if test "x$GROFF" = "x"; then
87092f39173dSmrg        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
87102f39173dSmrg   fi
87112f39173dSmrg   have_groff=yes
87122f39173dSmrgelif test "x$use_groff" = x"no" ; then
87132f39173dSmrg   if test "x$GROFF" != "x"; then
87142f39173dSmrg      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
87152f39173dSmrg   fi
87162f39173dSmrg   have_groff=no
87172f39173dSmrgelse
87182f39173dSmrg   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
87192f39173dSmrgfi
87202f39173dSmrg# We have groff, test for the presence of the macro packages
87212f39173dSmrgif test "x$have_groff" = x"yes"; then
87222f39173dSmrg    AC_MSG_CHECKING([for ${GROFF} -ms macros])
87232f39173dSmrg    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
87242f39173dSmrg        groff_ms_works=yes
87252f39173dSmrg    else
87262f39173dSmrg        groff_ms_works=no
87272f39173dSmrg    fi
87282f39173dSmrg    AC_MSG_RESULT([$groff_ms_works])
87292f39173dSmrg    AC_MSG_CHECKING([for ${GROFF} -mm macros])
87302f39173dSmrg    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
87312f39173dSmrg        groff_mm_works=yes
87322f39173dSmrg    else
87332f39173dSmrg        groff_mm_works=no
87342f39173dSmrg    fi
87352f39173dSmrg    AC_MSG_RESULT([$groff_mm_works])
87362f39173dSmrgfi
87372f39173dSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
87382f39173dSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
87392f39173dSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
87402f39173dSmrg]) # XORG_WITH_GROFF
87412f39173dSmrg
87422f39173dSmrg# XORG_WITH_FOP
87432f39173dSmrg# ----------------
87442f39173dSmrg# Minimum version: 1.6.0
87452f39173dSmrg#
87462f39173dSmrg# Documentation tools are not always available on all platforms and sometimes
87472f39173dSmrg# not at the appropriate level. This macro enables a module to test for the
87482f39173dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
87492f39173dSmrg# the --with-fop option, it allows maximum flexibilty in making decisions
87502f39173dSmrg# as whether or not to use the fop package.
87512f39173dSmrg#
87522f39173dSmrg# Interface to module:
87532f39173dSmrg# HAVE_FOP: 	used in makefiles to conditionally generate documentation
87542f39173dSmrg# FOP:	 	returns the path of the fop program found
87552f39173dSmrg#		returns the path set by the user in the environment
87562f39173dSmrg# --with-fop: 	'yes' user instructs the module to use fop
87572f39173dSmrg#		'no' user instructs the module not to use fop
87582f39173dSmrg#
87592f39173dSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
87602f39173dSmrg#
87612f39173dSmrgAC_DEFUN([XORG_WITH_FOP],[
87622f39173dSmrgAC_ARG_VAR([FOP], [Path to fop command])
87632f39173dSmrgAC_ARG_WITH(fop,
87642f39173dSmrg	AS_HELP_STRING([--with-fop],
87652f39173dSmrg	   [Use fop to regenerate documentation (default: yes, if installed)]),
87662f39173dSmrg	   [use_fop=$withval], [use_fop=auto])
87672f39173dSmrg
87682f39173dSmrgif test "x$use_fop" = x"auto"; then
87692f39173dSmrg   AC_PATH_PROG([FOP], [fop])
87702f39173dSmrg   if test "x$FOP" = "x"; then
87712f39173dSmrg        AC_MSG_WARN([fop not found - documentation targets will be skipped])
87722f39173dSmrg	have_fop=no
87732f39173dSmrg   else
87742f39173dSmrg        have_fop=yes
87752f39173dSmrg   fi
87762f39173dSmrgelif test "x$use_fop" = x"yes" ; then
87772f39173dSmrg   AC_PATH_PROG([FOP], [fop])
87782f39173dSmrg   if test "x$FOP" = "x"; then
87792f39173dSmrg        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
87802f39173dSmrg   fi
87812f39173dSmrg   have_fop=yes
87822f39173dSmrgelif test "x$use_fop" = x"no" ; then
87832f39173dSmrg   if test "x$FOP" != "x"; then
87842f39173dSmrg      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
87852f39173dSmrg   fi
87862f39173dSmrg   have_fop=no
87872f39173dSmrgelse
87882f39173dSmrg   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
87892f39173dSmrgfi
87902f39173dSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
87912f39173dSmrg]) # XORG_WITH_FOP
87922f39173dSmrg
87932f39173dSmrg# XORG_WITH_PS2PDF
87942f39173dSmrg# ----------------
87952f39173dSmrg# Minimum version: 1.6.0
87962f39173dSmrg#
87972f39173dSmrg# Documentation tools are not always available on all platforms and sometimes
87982f39173dSmrg# not at the appropriate level. This macro enables a module to test for the
87992f39173dSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
88002f39173dSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
88012f39173dSmrg# as whether or not to use the ps2pdf package.
88022f39173dSmrg#
88032f39173dSmrg# Interface to module:
88042f39173dSmrg# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
88052f39173dSmrg# PS2PDF:	returns the path of the ps2pdf program found
88062f39173dSmrg#		returns the path set by the user in the environment
88072f39173dSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
88082f39173dSmrg#		 'no' user instructs the module not to use ps2pdf
88092f39173dSmrg#
88102f39173dSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
88112f39173dSmrg#
88122f39173dSmrgAC_DEFUN([XORG_WITH_PS2PDF],[
88132f39173dSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
88142f39173dSmrgAC_ARG_WITH(ps2pdf,
88152f39173dSmrg	AS_HELP_STRING([--with-ps2pdf],
88162f39173dSmrg	   [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
88172f39173dSmrg	   [use_ps2pdf=$withval], [use_ps2pdf=auto])
88182f39173dSmrg
88192f39173dSmrgif test "x$use_ps2pdf" = x"auto"; then
88202f39173dSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
88212f39173dSmrg   if test "x$PS2PDF" = "x"; then
88222f39173dSmrg        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
88232f39173dSmrg	have_ps2pdf=no
88242f39173dSmrg   else
88252f39173dSmrg        have_ps2pdf=yes
88262f39173dSmrg   fi
88272f39173dSmrgelif test "x$use_ps2pdf" = x"yes" ; then
88282f39173dSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
88292f39173dSmrg   if test "x$PS2PDF" = "x"; then
88302f39173dSmrg        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
88312f39173dSmrg   fi
88322f39173dSmrg   have_ps2pdf=yes
88332f39173dSmrgelif test "x$use_ps2pdf" = x"no" ; then
88342f39173dSmrg   if test "x$PS2PDF" != "x"; then
88352f39173dSmrg      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
88362f39173dSmrg   fi
88372f39173dSmrg   have_ps2pdf=no
88382f39173dSmrgelse
88392f39173dSmrg   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
88402f39173dSmrgfi
88412f39173dSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
88422f39173dSmrg]) # XORG_WITH_PS2PDF
88432f39173dSmrg
88442f39173dSmrg# XORG_ENABLE_DOCS (enable_docs=yes)
88452f39173dSmrg# ----------------
88462f39173dSmrg# Minimum version: 1.6.0
88472f39173dSmrg#
88482f39173dSmrg# Documentation tools are not always available on all platforms and sometimes
88492f39173dSmrg# not at the appropriate level. This macro enables a builder to skip all
88502f39173dSmrg# documentation targets except traditional man pages.
88512f39173dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
88522f39173dSmrg# maximum flexibilty in controlling documentation building.
88532f39173dSmrg# Refer to:
88542f39173dSmrg# XORG_WITH_XMLTO         --with-xmlto
88552f39173dSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
88562f39173dSmrg# XORG_WITH_DOXYGEN       --with-doxygen
88572f39173dSmrg# XORG_WITH_FOP           --with-fop
88582f39173dSmrg# XORG_WITH_GROFF         --with-groff
88592f39173dSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
88602f39173dSmrg#
88612f39173dSmrg# Interface to module:
88622f39173dSmrg# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
88632f39173dSmrg# --enable-docs: 'yes' user instructs the module to generate docs
88642f39173dSmrg#		 'no' user instructs the module not to generate docs
88652f39173dSmrg# parm1:	specify the default value, yes or no.
88662f39173dSmrg#
88672f39173dSmrgAC_DEFUN([XORG_ENABLE_DOCS],[
88682f39173dSmrgdefault=$1
88692f39173dSmrgif test "x$default" = x ; then
88702f39173dSmrg  default="yes"
88712f39173dSmrgfi
88722f39173dSmrgAC_ARG_ENABLE(docs,
88732f39173dSmrg	AS_HELP_STRING([--enable-docs],
88742f39173dSmrg	   [Enable building the documentation (default: yes)]),
88752f39173dSmrg	   [build_docs=$enableval], [build_docs=$default])
88762f39173dSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
88772f39173dSmrgAC_MSG_CHECKING([whether to build documentation])
88782f39173dSmrgAC_MSG_RESULT([$build_docs])
88792f39173dSmrg]) # XORG_ENABLE_DOCS
88802f39173dSmrg
88812f39173dSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
88822f39173dSmrg# ----------------
88832f39173dSmrg# Minimum version: 1.6.0
88842f39173dSmrg#
88852f39173dSmrg# This macro enables a builder to skip all developer documentation.
88862f39173dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
88872f39173dSmrg# maximum flexibilty in controlling documentation building.
88882f39173dSmrg# Refer to:
88892f39173dSmrg# XORG_WITH_XMLTO         --with-xmlto
88902f39173dSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
88912f39173dSmrg# XORG_WITH_DOXYGEN       --with-doxygen
88922f39173dSmrg# XORG_WITH_FOP           --with-fop
88932f39173dSmrg# XORG_WITH_GROFF         --with-groff
88942f39173dSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
88952f39173dSmrg#
88962f39173dSmrg# Interface to module:
88972f39173dSmrg# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
88982f39173dSmrg# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
88992f39173dSmrg#			'no' user instructs the module not to generate developer docs
89002f39173dSmrg# parm1:		specify the default value, yes or no.
89012f39173dSmrg#
89022f39173dSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
89032f39173dSmrgdevel_default=$1
89042f39173dSmrgif test "x$devel_default" = x ; then
89052f39173dSmrg  devel_default="yes"
89062f39173dSmrgfi
89072f39173dSmrgAC_ARG_ENABLE(devel-docs,
89082f39173dSmrg	AS_HELP_STRING([--enable-devel-docs],
89092f39173dSmrg	   [Enable building the developer documentation (default: yes)]),
89102f39173dSmrg	   [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
89112f39173dSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
89122f39173dSmrgAC_MSG_CHECKING([whether to build developer documentation])
89132f39173dSmrgAC_MSG_RESULT([$build_devel_docs])
89142f39173dSmrg]) # XORG_ENABLE_DEVEL_DOCS
89152f39173dSmrg
89162f39173dSmrg# XORG_ENABLE_SPECS (enable_specs=yes)
89172f39173dSmrg# ----------------
89182f39173dSmrg# Minimum version: 1.6.0
89192f39173dSmrg#
89202f39173dSmrg# This macro enables a builder to skip all functional specification targets.
89212f39173dSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
89222f39173dSmrg# maximum flexibilty in controlling documentation building.
89232f39173dSmrg# Refer to:
89242f39173dSmrg# XORG_WITH_XMLTO         --with-xmlto
89252f39173dSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
89262f39173dSmrg# XORG_WITH_DOXYGEN       --with-doxygen
89272f39173dSmrg# XORG_WITH_FOP           --with-fop
89282f39173dSmrg# XORG_WITH_GROFF         --with-groff
89292f39173dSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
89302f39173dSmrg#
89312f39173dSmrg# Interface to module:
89322f39173dSmrg# ENABLE_SPECS:		used in makefiles to conditionally generate specs
89332f39173dSmrg# --enable-specs:	'yes' user instructs the module to generate specs
89342f39173dSmrg#			'no' user instructs the module not to generate specs
89352f39173dSmrg# parm1:		specify the default value, yes or no.
89362f39173dSmrg#
89372f39173dSmrgAC_DEFUN([XORG_ENABLE_SPECS],[
89382f39173dSmrgspec_default=$1
89392f39173dSmrgif test "x$spec_default" = x ; then
89402f39173dSmrg  spec_default="yes"
89412f39173dSmrgfi
89422f39173dSmrgAC_ARG_ENABLE(specs,
89432f39173dSmrg	AS_HELP_STRING([--enable-specs],
89442f39173dSmrg	   [Enable building the specs (default: yes)]),
89452f39173dSmrg	   [build_specs=$enableval], [build_specs=$spec_default])
89462f39173dSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
89472f39173dSmrgAC_MSG_CHECKING([whether to build functional specifications])
89482f39173dSmrgAC_MSG_RESULT([$build_specs])
89492f39173dSmrg]) # XORG_ENABLE_SPECS
89502f39173dSmrg
8951ad43ddacSmrg# XORG_CHECK_MALLOC_ZERO
8952ad43ddacSmrg# ----------------------
8953ad43ddacSmrg# Minimum version: 1.0.0
8954ad43ddacSmrg#
8955ad43ddacSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
8956ad43ddacSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
8957ad43ddacSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
8958ad43ddacSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
8959ad43ddacSmrgAC_ARG_ENABLE(malloc0returnsnull,
89602f39173dSmrg	AS_HELP_STRING([--enable-malloc0returnsnull],
8961ad43ddacSmrg		       [malloc(0) returns NULL (default: auto)]),
8962ad43ddacSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
8963ad43ddacSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
8964ad43ddacSmrg
8965ad43ddacSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
8966ad43ddacSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
8967ad43ddacSmrg	AC_RUN_IFELSE([
8968ad43ddacSmrgchar *malloc();
8969ad43ddacSmrgchar *realloc();
8970ad43ddacSmrgchar *calloc();
8971ad43ddacSmrgmain() {
8972ad43ddacSmrg    char *m0, *r0, *c0, *p;
8973ad43ddacSmrg    m0 = malloc(0);
8974ad43ddacSmrg    p = malloc(10);
8975ad43ddacSmrg    r0 = realloc(p,0);
8976ad43ddacSmrg    c0 = calloc(0);
8977ad43ddacSmrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
8978ad43ddacSmrg}],
8979ad43ddacSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
89802f39173dSmrg		[MALLOC_ZERO_RETURNS_NULL=no],
89812f39173dSmrg		[MALLOC_ZERO_RETURNS_NULL=yes])
8982ad43ddacSmrgfi
8983ad43ddacSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
8984ad43ddacSmrg
8985ad43ddacSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
8986ad43ddacSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
8987ad43ddacSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
8988ad43ddacSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
8989ad43ddacSmrgelse
8990ad43ddacSmrg	MALLOC_ZERO_CFLAGS=""
8991ad43ddacSmrg	XMALLOC_ZERO_CFLAGS=""
8992ad43ddacSmrg	XTMALLOC_ZERO_CFLAGS=""
8993ad43ddacSmrgfi
8994ad43ddacSmrg
8995ad43ddacSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
8996ad43ddacSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
8997ad43ddacSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
8998ad43ddacSmrg]) # XORG_CHECK_MALLOC_ZERO
8999ad43ddacSmrg
9000ad43ddacSmrg# XORG_WITH_LINT()
9001ad43ddacSmrg# ----------------
9002ad43ddacSmrg# Minimum version: 1.1.0
9003ad43ddacSmrg#
90042f39173dSmrg# This macro enables the use of a tool that flags some suspicious and
90052f39173dSmrg# non-portable constructs (likely to be bugs) in C language source code.
90062f39173dSmrg# It will attempt to locate the tool and use appropriate options.
90072f39173dSmrg# There are various lint type tools on different platforms.
90082f39173dSmrg#
90092f39173dSmrg# Interface to module:
90102f39173dSmrg# LINT:		returns the path to the tool found on the platform
90112f39173dSmrg#		or the value set to LINT on the configure cmd line
90122f39173dSmrg#		also an Automake conditional
90132f39173dSmrg# LINT_FLAGS:	an Automake variable with appropriate flags
90142f39173dSmrg#
90152f39173dSmrg# --with-lint:	'yes' user instructs the module to use lint
90162f39173dSmrg#		'no' user instructs the module not to use lint (default)
90172f39173dSmrg#
90182f39173dSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
90192f39173dSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim.
9020ad43ddacSmrg#
9021ad43ddacSmrgAC_DEFUN([XORG_WITH_LINT],[
9022ad43ddacSmrg
90232f39173dSmrgAC_ARG_VAR([LINT], [Path to a lint-style command])
90242f39173dSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
90252f39173dSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
9026ad43ddacSmrg		[Use a lint-style source code checker (default: disabled)])],
9027ad43ddacSmrg		[use_lint=$withval], [use_lint=no])
90282f39173dSmrg
90292f39173dSmrg# Obtain platform specific info like program name and options
90302f39173dSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris
90312f39173dSmrgcase $host_os in
90322f39173dSmrg  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
90332f39173dSmrg	lint_name=splint
90342f39173dSmrg	lint_options="-badflag"
90352f39173dSmrg	;;
90362f39173dSmrg  *freebsd* | *netbsd*)
90372f39173dSmrg	lint_name=lint
90382f39173dSmrg	lint_options="-u -b"
90392f39173dSmrg	;;
90402f39173dSmrg  *solaris*)
90412f39173dSmrg	lint_name=lint
90422f39173dSmrg	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
90432f39173dSmrg	;;
90442f39173dSmrgesac
90452f39173dSmrg
90462f39173dSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user)
90472f39173dSmrgif test "x$use_lint" = x"yes" ; then
90482f39173dSmrg   AC_PATH_PROG([LINT], [$lint_name])
90492f39173dSmrg   if test "x$LINT" = "x"; then
90502f39173dSmrg        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
90512f39173dSmrg   fi
90522f39173dSmrgelif test "x$use_lint" = x"no" ; then
90532f39173dSmrg   if test "x$LINT" != "x"; then
90542f39173dSmrg      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
90552f39173dSmrg   fi
9056ad43ddacSmrgelse
90572f39173dSmrg   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
9058ad43ddacSmrgfi
90592f39173dSmrg
90602f39173dSmrg# User supplied flags override default flags
90612f39173dSmrgif test "x$LINT_FLAGS" != "x"; then
90622f39173dSmrg   lint_options=$LINT_FLAGS
9063ad43ddacSmrgfi
9064ad43ddacSmrg
90652f39173dSmrgAC_SUBST([LINT_FLAGS],[$lint_options])
90662f39173dSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x])
9067ad43ddacSmrg
9068ad43ddacSmrg]) # XORG_WITH_LINT
9069ad43ddacSmrg
9070ad43ddacSmrg# XORG_LINT_LIBRARY(LIBNAME)
9071ad43ddacSmrg# --------------------------
9072ad43ddacSmrg# Minimum version: 1.1.0
9073ad43ddacSmrg#
9074ad43ddacSmrg# Sets up flags for building lint libraries for checking programs that call
9075ad43ddacSmrg# functions in the library.
9076ad43ddacSmrg#
90772f39173dSmrg# Interface to module:
90782f39173dSmrg# LINTLIB		- Automake variable with the name of lint library file to make
90792f39173dSmrg# MAKE_LINT_LIB		- Automake conditional
90802f39173dSmrg#
90812f39173dSmrg# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
90822f39173dSmrg#			  - 'no' user instructs the module not to create a lint library (default)
9083ad43ddacSmrg
9084ad43ddacSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
9085ad43ddacSmrgAC_REQUIRE([XORG_WITH_LINT])
90862f39173dSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
9087ad43ddacSmrg	[Create lint library (default: disabled)])],
9088ad43ddacSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
90892f39173dSmrg
90902f39173dSmrgif test "x$make_lint_lib" = x"yes" ; then
90912f39173dSmrg   LINTLIB=llib-l$1.ln
90922f39173dSmrg   if test "x$LINT" = "x"; then
90932f39173dSmrg        AC_MSG_ERROR([Cannot make lint library without --with-lint])
90942f39173dSmrg   fi
90952f39173dSmrgelif test "x$make_lint_lib" != x"no" ; then
90962f39173dSmrg   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
9097ad43ddacSmrgfi
90982f39173dSmrg
9099ad43ddacSmrgAC_SUBST(LINTLIB)
9100ad43ddacSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
9101ad43ddacSmrg
9102ad43ddacSmrg]) # XORG_LINT_LIBRARY
9103ad43ddacSmrg
91042f39173dSmrg# XORG_CWARNFLAGS
91052f39173dSmrg# ---------------
91062f39173dSmrg# Minimum version: 1.2.0
9107ad43ddacSmrg#
91082f39173dSmrg# Defines CWARNFLAGS to enable C compiler warnings.
9109ad43ddacSmrg#
91102f39173dSmrgAC_DEFUN([XORG_CWARNFLAGS], [
91112f39173dSmrgAC_REQUIRE([AC_PROG_CC_C99])
91122f39173dSmrgif  test "x$GCC" = xyes ; then
91132f39173dSmrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
91142f39173dSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
91152f39173dSmrg-Wbad-function-cast -Wformat=2"
91162f39173dSmrg    case `$CC -dumpversion` in
91172f39173dSmrg    3.4.* | 4.*)
91182f39173dSmrg	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
91192f39173dSmrg	;;
91202f39173dSmrg    esac
91212f39173dSmrgelse
91222f39173dSmrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
91232f39173dSmrg    if test "x$SUNCC" = "xyes"; then
91242f39173dSmrg	CWARNFLAGS="-v"
91252f39173dSmrg    fi
91262f39173dSmrgfi
91272f39173dSmrgAC_SUBST(CWARNFLAGS)
91282f39173dSmrg]) # XORG_CWARNFLAGS
91292f39173dSmrg
91302f39173dSmrg# XORG_STRICT_OPTION
91312f39173dSmrg# -----------------------
91322f39173dSmrg# Minimum version: 1.3.0
91332f39173dSmrg#
91342f39173dSmrg# Add configure option to enable strict compilation
91352f39173dSmrgAC_DEFUN([XORG_STRICT_OPTION], [
91362f39173dSmrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
91372f39173dSmrgAC_REQUIRE([AC_PROG_CC_C99])
91382f39173dSmrgAC_REQUIRE([XORG_CWARNFLAGS])
91392f39173dSmrg
91402f39173dSmrgAC_ARG_ENABLE(strict-compilation,
91412f39173dSmrg			  AS_HELP_STRING([--enable-strict-compilation],
91422f39173dSmrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
91432f39173dSmrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
91442f39173dSmrgif test "x$STRICT_COMPILE" = "xyes"; then
91452f39173dSmrg	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
91462f39173dSmrg	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
91472f39173dSmrg	if test "x$GCC" = xyes ; then
91482f39173dSmrg		STRICT_CFLAGS="-pedantic -Werror"
91492f39173dSmrg	elif test "x$SUNCC" = "xyes"; then
91502f39173dSmrg		STRICT_CFLAGS="-errwarn"
91512f39173dSmrg    elif test "x$INTELCC" = "xyes"; then
91522f39173dSmrg		STRICT_CFLAGS="-Werror"
91532f39173dSmrg	fi
91542f39173dSmrgfi
91552f39173dSmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
91562f39173dSmrgAC_SUBST([CWARNFLAGS])
91572f39173dSmrg]) # XORG_STRICT_OPTION
91582f39173dSmrg
91592f39173dSmrg# XORG_DEFAULT_OPTIONS
91602f39173dSmrg# --------------------
91612f39173dSmrg# Minimum version: 1.3.0
91622f39173dSmrg#
91632f39173dSmrg# Defines default options for X.Org modules.
91642f39173dSmrg#
91652f39173dSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
91662f39173dSmrgAC_REQUIRE([AC_PROG_INSTALL])
91672f39173dSmrgXORG_CWARNFLAGS
91682f39173dSmrgXORG_STRICT_OPTION
91692f39173dSmrgXORG_RELEASE_VERSION
91702f39173dSmrgXORG_CHANGELOG
91712f39173dSmrgXORG_INSTALL
91722f39173dSmrgXORG_MANPAGE_SECTIONS
91732f39173dSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
91742f39173dSmrg    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
91752f39173dSmrg]) # XORG_DEFAULT_OPTIONS
91762f39173dSmrg
91772f39173dSmrg# XORG_INSTALL()
91782f39173dSmrg# ----------------
91792f39173dSmrg# Minimum version: 1.4.0
91802f39173dSmrg#
91812f39173dSmrg# Defines the variable INSTALL_CMD as the command to copy
91822f39173dSmrg# INSTALL from $prefix/share/util-macros.
91832f39173dSmrg#
91842f39173dSmrgAC_DEFUN([XORG_INSTALL], [
91852f39173dSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
91862f39173dSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
91872f39173dSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
91882f39173dSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
91892f39173dSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
91902f39173dSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
91912f39173dSmrgAC_SUBST([INSTALL_CMD])
91922f39173dSmrg]) # XORG_INSTALL
91932f39173dSmrgdnl Copyright 2005 Red Hat, Inc
91942f39173dSmrgdnl
91952f39173dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
91962f39173dSmrgdnl documentation for any purpose is hereby granted without fee, provided that
91972f39173dSmrgdnl the above copyright notice appear in all copies and that both that
91982f39173dSmrgdnl copyright notice and this permission notice appear in supporting
91992f39173dSmrgdnl documentation.
92002f39173dSmrgdnl
92012f39173dSmrgdnl The above copyright notice and this permission notice shall be included
92022f39173dSmrgdnl in all copies or substantial portions of the Software.
92032f39173dSmrgdnl
92042f39173dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
92052f39173dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
92062f39173dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
92072f39173dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
92082f39173dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
92092f39173dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
92102f39173dSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
92112f39173dSmrgdnl
92122f39173dSmrgdnl Except as contained in this notice, the name of the copyright holders shall
92132f39173dSmrgdnl not be used in advertising or otherwise to promote the sale, use or
92142f39173dSmrgdnl other dealings in this Software without prior written authorization
92152f39173dSmrgdnl from the copyright holders.
92162f39173dSmrgdnl
92172f39173dSmrg
92182f39173dSmrg# XORG_RELEASE_VERSION
92192f39173dSmrg# --------------------
92202f39173dSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
92212f39173dSmrg 
92222f39173dSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
92232f39173dSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
92242f39173dSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
92252f39173dSmrg		[Major version of this package])
92262f39173dSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
92272f39173dSmrg	if test "x$PVM" = "x"; then
92282f39173dSmrg		PVM="0"
92292f39173dSmrg	fi
92302f39173dSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
92312f39173dSmrg		[$PVM],
92322f39173dSmrg		[Minor version of this package])
92332f39173dSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
92342f39173dSmrg	if test "x$PVP" = "x"; then
92352f39173dSmrg		PVP="0"
92362f39173dSmrg	fi
92372f39173dSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
92382f39173dSmrg		[$PVP],
92392f39173dSmrg		[Patch version of this package])
92402f39173dSmrg])
92412f39173dSmrg
92422f39173dSmrg# XORG_CHANGELOG()
92432f39173dSmrg# ----------------
92442f39173dSmrg# Minimum version: 1.2.0
92452f39173dSmrg#
92462f39173dSmrg# Defines the variable CHANGELOG_CMD as the command to generate
92472f39173dSmrg# ChangeLog from git.
92482f39173dSmrg#
92492f39173dSmrg#
92502f39173dSmrgAC_DEFUN([XORG_CHANGELOG], [
92512f39173dSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
92522f39173dSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
92532f39173dSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
92542f39173dSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
92552f39173dSmrgAC_SUBST([CHANGELOG_CMD])
92562f39173dSmrg]) # XORG_CHANGELOG
92572f39173dSmrg
92582f39173dSmrgdnl Copyright 2005 Red Hat, Inc
92592f39173dSmrgdnl 
92602f39173dSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
92612f39173dSmrgdnl documentation for any purpose is hereby granted without fee, provided that
92622f39173dSmrgdnl the above copyright notice appear in all copies and that both that
92632f39173dSmrgdnl copyright notice and this permission notice appear in supporting
92642f39173dSmrgdnl documentation.
92652f39173dSmrgdnl 
92662f39173dSmrgdnl The above copyright notice and this permission notice shall be included
92672f39173dSmrgdnl in all copies or substantial portions of the Software.
92682f39173dSmrgdnl 
92692f39173dSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
92702f39173dSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
92712f39173dSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
92722f39173dSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
92732f39173dSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
92742f39173dSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
92752f39173dSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
92762f39173dSmrgdnl 
92772f39173dSmrgdnl Except as contained in this notice, the name of the copyright holders shall
92782f39173dSmrgdnl not be used in advertising or otherwise to promote the sale, use or
92792f39173dSmrgdnl other dealings in this Software without prior written authorization
92802f39173dSmrgdnl from the copyright holders.
92812f39173dSmrgdnl 
92822f39173dSmrg
92832f39173dSmrg# XORG_DRIVER_CHECK_EXT()
92842f39173dSmrg# --------------------------
92852f39173dSmrg# Checks for the $1 define in xorg-server.h (from the sdk).  If it
92862f39173dSmrg# is defined, then add $1 to $REQUIRED_MODULES.
92872f39173dSmrg
92882f39173dSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
92892f39173dSmrg	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
92902f39173dSmrg	SAVE_CFLAGS="$CFLAGS"
92912f39173dSmrg	CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
92922f39173dSmrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
92932f39173dSmrg#include "xorg-server.h"
92942f39173dSmrg#if !defined $1
92952f39173dSmrg#error $1 not defined
92962f39173dSmrg#endif
92972f39173dSmrg		]])],
92982f39173dSmrg		[_EXT_CHECK=yes],
92992f39173dSmrg		[_EXT_CHECK=no])
93002f39173dSmrg	CFLAGS="$SAVE_CFLAGS"
93012f39173dSmrg	AC_MSG_CHECKING([if $1 is defined])
93022f39173dSmrg	AC_MSG_RESULT([$_EXT_CHECK])
93032f39173dSmrg	if test "$_EXT_CHECK" != no; then
93042f39173dSmrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
93052f39173dSmrg	fi
93062f39173dSmrg])
93072f39173dSmrg
93082f39173dSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
93092f39173dSmrg#
93102f39173dSmrg# This file is free software; the Free Software Foundation
93112f39173dSmrg# gives unlimited permission to copy and/or distribute it,
93122f39173dSmrg# with or without modifications, as long as this notice is preserved.
93132f39173dSmrg
93142f39173dSmrg# AM_AUTOMAKE_VERSION(VERSION)
93152f39173dSmrg# ----------------------------
93162f39173dSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
93172f39173dSmrg# generated from the m4 files accompanying Automake X.Y.
93182f39173dSmrg# (This private macro should not be called outside this file.)
93192f39173dSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
93202f39173dSmrg[am__api_version='1.11'
93212f39173dSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
93222f39173dSmrgdnl require some minimum version.  Point them to the right macro.
93232f39173dSmrgm4_if([$1], [1.11.1], [],
93242f39173dSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
93252f39173dSmrg])
93262f39173dSmrg
93272f39173dSmrg# _AM_AUTOCONF_VERSION(VERSION)
93282f39173dSmrg# -----------------------------
93292f39173dSmrg# aclocal traces this macro to find the Autoconf version.
93302f39173dSmrg# This is a private macro too.  Using m4_define simplifies
93312f39173dSmrg# the logic in aclocal, which can simply ignore this definition.
93322f39173dSmrgm4_define([_AM_AUTOCONF_VERSION], [])
93332f39173dSmrg
93342f39173dSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
93352f39173dSmrg# -------------------------------
93362f39173dSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
93372f39173dSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
93382f39173dSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
93392f39173dSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl
93402f39173dSmrgm4_ifndef([AC_AUTOCONF_VERSION],
93412f39173dSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
93422f39173dSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
93432f39173dSmrg
93442f39173dSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
93452f39173dSmrg
93462f39173dSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
93472f39173dSmrg#
93482f39173dSmrg# This file is free software; the Free Software Foundation
93492f39173dSmrg# gives unlimited permission to copy and/or distribute it,
93502f39173dSmrg# with or without modifications, as long as this notice is preserved.
93512f39173dSmrg
93522f39173dSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
93532f39173dSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
93542f39173dSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9355ad43ddacSmrg#
9356ad43ddacSmrg# Of course, Automake must honor this variable whenever it calls a
9357ad43ddacSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
9358ad43ddacSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
9359ad43ddacSmrg# depending on how configure is run.  This is pretty annoying, since
9360ad43ddacSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
9361ad43ddacSmrg# source directory, any form will work fine, but in subdirectories a
9362ad43ddacSmrg# relative path needs to be adjusted first.
9363ad43ddacSmrg#
9364ad43ddacSmrg# $ac_aux_dir/missing
9365ad43ddacSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
9366ad43ddacSmrg# $top_srcdir/$ac_aux_dir/missing
9367ad43ddacSmrg#    fails if $ac_aux_dir is absolute,
9368ad43ddacSmrg#    fails when called from a subdirectory in a VPATH build with
9369ad43ddacSmrg#          a relative $ac_aux_dir
9370ad43ddacSmrg#
9371ad43ddacSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9372ad43ddacSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
9373ad43ddacSmrg# harmless because $srcdir is `.', but things will broke when you
9374ad43ddacSmrg# start a VPATH build or use an absolute $srcdir.
9375ad43ddacSmrg#
9376ad43ddacSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9377ad43ddacSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9378ad43ddacSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9379ad43ddacSmrg# and then we would define $MISSING as
9380ad43ddacSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
9381ad43ddacSmrg# This will work as long as MISSING is not called from configure, because
9382ad43ddacSmrg# unfortunately $(top_srcdir) has no meaning in configure.
9383ad43ddacSmrg# However there are other variables, like CC, which are often used in
9384ad43ddacSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
9385ad43ddacSmrg#
9386ad43ddacSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
9387ad43ddacSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
9388ad43ddacSmrg# configured tree to be moved without reconfiguration.
9389ad43ddacSmrg
9390ad43ddacSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
9391ad43ddacSmrg[dnl Rely on autoconf to set up CDPATH properly.
9392ad43ddacSmrgAC_PREREQ([2.50])dnl
9393ad43ddacSmrg# expand $ac_aux_dir to an absolute path
9394ad43ddacSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
9395ad43ddacSmrg])
9396ad43ddacSmrg
9397ad43ddacSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
9398ad43ddacSmrg
93992f39173dSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9400ad43ddacSmrg# Free Software Foundation, Inc.
9401ad43ddacSmrg#
9402ad43ddacSmrg# This file is free software; the Free Software Foundation
9403ad43ddacSmrg# gives unlimited permission to copy and/or distribute it,
9404ad43ddacSmrg# with or without modifications, as long as this notice is preserved.
9405ad43ddacSmrg
94062f39173dSmrg# serial 9
9407209ff23fSmrg
9408ad43ddacSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
9409ad43ddacSmrg# -------------------------------------
9410ad43ddacSmrg# Define a conditional.
9411ad43ddacSmrgAC_DEFUN([AM_CONDITIONAL],
9412ad43ddacSmrg[AC_PREREQ(2.52)dnl
9413ad43ddacSmrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
9414ad43ddacSmrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9415ad43ddacSmrgAC_SUBST([$1_TRUE])dnl
9416ad43ddacSmrgAC_SUBST([$1_FALSE])dnl
9417ad43ddacSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
9418ad43ddacSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
94192f39173dSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
9420ad43ddacSmrgif $2; then
9421ad43ddacSmrg  $1_TRUE=
9422ad43ddacSmrg  $1_FALSE='#'
9423ad43ddacSmrgelse
9424ad43ddacSmrg  $1_TRUE='#'
9425ad43ddacSmrg  $1_FALSE=
9426c503f109Smrgfi
9427ad43ddacSmrgAC_CONFIG_COMMANDS_PRE(
9428ad43ddacSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9429ad43ddacSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
9430ad43ddacSmrgUsually this means the macro was only invoked conditionally.]])
9431ad43ddacSmrgfi])])
9432209ff23fSmrg
94332f39173dSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9434ad43ddacSmrg# Free Software Foundation, Inc.
9435ad43ddacSmrg#
9436ad43ddacSmrg# This file is free software; the Free Software Foundation
9437ad43ddacSmrg# gives unlimited permission to copy and/or distribute it,
9438ad43ddacSmrg# with or without modifications, as long as this notice is preserved.
9439209ff23fSmrg
94402f39173dSmrg# serial 10
9441209ff23fSmrg
9442ad43ddacSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9443ad43ddacSmrg# written in clear, in which case automake, when reading aclocal.m4,
9444ad43ddacSmrg# will think it sees a *use*, and therefore will trigger all it's
9445ad43ddacSmrg# C support machinery.  Also note that it means that autoscan, seeing
9446ad43ddacSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9447209ff23fSmrg
9448ad43ddacSmrg
9449ad43ddacSmrg# _AM_DEPENDENCIES(NAME)
9450c503f109Smrg# ----------------------
9451ad43ddacSmrg# See how the compiler implements dependency checking.
9452ad43ddacSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
9453ad43ddacSmrg# We try a few techniques and use that to set a single cache variable.
9454209ff23fSmrg#
9455ad43ddacSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9456ad43ddacSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9457ad43ddacSmrg# dependency, and given that the user is not expected to run this macro,
9458ad43ddacSmrg# just rely on AC_PROG_CC.
9459ad43ddacSmrgAC_DEFUN([_AM_DEPENDENCIES],
9460ad43ddacSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
9461ad43ddacSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9462ad43ddacSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
9463ad43ddacSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
9464209ff23fSmrg
9465ad43ddacSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
9466ad43ddacSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
9467ad43ddacSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9468ad43ddacSmrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
9469ad43ddacSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
9470ad43ddacSmrg                   [depcc="$$1"   am_compiler_list=])
9471209ff23fSmrg
9472ad43ddacSmrgAC_CACHE_CHECK([dependency style of $depcc],
9473ad43ddacSmrg               [am_cv_$1_dependencies_compiler_type],
9474ad43ddacSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9475ad43ddacSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
9476ad43ddacSmrg  # making bogus files that we don't know about and never remove.  For
9477ad43ddacSmrg  # instance it was reported that on HP-UX the gcc test will end up
9478ad43ddacSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
9479ad43ddacSmrg  # in D'.
9480ad43ddacSmrg  mkdir conftest.dir
9481ad43ddacSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
9482ad43ddacSmrg  # using a relative directory.
9483ad43ddacSmrg  cp "$am_depcomp" conftest.dir
9484ad43ddacSmrg  cd conftest.dir
9485ad43ddacSmrg  # We will build objects and dependencies in a subdirectory because
9486ad43ddacSmrg  # it helps to detect inapplicable dependency modes.  For instance
9487ad43ddacSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
9488ad43ddacSmrg  # side effect of compilation, but ICC will put the dependencies in
9489ad43ddacSmrg  # the current directory while Tru64 will put them in the object
9490ad43ddacSmrg  # directory.
9491ad43ddacSmrg  mkdir sub
9492209ff23fSmrg
9493ad43ddacSmrg  am_cv_$1_dependencies_compiler_type=none
9494ad43ddacSmrg  if test "$am_compiler_list" = ""; then
9495ad43ddacSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9496ad43ddacSmrg  fi
94972f39173dSmrg  am__universal=false
94982f39173dSmrg  m4_case([$1], [CC],
94992f39173dSmrg    [case " $depcc " in #(
95002f39173dSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
95012f39173dSmrg     esac],
95022f39173dSmrg    [CXX],
95032f39173dSmrg    [case " $depcc " in #(
95042f39173dSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
95052f39173dSmrg     esac])
95062f39173dSmrg
9507ad43ddacSmrg  for depmode in $am_compiler_list; do
9508ad43ddacSmrg    # Setup a source with many dependencies, because some compilers
9509ad43ddacSmrg    # like to wrap large dependency lists on column 80 (with \), and
9510ad43ddacSmrg    # we should not choose a depcomp mode which is confused by this.
9511ad43ddacSmrg    #
9512ad43ddacSmrg    # We need to recreate these files for each test, as the compiler may
9513ad43ddacSmrg    # overwrite some of them when testing with obscure command lines.
9514ad43ddacSmrg    # This happens at least with the AIX C compiler.
9515ad43ddacSmrg    : > sub/conftest.c
9516ad43ddacSmrg    for i in 1 2 3 4 5 6; do
9517ad43ddacSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
9518ad43ddacSmrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9519ad43ddacSmrg      # Solaris 8's {/usr,}/bin/sh.
9520ad43ddacSmrg      touch sub/conftst$i.h
9521ad43ddacSmrg    done
9522ad43ddacSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9523209ff23fSmrg
95242f39173dSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
95252f39173dSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
95262f39173dSmrg    # handle `-M -o', and we need to detect this.  Also, some Intel
95272f39173dSmrg    # versions had trouble with output in subdirs
95282f39173dSmrg    am__obj=sub/conftest.${OBJEXT-o}
95292f39173dSmrg    am__minus_obj="-o $am__obj"
9530ad43ddacSmrg    case $depmode in
95312f39173dSmrg    gcc)
95322f39173dSmrg      # This depmode causes a compiler race in universal mode.
95332f39173dSmrg      test "$am__universal" = false || continue
95342f39173dSmrg      ;;
9535ad43ddacSmrg    nosideeffect)
9536ad43ddacSmrg      # after this tag, mechanisms are not by side-effect, so they'll
9537ad43ddacSmrg      # only be used when explicitly requested
9538ad43ddacSmrg      if test "x$enable_dependency_tracking" = xyes; then
9539ad43ddacSmrg	continue
9540ad43ddacSmrg      else
9541ad43ddacSmrg	break
9542ad43ddacSmrg      fi
9543ad43ddacSmrg      ;;
95442f39173dSmrg    msvisualcpp | msvcmsys)
95452f39173dSmrg      # This compiler won't grok `-c -o', but also, the minuso test has
95462f39173dSmrg      # not run yet.  These depmodes are late enough in the game, and
95472f39173dSmrg      # so weak that their functioning should not be impacted.
95482f39173dSmrg      am__obj=conftest.${OBJEXT-o}
95492f39173dSmrg      am__minus_obj=
95502f39173dSmrg      ;;
9551ad43ddacSmrg    none) break ;;
9552ad43ddacSmrg    esac
9553ad43ddacSmrg    if depmode=$depmode \
95542f39173dSmrg       source=sub/conftest.c object=$am__obj \
9555ad43ddacSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
95562f39173dSmrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9557ad43ddacSmrg         >/dev/null 2>conftest.err &&
9558ad43ddacSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9559ad43ddacSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
95602f39173dSmrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9561ad43ddacSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9562ad43ddacSmrg      # icc doesn't choke on unknown options, it will just issue warnings
9563ad43ddacSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
9564ad43ddacSmrg      # that says an option was ignored or not supported.
9565ad43ddacSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
9566ad43ddacSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
9567ad43ddacSmrg      # The diagnosis changed in icc 8.0:
9568ad43ddacSmrg      #   icc: Command line remark: option '-MP' not supported
9569ad43ddacSmrg      if (grep 'ignoring option' conftest.err ||
9570ad43ddacSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9571ad43ddacSmrg        am_cv_$1_dependencies_compiler_type=$depmode
9572ad43ddacSmrg        break
9573ad43ddacSmrg      fi
9574ad43ddacSmrg    fi
9575ad43ddacSmrg  done
9576209ff23fSmrg
9577ad43ddacSmrg  cd ..
9578ad43ddacSmrg  rm -rf conftest.dir
9579c503f109Smrgelse
9580ad43ddacSmrg  am_cv_$1_dependencies_compiler_type=none
9581c503f109Smrgfi
9582ad43ddacSmrg])
9583ad43ddacSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9584ad43ddacSmrgAM_CONDITIONAL([am__fastdep$1], [
9585ad43ddacSmrg  test "x$enable_dependency_tracking" != xno \
9586ad43ddacSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9587ad43ddacSmrg])
9588ad43ddacSmrg
9589ad43ddacSmrg
9590ad43ddacSmrg# AM_SET_DEPDIR
9591ad43ddacSmrg# -------------
9592ad43ddacSmrg# Choose a directory name for dependency files.
9593ad43ddacSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9594ad43ddacSmrgAC_DEFUN([AM_SET_DEPDIR],
9595ad43ddacSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9596ad43ddacSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9597ad43ddacSmrg])
9598ad43ddacSmrg
9599ad43ddacSmrg
9600ad43ddacSmrg# AM_DEP_TRACK
9601ad43ddacSmrg# ------------
9602ad43ddacSmrgAC_DEFUN([AM_DEP_TRACK],
9603ad43ddacSmrg[AC_ARG_ENABLE(dependency-tracking,
9604ad43ddacSmrg[  --disable-dependency-tracking  speeds up one-time build
9605ad43ddacSmrg  --enable-dependency-tracking   do not reject slow dependency extractors])
9606ad43ddacSmrgif test "x$enable_dependency_tracking" != xno; then
9607ad43ddacSmrg  am_depcomp="$ac_aux_dir/depcomp"
9608ad43ddacSmrg  AMDEPBACKSLASH='\'
9609c503f109Smrgfi
9610ad43ddacSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9611ad43ddacSmrgAC_SUBST([AMDEPBACKSLASH])dnl
9612ad43ddacSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9613ad43ddacSmrg])
9614209ff23fSmrg
9615ad43ddacSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
9616209ff23fSmrg
96172f39173dSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9618ad43ddacSmrg# Free Software Foundation, Inc.
9619209ff23fSmrg#
9620ad43ddacSmrg# This file is free software; the Free Software Foundation
9621ad43ddacSmrg# gives unlimited permission to copy and/or distribute it,
9622ad43ddacSmrg# with or without modifications, as long as this notice is preserved.
9623209ff23fSmrg
96242f39173dSmrg#serial 5
9625209ff23fSmrg
9626ad43ddacSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
9627ad43ddacSmrg# ------------------------------
9628ad43ddacSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
96292f39173dSmrg[{
96302f39173dSmrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
96312f39173dSmrg  # are listed without --file.  Let's play safe and only enable the eval
96322f39173dSmrg  # if we detect the quoting.
96332f39173dSmrg  case $CONFIG_FILES in
96342f39173dSmrg  *\'*) eval set x "$CONFIG_FILES" ;;
96352f39173dSmrg  *)   set x $CONFIG_FILES ;;
96362f39173dSmrg  esac
96372f39173dSmrg  shift
96382f39173dSmrg  for mf
96392f39173dSmrg  do
96402f39173dSmrg    # Strip MF so we end up with the name of the file.
96412f39173dSmrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
96422f39173dSmrg    # Check whether this is an Automake generated Makefile or not.
96432f39173dSmrg    # We used to match only the files named `Makefile.in', but
96442f39173dSmrg    # some people rename them; so instead we look at the file content.
96452f39173dSmrg    # Grep'ing the first line is not enough: some people post-process
96462f39173dSmrg    # each Makefile.in and add a new line on top of each file to say so.
96472f39173dSmrg    # Grep'ing the whole file is not good either: AIX grep has a line
96482f39173dSmrg    # limit of 2048, but all sed's we know have understand at least 4000.
96492f39173dSmrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
96502f39173dSmrg      dirpart=`AS_DIRNAME("$mf")`
96512f39173dSmrg    else
96522f39173dSmrg      continue
96532f39173dSmrg    fi
96542f39173dSmrg    # Extract the definition of DEPDIR, am__include, and am__quote
96552f39173dSmrg    # from the Makefile without running `make'.
96562f39173dSmrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
96572f39173dSmrg    test -z "$DEPDIR" && continue
96582f39173dSmrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
96592f39173dSmrg    test -z "am__include" && continue
96602f39173dSmrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
96612f39173dSmrg    # When using ansi2knr, U may be empty or an underscore; expand it
96622f39173dSmrg    U=`sed -n 's/^U = //p' < "$mf"`
96632f39173dSmrg    # Find all dependency output files, they are included files with
96642f39173dSmrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
96652f39173dSmrg    # simplest approach to changing $(DEPDIR) to its actual value in the
96662f39173dSmrg    # expansion.
96672f39173dSmrg    for file in `sed -n "
96682f39173dSmrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
96692f39173dSmrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
96702f39173dSmrg      # Make sure the directory exists.
96712f39173dSmrg      test -f "$dirpart/$file" && continue
96722f39173dSmrg      fdir=`AS_DIRNAME(["$file"])`
96732f39173dSmrg      AS_MKDIR_P([$dirpart/$fdir])
96742f39173dSmrg      # echo "creating $dirpart/$file"
96752f39173dSmrg      echo '# dummy' > "$dirpart/$file"
96762f39173dSmrg    done
9677ad43ddacSmrg  done
96782f39173dSmrg}
9679ad43ddacSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9680209ff23fSmrg
9681209ff23fSmrg
9682ad43ddacSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
9683ad43ddacSmrg# -----------------------------
9684ad43ddacSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
9685ad43ddacSmrg#
9686ad43ddacSmrg# This code is only required when automatic dependency tracking
9687ad43ddacSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
9688ad43ddacSmrg# need in order to bootstrap the dependency handling code.
9689ad43ddacSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9690ad43ddacSmrg[AC_CONFIG_COMMANDS([depfiles],
9691ad43ddacSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9692ad43ddacSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9693c503f109Smrg])
9694209ff23fSmrg
9695ad43ddacSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9696ad43ddacSmrg# Free Software Foundation, Inc.
9697c503f109Smrg#
9698ad43ddacSmrg# This file is free software; the Free Software Foundation
9699ad43ddacSmrg# gives unlimited permission to copy and/or distribute it,
9700ad43ddacSmrg# with or without modifications, as long as this notice is preserved.
9701ad43ddacSmrg
9702ad43ddacSmrg# serial 8
9703ad43ddacSmrg
9704ad43ddacSmrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
9705ad43ddacSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9706ad43ddacSmrg
9707ad43ddacSmrg# Do all the work for Automake.                             -*- Autoconf -*-
9708ad43ddacSmrg
9709ad43ddacSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
97102f39173dSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9711c503f109Smrg#
9712ad43ddacSmrg# This file is free software; the Free Software Foundation
9713ad43ddacSmrg# gives unlimited permission to copy and/or distribute it,
9714ad43ddacSmrg# with or without modifications, as long as this notice is preserved.
9715c503f109Smrg
97162f39173dSmrg# serial 16
9717209ff23fSmrg
9718ad43ddacSmrg# This macro actually does too much.  Some checks are only needed if
9719ad43ddacSmrg# your package does certain things.  But this isn't really a big deal.
9720209ff23fSmrg
9721ad43ddacSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9722ad43ddacSmrg# AM_INIT_AUTOMAKE([OPTIONS])
9723ad43ddacSmrg# -----------------------------------------------
9724ad43ddacSmrg# The call with PACKAGE and VERSION arguments is the old style
9725ad43ddacSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
9726ad43ddacSmrg# and VERSION should now be passed to AC_INIT and removed from
9727ad43ddacSmrg# the call to AM_INIT_AUTOMAKE.
9728ad43ddacSmrg# We support both call styles for the transition.  After
9729ad43ddacSmrg# the next Automake release, Autoconf can make the AC_INIT
9730ad43ddacSmrg# arguments mandatory, and then we can depend on a new Autoconf
9731ad43ddacSmrg# release and drop the old call support.
9732ad43ddacSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
97332f39173dSmrg[AC_PREREQ([2.62])dnl
9734ad43ddacSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
9735ad43ddacSmrgdnl the ones we care about.
9736ad43ddacSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9737ad43ddacSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9738ad43ddacSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
9739ad43ddacSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
9740ad43ddacSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9741ad43ddacSmrg  # is not polluted with repeated "-I."
9742ad43ddacSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9743ad43ddacSmrg  # test to see if srcdir already configured
9744ad43ddacSmrg  if test -f $srcdir/config.status; then
9745ad43ddacSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9746ad43ddacSmrg  fi
9747ad43ddacSmrgfi
9748ad43ddacSmrg
9749ad43ddacSmrg# test whether we have cygpath
9750ad43ddacSmrgif test -z "$CYGPATH_W"; then
9751ad43ddacSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
9752ad43ddacSmrg    CYGPATH_W='cygpath -w'
9753ad43ddacSmrg  else
9754ad43ddacSmrg    CYGPATH_W=echo
9755ad43ddacSmrg  fi
9756ad43ddacSmrgfi
9757ad43ddacSmrgAC_SUBST([CYGPATH_W])
9758209ff23fSmrg
9759ad43ddacSmrg# Define the identity of the package.
9760ad43ddacSmrgdnl Distinguish between old-style and new-style calls.
9761ad43ddacSmrgm4_ifval([$2],
9762ad43ddacSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9763ad43ddacSmrg AC_SUBST([PACKAGE], [$1])dnl
9764ad43ddacSmrg AC_SUBST([VERSION], [$2])],
9765ad43ddacSmrg[_AM_SET_OPTIONS([$1])dnl
9766ad43ddacSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9767ad43ddacSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9768ad43ddacSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9769ad43ddacSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9770ad43ddacSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9771209ff23fSmrg
9772ad43ddacSmrg_AM_IF_OPTION([no-define],,
9773ad43ddacSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9774ad43ddacSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9775ad43ddacSmrg
9776ad43ddacSmrg# Some tools Automake needs.
9777ad43ddacSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
9778ad43ddacSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
9779ad43ddacSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9780ad43ddacSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
9781ad43ddacSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9782ad43ddacSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
9783ad43ddacSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
97842f39173dSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
97852f39173dSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9786ad43ddacSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
9787ad43ddacSmrg# We need awk for the "check" target.  The system "awk" is bad on
9788ad43ddacSmrg# some platforms.
9789ad43ddacSmrgAC_REQUIRE([AC_PROG_AWK])dnl
9790ad43ddacSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
9791ad43ddacSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
9792ad43ddacSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
97932f39173dSmrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
97942f39173dSmrg			     [_AM_PROG_TAR([v7])])])
9795ad43ddacSmrg_AM_IF_OPTION([no-dependencies],,
9796ad43ddacSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
97972f39173dSmrg		  [_AM_DEPENDENCIES(CC)],
97982f39173dSmrg		  [define([AC_PROG_CC],
97992f39173dSmrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9800ad43ddacSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
98012f39173dSmrg		  [_AM_DEPENDENCIES(CXX)],
98022f39173dSmrg		  [define([AC_PROG_CXX],
98032f39173dSmrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9804ad43ddacSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
98052f39173dSmrg		  [_AM_DEPENDENCIES(OBJC)],
98062f39173dSmrg		  [define([AC_PROG_OBJC],
98072f39173dSmrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9808ad43ddacSmrg])
98092f39173dSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
98102f39173dSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
98112f39173dSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
98122f39173dSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
98132f39173dSmrgAC_CONFIG_COMMANDS_PRE(dnl
98142f39173dSmrg[m4_provide_if([_AM_COMPILER_EXEEXT],
98152f39173dSmrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9816209ff23fSmrg])
9817209ff23fSmrg
98182f39173dSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
98192f39173dSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
98202f39173dSmrgdnl mangled by Autoconf and run in a shell conditional statement.
98212f39173dSmrgm4_define([_AC_COMPILER_EXEEXT],
98222f39173dSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
98232f39173dSmrg
9824c503f109Smrg
9825ad43ddacSmrg# When config.status generates a header, we must update the stamp-h file.
9826ad43ddacSmrg# This file resides in the same directory as the config header
9827ad43ddacSmrg# that is generated.  The stamp files are numbered to have different names.
9828209ff23fSmrg
9829ad43ddacSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9830ad43ddacSmrg# loop where config.status creates the headers, so we can generate
9831ad43ddacSmrg# our stamp files there.
9832ad43ddacSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9833ad43ddacSmrg[# Compute $1's index in $config_headers.
9834ad43ddacSmrg_am_arg=$1
9835ad43ddacSmrg_am_stamp_count=1
9836ad43ddacSmrgfor _am_header in $config_headers :; do
9837ad43ddacSmrg  case $_am_header in
9838ad43ddacSmrg    $_am_arg | $_am_arg:* )
9839ad43ddacSmrg      break ;;
9840ad43ddacSmrg    * )
9841ad43ddacSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9842ad43ddacSmrg  esac
9843ad43ddacSmrgdone
9844ad43ddacSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9845c503f109Smrg
98462f39173dSmrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
9847209ff23fSmrg#
9848209ff23fSmrg# This file is free software; the Free Software Foundation
9849209ff23fSmrg# gives unlimited permission to copy and/or distribute it,
9850209ff23fSmrg# with or without modifications, as long as this notice is preserved.
9851209ff23fSmrg
9852ad43ddacSmrg# AM_PROG_INSTALL_SH
9853ad43ddacSmrg# ------------------
9854ad43ddacSmrg# Define $install_sh.
9855ad43ddacSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
9856ad43ddacSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
98572f39173dSmrgif test x"${install_sh}" != xset; then
98582f39173dSmrg  case $am_aux_dir in
98592f39173dSmrg  *\ * | *\	*)
98602f39173dSmrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
98612f39173dSmrg  *)
98622f39173dSmrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
98632f39173dSmrg  esac
98642f39173dSmrgfi
9865ad43ddacSmrgAC_SUBST(install_sh)])
9866209ff23fSmrg
9867ad43ddacSmrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
9868209ff23fSmrg#
9869209ff23fSmrg# This file is free software; the Free Software Foundation
9870209ff23fSmrg# gives unlimited permission to copy and/or distribute it,
9871209ff23fSmrg# with or without modifications, as long as this notice is preserved.
9872209ff23fSmrg
9873ad43ddacSmrg# serial 2
9874209ff23fSmrg
9875ad43ddacSmrg# Check whether the underlying file-system supports filenames
9876ad43ddacSmrg# with a leading dot.  For instance MS-DOS doesn't.
9877ad43ddacSmrgAC_DEFUN([AM_SET_LEADING_DOT],
9878ad43ddacSmrg[rm -rf .tst 2>/dev/null
9879ad43ddacSmrgmkdir .tst 2>/dev/null
9880ad43ddacSmrgif test -d .tst; then
9881ad43ddacSmrg  am__leading_dot=.
9882209ff23fSmrgelse
9883ad43ddacSmrg  am__leading_dot=_
9884209ff23fSmrgfi
9885ad43ddacSmrgrmdir .tst 2>/dev/null
9886ad43ddacSmrgAC_SUBST([am__leading_dot])])
9887ad43ddacSmrg
9888ad43ddacSmrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
9889ad43ddacSmrg# From Jim Meyering
9890209ff23fSmrg
98912f39173dSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9892c503f109Smrg# Free Software Foundation, Inc.
9893209ff23fSmrg#
9894209ff23fSmrg# This file is free software; the Free Software Foundation
9895209ff23fSmrg# gives unlimited permission to copy and/or distribute it,
9896209ff23fSmrg# with or without modifications, as long as this notice is preserved.
9897209ff23fSmrg
98982f39173dSmrg# serial 5
9899209ff23fSmrg
99002f39173dSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
99012f39173dSmrg# ----------------------------------
99022f39173dSmrg# Control maintainer-specific portions of Makefiles.
99032f39173dSmrg# Default is to disable them, unless `enable' is passed literally.
99042f39173dSmrg# For symmetry, `disable' may be passed as well.  Anyway, the user
99052f39173dSmrg# can override the default with the --enable/--disable switch.
9906ad43ddacSmrgAC_DEFUN([AM_MAINTAINER_MODE],
99072f39173dSmrg[m4_case(m4_default([$1], [disable]),
99082f39173dSmrg       [enable], [m4_define([am_maintainer_other], [disable])],
99092f39173dSmrg       [disable], [m4_define([am_maintainer_other], [enable])],
99102f39173dSmrg       [m4_define([am_maintainer_other], [enable])
99112f39173dSmrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
99122f39173dSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
99132f39173dSmrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
99142f39173dSmrg  AC_ARG_ENABLE([maintainer-mode],
99152f39173dSmrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
9916ad43ddacSmrg			  (and sometimes confusing) to the casual installer],
99172f39173dSmrg      [USE_MAINTAINER_MODE=$enableval],
99182f39173dSmrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
9919ad43ddacSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
99202f39173dSmrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
9921ad43ddacSmrg  MAINT=$MAINTAINER_MODE_TRUE
99222f39173dSmrg  AC_SUBST([MAINT])dnl
9923ad43ddacSmrg]
9924ad43ddacSmrg)
9925209ff23fSmrg
9926ad43ddacSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
9927209ff23fSmrg
9928ad43ddacSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
9929ad43ddacSmrg
99302f39173dSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
9931209ff23fSmrg#
9932ad43ddacSmrg# This file is free software; the Free Software Foundation
9933ad43ddacSmrg# gives unlimited permission to copy and/or distribute it,
9934ad43ddacSmrg# with or without modifications, as long as this notice is preserved.
9935209ff23fSmrg
99362f39173dSmrg# serial 4
9937209ff23fSmrg
9938ad43ddacSmrg# AM_MAKE_INCLUDE()
9939ad43ddacSmrg# -----------------
9940ad43ddacSmrg# Check to see how make treats includes.
9941ad43ddacSmrgAC_DEFUN([AM_MAKE_INCLUDE],
9942ad43ddacSmrg[am_make=${MAKE-make}
9943ad43ddacSmrgcat > confinc << 'END'
9944ad43ddacSmrgam__doit:
99452f39173dSmrg	@echo this is the am__doit target
9946ad43ddacSmrg.PHONY: am__doit
9947ad43ddacSmrgEND
9948ad43ddacSmrg# If we don't find an include directive, just comment out the code.
9949ad43ddacSmrgAC_MSG_CHECKING([for style of include used by $am_make])
9950ad43ddacSmrgam__include="#"
9951ad43ddacSmrgam__quote=
9952ad43ddacSmrg_am_result=none
9953ad43ddacSmrg# First try GNU make style include.
9954ad43ddacSmrgecho "include confinc" > confmf
99552f39173dSmrg# Ignore all kinds of additional output from `make'.
99562f39173dSmrgcase `$am_make -s -f confmf 2> /dev/null` in #(
99572f39173dSmrg*the\ am__doit\ target*)
99582f39173dSmrg  am__include=include
99592f39173dSmrg  am__quote=
99602f39173dSmrg  _am_result=GNU
99612f39173dSmrg  ;;
99622f39173dSmrgesac
9963ad43ddacSmrg# Now try BSD make style include.
9964ad43ddacSmrgif test "$am__include" = "#"; then
9965ad43ddacSmrg   echo '.include "confinc"' > confmf
99662f39173dSmrg   case `$am_make -s -f confmf 2> /dev/null` in #(
99672f39173dSmrg   *the\ am__doit\ target*)
99682f39173dSmrg     am__include=.include
99692f39173dSmrg     am__quote="\""
99702f39173dSmrg     _am_result=BSD
99712f39173dSmrg     ;;
99722f39173dSmrg   esac
9973ad43ddacSmrgfi
9974ad43ddacSmrgAC_SUBST([am__include])
9975ad43ddacSmrgAC_SUBST([am__quote])
9976ad43ddacSmrgAC_MSG_RESULT([$_am_result])
9977ad43ddacSmrgrm -f confinc confmf
9978ad43ddacSmrg])
9979c503f109Smrg
9980ad43ddacSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
9981c503f109Smrg
99822f39173dSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
9983ad43ddacSmrg# Free Software Foundation, Inc.
9984ad43ddacSmrg#
9985ad43ddacSmrg# This file is free software; the Free Software Foundation
9986ad43ddacSmrg# gives unlimited permission to copy and/or distribute it,
9987ad43ddacSmrg# with or without modifications, as long as this notice is preserved.
9988209ff23fSmrg
99892f39173dSmrg# serial 6
9990209ff23fSmrg
9991ad43ddacSmrg# AM_MISSING_PROG(NAME, PROGRAM)
9992ad43ddacSmrg# ------------------------------
9993ad43ddacSmrgAC_DEFUN([AM_MISSING_PROG],
9994ad43ddacSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
9995ad43ddacSmrg$1=${$1-"${am_missing_run}$2"}
9996ad43ddacSmrgAC_SUBST($1)])
9997ad43ddacSmrg
9998ad43ddacSmrg
9999ad43ddacSmrg# AM_MISSING_HAS_RUN
10000ad43ddacSmrg# ------------------
10001ad43ddacSmrg# Define MISSING if not defined so far and test if it supports --run.
10002ad43ddacSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
10003ad43ddacSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
10004ad43ddacSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10005ad43ddacSmrgAC_REQUIRE_AUX_FILE([missing])dnl
100062f39173dSmrgif test x"${MISSING+set}" != xset; then
100072f39173dSmrg  case $am_aux_dir in
100082f39173dSmrg  *\ * | *\	*)
100092f39173dSmrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
100102f39173dSmrg  *)
100112f39173dSmrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
100122f39173dSmrg  esac
100132f39173dSmrgfi
10014ad43ddacSmrg# Use eval to expand $SHELL
10015ad43ddacSmrgif eval "$MISSING --run true"; then
10016ad43ddacSmrg  am_missing_run="$MISSING --run "
10017c503f109Smrgelse
10018ad43ddacSmrg  am_missing_run=
10019ad43ddacSmrg  AC_MSG_WARN([`missing' script is too old or missing])
10020c503f109Smrgfi
10021c503f109Smrg])
10022209ff23fSmrg
10023ad43ddacSmrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
10024ad43ddacSmrg#
10025ad43ddacSmrg# This file is free software; the Free Software Foundation
10026ad43ddacSmrg# gives unlimited permission to copy and/or distribute it,
10027ad43ddacSmrg# with or without modifications, as long as this notice is preserved.
10028209ff23fSmrg
10029ad43ddacSmrg# AM_PROG_MKDIR_P
10030ad43ddacSmrg# ---------------
10031ad43ddacSmrg# Check for `mkdir -p'.
10032ad43ddacSmrgAC_DEFUN([AM_PROG_MKDIR_P],
10033ad43ddacSmrg[AC_PREREQ([2.60])dnl
10034ad43ddacSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
10035ad43ddacSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
10036ad43ddacSmrgdnl while keeping a definition of mkdir_p for backward compatibility.
10037ad43ddacSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
10038ad43ddacSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
10039ad43ddacSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
10040ad43ddacSmrgdnl adjustment using top_builddir (which is defined more often than
10041ad43ddacSmrgdnl MKDIR_P).
10042ad43ddacSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
10043ad43ddacSmrgcase $mkdir_p in
10044ad43ddacSmrg  [[\\/$]]* | ?:[[\\/]]*) ;;
10045ad43ddacSmrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
10046ad43ddacSmrgesac
10047c503f109Smrg])
10048209ff23fSmrg
10049ad43ddacSmrg# Helper functions for option handling.                     -*- Autoconf -*-
10050209ff23fSmrg
100512f39173dSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
10052ad43ddacSmrg#
10053ad43ddacSmrg# This file is free software; the Free Software Foundation
10054ad43ddacSmrg# gives unlimited permission to copy and/or distribute it,
10055ad43ddacSmrg# with or without modifications, as long as this notice is preserved.
10056209ff23fSmrg
100572f39173dSmrg# serial 4
10058ad43ddacSmrg
10059ad43ddacSmrg# _AM_MANGLE_OPTION(NAME)
10060ad43ddacSmrg# -----------------------
10061ad43ddacSmrgAC_DEFUN([_AM_MANGLE_OPTION],
10062ad43ddacSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10063ad43ddacSmrg
10064ad43ddacSmrg# _AM_SET_OPTION(NAME)
10065ad43ddacSmrg# ------------------------------
10066ad43ddacSmrg# Set option NAME.  Presently that only means defining a flag for this option.
10067ad43ddacSmrgAC_DEFUN([_AM_SET_OPTION],
10068ad43ddacSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10069ad43ddacSmrg
10070ad43ddacSmrg# _AM_SET_OPTIONS(OPTIONS)
10071ad43ddacSmrg# ----------------------------------
10072ad43ddacSmrg# OPTIONS is a space-separated list of Automake options.
10073ad43ddacSmrgAC_DEFUN([_AM_SET_OPTIONS],
100742f39173dSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10075ad43ddacSmrg
10076ad43ddacSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10077ad43ddacSmrg# -------------------------------------------
10078ad43ddacSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10079ad43ddacSmrgAC_DEFUN([_AM_IF_OPTION],
10080ad43ddacSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10081ad43ddacSmrg
10082ad43ddacSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
10083209ff23fSmrg
100842f39173dSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
10085c503f109Smrg# Free Software Foundation, Inc.
10086209ff23fSmrg#
10087c503f109Smrg# This file is free software; the Free Software Foundation
10088c503f109Smrg# gives unlimited permission to copy and/or distribute it,
10089c503f109Smrg# with or without modifications, as long as this notice is preserved.
10090209ff23fSmrg
100912f39173dSmrg# serial 5
10092209ff23fSmrg
10093ad43ddacSmrg# AM_SANITY_CHECK
10094ad43ddacSmrg# ---------------
10095ad43ddacSmrgAC_DEFUN([AM_SANITY_CHECK],
10096ad43ddacSmrg[AC_MSG_CHECKING([whether build environment is sane])
10097ad43ddacSmrg# Just in case
10098ad43ddacSmrgsleep 1
10099ad43ddacSmrgecho timestamp > conftest.file
101002f39173dSmrg# Reject unsafe characters in $srcdir or the absolute working directory
101012f39173dSmrg# name.  Accept space and tab only in the latter.
101022f39173dSmrgam_lf='
101032f39173dSmrg'
101042f39173dSmrgcase `pwd` in
101052f39173dSmrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
101062f39173dSmrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
101072f39173dSmrgesac
101082f39173dSmrgcase $srcdir in
101092f39173dSmrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
101102f39173dSmrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
101112f39173dSmrgesac
101122f39173dSmrg
10113ad43ddacSmrg# Do `set' in a subshell so we don't clobber the current shell's
10114ad43ddacSmrg# arguments.  Must try -L first in case configure is actually a
10115ad43ddacSmrg# symlink; some systems play weird games with the mod time of symlinks
10116ad43ddacSmrg# (eg FreeBSD returns the mod time of the symlink's containing
10117ad43ddacSmrg# directory).
10118ad43ddacSmrgif (
101192f39173dSmrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10120ad43ddacSmrg   if test "$[*]" = "X"; then
10121ad43ddacSmrg      # -L didn't work.
101222f39173dSmrg      set X `ls -t "$srcdir/configure" conftest.file`
10123ad43ddacSmrg   fi
10124ad43ddacSmrg   rm -f conftest.file
10125ad43ddacSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
10126ad43ddacSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
10127ad43ddacSmrg
10128ad43ddacSmrg      # If neither matched, then we have a broken ls.  This can happen
10129ad43ddacSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
10130ad43ddacSmrg      # broken ls alias from the environment.  This has actually
10131ad43ddacSmrg      # happened.  Such a system could not be considered "sane".
10132ad43ddacSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10133ad43ddacSmrgalias in your environment])
10134ad43ddacSmrg   fi
10135209ff23fSmrg
10136ad43ddacSmrg   test "$[2]" = conftest.file
10137ad43ddacSmrg   )
10138ad43ddacSmrgthen
10139ad43ddacSmrg   # Ok.
10140ad43ddacSmrg   :
10141ad43ddacSmrgelse
10142ad43ddacSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
10143ad43ddacSmrgCheck your system clock])
10144ad43ddacSmrgfi
10145ad43ddacSmrgAC_MSG_RESULT(yes)])
10146209ff23fSmrg
101472f39173dSmrg# Copyright (C) 2009  Free Software Foundation, Inc.
101482f39173dSmrg#
101492f39173dSmrg# This file is free software; the Free Software Foundation
101502f39173dSmrg# gives unlimited permission to copy and/or distribute it,
101512f39173dSmrg# with or without modifications, as long as this notice is preserved.
101522f39173dSmrg
101532f39173dSmrg# serial 1
101542f39173dSmrg
101552f39173dSmrg# AM_SILENT_RULES([DEFAULT])
101562f39173dSmrg# --------------------------
101572f39173dSmrg# Enable less verbose build rules; with the default set to DEFAULT
101582f39173dSmrg# (`yes' being less verbose, `no' or empty being verbose).
101592f39173dSmrgAC_DEFUN([AM_SILENT_RULES],
101602f39173dSmrg[AC_ARG_ENABLE([silent-rules],
101612f39173dSmrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
101622f39173dSmrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
101632f39173dSmrgcase $enable_silent_rules in
101642f39173dSmrgyes) AM_DEFAULT_VERBOSITY=0;;
101652f39173dSmrgno)  AM_DEFAULT_VERBOSITY=1;;
101662f39173dSmrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
101672f39173dSmrgesac
101682f39173dSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
101692f39173dSmrgAM_BACKSLASH='\'
101702f39173dSmrgAC_SUBST([AM_BACKSLASH])dnl
101712f39173dSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
101722f39173dSmrg])
101732f39173dSmrg
10174ad43ddacSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
10175c503f109Smrg#
10176ad43ddacSmrg# This file is free software; the Free Software Foundation
10177ad43ddacSmrg# gives unlimited permission to copy and/or distribute it,
10178ad43ddacSmrg# with or without modifications, as long as this notice is preserved.
10179ad43ddacSmrg
10180ad43ddacSmrg# AM_PROG_INSTALL_STRIP
10181ad43ddacSmrg# ---------------------
10182ad43ddacSmrg# One issue with vendor `install' (even GNU) is that you can't
10183ad43ddacSmrg# specify the program used to strip binaries.  This is especially
10184ad43ddacSmrg# annoying in cross-compiling environments, where the build's strip
10185ad43ddacSmrg# is unlikely to handle the host's binaries.
10186ad43ddacSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
10187ad43ddacSmrg# always use install-sh in `make install-strip', and initialize
10188ad43ddacSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
10189ad43ddacSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
10190ad43ddacSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10191ad43ddacSmrg# Installed binaries are usually stripped using `strip' when the user
10192ad43ddacSmrg# run `make install-strip'.  However `strip' might not be the right
10193ad43ddacSmrg# tool to use in cross-compilation environments, therefore Automake
10194ad43ddacSmrg# will honor the `STRIP' environment variable to overrule this program.
10195ad43ddacSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10196ad43ddacSmrgif test "$cross_compiling" != no; then
10197ad43ddacSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
10198ad43ddacSmrgfi
10199ad43ddacSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10200ad43ddacSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
10201209ff23fSmrg
102022f39173dSmrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
10203c503f109Smrg#
10204c503f109Smrg# This file is free software; the Free Software Foundation
10205c503f109Smrg# gives unlimited permission to copy and/or distribute it,
10206c503f109Smrg# with or without modifications, as long as this notice is preserved.
10207209ff23fSmrg
102082f39173dSmrg# serial 2
102092f39173dSmrg
10210ad43ddacSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
10211ad43ddacSmrg# ---------------------------
10212ad43ddacSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10213ad43ddacSmrg# This macro is traced by Automake.
10214ad43ddacSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
10215209ff23fSmrg
102162f39173dSmrg# AM_SUBST_NOTMAKE(VARIABLE)
102172f39173dSmrg# ---------------------------
102182f39173dSmrg# Public sister of _AM_SUBST_NOTMAKE.
102192f39173dSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
102202f39173dSmrg
10221ad43ddacSmrg# Check how to create a tarball.                            -*- Autoconf -*-
10222209ff23fSmrg
10223ad43ddacSmrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
10224209ff23fSmrg#
10225c503f109Smrg# This file is free software; the Free Software Foundation
10226c503f109Smrg# gives unlimited permission to copy and/or distribute it,
10227c503f109Smrg# with or without modifications, as long as this notice is preserved.
10228209ff23fSmrg
10229ad43ddacSmrg# serial 2
10230209ff23fSmrg
10231ad43ddacSmrg# _AM_PROG_TAR(FORMAT)
10232ad43ddacSmrg# --------------------
10233ad43ddacSmrg# Check how to create a tarball in format FORMAT.
10234ad43ddacSmrg# FORMAT should be one of `v7', `ustar', or `pax'.
10235ad43ddacSmrg#
10236ad43ddacSmrg# Substitute a variable $(am__tar) that is a command
10237ad43ddacSmrg# writing to stdout a FORMAT-tarball containing the directory
10238ad43ddacSmrg# $tardir.
10239ad43ddacSmrg#     tardir=directory && $(am__tar) > result.tar
10240ad43ddacSmrg#
10241ad43ddacSmrg# Substitute a variable $(am__untar) that extract such
10242ad43ddacSmrg# a tarball read from stdin.
10243ad43ddacSmrg#     $(am__untar) < result.tar
10244ad43ddacSmrgAC_DEFUN([_AM_PROG_TAR],
10245ad43ddacSmrg[# Always define AMTAR for backward compatibility.
10246ad43ddacSmrgAM_MISSING_PROG([AMTAR], [tar])
10247ad43ddacSmrgm4_if([$1], [v7],
10248ad43ddacSmrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
10249ad43ddacSmrg     [m4_case([$1], [ustar],, [pax],,
10250ad43ddacSmrg              [m4_fatal([Unknown tar format])])
10251ad43ddacSmrgAC_MSG_CHECKING([how to create a $1 tar archive])
10252ad43ddacSmrg# Loop over all known methods to create a tar archive until one works.
10253ad43ddacSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10254ad43ddacSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
10255ad43ddacSmrg# Do not fold the above two line into one, because Tru64 sh and
10256ad43ddacSmrg# Solaris sh will not grok spaces in the rhs of `-'.
10257ad43ddacSmrgfor _am_tool in $_am_tools
10258ad43ddacSmrgdo
10259ad43ddacSmrg  case $_am_tool in
10260ad43ddacSmrg  gnutar)
10261ad43ddacSmrg    for _am_tar in tar gnutar gtar;
10262ad43ddacSmrg    do
10263ad43ddacSmrg      AM_RUN_LOG([$_am_tar --version]) && break
10264ad43ddacSmrg    done
10265ad43ddacSmrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10266ad43ddacSmrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10267ad43ddacSmrg    am__untar="$_am_tar -xf -"
10268ad43ddacSmrg    ;;
10269ad43ddacSmrg  plaintar)
10270ad43ddacSmrg    # Must skip GNU tar: if it does not support --format= it doesn't create
10271ad43ddacSmrg    # ustar tarball either.
10272ad43ddacSmrg    (tar --version) >/dev/null 2>&1 && continue
10273ad43ddacSmrg    am__tar='tar chf - "$$tardir"'
10274ad43ddacSmrg    am__tar_='tar chf - "$tardir"'
10275ad43ddacSmrg    am__untar='tar xf -'
10276ad43ddacSmrg    ;;
10277ad43ddacSmrg  pax)
10278ad43ddacSmrg    am__tar='pax -L -x $1 -w "$$tardir"'
10279ad43ddacSmrg    am__tar_='pax -L -x $1 -w "$tardir"'
10280ad43ddacSmrg    am__untar='pax -r'
10281ad43ddacSmrg    ;;
10282ad43ddacSmrg  cpio)
10283ad43ddacSmrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10284ad43ddacSmrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10285ad43ddacSmrg    am__untar='cpio -i -H $1 -d'
10286ad43ddacSmrg    ;;
10287ad43ddacSmrg  none)
10288ad43ddacSmrg    am__tar=false
10289ad43ddacSmrg    am__tar_=false
10290ad43ddacSmrg    am__untar=false
10291ad43ddacSmrg    ;;
10292ad43ddacSmrg  esac
10293209ff23fSmrg
10294ad43ddacSmrg  # If the value was cached, stop now.  We just wanted to have am__tar
10295ad43ddacSmrg  # and am__untar set.
10296ad43ddacSmrg  test -n "${am_cv_prog_tar_$1}" && break
10297ad43ddacSmrg
10298ad43ddacSmrg  # tar/untar a dummy directory, and stop if the command works
10299ad43ddacSmrg  rm -rf conftest.dir
10300ad43ddacSmrg  mkdir conftest.dir
10301ad43ddacSmrg  echo GrepMe > conftest.dir/file
10302ad43ddacSmrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10303ad43ddacSmrg  rm -rf conftest.dir
10304ad43ddacSmrg  if test -s conftest.tar; then
10305ad43ddacSmrg    AM_RUN_LOG([$am__untar <conftest.tar])
10306ad43ddacSmrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10307c503f109Smrg  fi
10308ad43ddacSmrgdone
10309ad43ddacSmrgrm -rf conftest.dir
10310ad43ddacSmrg
10311ad43ddacSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10312ad43ddacSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
10313ad43ddacSmrgAC_SUBST([am__tar])
10314ad43ddacSmrgAC_SUBST([am__untar])
10315ad43ddacSmrg]) # _AM_PROG_TAR
10316ad43ddacSmrg
10317