aclocal.m4 revision 698f425b
1698f425bSmrg# generated automatically by aclocal 1.11 -*- Autoconf -*-
2266e564dSmrg
3266e564dSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4698f425bSmrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5266e564dSmrg# This file is free software; the Free Software Foundation
6266e564dSmrg# gives unlimited permission to copy and/or distribute it,
7266e564dSmrg# with or without modifications, as long as this notice is preserved.
8266e564dSmrg
9266e564dSmrg# This program is distributed in the hope that it will be useful,
10266e564dSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11266e564dSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12266e564dSmrg# PARTICULAR PURPOSE.
13266e564dSmrg
14c5629e66Smrgm4_ifndef([AC_AUTOCONF_VERSION],
15c5629e66Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16c5629e66Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17c5629e66Smrg[m4_warning([this file was generated for autoconf 2.63.
18c5629e66SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
19c5629e66SmrgIf you have problems, you may need to regenerate the build system entirely.
20c5629e66SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21266e564dSmrg
22c5629e66Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23698f425bSmrg#
24698f425bSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
25698f425bSmrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
26698f425bSmrg#   Written by Gordon Matzigkeit, 1996
27698f425bSmrg#
28698f425bSmrg# This file is free software; the Free Software Foundation gives
29698f425bSmrg# unlimited permission to copy and/or distribute it, with or without
30698f425bSmrg# modifications, as long as this notice is preserved.
31698f425bSmrg
32698f425bSmrgm4_define([_LT_COPYING], [dnl
33698f425bSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
34698f425bSmrg#                 2006, 2007, 2008 Free Software Foundation, Inc.
35698f425bSmrg#   Written by Gordon Matzigkeit, 1996
36698f425bSmrg#
37698f425bSmrg#   This file is part of GNU Libtool.
38698f425bSmrg#
39698f425bSmrg# GNU Libtool is free software; you can redistribute it and/or
40698f425bSmrg# modify it under the terms of the GNU General Public License as
41698f425bSmrg# published by the Free Software Foundation; either version 2 of
42698f425bSmrg# the License, or (at your option) any later version.
43698f425bSmrg#
44698f425bSmrg# As a special exception to the GNU General Public License,
45698f425bSmrg# if you distribute this file as part of a program or library that
46698f425bSmrg# is built using GNU Libtool, you may include this file under the
47698f425bSmrg# same distribution terms that you use for the rest of that program.
48698f425bSmrg#
49698f425bSmrg# GNU Libtool is distributed in the hope that it will be useful,
50698f425bSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
51698f425bSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
52698f425bSmrg# GNU General Public License for more details.
53698f425bSmrg#
54698f425bSmrg# You should have received a copy of the GNU General Public License
55698f425bSmrg# along with GNU Libtool; see the file COPYING.  If not, a copy
56698f425bSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
57698f425bSmrg# obtained by writing to the Free Software Foundation, Inc.,
58698f425bSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
59698f425bSmrg])
60266e564dSmrg
61698f425bSmrg# serial 56 LT_INIT
62266e564dSmrg
63266e564dSmrg
64698f425bSmrg# LT_PREREQ(VERSION)
65698f425bSmrg# ------------------
66698f425bSmrg# Complain and exit if this libtool version is less that VERSION.
67698f425bSmrgm4_defun([LT_PREREQ],
68698f425bSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
69698f425bSmrg       [m4_default([$3],
70698f425bSmrg		   [m4_fatal([Libtool version $1 or higher is required],
71698f425bSmrg		             63)])],
72698f425bSmrg       [$2])])
73266e564dSmrg
74266e564dSmrg
75698f425bSmrg# _LT_CHECK_BUILDDIR
76698f425bSmrg# ------------------
77698f425bSmrg# Complain if the absolute build directory name contains unusual characters
78698f425bSmrgm4_defun([_LT_CHECK_BUILDDIR],
79698f425bSmrg[case `pwd` in
80698f425bSmrg  *\ * | *\	*)
81698f425bSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
82698f425bSmrgesac
83698f425bSmrg])
84698f425bSmrg
85698f425bSmrg
86698f425bSmrg# LT_INIT([OPTIONS])
87698f425bSmrg# ------------------
88698f425bSmrgAC_DEFUN([LT_INIT],
89698f425bSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
90698f425bSmrgAC_BEFORE([$0], [LT_LANG])dnl
91698f425bSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
92698f425bSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
93698f425bSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
94698f425bSmrg
95698f425bSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
96698f425bSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
97698f425bSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
98698f425bSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
99698f425bSmrgdnl unless we require an AC_DEFUNed macro:
100698f425bSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
101698f425bSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
102698f425bSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
103698f425bSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
104698f425bSmrgm4_require([_LT_PROG_LTMAIN])dnl
105698f425bSmrg
106698f425bSmrgdnl Parse OPTIONS
107698f425bSmrg_LT_SET_OPTIONS([$0], [$1])
108266e564dSmrg
109c5629e66Smrg# This can be used to rebuild libtool when needed
110698f425bSmrgLIBTOOL_DEPS="$ltmain"
111266e564dSmrg
112c5629e66Smrg# Always use our own libtool.
113c5629e66SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
114c5629e66SmrgAC_SUBST(LIBTOOL)dnl
115266e564dSmrg
116698f425bSmrg_LT_SETUP
117266e564dSmrg
118698f425bSmrg# Only expand once:
119698f425bSmrgm4_define([LT_INIT])
120698f425bSmrg])# LT_INIT
121266e564dSmrg
122698f425bSmrg# Old names:
123698f425bSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
124698f425bSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
125698f425bSmrgdnl aclocal-1.4 backwards compatibility:
126698f425bSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
127698f425bSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
128698f425bSmrg
129698f425bSmrg
130698f425bSmrg# _LT_CC_BASENAME(CC)
131698f425bSmrg# -------------------
132698f425bSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
133698f425bSmrgm4_defun([_LT_CC_BASENAME],
134698f425bSmrg[for cc_temp in $1""; do
135698f425bSmrg  case $cc_temp in
136698f425bSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
137698f425bSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
138698f425bSmrg    \-*) ;;
139698f425bSmrg    *) break;;
140698f425bSmrg  esac
141698f425bSmrgdone
142698f425bSmrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
143698f425bSmrg])
144698f425bSmrg
145698f425bSmrg
146698f425bSmrg# _LT_FILEUTILS_DEFAULTS
147698f425bSmrg# ----------------------
148698f425bSmrg# It is okay to use these file commands and assume they have been set
149698f425bSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
150698f425bSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
151698f425bSmrg[: ${CP="cp -f"}
152698f425bSmrg: ${MV="mv -f"}
153698f425bSmrg: ${RM="rm -f"}
154698f425bSmrg])# _LT_FILEUTILS_DEFAULTS
155698f425bSmrg
156698f425bSmrg
157698f425bSmrg# _LT_SETUP
158698f425bSmrg# ---------
159698f425bSmrgm4_defun([_LT_SETUP],
160698f425bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
161c5629e66SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
162698f425bSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
163698f425bSmrg_LT_DECL([], [host], [0])dnl
164698f425bSmrg_LT_DECL([], [host_os], [0])dnl
165698f425bSmrgdnl
166698f425bSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
167698f425bSmrg_LT_DECL([], [build], [0])dnl
168698f425bSmrg_LT_DECL([], [build_os], [0])dnl
169698f425bSmrgdnl
170c5629e66SmrgAC_REQUIRE([AC_PROG_CC])dnl
171698f425bSmrgAC_REQUIRE([LT_PATH_LD])dnl
172698f425bSmrgAC_REQUIRE([LT_PATH_NM])dnl
173698f425bSmrgdnl
174c5629e66SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
175698f425bSmrgtest -z "$LN_S" && LN_S="ln -s"
176698f425bSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
177698f425bSmrgdnl
178698f425bSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
179698f425bSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
180698f425bSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
181c5629e66Smrgdnl
182698f425bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
183698f425bSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
184698f425bSmrgm4_require([_LT_CMD_RELOAD])dnl
185698f425bSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
186698f425bSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
187698f425bSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
188698f425bSmrg
189698f425bSmrg_LT_CONFIG_LIBTOOL_INIT([
190698f425bSmrg# See if we are running on zsh, and set the options which allow our
191698f425bSmrg# commands through without removal of \ escapes INIT.
192698f425bSmrgif test -n "\${ZSH_VERSION+set}" ; then
193698f425bSmrg   setopt NO_GLOB_SUBST
194698f425bSmrgfi
195698f425bSmrg])
196698f425bSmrgif test -n "${ZSH_VERSION+set}" ; then
197698f425bSmrg   setopt NO_GLOB_SUBST
198698f425bSmrgfi
199698f425bSmrg
200698f425bSmrg_LT_CHECK_OBJDIR
201266e564dSmrg
202698f425bSmrgm4_require([_LT_TAG_COMPILER])dnl
203698f425bSmrg_LT_PROG_ECHO_BACKSLASH
204266e564dSmrg
205c5629e66Smrgcase $host_os in
206c5629e66Smrgaix3*)
207c5629e66Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
208c5629e66Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
209c5629e66Smrg  # vanish in a puff of smoke.
210c5629e66Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
211c5629e66Smrg    COLLECT_NAMES=
212c5629e66Smrg    export COLLECT_NAMES
213c5629e66Smrg  fi
214c5629e66Smrg  ;;
215c5629e66Smrgesac
216266e564dSmrg
217c5629e66Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
218c5629e66Smrg# metacharacters that are still active within double-quoted strings.
219698f425bSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
220266e564dSmrg
221c5629e66Smrg# Same as above, but do not quote variable references.
222698f425bSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
223266e564dSmrg
224c5629e66Smrg# Sed substitution to delay expansion of an escaped shell variable in a
225c5629e66Smrg# double_quote_subst'ed string.
226c5629e66Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
227266e564dSmrg
228698f425bSmrg# Sed substitution to delay expansion of an escaped single quote.
229698f425bSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
230698f425bSmrg
231c5629e66Smrg# Sed substitution to avoid accidental globbing in evaled expressions
232c5629e66Smrgno_glob_subst='s/\*/\\\*/g'
233266e564dSmrg
234c5629e66Smrg# Global variables:
235698f425bSmrgofile=libtool
236c5629e66Smrgcan_build_shared=yes
237266e564dSmrg
238c5629e66Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
239c5629e66Smrg# which needs '.lib').
240c5629e66Smrglibext=a
241266e564dSmrg
242698f425bSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
243266e564dSmrg
244c5629e66Smrgold_CC="$CC"
245c5629e66Smrgold_CFLAGS="$CFLAGS"
246266e564dSmrg
247c5629e66Smrg# Set sane defaults for various variables
248c5629e66Smrgtest -z "$CC" && CC=cc
249c5629e66Smrgtest -z "$LTCC" && LTCC=$CC
250c5629e66Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
251c5629e66Smrgtest -z "$LD" && LD=ld
252c5629e66Smrgtest -z "$ac_objext" && ac_objext=o
253266e564dSmrg
254c5629e66Smrg_LT_CC_BASENAME([$compiler])
255c5629e66Smrg
256c5629e66Smrg# Only perform the check for file, if the check method requires it
257698f425bSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
258c5629e66Smrgcase $deplibs_check_method in
259c5629e66Smrgfile_magic*)
260c5629e66Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
261698f425bSmrg    _LT_PATH_MAGIC
262266e564dSmrg  fi
263c5629e66Smrg  ;;
264c5629e66Smrgesac
265266e564dSmrg
266698f425bSmrg# Use C for the default configuration in the libtool script
267698f425bSmrgLT_SUPPORTED_TAG([CC])
268698f425bSmrg_LT_LANG_C_CONFIG
269698f425bSmrg_LT_LANG_DEFAULT_CONFIG
270698f425bSmrg_LT_CONFIG_COMMANDS
271698f425bSmrg])# _LT_SETUP
272266e564dSmrg
273266e564dSmrg
274698f425bSmrg# _LT_PROG_LTMAIN
275698f425bSmrg# ---------------
276698f425bSmrg# Note that this code is called both from `configure', and `config.status'
277698f425bSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
278698f425bSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
279698f425bSmrg# so we pass a copy along to make sure it has a sensible value anyway.
280698f425bSmrgm4_defun([_LT_PROG_LTMAIN],
281698f425bSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
282698f425bSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
283698f425bSmrgltmain="$ac_aux_dir/ltmain.sh"
284698f425bSmrg])# _LT_PROG_LTMAIN
285266e564dSmrg
286266e564dSmrg
287698f425bSmrg
288698f425bSmrg# So that we can recreate a full libtool script including additional
289698f425bSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
290698f425bSmrg# in macros and then make a single call at the end using the `libtool'
291698f425bSmrg# label.
292698f425bSmrg
293698f425bSmrg
294698f425bSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
295698f425bSmrg# ----------------------------------------
296698f425bSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
297698f425bSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
298698f425bSmrg[m4_ifval([$1],
299698f425bSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
300698f425bSmrg                     [$1
301698f425bSmrg])])])
302698f425bSmrg
303698f425bSmrg# Initialize.
304698f425bSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
305698f425bSmrg
306698f425bSmrg
307698f425bSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
308698f425bSmrg# ------------------------------
309698f425bSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
310698f425bSmrgm4_define([_LT_CONFIG_LIBTOOL],
311698f425bSmrg[m4_ifval([$1],
312698f425bSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
313698f425bSmrg                     [$1
314698f425bSmrg])])])
315698f425bSmrg
316698f425bSmrg# Initialize.
317698f425bSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
318698f425bSmrg
319698f425bSmrg
320698f425bSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
321698f425bSmrg# -----------------------------------------------------
322698f425bSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
323698f425bSmrg[_LT_CONFIG_LIBTOOL([$1])
324698f425bSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
325698f425bSmrg])
326698f425bSmrg
327698f425bSmrg
328698f425bSmrg# _LT_FORMAT_COMMENT([COMMENT])
329698f425bSmrg# -----------------------------
330698f425bSmrg# Add leading comment marks to the start of each line, and a trailing
331698f425bSmrg# full-stop to the whole comment if one is not present already.
332698f425bSmrgm4_define([_LT_FORMAT_COMMENT],
333698f425bSmrg[m4_ifval([$1], [
334698f425bSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
335698f425bSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
336698f425bSmrg)])
337698f425bSmrg
338698f425bSmrg
339698f425bSmrg
340698f425bSmrg
341698f425bSmrg
342698f425bSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
343698f425bSmrg# -------------------------------------------------------------------
344698f425bSmrg# CONFIGNAME is the name given to the value in the libtool script.
345698f425bSmrg# VARNAME is the (base) name used in the configure script.
346698f425bSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
347698f425bSmrg# VARNAME.  Any other value will be used directly.
348698f425bSmrgm4_define([_LT_DECL],
349698f425bSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
350698f425bSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
351698f425bSmrg	[m4_ifval([$1], [$1], [$2])])
352698f425bSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
353698f425bSmrg    m4_ifval([$4],
354698f425bSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
355698f425bSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
356698f425bSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
357698f425bSmrg])
358698f425bSmrg
359698f425bSmrg
360698f425bSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
361698f425bSmrg# --------------------------------------------------------
362698f425bSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
363698f425bSmrg
364698f425bSmrg
365698f425bSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
366698f425bSmrg# ------------------------------------------------
367698f425bSmrgm4_define([lt_decl_tag_varnames],
368698f425bSmrg[_lt_decl_filter([tagged?], [yes], $@)])
369698f425bSmrg
370698f425bSmrg
371698f425bSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
372698f425bSmrg# ---------------------------------------------------------
373698f425bSmrgm4_define([_lt_decl_filter],
374698f425bSmrg[m4_case([$#],
375698f425bSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
376698f425bSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
377698f425bSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
378698f425bSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
379698f425bSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
380698f425bSmrg])
381698f425bSmrg
382698f425bSmrg
383698f425bSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
384698f425bSmrg# --------------------------------------------------
385698f425bSmrgm4_define([lt_decl_quote_varnames],
386698f425bSmrg[_lt_decl_filter([value], [1], $@)])
387698f425bSmrg
388698f425bSmrg
389698f425bSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
390698f425bSmrg# ---------------------------------------------------
391698f425bSmrgm4_define([lt_decl_dquote_varnames],
392698f425bSmrg[_lt_decl_filter([value], [2], $@)])
393698f425bSmrg
394698f425bSmrg
395698f425bSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
396698f425bSmrg# ---------------------------------------------------
397698f425bSmrgm4_define([lt_decl_varnames_tagged],
398698f425bSmrg[m4_assert([$# <= 2])dnl
399698f425bSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
400698f425bSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
401698f425bSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
402698f425bSmrgm4_define([_lt_decl_varnames_tagged],
403698f425bSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
404698f425bSmrg
405698f425bSmrg
406698f425bSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
407698f425bSmrg# ------------------------------------------------
408698f425bSmrgm4_define([lt_decl_all_varnames],
409698f425bSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
410698f425bSmrg     m4_if([$2], [],
411698f425bSmrg	   m4_quote(lt_decl_varnames),
412698f425bSmrg	m4_quote(m4_shift($@))))[]dnl
413698f425bSmrg])
414698f425bSmrgm4_define([_lt_decl_all_varnames],
415698f425bSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
416698f425bSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
417698f425bSmrg])
418698f425bSmrg
419698f425bSmrg
420698f425bSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
421698f425bSmrg# ------------------------------------
422698f425bSmrg# Quote a variable value, and forward it to `config.status' so that its
423698f425bSmrg# declaration there will have the same value as in `configure'.  VARNAME
424698f425bSmrg# must have a single quote delimited value for this to work.
425698f425bSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
426698f425bSmrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
427698f425bSmrg
428698f425bSmrg
429698f425bSmrg# _LT_CONFIG_STATUS_DECLARATIONS
430698f425bSmrg# ------------------------------
431698f425bSmrg# We delimit libtool config variables with single quotes, so when
432698f425bSmrg# we write them to config.status, we have to be sure to quote all
433698f425bSmrg# embedded single quotes properly.  In configure, this macro expands
434698f425bSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
435698f425bSmrg#
436698f425bSmrg#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
437698f425bSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
438698f425bSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
439698f425bSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
440266e564dSmrg
441266e564dSmrg
442698f425bSmrg# _LT_LIBTOOL_TAGS
443698f425bSmrg# ----------------
444698f425bSmrg# Output comment and list of tags supported by the script
445698f425bSmrgm4_defun([_LT_LIBTOOL_TAGS],
446698f425bSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
447698f425bSmrgavailable_tags="_LT_TAGS"dnl
448698f425bSmrg])
449698f425bSmrg
450698f425bSmrg
451698f425bSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
452698f425bSmrg# -----------------------------------
453698f425bSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
454698f425bSmrg# expand to a commented shell variable setting:
455698f425bSmrg#
456698f425bSmrg#    # Some comment about what VAR is for.
457698f425bSmrg#    visible_name=$lt_internal_name
458698f425bSmrgm4_define([_LT_LIBTOOL_DECLARE],
459698f425bSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
460698f425bSmrg					   [description])))[]dnl
461698f425bSmrgm4_pushdef([_libtool_name],
462698f425bSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
463698f425bSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
464698f425bSmrg    [0], [_libtool_name=[$]$1],
465698f425bSmrg    [1], [_libtool_name=$lt_[]$1],
466698f425bSmrg    [2], [_libtool_name=$lt_[]$1],
467698f425bSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
468698f425bSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
469698f425bSmrg])
470698f425bSmrg
471698f425bSmrg
472698f425bSmrg# _LT_LIBTOOL_CONFIG_VARS
473698f425bSmrg# -----------------------
474698f425bSmrg# Produce commented declarations of non-tagged libtool config variables
475698f425bSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
476698f425bSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
477698f425bSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
478698f425bSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
479698f425bSmrg[m4_foreach([_lt_var],
480698f425bSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
481698f425bSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
482698f425bSmrg
483698f425bSmrg
484698f425bSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
485698f425bSmrg# -------------------------
486698f425bSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
487698f425bSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
488698f425bSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
489698f425bSmrg
490698f425bSmrg
491698f425bSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
492698f425bSmrg# ------------------------------
493698f425bSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
494698f425bSmrg
495698f425bSmrg
496698f425bSmrg# _LT_CONFIG_COMMANDS
497c5629e66Smrg# -------------------
498698f425bSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
499698f425bSmrg# variables for single and double quote escaping we saved from calls
500698f425bSmrg# to _LT_DECL, we can put quote escaped variables declarations
501698f425bSmrg# into `config.status', and then the shell code to quote escape them in
502698f425bSmrg# for loops in `config.status'.  Finally, any additional code accumulated
503698f425bSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
504698f425bSmrgm4_defun([_LT_CONFIG_COMMANDS],
505698f425bSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
506698f425bSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
507698f425bSmrg	dnl instead of duplicating it all over again into config.status,
508698f425bSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
509698f425bSmrg	dnl needs to know what name is stored there:
510698f425bSmrg        [AC_CONFIG_COMMANDS([libtool],
511698f425bSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
512698f425bSmrg    dnl If the libtool generation code is destined for config.status,
513698f425bSmrg    dnl expand the accumulated commands and init code now:
514698f425bSmrg    [AC_CONFIG_COMMANDS([libtool],
515698f425bSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
516698f425bSmrg])#_LT_CONFIG_COMMANDS
517698f425bSmrg
518698f425bSmrg
519698f425bSmrg# Initialize.
520698f425bSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
521698f425bSmrg[
522698f425bSmrg
523698f425bSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
524698f425bSmrg# if CDPATH is set.
525698f425bSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
526698f425bSmrg
527698f425bSmrgsed_quote_subst='$sed_quote_subst'
528698f425bSmrgdouble_quote_subst='$double_quote_subst'
529698f425bSmrgdelay_variable_subst='$delay_variable_subst'
530698f425bSmrg_LT_CONFIG_STATUS_DECLARATIONS
531698f425bSmrgLTCC='$LTCC'
532698f425bSmrgLTCFLAGS='$LTCFLAGS'
533698f425bSmrgcompiler='$compiler_DEFAULT'
534698f425bSmrg
535698f425bSmrg# Quote evaled strings.
536698f425bSmrgfor var in lt_decl_all_varnames([[ \
537698f425bSmrg]], lt_decl_quote_varnames); do
538698f425bSmrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
539698f425bSmrg    *[[\\\\\\\`\\"\\\$]]*)
540698f425bSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
541698f425bSmrg      ;;
542698f425bSmrg    *)
543698f425bSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
544698f425bSmrg      ;;
545698f425bSmrg    esac
546698f425bSmrgdone
547698f425bSmrg
548698f425bSmrg# Double-quote double-evaled strings.
549698f425bSmrgfor var in lt_decl_all_varnames([[ \
550698f425bSmrg]], lt_decl_dquote_varnames); do
551698f425bSmrg    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
552698f425bSmrg    *[[\\\\\\\`\\"\\\$]]*)
553698f425bSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
554698f425bSmrg      ;;
555698f425bSmrg    *)
556698f425bSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
557698f425bSmrg      ;;
558698f425bSmrg    esac
559698f425bSmrgdone
560698f425bSmrg
561698f425bSmrg# Fix-up fallback echo if it was mangled by the above quoting rules.
562698f425bSmrgcase \$lt_ECHO in
563698f425bSmrg*'\\\[$]0 --fallback-echo"')dnl "
564698f425bSmrg  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
565698f425bSmrg  ;;
566698f425bSmrgesac
567698f425bSmrg
568698f425bSmrg_LT_OUTPUT_LIBTOOL_INIT
569698f425bSmrg])
570698f425bSmrg
571698f425bSmrg
572698f425bSmrg# LT_OUTPUT
573698f425bSmrg# ---------
574698f425bSmrg# This macro allows early generation of the libtool script (before
575698f425bSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
576698f425bSmrg# tests.
577698f425bSmrgAC_DEFUN([LT_OUTPUT],
578698f425bSmrg[: ${CONFIG_LT=./config.lt}
579698f425bSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
580698f425bSmrgcat >"$CONFIG_LT" <<_LTEOF
581698f425bSmrg#! $SHELL
582698f425bSmrg# Generated by $as_me.
583698f425bSmrg# Run this file to recreate a libtool stub with the current configuration.
584698f425bSmrg
585698f425bSmrglt_cl_silent=false
586698f425bSmrgSHELL=\${CONFIG_SHELL-$SHELL}
587698f425bSmrg_LTEOF
588698f425bSmrg
589698f425bSmrgcat >>"$CONFIG_LT" <<\_LTEOF
590698f425bSmrgAS_SHELL_SANITIZE
591698f425bSmrg_AS_PREPARE
592698f425bSmrg
593698f425bSmrgexec AS_MESSAGE_FD>&1
594698f425bSmrgexec AS_MESSAGE_LOG_FD>>config.log
595698f425bSmrg{
596698f425bSmrg  echo
597698f425bSmrg  AS_BOX([Running $as_me.])
598698f425bSmrg} >&AS_MESSAGE_LOG_FD
599698f425bSmrg
600698f425bSmrglt_cl_help="\
601698f425bSmrg\`$as_me' creates a local libtool stub from the current configuration,
602698f425bSmrgfor use in further configure time tests before the real libtool is
603698f425bSmrggenerated.
604698f425bSmrg
605698f425bSmrgUsage: $[0] [[OPTIONS]]
606698f425bSmrg
607698f425bSmrg  -h, --help      print this help, then exit
608698f425bSmrg  -V, --version   print version number, then exit
609698f425bSmrg  -q, --quiet     do not print progress messages
610698f425bSmrg  -d, --debug     don't remove temporary files
611698f425bSmrg
612698f425bSmrgReport bugs to <bug-libtool@gnu.org>."
613698f425bSmrg
614698f425bSmrglt_cl_version="\
615698f425bSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
616698f425bSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
617698f425bSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
618698f425bSmrg
619698f425bSmrgCopyright (C) 2008 Free Software Foundation, Inc.
620698f425bSmrgThis config.lt script is free software; the Free Software Foundation
621698f425bSmrggives unlimited permision to copy, distribute and modify it."
622698f425bSmrg
623698f425bSmrgwhile test $[#] != 0
624698f425bSmrgdo
625698f425bSmrg  case $[1] in
626698f425bSmrg    --version | --v* | -V )
627698f425bSmrg      echo "$lt_cl_version"; exit 0 ;;
628698f425bSmrg    --help | --h* | -h )
629698f425bSmrg      echo "$lt_cl_help"; exit 0 ;;
630698f425bSmrg    --debug | --d* | -d )
631698f425bSmrg      debug=: ;;
632698f425bSmrg    --quiet | --q* | --silent | --s* | -q )
633698f425bSmrg      lt_cl_silent=: ;;
634698f425bSmrg
635698f425bSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
636698f425bSmrgTry \`$[0] --help' for more information.]) ;;
637698f425bSmrg
638698f425bSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
639698f425bSmrgTry \`$[0] --help' for more information.]) ;;
640698f425bSmrg  esac
641698f425bSmrg  shift
642698f425bSmrgdone
643698f425bSmrg
644698f425bSmrgif $lt_cl_silent; then
645698f425bSmrg  exec AS_MESSAGE_FD>/dev/null
646698f425bSmrgfi
647698f425bSmrg_LTEOF
648698f425bSmrg
649698f425bSmrgcat >>"$CONFIG_LT" <<_LTEOF
650698f425bSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
651698f425bSmrg_LTEOF
652698f425bSmrg
653698f425bSmrgcat >>"$CONFIG_LT" <<\_LTEOF
654698f425bSmrgAC_MSG_NOTICE([creating $ofile])
655698f425bSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
656698f425bSmrgAS_EXIT(0)
657698f425bSmrg_LTEOF
658698f425bSmrgchmod +x "$CONFIG_LT"
659698f425bSmrg
660698f425bSmrg# configure is writing to config.log, but config.lt does its own redirection,
661698f425bSmrg# appending to config.log, which fails on DOS, as config.log is still kept
662698f425bSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
663698f425bSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
664698f425bSmrgif test "$no_create" != yes; then
665698f425bSmrg  lt_cl_success=:
666698f425bSmrg  test "$silent" = yes &&
667698f425bSmrg    lt_config_lt_args="$lt_config_lt_args --quiet"
668698f425bSmrg  exec AS_MESSAGE_LOG_FD>/dev/null
669698f425bSmrg  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
670698f425bSmrg  exec AS_MESSAGE_LOG_FD>>config.log
671698f425bSmrg  $lt_cl_success || AS_EXIT(1)
672698f425bSmrgfi
673698f425bSmrg])# LT_OUTPUT
674698f425bSmrg
675698f425bSmrg
676698f425bSmrg# _LT_CONFIG(TAG)
677698f425bSmrg# ---------------
678698f425bSmrg# If TAG is the built-in tag, create an initial libtool script with a
679698f425bSmrg# default configuration from the untagged config vars.  Otherwise add code
680698f425bSmrg# to config.status for appending the configuration named by TAG from the
681698f425bSmrg# matching tagged config vars.
682698f425bSmrgm4_defun([_LT_CONFIG],
683698f425bSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
684698f425bSmrg_LT_CONFIG_SAVE_COMMANDS([
685698f425bSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
686698f425bSmrg  m4_if(_LT_TAG, [C], [
687698f425bSmrg    # See if we are running on zsh, and set the options which allow our
688698f425bSmrg    # commands through without removal of \ escapes.
689698f425bSmrg    if test -n "${ZSH_VERSION+set}" ; then
690698f425bSmrg      setopt NO_GLOB_SUBST
691698f425bSmrg    fi
692698f425bSmrg
693698f425bSmrg    cfgfile="${ofile}T"
694698f425bSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
695698f425bSmrg    $RM "$cfgfile"
696698f425bSmrg
697698f425bSmrg    cat <<_LT_EOF >> "$cfgfile"
698698f425bSmrg#! $SHELL
699698f425bSmrg
700698f425bSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
701698f425bSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
702698f425bSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
703698f425bSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
704698f425bSmrg#
705698f425bSmrg_LT_COPYING
706698f425bSmrg_LT_LIBTOOL_TAGS
707698f425bSmrg
708698f425bSmrg# ### BEGIN LIBTOOL CONFIG
709698f425bSmrg_LT_LIBTOOL_CONFIG_VARS
710698f425bSmrg_LT_LIBTOOL_TAG_VARS
711698f425bSmrg# ### END LIBTOOL CONFIG
712698f425bSmrg
713698f425bSmrg_LT_EOF
714698f425bSmrg
715698f425bSmrg  case $host_os in
716698f425bSmrg  aix3*)
717698f425bSmrg    cat <<\_LT_EOF >> "$cfgfile"
718698f425bSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
719698f425bSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
720698f425bSmrg# vanish in a puff of smoke.
721698f425bSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
722698f425bSmrg  COLLECT_NAMES=
723698f425bSmrg  export COLLECT_NAMES
724698f425bSmrgfi
725698f425bSmrg_LT_EOF
726698f425bSmrg    ;;
727698f425bSmrg  esac
728698f425bSmrg
729698f425bSmrg  _LT_PROG_LTMAIN
730698f425bSmrg
731698f425bSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
732698f425bSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
733698f425bSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
734698f425bSmrg  # is reportedly fixed, but why not run on old versions too?
735698f425bSmrg  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
736698f425bSmrg    || (rm -f "$cfgfile"; exit 1)
737698f425bSmrg
738698f425bSmrg  _LT_PROG_XSI_SHELLFNS
739698f425bSmrg
740698f425bSmrg  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
741698f425bSmrg    || (rm -f "$cfgfile"; exit 1)
742698f425bSmrg
743698f425bSmrg  mv -f "$cfgfile" "$ofile" ||
744698f425bSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
745698f425bSmrg  chmod +x "$ofile"
746698f425bSmrg],
747698f425bSmrg[cat <<_LT_EOF >> "$ofile"
748698f425bSmrg
749698f425bSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
750698f425bSmrgdnl in a comment (ie after a #).
751698f425bSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
752698f425bSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
753698f425bSmrg# ### END LIBTOOL TAG CONFIG: $1
754698f425bSmrg_LT_EOF
755698f425bSmrg])dnl /m4_if
756698f425bSmrg],
757698f425bSmrg[m4_if([$1], [], [
758698f425bSmrg    PACKAGE='$PACKAGE'
759698f425bSmrg    VERSION='$VERSION'
760698f425bSmrg    TIMESTAMP='$TIMESTAMP'
761698f425bSmrg    RM='$RM'
762698f425bSmrg    ofile='$ofile'], [])
763698f425bSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
764698f425bSmrg])# _LT_CONFIG
765698f425bSmrg
766698f425bSmrg
767698f425bSmrg# LT_SUPPORTED_TAG(TAG)
768698f425bSmrg# ---------------------
769698f425bSmrg# Trace this macro to discover what tags are supported by the libtool
770698f425bSmrg# --tag option, using:
771698f425bSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
772698f425bSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
773698f425bSmrg
774698f425bSmrg
775698f425bSmrg# C support is built-in for now
776698f425bSmrgm4_define([_LT_LANG_C_enabled], [])
777698f425bSmrgm4_define([_LT_TAGS], [])
778698f425bSmrg
779698f425bSmrg
780698f425bSmrg# LT_LANG(LANG)
781698f425bSmrg# -------------
782698f425bSmrg# Enable libtool support for the given language if not already enabled.
783698f425bSmrgAC_DEFUN([LT_LANG],
784698f425bSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
785698f425bSmrgm4_case([$1],
786698f425bSmrg  [C],			[_LT_LANG(C)],
787698f425bSmrg  [C++],		[_LT_LANG(CXX)],
788698f425bSmrg  [Java],		[_LT_LANG(GCJ)],
789698f425bSmrg  [Fortran 77],		[_LT_LANG(F77)],
790698f425bSmrg  [Fortran],		[_LT_LANG(FC)],
791698f425bSmrg  [Windows Resource],	[_LT_LANG(RC)],
792698f425bSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
793698f425bSmrg    [_LT_LANG($1)],
794698f425bSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
795698f425bSmrg])# LT_LANG
796698f425bSmrg
797698f425bSmrg
798698f425bSmrg# _LT_LANG(LANGNAME)
799698f425bSmrg# ------------------
800698f425bSmrgm4_defun([_LT_LANG],
801698f425bSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
802698f425bSmrg  [LT_SUPPORTED_TAG([$1])dnl
803698f425bSmrg  m4_append([_LT_TAGS], [$1 ])dnl
804698f425bSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
805698f425bSmrg  _LT_LANG_$1_CONFIG($1)])dnl
806698f425bSmrg])# _LT_LANG
807698f425bSmrg
808698f425bSmrg
809698f425bSmrg# _LT_LANG_DEFAULT_CONFIG
810698f425bSmrg# -----------------------
811698f425bSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
812698f425bSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
813698f425bSmrg  [LT_LANG(CXX)],
814698f425bSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
815698f425bSmrg
816698f425bSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
817698f425bSmrg  [LT_LANG(F77)],
818698f425bSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
819698f425bSmrg
820698f425bSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
821698f425bSmrg  [LT_LANG(FC)],
822698f425bSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
823698f425bSmrg
824698f425bSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
825698f425bSmrgdnl pulling things in needlessly.
826698f425bSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
827698f425bSmrg  [LT_LANG(GCJ)],
828698f425bSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
829698f425bSmrg    [LT_LANG(GCJ)],
830698f425bSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
831698f425bSmrg      [LT_LANG(GCJ)],
832698f425bSmrg      [m4_ifdef([AC_PROG_GCJ],
833698f425bSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
834698f425bSmrg       m4_ifdef([A][M_PROG_GCJ],
835698f425bSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
836698f425bSmrg       m4_ifdef([LT_PROG_GCJ],
837698f425bSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
838698f425bSmrg
839698f425bSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
840698f425bSmrg  [LT_LANG(RC)],
841698f425bSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
842698f425bSmrg])# _LT_LANG_DEFAULT_CONFIG
843698f425bSmrg
844698f425bSmrg# Obsolete macros:
845698f425bSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
846698f425bSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
847698f425bSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
848698f425bSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
849698f425bSmrgdnl aclocal-1.4 backwards compatibility:
850698f425bSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
851698f425bSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
852698f425bSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
853698f425bSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
854698f425bSmrg
855698f425bSmrg
856698f425bSmrg# _LT_TAG_COMPILER
857698f425bSmrg# ----------------
858698f425bSmrgm4_defun([_LT_TAG_COMPILER],
859c5629e66Smrg[AC_REQUIRE([AC_PROG_CC])dnl
860266e564dSmrg
861698f425bSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
862698f425bSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
863698f425bSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
864698f425bSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
865698f425bSmrg
866c5629e66Smrg# If no C compiler was specified, use CC.
867c5629e66SmrgLTCC=${LTCC-"$CC"}
868266e564dSmrg
869c5629e66Smrg# If no C compiler flags were specified, use CFLAGS.
870c5629e66SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
871266e564dSmrg
872c5629e66Smrg# Allow CC to be a program name with arguments.
873c5629e66Smrgcompiler=$CC
874698f425bSmrg])# _LT_TAG_COMPILER
875266e564dSmrg
876266e564dSmrg
877c5629e66Smrg# _LT_COMPILER_BOILERPLATE
878c5629e66Smrg# ------------------------
879c5629e66Smrg# Check for compiler boilerplate output or warnings with
880c5629e66Smrg# the simple compiler test code.
881698f425bSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
882698f425bSmrg[m4_require([_LT_DECL_SED])dnl
883c5629e66Smrgac_outfile=conftest.$ac_objext
884c5629e66Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
885c5629e66Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
886c5629e66Smrg_lt_compiler_boilerplate=`cat conftest.err`
887698f425bSmrg$RM conftest*
888c5629e66Smrg])# _LT_COMPILER_BOILERPLATE
889266e564dSmrg
890266e564dSmrg
891c5629e66Smrg# _LT_LINKER_BOILERPLATE
892c5629e66Smrg# ----------------------
893c5629e66Smrg# Check for linker boilerplate output or warnings with
894c5629e66Smrg# the simple link test code.
895698f425bSmrgm4_defun([_LT_LINKER_BOILERPLATE],
896698f425bSmrg[m4_require([_LT_DECL_SED])dnl
897c5629e66Smrgac_outfile=conftest.$ac_objext
898c5629e66Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
899c5629e66Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
900c5629e66Smrg_lt_linker_boilerplate=`cat conftest.err`
901698f425bSmrg$RM -r conftest*
902c5629e66Smrg])# _LT_LINKER_BOILERPLATE
903266e564dSmrg
904c5629e66Smrg# _LT_REQUIRED_DARWIN_CHECKS
905698f425bSmrg# -------------------------
906698f425bSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
907c5629e66Smrg  case $host_os in
908c5629e66Smrg    rhapsody* | darwin*)
909c5629e66Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
910c5629e66Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
911698f425bSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
912698f425bSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
913698f425bSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
914698f425bSmrg    _LT_DECL([], [DSYMUTIL], [1],
915698f425bSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
916698f425bSmrg    _LT_DECL([], [NMEDIT], [1],
917698f425bSmrg      [Tool to change global to local symbols on Mac OS X])
918698f425bSmrg    _LT_DECL([], [LIPO], [1],
919698f425bSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
920698f425bSmrg    _LT_DECL([], [OTOOL], [1],
921698f425bSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
922698f425bSmrg    _LT_DECL([], [OTOOL64], [1],
923698f425bSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
924c5629e66Smrg
925c5629e66Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
926c5629e66Smrg      [lt_cv_apple_cc_single_mod=no
927c5629e66Smrg      if test -z "${LT_MULTI_MODULE}"; then
928698f425bSmrg	# By default we will add the -single_module flag. You can override
929698f425bSmrg	# by either setting the environment variable LT_MULTI_MODULE
930698f425bSmrg	# non-empty at configure time, or by adding -multi_module to the
931698f425bSmrg	# link flags.
932698f425bSmrg	rm -rf libconftest.dylib*
933698f425bSmrg	echo "int foo(void){return 1;}" > conftest.c
934698f425bSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
935698f425bSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
936698f425bSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
937698f425bSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
938698f425bSmrg        _lt_result=$?
939698f425bSmrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
940698f425bSmrg	  lt_cv_apple_cc_single_mod=yes
941698f425bSmrg	else
942698f425bSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
943698f425bSmrg	fi
944698f425bSmrg	rm -rf libconftest.dylib*
945698f425bSmrg	rm -f conftest.*
946c5629e66Smrg      fi])
947c5629e66Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
948c5629e66Smrg      [lt_cv_ld_exported_symbols_list],
949c5629e66Smrg      [lt_cv_ld_exported_symbols_list=no
950c5629e66Smrg      save_LDFLAGS=$LDFLAGS
951c5629e66Smrg      echo "_main" > conftest.sym
952c5629e66Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
953c5629e66Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
954698f425bSmrg	[lt_cv_ld_exported_symbols_list=yes],
955698f425bSmrg	[lt_cv_ld_exported_symbols_list=no])
956698f425bSmrg	LDFLAGS="$save_LDFLAGS"
957c5629e66Smrg    ])
958c5629e66Smrg    case $host_os in
959698f425bSmrg    rhapsody* | darwin1.[[012]])
960c5629e66Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
961c5629e66Smrg    darwin1.*)
962698f425bSmrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
963698f425bSmrg    darwin*) # darwin 5.x on
964c5629e66Smrg      # if running on 10.5 or later, the deployment target defaults
965c5629e66Smrg      # to the OS version, if on x86, and 10.4, the deployment
966c5629e66Smrg      # target defaults to 10.4. Don't you love it?
967c5629e66Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
968698f425bSmrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
969698f425bSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
970698f425bSmrg	10.[[012]]*)
971698f425bSmrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
972698f425bSmrg	10.*)
973698f425bSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
974c5629e66Smrg      esac
975c5629e66Smrg    ;;
976266e564dSmrg  esac
977c5629e66Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
978c5629e66Smrg      _lt_dar_single_mod='$single_module'
979c5629e66Smrg    fi
980c5629e66Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
981c5629e66Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
982c5629e66Smrg    else
983698f425bSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
984c5629e66Smrg    fi
985c5629e66Smrg    if test "$DSYMUTIL" != ":"; then
986698f425bSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
987c5629e66Smrg    else
988c5629e66Smrg      _lt_dsymutil=
989c5629e66Smrg    fi
990c5629e66Smrg    ;;
991c5629e66Smrg  esac
992c5629e66Smrg])
993266e564dSmrg
994698f425bSmrg
995698f425bSmrg# _LT_DARWIN_LINKER_FEATURES
996698f425bSmrg# --------------------------
997698f425bSmrg# Checks for linker and compiler features on darwin
998698f425bSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
999698f425bSmrg[
1000698f425bSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1001698f425bSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1002698f425bSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
1003698f425bSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
1004698f425bSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1005698f425bSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1006698f425bSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
1007698f425bSmrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1008698f425bSmrg  case $cc_basename in
1009698f425bSmrg     ifort*) _lt_dar_can_shared=yes ;;
1010698f425bSmrg     *) _lt_dar_can_shared=$GCC ;;
1011698f425bSmrg  esac
1012698f425bSmrg  if test "$_lt_dar_can_shared" = "yes"; then
1013698f425bSmrg    output_verbose_link_cmd=echo
1014698f425bSmrg    _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}"
1015698f425bSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1016698f425bSmrg    _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}"
1017698f425bSmrg    _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}"
1018698f425bSmrg    m4_if([$1], [CXX],
1019698f425bSmrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1020698f425bSmrg      _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}"
1021698f425bSmrg      _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}"
1022698f425bSmrg    fi
1023698f425bSmrg],[])
1024698f425bSmrg  else
1025698f425bSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
1026698f425bSmrg  fi
1027698f425bSmrg])
1028698f425bSmrg
1029698f425bSmrg# _LT_SYS_MODULE_PATH_AIX
1030698f425bSmrg# -----------------------
1031c5629e66Smrg# Links a minimal program and checks the executable
1032c5629e66Smrg# for the system default hardcoded library path. In most cases,
1033c5629e66Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
1034c5629e66Smrg# the location of the communication and MPI libs are included too.
1035c5629e66Smrg# If we don't find anything, use the default library path according
1036c5629e66Smrg# to the aix ld manual.
1037698f425bSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
1038698f425bSmrg[m4_require([_LT_DECL_SED])dnl
1039c5629e66SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
1040c5629e66Smrglt_aix_libpath_sed='
1041c5629e66Smrg    /Import File Strings/,/^$/ {
1042c5629e66Smrg	/^0/ {
1043c5629e66Smrg	    s/^0  *\(.*\)$/\1/
1044c5629e66Smrg	    p
1045c5629e66Smrg	}
1046c5629e66Smrg    }'
1047c5629e66Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1048c5629e66Smrg# Check for a 64-bit object if we didn't find anything.
1049c5629e66Smrgif test -z "$aix_libpath"; then
1050c5629e66Smrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1051c5629e66Smrgfi],[])
1052c5629e66Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1053698f425bSmrg])# _LT_SYS_MODULE_PATH_AIX
1054266e564dSmrg
1055266e564dSmrg
1056698f425bSmrg# _LT_SHELL_INIT(ARG)
1057698f425bSmrg# -------------------
1058698f425bSmrgm4_define([_LT_SHELL_INIT],
1059c5629e66Smrg[ifdef([AC_DIVERSION_NOTICE],
1060c5629e66Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1061c5629e66Smrg	 [AC_DIVERT_PUSH(NOTICE)])
1062c5629e66Smrg$1
1063c5629e66SmrgAC_DIVERT_POP
1064698f425bSmrg])# _LT_SHELL_INIT
1065266e564dSmrg
1066266e564dSmrg
1067698f425bSmrg# _LT_PROG_ECHO_BACKSLASH
1068698f425bSmrg# -----------------------
1069c5629e66Smrg# Add some code to the start of the generated configure script which
1070c5629e66Smrg# will find an echo command which doesn't interpret backslashes.
1071698f425bSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
1072698f425bSmrg[_LT_SHELL_INIT([
1073c5629e66Smrg# Check that we are running under the correct shell.
1074c5629e66SmrgSHELL=${CONFIG_SHELL-/bin/sh}
1075c5629e66Smrg
1076698f425bSmrgcase X$lt_ECHO in
1077c5629e66SmrgX*--fallback-echo)
1078c5629e66Smrg  # Remove one level of quotation (which was required for Make).
1079698f425bSmrg  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1080c5629e66Smrg  ;;
1081c5629e66Smrgesac
1082c5629e66Smrg
1083698f425bSmrgECHO=${lt_ECHO-echo}
1084c5629e66Smrgif test "X[$]1" = X--no-reexec; then
1085c5629e66Smrg  # Discard the --no-reexec flag, and continue.
1086c5629e66Smrg  shift
1087c5629e66Smrgelif test "X[$]1" = X--fallback-echo; then
1088c5629e66Smrg  # Avoid inline document here, it may be left over
1089c5629e66Smrg  :
1090698f425bSmrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1091698f425bSmrg  # Yippee, $ECHO works!
1092c5629e66Smrg  :
1093266e564dSmrgelse
1094c5629e66Smrg  # Restart under the correct shell.
1095c5629e66Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1096266e564dSmrgfi
1097266e564dSmrg
1098c5629e66Smrgif test "X[$]1" = X--fallback-echo; then
1099c5629e66Smrg  # used as fallback echo
1100c5629e66Smrg  shift
1101698f425bSmrg  cat <<_LT_EOF
1102c5629e66Smrg[$]*
1103698f425bSmrg_LT_EOF
1104c5629e66Smrg  exit 0
1105c5629e66Smrgfi
1106266e564dSmrg
1107c5629e66Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
1108c5629e66Smrg# if CDPATH is set.
1109c5629e66Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1110266e564dSmrg
1111698f425bSmrgif test -z "$lt_ECHO"; then
1112698f425bSmrg  if test "X${echo_test_string+set}" != Xset; then
1113698f425bSmrg    # find a string as large as possible, as long as the shell can cope with it
1114698f425bSmrg    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1115698f425bSmrg      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1116698f425bSmrg      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1117698f425bSmrg	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1118698f425bSmrg      then
1119698f425bSmrg        break
1120698f425bSmrg      fi
1121698f425bSmrg    done
1122698f425bSmrg  fi
1123266e564dSmrg
1124698f425bSmrg  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1125698f425bSmrg     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1126698f425bSmrg     test "X$echo_testing_string" = "X$echo_test_string"; then
1127698f425bSmrg    :
1128698f425bSmrg  else
1129698f425bSmrg    # The Solaris, AIX, and Digital Unix default echo programs unquote
1130698f425bSmrg    # backslashes.  This makes it impossible to quote backslashes using
1131698f425bSmrg    #   echo "$something" | sed 's/\\/\\\\/g'
1132698f425bSmrg    #
1133698f425bSmrg    # So, first we look for a working echo in the user's PATH.
1134266e564dSmrg
1135698f425bSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1136698f425bSmrg    for dir in $PATH /usr/ucb; do
1137698f425bSmrg      IFS="$lt_save_ifs"
1138698f425bSmrg      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1139698f425bSmrg         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1140698f425bSmrg         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1141698f425bSmrg         test "X$echo_testing_string" = "X$echo_test_string"; then
1142698f425bSmrg        ECHO="$dir/echo"
1143698f425bSmrg        break
1144698f425bSmrg      fi
1145698f425bSmrg    done
1146c5629e66Smrg    IFS="$lt_save_ifs"
1147266e564dSmrg
1148698f425bSmrg    if test "X$ECHO" = Xecho; then
1149698f425bSmrg      # We didn't find a better echo, so look for alternatives.
1150698f425bSmrg      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1151698f425bSmrg         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1152698f425bSmrg         test "X$echo_testing_string" = "X$echo_test_string"; then
1153698f425bSmrg        # This shell has a builtin print -r that does the trick.
1154698f425bSmrg        ECHO='print -r'
1155698f425bSmrg      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1156698f425bSmrg	   test "X$CONFIG_SHELL" != X/bin/ksh; then
1157698f425bSmrg        # If we have ksh, try running configure again with it.
1158698f425bSmrg        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1159698f425bSmrg        export ORIGINAL_CONFIG_SHELL
1160698f425bSmrg        CONFIG_SHELL=/bin/ksh
1161698f425bSmrg        export CONFIG_SHELL
1162698f425bSmrg        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1163c5629e66Smrg      else
1164698f425bSmrg        # Try using printf.
1165698f425bSmrg        ECHO='printf %s\n'
1166698f425bSmrg        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1167698f425bSmrg	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1168698f425bSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
1169698f425bSmrg	  # Cool, printf works
1170698f425bSmrg	  :
1171698f425bSmrg        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1172698f425bSmrg	     test "X$echo_testing_string" = 'X\t' &&
1173698f425bSmrg	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1174698f425bSmrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
1175698f425bSmrg	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1176698f425bSmrg	  export CONFIG_SHELL
1177698f425bSmrg	  SHELL="$CONFIG_SHELL"
1178698f425bSmrg	  export SHELL
1179698f425bSmrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1180698f425bSmrg        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1181698f425bSmrg	     test "X$echo_testing_string" = 'X\t' &&
1182698f425bSmrg	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1183698f425bSmrg	     test "X$echo_testing_string" = "X$echo_test_string"; then
1184698f425bSmrg	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1185698f425bSmrg        else
1186698f425bSmrg	  # maybe with a smaller string...
1187698f425bSmrg	  prev=:
1188266e564dSmrg
1189698f425bSmrg	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1190698f425bSmrg	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1191698f425bSmrg	    then
1192698f425bSmrg	      break
1193698f425bSmrg	    fi
1194698f425bSmrg	    prev="$cmd"
1195698f425bSmrg	  done
1196266e564dSmrg
1197698f425bSmrg	  if test "$prev" != 'sed 50q "[$]0"'; then
1198698f425bSmrg	    echo_test_string=`eval $prev`
1199698f425bSmrg	    export echo_test_string
1200698f425bSmrg	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1201698f425bSmrg	  else
1202698f425bSmrg	    # Oops.  We lost completely, so just stick with echo.
1203698f425bSmrg	    ECHO=echo
1204698f425bSmrg	  fi
1205698f425bSmrg        fi
1206c5629e66Smrg      fi
1207c5629e66Smrg    fi
1208c5629e66Smrg  fi
1209266e564dSmrgfi
1210266e564dSmrg
1211c5629e66Smrg# Copy echo and quote the copy suitably for passing to libtool from
1212c5629e66Smrg# the Makefile, instead of quoting the original, which is used later.
1213698f425bSmrglt_ECHO=$ECHO
1214698f425bSmrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1215698f425bSmrg   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1216266e564dSmrgfi
1217266e564dSmrg
1218698f425bSmrgAC_SUBST(lt_ECHO)
1219698f425bSmrg])
1220698f425bSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1221698f425bSmrg_LT_DECL([], [ECHO], [1],
1222698f425bSmrg    [An echo program that does not interpret backslashes])
1223698f425bSmrg])# _LT_PROG_ECHO_BACKSLASH
1224266e564dSmrg
1225266e564dSmrg
1226698f425bSmrg# _LT_ENABLE_LOCK
1227698f425bSmrg# ---------------
1228698f425bSmrgm4_defun([_LT_ENABLE_LOCK],
1229c5629e66Smrg[AC_ARG_ENABLE([libtool-lock],
1230698f425bSmrg  [AS_HELP_STRING([--disable-libtool-lock],
1231698f425bSmrg    [avoid locking (might break parallel builds)])])
1232c5629e66Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1233266e564dSmrg
1234c5629e66Smrg# Some flags need to be propagated to the compiler or linker for good
1235c5629e66Smrg# libtool support.
1236c5629e66Smrgcase $host in
1237c5629e66Smrgia64-*-hpux*)
1238c5629e66Smrg  # Find out which ABI we are using.
1239c5629e66Smrg  echo 'int i;' > conftest.$ac_ext
1240c5629e66Smrg  if AC_TRY_EVAL(ac_compile); then
1241c5629e66Smrg    case `/usr/bin/file conftest.$ac_objext` in
1242698f425bSmrg      *ELF-32*)
1243698f425bSmrg	HPUX_IA64_MODE="32"
1244698f425bSmrg	;;
1245698f425bSmrg      *ELF-64*)
1246698f425bSmrg	HPUX_IA64_MODE="64"
1247698f425bSmrg	;;
1248c5629e66Smrg    esac
1249c5629e66Smrg  fi
1250c5629e66Smrg  rm -rf conftest*
1251c5629e66Smrg  ;;
1252c5629e66Smrg*-*-irix6*)
1253c5629e66Smrg  # Find out which ABI we are using.
1254c5629e66Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1255c5629e66Smrg  if AC_TRY_EVAL(ac_compile); then
1256698f425bSmrg    if test "$lt_cv_prog_gnu_ld" = yes; then
1257698f425bSmrg      case `/usr/bin/file conftest.$ac_objext` in
1258698f425bSmrg	*32-bit*)
1259698f425bSmrg	  LD="${LD-ld} -melf32bsmip"
1260698f425bSmrg	  ;;
1261698f425bSmrg	*N32*)
1262698f425bSmrg	  LD="${LD-ld} -melf32bmipn32"
1263698f425bSmrg	  ;;
1264698f425bSmrg	*64-bit*)
1265698f425bSmrg	  LD="${LD-ld} -melf64bmip"
1266698f425bSmrg	;;
1267698f425bSmrg      esac
1268698f425bSmrg    else
1269698f425bSmrg      case `/usr/bin/file conftest.$ac_objext` in
1270698f425bSmrg	*32-bit*)
1271698f425bSmrg	  LD="${LD-ld} -32"
1272698f425bSmrg	  ;;
1273698f425bSmrg	*N32*)
1274698f425bSmrg	  LD="${LD-ld} -n32"
1275698f425bSmrg	  ;;
1276698f425bSmrg	*64-bit*)
1277698f425bSmrg	  LD="${LD-ld} -64"
1278698f425bSmrg	  ;;
1279698f425bSmrg      esac
1280698f425bSmrg    fi
1281c5629e66Smrg  fi
1282c5629e66Smrg  rm -rf conftest*
1283c5629e66Smrg  ;;
1284266e564dSmrg
1285c5629e66Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1286698f425bSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1287c5629e66Smrg  # Find out which ABI we are using.
1288c5629e66Smrg  echo 'int i;' > conftest.$ac_ext
1289c5629e66Smrg  if AC_TRY_EVAL(ac_compile); then
1290c5629e66Smrg    case `/usr/bin/file conftest.o` in
1291698f425bSmrg      *32-bit*)
1292698f425bSmrg	case $host in
1293698f425bSmrg	  x86_64-*kfreebsd*-gnu)
1294698f425bSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
1295698f425bSmrg	    ;;
1296698f425bSmrg	  x86_64-*linux*)
1297698f425bSmrg	    LD="${LD-ld} -m elf_i386"
1298698f425bSmrg	    ;;
1299698f425bSmrg	  ppc64-*linux*|powerpc64-*linux*)
1300698f425bSmrg	    LD="${LD-ld} -m elf32ppclinux"
1301698f425bSmrg	    ;;
1302698f425bSmrg	  s390x-*linux*)
1303698f425bSmrg	    LD="${LD-ld} -m elf_s390"
1304698f425bSmrg	    ;;
1305698f425bSmrg	  sparc64-*linux*)
1306698f425bSmrg	    LD="${LD-ld} -m elf32_sparc"
1307698f425bSmrg	    ;;
1308698f425bSmrg	esac
1309698f425bSmrg	;;
1310698f425bSmrg      *64-bit*)
1311698f425bSmrg	case $host in
1312698f425bSmrg	  x86_64-*kfreebsd*-gnu)
1313698f425bSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
1314698f425bSmrg	    ;;
1315698f425bSmrg	  x86_64-*linux*)
1316698f425bSmrg	    LD="${LD-ld} -m elf_x86_64"
1317698f425bSmrg	    ;;
1318698f425bSmrg	  ppc*-*linux*|powerpc*-*linux*)
1319698f425bSmrg	    LD="${LD-ld} -m elf64ppc"
1320698f425bSmrg	    ;;
1321698f425bSmrg	  s390*-*linux*|s390*-*tpf*)
1322698f425bSmrg	    LD="${LD-ld} -m elf64_s390"
1323698f425bSmrg	    ;;
1324698f425bSmrg	  sparc*-*linux*)
1325698f425bSmrg	    LD="${LD-ld} -m elf64_sparc"
1326698f425bSmrg	    ;;
1327698f425bSmrg	esac
1328698f425bSmrg	;;
1329c5629e66Smrg    esac
1330c5629e66Smrg  fi
1331c5629e66Smrg  rm -rf conftest*
1332c5629e66Smrg  ;;
1333266e564dSmrg
1334c5629e66Smrg*-*-sco3.2v5*)
1335c5629e66Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1336c5629e66Smrg  SAVE_CFLAGS="$CFLAGS"
1337c5629e66Smrg  CFLAGS="$CFLAGS -belf"
1338c5629e66Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1339c5629e66Smrg    [AC_LANG_PUSH(C)
1340698f425bSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1341c5629e66Smrg     AC_LANG_POP])
1342c5629e66Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1343c5629e66Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1344c5629e66Smrg    CFLAGS="$SAVE_CFLAGS"
1345c5629e66Smrg  fi
1346c5629e66Smrg  ;;
1347c5629e66Smrgsparc*-*solaris*)
1348c5629e66Smrg  # Find out which ABI we are using.
1349c5629e66Smrg  echo 'int i;' > conftest.$ac_ext
1350c5629e66Smrg  if AC_TRY_EVAL(ac_compile); then
1351c5629e66Smrg    case `/usr/bin/file conftest.o` in
1352c5629e66Smrg    *64-bit*)
1353c5629e66Smrg      case $lt_cv_prog_gnu_ld in
1354c5629e66Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1355c5629e66Smrg      *)
1356698f425bSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1357c5629e66Smrg	  LD="${LD-ld} -64"
1358c5629e66Smrg	fi
1359c5629e66Smrg	;;
1360c5629e66Smrg      esac
1361c5629e66Smrg      ;;
1362c5629e66Smrg    esac
1363c5629e66Smrg  fi
1364c5629e66Smrg  rm -rf conftest*
1365c5629e66Smrg  ;;
1366c5629e66Smrgesac
1367266e564dSmrg
1368c5629e66Smrgneed_locks="$enable_libtool_lock"
1369698f425bSmrg])# _LT_ENABLE_LOCK
1370698f425bSmrg
1371698f425bSmrg
1372698f425bSmrg# _LT_CMD_OLD_ARCHIVE
1373698f425bSmrg# -------------------
1374698f425bSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
1375698f425bSmrg[AC_CHECK_TOOL(AR, ar, false)
1376698f425bSmrgtest -z "$AR" && AR=ar
1377698f425bSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
1378698f425bSmrg_LT_DECL([], [AR], [1], [The archiver])
1379698f425bSmrg_LT_DECL([], [AR_FLAGS], [1])
1380698f425bSmrg
1381698f425bSmrgAC_CHECK_TOOL(STRIP, strip, :)
1382698f425bSmrgtest -z "$STRIP" && STRIP=:
1383698f425bSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1384698f425bSmrg
1385698f425bSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1386698f425bSmrgtest -z "$RANLIB" && RANLIB=:
1387698f425bSmrg_LT_DECL([], [RANLIB], [1],
1388698f425bSmrg    [Commands used to install an old-style archive])
1389698f425bSmrg
1390698f425bSmrg# Determine commands to create old-style static archives.
1391698f425bSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1392698f425bSmrgold_postinstall_cmds='chmod 644 $oldlib'
1393698f425bSmrgold_postuninstall_cmds=
1394266e564dSmrg
1395698f425bSmrgif test -n "$RANLIB"; then
1396698f425bSmrg  case $host_os in
1397698f425bSmrg  openbsd*)
1398698f425bSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1399698f425bSmrg    ;;
1400698f425bSmrg  *)
1401698f425bSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1402698f425bSmrg    ;;
1403698f425bSmrg  esac
1404698f425bSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1405698f425bSmrgfi
1406698f425bSmrg_LT_DECL([], [old_postinstall_cmds], [2])
1407698f425bSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
1408698f425bSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
1409698f425bSmrg    [Commands used to build an old-style archive])
1410698f425bSmrg])# _LT_CMD_OLD_ARCHIVE
1411266e564dSmrg
1412266e564dSmrg
1413698f425bSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1414c5629e66Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1415c5629e66Smrg# ----------------------------------------------------------------
1416c5629e66Smrg# Check whether the given compiler option works
1417698f425bSmrgAC_DEFUN([_LT_COMPILER_OPTION],
1418698f425bSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1419698f425bSmrgm4_require([_LT_DECL_SED])dnl
1420c5629e66SmrgAC_CACHE_CHECK([$1], [$2],
1421c5629e66Smrg  [$2=no
1422698f425bSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1423c5629e66Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1424c5629e66Smrg   lt_compiler_flag="$3"
1425c5629e66Smrg   # Insert the option either (1) after the last *FLAGS variable, or
1426c5629e66Smrg   # (2) before a word containing "conftest.", or (3) at the end.
1427c5629e66Smrg   # Note that $ac_compile itself does not contain backslashes and begins
1428c5629e66Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1429c5629e66Smrg   # The option is referenced via a variable to avoid confusing sed.
1430c5629e66Smrg   lt_compile=`echo "$ac_compile" | $SED \
1431c5629e66Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1432c5629e66Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1433c5629e66Smrg   -e 's:$: $lt_compiler_flag:'`
1434c5629e66Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1435c5629e66Smrg   (eval "$lt_compile" 2>conftest.err)
1436c5629e66Smrg   ac_status=$?
1437c5629e66Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
1438c5629e66Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1439c5629e66Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
1440c5629e66Smrg     # The compiler can only warn and ignore the option if not recognized
1441c5629e66Smrg     # So say no if there are warnings other than the usual output.
1442698f425bSmrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1443c5629e66Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1444c5629e66Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1445c5629e66Smrg       $2=yes
1446c5629e66Smrg     fi
1447c5629e66Smrg   fi
1448698f425bSmrg   $RM conftest*
1449c5629e66Smrg])
1450266e564dSmrg
1451c5629e66Smrgif test x"[$]$2" = xyes; then
1452698f425bSmrg    m4_if([$5], , :, [$5])
1453c5629e66Smrgelse
1454698f425bSmrg    m4_if([$6], , :, [$6])
1455c5629e66Smrgfi
1456698f425bSmrg])# _LT_COMPILER_OPTION
1457266e564dSmrg
1458698f425bSmrg# Old name:
1459698f425bSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1460698f425bSmrgdnl aclocal-1.4 backwards compatibility:
1461698f425bSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1462266e564dSmrg
1463698f425bSmrg
1464698f425bSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1465698f425bSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1466698f425bSmrg# ----------------------------------------------------
1467698f425bSmrg# Check whether the given linker option works
1468698f425bSmrgAC_DEFUN([_LT_LINKER_OPTION],
1469698f425bSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1470698f425bSmrgm4_require([_LT_DECL_SED])dnl
1471c5629e66SmrgAC_CACHE_CHECK([$1], [$2],
1472c5629e66Smrg  [$2=no
1473c5629e66Smrg   save_LDFLAGS="$LDFLAGS"
1474c5629e66Smrg   LDFLAGS="$LDFLAGS $3"
1475c5629e66Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1476c5629e66Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1477c5629e66Smrg     # The linker can only warn and ignore the option if not recognized
1478c5629e66Smrg     # So say no if there are warnings
1479c5629e66Smrg     if test -s conftest.err; then
1480c5629e66Smrg       # Append any errors to the config.log.
1481c5629e66Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1482698f425bSmrg       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1483c5629e66Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1484c5629e66Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
1485c5629e66Smrg         $2=yes
1486c5629e66Smrg       fi
1487c5629e66Smrg     else
1488c5629e66Smrg       $2=yes
1489c5629e66Smrg     fi
1490c5629e66Smrg   fi
1491698f425bSmrg   $RM -r conftest*
1492c5629e66Smrg   LDFLAGS="$save_LDFLAGS"
1493c5629e66Smrg])
1494c5629e66Smrg
1495c5629e66Smrgif test x"[$]$2" = xyes; then
1496698f425bSmrg    m4_if([$4], , :, [$4])
1497c5629e66Smrgelse
1498698f425bSmrg    m4_if([$5], , :, [$5])
1499c5629e66Smrgfi
1500698f425bSmrg])# _LT_LINKER_OPTION
1501c5629e66Smrg
1502698f425bSmrg# Old name:
1503698f425bSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1504698f425bSmrgdnl aclocal-1.4 backwards compatibility:
1505698f425bSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1506c5629e66Smrg
1507698f425bSmrg
1508698f425bSmrg# LT_CMD_MAX_LEN
1509698f425bSmrg#---------------
1510698f425bSmrgAC_DEFUN([LT_CMD_MAX_LEN],
1511698f425bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1512698f425bSmrg# find the maximum length of command line arguments
1513c5629e66SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
1514c5629e66SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1515c5629e66Smrg  i=0
1516c5629e66Smrg  teststring="ABCD"
1517c5629e66Smrg
1518c5629e66Smrg  case $build_os in
1519c5629e66Smrg  msdosdjgpp*)
1520c5629e66Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
1521c5629e66Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
1522c5629e66Smrg    # during glob expansion).  Even if it were fixed, the result of this
1523c5629e66Smrg    # check would be larger than it should be.
1524c5629e66Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1525266e564dSmrg    ;;
1526c5629e66Smrg
1527c5629e66Smrg  gnu*)
1528c5629e66Smrg    # Under GNU Hurd, this test is not required because there is
1529c5629e66Smrg    # no limit to the length of command line arguments.
1530c5629e66Smrg    # Libtool will interpret -1 as no limit whatsoever
1531c5629e66Smrg    lt_cv_sys_max_cmd_len=-1;
1532266e564dSmrg    ;;
1533c5629e66Smrg
1534698f425bSmrg  cygwin* | mingw* | cegcc*)
1535c5629e66Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
1536c5629e66Smrg    # about 5 minutes as the teststring grows exponentially.
1537c5629e66Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
1538c5629e66Smrg    # you end up with a "frozen" computer, even though with patience
1539c5629e66Smrg    # the test eventually succeeds (with a max line length of 256k).
1540c5629e66Smrg    # Instead, let's just punt: use the minimum linelength reported by
1541c5629e66Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
1542c5629e66Smrg    lt_cv_sys_max_cmd_len=8192;
1543266e564dSmrg    ;;
1544c5629e66Smrg
1545c5629e66Smrg  amigaos*)
1546c5629e66Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
1547c5629e66Smrg    # So we just punt and use a minimum line length of 8192.
1548c5629e66Smrg    lt_cv_sys_max_cmd_len=8192;
1549266e564dSmrg    ;;
1550c5629e66Smrg
1551c5629e66Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1552c5629e66Smrg    # This has been around since 386BSD, at least.  Likely further.
1553c5629e66Smrg    if test -x /sbin/sysctl; then
1554c5629e66Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1555c5629e66Smrg    elif test -x /usr/sbin/sysctl; then
1556c5629e66Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1557c5629e66Smrg    else
1558c5629e66Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1559c5629e66Smrg    fi
1560c5629e66Smrg    # And add a safety zone
1561c5629e66Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1562c5629e66Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1563c5629e66Smrg    ;;
1564c5629e66Smrg
1565c5629e66Smrg  interix*)
1566c5629e66Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1567c5629e66Smrg    lt_cv_sys_max_cmd_len=196608
1568c5629e66Smrg    ;;
1569c5629e66Smrg
1570c5629e66Smrg  osf*)
1571c5629e66Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1572c5629e66Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1573c5629e66Smrg    # nice to cause kernel panics so lets avoid the loop below.
1574c5629e66Smrg    # First set a reasonable default.
1575c5629e66Smrg    lt_cv_sys_max_cmd_len=16384
1576c5629e66Smrg    #
1577c5629e66Smrg    if test -x /sbin/sysconfig; then
1578c5629e66Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1579c5629e66Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1580c5629e66Smrg      esac
1581c5629e66Smrg    fi
1582c5629e66Smrg    ;;
1583c5629e66Smrg  sco3.2v5*)
1584c5629e66Smrg    lt_cv_sys_max_cmd_len=102400
1585c5629e66Smrg    ;;
1586c5629e66Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
1587c5629e66Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1588c5629e66Smrg    if test -n "$kargmax"; then
1589698f425bSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1590c5629e66Smrg    else
1591c5629e66Smrg      lt_cv_sys_max_cmd_len=32768
1592c5629e66Smrg    fi
1593c5629e66Smrg    ;;
1594c5629e66Smrg  *)
1595c5629e66Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1596c5629e66Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
1597c5629e66Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1598c5629e66Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1599c5629e66Smrg    else
1600698f425bSmrg      # Make teststring a little bigger before we do anything with it.
1601698f425bSmrg      # a 1K string should be a reasonable start.
1602698f425bSmrg      for i in 1 2 3 4 5 6 7 8 ; do
1603698f425bSmrg        teststring=$teststring$teststring
1604698f425bSmrg      done
1605c5629e66Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1606698f425bSmrg      # If test is not a shell built-in, we'll probably end up computing a
1607698f425bSmrg      # maximum length that is only half of the actual maximum length, but
1608698f425bSmrg      # we can't tell.
1609698f425bSmrg      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1610698f425bSmrg	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1611c5629e66Smrg	      test $i != 17 # 1/2 MB should be enough
1612c5629e66Smrg      do
1613c5629e66Smrg        i=`expr $i + 1`
1614c5629e66Smrg        teststring=$teststring$teststring
1615c5629e66Smrg      done
1616698f425bSmrg      # Only check the string length outside the loop.
1617698f425bSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1618c5629e66Smrg      teststring=
1619698f425bSmrg      # Add a significant safety factor because C++ compilers can tack on
1620698f425bSmrg      # massive amounts of additional arguments before passing them to the
1621698f425bSmrg      # linker.  It appears as though 1/2 is a usable value.
1622c5629e66Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1623c5629e66Smrg    fi
1624266e564dSmrg    ;;
1625266e564dSmrg  esac
1626c5629e66Smrg])
1627c5629e66Smrgif test -n $lt_cv_sys_max_cmd_len ; then
1628c5629e66Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1629c5629e66Smrgelse
1630c5629e66Smrg  AC_MSG_RESULT(none)
1631c5629e66Smrgfi
1632698f425bSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
1633698f425bSmrg_LT_DECL([], [max_cmd_len], [0],
1634698f425bSmrg    [What is the maximum length of a command?])
1635698f425bSmrg])# LT_CMD_MAX_LEN
1636266e564dSmrg
1637698f425bSmrg# Old name:
1638698f425bSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1639698f425bSmrgdnl aclocal-1.4 backwards compatibility:
1640698f425bSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1641266e564dSmrg
1642698f425bSmrg
1643698f425bSmrg# _LT_HEADER_DLFCN
1644698f425bSmrg# ----------------
1645698f425bSmrgm4_defun([_LT_HEADER_DLFCN],
1646698f425bSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1647698f425bSmrg])# _LT_HEADER_DLFCN
1648266e564dSmrg
1649266e564dSmrg
1650698f425bSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1651698f425bSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1652698f425bSmrg# ----------------------------------------------------------------
1653698f425bSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
1654698f425bSmrg[m4_require([_LT_HEADER_DLFCN])dnl
1655c5629e66Smrgif test "$cross_compiling" = yes; then :
1656c5629e66Smrg  [$4]
1657c5629e66Smrgelse
1658c5629e66Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1659c5629e66Smrg  lt_status=$lt_dlunknown
1660698f425bSmrg  cat > conftest.$ac_ext <<_LT_EOF
1661c5629e66Smrg[#line __oline__ "configure"
1662c5629e66Smrg#include "confdefs.h"
1663266e564dSmrg
1664c5629e66Smrg#if HAVE_DLFCN_H
1665c5629e66Smrg#include <dlfcn.h>
1666c5629e66Smrg#endif
1667266e564dSmrg
1668c5629e66Smrg#include <stdio.h>
1669266e564dSmrg
1670c5629e66Smrg#ifdef RTLD_GLOBAL
1671c5629e66Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
1672c5629e66Smrg#else
1673c5629e66Smrg#  ifdef DL_GLOBAL
1674c5629e66Smrg#    define LT_DLGLOBAL		DL_GLOBAL
1675c5629e66Smrg#  else
1676c5629e66Smrg#    define LT_DLGLOBAL		0
1677c5629e66Smrg#  endif
1678c5629e66Smrg#endif
1679266e564dSmrg
1680c5629e66Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1681c5629e66Smrg   find out it does not work in some platform. */
1682c5629e66Smrg#ifndef LT_DLLAZY_OR_NOW
1683c5629e66Smrg#  ifdef RTLD_LAZY
1684c5629e66Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1685c5629e66Smrg#  else
1686c5629e66Smrg#    ifdef DL_LAZY
1687c5629e66Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
1688c5629e66Smrg#    else
1689c5629e66Smrg#      ifdef RTLD_NOW
1690c5629e66Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1691c5629e66Smrg#      else
1692c5629e66Smrg#        ifdef DL_NOW
1693c5629e66Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
1694c5629e66Smrg#        else
1695c5629e66Smrg#          define LT_DLLAZY_OR_NOW	0
1696c5629e66Smrg#        endif
1697c5629e66Smrg#      endif
1698c5629e66Smrg#    endif
1699c5629e66Smrg#  endif
1700c5629e66Smrg#endif
1701266e564dSmrg
1702c5629e66Smrgvoid fnord() { int i=42;}
1703c5629e66Smrgint main ()
1704c5629e66Smrg{
1705c5629e66Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1706c5629e66Smrg  int status = $lt_dlunknown;
1707266e564dSmrg
1708c5629e66Smrg  if (self)
1709c5629e66Smrg    {
1710c5629e66Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1711c5629e66Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1712c5629e66Smrg      /* dlclose (self); */
1713c5629e66Smrg    }
1714c5629e66Smrg  else
1715c5629e66Smrg    puts (dlerror ());
1716266e564dSmrg
1717698f425bSmrg  return status;
1718c5629e66Smrg}]
1719698f425bSmrg_LT_EOF
1720c5629e66Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1721c5629e66Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1722c5629e66Smrg    lt_status=$?
1723c5629e66Smrg    case x$lt_status in
1724c5629e66Smrg      x$lt_dlno_uscore) $1 ;;
1725c5629e66Smrg      x$lt_dlneed_uscore) $2 ;;
1726c5629e66Smrg      x$lt_dlunknown|x*) $3 ;;
1727266e564dSmrg    esac
1728c5629e66Smrg  else :
1729c5629e66Smrg    # compilation failed
1730c5629e66Smrg    $3
1731c5629e66Smrg  fi
1732266e564dSmrgfi
1733c5629e66Smrgrm -fr conftest*
1734698f425bSmrg])# _LT_TRY_DLOPEN_SELF
1735266e564dSmrg
1736266e564dSmrg
1737698f425bSmrg# LT_SYS_DLOPEN_SELF
1738698f425bSmrg# ------------------
1739698f425bSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
1740698f425bSmrg[m4_require([_LT_HEADER_DLFCN])dnl
1741c5629e66Smrgif test "x$enable_dlopen" != xyes; then
1742c5629e66Smrg  enable_dlopen=unknown
1743c5629e66Smrg  enable_dlopen_self=unknown
1744c5629e66Smrg  enable_dlopen_self_static=unknown
1745266e564dSmrgelse
1746c5629e66Smrg  lt_cv_dlopen=no
1747c5629e66Smrg  lt_cv_dlopen_libs=
1748266e564dSmrg
1749c5629e66Smrg  case $host_os in
1750c5629e66Smrg  beos*)
1751c5629e66Smrg    lt_cv_dlopen="load_add_on"
1752c5629e66Smrg    lt_cv_dlopen_libs=
1753c5629e66Smrg    lt_cv_dlopen_self=yes
1754c5629e66Smrg    ;;
1755266e564dSmrg
1756698f425bSmrg  mingw* | pw32* | cegcc*)
1757c5629e66Smrg    lt_cv_dlopen="LoadLibrary"
1758c5629e66Smrg    lt_cv_dlopen_libs=
1759698f425bSmrg    ;;
1760266e564dSmrg
1761c5629e66Smrg  cygwin*)
1762c5629e66Smrg    lt_cv_dlopen="dlopen"
1763c5629e66Smrg    lt_cv_dlopen_libs=
1764698f425bSmrg    ;;
1765266e564dSmrg
1766c5629e66Smrg  darwin*)
1767c5629e66Smrg  # if libdl is installed we need to link against it
1768c5629e66Smrg    AC_CHECK_LIB([dl], [dlopen],
1769c5629e66Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1770c5629e66Smrg    lt_cv_dlopen="dyld"
1771c5629e66Smrg    lt_cv_dlopen_libs=
1772c5629e66Smrg    lt_cv_dlopen_self=yes
1773c5629e66Smrg    ])
1774698f425bSmrg    ;;
1775266e564dSmrg
1776c5629e66Smrg  *)
1777c5629e66Smrg    AC_CHECK_FUNC([shl_load],
1778c5629e66Smrg	  [lt_cv_dlopen="shl_load"],
1779c5629e66Smrg      [AC_CHECK_LIB([dld], [shl_load],
1780c5629e66Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1781c5629e66Smrg	[AC_CHECK_FUNC([dlopen],
1782c5629e66Smrg	      [lt_cv_dlopen="dlopen"],
1783c5629e66Smrg	  [AC_CHECK_LIB([dl], [dlopen],
1784c5629e66Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1785c5629e66Smrg	    [AC_CHECK_LIB([svld], [dlopen],
1786c5629e66Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1787c5629e66Smrg	      [AC_CHECK_LIB([dld], [dld_link],
1788c5629e66Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1789c5629e66Smrg	      ])
1790c5629e66Smrg	    ])
1791c5629e66Smrg	  ])
1792c5629e66Smrg	])
1793c5629e66Smrg      ])
1794c5629e66Smrg    ;;
1795c5629e66Smrg  esac
1796266e564dSmrg
1797c5629e66Smrg  if test "x$lt_cv_dlopen" != xno; then
1798c5629e66Smrg    enable_dlopen=yes
1799c5629e66Smrg  else
1800c5629e66Smrg    enable_dlopen=no
1801c5629e66Smrg  fi
1802266e564dSmrg
1803c5629e66Smrg  case $lt_cv_dlopen in
1804c5629e66Smrg  dlopen)
1805c5629e66Smrg    save_CPPFLAGS="$CPPFLAGS"
1806c5629e66Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1807266e564dSmrg
1808c5629e66Smrg    save_LDFLAGS="$LDFLAGS"
1809c5629e66Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1810266e564dSmrg
1811c5629e66Smrg    save_LIBS="$LIBS"
1812c5629e66Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
1813266e564dSmrg
1814c5629e66Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
1815c5629e66Smrg	  lt_cv_dlopen_self, [dnl
1816698f425bSmrg	  _LT_TRY_DLOPEN_SELF(
1817c5629e66Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1818c5629e66Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1819c5629e66Smrg    ])
1820266e564dSmrg
1821c5629e66Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
1822c5629e66Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1823c5629e66Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1824698f425bSmrg	  lt_cv_dlopen_self_static, [dnl
1825698f425bSmrg	  _LT_TRY_DLOPEN_SELF(
1826c5629e66Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1827c5629e66Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1828c5629e66Smrg      ])
1829c5629e66Smrg    fi
1830266e564dSmrg
1831c5629e66Smrg    CPPFLAGS="$save_CPPFLAGS"
1832c5629e66Smrg    LDFLAGS="$save_LDFLAGS"
1833c5629e66Smrg    LIBS="$save_LIBS"
1834c5629e66Smrg    ;;
1835c5629e66Smrg  esac
1836266e564dSmrg
1837c5629e66Smrg  case $lt_cv_dlopen_self in
1838c5629e66Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1839c5629e66Smrg  *) enable_dlopen_self=unknown ;;
1840c5629e66Smrg  esac
1841266e564dSmrg
1842c5629e66Smrg  case $lt_cv_dlopen_self_static in
1843c5629e66Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1844c5629e66Smrg  *) enable_dlopen_self_static=unknown ;;
1845c5629e66Smrg  esac
1846266e564dSmrgfi
1847698f425bSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
1848698f425bSmrg	 [Whether dlopen is supported])
1849698f425bSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1850698f425bSmrg	 [Whether dlopen of programs is supported])
1851698f425bSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1852698f425bSmrg	 [Whether dlopen of statically linked programs is supported])
1853698f425bSmrg])# LT_SYS_DLOPEN_SELF
1854266e564dSmrg
1855698f425bSmrg# Old name:
1856698f425bSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1857698f425bSmrgdnl aclocal-1.4 backwards compatibility:
1858698f425bSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1859266e564dSmrg
1860698f425bSmrg
1861698f425bSmrg# _LT_COMPILER_C_O([TAGNAME])
1862698f425bSmrg# ---------------------------
1863698f425bSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
1864698f425bSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
1865698f425bSmrgm4_defun([_LT_COMPILER_C_O],
1866698f425bSmrg[m4_require([_LT_DECL_SED])dnl
1867698f425bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1868698f425bSmrgm4_require([_LT_TAG_COMPILER])dnl
1869c5629e66SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1870698f425bSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1871698f425bSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1872698f425bSmrg   $RM -r conftest 2>/dev/null
1873c5629e66Smrg   mkdir conftest
1874c5629e66Smrg   cd conftest
1875c5629e66Smrg   mkdir out
1876c5629e66Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1877266e564dSmrg
1878c5629e66Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
1879c5629e66Smrg   # Insert the option either (1) after the last *FLAGS variable, or
1880c5629e66Smrg   # (2) before a word containing "conftest.", or (3) at the end.
1881c5629e66Smrg   # Note that $ac_compile itself does not contain backslashes and begins
1882c5629e66Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1883c5629e66Smrg   lt_compile=`echo "$ac_compile" | $SED \
1884c5629e66Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1885c5629e66Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1886c5629e66Smrg   -e 's:$: $lt_compiler_flag:'`
1887c5629e66Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1888c5629e66Smrg   (eval "$lt_compile" 2>out/conftest.err)
1889c5629e66Smrg   ac_status=$?
1890c5629e66Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1891c5629e66Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1892c5629e66Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1893c5629e66Smrg   then
1894c5629e66Smrg     # The compiler can only warn and ignore the option if not recognized
1895c5629e66Smrg     # So say no if there are warnings
1896698f425bSmrg     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1897c5629e66Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1898c5629e66Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1899698f425bSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1900c5629e66Smrg     fi
1901c5629e66Smrg   fi
1902c5629e66Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1903698f425bSmrg   $RM conftest*
1904c5629e66Smrg   # SGI C++ compiler will create directory out/ii_files/ for
1905c5629e66Smrg   # template instantiation
1906698f425bSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1907698f425bSmrg   $RM out/* && rmdir out
1908c5629e66Smrg   cd ..
1909698f425bSmrg   $RM -r conftest
1910698f425bSmrg   $RM conftest*
1911c5629e66Smrg])
1912698f425bSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1913698f425bSmrg	[Does compiler simultaneously support -c and -o options?])
1914698f425bSmrg])# _LT_COMPILER_C_O
1915266e564dSmrg
1916266e564dSmrg
1917698f425bSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
1918698f425bSmrg# ----------------------------------
1919c5629e66Smrg# Check to see if we can do hard links to lock some files if needed
1920698f425bSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
1921698f425bSmrg[m4_require([_LT_ENABLE_LOCK])dnl
1922698f425bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
1923698f425bSmrg_LT_COMPILER_C_O([$1])
1924266e564dSmrg
1925c5629e66Smrghard_links="nottested"
1926698f425bSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1927c5629e66Smrg  # do not overwrite the value of need_locks provided by the user
1928c5629e66Smrg  AC_MSG_CHECKING([if we can lock with hard links])
1929c5629e66Smrg  hard_links=yes
1930698f425bSmrg  $RM conftest*
1931c5629e66Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1932c5629e66Smrg  touch conftest.a
1933c5629e66Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
1934c5629e66Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1935c5629e66Smrg  AC_MSG_RESULT([$hard_links])
1936c5629e66Smrg  if test "$hard_links" = no; then
1937c5629e66Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1938c5629e66Smrg    need_locks=warn
1939c5629e66Smrg  fi
1940c5629e66Smrgelse
1941c5629e66Smrg  need_locks=no
1942266e564dSmrgfi
1943698f425bSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1944698f425bSmrg])# _LT_COMPILER_FILE_LOCKS
1945266e564dSmrg
1946c5629e66Smrg
1947698f425bSmrg# _LT_CHECK_OBJDIR
1948698f425bSmrg# ----------------
1949698f425bSmrgm4_defun([_LT_CHECK_OBJDIR],
1950c5629e66Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1951c5629e66Smrg[rm -f .libs 2>/dev/null
1952c5629e66Smrgmkdir .libs 2>/dev/null
1953c5629e66Smrgif test -d .libs; then
1954c5629e66Smrg  lt_cv_objdir=.libs
1955266e564dSmrgelse
1956c5629e66Smrg  # MS-DOS does not allow filenames that begin with a dot.
1957c5629e66Smrg  lt_cv_objdir=_libs
1958266e564dSmrgfi
1959c5629e66Smrgrmdir .libs 2>/dev/null])
1960c5629e66Smrgobjdir=$lt_cv_objdir
1961698f425bSmrg_LT_DECL([], [objdir], [0],
1962698f425bSmrg         [The name of the directory that contains temporary libtool files])dnl
1963698f425bSmrgm4_pattern_allow([LT_OBJDIR])dnl
1964698f425bSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1965698f425bSmrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
1966698f425bSmrg])# _LT_CHECK_OBJDIR
1967266e564dSmrg
1968266e564dSmrg
1969698f425bSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1970698f425bSmrg# --------------------------------------
1971c5629e66Smrg# Check hardcoding attributes.
1972698f425bSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1973c5629e66Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
1974698f425bSmrg_LT_TAGVAR(hardcode_action, $1)=
1975698f425bSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1976698f425bSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1977698f425bSmrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1978266e564dSmrg
1979698f425bSmrg  # We can hardcode non-existent directories.
1980698f425bSmrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1981c5629e66Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1982c5629e66Smrg     # have to relink, otherwise we might link with an installed library
1983c5629e66Smrg     # when we should be linking with a yet-to-be-installed one
1984698f425bSmrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1985698f425bSmrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1986c5629e66Smrg    # Linking always hardcodes the temporary library directory.
1987698f425bSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
1988c5629e66Smrg  else
1989c5629e66Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1990698f425bSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
1991c5629e66Smrg  fi
1992266e564dSmrgelse
1993c5629e66Smrg  # We cannot hardcode anything, or else we can only hardcode existing
1994c5629e66Smrg  # directories.
1995698f425bSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
1996266e564dSmrgfi
1997698f425bSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1998266e564dSmrg
1999698f425bSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2000698f425bSmrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2001c5629e66Smrg  # Fast installation is not supported
2002c5629e66Smrg  enable_fast_install=no
2003c5629e66Smrgelif test "$shlibpath_overrides_runpath" = yes ||
2004c5629e66Smrg     test "$enable_shared" = no; then
2005c5629e66Smrg  # Fast installation is not necessary
2006c5629e66Smrg  enable_fast_install=needless
2007c5629e66Smrgfi
2008698f425bSmrg_LT_TAGDECL([], [hardcode_action], [0],
2009698f425bSmrg    [How to hardcode a shared library path into an executable])
2010698f425bSmrg])# _LT_LINKER_HARDCODE_LIBPATH
2011266e564dSmrg
2012266e564dSmrg
2013698f425bSmrg# _LT_CMD_STRIPLIB
2014698f425bSmrg# ----------------
2015698f425bSmrgm4_defun([_LT_CMD_STRIPLIB],
2016698f425bSmrg[m4_require([_LT_DECL_EGREP])
2017698f425bSmrgstriplib=
2018c5629e66Smrgold_striplib=
2019c5629e66SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
2020698f425bSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2021c5629e66Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2022c5629e66Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2023c5629e66Smrg  AC_MSG_RESULT([yes])
2024c5629e66Smrgelse
2025c5629e66Smrg# FIXME - insert some real tests, host_os isn't really good enough
2026c5629e66Smrg  case $host_os in
2027698f425bSmrg  darwin*)
2028698f425bSmrg    if test -n "$STRIP" ; then
2029698f425bSmrg      striplib="$STRIP -x"
2030698f425bSmrg      old_striplib="$STRIP -S"
2031698f425bSmrg      AC_MSG_RESULT([yes])
2032698f425bSmrg    else
2033698f425bSmrg      AC_MSG_RESULT([no])
2034698f425bSmrg    fi
2035698f425bSmrg    ;;
2036698f425bSmrg  *)
2037698f425bSmrg    AC_MSG_RESULT([no])
2038c5629e66Smrg    ;;
2039c5629e66Smrg  esac
2040c5629e66Smrgfi
2041698f425bSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2042698f425bSmrg_LT_DECL([], [striplib], [1])
2043698f425bSmrg])# _LT_CMD_STRIPLIB
2044266e564dSmrg
2045266e564dSmrg
2046698f425bSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
2047c5629e66Smrg# -----------------------------
2048c5629e66Smrg# PORTME Fill in your ld.so characteristics
2049698f425bSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
2050698f425bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2051698f425bSmrgm4_require([_LT_DECL_EGREP])dnl
2052698f425bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2053698f425bSmrgm4_require([_LT_DECL_OBJDUMP])dnl
2054698f425bSmrgm4_require([_LT_DECL_SED])dnl
2055c5629e66SmrgAC_MSG_CHECKING([dynamic linker characteristics])
2056698f425bSmrgm4_if([$1],
2057698f425bSmrg	[], [
2058c5629e66Smrgif test "$GCC" = yes; then
2059c5629e66Smrg  case $host_os in
2060c5629e66Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2061c5629e66Smrg    *) lt_awk_arg="/^libraries:/" ;;
2062c5629e66Smrg  esac
2063c5629e66Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2064698f425bSmrg  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2065c5629e66Smrg    # if the path contains ";" then we assume it to be the separator
2066c5629e66Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
2067c5629e66Smrg    # assumed that no part of a normal pathname contains ";" but that should
2068c5629e66Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
2069698f425bSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2070c5629e66Smrg  else
2071698f425bSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2072c5629e66Smrg  fi
2073c5629e66Smrg  # Ok, now we have the path, separated by spaces, we can step through it
2074c5629e66Smrg  # and add multilib dir if necessary.
2075c5629e66Smrg  lt_tmp_lt_search_path_spec=
2076c5629e66Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2077c5629e66Smrg  for lt_sys_path in $lt_search_path_spec; do
2078c5629e66Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2079c5629e66Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2080c5629e66Smrg    else
2081c5629e66Smrg      test -d "$lt_sys_path" && \
2082c5629e66Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2083c5629e66Smrg    fi
2084c5629e66Smrg  done
2085698f425bSmrg  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2086c5629e66SmrgBEGIN {RS=" "; FS="/|\n";} {
2087c5629e66Smrg  lt_foo="";
2088c5629e66Smrg  lt_count=0;
2089c5629e66Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
2090c5629e66Smrg    if ($lt_i != "" && $lt_i != ".") {
2091c5629e66Smrg      if ($lt_i == "..") {
2092c5629e66Smrg        lt_count++;
2093c5629e66Smrg      } else {
2094c5629e66Smrg        if (lt_count == 0) {
2095c5629e66Smrg          lt_foo="/" $lt_i lt_foo;
2096c5629e66Smrg        } else {
2097c5629e66Smrg          lt_count--;
2098c5629e66Smrg        }
2099c5629e66Smrg      }
2100c5629e66Smrg    }
2101c5629e66Smrg  }
2102c5629e66Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2103c5629e66Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2104c5629e66Smrg}'`
2105698f425bSmrg  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2106c5629e66Smrgelse
2107c5629e66Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2108c5629e66Smrgfi])
2109698f425bSmrglibrary_names_spec=
2110698f425bSmrglibname_spec='lib$name'
2111698f425bSmrgsoname_spec=
2112698f425bSmrgshrext_cmds=".so"
2113698f425bSmrgpostinstall_cmds=
2114698f425bSmrgpostuninstall_cmds=
2115698f425bSmrgfinish_cmds=
2116698f425bSmrgfinish_eval=
2117698f425bSmrgshlibpath_var=
2118698f425bSmrgshlibpath_overrides_runpath=unknown
2119698f425bSmrgversion_type=none
2120698f425bSmrgdynamic_linker="$host_os ld.so"
2121698f425bSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
2122c5629e66Smrgneed_lib_prefix=unknown
2123c5629e66Smrghardcode_into_libs=no
2124266e564dSmrg
2125c5629e66Smrg# when you set need_version to no, make sure it does not cause -set_version
2126c5629e66Smrg# flags to be left without arguments
2127c5629e66Smrgneed_version=unknown
2128266e564dSmrg
2129c5629e66Smrgcase $host_os in
2130c5629e66Smrgaix3*)
2131c5629e66Smrg  version_type=linux
2132c5629e66Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2133c5629e66Smrg  shlibpath_var=LIBPATH
2134266e564dSmrg
2135c5629e66Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
2136c5629e66Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2137c5629e66Smrg  ;;
2138266e564dSmrg
2139c5629e66Smrgaix[[4-9]]*)
2140c5629e66Smrg  version_type=linux
2141c5629e66Smrg  need_lib_prefix=no
2142c5629e66Smrg  need_version=no
2143c5629e66Smrg  hardcode_into_libs=yes
2144c5629e66Smrg  if test "$host_cpu" = ia64; then
2145c5629e66Smrg    # AIX 5 supports IA64
2146c5629e66Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2147c5629e66Smrg    shlibpath_var=LD_LIBRARY_PATH
2148c5629e66Smrg  else
2149c5629e66Smrg    # With GCC up to 2.95.x, collect2 would create an import file
2150c5629e66Smrg    # for dependence libraries.  The import file would start with
2151c5629e66Smrg    # the line `#! .'.  This would cause the generated library to
2152c5629e66Smrg    # depend on `.', always an invalid library.  This was fixed in
2153c5629e66Smrg    # development snapshots of GCC prior to 3.0.
2154c5629e66Smrg    case $host_os in
2155c5629e66Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
2156c5629e66Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2157c5629e66Smrg	   echo ' yes '
2158698f425bSmrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2159c5629e66Smrg	:
2160c5629e66Smrg      else
2161c5629e66Smrg	can_build_shared=no
2162c5629e66Smrg      fi
2163c5629e66Smrg      ;;
2164c5629e66Smrg    esac
2165c5629e66Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2166c5629e66Smrg    # soname into executable. Probably we can add versioning support to
2167c5629e66Smrg    # collect2, so additional links can be useful in future.
2168c5629e66Smrg    if test "$aix_use_runtimelinking" = yes; then
2169c5629e66Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2170c5629e66Smrg      # instead of lib<name>.a to let people know that these are not
2171c5629e66Smrg      # typical AIX shared libraries.
2172c5629e66Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2173c5629e66Smrg    else
2174c5629e66Smrg      # We preserve .a as extension for shared libraries through AIX4.2
2175c5629e66Smrg      # and later when we are not doing run time linking.
2176c5629e66Smrg      library_names_spec='${libname}${release}.a $libname.a'
2177c5629e66Smrg      soname_spec='${libname}${release}${shared_ext}$major'
2178c5629e66Smrg    fi
2179c5629e66Smrg    shlibpath_var=LIBPATH
2180c5629e66Smrg  fi
2181c5629e66Smrg  ;;
2182266e564dSmrg
2183c5629e66Smrgamigaos*)
2184698f425bSmrg  case $host_cpu in
2185698f425bSmrg  powerpc)
2186698f425bSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
2187698f425bSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2188698f425bSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2189698f425bSmrg    ;;
2190698f425bSmrg  m68k)
2191698f425bSmrg    library_names_spec='$libname.ixlibrary $libname.a'
2192698f425bSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2193698f425bSmrg    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'
2194698f425bSmrg    ;;
2195698f425bSmrg  esac
2196c5629e66Smrg  ;;
2197266e564dSmrg
2198c5629e66Smrgbeos*)
2199c5629e66Smrg  library_names_spec='${libname}${shared_ext}'
2200c5629e66Smrg  dynamic_linker="$host_os ld.so"
2201c5629e66Smrg  shlibpath_var=LIBRARY_PATH
2202c5629e66Smrg  ;;
2203266e564dSmrg
2204c5629e66Smrgbsdi[[45]]*)
2205c5629e66Smrg  version_type=linux
2206c5629e66Smrg  need_version=no
2207c5629e66Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2208c5629e66Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2209c5629e66Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2210c5629e66Smrg  shlibpath_var=LD_LIBRARY_PATH
2211c5629e66Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2212c5629e66Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2213c5629e66Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
2214c5629e66Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2215c5629e66Smrg  # libtool to hard-code these into programs
2216c5629e66Smrg  ;;
2217266e564dSmrg
2218698f425bSmrgcygwin* | mingw* | pw32* | cegcc*)
2219c5629e66Smrg  version_type=windows
2220c5629e66Smrg  shrext_cmds=".dll"
2221c5629e66Smrg  need_version=no
2222c5629e66Smrg  need_lib_prefix=no
2223266e564dSmrg
2224c5629e66Smrg  case $GCC,$host_os in
2225698f425bSmrg  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
2226c5629e66Smrg    library_names_spec='$libname.dll.a'
2227c5629e66Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2228c5629e66Smrg    postinstall_cmds='base_file=`basename \${file}`~
2229698f425bSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2230c5629e66Smrg      dldir=$destdir/`dirname \$dlpath`~
2231c5629e66Smrg      test -d \$dldir || mkdir -p \$dldir~
2232c5629e66Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
2233698f425bSmrg      chmod a+x \$dldir/$dlname~
2234698f425bSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2235698f425bSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2236698f425bSmrg      fi'
2237c5629e66Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2238c5629e66Smrg      dlpath=$dir/\$dldll~
2239698f425bSmrg       $RM \$dlpath'
2240c5629e66Smrg    shlibpath_overrides_runpath=yes
2241266e564dSmrg
2242c5629e66Smrg    case $host_os in
2243c5629e66Smrg    cygwin*)
2244c5629e66Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2245c5629e66Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2246c5629e66Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2247c5629e66Smrg      ;;
2248698f425bSmrg    mingw* | cegcc*)
2249c5629e66Smrg      # MinGW DLLs use traditional 'lib' prefix
2250c5629e66Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2251698f425bSmrg      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2252698f425bSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2253c5629e66Smrg        # It is most probably a Windows format PATH printed by
2254c5629e66Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2255c5629e66Smrg        # path with ; separators, and with drive letters. We can handle the
2256c5629e66Smrg        # drive letters (cygwin fileutils understands them), so leave them,
2257c5629e66Smrg        # especially as we might pass files found there to a mingw objdump,
2258c5629e66Smrg        # which wouldn't understand a cygwinified path. Ahh.
2259698f425bSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2260c5629e66Smrg      else
2261698f425bSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2262c5629e66Smrg      fi
2263c5629e66Smrg      ;;
2264c5629e66Smrg    pw32*)
2265c5629e66Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
2266c5629e66Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2267c5629e66Smrg      ;;
2268c5629e66Smrg    esac
2269c5629e66Smrg    ;;
2270266e564dSmrg
2271c5629e66Smrg  *)
2272c5629e66Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2273c5629e66Smrg    ;;
2274c5629e66Smrg  esac
2275c5629e66Smrg  dynamic_linker='Win32 ld.exe'
2276c5629e66Smrg  # FIXME: first we should search . and the directory the executable is in
2277c5629e66Smrg  shlibpath_var=PATH
2278c5629e66Smrg  ;;
2279266e564dSmrg
2280c5629e66Smrgdarwin* | rhapsody*)
2281c5629e66Smrg  dynamic_linker="$host_os dyld"
2282c5629e66Smrg  version_type=darwin
2283c5629e66Smrg  need_lib_prefix=no
2284c5629e66Smrg  need_version=no
2285698f425bSmrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2286c5629e66Smrg  soname_spec='${libname}${release}${major}$shared_ext'
2287c5629e66Smrg  shlibpath_overrides_runpath=yes
2288c5629e66Smrg  shlibpath_var=DYLD_LIBRARY_PATH
2289c5629e66Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2290698f425bSmrgm4_if([$1], [],[
2291698f425bSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2292c5629e66Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2293c5629e66Smrg  ;;
2294266e564dSmrg
2295c5629e66Smrgdgux*)
2296c5629e66Smrg  version_type=linux
2297c5629e66Smrg  need_lib_prefix=no
2298c5629e66Smrg  need_version=no
2299c5629e66Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2300c5629e66Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2301c5629e66Smrg  shlibpath_var=LD_LIBRARY_PATH
2302c5629e66Smrg  ;;
2303266e564dSmrg
2304c5629e66Smrgfreebsd1*)
2305c5629e66Smrg  dynamic_linker=no
2306c5629e66Smrg  ;;
2307266e564dSmrg
2308c5629e66Smrgfreebsd* | dragonfly*)
2309c5629e66Smrg  # DragonFly does not have aout.  When/if they implement a new
2310c5629e66Smrg  # versioning mechanism, adjust this.
2311c5629e66Smrg  if test -x /usr/bin/objformat; then
2312c5629e66Smrg    objformat=`/usr/bin/objformat`
2313c5629e66Smrg  else
2314c5629e66Smrg    case $host_os in
2315c5629e66Smrg    freebsd[[123]]*) objformat=aout ;;
2316c5629e66Smrg    *) objformat=elf ;;
2317c5629e66Smrg    esac
2318c5629e66Smrg  fi
2319c5629e66Smrg  version_type=freebsd-$objformat
2320c5629e66Smrg  case $version_type in
2321c5629e66Smrg    freebsd-elf*)
2322c5629e66Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2323c5629e66Smrg      need_version=no
2324c5629e66Smrg      need_lib_prefix=no
2325c5629e66Smrg      ;;
2326c5629e66Smrg    freebsd-*)
2327c5629e66Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2328c5629e66Smrg      need_version=yes
2329c5629e66Smrg      ;;
2330c5629e66Smrg  esac
2331c5629e66Smrg  shlibpath_var=LD_LIBRARY_PATH
2332c5629e66Smrg  case $host_os in
2333c5629e66Smrg  freebsd2*)
2334c5629e66Smrg    shlibpath_overrides_runpath=yes
2335c5629e66Smrg    ;;
2336c5629e66Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2337c5629e66Smrg    shlibpath_overrides_runpath=yes
2338c5629e66Smrg    hardcode_into_libs=yes
2339c5629e66Smrg    ;;
2340c5629e66Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2341c5629e66Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2342c5629e66Smrg    shlibpath_overrides_runpath=no
2343c5629e66Smrg    hardcode_into_libs=yes
2344c5629e66Smrg    ;;
2345c5629e66Smrg  *) # from 4.6 on, and DragonFly
2346c5629e66Smrg    shlibpath_overrides_runpath=yes
2347c5629e66Smrg    hardcode_into_libs=yes
2348c5629e66Smrg    ;;
2349c5629e66Smrg  esac
2350c5629e66Smrg  ;;
2351266e564dSmrg
2352c5629e66Smrggnu*)
2353c5629e66Smrg  version_type=linux
2354c5629e66Smrg  need_lib_prefix=no
2355c5629e66Smrg  need_version=no
2356c5629e66Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2357c5629e66Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2358c5629e66Smrg  shlibpath_var=LD_LIBRARY_PATH
2359c5629e66Smrg  hardcode_into_libs=yes
2360c5629e66Smrg  ;;
2361266e564dSmrg
2362c5629e66Smrghpux9* | hpux10* | hpux11*)
2363c5629e66Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
2364c5629e66Smrg  # link against other versions.
2365c5629e66Smrg  version_type=sunos
2366c5629e66Smrg  need_lib_prefix=no
2367c5629e66Smrg  need_version=no
2368c5629e66Smrg  case $host_cpu in
2369c5629e66Smrg  ia64*)
2370c5629e66Smrg    shrext_cmds='.so'
2371c5629e66Smrg    hardcode_into_libs=yes
2372c5629e66Smrg    dynamic_linker="$host_os dld.so"
2373c5629e66Smrg    shlibpath_var=LD_LIBRARY_PATH
2374c5629e66Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2375c5629e66Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2376c5629e66Smrg    soname_spec='${libname}${release}${shared_ext}$major'
2377c5629e66Smrg    if test "X$HPUX_IA64_MODE" = X32; then
2378c5629e66Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2379c5629e66Smrg    else
2380c5629e66Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2381c5629e66Smrg    fi
2382c5629e66Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2383c5629e66Smrg    ;;
2384698f425bSmrg  hppa*64*)
2385698f425bSmrg    shrext_cmds='.sl'
2386698f425bSmrg    hardcode_into_libs=yes
2387698f425bSmrg    dynamic_linker="$host_os dld.sl"
2388698f425bSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2389698f425bSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2390698f425bSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2391698f425bSmrg    soname_spec='${libname}${release}${shared_ext}$major'
2392698f425bSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2393698f425bSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2394698f425bSmrg    ;;
2395698f425bSmrg  *)
2396c5629e66Smrg    shrext_cmds='.sl'
2397c5629e66Smrg    dynamic_linker="$host_os dld.sl"
2398c5629e66Smrg    shlibpath_var=SHLIB_PATH
2399c5629e66Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2400c5629e66Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2401c5629e66Smrg    soname_spec='${libname}${release}${shared_ext}$major'
2402c5629e66Smrg    ;;
2403c5629e66Smrg  esac
2404c5629e66Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2405c5629e66Smrg  postinstall_cmds='chmod 555 $lib'
2406c5629e66Smrg  ;;
2407266e564dSmrg
2408c5629e66Smrginterix[[3-9]]*)
2409c5629e66Smrg  version_type=linux
2410c5629e66Smrg  need_lib_prefix=no
2411c5629e66Smrg  need_version=no
2412c5629e66Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2413c5629e66Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2414c5629e66Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2415c5629e66Smrg  shlibpath_var=LD_LIBRARY_PATH
2416c5629e66Smrg  shlibpath_overrides_runpath=no
2417c5629e66Smrg  hardcode_into_libs=yes
2418c5629e66Smrg  ;;
2419266e564dSmrg
2420c5629e66Smrgirix5* | irix6* | nonstopux*)
2421c5629e66Smrg  case $host_os in
2422c5629e66Smrg    nonstopux*) version_type=nonstopux ;;
2423c5629e66Smrg    *)
2424c5629e66Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
2425c5629e66Smrg		version_type=linux
2426c5629e66Smrg	else
2427c5629e66Smrg		version_type=irix
2428c5629e66Smrg	fi ;;
2429c5629e66Smrg  esac
2430c5629e66Smrg  need_lib_prefix=no
2431c5629e66Smrg  need_version=no
2432c5629e66Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2433c5629e66Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2434c5629e66Smrg  case $host_os in
2435c5629e66Smrg  irix5* | nonstopux*)
2436c5629e66Smrg    libsuff= shlibsuff=
2437c5629e66Smrg    ;;
2438c5629e66Smrg  *)
2439c5629e66Smrg    case $LD in # libtool.m4 will add one of these switches to LD
2440c5629e66Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2441c5629e66Smrg      libsuff= shlibsuff= libmagic=32-bit;;
2442c5629e66Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2443c5629e66Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
2444c5629e66Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2445c5629e66Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2446c5629e66Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
2447c5629e66Smrg    esac
2448c5629e66Smrg    ;;
2449c5629e66Smrg  esac
2450c5629e66Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2451c5629e66Smrg  shlibpath_overrides_runpath=no
2452c5629e66Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2453c5629e66Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2454c5629e66Smrg  hardcode_into_libs=yes
2455c5629e66Smrg  ;;
2456266e564dSmrg
2457c5629e66Smrg# No shared lib support for Linux oldld, aout, or coff.
2458c5629e66Smrglinux*oldld* | linux*aout* | linux*coff*)
2459c5629e66Smrg  dynamic_linker=no
2460c5629e66Smrg  ;;
2461266e564dSmrg
2462c5629e66Smrg# This must be Linux ELF.
2463c5629e66Smrglinux* | k*bsd*-gnu)
2464c5629e66Smrg  version_type=linux
2465c5629e66Smrg  need_lib_prefix=no
2466c5629e66Smrg  need_version=no
2467c5629e66Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2468c5629e66Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2469c5629e66Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2470c5629e66Smrg  shlibpath_var=LD_LIBRARY_PATH
2471c5629e66Smrg  shlibpath_overrides_runpath=no
2472698f425bSmrg  # Some binutils ld are patched to set DT_RUNPATH
2473698f425bSmrg  save_LDFLAGS=$LDFLAGS
2474698f425bSmrg  save_libdir=$libdir
2475698f425bSmrg  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2476698f425bSmrg       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2477698f425bSmrg  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2478698f425bSmrg    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2479698f425bSmrg       [shlibpath_overrides_runpath=yes])])
2480698f425bSmrg  LDFLAGS=$save_LDFLAGS
2481698f425bSmrg  libdir=$save_libdir
2482698f425bSmrg
2483c5629e66Smrg  # This implies no fast_install, which is unacceptable.
2484c5629e66Smrg  # Some rework will be needed to allow for fast_install
2485c5629e66Smrg  # before this can be enabled.
2486c5629e66Smrg  hardcode_into_libs=yes
2487266e564dSmrg
2488698f425bSmrg  # Add ABI-specific directories to the system library path.
2489698f425bSmrg  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
2490266e564dSmrg
2491c5629e66Smrg  # Append ld.so.conf contents to the search path
2492c5629e66Smrg  if test -f /etc/ld.so.conf; then
2493698f425bSmrg    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' ' '`
2494c5629e66Smrg    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
2495266e564dSmrg  fi
2496266e564dSmrg
2497c5629e66Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
2498c5629e66Smrg  # powerpc, because MkLinux only supported shared libraries with the
2499c5629e66Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
2500c5629e66Smrg  # most powerpc-linux boxes support dynamic linking these days and
2501c5629e66Smrg  # people can always --disable-shared, the test was removed, and we
2502c5629e66Smrg  # assume the GNU/Linux dynamic linker is in use.
2503c5629e66Smrg  dynamic_linker='GNU/Linux ld.so'
2504c5629e66Smrg  ;;
2505266e564dSmrg
2506c5629e66Smrgnetbsd*)
2507c5629e66Smrg  version_type=sunos
2508c5629e66Smrg  need_lib_prefix=no
2509c5629e66Smrg  need_version=no
2510698f425bSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2511c5629e66Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2512c5629e66Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2513c5629e66Smrg    dynamic_linker='NetBSD (a.out) ld.so'
2514c5629e66Smrg  else
2515c5629e66Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2516c5629e66Smrg    soname_spec='${libname}${release}${shared_ext}$major'
2517c5629e66Smrg    dynamic_linker='NetBSD ld.elf_so'
2518c5629e66Smrg  fi
2519c5629e66Smrg  shlibpath_var=LD_LIBRARY_PATH
2520c5629e66Smrg  shlibpath_overrides_runpath=yes
2521c5629e66Smrg  hardcode_into_libs=yes
2522c5629e66Smrg  ;;
2523266e564dSmrg
2524c5629e66Smrgnewsos6)
2525c5629e66Smrg  version_type=linux
2526c5629e66Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2527c5629e66Smrg  shlibpath_var=LD_LIBRARY_PATH
2528c5629e66Smrg  shlibpath_overrides_runpath=yes
2529c5629e66Smrg  ;;
2530266e564dSmrg
2531698f425bSmrg*nto* | *qnx*)
2532698f425bSmrg  version_type=qnx
2533c5629e66Smrg  need_lib_prefix=no
2534c5629e66Smrg  need_version=no
2535c5629e66Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2536c5629e66Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2537c5629e66Smrg  shlibpath_var=LD_LIBRARY_PATH
2538698f425bSmrg  shlibpath_overrides_runpath=no
2539698f425bSmrg  hardcode_into_libs=yes
2540698f425bSmrg  dynamic_linker='ldqnx.so'
2541c5629e66Smrg  ;;
2542266e564dSmrg
2543c5629e66Smrgopenbsd*)
2544c5629e66Smrg  version_type=sunos
2545c5629e66Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
2546c5629e66Smrg  need_lib_prefix=no
2547c5629e66Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2548c5629e66Smrg  case $host_os in
2549698f425bSmrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
2550698f425bSmrg    *)				need_version=no  ;;
2551c5629e66Smrg  esac
2552c5629e66Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2553c5629e66Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2554c5629e66Smrg  shlibpath_var=LD_LIBRARY_PATH
2555698f425bSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2556c5629e66Smrg    case $host_os in
2557c5629e66Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
2558c5629e66Smrg	shlibpath_overrides_runpath=no
2559c5629e66Smrg	;;
2560c5629e66Smrg      *)
2561c5629e66Smrg	shlibpath_overrides_runpath=yes
2562c5629e66Smrg	;;
2563c5629e66Smrg      esac
2564c5629e66Smrg  else
2565c5629e66Smrg    shlibpath_overrides_runpath=yes
2566c5629e66Smrg  fi
2567c5629e66Smrg  ;;
2568266e564dSmrg
2569c5629e66Smrgos2*)
2570c5629e66Smrg  libname_spec='$name'
2571c5629e66Smrg  shrext_cmds=".dll"
2572c5629e66Smrg  need_lib_prefix=no
2573c5629e66Smrg  library_names_spec='$libname${shared_ext} $libname.a'
2574c5629e66Smrg  dynamic_linker='OS/2 ld.exe'
2575c5629e66Smrg  shlibpath_var=LIBPATH
2576c5629e66Smrg  ;;
2577266e564dSmrg
2578c5629e66Smrgosf3* | osf4* | osf5*)
2579c5629e66Smrg  version_type=osf
2580c5629e66Smrg  need_lib_prefix=no
2581c5629e66Smrg  need_version=no
2582c5629e66Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2583c5629e66Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2584c5629e66Smrg  shlibpath_var=LD_LIBRARY_PATH
2585c5629e66Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2586c5629e66Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2587c5629e66Smrg  ;;
2588266e564dSmrg
2589c5629e66Smrgrdos*)
2590c5629e66Smrg  dynamic_linker=no
2591c5629e66Smrg  ;;
2592266e564dSmrg
2593c5629e66Smrgsolaris*)
2594c5629e66Smrg  version_type=linux
2595c5629e66Smrg  need_lib_prefix=no
2596c5629e66Smrg  need_version=no
2597c5629e66Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2598c5629e66Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2599c5629e66Smrg  shlibpath_var=LD_LIBRARY_PATH
2600c5629e66Smrg  shlibpath_overrides_runpath=yes
2601c5629e66Smrg  hardcode_into_libs=yes
2602c5629e66Smrg  # ldd complains unless libraries are executable
2603c5629e66Smrg  postinstall_cmds='chmod +x $lib'
2604c5629e66Smrg  ;;
2605266e564dSmrg
2606c5629e66Smrgsunos4*)
2607c5629e66Smrg  version_type=sunos
2608c5629e66Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2609c5629e66Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2610c5629e66Smrg  shlibpath_var=LD_LIBRARY_PATH
2611c5629e66Smrg  shlibpath_overrides_runpath=yes
2612c5629e66Smrg  if test "$with_gnu_ld" = yes; then
2613c5629e66Smrg    need_lib_prefix=no
2614c5629e66Smrg  fi
2615c5629e66Smrg  need_version=yes
2616c5629e66Smrg  ;;
2617266e564dSmrg
2618c5629e66Smrgsysv4 | sysv4.3*)
2619c5629e66Smrg  version_type=linux
2620c5629e66Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2621c5629e66Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2622c5629e66Smrg  shlibpath_var=LD_LIBRARY_PATH
2623c5629e66Smrg  case $host_vendor in
2624c5629e66Smrg    sni)
2625c5629e66Smrg      shlibpath_overrides_runpath=no
2626c5629e66Smrg      need_lib_prefix=no
2627c5629e66Smrg      runpath_var=LD_RUN_PATH
2628c5629e66Smrg      ;;
2629c5629e66Smrg    siemens)
2630c5629e66Smrg      need_lib_prefix=no
2631c5629e66Smrg      ;;
2632c5629e66Smrg    motorola)
2633c5629e66Smrg      need_lib_prefix=no
2634c5629e66Smrg      need_version=no
2635c5629e66Smrg      shlibpath_overrides_runpath=no
2636c5629e66Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2637c5629e66Smrg      ;;
2638266e564dSmrg  esac
2639c5629e66Smrg  ;;
2640266e564dSmrg
2641c5629e66Smrgsysv4*MP*)
2642c5629e66Smrg  if test -d /usr/nec ;then
2643c5629e66Smrg    version_type=linux
2644c5629e66Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2645c5629e66Smrg    soname_spec='$libname${shared_ext}.$major'
2646c5629e66Smrg    shlibpath_var=LD_LIBRARY_PATH
2647c5629e66Smrg  fi
2648c5629e66Smrg  ;;
2649266e564dSmrg
2650c5629e66Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2651c5629e66Smrg  version_type=freebsd-elf
2652c5629e66Smrg  need_lib_prefix=no
2653c5629e66Smrg  need_version=no
2654c5629e66Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2655c5629e66Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2656c5629e66Smrg  shlibpath_var=LD_LIBRARY_PATH
2657698f425bSmrg  shlibpath_overrides_runpath=yes
2658c5629e66Smrg  hardcode_into_libs=yes
2659c5629e66Smrg  if test "$with_gnu_ld" = yes; then
2660c5629e66Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2661c5629e66Smrg  else
2662c5629e66Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2663c5629e66Smrg    case $host_os in
2664c5629e66Smrg      sco3.2v5*)
2665c5629e66Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2666c5629e66Smrg	;;
2667c5629e66Smrg    esac
2668266e564dSmrg  fi
2669c5629e66Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
2670266e564dSmrg  ;;
2671266e564dSmrg
2672698f425bSmrgtpf*)
2673698f425bSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
2674698f425bSmrg  version_type=linux
2675698f425bSmrg  need_lib_prefix=no
2676698f425bSmrg  need_version=no
2677698f425bSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2678698f425bSmrg  shlibpath_var=LD_LIBRARY_PATH
2679698f425bSmrg  shlibpath_overrides_runpath=no
2680698f425bSmrg  hardcode_into_libs=yes
2681698f425bSmrg  ;;
2682698f425bSmrg
2683c5629e66Smrguts4*)
2684c5629e66Smrg  version_type=linux
2685c5629e66Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2686c5629e66Smrg  soname_spec='${libname}${release}${shared_ext}$major'
2687c5629e66Smrg  shlibpath_var=LD_LIBRARY_PATH
2688c5629e66Smrg  ;;
2689266e564dSmrg
2690c5629e66Smrg*)
2691c5629e66Smrg  dynamic_linker=no
2692c5629e66Smrg  ;;
2693c5629e66Smrgesac
2694c5629e66SmrgAC_MSG_RESULT([$dynamic_linker])
2695c5629e66Smrgtest "$dynamic_linker" = no && can_build_shared=no
2696266e564dSmrg
2697c5629e66Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2698c5629e66Smrgif test "$GCC" = yes; then
2699c5629e66Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2700c5629e66Smrgfi
2701266e564dSmrg
2702698f425bSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2703698f425bSmrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2704698f425bSmrgfi
2705698f425bSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2706698f425bSmrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2707c5629e66Smrgfi
2708266e564dSmrg
2709698f425bSmrg_LT_DECL([], [variables_saved_for_relink], [1],
2710698f425bSmrg    [Variables whose values should be saved in libtool wrapper scripts and
2711698f425bSmrg    restored at link time])
2712698f425bSmrg_LT_DECL([], [need_lib_prefix], [0],
2713698f425bSmrg    [Do we need the "lib" prefix for modules?])
2714698f425bSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2715698f425bSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
2716698f425bSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
2717698f425bSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2718698f425bSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
2719698f425bSmrg    [Is shlibpath searched before the hard-coded library search path?])
2720698f425bSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2721698f425bSmrg_LT_DECL([], [library_names_spec], [1],
2722698f425bSmrg    [[List of archive names.  First name is the real one, the rest are links.
2723698f425bSmrg    The last name is the one that the linker finds with -lNAME]])
2724698f425bSmrg_LT_DECL([], [soname_spec], [1],
2725698f425bSmrg    [[The coded name of the library, if different from the real name]])
2726698f425bSmrg_LT_DECL([], [postinstall_cmds], [2],
2727698f425bSmrg    [Command to use after installation of a shared archive])
2728698f425bSmrg_LT_DECL([], [postuninstall_cmds], [2],
2729698f425bSmrg    [Command to use after uninstallation of a shared archive])
2730698f425bSmrg_LT_DECL([], [finish_cmds], [2],
2731698f425bSmrg    [Commands used to finish a libtool library installation in a directory])
2732698f425bSmrg_LT_DECL([], [finish_eval], [1],
2733698f425bSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
2734698f425bSmrg    not shown]])
2735698f425bSmrg_LT_DECL([], [hardcode_into_libs], [0],
2736698f425bSmrg    [Whether we should hardcode library paths into libraries])
2737698f425bSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
2738698f425bSmrg    [Compile-time system search path for libraries])
2739698f425bSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2740698f425bSmrg    [Run-time system search path for libraries])
2741698f425bSmrg])# _LT_SYS_DYNAMIC_LINKER
2742698f425bSmrg
2743698f425bSmrg
2744698f425bSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
2745c5629e66Smrg# --------------------------
2746c5629e66Smrg# find a file program which can recognize shared library
2747698f425bSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
2748698f425bSmrg[m4_require([_LT_DECL_EGREP])dnl
2749c5629e66SmrgAC_MSG_CHECKING([for $1])
2750c5629e66SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2751c5629e66Smrg[case $MAGIC_CMD in
2752c5629e66Smrg[[\\/*] |  ?:[\\/]*])
2753c5629e66Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2754266e564dSmrg  ;;
2755c5629e66Smrg*)
2756c5629e66Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
2757c5629e66Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2758c5629e66Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
2759c5629e66Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
2760c5629e66Smrgdnl not every word.  This closes a longstanding sh security hole.
2761698f425bSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
2762c5629e66Smrg  for ac_dir in $ac_dummy; do
2763c5629e66Smrg    IFS="$lt_save_ifs"
2764c5629e66Smrg    test -z "$ac_dir" && ac_dir=.
2765c5629e66Smrg    if test -f $ac_dir/$1; then
2766c5629e66Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2767c5629e66Smrg      if test -n "$file_magic_test_file"; then
2768c5629e66Smrg	case $deplibs_check_method in
2769c5629e66Smrg	"file_magic "*)
2770c5629e66Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2771c5629e66Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2772c5629e66Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2773c5629e66Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
2774c5629e66Smrg	    :
2775c5629e66Smrg	  else
2776698f425bSmrg	    cat <<_LT_EOF 1>&2
2777266e564dSmrg
2778c5629e66Smrg*** Warning: the command libtool uses to detect shared libraries,
2779c5629e66Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
2780c5629e66Smrg*** The result is that libtool may fail to recognize shared libraries
2781c5629e66Smrg*** as such.  This will affect the creation of libtool libraries that
2782c5629e66Smrg*** depend on shared libraries, but programs linked with such libtool
2783c5629e66Smrg*** libraries will work regardless of this problem.  Nevertheless, you
2784c5629e66Smrg*** may want to report the problem to your system manager and/or to
2785c5629e66Smrg*** bug-libtool@gnu.org
2786266e564dSmrg
2787698f425bSmrg_LT_EOF
2788c5629e66Smrg	  fi ;;
2789c5629e66Smrg	esac
2790c5629e66Smrg      fi
2791c5629e66Smrg      break
2792c5629e66Smrg    fi
2793c5629e66Smrg  done
2794c5629e66Smrg  IFS="$lt_save_ifs"
2795c5629e66Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
2796266e564dSmrg  ;;
2797c5629e66Smrgesac])
2798c5629e66SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2799c5629e66Smrgif test -n "$MAGIC_CMD"; then
2800c5629e66Smrg  AC_MSG_RESULT($MAGIC_CMD)
2801266e564dSmrgelse
2802c5629e66Smrg  AC_MSG_RESULT(no)
2803266e564dSmrgfi
2804698f425bSmrg_LT_DECL([], [MAGIC_CMD], [0],
2805698f425bSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2806698f425bSmrg])# _LT_PATH_TOOL_PREFIX
2807266e564dSmrg
2808698f425bSmrg# Old name:
2809698f425bSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2810698f425bSmrgdnl aclocal-1.4 backwards compatibility:
2811698f425bSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2812266e564dSmrg
2813698f425bSmrg
2814698f425bSmrg# _LT_PATH_MAGIC
2815698f425bSmrg# --------------
2816c5629e66Smrg# find a file program which can recognize a shared library
2817698f425bSmrgm4_defun([_LT_PATH_MAGIC],
2818698f425bSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2819c5629e66Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
2820c5629e66Smrg  if test -n "$ac_tool_prefix"; then
2821698f425bSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2822c5629e66Smrg  else
2823c5629e66Smrg    MAGIC_CMD=:
2824c5629e66Smrg  fi
2825266e564dSmrgfi
2826698f425bSmrg])# _LT_PATH_MAGIC
2827266e564dSmrg
2828266e564dSmrg
2829698f425bSmrg# LT_PATH_LD
2830c5629e66Smrg# ----------
2831c5629e66Smrg# find the pathname to the GNU or non-GNU linker
2832698f425bSmrgAC_DEFUN([LT_PATH_LD],
2833698f425bSmrg[AC_REQUIRE([AC_PROG_CC])dnl
2834c5629e66SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
2835c5629e66SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2836698f425bSmrgm4_require([_LT_DECL_SED])dnl
2837698f425bSmrgm4_require([_LT_DECL_EGREP])dnl
2838698f425bSmrg
2839698f425bSmrgAC_ARG_WITH([gnu-ld],
2840698f425bSmrg    [AS_HELP_STRING([--with-gnu-ld],
2841698f425bSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2842698f425bSmrg    [test "$withval" = no || with_gnu_ld=yes],
2843698f425bSmrg    [with_gnu_ld=no])dnl
2844698f425bSmrg
2845c5629e66Smrgac_prog=ld
2846c5629e66Smrgif test "$GCC" = yes; then
2847c5629e66Smrg  # Check if gcc -print-prog-name=ld gives a path.
2848c5629e66Smrg  AC_MSG_CHECKING([for ld used by $CC])
2849c5629e66Smrg  case $host in
2850c5629e66Smrg  *-*-mingw*)
2851c5629e66Smrg    # gcc leaves a trailing carriage return which upsets mingw
2852c5629e66Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2853c5629e66Smrg  *)
2854c5629e66Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2855c5629e66Smrg  esac
2856c5629e66Smrg  case $ac_prog in
2857c5629e66Smrg    # Accept absolute paths.
2858c5629e66Smrg    [[\\/]]* | ?:[[\\/]]*)
2859c5629e66Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
2860c5629e66Smrg      # Canonicalize the pathname of ld
2861698f425bSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2862698f425bSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2863698f425bSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2864c5629e66Smrg      done
2865c5629e66Smrg      test -z "$LD" && LD="$ac_prog"
2866c5629e66Smrg      ;;
2867c5629e66Smrg  "")
2868c5629e66Smrg    # If it fails, then pretend we aren't using GCC.
2869c5629e66Smrg    ac_prog=ld
2870266e564dSmrg    ;;
2871c5629e66Smrg  *)
2872c5629e66Smrg    # If it is relative, then search for the first ld in PATH.
2873c5629e66Smrg    with_gnu_ld=unknown
2874266e564dSmrg    ;;
2875c5629e66Smrg  esac
2876c5629e66Smrgelif test "$with_gnu_ld" = yes; then
2877c5629e66Smrg  AC_MSG_CHECKING([for GNU ld])
2878c5629e66Smrgelse
2879c5629e66Smrg  AC_MSG_CHECKING([for non-GNU ld])
2880c5629e66Smrgfi
2881c5629e66SmrgAC_CACHE_VAL(lt_cv_path_LD,
2882c5629e66Smrg[if test -z "$LD"; then
2883c5629e66Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2884c5629e66Smrg  for ac_dir in $PATH; do
2885c5629e66Smrg    IFS="$lt_save_ifs"
2886c5629e66Smrg    test -z "$ac_dir" && ac_dir=.
2887c5629e66Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2888c5629e66Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
2889c5629e66Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
2890c5629e66Smrg      # but apparently some variants of GNU ld only accept -v.
2891c5629e66Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
2892c5629e66Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2893c5629e66Smrg      *GNU* | *'with BFD'*)
2894c5629e66Smrg	test "$with_gnu_ld" != no && break
2895c5629e66Smrg	;;
2896c5629e66Smrg      *)
2897c5629e66Smrg	test "$with_gnu_ld" != yes && break
2898c5629e66Smrg	;;
2899266e564dSmrg      esac
2900266e564dSmrg    fi
2901c5629e66Smrg  done
2902c5629e66Smrg  IFS="$lt_save_ifs"
2903266e564dSmrgelse
2904c5629e66Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2905c5629e66Smrgfi])
2906c5629e66SmrgLD="$lt_cv_path_LD"
2907c5629e66Smrgif test -n "$LD"; then
2908c5629e66Smrg  AC_MSG_RESULT($LD)
2909c5629e66Smrgelse
2910c5629e66Smrg  AC_MSG_RESULT(no)
2911266e564dSmrgfi
2912c5629e66Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2913698f425bSmrg_LT_PATH_LD_GNU
2914698f425bSmrgAC_SUBST([LD])
2915266e564dSmrg
2916698f425bSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2917698f425bSmrg])# LT_PATH_LD
2918266e564dSmrg
2919698f425bSmrg# Old names:
2920698f425bSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2921698f425bSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2922698f425bSmrgdnl aclocal-1.4 backwards compatibility:
2923698f425bSmrgdnl AC_DEFUN([AM_PROG_LD], [])
2924698f425bSmrgdnl AC_DEFUN([AC_PROG_LD], [])
2925698f425bSmrg
2926698f425bSmrg
2927698f425bSmrg# _LT_PATH_LD_GNU
2928698f425bSmrg#- --------------
2929698f425bSmrgm4_defun([_LT_PATH_LD_GNU],
2930698f425bSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2931c5629e66Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2932c5629e66Smrgcase `$LD -v 2>&1 </dev/null` in
2933c5629e66Smrg*GNU* | *'with BFD'*)
2934c5629e66Smrg  lt_cv_prog_gnu_ld=yes
2935c5629e66Smrg  ;;
2936c5629e66Smrg*)
2937c5629e66Smrg  lt_cv_prog_gnu_ld=no
2938c5629e66Smrg  ;;
2939c5629e66Smrgesac])
2940c5629e66Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2941698f425bSmrg])# _LT_PATH_LD_GNU
2942266e564dSmrg
2943266e564dSmrg
2944698f425bSmrg# _LT_CMD_RELOAD
2945698f425bSmrg# --------------
2946c5629e66Smrg# find reload flag for linker
2947c5629e66Smrg#   -- PORTME Some linkers may need a different reload flag.
2948698f425bSmrgm4_defun([_LT_CMD_RELOAD],
2949c5629e66Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
2950c5629e66Smrg  lt_cv_ld_reload_flag,
2951c5629e66Smrg  [lt_cv_ld_reload_flag='-r'])
2952c5629e66Smrgreload_flag=$lt_cv_ld_reload_flag
2953c5629e66Smrgcase $reload_flag in
2954c5629e66Smrg"" | " "*) ;;
2955c5629e66Smrg*) reload_flag=" $reload_flag" ;;
2956c5629e66Smrgesac
2957c5629e66Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
2958c5629e66Smrgcase $host_os in
2959c5629e66Smrg  darwin*)
2960c5629e66Smrg    if test "$GCC" = yes; then
2961c5629e66Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2962c5629e66Smrg    else
2963c5629e66Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2964c5629e66Smrg    fi
2965c5629e66Smrg    ;;
2966c5629e66Smrgesac
2967698f425bSmrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2968698f425bSmrg_LT_DECL([], [reload_cmds], [2])dnl
2969698f425bSmrg])# _LT_CMD_RELOAD
2970266e564dSmrg
2971266e564dSmrg
2972698f425bSmrg# _LT_CHECK_MAGIC_METHOD
2973698f425bSmrg# ----------------------
2974c5629e66Smrg# how to check for library dependencies
2975c5629e66Smrg#  -- PORTME fill in with the dynamic library characteristics
2976698f425bSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
2977698f425bSmrg[m4_require([_LT_DECL_EGREP])
2978698f425bSmrgm4_require([_LT_DECL_OBJDUMP])
2979698f425bSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
2980c5629e66Smrglt_cv_deplibs_check_method,
2981c5629e66Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
2982c5629e66Smrglt_cv_file_magic_test_file=
2983c5629e66Smrglt_cv_deplibs_check_method='unknown'
2984c5629e66Smrg# Need to set the preceding variable on all platforms that support
2985c5629e66Smrg# interlibrary dependencies.
2986c5629e66Smrg# 'none' -- dependencies not supported.
2987c5629e66Smrg# `unknown' -- same as none, but documents that we really don't know.
2988c5629e66Smrg# 'pass_all' -- all dependencies passed with no checks.
2989c5629e66Smrg# 'test_compile' -- check by making test program.
2990c5629e66Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
2991c5629e66Smrg# which responds to the $file_magic_cmd with a given extended regex.
2992c5629e66Smrg# If you have `file' or equivalent on your system and you're not sure
2993c5629e66Smrg# whether `pass_all' will *always* work, you probably want this one.
2994266e564dSmrg
2995c5629e66Smrgcase $host_os in
2996c5629e66Smrgaix[[4-9]]*)
2997c5629e66Smrg  lt_cv_deplibs_check_method=pass_all
2998c5629e66Smrg  ;;
2999266e564dSmrg
3000c5629e66Smrgbeos*)
3001c5629e66Smrg  lt_cv_deplibs_check_method=pass_all
3002c5629e66Smrg  ;;
3003266e564dSmrg
3004c5629e66Smrgbsdi[[45]]*)
3005c5629e66Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3006c5629e66Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
3007c5629e66Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
3008c5629e66Smrg  ;;
3009266e564dSmrg
3010c5629e66Smrgcygwin*)
3011c5629e66Smrg  # func_win32_libid is a shell function defined in ltmain.sh
3012c5629e66Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3013c5629e66Smrg  lt_cv_file_magic_cmd='func_win32_libid'
3014c5629e66Smrg  ;;
3015266e564dSmrg
3016c5629e66Smrgmingw* | pw32*)
3017c5629e66Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
3018c5629e66Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3019c5629e66Smrg  # unless we find 'file', for example because we are cross-compiling.
3020c5629e66Smrg  if ( file / ) >/dev/null 2>&1; then
3021c5629e66Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3022c5629e66Smrg    lt_cv_file_magic_cmd='func_win32_libid'
3023266e564dSmrg  else
3024c5629e66Smrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3025c5629e66Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
3026c5629e66Smrg  fi
3027c5629e66Smrg  ;;
3028266e564dSmrg
3029698f425bSmrgcegcc)
3030698f425bSmrg  # use the weaker test based on 'objdump'. See mingw*.
3031698f425bSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3032698f425bSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
3033698f425bSmrg  ;;
3034698f425bSmrg
3035c5629e66Smrgdarwin* | rhapsody*)
3036c5629e66Smrg  lt_cv_deplibs_check_method=pass_all
3037c5629e66Smrg  ;;
3038c5629e66Smrg
3039c5629e66Smrgfreebsd* | dragonfly*)
3040698f425bSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3041c5629e66Smrg    case $host_cpu in
3042c5629e66Smrg    i*86 )
3043c5629e66Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
3044c5629e66Smrg      # Let's accept both of them until this is cleared up.
3045c5629e66Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3046c5629e66Smrg      lt_cv_file_magic_cmd=/usr/bin/file
3047c5629e66Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3048c5629e66Smrg      ;;
3049266e564dSmrg    esac
3050c5629e66Smrg  else
3051c5629e66Smrg    lt_cv_deplibs_check_method=pass_all
3052266e564dSmrg  fi
3053c5629e66Smrg  ;;
3054266e564dSmrg
3055c5629e66Smrggnu*)
3056c5629e66Smrg  lt_cv_deplibs_check_method=pass_all
3057c5629e66Smrg  ;;
3058266e564dSmrg
3059c5629e66Smrghpux10.20* | hpux11*)
3060c5629e66Smrg  lt_cv_file_magic_cmd=/usr/bin/file
3061c5629e66Smrg  case $host_cpu in
3062c5629e66Smrg  ia64*)
3063c5629e66Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3064c5629e66Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3065c5629e66Smrg    ;;
3066c5629e66Smrg  hppa*64*)
3067c5629e66Smrg    [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]']
3068c5629e66Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3069266e564dSmrg    ;;
3070266e564dSmrg  *)
3071c5629e66Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3072c5629e66Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3073266e564dSmrg    ;;
3074266e564dSmrg  esac
3075c5629e66Smrg  ;;
3076266e564dSmrg
3077c5629e66Smrginterix[[3-9]]*)
3078c5629e66Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3079c5629e66Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3080c5629e66Smrg  ;;
3081c5629e66Smrg
3082c5629e66Smrgirix5* | irix6* | nonstopux*)
3083c5629e66Smrg  case $LD in
3084c5629e66Smrg  *-32|*"-32 ") libmagic=32-bit;;
3085c5629e66Smrg  *-n32|*"-n32 ") libmagic=N32;;
3086c5629e66Smrg  *-64|*"-64 ") libmagic=64-bit;;
3087c5629e66Smrg  *) libmagic=never-match;;
3088c5629e66Smrg  esac
3089c5629e66Smrg  lt_cv_deplibs_check_method=pass_all
3090c5629e66Smrg  ;;
3091c5629e66Smrg
3092c5629e66Smrg# This must be Linux ELF.
3093c5629e66Smrglinux* | k*bsd*-gnu)
3094c5629e66Smrg  lt_cv_deplibs_check_method=pass_all
3095c5629e66Smrg  ;;
3096c5629e66Smrg
3097c5629e66Smrgnetbsd*)
3098698f425bSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3099c5629e66Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3100266e564dSmrg  else
3101c5629e66Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3102266e564dSmrg  fi
3103c5629e66Smrg  ;;
3104266e564dSmrg
3105c5629e66Smrgnewos6*)
3106c5629e66Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3107c5629e66Smrg  lt_cv_file_magic_cmd=/usr/bin/file
3108c5629e66Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3109c5629e66Smrg  ;;
3110266e564dSmrg
3111698f425bSmrg*nto* | *qnx*)
3112698f425bSmrg  lt_cv_deplibs_check_method=pass_all
3113c5629e66Smrg  ;;
3114266e564dSmrg
3115c5629e66Smrgopenbsd*)
3116698f425bSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3117c5629e66Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3118c5629e66Smrg  else
3119c5629e66Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3120c5629e66Smrg  fi
3121c5629e66Smrg  ;;
3122266e564dSmrg
3123c5629e66Smrgosf3* | osf4* | osf5*)
3124c5629e66Smrg  lt_cv_deplibs_check_method=pass_all
3125c5629e66Smrg  ;;
3126266e564dSmrg
3127c5629e66Smrgrdos*)
3128c5629e66Smrg  lt_cv_deplibs_check_method=pass_all
3129c5629e66Smrg  ;;
3130266e564dSmrg
3131c5629e66Smrgsolaris*)
3132c5629e66Smrg  lt_cv_deplibs_check_method=pass_all
3133c5629e66Smrg  ;;
3134266e564dSmrg
3135698f425bSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3136698f425bSmrg  lt_cv_deplibs_check_method=pass_all
3137698f425bSmrg  ;;
3138698f425bSmrg
3139c5629e66Smrgsysv4 | sysv4.3*)
3140c5629e66Smrg  case $host_vendor in
3141c5629e66Smrg  motorola)
3142c5629e66Smrg    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]]'
3143c5629e66Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3144c5629e66Smrg    ;;
3145c5629e66Smrg  ncr)
3146c5629e66Smrg    lt_cv_deplibs_check_method=pass_all
3147c5629e66Smrg    ;;
3148c5629e66Smrg  sequent)
3149c5629e66Smrg    lt_cv_file_magic_cmd='/bin/file'
3150c5629e66Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3151c5629e66Smrg    ;;
3152c5629e66Smrg  sni)
3153c5629e66Smrg    lt_cv_file_magic_cmd='/bin/file'
3154c5629e66Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3155c5629e66Smrg    lt_cv_file_magic_test_file=/lib/libc.so
3156c5629e66Smrg    ;;
3157c5629e66Smrg  siemens)
3158c5629e66Smrg    lt_cv_deplibs_check_method=pass_all
3159c5629e66Smrg    ;;
3160c5629e66Smrg  pc)
3161c5629e66Smrg    lt_cv_deplibs_check_method=pass_all
3162c5629e66Smrg    ;;
3163266e564dSmrg  esac
3164c5629e66Smrg  ;;
3165266e564dSmrg
3166698f425bSmrgtpf*)
3167c5629e66Smrg  lt_cv_deplibs_check_method=pass_all
3168c5629e66Smrg  ;;
3169c5629e66Smrgesac
3170c5629e66Smrg])
3171c5629e66Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
3172c5629e66Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
3173c5629e66Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
3174266e564dSmrg
3175698f425bSmrg_LT_DECL([], [deplibs_check_method], [1],
3176698f425bSmrg    [Method to check whether dependent libraries are shared objects])
3177698f425bSmrg_LT_DECL([], [file_magic_cmd], [1],
3178698f425bSmrg    [Command to use when deplibs_check_method == "file_magic"])
3179698f425bSmrg])# _LT_CHECK_MAGIC_METHOD
3180266e564dSmrg
3181698f425bSmrg
3182698f425bSmrg# LT_PATH_NM
3183c5629e66Smrg# ----------
3184698f425bSmrg# find the pathname to a BSD- or MS-compatible name lister
3185698f425bSmrgAC_DEFUN([LT_PATH_NM],
3186698f425bSmrg[AC_REQUIRE([AC_PROG_CC])dnl
3187698f425bSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3188c5629e66Smrg[if test -n "$NM"; then
3189c5629e66Smrg  # Let the user override the test.
3190c5629e66Smrg  lt_cv_path_NM="$NM"
3191266e564dSmrgelse
3192c5629e66Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
3193c5629e66Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3194c5629e66Smrg    lt_nm_to_check="$lt_nm_to_check nm"
3195c5629e66Smrg  fi
3196c5629e66Smrg  for lt_tmp_nm in $lt_nm_to_check; do
3197c5629e66Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3198c5629e66Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3199c5629e66Smrg      IFS="$lt_save_ifs"
3200c5629e66Smrg      test -z "$ac_dir" && ac_dir=.
3201c5629e66Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
3202c5629e66Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3203c5629e66Smrg	# Check to see if the nm accepts a BSD-compat flag.
3204c5629e66Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3205c5629e66Smrg	#   nm: unknown option "B" ignored
3206c5629e66Smrg	# Tru64's nm complains that /dev/null is an invalid object file
3207c5629e66Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3208c5629e66Smrg	*/dev/null* | *'Invalid file or object type'*)
3209c5629e66Smrg	  lt_cv_path_NM="$tmp_nm -B"
3210c5629e66Smrg	  break
3211c5629e66Smrg	  ;;
3212c5629e66Smrg	*)
3213c5629e66Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3214c5629e66Smrg	  */dev/null*)
3215c5629e66Smrg	    lt_cv_path_NM="$tmp_nm -p"
3216c5629e66Smrg	    break
3217c5629e66Smrg	    ;;
3218c5629e66Smrg	  *)
3219c5629e66Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3220c5629e66Smrg	    continue # so that we can try to find one that supports BSD flags
3221c5629e66Smrg	    ;;
3222c5629e66Smrg	  esac
3223c5629e66Smrg	  ;;
3224c5629e66Smrg	esac
3225c5629e66Smrg      fi
3226c5629e66Smrg    done
3227c5629e66Smrg    IFS="$lt_save_ifs"
3228c5629e66Smrg  done
3229698f425bSmrg  : ${lt_cv_path_NM=no}
3230c5629e66Smrgfi])
3231698f425bSmrgif test "$lt_cv_path_NM" != "no"; then
3232698f425bSmrg  NM="$lt_cv_path_NM"
3233698f425bSmrgelse
3234698f425bSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
3235698f425bSmrg  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3236698f425bSmrg  AC_SUBST([DUMPBIN])
3237698f425bSmrg  if test "$DUMPBIN" != ":"; then
3238698f425bSmrg    NM="$DUMPBIN"
3239698f425bSmrg  fi
3240698f425bSmrgfi
3241698f425bSmrgtest -z "$NM" && NM=nm
3242698f425bSmrgAC_SUBST([NM])
3243698f425bSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3244698f425bSmrg
3245698f425bSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3246698f425bSmrg  [lt_cv_nm_interface="BSD nm"
3247698f425bSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
3248698f425bSmrg  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3249698f425bSmrg  (eval "$ac_compile" 2>conftest.err)
3250698f425bSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3251698f425bSmrg  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3252698f425bSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3253698f425bSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3254698f425bSmrg  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3255698f425bSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
3256698f425bSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3257698f425bSmrg    lt_cv_nm_interface="MS dumpbin"
3258698f425bSmrg  fi
3259698f425bSmrg  rm -f conftest*])
3260698f425bSmrg])# LT_PATH_NM
3261266e564dSmrg
3262698f425bSmrg# Old names:
3263698f425bSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3264698f425bSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3265698f425bSmrgdnl aclocal-1.4 backwards compatibility:
3266698f425bSmrgdnl AC_DEFUN([AM_PROG_NM], [])
3267698f425bSmrgdnl AC_DEFUN([AC_PROG_NM], [])
3268266e564dSmrg
3269698f425bSmrg
3270698f425bSmrg# LT_LIB_M
3271698f425bSmrg# --------
3272c5629e66Smrg# check for math library
3273698f425bSmrgAC_DEFUN([LT_LIB_M],
3274c5629e66Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3275c5629e66SmrgLIBM=
3276c5629e66Smrgcase $host in
3277c5629e66Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3278c5629e66Smrg  # These system don't have libm, or don't need it
3279c5629e66Smrg  ;;
3280c5629e66Smrg*-ncr-sysv4.3*)
3281c5629e66Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3282c5629e66Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3283c5629e66Smrg  ;;
3284c5629e66Smrg*)
3285c5629e66Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
3286c5629e66Smrg  ;;
3287c5629e66Smrgesac
3288698f425bSmrgAC_SUBST([LIBM])
3289698f425bSmrg])# LT_LIB_M
3290266e564dSmrg
3291698f425bSmrg# Old name:
3292698f425bSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3293698f425bSmrgdnl aclocal-1.4 backwards compatibility:
3294698f425bSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
3295266e564dSmrg
3296266e564dSmrg
3297698f425bSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
3298698f425bSmrg# -------------------------------
3299698f425bSmrgm4_defun([_LT_COMPILER_NO_RTTI],
3300698f425bSmrg[m4_require([_LT_TAG_COMPILER])dnl
3301c5629e66Smrg
3302698f425bSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3303266e564dSmrg
3304698f425bSmrgif test "$GCC" = yes; then
3305698f425bSmrg  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3306266e564dSmrg
3307698f425bSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3308698f425bSmrg    lt_cv_prog_compiler_rtti_exceptions,
3309698f425bSmrg    [-fno-rtti -fno-exceptions], [],
3310698f425bSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3311698f425bSmrgfi
3312698f425bSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3313698f425bSmrg	[Compiler flag to turn off builtin functions])
3314698f425bSmrg])# _LT_COMPILER_NO_RTTI
3315266e564dSmrg
3316266e564dSmrg
3317698f425bSmrg# _LT_CMD_GLOBAL_SYMBOLS
3318698f425bSmrg# ----------------------
3319698f425bSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3320698f425bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3321698f425bSmrgAC_REQUIRE([AC_PROG_CC])dnl
3322698f425bSmrgAC_REQUIRE([LT_PATH_NM])dnl
3323698f425bSmrgAC_REQUIRE([LT_PATH_LD])dnl
3324698f425bSmrgm4_require([_LT_DECL_SED])dnl
3325698f425bSmrgm4_require([_LT_DECL_EGREP])dnl
3326698f425bSmrgm4_require([_LT_TAG_COMPILER])dnl
3327266e564dSmrg
3328698f425bSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
3329698f425bSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
3330698f425bSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3331c5629e66Smrg[
3332698f425bSmrg# These are sane defaults that work on at least a few old systems.
3333698f425bSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3334266e564dSmrg
3335698f425bSmrg# Character class describing NM global symbol codes.
3336698f425bSmrgsymcode='[[BCDEGRST]]'
3337266e564dSmrg
3338698f425bSmrg# Regexp to match symbols that can be accessed directly from C.
3339698f425bSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3340266e564dSmrg
3341698f425bSmrg# Define system-specific variables.
3342698f425bSmrgcase $host_os in
3343698f425bSmrgaix*)
3344698f425bSmrg  symcode='[[BCDT]]'
3345698f425bSmrg  ;;
3346698f425bSmrgcygwin* | mingw* | pw32* | cegcc*)
3347698f425bSmrg  symcode='[[ABCDGISTW]]'
3348698f425bSmrg  ;;
3349698f425bSmrghpux*)
3350698f425bSmrg  if test "$host_cpu" = ia64; then
3351698f425bSmrg    symcode='[[ABCDEGRST]]'
3352698f425bSmrg  fi
3353698f425bSmrg  ;;
3354698f425bSmrgirix* | nonstopux*)
3355698f425bSmrg  symcode='[[BCDEGRST]]'
3356698f425bSmrg  ;;
3357698f425bSmrgosf*)
3358698f425bSmrg  symcode='[[BCDEGQRST]]'
3359698f425bSmrg  ;;
3360698f425bSmrgsolaris*)
3361698f425bSmrg  symcode='[[BDRT]]'
3362698f425bSmrg  ;;
3363698f425bSmrgsco3.2v5*)
3364698f425bSmrg  symcode='[[DT]]'
3365698f425bSmrg  ;;
3366698f425bSmrgsysv4.2uw2*)
3367698f425bSmrg  symcode='[[DT]]'
3368698f425bSmrg  ;;
3369698f425bSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
3370698f425bSmrg  symcode='[[ABDT]]'
3371698f425bSmrg  ;;
3372698f425bSmrgsysv4)
3373698f425bSmrg  symcode='[[DFNSTU]]'
3374698f425bSmrg  ;;
3375698f425bSmrgesac
3376266e564dSmrg
3377698f425bSmrg# If we're using GNU nm, then use its standard symbol codes.
3378698f425bSmrgcase `$NM -V 2>&1` in
3379698f425bSmrg*GNU* | *'with BFD'*)
3380698f425bSmrg  symcode='[[ABCDGIRSTW]]' ;;
3381698f425bSmrgesac
3382266e564dSmrg
3383698f425bSmrg# Transform an extracted symbol line into a proper C declaration.
3384698f425bSmrg# Some systems (esp. on ia64) link data and code symbols differently,
3385698f425bSmrg# so use this general approach.
3386698f425bSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3387266e564dSmrg
3388698f425bSmrg# Transform an extracted symbol line into symbol name and symbol address
3389698f425bSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3390698f425bSmrglt_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'"
3391266e564dSmrg
3392698f425bSmrg# Handle CRLF in mingw tool chain
3393698f425bSmrgopt_cr=
3394698f425bSmrgcase $build_os in
3395698f425bSmrgmingw*)
3396698f425bSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3397698f425bSmrg  ;;
3398698f425bSmrgesac
3399266e564dSmrg
3400698f425bSmrg# Try without a prefix underscore, then with it.
3401698f425bSmrgfor ac_symprfx in "" "_"; do
3402266e564dSmrg
3403698f425bSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3404698f425bSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
3405266e564dSmrg
3406698f425bSmrg  # Write the raw and C identifiers.
3407698f425bSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3408698f425bSmrg    # Fake it for dumpbin and say T for any non-static function
3409698f425bSmrg    # and D for any global variable.
3410698f425bSmrg    # Also find C++ and __fastcall symbols from MSVC++,
3411698f425bSmrg    # which start with @ or ?.
3412698f425bSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
3413698f425bSmrg"     {last_section=section; section=\$ 3};"\
3414698f425bSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3415698f425bSmrg"     \$ 0!~/External *\|/{next};"\
3416698f425bSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3417698f425bSmrg"     {if(hide[section]) next};"\
3418698f425bSmrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3419698f425bSmrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3420698f425bSmrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
3421698f425bSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3422698f425bSmrg"     ' prfx=^$ac_symprfx]"
3423698f425bSmrg  else
3424698f425bSmrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3425266e564dSmrg  fi
3426266e564dSmrg
3427698f425bSmrg  # Check to see that the pipe works correctly.
3428698f425bSmrg  pipe_works=no
3429266e564dSmrg
3430698f425bSmrg  rm -f conftest*
3431698f425bSmrg  cat > conftest.$ac_ext <<_LT_EOF
3432698f425bSmrg#ifdef __cplusplus
3433698f425bSmrgextern "C" {
3434698f425bSmrg#endif
3435698f425bSmrgchar nm_test_var;
3436698f425bSmrgvoid nm_test_func(void);
3437698f425bSmrgvoid nm_test_func(void){}
3438698f425bSmrg#ifdef __cplusplus
3439698f425bSmrg}
3440698f425bSmrg#endif
3441698f425bSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
3442698f425bSmrg_LT_EOF
3443266e564dSmrg
3444698f425bSmrg  if AC_TRY_EVAL(ac_compile); then
3445698f425bSmrg    # Now try to grab the symbols.
3446698f425bSmrg    nlist=conftest.nm
3447698f425bSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3448698f425bSmrg      # Try sorting and uniquifying the output.
3449698f425bSmrg      if sort "$nlist" | uniq > "$nlist"T; then
3450698f425bSmrg	mv -f "$nlist"T "$nlist"
3451698f425bSmrg      else
3452698f425bSmrg	rm -f "$nlist"T
3453698f425bSmrg      fi
3454266e564dSmrg
3455698f425bSmrg      # Make sure that we snagged all the symbols we need.
3456698f425bSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3457698f425bSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3458698f425bSmrg	  cat <<_LT_EOF > conftest.$ac_ext
3459698f425bSmrg#ifdef __cplusplus
3460698f425bSmrgextern "C" {
3461698f425bSmrg#endif
3462266e564dSmrg
3463698f425bSmrg_LT_EOF
3464698f425bSmrg	  # Now generate the symbol file.
3465698f425bSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3466266e564dSmrg
3467698f425bSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
3468266e564dSmrg
3469698f425bSmrg/* The mapping between symbol names and symbols.  */
3470698f425bSmrgconst struct {
3471698f425bSmrg  const char *name;
3472698f425bSmrg  void       *address;
3473698f425bSmrg}
3474698f425bSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
3475698f425bSmrg{
3476698f425bSmrg  { "@PROGRAM@", (void *) 0 },
3477698f425bSmrg_LT_EOF
3478698f425bSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3479698f425bSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
3480698f425bSmrg  {0, (void *) 0}
3481698f425bSmrg};
3482c5629e66Smrg
3483698f425bSmrg/* This works around a problem in FreeBSD linker */
3484698f425bSmrg#ifdef FREEBSD_WORKAROUND
3485698f425bSmrgstatic const void *lt_preloaded_setup() {
3486698f425bSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
3487698f425bSmrg}
3488698f425bSmrg#endif
3489c5629e66Smrg
3490698f425bSmrg#ifdef __cplusplus
3491698f425bSmrg}
3492698f425bSmrg#endif
3493698f425bSmrg_LT_EOF
3494698f425bSmrg	  # Now try linking the two files.
3495698f425bSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
3496698f425bSmrg	  lt_save_LIBS="$LIBS"
3497698f425bSmrg	  lt_save_CFLAGS="$CFLAGS"
3498698f425bSmrg	  LIBS="conftstm.$ac_objext"
3499698f425bSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3500698f425bSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3501698f425bSmrg	    pipe_works=yes
3502698f425bSmrg	  fi
3503698f425bSmrg	  LIBS="$lt_save_LIBS"
3504698f425bSmrg	  CFLAGS="$lt_save_CFLAGS"
3505698f425bSmrg	else
3506698f425bSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3507698f425bSmrg	fi
3508698f425bSmrg      else
3509698f425bSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3510698f425bSmrg      fi
3511266e564dSmrg    else
3512698f425bSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3513266e564dSmrg    fi
3514c5629e66Smrg  else
3515698f425bSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3516698f425bSmrg    cat conftest.$ac_ext >&5
3517266e564dSmrg  fi
3518698f425bSmrg  rm -rf conftest* conftst*
3519266e564dSmrg
3520698f425bSmrg  # Do not use the global_symbol_pipe unless it works.
3521698f425bSmrg  if test "$pipe_works" = yes; then
3522698f425bSmrg    break
3523698f425bSmrg  else
3524698f425bSmrg    lt_cv_sys_global_symbol_pipe=
3525698f425bSmrg  fi
3526698f425bSmrgdone
3527698f425bSmrg])
3528698f425bSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
3529698f425bSmrg  lt_cv_sys_global_symbol_to_cdecl=
3530698f425bSmrgfi
3531698f425bSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3532698f425bSmrg  AC_MSG_RESULT(failed)
3533c5629e66Smrgelse
3534698f425bSmrg  AC_MSG_RESULT(ok)
3535c5629e66Smrgfi
3536c5629e66Smrg
3537698f425bSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3538698f425bSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
3539698f425bSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3540698f425bSmrg    [Transform the output of nm in a proper C declaration])
3541698f425bSmrg_LT_DECL([global_symbol_to_c_name_address],
3542698f425bSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
3543698f425bSmrg    [Transform the output of nm in a C name address pair])
3544698f425bSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3545698f425bSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3546698f425bSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
3547698f425bSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
3548266e564dSmrg
3549266e564dSmrg
3550698f425bSmrg# _LT_COMPILER_PIC([TAGNAME])
3551698f425bSmrg# ---------------------------
3552698f425bSmrgm4_defun([_LT_COMPILER_PIC],
3553698f425bSmrg[m4_require([_LT_TAG_COMPILER])dnl
3554698f425bSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
3555698f425bSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3556698f425bSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
3557266e564dSmrg
3558698f425bSmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
3559698f425bSmrgm4_if([$1], [CXX], [
3560698f425bSmrg  # C++ specific cases for pic, static, wl, etc.
3561698f425bSmrg  if test "$GXX" = yes; then
3562698f425bSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3563698f425bSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3564266e564dSmrg
3565698f425bSmrg    case $host_os in
3566698f425bSmrg    aix*)
3567698f425bSmrg      # All AIX code is PIC.
3568c5629e66Smrg      if test "$host_cpu" = ia64; then
3569698f425bSmrg	# AIX 5 now supports IA64 processor
3570698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3571c5629e66Smrg      fi
3572266e564dSmrg      ;;
3573266e564dSmrg
3574698f425bSmrg    amigaos*)
3575c5629e66Smrg      case $host_cpu in
3576698f425bSmrg      powerpc)
3577698f425bSmrg            # see comment about AmigaOS4 .so support
3578698f425bSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3579698f425bSmrg        ;;
3580698f425bSmrg      m68k)
3581698f425bSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
3582698f425bSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
3583698f425bSmrg            # like `-m68040'.
3584698f425bSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3585c5629e66Smrg        ;;
3586c5629e66Smrg      esac
3587266e564dSmrg      ;;
3588266e564dSmrg
3589698f425bSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3590698f425bSmrg      # PIC is the default for these OSes.
3591698f425bSmrg      ;;
3592698f425bSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
3593698f425bSmrg      # This hack is so that the source file can tell whether it is being
3594698f425bSmrg      # built for inclusion in a dll (and should export symbols for example).
3595698f425bSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3596698f425bSmrg      # (--disable-auto-import) libraries
3597698f425bSmrg      m4_if([$1], [GCJ], [],
3598698f425bSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3599698f425bSmrg      ;;
3600698f425bSmrg    darwin* | rhapsody*)
3601698f425bSmrg      # PIC is the default on this platform
3602698f425bSmrg      # Common symbols not allowed in MH_DYLIB files
3603698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3604698f425bSmrg      ;;
3605698f425bSmrg    *djgpp*)
3606698f425bSmrg      # DJGPP does not support shared libraries at all
3607698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3608698f425bSmrg      ;;
3609698f425bSmrg    interix[[3-9]]*)
3610698f425bSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3611698f425bSmrg      # Instead, we relocate shared libraries at runtime.
3612698f425bSmrg      ;;
3613698f425bSmrg    sysv4*MP*)
3614698f425bSmrg      if test -d /usr/nec; then
3615698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3616698f425bSmrg      fi
3617698f425bSmrg      ;;
3618698f425bSmrg    hpux*)
3619698f425bSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3620698f425bSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3621698f425bSmrg      # sets the default TLS model and affects inlining.
3622698f425bSmrg      case $host_cpu in
3623698f425bSmrg      hppa*64*)
3624c5629e66Smrg	;;
3625c5629e66Smrg      *)
3626698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3627c5629e66Smrg	;;
3628698f425bSmrg      esac
3629698f425bSmrg      ;;
3630698f425bSmrg    *qnx* | *nto*)
3631698f425bSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
3632698f425bSmrg      # it will coredump.
3633698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3634698f425bSmrg      ;;
3635698f425bSmrg    *)
3636698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3637698f425bSmrg      ;;
3638c5629e66Smrg    esac
3639698f425bSmrg  else
3640698f425bSmrg    case $host_os in
3641698f425bSmrg      aix[[4-9]]*)
3642698f425bSmrg	# All AIX code is PIC.
3643698f425bSmrg	if test "$host_cpu" = ia64; then
3644698f425bSmrg	  # AIX 5 now supports IA64 processor
3645698f425bSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3646698f425bSmrg	else
3647698f425bSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3648c5629e66Smrg	fi
3649c5629e66Smrg	;;
3650698f425bSmrg      chorus*)
3651698f425bSmrg	case $cc_basename in
3652698f425bSmrg	cxch68*)
3653698f425bSmrg	  # Green Hills C++ Compiler
3654698f425bSmrg	  # _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"
3655c5629e66Smrg	  ;;
3656c5629e66Smrg	esac
3657c5629e66Smrg	;;
3658698f425bSmrg      dgux*)
3659698f425bSmrg	case $cc_basename in
3660698f425bSmrg	  ec++*)
3661698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3662698f425bSmrg	    ;;
3663698f425bSmrg	  ghcx*)
3664698f425bSmrg	    # Green Hills C++ Compiler
3665698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3666698f425bSmrg	    ;;
3667698f425bSmrg	  *)
3668698f425bSmrg	    ;;
3669c5629e66Smrg	esac
3670c5629e66Smrg	;;
3671698f425bSmrg      freebsd* | dragonfly*)
3672698f425bSmrg	# FreeBSD uses GNU C++
3673266e564dSmrg	;;
3674698f425bSmrg      hpux9* | hpux10* | hpux11*)
3675698f425bSmrg	case $cc_basename in
3676698f425bSmrg	  CC*)
3677698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3678698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3679698f425bSmrg	    if test "$host_cpu" != ia64; then
3680698f425bSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3681698f425bSmrg	    fi
3682698f425bSmrg	    ;;
3683698f425bSmrg	  aCC*)
3684698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3685698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3686698f425bSmrg	    case $host_cpu in
3687698f425bSmrg	    hppa*64*|ia64*)
3688698f425bSmrg	      # +Z the default
3689698f425bSmrg	      ;;
3690698f425bSmrg	    *)
3691698f425bSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3692698f425bSmrg	      ;;
3693698f425bSmrg	    esac
3694698f425bSmrg	    ;;
3695698f425bSmrg	  *)
3696698f425bSmrg	    ;;
3697698f425bSmrg	esac
3698266e564dSmrg	;;
3699698f425bSmrg      interix*)
3700698f425bSmrg	# This is c89, which is MS Visual C++ (no shared libs)
3701698f425bSmrg	# Anyone wants to do a port?
3702c5629e66Smrg	;;
3703698f425bSmrg      irix5* | irix6* | nonstopux*)
3704698f425bSmrg	case $cc_basename in
3705698f425bSmrg	  CC*)
3706698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3707698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3708698f425bSmrg	    # CC pic flag -KPIC is the default.
3709698f425bSmrg	    ;;
3710698f425bSmrg	  *)
3711698f425bSmrg	    ;;
3712698f425bSmrg	esac
3713c5629e66Smrg	;;
3714698f425bSmrg      linux* | k*bsd*-gnu)
3715698f425bSmrg	case $cc_basename in
3716698f425bSmrg	  KCC*)
3717698f425bSmrg	    # KAI C++ Compiler
3718698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3719698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3720698f425bSmrg	    ;;
3721698f425bSmrg	  ecpc* )
3722698f425bSmrg	    # old Intel C++ for x86_64 which still supported -KPIC.
3723698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3724698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3725698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3726698f425bSmrg	    ;;
3727698f425bSmrg	  icpc* )
3728698f425bSmrg	    # Intel C++, used to be incompatible with GCC.
3729698f425bSmrg	    # ICC 10 doesn't accept -KPIC any more.
3730698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3731698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3732698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3733698f425bSmrg	    ;;
3734698f425bSmrg	  pgCC* | pgcpp*)
3735698f425bSmrg	    # Portland Group C++ compiler
3736698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3737698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3738698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3739698f425bSmrg	    ;;
3740698f425bSmrg	  cxx*)
3741698f425bSmrg	    # Compaq C++
3742698f425bSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
3743698f425bSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
3744698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3745698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3746698f425bSmrg	    ;;
3747698f425bSmrg	  xlc* | xlC*)
3748698f425bSmrg	    # IBM XL 8.0 on PPC
3749698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3750698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3751698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3752698f425bSmrg	    ;;
3753698f425bSmrg	  *)
3754698f425bSmrg	    case `$CC -V 2>&1 | sed 5q` in
3755698f425bSmrg	    *Sun\ C*)
3756698f425bSmrg	      # Sun C++ 5.9
3757698f425bSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3758698f425bSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3759698f425bSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3760698f425bSmrg	      ;;
3761698f425bSmrg	    esac
3762698f425bSmrg	    ;;
3763698f425bSmrg	esac
3764c5629e66Smrg	;;
3765698f425bSmrg      lynxos*)
3766c5629e66Smrg	;;
3767698f425bSmrg      m88k*)
3768c5629e66Smrg	;;
3769698f425bSmrg      mvs*)
3770698f425bSmrg	case $cc_basename in
3771698f425bSmrg	  cxx*)
3772698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3773698f425bSmrg	    ;;
3774698f425bSmrg	  *)
3775698f425bSmrg	    ;;
3776698f425bSmrg	esac
3777c5629e66Smrg	;;
3778698f425bSmrg      netbsd*)
3779c5629e66Smrg	;;
3780698f425bSmrg      *qnx* | *nto*)
3781698f425bSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
3782698f425bSmrg        # it will coredump.
3783698f425bSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3784698f425bSmrg        ;;
3785698f425bSmrg      osf3* | osf4* | osf5*)
3786698f425bSmrg	case $cc_basename in
3787698f425bSmrg	  KCC*)
3788698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3789698f425bSmrg	    ;;
3790698f425bSmrg	  RCC*)
3791698f425bSmrg	    # Rational C++ 2.4.1
3792698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3793698f425bSmrg	    ;;
3794698f425bSmrg	  cxx*)
3795698f425bSmrg	    # Digital/Compaq C++
3796698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3797698f425bSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
3798698f425bSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
3799698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3800698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3801698f425bSmrg	    ;;
3802698f425bSmrg	  *)
3803698f425bSmrg	    ;;
3804698f425bSmrg	esac
3805c5629e66Smrg	;;
3806698f425bSmrg      psos*)
3807c5629e66Smrg	;;
3808698f425bSmrg      solaris*)
3809698f425bSmrg	case $cc_basename in
3810698f425bSmrg	  CC*)
3811698f425bSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
3812698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3813698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3814698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3815698f425bSmrg	    ;;
3816698f425bSmrg	  gcx*)
3817698f425bSmrg	    # Green Hills C++ Compiler
3818698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3819698f425bSmrg	    ;;
3820698f425bSmrg	  *)
3821698f425bSmrg	    ;;
3822698f425bSmrg	esac
3823c5629e66Smrg	;;
3824698f425bSmrg      sunos4*)
3825698f425bSmrg	case $cc_basename in
3826698f425bSmrg	  CC*)
3827698f425bSmrg	    # Sun C++ 4.x
3828698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3829698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3830698f425bSmrg	    ;;
3831698f425bSmrg	  lcc*)
3832698f425bSmrg	    # Lucid
3833698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3834698f425bSmrg	    ;;
3835698f425bSmrg	  *)
3836698f425bSmrg	    ;;
3837698f425bSmrg	esac
3838c5629e66Smrg	;;
3839698f425bSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3840698f425bSmrg	case $cc_basename in
3841698f425bSmrg	  CC*)
3842698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3843698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3844698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3845698f425bSmrg	    ;;
3846698f425bSmrg	esac
3847698f425bSmrg	;;
3848698f425bSmrg      tandem*)
3849698f425bSmrg	case $cc_basename in
3850698f425bSmrg	  NCC*)
3851698f425bSmrg	    # NonStop-UX NCC 3.20
3852698f425bSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3853698f425bSmrg	    ;;
3854266e564dSmrg	  *)
3855266e564dSmrg	    ;;
3856266e564dSmrg	esac
3857c5629e66Smrg	;;
3858698f425bSmrg      vxworks*)
3859c5629e66Smrg	;;
3860c5629e66Smrg      *)
3861698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3862698f425bSmrg	;;
3863698f425bSmrg    esac
3864698f425bSmrg  fi
3865698f425bSmrg],
3866698f425bSmrg[
3867698f425bSmrg  if test "$GCC" = yes; then
3868698f425bSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3869698f425bSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3870266e564dSmrg
3871698f425bSmrg    case $host_os in
3872698f425bSmrg      aix*)
3873698f425bSmrg      # All AIX code is PIC.
3874698f425bSmrg      if test "$host_cpu" = ia64; then
3875698f425bSmrg	# AIX 5 now supports IA64 processor
3876698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3877698f425bSmrg      fi
3878698f425bSmrg      ;;
3879266e564dSmrg
3880698f425bSmrg    amigaos*)
3881698f425bSmrg      case $host_cpu in
3882698f425bSmrg      powerpc)
3883698f425bSmrg            # see comment about AmigaOS4 .so support
3884698f425bSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3885698f425bSmrg        ;;
3886698f425bSmrg      m68k)
3887698f425bSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
3888698f425bSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
3889698f425bSmrg            # like `-m68040'.
3890698f425bSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3891698f425bSmrg        ;;
3892698f425bSmrg      esac
3893698f425bSmrg      ;;
3894266e564dSmrg
3895698f425bSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3896698f425bSmrg      # PIC is the default for these OSes.
3897698f425bSmrg      ;;
3898698f425bSmrg
3899698f425bSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
3900698f425bSmrg      # This hack is so that the source file can tell whether it is being
3901698f425bSmrg      # built for inclusion in a dll (and should export symbols for example).
3902698f425bSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
3903698f425bSmrg      # (--disable-auto-import) libraries
3904698f425bSmrg      m4_if([$1], [GCJ], [],
3905698f425bSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3906698f425bSmrg      ;;
3907698f425bSmrg
3908698f425bSmrg    darwin* | rhapsody*)
3909698f425bSmrg      # PIC is the default on this platform
3910698f425bSmrg      # Common symbols not allowed in MH_DYLIB files
3911698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3912698f425bSmrg      ;;
3913698f425bSmrg
3914698f425bSmrg    hpux*)
3915698f425bSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
3916698f425bSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
3917698f425bSmrg      # sets the default TLS model and affects inlining.
3918698f425bSmrg      case $host_cpu in
3919698f425bSmrg      hppa*64*)
3920698f425bSmrg	# +Z the default
3921c5629e66Smrg	;;
3922c5629e66Smrg      *)
3923698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3924c5629e66Smrg	;;
3925698f425bSmrg      esac
3926698f425bSmrg      ;;
3927698f425bSmrg
3928698f425bSmrg    interix[[3-9]]*)
3929698f425bSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3930698f425bSmrg      # Instead, we relocate shared libraries at runtime.
3931698f425bSmrg      ;;
3932698f425bSmrg
3933698f425bSmrg    msdosdjgpp*)
3934698f425bSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
3935698f425bSmrg      # on systems that don't support them.
3936698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3937698f425bSmrg      enable_shared=no
3938698f425bSmrg      ;;
3939698f425bSmrg
3940698f425bSmrg    *nto* | *qnx*)
3941698f425bSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
3942698f425bSmrg      # it will coredump.
3943698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3944698f425bSmrg      ;;
3945698f425bSmrg
3946698f425bSmrg    sysv4*MP*)
3947698f425bSmrg      if test -d /usr/nec; then
3948698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3949698f425bSmrg      fi
3950698f425bSmrg      ;;
3951698f425bSmrg
3952698f425bSmrg    *)
3953698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3954698f425bSmrg      ;;
3955c5629e66Smrg    esac
3956698f425bSmrg  else
3957698f425bSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
3958698f425bSmrg    case $host_os in
3959698f425bSmrg    aix*)
3960698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3961698f425bSmrg      if test "$host_cpu" = ia64; then
3962698f425bSmrg	# AIX 5 now supports IA64 processor
3963698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3964698f425bSmrg      else
3965698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3966698f425bSmrg      fi
3967698f425bSmrg      ;;
3968698f425bSmrg
3969698f425bSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
3970698f425bSmrg      # This hack is so that the source file can tell whether it is being
3971698f425bSmrg      # built for inclusion in a dll (and should export symbols for example).
3972698f425bSmrg      m4_if([$1], [GCJ], [],
3973698f425bSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3974698f425bSmrg      ;;
3975698f425bSmrg
3976698f425bSmrg    hpux9* | hpux10* | hpux11*)
3977698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3978698f425bSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3979698f425bSmrg      # not for PA HP-UX.
3980698f425bSmrg      case $host_cpu in
3981698f425bSmrg      hppa*64*|ia64*)
3982698f425bSmrg	# +Z the default
3983c5629e66Smrg	;;
3984c5629e66Smrg      *)
3985698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3986c5629e66Smrg	;;
3987698f425bSmrg      esac
3988698f425bSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
3989698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3990698f425bSmrg      ;;
3991698f425bSmrg
3992698f425bSmrg    irix5* | irix6* | nonstopux*)
3993698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3994698f425bSmrg      # PIC (with -KPIC) is the default.
3995698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3996698f425bSmrg      ;;
3997698f425bSmrg
3998698f425bSmrg    linux* | k*bsd*-gnu)
3999698f425bSmrg      case $cc_basename in
4000698f425bSmrg      # old Intel for x86_64 which still supported -KPIC.
4001698f425bSmrg      ecc*)
4002698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4003698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4004698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4005698f425bSmrg        ;;
4006698f425bSmrg      # icc used to be incompatible with GCC.
4007698f425bSmrg      # ICC 10 doesn't accept -KPIC any more.
4008698f425bSmrg      icc* | ifort*)
4009698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4010698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4011698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4012698f425bSmrg        ;;
4013698f425bSmrg      # Lahey Fortran 8.1.
4014698f425bSmrg      lf95*)
4015698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4016698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4017698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4018698f425bSmrg	;;
4019698f425bSmrg      pgcc* | pgf77* | pgf90* | pgf95*)
4020698f425bSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
4021698f425bSmrg	# which looks to be a dead project)
4022698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4023698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4024698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4025698f425bSmrg        ;;
4026698f425bSmrg      ccc*)
4027698f425bSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4028698f425bSmrg        # All Alpha code is PIC.
4029698f425bSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4030698f425bSmrg        ;;
4031698f425bSmrg      xl*)
4032698f425bSmrg	# IBM XL C 8.0/Fortran 10.1 on PPC
4033698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4034698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4035698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4036c5629e66Smrg	;;
4037c5629e66Smrg      *)
4038698f425bSmrg	case `$CC -V 2>&1 | sed 5q` in
4039698f425bSmrg	*Sun\ C*)
4040698f425bSmrg	  # Sun C 5.9
4041698f425bSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4042698f425bSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4043698f425bSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4044698f425bSmrg	  ;;
4045698f425bSmrg	*Sun\ F*)
4046698f425bSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4047698f425bSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4048698f425bSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4049698f425bSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4050698f425bSmrg	  ;;
4051698f425bSmrg	esac
4052c5629e66Smrg	;;
4053698f425bSmrg      esac
4054698f425bSmrg      ;;
4055266e564dSmrg
4056698f425bSmrg    newsos6)
4057698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4058698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4059698f425bSmrg      ;;
4060266e564dSmrg
4061698f425bSmrg    *nto* | *qnx*)
4062698f425bSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
4063698f425bSmrg      # it will coredump.
4064698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4065698f425bSmrg      ;;
4066266e564dSmrg
4067698f425bSmrg    osf3* | osf4* | osf5*)
4068698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4069698f425bSmrg      # All OSF/1 code is PIC.
4070698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4071698f425bSmrg      ;;
4072c5629e66Smrg
4073698f425bSmrg    rdos*)
4074698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4075698f425bSmrg      ;;
4076c5629e66Smrg
4077698f425bSmrg    solaris*)
4078698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4079698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4080698f425bSmrg      case $cc_basename in
4081698f425bSmrg      f77* | f90* | f95*)
4082698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4083698f425bSmrg      *)
4084698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4085698f425bSmrg      esac
4086698f425bSmrg      ;;
4087c5629e66Smrg
4088698f425bSmrg    sunos4*)
4089698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4090698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4091698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4092698f425bSmrg      ;;
4093c5629e66Smrg
4094698f425bSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
4095698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4096698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4097698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4098698f425bSmrg      ;;
4099c5629e66Smrg
4100698f425bSmrg    sysv4*MP*)
4101698f425bSmrg      if test -d /usr/nec ;then
4102698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4103698f425bSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4104698f425bSmrg      fi
4105698f425bSmrg      ;;
4106c5629e66Smrg
4107698f425bSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4108698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4109698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4110698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4111698f425bSmrg      ;;
4112c5629e66Smrg
4113698f425bSmrg    unicos*)
4114698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4115698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4116698f425bSmrg      ;;
4117c5629e66Smrg
4118698f425bSmrg    uts4*)
4119698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4120698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4121698f425bSmrg      ;;
4122c5629e66Smrg
4123698f425bSmrg    *)
4124698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4125698f425bSmrg      ;;
4126c5629e66Smrg    esac
4127698f425bSmrg  fi
4128698f425bSmrg])
4129698f425bSmrgcase $host_os in
4130698f425bSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
4131698f425bSmrg  *djgpp*)
4132698f425bSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4133698f425bSmrg    ;;
4134698f425bSmrg  *)
4135698f425bSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4136698f425bSmrg    ;;
4137698f425bSmrgesac
4138698f425bSmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4139698f425bSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4140698f425bSmrg	[How to pass a linker flag through the compiler])
4141c5629e66Smrg
4142698f425bSmrg#
4143698f425bSmrg# Check to make sure the PIC flag actually works.
4144698f425bSmrg#
4145698f425bSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4146698f425bSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4147698f425bSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4148698f425bSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4149698f425bSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4150698f425bSmrg     "" | " "*) ;;
4151698f425bSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4152698f425bSmrg     esac],
4153698f425bSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4154698f425bSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4155c5629e66Smrgfi
4156698f425bSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4157698f425bSmrg	[Additional compiler flags for building library objects])
4158c5629e66Smrg
4159698f425bSmrg#
4160698f425bSmrg# Check to make sure the static flag actually works.
4161698f425bSmrg#
4162698f425bSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4163698f425bSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4164698f425bSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4165698f425bSmrg  $lt_tmp_static_flag,
4166698f425bSmrg  [],
4167698f425bSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4168698f425bSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4169698f425bSmrg	[Compiler flag to prevent dynamic linking])
4170698f425bSmrg])# _LT_COMPILER_PIC
4171c5629e66Smrg
4172c5629e66Smrg
4173698f425bSmrg# _LT_LINKER_SHLIBS([TAGNAME])
4174698f425bSmrg# ----------------------------
4175698f425bSmrg# See if the linker supports building shared libraries.
4176698f425bSmrgm4_defun([_LT_LINKER_SHLIBS],
4177698f425bSmrg[AC_REQUIRE([LT_PATH_LD])dnl
4178698f425bSmrgAC_REQUIRE([LT_PATH_NM])dnl
4179698f425bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4180698f425bSmrgm4_require([_LT_DECL_EGREP])dnl
4181698f425bSmrgm4_require([_LT_DECL_SED])dnl
4182698f425bSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4183698f425bSmrgm4_require([_LT_TAG_COMPILER])dnl
4184698f425bSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4185698f425bSmrgm4_if([$1], [CXX], [
4186698f425bSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4187698f425bSmrg  case $host_os in
4188698f425bSmrg  aix[[4-9]]*)
4189698f425bSmrg    # If we're using GNU nm, then we don't want the "-C" option.
4190698f425bSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4191698f425bSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4192698f425bSmrg      _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'
4193698f425bSmrg    else
4194698f425bSmrg      _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'
4195c5629e66Smrg    fi
4196c5629e66Smrg    ;;
4197698f425bSmrg  pw32*)
4198698f425bSmrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4199c5629e66Smrg  ;;
4200698f425bSmrg  cygwin* | mingw* | cegcc*)
4201698f425bSmrg    _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'
4202698f425bSmrg  ;;
4203698f425bSmrg  *)
4204698f425bSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4205698f425bSmrg  ;;
4206698f425bSmrg  esac
4207698f425bSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4208698f425bSmrg], [
4209698f425bSmrg  runpath_var=
4210698f425bSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
4211698f425bSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
4212698f425bSmrg  _LT_TAGVAR(archive_cmds, $1)=
4213698f425bSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
4214698f425bSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
4215698f425bSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4216698f425bSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4217698f425bSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4218698f425bSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
4219698f425bSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
4220698f425bSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4221698f425bSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4222698f425bSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4223698f425bSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4224698f425bSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
4225698f425bSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4226698f425bSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
4227698f425bSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4228698f425bSmrg  _LT_TAGVAR(module_cmds, $1)=
4229698f425bSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
4230698f425bSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4231698f425bSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4232698f425bSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4233698f425bSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4234698f425bSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
4235698f425bSmrg  # included in the symbol list
4236698f425bSmrg  _LT_TAGVAR(include_expsyms, $1)=
4237698f425bSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
4238698f425bSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4239698f425bSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4240698f425bSmrg  # as well as any symbol that contains `d'.
4241698f425bSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4242698f425bSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4243698f425bSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
4244698f425bSmrg  # the symbol is explicitly referenced.  Since portable code cannot
4245698f425bSmrg  # rely on this symbol name, it's probably fine to never include it in
4246698f425bSmrg  # preloaded symbol tables.
4247698f425bSmrg  # Exclude shared library initialization/finalization symbols.
4248698f425bSmrgdnl Note also adjust exclude_expsyms for C++ above.
4249698f425bSmrg  extract_expsyms_cmds=
4250c5629e66Smrg
4251698f425bSmrg  case $host_os in
4252698f425bSmrg  cygwin* | mingw* | pw32* | cegcc*)
4253698f425bSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4254698f425bSmrg    # When not using gcc, we currently assume that we are using
4255698f425bSmrg    # Microsoft Visual C++.
4256698f425bSmrg    if test "$GCC" != yes; then
4257698f425bSmrg      with_gnu_ld=no
4258c5629e66Smrg    fi
4259c5629e66Smrg    ;;
4260698f425bSmrg  interix*)
4261698f425bSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
4262698f425bSmrg    with_gnu_ld=yes
4263698f425bSmrg    ;;
4264698f425bSmrg  openbsd*)
4265698f425bSmrg    with_gnu_ld=no
4266698f425bSmrg    ;;
4267c5629e66Smrg  esac
4268c5629e66Smrg
4269698f425bSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
4270698f425bSmrg  if test "$with_gnu_ld" = yes; then
4271698f425bSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
4272698f425bSmrg    wlarc='${wl}'
4273266e564dSmrg
4274698f425bSmrg    # Set some defaults for GNU ld with shared library support. These
4275698f425bSmrg    # are reset later if shared libraries are not supported. Putting them
4276698f425bSmrg    # here allows them to be overridden if necessary.
4277698f425bSmrg    runpath_var=LD_RUN_PATH
4278698f425bSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4279698f425bSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4280698f425bSmrg    # ancient GNU ld didn't support --whole-archive et. al.
4281698f425bSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4282698f425bSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4283698f425bSmrg    else
4284698f425bSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4285698f425bSmrg    fi
4286698f425bSmrg    supports_anon_versioning=no
4287698f425bSmrg    case `$LD -v 2>&1` in
4288698f425bSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4289698f425bSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4290698f425bSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4291698f425bSmrg      *\ 2.11.*) ;; # other 2.11 versions
4292698f425bSmrg      *) supports_anon_versioning=yes ;;
4293698f425bSmrg    esac
4294266e564dSmrg
4295698f425bSmrg    # See if GNU ld supports shared libraries.
4296698f425bSmrg    case $host_os in
4297698f425bSmrg    aix[[3-9]]*)
4298698f425bSmrg      # On AIX/PPC, the GNU linker is very broken
4299698f425bSmrg      if test "$host_cpu" != ia64; then
4300698f425bSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4301698f425bSmrg	cat <<_LT_EOF 1>&2
4302266e564dSmrg
4303698f425bSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
4304698f425bSmrg*** to be unable to reliably create shared libraries on AIX.
4305698f425bSmrg*** Therefore, libtool is disabling shared libraries support.  If you
4306698f425bSmrg*** really care for shared libraries, you may want to modify your PATH
4307698f425bSmrg*** so that a non-GNU linker is found, and then restart.
4308266e564dSmrg
4309698f425bSmrg_LT_EOF
4310698f425bSmrg      fi
4311698f425bSmrg      ;;
4312266e564dSmrg
4313698f425bSmrg    amigaos*)
4314698f425bSmrg      case $host_cpu in
4315698f425bSmrg      powerpc)
4316698f425bSmrg            # see comment about AmigaOS4 .so support
4317698f425bSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4318698f425bSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4319698f425bSmrg        ;;
4320698f425bSmrg      m68k)
4321698f425bSmrg            _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)'
4322698f425bSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4323698f425bSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4324698f425bSmrg        ;;
4325698f425bSmrg      esac
4326698f425bSmrg      ;;
4327266e564dSmrg
4328698f425bSmrg    beos*)
4329698f425bSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4330698f425bSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4331698f425bSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4332698f425bSmrg	# support --undefined.  This deserves some investigation.  FIXME
4333698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4334698f425bSmrg      else
4335698f425bSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4336698f425bSmrg      fi
4337698f425bSmrg      ;;
4338266e564dSmrg
4339698f425bSmrg    cygwin* | mingw* | pw32* | cegcc*)
4340698f425bSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4341698f425bSmrg      # as there is no search path for DLLs.
4342698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4343698f425bSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4344698f425bSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
4345698f425bSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4346698f425bSmrg      _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'
4347698f425bSmrg
4348698f425bSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4349698f425bSmrg        _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'
4350698f425bSmrg	# If the export-symbols file already is a .def file (1st line
4351698f425bSmrg	# is EXPORTS), use it as is; otherwise, prepend...
4352698f425bSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4353698f425bSmrg	  cp $export_symbols $output_objdir/$soname.def;
4354698f425bSmrg	else
4355698f425bSmrg	  echo EXPORTS > $output_objdir/$soname.def;
4356698f425bSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
4357698f425bSmrg	fi~
4358698f425bSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4359698f425bSmrg      else
4360698f425bSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4361698f425bSmrg      fi
4362698f425bSmrg      ;;
4363266e564dSmrg
4364698f425bSmrg    interix[[3-9]]*)
4365698f425bSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
4366698f425bSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4367698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4368698f425bSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4369698f425bSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4370698f425bSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
4371698f425bSmrg      # default) and relocated if they conflict, which is a slow very memory
4372698f425bSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
4373698f425bSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4374698f425bSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4375698f425bSmrg      _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'
4376698f425bSmrg      _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'
4377698f425bSmrg      ;;
4378266e564dSmrg
4379698f425bSmrg    gnu* | linux* | tpf* | k*bsd*-gnu)
4380698f425bSmrg      tmp_diet=no
4381698f425bSmrg      if test "$host_os" = linux-dietlibc; then
4382698f425bSmrg	case $cc_basename in
4383698f425bSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
4384698f425bSmrg	esac
4385698f425bSmrg      fi
4386698f425bSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4387698f425bSmrg	 && test "$tmp_diet" = no
4388698f425bSmrg      then
4389698f425bSmrg	tmp_addflag=
4390698f425bSmrg	tmp_sharedflag='-shared'
4391698f425bSmrg	case $cc_basename,$host_cpu in
4392698f425bSmrg        pgcc*)				# Portland Group C compiler
4393698f425bSmrg	  _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'
4394698f425bSmrg	  tmp_addflag=' $pic_flag'
4395698f425bSmrg	  ;;
4396698f425bSmrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
4397698f425bSmrg	  _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'
4398698f425bSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
4399698f425bSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
4400698f425bSmrg	  tmp_addflag=' -i_dynamic' ;;
4401698f425bSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
4402698f425bSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
4403698f425bSmrg	ifc* | ifort*)			# Intel Fortran compiler
4404698f425bSmrg	  tmp_addflag=' -nofor_main' ;;
4405698f425bSmrg	lf95*)				# Lahey Fortran 8.1
4406698f425bSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4407698f425bSmrg	  tmp_sharedflag='--shared' ;;
4408698f425bSmrg	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
4409698f425bSmrg	  tmp_sharedflag='-qmkshrobj'
4410698f425bSmrg	  tmp_addflag= ;;
4411698f425bSmrg	esac
4412698f425bSmrg	case `$CC -V 2>&1 | sed 5q` in
4413698f425bSmrg	*Sun\ C*)			# Sun C 5.9
4414698f425bSmrg	  _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'
4415698f425bSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4416698f425bSmrg	  tmp_sharedflag='-G' ;;
4417698f425bSmrg	*Sun\ F*)			# Sun Fortran 8.3
4418698f425bSmrg	  tmp_sharedflag='-G' ;;
4419698f425bSmrg	esac
4420698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4421266e564dSmrg
4422698f425bSmrg        if test "x$supports_anon_versioning" = xyes; then
4423698f425bSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4424698f425bSmrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4425698f425bSmrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
4426698f425bSmrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4427698f425bSmrg        fi
4428266e564dSmrg
4429698f425bSmrg	case $cc_basename in
4430698f425bSmrg	xlf*)
4431698f425bSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4432698f425bSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4433698f425bSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4434698f425bSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4435698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4436698f425bSmrg	  if test "x$supports_anon_versioning" = xyes; then
4437698f425bSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4438698f425bSmrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4439698f425bSmrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
4440698f425bSmrg	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4441698f425bSmrg	  fi
4442698f425bSmrg	  ;;
4443698f425bSmrg	esac
4444698f425bSmrg      else
4445698f425bSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
4446698f425bSmrg      fi
4447698f425bSmrg      ;;
4448266e564dSmrg
4449698f425bSmrg    netbsd*)
4450698f425bSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4451698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4452698f425bSmrg	wlarc=
4453698f425bSmrg      else
4454698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4455698f425bSmrg	_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'
4456698f425bSmrg      fi
4457698f425bSmrg      ;;
4458266e564dSmrg
4459698f425bSmrg    solaris*)
4460698f425bSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4461698f425bSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4462698f425bSmrg	cat <<_LT_EOF 1>&2
4463266e564dSmrg
4464698f425bSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4465698f425bSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
4466698f425bSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
4467698f425bSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
4468698f425bSmrg*** your PATH or compiler configuration so that the native linker is
4469698f425bSmrg*** used, and then restart.
4470266e564dSmrg
4471698f425bSmrg_LT_EOF
4472698f425bSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4473698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4474698f425bSmrg	_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'
4475698f425bSmrg      else
4476698f425bSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4477698f425bSmrg      fi
4478698f425bSmrg      ;;
4479266e564dSmrg
4480698f425bSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4481698f425bSmrg      case `$LD -v 2>&1` in
4482698f425bSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4483698f425bSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4484698f425bSmrg	cat <<_LT_EOF 1>&2
4485266e564dSmrg
4486698f425bSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4487698f425bSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
4488698f425bSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
4489698f425bSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
4490698f425bSmrg*** your PATH or compiler configuration so that the native linker is
4491698f425bSmrg*** used, and then restart.
4492266e564dSmrg
4493698f425bSmrg_LT_EOF
4494698f425bSmrg	;;
4495698f425bSmrg	*)
4496698f425bSmrg	  # For security reasons, it is highly recommended that you always
4497698f425bSmrg	  # use absolute paths for naming shared libraries, and exclude the
4498698f425bSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
4499698f425bSmrg	  # requires that you compile everything twice, which is a pain.
4500698f425bSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4501698f425bSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4502698f425bSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4503698f425bSmrg	    _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'
4504698f425bSmrg	  else
4505698f425bSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
4506698f425bSmrg	  fi
4507698f425bSmrg	;;
4508698f425bSmrg      esac
4509698f425bSmrg      ;;
4510266e564dSmrg
4511698f425bSmrg    sunos4*)
4512698f425bSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4513698f425bSmrg      wlarc=
4514698f425bSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4515698f425bSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4516698f425bSmrg      ;;
4517266e564dSmrg
4518698f425bSmrg    *)
4519698f425bSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4520698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4521698f425bSmrg	_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'
4522698f425bSmrg      else
4523698f425bSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4524698f425bSmrg      fi
4525698f425bSmrg      ;;
4526698f425bSmrg    esac
4527266e564dSmrg
4528698f425bSmrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4529698f425bSmrg      runpath_var=
4530698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4531698f425bSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4532698f425bSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4533698f425bSmrg    fi
4534698f425bSmrg  else
4535698f425bSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
4536698f425bSmrg    case $host_os in
4537698f425bSmrg    aix3*)
4538698f425bSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4539698f425bSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
4540698f425bSmrg      _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'
4541698f425bSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
4542698f425bSmrg      # are no directories specified by -L.
4543698f425bSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4544698f425bSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4545698f425bSmrg	# Neither direct hardcoding nor static linking is supported with a
4546698f425bSmrg	# broken collect2.
4547698f425bSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
4548698f425bSmrg      fi
4549698f425bSmrg      ;;
4550266e564dSmrg
4551698f425bSmrg    aix[[4-9]]*)
4552698f425bSmrg      if test "$host_cpu" = ia64; then
4553698f425bSmrg	# On IA64, the linker does run time linking by default, so we don't
4554698f425bSmrg	# have to do anything special.
4555698f425bSmrg	aix_use_runtimelinking=no
4556698f425bSmrg	exp_sym_flag='-Bexport'
4557698f425bSmrg	no_entry_flag=""
4558698f425bSmrg      else
4559698f425bSmrg	# If we're using GNU nm, then we don't want the "-C" option.
4560698f425bSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
4561698f425bSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4562698f425bSmrg	  _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'
4563698f425bSmrg	else
4564698f425bSmrg	  _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'
4565698f425bSmrg	fi
4566698f425bSmrg	aix_use_runtimelinking=no
4567266e564dSmrg
4568698f425bSmrg	# Test if we are trying to use run time linking or normal
4569698f425bSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
4570698f425bSmrg	# need to do runtime linking.
4571698f425bSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4572698f425bSmrg	  for ld_flag in $LDFLAGS; do
4573698f425bSmrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4574698f425bSmrg	    aix_use_runtimelinking=yes
4575698f425bSmrg	    break
4576698f425bSmrg	  fi
4577698f425bSmrg	  done
4578698f425bSmrg	  ;;
4579698f425bSmrg	esac
4580266e564dSmrg
4581698f425bSmrg	exp_sym_flag='-bexport'
4582698f425bSmrg	no_entry_flag='-bnoentry'
4583698f425bSmrg      fi
4584698f425bSmrg
4585698f425bSmrg      # When large executables or shared objects are built, AIX ld can
4586698f425bSmrg      # have problems creating the table of contents.  If linking a library
4587698f425bSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
4588698f425bSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4589698f425bSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4590266e564dSmrg
4591698f425bSmrg      _LT_TAGVAR(archive_cmds, $1)=''
4592698f425bSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4593698f425bSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4594698f425bSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4595698f425bSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4596698f425bSmrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4597266e564dSmrg
4598698f425bSmrg      if test "$GCC" = yes; then
4599698f425bSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
4600698f425bSmrg	# We only want to do this on AIX 4.2 and lower, the check
4601698f425bSmrg	# below for broken collect2 doesn't work under 4.3+
4602698f425bSmrg	  collect2name=`${CC} -print-prog-name=collect2`
4603698f425bSmrg	  if test -f "$collect2name" &&
4604698f425bSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4605698f425bSmrg	  then
4606698f425bSmrg	  # We have reworked collect2
4607698f425bSmrg	  :
4608698f425bSmrg	  else
4609698f425bSmrg	  # We have old collect2
4610698f425bSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
4611698f425bSmrg	  # It fails to find uninstalled libraries when the uninstalled
4612698f425bSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
4613698f425bSmrg	  # to unsupported forces relinking
4614698f425bSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4615698f425bSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4616698f425bSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4617698f425bSmrg	  fi
4618698f425bSmrg	  ;;
4619698f425bSmrg	esac
4620698f425bSmrg	shared_flag='-shared'
4621698f425bSmrg	if test "$aix_use_runtimelinking" = yes; then
4622698f425bSmrg	  shared_flag="$shared_flag "'${wl}-G'
4623698f425bSmrg	fi
4624698f425bSmrg      else
4625698f425bSmrg	# not using gcc
4626698f425bSmrg	if test "$host_cpu" = ia64; then
4627698f425bSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4628698f425bSmrg	# chokes on -Wl,-G. The following line is correct:
4629698f425bSmrg	  shared_flag='-G'
4630698f425bSmrg	else
4631698f425bSmrg	  if test "$aix_use_runtimelinking" = yes; then
4632698f425bSmrg	    shared_flag='${wl}-G'
4633698f425bSmrg	  else
4634698f425bSmrg	    shared_flag='${wl}-bM:SRE'
4635698f425bSmrg	  fi
4636698f425bSmrg	fi
4637698f425bSmrg      fi
4638266e564dSmrg
4639698f425bSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
4640698f425bSmrg      # It seems that -bexpall does not export symbols beginning with
4641698f425bSmrg      # underscore (_), so it is better to generate a list of symbols to export.
4642698f425bSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
4643698f425bSmrg      if test "$aix_use_runtimelinking" = yes; then
4644698f425bSmrg	# Warning - without using the other runtime loading flags (-brtl),
4645698f425bSmrg	# -berok will link without error, but may produce a broken library.
4646698f425bSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4647698f425bSmrg        # Determine the default libpath from the value encoded in an
4648698f425bSmrg        # empty executable.
4649698f425bSmrg        _LT_SYS_MODULE_PATH_AIX
4650698f425bSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4651698f425bSmrg        _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"
4652698f425bSmrg      else
4653698f425bSmrg	if test "$host_cpu" = ia64; then
4654698f425bSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4655698f425bSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4656698f425bSmrg	  _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"
4657698f425bSmrg	else
4658698f425bSmrg	 # Determine the default libpath from the value encoded in an
4659698f425bSmrg	 # empty executable.
4660698f425bSmrg	 _LT_SYS_MODULE_PATH_AIX
4661698f425bSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4662698f425bSmrg	  # Warning - without using the other run time loading flags,
4663698f425bSmrg	  # -berok will link without error, but may produce a broken library.
4664698f425bSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4665698f425bSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4666698f425bSmrg	  # Exported symbols can be pulled into shared objects from archives
4667698f425bSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4668698f425bSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4669698f425bSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
4670698f425bSmrg	  _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'
4671698f425bSmrg	fi
4672698f425bSmrg      fi
4673698f425bSmrg      ;;
4674266e564dSmrg
4675698f425bSmrg    amigaos*)
4676698f425bSmrg      case $host_cpu in
4677698f425bSmrg      powerpc)
4678698f425bSmrg            # see comment about AmigaOS4 .so support
4679698f425bSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4680698f425bSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4681698f425bSmrg        ;;
4682698f425bSmrg      m68k)
4683698f425bSmrg            _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)'
4684698f425bSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4685698f425bSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4686698f425bSmrg        ;;
4687698f425bSmrg      esac
4688698f425bSmrg      ;;
4689266e564dSmrg
4690698f425bSmrg    bsdi[[45]]*)
4691698f425bSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4692698f425bSmrg      ;;
4693266e564dSmrg
4694698f425bSmrg    cygwin* | mingw* | pw32* | cegcc*)
4695698f425bSmrg      # When not using gcc, we currently assume that we are using
4696698f425bSmrg      # Microsoft Visual C++.
4697698f425bSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
4698698f425bSmrg      # no search path for DLLs.
4699698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4700698f425bSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4701698f425bSmrg      # Tell ltmain to make .lib files, not .a files.
4702698f425bSmrg      libext=lib
4703698f425bSmrg      # Tell ltmain to make .dll files, not .so files.
4704698f425bSmrg      shrext_cmds=".dll"
4705698f425bSmrg      # FIXME: Setting linknames here is a bad hack.
4706698f425bSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4707698f425bSmrg      # The linker will automatically build a .lib file if we build a DLL.
4708698f425bSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4709698f425bSmrg      # FIXME: Should let the user specify the lib program.
4710698f425bSmrg      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4711698f425bSmrg      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4712698f425bSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4713698f425bSmrg      ;;
4714c5629e66Smrg
4715698f425bSmrg    darwin* | rhapsody*)
4716698f425bSmrg      _LT_DARWIN_LINKER_FEATURES($1)
4717698f425bSmrg      ;;
4718c5629e66Smrg
4719698f425bSmrg    dgux*)
4720698f425bSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4721698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4722698f425bSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4723698f425bSmrg      ;;
4724c5629e66Smrg
4725698f425bSmrg    freebsd1*)
4726698f425bSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
4727698f425bSmrg      ;;
4728c5629e66Smrg
4729698f425bSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4730698f425bSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
4731698f425bSmrg    # does not break anything, and helps significantly (at the cost of a little
4732698f425bSmrg    # extra space).
4733698f425bSmrg    freebsd2.2*)
4734698f425bSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4735698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4736698f425bSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4737698f425bSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4738698f425bSmrg      ;;
4739c5629e66Smrg
4740698f425bSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4741698f425bSmrg    freebsd2*)
4742698f425bSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4743698f425bSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4744698f425bSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4745698f425bSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4746698f425bSmrg      ;;
4747c5629e66Smrg
4748698f425bSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4749698f425bSmrg    freebsd* | dragonfly*)
4750698f425bSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4751698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4752698f425bSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4753698f425bSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4754698f425bSmrg      ;;
4755c5629e66Smrg
4756698f425bSmrg    hpux9*)
4757698f425bSmrg      if test "$GCC" = yes; then
4758698f425bSmrg	_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'
4759698f425bSmrg      else
4760698f425bSmrg	_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'
4761698f425bSmrg      fi
4762698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4763698f425bSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4764698f425bSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4765c5629e66Smrg
4766698f425bSmrg      # hardcode_minus_L: Not really in the search PATH,
4767698f425bSmrg      # but as the default location of the library.
4768698f425bSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4769698f425bSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4770698f425bSmrg      ;;
4771c5629e66Smrg
4772698f425bSmrg    hpux10*)
4773698f425bSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4774698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4775698f425bSmrg      else
4776698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4777698f425bSmrg      fi
4778698f425bSmrg      if test "$with_gnu_ld" = no; then
4779698f425bSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4780698f425bSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4781698f425bSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
4782698f425bSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
4783698f425bSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4784698f425bSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4785698f425bSmrg	# hardcode_minus_L: Not really in the search PATH,
4786698f425bSmrg	# but as the default location of the library.
4787698f425bSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
4788698f425bSmrg      fi
4789698f425bSmrg      ;;
4790c5629e66Smrg
4791698f425bSmrg    hpux11*)
4792698f425bSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4793698f425bSmrg	case $host_cpu in
4794698f425bSmrg	hppa*64*)
4795698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4796698f425bSmrg	  ;;
4797698f425bSmrg	ia64*)
4798698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4799698f425bSmrg	  ;;
4800698f425bSmrg	*)
4801698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4802698f425bSmrg	  ;;
4803698f425bSmrg	esac
4804698f425bSmrg      else
4805698f425bSmrg	case $host_cpu in
4806698f425bSmrg	hppa*64*)
4807698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4808698f425bSmrg	  ;;
4809698f425bSmrg	ia64*)
4810698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4811698f425bSmrg	  ;;
4812698f425bSmrg	*)
4813698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4814698f425bSmrg	  ;;
4815698f425bSmrg	esac
4816698f425bSmrg      fi
4817698f425bSmrg      if test "$with_gnu_ld" = no; then
4818698f425bSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4819698f425bSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
4820c5629e66Smrg
4821698f425bSmrg	case $host_cpu in
4822698f425bSmrg	hppa*64*|ia64*)
4823698f425bSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
4824698f425bSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4825698f425bSmrg	  ;;
4826698f425bSmrg	*)
4827698f425bSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
4828698f425bSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4829698f425bSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4830698f425bSmrg
4831698f425bSmrg	  # hardcode_minus_L: Not really in the search PATH,
4832698f425bSmrg	  # but as the default location of the library.
4833698f425bSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
4834698f425bSmrg	  ;;
4835698f425bSmrg	esac
4836698f425bSmrg      fi
4837266e564dSmrg      ;;
4838698f425bSmrg
4839698f425bSmrg    irix5* | irix6* | nonstopux*)
4840698f425bSmrg      if test "$GCC" = yes; then
4841698f425bSmrg	_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'
4842698f425bSmrg	# Try to use the -exported_symbol ld option, if it does not
4843698f425bSmrg	# work, assume that -exports_file does not work either and
4844698f425bSmrg	# implicitly export all symbols.
4845698f425bSmrg        save_LDFLAGS="$LDFLAGS"
4846698f425bSmrg        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4847698f425bSmrg        AC_LINK_IFELSE(int foo(void) {},
4848698f425bSmrg          _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'
4849698f425bSmrg        )
4850698f425bSmrg        LDFLAGS="$save_LDFLAGS"
4851698f425bSmrg      else
4852698f425bSmrg	_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'
4853698f425bSmrg	_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'
4854698f425bSmrg      fi
4855698f425bSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4856698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4857698f425bSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4858698f425bSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
4859698f425bSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4860266e564dSmrg      ;;
4861c5629e66Smrg
4862698f425bSmrg    netbsd*)
4863698f425bSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4864698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
4865698f425bSmrg      else
4866698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
4867698f425bSmrg      fi
4868698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4869698f425bSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4870698f425bSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4871698f425bSmrg      ;;
4872266e564dSmrg
4873698f425bSmrg    newsos6)
4874698f425bSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4875698f425bSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
4876698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4877698f425bSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4878698f425bSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4879698f425bSmrg      ;;
4880266e564dSmrg
4881698f425bSmrg    *nto* | *qnx*)
4882698f425bSmrg      ;;
4883266e564dSmrg
4884698f425bSmrg    openbsd*)
4885698f425bSmrg      if test -f /usr/libexec/ld.so; then
4886698f425bSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
4887698f425bSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4888698f425bSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4889698f425bSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4890698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4891698f425bSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4892698f425bSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4893698f425bSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4894698f425bSmrg	else
4895698f425bSmrg	  case $host_os in
4896698f425bSmrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4897698f425bSmrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4898698f425bSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4899698f425bSmrg	     ;;
4900698f425bSmrg	   *)
4901698f425bSmrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4902698f425bSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4903698f425bSmrg	     ;;
4904698f425bSmrg	  esac
4905698f425bSmrg	fi
4906698f425bSmrg      else
4907698f425bSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
4908698f425bSmrg      fi
4909698f425bSmrg      ;;
4910266e564dSmrg
4911698f425bSmrg    os2*)
4912698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4913698f425bSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
4914698f425bSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4915698f425bSmrg      _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'
4916698f425bSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4917698f425bSmrg      ;;
4918266e564dSmrg
4919698f425bSmrg    osf3*)
4920698f425bSmrg      if test "$GCC" = yes; then
4921698f425bSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4922698f425bSmrg	_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'
4923698f425bSmrg      else
4924698f425bSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4925698f425bSmrg	_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'
4926698f425bSmrg      fi
4927698f425bSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4928698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4929698f425bSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4930698f425bSmrg      ;;
4931266e564dSmrg
4932698f425bSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
4933698f425bSmrg      if test "$GCC" = yes; then
4934698f425bSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4935698f425bSmrg	_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'
4936698f425bSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4937698f425bSmrg      else
4938698f425bSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4939698f425bSmrg	_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'
4940698f425bSmrg	_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~
4941698f425bSmrg	$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'
4942266e564dSmrg
4943698f425bSmrg	# Both c and cxx compiler support -rpath directly
4944698f425bSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4945698f425bSmrg      fi
4946698f425bSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4947698f425bSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4948698f425bSmrg      ;;
4949266e564dSmrg
4950698f425bSmrg    solaris*)
4951698f425bSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4952698f425bSmrg      if test "$GCC" = yes; then
4953698f425bSmrg	wlarc='${wl}'
4954698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4955698f425bSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4956698f425bSmrg	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4957698f425bSmrg      else
4958698f425bSmrg	case `$CC -V 2>&1` in
4959698f425bSmrg	*"Compilers 5.0"*)
4960698f425bSmrg	  wlarc=''
4961698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4962698f425bSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4963698f425bSmrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4964698f425bSmrg	  ;;
4965698f425bSmrg	*)
4966698f425bSmrg	  wlarc='${wl}'
4967698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4968698f425bSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4969698f425bSmrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4970698f425bSmrg	  ;;
4971698f425bSmrg	esac
4972698f425bSmrg      fi
4973698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4974698f425bSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4975698f425bSmrg      case $host_os in
4976698f425bSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4977698f425bSmrg      *)
4978698f425bSmrg	# The compiler driver will combine and reorder linker options,
4979698f425bSmrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
4980698f425bSmrg	# but is careful enough not to reorder.
4981698f425bSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
4982698f425bSmrg	if test "$GCC" = yes; then
4983698f425bSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4984698f425bSmrg	else
4985698f425bSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4986698f425bSmrg	fi
4987698f425bSmrg	;;
4988698f425bSmrg      esac
4989698f425bSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
4990698f425bSmrg      ;;
4991266e564dSmrg
4992698f425bSmrg    sunos4*)
4993698f425bSmrg      if test "x$host_vendor" = xsequent; then
4994698f425bSmrg	# Use $CC to link under sequent, because it throws in some extra .o
4995698f425bSmrg	# files that make .init and .fini sections work.
4996698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4997698f425bSmrg      else
4998698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4999698f425bSmrg      fi
5000698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5001698f425bSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5002698f425bSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5003698f425bSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5004698f425bSmrg      ;;
5005266e564dSmrg
5006698f425bSmrg    sysv4)
5007698f425bSmrg      case $host_vendor in
5008698f425bSmrg	sni)
5009698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5010698f425bSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5011698f425bSmrg	;;
5012698f425bSmrg	siemens)
5013698f425bSmrg	  ## LD is ld it makes a PLAMLIB
5014698f425bSmrg	  ## CC just makes a GrossModule.
5015698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5016698f425bSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5017698f425bSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
5018698f425bSmrg        ;;
5019698f425bSmrg	motorola)
5020698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5021698f425bSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5022698f425bSmrg	;;
5023698f425bSmrg      esac
5024698f425bSmrg      runpath_var='LD_RUN_PATH'
5025698f425bSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5026698f425bSmrg      ;;
5027266e564dSmrg
5028698f425bSmrg    sysv4.3*)
5029698f425bSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5030698f425bSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5031698f425bSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5032698f425bSmrg      ;;
5033266e564dSmrg
5034698f425bSmrg    sysv4*MP*)
5035698f425bSmrg      if test -d /usr/nec; then
5036698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5037698f425bSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5038698f425bSmrg	runpath_var=LD_RUN_PATH
5039698f425bSmrg	hardcode_runpath_var=yes
5040698f425bSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
5041698f425bSmrg      fi
5042698f425bSmrg      ;;
5043266e564dSmrg
5044698f425bSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5045698f425bSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5046698f425bSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5047698f425bSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5048698f425bSmrg      runpath_var='LD_RUN_PATH'
5049266e564dSmrg
5050698f425bSmrg      if test "$GCC" = yes; then
5051698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5052698f425bSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5053698f425bSmrg      else
5054698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5055698f425bSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5056698f425bSmrg      fi
5057698f425bSmrg      ;;
5058266e564dSmrg
5059698f425bSmrg    sysv5* | sco3.2v5* | sco5v6*)
5060698f425bSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
5061698f425bSmrg      # link with -lc, and that would cause any symbols used from libc to
5062698f425bSmrg      # always be unresolved, which means just about no library would
5063698f425bSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
5064698f425bSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
5065698f425bSmrg      # as -z defs.
5066698f425bSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5067698f425bSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5068698f425bSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5069698f425bSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5070698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5071698f425bSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5072698f425bSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5073698f425bSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5074698f425bSmrg      runpath_var='LD_RUN_PATH'
5075266e564dSmrg
5076698f425bSmrg      if test "$GCC" = yes; then
5077698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5078698f425bSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5079698f425bSmrg      else
5080698f425bSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5081698f425bSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5082698f425bSmrg      fi
5083698f425bSmrg      ;;
5084266e564dSmrg
5085698f425bSmrg    uts4*)
5086698f425bSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5087698f425bSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5088698f425bSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5089698f425bSmrg      ;;
5090266e564dSmrg
5091698f425bSmrg    *)
5092698f425bSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
5093698f425bSmrg      ;;
5094698f425bSmrg    esac
5095266e564dSmrg
5096698f425bSmrg    if test x$host_vendor = xsni; then
5097698f425bSmrg      case $host in
5098698f425bSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5099698f425bSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5100698f425bSmrg	;;
5101698f425bSmrg      esac
5102698f425bSmrg    fi
5103698f425bSmrg  fi
5104698f425bSmrg])
5105698f425bSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5106698f425bSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5107266e564dSmrg
5108698f425bSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5109266e564dSmrg
5110698f425bSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5111698f425bSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5112698f425bSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
5113698f425bSmrg    [The commands to extract the exported symbol list from a shared archive])
5114266e564dSmrg
5115698f425bSmrg#
5116698f425bSmrg# Do we need to explicitly link libc?
5117698f425bSmrg#
5118698f425bSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5119698f425bSmrgx|xyes)
5120698f425bSmrg  # Assume -lc should be added
5121698f425bSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5122266e564dSmrg
5123698f425bSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
5124698f425bSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
5125698f425bSmrg    *'~'*)
5126698f425bSmrg      # FIXME: we may have to deal with multi-command sequences.
5127698f425bSmrg      ;;
5128698f425bSmrg    '$CC '*)
5129698f425bSmrg      # Test whether the compiler implicitly links with -lc since on some
5130698f425bSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5131698f425bSmrg      # to ld, don't add -lc before -lgcc.
5132698f425bSmrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5133698f425bSmrg      $RM conftest*
5134698f425bSmrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5135266e564dSmrg
5136698f425bSmrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5137698f425bSmrg        soname=conftest
5138698f425bSmrg        lib=conftest
5139698f425bSmrg        libobjs=conftest.$ac_objext
5140698f425bSmrg        deplibs=
5141698f425bSmrg        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5142698f425bSmrg	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5143698f425bSmrg        compiler_flags=-v
5144698f425bSmrg        linker_flags=-v
5145698f425bSmrg        verstring=
5146698f425bSmrg        output_objdir=.
5147698f425bSmrg        libname=conftest
5148698f425bSmrg        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5149698f425bSmrg        _LT_TAGVAR(allow_undefined_flag, $1)=
5150698f425bSmrg        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5151698f425bSmrg        then
5152698f425bSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5153698f425bSmrg        else
5154698f425bSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5155698f425bSmrg        fi
5156698f425bSmrg        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5157698f425bSmrg      else
5158698f425bSmrg        cat conftest.err 1>&5
5159698f425bSmrg      fi
5160698f425bSmrg      $RM conftest*
5161698f425bSmrg      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5162698f425bSmrg      ;;
5163698f425bSmrg    esac
5164698f425bSmrg  fi
5165698f425bSmrg  ;;
5166698f425bSmrgesac
5167266e564dSmrg
5168698f425bSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5169698f425bSmrg    [Whether or not to add -lc for building shared libraries])
5170698f425bSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5171698f425bSmrg    [enable_shared_with_static_runtimes], [0],
5172698f425bSmrg    [Whether or not to disallow shared libs when runtime libs are static])
5173698f425bSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5174698f425bSmrg    [Compiler flag to allow reflexive dlopens])
5175698f425bSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5176698f425bSmrg    [Compiler flag to generate shared objects directly from archives])
5177698f425bSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
5178698f425bSmrg    [Whether the compiler copes with passing no objects directly])
5179698f425bSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5180698f425bSmrg    [Create an old-style archive from a shared archive])
5181698f425bSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5182698f425bSmrg    [Create a temporary old-style archive to link instead of a shared archive])
5183698f425bSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5184698f425bSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
5185698f425bSmrg_LT_TAGDECL([], [module_cmds], [2],
5186698f425bSmrg    [Commands used to build a loadable module if different from building
5187698f425bSmrg    a shared archive.])
5188698f425bSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
5189698f425bSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
5190698f425bSmrg    [Whether we are building with GNU ld or not])
5191698f425bSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
5192698f425bSmrg    [Flag that allows shared libraries with undefined symbols to be built])
5193698f425bSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
5194698f425bSmrg    [Flag that enforces no undefined symbols])
5195698f425bSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5196698f425bSmrg    [Flag to hardcode $libdir into a binary during linking.
5197698f425bSmrg    This must work even if $libdir does not exist])
5198698f425bSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5199698f425bSmrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
5200698f425bSmrg    during linking.  This must work even if $libdir does not exist]])
5201698f425bSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5202698f425bSmrg    [Whether we need a single "-rpath" flag with a separated argument])
5203698f425bSmrg_LT_TAGDECL([], [hardcode_direct], [0],
5204698f425bSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5205698f425bSmrg    DIR into the resulting binary])
5206698f425bSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5207698f425bSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5208698f425bSmrg    DIR into the resulting binary and the resulting library dependency is
5209698f425bSmrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5210698f425bSmrg    library is relocated])
5211698f425bSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
5212698f425bSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5213698f425bSmrg    into the resulting binary])
5214698f425bSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5215698f425bSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5216698f425bSmrg    into the resulting binary])
5217698f425bSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
5218698f425bSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
5219698f425bSmrg    into the library and all subsequent libraries and executables linked
5220698f425bSmrg    against it])
5221698f425bSmrg_LT_TAGDECL([], [inherit_rpath], [0],
5222698f425bSmrg    [Set to yes if linker adds runtime paths of dependent libraries
5223698f425bSmrg    to runtime path list])
5224698f425bSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
5225698f425bSmrg    [Whether libtool must link a program against all its dependency libraries])
5226698f425bSmrg_LT_TAGDECL([], [fix_srcfile_path], [1],
5227698f425bSmrg    [Fix the shell variable $srcfile for the compiler])
5228698f425bSmrg_LT_TAGDECL([], [always_export_symbols], [0],
5229698f425bSmrg    [Set to "yes" if exported symbols are required])
5230698f425bSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
5231698f425bSmrg    [The commands to list exported symbols])
5232698f425bSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
5233698f425bSmrg    [Symbols that should not be listed in the preloaded symbols])
5234698f425bSmrg_LT_TAGDECL([], [include_expsyms], [1],
5235698f425bSmrg    [Symbols that must always be exported])
5236698f425bSmrg_LT_TAGDECL([], [prelink_cmds], [2],
5237698f425bSmrg    [Commands necessary for linking programs (against libraries) with templates])
5238698f425bSmrg_LT_TAGDECL([], [file_list_spec], [1],
5239698f425bSmrg    [Specify filename containing input files])
5240698f425bSmrgdnl FIXME: Not yet implemented
5241698f425bSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5242698f425bSmrgdnl    [Compiler flag to generate thread safe objects])
5243698f425bSmrg])# _LT_LINKER_SHLIBS
5244698f425bSmrg
5245698f425bSmrg
5246698f425bSmrg# _LT_LANG_C_CONFIG([TAG])
5247698f425bSmrg# ------------------------
5248698f425bSmrg# Ensure that the configuration variables for a C compiler are suitably
5249698f425bSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
5250698f425bSmrg# the compiler configuration to `libtool'.
5251698f425bSmrgm4_defun([_LT_LANG_C_CONFIG],
5252698f425bSmrg[m4_require([_LT_DECL_EGREP])dnl
5253698f425bSmrglt_save_CC="$CC"
5254698f425bSmrgAC_LANG_PUSH(C)
5255266e564dSmrg
5256698f425bSmrg# Source file extension for C test sources.
5257698f425bSmrgac_ext=c
5258266e564dSmrg
5259698f425bSmrg# Object file extension for compiled C test sources.
5260698f425bSmrgobjext=o
5261698f425bSmrg_LT_TAGVAR(objext, $1)=$objext
5262266e564dSmrg
5263698f425bSmrg# Code to be used in simple compile tests
5264698f425bSmrglt_simple_compile_test_code="int some_variable = 0;"
5265266e564dSmrg
5266698f425bSmrg# Code to be used in simple link tests
5267698f425bSmrglt_simple_link_test_code='int main(){return(0);}'
5268266e564dSmrg
5269698f425bSmrg_LT_TAG_COMPILER
5270698f425bSmrg# Save the default compiler, since it gets overwritten when the other
5271698f425bSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5272698f425bSmrgcompiler_DEFAULT=$CC
5273266e564dSmrg
5274698f425bSmrg# save warnings/boilerplate of simple test code
5275698f425bSmrg_LT_COMPILER_BOILERPLATE
5276698f425bSmrg_LT_LINKER_BOILERPLATE
5277266e564dSmrg
5278698f425bSmrgif test -n "$compiler"; then
5279698f425bSmrg  _LT_COMPILER_NO_RTTI($1)
5280698f425bSmrg  _LT_COMPILER_PIC($1)
5281698f425bSmrg  _LT_COMPILER_C_O($1)
5282698f425bSmrg  _LT_COMPILER_FILE_LOCKS($1)
5283698f425bSmrg  _LT_LINKER_SHLIBS($1)
5284698f425bSmrg  _LT_SYS_DYNAMIC_LINKER($1)
5285698f425bSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
5286698f425bSmrg  LT_SYS_DLOPEN_SELF
5287698f425bSmrg  _LT_CMD_STRIPLIB
5288698f425bSmrg
5289698f425bSmrg  # Report which library types will actually be built
5290698f425bSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
5291698f425bSmrg  AC_MSG_RESULT([$can_build_shared])
5292698f425bSmrg
5293698f425bSmrg  AC_MSG_CHECKING([whether to build shared libraries])
5294698f425bSmrg  test "$can_build_shared" = "no" && enable_shared=no
5295698f425bSmrg
5296698f425bSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
5297698f425bSmrg  # are all built from PIC.
5298698f425bSmrg  case $host_os in
5299698f425bSmrg  aix3*)
5300698f425bSmrg    test "$enable_shared" = yes && enable_static=no
5301698f425bSmrg    if test -n "$RANLIB"; then
5302698f425bSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
5303698f425bSmrg      postinstall_cmds='$RANLIB $lib'
5304698f425bSmrg    fi
5305698f425bSmrg    ;;
5306266e564dSmrg
5307698f425bSmrg  aix[[4-9]]*)
5308698f425bSmrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5309698f425bSmrg      test "$enable_shared" = yes && enable_static=no
5310698f425bSmrg    fi
5311698f425bSmrg    ;;
5312698f425bSmrg  esac
5313698f425bSmrg  AC_MSG_RESULT([$enable_shared])
5314266e564dSmrg
5315698f425bSmrg  AC_MSG_CHECKING([whether to build static libraries])
5316698f425bSmrg  # Make sure either enable_shared or enable_static is yes.
5317698f425bSmrg  test "$enable_shared" = yes || enable_static=yes
5318698f425bSmrg  AC_MSG_RESULT([$enable_static])
5319266e564dSmrg
5320698f425bSmrg  _LT_CONFIG($1)
5321698f425bSmrgfi
5322698f425bSmrgAC_LANG_POP
5323698f425bSmrgCC="$lt_save_CC"
5324698f425bSmrg])# _LT_LANG_C_CONFIG
5325266e564dSmrg
5326266e564dSmrg
5327698f425bSmrg# _LT_PROG_CXX
5328698f425bSmrg# ------------
5329698f425bSmrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5330698f425bSmrg# compiler, we have our own version here.
5331698f425bSmrgm4_defun([_LT_PROG_CXX],
5332698f425bSmrg[
5333698f425bSmrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5334698f425bSmrgAC_PROG_CXX
5335698f425bSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5336698f425bSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5337698f425bSmrg    (test "X$CXX" != "Xg++"))) ; then
5338698f425bSmrg  AC_PROG_CXXCPP
5339698f425bSmrgelse
5340698f425bSmrg  _lt_caught_CXX_error=yes
5341698f425bSmrgfi
5342698f425bSmrgpopdef([AC_MSG_ERROR])
5343698f425bSmrg])# _LT_PROG_CXX
5344266e564dSmrg
5345698f425bSmrgdnl aclocal-1.4 backwards compatibility:
5346698f425bSmrgdnl AC_DEFUN([_LT_PROG_CXX], [])
5347266e564dSmrg
5348266e564dSmrg
5349698f425bSmrg# _LT_LANG_CXX_CONFIG([TAG])
5350698f425bSmrg# --------------------------
5351698f425bSmrg# Ensure that the configuration variables for a C++ compiler are suitably
5352698f425bSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
5353698f425bSmrg# the compiler configuration to `libtool'.
5354698f425bSmrgm4_defun([_LT_LANG_CXX_CONFIG],
5355698f425bSmrg[AC_REQUIRE([_LT_PROG_CXX])dnl
5356698f425bSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
5357698f425bSmrgm4_require([_LT_DECL_EGREP])dnl
5358698f425bSmrg
5359698f425bSmrgAC_LANG_PUSH(C++)
5360698f425bSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5361698f425bSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
5362698f425bSmrg_LT_TAGVAR(always_export_symbols, $1)=no
5363698f425bSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
5364698f425bSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
5365698f425bSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5366698f425bSmrg_LT_TAGVAR(hardcode_direct, $1)=no
5367698f425bSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5368698f425bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5369698f425bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5370698f425bSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
5371698f425bSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
5372698f425bSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5373698f425bSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
5374698f425bSmrg_LT_TAGVAR(inherit_rpath, $1)=no
5375698f425bSmrg_LT_TAGVAR(module_cmds, $1)=
5376698f425bSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
5377698f425bSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
5378698f425bSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5379698f425bSmrg_LT_TAGVAR(no_undefined_flag, $1)=
5380698f425bSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
5381698f425bSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5382266e564dSmrg
5383698f425bSmrg# Source file extension for C++ test sources.
5384698f425bSmrgac_ext=cpp
5385266e564dSmrg
5386698f425bSmrg# Object file extension for compiled C++ test sources.
5387698f425bSmrgobjext=o
5388698f425bSmrg_LT_TAGVAR(objext, $1)=$objext
5389698f425bSmrg
5390698f425bSmrg# No sense in running all these tests if we already determined that
5391698f425bSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
5392698f425bSmrg# are currently assumed to apply to all compilers on this platform,
5393698f425bSmrg# and will be corrupted by setting them based on a non-working compiler.
5394698f425bSmrgif test "$_lt_caught_CXX_error" != yes; then
5395698f425bSmrg  # Code to be used in simple compile tests
5396698f425bSmrg  lt_simple_compile_test_code="int some_variable = 0;"
5397698f425bSmrg
5398698f425bSmrg  # Code to be used in simple link tests
5399698f425bSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5400698f425bSmrg
5401698f425bSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5402698f425bSmrg  _LT_TAG_COMPILER
5403698f425bSmrg
5404698f425bSmrg  # save warnings/boilerplate of simple test code
5405698f425bSmrg  _LT_COMPILER_BOILERPLATE
5406698f425bSmrg  _LT_LINKER_BOILERPLATE
5407698f425bSmrg
5408698f425bSmrg  # Allow CC to be a program name with arguments.
5409698f425bSmrg  lt_save_CC=$CC
5410698f425bSmrg  lt_save_LD=$LD
5411698f425bSmrg  lt_save_GCC=$GCC
5412698f425bSmrg  GCC=$GXX
5413698f425bSmrg  lt_save_with_gnu_ld=$with_gnu_ld
5414698f425bSmrg  lt_save_path_LD=$lt_cv_path_LD
5415698f425bSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5416698f425bSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5417698f425bSmrg  else
5418698f425bSmrg    $as_unset lt_cv_prog_gnu_ld
5419698f425bSmrg  fi
5420698f425bSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
5421698f425bSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
5422698f425bSmrg  else
5423698f425bSmrg    $as_unset lt_cv_path_LD
5424698f425bSmrg  fi
5425698f425bSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
5426698f425bSmrg  CC=${CXX-"c++"}
5427698f425bSmrg  compiler=$CC
5428698f425bSmrg  _LT_TAGVAR(compiler, $1)=$CC
5429698f425bSmrg  _LT_CC_BASENAME([$compiler])
5430266e564dSmrg
5431698f425bSmrg  if test -n "$compiler"; then
5432698f425bSmrg    # We don't want -fno-exception when compiling C++ code, so set the
5433698f425bSmrg    # no_builtin_flag separately
5434698f425bSmrg    if test "$GXX" = yes; then
5435698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5436698f425bSmrg    else
5437698f425bSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5438698f425bSmrg    fi
5439266e564dSmrg
5440698f425bSmrg    if test "$GXX" = yes; then
5441698f425bSmrg      # Set up default GNU C++ configuration
5442266e564dSmrg
5443698f425bSmrg      LT_PATH_LD
5444266e564dSmrg
5445698f425bSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
5446698f425bSmrg      # archiving commands below assume that GNU ld is being used.
5447698f425bSmrg      if test "$with_gnu_ld" = yes; then
5448698f425bSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5449698f425bSmrg        _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'
5450266e564dSmrg
5451698f425bSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5452698f425bSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5453266e564dSmrg
5454698f425bSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
5455698f425bSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5456698f425bSmrg        #     investigate it a little bit more. (MM)
5457698f425bSmrg        wlarc='${wl}'
5458266e564dSmrg
5459698f425bSmrg        # ancient GNU ld didn't support --whole-archive et. al.
5460698f425bSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5461698f425bSmrg	  $GREP 'no-whole-archive' > /dev/null; then
5462698f425bSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5463698f425bSmrg        else
5464698f425bSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
5465698f425bSmrg        fi
5466698f425bSmrg      else
5467698f425bSmrg        with_gnu_ld=no
5468698f425bSmrg        wlarc=
5469698f425bSmrg
5470698f425bSmrg        # A generic and very simple default shared library creation
5471698f425bSmrg        # command for GNU C++ for the case where it uses the native
5472698f425bSmrg        # linker, instead of GNU ld.  If possible, this setting should
5473698f425bSmrg        # overridden to take advantage of the native linker features on
5474698f425bSmrg        # the platform it is being used on.
5475698f425bSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5476698f425bSmrg      fi
5477266e564dSmrg
5478698f425bSmrg      # Commands to make compiler produce verbose output that lists
5479698f425bSmrg      # what "hidden" libraries, object files and flags are used when
5480698f425bSmrg      # linking a shared library.
5481698f425bSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5482266e564dSmrg
5483698f425bSmrg    else
5484698f425bSmrg      GXX=no
5485698f425bSmrg      with_gnu_ld=no
5486698f425bSmrg      wlarc=
5487698f425bSmrg    fi
5488266e564dSmrg
5489698f425bSmrg    # PORTME: fill in a description of your system's C++ link characteristics
5490698f425bSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5491698f425bSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
5492698f425bSmrg    case $host_os in
5493698f425bSmrg      aix3*)
5494698f425bSmrg        # FIXME: insert proper C++ library support
5495698f425bSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
5496698f425bSmrg        ;;
5497698f425bSmrg      aix[[4-9]]*)
5498698f425bSmrg        if test "$host_cpu" = ia64; then
5499698f425bSmrg          # On IA64, the linker does run time linking by default, so we don't
5500698f425bSmrg          # have to do anything special.
5501698f425bSmrg          aix_use_runtimelinking=no
5502698f425bSmrg          exp_sym_flag='-Bexport'
5503698f425bSmrg          no_entry_flag=""
5504698f425bSmrg        else
5505698f425bSmrg          aix_use_runtimelinking=no
5506698f425bSmrg
5507698f425bSmrg          # Test if we are trying to use run time linking or normal
5508698f425bSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5509698f425bSmrg          # need to do runtime linking.
5510698f425bSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5511698f425bSmrg	    for ld_flag in $LDFLAGS; do
5512698f425bSmrg	      case $ld_flag in
5513698f425bSmrg	      *-brtl*)
5514698f425bSmrg	        aix_use_runtimelinking=yes
5515698f425bSmrg	        break
5516698f425bSmrg	        ;;
5517698f425bSmrg	      esac
5518698f425bSmrg	    done
5519698f425bSmrg	    ;;
5520698f425bSmrg          esac
5521266e564dSmrg
5522698f425bSmrg          exp_sym_flag='-bexport'
5523698f425bSmrg          no_entry_flag='-bnoentry'
5524698f425bSmrg        fi
5525266e564dSmrg
5526698f425bSmrg        # When large executables or shared objects are built, AIX ld can
5527698f425bSmrg        # have problems creating the table of contents.  If linking a library
5528698f425bSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
5529698f425bSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5530698f425bSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5531698f425bSmrg
5532698f425bSmrg        _LT_TAGVAR(archive_cmds, $1)=''
5533698f425bSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
5534698f425bSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5535698f425bSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5536698f425bSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
5537698f425bSmrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5538698f425bSmrg
5539698f425bSmrg        if test "$GXX" = yes; then
5540698f425bSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
5541698f425bSmrg          # We only want to do this on AIX 4.2 and lower, the check
5542698f425bSmrg          # below for broken collect2 doesn't work under 4.3+
5543698f425bSmrg	  collect2name=`${CC} -print-prog-name=collect2`
5544698f425bSmrg	  if test -f "$collect2name" &&
5545698f425bSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5546698f425bSmrg	  then
5547698f425bSmrg	    # We have reworked collect2
5548698f425bSmrg	    :
5549698f425bSmrg	  else
5550698f425bSmrg	    # We have old collect2
5551698f425bSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
5552698f425bSmrg	    # It fails to find uninstalled libraries when the uninstalled
5553698f425bSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
5554698f425bSmrg	    # to unsupported forces relinking
5555698f425bSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
5556698f425bSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5557698f425bSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
5558698f425bSmrg	  fi
5559698f425bSmrg          esac
5560698f425bSmrg          shared_flag='-shared'
5561698f425bSmrg	  if test "$aix_use_runtimelinking" = yes; then
5562698f425bSmrg	    shared_flag="$shared_flag "'${wl}-G'
5563698f425bSmrg	  fi
5564698f425bSmrg        else
5565698f425bSmrg          # not using gcc
5566698f425bSmrg          if test "$host_cpu" = ia64; then
5567698f425bSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5568698f425bSmrg	  # chokes on -Wl,-G. The following line is correct:
5569698f425bSmrg	  shared_flag='-G'
5570698f425bSmrg          else
5571698f425bSmrg	    if test "$aix_use_runtimelinking" = yes; then
5572698f425bSmrg	      shared_flag='${wl}-G'
5573698f425bSmrg	    else
5574698f425bSmrg	      shared_flag='${wl}-bM:SRE'
5575698f425bSmrg	    fi
5576698f425bSmrg          fi
5577698f425bSmrg        fi
5578266e564dSmrg
5579698f425bSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5580698f425bSmrg        # It seems that -bexpall does not export symbols beginning with
5581698f425bSmrg        # underscore (_), so it is better to generate a list of symbols to
5582698f425bSmrg	# export.
5583698f425bSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
5584698f425bSmrg        if test "$aix_use_runtimelinking" = yes; then
5585698f425bSmrg          # Warning - without using the other runtime loading flags (-brtl),
5586698f425bSmrg          # -berok will link without error, but may produce a broken library.
5587698f425bSmrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5588698f425bSmrg          # Determine the default libpath from the value encoded in an empty
5589698f425bSmrg          # executable.
5590698f425bSmrg          _LT_SYS_MODULE_PATH_AIX
5591698f425bSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5592698f425bSmrg
5593698f425bSmrg          _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"
5594698f425bSmrg        else
5595698f425bSmrg          if test "$host_cpu" = ia64; then
5596698f425bSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5597698f425bSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5598698f425bSmrg	    _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"
5599698f425bSmrg          else
5600698f425bSmrg	    # Determine the default libpath from the value encoded in an
5601698f425bSmrg	    # empty executable.
5602698f425bSmrg	    _LT_SYS_MODULE_PATH_AIX
5603698f425bSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5604698f425bSmrg	    # Warning - without using the other run time loading flags,
5605698f425bSmrg	    # -berok will link without error, but may produce a broken library.
5606698f425bSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5607698f425bSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5608698f425bSmrg	    # Exported symbols can be pulled into shared objects from archives
5609698f425bSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5610698f425bSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5611698f425bSmrg	    # This is similar to how AIX traditionally builds its shared
5612698f425bSmrg	    # libraries.
5613698f425bSmrg	    _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'
5614698f425bSmrg          fi
5615698f425bSmrg        fi
5616698f425bSmrg        ;;
5617266e564dSmrg
5618698f425bSmrg      beos*)
5619698f425bSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5620698f425bSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5621698f425bSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5622698f425bSmrg	  # support --undefined.  This deserves some investigation.  FIXME
5623698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5624698f425bSmrg	else
5625698f425bSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
5626698f425bSmrg	fi
5627698f425bSmrg	;;
5628266e564dSmrg
5629698f425bSmrg      chorus*)
5630698f425bSmrg        case $cc_basename in
5631698f425bSmrg          *)
5632698f425bSmrg	  # FIXME: insert proper C++ library support
5633698f425bSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
5634698f425bSmrg	  ;;
5635698f425bSmrg        esac
5636698f425bSmrg        ;;
5637266e564dSmrg
5638698f425bSmrg      cygwin* | mingw* | pw32* | cegcc*)
5639698f425bSmrg        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5640698f425bSmrg        # as there is no search path for DLLs.
5641698f425bSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5642698f425bSmrg        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5643698f425bSmrg        _LT_TAGVAR(always_export_symbols, $1)=no
5644698f425bSmrg        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5645698f425bSmrg
5646698f425bSmrg        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5647698f425bSmrg          _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'
5648698f425bSmrg          # If the export-symbols file already is a .def file (1st line
5649698f425bSmrg          # is EXPORTS), use it as is; otherwise, prepend...
5650698f425bSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5651698f425bSmrg	    cp $export_symbols $output_objdir/$soname.def;
5652698f425bSmrg          else
5653698f425bSmrg	    echo EXPORTS > $output_objdir/$soname.def;
5654698f425bSmrg	    cat $export_symbols >> $output_objdir/$soname.def;
5655698f425bSmrg          fi~
5656698f425bSmrg          $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'
5657698f425bSmrg        else
5658698f425bSmrg          _LT_TAGVAR(ld_shlibs, $1)=no
5659698f425bSmrg        fi
5660698f425bSmrg        ;;
5661698f425bSmrg      darwin* | rhapsody*)
5662698f425bSmrg        _LT_DARWIN_LINKER_FEATURES($1)
5663698f425bSmrg	;;
5664266e564dSmrg
5665698f425bSmrg      dgux*)
5666698f425bSmrg        case $cc_basename in
5667698f425bSmrg          ec++*)
5668698f425bSmrg	    # FIXME: insert proper C++ library support
5669698f425bSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5670698f425bSmrg	    ;;
5671698f425bSmrg          ghcx*)
5672698f425bSmrg	    # Green Hills C++ Compiler
5673698f425bSmrg	    # FIXME: insert proper C++ library support
5674698f425bSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5675698f425bSmrg	    ;;
5676698f425bSmrg          *)
5677698f425bSmrg	    # FIXME: insert proper C++ library support
5678698f425bSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5679698f425bSmrg	    ;;
5680698f425bSmrg        esac
5681698f425bSmrg        ;;
5682698f425bSmrg
5683698f425bSmrg      freebsd[[12]]*)
5684698f425bSmrg        # C++ shared libraries reported to be fairly broken before
5685698f425bSmrg	# switch to ELF
5686698f425bSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
5687698f425bSmrg        ;;
5688266e564dSmrg
5689698f425bSmrg      freebsd-elf*)
5690698f425bSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5691698f425bSmrg        ;;
5692266e564dSmrg
5693698f425bSmrg      freebsd* | dragonfly*)
5694698f425bSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5695698f425bSmrg        # conventions
5696698f425bSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
5697698f425bSmrg        ;;
5698266e564dSmrg
5699698f425bSmrg      gnu*)
5700698f425bSmrg        ;;
5701266e564dSmrg
5702698f425bSmrg      hpux9*)
5703698f425bSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5704698f425bSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5705698f425bSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5706698f425bSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
5707698f425bSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5708698f425bSmrg				             # but as the default
5709698f425bSmrg				             # location of the library.
5710698f425bSmrg
5711698f425bSmrg        case $cc_basename in
5712698f425bSmrg          CC*)
5713698f425bSmrg            # FIXME: insert proper C++ library support
5714698f425bSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
5715698f425bSmrg            ;;
5716698f425bSmrg          aCC*)
5717698f425bSmrg            _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'
5718698f425bSmrg            # Commands to make compiler produce verbose output that lists
5719698f425bSmrg            # what "hidden" libraries, object files and flags are used when
5720698f425bSmrg            # linking a shared library.
5721698f425bSmrg            #
5722698f425bSmrg            # There doesn't appear to be a way to prevent this compiler from
5723698f425bSmrg            # explicitly linking system object files so we need to strip them
5724698f425bSmrg            # from the output so that they don't get included in the library
5725698f425bSmrg            # dependencies.
5726698f425bSmrg            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'
5727698f425bSmrg            ;;
5728698f425bSmrg          *)
5729698f425bSmrg            if test "$GXX" = yes; then
5730698f425bSmrg              _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'
5731698f425bSmrg            else
5732698f425bSmrg              # FIXME: insert proper C++ library support
5733698f425bSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
5734698f425bSmrg            fi
5735698f425bSmrg            ;;
5736698f425bSmrg        esac
5737698f425bSmrg        ;;
5738266e564dSmrg
5739698f425bSmrg      hpux10*|hpux11*)
5740698f425bSmrg        if test $with_gnu_ld = no; then
5741698f425bSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5742698f425bSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5743698f425bSmrg
5744698f425bSmrg          case $host_cpu in
5745698f425bSmrg            hppa*64*|ia64*)
5746698f425bSmrg              ;;
5747698f425bSmrg            *)
5748698f425bSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5749698f425bSmrg              ;;
5750698f425bSmrg          esac
5751698f425bSmrg        fi
5752698f425bSmrg        case $host_cpu in
5753698f425bSmrg          hppa*64*|ia64*)
5754698f425bSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
5755698f425bSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5756698f425bSmrg            ;;
5757698f425bSmrg          *)
5758698f425bSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
5759698f425bSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5760698f425bSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5761698f425bSmrg					         # but as the default
5762698f425bSmrg					         # location of the library.
5763698f425bSmrg            ;;
5764698f425bSmrg        esac
5765698f425bSmrg
5766698f425bSmrg        case $cc_basename in
5767698f425bSmrg          CC*)
5768698f425bSmrg	    # FIXME: insert proper C++ library support
5769698f425bSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5770698f425bSmrg	    ;;
5771698f425bSmrg          aCC*)
5772698f425bSmrg	    case $host_cpu in
5773698f425bSmrg	      hppa*64*)
5774698f425bSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5775698f425bSmrg	        ;;
5776698f425bSmrg	      ia64*)
5777698f425bSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5778698f425bSmrg	        ;;
5779698f425bSmrg	      *)
5780698f425bSmrg	        _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'
5781698f425bSmrg	        ;;
5782698f425bSmrg	    esac
5783698f425bSmrg	    # Commands to make compiler produce verbose output that lists
5784698f425bSmrg	    # what "hidden" libraries, object files and flags are used when
5785698f425bSmrg	    # linking a shared library.
5786698f425bSmrg	    #
5787698f425bSmrg	    # There doesn't appear to be a way to prevent this compiler from
5788698f425bSmrg	    # explicitly linking system object files so we need to strip them
5789698f425bSmrg	    # from the output so that they don't get included in the library
5790698f425bSmrg	    # dependencies.
5791698f425bSmrg	    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'
5792698f425bSmrg	    ;;
5793698f425bSmrg          *)
5794698f425bSmrg	    if test "$GXX" = yes; then
5795698f425bSmrg	      if test $with_gnu_ld = no; then
5796698f425bSmrg	        case $host_cpu in
5797698f425bSmrg	          hppa*64*)
5798698f425bSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5799698f425bSmrg	            ;;
5800698f425bSmrg	          ia64*)
5801698f425bSmrg	            _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'
5802698f425bSmrg	            ;;
5803698f425bSmrg	          *)
5804698f425bSmrg	            _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'
5805698f425bSmrg	            ;;
5806698f425bSmrg	        esac
5807698f425bSmrg	      fi
5808698f425bSmrg	    else
5809698f425bSmrg	      # FIXME: insert proper C++ library support
5810698f425bSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
5811698f425bSmrg	    fi
5812698f425bSmrg	    ;;
5813698f425bSmrg        esac
5814698f425bSmrg        ;;
5815266e564dSmrg
5816698f425bSmrg      interix[[3-9]]*)
5817698f425bSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
5818698f425bSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5819698f425bSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5820698f425bSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5821698f425bSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5822698f425bSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
5823698f425bSmrg	# default) and relocated if they conflict, which is a slow very memory
5824698f425bSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
5825698f425bSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5826698f425bSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5827698f425bSmrg	_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'
5828698f425bSmrg	_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'
5829698f425bSmrg	;;
5830698f425bSmrg      irix5* | irix6*)
5831698f425bSmrg        case $cc_basename in
5832698f425bSmrg          CC*)
5833698f425bSmrg	    # SGI C++
5834698f425bSmrg	    _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'
5835698f425bSmrg
5836698f425bSmrg	    # Archives containing C++ object files must be created using
5837698f425bSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
5838698f425bSmrg	    # necessary to make sure instantiated templates are included
5839698f425bSmrg	    # in the archive.
5840698f425bSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5841698f425bSmrg	    ;;
5842698f425bSmrg          *)
5843698f425bSmrg	    if test "$GXX" = yes; then
5844698f425bSmrg	      if test "$with_gnu_ld" = no; then
5845698f425bSmrg	        _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'
5846698f425bSmrg	      else
5847698f425bSmrg	        _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'
5848698f425bSmrg	      fi
5849698f425bSmrg	    fi
5850698f425bSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
5851698f425bSmrg	    ;;
5852698f425bSmrg        esac
5853698f425bSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5854698f425bSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5855698f425bSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
5856698f425bSmrg        ;;
5857266e564dSmrg
5858698f425bSmrg      linux* | k*bsd*-gnu)
5859698f425bSmrg        case $cc_basename in
5860698f425bSmrg          KCC*)
5861698f425bSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
5862698f425bSmrg
5863698f425bSmrg	    # KCC will only create a shared library if the output file
5864698f425bSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
5865698f425bSmrg	    # to its proper name (with version) after linking.
5866698f425bSmrg	    _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'
5867698f425bSmrg	    _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'
5868698f425bSmrg	    # Commands to make compiler produce verbose output that lists
5869698f425bSmrg	    # what "hidden" libraries, object files and flags are used when
5870698f425bSmrg	    # linking a shared library.
5871698f425bSmrg	    #
5872698f425bSmrg	    # There doesn't appear to be a way to prevent this compiler from
5873698f425bSmrg	    # explicitly linking system object files so we need to strip them
5874698f425bSmrg	    # from the output so that they don't get included in the library
5875698f425bSmrg	    # dependencies.
5876698f425bSmrg	    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'
5877698f425bSmrg
5878698f425bSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5879698f425bSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5880698f425bSmrg
5881698f425bSmrg	    # Archives containing C++ object files must be created using
5882698f425bSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5883698f425bSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5884698f425bSmrg	    ;;
5885698f425bSmrg	  icpc* | ecpc* )
5886698f425bSmrg	    # Intel C++
5887698f425bSmrg	    with_gnu_ld=yes
5888698f425bSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
5889698f425bSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
5890698f425bSmrg	    # earlier do not add the objects themselves.
5891698f425bSmrg	    case `$CC -V 2>&1` in
5892698f425bSmrg	      *"Version 7."*)
5893698f425bSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5894698f425bSmrg		_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'
5895698f425bSmrg		;;
5896698f425bSmrg	      *)  # Version 8.0 or newer
5897698f425bSmrg	        tmp_idyn=
5898698f425bSmrg	        case $host_cpu in
5899698f425bSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
5900698f425bSmrg		esac
5901698f425bSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5902698f425bSmrg		_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'
5903698f425bSmrg		;;
5904698f425bSmrg	    esac
5905698f425bSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5906698f425bSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5907698f425bSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5908698f425bSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5909698f425bSmrg	    ;;
5910698f425bSmrg          pgCC* | pgcpp*)
5911698f425bSmrg            # Portland Group C++ compiler
5912698f425bSmrg	    case `$CC -V` in
5913698f425bSmrg	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
5914698f425bSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5915698f425bSmrg		rm -rf $tpldir~
5916698f425bSmrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5917698f425bSmrg		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5918698f425bSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5919698f425bSmrg		rm -rf $tpldir~
5920698f425bSmrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5921698f425bSmrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5922698f425bSmrg		$RANLIB $oldlib'
5923698f425bSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5924698f425bSmrg		rm -rf $tpldir~
5925698f425bSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5926698f425bSmrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5927698f425bSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5928698f425bSmrg		rm -rf $tpldir~
5929698f425bSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5930698f425bSmrg		$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'
5931698f425bSmrg	      ;;
5932698f425bSmrg	    *) # Version 6 will use weak symbols
5933698f425bSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5934698f425bSmrg	      _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'
5935698f425bSmrg	      ;;
5936698f425bSmrg	    esac
5937266e564dSmrg
5938698f425bSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5939698f425bSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5940698f425bSmrg	    _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'
5941698f425bSmrg            ;;
5942698f425bSmrg	  cxx*)
5943698f425bSmrg	    # Compaq C++
5944698f425bSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5945698f425bSmrg	    _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'
5946266e564dSmrg
5947698f425bSmrg	    runpath_var=LD_RUN_PATH
5948698f425bSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5949698f425bSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5950266e564dSmrg
5951698f425bSmrg	    # Commands to make compiler produce verbose output that lists
5952698f425bSmrg	    # what "hidden" libraries, object files and flags are used when
5953698f425bSmrg	    # linking a shared library.
5954698f425bSmrg	    #
5955698f425bSmrg	    # There doesn't appear to be a way to prevent this compiler from
5956698f425bSmrg	    # explicitly linking system object files so we need to strip them
5957698f425bSmrg	    # from the output so that they don't get included in the library
5958698f425bSmrg	    # dependencies.
5959698f425bSmrg	    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'
5960698f425bSmrg	    ;;
5961698f425bSmrg	  xl*)
5962698f425bSmrg	    # IBM XL 8.0 on PPC, with GNU ld
5963698f425bSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5964698f425bSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5965698f425bSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5966698f425bSmrg	    if test "x$supports_anon_versioning" = xyes; then
5967698f425bSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5968698f425bSmrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5969698f425bSmrg		echo "local: *; };" >> $output_objdir/$libname.ver~
5970698f425bSmrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5971698f425bSmrg	    fi
5972698f425bSmrg	    ;;
5973698f425bSmrg	  *)
5974698f425bSmrg	    case `$CC -V 2>&1 | sed 5q` in
5975698f425bSmrg	    *Sun\ C*)
5976698f425bSmrg	      # Sun C++ 5.9
5977698f425bSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5978698f425bSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5979698f425bSmrg	      _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'
5980698f425bSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5981698f425bSmrg	      _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'
5982698f425bSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
5983698f425bSmrg
5984698f425bSmrg	      # Not sure whether something based on
5985698f425bSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5986698f425bSmrg	      # would be better.
5987698f425bSmrg	      output_verbose_link_cmd='echo'
5988698f425bSmrg
5989698f425bSmrg	      # Archives containing C++ object files must be created using
5990698f425bSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
5991698f425bSmrg	      # necessary to make sure instantiated templates are included
5992698f425bSmrg	      # in the archive.
5993698f425bSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5994698f425bSmrg	      ;;
5995698f425bSmrg	    esac
5996698f425bSmrg	    ;;
5997698f425bSmrg	esac
5998698f425bSmrg	;;
5999266e564dSmrg
6000698f425bSmrg      lynxos*)
6001698f425bSmrg        # FIXME: insert proper C++ library support
6002698f425bSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
6003698f425bSmrg	;;
6004266e564dSmrg
6005698f425bSmrg      m88k*)
6006698f425bSmrg        # FIXME: insert proper C++ library support
6007698f425bSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6008698f425bSmrg	;;
6009266e564dSmrg
6010698f425bSmrg      mvs*)
6011698f425bSmrg        case $cc_basename in
6012698f425bSmrg          cxx*)
6013698f425bSmrg	    # FIXME: insert proper C++ library support
6014698f425bSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6015698f425bSmrg	    ;;
6016698f425bSmrg	  *)
6017698f425bSmrg	    # FIXME: insert proper C++ library support
6018698f425bSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6019698f425bSmrg	    ;;
6020698f425bSmrg	esac
6021698f425bSmrg	;;
6022266e564dSmrg
6023698f425bSmrg      netbsd*)
6024698f425bSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6025698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6026698f425bSmrg	  wlarc=
6027698f425bSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6028698f425bSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6029698f425bSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6030698f425bSmrg	fi
6031698f425bSmrg	# Workaround some broken pre-1.5 toolchains
6032698f425bSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6033698f425bSmrg	;;
6034266e564dSmrg
6035698f425bSmrg      *nto* | *qnx*)
6036698f425bSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
6037698f425bSmrg	;;
6038266e564dSmrg
6039698f425bSmrg      openbsd2*)
6040698f425bSmrg        # C++ shared libraries are fairly broken
6041698f425bSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
6042698f425bSmrg	;;
6043266e564dSmrg
6044698f425bSmrg      openbsd*)
6045698f425bSmrg	if test -f /usr/libexec/ld.so; then
6046698f425bSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
6047698f425bSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6048698f425bSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6049698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6050698f425bSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6051698f425bSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6052698f425bSmrg	    _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'
6053698f425bSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6054698f425bSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6055698f425bSmrg	  fi
6056698f425bSmrg	  output_verbose_link_cmd=echo
6057698f425bSmrg	else
6058698f425bSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
6059698f425bSmrg	fi
6060698f425bSmrg	;;
6061266e564dSmrg
6062698f425bSmrg      osf3* | osf4* | osf5*)
6063698f425bSmrg        case $cc_basename in
6064698f425bSmrg          KCC*)
6065698f425bSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6066698f425bSmrg
6067698f425bSmrg	    # KCC will only create a shared library if the output file
6068698f425bSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6069698f425bSmrg	    # to its proper name (with version) after linking.
6070698f425bSmrg	    _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'
6071698f425bSmrg
6072698f425bSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6073698f425bSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6074698f425bSmrg
6075698f425bSmrg	    # Archives containing C++ object files must be created using
6076698f425bSmrg	    # the KAI C++ compiler.
6077698f425bSmrg	    case $host in
6078698f425bSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6079698f425bSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6080698f425bSmrg	    esac
6081698f425bSmrg	    ;;
6082698f425bSmrg          RCC*)
6083698f425bSmrg	    # Rational C++ 2.4.1
6084698f425bSmrg	    # FIXME: insert proper C++ library support
6085698f425bSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6086698f425bSmrg	    ;;
6087698f425bSmrg          cxx*)
6088698f425bSmrg	    case $host in
6089698f425bSmrg	      osf3*)
6090698f425bSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6091698f425bSmrg	        _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'
6092698f425bSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6093698f425bSmrg		;;
6094698f425bSmrg	      *)
6095698f425bSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6096698f425bSmrg	        _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'
6097698f425bSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6098698f425bSmrg	          echo "-hidden">> $lib.exp~
6099698f425bSmrg	          $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~
6100698f425bSmrg	          $RM $lib.exp'
6101698f425bSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6102698f425bSmrg		;;
6103698f425bSmrg	    esac
6104266e564dSmrg
6105698f425bSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6106266e564dSmrg
6107698f425bSmrg	    # Commands to make compiler produce verbose output that lists
6108698f425bSmrg	    # what "hidden" libraries, object files and flags are used when
6109698f425bSmrg	    # linking a shared library.
6110698f425bSmrg	    #
6111698f425bSmrg	    # There doesn't appear to be a way to prevent this compiler from
6112698f425bSmrg	    # explicitly linking system object files so we need to strip them
6113698f425bSmrg	    # from the output so that they don't get included in the library
6114698f425bSmrg	    # dependencies.
6115698f425bSmrg	    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'
6116698f425bSmrg	    ;;
6117698f425bSmrg	  *)
6118698f425bSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6119698f425bSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6120698f425bSmrg	      case $host in
6121698f425bSmrg	        osf3*)
6122698f425bSmrg	          _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'
6123698f425bSmrg		  ;;
6124698f425bSmrg	        *)
6125698f425bSmrg	          _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'
6126698f425bSmrg		  ;;
6127698f425bSmrg	      esac
6128698f425bSmrg
6129698f425bSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6130698f425bSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6131698f425bSmrg
6132698f425bSmrg	      # Commands to make compiler produce verbose output that lists
6133698f425bSmrg	      # what "hidden" libraries, object files and flags are used when
6134698f425bSmrg	      # linking a shared library.
6135698f425bSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6136698f425bSmrg
6137698f425bSmrg	    else
6138698f425bSmrg	      # FIXME: insert proper C++ library support
6139698f425bSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
6140698f425bSmrg	    fi
6141698f425bSmrg	    ;;
6142698f425bSmrg        esac
6143698f425bSmrg        ;;
6144266e564dSmrg
6145698f425bSmrg      psos*)
6146698f425bSmrg        # FIXME: insert proper C++ library support
6147698f425bSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6148698f425bSmrg        ;;
6149266e564dSmrg
6150698f425bSmrg      sunos4*)
6151698f425bSmrg        case $cc_basename in
6152698f425bSmrg          CC*)
6153698f425bSmrg	    # Sun C++ 4.x
6154698f425bSmrg	    # FIXME: insert proper C++ library support
6155698f425bSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6156698f425bSmrg	    ;;
6157698f425bSmrg          lcc*)
6158698f425bSmrg	    # Lucid
6159698f425bSmrg	    # FIXME: insert proper C++ library support
6160698f425bSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6161698f425bSmrg	    ;;
6162698f425bSmrg          *)
6163698f425bSmrg	    # FIXME: insert proper C++ library support
6164698f425bSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6165698f425bSmrg	    ;;
6166698f425bSmrg        esac
6167698f425bSmrg        ;;
6168266e564dSmrg
6169698f425bSmrg      solaris*)
6170698f425bSmrg        case $cc_basename in
6171698f425bSmrg          CC*)
6172698f425bSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
6173698f425bSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6174698f425bSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6175698f425bSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6176698f425bSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6177698f425bSmrg	      $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'
6178698f425bSmrg
6179698f425bSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6180698f425bSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6181698f425bSmrg	    case $host_os in
6182698f425bSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6183698f425bSmrg	      *)
6184698f425bSmrg		# The compiler driver will combine and reorder linker options,
6185698f425bSmrg		# but understands `-z linker_flag'.
6186698f425bSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6187698f425bSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6188698f425bSmrg	        ;;
6189698f425bSmrg	    esac
6190698f425bSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6191266e564dSmrg
6192698f425bSmrg	    output_verbose_link_cmd='echo'
6193266e564dSmrg
6194698f425bSmrg	    # Archives containing C++ object files must be created using
6195698f425bSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6196698f425bSmrg	    # necessary to make sure instantiated templates are included
6197698f425bSmrg	    # in the archive.
6198698f425bSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6199698f425bSmrg	    ;;
6200698f425bSmrg          gcx*)
6201698f425bSmrg	    # Green Hills C++ Compiler
6202698f425bSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6203266e564dSmrg
6204698f425bSmrg	    # The C++ compiler must be used to create the archive.
6205698f425bSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6206698f425bSmrg	    ;;
6207698f425bSmrg          *)
6208698f425bSmrg	    # GNU C++ compiler with Solaris linker
6209698f425bSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6210698f425bSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6211698f425bSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6212698f425bSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6213698f425bSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6214698f425bSmrg		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6215698f425bSmrg
6216698f425bSmrg	        # Commands to make compiler produce verbose output that lists
6217698f425bSmrg	        # what "hidden" libraries, object files and flags are used when
6218698f425bSmrg	        # linking a shared library.
6219698f425bSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6220698f425bSmrg	      else
6221698f425bSmrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6222698f425bSmrg	        # platform.
6223698f425bSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6224698f425bSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6225698f425bSmrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6226698f425bSmrg
6227698f425bSmrg	        # Commands to make compiler produce verbose output that lists
6228698f425bSmrg	        # what "hidden" libraries, object files and flags are used when
6229698f425bSmrg	        # linking a shared library.
6230698f425bSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6231698f425bSmrg	      fi
6232698f425bSmrg
6233698f425bSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6234698f425bSmrg	      case $host_os in
6235698f425bSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6236698f425bSmrg		*)
6237698f425bSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6238698f425bSmrg		  ;;
6239698f425bSmrg	      esac
6240698f425bSmrg	    fi
6241698f425bSmrg	    ;;
6242698f425bSmrg        esac
6243698f425bSmrg        ;;
6244266e564dSmrg
6245698f425bSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6246698f425bSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6247698f425bSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6248698f425bSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6249698f425bSmrg      runpath_var='LD_RUN_PATH'
6250266e564dSmrg
6251698f425bSmrg      case $cc_basename in
6252698f425bSmrg        CC*)
6253698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6254698f425bSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6255698f425bSmrg	  ;;
6256698f425bSmrg	*)
6257698f425bSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6258698f425bSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6259698f425bSmrg	  ;;
6260698f425bSmrg      esac
6261698f425bSmrg      ;;
6262266e564dSmrg
6263698f425bSmrg      sysv5* | sco3.2v5* | sco5v6*)
6264698f425bSmrg	# Note: We can NOT use -z defs as we might desire, because we do not
6265698f425bSmrg	# link with -lc, and that would cause any symbols used from libc to
6266698f425bSmrg	# always be unresolved, which means just about no library would
6267698f425bSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
6268698f425bSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
6269698f425bSmrg	# as -z defs.
6270698f425bSmrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6271698f425bSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6272698f425bSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6273698f425bSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6274698f425bSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6275698f425bSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6276698f425bSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
6277698f425bSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6278698f425bSmrg	runpath_var='LD_RUN_PATH'
6279266e564dSmrg
6280698f425bSmrg	case $cc_basename in
6281698f425bSmrg          CC*)
6282698f425bSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6283698f425bSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6284698f425bSmrg	    ;;
6285698f425bSmrg	  *)
6286698f425bSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6287698f425bSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6288698f425bSmrg	    ;;
6289698f425bSmrg	esac
6290698f425bSmrg      ;;
6291266e564dSmrg
6292698f425bSmrg      tandem*)
6293698f425bSmrg        case $cc_basename in
6294698f425bSmrg          NCC*)
6295698f425bSmrg	    # NonStop-UX NCC 3.20
6296698f425bSmrg	    # FIXME: insert proper C++ library support
6297698f425bSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6298698f425bSmrg	    ;;
6299698f425bSmrg          *)
6300698f425bSmrg	    # FIXME: insert proper C++ library support
6301698f425bSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6302698f425bSmrg	    ;;
6303698f425bSmrg        esac
6304698f425bSmrg        ;;
6305266e564dSmrg
6306698f425bSmrg      vxworks*)
6307698f425bSmrg        # FIXME: insert proper C++ library support
6308698f425bSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6309698f425bSmrg        ;;
6310266e564dSmrg
6311698f425bSmrg      *)
6312698f425bSmrg        # FIXME: insert proper C++ library support
6313698f425bSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6314698f425bSmrg        ;;
6315698f425bSmrg    esac
6316266e564dSmrg
6317698f425bSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6318698f425bSmrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6319698f425bSmrg
6320698f425bSmrg    _LT_TAGVAR(GCC, $1)="$GXX"
6321698f425bSmrg    _LT_TAGVAR(LD, $1)="$LD"
6322698f425bSmrg
6323698f425bSmrg    ## CAVEAT EMPTOR:
6324698f425bSmrg    ## There is no encapsulation within the following macros, do not change
6325698f425bSmrg    ## the running order or otherwise move them around unless you know exactly
6326698f425bSmrg    ## what you are doing...
6327698f425bSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
6328698f425bSmrg    _LT_COMPILER_PIC($1)
6329698f425bSmrg    _LT_COMPILER_C_O($1)
6330698f425bSmrg    _LT_COMPILER_FILE_LOCKS($1)
6331698f425bSmrg    _LT_LINKER_SHLIBS($1)
6332698f425bSmrg    _LT_SYS_DYNAMIC_LINKER($1)
6333698f425bSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6334698f425bSmrg
6335698f425bSmrg    _LT_CONFIG($1)
6336698f425bSmrg  fi # test -n "$compiler"
6337698f425bSmrg
6338698f425bSmrg  CC=$lt_save_CC
6339698f425bSmrg  LDCXX=$LD
6340698f425bSmrg  LD=$lt_save_LD
6341698f425bSmrg  GCC=$lt_save_GCC
6342698f425bSmrg  with_gnu_ld=$lt_save_with_gnu_ld
6343698f425bSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
6344698f425bSmrg  lt_cv_path_LD=$lt_save_path_LD
6345698f425bSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6346698f425bSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6347698f425bSmrgfi # test "$_lt_caught_CXX_error" != yes
6348266e564dSmrg
6349698f425bSmrgAC_LANG_POP
6350698f425bSmrg])# _LT_LANG_CXX_CONFIG
6351266e564dSmrg
6352266e564dSmrg
6353698f425bSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6354698f425bSmrg# ---------------------------------
6355698f425bSmrg# Figure out "hidden" library dependencies from verbose
6356698f425bSmrg# compiler output when linking a shared library.
6357698f425bSmrg# Parse the compiler output and extract the necessary
6358698f425bSmrg# objects, libraries and library flags.
6359698f425bSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6360698f425bSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6361698f425bSmrg# Dependencies to place before and after the object being linked:
6362698f425bSmrg_LT_TAGVAR(predep_objects, $1)=
6363698f425bSmrg_LT_TAGVAR(postdep_objects, $1)=
6364698f425bSmrg_LT_TAGVAR(predeps, $1)=
6365698f425bSmrg_LT_TAGVAR(postdeps, $1)=
6366698f425bSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
6367266e564dSmrg
6368698f425bSmrgdnl we can't use the lt_simple_compile_test_code here,
6369698f425bSmrgdnl because it contains code intended for an executable,
6370698f425bSmrgdnl not a library.  It's possible we should let each
6371698f425bSmrgdnl tag define a new lt_????_link_test_code variable,
6372698f425bSmrgdnl but it's only used here...
6373698f425bSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6374698f425bSmrgint a;
6375698f425bSmrgvoid foo (void) { a = 0; }
6376698f425bSmrg_LT_EOF
6377698f425bSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6378698f425bSmrgclass Foo
6379698f425bSmrg{
6380698f425bSmrgpublic:
6381698f425bSmrg  Foo (void) { a = 0; }
6382698f425bSmrgprivate:
6383698f425bSmrg  int a;
6384698f425bSmrg};
6385698f425bSmrg_LT_EOF
6386698f425bSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6387698f425bSmrg      subroutine foo
6388698f425bSmrg      implicit none
6389698f425bSmrg      integer*4 a
6390698f425bSmrg      a=0
6391698f425bSmrg      return
6392698f425bSmrg      end
6393698f425bSmrg_LT_EOF
6394698f425bSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6395698f425bSmrg      subroutine foo
6396698f425bSmrg      implicit none
6397698f425bSmrg      integer a
6398698f425bSmrg      a=0
6399698f425bSmrg      return
6400698f425bSmrg      end
6401698f425bSmrg_LT_EOF
6402698f425bSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6403698f425bSmrgpublic class foo {
6404698f425bSmrg  private int a;
6405698f425bSmrg  public void bar (void) {
6406698f425bSmrg    a = 0;
6407698f425bSmrg  }
6408698f425bSmrg};
6409698f425bSmrg_LT_EOF
6410698f425bSmrg])
6411698f425bSmrgdnl Parse the compiler output and extract the necessary
6412698f425bSmrgdnl objects, libraries and library flags.
6413698f425bSmrgif AC_TRY_EVAL(ac_compile); then
6414698f425bSmrg  # Parse the compiler output and extract the necessary
6415698f425bSmrg  # objects, libraries and library flags.
6416266e564dSmrg
6417698f425bSmrg  # Sentinel used to keep track of whether or not we are before
6418698f425bSmrg  # the conftest object file.
6419698f425bSmrg  pre_test_object_deps_done=no
6420266e564dSmrg
6421698f425bSmrg  for p in `eval "$output_verbose_link_cmd"`; do
6422698f425bSmrg    case $p in
6423266e564dSmrg
6424698f425bSmrg    -L* | -R* | -l*)
6425698f425bSmrg       # Some compilers place space between "-{L,R}" and the path.
6426698f425bSmrg       # Remove the space.
6427698f425bSmrg       if test $p = "-L" ||
6428698f425bSmrg          test $p = "-R"; then
6429698f425bSmrg	 prev=$p
6430698f425bSmrg	 continue
6431698f425bSmrg       else
6432698f425bSmrg	 prev=
6433698f425bSmrg       fi
6434266e564dSmrg
6435698f425bSmrg       if test "$pre_test_object_deps_done" = no; then
6436698f425bSmrg	 case $p in
6437698f425bSmrg	 -L* | -R*)
6438698f425bSmrg	   # Internal compiler library paths should come after those
6439698f425bSmrg	   # provided the user.  The postdeps already come after the
6440698f425bSmrg	   # user supplied libs so there is no need to process them.
6441698f425bSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6442698f425bSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6443698f425bSmrg	   else
6444698f425bSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6445698f425bSmrg	   fi
6446698f425bSmrg	   ;;
6447698f425bSmrg	 # The "-l" case would never come before the object being
6448698f425bSmrg	 # linked, so don't bother handling this case.
6449698f425bSmrg	 esac
6450698f425bSmrg       else
6451698f425bSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6452698f425bSmrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6453698f425bSmrg	 else
6454698f425bSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6455698f425bSmrg	 fi
6456698f425bSmrg       fi
6457698f425bSmrg       ;;
6458266e564dSmrg
6459698f425bSmrg    *.$objext)
6460698f425bSmrg       # This assumes that the test object file only shows up
6461698f425bSmrg       # once in the compiler output.
6462698f425bSmrg       if test "$p" = "conftest.$objext"; then
6463698f425bSmrg	 pre_test_object_deps_done=yes
6464698f425bSmrg	 continue
6465698f425bSmrg       fi
6466266e564dSmrg
6467698f425bSmrg       if test "$pre_test_object_deps_done" = no; then
6468698f425bSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6469698f425bSmrg	   _LT_TAGVAR(predep_objects, $1)="$p"
6470698f425bSmrg	 else
6471698f425bSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6472698f425bSmrg	 fi
6473698f425bSmrg       else
6474698f425bSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6475698f425bSmrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
6476698f425bSmrg	 else
6477698f425bSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6478698f425bSmrg	 fi
6479698f425bSmrg       fi
6480698f425bSmrg       ;;
6481266e564dSmrg
6482698f425bSmrg    *) ;; # Ignore the rest.
6483266e564dSmrg
6484698f425bSmrg    esac
6485698f425bSmrg  done
6486266e564dSmrg
6487698f425bSmrg  # Clean up.
6488698f425bSmrg  rm -f a.out a.exe
6489c5629e66Smrgelse
6490698f425bSmrg  echo "libtool.m4: error: problem compiling $1 test program"
6491c5629e66Smrgfi
6492266e564dSmrg
6493698f425bSmrg$RM -f confest.$objext
6494266e564dSmrg
6495698f425bSmrg# PORTME: override above test on systems where it is broken
6496698f425bSmrgm4_if([$1], [CXX],
6497698f425bSmrg[case $host_os in
6498698f425bSmrginterix[[3-9]]*)
6499698f425bSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
6500698f425bSmrg  # hack all around it, let's just trust "g++" to DTRT.
6501698f425bSmrg  _LT_TAGVAR(predep_objects,$1)=
6502698f425bSmrg  _LT_TAGVAR(postdep_objects,$1)=
6503698f425bSmrg  _LT_TAGVAR(postdeps,$1)=
6504698f425bSmrg  ;;
6505266e564dSmrg
6506698f425bSmrglinux*)
6507698f425bSmrg  case `$CC -V 2>&1 | sed 5q` in
6508698f425bSmrg  *Sun\ C*)
6509698f425bSmrg    # Sun C++ 5.9
6510266e564dSmrg
6511698f425bSmrg    # The more standards-conforming stlport4 library is
6512698f425bSmrg    # incompatible with the Cstd library. Avoid specifying
6513698f425bSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
6514698f425bSmrg    # -library=stlport4 depends on it.
6515698f425bSmrg    case " $CXX $CXXFLAGS " in
6516698f425bSmrg    *" -library=stlport4 "*)
6517698f425bSmrg      solaris_use_stlport4=yes
6518698f425bSmrg      ;;
6519698f425bSmrg    esac
6520266e564dSmrg
6521698f425bSmrg    if test "$solaris_use_stlport4" != yes; then
6522698f425bSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6523698f425bSmrg    fi
6524698f425bSmrg    ;;
6525698f425bSmrg  esac
6526698f425bSmrg  ;;
6527698f425bSmrg
6528698f425bSmrgsolaris*)
6529698f425bSmrg  case $cc_basename in
6530698f425bSmrg  CC*)
6531698f425bSmrg    # The more standards-conforming stlport4 library is
6532698f425bSmrg    # incompatible with the Cstd library. Avoid specifying
6533698f425bSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
6534698f425bSmrg    # -library=stlport4 depends on it.
6535698f425bSmrg    case " $CXX $CXXFLAGS " in
6536698f425bSmrg    *" -library=stlport4 "*)
6537698f425bSmrg      solaris_use_stlport4=yes
6538698f425bSmrg      ;;
6539698f425bSmrg    esac
6540266e564dSmrg
6541698f425bSmrg    # Adding this requires a known-good setup of shared libraries for
6542698f425bSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
6543698f425bSmrg    # archive will be linked into the output, leading to subtle bugs.
6544698f425bSmrg    if test "$solaris_use_stlport4" != yes; then
6545698f425bSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6546698f425bSmrg    fi
6547698f425bSmrg    ;;
6548698f425bSmrg  esac
6549698f425bSmrg  ;;
6550698f425bSmrgesac
6551698f425bSmrg])
6552266e564dSmrg
6553698f425bSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
6554698f425bSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6555698f425bSmrgesac
6556698f425bSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6557698f425bSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6558698f425bSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6559698f425bSmrgfi
6560698f425bSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6561698f425bSmrg    [The directories searched by this compiler when creating a shared library])
6562698f425bSmrg_LT_TAGDECL([], [predep_objects], [1],
6563698f425bSmrg    [Dependencies to place before and after the objects being linked to
6564698f425bSmrg    create a shared library])
6565698f425bSmrg_LT_TAGDECL([], [postdep_objects], [1])
6566698f425bSmrg_LT_TAGDECL([], [predeps], [1])
6567698f425bSmrg_LT_TAGDECL([], [postdeps], [1])
6568698f425bSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
6569698f425bSmrg    [The library search path used internally by the compiler when linking
6570698f425bSmrg    a shared library])
6571698f425bSmrg])# _LT_SYS_HIDDEN_LIBDEPS
6572698f425bSmrg
6573698f425bSmrg
6574698f425bSmrg# _LT_PROG_F77
6575698f425bSmrg# ------------
6576698f425bSmrg# Since AC_PROG_F77 is broken, in that it returns the empty string
6577698f425bSmrg# if there is no fortran compiler, we have our own version here.
6578698f425bSmrgm4_defun([_LT_PROG_F77],
6579c5629e66Smrg[
6580698f425bSmrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6581698f425bSmrgAC_PROG_F77
6582698f425bSmrgif test -z "$F77" || test "X$F77" = "Xno"; then
6583698f425bSmrg  _lt_disable_F77=yes
6584698f425bSmrgfi
6585698f425bSmrgpopdef([AC_MSG_ERROR])
6586698f425bSmrg])# _LT_PROG_F77
6587266e564dSmrg
6588698f425bSmrgdnl aclocal-1.4 backwards compatibility:
6589698f425bSmrgdnl AC_DEFUN([_LT_PROG_F77], [])
6590266e564dSmrg
6591266e564dSmrg
6592698f425bSmrg# _LT_LANG_F77_CONFIG([TAG])
6593698f425bSmrg# --------------------------
6594698f425bSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
6595698f425bSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
6596698f425bSmrg# to write the compiler configuration to `libtool'.
6597698f425bSmrgm4_defun([_LT_LANG_F77_CONFIG],
6598698f425bSmrg[AC_REQUIRE([_LT_PROG_F77])dnl
6599698f425bSmrgAC_LANG_PUSH(Fortran 77)
6600266e564dSmrg
6601698f425bSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6602698f425bSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
6603698f425bSmrg_LT_TAGVAR(always_export_symbols, $1)=no
6604698f425bSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6605698f425bSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6606698f425bSmrg_LT_TAGVAR(hardcode_direct, $1)=no
6607698f425bSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6608698f425bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6609698f425bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6610698f425bSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6611698f425bSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6612698f425bSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
6613698f425bSmrg_LT_TAGVAR(inherit_rpath, $1)=no
6614698f425bSmrg_LT_TAGVAR(module_cmds, $1)=
6615698f425bSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
6616698f425bSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6617698f425bSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6618698f425bSmrg_LT_TAGVAR(no_undefined_flag, $1)=
6619698f425bSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6620698f425bSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6621266e564dSmrg
6622698f425bSmrg# Source file extension for f77 test sources.
6623698f425bSmrgac_ext=f
6624266e564dSmrg
6625698f425bSmrg# Object file extension for compiled f77 test sources.
6626698f425bSmrgobjext=o
6627698f425bSmrg_LT_TAGVAR(objext, $1)=$objext
6628698f425bSmrg
6629698f425bSmrg# No sense in running all these tests if we already determined that
6630698f425bSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
6631698f425bSmrg# are currently assumed to apply to all compilers on this platform,
6632698f425bSmrg# and will be corrupted by setting them based on a non-working compiler.
6633698f425bSmrgif test "$_lt_disable_F77" != yes; then
6634698f425bSmrg  # Code to be used in simple compile tests
6635698f425bSmrg  lt_simple_compile_test_code="\
6636698f425bSmrg      subroutine t
6637698f425bSmrg      return
6638698f425bSmrg      end
6639698f425bSmrg"
6640266e564dSmrg
6641698f425bSmrg  # Code to be used in simple link tests
6642698f425bSmrg  lt_simple_link_test_code="\
6643698f425bSmrg      program t
6644698f425bSmrg      end
6645698f425bSmrg"
6646266e564dSmrg
6647698f425bSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6648698f425bSmrg  _LT_TAG_COMPILER
6649266e564dSmrg
6650698f425bSmrg  # save warnings/boilerplate of simple test code
6651698f425bSmrg  _LT_COMPILER_BOILERPLATE
6652698f425bSmrg  _LT_LINKER_BOILERPLATE
6653266e564dSmrg
6654698f425bSmrg  # Allow CC to be a program name with arguments.
6655698f425bSmrg  lt_save_CC="$CC"
6656698f425bSmrg  lt_save_GCC=$GCC
6657698f425bSmrg  CC=${F77-"f77"}
6658698f425bSmrg  compiler=$CC
6659698f425bSmrg  _LT_TAGVAR(compiler, $1)=$CC
6660698f425bSmrg  _LT_CC_BASENAME([$compiler])
6661698f425bSmrg  GCC=$G77
6662698f425bSmrg  if test -n "$compiler"; then
6663698f425bSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
6664698f425bSmrg    AC_MSG_RESULT([$can_build_shared])
6665266e564dSmrg
6666698f425bSmrg    AC_MSG_CHECKING([whether to build shared libraries])
6667698f425bSmrg    test "$can_build_shared" = "no" && enable_shared=no
6668266e564dSmrg
6669698f425bSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
6670698f425bSmrg    # are all built from PIC.
6671698f425bSmrg    case $host_os in
6672698f425bSmrg      aix3*)
6673698f425bSmrg        test "$enable_shared" = yes && enable_static=no
6674698f425bSmrg        if test -n "$RANLIB"; then
6675698f425bSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6676698f425bSmrg          postinstall_cmds='$RANLIB $lib'
6677698f425bSmrg        fi
6678698f425bSmrg        ;;
6679698f425bSmrg      aix[[4-9]]*)
6680698f425bSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6681698f425bSmrg	  test "$enable_shared" = yes && enable_static=no
6682698f425bSmrg	fi
6683698f425bSmrg        ;;
6684698f425bSmrg    esac
6685698f425bSmrg    AC_MSG_RESULT([$enable_shared])
6686698f425bSmrg
6687698f425bSmrg    AC_MSG_CHECKING([whether to build static libraries])
6688698f425bSmrg    # Make sure either enable_shared or enable_static is yes.
6689698f425bSmrg    test "$enable_shared" = yes || enable_static=yes
6690698f425bSmrg    AC_MSG_RESULT([$enable_static])
6691698f425bSmrg
6692698f425bSmrg    _LT_TAGVAR(GCC, $1)="$G77"
6693698f425bSmrg    _LT_TAGVAR(LD, $1)="$LD"
6694698f425bSmrg
6695698f425bSmrg    ## CAVEAT EMPTOR:
6696698f425bSmrg    ## There is no encapsulation within the following macros, do not change
6697698f425bSmrg    ## the running order or otherwise move them around unless you know exactly
6698698f425bSmrg    ## what you are doing...
6699698f425bSmrg    _LT_COMPILER_PIC($1)
6700698f425bSmrg    _LT_COMPILER_C_O($1)
6701698f425bSmrg    _LT_COMPILER_FILE_LOCKS($1)
6702698f425bSmrg    _LT_LINKER_SHLIBS($1)
6703698f425bSmrg    _LT_SYS_DYNAMIC_LINKER($1)
6704698f425bSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6705698f425bSmrg
6706698f425bSmrg    _LT_CONFIG($1)
6707698f425bSmrg  fi # test -n "$compiler"
6708698f425bSmrg
6709698f425bSmrg  GCC=$lt_save_GCC
6710698f425bSmrg  CC="$lt_save_CC"
6711698f425bSmrgfi # test "$_lt_disable_F77" != yes
6712266e564dSmrg
6713698f425bSmrgAC_LANG_POP
6714698f425bSmrg])# _LT_LANG_F77_CONFIG
6715266e564dSmrg
6716266e564dSmrg
6717698f425bSmrg# _LT_PROG_FC
6718698f425bSmrg# -----------
6719698f425bSmrg# Since AC_PROG_FC is broken, in that it returns the empty string
6720698f425bSmrg# if there is no fortran compiler, we have our own version here.
6721698f425bSmrgm4_defun([_LT_PROG_FC],
6722698f425bSmrg[
6723698f425bSmrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6724698f425bSmrgAC_PROG_FC
6725698f425bSmrgif test -z "$FC" || test "X$FC" = "Xno"; then
6726698f425bSmrg  _lt_disable_FC=yes
6727698f425bSmrgfi
6728698f425bSmrgpopdef([AC_MSG_ERROR])
6729698f425bSmrg])# _LT_PROG_FC
6730266e564dSmrg
6731698f425bSmrgdnl aclocal-1.4 backwards compatibility:
6732698f425bSmrgdnl AC_DEFUN([_LT_PROG_FC], [])
6733266e564dSmrg
6734266e564dSmrg
6735698f425bSmrg# _LT_LANG_FC_CONFIG([TAG])
6736698f425bSmrg# -------------------------
6737698f425bSmrg# Ensure that the configuration variables for a Fortran compiler are
6738698f425bSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
6739698f425bSmrg# to write the compiler configuration to `libtool'.
6740698f425bSmrgm4_defun([_LT_LANG_FC_CONFIG],
6741698f425bSmrg[AC_REQUIRE([_LT_PROG_FC])dnl
6742698f425bSmrgAC_LANG_PUSH(Fortran)
6743698f425bSmrg
6744698f425bSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6745698f425bSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
6746698f425bSmrg_LT_TAGVAR(always_export_symbols, $1)=no
6747698f425bSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6748698f425bSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6749698f425bSmrg_LT_TAGVAR(hardcode_direct, $1)=no
6750698f425bSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6751698f425bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6752698f425bSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6753698f425bSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6754698f425bSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6755698f425bSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
6756698f425bSmrg_LT_TAGVAR(inherit_rpath, $1)=no
6757698f425bSmrg_LT_TAGVAR(module_cmds, $1)=
6758698f425bSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
6759698f425bSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6760698f425bSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6761698f425bSmrg_LT_TAGVAR(no_undefined_flag, $1)=
6762698f425bSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6763698f425bSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6764698f425bSmrg
6765698f425bSmrg# Source file extension for fc test sources.
6766698f425bSmrgac_ext=${ac_fc_srcext-f}
6767698f425bSmrg
6768698f425bSmrg# Object file extension for compiled fc test sources.
6769698f425bSmrgobjext=o
6770698f425bSmrg_LT_TAGVAR(objext, $1)=$objext
6771698f425bSmrg
6772698f425bSmrg# No sense in running all these tests if we already determined that
6773698f425bSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
6774698f425bSmrg# are currently assumed to apply to all compilers on this platform,
6775698f425bSmrg# and will be corrupted by setting them based on a non-working compiler.
6776698f425bSmrgif test "$_lt_disable_FC" != yes; then
6777698f425bSmrg  # Code to be used in simple compile tests
6778698f425bSmrg  lt_simple_compile_test_code="\
6779698f425bSmrg      subroutine t
6780698f425bSmrg      return
6781698f425bSmrg      end
6782698f425bSmrg"
6783266e564dSmrg
6784698f425bSmrg  # Code to be used in simple link tests
6785698f425bSmrg  lt_simple_link_test_code="\
6786698f425bSmrg      program t
6787698f425bSmrg      end
6788698f425bSmrg"
6789266e564dSmrg
6790698f425bSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6791698f425bSmrg  _LT_TAG_COMPILER
6792266e564dSmrg
6793698f425bSmrg  # save warnings/boilerplate of simple test code
6794698f425bSmrg  _LT_COMPILER_BOILERPLATE
6795698f425bSmrg  _LT_LINKER_BOILERPLATE
6796266e564dSmrg
6797698f425bSmrg  # Allow CC to be a program name with arguments.
6798698f425bSmrg  lt_save_CC="$CC"
6799698f425bSmrg  lt_save_GCC=$GCC
6800698f425bSmrg  CC=${FC-"f95"}
6801698f425bSmrg  compiler=$CC
6802698f425bSmrg  GCC=$ac_cv_fc_compiler_gnu
6803698f425bSmrg
6804698f425bSmrg  _LT_TAGVAR(compiler, $1)=$CC
6805698f425bSmrg  _LT_CC_BASENAME([$compiler])
6806698f425bSmrg
6807698f425bSmrg  if test -n "$compiler"; then
6808698f425bSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
6809698f425bSmrg    AC_MSG_RESULT([$can_build_shared])
6810266e564dSmrg
6811698f425bSmrg    AC_MSG_CHECKING([whether to build shared libraries])
6812698f425bSmrg    test "$can_build_shared" = "no" && enable_shared=no
6813698f425bSmrg
6814698f425bSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
6815698f425bSmrg    # are all built from PIC.
6816c5629e66Smrg    case $host_os in
6817698f425bSmrg      aix3*)
6818698f425bSmrg        test "$enable_shared" = yes && enable_static=no
6819698f425bSmrg        if test -n "$RANLIB"; then
6820698f425bSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
6821698f425bSmrg          postinstall_cmds='$RANLIB $lib'
6822698f425bSmrg        fi
6823698f425bSmrg        ;;
6824c5629e66Smrg      aix[[4-9]]*)
6825698f425bSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6826698f425bSmrg	  test "$enable_shared" = yes && enable_static=no
6827c5629e66Smrg	fi
6828698f425bSmrg        ;;
6829c5629e66Smrg    esac
6830698f425bSmrg    AC_MSG_RESULT([$enable_shared])
6831698f425bSmrg
6832698f425bSmrg    AC_MSG_CHECKING([whether to build static libraries])
6833698f425bSmrg    # Make sure either enable_shared or enable_static is yes.
6834698f425bSmrg    test "$enable_shared" = yes || enable_static=yes
6835698f425bSmrg    AC_MSG_RESULT([$enable_static])
6836698f425bSmrg
6837698f425bSmrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6838698f425bSmrg    _LT_TAGVAR(LD, $1)="$LD"
6839698f425bSmrg
6840698f425bSmrg    ## CAVEAT EMPTOR:
6841698f425bSmrg    ## There is no encapsulation within the following macros, do not change
6842698f425bSmrg    ## the running order or otherwise move them around unless you know exactly
6843698f425bSmrg    ## what you are doing...
6844698f425bSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
6845698f425bSmrg    _LT_COMPILER_PIC($1)
6846698f425bSmrg    _LT_COMPILER_C_O($1)
6847698f425bSmrg    _LT_COMPILER_FILE_LOCKS($1)
6848698f425bSmrg    _LT_LINKER_SHLIBS($1)
6849698f425bSmrg    _LT_SYS_DYNAMIC_LINKER($1)
6850698f425bSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
6851698f425bSmrg
6852698f425bSmrg    _LT_CONFIG($1)
6853698f425bSmrg  fi # test -n "$compiler"
6854698f425bSmrg
6855698f425bSmrg  GCC=$lt_save_GCC
6856698f425bSmrg  CC="$lt_save_CC"
6857698f425bSmrgfi # test "$_lt_disable_FC" != yes
6858266e564dSmrg
6859698f425bSmrgAC_LANG_POP
6860698f425bSmrg])# _LT_LANG_FC_CONFIG
6861266e564dSmrg
6862266e564dSmrg
6863698f425bSmrg# _LT_LANG_GCJ_CONFIG([TAG])
6864698f425bSmrg# --------------------------
6865698f425bSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
6866698f425bSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
6867698f425bSmrg# to write the compiler configuration to `libtool'.
6868698f425bSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
6869698f425bSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
6870698f425bSmrgAC_LANG_SAVE
6871266e564dSmrg
6872698f425bSmrg# Source file extension for Java test sources.
6873698f425bSmrgac_ext=java
6874266e564dSmrg
6875698f425bSmrg# Object file extension for compiled Java test sources.
6876698f425bSmrgobjext=o
6877698f425bSmrg_LT_TAGVAR(objext, $1)=$objext
6878266e564dSmrg
6879698f425bSmrg# Code to be used in simple compile tests
6880698f425bSmrglt_simple_compile_test_code="class foo {}"
6881266e564dSmrg
6882698f425bSmrg# Code to be used in simple link tests
6883698f425bSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
6884266e564dSmrg
6885698f425bSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6886698f425bSmrg_LT_TAG_COMPILER
6887266e564dSmrg
6888698f425bSmrg# save warnings/boilerplate of simple test code
6889698f425bSmrg_LT_COMPILER_BOILERPLATE
6890698f425bSmrg_LT_LINKER_BOILERPLATE
6891266e564dSmrg
6892698f425bSmrg# Allow CC to be a program name with arguments.
6893698f425bSmrglt_save_CC="$CC"
6894698f425bSmrglt_save_GCC=$GCC
6895698f425bSmrgGCC=yes
6896698f425bSmrgCC=${GCJ-"gcj"}
6897698f425bSmrgcompiler=$CC
6898698f425bSmrg_LT_TAGVAR(compiler, $1)=$CC
6899698f425bSmrg_LT_TAGVAR(LD, $1)="$LD"
6900698f425bSmrg_LT_CC_BASENAME([$compiler])
6901266e564dSmrg
6902698f425bSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
6903698f425bSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6904c5629e66Smrg
6905698f425bSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6906266e564dSmrg
6907698f425bSmrgif test -n "$compiler"; then
6908698f425bSmrg  _LT_COMPILER_NO_RTTI($1)
6909698f425bSmrg  _LT_COMPILER_PIC($1)
6910698f425bSmrg  _LT_COMPILER_C_O($1)
6911698f425bSmrg  _LT_COMPILER_FILE_LOCKS($1)
6912698f425bSmrg  _LT_LINKER_SHLIBS($1)
6913698f425bSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
6914266e564dSmrg
6915698f425bSmrg  _LT_CONFIG($1)
6916698f425bSmrgfi
6917266e564dSmrg
6918698f425bSmrgAC_LANG_RESTORE
6919266e564dSmrg
6920698f425bSmrgGCC=$lt_save_GCC
6921698f425bSmrgCC="$lt_save_CC"
6922698f425bSmrg])# _LT_LANG_GCJ_CONFIG
6923266e564dSmrg
6924266e564dSmrg
6925698f425bSmrg# _LT_LANG_RC_CONFIG([TAG])
6926698f425bSmrg# -------------------------
6927698f425bSmrg# Ensure that the configuration variables for the Windows resource compiler
6928698f425bSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
6929698f425bSmrg# to write the compiler configuration to `libtool'.
6930698f425bSmrgm4_defun([_LT_LANG_RC_CONFIG],
6931698f425bSmrg[AC_REQUIRE([LT_PROG_RC])dnl
6932698f425bSmrgAC_LANG_SAVE
6933266e564dSmrg
6934698f425bSmrg# Source file extension for RC test sources.
6935698f425bSmrgac_ext=rc
6936266e564dSmrg
6937698f425bSmrg# Object file extension for compiled RC test sources.
6938698f425bSmrgobjext=o
6939698f425bSmrg_LT_TAGVAR(objext, $1)=$objext
6940266e564dSmrg
6941698f425bSmrg# Code to be used in simple compile tests
6942698f425bSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
6943266e564dSmrg
6944698f425bSmrg# Code to be used in simple link tests
6945698f425bSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
6946266e564dSmrg
6947698f425bSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
6948698f425bSmrg_LT_TAG_COMPILER
6949266e564dSmrg
6950698f425bSmrg# save warnings/boilerplate of simple test code
6951698f425bSmrg_LT_COMPILER_BOILERPLATE
6952698f425bSmrg_LT_LINKER_BOILERPLATE
6953266e564dSmrg
6954698f425bSmrg# Allow CC to be a program name with arguments.
6955698f425bSmrglt_save_CC="$CC"
6956698f425bSmrglt_save_GCC=$GCC
6957698f425bSmrgGCC=
6958698f425bSmrgCC=${RC-"windres"}
6959698f425bSmrgcompiler=$CC
6960698f425bSmrg_LT_TAGVAR(compiler, $1)=$CC
6961698f425bSmrg_LT_CC_BASENAME([$compiler])
6962698f425bSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6963266e564dSmrg
6964698f425bSmrgif test -n "$compiler"; then
6965698f425bSmrg  :
6966698f425bSmrg  _LT_CONFIG($1)
6967c5629e66Smrgfi
6968266e564dSmrg
6969698f425bSmrgGCC=$lt_save_GCC
6970698f425bSmrgAC_LANG_RESTORE
6971698f425bSmrgCC="$lt_save_CC"
6972698f425bSmrg])# _LT_LANG_RC_CONFIG
6973266e564dSmrg
6974266e564dSmrg
6975698f425bSmrg# LT_PROG_GCJ
6976698f425bSmrg# -----------
6977698f425bSmrgAC_DEFUN([LT_PROG_GCJ],
6978698f425bSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6979698f425bSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6980698f425bSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
6981698f425bSmrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6982698f425bSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
6983698f425bSmrg])
6984266e564dSmrg
6985698f425bSmrg# Old name:
6986698f425bSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
6987698f425bSmrgdnl aclocal-1.4 backwards compatibility:
6988698f425bSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
6989266e564dSmrg
6990266e564dSmrg
6991698f425bSmrg# LT_PROG_RC
6992698f425bSmrg# ----------
6993698f425bSmrgAC_DEFUN([LT_PROG_RC],
6994698f425bSmrg[AC_CHECK_TOOL(RC, windres,)
6995698f425bSmrg])
6996266e564dSmrg
6997698f425bSmrg# Old name:
6998698f425bSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
6999698f425bSmrgdnl aclocal-1.4 backwards compatibility:
7000698f425bSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
7001266e564dSmrg
7002266e564dSmrg
7003698f425bSmrg# _LT_DECL_EGREP
7004698f425bSmrg# --------------
7005698f425bSmrg# If we don't have a new enough Autoconf to choose the best grep
7006698f425bSmrg# available, choose the one first in the user's PATH.
7007698f425bSmrgm4_defun([_LT_DECL_EGREP],
7008698f425bSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
7009698f425bSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
7010698f425bSmrgtest -z "$GREP" && GREP=grep
7011698f425bSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7012698f425bSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
7013698f425bSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
7014698f425bSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7015698f425bSmrgAC_SUBST([GREP])
7016698f425bSmrg])
7017266e564dSmrg
7018266e564dSmrg
7019698f425bSmrg# _LT_DECL_OBJDUMP
7020698f425bSmrg# --------------
7021698f425bSmrg# If we don't have a new enough Autoconf to choose the best objdump
7022698f425bSmrg# available, choose the one first in the user's PATH.
7023698f425bSmrgm4_defun([_LT_DECL_OBJDUMP],
7024698f425bSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7025698f425bSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
7026698f425bSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7027698f425bSmrgAC_SUBST([OBJDUMP])
7028698f425bSmrg])
7029266e564dSmrg
7030266e564dSmrg
7031698f425bSmrg# _LT_DECL_SED
7032698f425bSmrg# ------------
7033698f425bSmrg# Check for a fully-functional sed program, that truncates
7034698f425bSmrg# as few characters as possible.  Prefer GNU sed if found.
7035698f425bSmrgm4_defun([_LT_DECL_SED],
7036698f425bSmrg[AC_PROG_SED
7037698f425bSmrgtest -z "$SED" && SED=sed
7038698f425bSmrgXsed="$SED -e 1s/^X//"
7039698f425bSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7040698f425bSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7041698f425bSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7042698f425bSmrg])# _LT_DECL_SED
7043266e564dSmrg
7044698f425bSmrgm4_ifndef([AC_PROG_SED], [
7045698f425bSmrg# NOTE: This macro has been submitted for inclusion into   #
7046698f425bSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7047698f425bSmrg#  a released version of Autoconf we should remove this    #
7048698f425bSmrg#  macro and use it instead.                               #
7049266e564dSmrg
7050698f425bSmrgm4_defun([AC_PROG_SED],
7051698f425bSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
7052698f425bSmrgAC_CACHE_VAL(lt_cv_path_SED,
7053698f425bSmrg[# Loop through the user's path and test for sed and gsed.
7054698f425bSmrg# Then use that list of sed's as ones to test for truncation.
7055698f425bSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7056698f425bSmrgfor as_dir in $PATH
7057698f425bSmrgdo
7058698f425bSmrg  IFS=$as_save_IFS
7059698f425bSmrg  test -z "$as_dir" && as_dir=.
7060698f425bSmrg  for lt_ac_prog in sed gsed; do
7061698f425bSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
7062698f425bSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7063698f425bSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7064c5629e66Smrg      fi
7065698f425bSmrg    done
7066698f425bSmrg  done
7067698f425bSmrgdone
7068698f425bSmrgIFS=$as_save_IFS
7069698f425bSmrglt_ac_max=0
7070698f425bSmrglt_ac_count=0
7071698f425bSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7072698f425bSmrg# along with /bin/sed that truncates output.
7073698f425bSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7074698f425bSmrg  test ! -f $lt_ac_sed && continue
7075698f425bSmrg  cat /dev/null > conftest.in
7076698f425bSmrg  lt_ac_count=0
7077698f425bSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7078698f425bSmrg  # Check for GNU sed and select it if it is found.
7079698f425bSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7080698f425bSmrg    lt_cv_path_SED=$lt_ac_sed
7081698f425bSmrg    break
7082698f425bSmrg  fi
7083698f425bSmrg  while true; do
7084698f425bSmrg    cat conftest.in conftest.in >conftest.tmp
7085698f425bSmrg    mv conftest.tmp conftest.in
7086698f425bSmrg    cp conftest.in conftest.nl
7087698f425bSmrg    echo >>conftest.nl
7088698f425bSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7089698f425bSmrg    cmp -s conftest.out conftest.nl || break
7090698f425bSmrg    # 10000 chars as input seems more than enough
7091698f425bSmrg    test $lt_ac_count -gt 10 && break
7092698f425bSmrg    lt_ac_count=`expr $lt_ac_count + 1`
7093698f425bSmrg    if test $lt_ac_count -gt $lt_ac_max; then
7094698f425bSmrg      lt_ac_max=$lt_ac_count
7095698f425bSmrg      lt_cv_path_SED=$lt_ac_sed
7096698f425bSmrg    fi
7097698f425bSmrg  done
7098698f425bSmrgdone
7099698f425bSmrg])
7100698f425bSmrgSED=$lt_cv_path_SED
7101698f425bSmrgAC_SUBST([SED])
7102698f425bSmrgAC_MSG_RESULT([$SED])
7103698f425bSmrg])#AC_PROG_SED
7104698f425bSmrg])#m4_ifndef
7105266e564dSmrg
7106698f425bSmrg# Old name:
7107698f425bSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7108698f425bSmrgdnl aclocal-1.4 backwards compatibility:
7109698f425bSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
7110266e564dSmrg
7111266e564dSmrg
7112698f425bSmrg# _LT_CHECK_SHELL_FEATURES
7113698f425bSmrg# ------------------------
7114698f425bSmrg# Find out whether the shell is Bourne or XSI compatible,
7115698f425bSmrg# or has some other useful features.
7116698f425bSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
7117698f425bSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7118698f425bSmrg# Try some XSI features
7119698f425bSmrgxsi_shell=no
7120698f425bSmrg( _lt_dummy="a/b/c"
7121698f425bSmrg  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7122698f425bSmrg      = c,a/b,, \
7123698f425bSmrg    && eval 'test $(( 1 + 1 )) -eq 2 \
7124698f425bSmrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7125698f425bSmrg  && xsi_shell=yes
7126698f425bSmrgAC_MSG_RESULT([$xsi_shell])
7127698f425bSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7128698f425bSmrg
7129698f425bSmrgAC_MSG_CHECKING([whether the shell understands "+="])
7130698f425bSmrglt_shell_append=no
7131698f425bSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7132698f425bSmrg    >/dev/null 2>&1 \
7133698f425bSmrg  && lt_shell_append=yes
7134698f425bSmrgAC_MSG_RESULT([$lt_shell_append])
7135698f425bSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7136698f425bSmrg
7137698f425bSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7138698f425bSmrg  lt_unset=unset
7139698f425bSmrgelse
7140698f425bSmrg  lt_unset=false
7141698f425bSmrgfi
7142698f425bSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7143698f425bSmrg
7144698f425bSmrg# test EBCDIC or ASCII
7145698f425bSmrgcase `echo X|tr X '\101'` in
7146698f425bSmrg A) # ASCII based system
7147698f425bSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7148698f425bSmrg  lt_SP2NL='tr \040 \012'
7149698f425bSmrg  lt_NL2SP='tr \015\012 \040\040'
7150698f425bSmrg  ;;
7151698f425bSmrg *) # EBCDIC based system
7152698f425bSmrg  lt_SP2NL='tr \100 \n'
7153698f425bSmrg  lt_NL2SP='tr \r\n \100\100'
7154698f425bSmrg  ;;
7155698f425bSmrgesac
7156698f425bSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7157698f425bSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7158698f425bSmrg])# _LT_CHECK_SHELL_FEATURES
7159266e564dSmrg
7160266e564dSmrg
7161698f425bSmrg# _LT_PROG_XSI_SHELLFNS
7162698f425bSmrg# ---------------------
7163698f425bSmrg# Bourne and XSI compatible variants of some useful shell functions.
7164698f425bSmrgm4_defun([_LT_PROG_XSI_SHELLFNS],
7165698f425bSmrg[case $xsi_shell in
7166698f425bSmrg  yes)
7167698f425bSmrg    cat << \_LT_EOF >> "$cfgfile"
7168698f425bSmrg
7169698f425bSmrg# func_dirname file append nondir_replacement
7170698f425bSmrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7171698f425bSmrg# otherwise set result to NONDIR_REPLACEMENT.
7172698f425bSmrgfunc_dirname ()
7173698f425bSmrg{
7174698f425bSmrg  case ${1} in
7175698f425bSmrg    */*) func_dirname_result="${1%/*}${2}" ;;
7176698f425bSmrg    *  ) func_dirname_result="${3}" ;;
7177698f425bSmrg  esac
7178698f425bSmrg}
7179266e564dSmrg
7180698f425bSmrg# func_basename file
7181698f425bSmrgfunc_basename ()
7182698f425bSmrg{
7183698f425bSmrg  func_basename_result="${1##*/}"
7184698f425bSmrg}
7185266e564dSmrg
7186698f425bSmrg# func_dirname_and_basename file append nondir_replacement
7187698f425bSmrg# perform func_basename and func_dirname in a single function
7188698f425bSmrg# call:
7189698f425bSmrg#   dirname:  Compute the dirname of FILE.  If nonempty,
7190698f425bSmrg#             add APPEND to the result, otherwise set result
7191698f425bSmrg#             to NONDIR_REPLACEMENT.
7192698f425bSmrg#             value returned in "$func_dirname_result"
7193698f425bSmrg#   basename: Compute filename of FILE.
7194698f425bSmrg#             value retuned in "$func_basename_result"
7195698f425bSmrg# Implementation must be kept synchronized with func_dirname
7196698f425bSmrg# and func_basename. For efficiency, we do not delegate to
7197698f425bSmrg# those functions but instead duplicate the functionality here.
7198698f425bSmrgfunc_dirname_and_basename ()
7199698f425bSmrg{
7200698f425bSmrg  case ${1} in
7201698f425bSmrg    */*) func_dirname_result="${1%/*}${2}" ;;
7202698f425bSmrg    *  ) func_dirname_result="${3}" ;;
7203698f425bSmrg  esac
7204698f425bSmrg  func_basename_result="${1##*/}"
7205698f425bSmrg}
7206266e564dSmrg
7207698f425bSmrg# func_stripname prefix suffix name
7208698f425bSmrg# strip PREFIX and SUFFIX off of NAME.
7209698f425bSmrg# PREFIX and SUFFIX must not contain globbing or regex special
7210698f425bSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7211698f425bSmrg# dot (in which case that matches only a dot).
7212698f425bSmrgfunc_stripname ()
7213698f425bSmrg{
7214698f425bSmrg  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7215698f425bSmrg  # positional parameters, so assign one to ordinary parameter first.
7216698f425bSmrg  func_stripname_result=${3}
7217698f425bSmrg  func_stripname_result=${func_stripname_result#"${1}"}
7218698f425bSmrg  func_stripname_result=${func_stripname_result%"${2}"}
7219698f425bSmrg}
7220c5629e66Smrg
7221698f425bSmrg# func_opt_split
7222698f425bSmrgfunc_opt_split ()
7223698f425bSmrg{
7224698f425bSmrg  func_opt_split_opt=${1%%=*}
7225698f425bSmrg  func_opt_split_arg=${1#*=}
7226698f425bSmrg}
7227266e564dSmrg
7228698f425bSmrg# func_lo2o object
7229698f425bSmrgfunc_lo2o ()
7230698f425bSmrg{
7231698f425bSmrg  case ${1} in
7232698f425bSmrg    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7233698f425bSmrg    *)    func_lo2o_result=${1} ;;
7234698f425bSmrg  esac
7235698f425bSmrg}
7236266e564dSmrg
7237698f425bSmrg# func_xform libobj-or-source
7238698f425bSmrgfunc_xform ()
7239698f425bSmrg{
7240698f425bSmrg  func_xform_result=${1%.*}.lo
7241698f425bSmrg}
7242266e564dSmrg
7243698f425bSmrg# func_arith arithmetic-term...
7244698f425bSmrgfunc_arith ()
7245698f425bSmrg{
7246698f425bSmrg  func_arith_result=$(( $[*] ))
7247698f425bSmrg}
7248266e564dSmrg
7249698f425bSmrg# func_len string
7250698f425bSmrg# STRING may not start with a hyphen.
7251698f425bSmrgfunc_len ()
7252698f425bSmrg{
7253698f425bSmrg  func_len_result=${#1}
7254698f425bSmrg}
7255266e564dSmrg
7256698f425bSmrg_LT_EOF
7257698f425bSmrg    ;;
7258698f425bSmrg  *) # Bourne compatible functions.
7259698f425bSmrg    cat << \_LT_EOF >> "$cfgfile"
7260266e564dSmrg
7261698f425bSmrg# func_dirname file append nondir_replacement
7262698f425bSmrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
7263698f425bSmrg# otherwise set result to NONDIR_REPLACEMENT.
7264698f425bSmrgfunc_dirname ()
7265698f425bSmrg{
7266698f425bSmrg  # Extract subdirectory from the argument.
7267698f425bSmrg  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7268698f425bSmrg  if test "X$func_dirname_result" = "X${1}"; then
7269698f425bSmrg    func_dirname_result="${3}"
7270698f425bSmrg  else
7271698f425bSmrg    func_dirname_result="$func_dirname_result${2}"
7272698f425bSmrg  fi
7273698f425bSmrg}
7274266e564dSmrg
7275698f425bSmrg# func_basename file
7276698f425bSmrgfunc_basename ()
7277698f425bSmrg{
7278698f425bSmrg  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7279698f425bSmrg}
7280266e564dSmrg
7281698f425bSmrgdnl func_dirname_and_basename
7282698f425bSmrgdnl A portable version of this function is already defined in general.m4sh
7283698f425bSmrgdnl so there is no need for it here.
7284698f425bSmrg
7285698f425bSmrg# func_stripname prefix suffix name
7286698f425bSmrg# strip PREFIX and SUFFIX off of NAME.
7287698f425bSmrg# PREFIX and SUFFIX must not contain globbing or regex special
7288698f425bSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7289698f425bSmrg# dot (in which case that matches only a dot).
7290698f425bSmrg# func_strip_suffix prefix name
7291698f425bSmrgfunc_stripname ()
7292698f425bSmrg{
7293698f425bSmrg  case ${2} in
7294698f425bSmrg    .*) func_stripname_result=`$ECHO "X${3}" \
7295698f425bSmrg           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7296698f425bSmrg    *)  func_stripname_result=`$ECHO "X${3}" \
7297698f425bSmrg           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7298698f425bSmrg  esac
7299698f425bSmrg}
7300266e564dSmrg
7301698f425bSmrg# sed scripts:
7302698f425bSmrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7303698f425bSmrgmy_sed_long_arg='1s/^-[[^=]]*=//'
7304266e564dSmrg
7305698f425bSmrg# func_opt_split
7306698f425bSmrgfunc_opt_split ()
7307698f425bSmrg{
7308698f425bSmrg  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7309698f425bSmrg  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7310698f425bSmrg}
7311266e564dSmrg
7312698f425bSmrg# func_lo2o object
7313698f425bSmrgfunc_lo2o ()
7314698f425bSmrg{
7315698f425bSmrg  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7316698f425bSmrg}
7317266e564dSmrg
7318698f425bSmrg# func_xform libobj-or-source
7319698f425bSmrgfunc_xform ()
7320698f425bSmrg{
7321698f425bSmrg  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
7322698f425bSmrg}
7323266e564dSmrg
7324698f425bSmrg# func_arith arithmetic-term...
7325698f425bSmrgfunc_arith ()
7326698f425bSmrg{
7327698f425bSmrg  func_arith_result=`expr "$[@]"`
7328698f425bSmrg}
7329266e564dSmrg
7330698f425bSmrg# func_len string
7331698f425bSmrg# STRING may not start with a hyphen.
7332698f425bSmrgfunc_len ()
7333698f425bSmrg{
7334698f425bSmrg  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
7335698f425bSmrg}
7336266e564dSmrg
7337698f425bSmrg_LT_EOF
7338698f425bSmrgesac
7339266e564dSmrg
7340698f425bSmrgcase $lt_shell_append in
7341698f425bSmrg  yes)
7342698f425bSmrg    cat << \_LT_EOF >> "$cfgfile"
7343266e564dSmrg
7344698f425bSmrg# func_append var value
7345698f425bSmrg# Append VALUE to the end of shell variable VAR.
7346698f425bSmrgfunc_append ()
7347698f425bSmrg{
7348698f425bSmrg  eval "$[1]+=\$[2]"
7349698f425bSmrg}
7350698f425bSmrg_LT_EOF
7351698f425bSmrg    ;;
7352698f425bSmrg  *)
7353698f425bSmrg    cat << \_LT_EOF >> "$cfgfile"
7354266e564dSmrg
7355698f425bSmrg# func_append var value
7356698f425bSmrg# Append VALUE to the end of shell variable VAR.
7357698f425bSmrgfunc_append ()
7358698f425bSmrg{
7359698f425bSmrg  eval "$[1]=\$$[1]\$[2]"
7360698f425bSmrg}
7361266e564dSmrg
7362698f425bSmrg_LT_EOF
7363698f425bSmrg    ;;
7364698f425bSmrg  esac
7365698f425bSmrg])
7366266e564dSmrg
7367698f425bSmrg# Helper functions for option handling.                    -*- Autoconf -*-
7368698f425bSmrg#
7369698f425bSmrg#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7370698f425bSmrg#   Written by Gary V. Vaughan, 2004
7371698f425bSmrg#
7372698f425bSmrg# This file is free software; the Free Software Foundation gives
7373698f425bSmrg# unlimited permission to copy and/or distribute it, with or without
7374698f425bSmrg# modifications, as long as this notice is preserved.
7375266e564dSmrg
7376698f425bSmrg# serial 6 ltoptions.m4
7377266e564dSmrg
7378698f425bSmrg# This is to help aclocal find these macros, as it can't see m4_define.
7379698f425bSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7380266e564dSmrg
7381266e564dSmrg
7382698f425bSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
7383698f425bSmrg# ------------------------------------------
7384698f425bSmrgm4_define([_LT_MANGLE_OPTION],
7385698f425bSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
7386c5629e66Smrg
7387c5629e66Smrg
7388698f425bSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
7389698f425bSmrg# ---------------------------------------
7390698f425bSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
7391698f425bSmrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
7392698f425bSmrg# saved as a flag.
7393698f425bSmrgm4_define([_LT_SET_OPTION],
7394698f425bSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
7395698f425bSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
7396698f425bSmrg        _LT_MANGLE_DEFUN([$1], [$2]),
7397698f425bSmrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
7398698f425bSmrg])
7399c5629e66Smrg
7400c5629e66Smrg
7401698f425bSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
7402698f425bSmrg# ------------------------------------------------------------
7403698f425bSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7404698f425bSmrgm4_define([_LT_IF_OPTION],
7405698f425bSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
7406698f425bSmrg
7407698f425bSmrg
7408698f425bSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
7409698f425bSmrg# -------------------------------------------------------
7410698f425bSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
7411698f425bSmrg# are set.
7412698f425bSmrgm4_define([_LT_UNLESS_OPTIONS],
7413698f425bSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7414698f425bSmrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
7415698f425bSmrg		      [m4_define([$0_found])])])[]dnl
7416698f425bSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
7417698f425bSmrg])[]dnl
7418698f425bSmrg])
7419c5629e66Smrg
7420c5629e66Smrg
7421698f425bSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
7422698f425bSmrg# ----------------------------------------
7423698f425bSmrg# OPTION-LIST is a space-separated list of Libtool options associated
7424698f425bSmrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
7425698f425bSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
7426698f425bSmrg# the unknown option and exit.
7427698f425bSmrgm4_defun([_LT_SET_OPTIONS],
7428698f425bSmrg[# Set options
7429698f425bSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
7430698f425bSmrg    [_LT_SET_OPTION([$1], _LT_Option)])
7431698f425bSmrg
7432698f425bSmrgm4_if([$1],[LT_INIT],[
7433698f425bSmrg  dnl
7434698f425bSmrg  dnl Simply set some default values (i.e off) if boolean options were not
7435698f425bSmrg  dnl specified:
7436698f425bSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
7437698f425bSmrg  ])
7438698f425bSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
7439698f425bSmrg  ])
7440698f425bSmrg  dnl
7441698f425bSmrg  dnl If no reference was made to various pairs of opposing options, then
7442698f425bSmrg  dnl we run the default mode handler for the pair.  For example, if neither
7443698f425bSmrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
7444698f425bSmrg  dnl archives by default:
7445698f425bSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
7446698f425bSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
7447698f425bSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
7448698f425bSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
7449698f425bSmrg  		   [_LT_ENABLE_FAST_INSTALL])
7450698f425bSmrg  ])
7451698f425bSmrg])# _LT_SET_OPTIONS
7452c5629e66Smrg
7453c5629e66Smrg
7454c5629e66Smrg
7455698f425bSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
7456698f425bSmrg# -----------------------------------------
7457698f425bSmrgm4_define([_LT_MANGLE_DEFUN],
7458698f425bSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
7459c5629e66Smrg
7460c5629e66Smrg
7461698f425bSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
7462698f425bSmrg# -----------------------------------------------
7463698f425bSmrgm4_define([LT_OPTION_DEFINE],
7464698f425bSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
7465698f425bSmrg])# LT_OPTION_DEFINE
7466c5629e66Smrg
7467c5629e66Smrg
7468698f425bSmrg# dlopen
7469698f425bSmrg# ------
7470698f425bSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
7471698f425bSmrg])
7472c5629e66Smrg
7473698f425bSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
7474698f425bSmrg[_LT_SET_OPTION([LT_INIT], [dlopen])
7475698f425bSmrgAC_DIAGNOSE([obsolete],
7476698f425bSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7477698f425bSmrgput the `dlopen' option into LT_INIT's first parameter.])
7478698f425bSmrg])
7479c5629e66Smrg
7480698f425bSmrgdnl aclocal-1.4 backwards compatibility:
7481698f425bSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
7482c5629e66Smrg
7483c5629e66Smrg
7484698f425bSmrg# win32-dll
7485698f425bSmrg# ---------
7486698f425bSmrg# Declare package support for building win32 dll's.
7487698f425bSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
7488698f425bSmrg[enable_win32_dll=yes
7489698f425bSmrg
7490698f425bSmrgcase $host in
7491698f425bSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
7492698f425bSmrg  AC_CHECK_TOOL(AS, as, false)
7493698f425bSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7494698f425bSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
7495698f425bSmrg  ;;
7496698f425bSmrgesac
7497698f425bSmrg
7498698f425bSmrgtest -z "$AS" && AS=as
7499698f425bSmrg_LT_DECL([], [AS],      [0], [Assembler program])dnl
7500698f425bSmrg
7501698f425bSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
7502698f425bSmrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
7503698f425bSmrg
7504698f425bSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
7505698f425bSmrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
7506698f425bSmrg])# win32-dll
7507698f425bSmrg
7508698f425bSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
7509698f425bSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
7510698f425bSmrg_LT_SET_OPTION([LT_INIT], [win32-dll])
7511698f425bSmrgAC_DIAGNOSE([obsolete],
7512698f425bSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7513698f425bSmrgput the `win32-dll' option into LT_INIT's first parameter.])
7514698f425bSmrg])
7515698f425bSmrg
7516698f425bSmrgdnl aclocal-1.4 backwards compatibility:
7517698f425bSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
7518c5629e66Smrg
7519c5629e66Smrg
7520698f425bSmrg# _LT_ENABLE_SHARED([DEFAULT])
7521698f425bSmrg# ----------------------------
7522698f425bSmrg# implement the --enable-shared flag, and supports the `shared' and
7523698f425bSmrg# `disable-shared' LT_INIT options.
7524698f425bSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7525698f425bSmrgm4_define([_LT_ENABLE_SHARED],
7526698f425bSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
7527698f425bSmrgAC_ARG_ENABLE([shared],
7528698f425bSmrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7529698f425bSmrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
7530698f425bSmrg    [p=${PACKAGE-default}
7531698f425bSmrg    case $enableval in
7532698f425bSmrg    yes) enable_shared=yes ;;
7533698f425bSmrg    no) enable_shared=no ;;
7534c5629e66Smrg    *)
7535698f425bSmrg      enable_shared=no
7536698f425bSmrg      # Look at the argument we got.  We use all the common list separators.
7537698f425bSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7538698f425bSmrg      for pkg in $enableval; do
7539698f425bSmrg	IFS="$lt_save_ifs"
7540698f425bSmrg	if test "X$pkg" = "X$p"; then
7541698f425bSmrg	  enable_shared=yes
7542698f425bSmrg	fi
7543698f425bSmrg      done
7544698f425bSmrg      IFS="$lt_save_ifs"
7545c5629e66Smrg      ;;
7546698f425bSmrg    esac],
7547698f425bSmrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
7548698f425bSmrg
7549698f425bSmrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
7550698f425bSmrg	[Whether or not to build shared libraries])
7551698f425bSmrg])# _LT_ENABLE_SHARED
7552698f425bSmrg
7553698f425bSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
7554698f425bSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
7555698f425bSmrg
7556698f425bSmrg# Old names:
7557698f425bSmrgAC_DEFUN([AC_ENABLE_SHARED],
7558698f425bSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
7559c5629e66Smrg])
7560c5629e66Smrg
7561698f425bSmrgAC_DEFUN([AC_DISABLE_SHARED],
7562698f425bSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
7563698f425bSmrg])
7564c5629e66Smrg
7565698f425bSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7566698f425bSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7567698f425bSmrg
7568698f425bSmrgdnl aclocal-1.4 backwards compatibility:
7569698f425bSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
7570698f425bSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
7571698f425bSmrg
7572698f425bSmrg
7573698f425bSmrg
7574698f425bSmrg# _LT_ENABLE_STATIC([DEFAULT])
7575698f425bSmrg# ----------------------------
7576698f425bSmrg# implement the --enable-static flag, and support the `static' and
7577698f425bSmrg# `disable-static' LT_INIT options.
7578698f425bSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7579698f425bSmrgm4_define([_LT_ENABLE_STATIC],
7580698f425bSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
7581698f425bSmrgAC_ARG_ENABLE([static],
7582698f425bSmrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7583698f425bSmrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
7584698f425bSmrg    [p=${PACKAGE-default}
7585698f425bSmrg    case $enableval in
7586698f425bSmrg    yes) enable_static=yes ;;
7587698f425bSmrg    no) enable_static=no ;;
7588698f425bSmrg    *)
7589698f425bSmrg     enable_static=no
7590698f425bSmrg      # Look at the argument we got.  We use all the common list separators.
7591698f425bSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7592698f425bSmrg      for pkg in $enableval; do
7593698f425bSmrg	IFS="$lt_save_ifs"
7594698f425bSmrg	if test "X$pkg" = "X$p"; then
7595698f425bSmrg	  enable_static=yes
7596698f425bSmrg	fi
7597698f425bSmrg      done
7598698f425bSmrg      IFS="$lt_save_ifs"
7599c5629e66Smrg      ;;
7600698f425bSmrg    esac],
7601698f425bSmrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
7602c5629e66Smrg
7603698f425bSmrg    _LT_DECL([build_old_libs], [enable_static], [0],
7604698f425bSmrg	[Whether or not to build static libraries])
7605698f425bSmrg])# _LT_ENABLE_STATIC
7606698f425bSmrg
7607698f425bSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
7608698f425bSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
7609698f425bSmrg
7610698f425bSmrg# Old names:
7611698f425bSmrgAC_DEFUN([AC_ENABLE_STATIC],
7612698f425bSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
7613698f425bSmrg])
7614698f425bSmrg
7615698f425bSmrgAC_DEFUN([AC_DISABLE_STATIC],
7616698f425bSmrg[_LT_SET_OPTION([LT_INIT], [disable-static])
7617698f425bSmrg])
7618698f425bSmrg
7619698f425bSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7620698f425bSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7621698f425bSmrg
7622698f425bSmrgdnl aclocal-1.4 backwards compatibility:
7623698f425bSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
7624698f425bSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
7625698f425bSmrg
7626698f425bSmrg
7627698f425bSmrg
7628698f425bSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
7629698f425bSmrg# ----------------------------------
7630698f425bSmrg# implement the --enable-fast-install flag, and support the `fast-install'
7631698f425bSmrg# and `disable-fast-install' LT_INIT options.
7632698f425bSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
7633698f425bSmrgm4_define([_LT_ENABLE_FAST_INSTALL],
7634698f425bSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
7635698f425bSmrgAC_ARG_ENABLE([fast-install],
7636698f425bSmrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7637698f425bSmrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7638698f425bSmrg    [p=${PACKAGE-default}
7639698f425bSmrg    case $enableval in
7640698f425bSmrg    yes) enable_fast_install=yes ;;
7641698f425bSmrg    no) enable_fast_install=no ;;
7642698f425bSmrg    *)
7643698f425bSmrg      enable_fast_install=no
7644698f425bSmrg      # Look at the argument we got.  We use all the common list separators.
7645698f425bSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7646698f425bSmrg      for pkg in $enableval; do
7647698f425bSmrg	IFS="$lt_save_ifs"
7648698f425bSmrg	if test "X$pkg" = "X$p"; then
7649698f425bSmrg	  enable_fast_install=yes
7650698f425bSmrg	fi
7651698f425bSmrg      done
7652698f425bSmrg      IFS="$lt_save_ifs"
7653c5629e66Smrg      ;;
7654698f425bSmrg    esac],
7655698f425bSmrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
7656c5629e66Smrg
7657698f425bSmrg_LT_DECL([fast_install], [enable_fast_install], [0],
7658698f425bSmrg	 [Whether or not to optimize for fast installation])dnl
7659698f425bSmrg])# _LT_ENABLE_FAST_INSTALL
7660c5629e66Smrg
7661698f425bSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
7662698f425bSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
7663698f425bSmrg
7664698f425bSmrg# Old names:
7665698f425bSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
7666698f425bSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
7667698f425bSmrgAC_DIAGNOSE([obsolete],
7668698f425bSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
7669698f425bSmrgthe `fast-install' option into LT_INIT's first parameter.])
7670698f425bSmrg])
7671698f425bSmrg
7672698f425bSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
7673698f425bSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
7674698f425bSmrgAC_DIAGNOSE([obsolete],
7675698f425bSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
7676698f425bSmrgthe `disable-fast-install' option into LT_INIT's first parameter.])
7677698f425bSmrg])
7678698f425bSmrg
7679698f425bSmrgdnl aclocal-1.4 backwards compatibility:
7680698f425bSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
7681698f425bSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
7682698f425bSmrg
7683698f425bSmrg
7684698f425bSmrg# _LT_WITH_PIC([MODE])
7685698f425bSmrg# --------------------
7686698f425bSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
7687698f425bSmrg# LT_INIT options.
7688698f425bSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
7689698f425bSmrgm4_define([_LT_WITH_PIC],
7690698f425bSmrg[AC_ARG_WITH([pic],
7691698f425bSmrg    [AS_HELP_STRING([--with-pic],
7692698f425bSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
7693698f425bSmrg    [pic_mode="$withval"],
7694698f425bSmrg    [pic_mode=default])
7695698f425bSmrg
7696698f425bSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
7697698f425bSmrg
7698698f425bSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
7699698f425bSmrg])# _LT_WITH_PIC
7700698f425bSmrg
7701698f425bSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
7702698f425bSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
7703698f425bSmrg
7704698f425bSmrg# Old name:
7705698f425bSmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
7706698f425bSmrg[_LT_SET_OPTION([LT_INIT], [pic-only])
7707698f425bSmrgAC_DIAGNOSE([obsolete],
7708698f425bSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
7709698f425bSmrgput the `pic-only' option into LT_INIT's first parameter.])
7710698f425bSmrg])
7711698f425bSmrg
7712698f425bSmrgdnl aclocal-1.4 backwards compatibility:
7713698f425bSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
7714698f425bSmrg
7715698f425bSmrg
7716698f425bSmrgm4_define([_LTDL_MODE], [])
7717698f425bSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
7718698f425bSmrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
7719698f425bSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
7720698f425bSmrg		 [m4_define([_LTDL_MODE], [recursive])])
7721698f425bSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
7722698f425bSmrg		 [m4_define([_LTDL_MODE], [subproject])])
7723698f425bSmrg
7724698f425bSmrgm4_define([_LTDL_TYPE], [])
7725698f425bSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
7726698f425bSmrg		 [m4_define([_LTDL_TYPE], [installable])])
7727698f425bSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
7728698f425bSmrg		 [m4_define([_LTDL_TYPE], [convenience])])
7729698f425bSmrg
7730698f425bSmrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
7731c5629e66Smrg#
7732698f425bSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
7733698f425bSmrg# Written by Gary V. Vaughan, 2004
7734c5629e66Smrg#
7735698f425bSmrg# This file is free software; the Free Software Foundation gives
7736698f425bSmrg# unlimited permission to copy and/or distribute it, with or without
7737698f425bSmrg# modifications, as long as this notice is preserved.
7738698f425bSmrg
7739698f425bSmrg# serial 6 ltsugar.m4
7740698f425bSmrg
7741698f425bSmrg# This is to help aclocal find these macros, as it can't see m4_define.
7742698f425bSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
7743698f425bSmrg
7744698f425bSmrg
7745698f425bSmrg# lt_join(SEP, ARG1, [ARG2...])
7746698f425bSmrg# -----------------------------
7747698f425bSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
7748698f425bSmrg# associated separator.
7749698f425bSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
7750698f425bSmrg# versions in m4sugar had bugs.
7751698f425bSmrgm4_define([lt_join],
7752698f425bSmrg[m4_if([$#], [1], [],
7753698f425bSmrg       [$#], [2], [[$2]],
7754698f425bSmrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
7755698f425bSmrgm4_define([_lt_join],
7756698f425bSmrg[m4_if([$#$2], [2], [],
7757698f425bSmrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
7758698f425bSmrg
7759698f425bSmrg
7760698f425bSmrg# lt_car(LIST)
7761698f425bSmrg# lt_cdr(LIST)
7762698f425bSmrg# ------------
7763698f425bSmrg# Manipulate m4 lists.
7764698f425bSmrg# These macros are necessary as long as will still need to support
7765698f425bSmrg# Autoconf-2.59 which quotes differently.
7766698f425bSmrgm4_define([lt_car], [[$1]])
7767698f425bSmrgm4_define([lt_cdr],
7768698f425bSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
7769698f425bSmrg       [$#], 1, [],
7770698f425bSmrg       [m4_dquote(m4_shift($@))])])
7771698f425bSmrgm4_define([lt_unquote], $1)
7772698f425bSmrg
7773698f425bSmrg
7774698f425bSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
7775698f425bSmrg# ------------------------------------------
7776698f425bSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
7777698f425bSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
7778698f425bSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
7779698f425bSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
7780698f425bSmrg# than defined and empty).
7781c5629e66Smrg#
7782698f425bSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
7783698f425bSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
7784698f425bSmrgm4_define([lt_append],
7785698f425bSmrg[m4_define([$1],
7786698f425bSmrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
7787698f425bSmrg
7788698f425bSmrg
7789698f425bSmrg
7790698f425bSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
7791698f425bSmrg# ----------------------------------------------------------
7792698f425bSmrg# Produce a SEP delimited list of all paired combinations of elements of
7793698f425bSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
7794698f425bSmrg# has the form PREFIXmINFIXSUFFIXn.
7795698f425bSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
7796698f425bSmrgm4_define([lt_combine],
7797698f425bSmrg[m4_if(m4_eval([$# > 3]), [1],
7798698f425bSmrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
7799698f425bSmrg[[m4_foreach([_Lt_prefix], [$2],
7800698f425bSmrg	     [m4_foreach([_Lt_suffix],
7801698f425bSmrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
7802698f425bSmrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
7803698f425bSmrg
7804698f425bSmrg
7805698f425bSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
7806698f425bSmrg# -----------------------------------------------------------------------
7807698f425bSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
7808698f425bSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
7809698f425bSmrgm4_define([lt_if_append_uniq],
7810698f425bSmrg[m4_ifdef([$1],
7811698f425bSmrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
7812698f425bSmrg		 [lt_append([$1], [$2], [$3])$4],
7813698f425bSmrg		 [$5])],
7814698f425bSmrg	  [lt_append([$1], [$2], [$3])$4])])
7815698f425bSmrg
7816698f425bSmrg
7817698f425bSmrg# lt_dict_add(DICT, KEY, VALUE)
7818698f425bSmrg# -----------------------------
7819698f425bSmrgm4_define([lt_dict_add],
7820698f425bSmrg[m4_define([$1($2)], [$3])])
7821c5629e66Smrg
7822c5629e66Smrg
7823698f425bSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
7824698f425bSmrg# --------------------------------------------
7825698f425bSmrgm4_define([lt_dict_add_subkey],
7826698f425bSmrg[m4_define([$1($2:$3)], [$4])])
7827c5629e66Smrg
7828c5629e66Smrg
7829698f425bSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
7830698f425bSmrg# ----------------------------------
7831698f425bSmrgm4_define([lt_dict_fetch],
7832698f425bSmrg[m4_ifval([$3],
7833698f425bSmrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
7834698f425bSmrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
7835c5629e66Smrg
7836c5629e66Smrg
7837698f425bSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
7838698f425bSmrg# -----------------------------------------------------------------
7839698f425bSmrgm4_define([lt_if_dict_fetch],
7840698f425bSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
7841698f425bSmrg	[$5],
7842698f425bSmrg    [$6])])
7843c5629e66Smrg
7844698f425bSmrg
7845698f425bSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
7846698f425bSmrg# --------------------------------------------------------------
7847698f425bSmrgm4_define([lt_dict_filter],
7848698f425bSmrg[m4_if([$5], [], [],
7849698f425bSmrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
7850698f425bSmrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
7851698f425bSmrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
7852c5629e66Smrg])
7853c5629e66Smrg
7854698f425bSmrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
7855698f425bSmrg#
7856698f425bSmrg#   Copyright (C) 2004 Free Software Foundation, Inc.
7857698f425bSmrg#   Written by Scott James Remnant, 2004
7858698f425bSmrg#
7859698f425bSmrg# This file is free software; the Free Software Foundation gives
7860698f425bSmrg# unlimited permission to copy and/or distribute it, with or without
7861698f425bSmrg# modifications, as long as this notice is preserved.
7862c5629e66Smrg
7863698f425bSmrg# Generated from ltversion.in.
7864c5629e66Smrg
7865698f425bSmrg# serial 3012 ltversion.m4
7866698f425bSmrg# This file is part of GNU Libtool
7867c5629e66Smrg
7868698f425bSmrgm4_define([LT_PACKAGE_VERSION], [2.2.6])
7869698f425bSmrgm4_define([LT_PACKAGE_REVISION], [1.3012])
7870c5629e66Smrg
7871698f425bSmrgAC_DEFUN([LTVERSION_VERSION],
7872698f425bSmrg[macro_version='2.2.6'
7873698f425bSmrgmacro_revision='1.3012'
7874698f425bSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
7875698f425bSmrg_LT_DECL(, macro_revision, 0)
7876c5629e66Smrg])
7877c5629e66Smrg
7878698f425bSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
7879698f425bSmrg#
7880698f425bSmrg#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
7881698f425bSmrg#   Written by Scott James Remnant, 2004.
7882698f425bSmrg#
7883698f425bSmrg# This file is free software; the Free Software Foundation gives
7884698f425bSmrg# unlimited permission to copy and/or distribute it, with or without
7885698f425bSmrg# modifications, as long as this notice is preserved.
7886698f425bSmrg
7887698f425bSmrg# serial 4 lt~obsolete.m4
7888698f425bSmrg
7889698f425bSmrg# These exist entirely to fool aclocal when bootstrapping libtool.
7890698f425bSmrg#
7891698f425bSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
7892698f425bSmrg# which have later been changed to m4_define as they aren't part of the
7893698f425bSmrg# exported API, or moved to Autoconf or Automake where they belong.
7894698f425bSmrg#
7895698f425bSmrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
7896698f425bSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
7897698f425bSmrg# using a macro with the same name in our local m4/libtool.m4 it'll
7898698f425bSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
7899698f425bSmrg# and doesn't know about Autoconf macros at all.)
7900698f425bSmrg#
7901698f425bSmrg# So we provide this file, which has a silly filename so it's always
7902698f425bSmrg# included after everything else.  This provides aclocal with the
7903698f425bSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
7904698f425bSmrg# because those macros already exist, or will be overwritten later.
7905698f425bSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
7906698f425bSmrg#
7907698f425bSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
7908698f425bSmrg# Yes, that means every name once taken will need to remain here until
7909698f425bSmrg# we give up compatibility with versions before 1.7, at which point
7910698f425bSmrg# we need to keep only those names which we still refer to.
7911698f425bSmrg
7912698f425bSmrg# This is to help aclocal find these macros, as it can't see m4_define.
7913698f425bSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
7914698f425bSmrg
7915698f425bSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
7916698f425bSmrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
7917698f425bSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
7918698f425bSmrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
7919698f425bSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
7920698f425bSmrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
7921698f425bSmrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
7922698f425bSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
7923698f425bSmrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
7924698f425bSmrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
7925698f425bSmrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
7926698f425bSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
7927698f425bSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
7928698f425bSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
7929698f425bSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
7930698f425bSmrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
7931698f425bSmrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
7932698f425bSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
7933698f425bSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
7934698f425bSmrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
7935698f425bSmrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
7936698f425bSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
7937698f425bSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
7938698f425bSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
7939698f425bSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
7940698f425bSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
7941698f425bSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
7942698f425bSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
7943698f425bSmrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
7944698f425bSmrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
7945698f425bSmrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
7946698f425bSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
7947698f425bSmrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
7948698f425bSmrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
7949698f425bSmrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
7950698f425bSmrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
7951698f425bSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
7952698f425bSmrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
7953698f425bSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
7954698f425bSmrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
7955698f425bSmrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
7956698f425bSmrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
7957698f425bSmrgm4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
7958698f425bSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
7959698f425bSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
7960698f425bSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
7961698f425bSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
7962698f425bSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
7963698f425bSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
7964698f425bSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
7965698f425bSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
7966698f425bSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
7967698f425bSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
7968698f425bSmrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
7969698f425bSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
7970698f425bSmrg
7971c5629e66Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
7972c5629e66Smrg# 
7973c5629e66Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
7974c5629e66Smrg#
7975c5629e66Smrg# This program is free software; you can redistribute it and/or modify
7976c5629e66Smrg# it under the terms of the GNU General Public License as published by
7977c5629e66Smrg# the Free Software Foundation; either version 2 of the License, or
7978c5629e66Smrg# (at your option) any later version.
7979c5629e66Smrg#
7980c5629e66Smrg# This program is distributed in the hope that it will be useful, but
7981c5629e66Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
7982c5629e66Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7983c5629e66Smrg# General Public License for more details.
7984c5629e66Smrg#
7985c5629e66Smrg# You should have received a copy of the GNU General Public License
7986c5629e66Smrg# along with this program; if not, write to the Free Software
7987c5629e66Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7988c5629e66Smrg#
7989c5629e66Smrg# As a special exception to the GNU General Public License, if you
7990c5629e66Smrg# distribute this file as part of a program that contains a
7991c5629e66Smrg# configuration script generated by Autoconf, you may include it under
7992c5629e66Smrg# the same distribution terms that you use for the rest of that program.
7993c5629e66Smrg
7994c5629e66Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
7995c5629e66Smrg# ----------------------------------
7996c5629e66SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
7997c5629e66Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
7998c5629e66Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
7999c5629e66SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8000c5629e66Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8001c5629e66Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8002c5629e66Smrgfi
8003c5629e66Smrgif test -n "$PKG_CONFIG"; then
8004c5629e66Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
8005c5629e66Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8006c5629e66Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8007c5629e66Smrg		AC_MSG_RESULT([yes])
8008c5629e66Smrg	else
8009c5629e66Smrg		AC_MSG_RESULT([no])
8010c5629e66Smrg		PKG_CONFIG=""
8011c5629e66Smrg	fi
8012c5629e66Smrg		
8013c5629e66Smrgfi[]dnl
8014c5629e66Smrg])# PKG_PROG_PKG_CONFIG
8015c5629e66Smrg
8016c5629e66Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8017c5629e66Smrg#
8018c5629e66Smrg# Check to see whether a particular set of modules exists.  Similar
8019c5629e66Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8020c5629e66Smrg#
8021c5629e66Smrg#
8022c5629e66Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8023c5629e66Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
8024c5629e66Smrg# PKG_CHECK_EXISTS manually
8025c5629e66Smrg# --------------------------------------------------------------
8026c5629e66SmrgAC_DEFUN([PKG_CHECK_EXISTS],
8027c5629e66Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8028c5629e66Smrgif test -n "$PKG_CONFIG" && \
8029c5629e66Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8030c5629e66Smrg  m4_ifval([$2], [$2], [:])
8031c5629e66Smrgm4_ifvaln([$3], [else
8032c5629e66Smrg  $3])dnl
8033c5629e66Smrgfi])
8034c5629e66Smrg
8035c5629e66Smrg
8036c5629e66Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8037c5629e66Smrg# ---------------------------------------------
8038c5629e66Smrgm4_define([_PKG_CONFIG],
8039c5629e66Smrg[if test -n "$$1"; then
8040c5629e66Smrg    pkg_cv_[]$1="$$1"
8041c5629e66Smrg elif test -n "$PKG_CONFIG"; then
8042c5629e66Smrg    PKG_CHECK_EXISTS([$3],
8043c5629e66Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8044c5629e66Smrg		     [pkg_failed=yes])
8045c5629e66Smrg else
8046c5629e66Smrg    pkg_failed=untried
8047c5629e66Smrgfi[]dnl
8048c5629e66Smrg])# _PKG_CONFIG
8049c5629e66Smrg
8050c5629e66Smrg# _PKG_SHORT_ERRORS_SUPPORTED
8051c5629e66Smrg# -----------------------------
8052c5629e66SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8053c5629e66Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8054c5629e66Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8055c5629e66Smrg        _pkg_short_errors_supported=yes
8056c5629e66Smrgelse
8057c5629e66Smrg        _pkg_short_errors_supported=no
8058c5629e66Smrgfi[]dnl
8059c5629e66Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
8060c5629e66Smrg
8061c5629e66Smrg
8062c5629e66Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8063c5629e66Smrg# [ACTION-IF-NOT-FOUND])
8064c5629e66Smrg#
8065c5629e66Smrg#
8066c5629e66Smrg# Note that if there is a possibility the first call to
8067c5629e66Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
8068c5629e66Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8069c5629e66Smrg#
8070c5629e66Smrg#
8071c5629e66Smrg# --------------------------------------------------------------
8072c5629e66SmrgAC_DEFUN([PKG_CHECK_MODULES],
8073c5629e66Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8074c5629e66SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8075c5629e66SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8076c5629e66Smrg
8077c5629e66Smrgpkg_failed=no
8078c5629e66SmrgAC_MSG_CHECKING([for $1])
8079c5629e66Smrg
8080c5629e66Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8081c5629e66Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8082c5629e66Smrg
8083c5629e66Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8084c5629e66Smrgand $1[]_LIBS to avoid the need to call pkg-config.
8085c5629e66SmrgSee the pkg-config man page for more details.])
8086c5629e66Smrg
8087c5629e66Smrgif test $pkg_failed = yes; then
8088c5629e66Smrg        _PKG_SHORT_ERRORS_SUPPORTED
8089c5629e66Smrg        if test $_pkg_short_errors_supported = yes; then
8090c5629e66Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
8091c5629e66Smrg        else 
8092c5629e66Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
8093c5629e66Smrg        fi
8094c5629e66Smrg	# Put the nasty error message in config.log where it belongs
8095c5629e66Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8096c5629e66Smrg
8097c5629e66Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
8098c5629e66Smrg[Package requirements ($2) were not met:
8099c5629e66Smrg
8100c5629e66Smrg$$1_PKG_ERRORS
8101c5629e66Smrg
8102c5629e66SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
8103c5629e66Smrginstalled software in a non-standard prefix.
8104c5629e66Smrg
8105c5629e66Smrg_PKG_TEXT
8106c5629e66Smrg])],
8107c5629e66Smrg		[AC_MSG_RESULT([no])
8108c5629e66Smrg                $4])
8109c5629e66Smrgelif test $pkg_failed = untried; then
8110c5629e66Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
8111c5629e66Smrg[The pkg-config script could not be found or is too old.  Make sure it
8112c5629e66Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
8113c5629e66Smrgpath to pkg-config.
8114c5629e66Smrg
8115c5629e66Smrg_PKG_TEXT
8116c5629e66Smrg
8117c5629e66SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8118c5629e66Smrg		[$4])
8119c5629e66Smrgelse
8120c5629e66Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8121c5629e66Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8122c5629e66Smrg        AC_MSG_RESULT([yes])
8123c5629e66Smrg	ifelse([$3], , :, [$3])
8124c5629e66Smrgfi[]dnl
8125c5629e66Smrg])# PKG_CHECK_MODULES
8126c5629e66Smrg
8127698f425bSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
8128c5629e66Smrg#
8129698f425bSmrg# This file is free software; the Free Software Foundation
8130698f425bSmrg# gives unlimited permission to copy and/or distribute it,
8131698f425bSmrg# with or without modifications, as long as this notice is preserved.
8132266e564dSmrg
8133698f425bSmrg# AM_AUTOMAKE_VERSION(VERSION)
8134698f425bSmrg# ----------------------------
8135698f425bSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
8136698f425bSmrg# generated from the m4 files accompanying Automake X.Y.
8137698f425bSmrg# (This private macro should not be called outside this file.)
8138698f425bSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
8139698f425bSmrg[am__api_version='1.11'
8140698f425bSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
8141698f425bSmrgdnl require some minimum version.  Point them to the right macro.
8142698f425bSmrgm4_if([$1], [1.11], [],
8143698f425bSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
8144698f425bSmrg])
8145266e564dSmrg
8146698f425bSmrg# _AM_AUTOCONF_VERSION(VERSION)
8147698f425bSmrg# -----------------------------
8148698f425bSmrg# aclocal traces this macro to find the Autoconf version.
8149698f425bSmrg# This is a private macro too.  Using m4_define simplifies
8150698f425bSmrg# the logic in aclocal, which can simply ignore this definition.
8151698f425bSmrgm4_define([_AM_AUTOCONF_VERSION], [])
8152266e564dSmrg
8153698f425bSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
8154698f425bSmrg# -------------------------------
8155698f425bSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
8156698f425bSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
8157698f425bSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8158698f425bSmrg[AM_AUTOMAKE_VERSION([1.11])dnl
8159698f425bSmrgm4_ifndef([AC_AUTOCONF_VERSION],
8160698f425bSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
8161698f425bSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
8162266e564dSmrg
8163698f425bSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
8164c5629e66Smrg
8165698f425bSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8166698f425bSmrg#
8167698f425bSmrg# This file is free software; the Free Software Foundation
8168698f425bSmrg# gives unlimited permission to copy and/or distribute it,
8169698f425bSmrg# with or without modifications, as long as this notice is preserved.
8170266e564dSmrg
8171698f425bSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8172698f425bSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
8173698f425bSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8174698f425bSmrg#
8175698f425bSmrg# Of course, Automake must honor this variable whenever it calls a
8176698f425bSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
8177698f425bSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
8178698f425bSmrg# depending on how configure is run.  This is pretty annoying, since
8179698f425bSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
8180698f425bSmrg# source directory, any form will work fine, but in subdirectories a
8181698f425bSmrg# relative path needs to be adjusted first.
8182698f425bSmrg#
8183698f425bSmrg# $ac_aux_dir/missing
8184698f425bSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
8185698f425bSmrg# $top_srcdir/$ac_aux_dir/missing
8186698f425bSmrg#    fails if $ac_aux_dir is absolute,
8187698f425bSmrg#    fails when called from a subdirectory in a VPATH build with
8188698f425bSmrg#          a relative $ac_aux_dir
8189698f425bSmrg#
8190698f425bSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8191698f425bSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
8192698f425bSmrg# harmless because $srcdir is `.', but things will broke when you
8193698f425bSmrg# start a VPATH build or use an absolute $srcdir.
8194698f425bSmrg#
8195698f425bSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8196698f425bSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
8197698f425bSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8198698f425bSmrg# and then we would define $MISSING as
8199698f425bSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
8200698f425bSmrg# This will work as long as MISSING is not called from configure, because
8201698f425bSmrg# unfortunately $(top_srcdir) has no meaning in configure.
8202698f425bSmrg# However there are other variables, like CC, which are often used in
8203698f425bSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
8204698f425bSmrg#
8205698f425bSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
8206698f425bSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
8207698f425bSmrg# configured tree to be moved without reconfiguration.
8208266e564dSmrg
8209698f425bSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
8210698f425bSmrg[dnl Rely on autoconf to set up CDPATH properly.
8211698f425bSmrgAC_PREREQ([2.50])dnl
8212698f425bSmrg# expand $ac_aux_dir to an absolute path
8213698f425bSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
8214698f425bSmrg])
8215266e564dSmrg
8216698f425bSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
8217c5629e66Smrg
8218698f425bSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
8219698f425bSmrg# Free Software Foundation, Inc.
8220c5629e66Smrg#
8221698f425bSmrg# This file is free software; the Free Software Foundation
8222698f425bSmrg# gives unlimited permission to copy and/or distribute it,
8223698f425bSmrg# with or without modifications, as long as this notice is preserved.
8224266e564dSmrg
8225698f425bSmrg# serial 9
8226266e564dSmrg
8227698f425bSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
8228698f425bSmrg# -------------------------------------
8229698f425bSmrg# Define a conditional.
8230698f425bSmrgAC_DEFUN([AM_CONDITIONAL],
8231698f425bSmrg[AC_PREREQ(2.52)dnl
8232698f425bSmrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
8233698f425bSmrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8234698f425bSmrgAC_SUBST([$1_TRUE])dnl
8235698f425bSmrgAC_SUBST([$1_FALSE])dnl
8236698f425bSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
8237698f425bSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
8238698f425bSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
8239698f425bSmrgif $2; then
8240698f425bSmrg  $1_TRUE=
8241698f425bSmrg  $1_FALSE='#'
8242c5629e66Smrgelse
8243698f425bSmrg  $1_TRUE='#'
8244698f425bSmrg  $1_FALSE=
8245c5629e66Smrgfi
8246698f425bSmrgAC_CONFIG_COMMANDS_PRE(
8247698f425bSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8248698f425bSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
8249698f425bSmrgUsually this means the macro was only invoked conditionally.]])
8250698f425bSmrgfi])])
8251266e564dSmrg
8252698f425bSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
8253698f425bSmrg# Free Software Foundation, Inc.
8254698f425bSmrg#
8255698f425bSmrg# This file is free software; the Free Software Foundation
8256698f425bSmrg# gives unlimited permission to copy and/or distribute it,
8257698f425bSmrg# with or without modifications, as long as this notice is preserved.
8258266e564dSmrg
8259698f425bSmrg# serial 10
8260266e564dSmrg
8261698f425bSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
8262698f425bSmrg# written in clear, in which case automake, when reading aclocal.m4,
8263698f425bSmrg# will think it sees a *use*, and therefore will trigger all it's
8264698f425bSmrg# C support machinery.  Also note that it means that autoscan, seeing
8265698f425bSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
8266266e564dSmrg
8267266e564dSmrg
8268698f425bSmrg# _AM_DEPENDENCIES(NAME)
8269698f425bSmrg# ----------------------
8270698f425bSmrg# See how the compiler implements dependency checking.
8271698f425bSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
8272698f425bSmrg# We try a few techniques and use that to set a single cache variable.
8273266e564dSmrg#
8274698f425bSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
8275698f425bSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
8276698f425bSmrg# dependency, and given that the user is not expected to run this macro,
8277698f425bSmrg# just rely on AC_PROG_CC.
8278698f425bSmrgAC_DEFUN([_AM_DEPENDENCIES],
8279698f425bSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
8280698f425bSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
8281698f425bSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
8282698f425bSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
8283266e564dSmrg
8284698f425bSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
8285698f425bSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
8286698f425bSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8287698f425bSmrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
8288698f425bSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
8289698f425bSmrg                   [depcc="$$1"   am_compiler_list=])
8290266e564dSmrg
8291698f425bSmrgAC_CACHE_CHECK([dependency style of $depcc],
8292698f425bSmrg               [am_cv_$1_dependencies_compiler_type],
8293698f425bSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
8294698f425bSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
8295698f425bSmrg  # making bogus files that we don't know about and never remove.  For
8296698f425bSmrg  # instance it was reported that on HP-UX the gcc test will end up
8297698f425bSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
8298698f425bSmrg  # in D'.
8299698f425bSmrg  mkdir conftest.dir
8300698f425bSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
8301698f425bSmrg  # using a relative directory.
8302698f425bSmrg  cp "$am_depcomp" conftest.dir
8303698f425bSmrg  cd conftest.dir
8304698f425bSmrg  # We will build objects and dependencies in a subdirectory because
8305698f425bSmrg  # it helps to detect inapplicable dependency modes.  For instance
8306698f425bSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
8307698f425bSmrg  # side effect of compilation, but ICC will put the dependencies in
8308698f425bSmrg  # the current directory while Tru64 will put them in the object
8309698f425bSmrg  # directory.
8310698f425bSmrg  mkdir sub
8311266e564dSmrg
8312698f425bSmrg  am_cv_$1_dependencies_compiler_type=none
8313698f425bSmrg  if test "$am_compiler_list" = ""; then
8314698f425bSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
8315698f425bSmrg  fi
8316698f425bSmrg  am__universal=false
8317698f425bSmrg  m4_case([$1], [CC],
8318698f425bSmrg    [case " $depcc " in #(
8319698f425bSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
8320698f425bSmrg     esac],
8321698f425bSmrg    [CXX],
8322698f425bSmrg    [case " $depcc " in #(
8323698f425bSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
8324698f425bSmrg     esac])
8325c5629e66Smrg
8326698f425bSmrg  for depmode in $am_compiler_list; do
8327698f425bSmrg    # Setup a source with many dependencies, because some compilers
8328698f425bSmrg    # like to wrap large dependency lists on column 80 (with \), and
8329698f425bSmrg    # we should not choose a depcomp mode which is confused by this.
8330698f425bSmrg    #
8331698f425bSmrg    # We need to recreate these files for each test, as the compiler may
8332698f425bSmrg    # overwrite some of them when testing with obscure command lines.
8333698f425bSmrg    # This happens at least with the AIX C compiler.
8334698f425bSmrg    : > sub/conftest.c
8335698f425bSmrg    for i in 1 2 3 4 5 6; do
8336698f425bSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
8337698f425bSmrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
8338698f425bSmrg      # Solaris 8's {/usr,}/bin/sh.
8339698f425bSmrg      touch sub/conftst$i.h
8340698f425bSmrg    done
8341698f425bSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
8342c5629e66Smrg
8343698f425bSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
8344698f425bSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
8345698f425bSmrg    # handle `-M -o', and we need to detect this.  Also, some Intel
8346698f425bSmrg    # versions had trouble with output in subdirs
8347698f425bSmrg    am__obj=sub/conftest.${OBJEXT-o}
8348698f425bSmrg    am__minus_obj="-o $am__obj"
8349698f425bSmrg    case $depmode in
8350698f425bSmrg    gcc)
8351698f425bSmrg      # This depmode causes a compiler race in universal mode.
8352698f425bSmrg      test "$am__universal" = false || continue
8353698f425bSmrg      ;;
8354698f425bSmrg    nosideeffect)
8355698f425bSmrg      # after this tag, mechanisms are not by side-effect, so they'll
8356698f425bSmrg      # only be used when explicitly requested
8357698f425bSmrg      if test "x$enable_dependency_tracking" = xyes; then
8358698f425bSmrg	continue
8359698f425bSmrg      else
8360698f425bSmrg	break
8361698f425bSmrg      fi
8362698f425bSmrg      ;;
8363698f425bSmrg    msvisualcpp | msvcmsys)
8364698f425bSmrg      # This compiler won't grok `-c -o', but also, the minuso test has
8365698f425bSmrg      # not run yet.  These depmodes are late enough in the game, and
8366698f425bSmrg      # so weak that their functioning should not be impacted.
8367698f425bSmrg      am__obj=conftest.${OBJEXT-o}
8368698f425bSmrg      am__minus_obj=
8369698f425bSmrg      ;;
8370698f425bSmrg    none) break ;;
8371698f425bSmrg    esac
8372698f425bSmrg    if depmode=$depmode \
8373698f425bSmrg       source=sub/conftest.c object=$am__obj \
8374698f425bSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
8375698f425bSmrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
8376698f425bSmrg         >/dev/null 2>conftest.err &&
8377698f425bSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
8378698f425bSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
8379698f425bSmrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
8380698f425bSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
8381698f425bSmrg      # icc doesn't choke on unknown options, it will just issue warnings
8382698f425bSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
8383698f425bSmrg      # that says an option was ignored or not supported.
8384698f425bSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
8385698f425bSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
8386698f425bSmrg      # The diagnosis changed in icc 8.0:
8387698f425bSmrg      #   icc: Command line remark: option '-MP' not supported
8388698f425bSmrg      if (grep 'ignoring option' conftest.err ||
8389698f425bSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
8390698f425bSmrg        am_cv_$1_dependencies_compiler_type=$depmode
8391698f425bSmrg        break
8392698f425bSmrg      fi
8393698f425bSmrg    fi
8394698f425bSmrg  done
8395c5629e66Smrg
8396698f425bSmrg  cd ..
8397698f425bSmrg  rm -rf conftest.dir
8398698f425bSmrgelse
8399698f425bSmrg  am_cv_$1_dependencies_compiler_type=none
8400c5629e66Smrgfi
8401698f425bSmrg])
8402698f425bSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
8403698f425bSmrgAM_CONDITIONAL([am__fastdep$1], [
8404698f425bSmrg  test "x$enable_dependency_tracking" != xno \
8405698f425bSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
8406698f425bSmrg])
8407266e564dSmrg
8408266e564dSmrg
8409698f425bSmrg# AM_SET_DEPDIR
8410698f425bSmrg# -------------
8411698f425bSmrg# Choose a directory name for dependency files.
8412698f425bSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
8413698f425bSmrgAC_DEFUN([AM_SET_DEPDIR],
8414698f425bSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
8415698f425bSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
8416698f425bSmrg])
8417266e564dSmrg
8418266e564dSmrg
8419698f425bSmrg# AM_DEP_TRACK
8420698f425bSmrg# ------------
8421698f425bSmrgAC_DEFUN([AM_DEP_TRACK],
8422698f425bSmrg[AC_ARG_ENABLE(dependency-tracking,
8423698f425bSmrg[  --disable-dependency-tracking  speeds up one-time build
8424698f425bSmrg  --enable-dependency-tracking   do not reject slow dependency extractors])
8425698f425bSmrgif test "x$enable_dependency_tracking" != xno; then
8426698f425bSmrg  am_depcomp="$ac_aux_dir/depcomp"
8427698f425bSmrg  AMDEPBACKSLASH='\'
8428c5629e66Smrgfi
8429698f425bSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
8430698f425bSmrgAC_SUBST([AMDEPBACKSLASH])dnl
8431698f425bSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
8432698f425bSmrg])
8433266e564dSmrg
8434698f425bSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
8435266e564dSmrg
8436698f425bSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
8437698f425bSmrg# Free Software Foundation, Inc.
8438c5629e66Smrg#
8439698f425bSmrg# This file is free software; the Free Software Foundation
8440698f425bSmrg# gives unlimited permission to copy and/or distribute it,
8441698f425bSmrg# with or without modifications, as long as this notice is preserved.
8442266e564dSmrg
8443698f425bSmrg#serial 5
8444266e564dSmrg
8445698f425bSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
8446698f425bSmrg# ------------------------------
8447698f425bSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
8448698f425bSmrg[{
8449698f425bSmrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
8450698f425bSmrg  # are listed without --file.  Let's play safe and only enable the eval
8451698f425bSmrg  # if we detect the quoting.
8452698f425bSmrg  case $CONFIG_FILES in
8453698f425bSmrg  *\'*) eval set x "$CONFIG_FILES" ;;
8454698f425bSmrg  *)   set x $CONFIG_FILES ;;
8455698f425bSmrg  esac
8456698f425bSmrg  shift
8457698f425bSmrg  for mf
8458698f425bSmrg  do
8459698f425bSmrg    # Strip MF so we end up with the name of the file.
8460698f425bSmrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
8461698f425bSmrg    # Check whether this is an Automake generated Makefile or not.
8462698f425bSmrg    # We used to match only the files named `Makefile.in', but
8463698f425bSmrg    # some people rename them; so instead we look at the file content.
8464698f425bSmrg    # Grep'ing the first line is not enough: some people post-process
8465698f425bSmrg    # each Makefile.in and add a new line on top of each file to say so.
8466698f425bSmrg    # Grep'ing the whole file is not good either: AIX grep has a line
8467698f425bSmrg    # limit of 2048, but all sed's we know have understand at least 4000.
8468698f425bSmrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
8469698f425bSmrg      dirpart=`AS_DIRNAME("$mf")`
8470698f425bSmrg    else
8471698f425bSmrg      continue
8472698f425bSmrg    fi
8473698f425bSmrg    # Extract the definition of DEPDIR, am__include, and am__quote
8474698f425bSmrg    # from the Makefile without running `make'.
8475698f425bSmrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
8476698f425bSmrg    test -z "$DEPDIR" && continue
8477698f425bSmrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
8478698f425bSmrg    test -z "am__include" && continue
8479698f425bSmrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
8480698f425bSmrg    # When using ansi2knr, U may be empty or an underscore; expand it
8481698f425bSmrg    U=`sed -n 's/^U = //p' < "$mf"`
8482698f425bSmrg    # Find all dependency output files, they are included files with
8483698f425bSmrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
8484698f425bSmrg    # simplest approach to changing $(DEPDIR) to its actual value in the
8485698f425bSmrg    # expansion.
8486698f425bSmrg    for file in `sed -n "
8487698f425bSmrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
8488698f425bSmrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
8489698f425bSmrg      # Make sure the directory exists.
8490698f425bSmrg      test -f "$dirpart/$file" && continue
8491698f425bSmrg      fdir=`AS_DIRNAME(["$file"])`
8492698f425bSmrg      AS_MKDIR_P([$dirpart/$fdir])
8493698f425bSmrg      # echo "creating $dirpart/$file"
8494698f425bSmrg      echo '# dummy' > "$dirpart/$file"
8495698f425bSmrg    done
8496698f425bSmrg  done
8497698f425bSmrg}
8498698f425bSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
8499266e564dSmrg
8500c5629e66Smrg
8501698f425bSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
8502698f425bSmrg# -----------------------------
8503698f425bSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
8504c5629e66Smrg#
8505698f425bSmrg# This code is only required when automatic dependency tracking
8506698f425bSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
8507698f425bSmrg# need in order to bootstrap the dependency handling code.
8508698f425bSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
8509698f425bSmrg[AC_CONFIG_COMMANDS([depfiles],
8510698f425bSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
8511698f425bSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
8512698f425bSmrg])
8513c5629e66Smrg
8514698f425bSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
8515698f425bSmrg# Free Software Foundation, Inc.
8516698f425bSmrg#
8517698f425bSmrg# This file is free software; the Free Software Foundation
8518698f425bSmrg# gives unlimited permission to copy and/or distribute it,
8519698f425bSmrg# with or without modifications, as long as this notice is preserved.
8520266e564dSmrg
8521698f425bSmrg# serial 8
8522266e564dSmrg
8523698f425bSmrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
8524698f425bSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
8525266e564dSmrg
8526698f425bSmrg# Do all the work for Automake.                             -*- Autoconf -*-
8527266e564dSmrg
8528698f425bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
8529698f425bSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
8530c5629e66Smrg#
8531698f425bSmrg# This file is free software; the Free Software Foundation
8532698f425bSmrg# gives unlimited permission to copy and/or distribute it,
8533698f425bSmrg# with or without modifications, as long as this notice is preserved.
8534266e564dSmrg
8535698f425bSmrg# serial 16
8536266e564dSmrg
8537698f425bSmrg# This macro actually does too much.  Some checks are only needed if
8538698f425bSmrg# your package does certain things.  But this isn't really a big deal.
8539266e564dSmrg
8540698f425bSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
8541698f425bSmrg# AM_INIT_AUTOMAKE([OPTIONS])
8542698f425bSmrg# -----------------------------------------------
8543698f425bSmrg# The call with PACKAGE and VERSION arguments is the old style
8544698f425bSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
8545698f425bSmrg# and VERSION should now be passed to AC_INIT and removed from
8546698f425bSmrg# the call to AM_INIT_AUTOMAKE.
8547698f425bSmrg# We support both call styles for the transition.  After
8548698f425bSmrg# the next Automake release, Autoconf can make the AC_INIT
8549698f425bSmrg# arguments mandatory, and then we can depend on a new Autoconf
8550698f425bSmrg# release and drop the old call support.
8551698f425bSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
8552698f425bSmrg[AC_PREREQ([2.62])dnl
8553698f425bSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
8554698f425bSmrgdnl the ones we care about.
8555698f425bSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
8556698f425bSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
8557698f425bSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
8558698f425bSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
8559698f425bSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
8560698f425bSmrg  # is not polluted with repeated "-I."
8561698f425bSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
8562698f425bSmrg  # test to see if srcdir already configured
8563698f425bSmrg  if test -f $srcdir/config.status; then
8564698f425bSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
8565698f425bSmrg  fi
8566698f425bSmrgfi
8567266e564dSmrg
8568698f425bSmrg# test whether we have cygpath
8569698f425bSmrgif test -z "$CYGPATH_W"; then
8570698f425bSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
8571698f425bSmrg    CYGPATH_W='cygpath -w'
8572698f425bSmrg  else
8573698f425bSmrg    CYGPATH_W=echo
8574698f425bSmrg  fi
8575698f425bSmrgfi
8576698f425bSmrgAC_SUBST([CYGPATH_W])
8577266e564dSmrg
8578698f425bSmrg# Define the identity of the package.
8579698f425bSmrgdnl Distinguish between old-style and new-style calls.
8580698f425bSmrgm4_ifval([$2],
8581698f425bSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
8582698f425bSmrg AC_SUBST([PACKAGE], [$1])dnl
8583698f425bSmrg AC_SUBST([VERSION], [$2])],
8584698f425bSmrg[_AM_SET_OPTIONS([$1])dnl
8585698f425bSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
8586698f425bSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
8587698f425bSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
8588698f425bSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
8589698f425bSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
8590266e564dSmrg
8591698f425bSmrg_AM_IF_OPTION([no-define],,
8592698f425bSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
8593698f425bSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
8594698f425bSmrg
8595698f425bSmrg# Some tools Automake needs.
8596698f425bSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
8597698f425bSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
8598698f425bSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
8599698f425bSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
8600698f425bSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
8601698f425bSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
8602698f425bSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
8603698f425bSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
8604698f425bSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
8605698f425bSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
8606698f425bSmrg# We need awk for the "check" target.  The system "awk" is bad on
8607698f425bSmrg# some platforms.
8608698f425bSmrgAC_REQUIRE([AC_PROG_AWK])dnl
8609698f425bSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
8610698f425bSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
8611698f425bSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
8612698f425bSmrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
8613698f425bSmrg			     [_AM_PROG_TAR([v7])])])
8614698f425bSmrg_AM_IF_OPTION([no-dependencies],,
8615698f425bSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
8616698f425bSmrg		  [_AM_DEPENDENCIES(CC)],
8617698f425bSmrg		  [define([AC_PROG_CC],
8618698f425bSmrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
8619698f425bSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
8620698f425bSmrg		  [_AM_DEPENDENCIES(CXX)],
8621698f425bSmrg		  [define([AC_PROG_CXX],
8622698f425bSmrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
8623698f425bSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
8624698f425bSmrg		  [_AM_DEPENDENCIES(OBJC)],
8625698f425bSmrg		  [define([AC_PROG_OBJC],
8626698f425bSmrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
8627698f425bSmrg])
8628698f425bSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
8629698f425bSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
8630698f425bSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
8631698f425bSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
8632698f425bSmrgAC_CONFIG_COMMANDS_PRE(dnl
8633698f425bSmrg[m4_provide_if([_AM_COMPILER_EXEEXT],
8634698f425bSmrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
8635698f425bSmrg])
8636266e564dSmrg
8637698f425bSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
8638698f425bSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
8639698f425bSmrgdnl mangled by Autoconf and run in a shell conditional statement.
8640698f425bSmrgm4_define([_AC_COMPILER_EXEEXT],
8641698f425bSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
8642266e564dSmrg
8643c5629e66Smrg
8644698f425bSmrg# When config.status generates a header, we must update the stamp-h file.
8645698f425bSmrg# This file resides in the same directory as the config header
8646698f425bSmrg# that is generated.  The stamp files are numbered to have different names.
8647266e564dSmrg
8648698f425bSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
8649698f425bSmrg# loop where config.status creates the headers, so we can generate
8650698f425bSmrg# our stamp files there.
8651698f425bSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
8652698f425bSmrg[# Compute $1's index in $config_headers.
8653698f425bSmrg_am_arg=$1
8654698f425bSmrg_am_stamp_count=1
8655698f425bSmrgfor _am_header in $config_headers :; do
8656698f425bSmrg  case $_am_header in
8657698f425bSmrg    $_am_arg | $_am_arg:* )
8658698f425bSmrg      break ;;
8659698f425bSmrg    * )
8660698f425bSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
8661698f425bSmrg  esac
8662698f425bSmrgdone
8663698f425bSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
8664266e564dSmrg
8665698f425bSmrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
8666c5629e66Smrg#
8667c5629e66Smrg# This file is free software; the Free Software Foundation
8668c5629e66Smrg# gives unlimited permission to copy and/or distribute it,
8669c5629e66Smrg# with or without modifications, as long as this notice is preserved.
8670266e564dSmrg
8671698f425bSmrg# AM_PROG_INSTALL_SH
8672698f425bSmrg# ------------------
8673698f425bSmrg# Define $install_sh.
8674698f425bSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
8675698f425bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8676698f425bSmrgif test x"${install_sh}" != xset; then
8677698f425bSmrg  case $am_aux_dir in
8678698f425bSmrg  *\ * | *\	*)
8679698f425bSmrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
8680698f425bSmrg  *)
8681698f425bSmrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
8682698f425bSmrg  esac
8683698f425bSmrgfi
8684698f425bSmrgAC_SUBST(install_sh)])
8685266e564dSmrg
8686698f425bSmrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
8687c5629e66Smrg#
8688c5629e66Smrg# This file is free software; the Free Software Foundation
8689c5629e66Smrg# gives unlimited permission to copy and/or distribute it,
8690c5629e66Smrg# with or without modifications, as long as this notice is preserved.
8691266e564dSmrg
8692698f425bSmrg# serial 2
8693266e564dSmrg
8694698f425bSmrg# Check whether the underlying file-system supports filenames
8695698f425bSmrg# with a leading dot.  For instance MS-DOS doesn't.
8696698f425bSmrgAC_DEFUN([AM_SET_LEADING_DOT],
8697698f425bSmrg[rm -rf .tst 2>/dev/null
8698698f425bSmrgmkdir .tst 2>/dev/null
8699698f425bSmrgif test -d .tst; then
8700698f425bSmrg  am__leading_dot=.
8701698f425bSmrgelse
8702698f425bSmrg  am__leading_dot=_
8703698f425bSmrgfi
8704698f425bSmrgrmdir .tst 2>/dev/null
8705698f425bSmrgAC_SUBST([am__leading_dot])])
8706c5629e66Smrg
8707698f425bSmrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
8708698f425bSmrg# From Jim Meyering
8709c5629e66Smrg
8710698f425bSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
8711c5629e66Smrg# Free Software Foundation, Inc.
8712c5629e66Smrg#
8713c5629e66Smrg# This file is free software; the Free Software Foundation
8714c5629e66Smrg# gives unlimited permission to copy and/or distribute it,
8715c5629e66Smrg# with or without modifications, as long as this notice is preserved.
8716c5629e66Smrg
8717698f425bSmrg# serial 5
8718c5629e66Smrg
8719698f425bSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
8720698f425bSmrg# ----------------------------------
8721698f425bSmrg# Control maintainer-specific portions of Makefiles.
8722698f425bSmrg# Default is to disable them, unless `enable' is passed literally.
8723698f425bSmrg# For symmetry, `disable' may be passed as well.  Anyway, the user
8724698f425bSmrg# can override the default with the --enable/--disable switch.
8725698f425bSmrgAC_DEFUN([AM_MAINTAINER_MODE],
8726698f425bSmrg[m4_case(m4_default([$1], [disable]),
8727698f425bSmrg       [enable], [m4_define([am_maintainer_other], [disable])],
8728698f425bSmrg       [disable], [m4_define([am_maintainer_other], [enable])],
8729698f425bSmrg       [m4_define([am_maintainer_other], [enable])
8730698f425bSmrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
8731698f425bSmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
8732698f425bSmrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
8733698f425bSmrg  AC_ARG_ENABLE([maintainer-mode],
8734698f425bSmrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
8735698f425bSmrg			  (and sometimes confusing) to the casual installer],
8736698f425bSmrg      [USE_MAINTAINER_MODE=$enableval],
8737698f425bSmrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
8738698f425bSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
8739698f425bSmrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
8740698f425bSmrg  MAINT=$MAINTAINER_MODE_TRUE
8741698f425bSmrg  AC_SUBST([MAINT])dnl
8742698f425bSmrg]
8743698f425bSmrg)
8744c5629e66Smrg
8745698f425bSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
8746698f425bSmrg
8747698f425bSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
8748698f425bSmrg
8749698f425bSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
8750c5629e66Smrg#
8751c5629e66Smrg# This file is free software; the Free Software Foundation
8752c5629e66Smrg# gives unlimited permission to copy and/or distribute it,
8753c5629e66Smrg# with or without modifications, as long as this notice is preserved.
8754266e564dSmrg
8755698f425bSmrg# serial 4
8756266e564dSmrg
8757698f425bSmrg# AM_MAKE_INCLUDE()
8758698f425bSmrg# -----------------
8759698f425bSmrg# Check to see how make treats includes.
8760698f425bSmrgAC_DEFUN([AM_MAKE_INCLUDE],
8761698f425bSmrg[am_make=${MAKE-make}
8762698f425bSmrgcat > confinc << 'END'
8763698f425bSmrgam__doit:
8764698f425bSmrg	@echo this is the am__doit target
8765698f425bSmrg.PHONY: am__doit
8766698f425bSmrgEND
8767698f425bSmrg# If we don't find an include directive, just comment out the code.
8768698f425bSmrgAC_MSG_CHECKING([for style of include used by $am_make])
8769698f425bSmrgam__include="#"
8770698f425bSmrgam__quote=
8771698f425bSmrg_am_result=none
8772698f425bSmrg# First try GNU make style include.
8773698f425bSmrgecho "include confinc" > confmf
8774698f425bSmrg# Ignore all kinds of additional output from `make'.
8775698f425bSmrgcase `$am_make -s -f confmf 2> /dev/null` in #(
8776698f425bSmrg*the\ am__doit\ target*)
8777698f425bSmrg  am__include=include
8778698f425bSmrg  am__quote=
8779698f425bSmrg  _am_result=GNU
8780698f425bSmrg  ;;
8781698f425bSmrgesac
8782698f425bSmrg# Now try BSD make style include.
8783698f425bSmrgif test "$am__include" = "#"; then
8784698f425bSmrg   echo '.include "confinc"' > confmf
8785698f425bSmrg   case `$am_make -s -f confmf 2> /dev/null` in #(
8786698f425bSmrg   *the\ am__doit\ target*)
8787698f425bSmrg     am__include=.include
8788698f425bSmrg     am__quote="\""
8789698f425bSmrg     _am_result=BSD
8790698f425bSmrg     ;;
8791698f425bSmrg   esac
8792698f425bSmrgfi
8793698f425bSmrgAC_SUBST([am__include])
8794698f425bSmrgAC_SUBST([am__quote])
8795698f425bSmrgAC_MSG_RESULT([$_am_result])
8796698f425bSmrgrm -f confinc confmf
8797698f425bSmrg])
8798266e564dSmrg
8799698f425bSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
8800266e564dSmrg
8801698f425bSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
8802698f425bSmrg# Free Software Foundation, Inc.
8803c5629e66Smrg#
8804698f425bSmrg# This file is free software; the Free Software Foundation
8805698f425bSmrg# gives unlimited permission to copy and/or distribute it,
8806698f425bSmrg# with or without modifications, as long as this notice is preserved.
8807266e564dSmrg
8808698f425bSmrg# serial 6
8809266e564dSmrg
8810698f425bSmrg# AM_MISSING_PROG(NAME, PROGRAM)
8811698f425bSmrg# ------------------------------
8812698f425bSmrgAC_DEFUN([AM_MISSING_PROG],
8813698f425bSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
8814698f425bSmrg$1=${$1-"${am_missing_run}$2"}
8815698f425bSmrgAC_SUBST($1)])
8816c5629e66Smrg
8817266e564dSmrg
8818698f425bSmrg# AM_MISSING_HAS_RUN
8819698f425bSmrg# ------------------
8820698f425bSmrg# Define MISSING if not defined so far and test if it supports --run.
8821698f425bSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
8822698f425bSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
8823698f425bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8824698f425bSmrgAC_REQUIRE_AUX_FILE([missing])dnl
8825698f425bSmrgif test x"${MISSING+set}" != xset; then
8826698f425bSmrg  case $am_aux_dir in
8827698f425bSmrg  *\ * | *\	*)
8828698f425bSmrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
8829698f425bSmrg  *)
8830698f425bSmrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
8831698f425bSmrg  esac
8832698f425bSmrgfi
8833698f425bSmrg# Use eval to expand $SHELL
8834698f425bSmrgif eval "$MISSING --run true"; then
8835698f425bSmrg  am_missing_run="$MISSING --run "
8836c5629e66Smrgelse
8837698f425bSmrg  am_missing_run=
8838698f425bSmrg  AC_MSG_WARN([`missing' script is too old or missing])
8839c5629e66Smrgfi
8840c5629e66Smrg])
8841266e564dSmrg
8842698f425bSmrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
8843698f425bSmrg#
8844698f425bSmrg# This file is free software; the Free Software Foundation
8845698f425bSmrg# gives unlimited permission to copy and/or distribute it,
8846698f425bSmrg# with or without modifications, as long as this notice is preserved.
8847266e564dSmrg
8848698f425bSmrg# AM_PROG_MKDIR_P
8849698f425bSmrg# ---------------
8850698f425bSmrg# Check for `mkdir -p'.
8851698f425bSmrgAC_DEFUN([AM_PROG_MKDIR_P],
8852698f425bSmrg[AC_PREREQ([2.60])dnl
8853698f425bSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
8854698f425bSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
8855698f425bSmrgdnl while keeping a definition of mkdir_p for backward compatibility.
8856698f425bSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
8857698f425bSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
8858698f425bSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
8859698f425bSmrgdnl adjustment using top_builddir (which is defined more often than
8860698f425bSmrgdnl MKDIR_P).
8861698f425bSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
8862698f425bSmrgcase $mkdir_p in
8863698f425bSmrg  [[\\/$]]* | ?:[[\\/]]*) ;;
8864698f425bSmrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
8865698f425bSmrgesac
8866c5629e66Smrg])
8867266e564dSmrg
8868698f425bSmrg# Helper functions for option handling.                     -*- Autoconf -*-
8869266e564dSmrg
8870698f425bSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
8871c5629e66Smrg#
8872c5629e66Smrg# This file is free software; the Free Software Foundation
8873c5629e66Smrg# gives unlimited permission to copy and/or distribute it,
8874c5629e66Smrg# with or without modifications, as long as this notice is preserved.
8875266e564dSmrg
8876698f425bSmrg# serial 4
8877266e564dSmrg
8878698f425bSmrg# _AM_MANGLE_OPTION(NAME)
8879698f425bSmrg# -----------------------
8880698f425bSmrgAC_DEFUN([_AM_MANGLE_OPTION],
8881698f425bSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
8882266e564dSmrg
8883698f425bSmrg# _AM_SET_OPTION(NAME)
8884698f425bSmrg# ------------------------------
8885698f425bSmrg# Set option NAME.  Presently that only means defining a flag for this option.
8886698f425bSmrgAC_DEFUN([_AM_SET_OPTION],
8887698f425bSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
8888266e564dSmrg
8889698f425bSmrg# _AM_SET_OPTIONS(OPTIONS)
8890698f425bSmrg# ----------------------------------
8891698f425bSmrg# OPTIONS is a space-separated list of Automake options.
8892698f425bSmrgAC_DEFUN([_AM_SET_OPTIONS],
8893698f425bSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
8894266e564dSmrg
8895698f425bSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
8896698f425bSmrg# -------------------------------------------
8897698f425bSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8898698f425bSmrgAC_DEFUN([_AM_IF_OPTION],
8899698f425bSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
8900266e564dSmrg
8901698f425bSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
8902266e564dSmrg
8903698f425bSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
8904698f425bSmrg# Free Software Foundation, Inc.
8905c5629e66Smrg#
8906c5629e66Smrg# This file is free software; the Free Software Foundation
8907c5629e66Smrg# gives unlimited permission to copy and/or distribute it,
8908c5629e66Smrg# with or without modifications, as long as this notice is preserved.
8909266e564dSmrg
8910698f425bSmrg# serial 5
8911266e564dSmrg
8912698f425bSmrg# AM_SANITY_CHECK
8913698f425bSmrg# ---------------
8914698f425bSmrgAC_DEFUN([AM_SANITY_CHECK],
8915698f425bSmrg[AC_MSG_CHECKING([whether build environment is sane])
8916698f425bSmrg# Just in case
8917698f425bSmrgsleep 1
8918698f425bSmrgecho timestamp > conftest.file
8919698f425bSmrg# Reject unsafe characters in $srcdir or the absolute working directory
8920698f425bSmrg# name.  Accept space and tab only in the latter.
8921698f425bSmrgam_lf='
8922698f425bSmrg'
8923698f425bSmrgcase `pwd` in
8924698f425bSmrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
8925698f425bSmrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
8926698f425bSmrgesac
8927698f425bSmrgcase $srcdir in
8928698f425bSmrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
8929698f425bSmrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
8930698f425bSmrgesac
8931266e564dSmrg
8932698f425bSmrg# Do `set' in a subshell so we don't clobber the current shell's
8933698f425bSmrg# arguments.  Must try -L first in case configure is actually a
8934698f425bSmrg# symlink; some systems play weird games with the mod time of symlinks
8935698f425bSmrg# (eg FreeBSD returns the mod time of the symlink's containing
8936698f425bSmrg# directory).
8937698f425bSmrgif (
8938698f425bSmrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
8939698f425bSmrg   if test "$[*]" = "X"; then
8940698f425bSmrg      # -L didn't work.
8941698f425bSmrg      set X `ls -t "$srcdir/configure" conftest.file`
8942698f425bSmrg   fi
8943698f425bSmrg   rm -f conftest.file
8944698f425bSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
8945698f425bSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
8946266e564dSmrg
8947698f425bSmrg      # If neither matched, then we have a broken ls.  This can happen
8948698f425bSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
8949698f425bSmrg      # broken ls alias from the environment.  This has actually
8950698f425bSmrg      # happened.  Such a system could not be considered "sane".
8951698f425bSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
8952698f425bSmrgalias in your environment])
8953698f425bSmrg   fi
8954266e564dSmrg
8955698f425bSmrg   test "$[2]" = conftest.file
8956698f425bSmrg   )
8957698f425bSmrgthen
8958698f425bSmrg   # Ok.
8959698f425bSmrg   :
8960698f425bSmrgelse
8961698f425bSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
8962698f425bSmrgCheck your system clock])
8963698f425bSmrgfi
8964698f425bSmrgAC_MSG_RESULT(yes)])
8965266e564dSmrg
8966698f425bSmrg# Copyright (C) 2009  Free Software Foundation, Inc.
8967266e564dSmrg#
8968c5629e66Smrg# This file is free software; the Free Software Foundation
8969c5629e66Smrg# gives unlimited permission to copy and/or distribute it,
8970c5629e66Smrg# with or without modifications, as long as this notice is preserved.
8971266e564dSmrg
8972698f425bSmrg# serial 1
8973266e564dSmrg
8974698f425bSmrg# AM_SILENT_RULES([DEFAULT])
8975698f425bSmrg# --------------------------
8976698f425bSmrg# Enable less verbose build rules; with the default set to DEFAULT
8977698f425bSmrg# (`yes' being less verbose, `no' or empty being verbose).
8978698f425bSmrgAC_DEFUN([AM_SILENT_RULES],
8979698f425bSmrg[AC_ARG_ENABLE([silent-rules],
8980698f425bSmrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
8981698f425bSmrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
8982698f425bSmrgcase $enable_silent_rules in
8983698f425bSmrgyes) AM_DEFAULT_VERBOSITY=0;;
8984698f425bSmrgno)  AM_DEFAULT_VERBOSITY=1;;
8985698f425bSmrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
8986698f425bSmrgesac
8987698f425bSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
8988698f425bSmrgAM_BACKSLASH='\'
8989698f425bSmrgAC_SUBST([AM_BACKSLASH])dnl
8990698f425bSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
8991698f425bSmrg])
8992698f425bSmrg
8993698f425bSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8994c5629e66Smrg#
8995c5629e66Smrg# This file is free software; the Free Software Foundation
8996c5629e66Smrg# gives unlimited permission to copy and/or distribute it,
8997c5629e66Smrg# with or without modifications, as long as this notice is preserved.
8998266e564dSmrg
8999698f425bSmrg# AM_PROG_INSTALL_STRIP
9000698f425bSmrg# ---------------------
9001698f425bSmrg# One issue with vendor `install' (even GNU) is that you can't
9002698f425bSmrg# specify the program used to strip binaries.  This is especially
9003698f425bSmrg# annoying in cross-compiling environments, where the build's strip
9004698f425bSmrg# is unlikely to handle the host's binaries.
9005698f425bSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
9006698f425bSmrg# always use install-sh in `make install-strip', and initialize
9007698f425bSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
9008698f425bSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
9009698f425bSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9010698f425bSmrg# Installed binaries are usually stripped using `strip' when the user
9011698f425bSmrg# run `make install-strip'.  However `strip' might not be the right
9012698f425bSmrg# tool to use in cross-compilation environments, therefore Automake
9013698f425bSmrg# will honor the `STRIP' environment variable to overrule this program.
9014698f425bSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9015698f425bSmrgif test "$cross_compiling" != no; then
9016698f425bSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
9017c5629e66Smrgfi
9018698f425bSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9019698f425bSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
9020c5629e66Smrg
9021698f425bSmrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
9022266e564dSmrg#
9023c5629e66Smrg# This file is free software; the Free Software Foundation
9024c5629e66Smrg# gives unlimited permission to copy and/or distribute it,
9025c5629e66Smrg# with or without modifications, as long as this notice is preserved.
9026266e564dSmrg
9027698f425bSmrg# serial 2
9028266e564dSmrg
9029698f425bSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
9030698f425bSmrg# ---------------------------
9031698f425bSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9032698f425bSmrg# This macro is traced by Automake.
9033698f425bSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
9034266e564dSmrg
9035698f425bSmrg# AM_SUBST_NOTMAKE(VARIABLE)
9036698f425bSmrg# ---------------------------
9037698f425bSmrg# Public sister of _AM_SUBST_NOTMAKE.
9038698f425bSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9039266e564dSmrg
9040698f425bSmrg# Check how to create a tarball.                            -*- Autoconf -*-
9041266e564dSmrg
9042698f425bSmrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9043c5629e66Smrg#
9044c5629e66Smrg# This file is free software; the Free Software Foundation
9045c5629e66Smrg# gives unlimited permission to copy and/or distribute it,
9046c5629e66Smrg# with or without modifications, as long as this notice is preserved.
9047266e564dSmrg
9048698f425bSmrg# serial 2
9049266e564dSmrg
9050c5629e66Smrg# _AM_PROG_TAR(FORMAT)
9051c5629e66Smrg# --------------------
9052c5629e66Smrg# Check how to create a tarball in format FORMAT.
9053c5629e66Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
9054c5629e66Smrg#
9055c5629e66Smrg# Substitute a variable $(am__tar) that is a command
9056c5629e66Smrg# writing to stdout a FORMAT-tarball containing the directory
9057c5629e66Smrg# $tardir.
9058c5629e66Smrg#     tardir=directory && $(am__tar) > result.tar
9059c5629e66Smrg#
9060c5629e66Smrg# Substitute a variable $(am__untar) that extract such
9061c5629e66Smrg# a tarball read from stdin.
9062c5629e66Smrg#     $(am__untar) < result.tar
9063c5629e66SmrgAC_DEFUN([_AM_PROG_TAR],
9064c5629e66Smrg[# Always define AMTAR for backward compatibility.
9065c5629e66SmrgAM_MISSING_PROG([AMTAR], [tar])
9066c5629e66Smrgm4_if([$1], [v7],
9067c5629e66Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9068c5629e66Smrg     [m4_case([$1], [ustar],, [pax],,
9069c5629e66Smrg              [m4_fatal([Unknown tar format])])
9070c5629e66SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
9071c5629e66Smrg# Loop over all known methods to create a tar archive until one works.
9072c5629e66Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9073c5629e66Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9074c5629e66Smrg# Do not fold the above two line into one, because Tru64 sh and
9075c5629e66Smrg# Solaris sh will not grok spaces in the rhs of `-'.
9076c5629e66Smrgfor _am_tool in $_am_tools
9077c5629e66Smrgdo
9078c5629e66Smrg  case $_am_tool in
9079c5629e66Smrg  gnutar)
9080c5629e66Smrg    for _am_tar in tar gnutar gtar;
9081c5629e66Smrg    do
9082c5629e66Smrg      AM_RUN_LOG([$_am_tar --version]) && break
9083c5629e66Smrg    done
9084c5629e66Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9085c5629e66Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9086c5629e66Smrg    am__untar="$_am_tar -xf -"
9087c5629e66Smrg    ;;
9088c5629e66Smrg  plaintar)
9089c5629e66Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
9090c5629e66Smrg    # ustar tarball either.
9091c5629e66Smrg    (tar --version) >/dev/null 2>&1 && continue
9092c5629e66Smrg    am__tar='tar chf - "$$tardir"'
9093c5629e66Smrg    am__tar_='tar chf - "$tardir"'
9094c5629e66Smrg    am__untar='tar xf -'
9095c5629e66Smrg    ;;
9096c5629e66Smrg  pax)
9097c5629e66Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
9098c5629e66Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
9099c5629e66Smrg    am__untar='pax -r'
9100c5629e66Smrg    ;;
9101c5629e66Smrg  cpio)
9102c5629e66Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9103c5629e66Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9104c5629e66Smrg    am__untar='cpio -i -H $1 -d'
9105c5629e66Smrg    ;;
9106c5629e66Smrg  none)
9107c5629e66Smrg    am__tar=false
9108c5629e66Smrg    am__tar_=false
9109c5629e66Smrg    am__untar=false
9110c5629e66Smrg    ;;
9111c5629e66Smrg  esac
9112266e564dSmrg
9113c5629e66Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
9114c5629e66Smrg  # and am__untar set.
9115c5629e66Smrg  test -n "${am_cv_prog_tar_$1}" && break
9116266e564dSmrg
9117c5629e66Smrg  # tar/untar a dummy directory, and stop if the command works
9118c5629e66Smrg  rm -rf conftest.dir
9119c5629e66Smrg  mkdir conftest.dir
9120c5629e66Smrg  echo GrepMe > conftest.dir/file
9121c5629e66Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9122c5629e66Smrg  rm -rf conftest.dir
9123c5629e66Smrg  if test -s conftest.tar; then
9124c5629e66Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
9125c5629e66Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9126c5629e66Smrg  fi
9127c5629e66Smrgdone
9128c5629e66Smrgrm -rf conftest.dir
9129c5629e66Smrg
9130c5629e66SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9131c5629e66SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
9132c5629e66SmrgAC_SUBST([am__tar])
9133c5629e66SmrgAC_SUBST([am__untar])
9134c5629e66Smrg]) # _AM_PROG_TAR
9135266e564dSmrg
9136698f425bSmrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
9137698f425bSmrgdnl
9138698f425bSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
9139698f425bSmrgdnl 
9140698f425bSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
9141698f425bSmrgdnl copy of this software and associated documentation files (the
9142698f425bSmrgdnl "Software"), to deal in the Software without restriction, including
9143698f425bSmrgdnl without limitation the rights to use, copy, modify, merge, publish,
9144698f425bSmrgdnl distribute, and/or sell copies of the Software, and to permit persons
9145698f425bSmrgdnl to whom the Software is furnished to do so, provided that the above
9146698f425bSmrgdnl copyright notice(s) and this permission notice appear in all copies of
9147698f425bSmrgdnl the Software and that both the above copyright notice(s) and this
9148698f425bSmrgdnl permission notice appear in supporting documentation.
9149698f425bSmrgdnl
9150698f425bSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
9151698f425bSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9152698f425bSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
9153698f425bSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
9154698f425bSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
9155698f425bSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
9156698f425bSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
9157698f425bSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
9158698f425bSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
9159698f425bSmrgdnl
9160698f425bSmrgdnl Except as contained in this notice, the name of a copyright holder
9161698f425bSmrgdnl shall not be used in advertising or otherwise to promote the sale, use
9162698f425bSmrgdnl or other dealings in this Software without prior written authorization
9163698f425bSmrgdnl of the copyright holder.
9164698f425bSmrg
9165698f425bSmrg# XORG_MACROS_VERSION(required-version)
9166698f425bSmrg# -------------------------------------
9167698f425bSmrg# Minimum version: 1.1.0
9168698f425bSmrg#
9169698f425bSmrg# If you're using a macro added in Version 1.1 or newer, include this in
9170698f425bSmrg# your configure.ac with the minimum required version, such as:
9171698f425bSmrg# XORG_MACROS_VERSION(1.1)
9172698f425bSmrg#
9173698f425bSmrg# To ensure that this macro is defined, also add:
9174698f425bSmrg# m4_ifndef([XORG_MACROS_VERSION],
9175698f425bSmrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
9176698f425bSmrg#
9177698f425bSmrg#
9178698f425bSmrg# See the "minimum version" comment for each macro you use to see what 
9179698f425bSmrg# version you require.
9180698f425bSmrgm4_defun([XORG_MACROS_VERSION],[
9181698f425bSmrgm4_define([vers_have], [1.2.2])
9182698f425bSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
9183698f425bSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
9184698f425bSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
9185698f425bSmrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
9186698f425bSmrgm4_if(m4_version_compare(vers_have, [$1]), -1,
9187698f425bSmrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
9188698f425bSmrgm4_undefine([vers_have])
9189698f425bSmrgm4_undefine([maj_have])
9190698f425bSmrgm4_undefine([maj_needed])
9191698f425bSmrg]) # XORG_MACROS_VERSION
9192698f425bSmrg
9193698f425bSmrg# XORG_PROG_RAWCPP()
9194698f425bSmrg# ------------------
9195698f425bSmrg# Minimum version: 1.0.0
9196698f425bSmrg#
9197698f425bSmrg# Find cpp program and necessary flags for use in pre-processing text files
9198698f425bSmrg# such as man pages and config files
9199698f425bSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
9200698f425bSmrgAC_REQUIRE([AC_PROG_CPP])
9201698f425bSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
9202698f425bSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
9203698f425bSmrg
9204698f425bSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
9205698f425bSmrg# which is not the best choice for supporting other OS'es, but covers most
9206698f425bSmrg# of the ones we need for now.
9207698f425bSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
9208698f425bSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
9209698f425bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9210698f425bSmrg	AC_MSG_RESULT([no])
9211698f425bSmrgelse
9212698f425bSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9213698f425bSmrg		RAWCPPFLAGS=-undef
9214698f425bSmrg		AC_MSG_RESULT([yes])
9215698f425bSmrg	# under Cygwin unix is still defined even with -undef
9216698f425bSmrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9217698f425bSmrg		RAWCPPFLAGS="-undef -ansi"
9218698f425bSmrg		AC_MSG_RESULT([yes, with -ansi])
9219698f425bSmrg	else
9220698f425bSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
9221698f425bSmrg	fi
9222698f425bSmrgfi
9223698f425bSmrgrm -f conftest.$ac_ext
9224698f425bSmrg
9225698f425bSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
9226698f425bSmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
9227698f425bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
9228698f425bSmrg	AC_MSG_RESULT([no])
9229698f425bSmrgelse
9230698f425bSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
9231698f425bSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
9232698f425bSmrg		AC_MSG_RESULT([yes])
9233698f425bSmrg	else
9234698f425bSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
9235698f425bSmrg	fi
9236698f425bSmrgfi
9237698f425bSmrgrm -f conftest.$ac_ext
9238698f425bSmrgAC_SUBST(RAWCPPFLAGS)
9239698f425bSmrg]) # XORG_PROG_RAWCPP
9240698f425bSmrg
9241698f425bSmrg# XORG_MANPAGE_SECTIONS()
9242698f425bSmrg# -----------------------
9243698f425bSmrg# Minimum version: 1.0.0
9244698f425bSmrg#
9245698f425bSmrg# Determine which sections man pages go in for the different man page types
9246698f425bSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
9247698f425bSmrg# Not sure if there's any better way than just hardcoding by OS name.
9248698f425bSmrg# Override default settings by setting environment variables
9249698f425bSmrg
9250698f425bSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
9251698f425bSmrgAC_REQUIRE([AC_CANONICAL_HOST])
9252698f425bSmrg
9253698f425bSmrgif test x$APP_MAN_SUFFIX = x    ; then
9254698f425bSmrg    APP_MAN_SUFFIX=1
9255698f425bSmrgfi
9256698f425bSmrgif test x$APP_MAN_DIR = x    ; then
9257698f425bSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
9258698f425bSmrgfi
9259698f425bSmrg
9260698f425bSmrgif test x$LIB_MAN_SUFFIX = x    ; then
9261698f425bSmrg    LIB_MAN_SUFFIX=3
9262698f425bSmrgfi
9263698f425bSmrgif test x$LIB_MAN_DIR = x    ; then
9264698f425bSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
9265698f425bSmrgfi
9266698f425bSmrg
9267698f425bSmrgif test x$FILE_MAN_SUFFIX = x    ; then
9268698f425bSmrg    case $host_os in
9269698f425bSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
9270698f425bSmrg	*)		FILE_MAN_SUFFIX=5  ;;
9271698f425bSmrg    esac
9272698f425bSmrgfi
9273698f425bSmrgif test x$FILE_MAN_DIR = x    ; then
9274698f425bSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
9275698f425bSmrgfi
9276698f425bSmrg
9277698f425bSmrgif test x$MISC_MAN_SUFFIX = x    ; then
9278698f425bSmrg    case $host_os in
9279698f425bSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
9280698f425bSmrg	*)		MISC_MAN_SUFFIX=7  ;;
9281698f425bSmrg    esac
9282698f425bSmrgfi
9283698f425bSmrgif test x$MISC_MAN_DIR = x    ; then
9284698f425bSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
9285698f425bSmrgfi
9286698f425bSmrg
9287698f425bSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
9288698f425bSmrg    case $host_os in
9289698f425bSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
9290698f425bSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
9291698f425bSmrg    esac
9292698f425bSmrgfi
9293698f425bSmrgif test x$DRIVER_MAN_DIR = x    ; then
9294698f425bSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
9295698f425bSmrgfi
9296698f425bSmrg
9297698f425bSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
9298698f425bSmrg    case $host_os in
9299698f425bSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
9300698f425bSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
9301698f425bSmrg    esac
9302698f425bSmrgfi
9303698f425bSmrgif test x$ADMIN_MAN_DIR = x    ; then
9304698f425bSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
9305698f425bSmrgfi
9306698f425bSmrg
9307698f425bSmrg
9308698f425bSmrgAC_SUBST([APP_MAN_SUFFIX])
9309698f425bSmrgAC_SUBST([LIB_MAN_SUFFIX])
9310698f425bSmrgAC_SUBST([FILE_MAN_SUFFIX])
9311698f425bSmrgAC_SUBST([MISC_MAN_SUFFIX])
9312698f425bSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
9313698f425bSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
9314698f425bSmrgAC_SUBST([APP_MAN_DIR])
9315698f425bSmrgAC_SUBST([LIB_MAN_DIR])
9316698f425bSmrgAC_SUBST([FILE_MAN_DIR])
9317698f425bSmrgAC_SUBST([MISC_MAN_DIR])
9318698f425bSmrgAC_SUBST([DRIVER_MAN_DIR])
9319698f425bSmrgAC_SUBST([ADMIN_MAN_DIR])
9320698f425bSmrg]) # XORG_MANPAGE_SECTIONS
9321698f425bSmrg
9322698f425bSmrg# XORG_CHECK_LINUXDOC
9323698f425bSmrg# -------------------
9324698f425bSmrg# Minimum version: 1.0.0
9325698f425bSmrg#
9326698f425bSmrg# Defines the variable MAKE_TEXT if the necessary tools and
9327698f425bSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
9328698f425bSmrg# Whether or not the necessary tools and files are found can be checked
9329698f425bSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
9330698f425bSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
9331698f425bSmrgif test x$XORG_SGML_PATH = x ; then
9332698f425bSmrg    XORG_SGML_PATH=$prefix/share/sgml
9333698f425bSmrgfi
9334698f425bSmrgHAVE_DEFS_ENT=
9335698f425bSmrg
9336698f425bSmrgif test x"$cross_compiling" = x"yes" ; then
9337698f425bSmrg  HAVE_DEFS_ENT=no
9338698f425bSmrgelse
9339698f425bSmrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
9340698f425bSmrgfi
9341698f425bSmrg
9342698f425bSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
9343698f425bSmrgAC_PATH_PROG(PS2PDF, ps2pdf)
9344698f425bSmrg
9345698f425bSmrgAC_MSG_CHECKING([Whether to build documentation])
9346698f425bSmrg
9347698f425bSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
9348698f425bSmrg   BUILDDOC=yes
9349698f425bSmrgelse
9350698f425bSmrg   BUILDDOC=no
9351698f425bSmrgfi
9352698f425bSmrg
9353698f425bSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
9354698f425bSmrg
9355698f425bSmrgAC_MSG_RESULT([$BUILDDOC])
9356698f425bSmrg
9357698f425bSmrgAC_MSG_CHECKING([Whether to build pdf documentation])
9358698f425bSmrg
9359698f425bSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
9360698f425bSmrg   BUILDPDFDOC=yes
9361698f425bSmrgelse
9362698f425bSmrg   BUILDPDFDOC=no
9363698f425bSmrgfi
9364698f425bSmrg
9365698f425bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
9366698f425bSmrg
9367698f425bSmrgAC_MSG_RESULT([$BUILDPDFDOC])
9368698f425bSmrg
9369698f425bSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
9370698f425bSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
9371698f425bSmrgMAKE_PDF="$PS2PDF"
9372698f425bSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
9373698f425bSmrg
9374698f425bSmrgAC_SUBST(MAKE_TEXT)
9375698f425bSmrgAC_SUBST(MAKE_PS)
9376698f425bSmrgAC_SUBST(MAKE_PDF)
9377698f425bSmrgAC_SUBST(MAKE_HTML)
9378698f425bSmrg]) # XORG_CHECK_LINUXDOC
9379698f425bSmrg
9380698f425bSmrg# XORG_CHECK_DOCBOOK
9381698f425bSmrg# -------------------
9382698f425bSmrg# Minimum version: 1.0.0
9383698f425bSmrg#
9384698f425bSmrg# Checks for the ability to build output formats from SGML DocBook source.
9385698f425bSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
9386698f425bSmrg# indicates whether the necessary tools and files are found and, if set,
9387698f425bSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
9388698f425bSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
9389698f425bSmrgif test x$XORG_SGML_PATH = x ; then
9390698f425bSmrg    XORG_SGML_PATH=$prefix/share/sgml
9391698f425bSmrgfi
9392698f425bSmrgHAVE_DEFS_ENT=
9393698f425bSmrgBUILDTXTDOC=no
9394698f425bSmrgBUILDPDFDOC=no
9395698f425bSmrgBUILDPSDOC=no
9396698f425bSmrgBUILDHTMLDOC=no
9397698f425bSmrg
9398698f425bSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
9399698f425bSmrg
9400698f425bSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
9401698f425bSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
9402698f425bSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
9403698f425bSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
9404698f425bSmrg
9405698f425bSmrgAC_MSG_CHECKING([Whether to build text documentation])
9406698f425bSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
9407698f425bSmrg   test x$BUILD_TXTDOC != xno; then
9408698f425bSmrg	BUILDTXTDOC=yes
9409698f425bSmrgfi
9410698f425bSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
9411698f425bSmrgAC_MSG_RESULT([$BUILDTXTDOC])
9412698f425bSmrg
9413698f425bSmrgAC_MSG_CHECKING([Whether to build PDF documentation])
9414698f425bSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
9415698f425bSmrg   test x$BUILD_PDFDOC != xno; then
9416698f425bSmrg	BUILDPDFDOC=yes
9417698f425bSmrgfi
9418698f425bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
9419698f425bSmrgAC_MSG_RESULT([$BUILDPDFDOC])
9420698f425bSmrg
9421698f425bSmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
9422698f425bSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
9423698f425bSmrg   test x$BUILD_PSDOC != xno; then
9424698f425bSmrg	BUILDPSDOC=yes
9425698f425bSmrgfi
9426698f425bSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
9427698f425bSmrgAC_MSG_RESULT([$BUILDPSDOC])
9428698f425bSmrg
9429698f425bSmrgAC_MSG_CHECKING([Whether to build HTML documentation])
9430698f425bSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
9431698f425bSmrg   test x$BUILD_HTMLDOC != xno; then
9432698f425bSmrg	BUILDHTMLDOC=yes
9433698f425bSmrgfi
9434698f425bSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
9435698f425bSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
9436698f425bSmrg
9437698f425bSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
9438698f425bSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
9439698f425bSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
9440698f425bSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
9441698f425bSmrg
9442698f425bSmrgAC_SUBST(MAKE_TEXT)
9443698f425bSmrgAC_SUBST(MAKE_PS)
9444698f425bSmrgAC_SUBST(MAKE_PDF)
9445698f425bSmrgAC_SUBST(MAKE_HTML)
9446698f425bSmrg]) # XORG_CHECK_DOCBOOK
9447698f425bSmrg
9448698f425bSmrg# XORG_CHECK_MALLOC_ZERO
9449698f425bSmrg# ----------------------
9450698f425bSmrg# Minimum version: 1.0.0
9451698f425bSmrg#
9452698f425bSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
9453698f425bSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
9454698f425bSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
9455698f425bSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
9456698f425bSmrgAC_ARG_ENABLE(malloc0returnsnull,
9457698f425bSmrg	AC_HELP_STRING([--enable-malloc0returnsnull],
9458698f425bSmrg		       [malloc(0) returns NULL (default: auto)]),
9459698f425bSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
9460698f425bSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
9461698f425bSmrg
9462698f425bSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
9463698f425bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
9464698f425bSmrg	AC_RUN_IFELSE([
9465698f425bSmrgchar *malloc();
9466698f425bSmrgchar *realloc();
9467698f425bSmrgchar *calloc();
9468698f425bSmrgmain() {
9469698f425bSmrg    char *m0, *r0, *c0, *p;
9470698f425bSmrg    m0 = malloc(0);
9471698f425bSmrg    p = malloc(10);
9472698f425bSmrg    r0 = realloc(p,0);
9473698f425bSmrg    c0 = calloc(0);
9474698f425bSmrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
9475698f425bSmrg}],
9476698f425bSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
9477698f425bSmrg		[MALLOC_ZERO_RETURNS_NULL=no])
9478698f425bSmrgfi
9479698f425bSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
9480698f425bSmrg
9481698f425bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
9482698f425bSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
9483698f425bSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
9484698f425bSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
9485698f425bSmrgelse
9486698f425bSmrg	MALLOC_ZERO_CFLAGS=""
9487698f425bSmrg	XMALLOC_ZERO_CFLAGS=""
9488698f425bSmrg	XTMALLOC_ZERO_CFLAGS=""
9489698f425bSmrgfi
9490698f425bSmrg
9491698f425bSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
9492698f425bSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
9493698f425bSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
9494698f425bSmrg]) # XORG_CHECK_MALLOC_ZERO
9495698f425bSmrg
9496698f425bSmrg# XORG_WITH_LINT()
9497698f425bSmrg# ----------------
9498698f425bSmrg# Minimum version: 1.1.0
9499698f425bSmrg#
9500698f425bSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint
9501698f425bSmrg# is specified.   (Use --with-lint=sparse for sparse.)
9502698f425bSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
9503698f425bSmrg# Sets $LINT_FLAGS to flags to pass to source checker
9504698f425bSmrg# Sets LINT automake conditional if enabled (default: disabled)
9505698f425bSmrg#
9506698f425bSmrgAC_DEFUN([XORG_WITH_LINT],[
9507698f425bSmrg
9508698f425bSmrg# Allow checking code with lint, sparse, etc.
9509698f425bSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
9510698f425bSmrg		[Use a lint-style source code checker (default: disabled)])],
9511698f425bSmrg		[use_lint=$withval], [use_lint=no])
9512698f425bSmrgif test "x$use_lint" = "xyes" ; then
9513698f425bSmrg	LINT="lint"
9514698f425bSmrgelse
9515698f425bSmrg	LINT="$use_lint"
9516698f425bSmrgfi
9517698f425bSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
9518698f425bSmrg    case $LINT in
9519698f425bSmrg	lint|*/lint)
9520698f425bSmrg	    case $host_os in
9521698f425bSmrg		solaris*)
9522698f425bSmrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
9523698f425bSmrg			;;
9524698f425bSmrg	    esac
9525698f425bSmrg	    ;;
9526698f425bSmrg    esac
9527698f425bSmrgfi
9528698f425bSmrg
9529698f425bSmrgAC_SUBST(LINT)
9530698f425bSmrgAC_SUBST(LINT_FLAGS)
9531698f425bSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
9532698f425bSmrg
9533698f425bSmrg]) # XORG_WITH_LINT
9534698f425bSmrg
9535698f425bSmrg# XORG_LINT_LIBRARY(LIBNAME)
9536698f425bSmrg# --------------------------
9537698f425bSmrg# Minimum version: 1.1.0
9538698f425bSmrg#
9539698f425bSmrg# Sets up flags for building lint libraries for checking programs that call
9540698f425bSmrg# functions in the library.
9541698f425bSmrg# Disabled by default, enable with --enable-lint-library
9542698f425bSmrg# Sets: 
9543698f425bSmrg#	@LINTLIB@		- name of lint library file to make
9544698f425bSmrg#	MAKE_LINT_LIB		- automake conditional
9545698f425bSmrg#
9546698f425bSmrg
9547698f425bSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
9548698f425bSmrgAC_REQUIRE([XORG_WITH_LINT])
9549698f425bSmrg# Build lint "library" for more indepth checks of programs calling this library
9550698f425bSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
9551698f425bSmrg	[Create lint library (default: disabled)])],
9552698f425bSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
9553698f425bSmrgif test "x$make_lint_lib" != "xno" ; then
9554698f425bSmrg	if test "x$LINT" = "xno" ; then
9555698f425bSmrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
9556698f425bSmrg	fi
9557698f425bSmrg	if test "x$make_lint_lib" = "xyes" ; then
9558698f425bSmrg		LINTLIB=llib-l$1.ln
9559698f425bSmrg	else
9560698f425bSmrg		LINTLIB=$make_lint_lib
9561698f425bSmrg	fi
9562698f425bSmrgfi
9563698f425bSmrgAC_SUBST(LINTLIB)
9564698f425bSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
9565698f425bSmrg
9566698f425bSmrg]) # XORG_LINT_LIBRARY
9567698f425bSmrg
9568698f425bSmrg# XORG_CWARNFLAGS
9569698f425bSmrg# ---------------
9570698f425bSmrg# Minimum version: 1.2.0
9571698f425bSmrg#
9572698f425bSmrg# Defines CWARNFLAGS to enable C compiler warnings.
9573698f425bSmrg#
9574698f425bSmrgAC_DEFUN([XORG_CWARNFLAGS], [
9575698f425bSmrgAC_REQUIRE([AC_PROG_CC])
9576698f425bSmrgif  test "x$GCC" = xyes ; then
9577698f425bSmrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
9578698f425bSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
9579698f425bSmrg-Wbad-function-cast"
9580698f425bSmrg    case `$CC -dumpversion` in
9581698f425bSmrg    3.4.* | 4.*)
9582698f425bSmrg	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
9583698f425bSmrg	;;
9584698f425bSmrg    esac
9585698f425bSmrgelse
9586698f425bSmrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
9587698f425bSmrg    if test "x$SUNCC" = "xyes"; then
9588698f425bSmrg	CWARNFLAGS="-v"
9589698f425bSmrg    fi
9590698f425bSmrgfi
9591698f425bSmrgAC_SUBST(CWARNFLAGS)
9592698f425bSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
9593698f425bSmrg]) # XORG_CWARNFLAGS
9594698f425bSmrgdnl Copyright 2005 Red Hat, Inc
9595698f425bSmrgdnl
9596698f425bSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
9597698f425bSmrgdnl documentation for any purpose is hereby granted without fee, provided that
9598698f425bSmrgdnl the above copyright notice appear in all copies and that both that
9599698f425bSmrgdnl copyright notice and this permission notice appear in supporting
9600698f425bSmrgdnl documentation.
9601698f425bSmrgdnl
9602698f425bSmrgdnl The above copyright notice and this permission notice shall be included
9603698f425bSmrgdnl in all copies or substantial portions of the Software.
9604698f425bSmrgdnl
9605698f425bSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
9606698f425bSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9607698f425bSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
9608698f425bSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
9609698f425bSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
9610698f425bSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
9611698f425bSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
9612698f425bSmrgdnl
9613698f425bSmrgdnl Except as contained in this notice, the name of the copyright holders shall
9614698f425bSmrgdnl not be used in advertising or otherwise to promote the sale, use or
9615698f425bSmrgdnl other dealings in this Software without prior written authorization
9616698f425bSmrgdnl from the copyright holders.
9617698f425bSmrgdnl
9618698f425bSmrg
9619698f425bSmrg# XORG_RELEASE_VERSION
9620698f425bSmrg# --------------------
9621698f425bSmrg# Adds --with/without-release-string and changes the PACKAGE and
9622698f425bSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
9623698f425bSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
9624698f425bSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
9625698f425bSmrg 
9626698f425bSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
9627698f425bSmrg	AC_ARG_WITH(release-version,
9628698f425bSmrg			AC_HELP_STRING([--with-release-version=STRING],
9629698f425bSmrg				[Use release version string in package name]),
9630698f425bSmrg			[RELEASE_VERSION="$withval"],
9631698f425bSmrg			[RELEASE_VERSION=""])
9632698f425bSmrg	if test "x$RELEASE_VERSION" != "x"; then
9633698f425bSmrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
9634698f425bSmrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
9635698f425bSmrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
9636698f425bSmrg	fi
9637698f425bSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
9638698f425bSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
9639698f425bSmrg		[Major version of this package])
9640698f425bSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
9641698f425bSmrg	if test "x$PVM" = "x"; then
9642698f425bSmrg		PVM="0"
9643698f425bSmrg	fi
9644698f425bSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
9645698f425bSmrg		[$PVM],
9646698f425bSmrg		[Minor version of this package])
9647698f425bSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
9648698f425bSmrg	if test "x$PVP" = "x"; then
9649698f425bSmrg		PVP="0"
9650698f425bSmrg	fi
9651698f425bSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
9652698f425bSmrg		[$PVP],
9653698f425bSmrg		[Patch version of this package])
9654698f425bSmrg])
9655698f425bSmrg
9656698f425bSmrg# XORG_CHANGELOG()
9657698f425bSmrg# ----------------
9658698f425bSmrg# Minimum version: 1.2.0
9659698f425bSmrg#
9660698f425bSmrg# Defines the variable CHANGELOG_CMD as the command to generate
9661698f425bSmrg# ChangeLog from git.
9662698f425bSmrg#
9663698f425bSmrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
9664698f425bSmrg#
9665698f425bSmrgAC_DEFUN([XORG_CHANGELOG], [
9666698f425bSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
9667698f425bSmrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
9668698f425bSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
9669698f425bSmrgAC_SUBST([CHANGELOG_CMD])
9670698f425bSmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
9671698f425bSmrg]) # XORG_CHANGELOG
9672698f425bSmrg
9673698f425bSmrgdnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $
9674698f425bSmrgdnl
9675698f425bSmrgdnl Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
9676698f425bSmrgdnl 
9677698f425bSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
9678698f425bSmrgdnl documentation for any purpose is hereby granted without fee, provided that
9679698f425bSmrgdnl the above copyright notice appear in all copies and that both that
9680698f425bSmrgdnl copyright notice and this permission notice appear in supporting
9681698f425bSmrgdnl documentation.
9682698f425bSmrgdnl 
9683698f425bSmrgdnl The above copyright notice and this permission notice shall be included
9684698f425bSmrgdnl in all copies or substantial portions of the Software.
9685698f425bSmrgdnl 
9686698f425bSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
9687698f425bSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9688698f425bSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
9689698f425bSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
9690698f425bSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
9691698f425bSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
9692698f425bSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
9693698f425bSmrgdnl 
9694698f425bSmrgdnl Except as contained in this notice, the name of the copyright holders shall
9695698f425bSmrgdnl not be used in advertising or otherwise to promote the sale, use or
9696698f425bSmrgdnl other dealings in this Software without prior written authorization
9697698f425bSmrgdnl from the copyright holders.
9698698f425bSmrgdnl 
9699698f425bSmrg
9700698f425bSmrg# XTRANS_TCP_FLAGS()
9701698f425bSmrg# ------------------
9702698f425bSmrg# Find needed libraries for TCP sockets, and check for IPv6 support
9703698f425bSmrgAC_DEFUN([XTRANS_TCP_FLAGS],[
9704698f425bSmrg # SVR4 hides these in libraries other than libc
9705698f425bSmrg AC_SEARCH_LIBS(socket, [socket])
9706698f425bSmrg AC_SEARCH_LIBS(gethostbyname, [nsl])
9707698f425bSmrg AC_HAVE_LIBRARY([ws2_32])
9708698f425bSmrg
9709698f425bSmrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems
9710698f425bSmrg AC_ARG_ENABLE(ipv6, 
9711698f425bSmrg	AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
9712698f425bSmrg	[IPV6CONN=$enableval], 
9713698f425bSmrg	[AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
9714698f425bSmrg AC_MSG_CHECKING([if IPv6 support should be built])
9715698f425bSmrg if test "$IPV6CONN" = "yes"; then
9716698f425bSmrg	AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
9717698f425bSmrg fi
9718698f425bSmrg AC_MSG_RESULT($IPV6CONN)
9719698f425bSmrg
9720698f425bSmrg # 4.3BSD-Reno added a new member to struct sockaddr_in
9721698f425bSmrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 
9722698f425bSmrg	AC_DEFINE([BSD44SOCKETS],1,
9723698f425bSmrg 	    [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [
9724698f425bSmrg#include <sys/types.h>
9725698f425bSmrg#include <sys/socket.h>
9726698f425bSmrg#include <netinet/in.h>
9727698f425bSmrg ])
9728698f425bSmrg
9729698f425bSmrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc.
9730698f425bSmrg AC_CHECK_TYPES([socklen_t], [], [], [
9731698f425bSmrgAC_INCLUDES_DEFAULT
9732698f425bSmrg#include <sys/socket.h>])
9733698f425bSmrg 
9734698f425bSmrg]) # XTRANS_TCP_FLAGS
9735698f425bSmrg
9736698f425bSmrg# XTRANS_CONNECTION_FLAGS()
9737698f425bSmrg# -------------------------
9738698f425bSmrg# Standard checks for which Xtrans transports to use by the Xorg packages
9739698f425bSmrg# that use Xtrans functions
9740698f425bSmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[
9741698f425bSmrg AC_REQUIRE([AC_CANONICAL_HOST])
9742698f425bSmrg AC_REQUIRE([AC_TYPE_SIGNAL])
9743698f425bSmrg [case $host_os in
9744698f425bSmrg	mingw*)	unixdef="no"   ;;
9745698f425bSmrg	*)	unixdef="yes"  ;;
9746698f425bSmrg esac]
9747698f425bSmrg AC_ARG_ENABLE(unix-transport,
9748698f425bSmrg	AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
9749698f425bSmrg	[UNIXCONN=$enableval], [UNIXCONN=$unixdef])
9750698f425bSmrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
9751698f425bSmrg if test "$UNIXCONN" = "yes"; then
9752698f425bSmrg	AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
9753698f425bSmrg fi
9754698f425bSmrg AC_MSG_RESULT($UNIXCONN)
9755698f425bSmrg AC_ARG_ENABLE(tcp-transport, 
9756698f425bSmrg	AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
9757698f425bSmrg	[TCPCONN=$enableval], [TCPCONN=yes])
9758698f425bSmrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
9759698f425bSmrg AC_MSG_RESULT($TCPCONN)
9760698f425bSmrg if test "$TCPCONN" = "yes"; then
9761698f425bSmrg	AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
9762698f425bSmrg	XTRANS_TCP_FLAGS
9763698f425bSmrg fi
9764698f425bSmrg [case $host_os in
9765698f425bSmrg	solaris*|sco*|sysv4*)	localdef="yes" ;;
9766698f425bSmrg	*)			localdef="no"  ;;
9767698f425bSmrg esac]
9768698f425bSmrg AC_ARG_ENABLE(local-transport,
9769698f425bSmrg	AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
9770698f425bSmrg	[LOCALCONN=$enableval], [LOCALCONN=$localdef])
9771698f425bSmrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
9772698f425bSmrg AC_MSG_RESULT($LOCALCONN)
9773698f425bSmrg if test "$LOCALCONN" = "yes"; then
9774698f425bSmrg	AC_DEFINE(LOCALCONN,1,[Support os-specific local connections])
9775698f425bSmrg fi
9776698f425bSmrg 
9777698f425bSmrg]) # XTRANS_CONNECTION_FLAGS
9778698f425bSmrg
9779698f425bSmrg
9780698f425bSmrg# XTRANS_SECURE_RPC_FLAGS()
9781698f425bSmrg# -------------------------
9782698f425bSmrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS
9783698f425bSmrg# so that any necessary networking libraries are already found
9784698f425bSmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
9785698f425bSmrg[AC_REQUIRE([XTRANS_TCP_FLAGS])
9786698f425bSmrg AC_ARG_ENABLE(secure-rpc, 
9787698f425bSmrg	AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
9788698f425bSmrg        [SECURE_RPC=$enableval], [SECURE_RPC="try"])
9789698f425bSmrg
9790698f425bSmrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
9791698f425bSmrg	FOUND_SECURE_RPC="no"
9792698f425bSmrg	AC_CHECK_FUNCS([authdes_seccreate authdes_create],
9793698f425bSmrg			[FOUND_SECURE_RPC="yes"])
9794698f425bSmrg	if test "x$FOUND_SECURE_RPC" = "xno" ; then
9795698f425bSmrg		if test "x$SECURE_RPC" = "xyes" ; then
9796698f425bSmrg	AC_MSG_ERROR([Secure RPC requested, but required functions not found])
9797698f425bSmrg		fi	
9798698f425bSmrg		SECURE_RPC="no"
9799698f425bSmrg	else
9800698f425bSmrg		dnl FreeBSD keeps getsecretkey in librpcsvc
9801698f425bSmrg		AC_SEARCH_LIBS(getsecretkey, [rpcsvc])
9802698f425bSmrg		SECURE_RPC="yes"
9803698f425bSmrg	fi
9804698f425bSmrg fi
9805698f425bSmrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported])
9806698f425bSmrg if test "x$SECURE_RPC" = "xyes" ; then
9807698f425bSmrg	AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
9808698f425bSmrg fi
9809698f425bSmrg AC_MSG_RESULT($SECURE_RPC)
9810698f425bSmrg]) # XTRANS_SECURE_RPC_FLAGS
9811698f425bSmrg
9812698f425bSmrg
9813