1346442Scy# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
2251883Speter
3346442Scy# Copyright (C) 1996-2017 Free Software Foundation, Inc.
4298161Sbapt
5251883Speter# This file is free software; the Free Software Foundation
6251883Speter# gives unlimited permission to copy and/or distribute it,
7251883Speter# with or without modifications, as long as this notice is preserved.
8251883Speter
9251883Speter# This program is distributed in the hope that it will be useful,
10251883Speter# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11251883Speter# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12251883Speter# PARTICULAR PURPOSE.
13251883Speter
14298161Sbaptm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15269851Speterm4_ifndef([AC_AUTOCONF_VERSION],
16269851Speter  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17269851Speterm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18269851Speter[m4_warning([this file was generated for autoconf 2.69.
19269851SpeterYou have another version of autoconf.  It may work, but is not guaranteed to.
20269851SpeterIf you have problems, you may need to regenerate the build system entirely.
21298161SbaptTo do so, use the procedure documented by the package, typically 'autoreconf'.])])
22269851Speter
23251883Speter# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
24269851Speter#
25298161Sbapt#   Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
26269851Speter#   Written by Gordon Matzigkeit, 1996
27269851Speter#
28269851Speter# This file is free software; the Free Software Foundation gives
29269851Speter# unlimited permission to copy and/or distribute it, with or without
30269851Speter# modifications, as long as this notice is preserved.
31251883Speter
32269851Speterm4_define([_LT_COPYING], [dnl
33298161Sbapt# Copyright (C) 2014 Free Software Foundation, Inc.
34298161Sbapt# This is free software; see the source for copying conditions.  There is NO
35298161Sbapt# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
36298161Sbapt
37298161Sbapt# GNU Libtool is free software; you can redistribute it and/or modify
38298161Sbapt# it under the terms of the GNU General Public License as published by
39298161Sbapt# the Free Software Foundation; either version 2 of of the License, or
40298161Sbapt# (at your option) any later version.
41269851Speter#
42298161Sbapt# As a special exception to the GNU General Public License, if you
43298161Sbapt# distribute this file as part of a program or library that is built
44298161Sbapt# using GNU Libtool, you may include this file under the  same
45298161Sbapt# distribution terms that you use for the rest of that program.
46269851Speter#
47298161Sbapt# GNU Libtool is distributed in the hope that it will be useful, but
48298161Sbapt# WITHOUT ANY WARRANTY; without even the implied warranty of
49269851Speter# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
50269851Speter# GNU General Public License for more details.
51269851Speter#
52269851Speter# You should have received a copy of the GNU General Public License
53298161Sbapt# along with this program.  If not, see <http://www.gnu.org/licenses/>.
54269851Speter])
55251883Speter
56298161Sbapt# serial 58 LT_INIT
57251883Speter
58251883Speter
59269851Speter# LT_PREREQ(VERSION)
60269851Speter# ------------------
61269851Speter# Complain and exit if this libtool version is less that VERSION.
62269851Speterm4_defun([LT_PREREQ],
63269851Speter[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
64269851Speter       [m4_default([$3],
65269851Speter		   [m4_fatal([Libtool version $1 or higher is required],
66269851Speter		             63)])],
67269851Speter       [$2])])
68251883Speter
69251883Speter
70269851Speter# _LT_CHECK_BUILDDIR
71269851Speter# ------------------
72269851Speter# Complain if the absolute build directory name contains unusual characters
73269851Speterm4_defun([_LT_CHECK_BUILDDIR],
74269851Speter[case `pwd` in
75269851Speter  *\ * | *\	*)
76269851Speter    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
77269851Speteresac
78269851Speter])
79251883Speter
80251883Speter
81269851Speter# LT_INIT([OPTIONS])
82269851Speter# ------------------
83269851SpeterAC_DEFUN([LT_INIT],
84298161Sbapt[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
85269851SpeterAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
86269851SpeterAC_BEFORE([$0], [LT_LANG])dnl
87269851SpeterAC_BEFORE([$0], [LT_OUTPUT])dnl
88269851SpeterAC_BEFORE([$0], [LTDL_INIT])dnl
89269851Speterm4_require([_LT_CHECK_BUILDDIR])dnl
90251883Speter
91269851Speterdnl Autoconf doesn't catch unexpanded LT_ macros by default:
92269851Speterm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
93269851Speterm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
94269851Speterdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
95269851Speterdnl unless we require an AC_DEFUNed macro:
96269851SpeterAC_REQUIRE([LTOPTIONS_VERSION])dnl
97269851SpeterAC_REQUIRE([LTSUGAR_VERSION])dnl
98269851SpeterAC_REQUIRE([LTVERSION_VERSION])dnl
99269851SpeterAC_REQUIRE([LTOBSOLETE_VERSION])dnl
100269851Speterm4_require([_LT_PROG_LTMAIN])dnl
101269851Speter
102269851Speter_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
103269851Speter
104269851Speterdnl Parse OPTIONS
105269851Speter_LT_SET_OPTIONS([$0], [$1])
106269851Speter
107251883Speter# This can be used to rebuild libtool when needed
108298161SbaptLIBTOOL_DEPS=$ltmain
109251883Speter
110251883Speter# Always use our own libtool.
111251883SpeterLIBTOOL='$(SHELL) $(top_builddir)/libtool'
112251883SpeterAC_SUBST(LIBTOOL)dnl
113251883Speter
114269851Speter_LT_SETUP
115251883Speter
116269851Speter# Only expand once:
117269851Speterm4_define([LT_INIT])
118269851Speter])# LT_INIT
119251883Speter
120269851Speter# Old names:
121269851SpeterAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
122269851SpeterAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
123269851Speterdnl aclocal-1.4 backwards compatibility:
124269851Speterdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
125269851Speterdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
126269851Speter
127269851Speter
128298161Sbapt# _LT_PREPARE_CC_BASENAME
129298161Sbapt# -----------------------
130298161Sbaptm4_defun([_LT_PREPARE_CC_BASENAME], [
131298161Sbapt# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
132298161Sbaptfunc_cc_basename ()
133298161Sbapt{
134298161Sbapt    for cc_temp in @S|@*""; do
135298161Sbapt      case $cc_temp in
136298161Sbapt        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
137298161Sbapt        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
138298161Sbapt        \-*) ;;
139298161Sbapt        *) break;;
140298161Sbapt      esac
141298161Sbapt    done
142298161Sbapt    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
143298161Sbapt}
144298161Sbapt])# _LT_PREPARE_CC_BASENAME
145298161Sbapt
146298161Sbapt
147269851Speter# _LT_CC_BASENAME(CC)
148269851Speter# -------------------
149298161Sbapt# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
150298161Sbapt# but that macro is also expanded into generated libtool script, which
151298161Sbapt# arranges for $SED and $ECHO to be set by different means.
152269851Speterm4_defun([_LT_CC_BASENAME],
153298161Sbapt[m4_require([_LT_PREPARE_CC_BASENAME])dnl
154298161SbaptAC_REQUIRE([_LT_DECL_SED])dnl
155298161SbaptAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
156298161Sbaptfunc_cc_basename $1
157298161Sbaptcc_basename=$func_cc_basename_result
158269851Speter])
159269851Speter
160269851Speter
161269851Speter# _LT_FILEUTILS_DEFAULTS
162269851Speter# ----------------------
163269851Speter# It is okay to use these file commands and assume they have been set
164298161Sbapt# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
165269851Speterm4_defun([_LT_FILEUTILS_DEFAULTS],
166269851Speter[: ${CP="cp -f"}
167269851Speter: ${MV="mv -f"}
168269851Speter: ${RM="rm -f"}
169269851Speter])# _LT_FILEUTILS_DEFAULTS
170269851Speter
171269851Speter
172269851Speter# _LT_SETUP
173269851Speter# ---------
174269851Speterm4_defun([_LT_SETUP],
175269851Speter[AC_REQUIRE([AC_CANONICAL_HOST])dnl
176251883SpeterAC_REQUIRE([AC_CANONICAL_BUILD])dnl
177269851SpeterAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
178269851SpeterAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
179269851Speter
180269851Speter_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
181269851Speterdnl
182269851Speter_LT_DECL([], [host_alias], [0], [The host system])dnl
183269851Speter_LT_DECL([], [host], [0])dnl
184269851Speter_LT_DECL([], [host_os], [0])dnl
185269851Speterdnl
186269851Speter_LT_DECL([], [build_alias], [0], [The build system])dnl
187269851Speter_LT_DECL([], [build], [0])dnl
188269851Speter_LT_DECL([], [build_os], [0])dnl
189269851Speterdnl
190251883SpeterAC_REQUIRE([AC_PROG_CC])dnl
191269851SpeterAC_REQUIRE([LT_PATH_LD])dnl
192269851SpeterAC_REQUIRE([LT_PATH_NM])dnl
193269851Speterdnl
194251883SpeterAC_REQUIRE([AC_PROG_LN_S])dnl
195269851Spetertest -z "$LN_S" && LN_S="ln -s"
196269851Speter_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
197251883Speterdnl
198269851SpeterAC_REQUIRE([LT_CMD_MAX_LEN])dnl
199269851Speter_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
200269851Speter_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
201269851Speterdnl
202269851Speterm4_require([_LT_FILEUTILS_DEFAULTS])dnl
203269851Speterm4_require([_LT_CHECK_SHELL_FEATURES])dnl
204269851Speterm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
205269851Speterm4_require([_LT_CMD_RELOAD])dnl
206269851Speterm4_require([_LT_CHECK_MAGIC_METHOD])dnl
207269851Speterm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
208269851Speterm4_require([_LT_CMD_OLD_ARCHIVE])dnl
209269851Speterm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
210269851Speterm4_require([_LT_WITH_SYSROOT])dnl
211298161Sbaptm4_require([_LT_CMD_TRUNCATE])dnl
212251883Speter
213269851Speter_LT_CONFIG_LIBTOOL_INIT([
214298161Sbapt# See if we are running on zsh, and set the options that allow our
215269851Speter# commands through without removal of \ escapes INIT.
216298161Sbaptif test -n "\${ZSH_VERSION+set}"; then
217269851Speter   setopt NO_GLOB_SUBST
218269851Speterfi
219269851Speter])
220298161Sbaptif test -n "${ZSH_VERSION+set}"; then
221269851Speter   setopt NO_GLOB_SUBST
222269851Speterfi
223251883Speter
224269851Speter_LT_CHECK_OBJDIR
225251883Speter
226269851Speterm4_require([_LT_TAG_COMPILER])dnl
227269851Speter
228251883Spetercase $host_os in
229251883Speteraix3*)
230251883Speter  # AIX sometimes has problems with the GCC collect2 program.  For some
231251883Speter  # reason, if we set the COLLECT_NAMES environment variable, the problems
232251883Speter  # vanish in a puff of smoke.
233298161Sbapt  if test set != "${COLLECT_NAMES+set}"; then
234251883Speter    COLLECT_NAMES=
235251883Speter    export COLLECT_NAMES
236251883Speter  fi
237251883Speter  ;;
238251883Speteresac
239251883Speter
240251883Speter# Global variables:
241269851Speterofile=libtool
242251883Spetercan_build_shared=yes
243251883Speter
244298161Sbapt# All known linkers require a '.a' archive for static linking (except MSVC,
245251883Speter# which needs '.lib').
246251883Speterlibext=a
247269851Speter
248298161Sbaptwith_gnu_ld=$lt_cv_prog_gnu_ld
249251883Speter
250298161Sbaptold_CC=$CC
251298161Sbaptold_CFLAGS=$CFLAGS
252251883Speter
253251883Speter# Set sane defaults for various variables
254251883Spetertest -z "$CC" && CC=cc
255251883Spetertest -z "$LTCC" && LTCC=$CC
256251883Spetertest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
257251883Spetertest -z "$LD" && LD=ld
258251883Spetertest -z "$ac_objext" && ac_objext=o
259251883Speter
260251883Speter_LT_CC_BASENAME([$compiler])
261251883Speter
262251883Speter# Only perform the check for file, if the check method requires it
263269851Spetertest -z "$MAGIC_CMD" && MAGIC_CMD=file
264251883Spetercase $deplibs_check_method in
265251883Speterfile_magic*)
266251883Speter  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
267269851Speter    _LT_PATH_MAGIC
268251883Speter  fi
269251883Speter  ;;
270251883Speteresac
271251883Speter
272269851Speter# Use C for the default configuration in the libtool script
273269851SpeterLT_SUPPORTED_TAG([CC])
274269851Speter_LT_LANG_C_CONFIG
275269851Speter_LT_LANG_DEFAULT_CONFIG
276269851Speter_LT_CONFIG_COMMANDS
277269851Speter])# _LT_SETUP
278251883Speter
279251883Speter
280269851Speter# _LT_PREPARE_SED_QUOTE_VARS
281269851Speter# --------------------------
282269851Speter# Define a few sed substitution that help us do robust quoting.
283269851Speterm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
284269851Speter[# Backslashify metacharacters that are still active within
285269851Speter# double-quoted strings.
286269851Spetersed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
287251883Speter
288269851Speter# Same as above, but do not quote variable references.
289269851Speterdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
290251883Speter
291269851Speter# Sed substitution to delay expansion of an escaped shell variable in a
292269851Speter# double_quote_subst'ed string.
293269851Speterdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
294251883Speter
295269851Speter# Sed substitution to delay expansion of an escaped single quote.
296269851Speterdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
297269851Speter
298269851Speter# Sed substitution to avoid accidental globbing in evaled expressions
299269851Speterno_glob_subst='s/\*/\\\*/g'
300269851Speter])
301269851Speter
302269851Speter# _LT_PROG_LTMAIN
303269851Speter# ---------------
304298161Sbapt# Note that this code is called both from 'configure', and 'config.status'
305269851Speter# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
306298161Sbapt# 'config.status' has no value for ac_aux_dir unless we are using Automake,
307269851Speter# so we pass a copy along to make sure it has a sensible value anyway.
308269851Speterm4_defun([_LT_PROG_LTMAIN],
309269851Speter[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
310269851Speter_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
311298161Sbaptltmain=$ac_aux_dir/ltmain.sh
312269851Speter])# _LT_PROG_LTMAIN
313269851Speter
314269851Speter
315269851Speter
316269851Speter# So that we can recreate a full libtool script including additional
317269851Speter# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
318298161Sbapt# in macros and then make a single call at the end using the 'libtool'
319269851Speter# label.
320269851Speter
321269851Speter
322269851Speter# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
323269851Speter# ----------------------------------------
324269851Speter# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
325269851Speterm4_define([_LT_CONFIG_LIBTOOL_INIT],
326269851Speter[m4_ifval([$1],
327269851Speter          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
328269851Speter                     [$1
329269851Speter])])])
330269851Speter
331269851Speter# Initialize.
332269851Speterm4_define([_LT_OUTPUT_LIBTOOL_INIT])
333269851Speter
334269851Speter
335269851Speter# _LT_CONFIG_LIBTOOL([COMMANDS])
336269851Speter# ------------------------------
337269851Speter# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
338269851Speterm4_define([_LT_CONFIG_LIBTOOL],
339269851Speter[m4_ifval([$1],
340269851Speter          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
341269851Speter                     [$1
342269851Speter])])])
343269851Speter
344269851Speter# Initialize.
345269851Speterm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
346269851Speter
347269851Speter
348269851Speter# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
349269851Speter# -----------------------------------------------------
350269851Speterm4_defun([_LT_CONFIG_SAVE_COMMANDS],
351269851Speter[_LT_CONFIG_LIBTOOL([$1])
352269851Speter_LT_CONFIG_LIBTOOL_INIT([$2])
353269851Speter])
354269851Speter
355269851Speter
356269851Speter# _LT_FORMAT_COMMENT([COMMENT])
357269851Speter# -----------------------------
358269851Speter# Add leading comment marks to the start of each line, and a trailing
359269851Speter# full-stop to the whole comment if one is not present already.
360269851Speterm4_define([_LT_FORMAT_COMMENT],
361269851Speter[m4_ifval([$1], [
362269851Speterm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
363269851Speter              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
364269851Speter)])
365269851Speter
366269851Speter
367269851Speter
368269851Speter
369269851Speter
370269851Speter# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
371269851Speter# -------------------------------------------------------------------
372269851Speter# CONFIGNAME is the name given to the value in the libtool script.
373269851Speter# VARNAME is the (base) name used in the configure script.
374269851Speter# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
375269851Speter# VARNAME.  Any other value will be used directly.
376269851Speterm4_define([_LT_DECL],
377269851Speter[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
378269851Speter    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
379269851Speter	[m4_ifval([$1], [$1], [$2])])
380269851Speter    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
381269851Speter    m4_ifval([$4],
382269851Speter	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
383269851Speter    lt_dict_add_subkey([lt_decl_dict], [$2],
384269851Speter	[tagged?], [m4_ifval([$5], [yes], [no])])])
385269851Speter])
386269851Speter
387269851Speter
388269851Speter# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
389269851Speter# --------------------------------------------------------
390269851Speterm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
391269851Speter
392269851Speter
393269851Speter# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
394269851Speter# ------------------------------------------------
395269851Speterm4_define([lt_decl_tag_varnames],
396269851Speter[_lt_decl_filter([tagged?], [yes], $@)])
397269851Speter
398269851Speter
399269851Speter# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
400269851Speter# ---------------------------------------------------------
401269851Speterm4_define([_lt_decl_filter],
402269851Speter[m4_case([$#],
403269851Speter  [0], [m4_fatal([$0: too few arguments: $#])],
404269851Speter  [1], [m4_fatal([$0: too few arguments: $#: $1])],
405269851Speter  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
406269851Speter  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
407269851Speter  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
408269851Speter])
409269851Speter
410269851Speter
411269851Speter# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
412269851Speter# --------------------------------------------------
413269851Speterm4_define([lt_decl_quote_varnames],
414269851Speter[_lt_decl_filter([value], [1], $@)])
415269851Speter
416269851Speter
417269851Speter# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
418269851Speter# ---------------------------------------------------
419269851Speterm4_define([lt_decl_dquote_varnames],
420269851Speter[_lt_decl_filter([value], [2], $@)])
421269851Speter
422269851Speter
423269851Speter# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
424269851Speter# ---------------------------------------------------
425269851Speterm4_define([lt_decl_varnames_tagged],
426269851Speter[m4_assert([$# <= 2])dnl
427269851Speter_$0(m4_quote(m4_default([$1], [[, ]])),
428269851Speter    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
429269851Speter    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
430269851Speterm4_define([_lt_decl_varnames_tagged],
431269851Speter[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
432269851Speter
433269851Speter
434269851Speter# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
435269851Speter# ------------------------------------------------
436269851Speterm4_define([lt_decl_all_varnames],
437269851Speter[_$0(m4_quote(m4_default([$1], [[, ]])),
438269851Speter     m4_if([$2], [],
439269851Speter	   m4_quote(lt_decl_varnames),
440269851Speter	m4_quote(m4_shift($@))))[]dnl
441269851Speter])
442269851Speterm4_define([_lt_decl_all_varnames],
443269851Speter[lt_join($@, lt_decl_varnames_tagged([$1],
444269851Speter			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
445269851Speter])
446269851Speter
447269851Speter
448269851Speter# _LT_CONFIG_STATUS_DECLARE([VARNAME])
449269851Speter# ------------------------------------
450298161Sbapt# Quote a variable value, and forward it to 'config.status' so that its
451298161Sbapt# declaration there will have the same value as in 'configure'.  VARNAME
452269851Speter# must have a single quote delimited value for this to work.
453269851Speterm4_define([_LT_CONFIG_STATUS_DECLARE],
454269851Speter[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
455269851Speter
456269851Speter
457269851Speter# _LT_CONFIG_STATUS_DECLARATIONS
458269851Speter# ------------------------------
459269851Speter# We delimit libtool config variables with single quotes, so when
460269851Speter# we write them to config.status, we have to be sure to quote all
461269851Speter# embedded single quotes properly.  In configure, this macro expands
462269851Speter# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
463269851Speter#
464269851Speter#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
465269851Speterm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
466269851Speter[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
467269851Speter    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
468269851Speter
469269851Speter
470269851Speter# _LT_LIBTOOL_TAGS
471269851Speter# ----------------
472269851Speter# Output comment and list of tags supported by the script
473269851Speterm4_defun([_LT_LIBTOOL_TAGS],
474269851Speter[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
475298161Sbaptavailable_tags='_LT_TAGS'dnl
476269851Speter])
477269851Speter
478269851Speter
479269851Speter# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
480269851Speter# -----------------------------------
481269851Speter# Extract the dictionary values for VARNAME (optionally with TAG) and
482269851Speter# expand to a commented shell variable setting:
483269851Speter#
484269851Speter#    # Some comment about what VAR is for.
485269851Speter#    visible_name=$lt_internal_name
486269851Speterm4_define([_LT_LIBTOOL_DECLARE],
487269851Speter[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
488269851Speter					   [description])))[]dnl
489269851Speterm4_pushdef([_libtool_name],
490269851Speter    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
491269851Speterm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
492269851Speter    [0], [_libtool_name=[$]$1],
493269851Speter    [1], [_libtool_name=$lt_[]$1],
494269851Speter    [2], [_libtool_name=$lt_[]$1],
495269851Speter    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
496269851Speterm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
497269851Speter])
498269851Speter
499269851Speter
500269851Speter# _LT_LIBTOOL_CONFIG_VARS
501269851Speter# -----------------------
502269851Speter# Produce commented declarations of non-tagged libtool config variables
503298161Sbapt# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
504269851Speter# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
505269851Speter# section) are produced by _LT_LIBTOOL_TAG_VARS.
506269851Speterm4_defun([_LT_LIBTOOL_CONFIG_VARS],
507269851Speter[m4_foreach([_lt_var],
508269851Speter    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
509269851Speter    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
510269851Speter
511269851Speter
512269851Speter# _LT_LIBTOOL_TAG_VARS(TAG)
513269851Speter# -------------------------
514269851Speterm4_define([_LT_LIBTOOL_TAG_VARS],
515269851Speter[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
516269851Speter    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
517269851Speter
518269851Speter
519269851Speter# _LT_TAGVAR(VARNAME, [TAGNAME])
520269851Speter# ------------------------------
521269851Speterm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
522269851Speter
523269851Speter
524269851Speter# _LT_CONFIG_COMMANDS
525251883Speter# -------------------
526269851Speter# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
527269851Speter# variables for single and double quote escaping we saved from calls
528269851Speter# to _LT_DECL, we can put quote escaped variables declarations
529298161Sbapt# into 'config.status', and then the shell code to quote escape them in
530298161Sbapt# for loops in 'config.status'.  Finally, any additional code accumulated
531269851Speter# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
532269851Speterm4_defun([_LT_CONFIG_COMMANDS],
533269851Speter[AC_PROVIDE_IFELSE([LT_OUTPUT],
534269851Speter	dnl If the libtool generation code has been placed in $CONFIG_LT,
535269851Speter	dnl instead of duplicating it all over again into config.status,
536269851Speter	dnl then we will have config.status run $CONFIG_LT later, so it
537269851Speter	dnl needs to know what name is stored there:
538269851Speter        [AC_CONFIG_COMMANDS([libtool],
539269851Speter            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
540269851Speter    dnl If the libtool generation code is destined for config.status,
541269851Speter    dnl expand the accumulated commands and init code now:
542269851Speter    [AC_CONFIG_COMMANDS([libtool],
543269851Speter        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
544269851Speter])#_LT_CONFIG_COMMANDS
545269851Speter
546269851Speter
547269851Speter# Initialize.
548269851Speterm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
549269851Speter[
550269851Speter
551269851Speter# The HP-UX ksh and POSIX shell print the target directory to stdout
552269851Speter# if CDPATH is set.
553269851Speter(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
554269851Speter
555269851Spetersed_quote_subst='$sed_quote_subst'
556269851Speterdouble_quote_subst='$double_quote_subst'
557269851Speterdelay_variable_subst='$delay_variable_subst'
558269851Speter_LT_CONFIG_STATUS_DECLARATIONS
559269851SpeterLTCC='$LTCC'
560269851SpeterLTCFLAGS='$LTCFLAGS'
561269851Spetercompiler='$compiler_DEFAULT'
562269851Speter
563269851Speter# A function that is used when there is no print builtin or printf.
564269851Speterfunc_fallback_echo ()
565269851Speter{
566269851Speter  eval 'cat <<_LTECHO_EOF
567269851Speter\$[]1
568269851Speter_LTECHO_EOF'
569269851Speter}
570269851Speter
571269851Speter# Quote evaled strings.
572269851Speterfor var in lt_decl_all_varnames([[ \
573269851Speter]], lt_decl_quote_varnames); do
574269851Speter    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
575269851Speter    *[[\\\\\\\`\\"\\\$]]*)
576298161Sbapt      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
577269851Speter      ;;
578269851Speter    *)
579269851Speter      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
580269851Speter      ;;
581269851Speter    esac
582269851Speterdone
583269851Speter
584269851Speter# Double-quote double-evaled strings.
585269851Speterfor var in lt_decl_all_varnames([[ \
586269851Speter]], lt_decl_dquote_varnames); do
587269851Speter    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
588269851Speter    *[[\\\\\\\`\\"\\\$]]*)
589298161Sbapt      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
590269851Speter      ;;
591269851Speter    *)
592269851Speter      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
593269851Speter      ;;
594269851Speter    esac
595269851Speterdone
596269851Speter
597269851Speter_LT_OUTPUT_LIBTOOL_INIT
598269851Speter])
599269851Speter
600269851Speter# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
601269851Speter# ------------------------------------
602269851Speter# Generate a child script FILE with all initialization necessary to
603269851Speter# reuse the environment learned by the parent script, and make the
604269851Speter# file executable.  If COMMENT is supplied, it is inserted after the
605298161Sbapt# '#!' sequence but before initialization text begins.  After this
606269851Speter# macro, additional text can be appended to FILE to form the body of
607269851Speter# the child script.  The macro ends with non-zero status if the
608269851Speter# file could not be fully written (such as if the disk is full).
609269851Speterm4_ifdef([AS_INIT_GENERATED],
610269851Speter[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
611269851Speter[m4_defun([_LT_GENERATED_FILE_INIT],
612269851Speter[m4_require([AS_PREPARE])]dnl
613269851Speter[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
614269851Speter[lt_write_fail=0
615269851Spetercat >$1 <<_ASEOF || lt_write_fail=1
616269851Speter#! $SHELL
617269851Speter# Generated by $as_me.
618269851Speter$2
619269851SpeterSHELL=\${CONFIG_SHELL-$SHELL}
620269851Speterexport SHELL
621269851Speter_ASEOF
622269851Spetercat >>$1 <<\_ASEOF || lt_write_fail=1
623269851SpeterAS_SHELL_SANITIZE
624269851Speter_AS_PREPARE
625269851Speterexec AS_MESSAGE_FD>&1
626269851Speter_ASEOF
627298161Sbapttest 0 = "$lt_write_fail" && chmod +x $1[]dnl
628269851Speterm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
629269851Speter
630269851Speter# LT_OUTPUT
631269851Speter# ---------
632269851Speter# This macro allows early generation of the libtool script (before
633269851Speter# AC_OUTPUT is called), incase it is used in configure for compilation
634269851Speter# tests.
635269851SpeterAC_DEFUN([LT_OUTPUT],
636269851Speter[: ${CONFIG_LT=./config.lt}
637269851SpeterAC_MSG_NOTICE([creating $CONFIG_LT])
638269851Speter_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
639269851Speter[# Run this file to recreate a libtool stub with the current configuration.])
640269851Speter
641269851Spetercat >>"$CONFIG_LT" <<\_LTEOF
642269851Speterlt_cl_silent=false
643269851Speterexec AS_MESSAGE_LOG_FD>>config.log
644269851Speter{
645269851Speter  echo
646269851Speter  AS_BOX([Running $as_me.])
647269851Speter} >&AS_MESSAGE_LOG_FD
648269851Speter
649269851Speterlt_cl_help="\
650298161Sbapt'$as_me' creates a local libtool stub from the current configuration,
651269851Speterfor use in further configure time tests before the real libtool is
652269851Spetergenerated.
653269851Speter
654269851SpeterUsage: $[0] [[OPTIONS]]
655269851Speter
656269851Speter  -h, --help      print this help, then exit
657269851Speter  -V, --version   print version number, then exit
658269851Speter  -q, --quiet     do not print progress messages
659269851Speter  -d, --debug     don't remove temporary files
660269851Speter
661269851SpeterReport bugs to <bug-libtool@gnu.org>."
662269851Speter
663269851Speterlt_cl_version="\
664269851Speterm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
665269851Speterm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
666269851Speterconfigured by $[0], generated by m4_PACKAGE_STRING.
667269851Speter
668269851SpeterCopyright (C) 2011 Free Software Foundation, Inc.
669269851SpeterThis config.lt script is free software; the Free Software Foundation
670269851Spetergives unlimited permision to copy, distribute and modify it."
671269851Speter
672298161Sbaptwhile test 0 != $[#]
673269851Speterdo
674269851Speter  case $[1] in
675269851Speter    --version | --v* | -V )
676269851Speter      echo "$lt_cl_version"; exit 0 ;;
677269851Speter    --help | --h* | -h )
678269851Speter      echo "$lt_cl_help"; exit 0 ;;
679269851Speter    --debug | --d* | -d )
680269851Speter      debug=: ;;
681269851Speter    --quiet | --q* | --silent | --s* | -q )
682269851Speter      lt_cl_silent=: ;;
683269851Speter
684269851Speter    -*) AC_MSG_ERROR([unrecognized option: $[1]
685298161SbaptTry '$[0] --help' for more information.]) ;;
686269851Speter
687269851Speter    *) AC_MSG_ERROR([unrecognized argument: $[1]
688298161SbaptTry '$[0] --help' for more information.]) ;;
689269851Speter  esac
690269851Speter  shift
691269851Speterdone
692269851Speter
693269851Speterif $lt_cl_silent; then
694269851Speter  exec AS_MESSAGE_FD>/dev/null
695269851Speterfi
696269851Speter_LTEOF
697269851Speter
698269851Spetercat >>"$CONFIG_LT" <<_LTEOF
699269851Speter_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
700269851Speter_LTEOF
701269851Speter
702269851Spetercat >>"$CONFIG_LT" <<\_LTEOF
703269851SpeterAC_MSG_NOTICE([creating $ofile])
704269851Speter_LT_OUTPUT_LIBTOOL_COMMANDS
705269851SpeterAS_EXIT(0)
706269851Speter_LTEOF
707269851Speterchmod +x "$CONFIG_LT"
708269851Speter
709269851Speter# configure is writing to config.log, but config.lt does its own redirection,
710269851Speter# appending to config.log, which fails on DOS, as config.log is still kept
711269851Speter# open by configure.  Here we exec the FD to /dev/null, effectively closing
712269851Speter# config.log, so it can be properly (re)opened and appended to by config.lt.
713269851Speterlt_cl_success=:
714298161Sbapttest yes = "$silent" &&
715269851Speter  lt_config_lt_args="$lt_config_lt_args --quiet"
716269851Speterexec AS_MESSAGE_LOG_FD>/dev/null
717269851Speter$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
718269851Speterexec AS_MESSAGE_LOG_FD>>config.log
719269851Speter$lt_cl_success || AS_EXIT(1)
720269851Speter])# LT_OUTPUT
721269851Speter
722269851Speter
723269851Speter# _LT_CONFIG(TAG)
724269851Speter# ---------------
725269851Speter# If TAG is the built-in tag, create an initial libtool script with a
726269851Speter# default configuration from the untagged config vars.  Otherwise add code
727269851Speter# to config.status for appending the configuration named by TAG from the
728269851Speter# matching tagged config vars.
729269851Speterm4_defun([_LT_CONFIG],
730269851Speter[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
731269851Speter_LT_CONFIG_SAVE_COMMANDS([
732269851Speter  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
733269851Speter  m4_if(_LT_TAG, [C], [
734298161Sbapt    # See if we are running on zsh, and set the options that allow our
735269851Speter    # commands through without removal of \ escapes.
736298161Sbapt    if test -n "${ZSH_VERSION+set}"; then
737269851Speter      setopt NO_GLOB_SUBST
738269851Speter    fi
739269851Speter
740298161Sbapt    cfgfile=${ofile}T
741269851Speter    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
742269851Speter    $RM "$cfgfile"
743269851Speter
744269851Speter    cat <<_LT_EOF >> "$cfgfile"
745269851Speter#! $SHELL
746298161Sbapt# Generated automatically by $as_me ($PACKAGE) $VERSION
747269851Speter# NOTE: Changes made to this file will be lost: look at ltmain.sh.
748298161Sbapt
749298161Sbapt# Provide generalized library-building support services.
750298161Sbapt# Written by Gordon Matzigkeit, 1996
751298161Sbapt
752269851Speter_LT_COPYING
753269851Speter_LT_LIBTOOL_TAGS
754269851Speter
755298161Sbapt# Configured defaults for sys_lib_dlsearch_path munging.
756298161Sbapt: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
757298161Sbapt
758269851Speter# ### BEGIN LIBTOOL CONFIG
759269851Speter_LT_LIBTOOL_CONFIG_VARS
760269851Speter_LT_LIBTOOL_TAG_VARS
761269851Speter# ### END LIBTOOL CONFIG
762269851Speter
763269851Speter_LT_EOF
764269851Speter
765298161Sbapt    cat <<'_LT_EOF' >> "$cfgfile"
766298161Sbapt
767298161Sbapt# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
768298161Sbapt
769298161Sbapt_LT_PREPARE_MUNGE_PATH_LIST
770298161Sbapt_LT_PREPARE_CC_BASENAME
771298161Sbapt
772298161Sbapt# ### END FUNCTIONS SHARED WITH CONFIGURE
773298161Sbapt
774298161Sbapt_LT_EOF
775298161Sbapt
776269851Speter  case $host_os in
777269851Speter  aix3*)
778269851Speter    cat <<\_LT_EOF >> "$cfgfile"
779269851Speter# AIX sometimes has problems with the GCC collect2 program.  For some
780269851Speter# reason, if we set the COLLECT_NAMES environment variable, the problems
781269851Speter# vanish in a puff of smoke.
782298161Sbaptif test set != "${COLLECT_NAMES+set}"; then
783269851Speter  COLLECT_NAMES=
784269851Speter  export COLLECT_NAMES
785269851Speterfi
786269851Speter_LT_EOF
787269851Speter    ;;
788269851Speter  esac
789269851Speter
790269851Speter  _LT_PROG_LTMAIN
791269851Speter
792269851Speter  # We use sed instead of cat because bash on DJGPP gets confused if
793269851Speter  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
794269851Speter  # text mode, it properly converts lines to CR/LF.  This bash problem
795269851Speter  # is reportedly fixed, but why not run on old versions too?
796269851Speter  sed '$q' "$ltmain" >> "$cfgfile" \
797269851Speter     || (rm -f "$cfgfile"; exit 1)
798269851Speter
799269851Speter   mv -f "$cfgfile" "$ofile" ||
800269851Speter    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
801269851Speter  chmod +x "$ofile"
802269851Speter],
803269851Speter[cat <<_LT_EOF >> "$ofile"
804269851Speter
805269851Speterdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
806269851Speterdnl in a comment (ie after a #).
807269851Speter# ### BEGIN LIBTOOL TAG CONFIG: $1
808269851Speter_LT_LIBTOOL_TAG_VARS(_LT_TAG)
809269851Speter# ### END LIBTOOL TAG CONFIG: $1
810269851Speter_LT_EOF
811269851Speter])dnl /m4_if
812269851Speter],
813269851Speter[m4_if([$1], [], [
814269851Speter    PACKAGE='$PACKAGE'
815269851Speter    VERSION='$VERSION'
816269851Speter    RM='$RM'
817269851Speter    ofile='$ofile'], [])
818269851Speter])dnl /_LT_CONFIG_SAVE_COMMANDS
819269851Speter])# _LT_CONFIG
820269851Speter
821269851Speter
822269851Speter# LT_SUPPORTED_TAG(TAG)
823269851Speter# ---------------------
824269851Speter# Trace this macro to discover what tags are supported by the libtool
825269851Speter# --tag option, using:
826269851Speter#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
827269851SpeterAC_DEFUN([LT_SUPPORTED_TAG], [])
828269851Speter
829269851Speter
830269851Speter# C support is built-in for now
831269851Speterm4_define([_LT_LANG_C_enabled], [])
832269851Speterm4_define([_LT_TAGS], [])
833269851Speter
834269851Speter
835269851Speter# LT_LANG(LANG)
836269851Speter# -------------
837269851Speter# Enable libtool support for the given language if not already enabled.
838269851SpeterAC_DEFUN([LT_LANG],
839269851Speter[AC_BEFORE([$0], [LT_OUTPUT])dnl
840269851Speterm4_case([$1],
841269851Speter  [C],			[_LT_LANG(C)],
842269851Speter  [C++],		[_LT_LANG(CXX)],
843269851Speter  [Go],			[_LT_LANG(GO)],
844269851Speter  [Java],		[_LT_LANG(GCJ)],
845269851Speter  [Fortran 77],		[_LT_LANG(F77)],
846269851Speter  [Fortran],		[_LT_LANG(FC)],
847269851Speter  [Windows Resource],	[_LT_LANG(RC)],
848269851Speter  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
849269851Speter    [_LT_LANG($1)],
850269851Speter    [m4_fatal([$0: unsupported language: "$1"])])])dnl
851269851Speter])# LT_LANG
852269851Speter
853269851Speter
854269851Speter# _LT_LANG(LANGNAME)
855269851Speter# ------------------
856269851Speterm4_defun([_LT_LANG],
857269851Speter[m4_ifdef([_LT_LANG_]$1[_enabled], [],
858269851Speter  [LT_SUPPORTED_TAG([$1])dnl
859269851Speter  m4_append([_LT_TAGS], [$1 ])dnl
860269851Speter  m4_define([_LT_LANG_]$1[_enabled], [])dnl
861269851Speter  _LT_LANG_$1_CONFIG($1)])dnl
862269851Speter])# _LT_LANG
863269851Speter
864269851Speter
865269851Speterm4_ifndef([AC_PROG_GO], [
866269851Speter# NOTE: This macro has been submitted for inclusion into   #
867269851Speter#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
868269851Speter#  a released version of Autoconf we should remove this    #
869269851Speter#  macro and use it instead.                               #
870269851Speterm4_defun([AC_PROG_GO],
871269851Speter[AC_LANG_PUSH(Go)dnl
872269851SpeterAC_ARG_VAR([GOC],     [Go compiler command])dnl
873269851SpeterAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
874269851Speter_AC_ARG_VAR_LDFLAGS()dnl
875269851SpeterAC_CHECK_TOOL(GOC, gccgo)
876269851Speterif test -z "$GOC"; then
877269851Speter  if test -n "$ac_tool_prefix"; then
878269851Speter    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
879269851Speter  fi
880269851Speterfi
881269851Speterif test -z "$GOC"; then
882269851Speter  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
883269851Speterfi
884269851Speter])#m4_defun
885269851Speter])#m4_ifndef
886269851Speter
887269851Speter
888269851Speter# _LT_LANG_DEFAULT_CONFIG
889269851Speter# -----------------------
890269851Speterm4_defun([_LT_LANG_DEFAULT_CONFIG],
891269851Speter[AC_PROVIDE_IFELSE([AC_PROG_CXX],
892269851Speter  [LT_LANG(CXX)],
893269851Speter  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
894269851Speter
895269851SpeterAC_PROVIDE_IFELSE([AC_PROG_F77],
896269851Speter  [LT_LANG(F77)],
897269851Speter  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
898269851Speter
899269851SpeterAC_PROVIDE_IFELSE([AC_PROG_FC],
900269851Speter  [LT_LANG(FC)],
901269851Speter  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
902269851Speter
903269851Speterdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
904269851Speterdnl pulling things in needlessly.
905269851SpeterAC_PROVIDE_IFELSE([AC_PROG_GCJ],
906269851Speter  [LT_LANG(GCJ)],
907269851Speter  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
908269851Speter    [LT_LANG(GCJ)],
909269851Speter    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
910269851Speter      [LT_LANG(GCJ)],
911269851Speter      [m4_ifdef([AC_PROG_GCJ],
912269851Speter	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
913269851Speter       m4_ifdef([A][M_PROG_GCJ],
914269851Speter	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
915269851Speter       m4_ifdef([LT_PROG_GCJ],
916269851Speter	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
917269851Speter
918269851SpeterAC_PROVIDE_IFELSE([AC_PROG_GO],
919269851Speter  [LT_LANG(GO)],
920269851Speter  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
921269851Speter
922269851SpeterAC_PROVIDE_IFELSE([LT_PROG_RC],
923269851Speter  [LT_LANG(RC)],
924269851Speter  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
925269851Speter])# _LT_LANG_DEFAULT_CONFIG
926269851Speter
927269851Speter# Obsolete macros:
928269851SpeterAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
929269851SpeterAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
930269851SpeterAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
931269851SpeterAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
932269851SpeterAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
933269851Speterdnl aclocal-1.4 backwards compatibility:
934269851Speterdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
935269851Speterdnl AC_DEFUN([AC_LIBTOOL_F77], [])
936269851Speterdnl AC_DEFUN([AC_LIBTOOL_FC], [])
937269851Speterdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
938269851Speterdnl AC_DEFUN([AC_LIBTOOL_RC], [])
939269851Speter
940269851Speter
941269851Speter# _LT_TAG_COMPILER
942269851Speter# ----------------
943269851Speterm4_defun([_LT_TAG_COMPILER],
944251883Speter[AC_REQUIRE([AC_PROG_CC])dnl
945251883Speter
946269851Speter_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
947269851Speter_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
948269851Speter_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
949269851Speter_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
950269851Speter
951251883Speter# If no C compiler was specified, use CC.
952251883SpeterLTCC=${LTCC-"$CC"}
953251883Speter
954251883Speter# If no C compiler flags were specified, use CFLAGS.
955251883SpeterLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
956251883Speter
957251883Speter# Allow CC to be a program name with arguments.
958251883Spetercompiler=$CC
959269851Speter])# _LT_TAG_COMPILER
960251883Speter
961251883Speter
962251883Speter# _LT_COMPILER_BOILERPLATE
963251883Speter# ------------------------
964251883Speter# Check for compiler boilerplate output or warnings with
965251883Speter# the simple compiler test code.
966269851Speterm4_defun([_LT_COMPILER_BOILERPLATE],
967269851Speter[m4_require([_LT_DECL_SED])dnl
968269851Speterac_outfile=conftest.$ac_objext
969269851Speterecho "$lt_simple_compile_test_code" >conftest.$ac_ext
970251883Spetereval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
971251883Speter_lt_compiler_boilerplate=`cat conftest.err`
972269851Speter$RM conftest*
973251883Speter])# _LT_COMPILER_BOILERPLATE
974251883Speter
975251883Speter
976251883Speter# _LT_LINKER_BOILERPLATE
977251883Speter# ----------------------
978251883Speter# Check for linker boilerplate output or warnings with
979251883Speter# the simple link test code.
980269851Speterm4_defun([_LT_LINKER_BOILERPLATE],
981269851Speter[m4_require([_LT_DECL_SED])dnl
982269851Speterac_outfile=conftest.$ac_objext
983269851Speterecho "$lt_simple_link_test_code" >conftest.$ac_ext
984251883Spetereval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
985251883Speter_lt_linker_boilerplate=`cat conftest.err`
986269851Speter$RM -r conftest*
987251883Speter])# _LT_LINKER_BOILERPLATE
988251883Speter
989269851Speter# _LT_REQUIRED_DARWIN_CHECKS
990269851Speter# -------------------------
991269851Speterm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
992269851Speter  case $host_os in
993269851Speter    rhapsody* | darwin*)
994269851Speter    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
995269851Speter    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
996269851Speter    AC_CHECK_TOOL([LIPO], [lipo], [:])
997269851Speter    AC_CHECK_TOOL([OTOOL], [otool], [:])
998269851Speter    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
999269851Speter    _LT_DECL([], [DSYMUTIL], [1],
1000269851Speter      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1001269851Speter    _LT_DECL([], [NMEDIT], [1],
1002269851Speter      [Tool to change global to local symbols on Mac OS X])
1003269851Speter    _LT_DECL([], [LIPO], [1],
1004269851Speter      [Tool to manipulate fat objects and archives on Mac OS X])
1005269851Speter    _LT_DECL([], [OTOOL], [1],
1006269851Speter      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1007269851Speter    _LT_DECL([], [OTOOL64], [1],
1008269851Speter      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1009251883Speter
1010269851Speter    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1011269851Speter      [lt_cv_apple_cc_single_mod=no
1012298161Sbapt      if test -z "$LT_MULTI_MODULE"; then
1013269851Speter	# By default we will add the -single_module flag. You can override
1014269851Speter	# by either setting the environment variable LT_MULTI_MODULE
1015269851Speter	# non-empty at configure time, or by adding -multi_module to the
1016269851Speter	# link flags.
1017269851Speter	rm -rf libconftest.dylib*
1018269851Speter	echo "int foo(void){return 1;}" > conftest.c
1019269851Speter	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1020269851Speter-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1021269851Speter	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1022269851Speter	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1023269851Speter        _lt_result=$?
1024269851Speter	# If there is a non-empty error log, and "single_module"
1025269851Speter	# appears in it, assume the flag caused a linker warning
1026269851Speter        if test -s conftest.err && $GREP single_module conftest.err; then
1027269851Speter	  cat conftest.err >&AS_MESSAGE_LOG_FD
1028269851Speter	# Otherwise, if the output was created with a 0 exit code from
1029269851Speter	# the compiler, it worked.
1030298161Sbapt	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1031269851Speter	  lt_cv_apple_cc_single_mod=yes
1032269851Speter	else
1033269851Speter	  cat conftest.err >&AS_MESSAGE_LOG_FD
1034269851Speter	fi
1035269851Speter	rm -rf libconftest.dylib*
1036269851Speter	rm -f conftest.*
1037269851Speter      fi])
1038269851Speter
1039269851Speter    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1040269851Speter      [lt_cv_ld_exported_symbols_list],
1041269851Speter      [lt_cv_ld_exported_symbols_list=no
1042269851Speter      save_LDFLAGS=$LDFLAGS
1043269851Speter      echo "_main" > conftest.sym
1044269851Speter      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1045269851Speter      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1046269851Speter	[lt_cv_ld_exported_symbols_list=yes],
1047269851Speter	[lt_cv_ld_exported_symbols_list=no])
1048298161Sbapt	LDFLAGS=$save_LDFLAGS
1049269851Speter    ])
1050269851Speter
1051269851Speter    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1052269851Speter      [lt_cv_ld_force_load=no
1053269851Speter      cat > conftest.c << _LT_EOF
1054269851Speterint forced_loaded() { return 2;}
1055269851Speter_LT_EOF
1056269851Speter      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1057269851Speter      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1058269851Speter      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1059269851Speter      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1060269851Speter      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1061269851Speter      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1062269851Speter      cat > conftest.c << _LT_EOF
1063269851Speterint main() { return 0;}
1064269851Speter_LT_EOF
1065269851Speter      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1066269851Speter      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1067269851Speter      _lt_result=$?
1068269851Speter      if test -s conftest.err && $GREP force_load conftest.err; then
1069269851Speter	cat conftest.err >&AS_MESSAGE_LOG_FD
1070298161Sbapt      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1071269851Speter	lt_cv_ld_force_load=yes
1072269851Speter      else
1073269851Speter	cat conftest.err >&AS_MESSAGE_LOG_FD
1074269851Speter      fi
1075269851Speter        rm -f conftest.err libconftest.a conftest conftest.c
1076269851Speter        rm -rf conftest.dSYM
1077269851Speter    ])
1078269851Speter    case $host_os in
1079269851Speter    rhapsody* | darwin1.[[012]])
1080298161Sbapt      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1081269851Speter    darwin1.*)
1082298161Sbapt      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1083269851Speter    darwin*) # darwin 5.x on
1084269851Speter      # if running on 10.5 or later, the deployment target defaults
1085269851Speter      # to the OS version, if on x86, and 10.4, the deployment
1086269851Speter      # target defaults to 10.4. Don't you love it?
1087269851Speter      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1088269851Speter	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1089298161Sbapt	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1090298161Sbapt	10.[[012]][[,.]]*)
1091298161Sbapt	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1092269851Speter	10.*)
1093298161Sbapt	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1094269851Speter      esac
1095269851Speter    ;;
1096269851Speter  esac
1097298161Sbapt    if test yes = "$lt_cv_apple_cc_single_mod"; then
1098269851Speter      _lt_dar_single_mod='$single_module'
1099269851Speter    fi
1100298161Sbapt    if test yes = "$lt_cv_ld_exported_symbols_list"; then
1101298161Sbapt      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1102269851Speter    else
1103298161Sbapt      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1104269851Speter    fi
1105298161Sbapt    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1106269851Speter      _lt_dsymutil='~$DSYMUTIL $lib || :'
1107269851Speter    else
1108269851Speter      _lt_dsymutil=
1109269851Speter    fi
1110269851Speter    ;;
1111269851Speter  esac
1112269851Speter])
1113269851Speter
1114269851Speter
1115269851Speter# _LT_DARWIN_LINKER_FEATURES([TAG])
1116269851Speter# ---------------------------------
1117269851Speter# Checks for linker and compiler features on darwin
1118269851Speterm4_defun([_LT_DARWIN_LINKER_FEATURES],
1119269851Speter[
1120269851Speter  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1121269851Speter  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1122269851Speter  _LT_TAGVAR(hardcode_direct, $1)=no
1123269851Speter  _LT_TAGVAR(hardcode_automatic, $1)=yes
1124269851Speter  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1125298161Sbapt  if test yes = "$lt_cv_ld_force_load"; then
1126298161Sbapt    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1127269851Speter    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1128269851Speter                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1129269851Speter  else
1130269851Speter    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1131269851Speter  fi
1132269851Speter  _LT_TAGVAR(link_all_deplibs, $1)=yes
1133298161Sbapt  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1134269851Speter  case $cc_basename in
1135298161Sbapt     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1136269851Speter     *) _lt_dar_can_shared=$GCC ;;
1137269851Speter  esac
1138298161Sbapt  if test yes = "$_lt_dar_can_shared"; then
1139269851Speter    output_verbose_link_cmd=func_echo_all
1140298161Sbapt    _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"
1141298161Sbapt    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1142298161Sbapt    _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"
1143298161Sbapt    _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"
1144269851Speter    m4_if([$1], [CXX],
1145298161Sbapt[   if test yes != "$lt_cv_apple_cc_single_mod"; then
1146298161Sbapt      _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"
1147298161Sbapt      _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"
1148269851Speter    fi
1149269851Speter],[])
1150269851Speter  else
1151269851Speter  _LT_TAGVAR(ld_shlibs, $1)=no
1152269851Speter  fi
1153269851Speter])
1154269851Speter
1155269851Speter# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1156269851Speter# ----------------------------------
1157251883Speter# Links a minimal program and checks the executable
1158251883Speter# for the system default hardcoded library path. In most cases,
1159251883Speter# this is /usr/lib:/lib, but when the MPI compilers are used
1160251883Speter# the location of the communication and MPI libs are included too.
1161251883Speter# If we don't find anything, use the default library path according
1162251883Speter# to the aix ld manual.
1163269851Speter# Store the results from the different compilers for each TAGNAME.
1164269851Speter# Allow to override them for all tags through lt_cv_aix_libpath.
1165269851Speterm4_defun([_LT_SYS_MODULE_PATH_AIX],
1166269851Speter[m4_require([_LT_DECL_SED])dnl
1167298161Sbaptif test set = "${lt_cv_aix_libpath+set}"; then
1168269851Speter  aix_libpath=$lt_cv_aix_libpath
1169269851Speterelse
1170269851Speter  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1171269851Speter  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1172269851Speter  lt_aix_libpath_sed='[
1173269851Speter      /Import File Strings/,/^$/ {
1174269851Speter	  /^0/ {
1175269851Speter	      s/^0  *\([^ ]*\) *$/\1/
1176269851Speter	      p
1177269851Speter	  }
1178269851Speter      }]'
1179269851Speter  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1180269851Speter  # Check for a 64-bit object if we didn't find anything.
1181269851Speter  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1182269851Speter    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1183269851Speter  fi],[])
1184269851Speter  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1185298161Sbapt    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1186269851Speter  fi
1187269851Speter  ])
1188269851Speter  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1189269851Speterfi
1190269851Speter])# _LT_SYS_MODULE_PATH_AIX
1191251883Speter
1192251883Speter
1193269851Speter# _LT_SHELL_INIT(ARG)
1194269851Speter# -------------------
1195269851Speterm4_define([_LT_SHELL_INIT],
1196269851Speter[m4_divert_text([M4SH-INIT], [$1
1197269851Speter])])# _LT_SHELL_INIT
1198251883Speter
1199251883Speter
1200251883Speter
1201269851Speter# _LT_PROG_ECHO_BACKSLASH
1202269851Speter# -----------------------
1203269851Speter# Find how we can fake an echo command that does not interpret backslash.
1204269851Speter# In particular, with Autoconf 2.60 or later we add some code to the start
1205298161Sbapt# of the generated configure script that will find a shell with a builtin
1206298161Sbapt# printf (that we can use as an echo command).
1207269851Speterm4_defun([_LT_PROG_ECHO_BACKSLASH],
1208269851Speter[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1209269851SpeterECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1210269851SpeterECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1211251883Speter
1212269851SpeterAC_MSG_CHECKING([how to print strings])
1213269851Speter# Test print first, because it will be a builtin if present.
1214269851Speterif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1215269851Speter   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1216269851Speter  ECHO='print -r --'
1217269851Speterelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1218269851Speter  ECHO='printf %s\n'
1219251883Speterelse
1220269851Speter  # Use this function as a fallback that always works.
1221269851Speter  func_fallback_echo ()
1222269851Speter  {
1223269851Speter    eval 'cat <<_LTECHO_EOF
1224269851Speter$[]1
1225269851Speter_LTECHO_EOF'
1226269851Speter  }
1227269851Speter  ECHO='func_fallback_echo'
1228251883Speterfi
1229251883Speter
1230269851Speter# func_echo_all arg...
1231269851Speter# Invoke $ECHO with all args, space-separated.
1232269851Speterfunc_echo_all ()
1233269851Speter{
1234298161Sbapt    $ECHO "$*"
1235269851Speter}
1236251883Speter
1237298161Sbaptcase $ECHO in
1238269851Speter  printf*) AC_MSG_RESULT([printf]) ;;
1239269851Speter  print*) AC_MSG_RESULT([print -r]) ;;
1240269851Speter  *) AC_MSG_RESULT([cat]) ;;
1241269851Speteresac
1242251883Speter
1243269851Speterm4_ifdef([_AS_DETECT_SUGGESTED],
1244269851Speter[_AS_DETECT_SUGGESTED([
1245269851Speter  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1246269851Speter    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1247269851Speter    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1248269851Speter    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1249269851Speter    PATH=/empty FPATH=/empty; export PATH FPATH
1250269851Speter    test "X`printf %s $ECHO`" = "X$ECHO" \
1251269851Speter      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1252251883Speter
1253269851Speter_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1254269851Speter_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1255269851Speter])# _LT_PROG_ECHO_BACKSLASH
1256251883Speter
1257251883Speter
1258269851Speter# _LT_WITH_SYSROOT
1259269851Speter# ----------------
1260269851SpeterAC_DEFUN([_LT_WITH_SYSROOT],
1261269851Speter[AC_MSG_CHECKING([for sysroot])
1262269851SpeterAC_ARG_WITH([sysroot],
1263298161Sbapt[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1264298161Sbapt  [Search for dependent libraries within DIR (or the compiler's sysroot
1265298161Sbapt   if not specified).])],
1266269851Speter[], [with_sysroot=no])
1267251883Speter
1268269851Speterdnl lt_sysroot will always be passed unquoted.  We quote it here
1269269851Speterdnl in case the user passed a directory name.
1270269851Speterlt_sysroot=
1271298161Sbaptcase $with_sysroot in #(
1272269851Speter yes)
1273298161Sbapt   if test yes = "$GCC"; then
1274269851Speter     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1275269851Speter   fi
1276269851Speter   ;; #(
1277269851Speter /*)
1278269851Speter   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1279269851Speter   ;; #(
1280269851Speter no|'')
1281269851Speter   ;; #(
1282269851Speter *)
1283298161Sbapt   AC_MSG_RESULT([$with_sysroot])
1284269851Speter   AC_MSG_ERROR([The sysroot must be an absolute path.])
1285269851Speter   ;;
1286269851Speteresac
1287251883Speter
1288269851Speter AC_MSG_RESULT([${lt_sysroot:-no}])
1289269851Speter_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1290298161Sbapt[dependent libraries, and where our libraries should be installed.])])
1291251883Speter
1292269851Speter# _LT_ENABLE_LOCK
1293269851Speter# ---------------
1294269851Speterm4_defun([_LT_ENABLE_LOCK],
1295251883Speter[AC_ARG_ENABLE([libtool-lock],
1296269851Speter  [AS_HELP_STRING([--disable-libtool-lock],
1297269851Speter    [avoid locking (might break parallel builds)])])
1298298161Sbapttest no = "$enable_libtool_lock" || enable_libtool_lock=yes
1299251883Speter
1300251883Speter# Some flags need to be propagated to the compiler or linker for good
1301251883Speter# libtool support.
1302251883Spetercase $host in
1303251883Speteria64-*-hpux*)
1304298161Sbapt  # Find out what ABI is being produced by ac_compile, and set mode
1305298161Sbapt  # options accordingly.
1306251883Speter  echo 'int i;' > conftest.$ac_ext
1307251883Speter  if AC_TRY_EVAL(ac_compile); then
1308251883Speter    case `/usr/bin/file conftest.$ac_objext` in
1309269851Speter      *ELF-32*)
1310298161Sbapt	HPUX_IA64_MODE=32
1311269851Speter	;;
1312269851Speter      *ELF-64*)
1313298161Sbapt	HPUX_IA64_MODE=64
1314269851Speter	;;
1315251883Speter    esac
1316251883Speter  fi
1317251883Speter  rm -rf conftest*
1318251883Speter  ;;
1319251883Speter*-*-irix6*)
1320298161Sbapt  # Find out what ABI is being produced by ac_compile, and set linker
1321298161Sbapt  # options accordingly.
1322269851Speter  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1323251883Speter  if AC_TRY_EVAL(ac_compile); then
1324298161Sbapt    if test yes = "$lt_cv_prog_gnu_ld"; then
1325269851Speter      case `/usr/bin/file conftest.$ac_objext` in
1326269851Speter	*32-bit*)
1327269851Speter	  LD="${LD-ld} -melf32bsmip"
1328269851Speter	  ;;
1329269851Speter	*N32*)
1330269851Speter	  LD="${LD-ld} -melf32bmipn32"
1331269851Speter	  ;;
1332269851Speter	*64-bit*)
1333269851Speter	  LD="${LD-ld} -melf64bmip"
1334269851Speter	;;
1335269851Speter      esac
1336269851Speter    else
1337269851Speter      case `/usr/bin/file conftest.$ac_objext` in
1338269851Speter	*32-bit*)
1339269851Speter	  LD="${LD-ld} -32"
1340269851Speter	  ;;
1341269851Speter	*N32*)
1342269851Speter	  LD="${LD-ld} -n32"
1343269851Speter	  ;;
1344269851Speter	*64-bit*)
1345269851Speter	  LD="${LD-ld} -64"
1346269851Speter	  ;;
1347269851Speter      esac
1348269851Speter    fi
1349251883Speter  fi
1350251883Speter  rm -rf conftest*
1351251883Speter  ;;
1352251883Speter
1353298161Sbaptmips64*-*linux*)
1354298161Sbapt  # Find out what ABI is being produced by ac_compile, and set linker
1355298161Sbapt  # options accordingly.
1356298161Sbapt  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1357298161Sbapt  if AC_TRY_EVAL(ac_compile); then
1358298161Sbapt    emul=elf
1359298161Sbapt    case `/usr/bin/file conftest.$ac_objext` in
1360298161Sbapt      *32-bit*)
1361298161Sbapt	emul="${emul}32"
1362298161Sbapt	;;
1363298161Sbapt      *64-bit*)
1364298161Sbapt	emul="${emul}64"
1365298161Sbapt	;;
1366298161Sbapt    esac
1367298161Sbapt    case `/usr/bin/file conftest.$ac_objext` in
1368298161Sbapt      *MSB*)
1369298161Sbapt	emul="${emul}btsmip"
1370298161Sbapt	;;
1371298161Sbapt      *LSB*)
1372298161Sbapt	emul="${emul}ltsmip"
1373298161Sbapt	;;
1374298161Sbapt    esac
1375298161Sbapt    case `/usr/bin/file conftest.$ac_objext` in
1376298161Sbapt      *N32*)
1377298161Sbapt	emul="${emul}n32"
1378298161Sbapt	;;
1379298161Sbapt    esac
1380298161Sbapt    LD="${LD-ld} -m $emul"
1381298161Sbapt  fi
1382298161Sbapt  rm -rf conftest*
1383298161Sbapt  ;;
1384298161Sbapt
1385298161Sbaptx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1386269851Speters390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1387298161Sbapt  # Find out what ABI is being produced by ac_compile, and set linker
1388298161Sbapt  # options accordingly.  Note that the listed cases only cover the
1389298161Sbapt  # situations where additional linker options are needed (such as when
1390298161Sbapt  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1391298161Sbapt  # vice versa); the common cases where no linker options are needed do
1392298161Sbapt  # not appear in the list.
1393251883Speter  echo 'int i;' > conftest.$ac_ext
1394251883Speter  if AC_TRY_EVAL(ac_compile); then
1395251883Speter    case `/usr/bin/file conftest.o` in
1396269851Speter      *32-bit*)
1397269851Speter	case $host in
1398269851Speter	  x86_64-*kfreebsd*-gnu)
1399269851Speter	    LD="${LD-ld} -m elf_i386_fbsd"
1400269851Speter	    ;;
1401269851Speter	  x86_64-*linux*)
1402298161Sbapt	    case `/usr/bin/file conftest.o` in
1403298161Sbapt	      *x86-64*)
1404298161Sbapt		LD="${LD-ld} -m elf32_x86_64"
1405298161Sbapt		;;
1406298161Sbapt	      *)
1407298161Sbapt		LD="${LD-ld} -m elf_i386"
1408298161Sbapt		;;
1409298161Sbapt	    esac
1410269851Speter	    ;;
1411298161Sbapt	  powerpc64le-*linux*)
1412298161Sbapt	    LD="${LD-ld} -m elf32lppclinux"
1413298161Sbapt	    ;;
1414298161Sbapt	  powerpc64-*linux*)
1415269851Speter	    LD="${LD-ld} -m elf32ppclinux"
1416269851Speter	    ;;
1417269851Speter	  s390x-*linux*)
1418269851Speter	    LD="${LD-ld} -m elf_s390"
1419269851Speter	    ;;
1420269851Speter	  sparc64-*linux*)
1421269851Speter	    LD="${LD-ld} -m elf32_sparc"
1422269851Speter	    ;;
1423269851Speter	esac
1424269851Speter	;;
1425269851Speter      *64-bit*)
1426269851Speter	case $host in
1427269851Speter	  x86_64-*kfreebsd*-gnu)
1428269851Speter	    LD="${LD-ld} -m elf_x86_64_fbsd"
1429269851Speter	    ;;
1430269851Speter	  x86_64-*linux*)
1431269851Speter	    LD="${LD-ld} -m elf_x86_64"
1432269851Speter	    ;;
1433298161Sbapt	  powerpcle-*linux*)
1434298161Sbapt	    LD="${LD-ld} -m elf64lppc"
1435298161Sbapt	    ;;
1436298161Sbapt	  powerpc-*linux*)
1437269851Speter	    LD="${LD-ld} -m elf64ppc"
1438269851Speter	    ;;
1439269851Speter	  s390*-*linux*|s390*-*tpf*)
1440269851Speter	    LD="${LD-ld} -m elf64_s390"
1441269851Speter	    ;;
1442269851Speter	  sparc*-*linux*)
1443269851Speter	    LD="${LD-ld} -m elf64_sparc"
1444269851Speter	    ;;
1445269851Speter	esac
1446269851Speter	;;
1447251883Speter    esac
1448251883Speter  fi
1449251883Speter  rm -rf conftest*
1450251883Speter  ;;
1451251883Speter
1452251883Speter*-*-sco3.2v5*)
1453251883Speter  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1454298161Sbapt  SAVE_CFLAGS=$CFLAGS
1455251883Speter  CFLAGS="$CFLAGS -belf"
1456251883Speter  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1457251883Speter    [AC_LANG_PUSH(C)
1458269851Speter     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1459251883Speter     AC_LANG_POP])
1460298161Sbapt  if test yes != "$lt_cv_cc_needs_belf"; then
1461251883Speter    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1462298161Sbapt    CFLAGS=$SAVE_CFLAGS
1463251883Speter  fi
1464251883Speter  ;;
1465269851Speter*-*solaris*)
1466298161Sbapt  # Find out what ABI is being produced by ac_compile, and set linker
1467298161Sbapt  # options accordingly.
1468251883Speter  echo 'int i;' > conftest.$ac_ext
1469251883Speter  if AC_TRY_EVAL(ac_compile); then
1470251883Speter    case `/usr/bin/file conftest.o` in
1471251883Speter    *64-bit*)
1472251883Speter      case $lt_cv_prog_gnu_ld in
1473269851Speter      yes*)
1474269851Speter        case $host in
1475298161Sbapt        i?86-*-solaris*|x86_64-*-solaris*)
1476269851Speter          LD="${LD-ld} -m elf_x86_64"
1477269851Speter          ;;
1478269851Speter        sparc*-*-solaris*)
1479269851Speter          LD="${LD-ld} -m elf64_sparc"
1480269851Speter          ;;
1481269851Speter        esac
1482269851Speter        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
1483269851Speter        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1484298161Sbapt          LD=${LD-ld}_sol2
1485269851Speter        fi
1486269851Speter        ;;
1487269851Speter      *)
1488269851Speter	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1489269851Speter	  LD="${LD-ld} -64"
1490269851Speter	fi
1491269851Speter	;;
1492251883Speter      esac
1493251883Speter      ;;
1494251883Speter    esac
1495251883Speter  fi
1496251883Speter  rm -rf conftest*
1497251883Speter  ;;
1498251883Speteresac
1499251883Speter
1500298161Sbaptneed_locks=$enable_libtool_lock
1501269851Speter])# _LT_ENABLE_LOCK
1502251883Speter
1503251883Speter
1504269851Speter# _LT_PROG_AR
1505269851Speter# -----------
1506269851Speterm4_defun([_LT_PROG_AR],
1507269851Speter[AC_CHECK_TOOLS(AR, [ar], false)
1508269851Speter: ${AR=ar}
1509269851Speter: ${AR_FLAGS=cru}
1510269851Speter_LT_DECL([], [AR], [1], [The archiver])
1511269851Speter_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1512251883Speter
1513269851SpeterAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1514269851Speter  [lt_cv_ar_at_file=no
1515269851Speter   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1516269851Speter     [echo conftest.$ac_objext > conftest.lst
1517269851Speter      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1518269851Speter      AC_TRY_EVAL([lt_ar_try])
1519298161Sbapt      if test 0 -eq "$ac_status"; then
1520269851Speter	# Ensure the archiver fails upon bogus file names.
1521269851Speter	rm -f conftest.$ac_objext libconftest.a
1522269851Speter	AC_TRY_EVAL([lt_ar_try])
1523298161Sbapt	if test 0 -ne "$ac_status"; then
1524269851Speter          lt_cv_ar_at_file=@
1525269851Speter        fi
1526269851Speter      fi
1527269851Speter      rm -f conftest.* libconftest.a
1528269851Speter     ])
1529269851Speter  ])
1530269851Speter
1531298161Sbaptif test no = "$lt_cv_ar_at_file"; then
1532269851Speter  archiver_list_spec=
1533269851Speterelse
1534269851Speter  archiver_list_spec=$lt_cv_ar_at_file
1535269851Speterfi
1536269851Speter_LT_DECL([], [archiver_list_spec], [1],
1537269851Speter  [How to feed a file listing to the archiver])
1538269851Speter])# _LT_PROG_AR
1539269851Speter
1540269851Speter
1541269851Speter# _LT_CMD_OLD_ARCHIVE
1542269851Speter# -------------------
1543269851Speterm4_defun([_LT_CMD_OLD_ARCHIVE],
1544269851Speter[_LT_PROG_AR
1545269851Speter
1546269851SpeterAC_CHECK_TOOL(STRIP, strip, :)
1547269851Spetertest -z "$STRIP" && STRIP=:
1548269851Speter_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1549269851Speter
1550269851SpeterAC_CHECK_TOOL(RANLIB, ranlib, :)
1551269851Spetertest -z "$RANLIB" && RANLIB=:
1552269851Speter_LT_DECL([], [RANLIB], [1],
1553269851Speter    [Commands used to install an old-style archive])
1554269851Speter
1555269851Speter# Determine commands to create old-style static archives.
1556269851Speterold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1557269851Speterold_postinstall_cmds='chmod 644 $oldlib'
1558269851Speterold_postuninstall_cmds=
1559269851Speter
1560269851Speterif test -n "$RANLIB"; then
1561269851Speter  case $host_os in
1562298161Sbapt  bitrig* | openbsd*)
1563269851Speter    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1564269851Speter    ;;
1565269851Speter  *)
1566269851Speter    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1567269851Speter    ;;
1568269851Speter  esac
1569269851Speter  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1570269851Speterfi
1571269851Speter
1572269851Spetercase $host_os in
1573269851Speter  darwin*)
1574269851Speter    lock_old_archive_extraction=yes ;;
1575269851Speter  *)
1576269851Speter    lock_old_archive_extraction=no ;;
1577269851Speteresac
1578269851Speter_LT_DECL([], [old_postinstall_cmds], [2])
1579269851Speter_LT_DECL([], [old_postuninstall_cmds], [2])
1580269851Speter_LT_TAGDECL([], [old_archive_cmds], [2],
1581269851Speter    [Commands used to build an old-style archive])
1582269851Speter_LT_DECL([], [lock_old_archive_extraction], [0],
1583269851Speter    [Whether to use a lock for old archive extraction])
1584269851Speter])# _LT_CMD_OLD_ARCHIVE
1585269851Speter
1586269851Speter
1587269851Speter# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1588251883Speter#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1589251883Speter# ----------------------------------------------------------------
1590251883Speter# Check whether the given compiler option works
1591269851SpeterAC_DEFUN([_LT_COMPILER_OPTION],
1592269851Speter[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1593269851Speterm4_require([_LT_DECL_SED])dnl
1594251883SpeterAC_CACHE_CHECK([$1], [$2],
1595251883Speter  [$2=no
1596269851Speter   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1597269851Speter   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1598298161Sbapt   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
1599251883Speter   # Insert the option either (1) after the last *FLAGS variable, or
1600251883Speter   # (2) before a word containing "conftest.", or (3) at the end.
1601251883Speter   # Note that $ac_compile itself does not contain backslashes and begins
1602251883Speter   # with a dollar sign (not a hyphen), so the echo should work correctly.
1603251883Speter   # The option is referenced via a variable to avoid confusing sed.
1604251883Speter   lt_compile=`echo "$ac_compile" | $SED \
1605251883Speter   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1606251883Speter   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1607251883Speter   -e 's:$: $lt_compiler_flag:'`
1608269851Speter   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1609251883Speter   (eval "$lt_compile" 2>conftest.err)
1610251883Speter   ac_status=$?
1611251883Speter   cat conftest.err >&AS_MESSAGE_LOG_FD
1612269851Speter   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1613251883Speter   if (exit $ac_status) && test -s "$ac_outfile"; then
1614251883Speter     # The compiler can only warn and ignore the option if not recognized
1615251883Speter     # So say no if there are warnings other than the usual output.
1616269851Speter     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1617251883Speter     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1618251883Speter     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1619251883Speter       $2=yes
1620251883Speter     fi
1621251883Speter   fi
1622269851Speter   $RM conftest*
1623251883Speter])
1624251883Speter
1625298161Sbaptif test yes = "[$]$2"; then
1626269851Speter    m4_if([$5], , :, [$5])
1627251883Speterelse
1628269851Speter    m4_if([$6], , :, [$6])
1629251883Speterfi
1630269851Speter])# _LT_COMPILER_OPTION
1631251883Speter
1632269851Speter# Old name:
1633269851SpeterAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1634269851Speterdnl aclocal-1.4 backwards compatibility:
1635269851Speterdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1636251883Speter
1637269851Speter
1638269851Speter# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1639269851Speter#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1640269851Speter# ----------------------------------------------------
1641269851Speter# Check whether the given linker option works
1642269851SpeterAC_DEFUN([_LT_LINKER_OPTION],
1643269851Speter[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1644269851Speterm4_require([_LT_DECL_SED])dnl
1645269851SpeterAC_CACHE_CHECK([$1], [$2],
1646251883Speter  [$2=no
1647298161Sbapt   save_LDFLAGS=$LDFLAGS
1648251883Speter   LDFLAGS="$LDFLAGS $3"
1649269851Speter   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1650251883Speter   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1651251883Speter     # The linker can only warn and ignore the option if not recognized
1652251883Speter     # So say no if there are warnings
1653251883Speter     if test -s conftest.err; then
1654251883Speter       # Append any errors to the config.log.
1655251883Speter       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1656269851Speter       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1657251883Speter       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1658251883Speter       if diff conftest.exp conftest.er2 >/dev/null; then
1659251883Speter         $2=yes
1660251883Speter       fi
1661251883Speter     else
1662251883Speter       $2=yes
1663251883Speter     fi
1664251883Speter   fi
1665269851Speter   $RM -r conftest*
1666298161Sbapt   LDFLAGS=$save_LDFLAGS
1667251883Speter])
1668251883Speter
1669298161Sbaptif test yes = "[$]$2"; then
1670269851Speter    m4_if([$4], , :, [$4])
1671251883Speterelse
1672269851Speter    m4_if([$5], , :, [$5])
1673251883Speterfi
1674269851Speter])# _LT_LINKER_OPTION
1675251883Speter
1676269851Speter# Old name:
1677269851SpeterAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1678269851Speterdnl aclocal-1.4 backwards compatibility:
1679269851Speterdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1680251883Speter
1681269851Speter
1682269851Speter# LT_CMD_MAX_LEN
1683269851Speter#---------------
1684269851SpeterAC_DEFUN([LT_CMD_MAX_LEN],
1685269851Speter[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1686269851Speter# find the maximum length of command line arguments
1687251883SpeterAC_MSG_CHECKING([the maximum length of command line arguments])
1688251883SpeterAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1689251883Speter  i=0
1690298161Sbapt  teststring=ABCD
1691251883Speter
1692251883Speter  case $build_os in
1693251883Speter  msdosdjgpp*)
1694251883Speter    # On DJGPP, this test can blow up pretty badly due to problems in libc
1695251883Speter    # (any single argument exceeding 2000 bytes causes a buffer overrun
1696251883Speter    # during glob expansion).  Even if it were fixed, the result of this
1697251883Speter    # check would be larger than it should be.
1698251883Speter    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1699251883Speter    ;;
1700251883Speter
1701251883Speter  gnu*)
1702251883Speter    # Under GNU Hurd, this test is not required because there is
1703251883Speter    # no limit to the length of command line arguments.
1704251883Speter    # Libtool will interpret -1 as no limit whatsoever
1705251883Speter    lt_cv_sys_max_cmd_len=-1;
1706251883Speter    ;;
1707251883Speter
1708269851Speter  cygwin* | mingw* | cegcc*)
1709251883Speter    # On Win9x/ME, this test blows up -- it succeeds, but takes
1710251883Speter    # about 5 minutes as the teststring grows exponentially.
1711251883Speter    # Worse, since 9x/ME are not pre-emptively multitasking,
1712251883Speter    # you end up with a "frozen" computer, even though with patience
1713251883Speter    # the test eventually succeeds (with a max line length of 256k).
1714251883Speter    # Instead, let's just punt: use the minimum linelength reported by
1715251883Speter    # all of the supported platforms: 8192 (on NT/2K/XP).
1716251883Speter    lt_cv_sys_max_cmd_len=8192;
1717251883Speter    ;;
1718251883Speter
1719269851Speter  mint*)
1720269851Speter    # On MiNT this can take a long time and run out of memory.
1721269851Speter    lt_cv_sys_max_cmd_len=8192;
1722269851Speter    ;;
1723269851Speter
1724251883Speter  amigaos*)
1725251883Speter    # On AmigaOS with pdksh, this test takes hours, literally.
1726251883Speter    # So we just punt and use a minimum line length of 8192.
1727251883Speter    lt_cv_sys_max_cmd_len=8192;
1728251883Speter    ;;
1729251883Speter
1730298161Sbapt  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
1731251883Speter    # This has been around since 386BSD, at least.  Likely further.
1732251883Speter    if test -x /sbin/sysctl; then
1733251883Speter      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1734251883Speter    elif test -x /usr/sbin/sysctl; then
1735251883Speter      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1736251883Speter    else
1737251883Speter      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1738251883Speter    fi
1739251883Speter    # And add a safety zone
1740251883Speter    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1741251883Speter    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1742251883Speter    ;;
1743251883Speter
1744251883Speter  interix*)
1745251883Speter    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1746251883Speter    lt_cv_sys_max_cmd_len=196608
1747251883Speter    ;;
1748251883Speter
1749269851Speter  os2*)
1750269851Speter    # The test takes a long time on OS/2.
1751269851Speter    lt_cv_sys_max_cmd_len=8192
1752269851Speter    ;;
1753269851Speter
1754251883Speter  osf*)
1755251883Speter    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1756251883Speter    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1757251883Speter    # nice to cause kernel panics so lets avoid the loop below.
1758251883Speter    # First set a reasonable default.
1759251883Speter    lt_cv_sys_max_cmd_len=16384
1760251883Speter    #
1761251883Speter    if test -x /sbin/sysconfig; then
1762251883Speter      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1763251883Speter        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1764251883Speter      esac
1765251883Speter    fi
1766251883Speter    ;;
1767251883Speter  sco3.2v5*)
1768251883Speter    lt_cv_sys_max_cmd_len=102400
1769251883Speter    ;;
1770251883Speter  sysv5* | sco5v6* | sysv4.2uw2*)
1771251883Speter    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1772251883Speter    if test -n "$kargmax"; then
1773269851Speter      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1774251883Speter    else
1775251883Speter      lt_cv_sys_max_cmd_len=32768
1776251883Speter    fi
1777251883Speter    ;;
1778251883Speter  *)
1779269851Speter    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1780298161Sbapt    if test -n "$lt_cv_sys_max_cmd_len" && \
1781298161Sbapt       test undefined != "$lt_cv_sys_max_cmd_len"; then
1782269851Speter      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1783269851Speter      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1784269851Speter    else
1785269851Speter      # Make teststring a little bigger before we do anything with it.
1786269851Speter      # a 1K string should be a reasonable start.
1787298161Sbapt      for i in 1 2 3 4 5 6 7 8; do
1788269851Speter        teststring=$teststring$teststring
1789269851Speter      done
1790269851Speter      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1791269851Speter      # If test is not a shell built-in, we'll probably end up computing a
1792269851Speter      # maximum length that is only half of the actual maximum length, but
1793269851Speter      # we can't tell.
1794298161Sbapt      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1795269851Speter	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1796298161Sbapt	      test 17 != "$i" # 1/2 MB should be enough
1797269851Speter      do
1798269851Speter        i=`expr $i + 1`
1799269851Speter        teststring=$teststring$teststring
1800269851Speter      done
1801269851Speter      # Only check the string length outside the loop.
1802269851Speter      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1803269851Speter      teststring=
1804269851Speter      # Add a significant safety factor because C++ compilers can tack on
1805269851Speter      # massive amounts of additional arguments before passing them to the
1806269851Speter      # linker.  It appears as though 1/2 is a usable value.
1807269851Speter      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1808269851Speter    fi
1809251883Speter    ;;
1810251883Speter  esac
1811251883Speter])
1812298161Sbaptif test -n "$lt_cv_sys_max_cmd_len"; then
1813251883Speter  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1814251883Speterelse
1815251883Speter  AC_MSG_RESULT(none)
1816251883Speterfi
1817269851Spetermax_cmd_len=$lt_cv_sys_max_cmd_len
1818269851Speter_LT_DECL([], [max_cmd_len], [0],
1819269851Speter    [What is the maximum length of a command?])
1820269851Speter])# LT_CMD_MAX_LEN
1821251883Speter
1822269851Speter# Old name:
1823269851SpeterAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1824269851Speterdnl aclocal-1.4 backwards compatibility:
1825269851Speterdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1826251883Speter
1827251883Speter
1828269851Speter# _LT_HEADER_DLFCN
1829269851Speter# ----------------
1830269851Speterm4_defun([_LT_HEADER_DLFCN],
1831269851Speter[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1832269851Speter])# _LT_HEADER_DLFCN
1833251883Speter
1834269851Speter
1835269851Speter# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1836269851Speter#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1837269851Speter# ----------------------------------------------------------------
1838269851Speterm4_defun([_LT_TRY_DLOPEN_SELF],
1839269851Speter[m4_require([_LT_HEADER_DLFCN])dnl
1840298161Sbaptif test yes = "$cross_compiling"; then :
1841251883Speter  [$4]
1842251883Speterelse
1843251883Speter  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1844251883Speter  lt_status=$lt_dlunknown
1845269851Speter  cat > conftest.$ac_ext <<_LT_EOF
1846269851Speter[#line $LINENO "configure"
1847251883Speter#include "confdefs.h"
1848251883Speter
1849251883Speter#if HAVE_DLFCN_H
1850251883Speter#include <dlfcn.h>
1851251883Speter#endif
1852251883Speter
1853251883Speter#include <stdio.h>
1854251883Speter
1855251883Speter#ifdef RTLD_GLOBAL
1856251883Speter#  define LT_DLGLOBAL		RTLD_GLOBAL
1857251883Speter#else
1858251883Speter#  ifdef DL_GLOBAL
1859251883Speter#    define LT_DLGLOBAL		DL_GLOBAL
1860251883Speter#  else
1861251883Speter#    define LT_DLGLOBAL		0
1862251883Speter#  endif
1863251883Speter#endif
1864251883Speter
1865251883Speter/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1866251883Speter   find out it does not work in some platform. */
1867251883Speter#ifndef LT_DLLAZY_OR_NOW
1868251883Speter#  ifdef RTLD_LAZY
1869251883Speter#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1870251883Speter#  else
1871251883Speter#    ifdef DL_LAZY
1872251883Speter#      define LT_DLLAZY_OR_NOW		DL_LAZY
1873251883Speter#    else
1874251883Speter#      ifdef RTLD_NOW
1875251883Speter#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1876251883Speter#      else
1877251883Speter#        ifdef DL_NOW
1878251883Speter#          define LT_DLLAZY_OR_NOW	DL_NOW
1879251883Speter#        else
1880251883Speter#          define LT_DLLAZY_OR_NOW	0
1881251883Speter#        endif
1882251883Speter#      endif
1883251883Speter#    endif
1884251883Speter#  endif
1885251883Speter#endif
1886251883Speter
1887298161Sbapt/* When -fvisibility=hidden is used, assume the code has been annotated
1888269851Speter   correspondingly for the symbols needed.  */
1889298161Sbapt#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1890269851Speterint fnord () __attribute__((visibility("default")));
1891251883Speter#endif
1892251883Speter
1893269851Speterint fnord () { return 42; }
1894251883Speterint main ()
1895251883Speter{
1896251883Speter  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1897251883Speter  int status = $lt_dlunknown;
1898251883Speter
1899251883Speter  if (self)
1900251883Speter    {
1901251883Speter      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1902269851Speter      else
1903269851Speter        {
1904269851Speter	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
1905269851Speter          else puts (dlerror ());
1906269851Speter	}
1907251883Speter      /* dlclose (self); */
1908251883Speter    }
1909251883Speter  else
1910251883Speter    puts (dlerror ());
1911251883Speter
1912269851Speter  return status;
1913251883Speter}]
1914269851Speter_LT_EOF
1915298161Sbapt  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
1916251883Speter    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1917251883Speter    lt_status=$?
1918251883Speter    case x$lt_status in
1919251883Speter      x$lt_dlno_uscore) $1 ;;
1920251883Speter      x$lt_dlneed_uscore) $2 ;;
1921251883Speter      x$lt_dlunknown|x*) $3 ;;
1922251883Speter    esac
1923251883Speter  else :
1924251883Speter    # compilation failed
1925251883Speter    $3
1926251883Speter  fi
1927251883Speterfi
1928251883Speterrm -fr conftest*
1929269851Speter])# _LT_TRY_DLOPEN_SELF
1930251883Speter
1931251883Speter
1932269851Speter# LT_SYS_DLOPEN_SELF
1933269851Speter# ------------------
1934269851SpeterAC_DEFUN([LT_SYS_DLOPEN_SELF],
1935269851Speter[m4_require([_LT_HEADER_DLFCN])dnl
1936298161Sbaptif test yes != "$enable_dlopen"; then
1937251883Speter  enable_dlopen=unknown
1938251883Speter  enable_dlopen_self=unknown
1939251883Speter  enable_dlopen_self_static=unknown
1940251883Speterelse
1941251883Speter  lt_cv_dlopen=no
1942251883Speter  lt_cv_dlopen_libs=
1943251883Speter
1944251883Speter  case $host_os in
1945251883Speter  beos*)
1946298161Sbapt    lt_cv_dlopen=load_add_on
1947251883Speter    lt_cv_dlopen_libs=
1948251883Speter    lt_cv_dlopen_self=yes
1949251883Speter    ;;
1950251883Speter
1951269851Speter  mingw* | pw32* | cegcc*)
1952298161Sbapt    lt_cv_dlopen=LoadLibrary
1953251883Speter    lt_cv_dlopen_libs=
1954269851Speter    ;;
1955251883Speter
1956251883Speter  cygwin*)
1957298161Sbapt    lt_cv_dlopen=dlopen
1958251883Speter    lt_cv_dlopen_libs=
1959269851Speter    ;;
1960251883Speter
1961251883Speter  darwin*)
1962298161Sbapt    # if libdl is installed we need to link against it
1963251883Speter    AC_CHECK_LIB([dl], [dlopen],
1964298161Sbapt		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1965298161Sbapt    lt_cv_dlopen=dyld
1966251883Speter    lt_cv_dlopen_libs=
1967251883Speter    lt_cv_dlopen_self=yes
1968251883Speter    ])
1969269851Speter    ;;
1970251883Speter
1971298161Sbapt  tpf*)
1972298161Sbapt    # Don't try to run any link tests for TPF.  We know it's impossible
1973298161Sbapt    # because TPF is a cross-compiler, and we know how we open DSOs.
1974298161Sbapt    lt_cv_dlopen=dlopen
1975298161Sbapt    lt_cv_dlopen_libs=
1976298161Sbapt    lt_cv_dlopen_self=no
1977298161Sbapt    ;;
1978298161Sbapt
1979251883Speter  *)
1980251883Speter    AC_CHECK_FUNC([shl_load],
1981298161Sbapt	  [lt_cv_dlopen=shl_load],
1982251883Speter      [AC_CHECK_LIB([dld], [shl_load],
1983298161Sbapt	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
1984251883Speter	[AC_CHECK_FUNC([dlopen],
1985298161Sbapt	      [lt_cv_dlopen=dlopen],
1986251883Speter	  [AC_CHECK_LIB([dl], [dlopen],
1987298161Sbapt		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
1988251883Speter	    [AC_CHECK_LIB([svld], [dlopen],
1989298161Sbapt		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
1990251883Speter	      [AC_CHECK_LIB([dld], [dld_link],
1991298161Sbapt		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
1992251883Speter	      ])
1993251883Speter	    ])
1994251883Speter	  ])
1995251883Speter	])
1996251883Speter      ])
1997251883Speter    ;;
1998251883Speter  esac
1999251883Speter
2000298161Sbapt  if test no = "$lt_cv_dlopen"; then
2001298161Sbapt    enable_dlopen=no
2002298161Sbapt  else
2003251883Speter    enable_dlopen=yes
2004251883Speter  fi
2005251883Speter
2006251883Speter  case $lt_cv_dlopen in
2007251883Speter  dlopen)
2008298161Sbapt    save_CPPFLAGS=$CPPFLAGS
2009298161Sbapt    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2010251883Speter
2011298161Sbapt    save_LDFLAGS=$LDFLAGS
2012251883Speter    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2013251883Speter
2014298161Sbapt    save_LIBS=$LIBS
2015251883Speter    LIBS="$lt_cv_dlopen_libs $LIBS"
2016251883Speter
2017251883Speter    AC_CACHE_CHECK([whether a program can dlopen itself],
2018251883Speter	  lt_cv_dlopen_self, [dnl
2019269851Speter	  _LT_TRY_DLOPEN_SELF(
2020251883Speter	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2021251883Speter	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2022251883Speter    ])
2023251883Speter
2024298161Sbapt    if test yes = "$lt_cv_dlopen_self"; then
2025251883Speter      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2026251883Speter      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2027269851Speter	  lt_cv_dlopen_self_static, [dnl
2028269851Speter	  _LT_TRY_DLOPEN_SELF(
2029251883Speter	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2030251883Speter	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2031251883Speter      ])
2032251883Speter    fi
2033251883Speter
2034298161Sbapt    CPPFLAGS=$save_CPPFLAGS
2035298161Sbapt    LDFLAGS=$save_LDFLAGS
2036298161Sbapt    LIBS=$save_LIBS
2037251883Speter    ;;
2038251883Speter  esac
2039251883Speter
2040251883Speter  case $lt_cv_dlopen_self in
2041251883Speter  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2042251883Speter  *) enable_dlopen_self=unknown ;;
2043251883Speter  esac
2044251883Speter
2045251883Speter  case $lt_cv_dlopen_self_static in
2046251883Speter  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2047251883Speter  *) enable_dlopen_self_static=unknown ;;
2048251883Speter  esac
2049251883Speterfi
2050269851Speter_LT_DECL([dlopen_support], [enable_dlopen], [0],
2051269851Speter	 [Whether dlopen is supported])
2052269851Speter_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2053269851Speter	 [Whether dlopen of programs is supported])
2054269851Speter_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2055269851Speter	 [Whether dlopen of statically linked programs is supported])
2056269851Speter])# LT_SYS_DLOPEN_SELF
2057251883Speter
2058269851Speter# Old name:
2059269851SpeterAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2060269851Speterdnl aclocal-1.4 backwards compatibility:
2061269851Speterdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2062251883Speter
2063269851Speter
2064269851Speter# _LT_COMPILER_C_O([TAGNAME])
2065269851Speter# ---------------------------
2066269851Speter# Check to see if options -c and -o are simultaneously supported by compiler.
2067269851Speter# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2068269851Speterm4_defun([_LT_COMPILER_C_O],
2069269851Speter[m4_require([_LT_DECL_SED])dnl
2070269851Speterm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2071269851Speterm4_require([_LT_TAG_COMPILER])dnl
2072251883SpeterAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2073269851Speter  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2074269851Speter  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2075269851Speter   $RM -r conftest 2>/dev/null
2076251883Speter   mkdir conftest
2077251883Speter   cd conftest
2078251883Speter   mkdir out
2079269851Speter   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2080251883Speter
2081251883Speter   lt_compiler_flag="-o out/conftest2.$ac_objext"
2082251883Speter   # Insert the option either (1) after the last *FLAGS variable, or
2083251883Speter   # (2) before a word containing "conftest.", or (3) at the end.
2084251883Speter   # Note that $ac_compile itself does not contain backslashes and begins
2085251883Speter   # with a dollar sign (not a hyphen), so the echo should work correctly.
2086251883Speter   lt_compile=`echo "$ac_compile" | $SED \
2087251883Speter   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2088251883Speter   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2089251883Speter   -e 's:$: $lt_compiler_flag:'`
2090269851Speter   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2091251883Speter   (eval "$lt_compile" 2>out/conftest.err)
2092251883Speter   ac_status=$?
2093251883Speter   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2094269851Speter   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2095251883Speter   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2096251883Speter   then
2097251883Speter     # The compiler can only warn and ignore the option if not recognized
2098251883Speter     # So say no if there are warnings
2099269851Speter     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2100251883Speter     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2101251883Speter     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2102269851Speter       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2103251883Speter     fi
2104251883Speter   fi
2105251883Speter   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2106269851Speter   $RM conftest*
2107251883Speter   # SGI C++ compiler will create directory out/ii_files/ for
2108251883Speter   # template instantiation
2109269851Speter   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2110269851Speter   $RM out/* && rmdir out
2111251883Speter   cd ..
2112269851Speter   $RM -r conftest
2113269851Speter   $RM conftest*
2114251883Speter])
2115269851Speter_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2116269851Speter	[Does compiler simultaneously support -c and -o options?])
2117269851Speter])# _LT_COMPILER_C_O
2118251883Speter
2119251883Speter
2120269851Speter# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2121269851Speter# ----------------------------------
2122251883Speter# Check to see if we can do hard links to lock some files if needed
2123269851Speterm4_defun([_LT_COMPILER_FILE_LOCKS],
2124269851Speter[m4_require([_LT_ENABLE_LOCK])dnl
2125269851Speterm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2126269851Speter_LT_COMPILER_C_O([$1])
2127251883Speter
2128298161Sbapthard_links=nottested
2129298161Sbaptif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2130251883Speter  # do not overwrite the value of need_locks provided by the user
2131251883Speter  AC_MSG_CHECKING([if we can lock with hard links])
2132251883Speter  hard_links=yes
2133269851Speter  $RM conftest*
2134251883Speter  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2135251883Speter  touch conftest.a
2136251883Speter  ln conftest.a conftest.b 2>&5 || hard_links=no
2137251883Speter  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2138251883Speter  AC_MSG_RESULT([$hard_links])
2139298161Sbapt  if test no = "$hard_links"; then
2140298161Sbapt    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2141251883Speter    need_locks=warn
2142251883Speter  fi
2143251883Speterelse
2144251883Speter  need_locks=no
2145251883Speterfi
2146269851Speter_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2147269851Speter])# _LT_COMPILER_FILE_LOCKS
2148251883Speter
2149251883Speter
2150269851Speter# _LT_CHECK_OBJDIR
2151269851Speter# ----------------
2152269851Speterm4_defun([_LT_CHECK_OBJDIR],
2153251883Speter[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2154251883Speter[rm -f .libs 2>/dev/null
2155251883Spetermkdir .libs 2>/dev/null
2156251883Speterif test -d .libs; then
2157251883Speter  lt_cv_objdir=.libs
2158251883Speterelse
2159251883Speter  # MS-DOS does not allow filenames that begin with a dot.
2160251883Speter  lt_cv_objdir=_libs
2161251883Speterfi
2162251883Speterrmdir .libs 2>/dev/null])
2163251883Speterobjdir=$lt_cv_objdir
2164269851Speter_LT_DECL([], [objdir], [0],
2165269851Speter         [The name of the directory that contains temporary libtool files])dnl
2166269851Speterm4_pattern_allow([LT_OBJDIR])dnl
2167298161SbaptAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2168298161Sbapt  [Define to the sub-directory where libtool stores uninstalled libraries.])
2169269851Speter])# _LT_CHECK_OBJDIR
2170251883Speter
2171251883Speter
2172269851Speter# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2173269851Speter# --------------------------------------
2174251883Speter# Check hardcoding attributes.
2175269851Speterm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2176251883Speter[AC_MSG_CHECKING([how to hardcode library paths into programs])
2177269851Speter_LT_TAGVAR(hardcode_action, $1)=
2178269851Speterif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2179269851Speter   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2180298161Sbapt   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2181251883Speter
2182269851Speter  # We can hardcode non-existent directories.
2183298161Sbapt  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2184251883Speter     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2185251883Speter     # have to relink, otherwise we might link with an installed library
2186251883Speter     # when we should be linking with a yet-to-be-installed one
2187298161Sbapt     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2188298161Sbapt     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2189251883Speter    # Linking always hardcodes the temporary library directory.
2190269851Speter    _LT_TAGVAR(hardcode_action, $1)=relink
2191251883Speter  else
2192251883Speter    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2193269851Speter    _LT_TAGVAR(hardcode_action, $1)=immediate
2194251883Speter  fi
2195251883Speterelse
2196251883Speter  # We cannot hardcode anything, or else we can only hardcode existing
2197251883Speter  # directories.
2198269851Speter  _LT_TAGVAR(hardcode_action, $1)=unsupported
2199251883Speterfi
2200269851SpeterAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2201251883Speter
2202298161Sbaptif test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2203298161Sbapt   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2204251883Speter  # Fast installation is not supported
2205251883Speter  enable_fast_install=no
2206298161Sbaptelif test yes = "$shlibpath_overrides_runpath" ||
2207298161Sbapt     test no = "$enable_shared"; then
2208251883Speter  # Fast installation is not necessary
2209251883Speter  enable_fast_install=needless
2210251883Speterfi
2211269851Speter_LT_TAGDECL([], [hardcode_action], [0],
2212269851Speter    [How to hardcode a shared library path into an executable])
2213269851Speter])# _LT_LINKER_HARDCODE_LIBPATH
2214251883Speter
2215251883Speter
2216269851Speter# _LT_CMD_STRIPLIB
2217269851Speter# ----------------
2218269851Speterm4_defun([_LT_CMD_STRIPLIB],
2219269851Speter[m4_require([_LT_DECL_EGREP])
2220269851Speterstriplib=
2221251883Speterold_striplib=
2222251883SpeterAC_MSG_CHECKING([whether stripping libraries is possible])
2223269851Speterif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2224251883Speter  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2225251883Speter  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2226251883Speter  AC_MSG_RESULT([yes])
2227251883Speterelse
2228251883Speter# FIXME - insert some real tests, host_os isn't really good enough
2229251883Speter  case $host_os in
2230269851Speter  darwin*)
2231298161Sbapt    if test -n "$STRIP"; then
2232269851Speter      striplib="$STRIP -x"
2233269851Speter      old_striplib="$STRIP -S"
2234269851Speter      AC_MSG_RESULT([yes])
2235269851Speter    else
2236269851Speter      AC_MSG_RESULT([no])
2237269851Speter    fi
2238251883Speter    ;;
2239269851Speter  *)
2240269851Speter    AC_MSG_RESULT([no])
2241269851Speter    ;;
2242251883Speter  esac
2243251883Speterfi
2244269851Speter_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2245269851Speter_LT_DECL([], [striplib], [1])
2246269851Speter])# _LT_CMD_STRIPLIB
2247251883Speter
2248251883Speter
2249298161Sbapt# _LT_PREPARE_MUNGE_PATH_LIST
2250298161Sbapt# ---------------------------
2251298161Sbapt# Make sure func_munge_path_list() is defined correctly.
2252298161Sbaptm4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2253298161Sbapt[[# func_munge_path_list VARIABLE PATH
2254298161Sbapt# -----------------------------------
2255298161Sbapt# VARIABLE is name of variable containing _space_ separated list of
2256298161Sbapt# directories to be munged by the contents of PATH, which is string
2257298161Sbapt# having a format:
2258298161Sbapt# "DIR[:DIR]:"
2259298161Sbapt#       string "DIR[ DIR]" will be prepended to VARIABLE
2260298161Sbapt# ":DIR[:DIR]"
2261298161Sbapt#       string "DIR[ DIR]" will be appended to VARIABLE
2262298161Sbapt# "DIRP[:DIRP]::[DIRA:]DIRA"
2263298161Sbapt#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2264298161Sbapt#       "DIRA[ DIRA]" will be appended to VARIABLE
2265298161Sbapt# "DIR[:DIR]"
2266298161Sbapt#       VARIABLE will be replaced by "DIR[ DIR]"
2267298161Sbaptfunc_munge_path_list ()
2268298161Sbapt{
2269298161Sbapt    case x@S|@2 in
2270298161Sbapt    x)
2271298161Sbapt        ;;
2272298161Sbapt    *:)
2273298161Sbapt        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2274298161Sbapt        ;;
2275298161Sbapt    x:*)
2276298161Sbapt        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2277298161Sbapt        ;;
2278298161Sbapt    *::*)
2279298161Sbapt        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2280298161Sbapt        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2281298161Sbapt        ;;
2282298161Sbapt    *)
2283298161Sbapt        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2284298161Sbapt        ;;
2285298161Sbapt    esac
2286298161Sbapt}
2287298161Sbapt]])# _LT_PREPARE_PATH_LIST
2288298161Sbapt
2289298161Sbapt
2290269851Speter# _LT_SYS_DYNAMIC_LINKER([TAG])
2291251883Speter# -----------------------------
2292251883Speter# PORTME Fill in your ld.so characteristics
2293269851Speterm4_defun([_LT_SYS_DYNAMIC_LINKER],
2294269851Speter[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2295269851Speterm4_require([_LT_DECL_EGREP])dnl
2296269851Speterm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2297269851Speterm4_require([_LT_DECL_OBJDUMP])dnl
2298269851Speterm4_require([_LT_DECL_SED])dnl
2299269851Speterm4_require([_LT_CHECK_SHELL_FEATURES])dnl
2300298161Sbaptm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2301269851SpeterAC_MSG_CHECKING([dynamic linker characteristics])
2302269851Speterm4_if([$1],
2303269851Speter	[], [
2304298161Sbaptif test yes = "$GCC"; then
2305269851Speter  case $host_os in
2306298161Sbapt    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2307298161Sbapt    *) lt_awk_arg='/^libraries:/' ;;
2308269851Speter  esac
2309269851Speter  case $host_os in
2310298161Sbapt    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2311298161Sbapt    *) lt_sed_strip_eq='s|=/|/|g' ;;
2312269851Speter  esac
2313269851Speter  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2314269851Speter  case $lt_search_path_spec in
2315269851Speter  *\;*)
2316269851Speter    # if the path contains ";" then we assume it to be the separator
2317269851Speter    # otherwise default to the standard path separator (i.e. ":") - it is
2318269851Speter    # assumed that no part of a normal pathname contains ";" but that should
2319269851Speter    # okay in the real world where ";" in dirpaths is itself problematic.
2320269851Speter    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2321269851Speter    ;;
2322269851Speter  *)
2323269851Speter    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2324269851Speter    ;;
2325269851Speter  esac
2326269851Speter  # Ok, now we have the path, separated by spaces, we can step through it
2327298161Sbapt  # and add multilib dir if necessary...
2328269851Speter  lt_tmp_lt_search_path_spec=
2329298161Sbapt  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2330298161Sbapt  # ...but if some path component already ends with the multilib dir we assume
2331298161Sbapt  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2332298161Sbapt  case "$lt_multi_os_dir; $lt_search_path_spec " in
2333298161Sbapt  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2334298161Sbapt    lt_multi_os_dir=
2335298161Sbapt    ;;
2336298161Sbapt  esac
2337269851Speter  for lt_sys_path in $lt_search_path_spec; do
2338298161Sbapt    if test -d "$lt_sys_path$lt_multi_os_dir"; then
2339298161Sbapt      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2340298161Sbapt    elif test -n "$lt_multi_os_dir"; then
2341269851Speter      test -d "$lt_sys_path" && \
2342269851Speter	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2343269851Speter    fi
2344269851Speter  done
2345269851Speter  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2346298161SbaptBEGIN {RS = " "; FS = "/|\n";} {
2347298161Sbapt  lt_foo = "";
2348298161Sbapt  lt_count = 0;
2349269851Speter  for (lt_i = NF; lt_i > 0; lt_i--) {
2350269851Speter    if ($lt_i != "" && $lt_i != ".") {
2351269851Speter      if ($lt_i == "..") {
2352269851Speter        lt_count++;
2353269851Speter      } else {
2354269851Speter        if (lt_count == 0) {
2355298161Sbapt          lt_foo = "/" $lt_i lt_foo;
2356269851Speter        } else {
2357269851Speter          lt_count--;
2358269851Speter        }
2359269851Speter      }
2360269851Speter    }
2361269851Speter  }
2362269851Speter  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2363269851Speter  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2364269851Speter}'`
2365269851Speter  # AWK program above erroneously prepends '/' to C:/dos/paths
2366269851Speter  # for these hosts.
2367269851Speter  case $host_os in
2368269851Speter    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2369298161Sbapt      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2370269851Speter  esac
2371269851Speter  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2372269851Speterelse
2373269851Speter  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2374269851Speterfi])
2375251883Speterlibrary_names_spec=
2376251883Speterlibname_spec='lib$name'
2377251883Spetersoname_spec=
2378298161Sbaptshrext_cmds=.so
2379251883Speterpostinstall_cmds=
2380251883Speterpostuninstall_cmds=
2381251883Speterfinish_cmds=
2382251883Speterfinish_eval=
2383251883Spetershlibpath_var=
2384251883Spetershlibpath_overrides_runpath=unknown
2385251883Speterversion_type=none
2386251883Speterdynamic_linker="$host_os ld.so"
2387251883Spetersys_lib_dlsearch_path_spec="/lib /usr/lib"
2388251883Speterneed_lib_prefix=unknown
2389251883Speterhardcode_into_libs=no
2390251883Speter
2391251883Speter# when you set need_version to no, make sure it does not cause -set_version
2392251883Speter# flags to be left without arguments
2393251883Speterneed_version=unknown
2394251883Speter
2395298161SbaptAC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2396298161Sbapt[User-defined run-time library search path.])
2397298161Sbapt
2398251883Spetercase $host_os in
2399251883Speteraix3*)
2400269851Speter  version_type=linux # correct to gnu/linux during the next big refactor
2401298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2402251883Speter  shlibpath_var=LIBPATH
2403251883Speter
2404251883Speter  # AIX 3 has no versioning support, so we append a major version to the name.
2405298161Sbapt  soname_spec='$libname$release$shared_ext$major'
2406251883Speter  ;;
2407251883Speter
2408269851Speteraix[[4-9]]*)
2409269851Speter  version_type=linux # correct to gnu/linux during the next big refactor
2410251883Speter  need_lib_prefix=no
2411251883Speter  need_version=no
2412251883Speter  hardcode_into_libs=yes
2413298161Sbapt  if test ia64 = "$host_cpu"; then
2414251883Speter    # AIX 5 supports IA64
2415298161Sbapt    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2416251883Speter    shlibpath_var=LD_LIBRARY_PATH
2417251883Speter  else
2418251883Speter    # With GCC up to 2.95.x, collect2 would create an import file
2419251883Speter    # for dependence libraries.  The import file would start with
2420298161Sbapt    # the line '#! .'.  This would cause the generated library to
2421298161Sbapt    # depend on '.', always an invalid library.  This was fixed in
2422251883Speter    # development snapshots of GCC prior to 3.0.
2423251883Speter    case $host_os in
2424251883Speter      aix4 | aix4.[[01]] | aix4.[[01]].*)
2425251883Speter      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2426251883Speter	   echo ' yes '
2427298161Sbapt	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2428251883Speter	:
2429251883Speter      else
2430251883Speter	can_build_shared=no
2431251883Speter      fi
2432251883Speter      ;;
2433251883Speter    esac
2434298161Sbapt    # Using Import Files as archive members, it is possible to support
2435298161Sbapt    # filename-based versioning of shared library archives on AIX. While
2436298161Sbapt    # this would work for both with and without runtime linking, it will
2437298161Sbapt    # prevent static linking of such archives. So we do filename-based
2438298161Sbapt    # shared library versioning with .so extension only, which is used
2439298161Sbapt    # when both runtime linking and shared linking is enabled.
2440298161Sbapt    # Unfortunately, runtime linking may impact performance, so we do
2441298161Sbapt    # not want this to be the default eventually. Also, we use the
2442298161Sbapt    # versioned .so libs for executables only if there is the -brtl
2443298161Sbapt    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2444298161Sbapt    # To allow for filename-based versioning support, we need to create
2445298161Sbapt    # libNAME.so.V as an archive file, containing:
2446298161Sbapt    # *) an Import File, referring to the versioned filename of the
2447298161Sbapt    #    archive as well as the shared archive member, telling the
2448298161Sbapt    #    bitwidth (32 or 64) of that shared object, and providing the
2449298161Sbapt    #    list of exported symbols of that shared object, eventually
2450298161Sbapt    #    decorated with the 'weak' keyword
2451298161Sbapt    # *) the shared object with the F_LOADONLY flag set, to really avoid
2452298161Sbapt    #    it being seen by the linker.
2453298161Sbapt    # At run time we better use the real file rather than another symlink,
2454298161Sbapt    # but for link time we create the symlink libNAME.so -> libNAME.so.V
2455298161Sbapt
2456298161Sbapt    case $with_aix_soname,$aix_use_runtimelinking in
2457298161Sbapt    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2458251883Speter    # soname into executable. Probably we can add versioning support to
2459251883Speter    # collect2, so additional links can be useful in future.
2460298161Sbapt    aix,yes) # traditional libtool
2461298161Sbapt      dynamic_linker='AIX unversionable lib.so'
2462251883Speter      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2463251883Speter      # instead of lib<name>.a to let people know that these are not
2464251883Speter      # typical AIX shared libraries.
2465298161Sbapt      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2466298161Sbapt      ;;
2467298161Sbapt    aix,no) # traditional AIX only
2468298161Sbapt      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2469251883Speter      # We preserve .a as extension for shared libraries through AIX4.2
2470251883Speter      # and later when we are not doing run time linking.
2471298161Sbapt      library_names_spec='$libname$release.a $libname.a'
2472298161Sbapt      soname_spec='$libname$release$shared_ext$major'
2473298161Sbapt      ;;
2474298161Sbapt    svr4,*) # full svr4 only
2475298161Sbapt      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2476298161Sbapt      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2477298161Sbapt      # We do not specify a path in Import Files, so LIBPATH fires.
2478298161Sbapt      shlibpath_overrides_runpath=yes
2479298161Sbapt      ;;
2480298161Sbapt    *,yes) # both, prefer svr4
2481298161Sbapt      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2482298161Sbapt      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2483298161Sbapt      # unpreferred sharedlib libNAME.a needs extra handling
2484298161Sbapt      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
2485298161Sbapt      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
2486298161Sbapt      # We do not specify a path in Import Files, so LIBPATH fires.
2487298161Sbapt      shlibpath_overrides_runpath=yes
2488298161Sbapt      ;;
2489298161Sbapt    *,no) # both, prefer aix
2490298161Sbapt      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2491298161Sbapt      library_names_spec='$libname$release.a $libname.a'
2492298161Sbapt      soname_spec='$libname$release$shared_ext$major'
2493298161Sbapt      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2494298161Sbapt      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
2495298161Sbapt      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
2496298161Sbapt      ;;
2497298161Sbapt    esac
2498251883Speter    shlibpath_var=LIBPATH
2499251883Speter  fi
2500251883Speter  ;;
2501251883Speter
2502251883Speteramigaos*)
2503269851Speter  case $host_cpu in
2504269851Speter  powerpc)
2505269851Speter    # Since July 2007 AmigaOS4 officially supports .so libraries.
2506269851Speter    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2507298161Sbapt    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2508269851Speter    ;;
2509269851Speter  m68k)
2510269851Speter    library_names_spec='$libname.ixlibrary $libname.a'
2511269851Speter    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2512298161Sbapt    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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'
2513269851Speter    ;;
2514269851Speter  esac
2515251883Speter  ;;
2516251883Speter
2517251883Speterbeos*)
2518298161Sbapt  library_names_spec='$libname$shared_ext'
2519251883Speter  dynamic_linker="$host_os ld.so"
2520251883Speter  shlibpath_var=LIBRARY_PATH
2521251883Speter  ;;
2522251883Speter
2523251883Speterbsdi[[45]]*)
2524269851Speter  version_type=linux # correct to gnu/linux during the next big refactor
2525251883Speter  need_version=no
2526298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2527298161Sbapt  soname_spec='$libname$release$shared_ext$major'
2528251883Speter  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2529251883Speter  shlibpath_var=LD_LIBRARY_PATH
2530251883Speter  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2531251883Speter  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2532251883Speter  # the default ld.so.conf also contains /usr/contrib/lib and
2533251883Speter  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2534251883Speter  # libtool to hard-code these into programs
2535251883Speter  ;;
2536251883Speter
2537269851Spetercygwin* | mingw* | pw32* | cegcc*)
2538251883Speter  version_type=windows
2539298161Sbapt  shrext_cmds=.dll
2540251883Speter  need_version=no
2541251883Speter  need_lib_prefix=no
2542251883Speter
2543269851Speter  case $GCC,$cc_basename in
2544269851Speter  yes,*)
2545269851Speter    # gcc
2546251883Speter    library_names_spec='$libname.dll.a'
2547251883Speter    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2548298161Sbapt    postinstall_cmds='base_file=`basename \$file`~
2549298161Sbapt      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2550251883Speter      dldir=$destdir/`dirname \$dlpath`~
2551251883Speter      test -d \$dldir || mkdir -p \$dldir~
2552251883Speter      $install_prog $dir/$dlname \$dldir/$dlname~
2553269851Speter      chmod a+x \$dldir/$dlname~
2554269851Speter      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2555269851Speter        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2556269851Speter      fi'
2557251883Speter    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2558251883Speter      dlpath=$dir/\$dldll~
2559269851Speter       $RM \$dlpath'
2560251883Speter    shlibpath_overrides_runpath=yes
2561251883Speter
2562251883Speter    case $host_os in
2563251883Speter    cygwin*)
2564251883Speter      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2565298161Sbapt      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2566269851Speterm4_if([$1], [],[
2567269851Speter      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2568251883Speter      ;;
2569269851Speter    mingw* | cegcc*)
2570251883Speter      # MinGW DLLs use traditional 'lib' prefix
2571298161Sbapt      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2572251883Speter      ;;
2573251883Speter    pw32*)
2574251883Speter      # pw32 DLLs use 'pw' prefix rather than 'lib'
2575298161Sbapt      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2576251883Speter      ;;
2577251883Speter    esac
2578269851Speter    dynamic_linker='Win32 ld.exe'
2579251883Speter    ;;
2580251883Speter
2581269851Speter  *,cl*)
2582269851Speter    # Native MSVC
2583269851Speter    libname_spec='$name'
2584298161Sbapt    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2585298161Sbapt    library_names_spec='$libname.dll.lib'
2586269851Speter
2587269851Speter    case $build_os in
2588269851Speter    mingw*)
2589269851Speter      sys_lib_search_path_spec=
2590269851Speter      lt_save_ifs=$IFS
2591269851Speter      IFS=';'
2592269851Speter      for lt_path in $LIB
2593269851Speter      do
2594269851Speter        IFS=$lt_save_ifs
2595269851Speter        # Let DOS variable expansion print the short 8.3 style file name.
2596269851Speter        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2597269851Speter        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2598269851Speter      done
2599269851Speter      IFS=$lt_save_ifs
2600269851Speter      # Convert to MSYS style.
2601269851Speter      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2602269851Speter      ;;
2603269851Speter    cygwin*)
2604269851Speter      # Convert to unix form, then to dos form, then back to unix form
2605269851Speter      # but this time dos style (no spaces!) so that the unix form looks
2606269851Speter      # like /cygdrive/c/PROGRA~1:/cygdr...
2607269851Speter      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2608269851Speter      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2609269851Speter      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2610269851Speter      ;;
2611269851Speter    *)
2612298161Sbapt      sys_lib_search_path_spec=$LIB
2613269851Speter      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2614269851Speter        # It is most probably a Windows format PATH.
2615269851Speter        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2616269851Speter      else
2617269851Speter        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2618269851Speter      fi
2619269851Speter      # FIXME: find the short name or the path components, as spaces are
2620269851Speter      # common. (e.g. "Program Files" -> "PROGRA~1")
2621269851Speter      ;;
2622269851Speter    esac
2623269851Speter
2624269851Speter    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2625298161Sbapt    postinstall_cmds='base_file=`basename \$file`~
2626298161Sbapt      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2627269851Speter      dldir=$destdir/`dirname \$dlpath`~
2628269851Speter      test -d \$dldir || mkdir -p \$dldir~
2629269851Speter      $install_prog $dir/$dlname \$dldir/$dlname'
2630269851Speter    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2631269851Speter      dlpath=$dir/\$dldll~
2632269851Speter       $RM \$dlpath'
2633269851Speter    shlibpath_overrides_runpath=yes
2634269851Speter    dynamic_linker='Win32 link.exe'
2635269851Speter    ;;
2636269851Speter
2637251883Speter  *)
2638269851Speter    # Assume MSVC wrapper
2639298161Sbapt    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2640269851Speter    dynamic_linker='Win32 ld.exe'
2641251883Speter    ;;
2642251883Speter  esac
2643251883Speter  # FIXME: first we should search . and the directory the executable is in
2644251883Speter  shlibpath_var=PATH
2645251883Speter  ;;
2646251883Speter
2647251883Speterdarwin* | rhapsody*)
2648251883Speter  dynamic_linker="$host_os dyld"
2649251883Speter  version_type=darwin
2650251883Speter  need_lib_prefix=no
2651251883Speter  need_version=no
2652298161Sbapt  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2653298161Sbapt  soname_spec='$libname$release$major$shared_ext'
2654251883Speter  shlibpath_overrides_runpath=yes
2655251883Speter  shlibpath_var=DYLD_LIBRARY_PATH
2656251883Speter  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2657269851Speterm4_if([$1], [],[
2658269851Speter  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2659251883Speter  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2660251883Speter  ;;
2661251883Speter
2662251883Speterdgux*)
2663269851Speter  version_type=linux # correct to gnu/linux during the next big refactor
2664251883Speter  need_lib_prefix=no
2665251883Speter  need_version=no
2666298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2667298161Sbapt  soname_spec='$libname$release$shared_ext$major'
2668251883Speter  shlibpath_var=LD_LIBRARY_PATH
2669251883Speter  ;;
2670251883Speter
2671251883Speterfreebsd* | dragonfly*)
2672251883Speter  # DragonFly does not have aout.  When/if they implement a new
2673251883Speter  # versioning mechanism, adjust this.
2674251883Speter  if test -x /usr/bin/objformat; then
2675251883Speter    objformat=`/usr/bin/objformat`
2676251883Speter  else
2677251883Speter    case $host_os in
2678269851Speter    freebsd[[23]].*) objformat=aout ;;
2679251883Speter    *) objformat=elf ;;
2680251883Speter    esac
2681251883Speter  fi
2682251883Speter  version_type=freebsd-$objformat
2683251883Speter  case $version_type in
2684251883Speter    freebsd-elf*)
2685298161Sbapt      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2686298161Sbapt      soname_spec='$libname$release$shared_ext$major'
2687251883Speter      need_version=no
2688251883Speter      need_lib_prefix=no
2689251883Speter      ;;
2690251883Speter    freebsd-*)
2691298161Sbapt      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2692251883Speter      need_version=yes
2693251883Speter      ;;
2694251883Speter  esac
2695251883Speter  shlibpath_var=LD_LIBRARY_PATH
2696251883Speter  case $host_os in
2697269851Speter  freebsd2.*)
2698251883Speter    shlibpath_overrides_runpath=yes
2699251883Speter    ;;
2700251883Speter  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2701251883Speter    shlibpath_overrides_runpath=yes
2702251883Speter    hardcode_into_libs=yes
2703251883Speter    ;;
2704251883Speter  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2705251883Speter  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2706251883Speter    shlibpath_overrides_runpath=no
2707251883Speter    hardcode_into_libs=yes
2708251883Speter    ;;
2709269851Speter  *) # from 4.6 on, and DragonFly
2710251883Speter    shlibpath_overrides_runpath=yes
2711251883Speter    hardcode_into_libs=yes
2712251883Speter    ;;
2713251883Speter  esac
2714251883Speter  ;;
2715251883Speter
2716269851Speterhaiku*)
2717269851Speter  version_type=linux # correct to gnu/linux during the next big refactor
2718269851Speter  need_lib_prefix=no
2719269851Speter  need_version=no
2720269851Speter  dynamic_linker="$host_os runtime_loader"
2721298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2722298161Sbapt  soname_spec='$libname$release$shared_ext$major'
2723269851Speter  shlibpath_var=LIBRARY_PATH
2724298161Sbapt  shlibpath_overrides_runpath=no
2725269851Speter  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2726269851Speter  hardcode_into_libs=yes
2727269851Speter  ;;
2728269851Speter
2729251883Speterhpux9* | hpux10* | hpux11*)
2730251883Speter  # Give a soname corresponding to the major version so that dld.sl refuses to
2731251883Speter  # link against other versions.
2732251883Speter  version_type=sunos
2733251883Speter  need_lib_prefix=no
2734251883Speter  need_version=no
2735251883Speter  case $host_cpu in
2736251883Speter  ia64*)
2737251883Speter    shrext_cmds='.so'
2738251883Speter    hardcode_into_libs=yes
2739251883Speter    dynamic_linker="$host_os dld.so"
2740251883Speter    shlibpath_var=LD_LIBRARY_PATH
2741251883Speter    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2742298161Sbapt    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2743298161Sbapt    soname_spec='$libname$release$shared_ext$major'
2744298161Sbapt    if test 32 = "$HPUX_IA64_MODE"; then
2745251883Speter      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2746298161Sbapt      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2747251883Speter    else
2748251883Speter      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2749298161Sbapt      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2750251883Speter    fi
2751251883Speter    ;;
2752269851Speter  hppa*64*)
2753251883Speter    shrext_cmds='.sl'
2754269851Speter    hardcode_into_libs=yes
2755251883Speter    dynamic_linker="$host_os dld.sl"
2756269851Speter    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2757269851Speter    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2758298161Sbapt    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2759298161Sbapt    soname_spec='$libname$release$shared_ext$major'
2760269851Speter    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2761269851Speter    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2762269851Speter    ;;
2763269851Speter  *)
2764269851Speter    shrext_cmds='.sl'
2765269851Speter    dynamic_linker="$host_os dld.sl"
2766251883Speter    shlibpath_var=SHLIB_PATH
2767251883Speter    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2768298161Sbapt    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2769298161Sbapt    soname_spec='$libname$release$shared_ext$major'
2770251883Speter    ;;
2771251883Speter  esac
2772269851Speter  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2773251883Speter  postinstall_cmds='chmod 555 $lib'
2774269851Speter  # or fails outright, so override atomically:
2775269851Speter  install_override_mode=555
2776251883Speter  ;;
2777251883Speter
2778269851Speterinterix[[3-9]]*)
2779269851Speter  version_type=linux # correct to gnu/linux during the next big refactor
2780251883Speter  need_lib_prefix=no
2781251883Speter  need_version=no
2782298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2783298161Sbapt  soname_spec='$libname$release$shared_ext$major'
2784251883Speter  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2785251883Speter  shlibpath_var=LD_LIBRARY_PATH
2786251883Speter  shlibpath_overrides_runpath=no
2787251883Speter  hardcode_into_libs=yes
2788251883Speter  ;;
2789251883Speter
2790251883Speteririx5* | irix6* | nonstopux*)
2791251883Speter  case $host_os in
2792251883Speter    nonstopux*) version_type=nonstopux ;;
2793251883Speter    *)
2794298161Sbapt	if test yes = "$lt_cv_prog_gnu_ld"; then
2795269851Speter		version_type=linux # correct to gnu/linux during the next big refactor
2796251883Speter	else
2797251883Speter		version_type=irix
2798251883Speter	fi ;;
2799251883Speter  esac
2800251883Speter  need_lib_prefix=no
2801251883Speter  need_version=no
2802298161Sbapt  soname_spec='$libname$release$shared_ext$major'
2803298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
2804251883Speter  case $host_os in
2805251883Speter  irix5* | nonstopux*)
2806251883Speter    libsuff= shlibsuff=
2807251883Speter    ;;
2808251883Speter  *)
2809251883Speter    case $LD in # libtool.m4 will add one of these switches to LD
2810251883Speter    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2811251883Speter      libsuff= shlibsuff= libmagic=32-bit;;
2812251883Speter    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2813251883Speter      libsuff=32 shlibsuff=N32 libmagic=N32;;
2814251883Speter    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2815251883Speter      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2816251883Speter    *) libsuff= shlibsuff= libmagic=never-match;;
2817251883Speter    esac
2818251883Speter    ;;
2819251883Speter  esac
2820251883Speter  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2821251883Speter  shlibpath_overrides_runpath=no
2822298161Sbapt  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2823298161Sbapt  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
2824251883Speter  hardcode_into_libs=yes
2825251883Speter  ;;
2826251883Speter
2827251883Speter# No shared lib support for Linux oldld, aout, or coff.
2828251883Speterlinux*oldld* | linux*aout* | linux*coff*)
2829251883Speter  dynamic_linker=no
2830251883Speter  ;;
2831251883Speter
2832298161Sbaptlinux*android*)
2833298161Sbapt  version_type=none # Android doesn't support versioned libraries.
2834298161Sbapt  need_lib_prefix=no
2835298161Sbapt  need_version=no
2836298161Sbapt  library_names_spec='$libname$release$shared_ext'
2837298161Sbapt  soname_spec='$libname$release$shared_ext'
2838298161Sbapt  finish_cmds=
2839298161Sbapt  shlibpath_var=LD_LIBRARY_PATH
2840298161Sbapt  shlibpath_overrides_runpath=yes
2841298161Sbapt
2842298161Sbapt  # This implies no fast_install, which is unacceptable.
2843298161Sbapt  # Some rework will be needed to allow for fast_install
2844298161Sbapt  # before this can be enabled.
2845298161Sbapt  hardcode_into_libs=yes
2846298161Sbapt
2847298161Sbapt  dynamic_linker='Android linker'
2848298161Sbapt  # Don't embed -rpath directories since the linker doesn't support them.
2849298161Sbapt  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2850298161Sbapt  ;;
2851298161Sbapt
2852269851Speter# This must be glibc/ELF.
2853298161Sbaptlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2854269851Speter  version_type=linux # correct to gnu/linux during the next big refactor
2855251883Speter  need_lib_prefix=no
2856251883Speter  need_version=no
2857298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2858298161Sbapt  soname_spec='$libname$release$shared_ext$major'
2859251883Speter  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2860251883Speter  shlibpath_var=LD_LIBRARY_PATH
2861251883Speter  shlibpath_overrides_runpath=no
2862269851Speter
2863269851Speter  # Some binutils ld are patched to set DT_RUNPATH
2864269851Speter  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2865269851Speter    [lt_cv_shlibpath_overrides_runpath=no
2866269851Speter    save_LDFLAGS=$LDFLAGS
2867269851Speter    save_libdir=$libdir
2868269851Speter    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2869269851Speter	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2870269851Speter    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2871269851Speter      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2872269851Speter	 [lt_cv_shlibpath_overrides_runpath=yes])])
2873269851Speter    LDFLAGS=$save_LDFLAGS
2874269851Speter    libdir=$save_libdir
2875269851Speter    ])
2876269851Speter  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2877269851Speter
2878251883Speter  # This implies no fast_install, which is unacceptable.
2879251883Speter  # Some rework will be needed to allow for fast_install
2880251883Speter  # before this can be enabled.
2881251883Speter  hardcode_into_libs=yes
2882251883Speter
2883298161Sbapt  # Ideally, we could use ldconfig to report *all* directores which are
2884298161Sbapt  # searched for libraries, however this is still not possible.  Aside from not
2885298161Sbapt  # being certain /sbin/ldconfig is available, command
2886298161Sbapt  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2887298161Sbapt  # even though it is searched at run-time.  Try to do the best guess by
2888298161Sbapt  # appending ld.so.conf contents (and includes) to the search path.
2889251883Speter  if test -f /etc/ld.so.conf; then
2890269851Speter    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;s/"//g;/^$/d' | tr '\n' ' '`
2891251883Speter    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2892251883Speter  fi
2893251883Speter
2894251883Speter  # We used to test for /lib/ld.so.1 and disable shared libraries on
2895251883Speter  # powerpc, because MkLinux only supported shared libraries with the
2896251883Speter  # GNU dynamic linker.  Since this was broken with cross compilers,
2897251883Speter  # most powerpc-linux boxes support dynamic linking these days and
2898251883Speter  # people can always --disable-shared, the test was removed, and we
2899251883Speter  # assume the GNU/Linux dynamic linker is in use.
2900251883Speter  dynamic_linker='GNU/Linux ld.so'
2901251883Speter  ;;
2902251883Speter
2903346442Scynetbsdelf*-gnu)
2904346442Scy  version_type=linux
2905346442Scy  need_lib_prefix=no
2906346442Scy  need_version=no
2907346442Scy  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2908346442Scy  soname_spec='${libname}${release}${shared_ext}$major'
2909346442Scy  shlibpath_var=LD_LIBRARY_PATH
2910346442Scy  shlibpath_overrides_runpath=no
2911346442Scy  hardcode_into_libs=yes
2912346442Scy  dynamic_linker='NetBSD ld.elf_so'
2913346442Scy  ;;
2914346442Scy
2915251883Speternetbsd*)
2916251883Speter  version_type=sunos
2917251883Speter  need_lib_prefix=no
2918251883Speter  need_version=no
2919269851Speter  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2920298161Sbapt    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2921251883Speter    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2922251883Speter    dynamic_linker='NetBSD (a.out) ld.so'
2923251883Speter  else
2924298161Sbapt    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2925298161Sbapt    soname_spec='$libname$release$shared_ext$major'
2926251883Speter    dynamic_linker='NetBSD ld.elf_so'
2927251883Speter  fi
2928251883Speter  shlibpath_var=LD_LIBRARY_PATH
2929251883Speter  shlibpath_overrides_runpath=yes
2930251883Speter  hardcode_into_libs=yes
2931251883Speter  ;;
2932251883Speter
2933251883Speternewsos6)
2934269851Speter  version_type=linux # correct to gnu/linux during the next big refactor
2935298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2936251883Speter  shlibpath_var=LD_LIBRARY_PATH
2937251883Speter  shlibpath_overrides_runpath=yes
2938251883Speter  ;;
2939251883Speter
2940269851Speter*nto* | *qnx*)
2941269851Speter  version_type=qnx
2942251883Speter  need_lib_prefix=no
2943251883Speter  need_version=no
2944298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2945298161Sbapt  soname_spec='$libname$release$shared_ext$major'
2946251883Speter  shlibpath_var=LD_LIBRARY_PATH
2947269851Speter  shlibpath_overrides_runpath=no
2948269851Speter  hardcode_into_libs=yes
2949269851Speter  dynamic_linker='ldqnx.so'
2950251883Speter  ;;
2951251883Speter
2952298161Sbaptopenbsd* | bitrig*)
2953251883Speter  version_type=sunos
2954298161Sbapt  sys_lib_dlsearch_path_spec=/usr/lib
2955251883Speter  need_lib_prefix=no
2956298161Sbapt  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2957298161Sbapt    need_version=no
2958298161Sbapt  else
2959298161Sbapt    need_version=yes
2960298161Sbapt  fi
2961298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2962251883Speter  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2963251883Speter  shlibpath_var=LD_LIBRARY_PATH
2964298161Sbapt  shlibpath_overrides_runpath=yes
2965251883Speter  ;;
2966251883Speter
2967251883Speteros2*)
2968251883Speter  libname_spec='$name'
2969298161Sbapt  version_type=windows
2970298161Sbapt  shrext_cmds=.dll
2971298161Sbapt  need_version=no
2972251883Speter  need_lib_prefix=no
2973298161Sbapt  # OS/2 can only load a DLL with a base name of 8 characters or less.
2974298161Sbapt  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2975298161Sbapt    v=$($ECHO $release$versuffix | tr -d .-);
2976298161Sbapt    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2977298161Sbapt    $ECHO $n$v`$shared_ext'
2978298161Sbapt  library_names_spec='${libname}_dll.$libext'
2979251883Speter  dynamic_linker='OS/2 ld.exe'
2980298161Sbapt  shlibpath_var=BEGINLIBPATH
2981298161Sbapt  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2982298161Sbapt  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2983298161Sbapt  postinstall_cmds='base_file=`basename \$file`~
2984298161Sbapt    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2985298161Sbapt    dldir=$destdir/`dirname \$dlpath`~
2986298161Sbapt    test -d \$dldir || mkdir -p \$dldir~
2987298161Sbapt    $install_prog $dir/$dlname \$dldir/$dlname~
2988298161Sbapt    chmod a+x \$dldir/$dlname~
2989298161Sbapt    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2990298161Sbapt      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2991298161Sbapt    fi'
2992298161Sbapt  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
2993298161Sbapt    dlpath=$dir/\$dldll~
2994298161Sbapt    $RM \$dlpath'
2995251883Speter  ;;
2996251883Speter
2997251883Speterosf3* | osf4* | osf5*)
2998251883Speter  version_type=osf
2999251883Speter  need_lib_prefix=no
3000251883Speter  need_version=no
3001298161Sbapt  soname_spec='$libname$release$shared_ext$major'
3002298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3003251883Speter  shlibpath_var=LD_LIBRARY_PATH
3004251883Speter  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3005298161Sbapt  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3006251883Speter  ;;
3007251883Speter
3008269851Speterrdos*)
3009269851Speter  dynamic_linker=no
3010269851Speter  ;;
3011269851Speter
3012251883Spetersolaris*)
3013269851Speter  version_type=linux # correct to gnu/linux during the next big refactor
3014251883Speter  need_lib_prefix=no
3015251883Speter  need_version=no
3016298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3017298161Sbapt  soname_spec='$libname$release$shared_ext$major'
3018251883Speter  shlibpath_var=LD_LIBRARY_PATH
3019251883Speter  shlibpath_overrides_runpath=yes
3020251883Speter  hardcode_into_libs=yes
3021251883Speter  # ldd complains unless libraries are executable
3022251883Speter  postinstall_cmds='chmod +x $lib'
3023251883Speter  ;;
3024251883Speter
3025251883Spetersunos4*)
3026251883Speter  version_type=sunos
3027298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3028251883Speter  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3029251883Speter  shlibpath_var=LD_LIBRARY_PATH
3030251883Speter  shlibpath_overrides_runpath=yes
3031298161Sbapt  if test yes = "$with_gnu_ld"; then
3032251883Speter    need_lib_prefix=no
3033251883Speter  fi
3034251883Speter  need_version=yes
3035251883Speter  ;;
3036251883Speter
3037251883Spetersysv4 | sysv4.3*)
3038269851Speter  version_type=linux # correct to gnu/linux during the next big refactor
3039298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3040298161Sbapt  soname_spec='$libname$release$shared_ext$major'
3041251883Speter  shlibpath_var=LD_LIBRARY_PATH
3042251883Speter  case $host_vendor in
3043251883Speter    sni)
3044251883Speter      shlibpath_overrides_runpath=no
3045251883Speter      need_lib_prefix=no
3046251883Speter      runpath_var=LD_RUN_PATH
3047251883Speter      ;;
3048251883Speter    siemens)
3049251883Speter      need_lib_prefix=no
3050251883Speter      ;;
3051251883Speter    motorola)
3052251883Speter      need_lib_prefix=no
3053251883Speter      need_version=no
3054251883Speter      shlibpath_overrides_runpath=no
3055251883Speter      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3056251883Speter      ;;
3057251883Speter  esac
3058251883Speter  ;;
3059251883Speter
3060251883Spetersysv4*MP*)
3061298161Sbapt  if test -d /usr/nec; then
3062269851Speter    version_type=linux # correct to gnu/linux during the next big refactor
3063298161Sbapt    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3064298161Sbapt    soname_spec='$libname$shared_ext.$major'
3065251883Speter    shlibpath_var=LD_LIBRARY_PATH
3066251883Speter  fi
3067251883Speter  ;;
3068251883Speter
3069251883Spetersysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3070298161Sbapt  version_type=sco
3071251883Speter  need_lib_prefix=no
3072251883Speter  need_version=no
3073298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3074298161Sbapt  soname_spec='$libname$release$shared_ext$major'
3075251883Speter  shlibpath_var=LD_LIBRARY_PATH
3076269851Speter  shlibpath_overrides_runpath=yes
3077251883Speter  hardcode_into_libs=yes
3078298161Sbapt  if test yes = "$with_gnu_ld"; then
3079251883Speter    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3080251883Speter  else
3081251883Speter    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3082251883Speter    case $host_os in
3083251883Speter      sco3.2v5*)
3084251883Speter        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3085251883Speter	;;
3086251883Speter    esac
3087251883Speter  fi
3088251883Speter  sys_lib_dlsearch_path_spec='/usr/lib'
3089251883Speter  ;;
3090251883Speter
3091269851Spetertpf*)
3092269851Speter  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3093269851Speter  version_type=linux # correct to gnu/linux during the next big refactor
3094269851Speter  need_lib_prefix=no
3095269851Speter  need_version=no
3096298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3097269851Speter  shlibpath_var=LD_LIBRARY_PATH
3098269851Speter  shlibpath_overrides_runpath=no
3099269851Speter  hardcode_into_libs=yes
3100269851Speter  ;;
3101269851Speter
3102251883Speteruts4*)
3103269851Speter  version_type=linux # correct to gnu/linux during the next big refactor
3104298161Sbapt  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3105298161Sbapt  soname_spec='$libname$release$shared_ext$major'
3106251883Speter  shlibpath_var=LD_LIBRARY_PATH
3107251883Speter  ;;
3108251883Speter
3109251883Speter*)
3110251883Speter  dynamic_linker=no
3111251883Speter  ;;
3112251883Speteresac
3113251883SpeterAC_MSG_RESULT([$dynamic_linker])
3114298161Sbapttest no = "$dynamic_linker" && can_build_shared=no
3115251883Speter
3116251883Spetervariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3117298161Sbaptif test yes = "$GCC"; then
3118251883Speter  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3119251883Speterfi
3120251883Speter
3121298161Sbaptif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3122298161Sbapt  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3123251883Speterfi
3124298161Sbapt
3125298161Sbaptif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3126298161Sbapt  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3127269851Speterfi
3128251883Speter
3129298161Sbapt# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3130298161Sbaptconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3131298161Sbapt
3132298161Sbapt# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3133298161Sbaptfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3134298161Sbapt
3135298161Sbapt# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3136298161Sbaptconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3137298161Sbapt
3138269851Speter_LT_DECL([], [variables_saved_for_relink], [1],
3139269851Speter    [Variables whose values should be saved in libtool wrapper scripts and
3140269851Speter    restored at link time])
3141269851Speter_LT_DECL([], [need_lib_prefix], [0],
3142269851Speter    [Do we need the "lib" prefix for modules?])
3143269851Speter_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3144269851Speter_LT_DECL([], [version_type], [0], [Library versioning type])
3145269851Speter_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3146269851Speter_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3147269851Speter_LT_DECL([], [shlibpath_overrides_runpath], [0],
3148269851Speter    [Is shlibpath searched before the hard-coded library search path?])
3149269851Speter_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3150269851Speter_LT_DECL([], [library_names_spec], [1],
3151269851Speter    [[List of archive names.  First name is the real one, the rest are links.
3152269851Speter    The last name is the one that the linker finds with -lNAME]])
3153269851Speter_LT_DECL([], [soname_spec], [1],
3154269851Speter    [[The coded name of the library, if different from the real name]])
3155269851Speter_LT_DECL([], [install_override_mode], [1],
3156269851Speter    [Permission mode override for installation of shared libraries])
3157269851Speter_LT_DECL([], [postinstall_cmds], [2],
3158269851Speter    [Command to use after installation of a shared archive])
3159269851Speter_LT_DECL([], [postuninstall_cmds], [2],
3160269851Speter    [Command to use after uninstallation of a shared archive])
3161269851Speter_LT_DECL([], [finish_cmds], [2],
3162269851Speter    [Commands used to finish a libtool library installation in a directory])
3163269851Speter_LT_DECL([], [finish_eval], [1],
3164269851Speter    [[As "finish_cmds", except a single script fragment to be evaled but
3165269851Speter    not shown]])
3166269851Speter_LT_DECL([], [hardcode_into_libs], [0],
3167269851Speter    [Whether we should hardcode library paths into libraries])
3168269851Speter_LT_DECL([], [sys_lib_search_path_spec], [2],
3169269851Speter    [Compile-time system search path for libraries])
3170298161Sbapt_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3171298161Sbapt    [Detected run-time system search path for libraries])
3172298161Sbapt_LT_DECL([], [configure_time_lt_sys_library_path], [2],
3173298161Sbapt    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3174269851Speter])# _LT_SYS_DYNAMIC_LINKER
3175251883Speter
3176251883Speter
3177269851Speter# _LT_PATH_TOOL_PREFIX(TOOL)
3178251883Speter# --------------------------
3179298161Sbapt# find a file program that can recognize shared library
3180269851SpeterAC_DEFUN([_LT_PATH_TOOL_PREFIX],
3181269851Speter[m4_require([_LT_DECL_EGREP])dnl
3182251883SpeterAC_MSG_CHECKING([for $1])
3183251883SpeterAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3184251883Speter[case $MAGIC_CMD in
3185251883Speter[[\\/*] |  ?:[\\/]*])
3186298161Sbapt  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3187251883Speter  ;;
3188251883Speter*)
3189298161Sbapt  lt_save_MAGIC_CMD=$MAGIC_CMD
3190298161Sbapt  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3191251883Speterdnl $ac_dummy forces splitting on constant user-supplied paths.
3192251883Speterdnl POSIX.2 word splitting is done only on the output of word expansions,
3193251883Speterdnl not every word.  This closes a longstanding sh security hole.
3194269851Speter  ac_dummy="m4_if([$2], , $PATH, [$2])"
3195251883Speter  for ac_dir in $ac_dummy; do
3196298161Sbapt    IFS=$lt_save_ifs
3197251883Speter    test -z "$ac_dir" && ac_dir=.
3198298161Sbapt    if test -f "$ac_dir/$1"; then
3199298161Sbapt      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3200251883Speter      if test -n "$file_magic_test_file"; then
3201251883Speter	case $deplibs_check_method in
3202251883Speter	"file_magic "*)
3203251883Speter	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3204298161Sbapt	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3205251883Speter	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3206251883Speter	    $EGREP "$file_magic_regex" > /dev/null; then
3207251883Speter	    :
3208251883Speter	  else
3209269851Speter	    cat <<_LT_EOF 1>&2
3210251883Speter
3211251883Speter*** Warning: the command libtool uses to detect shared libraries,
3212251883Speter*** $file_magic_cmd, produces output that libtool cannot recognize.
3213251883Speter*** The result is that libtool may fail to recognize shared libraries
3214251883Speter*** as such.  This will affect the creation of libtool libraries that
3215251883Speter*** depend on shared libraries, but programs linked with such libtool
3216251883Speter*** libraries will work regardless of this problem.  Nevertheless, you
3217251883Speter*** may want to report the problem to your system manager and/or to
3218251883Speter*** bug-libtool@gnu.org
3219251883Speter
3220269851Speter_LT_EOF
3221251883Speter	  fi ;;
3222251883Speter	esac
3223251883Speter      fi
3224251883Speter      break
3225251883Speter    fi
3226251883Speter  done
3227298161Sbapt  IFS=$lt_save_ifs
3228298161Sbapt  MAGIC_CMD=$lt_save_MAGIC_CMD
3229251883Speter  ;;
3230251883Speteresac])
3231298161SbaptMAGIC_CMD=$lt_cv_path_MAGIC_CMD
3232251883Speterif test -n "$MAGIC_CMD"; then
3233251883Speter  AC_MSG_RESULT($MAGIC_CMD)
3234251883Speterelse
3235251883Speter  AC_MSG_RESULT(no)
3236251883Speterfi
3237269851Speter_LT_DECL([], [MAGIC_CMD], [0],
3238269851Speter	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3239269851Speter])# _LT_PATH_TOOL_PREFIX
3240251883Speter
3241269851Speter# Old name:
3242269851SpeterAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3243269851Speterdnl aclocal-1.4 backwards compatibility:
3244269851Speterdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3245251883Speter
3246269851Speter
3247269851Speter# _LT_PATH_MAGIC
3248269851Speter# --------------
3249298161Sbapt# find a file program that can recognize a shared library
3250269851Speterm4_defun([_LT_PATH_MAGIC],
3251269851Speter[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3252251883Speterif test -z "$lt_cv_path_MAGIC_CMD"; then
3253251883Speter  if test -n "$ac_tool_prefix"; then
3254269851Speter    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3255251883Speter  else
3256251883Speter    MAGIC_CMD=:
3257251883Speter  fi
3258251883Speterfi
3259269851Speter])# _LT_PATH_MAGIC
3260251883Speter
3261251883Speter
3262269851Speter# LT_PATH_LD
3263251883Speter# ----------
3264251883Speter# find the pathname to the GNU or non-GNU linker
3265269851SpeterAC_DEFUN([LT_PATH_LD],
3266269851Speter[AC_REQUIRE([AC_PROG_CC])dnl
3267269851SpeterAC_REQUIRE([AC_CANONICAL_HOST])dnl
3268269851SpeterAC_REQUIRE([AC_CANONICAL_BUILD])dnl
3269269851Speterm4_require([_LT_DECL_SED])dnl
3270269851Speterm4_require([_LT_DECL_EGREP])dnl
3271269851Speterm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3272269851Speter
3273269851SpeterAC_ARG_WITH([gnu-ld],
3274269851Speter    [AS_HELP_STRING([--with-gnu-ld],
3275251883Speter	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3276298161Sbapt    [test no = "$withval" || with_gnu_ld=yes],
3277269851Speter    [with_gnu_ld=no])dnl
3278269851Speter
3279251883Speterac_prog=ld
3280298161Sbaptif test yes = "$GCC"; then
3281251883Speter  # Check if gcc -print-prog-name=ld gives a path.
3282251883Speter  AC_MSG_CHECKING([for ld used by $CC])
3283251883Speter  case $host in
3284251883Speter  *-*-mingw*)
3285298161Sbapt    # gcc leaves a trailing carriage return, which upsets mingw
3286251883Speter    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3287251883Speter  *)
3288251883Speter    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3289251883Speter  esac
3290251883Speter  case $ac_prog in
3291251883Speter    # Accept absolute paths.
3292251883Speter    [[\\/]]* | ?:[[\\/]]*)
3293251883Speter      re_direlt='/[[^/]][[^/]]*/\.\./'
3294251883Speter      # Canonicalize the pathname of ld
3295269851Speter      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3296269851Speter      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3297269851Speter	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3298251883Speter      done
3299298161Sbapt      test -z "$LD" && LD=$ac_prog
3300251883Speter      ;;
3301251883Speter  "")
3302251883Speter    # If it fails, then pretend we aren't using GCC.
3303251883Speter    ac_prog=ld
3304251883Speter    ;;
3305251883Speter  *)
3306251883Speter    # If it is relative, then search for the first ld in PATH.
3307251883Speter    with_gnu_ld=unknown
3308251883Speter    ;;
3309251883Speter  esac
3310298161Sbaptelif test yes = "$with_gnu_ld"; then
3311251883Speter  AC_MSG_CHECKING([for GNU ld])
3312251883Speterelse
3313251883Speter  AC_MSG_CHECKING([for non-GNU ld])
3314251883Speterfi
3315251883SpeterAC_CACHE_VAL(lt_cv_path_LD,
3316251883Speter[if test -z "$LD"; then
3317298161Sbapt  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3318251883Speter  for ac_dir in $PATH; do
3319298161Sbapt    IFS=$lt_save_ifs
3320251883Speter    test -z "$ac_dir" && ac_dir=.
3321251883Speter    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3322298161Sbapt      lt_cv_path_LD=$ac_dir/$ac_prog
3323251883Speter      # Check to see if the program is GNU ld.  I'd rather use --version,
3324251883Speter      # but apparently some variants of GNU ld only accept -v.
3325251883Speter      # Break only if it was the GNU/non-GNU ld that we prefer.
3326251883Speter      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3327251883Speter      *GNU* | *'with BFD'*)
3328298161Sbapt	test no != "$with_gnu_ld" && break
3329251883Speter	;;
3330251883Speter      *)
3331298161Sbapt	test yes != "$with_gnu_ld" && break
3332251883Speter	;;
3333251883Speter      esac
3334251883Speter    fi
3335251883Speter  done
3336298161Sbapt  IFS=$lt_save_ifs
3337251883Speterelse
3338298161Sbapt  lt_cv_path_LD=$LD # Let the user override the test with a path.
3339251883Speterfi])
3340298161SbaptLD=$lt_cv_path_LD
3341251883Speterif test -n "$LD"; then
3342251883Speter  AC_MSG_RESULT($LD)
3343251883Speterelse
3344251883Speter  AC_MSG_RESULT(no)
3345251883Speterfi
3346251883Spetertest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3347269851Speter_LT_PATH_LD_GNU
3348269851SpeterAC_SUBST([LD])
3349251883Speter
3350269851Speter_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3351269851Speter])# LT_PATH_LD
3352251883Speter
3353269851Speter# Old names:
3354269851SpeterAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3355269851SpeterAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3356269851Speterdnl aclocal-1.4 backwards compatibility:
3357269851Speterdnl AC_DEFUN([AM_PROG_LD], [])
3358269851Speterdnl AC_DEFUN([AC_PROG_LD], [])
3359269851Speter
3360269851Speter
3361269851Speter# _LT_PATH_LD_GNU
3362269851Speter#- --------------
3363269851Speterm4_defun([_LT_PATH_LD_GNU],
3364269851Speter[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3365251883Speter[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3366251883Spetercase `$LD -v 2>&1 </dev/null` in
3367251883Speter*GNU* | *'with BFD'*)
3368251883Speter  lt_cv_prog_gnu_ld=yes
3369251883Speter  ;;
3370251883Speter*)
3371251883Speter  lt_cv_prog_gnu_ld=no
3372251883Speter  ;;
3373251883Speteresac])
3374251883Speterwith_gnu_ld=$lt_cv_prog_gnu_ld
3375269851Speter])# _LT_PATH_LD_GNU
3376251883Speter
3377251883Speter
3378269851Speter# _LT_CMD_RELOAD
3379269851Speter# --------------
3380251883Speter# find reload flag for linker
3381251883Speter#   -- PORTME Some linkers may need a different reload flag.
3382269851Speterm4_defun([_LT_CMD_RELOAD],
3383251883Speter[AC_CACHE_CHECK([for $LD option to reload object files],
3384251883Speter  lt_cv_ld_reload_flag,
3385251883Speter  [lt_cv_ld_reload_flag='-r'])
3386251883Speterreload_flag=$lt_cv_ld_reload_flag
3387251883Spetercase $reload_flag in
3388251883Speter"" | " "*) ;;
3389251883Speter*) reload_flag=" $reload_flag" ;;
3390251883Speteresac
3391251883Speterreload_cmds='$LD$reload_flag -o $output$reload_objs'
3392251883Spetercase $host_os in
3393269851Speter  cygwin* | mingw* | pw32* | cegcc*)
3394298161Sbapt    if test yes != "$GCC"; then
3395269851Speter      reload_cmds=false
3396269851Speter    fi
3397269851Speter    ;;
3398251883Speter  darwin*)
3399298161Sbapt    if test yes = "$GCC"; then
3400298161Sbapt      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3401251883Speter    else
3402251883Speter      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3403251883Speter    fi
3404251883Speter    ;;
3405251883Speteresac
3406269851Speter_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3407269851Speter_LT_TAGDECL([], [reload_cmds], [2])dnl
3408269851Speter])# _LT_CMD_RELOAD
3409251883Speter
3410251883Speter
3411298161Sbapt# _LT_PATH_DD
3412298161Sbapt# -----------
3413298161Sbapt# find a working dd
3414298161Sbaptm4_defun([_LT_PATH_DD],
3415298161Sbapt[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3416298161Sbapt[printf 0123456789abcdef0123456789abcdef >conftest.i
3417298161Sbaptcat conftest.i conftest.i >conftest2.i
3418298161Sbapt: ${lt_DD:=$DD}
3419298161SbaptAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3420298161Sbapt[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3421298161Sbapt  cmp -s conftest.i conftest.out \
3422298161Sbapt  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3423298161Sbaptfi])
3424298161Sbaptrm -f conftest.i conftest2.i conftest.out])
3425298161Sbapt])# _LT_PATH_DD
3426298161Sbapt
3427298161Sbapt
3428298161Sbapt# _LT_CMD_TRUNCATE
3429298161Sbapt# ----------------
3430298161Sbapt# find command to truncate a binary pipe
3431298161Sbaptm4_defun([_LT_CMD_TRUNCATE],
3432298161Sbapt[m4_require([_LT_PATH_DD])
3433298161SbaptAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3434298161Sbapt[printf 0123456789abcdef0123456789abcdef >conftest.i
3435298161Sbaptcat conftest.i conftest.i >conftest2.i
3436298161Sbaptlt_cv_truncate_bin=
3437298161Sbaptif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3438298161Sbapt  cmp -s conftest.i conftest.out \
3439298161Sbapt  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3440298161Sbaptfi
3441298161Sbaptrm -f conftest.i conftest2.i conftest.out
3442298161Sbapttest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3443298161Sbapt_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3444298161Sbapt  [Command to truncate a binary pipe])
3445298161Sbapt])# _LT_CMD_TRUNCATE
3446298161Sbapt
3447298161Sbapt
3448269851Speter# _LT_CHECK_MAGIC_METHOD
3449269851Speter# ----------------------
3450251883Speter# how to check for library dependencies
3451251883Speter#  -- PORTME fill in with the dynamic library characteristics
3452269851Speterm4_defun([_LT_CHECK_MAGIC_METHOD],
3453269851Speter[m4_require([_LT_DECL_EGREP])
3454269851Speterm4_require([_LT_DECL_OBJDUMP])
3455269851SpeterAC_CACHE_CHECK([how to recognize dependent libraries],
3456251883Speterlt_cv_deplibs_check_method,
3457251883Speter[lt_cv_file_magic_cmd='$MAGIC_CMD'
3458251883Speterlt_cv_file_magic_test_file=
3459251883Speterlt_cv_deplibs_check_method='unknown'
3460251883Speter# Need to set the preceding variable on all platforms that support
3461251883Speter# interlibrary dependencies.
3462251883Speter# 'none' -- dependencies not supported.
3463298161Sbapt# 'unknown' -- same as none, but documents that we really don't know.
3464251883Speter# 'pass_all' -- all dependencies passed with no checks.
3465251883Speter# 'test_compile' -- check by making test program.
3466251883Speter# 'file_magic [[regex]]' -- check by looking for files in library path
3467298161Sbapt# that responds to the $file_magic_cmd with a given extended regex.
3468298161Sbapt# If you have 'file' or equivalent on your system and you're not sure
3469298161Sbapt# whether 'pass_all' will *always* work, you probably want this one.
3470251883Speter
3471251883Spetercase $host_os in
3472269851Speteraix[[4-9]]*)
3473251883Speter  lt_cv_deplibs_check_method=pass_all
3474251883Speter  ;;
3475251883Speter
3476251883Speterbeos*)
3477251883Speter  lt_cv_deplibs_check_method=pass_all
3478251883Speter  ;;
3479251883Speter
3480251883Speterbsdi[[45]]*)
3481251883Speter  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3482251883Speter  lt_cv_file_magic_cmd='/usr/bin/file -L'
3483251883Speter  lt_cv_file_magic_test_file=/shlib/libc.so
3484251883Speter  ;;
3485251883Speter
3486251883Spetercygwin*)
3487251883Speter  # func_win32_libid is a shell function defined in ltmain.sh
3488251883Speter  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3489251883Speter  lt_cv_file_magic_cmd='func_win32_libid'
3490251883Speter  ;;
3491251883Speter
3492251883Spetermingw* | pw32*)
3493251883Speter  # Base MSYS/MinGW do not provide the 'file' command needed by
3494269851Speter  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3495269851Speter  # unless we find 'file', for example because we are cross-compiling.
3496298161Sbapt  if ( file / ) >/dev/null 2>&1; then
3497269851Speter    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3498269851Speter    lt_cv_file_magic_cmd='func_win32_libid'
3499269851Speter  else
3500269851Speter    # Keep this pattern in sync with the one in func_win32_libid.
3501269851Speter    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3502269851Speter    lt_cv_file_magic_cmd='$OBJDUMP -f'
3503269851Speter  fi
3504269851Speter  ;;
3505269851Speter
3506269851Spetercegcc*)
3507269851Speter  # use the weaker test based on 'objdump'. See mingw*.
3508269851Speter  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3509251883Speter  lt_cv_file_magic_cmd='$OBJDUMP -f'
3510251883Speter  ;;
3511251883Speter
3512251883Speterdarwin* | rhapsody*)
3513251883Speter  lt_cv_deplibs_check_method=pass_all
3514251883Speter  ;;
3515251883Speter
3516269851Speterfreebsd* | dragonfly*)
3517269851Speter  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3518251883Speter    case $host_cpu in
3519251883Speter    i*86 )
3520251883Speter      # Not sure whether the presence of OpenBSD here was a mistake.
3521251883Speter      # Let's accept both of them until this is cleared up.
3522251883Speter      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3523251883Speter      lt_cv_file_magic_cmd=/usr/bin/file
3524251883Speter      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3525251883Speter      ;;
3526251883Speter    esac
3527251883Speter  else
3528251883Speter    lt_cv_deplibs_check_method=pass_all
3529251883Speter  fi
3530251883Speter  ;;
3531251883Speter
3532269851Speterhaiku*)
3533269851Speter  lt_cv_deplibs_check_method=pass_all
3534269851Speter  ;;
3535269851Speter
3536251883Speterhpux10.20* | hpux11*)
3537251883Speter  lt_cv_file_magic_cmd=/usr/bin/file
3538251883Speter  case $host_cpu in
3539251883Speter  ia64*)
3540251883Speter    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3541251883Speter    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3542251883Speter    ;;
3543251883Speter  hppa*64*)
3544269851Speter    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
3545251883Speter    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3546251883Speter    ;;
3547251883Speter  *)
3548269851Speter    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3549251883Speter    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3550251883Speter    ;;
3551251883Speter  esac
3552251883Speter  ;;
3553251883Speter
3554269851Speterinterix[[3-9]]*)
3555251883Speter  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3556251883Speter  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3557251883Speter  ;;
3558251883Speter
3559251883Speteririx5* | irix6* | nonstopux*)
3560251883Speter  case $LD in
3561251883Speter  *-32|*"-32 ") libmagic=32-bit;;
3562251883Speter  *-n32|*"-n32 ") libmagic=N32;;
3563251883Speter  *-64|*"-64 ") libmagic=64-bit;;
3564251883Speter  *) libmagic=never-match;;
3565251883Speter  esac
3566251883Speter  lt_cv_deplibs_check_method=pass_all
3567251883Speter  ;;
3568251883Speter
3569269851Speter# This must be glibc/ELF.
3570298161Sbaptlinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3571251883Speter  lt_cv_deplibs_check_method=pass_all
3572251883Speter  ;;
3573251883Speter
3574346442Scynetbsd* | netbsdelf*-gnu)
3575269851Speter  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3576251883Speter    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3577251883Speter  else
3578251883Speter    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3579251883Speter  fi
3580251883Speter  ;;
3581251883Speter
3582251883Speternewos6*)
3583251883Speter  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3584251883Speter  lt_cv_file_magic_cmd=/usr/bin/file
3585251883Speter  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3586251883Speter  ;;
3587251883Speter
3588269851Speter*nto* | *qnx*)
3589269851Speter  lt_cv_deplibs_check_method=pass_all
3590251883Speter  ;;
3591251883Speter
3592298161Sbaptopenbsd* | bitrig*)
3593298161Sbapt  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3594251883Speter    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3595251883Speter  else
3596251883Speter    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3597251883Speter  fi
3598251883Speter  ;;
3599251883Speter
3600251883Speterosf3* | osf4* | osf5*)
3601251883Speter  lt_cv_deplibs_check_method=pass_all
3602251883Speter  ;;
3603251883Speter
3604269851Speterrdos*)
3605269851Speter  lt_cv_deplibs_check_method=pass_all
3606269851Speter  ;;
3607269851Speter
3608251883Spetersolaris*)
3609251883Speter  lt_cv_deplibs_check_method=pass_all
3610251883Speter  ;;
3611251883Speter
3612269851Spetersysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3613269851Speter  lt_cv_deplibs_check_method=pass_all
3614269851Speter  ;;
3615269851Speter
3616251883Spetersysv4 | sysv4.3*)
3617251883Speter  case $host_vendor in
3618251883Speter  motorola)
3619251883Speter    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]]'
3620251883Speter    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3621251883Speter    ;;
3622251883Speter  ncr)
3623251883Speter    lt_cv_deplibs_check_method=pass_all
3624251883Speter    ;;
3625251883Speter  sequent)
3626251883Speter    lt_cv_file_magic_cmd='/bin/file'
3627251883Speter    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3628251883Speter    ;;
3629251883Speter  sni)
3630251883Speter    lt_cv_file_magic_cmd='/bin/file'
3631251883Speter    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3632251883Speter    lt_cv_file_magic_test_file=/lib/libc.so
3633251883Speter    ;;
3634251883Speter  siemens)
3635251883Speter    lt_cv_deplibs_check_method=pass_all
3636251883Speter    ;;
3637251883Speter  pc)
3638251883Speter    lt_cv_deplibs_check_method=pass_all
3639251883Speter    ;;
3640251883Speter  esac
3641251883Speter  ;;
3642251883Speter
3643269851Spetertpf*)
3644251883Speter  lt_cv_deplibs_check_method=pass_all
3645251883Speter  ;;
3646298161Sbaptos2*)
3647298161Sbapt  lt_cv_deplibs_check_method=pass_all
3648298161Sbapt  ;;
3649251883Speteresac
3650251883Speter])
3651269851Speter
3652269851Speterfile_magic_glob=
3653269851Speterwant_nocaseglob=no
3654269851Speterif test "$build" = "$host"; then
3655269851Speter  case $host_os in
3656269851Speter  mingw* | pw32*)
3657269851Speter    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3658269851Speter      want_nocaseglob=yes
3659269851Speter    else
3660269851Speter      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3661269851Speter    fi
3662269851Speter    ;;
3663269851Speter  esac
3664269851Speterfi
3665269851Speter
3666251883Speterfile_magic_cmd=$lt_cv_file_magic_cmd
3667251883Speterdeplibs_check_method=$lt_cv_deplibs_check_method
3668251883Spetertest -z "$deplibs_check_method" && deplibs_check_method=unknown
3669251883Speter
3670269851Speter_LT_DECL([], [deplibs_check_method], [1],
3671269851Speter    [Method to check whether dependent libraries are shared objects])
3672269851Speter_LT_DECL([], [file_magic_cmd], [1],
3673269851Speter    [Command to use when deplibs_check_method = "file_magic"])
3674269851Speter_LT_DECL([], [file_magic_glob], [1],
3675269851Speter    [How to find potential files when deplibs_check_method = "file_magic"])
3676269851Speter_LT_DECL([], [want_nocaseglob], [1],
3677269851Speter    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3678269851Speter])# _LT_CHECK_MAGIC_METHOD
3679251883Speter
3680269851Speter
3681269851Speter# LT_PATH_NM
3682251883Speter# ----------
3683269851Speter# find the pathname to a BSD- or MS-compatible name lister
3684269851SpeterAC_DEFUN([LT_PATH_NM],
3685269851Speter[AC_REQUIRE([AC_PROG_CC])dnl
3686269851SpeterAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3687251883Speter[if test -n "$NM"; then
3688251883Speter  # Let the user override the test.
3689298161Sbapt  lt_cv_path_NM=$NM
3690251883Speterelse
3691298161Sbapt  lt_nm_to_check=${ac_tool_prefix}nm
3692269851Speter  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3693251883Speter    lt_nm_to_check="$lt_nm_to_check nm"
3694251883Speter  fi
3695251883Speter  for lt_tmp_nm in $lt_nm_to_check; do
3696298161Sbapt    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3697251883Speter    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3698298161Sbapt      IFS=$lt_save_ifs
3699251883Speter      test -z "$ac_dir" && ac_dir=.
3700298161Sbapt      tmp_nm=$ac_dir/$lt_tmp_nm
3701298161Sbapt      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3702251883Speter	# Check to see if the nm accepts a BSD-compat flag.
3703298161Sbapt	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3704251883Speter	#   nm: unknown option "B" ignored
3705251883Speter	# Tru64's nm complains that /dev/null is an invalid object file
3706298161Sbapt	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3707298161Sbapt	case $build_os in
3708298161Sbapt	mingw*) lt_bad_file=conftest.nm/nofile ;;
3709298161Sbapt	*) lt_bad_file=/dev/null ;;
3710298161Sbapt	esac
3711298161Sbapt	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3712298161Sbapt	*$lt_bad_file* | *'Invalid file or object type'*)
3713251883Speter	  lt_cv_path_NM="$tmp_nm -B"
3714298161Sbapt	  break 2
3715251883Speter	  ;;
3716251883Speter	*)
3717251883Speter	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3718251883Speter	  */dev/null*)
3719251883Speter	    lt_cv_path_NM="$tmp_nm -p"
3720298161Sbapt	    break 2
3721251883Speter	    ;;
3722251883Speter	  *)
3723251883Speter	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3724251883Speter	    continue # so that we can try to find one that supports BSD flags
3725251883Speter	    ;;
3726251883Speter	  esac
3727251883Speter	  ;;
3728251883Speter	esac
3729251883Speter      fi
3730251883Speter    done
3731298161Sbapt    IFS=$lt_save_ifs
3732251883Speter  done
3733269851Speter  : ${lt_cv_path_NM=no}
3734251883Speterfi])
3735298161Sbaptif test no != "$lt_cv_path_NM"; then
3736298161Sbapt  NM=$lt_cv_path_NM
3737269851Speterelse
3738269851Speter  # Didn't find any BSD compatible name lister, look for dumpbin.
3739269851Speter  if test -n "$DUMPBIN"; then :
3740269851Speter    # Let the user override the test.
3741251883Speter  else
3742269851Speter    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3743298161Sbapt    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
3744269851Speter    *COFF*)
3745298161Sbapt      DUMPBIN="$DUMPBIN -symbols -headers"
3746269851Speter      ;;
3747269851Speter    *)
3748269851Speter      DUMPBIN=:
3749269851Speter      ;;
3750269851Speter    esac
3751251883Speter  fi
3752269851Speter  AC_SUBST([DUMPBIN])
3753298161Sbapt  if test : != "$DUMPBIN"; then
3754298161Sbapt    NM=$DUMPBIN
3755251883Speter  fi
3756251883Speterfi
3757269851Spetertest -z "$NM" && NM=nm
3758269851SpeterAC_SUBST([NM])
3759269851Speter_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3760251883Speter
3761269851SpeterAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3762269851Speter  [lt_cv_nm_interface="BSD nm"
3763269851Speter  echo "int some_variable = 0;" > conftest.$ac_ext
3764269851Speter  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3765269851Speter  (eval "$ac_compile" 2>conftest.err)
3766269851Speter  cat conftest.err >&AS_MESSAGE_LOG_FD
3767269851Speter  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3768269851Speter  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3769269851Speter  cat conftest.err >&AS_MESSAGE_LOG_FD
3770269851Speter  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3771269851Speter  cat conftest.out >&AS_MESSAGE_LOG_FD
3772269851Speter  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3773269851Speter    lt_cv_nm_interface="MS dumpbin"
3774251883Speter  fi
3775269851Speter  rm -f conftest*])
3776269851Speter])# LT_PATH_NM
3777251883Speter
3778269851Speter# Old names:
3779269851SpeterAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3780269851SpeterAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3781269851Speterdnl aclocal-1.4 backwards compatibility:
3782269851Speterdnl AC_DEFUN([AM_PROG_NM], [])
3783269851Speterdnl AC_DEFUN([AC_PROG_NM], [])
3784251883Speter
3785269851Speter# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3786269851Speter# --------------------------------
3787269851Speter# how to determine the name of the shared library
3788269851Speter# associated with a specific link library.
3789269851Speter#  -- PORTME fill in with the dynamic library characteristics
3790269851Speterm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3791269851Speter[m4_require([_LT_DECL_EGREP])
3792269851Speterm4_require([_LT_DECL_OBJDUMP])
3793269851Speterm4_require([_LT_DECL_DLLTOOL])
3794269851SpeterAC_CACHE_CHECK([how to associate runtime and link libraries],
3795269851Speterlt_cv_sharedlib_from_linklib_cmd,
3796269851Speter[lt_cv_sharedlib_from_linklib_cmd='unknown'
3797251883Speter
3798251883Spetercase $host_os in
3799269851Spetercygwin* | mingw* | pw32* | cegcc*)
3800298161Sbapt  # two different shell functions defined in ltmain.sh;
3801298161Sbapt  # decide which one to use based on capabilities of $DLLTOOL
3802269851Speter  case `$DLLTOOL --help 2>&1` in
3803269851Speter  *--identify-strict*)
3804269851Speter    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3805251883Speter    ;;
3806269851Speter  *)
3807269851Speter    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3808251883Speter    ;;
3809269851Speter  esac
3810251883Speter  ;;
3811269851Speter*)
3812269851Speter  # fallback: assume linklib IS sharedlib
3813298161Sbapt  lt_cv_sharedlib_from_linklib_cmd=$ECHO
3814269851Speter  ;;
3815251883Speteresac
3816251883Speter])
3817269851Spetersharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3818269851Spetertest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3819251883Speter
3820269851Speter_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3821269851Speter    [Command to associate shared and link libraries])
3822269851Speter])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3823251883Speter
3824251883Speter
3825269851Speter# _LT_PATH_MANIFEST_TOOL
3826269851Speter# ----------------------
3827269851Speter# locate the manifest tool
3828269851Speterm4_defun([_LT_PATH_MANIFEST_TOOL],
3829269851Speter[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3830269851Spetertest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3831269851SpeterAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3832269851Speter  [lt_cv_path_mainfest_tool=no
3833269851Speter  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3834269851Speter  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3835269851Speter  cat conftest.err >&AS_MESSAGE_LOG_FD
3836269851Speter  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3837269851Speter    lt_cv_path_mainfest_tool=yes
3838269851Speter  fi
3839269851Speter  rm -f conftest*])
3840298161Sbaptif test yes != "$lt_cv_path_mainfest_tool"; then
3841269851Speter  MANIFEST_TOOL=:
3842251883Speterfi
3843269851Speter_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3844269851Speter])# _LT_PATH_MANIFEST_TOOL
3845251883Speter
3846251883Speter
3847298161Sbapt# _LT_DLL_DEF_P([FILE])
3848298161Sbapt# ---------------------
3849298161Sbapt# True iff FILE is a Windows DLL '.def' file.
3850298161Sbapt# Keep in sync with func_dll_def_p in the libtool script
3851298161SbaptAC_DEFUN([_LT_DLL_DEF_P],
3852298161Sbapt[dnl
3853298161Sbapt  test DEF = "`$SED -n dnl
3854298161Sbapt    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
3855298161Sbapt    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
3856298161Sbapt    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
3857298161Sbapt    -e q dnl                          Only consider the first "real" line
3858298161Sbapt    $1`" dnl
3859298161Sbapt])# _LT_DLL_DEF_P
3860298161Sbapt
3861298161Sbapt
3862269851Speter# LT_LIB_M
3863269851Speter# --------
3864269851Speter# check for math library
3865269851SpeterAC_DEFUN([LT_LIB_M],
3866269851Speter[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3867269851SpeterLIBM=
3868269851Spetercase $host in
3869269851Speter*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3870269851Speter  # These system don't have libm, or don't need it
3871251883Speter  ;;
3872269851Speter*-ncr-sysv4.3*)
3873298161Sbapt  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
3874269851Speter  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3875251883Speter  ;;
3876269851Speter*)
3877298161Sbapt  AC_CHECK_LIB(m, cos, LIBM=-lm)
3878251883Speter  ;;
3879251883Speteresac
3880269851SpeterAC_SUBST([LIBM])
3881269851Speter])# LT_LIB_M
3882251883Speter
3883269851Speter# Old name:
3884269851SpeterAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3885269851Speterdnl aclocal-1.4 backwards compatibility:
3886269851Speterdnl AC_DEFUN([AC_CHECK_LIBM], [])
3887251883Speter
3888251883Speter
3889269851Speter# _LT_COMPILER_NO_RTTI([TAGNAME])
3890269851Speter# -------------------------------
3891269851Speterm4_defun([_LT_COMPILER_NO_RTTI],
3892269851Speter[m4_require([_LT_TAG_COMPILER])dnl
3893251883Speter
3894269851Speter_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3895251883Speter
3896298161Sbaptif test yes = "$GCC"; then
3897269851Speter  case $cc_basename in
3898269851Speter  nvcc*)
3899269851Speter    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3900269851Speter  *)
3901269851Speter    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3902251883Speter  esac
3903251883Speter
3904269851Speter  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3905251883Speter    lt_cv_prog_compiler_rtti_exceptions,
3906251883Speter    [-fno-rtti -fno-exceptions], [],
3907269851Speter    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3908251883Speterfi
3909269851Speter_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3910269851Speter	[Compiler flag to turn off builtin functions])
3911269851Speter])# _LT_COMPILER_NO_RTTI
3912251883Speter
3913251883Speter
3914269851Speter# _LT_CMD_GLOBAL_SYMBOLS
3915269851Speter# ----------------------
3916269851Speterm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3917269851Speter[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3918269851SpeterAC_REQUIRE([AC_PROG_CC])dnl
3919269851SpeterAC_REQUIRE([AC_PROG_AWK])dnl
3920269851SpeterAC_REQUIRE([LT_PATH_NM])dnl
3921269851SpeterAC_REQUIRE([LT_PATH_LD])dnl
3922269851Speterm4_require([_LT_DECL_SED])dnl
3923269851Speterm4_require([_LT_DECL_EGREP])dnl
3924269851Speterm4_require([_LT_TAG_COMPILER])dnl
3925269851Speter
3926251883Speter# Check for command to grab the raw symbol name followed by C symbol from nm.
3927251883SpeterAC_MSG_CHECKING([command to parse $NM output from $compiler object])
3928251883SpeterAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3929251883Speter[
3930251883Speter# These are sane defaults that work on at least a few old systems.
3931251883Speter# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3932251883Speter
3933251883Speter# Character class describing NM global symbol codes.
3934251883Spetersymcode='[[BCDEGRST]]'
3935251883Speter
3936251883Speter# Regexp to match symbols that can be accessed directly from C.
3937251883Spetersympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3938251883Speter
3939251883Speter# Define system-specific variables.
3940251883Spetercase $host_os in
3941251883Speteraix*)
3942251883Speter  symcode='[[BCDT]]'
3943251883Speter  ;;
3944269851Spetercygwin* | mingw* | pw32* | cegcc*)
3945251883Speter  symcode='[[ABCDGISTW]]'
3946251883Speter  ;;
3947269851Speterhpux*)
3948298161Sbapt  if test ia64 = "$host_cpu"; then
3949251883Speter    symcode='[[ABCDEGRST]]'
3950251883Speter  fi
3951251883Speter  ;;
3952251883Speteririx* | nonstopux*)
3953251883Speter  symcode='[[BCDEGRST]]'
3954251883Speter  ;;
3955251883Speterosf*)
3956251883Speter  symcode='[[BCDEGQRST]]'
3957251883Speter  ;;
3958251883Spetersolaris*)
3959251883Speter  symcode='[[BDRT]]'
3960251883Speter  ;;
3961251883Spetersco3.2v5*)
3962251883Speter  symcode='[[DT]]'
3963251883Speter  ;;
3964251883Spetersysv4.2uw2*)
3965251883Speter  symcode='[[DT]]'
3966251883Speter  ;;
3967251883Spetersysv5* | sco5v6* | unixware* | OpenUNIX*)
3968251883Speter  symcode='[[ABDT]]'
3969251883Speter  ;;
3970251883Spetersysv4)
3971251883Speter  symcode='[[DFNSTU]]'
3972251883Speter  ;;
3973251883Speteresac
3974251883Speter
3975269851Speter# If we're using GNU nm, then use its standard symbol codes.
3976269851Spetercase `$NM -V 2>&1` in
3977269851Speter*GNU* | *'with BFD'*)
3978269851Speter  symcode='[[ABCDGIRSTW]]' ;;
3979269851Speteresac
3980269851Speter
3981298161Sbaptif test "$lt_cv_nm_interface" = "MS dumpbin"; then
3982298161Sbapt  # Gets list of data symbols to import.
3983298161Sbapt  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
3984298161Sbapt  # Adjust the below global symbol transforms to fixup imported variables.
3985298161Sbapt  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
3986298161Sbapt  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
3987298161Sbapt  lt_c_name_lib_hook="\
3988298161Sbapt  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
3989298161Sbapt  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
3990298161Sbaptelse
3991298161Sbapt  # Disable hooks by default.
3992298161Sbapt  lt_cv_sys_global_symbol_to_import=
3993298161Sbapt  lt_cdecl_hook=
3994298161Sbapt  lt_c_name_hook=
3995298161Sbapt  lt_c_name_lib_hook=
3996298161Sbaptfi
3997298161Sbapt
3998269851Speter# Transform an extracted symbol line into a proper C declaration.
3999269851Speter# Some systems (esp. on ia64) link data and code symbols differently,
4000269851Speter# so use this general approach.
4001298161Sbaptlt_cv_sys_global_symbol_to_cdecl="sed -n"\
4002298161Sbapt$lt_cdecl_hook\
4003298161Sbapt" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
4004298161Sbapt" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
4005269851Speter
4006269851Speter# Transform an extracted symbol line into symbol name and symbol address
4007298161Sbaptlt_cv_sys_global_symbol_to_c_name_address="sed -n"\
4008298161Sbapt$lt_c_name_hook\
4009298161Sbapt" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
4010298161Sbapt" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
4011269851Speter
4012298161Sbapt# Transform an extracted symbol line into symbol name with lib prefix and
4013298161Sbapt# symbol address.
4014298161Sbaptlt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
4015298161Sbapt$lt_c_name_lib_hook\
4016298161Sbapt" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
4017298161Sbapt" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
4018298161Sbapt" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
4019298161Sbapt
4020251883Speter# Handle CRLF in mingw tool chain
4021251883Speteropt_cr=
4022251883Spetercase $build_os in
4023251883Spetermingw*)
4024269851Speter  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4025251883Speter  ;;
4026251883Speteresac
4027251883Speter
4028269851Speter# Try without a prefix underscore, then with it.
4029251883Speterfor ac_symprfx in "" "_"; do
4030251883Speter
4031251883Speter  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4032251883Speter  symxfrm="\\1 $ac_symprfx\\2 \\2"
4033251883Speter
4034251883Speter  # Write the raw and C identifiers.
4035269851Speter  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4036298161Sbapt    # Fake it for dumpbin and say T for any non-static function,
4037298161Sbapt    # D for any global variable and I for any imported variable.
4038269851Speter    # Also find C++ and __fastcall symbols from MSVC++,
4039269851Speter    # which start with @ or ?.
4040269851Speter    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4041269851Speter"     {last_section=section; section=\$ 3};"\
4042269851Speter"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4043269851Speter"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4044298161Sbapt"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4045298161Sbapt"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4046298161Sbapt"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4047269851Speter"     \$ 0!~/External *\|/{next};"\
4048269851Speter"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4049269851Speter"     {if(hide[section]) next};"\
4050298161Sbapt"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4051298161Sbapt"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4052298161Sbapt"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4053298161Sbapt"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4054269851Speter"     ' prfx=^$ac_symprfx]"
4055269851Speter  else
4056269851Speter    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4057269851Speter  fi
4058269851Speter  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4059251883Speter
4060251883Speter  # Check to see that the pipe works correctly.
4061251883Speter  pipe_works=no
4062251883Speter
4063251883Speter  rm -f conftest*
4064269851Speter  cat > conftest.$ac_ext <<_LT_EOF
4065251883Speter#ifdef __cplusplus
4066251883Speterextern "C" {
4067251883Speter#endif
4068251883Speterchar nm_test_var;
4069269851Spetervoid nm_test_func(void);
4070269851Spetervoid nm_test_func(void){}
4071251883Speter#ifdef __cplusplus
4072251883Speter}
4073251883Speter#endif
4074251883Speterint main(){nm_test_var='a';nm_test_func();return(0);}
4075269851Speter_LT_EOF
4076251883Speter
4077251883Speter  if AC_TRY_EVAL(ac_compile); then
4078251883Speter    # Now try to grab the symbols.
4079251883Speter    nlist=conftest.nm
4080269851Speter    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4081251883Speter      # Try sorting and uniquifying the output.
4082251883Speter      if sort "$nlist" | uniq > "$nlist"T; then
4083251883Speter	mv -f "$nlist"T "$nlist"
4084251883Speter      else
4085251883Speter	rm -f "$nlist"T
4086251883Speter      fi
4087251883Speter
4088251883Speter      # Make sure that we snagged all the symbols we need.
4089269851Speter      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4090269851Speter	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4091269851Speter	  cat <<_LT_EOF > conftest.$ac_ext
4092269851Speter/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4093298161Sbapt#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4094298161Sbapt/* DATA imports from DLLs on WIN32 can't be const, because runtime
4095269851Speter   relocations are performed -- see ld's documentation on pseudo-relocs.  */
4096269851Speter# define LT@&t@_DLSYM_CONST
4097298161Sbapt#elif defined __osf__
4098269851Speter/* This system does not cope well with relocations in const data.  */
4099269851Speter# define LT@&t@_DLSYM_CONST
4100269851Speter#else
4101269851Speter# define LT@&t@_DLSYM_CONST const
4102269851Speter#endif
4103269851Speter
4104251883Speter#ifdef __cplusplus
4105251883Speterextern "C" {
4106251883Speter#endif
4107251883Speter
4108269851Speter_LT_EOF
4109251883Speter	  # Now generate the symbol file.
4110269851Speter	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4111251883Speter
4112269851Speter	  cat <<_LT_EOF >> conftest.$ac_ext
4113251883Speter
4114269851Speter/* The mapping between symbol names and symbols.  */
4115269851SpeterLT@&t@_DLSYM_CONST struct {
4116251883Speter  const char *name;
4117269851Speter  void       *address;
4118251883Speter}
4119269851Speterlt__PROGRAM__LTX_preloaded_symbols[[]] =
4120251883Speter{
4121269851Speter  { "@PROGRAM@", (void *) 0 },
4122269851Speter_LT_EOF
4123298161Sbapt	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4124269851Speter	  cat <<\_LT_EOF >> conftest.$ac_ext
4125269851Speter  {0, (void *) 0}
4126251883Speter};
4127251883Speter
4128269851Speter/* This works around a problem in FreeBSD linker */
4129269851Speter#ifdef FREEBSD_WORKAROUND
4130269851Speterstatic const void *lt_preloaded_setup() {
4131269851Speter  return lt__PROGRAM__LTX_preloaded_symbols;
4132269851Speter}
4133269851Speter#endif
4134269851Speter
4135251883Speter#ifdef __cplusplus
4136251883Speter}
4137251883Speter#endif
4138269851Speter_LT_EOF
4139251883Speter	  # Now try linking the two files.
4140251883Speter	  mv conftest.$ac_objext conftstm.$ac_objext
4141269851Speter	  lt_globsym_save_LIBS=$LIBS
4142269851Speter	  lt_globsym_save_CFLAGS=$CFLAGS
4143298161Sbapt	  LIBS=conftstm.$ac_objext
4144269851Speter	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4145298161Sbapt	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4146251883Speter	    pipe_works=yes
4147251883Speter	  fi
4148269851Speter	  LIBS=$lt_globsym_save_LIBS
4149269851Speter	  CFLAGS=$lt_globsym_save_CFLAGS
4150251883Speter	else
4151251883Speter	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4152251883Speter	fi
4153251883Speter      else
4154251883Speter	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4155251883Speter      fi
4156251883Speter    else
4157251883Speter      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4158251883Speter    fi
4159251883Speter  else
4160251883Speter    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4161251883Speter    cat conftest.$ac_ext >&5
4162251883Speter  fi
4163269851Speter  rm -rf conftest* conftst*
4164251883Speter
4165251883Speter  # Do not use the global_symbol_pipe unless it works.
4166298161Sbapt  if test yes = "$pipe_works"; then
4167251883Speter    break
4168251883Speter  else
4169251883Speter    lt_cv_sys_global_symbol_pipe=
4170251883Speter  fi
4171251883Speterdone
4172251883Speter])
4173251883Speterif test -z "$lt_cv_sys_global_symbol_pipe"; then
4174251883Speter  lt_cv_sys_global_symbol_to_cdecl=
4175251883Speterfi
4176251883Speterif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4177251883Speter  AC_MSG_RESULT(failed)
4178251883Speterelse
4179251883Speter  AC_MSG_RESULT(ok)
4180251883Speterfi
4181251883Speter
4182269851Speter# Response file support.
4183269851Speterif test "$lt_cv_nm_interface" = "MS dumpbin"; then
4184269851Speter  nm_file_list_spec='@'
4185269851Speterelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4186269851Speter  nm_file_list_spec='@'
4187269851Speterfi
4188251883Speter
4189269851Speter_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4190269851Speter    [Take the output of nm and produce a listing of raw symbols and C names])
4191269851Speter_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4192269851Speter    [Transform the output of nm in a proper C declaration])
4193298161Sbapt_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4194298161Sbapt    [Transform the output of nm into a list of symbols to manually relocate])
4195269851Speter_LT_DECL([global_symbol_to_c_name_address],
4196269851Speter    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4197269851Speter    [Transform the output of nm in a C name address pair])
4198269851Speter_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4199269851Speter    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4200269851Speter    [Transform the output of nm in a C name address pair when lib prefix is needed])
4201298161Sbapt_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4202298161Sbapt    [The name lister interface])
4203269851Speter_LT_DECL([], [nm_file_list_spec], [1],
4204269851Speter    [Specify filename containing input files for $NM])
4205269851Speter]) # _LT_CMD_GLOBAL_SYMBOLS
4206251883Speter
4207269851Speter
4208269851Speter# _LT_COMPILER_PIC([TAGNAME])
4209269851Speter# ---------------------------
4210269851Speterm4_defun([_LT_COMPILER_PIC],
4211269851Speter[m4_require([_LT_TAG_COMPILER])dnl
4212269851Speter_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4213269851Speter_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4214269851Speter_LT_TAGVAR(lt_prog_compiler_static, $1)=
4215269851Speter
4216269851Speterm4_if([$1], [CXX], [
4217251883Speter  # C++ specific cases for pic, static, wl, etc.
4218298161Sbapt  if test yes = "$GXX"; then
4219269851Speter    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4220269851Speter    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4221251883Speter
4222251883Speter    case $host_os in
4223251883Speter    aix*)
4224251883Speter      # All AIX code is PIC.
4225298161Sbapt      if test ia64 = "$host_cpu"; then
4226251883Speter	# AIX 5 now supports IA64 processor
4227269851Speter	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4228251883Speter      fi
4229298161Sbapt      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4230251883Speter      ;;
4231269851Speter
4232251883Speter    amigaos*)
4233269851Speter      case $host_cpu in
4234269851Speter      powerpc)
4235269851Speter            # see comment about AmigaOS4 .so support
4236269851Speter            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4237269851Speter        ;;
4238269851Speter      m68k)
4239269851Speter            # FIXME: we need at least 68020 code to build shared libraries, but
4240298161Sbapt            # adding the '-m68020' flag to GCC prevents building anything better,
4241298161Sbapt            # like '-m68040'.
4242269851Speter            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4243269851Speter        ;;
4244269851Speter      esac
4245251883Speter      ;;
4246269851Speter
4247269851Speter    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4248251883Speter      # PIC is the default for these OSes.
4249251883Speter      ;;
4250269851Speter    mingw* | cygwin* | os2* | pw32* | cegcc*)
4251251883Speter      # This hack is so that the source file can tell whether it is being
4252251883Speter      # built for inclusion in a dll (and should export symbols for example).
4253269851Speter      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4254269851Speter      # (--disable-auto-import) libraries
4255269851Speter      m4_if([$1], [GCJ], [],
4256269851Speter	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4257298161Sbapt      case $host_os in
4258298161Sbapt      os2*)
4259298161Sbapt	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4260298161Sbapt	;;
4261298161Sbapt      esac
4262251883Speter      ;;
4263251883Speter    darwin* | rhapsody*)
4264251883Speter      # PIC is the default on this platform
4265251883Speter      # Common symbols not allowed in MH_DYLIB files
4266269851Speter      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4267251883Speter      ;;
4268251883Speter    *djgpp*)
4269251883Speter      # DJGPP does not support shared libraries at all
4270269851Speter      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4271251883Speter      ;;
4272269851Speter    haiku*)
4273269851Speter      # PIC is the default for Haiku.
4274269851Speter      # The "-static" flag exists, but is broken.
4275269851Speter      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4276269851Speter      ;;
4277269851Speter    interix[[3-9]]*)
4278251883Speter      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4279251883Speter      # Instead, we relocate shared libraries at runtime.
4280251883Speter      ;;
4281251883Speter    sysv4*MP*)
4282251883Speter      if test -d /usr/nec; then
4283269851Speter	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4284251883Speter      fi
4285251883Speter      ;;
4286251883Speter    hpux*)
4287269851Speter      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4288269851Speter      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4289269851Speter      # sets the default TLS model and affects inlining.
4290251883Speter      case $host_cpu in
4291269851Speter      hppa*64*)
4292251883Speter	;;
4293251883Speter      *)
4294269851Speter	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4295251883Speter	;;
4296251883Speter      esac
4297251883Speter      ;;
4298269851Speter    *qnx* | *nto*)
4299269851Speter      # QNX uses GNU C++, but need to define -shared option too, otherwise
4300269851Speter      # it will coredump.
4301269851Speter      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4302269851Speter      ;;
4303251883Speter    *)
4304269851Speter      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4305251883Speter      ;;
4306251883Speter    esac
4307251883Speter  else
4308251883Speter    case $host_os in
4309269851Speter      aix[[4-9]]*)
4310251883Speter	# All AIX code is PIC.
4311298161Sbapt	if test ia64 = "$host_cpu"; then
4312251883Speter	  # AIX 5 now supports IA64 processor
4313269851Speter	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4314251883Speter	else
4315269851Speter	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4316251883Speter	fi
4317251883Speter	;;
4318251883Speter      chorus*)
4319251883Speter	case $cc_basename in
4320251883Speter	cxch68*)
4321251883Speter	  # Green Hills C++ Compiler
4322269851Speter	  # _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"
4323251883Speter	  ;;
4324251883Speter	esac
4325251883Speter	;;
4326269851Speter      mingw* | cygwin* | os2* | pw32* | cegcc*)
4327269851Speter	# This hack is so that the source file can tell whether it is being
4328269851Speter	# built for inclusion in a dll (and should export symbols for example).
4329269851Speter	m4_if([$1], [GCJ], [],
4330269851Speter	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4331269851Speter	;;
4332251883Speter      dgux*)
4333251883Speter	case $cc_basename in
4334251883Speter	  ec++*)
4335269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4336251883Speter	    ;;
4337251883Speter	  ghcx*)
4338251883Speter	    # Green Hills C++ Compiler
4339269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4340251883Speter	    ;;
4341251883Speter	  *)
4342251883Speter	    ;;
4343251883Speter	esac
4344251883Speter	;;
4345269851Speter      freebsd* | dragonfly*)
4346251883Speter	# FreeBSD uses GNU C++
4347251883Speter	;;
4348251883Speter      hpux9* | hpux10* | hpux11*)
4349251883Speter	case $cc_basename in
4350251883Speter	  CC*)
4351269851Speter	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4352298161Sbapt	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4353298161Sbapt	    if test ia64 != "$host_cpu"; then
4354269851Speter	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4355251883Speter	    fi
4356251883Speter	    ;;
4357251883Speter	  aCC*)
4358269851Speter	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4359298161Sbapt	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4360251883Speter	    case $host_cpu in
4361251883Speter	    hppa*64*|ia64*)
4362251883Speter	      # +Z the default
4363251883Speter	      ;;
4364251883Speter	    *)
4365269851Speter	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4366251883Speter	      ;;
4367251883Speter	    esac
4368251883Speter	    ;;
4369251883Speter	  *)
4370251883Speter	    ;;
4371251883Speter	esac
4372251883Speter	;;
4373251883Speter      interix*)
4374251883Speter	# This is c89, which is MS Visual C++ (no shared libs)
4375251883Speter	# Anyone wants to do a port?
4376251883Speter	;;
4377251883Speter      irix5* | irix6* | nonstopux*)
4378251883Speter	case $cc_basename in
4379251883Speter	  CC*)
4380269851Speter	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4381269851Speter	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4382251883Speter	    # CC pic flag -KPIC is the default.
4383251883Speter	    ;;
4384251883Speter	  *)
4385251883Speter	    ;;
4386251883Speter	esac
4387251883Speter	;;
4388298161Sbapt      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4389251883Speter	case $cc_basename in
4390251883Speter	  KCC*)
4391251883Speter	    # KAI C++ Compiler
4392269851Speter	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4393269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4394251883Speter	    ;;
4395269851Speter	  ecpc* )
4396298161Sbapt	    # old Intel C++ for x86_64, which still supported -KPIC.
4397269851Speter	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4398269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4399269851Speter	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4400251883Speter	    ;;
4401269851Speter	  icpc* )
4402269851Speter	    # Intel C++, used to be incompatible with GCC.
4403269851Speter	    # ICC 10 doesn't accept -KPIC any more.
4404269851Speter	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4405269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4406269851Speter	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4407251883Speter	    ;;
4408269851Speter	  pgCC* | pgcpp*)
4409269851Speter	    # Portland Group C++ compiler
4410269851Speter	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4411269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4412269851Speter	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4413269851Speter	    ;;
4414251883Speter	  cxx*)
4415251883Speter	    # Compaq C++
4416251883Speter	    # Make sure the PIC flag is empty.  It appears that all Alpha
4417251883Speter	    # Linux and Compaq Tru64 Unix objects are PIC.
4418269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4419269851Speter	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4420251883Speter	    ;;
4421269851Speter	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4422269851Speter	    # IBM XL 8.0, 9.0 on PPC and BlueGene
4423269851Speter	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4424269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4425269851Speter	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4426269851Speter	    ;;
4427251883Speter	  *)
4428269851Speter	    case `$CC -V 2>&1 | sed 5q` in
4429269851Speter	    *Sun\ C*)
4430269851Speter	      # Sun C++ 5.9
4431269851Speter	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4432269851Speter	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4433269851Speter	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4434269851Speter	      ;;
4435269851Speter	    esac
4436251883Speter	    ;;
4437251883Speter	esac
4438251883Speter	;;
4439251883Speter      lynxos*)
4440251883Speter	;;
4441251883Speter      m88k*)
4442251883Speter	;;
4443251883Speter      mvs*)
4444251883Speter	case $cc_basename in
4445251883Speter	  cxx*)
4446269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4447251883Speter	    ;;
4448251883Speter	  *)
4449251883Speter	    ;;
4450251883Speter	esac
4451251883Speter	;;
4452346442Scy      netbsd* | netbsdelf*-gnu)
4453251883Speter	;;
4454269851Speter      *qnx* | *nto*)
4455269851Speter        # QNX uses GNU C++, but need to define -shared option too, otherwise
4456269851Speter        # it will coredump.
4457269851Speter        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4458269851Speter        ;;
4459251883Speter      osf3* | osf4* | osf5*)
4460251883Speter	case $cc_basename in
4461251883Speter	  KCC*)
4462269851Speter	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4463251883Speter	    ;;
4464251883Speter	  RCC*)
4465251883Speter	    # Rational C++ 2.4.1
4466269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4467251883Speter	    ;;
4468251883Speter	  cxx*)
4469251883Speter	    # Digital/Compaq C++
4470269851Speter	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4471251883Speter	    # Make sure the PIC flag is empty.  It appears that all Alpha
4472251883Speter	    # Linux and Compaq Tru64 Unix objects are PIC.
4473269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4474269851Speter	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4475251883Speter	    ;;
4476251883Speter	  *)
4477251883Speter	    ;;
4478251883Speter	esac
4479251883Speter	;;
4480251883Speter      psos*)
4481251883Speter	;;
4482251883Speter      solaris*)
4483251883Speter	case $cc_basename in
4484269851Speter	  CC* | sunCC*)
4485251883Speter	    # Sun C++ 4.2, 5.x and Centerline C++
4486269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4487269851Speter	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4488269851Speter	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4489251883Speter	    ;;
4490251883Speter	  gcx*)
4491251883Speter	    # Green Hills C++ Compiler
4492269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4493251883Speter	    ;;
4494251883Speter	  *)
4495251883Speter	    ;;
4496251883Speter	esac
4497251883Speter	;;
4498251883Speter      sunos4*)
4499251883Speter	case $cc_basename in
4500251883Speter	  CC*)
4501251883Speter	    # Sun C++ 4.x
4502269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4503269851Speter	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4504251883Speter	    ;;
4505251883Speter	  lcc*)
4506251883Speter	    # Lucid
4507269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4508251883Speter	    ;;
4509251883Speter	  *)
4510251883Speter	    ;;
4511251883Speter	esac
4512251883Speter	;;
4513269851Speter      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4514269851Speter	case $cc_basename in
4515269851Speter	  CC*)
4516269851Speter	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4517269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4518269851Speter	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4519269851Speter	    ;;
4520269851Speter	esac
4521269851Speter	;;
4522251883Speter      tandem*)
4523251883Speter	case $cc_basename in
4524251883Speter	  NCC*)
4525251883Speter	    # NonStop-UX NCC 3.20
4526269851Speter	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4527251883Speter	    ;;
4528251883Speter	  *)
4529251883Speter	    ;;
4530251883Speter	esac
4531251883Speter	;;
4532251883Speter      vxworks*)
4533251883Speter	;;
4534251883Speter      *)
4535269851Speter	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4536251883Speter	;;
4537251883Speter    esac
4538251883Speter  fi
4539251883Speter],
4540251883Speter[
4541298161Sbapt  if test yes = "$GCC"; then
4542269851Speter    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4543269851Speter    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4544251883Speter
4545251883Speter    case $host_os in
4546251883Speter      aix*)
4547251883Speter      # All AIX code is PIC.
4548298161Sbapt      if test ia64 = "$host_cpu"; then
4549251883Speter	# AIX 5 now supports IA64 processor
4550269851Speter	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4551251883Speter      fi
4552298161Sbapt      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4553251883Speter      ;;
4554251883Speter
4555251883Speter    amigaos*)
4556269851Speter      case $host_cpu in
4557269851Speter      powerpc)
4558269851Speter            # see comment about AmigaOS4 .so support
4559269851Speter            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4560269851Speter        ;;
4561269851Speter      m68k)
4562269851Speter            # FIXME: we need at least 68020 code to build shared libraries, but
4563298161Sbapt            # adding the '-m68020' flag to GCC prevents building anything better,
4564298161Sbapt            # like '-m68040'.
4565269851Speter            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4566269851Speter        ;;
4567269851Speter      esac
4568251883Speter      ;;
4569251883Speter
4570269851Speter    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4571251883Speter      # PIC is the default for these OSes.
4572251883Speter      ;;
4573251883Speter
4574269851Speter    mingw* | cygwin* | pw32* | os2* | cegcc*)
4575251883Speter      # This hack is so that the source file can tell whether it is being
4576251883Speter      # built for inclusion in a dll (and should export symbols for example).
4577269851Speter      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4578269851Speter      # (--disable-auto-import) libraries
4579269851Speter      m4_if([$1], [GCJ], [],
4580269851Speter	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4581298161Sbapt      case $host_os in
4582298161Sbapt      os2*)
4583298161Sbapt	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4584298161Sbapt	;;
4585298161Sbapt      esac
4586251883Speter      ;;
4587251883Speter
4588251883Speter    darwin* | rhapsody*)
4589251883Speter      # PIC is the default on this platform
4590251883Speter      # Common symbols not allowed in MH_DYLIB files
4591269851Speter      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4592251883Speter      ;;
4593251883Speter
4594269851Speter    haiku*)
4595269851Speter      # PIC is the default for Haiku.
4596269851Speter      # The "-static" flag exists, but is broken.
4597269851Speter      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4598269851Speter      ;;
4599269851Speter
4600269851Speter    hpux*)
4601269851Speter      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4602269851Speter      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4603269851Speter      # sets the default TLS model and affects inlining.
4604269851Speter      case $host_cpu in
4605269851Speter      hppa*64*)
4606269851Speter	# +Z the default
4607269851Speter	;;
4608269851Speter      *)
4609269851Speter	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4610269851Speter	;;
4611269851Speter      esac
4612269851Speter      ;;
4613269851Speter
4614269851Speter    interix[[3-9]]*)
4615251883Speter      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4616251883Speter      # Instead, we relocate shared libraries at runtime.
4617251883Speter      ;;
4618251883Speter
4619251883Speter    msdosdjgpp*)
4620251883Speter      # Just because we use GCC doesn't mean we suddenly get shared libraries
4621251883Speter      # on systems that don't support them.
4622269851Speter      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4623251883Speter      enable_shared=no
4624251883Speter      ;;
4625251883Speter
4626269851Speter    *nto* | *qnx*)
4627269851Speter      # QNX uses GNU C++, but need to define -shared option too, otherwise
4628269851Speter      # it will coredump.
4629269851Speter      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4630269851Speter      ;;
4631269851Speter
4632251883Speter    sysv4*MP*)
4633251883Speter      if test -d /usr/nec; then
4634269851Speter	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4635251883Speter      fi
4636251883Speter      ;;
4637251883Speter
4638269851Speter    *)
4639269851Speter      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4640251883Speter      ;;
4641269851Speter    esac
4642251883Speter
4643269851Speter    case $cc_basename in
4644269851Speter    nvcc*) # Cuda Compiler Driver 2.2
4645269851Speter      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4646269851Speter      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4647269851Speter        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4648269851Speter      fi
4649251883Speter      ;;
4650251883Speter    esac
4651251883Speter  else
4652251883Speter    # PORTME Check for flag to pass linker flags through the system compiler.
4653251883Speter    case $host_os in
4654251883Speter    aix*)
4655269851Speter      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4656298161Sbapt      if test ia64 = "$host_cpu"; then
4657251883Speter	# AIX 5 now supports IA64 processor
4658269851Speter	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4659251883Speter      else
4660269851Speter	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4661251883Speter      fi
4662251883Speter      ;;
4663251883Speter
4664298161Sbapt    darwin* | rhapsody*)
4665298161Sbapt      # PIC is the default on this platform
4666298161Sbapt      # Common symbols not allowed in MH_DYLIB files
4667298161Sbapt      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4668298161Sbapt      case $cc_basename in
4669298161Sbapt      nagfor*)
4670298161Sbapt        # NAG Fortran compiler
4671298161Sbapt        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4672298161Sbapt        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4673298161Sbapt        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4674298161Sbapt        ;;
4675298161Sbapt      esac
4676298161Sbapt      ;;
4677298161Sbapt
4678269851Speter    mingw* | cygwin* | pw32* | os2* | cegcc*)
4679251883Speter      # This hack is so that the source file can tell whether it is being
4680251883Speter      # built for inclusion in a dll (and should export symbols for example).
4681269851Speter      m4_if([$1], [GCJ], [],
4682269851Speter	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4683298161Sbapt      case $host_os in
4684298161Sbapt      os2*)
4685298161Sbapt	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4686298161Sbapt	;;
4687298161Sbapt      esac
4688251883Speter      ;;
4689251883Speter
4690251883Speter    hpux9* | hpux10* | hpux11*)
4691269851Speter      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4692251883Speter      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4693251883Speter      # not for PA HP-UX.
4694251883Speter      case $host_cpu in
4695251883Speter      hppa*64*|ia64*)
4696251883Speter	# +Z the default
4697251883Speter	;;
4698251883Speter      *)
4699269851Speter	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4700251883Speter	;;
4701251883Speter      esac
4702251883Speter      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4703298161Sbapt      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4704251883Speter      ;;
4705251883Speter
4706251883Speter    irix5* | irix6* | nonstopux*)
4707269851Speter      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4708251883Speter      # PIC (with -KPIC) is the default.
4709269851Speter      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4710251883Speter      ;;
4711251883Speter
4712298161Sbapt    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4713251883Speter      case $cc_basename in
4714298161Sbapt      # old Intel for x86_64, which still supported -KPIC.
4715269851Speter      ecc*)
4716269851Speter	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4717269851Speter	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4718269851Speter	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4719251883Speter        ;;
4720269851Speter      # icc used to be incompatible with GCC.
4721269851Speter      # ICC 10 doesn't accept -KPIC any more.
4722269851Speter      icc* | ifort*)
4723269851Speter	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4724269851Speter	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4725269851Speter	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4726269851Speter        ;;
4727269851Speter      # Lahey Fortran 8.1.
4728269851Speter      lf95*)
4729269851Speter	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4730269851Speter	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4731269851Speter	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4732269851Speter	;;
4733269851Speter      nagfor*)
4734269851Speter	# NAG Fortran compiler
4735269851Speter	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4736269851Speter	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4737269851Speter	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4738269851Speter	;;
4739298161Sbapt      tcc*)
4740298161Sbapt	# Fabrice Bellard et al's Tiny C Compiler
4741298161Sbapt	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4742298161Sbapt	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4743298161Sbapt	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4744298161Sbapt	;;
4745269851Speter      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4746251883Speter        # Portland Group compilers (*not* the Pentium gcc compiler,
4747251883Speter	# which looks to be a dead project)
4748269851Speter	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4749269851Speter	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4750269851Speter	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4751251883Speter        ;;
4752251883Speter      ccc*)
4753269851Speter        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4754251883Speter        # All Alpha code is PIC.
4755269851Speter        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4756251883Speter        ;;
4757269851Speter      xl* | bgxl* | bgf* | mpixl*)
4758269851Speter	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4759269851Speter	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4760269851Speter	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4761269851Speter	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4762269851Speter	;;
4763269851Speter      *)
4764269851Speter	case `$CC -V 2>&1 | sed 5q` in
4765269851Speter	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4766269851Speter	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4767269851Speter	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4768269851Speter	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4769269851Speter	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4770269851Speter	  ;;
4771269851Speter	*Sun\ F* | *Sun*Fortran*)
4772269851Speter	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4773269851Speter	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4774269851Speter	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4775269851Speter	  ;;
4776269851Speter	*Sun\ C*)
4777269851Speter	  # Sun C 5.9
4778269851Speter	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4779269851Speter	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4780269851Speter	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4781269851Speter	  ;;
4782269851Speter        *Intel*\ [[CF]]*Compiler*)
4783269851Speter	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4784269851Speter	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4785269851Speter	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4786269851Speter	  ;;
4787269851Speter	*Portland\ Group*)
4788269851Speter	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4789269851Speter	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4790269851Speter	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4791269851Speter	  ;;
4792269851Speter	esac
4793269851Speter	;;
4794251883Speter      esac
4795251883Speter      ;;
4796251883Speter
4797269851Speter    newsos6)
4798269851Speter      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4799269851Speter      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4800269851Speter      ;;
4801269851Speter
4802269851Speter    *nto* | *qnx*)
4803269851Speter      # QNX uses GNU C++, but need to define -shared option too, otherwise
4804269851Speter      # it will coredump.
4805269851Speter      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4806269851Speter      ;;
4807269851Speter
4808251883Speter    osf3* | osf4* | osf5*)
4809269851Speter      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4810251883Speter      # All OSF/1 code is PIC.
4811269851Speter      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4812251883Speter      ;;
4813251883Speter
4814269851Speter    rdos*)
4815269851Speter      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4816269851Speter      ;;
4817269851Speter
4818251883Speter    solaris*)
4819269851Speter      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4820269851Speter      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4821251883Speter      case $cc_basename in
4822269851Speter      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4823269851Speter	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4824251883Speter      *)
4825269851Speter	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4826251883Speter      esac
4827251883Speter      ;;
4828251883Speter
4829251883Speter    sunos4*)
4830269851Speter      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4831269851Speter      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4832269851Speter      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4833251883Speter      ;;
4834251883Speter
4835251883Speter    sysv4 | sysv4.2uw2* | sysv4.3*)
4836269851Speter      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4837269851Speter      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4838269851Speter      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4839251883Speter      ;;
4840251883Speter
4841251883Speter    sysv4*MP*)
4842298161Sbapt      if test -d /usr/nec; then
4843269851Speter	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4844269851Speter	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4845251883Speter      fi
4846251883Speter      ;;
4847251883Speter
4848251883Speter    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4849269851Speter      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4850269851Speter      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4851269851Speter      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4852251883Speter      ;;
4853251883Speter
4854251883Speter    unicos*)
4855269851Speter      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4856269851Speter      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4857251883Speter      ;;
4858251883Speter
4859251883Speter    uts4*)
4860269851Speter      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4861269851Speter      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4862251883Speter      ;;
4863251883Speter
4864251883Speter    *)
4865269851Speter      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4866251883Speter      ;;
4867251883Speter    esac
4868251883Speter  fi
4869251883Speter])
4870251883Spetercase $host_os in
4871298161Sbapt  # For platforms that do not support PIC, -DPIC is meaningless:
4872251883Speter  *djgpp*)
4873269851Speter    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4874251883Speter    ;;
4875251883Speter  *)
4876269851Speter    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4877251883Speter    ;;
4878251883Speteresac
4879251883Speter
4880269851SpeterAC_CACHE_CHECK([for $compiler option to produce PIC],
4881269851Speter  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4882269851Speter  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4883269851Speter_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4884269851Speter
4885251883Speter#
4886269851Speter# Check to make sure the PIC flag actually works.
4887269851Speter#
4888269851Speterif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4889269851Speter  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4890269851Speter    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4891269851Speter    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4892269851Speter    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4893269851Speter     "" | " "*) ;;
4894269851Speter     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4895269851Speter     esac],
4896269851Speter    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4897269851Speter     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4898269851Speterfi
4899269851Speter_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4900269851Speter	[Additional compiler flags for building library objects])
4901269851Speter
4902269851Speter_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4903269851Speter	[How to pass a linker flag through the compiler])
4904269851Speter#
4905251883Speter# Check to make sure the static flag actually works.
4906251883Speter#
4907269851Speterwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4908269851Speter_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4909269851Speter  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4910251883Speter  $lt_tmp_static_flag,
4911251883Speter  [],
4912269851Speter  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4913269851Speter_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4914269851Speter	[Compiler flag to prevent dynamic linking])
4915269851Speter])# _LT_COMPILER_PIC
4916251883Speter
4917251883Speter
4918269851Speter# _LT_LINKER_SHLIBS([TAGNAME])
4919269851Speter# ----------------------------
4920251883Speter# See if the linker supports building shared libraries.
4921269851Speterm4_defun([_LT_LINKER_SHLIBS],
4922269851Speter[AC_REQUIRE([LT_PATH_LD])dnl
4923269851SpeterAC_REQUIRE([LT_PATH_NM])dnl
4924269851Speterm4_require([_LT_PATH_MANIFEST_TOOL])dnl
4925269851Speterm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4926269851Speterm4_require([_LT_DECL_EGREP])dnl
4927269851Speterm4_require([_LT_DECL_SED])dnl
4928269851Speterm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4929269851Speterm4_require([_LT_TAG_COMPILER])dnl
4930269851SpeterAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4931269851Speterm4_if([$1], [CXX], [
4932269851Speter  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4933269851Speter  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4934251883Speter  case $host_os in
4935269851Speter  aix[[4-9]]*)
4936251883Speter    # If we're using GNU nm, then we don't want the "-C" option.
4937298161Sbapt    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4938298161Sbapt    # Without the "-l" option, or with the "-B" option, AIX nm treats
4939298161Sbapt    # weak defined symbols like other global defined symbols, whereas
4940298161Sbapt    # GNU nm marks them as "W".
4941298161Sbapt    # While the 'weak' keyword is ignored in the Export File, we need
4942298161Sbapt    # it in the Import File for the 'aix-soname' feature, so we have
4943298161Sbapt    # to replace the "-B" option with "-P" for AIX nm.
4944269851Speter    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4945298161Sbapt      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
4946251883Speter    else
4947298161Sbapt      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
4948251883Speter    fi
4949251883Speter    ;;
4950251883Speter  pw32*)
4951298161Sbapt    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
4952269851Speter    ;;
4953269851Speter  cygwin* | mingw* | cegcc*)
4954269851Speter    case $cc_basename in
4955269851Speter    cl*)
4956269851Speter      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4957269851Speter      ;;
4958269851Speter    *)
4959269851Speter      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4960269851Speter      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4961269851Speter      ;;
4962269851Speter    esac
4963269851Speter    ;;
4964346442Scy  linux* | k*bsd*-gnu | gnu*)
4965346442Scy    _LT_TAGVAR(link_all_deplibs, $1)=no
4966346442Scy    ;;
4967251883Speter  *)
4968269851Speter    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4969269851Speter    ;;
4970251883Speter  esac
4971269851Speter], [
4972251883Speter  runpath_var=
4973269851Speter  _LT_TAGVAR(allow_undefined_flag, $1)=
4974269851Speter  _LT_TAGVAR(always_export_symbols, $1)=no
4975269851Speter  _LT_TAGVAR(archive_cmds, $1)=
4976269851Speter  _LT_TAGVAR(archive_expsym_cmds, $1)=
4977269851Speter  _LT_TAGVAR(compiler_needs_object, $1)=no
4978269851Speter  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4979269851Speter  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4980269851Speter  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4981269851Speter  _LT_TAGVAR(hardcode_automatic, $1)=no
4982269851Speter  _LT_TAGVAR(hardcode_direct, $1)=no
4983269851Speter  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4984269851Speter  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4985269851Speter  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4986269851Speter  _LT_TAGVAR(hardcode_minus_L, $1)=no
4987269851Speter  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4988269851Speter  _LT_TAGVAR(inherit_rpath, $1)=no
4989269851Speter  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4990269851Speter  _LT_TAGVAR(module_cmds, $1)=
4991269851Speter  _LT_TAGVAR(module_expsym_cmds, $1)=
4992269851Speter  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4993269851Speter  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4994269851Speter  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4995269851Speter  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4996251883Speter  # include_expsyms should be a list of space-separated symbols to be *always*
4997251883Speter  # included in the symbol list
4998269851Speter  _LT_TAGVAR(include_expsyms, $1)=
4999251883Speter  # exclude_expsyms can be an extended regexp of symbols to exclude
5000298161Sbapt  # it will be wrapped by ' (' and ')$', so one must not match beginning or
5001298161Sbapt  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
5002298161Sbapt  # as well as any symbol that contains 'd'.
5003269851Speter  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5004251883Speter  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5005251883Speter  # platforms (ab)use it in PIC code, but their linkers get confused if
5006251883Speter  # the symbol is explicitly referenced.  Since portable code cannot
5007251883Speter  # rely on this symbol name, it's probably fine to never include it in
5008251883Speter  # preloaded symbol tables.
5009269851Speter  # Exclude shared library initialization/finalization symbols.
5010269851Speterdnl Note also adjust exclude_expsyms for C++ above.
5011251883Speter  extract_expsyms_cmds=
5012269851Speter
5013251883Speter  case $host_os in
5014269851Speter  cygwin* | mingw* | pw32* | cegcc*)
5015251883Speter    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5016251883Speter    # When not using gcc, we currently assume that we are using
5017251883Speter    # Microsoft Visual C++.
5018298161Sbapt    if test yes != "$GCC"; then
5019251883Speter      with_gnu_ld=no
5020251883Speter    fi
5021251883Speter    ;;
5022251883Speter  interix*)
5023251883Speter    # we just hope/assume this is gcc and not c89 (= MSVC++)
5024251883Speter    with_gnu_ld=yes
5025251883Speter    ;;
5026298161Sbapt  openbsd* | bitrig*)
5027251883Speter    with_gnu_ld=no
5028251883Speter    ;;
5029346442Scy  linux* | k*bsd*-gnu | gnu*)
5030346442Scy    _LT_TAGVAR(link_all_deplibs, $1)=no
5031346442Scy    ;;
5032251883Speter  esac
5033251883Speter
5034269851Speter  _LT_TAGVAR(ld_shlibs, $1)=yes
5035269851Speter
5036269851Speter  # On some targets, GNU ld is compatible enough with the native linker
5037269851Speter  # that we're better off using the native interface for both.
5038269851Speter  lt_use_gnu_ld_interface=no
5039298161Sbapt  if test yes = "$with_gnu_ld"; then
5040269851Speter    case $host_os in
5041269851Speter      aix*)
5042269851Speter	# The AIX port of GNU ld has always aspired to compatibility
5043269851Speter	# with the native linker.  However, as the warning in the GNU ld
5044269851Speter	# block says, versions before 2.19.5* couldn't really create working
5045269851Speter	# shared libraries, regardless of the interface used.
5046269851Speter	case `$LD -v 2>&1` in
5047269851Speter	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5048269851Speter	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5049269851Speter	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5050269851Speter	  *)
5051269851Speter	    lt_use_gnu_ld_interface=yes
5052269851Speter	    ;;
5053269851Speter	esac
5054269851Speter	;;
5055269851Speter      *)
5056269851Speter	lt_use_gnu_ld_interface=yes
5057269851Speter	;;
5058269851Speter    esac
5059269851Speter  fi
5060269851Speter
5061298161Sbapt  if test yes = "$lt_use_gnu_ld_interface"; then
5062251883Speter    # If archive_cmds runs LD, not CC, wlarc should be empty
5063298161Sbapt    wlarc='$wl'
5064251883Speter
5065251883Speter    # Set some defaults for GNU ld with shared library support. These
5066251883Speter    # are reset later if shared libraries are not supported. Putting them
5067251883Speter    # here allows them to be overridden if necessary.
5068251883Speter    runpath_var=LD_RUN_PATH
5069298161Sbapt    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5070298161Sbapt    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5071251883Speter    # ancient GNU ld didn't support --whole-archive et. al.
5072269851Speter    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5073298161Sbapt      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5074269851Speter    else
5075269851Speter      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5076251883Speter    fi
5077251883Speter    supports_anon_versioning=no
5078298161Sbapt    case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
5079269851Speter      *GNU\ gold*) supports_anon_versioning=yes ;;
5080251883Speter      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5081251883Speter      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5082251883Speter      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5083251883Speter      *\ 2.11.*) ;; # other 2.11 versions
5084251883Speter      *) supports_anon_versioning=yes ;;
5085251883Speter    esac
5086251883Speter
5087251883Speter    # See if GNU ld supports shared libraries.
5088251883Speter    case $host_os in
5089269851Speter    aix[[3-9]]*)
5090251883Speter      # On AIX/PPC, the GNU linker is very broken
5091298161Sbapt      if test ia64 != "$host_cpu"; then
5092269851Speter	_LT_TAGVAR(ld_shlibs, $1)=no
5093269851Speter	cat <<_LT_EOF 1>&2
5094251883Speter
5095269851Speter*** Warning: the GNU linker, at least up to release 2.19, is reported
5096251883Speter*** to be unable to reliably create shared libraries on AIX.
5097251883Speter*** Therefore, libtool is disabling shared libraries support.  If you
5098269851Speter*** really care for shared libraries, you may want to install binutils
5099269851Speter*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5100269851Speter*** You will then need to restart the configuration process.
5101251883Speter
5102269851Speter_LT_EOF
5103251883Speter      fi
5104251883Speter      ;;
5105251883Speter
5106251883Speter    amigaos*)
5107269851Speter      case $host_cpu in
5108269851Speter      powerpc)
5109269851Speter            # see comment about AmigaOS4 .so support
5110298161Sbapt            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5111269851Speter            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5112269851Speter        ;;
5113269851Speter      m68k)
5114269851Speter            _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)'
5115269851Speter            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5116269851Speter            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5117269851Speter        ;;
5118269851Speter      esac
5119251883Speter      ;;
5120251883Speter
5121251883Speter    beos*)
5122269851Speter      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5123269851Speter	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5124251883Speter	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5125251883Speter	# support --undefined.  This deserves some investigation.  FIXME
5126298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5127251883Speter      else
5128269851Speter	_LT_TAGVAR(ld_shlibs, $1)=no
5129251883Speter      fi
5130251883Speter      ;;
5131251883Speter
5132269851Speter    cygwin* | mingw* | pw32* | cegcc*)
5133269851Speter      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5134251883Speter      # as there is no search path for DLLs.
5135269851Speter      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5136298161Sbapt      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5137269851Speter      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5138269851Speter      _LT_TAGVAR(always_export_symbols, $1)=no
5139269851Speter      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5140269851Speter      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5141269851Speter      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5142251883Speter
5143269851Speter      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5144298161Sbapt        _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'
5145298161Sbapt	# If the export-symbols file already is a .def file, use it as
5146298161Sbapt	# is; otherwise, prepend EXPORTS...
5147298161Sbapt	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5148298161Sbapt          cp $export_symbols $output_objdir/$soname.def;
5149298161Sbapt        else
5150298161Sbapt          echo EXPORTS > $output_objdir/$soname.def;
5151298161Sbapt          cat $export_symbols >> $output_objdir/$soname.def;
5152298161Sbapt        fi~
5153298161Sbapt        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5154251883Speter      else
5155269851Speter	_LT_TAGVAR(ld_shlibs, $1)=no
5156251883Speter      fi
5157251883Speter      ;;
5158251883Speter
5159269851Speter    haiku*)
5160298161Sbapt      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5161269851Speter      _LT_TAGVAR(link_all_deplibs, $1)=yes
5162269851Speter      ;;
5163269851Speter
5164298161Sbapt    os2*)
5165298161Sbapt      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5166298161Sbapt      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5167298161Sbapt      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5168298161Sbapt      shrext_cmds=.dll
5169298161Sbapt      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5170298161Sbapt	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5171298161Sbapt	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5172298161Sbapt	$ECHO EXPORTS >> $output_objdir/$libname.def~
5173298161Sbapt	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5174298161Sbapt	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5175298161Sbapt	emximp -o $lib $output_objdir/$libname.def'
5176298161Sbapt      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5177298161Sbapt	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5178298161Sbapt	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5179298161Sbapt	$ECHO EXPORTS >> $output_objdir/$libname.def~
5180298161Sbapt	prefix_cmds="$SED"~
5181298161Sbapt	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5182298161Sbapt	  prefix_cmds="$prefix_cmds -e 1d";
5183298161Sbapt	fi~
5184298161Sbapt	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5185298161Sbapt	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5186298161Sbapt	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5187298161Sbapt	emximp -o $lib $output_objdir/$libname.def'
5188298161Sbapt      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5189298161Sbapt      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5190298161Sbapt      ;;
5191298161Sbapt
5192269851Speter    interix[[3-9]]*)
5193269851Speter      _LT_TAGVAR(hardcode_direct, $1)=no
5194269851Speter      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5195298161Sbapt      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5196298161Sbapt      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5197251883Speter      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5198251883Speter      # Instead, shared libraries are loaded at an image base (0x10000000 by
5199251883Speter      # default) and relocated if they conflict, which is a slow very memory
5200251883Speter      # consuming and fragmenting process.  To avoid this, we pick a random,
5201251883Speter      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5202251883Speter      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5203298161Sbapt      _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'
5204298161Sbapt      _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'
5205251883Speter      ;;
5206251883Speter
5207269851Speter    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5208269851Speter      tmp_diet=no
5209298161Sbapt      if test linux-dietlibc = "$host_os"; then
5210269851Speter	case $cc_basename in
5211269851Speter	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5212269851Speter	esac
5213269851Speter      fi
5214269851Speter      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5215298161Sbapt	 && test no = "$tmp_diet"
5216269851Speter      then
5217269851Speter	tmp_addflag=' $pic_flag'
5218269851Speter	tmp_sharedflag='-shared'
5219251883Speter	case $cc_basename,$host_cpu in
5220269851Speter        pgcc*)				# Portland Group C compiler
5221298161Sbapt	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5222251883Speter	  tmp_addflag=' $pic_flag'
5223251883Speter	  ;;
5224269851Speter	pgf77* | pgf90* | pgf95* | pgfortran*)
5225269851Speter					# Portland Group f77 and f90 compilers
5226298161Sbapt	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5227251883Speter	  tmp_addflag=' $pic_flag -Mnomain' ;;
5228269851Speter	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5229251883Speter	  tmp_addflag=' -i_dynamic' ;;
5230251883Speter	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5231251883Speter	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5232251883Speter	ifc* | ifort*)			# Intel Fortran compiler
5233251883Speter	  tmp_addflag=' -nofor_main' ;;
5234269851Speter	lf95*)				# Lahey Fortran 8.1
5235269851Speter	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5236269851Speter	  tmp_sharedflag='--shared' ;;
5237298161Sbapt        nagfor*)                        # NAGFOR 5.3
5238298161Sbapt          tmp_sharedflag='-Wl,-shared' ;;
5239269851Speter	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5240269851Speter	  tmp_sharedflag='-qmkshrobj'
5241269851Speter	  tmp_addflag= ;;
5242269851Speter	nvcc*)	# Cuda Compiler Driver 2.2
5243298161Sbapt	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5244269851Speter	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5245269851Speter	  ;;
5246251883Speter	esac
5247269851Speter	case `$CC -V 2>&1 | sed 5q` in
5248269851Speter	*Sun\ C*)			# Sun C 5.9
5249298161Sbapt	  _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; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
5250269851Speter	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5251269851Speter	  tmp_sharedflag='-G' ;;
5252269851Speter	*Sun\ F*)			# Sun Fortran 8.3
5253269851Speter	  tmp_sharedflag='-G' ;;
5254269851Speter	esac
5255298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5256251883Speter
5257298161Sbapt        if test yes = "$supports_anon_versioning"; then
5258269851Speter          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5259298161Sbapt            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5260298161Sbapt            echo "local: *; };" >> $output_objdir/$libname.ver~
5261298161Sbapt            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5262269851Speter        fi
5263269851Speter
5264269851Speter	case $cc_basename in
5265298161Sbapt	tcc*)
5266298161Sbapt	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5267298161Sbapt	  ;;
5268269851Speter	xlf* | bgf* | bgxlf* | mpixlf*)
5269269851Speter	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5270269851Speter	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5271298161Sbapt	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5272269851Speter	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5273298161Sbapt	  if test yes = "$supports_anon_versioning"; then
5274269851Speter	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5275298161Sbapt              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5276298161Sbapt              echo "local: *; };" >> $output_objdir/$libname.ver~
5277298161Sbapt              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5278269851Speter	  fi
5279269851Speter	  ;;
5280269851Speter	esac
5281251883Speter      else
5282269851Speter        _LT_TAGVAR(ld_shlibs, $1)=no
5283251883Speter      fi
5284251883Speter      ;;
5285251883Speter
5286346442Scy    netbsd* | netbsdelf*-gnu)
5287269851Speter      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5288269851Speter	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5289251883Speter	wlarc=
5290251883Speter      else
5291298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5292298161Sbapt	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5293251883Speter      fi
5294251883Speter      ;;
5295251883Speter
5296251883Speter    solaris*)
5297269851Speter      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5298269851Speter	_LT_TAGVAR(ld_shlibs, $1)=no
5299269851Speter	cat <<_LT_EOF 1>&2
5300251883Speter
5301251883Speter*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5302251883Speter*** create shared libraries on Solaris systems.  Therefore, libtool
5303251883Speter*** is disabling shared libraries support.  We urge you to upgrade GNU
5304251883Speter*** binutils to release 2.9.1 or newer.  Another option is to modify
5305251883Speter*** your PATH or compiler configuration so that the native linker is
5306251883Speter*** used, and then restart.
5307251883Speter
5308269851Speter_LT_EOF
5309269851Speter      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5310298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5311298161Sbapt	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5312251883Speter      else
5313269851Speter	_LT_TAGVAR(ld_shlibs, $1)=no
5314251883Speter      fi
5315251883Speter      ;;
5316251883Speter
5317251883Speter    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5318251883Speter      case `$LD -v 2>&1` in
5319269851Speter        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5320269851Speter	_LT_TAGVAR(ld_shlibs, $1)=no
5321251883Speter	cat <<_LT_EOF 1>&2
5322251883Speter
5323298161Sbapt*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5324251883Speter*** reliably create shared libraries on SCO systems.  Therefore, libtool
5325251883Speter*** is disabling shared libraries support.  We urge you to upgrade GNU
5326251883Speter*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5327251883Speter*** your PATH or compiler configuration so that the native linker is
5328251883Speter*** used, and then restart.
5329251883Speter
5330251883Speter_LT_EOF
5331251883Speter	;;
5332251883Speter	*)
5333269851Speter	  # For security reasons, it is highly recommended that you always
5334269851Speter	  # use absolute paths for naming shared libraries, and exclude the
5335269851Speter	  # DT_RUNPATH tag from executables and libraries.  But doing so
5336269851Speter	  # requires that you compile everything twice, which is a pain.
5337269851Speter	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5338298161Sbapt	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5339298161Sbapt	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5340298161Sbapt	    _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'
5341251883Speter	  else
5342269851Speter	    _LT_TAGVAR(ld_shlibs, $1)=no
5343251883Speter	  fi
5344251883Speter	;;
5345251883Speter      esac
5346251883Speter      ;;
5347251883Speter
5348251883Speter    sunos4*)
5349269851Speter      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5350251883Speter      wlarc=
5351269851Speter      _LT_TAGVAR(hardcode_direct, $1)=yes
5352269851Speter      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5353251883Speter      ;;
5354251883Speter
5355251883Speter    *)
5356269851Speter      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5357298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5358298161Sbapt	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
5359251883Speter      else
5360269851Speter	_LT_TAGVAR(ld_shlibs, $1)=no
5361251883Speter      fi
5362251883Speter      ;;
5363251883Speter    esac
5364251883Speter
5365298161Sbapt    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5366251883Speter      runpath_var=
5367269851Speter      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5368269851Speter      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5369269851Speter      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5370251883Speter    fi
5371251883Speter  else
5372251883Speter    # PORTME fill in a description of your system's linker (not GNU ld)
5373251883Speter    case $host_os in
5374251883Speter    aix3*)
5375269851Speter      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5376269851Speter      _LT_TAGVAR(always_export_symbols, $1)=yes
5377269851Speter      _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'
5378251883Speter      # Note: this linker hardcodes the directories in LIBPATH if there
5379251883Speter      # are no directories specified by -L.
5380269851Speter      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5381298161Sbapt      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5382251883Speter	# Neither direct hardcoding nor static linking is supported with a
5383251883Speter	# broken collect2.
5384269851Speter	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5385251883Speter      fi
5386251883Speter      ;;
5387251883Speter
5388269851Speter    aix[[4-9]]*)
5389298161Sbapt      if test ia64 = "$host_cpu"; then
5390251883Speter	# On IA64, the linker does run time linking by default, so we don't
5391251883Speter	# have to do anything special.
5392251883Speter	aix_use_runtimelinking=no
5393251883Speter	exp_sym_flag='-Bexport'
5394298161Sbapt	no_entry_flag=
5395251883Speter      else
5396251883Speter	# If we're using GNU nm, then we don't want the "-C" option.
5397298161Sbapt	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
5398298161Sbapt	# Without the "-l" option, or with the "-B" option, AIX nm treats
5399298161Sbapt	# weak defined symbols like other global defined symbols, whereas
5400298161Sbapt	# GNU nm marks them as "W".
5401298161Sbapt	# While the 'weak' keyword is ignored in the Export File, we need
5402298161Sbapt	# it in the Import File for the 'aix-soname' feature, so we have
5403298161Sbapt	# to replace the "-B" option with "-P" for AIX nm.
5404269851Speter	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5405298161Sbapt	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
5406251883Speter	else
5407298161Sbapt	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
5408251883Speter	fi
5409251883Speter	aix_use_runtimelinking=no
5410251883Speter
5411251883Speter	# Test if we are trying to use run time linking or normal
5412251883Speter	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5413298161Sbapt	# have runtime linking enabled, and use it for executables.
5414298161Sbapt	# For shared libraries, we enable/disable runtime linking
5415298161Sbapt	# depending on the kind of the shared library created -
5416298161Sbapt	# when "with_aix_soname,aix_use_runtimelinking" is:
5417298161Sbapt	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
5418298161Sbapt	# "aix,yes"  lib.so          shared, rtl:yes, for executables
5419298161Sbapt	#            lib.a           static archive
5420298161Sbapt	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
5421298161Sbapt	#            lib.a(lib.so.V) shared, rtl:no,  for executables
5422298161Sbapt	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5423298161Sbapt	#            lib.a(lib.so.V) shared, rtl:no
5424298161Sbapt	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
5425298161Sbapt	#            lib.a           static archive
5426269851Speter	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5427251883Speter	  for ld_flag in $LDFLAGS; do
5428298161Sbapt	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5429269851Speter	    aix_use_runtimelinking=yes
5430269851Speter	    break
5431269851Speter	  fi
5432251883Speter	  done
5433298161Sbapt	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5434298161Sbapt	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
5435298161Sbapt	    # so we don't have lib.a shared libs to link our executables.
5436298161Sbapt	    # We have to force runtime linking in this case.
5437298161Sbapt	    aix_use_runtimelinking=yes
5438298161Sbapt	    LDFLAGS="$LDFLAGS -Wl,-brtl"
5439298161Sbapt	  fi
5440251883Speter	  ;;
5441251883Speter	esac
5442251883Speter
5443251883Speter	exp_sym_flag='-bexport'
5444251883Speter	no_entry_flag='-bnoentry'
5445251883Speter      fi
5446251883Speter
5447251883Speter      # When large executables or shared objects are built, AIX ld can
5448251883Speter      # have problems creating the table of contents.  If linking a library
5449251883Speter      # or program results in "error TOC overflow" add -mminimal-toc to
5450251883Speter      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5451251883Speter      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5452251883Speter
5453269851Speter      _LT_TAGVAR(archive_cmds, $1)=''
5454269851Speter      _LT_TAGVAR(hardcode_direct, $1)=yes
5455269851Speter      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5456269851Speter      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5457269851Speter      _LT_TAGVAR(link_all_deplibs, $1)=yes
5458298161Sbapt      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5459298161Sbapt      case $with_aix_soname,$aix_use_runtimelinking in
5460298161Sbapt      aix,*) ;; # traditional, no import file
5461298161Sbapt      svr4,* | *,yes) # use import file
5462298161Sbapt	# The Import File defines what to hardcode.
5463298161Sbapt	_LT_TAGVAR(hardcode_direct, $1)=no
5464298161Sbapt	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5465298161Sbapt	;;
5466298161Sbapt      esac
5467251883Speter
5468298161Sbapt      if test yes = "$GCC"; then
5469251883Speter	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5470251883Speter	# We only want to do this on AIX 4.2 and lower, the check
5471251883Speter	# below for broken collect2 doesn't work under 4.3+
5472298161Sbapt	  collect2name=`$CC -print-prog-name=collect2`
5473269851Speter	  if test -f "$collect2name" &&
5474269851Speter	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5475251883Speter	  then
5476269851Speter	  # We have reworked collect2
5477269851Speter	  :
5478251883Speter	  else
5479269851Speter	  # We have old collect2
5480269851Speter	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5481269851Speter	  # It fails to find uninstalled libraries when the uninstalled
5482269851Speter	  # path is not listed in the libpath.  Setting hardcode_minus_L
5483269851Speter	  # to unsupported forces relinking
5484269851Speter	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5485269851Speter	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5486269851Speter	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5487251883Speter	  fi
5488251883Speter	  ;;
5489251883Speter	esac
5490251883Speter	shared_flag='-shared'
5491298161Sbapt	if test yes = "$aix_use_runtimelinking"; then
5492298161Sbapt	  shared_flag="$shared_flag "'$wl-G'
5493251883Speter	fi
5494298161Sbapt	# Need to ensure runtime linking is disabled for the traditional
5495298161Sbapt	# shared library, or the linker may eventually find shared libraries
5496298161Sbapt	# /with/ Import File - we do not want to mix them.
5497298161Sbapt	shared_flag_aix='-shared'
5498298161Sbapt	shared_flag_svr4='-shared $wl-G'
5499251883Speter      else
5500251883Speter	# not using gcc
5501298161Sbapt	if test ia64 = "$host_cpu"; then
5502269851Speter	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5503269851Speter	# chokes on -Wl,-G. The following line is correct:
5504251883Speter	  shared_flag='-G'
5505251883Speter	else
5506298161Sbapt	  if test yes = "$aix_use_runtimelinking"; then
5507298161Sbapt	    shared_flag='$wl-G'
5508251883Speter	  else
5509298161Sbapt	    shared_flag='$wl-bM:SRE'
5510251883Speter	  fi
5511298161Sbapt	  shared_flag_aix='$wl-bM:SRE'
5512298161Sbapt	  shared_flag_svr4='$wl-G'
5513251883Speter	fi
5514251883Speter      fi
5515251883Speter
5516298161Sbapt      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5517251883Speter      # It seems that -bexpall does not export symbols beginning with
5518251883Speter      # underscore (_), so it is better to generate a list of symbols to export.
5519269851Speter      _LT_TAGVAR(always_export_symbols, $1)=yes
5520298161Sbapt      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5521251883Speter	# Warning - without using the other runtime loading flags (-brtl),
5522251883Speter	# -berok will link without error, but may produce a broken library.
5523269851Speter	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5524269851Speter        # Determine the default libpath from the value encoded in an
5525269851Speter        # empty executable.
5526269851Speter        _LT_SYS_MODULE_PATH_AIX([$1])
5527298161Sbapt        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5528298161Sbapt        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
5529269851Speter      else
5530298161Sbapt	if test ia64 = "$host_cpu"; then
5531298161Sbapt	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5532269851Speter	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5533298161Sbapt	  _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"
5534251883Speter	else
5535269851Speter	 # Determine the default libpath from the value encoded in an
5536269851Speter	 # empty executable.
5537269851Speter	 _LT_SYS_MODULE_PATH_AIX([$1])
5538298161Sbapt	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5539251883Speter	  # Warning - without using the other run time loading flags,
5540251883Speter	  # -berok will link without error, but may produce a broken library.
5541298161Sbapt	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5542298161Sbapt	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5543298161Sbapt	  if test yes = "$with_gnu_ld"; then
5544269851Speter	    # We only use this code for GNU lds that support --whole-archive.
5545298161Sbapt	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5546269851Speter	  else
5547269851Speter	    # Exported symbols can be pulled into shared objects from archives
5548269851Speter	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5549269851Speter	  fi
5550269851Speter	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5551298161Sbapt	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5552298161Sbapt	  # -brtl affects multiple linker settings, -berok does not and is overridden later
5553298161Sbapt	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5554298161Sbapt	  if test svr4 != "$with_aix_soname"; then
5555298161Sbapt	    # This is similar to how AIX traditionally builds its shared libraries.
5556298161Sbapt	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
5557298161Sbapt	  fi
5558298161Sbapt	  if test aix != "$with_aix_soname"; then
5559298161Sbapt	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
5560298161Sbapt	  else
5561298161Sbapt	    # used by -dlpreopen to get the symbols
5562298161Sbapt	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
5563298161Sbapt	  fi
5564298161Sbapt	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5565251883Speter	fi
5566251883Speter      fi
5567251883Speter      ;;
5568251883Speter
5569251883Speter    amigaos*)
5570269851Speter      case $host_cpu in
5571269851Speter      powerpc)
5572269851Speter            # see comment about AmigaOS4 .so support
5573298161Sbapt            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5574269851Speter            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5575269851Speter        ;;
5576269851Speter      m68k)
5577269851Speter            _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)'
5578269851Speter            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5579269851Speter            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5580269851Speter        ;;
5581269851Speter      esac
5582251883Speter      ;;
5583251883Speter
5584251883Speter    bsdi[[45]]*)
5585269851Speter      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5586251883Speter      ;;
5587251883Speter
5588269851Speter    cygwin* | mingw* | pw32* | cegcc*)
5589251883Speter      # When not using gcc, we currently assume that we are using
5590251883Speter      # Microsoft Visual C++.
5591251883Speter      # hardcode_libdir_flag_spec is actually meaningless, as there is
5592251883Speter      # no search path for DLLs.
5593269851Speter      case $cc_basename in
5594269851Speter      cl*)
5595269851Speter	# Native MSVC
5596269851Speter	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5597269851Speter	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5598269851Speter	_LT_TAGVAR(always_export_symbols, $1)=yes
5599269851Speter	_LT_TAGVAR(file_list_spec, $1)='@'
5600269851Speter	# Tell ltmain to make .lib files, not .a files.
5601269851Speter	libext=lib
5602269851Speter	# Tell ltmain to make .dll files, not .so files.
5603298161Sbapt	shrext_cmds=.dll
5604269851Speter	# FIXME: Setting linknames here is a bad hack.
5605298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5606298161Sbapt	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5607298161Sbapt            cp "$export_symbols" "$output_objdir/$soname.def";
5608298161Sbapt            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5609298161Sbapt          else
5610298161Sbapt            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5611298161Sbapt          fi~
5612298161Sbapt          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5613298161Sbapt          linknames='
5614269851Speter	# The linker will not automatically build a static lib if we build a DLL.
5615269851Speter	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5616269851Speter	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5617269851Speter	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5618269851Speter	_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'
5619269851Speter	# Don't use ranlib
5620269851Speter	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5621269851Speter	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5622298161Sbapt          lt_tool_outputfile="@TOOL_OUTPUT@"~
5623298161Sbapt          case $lt_outputfile in
5624298161Sbapt            *.exe|*.EXE) ;;
5625298161Sbapt            *)
5626298161Sbapt              lt_outputfile=$lt_outputfile.exe
5627298161Sbapt              lt_tool_outputfile=$lt_tool_outputfile.exe
5628298161Sbapt              ;;
5629298161Sbapt          esac~
5630298161Sbapt          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5631298161Sbapt            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5632298161Sbapt            $RM "$lt_outputfile.manifest";
5633298161Sbapt          fi'
5634269851Speter	;;
5635269851Speter      *)
5636269851Speter	# Assume MSVC wrapper
5637269851Speter	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5638269851Speter	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5639269851Speter	# Tell ltmain to make .lib files, not .a files.
5640269851Speter	libext=lib
5641269851Speter	# Tell ltmain to make .dll files, not .so files.
5642298161Sbapt	shrext_cmds=.dll
5643269851Speter	# FIXME: Setting linknames here is a bad hack.
5644269851Speter	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5645269851Speter	# The linker will automatically build a .lib file if we build a DLL.
5646269851Speter	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5647269851Speter	# FIXME: Should let the user specify the lib program.
5648269851Speter	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5649269851Speter	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5650269851Speter	;;
5651269851Speter      esac
5652251883Speter      ;;
5653251883Speter
5654251883Speter    darwin* | rhapsody*)
5655269851Speter      _LT_DARWIN_LINKER_FEATURES($1)
5656251883Speter      ;;
5657251883Speter
5658251883Speter    dgux*)
5659269851Speter      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5660269851Speter      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5661269851Speter      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5662251883Speter      ;;
5663251883Speter
5664251883Speter    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5665251883Speter    # support.  Future versions do this automatically, but an explicit c++rt0.o
5666251883Speter    # does not break anything, and helps significantly (at the cost of a little
5667251883Speter    # extra space).
5668251883Speter    freebsd2.2*)
5669269851Speter      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5670269851Speter      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5671269851Speter      _LT_TAGVAR(hardcode_direct, $1)=yes
5672269851Speter      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5673251883Speter      ;;
5674251883Speter
5675251883Speter    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5676269851Speter    freebsd2.*)
5677269851Speter      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5678269851Speter      _LT_TAGVAR(hardcode_direct, $1)=yes
5679269851Speter      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5680269851Speter      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5681251883Speter      ;;
5682251883Speter
5683251883Speter    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5684269851Speter    freebsd* | dragonfly*)
5685269851Speter      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5686269851Speter      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5687269851Speter      _LT_TAGVAR(hardcode_direct, $1)=yes
5688269851Speter      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5689251883Speter      ;;
5690251883Speter
5691251883Speter    hpux9*)
5692298161Sbapt      if test yes = "$GCC"; then
5693298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5694251883Speter      else
5695298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5696251883Speter      fi
5697298161Sbapt      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5698269851Speter      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5699269851Speter      _LT_TAGVAR(hardcode_direct, $1)=yes
5700251883Speter
5701251883Speter      # hardcode_minus_L: Not really in the search PATH,
5702251883Speter      # but as the default location of the library.
5703269851Speter      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5704298161Sbapt      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5705251883Speter      ;;
5706251883Speter
5707251883Speter    hpux10*)
5708298161Sbapt      if test yes,no = "$GCC,$with_gnu_ld"; then
5709298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5710251883Speter      else
5711269851Speter	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5712251883Speter      fi
5713298161Sbapt      if test no = "$with_gnu_ld"; then
5714298161Sbapt	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5715269851Speter	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5716269851Speter	_LT_TAGVAR(hardcode_direct, $1)=yes
5717269851Speter	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5718298161Sbapt	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5719251883Speter	# hardcode_minus_L: Not really in the search PATH,
5720251883Speter	# but as the default location of the library.
5721269851Speter	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5722251883Speter      fi
5723251883Speter      ;;
5724251883Speter
5725251883Speter    hpux11*)
5726298161Sbapt      if test yes,no = "$GCC,$with_gnu_ld"; then
5727251883Speter	case $host_cpu in
5728251883Speter	hppa*64*)
5729298161Sbapt	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5730251883Speter	  ;;
5731251883Speter	ia64*)
5732298161Sbapt	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5733251883Speter	  ;;
5734251883Speter	*)
5735298161Sbapt	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5736251883Speter	  ;;
5737251883Speter	esac
5738251883Speter      else
5739251883Speter	case $host_cpu in
5740251883Speter	hppa*64*)
5741298161Sbapt	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5742251883Speter	  ;;
5743251883Speter	ia64*)
5744298161Sbapt	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5745251883Speter	  ;;
5746251883Speter	*)
5747269851Speter	m4_if($1, [], [
5748269851Speter	  # Older versions of the 11.00 compiler do not understand -b yet
5749269851Speter	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5750269851Speter	  _LT_LINKER_OPTION([if $CC understands -b],
5751269851Speter	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5752298161Sbapt	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5753269851Speter	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5754298161Sbapt	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5755251883Speter	  ;;
5756251883Speter	esac
5757251883Speter      fi
5758298161Sbapt      if test no = "$with_gnu_ld"; then
5759298161Sbapt	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5760269851Speter	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5761251883Speter
5762251883Speter	case $host_cpu in
5763251883Speter	hppa*64*|ia64*)
5764269851Speter	  _LT_TAGVAR(hardcode_direct, $1)=no
5765269851Speter	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5766251883Speter	  ;;
5767251883Speter	*)
5768269851Speter	  _LT_TAGVAR(hardcode_direct, $1)=yes
5769269851Speter	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5770298161Sbapt	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5771251883Speter
5772251883Speter	  # hardcode_minus_L: Not really in the search PATH,
5773251883Speter	  # but as the default location of the library.
5774269851Speter	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5775251883Speter	  ;;
5776251883Speter	esac
5777251883Speter      fi
5778251883Speter      ;;
5779251883Speter
5780251883Speter    irix5* | irix6* | nonstopux*)
5781298161Sbapt      if test yes = "$GCC"; then
5782298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5783269851Speter	# Try to use the -exported_symbol ld option, if it does not
5784269851Speter	# work, assume that -exports_file does not work either and
5785269851Speter	# implicitly export all symbols.
5786269851Speter	# This should be the same for all languages, so no per-tag cache variable.
5787269851Speter	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5788269851Speter	  [lt_cv_irix_exported_symbol],
5789298161Sbapt	  [save_LDFLAGS=$LDFLAGS
5790298161Sbapt	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
5791269851Speter	   AC_LINK_IFELSE(
5792269851Speter	     [AC_LANG_SOURCE(
5793269851Speter	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5794269851Speter			      [C++], [[int foo (void) { return 0; }]],
5795269851Speter			      [Fortran 77], [[
5796269851Speter      subroutine foo
5797269851Speter      end]],
5798269851Speter			      [Fortran], [[
5799269851Speter      subroutine foo
5800269851Speter      end]])])],
5801269851Speter	      [lt_cv_irix_exported_symbol=yes],
5802269851Speter	      [lt_cv_irix_exported_symbol=no])
5803298161Sbapt           LDFLAGS=$save_LDFLAGS])
5804298161Sbapt	if test yes = "$lt_cv_irix_exported_symbol"; then
5805298161Sbapt          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
5806269851Speter	fi
5807346442Scy	_LT_TAGVAR(link_all_deplibs, $1)=no
5808251883Speter      else
5809298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5810298161Sbapt	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
5811251883Speter      fi
5812269851Speter      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5813298161Sbapt      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5814269851Speter      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5815269851Speter      _LT_TAGVAR(inherit_rpath, $1)=yes
5816269851Speter      _LT_TAGVAR(link_all_deplibs, $1)=yes
5817251883Speter      ;;
5818251883Speter
5819298161Sbapt    linux*)
5820298161Sbapt      case $cc_basename in
5821298161Sbapt      tcc*)
5822298161Sbapt	# Fabrice Bellard et al's Tiny C Compiler
5823298161Sbapt	_LT_TAGVAR(ld_shlibs, $1)=yes
5824298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5825298161Sbapt	;;
5826298161Sbapt      esac
5827298161Sbapt      ;;
5828298161Sbapt
5829346442Scy    netbsd* | netbsdelf*-gnu)
5830269851Speter      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5831269851Speter	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5832251883Speter      else
5833269851Speter	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5834251883Speter      fi
5835269851Speter      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5836269851Speter      _LT_TAGVAR(hardcode_direct, $1)=yes
5837269851Speter      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5838251883Speter      ;;
5839251883Speter
5840251883Speter    newsos6)
5841269851Speter      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5842269851Speter      _LT_TAGVAR(hardcode_direct, $1)=yes
5843298161Sbapt      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5844269851Speter      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5845269851Speter      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5846251883Speter      ;;
5847251883Speter
5848269851Speter    *nto* | *qnx*)
5849269851Speter      ;;
5850269851Speter
5851298161Sbapt    openbsd* | bitrig*)
5852269851Speter      if test -f /usr/libexec/ld.so; then
5853269851Speter	_LT_TAGVAR(hardcode_direct, $1)=yes
5854269851Speter	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5855269851Speter	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5856298161Sbapt	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5857269851Speter	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5858298161Sbapt	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5859298161Sbapt	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5860298161Sbapt	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5861269851Speter	else
5862298161Sbapt	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5863298161Sbapt	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5864269851Speter	fi
5865251883Speter      else
5866269851Speter	_LT_TAGVAR(ld_shlibs, $1)=no
5867251883Speter      fi
5868251883Speter      ;;
5869251883Speter
5870251883Speter    os2*)
5871269851Speter      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5872269851Speter      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5873269851Speter      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5874298161Sbapt      shrext_cmds=.dll
5875298161Sbapt      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5876298161Sbapt	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5877298161Sbapt	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5878298161Sbapt	$ECHO EXPORTS >> $output_objdir/$libname.def~
5879298161Sbapt	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5880298161Sbapt	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5881298161Sbapt	emximp -o $lib $output_objdir/$libname.def'
5882298161Sbapt      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5883298161Sbapt	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5884298161Sbapt	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5885298161Sbapt	$ECHO EXPORTS >> $output_objdir/$libname.def~
5886298161Sbapt	prefix_cmds="$SED"~
5887298161Sbapt	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5888298161Sbapt	  prefix_cmds="$prefix_cmds -e 1d";
5889298161Sbapt	fi~
5890298161Sbapt	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5891298161Sbapt	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5892298161Sbapt	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5893298161Sbapt	emximp -o $lib $output_objdir/$libname.def'
5894298161Sbapt      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5895298161Sbapt      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5896251883Speter      ;;
5897251883Speter
5898251883Speter    osf3*)
5899298161Sbapt      if test yes = "$GCC"; then
5900298161Sbapt	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5901298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5902251883Speter      else
5903269851Speter	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5904298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5905251883Speter      fi
5906269851Speter      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5907298161Sbapt      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5908269851Speter      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5909251883Speter      ;;
5910251883Speter
5911251883Speter    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5912298161Sbapt      if test yes = "$GCC"; then
5913298161Sbapt	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5914298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5915298161Sbapt	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5916251883Speter      else
5917269851Speter	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5918298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5919269851Speter	_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~
5920298161Sbapt          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
5921251883Speter
5922251883Speter	# Both c and cxx compiler support -rpath directly
5923269851Speter	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5924251883Speter      fi
5925269851Speter      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5926269851Speter      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5927251883Speter      ;;
5928251883Speter
5929251883Speter    solaris*)
5930269851Speter      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5931298161Sbapt      if test yes = "$GCC"; then
5932298161Sbapt	wlarc='$wl'
5933298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5934269851Speter	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5935298161Sbapt          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5936251883Speter      else
5937269851Speter	case `$CC -V 2>&1` in
5938269851Speter	*"Compilers 5.0"*)
5939269851Speter	  wlarc=''
5940298161Sbapt	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
5941269851Speter	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5942298161Sbapt            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5943269851Speter	  ;;
5944269851Speter	*)
5945298161Sbapt	  wlarc='$wl'
5946298161Sbapt	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5947269851Speter	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5948298161Sbapt            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5949269851Speter	  ;;
5950269851Speter	esac
5951251883Speter      fi
5952269851Speter      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5953269851Speter      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5954251883Speter      case $host_os in
5955251883Speter      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5956251883Speter      *)
5957269851Speter	# The compiler driver will combine and reorder linker options,
5958298161Sbapt	# but understands '-z linker_flag'.  GCC discards it without '$wl',
5959269851Speter	# but is careful enough not to reorder.
5960269851Speter	# Supported since Solaris 2.6 (maybe 2.5.1?)
5961298161Sbapt	if test yes = "$GCC"; then
5962298161Sbapt	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
5963269851Speter	else
5964269851Speter	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5965269851Speter	fi
5966269851Speter	;;
5967251883Speter      esac
5968269851Speter      _LT_TAGVAR(link_all_deplibs, $1)=yes
5969251883Speter      ;;
5970251883Speter
5971251883Speter    sunos4*)
5972298161Sbapt      if test sequent = "$host_vendor"; then
5973251883Speter	# Use $CC to link under sequent, because it throws in some extra .o
5974251883Speter	# files that make .init and .fini sections work.
5975298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5976251883Speter      else
5977269851Speter	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5978251883Speter      fi
5979269851Speter      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5980269851Speter      _LT_TAGVAR(hardcode_direct, $1)=yes
5981269851Speter      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5982269851Speter      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5983251883Speter      ;;
5984251883Speter
5985251883Speter    sysv4)
5986251883Speter      case $host_vendor in
5987251883Speter	sni)
5988269851Speter	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5989269851Speter	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5990251883Speter	;;
5991251883Speter	siemens)
5992251883Speter	  ## LD is ld it makes a PLAMLIB
5993251883Speter	  ## CC just makes a GrossModule.
5994269851Speter	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5995269851Speter	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5996269851Speter	  _LT_TAGVAR(hardcode_direct, $1)=no
5997251883Speter        ;;
5998251883Speter	motorola)
5999269851Speter	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6000269851Speter	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6001251883Speter	;;
6002251883Speter      esac
6003251883Speter      runpath_var='LD_RUN_PATH'
6004269851Speter      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6005251883Speter      ;;
6006251883Speter
6007251883Speter    sysv4.3*)
6008269851Speter      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6009269851Speter      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6010269851Speter      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6011251883Speter      ;;
6012251883Speter
6013251883Speter    sysv4*MP*)
6014251883Speter      if test -d /usr/nec; then
6015269851Speter	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6016269851Speter	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6017251883Speter	runpath_var=LD_RUN_PATH
6018251883Speter	hardcode_runpath_var=yes
6019269851Speter	_LT_TAGVAR(ld_shlibs, $1)=yes
6020251883Speter      fi
6021251883Speter      ;;
6022251883Speter
6023269851Speter    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6024298161Sbapt      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6025269851Speter      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6026269851Speter      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6027251883Speter      runpath_var='LD_RUN_PATH'
6028251883Speter
6029298161Sbapt      if test yes = "$GCC"; then
6030298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6031298161Sbapt	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6032251883Speter      else
6033298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6034298161Sbapt	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6035251883Speter      fi
6036251883Speter      ;;
6037251883Speter
6038251883Speter    sysv5* | sco3.2v5* | sco5v6*)
6039298161Sbapt      # Note: We CANNOT use -z defs as we might desire, because we do not
6040251883Speter      # link with -lc, and that would cause any symbols used from libc to
6041251883Speter      # always be unresolved, which means just about no library would
6042251883Speter      # ever link correctly.  If we're not using GNU ld we use -z text
6043251883Speter      # though, which does catch some bad symbols but isn't as heavy-handed
6044251883Speter      # as -z defs.
6045298161Sbapt      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6046298161Sbapt      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6047269851Speter      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6048269851Speter      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6049298161Sbapt      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6050269851Speter      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6051269851Speter      _LT_TAGVAR(link_all_deplibs, $1)=yes
6052298161Sbapt      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6053251883Speter      runpath_var='LD_RUN_PATH'
6054251883Speter
6055298161Sbapt      if test yes = "$GCC"; then
6056298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6057298161Sbapt	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6058251883Speter      else
6059298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6060298161Sbapt	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6061251883Speter      fi
6062251883Speter      ;;
6063251883Speter
6064251883Speter    uts4*)
6065269851Speter      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6066269851Speter      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6067269851Speter      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6068251883Speter      ;;
6069251883Speter
6070251883Speter    *)
6071269851Speter      _LT_TAGVAR(ld_shlibs, $1)=no
6072251883Speter      ;;
6073251883Speter    esac
6074269851Speter
6075298161Sbapt    if test sni = "$host_vendor"; then
6076269851Speter      case $host in
6077269851Speter      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6078298161Sbapt	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6079269851Speter	;;
6080269851Speter      esac
6081269851Speter    fi
6082251883Speter  fi
6083251883Speter])
6084269851SpeterAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6085298161Sbapttest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6086251883Speter
6087269851Speter_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6088269851Speter
6089269851Speter_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6090269851Speter_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6091269851Speter_LT_DECL([], [extract_expsyms_cmds], [2],
6092269851Speter    [The commands to extract the exported symbol list from a shared archive])
6093269851Speter
6094251883Speter#
6095251883Speter# Do we need to explicitly link libc?
6096251883Speter#
6097269851Spetercase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6098251883Speterx|xyes)
6099251883Speter  # Assume -lc should be added
6100269851Speter  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6101251883Speter
6102298161Sbapt  if test yes,yes = "$GCC,$enable_shared"; then
6103269851Speter    case $_LT_TAGVAR(archive_cmds, $1) in
6104251883Speter    *'~'*)
6105251883Speter      # FIXME: we may have to deal with multi-command sequences.
6106251883Speter      ;;
6107251883Speter    '$CC '*)
6108251883Speter      # Test whether the compiler implicitly links with -lc since on some
6109251883Speter      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6110251883Speter      # to ld, don't add -lc before -lgcc.
6111269851Speter      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6112269851Speter	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6113269851Speter	[$RM conftest*
6114269851Speter	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6115251883Speter
6116269851Speter	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6117269851Speter	  soname=conftest
6118269851Speter	  lib=conftest
6119269851Speter	  libobjs=conftest.$ac_objext
6120269851Speter	  deplibs=
6121269851Speter	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6122269851Speter	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6123269851Speter	  compiler_flags=-v
6124269851Speter	  linker_flags=-v
6125269851Speter	  verstring=
6126269851Speter	  output_objdir=.
6127269851Speter	  libname=conftest
6128269851Speter	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6129269851Speter	  _LT_TAGVAR(allow_undefined_flag, $1)=
6130269851Speter	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6131269851Speter	  then
6132269851Speter	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6133269851Speter	  else
6134269851Speter	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6135269851Speter	  fi
6136269851Speter	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6137269851Speter	else
6138269851Speter	  cat conftest.err 1>&5
6139269851Speter	fi
6140269851Speter	$RM conftest*
6141269851Speter	])
6142269851Speter      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6143269851Speter      ;;
6144269851Speter    esac
6145269851Speter  fi
6146269851Speter  ;;
6147269851Speteresac
6148269851Speter
6149269851Speter_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6150269851Speter    [Whether or not to add -lc for building shared libraries])
6151269851Speter_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6152269851Speter    [enable_shared_with_static_runtimes], [0],
6153269851Speter    [Whether or not to disallow shared libs when runtime libs are static])
6154269851Speter_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6155269851Speter    [Compiler flag to allow reflexive dlopens])
6156269851Speter_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6157269851Speter    [Compiler flag to generate shared objects directly from archives])
6158269851Speter_LT_TAGDECL([], [compiler_needs_object], [1],
6159269851Speter    [Whether the compiler copes with passing no objects directly])
6160269851Speter_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6161269851Speter    [Create an old-style archive from a shared archive])
6162269851Speter_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6163269851Speter    [Create a temporary old-style archive to link instead of a shared archive])
6164269851Speter_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6165269851Speter_LT_TAGDECL([], [archive_expsym_cmds], [2])
6166269851Speter_LT_TAGDECL([], [module_cmds], [2],
6167269851Speter    [Commands used to build a loadable module if different from building
6168269851Speter    a shared archive.])
6169269851Speter_LT_TAGDECL([], [module_expsym_cmds], [2])
6170269851Speter_LT_TAGDECL([], [with_gnu_ld], [1],
6171269851Speter    [Whether we are building with GNU ld or not])
6172269851Speter_LT_TAGDECL([], [allow_undefined_flag], [1],
6173269851Speter    [Flag that allows shared libraries with undefined symbols to be built])
6174269851Speter_LT_TAGDECL([], [no_undefined_flag], [1],
6175269851Speter    [Flag that enforces no undefined symbols])
6176269851Speter_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6177269851Speter    [Flag to hardcode $libdir into a binary during linking.
6178269851Speter    This must work even if $libdir does not exist])
6179269851Speter_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6180269851Speter    [Whether we need a single "-rpath" flag with a separated argument])
6181269851Speter_LT_TAGDECL([], [hardcode_direct], [0],
6182298161Sbapt    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6183269851Speter    DIR into the resulting binary])
6184269851Speter_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6185298161Sbapt    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6186269851Speter    DIR into the resulting binary and the resulting library dependency is
6187298161Sbapt    "absolute", i.e impossible to change by setting $shlibpath_var if the
6188269851Speter    library is relocated])
6189269851Speter_LT_TAGDECL([], [hardcode_minus_L], [0],
6190269851Speter    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6191269851Speter    into the resulting binary])
6192269851Speter_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6193269851Speter    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6194269851Speter    into the resulting binary])
6195269851Speter_LT_TAGDECL([], [hardcode_automatic], [0],
6196269851Speter    [Set to "yes" if building a shared library automatically hardcodes DIR
6197269851Speter    into the library and all subsequent libraries and executables linked
6198269851Speter    against it])
6199269851Speter_LT_TAGDECL([], [inherit_rpath], [0],
6200269851Speter    [Set to yes if linker adds runtime paths of dependent libraries
6201269851Speter    to runtime path list])
6202269851Speter_LT_TAGDECL([], [link_all_deplibs], [0],
6203269851Speter    [Whether libtool must link a program against all its dependency libraries])
6204269851Speter_LT_TAGDECL([], [always_export_symbols], [0],
6205269851Speter    [Set to "yes" if exported symbols are required])
6206269851Speter_LT_TAGDECL([], [export_symbols_cmds], [2],
6207269851Speter    [The commands to list exported symbols])
6208269851Speter_LT_TAGDECL([], [exclude_expsyms], [1],
6209269851Speter    [Symbols that should not be listed in the preloaded symbols])
6210269851Speter_LT_TAGDECL([], [include_expsyms], [1],
6211269851Speter    [Symbols that must always be exported])
6212269851Speter_LT_TAGDECL([], [prelink_cmds], [2],
6213269851Speter    [Commands necessary for linking programs (against libraries) with templates])
6214269851Speter_LT_TAGDECL([], [postlink_cmds], [2],
6215269851Speter    [Commands necessary for finishing linking programs])
6216269851Speter_LT_TAGDECL([], [file_list_spec], [1],
6217269851Speter    [Specify filename containing input files])
6218269851Speterdnl FIXME: Not yet implemented
6219269851Speterdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6220269851Speterdnl    [Compiler flag to generate thread safe objects])
6221269851Speter])# _LT_LINKER_SHLIBS
6222269851Speter
6223269851Speter
6224269851Speter# _LT_LANG_C_CONFIG([TAG])
6225269851Speter# ------------------------
6226269851Speter# Ensure that the configuration variables for a C compiler are suitably
6227269851Speter# defined.  These variables are subsequently used by _LT_CONFIG to write
6228298161Sbapt# the compiler configuration to 'libtool'.
6229269851Speterm4_defun([_LT_LANG_C_CONFIG],
6230269851Speter[m4_require([_LT_DECL_EGREP])dnl
6231298161Sbaptlt_save_CC=$CC
6232269851SpeterAC_LANG_PUSH(C)
6233269851Speter
6234269851Speter# Source file extension for C test sources.
6235269851Speterac_ext=c
6236269851Speter
6237269851Speter# Object file extension for compiled C test sources.
6238269851Speterobjext=o
6239269851Speter_LT_TAGVAR(objext, $1)=$objext
6240269851Speter
6241269851Speter# Code to be used in simple compile tests
6242269851Speterlt_simple_compile_test_code="int some_variable = 0;"
6243269851Speter
6244269851Speter# Code to be used in simple link tests
6245269851Speterlt_simple_link_test_code='int main(){return(0);}'
6246269851Speter
6247269851Speter_LT_TAG_COMPILER
6248269851Speter# Save the default compiler, since it gets overwritten when the other
6249269851Speter# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6250269851Spetercompiler_DEFAULT=$CC
6251269851Speter
6252269851Speter# save warnings/boilerplate of simple test code
6253269851Speter_LT_COMPILER_BOILERPLATE
6254269851Speter_LT_LINKER_BOILERPLATE
6255269851Speter
6256269851Speterif test -n "$compiler"; then
6257269851Speter  _LT_COMPILER_NO_RTTI($1)
6258269851Speter  _LT_COMPILER_PIC($1)
6259269851Speter  _LT_COMPILER_C_O($1)
6260269851Speter  _LT_COMPILER_FILE_LOCKS($1)
6261269851Speter  _LT_LINKER_SHLIBS($1)
6262269851Speter  _LT_SYS_DYNAMIC_LINKER($1)
6263269851Speter  _LT_LINKER_HARDCODE_LIBPATH($1)
6264269851Speter  LT_SYS_DLOPEN_SELF
6265269851Speter  _LT_CMD_STRIPLIB
6266269851Speter
6267298161Sbapt  # Report what library types will actually be built
6268269851Speter  AC_MSG_CHECKING([if libtool supports shared libraries])
6269269851Speter  AC_MSG_RESULT([$can_build_shared])
6270269851Speter
6271269851Speter  AC_MSG_CHECKING([whether to build shared libraries])
6272298161Sbapt  test no = "$can_build_shared" && enable_shared=no
6273269851Speter
6274269851Speter  # On AIX, shared libraries and static libraries use the same namespace, and
6275269851Speter  # are all built from PIC.
6276269851Speter  case $host_os in
6277269851Speter  aix3*)
6278298161Sbapt    test yes = "$enable_shared" && enable_static=no
6279269851Speter    if test -n "$RANLIB"; then
6280269851Speter      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6281269851Speter      postinstall_cmds='$RANLIB $lib'
6282269851Speter    fi
6283269851Speter    ;;
6284269851Speter
6285269851Speter  aix[[4-9]]*)
6286298161Sbapt    if test ia64 != "$host_cpu"; then
6287298161Sbapt      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6288298161Sbapt      yes,aix,yes) ;;			# shared object as lib.so file only
6289298161Sbapt      yes,svr4,*) ;;			# shared object as lib.so archive member only
6290298161Sbapt      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
6291298161Sbapt      esac
6292269851Speter    fi
6293269851Speter    ;;
6294269851Speter  esac
6295269851Speter  AC_MSG_RESULT([$enable_shared])
6296269851Speter
6297269851Speter  AC_MSG_CHECKING([whether to build static libraries])
6298269851Speter  # Make sure either enable_shared or enable_static is yes.
6299298161Sbapt  test yes = "$enable_shared" || enable_static=yes
6300269851Speter  AC_MSG_RESULT([$enable_static])
6301269851Speter
6302269851Speter  _LT_CONFIG($1)
6303269851Speterfi
6304269851SpeterAC_LANG_POP
6305298161SbaptCC=$lt_save_CC
6306269851Speter])# _LT_LANG_C_CONFIG
6307269851Speter
6308269851Speter
6309269851Speter# _LT_LANG_CXX_CONFIG([TAG])
6310269851Speter# --------------------------
6311269851Speter# Ensure that the configuration variables for a C++ compiler are suitably
6312269851Speter# defined.  These variables are subsequently used by _LT_CONFIG to write
6313298161Sbapt# the compiler configuration to 'libtool'.
6314269851Speterm4_defun([_LT_LANG_CXX_CONFIG],
6315269851Speter[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6316269851Speterm4_require([_LT_DECL_EGREP])dnl
6317269851Speterm4_require([_LT_PATH_MANIFEST_TOOL])dnl
6318298161Sbaptif test -n "$CXX" && ( test no != "$CXX" &&
6319298161Sbapt    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6320298161Sbapt    (test g++ != "$CXX"))); then
6321269851Speter  AC_PROG_CXXCPP
6322269851Speterelse
6323269851Speter  _lt_caught_CXX_error=yes
6324269851Speterfi
6325269851Speter
6326269851SpeterAC_LANG_PUSH(C++)
6327269851Speter_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6328269851Speter_LT_TAGVAR(allow_undefined_flag, $1)=
6329269851Speter_LT_TAGVAR(always_export_symbols, $1)=no
6330269851Speter_LT_TAGVAR(archive_expsym_cmds, $1)=
6331269851Speter_LT_TAGVAR(compiler_needs_object, $1)=no
6332269851Speter_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6333269851Speter_LT_TAGVAR(hardcode_direct, $1)=no
6334269851Speter_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6335269851Speter_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6336269851Speter_LT_TAGVAR(hardcode_libdir_separator, $1)=
6337269851Speter_LT_TAGVAR(hardcode_minus_L, $1)=no
6338269851Speter_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6339269851Speter_LT_TAGVAR(hardcode_automatic, $1)=no
6340269851Speter_LT_TAGVAR(inherit_rpath, $1)=no
6341269851Speter_LT_TAGVAR(module_cmds, $1)=
6342269851Speter_LT_TAGVAR(module_expsym_cmds, $1)=
6343269851Speter_LT_TAGVAR(link_all_deplibs, $1)=unknown
6344269851Speter_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6345269851Speter_LT_TAGVAR(reload_flag, $1)=$reload_flag
6346269851Speter_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6347269851Speter_LT_TAGVAR(no_undefined_flag, $1)=
6348269851Speter_LT_TAGVAR(whole_archive_flag_spec, $1)=
6349269851Speter_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6350269851Speter
6351269851Speter# Source file extension for C++ test sources.
6352269851Speterac_ext=cpp
6353269851Speter
6354269851Speter# Object file extension for compiled C++ test sources.
6355269851Speterobjext=o
6356269851Speter_LT_TAGVAR(objext, $1)=$objext
6357269851Speter
6358269851Speter# No sense in running all these tests if we already determined that
6359269851Speter# the CXX compiler isn't working.  Some variables (like enable_shared)
6360269851Speter# are currently assumed to apply to all compilers on this platform,
6361269851Speter# and will be corrupted by setting them based on a non-working compiler.
6362298161Sbaptif test yes != "$_lt_caught_CXX_error"; then
6363269851Speter  # Code to be used in simple compile tests
6364269851Speter  lt_simple_compile_test_code="int some_variable = 0;"
6365269851Speter
6366269851Speter  # Code to be used in simple link tests
6367269851Speter  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6368269851Speter
6369269851Speter  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6370269851Speter  _LT_TAG_COMPILER
6371269851Speter
6372269851Speter  # save warnings/boilerplate of simple test code
6373269851Speter  _LT_COMPILER_BOILERPLATE
6374269851Speter  _LT_LINKER_BOILERPLATE
6375269851Speter
6376269851Speter  # Allow CC to be a program name with arguments.
6377269851Speter  lt_save_CC=$CC
6378269851Speter  lt_save_CFLAGS=$CFLAGS
6379269851Speter  lt_save_LD=$LD
6380269851Speter  lt_save_GCC=$GCC
6381269851Speter  GCC=$GXX
6382269851Speter  lt_save_with_gnu_ld=$with_gnu_ld
6383269851Speter  lt_save_path_LD=$lt_cv_path_LD
6384269851Speter  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6385269851Speter    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6386269851Speter  else
6387269851Speter    $as_unset lt_cv_prog_gnu_ld
6388269851Speter  fi
6389269851Speter  if test -n "${lt_cv_path_LDCXX+set}"; then
6390269851Speter    lt_cv_path_LD=$lt_cv_path_LDCXX
6391269851Speter  else
6392269851Speter    $as_unset lt_cv_path_LD
6393269851Speter  fi
6394269851Speter  test -z "${LDCXX+set}" || LD=$LDCXX
6395269851Speter  CC=${CXX-"c++"}
6396269851Speter  CFLAGS=$CXXFLAGS
6397269851Speter  compiler=$CC
6398269851Speter  _LT_TAGVAR(compiler, $1)=$CC
6399269851Speter  _LT_CC_BASENAME([$compiler])
6400269851Speter
6401269851Speter  if test -n "$compiler"; then
6402269851Speter    # We don't want -fno-exception when compiling C++ code, so set the
6403269851Speter    # no_builtin_flag separately
6404298161Sbapt    if test yes = "$GXX"; then
6405269851Speter      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6406269851Speter    else
6407269851Speter      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6408269851Speter    fi
6409269851Speter
6410298161Sbapt    if test yes = "$GXX"; then
6411269851Speter      # Set up default GNU C++ configuration
6412269851Speter
6413269851Speter      LT_PATH_LD
6414269851Speter
6415269851Speter      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6416269851Speter      # archiving commands below assume that GNU ld is being used.
6417298161Sbapt      if test yes = "$with_gnu_ld"; then
6418298161Sbapt        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6419298161Sbapt        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
6420269851Speter
6421298161Sbapt        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6422298161Sbapt        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6423269851Speter
6424269851Speter        # If archive_cmds runs LD, not CC, wlarc should be empty
6425269851Speter        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6426269851Speter        #     investigate it a little bit more. (MM)
6427298161Sbapt        wlarc='$wl'
6428269851Speter
6429269851Speter        # ancient GNU ld didn't support --whole-archive et. al.
6430269851Speter        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6431269851Speter	  $GREP 'no-whole-archive' > /dev/null; then
6432298161Sbapt          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6433251883Speter        else
6434269851Speter          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6435251883Speter        fi
6436251883Speter      else
6437269851Speter        with_gnu_ld=no
6438269851Speter        wlarc=
6439269851Speter
6440269851Speter        # A generic and very simple default shared library creation
6441269851Speter        # command for GNU C++ for the case where it uses the native
6442269851Speter        # linker, instead of GNU ld.  If possible, this setting should
6443269851Speter        # overridden to take advantage of the native linker features on
6444269851Speter        # the platform it is being used on.
6445269851Speter        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6446251883Speter      fi
6447269851Speter
6448269851Speter      # Commands to make compiler produce verbose output that lists
6449269851Speter      # what "hidden" libraries, object files and flags are used when
6450269851Speter      # linking a shared library.
6451269851Speter      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6452269851Speter
6453269851Speter    else
6454269851Speter      GXX=no
6455269851Speter      with_gnu_ld=no
6456269851Speter      wlarc=
6457269851Speter    fi
6458269851Speter
6459269851Speter    # PORTME: fill in a description of your system's C++ link characteristics
6460269851Speter    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6461269851Speter    _LT_TAGVAR(ld_shlibs, $1)=yes
6462269851Speter    case $host_os in
6463269851Speter      aix3*)
6464269851Speter        # FIXME: insert proper C++ library support
6465269851Speter        _LT_TAGVAR(ld_shlibs, $1)=no
6466269851Speter        ;;
6467269851Speter      aix[[4-9]]*)
6468298161Sbapt        if test ia64 = "$host_cpu"; then
6469269851Speter          # On IA64, the linker does run time linking by default, so we don't
6470269851Speter          # have to do anything special.
6471269851Speter          aix_use_runtimelinking=no
6472269851Speter          exp_sym_flag='-Bexport'
6473298161Sbapt          no_entry_flag=
6474269851Speter        else
6475269851Speter          aix_use_runtimelinking=no
6476269851Speter
6477269851Speter          # Test if we are trying to use run time linking or normal
6478269851Speter          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6479298161Sbapt          # have runtime linking enabled, and use it for executables.
6480298161Sbapt          # For shared libraries, we enable/disable runtime linking
6481298161Sbapt          # depending on the kind of the shared library created -
6482298161Sbapt          # when "with_aix_soname,aix_use_runtimelinking" is:
6483298161Sbapt          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
6484298161Sbapt          # "aix,yes"  lib.so          shared, rtl:yes, for executables
6485298161Sbapt          #            lib.a           static archive
6486298161Sbapt          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
6487298161Sbapt          #            lib.a(lib.so.V) shared, rtl:no,  for executables
6488298161Sbapt          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6489298161Sbapt          #            lib.a(lib.so.V) shared, rtl:no
6490298161Sbapt          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
6491298161Sbapt          #            lib.a           static archive
6492269851Speter          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6493269851Speter	    for ld_flag in $LDFLAGS; do
6494269851Speter	      case $ld_flag in
6495269851Speter	      *-brtl*)
6496269851Speter	        aix_use_runtimelinking=yes
6497269851Speter	        break
6498269851Speter	        ;;
6499269851Speter	      esac
6500269851Speter	    done
6501298161Sbapt	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6502298161Sbapt	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
6503298161Sbapt	      # so we don't have lib.a shared libs to link our executables.
6504298161Sbapt	      # We have to force runtime linking in this case.
6505298161Sbapt	      aix_use_runtimelinking=yes
6506298161Sbapt	      LDFLAGS="$LDFLAGS -Wl,-brtl"
6507298161Sbapt	    fi
6508269851Speter	    ;;
6509269851Speter          esac
6510269851Speter
6511269851Speter          exp_sym_flag='-bexport'
6512269851Speter          no_entry_flag='-bnoentry'
6513269851Speter        fi
6514269851Speter
6515269851Speter        # When large executables or shared objects are built, AIX ld can
6516269851Speter        # have problems creating the table of contents.  If linking a library
6517269851Speter        # or program results in "error TOC overflow" add -mminimal-toc to
6518269851Speter        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6519269851Speter        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6520269851Speter
6521269851Speter        _LT_TAGVAR(archive_cmds, $1)=''
6522269851Speter        _LT_TAGVAR(hardcode_direct, $1)=yes
6523269851Speter        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6524269851Speter        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6525269851Speter        _LT_TAGVAR(link_all_deplibs, $1)=yes
6526298161Sbapt        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6527298161Sbapt        case $with_aix_soname,$aix_use_runtimelinking in
6528298161Sbapt        aix,*) ;;	# no import file
6529298161Sbapt        svr4,* | *,yes) # use import file
6530298161Sbapt          # The Import File defines what to hardcode.
6531298161Sbapt          _LT_TAGVAR(hardcode_direct, $1)=no
6532298161Sbapt          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6533298161Sbapt          ;;
6534298161Sbapt        esac
6535269851Speter
6536298161Sbapt        if test yes = "$GXX"; then
6537269851Speter          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6538269851Speter          # We only want to do this on AIX 4.2 and lower, the check
6539269851Speter          # below for broken collect2 doesn't work under 4.3+
6540298161Sbapt	  collect2name=`$CC -print-prog-name=collect2`
6541269851Speter	  if test -f "$collect2name" &&
6542269851Speter	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6543269851Speter	  then
6544269851Speter	    # We have reworked collect2
6545269851Speter	    :
6546269851Speter	  else
6547269851Speter	    # We have old collect2
6548269851Speter	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6549269851Speter	    # It fails to find uninstalled libraries when the uninstalled
6550269851Speter	    # path is not listed in the libpath.  Setting hardcode_minus_L
6551269851Speter	    # to unsupported forces relinking
6552269851Speter	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6553269851Speter	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6554269851Speter	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6555269851Speter	  fi
6556269851Speter          esac
6557269851Speter          shared_flag='-shared'
6558298161Sbapt	  if test yes = "$aix_use_runtimelinking"; then
6559298161Sbapt	    shared_flag=$shared_flag' $wl-G'
6560269851Speter	  fi
6561298161Sbapt	  # Need to ensure runtime linking is disabled for the traditional
6562298161Sbapt	  # shared library, or the linker may eventually find shared libraries
6563298161Sbapt	  # /with/ Import File - we do not want to mix them.
6564298161Sbapt	  shared_flag_aix='-shared'
6565298161Sbapt	  shared_flag_svr4='-shared $wl-G'
6566269851Speter        else
6567269851Speter          # not using gcc
6568298161Sbapt          if test ia64 = "$host_cpu"; then
6569269851Speter	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6570269851Speter	  # chokes on -Wl,-G. The following line is correct:
6571269851Speter	  shared_flag='-G'
6572269851Speter          else
6573298161Sbapt	    if test yes = "$aix_use_runtimelinking"; then
6574298161Sbapt	      shared_flag='$wl-G'
6575269851Speter	    else
6576298161Sbapt	      shared_flag='$wl-bM:SRE'
6577269851Speter	    fi
6578298161Sbapt	    shared_flag_aix='$wl-bM:SRE'
6579298161Sbapt	    shared_flag_svr4='$wl-G'
6580269851Speter          fi
6581269851Speter        fi
6582269851Speter
6583298161Sbapt        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6584269851Speter        # It seems that -bexpall does not export symbols beginning with
6585269851Speter        # underscore (_), so it is better to generate a list of symbols to
6586269851Speter	# export.
6587269851Speter        _LT_TAGVAR(always_export_symbols, $1)=yes
6588298161Sbapt	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6589269851Speter          # Warning - without using the other runtime loading flags (-brtl),
6590269851Speter          # -berok will link without error, but may produce a broken library.
6591298161Sbapt          # The "-G" linker flag allows undefined symbols.
6592298161Sbapt          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
6593269851Speter          # Determine the default libpath from the value encoded in an empty
6594269851Speter          # executable.
6595269851Speter          _LT_SYS_MODULE_PATH_AIX([$1])
6596298161Sbapt          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6597269851Speter
6598298161Sbapt          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
6599269851Speter        else
6600298161Sbapt          if test ia64 = "$host_cpu"; then
6601298161Sbapt	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6602269851Speter	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6603298161Sbapt	    _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"
6604269851Speter          else
6605269851Speter	    # Determine the default libpath from the value encoded in an
6606269851Speter	    # empty executable.
6607269851Speter	    _LT_SYS_MODULE_PATH_AIX([$1])
6608298161Sbapt	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6609269851Speter	    # Warning - without using the other run time loading flags,
6610269851Speter	    # -berok will link without error, but may produce a broken library.
6611298161Sbapt	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6612298161Sbapt	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6613298161Sbapt	    if test yes = "$with_gnu_ld"; then
6614269851Speter	      # We only use this code for GNU lds that support --whole-archive.
6615298161Sbapt	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6616269851Speter	    else
6617269851Speter	      # Exported symbols can be pulled into shared objects from archives
6618269851Speter	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6619269851Speter	    fi
6620269851Speter	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6621298161Sbapt	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6622298161Sbapt	    # -brtl affects multiple linker settings, -berok does not and is overridden later
6623298161Sbapt	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6624298161Sbapt	    if test svr4 != "$with_aix_soname"; then
6625298161Sbapt	      # This is similar to how AIX traditionally builds its shared
6626298161Sbapt	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6627298161Sbapt	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
6628298161Sbapt	    fi
6629298161Sbapt	    if test aix != "$with_aix_soname"; then
6630298161Sbapt	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
6631298161Sbapt	    else
6632298161Sbapt	      # used by -dlpreopen to get the symbols
6633298161Sbapt	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
6634298161Sbapt	    fi
6635298161Sbapt	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6636269851Speter          fi
6637269851Speter        fi
6638269851Speter        ;;
6639269851Speter
6640269851Speter      beos*)
6641269851Speter	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6642269851Speter	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6643269851Speter	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6644269851Speter	  # support --undefined.  This deserves some investigation.  FIXME
6645298161Sbapt	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6646269851Speter	else
6647269851Speter	  _LT_TAGVAR(ld_shlibs, $1)=no
6648269851Speter	fi
6649269851Speter	;;
6650269851Speter
6651269851Speter      chorus*)
6652269851Speter        case $cc_basename in
6653269851Speter          *)
6654269851Speter	  # FIXME: insert proper C++ library support
6655269851Speter	  _LT_TAGVAR(ld_shlibs, $1)=no
6656269851Speter	  ;;
6657269851Speter        esac
6658269851Speter        ;;
6659269851Speter
6660269851Speter      cygwin* | mingw* | pw32* | cegcc*)
6661269851Speter	case $GXX,$cc_basename in
6662269851Speter	,cl* | no,cl*)
6663269851Speter	  # Native MSVC
6664269851Speter	  # hardcode_libdir_flag_spec is actually meaningless, as there is
6665269851Speter	  # no search path for DLLs.
6666269851Speter	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6667269851Speter	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6668269851Speter	  _LT_TAGVAR(always_export_symbols, $1)=yes
6669269851Speter	  _LT_TAGVAR(file_list_spec, $1)='@'
6670269851Speter	  # Tell ltmain to make .lib files, not .a files.
6671269851Speter	  libext=lib
6672269851Speter	  # Tell ltmain to make .dll files, not .so files.
6673298161Sbapt	  shrext_cmds=.dll
6674269851Speter	  # FIXME: Setting linknames here is a bad hack.
6675298161Sbapt	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6676298161Sbapt	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6677298161Sbapt              cp "$export_symbols" "$output_objdir/$soname.def";
6678298161Sbapt              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6679298161Sbapt            else
6680298161Sbapt              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6681298161Sbapt            fi~
6682298161Sbapt            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6683298161Sbapt            linknames='
6684269851Speter	  # The linker will not automatically build a static lib if we build a DLL.
6685269851Speter	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6686269851Speter	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6687269851Speter	  # Don't use ranlib
6688269851Speter	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6689269851Speter	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6690298161Sbapt            lt_tool_outputfile="@TOOL_OUTPUT@"~
6691298161Sbapt            case $lt_outputfile in
6692298161Sbapt              *.exe|*.EXE) ;;
6693298161Sbapt              *)
6694298161Sbapt                lt_outputfile=$lt_outputfile.exe
6695298161Sbapt                lt_tool_outputfile=$lt_tool_outputfile.exe
6696298161Sbapt                ;;
6697298161Sbapt            esac~
6698298161Sbapt            func_to_tool_file "$lt_outputfile"~
6699298161Sbapt            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6700298161Sbapt              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6701298161Sbapt              $RM "$lt_outputfile.manifest";
6702298161Sbapt            fi'
6703269851Speter	  ;;
6704269851Speter	*)
6705269851Speter	  # g++
6706269851Speter	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6707269851Speter	  # as there is no search path for DLLs.
6708269851Speter	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6709298161Sbapt	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6710269851Speter	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6711269851Speter	  _LT_TAGVAR(always_export_symbols, $1)=no
6712269851Speter	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6713269851Speter
6714269851Speter	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6715298161Sbapt	    _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'
6716298161Sbapt	    # If the export-symbols file already is a .def file, use it as
6717298161Sbapt	    # is; otherwise, prepend EXPORTS...
6718298161Sbapt	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6719298161Sbapt              cp $export_symbols $output_objdir/$soname.def;
6720298161Sbapt            else
6721298161Sbapt              echo EXPORTS > $output_objdir/$soname.def;
6722298161Sbapt              cat $export_symbols >> $output_objdir/$soname.def;
6723298161Sbapt            fi~
6724298161Sbapt            $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'
6725269851Speter	  else
6726269851Speter	    _LT_TAGVAR(ld_shlibs, $1)=no
6727269851Speter	  fi
6728269851Speter	  ;;
6729269851Speter	esac
6730269851Speter	;;
6731269851Speter      darwin* | rhapsody*)
6732269851Speter        _LT_DARWIN_LINKER_FEATURES($1)
6733269851Speter	;;
6734269851Speter
6735298161Sbapt      os2*)
6736298161Sbapt	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6737298161Sbapt	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6738298161Sbapt	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6739298161Sbapt	shrext_cmds=.dll
6740298161Sbapt	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6741298161Sbapt	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6742298161Sbapt	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6743298161Sbapt	  $ECHO EXPORTS >> $output_objdir/$libname.def~
6744298161Sbapt	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6745298161Sbapt	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6746298161Sbapt	  emximp -o $lib $output_objdir/$libname.def'
6747298161Sbapt	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6748298161Sbapt	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6749298161Sbapt	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6750298161Sbapt	  $ECHO EXPORTS >> $output_objdir/$libname.def~
6751298161Sbapt	  prefix_cmds="$SED"~
6752298161Sbapt	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
6753298161Sbapt	    prefix_cmds="$prefix_cmds -e 1d";
6754298161Sbapt	  fi~
6755298161Sbapt	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6756298161Sbapt	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6757298161Sbapt	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6758298161Sbapt	  emximp -o $lib $output_objdir/$libname.def'
6759298161Sbapt	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6760298161Sbapt	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6761298161Sbapt	;;
6762298161Sbapt
6763269851Speter      dgux*)
6764269851Speter        case $cc_basename in
6765269851Speter          ec++*)
6766269851Speter	    # FIXME: insert proper C++ library support
6767269851Speter	    _LT_TAGVAR(ld_shlibs, $1)=no
6768269851Speter	    ;;
6769269851Speter          ghcx*)
6770269851Speter	    # Green Hills C++ Compiler
6771269851Speter	    # FIXME: insert proper C++ library support
6772269851Speter	    _LT_TAGVAR(ld_shlibs, $1)=no
6773269851Speter	    ;;
6774269851Speter          *)
6775269851Speter	    # FIXME: insert proper C++ library support
6776269851Speter	    _LT_TAGVAR(ld_shlibs, $1)=no
6777269851Speter	    ;;
6778269851Speter        esac
6779269851Speter        ;;
6780269851Speter
6781269851Speter      freebsd2.*)
6782269851Speter        # C++ shared libraries reported to be fairly broken before
6783269851Speter	# switch to ELF
6784269851Speter        _LT_TAGVAR(ld_shlibs, $1)=no
6785269851Speter        ;;
6786269851Speter
6787269851Speter      freebsd-elf*)
6788269851Speter        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6789269851Speter        ;;
6790269851Speter
6791269851Speter      freebsd* | dragonfly*)
6792269851Speter        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6793269851Speter        # conventions
6794269851Speter        _LT_TAGVAR(ld_shlibs, $1)=yes
6795269851Speter        ;;
6796269851Speter
6797269851Speter      haiku*)
6798298161Sbapt        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6799269851Speter        _LT_TAGVAR(link_all_deplibs, $1)=yes
6800269851Speter        ;;
6801269851Speter
6802269851Speter      hpux9*)
6803298161Sbapt        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6804269851Speter        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6805298161Sbapt        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6806269851Speter        _LT_TAGVAR(hardcode_direct, $1)=yes
6807269851Speter        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6808269851Speter				             # but as the default
6809269851Speter				             # location of the library.
6810269851Speter
6811269851Speter        case $cc_basename in
6812269851Speter          CC*)
6813269851Speter            # FIXME: insert proper C++ library support
6814269851Speter            _LT_TAGVAR(ld_shlibs, $1)=no
6815269851Speter            ;;
6816269851Speter          aCC*)
6817298161Sbapt            _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6818269851Speter            # Commands to make compiler produce verbose output that lists
6819269851Speter            # what "hidden" libraries, object files and flags are used when
6820269851Speter            # linking a shared library.
6821269851Speter            #
6822269851Speter            # There doesn't appear to be a way to prevent this compiler from
6823269851Speter            # explicitly linking system object files so we need to strip them
6824269851Speter            # from the output so that they don't get included in the library
6825269851Speter            # dependencies.
6826298161Sbapt            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; func_echo_all "$list"'
6827269851Speter            ;;
6828269851Speter          *)
6829298161Sbapt            if test yes = "$GXX"; then
6830298161Sbapt              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6831269851Speter            else
6832269851Speter              # FIXME: insert proper C++ library support
6833269851Speter              _LT_TAGVAR(ld_shlibs, $1)=no
6834269851Speter            fi
6835269851Speter            ;;
6836269851Speter        esac
6837269851Speter        ;;
6838269851Speter
6839269851Speter      hpux10*|hpux11*)
6840298161Sbapt        if test no = "$with_gnu_ld"; then
6841298161Sbapt	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6842269851Speter	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6843269851Speter
6844269851Speter          case $host_cpu in
6845269851Speter            hppa*64*|ia64*)
6846269851Speter              ;;
6847269851Speter            *)
6848298161Sbapt	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6849269851Speter              ;;
6850269851Speter          esac
6851269851Speter        fi
6852269851Speter        case $host_cpu in
6853269851Speter          hppa*64*|ia64*)
6854269851Speter            _LT_TAGVAR(hardcode_direct, $1)=no
6855269851Speter            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6856269851Speter            ;;
6857269851Speter          *)
6858269851Speter            _LT_TAGVAR(hardcode_direct, $1)=yes
6859269851Speter            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6860269851Speter            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6861269851Speter					         # but as the default
6862269851Speter					         # location of the library.
6863269851Speter            ;;
6864269851Speter        esac
6865269851Speter
6866269851Speter        case $cc_basename in
6867269851Speter          CC*)
6868269851Speter	    # FIXME: insert proper C++ library support
6869269851Speter	    _LT_TAGVAR(ld_shlibs, $1)=no
6870269851Speter	    ;;
6871269851Speter          aCC*)
6872269851Speter	    case $host_cpu in
6873269851Speter	      hppa*64*)
6874298161Sbapt	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6875269851Speter	        ;;
6876269851Speter	      ia64*)
6877298161Sbapt	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6878269851Speter	        ;;
6879269851Speter	      *)
6880298161Sbapt	        _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'
6881269851Speter	        ;;
6882269851Speter	    esac
6883269851Speter	    # Commands to make compiler produce verbose output that lists
6884269851Speter	    # what "hidden" libraries, object files and flags are used when
6885269851Speter	    # linking a shared library.
6886269851Speter	    #
6887269851Speter	    # There doesn't appear to be a way to prevent this compiler from
6888269851Speter	    # explicitly linking system object files so we need to strip them
6889269851Speter	    # from the output so that they don't get included in the library
6890269851Speter	    # dependencies.
6891298161Sbapt	    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; func_echo_all "$list"'
6892269851Speter	    ;;
6893269851Speter          *)
6894298161Sbapt	    if test yes = "$GXX"; then
6895298161Sbapt	      if test no = "$with_gnu_ld"; then
6896269851Speter	        case $host_cpu in
6897269851Speter	          hppa*64*)
6898298161Sbapt	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6899269851Speter	            ;;
6900269851Speter	          ia64*)
6901298161Sbapt	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6902269851Speter	            ;;
6903269851Speter	          *)
6904298161Sbapt	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6905269851Speter	            ;;
6906269851Speter	        esac
6907269851Speter	      fi
6908269851Speter	    else
6909269851Speter	      # FIXME: insert proper C++ library support
6910269851Speter	      _LT_TAGVAR(ld_shlibs, $1)=no
6911269851Speter	    fi
6912269851Speter	    ;;
6913269851Speter        esac
6914269851Speter        ;;
6915269851Speter
6916269851Speter      interix[[3-9]]*)
6917269851Speter	_LT_TAGVAR(hardcode_direct, $1)=no
6918269851Speter	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6919298161Sbapt	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6920298161Sbapt	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6921269851Speter	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6922269851Speter	# Instead, shared libraries are loaded at an image base (0x10000000 by
6923269851Speter	# default) and relocated if they conflict, which is a slow very memory
6924269851Speter	# consuming and fragmenting process.  To avoid this, we pick a random,
6925269851Speter	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6926269851Speter	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6927298161Sbapt	_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'
6928298161Sbapt	_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'
6929269851Speter	;;
6930269851Speter      irix5* | irix6*)
6931269851Speter        case $cc_basename in
6932269851Speter          CC*)
6933269851Speter	    # SGI C++
6934298161Sbapt	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
6935269851Speter
6936269851Speter	    # Archives containing C++ object files must be created using
6937269851Speter	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6938269851Speter	    # necessary to make sure instantiated templates are included
6939269851Speter	    # in the archive.
6940269851Speter	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6941269851Speter	    ;;
6942269851Speter          *)
6943298161Sbapt	    if test yes = "$GXX"; then
6944298161Sbapt	      if test no = "$with_gnu_ld"; then
6945298161Sbapt	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
6946269851Speter	      else
6947298161Sbapt	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
6948269851Speter	      fi
6949269851Speter	    fi
6950269851Speter	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6951269851Speter	    ;;
6952269851Speter        esac
6953298161Sbapt        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6954269851Speter        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6955269851Speter        _LT_TAGVAR(inherit_rpath, $1)=yes
6956269851Speter        ;;
6957269851Speter
6958298161Sbapt      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6959269851Speter        case $cc_basename in
6960269851Speter          KCC*)
6961269851Speter	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6962269851Speter
6963269851Speter	    # KCC will only create a shared library if the output file
6964269851Speter	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6965269851Speter	    # to its proper name (with version) after linking.
6966298161Sbapt	    _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'
6967298161Sbapt	    _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'
6968269851Speter	    # Commands to make compiler produce verbose output that lists
6969269851Speter	    # what "hidden" libraries, object files and flags are used when
6970269851Speter	    # linking a shared library.
6971269851Speter	    #
6972269851Speter	    # There doesn't appear to be a way to prevent this compiler from
6973269851Speter	    # explicitly linking system object files so we need to strip them
6974269851Speter	    # from the output so that they don't get included in the library
6975269851Speter	    # dependencies.
6976298161Sbapt	    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; func_echo_all "$list"'
6977269851Speter
6978298161Sbapt	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6979298161Sbapt	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6980269851Speter
6981269851Speter	    # Archives containing C++ object files must be created using
6982269851Speter	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6983269851Speter	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6984269851Speter	    ;;
6985269851Speter	  icpc* | ecpc* )
6986269851Speter	    # Intel C++
6987269851Speter	    with_gnu_ld=yes
6988269851Speter	    # version 8.0 and above of icpc choke on multiply defined symbols
6989269851Speter	    # if we add $predep_objects and $postdep_objects, however 7.1 and
6990269851Speter	    # earlier do not add the objects themselves.
6991269851Speter	    case `$CC -V 2>&1` in
6992269851Speter	      *"Version 7."*)
6993298161Sbapt	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6994298161Sbapt		_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'
6995269851Speter		;;
6996269851Speter	      *)  # Version 8.0 or newer
6997269851Speter	        tmp_idyn=
6998269851Speter	        case $host_cpu in
6999269851Speter		  ia64*) tmp_idyn=' -i_dynamic';;
7000269851Speter		esac
7001298161Sbapt	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7002298161Sbapt		_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'
7003269851Speter		;;
7004269851Speter	    esac
7005269851Speter	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7006298161Sbapt	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7007298161Sbapt	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7008298161Sbapt	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7009269851Speter	    ;;
7010269851Speter          pgCC* | pgcpp*)
7011269851Speter            # Portland Group C++ compiler
7012269851Speter	    case `$CC -V` in
7013269851Speter	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7014269851Speter	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7015298161Sbapt               rm -rf $tpldir~
7016298161Sbapt               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7017298161Sbapt               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7018269851Speter	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7019298161Sbapt                rm -rf $tpldir~
7020298161Sbapt                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7021298161Sbapt                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7022298161Sbapt                $RANLIB $oldlib'
7023269851Speter	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7024298161Sbapt                rm -rf $tpldir~
7025298161Sbapt                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7026298161Sbapt                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7027269851Speter	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7028298161Sbapt                rm -rf $tpldir~
7029298161Sbapt                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7030298161Sbapt                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
7031269851Speter	      ;;
7032269851Speter	    *) # Version 6 and above use weak symbols
7033298161Sbapt	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7034298161Sbapt	      _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'
7035269851Speter	      ;;
7036269851Speter	    esac
7037269851Speter
7038298161Sbapt	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7039298161Sbapt	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7040298161Sbapt	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
7041269851Speter            ;;
7042269851Speter	  cxx*)
7043269851Speter	    # Compaq C++
7044298161Sbapt	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7045298161Sbapt	    _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'
7046269851Speter
7047269851Speter	    runpath_var=LD_RUN_PATH
7048269851Speter	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7049269851Speter	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7050269851Speter
7051269851Speter	    # Commands to make compiler produce verbose output that lists
7052269851Speter	    # what "hidden" libraries, object files and flags are used when
7053269851Speter	    # linking a shared library.
7054269851Speter	    #
7055269851Speter	    # There doesn't appear to be a way to prevent this compiler from
7056269851Speter	    # explicitly linking system object files so we need to strip them
7057269851Speter	    # from the output so that they don't get included in the library
7058269851Speter	    # dependencies.
7059298161Sbapt	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
7060269851Speter	    ;;
7061269851Speter	  xl* | mpixl* | bgxl*)
7062269851Speter	    # IBM XL 8.0 on PPC, with GNU ld
7063298161Sbapt	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7064298161Sbapt	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7065298161Sbapt	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7066298161Sbapt	    if test yes = "$supports_anon_versioning"; then
7067269851Speter	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7068298161Sbapt                cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7069298161Sbapt                echo "local: *; };" >> $output_objdir/$libname.ver~
7070298161Sbapt                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7071269851Speter	    fi
7072269851Speter	    ;;
7073269851Speter	  *)
7074269851Speter	    case `$CC -V 2>&1 | sed 5q` in
7075269851Speter	    *Sun\ C*)
7076269851Speter	      # Sun C++ 5.9
7077269851Speter	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7078298161Sbapt	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7079298161Sbapt	      _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'
7080269851Speter	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7081298161Sbapt	      _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; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
7082269851Speter	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7083269851Speter
7084269851Speter	      # Not sure whether something based on
7085269851Speter	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7086269851Speter	      # would be better.
7087269851Speter	      output_verbose_link_cmd='func_echo_all'
7088269851Speter
7089269851Speter	      # Archives containing C++ object files must be created using
7090269851Speter	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7091269851Speter	      # necessary to make sure instantiated templates are included
7092269851Speter	      # in the archive.
7093269851Speter	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7094269851Speter	      ;;
7095269851Speter	    esac
7096269851Speter	    ;;
7097269851Speter	esac
7098269851Speter	;;
7099269851Speter
7100269851Speter      lynxos*)
7101269851Speter        # FIXME: insert proper C++ library support
7102269851Speter	_LT_TAGVAR(ld_shlibs, $1)=no
7103269851Speter	;;
7104269851Speter
7105269851Speter      m88k*)
7106269851Speter        # FIXME: insert proper C++ library support
7107269851Speter        _LT_TAGVAR(ld_shlibs, $1)=no
7108269851Speter	;;
7109269851Speter
7110269851Speter      mvs*)
7111269851Speter        case $cc_basename in
7112269851Speter          cxx*)
7113269851Speter	    # FIXME: insert proper C++ library support
7114269851Speter	    _LT_TAGVAR(ld_shlibs, $1)=no
7115269851Speter	    ;;
7116269851Speter	  *)
7117269851Speter	    # FIXME: insert proper C++ library support
7118269851Speter	    _LT_TAGVAR(ld_shlibs, $1)=no
7119269851Speter	    ;;
7120269851Speter	esac
7121269851Speter	;;
7122269851Speter
7123269851Speter      netbsd*)
7124269851Speter        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7125269851Speter	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7126269851Speter	  wlarc=
7127269851Speter	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7128269851Speter	  _LT_TAGVAR(hardcode_direct, $1)=yes
7129269851Speter	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7130269851Speter	fi
7131269851Speter	# Workaround some broken pre-1.5 toolchains
7132269851Speter	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7133269851Speter	;;
7134269851Speter
7135269851Speter      *nto* | *qnx*)
7136269851Speter        _LT_TAGVAR(ld_shlibs, $1)=yes
7137269851Speter	;;
7138269851Speter
7139298161Sbapt      openbsd* | bitrig*)
7140269851Speter	if test -f /usr/libexec/ld.so; then
7141269851Speter	  _LT_TAGVAR(hardcode_direct, $1)=yes
7142269851Speter	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7143269851Speter	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7144269851Speter	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7145298161Sbapt	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7146298161Sbapt	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7147298161Sbapt	    _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'
7148298161Sbapt	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7149298161Sbapt	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7150269851Speter	  fi
7151269851Speter	  output_verbose_link_cmd=func_echo_all
7152269851Speter	else
7153269851Speter	  _LT_TAGVAR(ld_shlibs, $1)=no
7154269851Speter	fi
7155269851Speter	;;
7156269851Speter
7157269851Speter      osf3* | osf4* | osf5*)
7158269851Speter        case $cc_basename in
7159269851Speter          KCC*)
7160269851Speter	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7161269851Speter
7162269851Speter	    # KCC will only create a shared library if the output file
7163269851Speter	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7164269851Speter	    # to its proper name (with version) after linking.
7165298161Sbapt	    _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'
7166269851Speter
7167298161Sbapt	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7168269851Speter	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7169269851Speter
7170269851Speter	    # Archives containing C++ object files must be created using
7171269851Speter	    # the KAI C++ compiler.
7172269851Speter	    case $host in
7173269851Speter	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7174269851Speter	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7175269851Speter	    esac
7176269851Speter	    ;;
7177269851Speter          RCC*)
7178269851Speter	    # Rational C++ 2.4.1
7179269851Speter	    # FIXME: insert proper C++ library support
7180269851Speter	    _LT_TAGVAR(ld_shlibs, $1)=no
7181269851Speter	    ;;
7182269851Speter          cxx*)
7183269851Speter	    case $host in
7184269851Speter	      osf3*)
7185298161Sbapt	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7186298161Sbapt	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
7187298161Sbapt	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7188269851Speter		;;
7189269851Speter	      *)
7190269851Speter	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7191298161Sbapt	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
7192269851Speter	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7193298161Sbapt                  echo "-hidden">> $lib.exp~
7194298161Sbapt                  $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 "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
7195298161Sbapt                  $RM $lib.exp'
7196269851Speter	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7197269851Speter		;;
7198269851Speter	    esac
7199269851Speter
7200269851Speter	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7201269851Speter
7202269851Speter	    # Commands to make compiler produce verbose output that lists
7203269851Speter	    # what "hidden" libraries, object files and flags are used when
7204269851Speter	    # linking a shared library.
7205269851Speter	    #
7206269851Speter	    # There doesn't appear to be a way to prevent this compiler from
7207269851Speter	    # explicitly linking system object files so we need to strip them
7208269851Speter	    # from the output so that they don't get included in the library
7209269851Speter	    # dependencies.
7210298161Sbapt	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7211269851Speter	    ;;
7212269851Speter	  *)
7213298161Sbapt	    if test yes,no = "$GXX,$with_gnu_ld"; then
7214298161Sbapt	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7215269851Speter	      case $host in
7216269851Speter	        osf3*)
7217298161Sbapt	          _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" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
7218269851Speter		  ;;
7219269851Speter	        *)
7220298161Sbapt	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
7221269851Speter		  ;;
7222269851Speter	      esac
7223269851Speter
7224298161Sbapt	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7225269851Speter	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7226269851Speter
7227269851Speter	      # Commands to make compiler produce verbose output that lists
7228269851Speter	      # what "hidden" libraries, object files and flags are used when
7229269851Speter	      # linking a shared library.
7230269851Speter	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7231269851Speter
7232269851Speter	    else
7233269851Speter	      # FIXME: insert proper C++ library support
7234269851Speter	      _LT_TAGVAR(ld_shlibs, $1)=no
7235269851Speter	    fi
7236269851Speter	    ;;
7237269851Speter        esac
7238269851Speter        ;;
7239269851Speter
7240269851Speter      psos*)
7241269851Speter        # FIXME: insert proper C++ library support
7242269851Speter        _LT_TAGVAR(ld_shlibs, $1)=no
7243269851Speter        ;;
7244269851Speter
7245269851Speter      sunos4*)
7246269851Speter        case $cc_basename in
7247269851Speter          CC*)
7248269851Speter	    # Sun C++ 4.x
7249269851Speter	    # FIXME: insert proper C++ library support
7250269851Speter	    _LT_TAGVAR(ld_shlibs, $1)=no
7251269851Speter	    ;;
7252269851Speter          lcc*)
7253269851Speter	    # Lucid
7254269851Speter	    # FIXME: insert proper C++ library support
7255269851Speter	    _LT_TAGVAR(ld_shlibs, $1)=no
7256269851Speter	    ;;
7257269851Speter          *)
7258269851Speter	    # FIXME: insert proper C++ library support
7259269851Speter	    _LT_TAGVAR(ld_shlibs, $1)=no
7260269851Speter	    ;;
7261269851Speter        esac
7262269851Speter        ;;
7263269851Speter
7264269851Speter      solaris*)
7265269851Speter        case $cc_basename in
7266269851Speter          CC* | sunCC*)
7267269851Speter	    # Sun C++ 4.2, 5.x and Centerline C++
7268269851Speter            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7269269851Speter	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7270298161Sbapt	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7271269851Speter	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7272298161Sbapt              $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'
7273269851Speter
7274269851Speter	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7275269851Speter	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7276269851Speter	    case $host_os in
7277269851Speter	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7278269851Speter	      *)
7279269851Speter		# The compiler driver will combine and reorder linker options,
7280298161Sbapt		# but understands '-z linker_flag'.
7281269851Speter	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7282269851Speter		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7283269851Speter	        ;;
7284269851Speter	    esac
7285269851Speter	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7286269851Speter
7287269851Speter	    output_verbose_link_cmd='func_echo_all'
7288269851Speter
7289269851Speter	    # Archives containing C++ object files must be created using
7290269851Speter	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7291269851Speter	    # necessary to make sure instantiated templates are included
7292269851Speter	    # in the archive.
7293269851Speter	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7294269851Speter	    ;;
7295269851Speter          gcx*)
7296269851Speter	    # Green Hills C++ Compiler
7297298161Sbapt	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7298269851Speter
7299269851Speter	    # The C++ compiler must be used to create the archive.
7300269851Speter	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7301269851Speter	    ;;
7302269851Speter          *)
7303269851Speter	    # GNU C++ compiler with Solaris linker
7304298161Sbapt	    if test yes,no = "$GXX,$with_gnu_ld"; then
7305298161Sbapt	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7306269851Speter	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7307298161Sbapt	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7308269851Speter	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7309298161Sbapt                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7310269851Speter
7311269851Speter	        # Commands to make compiler produce verbose output that lists
7312269851Speter	        # what "hidden" libraries, object files and flags are used when
7313269851Speter	        # linking a shared library.
7314269851Speter	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7315269851Speter	      else
7316298161Sbapt	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
7317269851Speter	        # platform.
7318298161Sbapt	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7319269851Speter	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7320298161Sbapt                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7321269851Speter
7322269851Speter	        # Commands to make compiler produce verbose output that lists
7323269851Speter	        # what "hidden" libraries, object files and flags are used when
7324269851Speter	        # linking a shared library.
7325269851Speter	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7326269851Speter	      fi
7327269851Speter
7328298161Sbapt	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7329269851Speter	      case $host_os in
7330269851Speter		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7331269851Speter		*)
7332298161Sbapt		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7333269851Speter		  ;;
7334269851Speter	      esac
7335269851Speter	    fi
7336269851Speter	    ;;
7337269851Speter        esac
7338269851Speter        ;;
7339269851Speter
7340269851Speter    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7341298161Sbapt      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7342269851Speter      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7343269851Speter      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7344269851Speter      runpath_var='LD_RUN_PATH'
7345269851Speter
7346269851Speter      case $cc_basename in
7347269851Speter        CC*)
7348298161Sbapt	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7349298161Sbapt	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7350269851Speter	  ;;
7351269851Speter	*)
7352298161Sbapt	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7353298161Sbapt	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7354269851Speter	  ;;
7355269851Speter      esac
7356251883Speter      ;;
7357269851Speter
7358269851Speter      sysv5* | sco3.2v5* | sco5v6*)
7359298161Sbapt	# Note: We CANNOT use -z defs as we might desire, because we do not
7360269851Speter	# link with -lc, and that would cause any symbols used from libc to
7361269851Speter	# always be unresolved, which means just about no library would
7362269851Speter	# ever link correctly.  If we're not using GNU ld we use -z text
7363269851Speter	# though, which does catch some bad symbols but isn't as heavy-handed
7364269851Speter	# as -z defs.
7365298161Sbapt	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7366298161Sbapt	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7367269851Speter	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7368269851Speter	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7369298161Sbapt	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7370269851Speter	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7371269851Speter	_LT_TAGVAR(link_all_deplibs, $1)=yes
7372298161Sbapt	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7373269851Speter	runpath_var='LD_RUN_PATH'
7374269851Speter
7375269851Speter	case $cc_basename in
7376269851Speter          CC*)
7377298161Sbapt	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7378298161Sbapt	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7379269851Speter	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7380298161Sbapt              '"$_LT_TAGVAR(old_archive_cmds, $1)"
7381269851Speter	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7382298161Sbapt              '"$_LT_TAGVAR(reload_cmds, $1)"
7383269851Speter	    ;;
7384269851Speter	  *)
7385298161Sbapt	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7386298161Sbapt	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7387269851Speter	    ;;
7388269851Speter	esac
7389269851Speter      ;;
7390269851Speter
7391269851Speter      tandem*)
7392269851Speter        case $cc_basename in
7393269851Speter          NCC*)
7394269851Speter	    # NonStop-UX NCC 3.20
7395269851Speter	    # FIXME: insert proper C++ library support
7396269851Speter	    _LT_TAGVAR(ld_shlibs, $1)=no
7397269851Speter	    ;;
7398269851Speter          *)
7399269851Speter	    # FIXME: insert proper C++ library support
7400269851Speter	    _LT_TAGVAR(ld_shlibs, $1)=no
7401269851Speter	    ;;
7402269851Speter        esac
7403269851Speter        ;;
7404269851Speter
7405269851Speter      vxworks*)
7406269851Speter        # FIXME: insert proper C++ library support
7407269851Speter        _LT_TAGVAR(ld_shlibs, $1)=no
7408269851Speter        ;;
7409269851Speter
7410269851Speter      *)
7411269851Speter        # FIXME: insert proper C++ library support
7412269851Speter        _LT_TAGVAR(ld_shlibs, $1)=no
7413269851Speter        ;;
7414251883Speter    esac
7415269851Speter
7416269851Speter    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7417298161Sbapt    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7418269851Speter
7419298161Sbapt    _LT_TAGVAR(GCC, $1)=$GXX
7420298161Sbapt    _LT_TAGVAR(LD, $1)=$LD
7421269851Speter
7422269851Speter    ## CAVEAT EMPTOR:
7423269851Speter    ## There is no encapsulation within the following macros, do not change
7424269851Speter    ## the running order or otherwise move them around unless you know exactly
7425269851Speter    ## what you are doing...
7426269851Speter    _LT_SYS_HIDDEN_LIBDEPS($1)
7427269851Speter    _LT_COMPILER_PIC($1)
7428269851Speter    _LT_COMPILER_C_O($1)
7429269851Speter    _LT_COMPILER_FILE_LOCKS($1)
7430269851Speter    _LT_LINKER_SHLIBS($1)
7431269851Speter    _LT_SYS_DYNAMIC_LINKER($1)
7432269851Speter    _LT_LINKER_HARDCODE_LIBPATH($1)
7433269851Speter
7434269851Speter    _LT_CONFIG($1)
7435269851Speter  fi # test -n "$compiler"
7436269851Speter
7437269851Speter  CC=$lt_save_CC
7438269851Speter  CFLAGS=$lt_save_CFLAGS
7439269851Speter  LDCXX=$LD
7440269851Speter  LD=$lt_save_LD
7441269851Speter  GCC=$lt_save_GCC
7442269851Speter  with_gnu_ld=$lt_save_with_gnu_ld
7443269851Speter  lt_cv_path_LDCXX=$lt_cv_path_LD
7444269851Speter  lt_cv_path_LD=$lt_save_path_LD
7445269851Speter  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7446269851Speter  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7447298161Sbaptfi # test yes != "$_lt_caught_CXX_error"
7448269851Speter
7449269851SpeterAC_LANG_POP
7450269851Speter])# _LT_LANG_CXX_CONFIG
7451269851Speter
7452269851Speter
7453269851Speter# _LT_FUNC_STRIPNAME_CNF
7454269851Speter# ----------------------
7455269851Speter# func_stripname_cnf prefix suffix name
7456269851Speter# strip PREFIX and SUFFIX off of NAME.
7457269851Speter# PREFIX and SUFFIX must not contain globbing or regex special
7458269851Speter# characters, hashes, percent signs, but SUFFIX may contain a leading
7459269851Speter# dot (in which case that matches only a dot).
7460269851Speter#
7461269851Speter# This function is identical to the (non-XSI) version of func_stripname,
7462269851Speter# except this one can be used by m4 code that may be executed by configure,
7463269851Speter# rather than the libtool script.
7464269851Speterm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7465269851SpeterAC_REQUIRE([_LT_DECL_SED])
7466269851SpeterAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7467269851Speterfunc_stripname_cnf ()
7468269851Speter{
7469298161Sbapt  case @S|@2 in
7470298161Sbapt  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7471298161Sbapt  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7472269851Speter  esac
7473269851Speter} # func_stripname_cnf
7474269851Speter])# _LT_FUNC_STRIPNAME_CNF
7475269851Speter
7476298161Sbapt
7477269851Speter# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7478269851Speter# ---------------------------------
7479269851Speter# Figure out "hidden" library dependencies from verbose
7480269851Speter# compiler output when linking a shared library.
7481269851Speter# Parse the compiler output and extract the necessary
7482269851Speter# objects, libraries and library flags.
7483269851Speterm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7484269851Speter[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7485269851SpeterAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7486269851Speter# Dependencies to place before and after the object being linked:
7487269851Speter_LT_TAGVAR(predep_objects, $1)=
7488269851Speter_LT_TAGVAR(postdep_objects, $1)=
7489269851Speter_LT_TAGVAR(predeps, $1)=
7490269851Speter_LT_TAGVAR(postdeps, $1)=
7491269851Speter_LT_TAGVAR(compiler_lib_search_path, $1)=
7492269851Speter
7493269851Speterdnl we can't use the lt_simple_compile_test_code here,
7494269851Speterdnl because it contains code intended for an executable,
7495269851Speterdnl not a library.  It's possible we should let each
7496269851Speterdnl tag define a new lt_????_link_test_code variable,
7497269851Speterdnl but it's only used here...
7498269851Speterm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7499269851Speterint a;
7500269851Spetervoid foo (void) { a = 0; }
7501269851Speter_LT_EOF
7502269851Speter], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7503269851Speterclass Foo
7504269851Speter{
7505269851Speterpublic:
7506269851Speter  Foo (void) { a = 0; }
7507269851Speterprivate:
7508269851Speter  int a;
7509269851Speter};
7510269851Speter_LT_EOF
7511269851Speter], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7512269851Speter      subroutine foo
7513269851Speter      implicit none
7514269851Speter      integer*4 a
7515269851Speter      a=0
7516269851Speter      return
7517269851Speter      end
7518269851Speter_LT_EOF
7519269851Speter], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7520269851Speter      subroutine foo
7521269851Speter      implicit none
7522269851Speter      integer a
7523269851Speter      a=0
7524269851Speter      return
7525269851Speter      end
7526269851Speter_LT_EOF
7527269851Speter], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7528269851Speterpublic class foo {
7529269851Speter  private int a;
7530269851Speter  public void bar (void) {
7531269851Speter    a = 0;
7532269851Speter  }
7533269851Speter};
7534269851Speter_LT_EOF
7535269851Speter], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7536269851Speterpackage foo
7537269851Speterfunc foo() {
7538269851Speter}
7539269851Speter_LT_EOF
7540269851Speter])
7541269851Speter
7542269851Speter_lt_libdeps_save_CFLAGS=$CFLAGS
7543269851Spetercase "$CC $CFLAGS " in #(
7544269851Speter*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7545269851Speter*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7546269851Speter*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7547269851Speteresac
7548269851Speter
7549269851Speterdnl Parse the compiler output and extract the necessary
7550269851Speterdnl objects, libraries and library flags.
7551269851Speterif AC_TRY_EVAL(ac_compile); then
7552269851Speter  # Parse the compiler output and extract the necessary
7553269851Speter  # objects, libraries and library flags.
7554269851Speter
7555269851Speter  # Sentinel used to keep track of whether or not we are before
7556269851Speter  # the conftest object file.
7557269851Speter  pre_test_object_deps_done=no
7558269851Speter
7559269851Speter  for p in `eval "$output_verbose_link_cmd"`; do
7560298161Sbapt    case $prev$p in
7561269851Speter
7562269851Speter    -L* | -R* | -l*)
7563269851Speter       # Some compilers place space between "-{L,R}" and the path.
7564269851Speter       # Remove the space.
7565298161Sbapt       if test x-L = "$p" ||
7566298161Sbapt          test x-R = "$p"; then
7567269851Speter	 prev=$p
7568269851Speter	 continue
7569269851Speter       fi
7570269851Speter
7571269851Speter       # Expand the sysroot to ease extracting the directories later.
7572269851Speter       if test -z "$prev"; then
7573269851Speter         case $p in
7574269851Speter         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7575269851Speter         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7576269851Speter         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7577269851Speter         esac
7578269851Speter       fi
7579269851Speter       case $p in
7580269851Speter       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7581269851Speter       esac
7582298161Sbapt       if test no = "$pre_test_object_deps_done"; then
7583298161Sbapt	 case $prev in
7584269851Speter	 -L | -R)
7585269851Speter	   # Internal compiler library paths should come after those
7586269851Speter	   # provided the user.  The postdeps already come after the
7587269851Speter	   # user supplied libs so there is no need to process them.
7588269851Speter	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7589298161Sbapt	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
7590269851Speter	   else
7591298161Sbapt	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
7592269851Speter	   fi
7593269851Speter	   ;;
7594269851Speter	 # The "-l" case would never come before the object being
7595269851Speter	 # linked, so don't bother handling this case.
7596269851Speter	 esac
7597269851Speter       else
7598269851Speter	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7599298161Sbapt	   _LT_TAGVAR(postdeps, $1)=$prev$p
7600269851Speter	 else
7601298161Sbapt	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
7602269851Speter	 fi
7603269851Speter       fi
7604269851Speter       prev=
7605269851Speter       ;;
7606269851Speter
7607269851Speter    *.lto.$objext) ;; # Ignore GCC LTO objects
7608269851Speter    *.$objext)
7609269851Speter       # This assumes that the test object file only shows up
7610269851Speter       # once in the compiler output.
7611269851Speter       if test "$p" = "conftest.$objext"; then
7612269851Speter	 pre_test_object_deps_done=yes
7613269851Speter	 continue
7614269851Speter       fi
7615269851Speter
7616298161Sbapt       if test no = "$pre_test_object_deps_done"; then
7617269851Speter	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7618298161Sbapt	   _LT_TAGVAR(predep_objects, $1)=$p
7619269851Speter	 else
7620269851Speter	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7621269851Speter	 fi
7622269851Speter       else
7623269851Speter	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7624298161Sbapt	   _LT_TAGVAR(postdep_objects, $1)=$p
7625269851Speter	 else
7626269851Speter	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7627269851Speter	 fi
7628269851Speter       fi
7629269851Speter       ;;
7630269851Speter
7631269851Speter    *) ;; # Ignore the rest.
7632269851Speter
7633269851Speter    esac
7634269851Speter  done
7635269851Speter
7636269851Speter  # Clean up.
7637269851Speter  rm -f a.out a.exe
7638269851Speterelse
7639269851Speter  echo "libtool.m4: error: problem compiling $1 test program"
7640269851Speterfi
7641269851Speter
7642269851Speter$RM -f confest.$objext
7643269851SpeterCFLAGS=$_lt_libdeps_save_CFLAGS
7644269851Speter
7645269851Speter# PORTME: override above test on systems where it is broken
7646269851Speterm4_if([$1], [CXX],
7647269851Speter[case $host_os in
7648269851Speterinterix[[3-9]]*)
7649269851Speter  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7650269851Speter  # hack all around it, let's just trust "g++" to DTRT.
7651269851Speter  _LT_TAGVAR(predep_objects,$1)=
7652269851Speter  _LT_TAGVAR(postdep_objects,$1)=
7653269851Speter  _LT_TAGVAR(postdeps,$1)=
7654251883Speter  ;;
7655251883Speteresac
7656269851Speter])
7657251883Speter
7658269851Spetercase " $_LT_TAGVAR(postdeps, $1) " in
7659269851Speter*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7660269851Speteresac
7661269851Speter _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7662269851Speterif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7663298161Sbapt _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
7664269851Speterfi
7665269851Speter_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7666269851Speter    [The directories searched by this compiler when creating a shared library])
7667269851Speter_LT_TAGDECL([], [predep_objects], [1],
7668269851Speter    [Dependencies to place before and after the objects being linked to
7669269851Speter    create a shared library])
7670269851Speter_LT_TAGDECL([], [postdep_objects], [1])
7671269851Speter_LT_TAGDECL([], [predeps], [1])
7672269851Speter_LT_TAGDECL([], [postdeps], [1])
7673269851Speter_LT_TAGDECL([], [compiler_lib_search_path], [1],
7674269851Speter    [The library search path used internally by the compiler when linking
7675269851Speter    a shared library])
7676269851Speter])# _LT_SYS_HIDDEN_LIBDEPS
7677251883Speter
7678251883Speter
7679269851Speter# _LT_LANG_F77_CONFIG([TAG])
7680269851Speter# --------------------------
7681269851Speter# Ensure that the configuration variables for a Fortran 77 compiler are
7682269851Speter# suitably defined.  These variables are subsequently used by _LT_CONFIG
7683298161Sbapt# to write the compiler configuration to 'libtool'.
7684269851Speterm4_defun([_LT_LANG_F77_CONFIG],
7685269851Speter[AC_LANG_PUSH(Fortran 77)
7686298161Sbaptif test -z "$F77" || test no = "$F77"; then
7687269851Speter  _lt_disable_F77=yes
7688269851Speterfi
7689251883Speter
7690269851Speter_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7691269851Speter_LT_TAGVAR(allow_undefined_flag, $1)=
7692269851Speter_LT_TAGVAR(always_export_symbols, $1)=no
7693269851Speter_LT_TAGVAR(archive_expsym_cmds, $1)=
7694269851Speter_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7695269851Speter_LT_TAGVAR(hardcode_direct, $1)=no
7696269851Speter_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7697269851Speter_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7698269851Speter_LT_TAGVAR(hardcode_libdir_separator, $1)=
7699269851Speter_LT_TAGVAR(hardcode_minus_L, $1)=no
7700269851Speter_LT_TAGVAR(hardcode_automatic, $1)=no
7701269851Speter_LT_TAGVAR(inherit_rpath, $1)=no
7702269851Speter_LT_TAGVAR(module_cmds, $1)=
7703269851Speter_LT_TAGVAR(module_expsym_cmds, $1)=
7704269851Speter_LT_TAGVAR(link_all_deplibs, $1)=unknown
7705269851Speter_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7706269851Speter_LT_TAGVAR(reload_flag, $1)=$reload_flag
7707269851Speter_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7708269851Speter_LT_TAGVAR(no_undefined_flag, $1)=
7709269851Speter_LT_TAGVAR(whole_archive_flag_spec, $1)=
7710269851Speter_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7711251883Speter
7712269851Speter# Source file extension for f77 test sources.
7713269851Speterac_ext=f
7714251883Speter
7715269851Speter# Object file extension for compiled f77 test sources.
7716269851Speterobjext=o
7717269851Speter_LT_TAGVAR(objext, $1)=$objext
7718251883Speter
7719269851Speter# No sense in running all these tests if we already determined that
7720269851Speter# the F77 compiler isn't working.  Some variables (like enable_shared)
7721269851Speter# are currently assumed to apply to all compilers on this platform,
7722269851Speter# and will be corrupted by setting them based on a non-working compiler.
7723298161Sbaptif test yes != "$_lt_disable_F77"; then
7724269851Speter  # Code to be used in simple compile tests
7725269851Speter  lt_simple_compile_test_code="\
7726269851Speter      subroutine t
7727269851Speter      return
7728269851Speter      end
7729269851Speter"
7730251883Speter
7731269851Speter  # Code to be used in simple link tests
7732269851Speter  lt_simple_link_test_code="\
7733269851Speter      program t
7734269851Speter      end
7735269851Speter"
7736269851Speter
7737269851Speter  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7738269851Speter  _LT_TAG_COMPILER
7739269851Speter
7740269851Speter  # save warnings/boilerplate of simple test code
7741269851Speter  _LT_COMPILER_BOILERPLATE
7742269851Speter  _LT_LINKER_BOILERPLATE
7743269851Speter
7744269851Speter  # Allow CC to be a program name with arguments.
7745298161Sbapt  lt_save_CC=$CC
7746269851Speter  lt_save_GCC=$GCC
7747269851Speter  lt_save_CFLAGS=$CFLAGS
7748269851Speter  CC=${F77-"f77"}
7749269851Speter  CFLAGS=$FFLAGS
7750269851Speter  compiler=$CC
7751269851Speter  _LT_TAGVAR(compiler, $1)=$CC
7752269851Speter  _LT_CC_BASENAME([$compiler])
7753269851Speter  GCC=$G77
7754269851Speter  if test -n "$compiler"; then
7755269851Speter    AC_MSG_CHECKING([if libtool supports shared libraries])
7756269851Speter    AC_MSG_RESULT([$can_build_shared])
7757269851Speter
7758269851Speter    AC_MSG_CHECKING([whether to build shared libraries])
7759298161Sbapt    test no = "$can_build_shared" && enable_shared=no
7760269851Speter
7761269851Speter    # On AIX, shared libraries and static libraries use the same namespace, and
7762269851Speter    # are all built from PIC.
7763269851Speter    case $host_os in
7764269851Speter      aix3*)
7765298161Sbapt        test yes = "$enable_shared" && enable_static=no
7766269851Speter        if test -n "$RANLIB"; then
7767269851Speter          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7768269851Speter          postinstall_cmds='$RANLIB $lib'
7769269851Speter        fi
7770269851Speter        ;;
7771269851Speter      aix[[4-9]]*)
7772298161Sbapt	if test ia64 != "$host_cpu"; then
7773298161Sbapt	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7774298161Sbapt	  yes,aix,yes) ;;		# shared object as lib.so file only
7775298161Sbapt	  yes,svr4,*) ;;		# shared object as lib.so archive member only
7776298161Sbapt	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
7777298161Sbapt	  esac
7778269851Speter	fi
7779269851Speter        ;;
7780269851Speter    esac
7781269851Speter    AC_MSG_RESULT([$enable_shared])
7782269851Speter
7783269851Speter    AC_MSG_CHECKING([whether to build static libraries])
7784269851Speter    # Make sure either enable_shared or enable_static is yes.
7785298161Sbapt    test yes = "$enable_shared" || enable_static=yes
7786269851Speter    AC_MSG_RESULT([$enable_static])
7787269851Speter
7788298161Sbapt    _LT_TAGVAR(GCC, $1)=$G77
7789298161Sbapt    _LT_TAGVAR(LD, $1)=$LD
7790269851Speter
7791269851Speter    ## CAVEAT EMPTOR:
7792269851Speter    ## There is no encapsulation within the following macros, do not change
7793269851Speter    ## the running order or otherwise move them around unless you know exactly
7794269851Speter    ## what you are doing...
7795269851Speter    _LT_COMPILER_PIC($1)
7796269851Speter    _LT_COMPILER_C_O($1)
7797269851Speter    _LT_COMPILER_FILE_LOCKS($1)
7798269851Speter    _LT_LINKER_SHLIBS($1)
7799269851Speter    _LT_SYS_DYNAMIC_LINKER($1)
7800269851Speter    _LT_LINKER_HARDCODE_LIBPATH($1)
7801269851Speter
7802269851Speter    _LT_CONFIG($1)
7803269851Speter  fi # test -n "$compiler"
7804269851Speter
7805269851Speter  GCC=$lt_save_GCC
7806298161Sbapt  CC=$lt_save_CC
7807298161Sbapt  CFLAGS=$lt_save_CFLAGS
7808298161Sbaptfi # test yes != "$_lt_disable_F77"
7809269851Speter
7810269851SpeterAC_LANG_POP
7811269851Speter])# _LT_LANG_F77_CONFIG
7812269851Speter
7813269851Speter
7814269851Speter# _LT_LANG_FC_CONFIG([TAG])
7815269851Speter# -------------------------
7816269851Speter# Ensure that the configuration variables for a Fortran compiler are
7817269851Speter# suitably defined.  These variables are subsequently used by _LT_CONFIG
7818298161Sbapt# to write the compiler configuration to 'libtool'.
7819269851Speterm4_defun([_LT_LANG_FC_CONFIG],
7820269851Speter[AC_LANG_PUSH(Fortran)
7821269851Speter
7822298161Sbaptif test -z "$FC" || test no = "$FC"; then
7823269851Speter  _lt_disable_FC=yes
7824269851Speterfi
7825269851Speter
7826269851Speter_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7827269851Speter_LT_TAGVAR(allow_undefined_flag, $1)=
7828269851Speter_LT_TAGVAR(always_export_symbols, $1)=no
7829269851Speter_LT_TAGVAR(archive_expsym_cmds, $1)=
7830269851Speter_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7831269851Speter_LT_TAGVAR(hardcode_direct, $1)=no
7832269851Speter_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7833269851Speter_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7834269851Speter_LT_TAGVAR(hardcode_libdir_separator, $1)=
7835269851Speter_LT_TAGVAR(hardcode_minus_L, $1)=no
7836269851Speter_LT_TAGVAR(hardcode_automatic, $1)=no
7837269851Speter_LT_TAGVAR(inherit_rpath, $1)=no
7838269851Speter_LT_TAGVAR(module_cmds, $1)=
7839269851Speter_LT_TAGVAR(module_expsym_cmds, $1)=
7840269851Speter_LT_TAGVAR(link_all_deplibs, $1)=unknown
7841269851Speter_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7842269851Speter_LT_TAGVAR(reload_flag, $1)=$reload_flag
7843269851Speter_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7844269851Speter_LT_TAGVAR(no_undefined_flag, $1)=
7845269851Speter_LT_TAGVAR(whole_archive_flag_spec, $1)=
7846269851Speter_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7847269851Speter
7848269851Speter# Source file extension for fc test sources.
7849269851Speterac_ext=${ac_fc_srcext-f}
7850269851Speter
7851269851Speter# Object file extension for compiled fc test sources.
7852269851Speterobjext=o
7853269851Speter_LT_TAGVAR(objext, $1)=$objext
7854269851Speter
7855269851Speter# No sense in running all these tests if we already determined that
7856269851Speter# the FC compiler isn't working.  Some variables (like enable_shared)
7857269851Speter# are currently assumed to apply to all compilers on this platform,
7858269851Speter# and will be corrupted by setting them based on a non-working compiler.
7859298161Sbaptif test yes != "$_lt_disable_FC"; then
7860269851Speter  # Code to be used in simple compile tests
7861269851Speter  lt_simple_compile_test_code="\
7862269851Speter      subroutine t
7863269851Speter      return
7864269851Speter      end
7865269851Speter"
7866269851Speter
7867269851Speter  # Code to be used in simple link tests
7868269851Speter  lt_simple_link_test_code="\
7869269851Speter      program t
7870269851Speter      end
7871269851Speter"
7872269851Speter
7873269851Speter  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7874269851Speter  _LT_TAG_COMPILER
7875269851Speter
7876269851Speter  # save warnings/boilerplate of simple test code
7877269851Speter  _LT_COMPILER_BOILERPLATE
7878269851Speter  _LT_LINKER_BOILERPLATE
7879269851Speter
7880269851Speter  # Allow CC to be a program name with arguments.
7881298161Sbapt  lt_save_CC=$CC
7882269851Speter  lt_save_GCC=$GCC
7883269851Speter  lt_save_CFLAGS=$CFLAGS
7884269851Speter  CC=${FC-"f95"}
7885269851Speter  CFLAGS=$FCFLAGS
7886269851Speter  compiler=$CC
7887269851Speter  GCC=$ac_cv_fc_compiler_gnu
7888269851Speter
7889269851Speter  _LT_TAGVAR(compiler, $1)=$CC
7890269851Speter  _LT_CC_BASENAME([$compiler])
7891269851Speter
7892269851Speter  if test -n "$compiler"; then
7893269851Speter    AC_MSG_CHECKING([if libtool supports shared libraries])
7894269851Speter    AC_MSG_RESULT([$can_build_shared])
7895269851Speter
7896269851Speter    AC_MSG_CHECKING([whether to build shared libraries])
7897298161Sbapt    test no = "$can_build_shared" && enable_shared=no
7898269851Speter
7899269851Speter    # On AIX, shared libraries and static libraries use the same namespace, and
7900269851Speter    # are all built from PIC.
7901269851Speter    case $host_os in
7902269851Speter      aix3*)
7903298161Sbapt        test yes = "$enable_shared" && enable_static=no
7904269851Speter        if test -n "$RANLIB"; then
7905269851Speter          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7906269851Speter          postinstall_cmds='$RANLIB $lib'
7907269851Speter        fi
7908269851Speter        ;;
7909269851Speter      aix[[4-9]]*)
7910298161Sbapt	if test ia64 != "$host_cpu"; then
7911298161Sbapt	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7912298161Sbapt	  yes,aix,yes) ;;		# shared object as lib.so file only
7913298161Sbapt	  yes,svr4,*) ;;		# shared object as lib.so archive member only
7914298161Sbapt	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
7915298161Sbapt	  esac
7916269851Speter	fi
7917269851Speter        ;;
7918269851Speter    esac
7919269851Speter    AC_MSG_RESULT([$enable_shared])
7920269851Speter
7921269851Speter    AC_MSG_CHECKING([whether to build static libraries])
7922269851Speter    # Make sure either enable_shared or enable_static is yes.
7923298161Sbapt    test yes = "$enable_shared" || enable_static=yes
7924269851Speter    AC_MSG_RESULT([$enable_static])
7925269851Speter
7926298161Sbapt    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7927298161Sbapt    _LT_TAGVAR(LD, $1)=$LD
7928269851Speter
7929269851Speter    ## CAVEAT EMPTOR:
7930269851Speter    ## There is no encapsulation within the following macros, do not change
7931269851Speter    ## the running order or otherwise move them around unless you know exactly
7932269851Speter    ## what you are doing...
7933269851Speter    _LT_SYS_HIDDEN_LIBDEPS($1)
7934269851Speter    _LT_COMPILER_PIC($1)
7935269851Speter    _LT_COMPILER_C_O($1)
7936269851Speter    _LT_COMPILER_FILE_LOCKS($1)
7937269851Speter    _LT_LINKER_SHLIBS($1)
7938269851Speter    _LT_SYS_DYNAMIC_LINKER($1)
7939269851Speter    _LT_LINKER_HARDCODE_LIBPATH($1)
7940269851Speter
7941269851Speter    _LT_CONFIG($1)
7942269851Speter  fi # test -n "$compiler"
7943269851Speter
7944269851Speter  GCC=$lt_save_GCC
7945269851Speter  CC=$lt_save_CC
7946269851Speter  CFLAGS=$lt_save_CFLAGS
7947298161Sbaptfi # test yes != "$_lt_disable_FC"
7948269851Speter
7949269851SpeterAC_LANG_POP
7950269851Speter])# _LT_LANG_FC_CONFIG
7951269851Speter
7952269851Speter
7953269851Speter# _LT_LANG_GCJ_CONFIG([TAG])
7954269851Speter# --------------------------
7955269851Speter# Ensure that the configuration variables for the GNU Java Compiler compiler
7956269851Speter# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7957298161Sbapt# to write the compiler configuration to 'libtool'.
7958269851Speterm4_defun([_LT_LANG_GCJ_CONFIG],
7959269851Speter[AC_REQUIRE([LT_PROG_GCJ])dnl
7960269851SpeterAC_LANG_SAVE
7961269851Speter
7962269851Speter# Source file extension for Java test sources.
7963269851Speterac_ext=java
7964269851Speter
7965269851Speter# Object file extension for compiled Java test sources.
7966269851Speterobjext=o
7967269851Speter_LT_TAGVAR(objext, $1)=$objext
7968269851Speter
7969269851Speter# Code to be used in simple compile tests
7970269851Speterlt_simple_compile_test_code="class foo {}"
7971269851Speter
7972269851Speter# Code to be used in simple link tests
7973269851Speterlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7974269851Speter
7975269851Speter# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7976269851Speter_LT_TAG_COMPILER
7977269851Speter
7978269851Speter# save warnings/boilerplate of simple test code
7979269851Speter_LT_COMPILER_BOILERPLATE
7980269851Speter_LT_LINKER_BOILERPLATE
7981269851Speter
7982269851Speter# Allow CC to be a program name with arguments.
7983269851Speterlt_save_CC=$CC
7984269851Speterlt_save_CFLAGS=$CFLAGS
7985269851Speterlt_save_GCC=$GCC
7986269851SpeterGCC=yes
7987269851SpeterCC=${GCJ-"gcj"}
7988269851SpeterCFLAGS=$GCJFLAGS
7989269851Spetercompiler=$CC
7990269851Speter_LT_TAGVAR(compiler, $1)=$CC
7991298161Sbapt_LT_TAGVAR(LD, $1)=$LD
7992269851Speter_LT_CC_BASENAME([$compiler])
7993269851Speter
7994269851Speter# GCJ did not exist at the time GCC didn't implicitly link libc in.
7995269851Speter_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7996269851Speter
7997269851Speter_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7998269851Speter_LT_TAGVAR(reload_flag, $1)=$reload_flag
7999269851Speter_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8000269851Speter
8001269851Speterif test -n "$compiler"; then
8002269851Speter  _LT_COMPILER_NO_RTTI($1)
8003269851Speter  _LT_COMPILER_PIC($1)
8004269851Speter  _LT_COMPILER_C_O($1)
8005269851Speter  _LT_COMPILER_FILE_LOCKS($1)
8006269851Speter  _LT_LINKER_SHLIBS($1)
8007269851Speter  _LT_LINKER_HARDCODE_LIBPATH($1)
8008269851Speter
8009269851Speter  _LT_CONFIG($1)
8010269851Speterfi
8011269851Speter
8012269851SpeterAC_LANG_RESTORE
8013269851Speter
8014269851SpeterGCC=$lt_save_GCC
8015269851SpeterCC=$lt_save_CC
8016269851SpeterCFLAGS=$lt_save_CFLAGS
8017269851Speter])# _LT_LANG_GCJ_CONFIG
8018269851Speter
8019269851Speter
8020269851Speter# _LT_LANG_GO_CONFIG([TAG])
8021269851Speter# --------------------------
8022269851Speter# Ensure that the configuration variables for the GNU Go compiler
8023269851Speter# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8024298161Sbapt# to write the compiler configuration to 'libtool'.
8025269851Speterm4_defun([_LT_LANG_GO_CONFIG],
8026269851Speter[AC_REQUIRE([LT_PROG_GO])dnl
8027269851SpeterAC_LANG_SAVE
8028269851Speter
8029269851Speter# Source file extension for Go test sources.
8030269851Speterac_ext=go
8031269851Speter
8032269851Speter# Object file extension for compiled Go test sources.
8033269851Speterobjext=o
8034269851Speter_LT_TAGVAR(objext, $1)=$objext
8035269851Speter
8036269851Speter# Code to be used in simple compile tests
8037269851Speterlt_simple_compile_test_code="package main; func main() { }"
8038269851Speter
8039269851Speter# Code to be used in simple link tests
8040269851Speterlt_simple_link_test_code='package main; func main() { }'
8041269851Speter
8042269851Speter# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8043269851Speter_LT_TAG_COMPILER
8044269851Speter
8045269851Speter# save warnings/boilerplate of simple test code
8046269851Speter_LT_COMPILER_BOILERPLATE
8047269851Speter_LT_LINKER_BOILERPLATE
8048269851Speter
8049269851Speter# Allow CC to be a program name with arguments.
8050269851Speterlt_save_CC=$CC
8051269851Speterlt_save_CFLAGS=$CFLAGS
8052269851Speterlt_save_GCC=$GCC
8053269851SpeterGCC=yes
8054269851SpeterCC=${GOC-"gccgo"}
8055269851SpeterCFLAGS=$GOFLAGS
8056269851Spetercompiler=$CC
8057269851Speter_LT_TAGVAR(compiler, $1)=$CC
8058298161Sbapt_LT_TAGVAR(LD, $1)=$LD
8059269851Speter_LT_CC_BASENAME([$compiler])
8060269851Speter
8061269851Speter# Go did not exist at the time GCC didn't implicitly link libc in.
8062269851Speter_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8063269851Speter
8064269851Speter_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8065269851Speter_LT_TAGVAR(reload_flag, $1)=$reload_flag
8066269851Speter_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8067269851Speter
8068269851Speterif test -n "$compiler"; then
8069269851Speter  _LT_COMPILER_NO_RTTI($1)
8070269851Speter  _LT_COMPILER_PIC($1)
8071269851Speter  _LT_COMPILER_C_O($1)
8072269851Speter  _LT_COMPILER_FILE_LOCKS($1)
8073269851Speter  _LT_LINKER_SHLIBS($1)
8074269851Speter  _LT_LINKER_HARDCODE_LIBPATH($1)
8075269851Speter
8076269851Speter  _LT_CONFIG($1)
8077269851Speterfi
8078269851Speter
8079269851SpeterAC_LANG_RESTORE
8080269851Speter
8081269851SpeterGCC=$lt_save_GCC
8082269851SpeterCC=$lt_save_CC
8083269851SpeterCFLAGS=$lt_save_CFLAGS
8084269851Speter])# _LT_LANG_GO_CONFIG
8085269851Speter
8086269851Speter
8087269851Speter# _LT_LANG_RC_CONFIG([TAG])
8088269851Speter# -------------------------
8089269851Speter# Ensure that the configuration variables for the Windows resource compiler
8090269851Speter# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8091298161Sbapt# to write the compiler configuration to 'libtool'.
8092269851Speterm4_defun([_LT_LANG_RC_CONFIG],
8093269851Speter[AC_REQUIRE([LT_PROG_RC])dnl
8094269851SpeterAC_LANG_SAVE
8095269851Speter
8096269851Speter# Source file extension for RC test sources.
8097269851Speterac_ext=rc
8098269851Speter
8099269851Speter# Object file extension for compiled RC test sources.
8100269851Speterobjext=o
8101269851Speter_LT_TAGVAR(objext, $1)=$objext
8102269851Speter
8103269851Speter# Code to be used in simple compile tests
8104269851Speterlt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8105269851Speter
8106269851Speter# Code to be used in simple link tests
8107298161Sbaptlt_simple_link_test_code=$lt_simple_compile_test_code
8108269851Speter
8109269851Speter# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8110269851Speter_LT_TAG_COMPILER
8111269851Speter
8112269851Speter# save warnings/boilerplate of simple test code
8113269851Speter_LT_COMPILER_BOILERPLATE
8114269851Speter_LT_LINKER_BOILERPLATE
8115269851Speter
8116269851Speter# Allow CC to be a program name with arguments.
8117298161Sbaptlt_save_CC=$CC
8118269851Speterlt_save_CFLAGS=$CFLAGS
8119269851Speterlt_save_GCC=$GCC
8120269851SpeterGCC=
8121269851SpeterCC=${RC-"windres"}
8122269851SpeterCFLAGS=
8123269851Spetercompiler=$CC
8124269851Speter_LT_TAGVAR(compiler, $1)=$CC
8125269851Speter_LT_CC_BASENAME([$compiler])
8126269851Speter_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8127269851Speter
8128269851Speterif test -n "$compiler"; then
8129269851Speter  :
8130269851Speter  _LT_CONFIG($1)
8131269851Speterfi
8132269851Speter
8133269851SpeterGCC=$lt_save_GCC
8134269851SpeterAC_LANG_RESTORE
8135269851SpeterCC=$lt_save_CC
8136269851SpeterCFLAGS=$lt_save_CFLAGS
8137269851Speter])# _LT_LANG_RC_CONFIG
8138269851Speter
8139269851Speter
8140269851Speter# LT_PROG_GCJ
8141269851Speter# -----------
8142269851SpeterAC_DEFUN([LT_PROG_GCJ],
8143269851Speter[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8144269851Speter  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8145269851Speter    [AC_CHECK_TOOL(GCJ, gcj,)
8146298161Sbapt      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8147269851Speter      AC_SUBST(GCJFLAGS)])])[]dnl
8148251883Speter])
8149251883Speter
8150269851Speter# Old name:
8151269851SpeterAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8152269851Speterdnl aclocal-1.4 backwards compatibility:
8153269851Speterdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8154269851Speter
8155269851Speter
8156269851Speter# LT_PROG_GO
8157269851Speter# ----------
8158269851SpeterAC_DEFUN([LT_PROG_GO],
8159269851Speter[AC_CHECK_TOOL(GOC, gccgo,)
8160251883Speter])
8161251883Speter
8162269851Speter
8163269851Speter# LT_PROG_RC
8164269851Speter# ----------
8165269851SpeterAC_DEFUN([LT_PROG_RC],
8166269851Speter[AC_CHECK_TOOL(RC, windres,)
8167269851Speter])
8168269851Speter
8169269851Speter# Old name:
8170269851SpeterAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8171269851Speterdnl aclocal-1.4 backwards compatibility:
8172269851Speterdnl AC_DEFUN([LT_AC_PROG_RC], [])
8173269851Speter
8174269851Speter
8175269851Speter# _LT_DECL_EGREP
8176269851Speter# --------------
8177269851Speter# If we don't have a new enough Autoconf to choose the best grep
8178269851Speter# available, choose the one first in the user's PATH.
8179269851Speterm4_defun([_LT_DECL_EGREP],
8180269851Speter[AC_REQUIRE([AC_PROG_EGREP])dnl
8181269851SpeterAC_REQUIRE([AC_PROG_FGREP])dnl
8182269851Spetertest -z "$GREP" && GREP=grep
8183269851Speter_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8184269851Speter_LT_DECL([], [EGREP], [1], [An ERE matcher])
8185269851Speter_LT_DECL([], [FGREP], [1], [A literal string matcher])
8186269851Speterdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8187269851SpeterAC_SUBST([GREP])
8188269851Speter])
8189269851Speter
8190269851Speter
8191269851Speter# _LT_DECL_OBJDUMP
8192269851Speter# --------------
8193269851Speter# If we don't have a new enough Autoconf to choose the best objdump
8194269851Speter# available, choose the one first in the user's PATH.
8195269851Speterm4_defun([_LT_DECL_OBJDUMP],
8196269851Speter[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8197269851Spetertest -z "$OBJDUMP" && OBJDUMP=objdump
8198269851Speter_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8199269851SpeterAC_SUBST([OBJDUMP])
8200269851Speter])
8201269851Speter
8202269851Speter# _LT_DECL_DLLTOOL
8203269851Speter# ----------------
8204269851Speter# Ensure DLLTOOL variable is set.
8205269851Speterm4_defun([_LT_DECL_DLLTOOL],
8206269851Speter[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8207269851Spetertest -z "$DLLTOOL" && DLLTOOL=dlltool
8208269851Speter_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8209269851SpeterAC_SUBST([DLLTOOL])
8210269851Speter])
8211269851Speter
8212269851Speter# _LT_DECL_SED
8213269851Speter# ------------
8214269851Speter# Check for a fully-functional sed program, that truncates
8215269851Speter# as few characters as possible.  Prefer GNU sed if found.
8216269851Speterm4_defun([_LT_DECL_SED],
8217269851Speter[AC_PROG_SED
8218269851Spetertest -z "$SED" && SED=sed
8219269851SpeterXsed="$SED -e 1s/^X//"
8220269851Speter_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8221269851Speter_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8222269851Speter    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8223269851Speter])# _LT_DECL_SED
8224269851Speter
8225269851Speterm4_ifndef([AC_PROG_SED], [
8226251883Speter# NOTE: This macro has been submitted for inclusion into   #
8227251883Speter#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8228251883Speter#  a released version of Autoconf we should remove this    #
8229251883Speter#  macro and use it instead.                               #
8230269851Speter
8231269851Speterm4_defun([AC_PROG_SED],
8232251883Speter[AC_MSG_CHECKING([for a sed that does not truncate output])
8233251883SpeterAC_CACHE_VAL(lt_cv_path_SED,
8234251883Speter[# Loop through the user's path and test for sed and gsed.
8235251883Speter# Then use that list of sed's as ones to test for truncation.
8236251883Speteras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8237251883Speterfor as_dir in $PATH
8238251883Speterdo
8239251883Speter  IFS=$as_save_IFS
8240251883Speter  test -z "$as_dir" && as_dir=.
8241251883Speter  for lt_ac_prog in sed gsed; do
8242251883Speter    for ac_exec_ext in '' $ac_executable_extensions; do
8243251883Speter      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8244251883Speter        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8245251883Speter      fi
8246251883Speter    done
8247251883Speter  done
8248251883Speterdone
8249269851SpeterIFS=$as_save_IFS
8250251883Speterlt_ac_max=0
8251251883Speterlt_ac_count=0
8252251883Speter# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8253251883Speter# along with /bin/sed that truncates output.
8254251883Speterfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8255298161Sbapt  test ! -f "$lt_ac_sed" && continue
8256251883Speter  cat /dev/null > conftest.in
8257251883Speter  lt_ac_count=0
8258251883Speter  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8259251883Speter  # Check for GNU sed and select it if it is found.
8260251883Speter  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8261251883Speter    lt_cv_path_SED=$lt_ac_sed
8262251883Speter    break
8263251883Speter  fi
8264251883Speter  while true; do
8265251883Speter    cat conftest.in conftest.in >conftest.tmp
8266251883Speter    mv conftest.tmp conftest.in
8267251883Speter    cp conftest.in conftest.nl
8268251883Speter    echo >>conftest.nl
8269251883Speter    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8270251883Speter    cmp -s conftest.out conftest.nl || break
8271251883Speter    # 10000 chars as input seems more than enough
8272298161Sbapt    test 10 -lt "$lt_ac_count" && break
8273251883Speter    lt_ac_count=`expr $lt_ac_count + 1`
8274298161Sbapt    if test "$lt_ac_count" -gt "$lt_ac_max"; then
8275251883Speter      lt_ac_max=$lt_ac_count
8276251883Speter      lt_cv_path_SED=$lt_ac_sed
8277251883Speter    fi
8278251883Speter  done
8279251883Speterdone
8280251883Speter])
8281251883SpeterSED=$lt_cv_path_SED
8282269851SpeterAC_SUBST([SED])
8283251883SpeterAC_MSG_RESULT([$SED])
8284269851Speter])#AC_PROG_SED
8285269851Speter])#m4_ifndef
8286269851Speter
8287269851Speter# Old name:
8288269851SpeterAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8289269851Speterdnl aclocal-1.4 backwards compatibility:
8290269851Speterdnl AC_DEFUN([LT_AC_PROG_SED], [])
8291269851Speter
8292269851Speter
8293269851Speter# _LT_CHECK_SHELL_FEATURES
8294269851Speter# ------------------------
8295269851Speter# Find out whether the shell is Bourne or XSI compatible,
8296269851Speter# or has some other useful features.
8297269851Speterm4_defun([_LT_CHECK_SHELL_FEATURES],
8298298161Sbapt[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8299269851Speter  lt_unset=unset
8300269851Speterelse
8301269851Speter  lt_unset=false
8302269851Speterfi
8303269851Speter_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8304269851Speter
8305269851Speter# test EBCDIC or ASCII
8306269851Spetercase `echo X|tr X '\101'` in
8307269851Speter A) # ASCII based system
8308269851Speter    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8309269851Speter  lt_SP2NL='tr \040 \012'
8310269851Speter  lt_NL2SP='tr \015\012 \040\040'
8311269851Speter  ;;
8312269851Speter *) # EBCDIC based system
8313269851Speter  lt_SP2NL='tr \100 \n'
8314269851Speter  lt_NL2SP='tr \r\n \100\100'
8315269851Speter  ;;
8316269851Speteresac
8317269851Speter_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8318269851Speter_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8319269851Speter])# _LT_CHECK_SHELL_FEATURES
8320269851Speter
8321269851Speter
8322269851Speter# _LT_PATH_CONVERSION_FUNCTIONS
8323269851Speter# -----------------------------
8324298161Sbapt# Determine what file name conversion functions should be used by
8325269851Speter# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8326269851Speter# for certain cross-compile configurations and native mingw.
8327269851Speterm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8328269851Speter[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8329269851SpeterAC_REQUIRE([AC_CANONICAL_BUILD])dnl
8330269851SpeterAC_MSG_CHECKING([how to convert $build file names to $host format])
8331269851SpeterAC_CACHE_VAL(lt_cv_to_host_file_cmd,
8332269851Speter[case $host in
8333269851Speter  *-*-mingw* )
8334269851Speter    case $build in
8335269851Speter      *-*-mingw* ) # actually msys
8336269851Speter        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8337269851Speter        ;;
8338269851Speter      *-*-cygwin* )
8339269851Speter        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8340269851Speter        ;;
8341269851Speter      * ) # otherwise, assume *nix
8342269851Speter        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8343269851Speter        ;;
8344269851Speter    esac
8345269851Speter    ;;
8346269851Speter  *-*-cygwin* )
8347269851Speter    case $build in
8348269851Speter      *-*-mingw* ) # actually msys
8349269851Speter        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8350269851Speter        ;;
8351269851Speter      *-*-cygwin* )
8352269851Speter        lt_cv_to_host_file_cmd=func_convert_file_noop
8353269851Speter        ;;
8354269851Speter      * ) # otherwise, assume *nix
8355269851Speter        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8356269851Speter        ;;
8357269851Speter    esac
8358269851Speter    ;;
8359269851Speter  * ) # unhandled hosts (and "normal" native builds)
8360269851Speter    lt_cv_to_host_file_cmd=func_convert_file_noop
8361269851Speter    ;;
8362269851Speteresac
8363269851Speter])
8364269851Speterto_host_file_cmd=$lt_cv_to_host_file_cmd
8365269851SpeterAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8366269851Speter_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8367269851Speter         [0], [convert $build file names to $host format])dnl
8368269851Speter
8369269851SpeterAC_MSG_CHECKING([how to convert $build file names to toolchain format])
8370269851SpeterAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8371269851Speter[#assume ordinary cross tools, or native build.
8372269851Speterlt_cv_to_tool_file_cmd=func_convert_file_noop
8373269851Spetercase $host in
8374269851Speter  *-*-mingw* )
8375269851Speter    case $build in
8376269851Speter      *-*-mingw* ) # actually msys
8377269851Speter        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8378269851Speter        ;;
8379269851Speter    esac
8380269851Speter    ;;
8381269851Speteresac
8382269851Speter])
8383269851Speterto_tool_file_cmd=$lt_cv_to_tool_file_cmd
8384269851SpeterAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8385269851Speter_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8386269851Speter         [0], [convert $build files to toolchain format])dnl
8387269851Speter])# _LT_PATH_CONVERSION_FUNCTIONS
8388269851Speter
8389269851Speter# Helper functions for option handling.                    -*- Autoconf -*-
8390251883Speter#
8391298161Sbapt#   Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
8392298161Sbapt#   Foundation, Inc.
8393269851Speter#   Written by Gary V. Vaughan, 2004
8394269851Speter#
8395269851Speter# This file is free software; the Free Software Foundation gives
8396269851Speter# unlimited permission to copy and/or distribute it, with or without
8397269851Speter# modifications, as long as this notice is preserved.
8398269851Speter
8399298161Sbapt# serial 8 ltoptions.m4
8400269851Speter
8401269851Speter# This is to help aclocal find these macros, as it can't see m4_define.
8402269851SpeterAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8403269851Speter
8404269851Speter
8405269851Speter# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8406269851Speter# ------------------------------------------
8407269851Speterm4_define([_LT_MANGLE_OPTION],
8408269851Speter[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8409269851Speter
8410269851Speter
8411269851Speter# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8412269851Speter# ---------------------------------------
8413269851Speter# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8414269851Speter# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8415269851Speter# saved as a flag.
8416269851Speterm4_define([_LT_SET_OPTION],
8417269851Speter[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8418269851Speterm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8419269851Speter        _LT_MANGLE_DEFUN([$1], [$2]),
8420298161Sbapt    [m4_warning([Unknown $1 option '$2'])])[]dnl
8421269851Speter])
8422269851Speter
8423269851Speter
8424269851Speter# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8425269851Speter# ------------------------------------------------------------
8426269851Speter# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8427269851Speterm4_define([_LT_IF_OPTION],
8428269851Speter[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8429269851Speter
8430269851Speter
8431269851Speter# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8432269851Speter# -------------------------------------------------------
8433269851Speter# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8434269851Speter# are set.
8435269851Speterm4_define([_LT_UNLESS_OPTIONS],
8436269851Speter[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8437269851Speter	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8438269851Speter		      [m4_define([$0_found])])])[]dnl
8439269851Speterm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8440269851Speter])[]dnl
8441269851Speter])
8442269851Speter
8443269851Speter
8444269851Speter# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8445269851Speter# ----------------------------------------
8446269851Speter# OPTION-LIST is a space-separated list of Libtool options associated
8447269851Speter# with MACRO-NAME.  If any OPTION has a matching handler declared with
8448269851Speter# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8449269851Speter# the unknown option and exit.
8450269851Speterm4_defun([_LT_SET_OPTIONS],
8451269851Speter[# Set options
8452269851Speterm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8453269851Speter    [_LT_SET_OPTION([$1], _LT_Option)])
8454269851Speter
8455269851Speterm4_if([$1],[LT_INIT],[
8456269851Speter  dnl
8457269851Speter  dnl Simply set some default values (i.e off) if boolean options were not
8458269851Speter  dnl specified:
8459269851Speter  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8460269851Speter  ])
8461269851Speter  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8462269851Speter  ])
8463269851Speter  dnl
8464269851Speter  dnl If no reference was made to various pairs of opposing options, then
8465269851Speter  dnl we run the default mode handler for the pair.  For example, if neither
8466298161Sbapt  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
8467269851Speter  dnl archives by default:
8468269851Speter  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8469269851Speter  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8470269851Speter  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8471269851Speter  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8472298161Sbapt		   [_LT_ENABLE_FAST_INSTALL])
8473298161Sbapt  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
8474298161Sbapt		   [_LT_WITH_AIX_SONAME([aix])])
8475269851Speter  ])
8476269851Speter])# _LT_SET_OPTIONS
8477269851Speter
8478269851Speter
8479269851Speter
8480269851Speter# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8481269851Speter# -----------------------------------------
8482269851Speterm4_define([_LT_MANGLE_DEFUN],
8483269851Speter[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8484269851Speter
8485269851Speter
8486269851Speter# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8487269851Speter# -----------------------------------------------
8488269851Speterm4_define([LT_OPTION_DEFINE],
8489269851Speter[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8490269851Speter])# LT_OPTION_DEFINE
8491269851Speter
8492269851Speter
8493269851Speter# dlopen
8494269851Speter# ------
8495269851SpeterLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8496269851Speter])
8497269851Speter
8498269851SpeterAU_DEFUN([AC_LIBTOOL_DLOPEN],
8499269851Speter[_LT_SET_OPTION([LT_INIT], [dlopen])
8500269851SpeterAC_DIAGNOSE([obsolete],
8501269851Speter[$0: Remove this warning and the call to _LT_SET_OPTION when you
8502298161Sbaptput the 'dlopen' option into LT_INIT's first parameter.])
8503269851Speter])
8504269851Speter
8505269851Speterdnl aclocal-1.4 backwards compatibility:
8506269851Speterdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8507269851Speter
8508269851Speter
8509269851Speter# win32-dll
8510269851Speter# ---------
8511269851Speter# Declare package support for building win32 dll's.
8512269851SpeterLT_OPTION_DEFINE([LT_INIT], [win32-dll],
8513269851Speter[enable_win32_dll=yes
8514269851Speter
8515269851Spetercase $host in
8516269851Speter*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8517269851Speter  AC_CHECK_TOOL(AS, as, false)
8518269851Speter  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8519269851Speter  AC_CHECK_TOOL(OBJDUMP, objdump, false)
8520269851Speter  ;;
8521269851Speteresac
8522269851Speter
8523269851Spetertest -z "$AS" && AS=as
8524269851Speter_LT_DECL([], [AS],      [1], [Assembler program])dnl
8525269851Speter
8526269851Spetertest -z "$DLLTOOL" && DLLTOOL=dlltool
8527269851Speter_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8528269851Speter
8529269851Spetertest -z "$OBJDUMP" && OBJDUMP=objdump
8530269851Speter_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8531269851Speter])# win32-dll
8532269851Speter
8533269851SpeterAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8534269851Speter[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8535269851Speter_LT_SET_OPTION([LT_INIT], [win32-dll])
8536269851SpeterAC_DIAGNOSE([obsolete],
8537269851Speter[$0: Remove this warning and the call to _LT_SET_OPTION when you
8538298161Sbaptput the 'win32-dll' option into LT_INIT's first parameter.])
8539269851Speter])
8540269851Speter
8541269851Speterdnl aclocal-1.4 backwards compatibility:
8542269851Speterdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8543269851Speter
8544269851Speter
8545269851Speter# _LT_ENABLE_SHARED([DEFAULT])
8546269851Speter# ----------------------------
8547298161Sbapt# implement the --enable-shared flag, and supports the 'shared' and
8548298161Sbapt# 'disable-shared' LT_INIT options.
8549298161Sbapt# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
8550269851Speterm4_define([_LT_ENABLE_SHARED],
8551269851Speter[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8552269851SpeterAC_ARG_ENABLE([shared],
8553269851Speter    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8554269851Speter	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8555269851Speter    [p=${PACKAGE-default}
8556269851Speter    case $enableval in
8557269851Speter    yes) enable_shared=yes ;;
8558269851Speter    no) enable_shared=no ;;
8559269851Speter    *)
8560269851Speter      enable_shared=no
8561269851Speter      # Look at the argument we got.  We use all the common list separators.
8562298161Sbapt      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8563269851Speter      for pkg in $enableval; do
8564298161Sbapt	IFS=$lt_save_ifs
8565269851Speter	if test "X$pkg" = "X$p"; then
8566269851Speter	  enable_shared=yes
8567269851Speter	fi
8568269851Speter      done
8569298161Sbapt      IFS=$lt_save_ifs
8570269851Speter      ;;
8571269851Speter    esac],
8572269851Speter    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8573269851Speter
8574269851Speter    _LT_DECL([build_libtool_libs], [enable_shared], [0],
8575269851Speter	[Whether or not to build shared libraries])
8576269851Speter])# _LT_ENABLE_SHARED
8577269851Speter
8578269851SpeterLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8579269851SpeterLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8580269851Speter
8581269851Speter# Old names:
8582269851SpeterAC_DEFUN([AC_ENABLE_SHARED],
8583269851Speter[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8584269851Speter])
8585269851Speter
8586269851SpeterAC_DEFUN([AC_DISABLE_SHARED],
8587269851Speter[_LT_SET_OPTION([LT_INIT], [disable-shared])
8588269851Speter])
8589269851Speter
8590269851SpeterAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8591269851SpeterAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8592269851Speter
8593269851Speterdnl aclocal-1.4 backwards compatibility:
8594269851Speterdnl AC_DEFUN([AM_ENABLE_SHARED], [])
8595269851Speterdnl AC_DEFUN([AM_DISABLE_SHARED], [])
8596269851Speter
8597269851Speter
8598269851Speter
8599269851Speter# _LT_ENABLE_STATIC([DEFAULT])
8600269851Speter# ----------------------------
8601298161Sbapt# implement the --enable-static flag, and support the 'static' and
8602298161Sbapt# 'disable-static' LT_INIT options.
8603298161Sbapt# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
8604269851Speterm4_define([_LT_ENABLE_STATIC],
8605269851Speter[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8606269851SpeterAC_ARG_ENABLE([static],
8607269851Speter    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8608269851Speter	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8609269851Speter    [p=${PACKAGE-default}
8610269851Speter    case $enableval in
8611269851Speter    yes) enable_static=yes ;;
8612269851Speter    no) enable_static=no ;;
8613269851Speter    *)
8614269851Speter     enable_static=no
8615269851Speter      # Look at the argument we got.  We use all the common list separators.
8616298161Sbapt      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8617269851Speter      for pkg in $enableval; do
8618298161Sbapt	IFS=$lt_save_ifs
8619269851Speter	if test "X$pkg" = "X$p"; then
8620269851Speter	  enable_static=yes
8621269851Speter	fi
8622269851Speter      done
8623298161Sbapt      IFS=$lt_save_ifs
8624269851Speter      ;;
8625269851Speter    esac],
8626269851Speter    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8627269851Speter
8628269851Speter    _LT_DECL([build_old_libs], [enable_static], [0],
8629269851Speter	[Whether or not to build static libraries])
8630269851Speter])# _LT_ENABLE_STATIC
8631269851Speter
8632269851SpeterLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8633269851SpeterLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8634269851Speter
8635269851Speter# Old names:
8636269851SpeterAC_DEFUN([AC_ENABLE_STATIC],
8637269851Speter[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8638269851Speter])
8639269851Speter
8640269851SpeterAC_DEFUN([AC_DISABLE_STATIC],
8641269851Speter[_LT_SET_OPTION([LT_INIT], [disable-static])
8642269851Speter])
8643269851Speter
8644269851SpeterAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8645269851SpeterAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8646269851Speter
8647269851Speterdnl aclocal-1.4 backwards compatibility:
8648269851Speterdnl AC_DEFUN([AM_ENABLE_STATIC], [])
8649269851Speterdnl AC_DEFUN([AM_DISABLE_STATIC], [])
8650269851Speter
8651269851Speter
8652269851Speter
8653269851Speter# _LT_ENABLE_FAST_INSTALL([DEFAULT])
8654269851Speter# ----------------------------------
8655298161Sbapt# implement the --enable-fast-install flag, and support the 'fast-install'
8656298161Sbapt# and 'disable-fast-install' LT_INIT options.
8657298161Sbapt# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
8658269851Speterm4_define([_LT_ENABLE_FAST_INSTALL],
8659269851Speter[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8660269851SpeterAC_ARG_ENABLE([fast-install],
8661269851Speter    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8662269851Speter    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8663269851Speter    [p=${PACKAGE-default}
8664269851Speter    case $enableval in
8665269851Speter    yes) enable_fast_install=yes ;;
8666269851Speter    no) enable_fast_install=no ;;
8667269851Speter    *)
8668269851Speter      enable_fast_install=no
8669269851Speter      # Look at the argument we got.  We use all the common list separators.
8670298161Sbapt      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8671269851Speter      for pkg in $enableval; do
8672298161Sbapt	IFS=$lt_save_ifs
8673269851Speter	if test "X$pkg" = "X$p"; then
8674269851Speter	  enable_fast_install=yes
8675269851Speter	fi
8676269851Speter      done
8677298161Sbapt      IFS=$lt_save_ifs
8678269851Speter      ;;
8679269851Speter    esac],
8680269851Speter    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
8681269851Speter
8682269851Speter_LT_DECL([fast_install], [enable_fast_install], [0],
8683269851Speter	 [Whether or not to optimize for fast installation])dnl
8684269851Speter])# _LT_ENABLE_FAST_INSTALL
8685269851Speter
8686269851SpeterLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
8687269851SpeterLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
8688269851Speter
8689269851Speter# Old names:
8690269851SpeterAU_DEFUN([AC_ENABLE_FAST_INSTALL],
8691269851Speter[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
8692269851SpeterAC_DIAGNOSE([obsolete],
8693269851Speter[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8694298161Sbaptthe 'fast-install' option into LT_INIT's first parameter.])
8695269851Speter])
8696269851Speter
8697269851SpeterAU_DEFUN([AC_DISABLE_FAST_INSTALL],
8698269851Speter[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
8699269851SpeterAC_DIAGNOSE([obsolete],
8700269851Speter[$0: Remove this warning and the call to _LT_SET_OPTION when you put
8701298161Sbaptthe 'disable-fast-install' option into LT_INIT's first parameter.])
8702269851Speter])
8703269851Speter
8704269851Speterdnl aclocal-1.4 backwards compatibility:
8705269851Speterdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
8706269851Speterdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
8707269851Speter
8708269851Speter
8709298161Sbapt# _LT_WITH_AIX_SONAME([DEFAULT])
8710298161Sbapt# ----------------------------------
8711298161Sbapt# implement the --with-aix-soname flag, and support the `aix-soname=aix'
8712298161Sbapt# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
8713298161Sbapt# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
8714298161Sbaptm4_define([_LT_WITH_AIX_SONAME],
8715298161Sbapt[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
8716298161Sbaptshared_archive_member_spec=
8717298161Sbaptcase $host,$enable_shared in
8718298161Sbaptpower*-*-aix[[5-9]]*,yes)
8719298161Sbapt  AC_MSG_CHECKING([which variant of shared library versioning to provide])
8720298161Sbapt  AC_ARG_WITH([aix-soname],
8721298161Sbapt    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
8722298161Sbapt      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
8723298161Sbapt    [case $withval in
8724298161Sbapt    aix|svr4|both)
8725298161Sbapt      ;;
8726298161Sbapt    *)
8727298161Sbapt      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
8728298161Sbapt      ;;
8729298161Sbapt    esac
8730298161Sbapt    lt_cv_with_aix_soname=$with_aix_soname],
8731298161Sbapt    [AC_CACHE_VAL([lt_cv_with_aix_soname],
8732298161Sbapt      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
8733298161Sbapt    with_aix_soname=$lt_cv_with_aix_soname])
8734298161Sbapt  AC_MSG_RESULT([$with_aix_soname])
8735298161Sbapt  if test aix != "$with_aix_soname"; then
8736298161Sbapt    # For the AIX way of multilib, we name the shared archive member
8737298161Sbapt    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
8738298161Sbapt    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
8739298161Sbapt    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
8740298161Sbapt    # the AIX toolchain works better with OBJECT_MODE set (default 32).
8741298161Sbapt    if test 64 = "${OBJECT_MODE-32}"; then
8742298161Sbapt      shared_archive_member_spec=shr_64
8743298161Sbapt    else
8744298161Sbapt      shared_archive_member_spec=shr
8745298161Sbapt    fi
8746298161Sbapt  fi
8747298161Sbapt  ;;
8748298161Sbapt*)
8749298161Sbapt  with_aix_soname=aix
8750298161Sbapt  ;;
8751298161Sbaptesac
8752298161Sbapt
8753298161Sbapt_LT_DECL([], [shared_archive_member_spec], [0],
8754298161Sbapt    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
8755298161Sbapt])# _LT_WITH_AIX_SONAME
8756298161Sbapt
8757298161SbaptLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
8758298161SbaptLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
8759298161SbaptLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
8760298161Sbapt
8761298161Sbapt
8762269851Speter# _LT_WITH_PIC([MODE])
8763269851Speter# --------------------
8764298161Sbapt# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
8765269851Speter# LT_INIT options.
8766298161Sbapt# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
8767269851Speterm4_define([_LT_WITH_PIC],
8768269851Speter[AC_ARG_WITH([pic],
8769269851Speter    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
8770269851Speter	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
8771269851Speter    [lt_p=${PACKAGE-default}
8772269851Speter    case $withval in
8773269851Speter    yes|no) pic_mode=$withval ;;
8774269851Speter    *)
8775269851Speter      pic_mode=default
8776269851Speter      # Look at the argument we got.  We use all the common list separators.
8777298161Sbapt      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
8778269851Speter      for lt_pkg in $withval; do
8779298161Sbapt	IFS=$lt_save_ifs
8780269851Speter	if test "X$lt_pkg" = "X$lt_p"; then
8781269851Speter	  pic_mode=yes
8782269851Speter	fi
8783269851Speter      done
8784298161Sbapt      IFS=$lt_save_ifs
8785269851Speter      ;;
8786269851Speter    esac],
8787298161Sbapt    [pic_mode=m4_default([$1], [default])])
8788269851Speter
8789269851Speter_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
8790269851Speter])# _LT_WITH_PIC
8791269851Speter
8792269851SpeterLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
8793269851SpeterLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
8794269851Speter
8795269851Speter# Old name:
8796269851SpeterAU_DEFUN([AC_LIBTOOL_PICMODE],
8797269851Speter[_LT_SET_OPTION([LT_INIT], [pic-only])
8798269851SpeterAC_DIAGNOSE([obsolete],
8799269851Speter[$0: Remove this warning and the call to _LT_SET_OPTION when you
8800298161Sbaptput the 'pic-only' option into LT_INIT's first parameter.])
8801269851Speter])
8802269851Speter
8803269851Speterdnl aclocal-1.4 backwards compatibility:
8804269851Speterdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
8805269851Speter
8806269851Speter
8807269851Speterm4_define([_LTDL_MODE], [])
8808269851SpeterLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
8809269851Speter		 [m4_define([_LTDL_MODE], [nonrecursive])])
8810269851SpeterLT_OPTION_DEFINE([LTDL_INIT], [recursive],
8811269851Speter		 [m4_define([_LTDL_MODE], [recursive])])
8812269851SpeterLT_OPTION_DEFINE([LTDL_INIT], [subproject],
8813269851Speter		 [m4_define([_LTDL_MODE], [subproject])])
8814269851Speter
8815269851Speterm4_define([_LTDL_TYPE], [])
8816269851SpeterLT_OPTION_DEFINE([LTDL_INIT], [installable],
8817269851Speter		 [m4_define([_LTDL_TYPE], [installable])])
8818269851SpeterLT_OPTION_DEFINE([LTDL_INIT], [convenience],
8819269851Speter		 [m4_define([_LTDL_TYPE], [convenience])])
8820269851Speter
8821269851Speter# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
8822269851Speter#
8823298161Sbapt# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
8824298161Sbapt# Foundation, Inc.
8825269851Speter# Written by Gary V. Vaughan, 2004
8826269851Speter#
8827269851Speter# This file is free software; the Free Software Foundation gives
8828269851Speter# unlimited permission to copy and/or distribute it, with or without
8829269851Speter# modifications, as long as this notice is preserved.
8830269851Speter
8831269851Speter# serial 6 ltsugar.m4
8832269851Speter
8833269851Speter# This is to help aclocal find these macros, as it can't see m4_define.
8834269851SpeterAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
8835269851Speter
8836269851Speter
8837269851Speter# lt_join(SEP, ARG1, [ARG2...])
8838269851Speter# -----------------------------
8839269851Speter# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
8840269851Speter# associated separator.
8841269851Speter# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
8842269851Speter# versions in m4sugar had bugs.
8843269851Speterm4_define([lt_join],
8844269851Speter[m4_if([$#], [1], [],
8845269851Speter       [$#], [2], [[$2]],
8846269851Speter       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
8847269851Speterm4_define([_lt_join],
8848269851Speter[m4_if([$#$2], [2], [],
8849269851Speter       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
8850269851Speter
8851269851Speter
8852269851Speter# lt_car(LIST)
8853269851Speter# lt_cdr(LIST)
8854269851Speter# ------------
8855269851Speter# Manipulate m4 lists.
8856269851Speter# These macros are necessary as long as will still need to support
8857298161Sbapt# Autoconf-2.59, which quotes differently.
8858269851Speterm4_define([lt_car], [[$1]])
8859269851Speterm4_define([lt_cdr],
8860269851Speter[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
8861269851Speter       [$#], 1, [],
8862269851Speter       [m4_dquote(m4_shift($@))])])
8863269851Speterm4_define([lt_unquote], $1)
8864269851Speter
8865269851Speter
8866269851Speter# lt_append(MACRO-NAME, STRING, [SEPARATOR])
8867269851Speter# ------------------------------------------
8868298161Sbapt# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
8869269851Speter# Note that neither SEPARATOR nor STRING are expanded; they are appended
8870269851Speter# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
8871269851Speter# No SEPARATOR is output if MACRO-NAME was previously undefined (different
8872269851Speter# than defined and empty).
8873269851Speter#
8874269851Speter# This macro is needed until we can rely on Autoconf 2.62, since earlier
8875269851Speter# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
8876269851Speterm4_define([lt_append],
8877269851Speter[m4_define([$1],
8878269851Speter	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
8879269851Speter
8880269851Speter
8881269851Speter
8882269851Speter# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
8883269851Speter# ----------------------------------------------------------
8884269851Speter# Produce a SEP delimited list of all paired combinations of elements of
8885269851Speter# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
8886269851Speter# has the form PREFIXmINFIXSUFFIXn.
8887269851Speter# Needed until we can rely on m4_combine added in Autoconf 2.62.
8888269851Speterm4_define([lt_combine],
8889269851Speter[m4_if(m4_eval([$# > 3]), [1],
8890269851Speter       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
8891269851Speter[[m4_foreach([_Lt_prefix], [$2],
8892269851Speter	     [m4_foreach([_Lt_suffix],
8893269851Speter		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
8894269851Speter	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
8895269851Speter
8896269851Speter
8897269851Speter# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
8898269851Speter# -----------------------------------------------------------------------
8899269851Speter# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
8900269851Speter# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
8901269851Speterm4_define([lt_if_append_uniq],
8902269851Speter[m4_ifdef([$1],
8903269851Speter	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
8904269851Speter		 [lt_append([$1], [$2], [$3])$4],
8905269851Speter		 [$5])],
8906269851Speter	  [lt_append([$1], [$2], [$3])$4])])
8907269851Speter
8908269851Speter
8909269851Speter# lt_dict_add(DICT, KEY, VALUE)
8910269851Speter# -----------------------------
8911269851Speterm4_define([lt_dict_add],
8912269851Speter[m4_define([$1($2)], [$3])])
8913269851Speter
8914269851Speter
8915269851Speter# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
8916269851Speter# --------------------------------------------
8917269851Speterm4_define([lt_dict_add_subkey],
8918269851Speter[m4_define([$1($2:$3)], [$4])])
8919269851Speter
8920269851Speter
8921269851Speter# lt_dict_fetch(DICT, KEY, [SUBKEY])
8922269851Speter# ----------------------------------
8923269851Speterm4_define([lt_dict_fetch],
8924269851Speter[m4_ifval([$3],
8925269851Speter	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
8926269851Speter    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
8927269851Speter
8928269851Speter
8929269851Speter# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
8930269851Speter# -----------------------------------------------------------------
8931269851Speterm4_define([lt_if_dict_fetch],
8932269851Speter[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
8933269851Speter	[$5],
8934269851Speter    [$6])])
8935269851Speter
8936269851Speter
8937269851Speter# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
8938269851Speter# --------------------------------------------------------------
8939269851Speterm4_define([lt_dict_filter],
8940269851Speter[m4_if([$5], [], [],
8941269851Speter  [lt_join(m4_quote(m4_default([$4], [[, ]])),
8942269851Speter           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
8943269851Speter		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
8944269851Speter])
8945269851Speter
8946269851Speter# ltversion.m4 -- version numbers			-*- Autoconf -*-
8947269851Speter#
8948298161Sbapt#   Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
8949269851Speter#   Written by Scott James Remnant, 2004
8950269851Speter#
8951269851Speter# This file is free software; the Free Software Foundation gives
8952269851Speter# unlimited permission to copy and/or distribute it, with or without
8953269851Speter# modifications, as long as this notice is preserved.
8954269851Speter
8955269851Speter# @configure_input@
8956269851Speter
8957298161Sbapt# serial 4179 ltversion.m4
8958269851Speter# This file is part of GNU Libtool
8959269851Speter
8960298161Sbaptm4_define([LT_PACKAGE_VERSION], [2.4.6])
8961298161Sbaptm4_define([LT_PACKAGE_REVISION], [2.4.6])
8962269851Speter
8963269851SpeterAC_DEFUN([LTVERSION_VERSION],
8964298161Sbapt[macro_version='2.4.6'
8965298161Sbaptmacro_revision='2.4.6'
8966269851Speter_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
8967269851Speter_LT_DECL(, macro_revision, 0)
8968269851Speter])
8969269851Speter
8970269851Speter# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
8971269851Speter#
8972298161Sbapt#   Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
8973298161Sbapt#   Foundation, Inc.
8974269851Speter#   Written by Scott James Remnant, 2004.
8975269851Speter#
8976269851Speter# This file is free software; the Free Software Foundation gives
8977269851Speter# unlimited permission to copy and/or distribute it, with or without
8978269851Speter# modifications, as long as this notice is preserved.
8979269851Speter
8980269851Speter# serial 5 lt~obsolete.m4
8981269851Speter
8982269851Speter# These exist entirely to fool aclocal when bootstrapping libtool.
8983269851Speter#
8984298161Sbapt# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
8985269851Speter# which have later been changed to m4_define as they aren't part of the
8986269851Speter# exported API, or moved to Autoconf or Automake where they belong.
8987269851Speter#
8988269851Speter# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
8989269851Speter# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
8990269851Speter# using a macro with the same name in our local m4/libtool.m4 it'll
8991269851Speter# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
8992269851Speter# and doesn't know about Autoconf macros at all.)
8993269851Speter#
8994269851Speter# So we provide this file, which has a silly filename so it's always
8995269851Speter# included after everything else.  This provides aclocal with the
8996269851Speter# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
8997269851Speter# because those macros already exist, or will be overwritten later.
8998298161Sbapt# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
8999269851Speter#
9000269851Speter# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9001269851Speter# Yes, that means every name once taken will need to remain here until
9002269851Speter# we give up compatibility with versions before 1.7, at which point
9003269851Speter# we need to keep only those names which we still refer to.
9004269851Speter
9005269851Speter# This is to help aclocal find these macros, as it can't see m4_define.
9006269851SpeterAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9007269851Speter
9008269851Speterm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9009269851Speterm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9010269851Speterm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9011269851Speterm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9012269851Speterm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9013269851Speterm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9014269851Speterm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9015269851Speterm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9016269851Speterm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9017269851Speterm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9018269851Speterm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9019269851Speterm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9020269851Speterm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9021269851Speterm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9022269851Speterm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9023269851Speterm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9024269851Speterm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9025269851Speterm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9026269851Speterm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9027269851Speterm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9028269851Speterm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9029269851Speterm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9030269851Speterm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9031269851Speterm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9032269851Speterm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9033269851Speterm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9034269851Speterm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9035269851Speterm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9036269851Speterm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9037269851Speterm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9038269851Speterm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9039269851Speterm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9040269851Speterm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9041269851Speterm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9042269851Speterm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9043269851Speterm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9044269851Speterm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9045269851Speterm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9046269851Speterm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9047269851Speterm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9048269851Speterm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9049269851Speterm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9050269851Speterm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9051269851Speterm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9052269851Speterm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9053269851Speterm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9054269851Speterm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9055269851Speterm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9056269851Speterm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9057269851Speterm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9058269851Speterm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9059269851Speterm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9060269851Speterm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9061269851Speterm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9062269851Speterm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9063269851Speterm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9064269851Speterm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9065269851Speterm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9066269851Speterm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
9067269851Speterm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
9068269851Speterm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
9069269851Speter
9070346442Scy# Copyright (C) 2002-2017 Free Software Foundation, Inc.
9071269851Speter#
9072251883Speter# This file is free software; the Free Software Foundation
9073251883Speter# gives unlimited permission to copy and/or distribute it,
9074251883Speter# with or without modifications, as long as this notice is preserved.
9075251883Speter
9076251883Speter# AM_AUTOMAKE_VERSION(VERSION)
9077251883Speter# ----------------------------
9078251883Speter# Automake X.Y traces this macro to ensure aclocal.m4 has been
9079251883Speter# generated from the m4 files accompanying Automake X.Y.
9080269851Speter# (This private macro should not be called outside this file.)
9081269851SpeterAC_DEFUN([AM_AUTOMAKE_VERSION],
9082298161Sbapt[am__api_version='1.15'
9083269851Speterdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9084269851Speterdnl require some minimum version.  Point them to the right macro.
9085346442Scym4_if([$1], [1.15.1], [],
9086269851Speter      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9087269851Speter])
9088251883Speter
9089269851Speter# _AM_AUTOCONF_VERSION(VERSION)
9090269851Speter# -----------------------------
9091269851Speter# aclocal traces this macro to find the Autoconf version.
9092269851Speter# This is a private macro too.  Using m4_define simplifies
9093269851Speter# the logic in aclocal, which can simply ignore this definition.
9094269851Speterm4_define([_AM_AUTOCONF_VERSION], [])
9095269851Speter
9096251883Speter# AM_SET_CURRENT_AUTOMAKE_VERSION
9097251883Speter# -------------------------------
9098269851Speter# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9099269851Speter# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9100251883SpeterAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9101346442Scy[AM_AUTOMAKE_VERSION([1.15.1])dnl
9102269851Speterm4_ifndef([AC_AUTOCONF_VERSION],
9103269851Speter  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9104269851Speter_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9105251883Speter
9106251883Speter# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
9107251883Speter
9108346442Scy# Copyright (C) 2001-2017 Free Software Foundation, Inc.
9109251883Speter#
9110251883Speter# This file is free software; the Free Software Foundation
9111251883Speter# gives unlimited permission to copy and/or distribute it,
9112251883Speter# with or without modifications, as long as this notice is preserved.
9113251883Speter
9114251883Speter# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9115298161Sbapt# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
9116298161Sbapt# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
9117251883Speter#
9118251883Speter# Of course, Automake must honor this variable whenever it calls a
9119251883Speter# tool from the auxiliary directory.  The problem is that $srcdir (and
9120251883Speter# therefore $ac_aux_dir as well) can be either absolute or relative,
9121251883Speter# depending on how configure is run.  This is pretty annoying, since
9122251883Speter# it makes $ac_aux_dir quite unusable in subdirectories: in the top
9123251883Speter# source directory, any form will work fine, but in subdirectories a
9124251883Speter# relative path needs to be adjusted first.
9125251883Speter#
9126251883Speter# $ac_aux_dir/missing
9127251883Speter#    fails when called from a subdirectory if $ac_aux_dir is relative
9128251883Speter# $top_srcdir/$ac_aux_dir/missing
9129251883Speter#    fails if $ac_aux_dir is absolute,
9130251883Speter#    fails when called from a subdirectory in a VPATH build with
9131251883Speter#          a relative $ac_aux_dir
9132251883Speter#
9133251883Speter# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9134251883Speter# are both prefixed by $srcdir.  In an in-source build this is usually
9135298161Sbapt# harmless because $srcdir is '.', but things will broke when you
9136251883Speter# start a VPATH build or use an absolute $srcdir.
9137251883Speter#
9138251883Speter# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9139251883Speter# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9140251883Speter#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9141251883Speter# and then we would define $MISSING as
9142251883Speter#   MISSING="\${SHELL} $am_aux_dir/missing"
9143251883Speter# This will work as long as MISSING is not called from configure, because
9144251883Speter# unfortunately $(top_srcdir) has no meaning in configure.
9145251883Speter# However there are other variables, like CC, which are often used in
9146251883Speter# configure, and could therefore not use this "fixed" $ac_aux_dir.
9147251883Speter#
9148251883Speter# Another solution, used here, is to always expand $ac_aux_dir to an
9149251883Speter# absolute PATH.  The drawback is that using absolute paths prevent a
9150251883Speter# configured tree to be moved without reconfiguration.
9151251883Speter
9152251883SpeterAC_DEFUN([AM_AUX_DIR_EXPAND],
9153298161Sbapt[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
9154298161Sbapt# Expand $ac_aux_dir to an absolute path.
9155298161Sbaptam_aux_dir=`cd "$ac_aux_dir" && pwd`
9156251883Speter])
9157251883Speter
9158251883Speter# AM_CONDITIONAL                                            -*- Autoconf -*-
9159251883Speter
9160346442Scy# Copyright (C) 1997-2017 Free Software Foundation, Inc.
9161251883Speter#
9162251883Speter# This file is free software; the Free Software Foundation
9163251883Speter# gives unlimited permission to copy and/or distribute it,
9164251883Speter# with or without modifications, as long as this notice is preserved.
9165251883Speter
9166251883Speter# AM_CONDITIONAL(NAME, SHELL-CONDITION)
9167251883Speter# -------------------------------------
9168251883Speter# Define a conditional.
9169251883SpeterAC_DEFUN([AM_CONDITIONAL],
9170298161Sbapt[AC_PREREQ([2.52])dnl
9171298161Sbapt m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
9172298161Sbapt       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9173269851SpeterAC_SUBST([$1_TRUE])dnl
9174269851SpeterAC_SUBST([$1_FALSE])dnl
9175269851Speter_AM_SUBST_NOTMAKE([$1_TRUE])dnl
9176269851Speter_AM_SUBST_NOTMAKE([$1_FALSE])dnl
9177269851Speterm4_define([_AM_COND_VALUE_$1], [$2])dnl
9178251883Speterif $2; then
9179251883Speter  $1_TRUE=
9180251883Speter  $1_FALSE='#'
9181251883Speterelse
9182251883Speter  $1_TRUE='#'
9183251883Speter  $1_FALSE=
9184251883Speterfi
9185251883SpeterAC_CONFIG_COMMANDS_PRE(
9186251883Speter[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9187251883Speter  AC_MSG_ERROR([[conditional "$1" was never defined.
9188251883SpeterUsually this means the macro was only invoked conditionally.]])
9189251883Speterfi])])
9190251883Speter
9191346442Scy# Copyright (C) 1999-2017 Free Software Foundation, Inc.
9192251883Speter#
9193251883Speter# This file is free software; the Free Software Foundation
9194251883Speter# gives unlimited permission to copy and/or distribute it,
9195251883Speter# with or without modifications, as long as this notice is preserved.
9196251883Speter
9197251883Speter
9198298161Sbapt# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
9199251883Speter# written in clear, in which case automake, when reading aclocal.m4,
9200251883Speter# will think it sees a *use*, and therefore will trigger all it's
9201251883Speter# C support machinery.  Also note that it means that autoscan, seeing
9202251883Speter# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9203251883Speter
9204251883Speter
9205251883Speter# _AM_DEPENDENCIES(NAME)
9206251883Speter# ----------------------
9207251883Speter# See how the compiler implements dependency checking.
9208298161Sbapt# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
9209251883Speter# We try a few techniques and use that to set a single cache variable.
9210251883Speter#
9211251883Speter# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9212251883Speter# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9213251883Speter# dependency, and given that the user is not expected to run this macro,
9214251883Speter# just rely on AC_PROG_CC.
9215251883SpeterAC_DEFUN([_AM_DEPENDENCIES],
9216251883Speter[AC_REQUIRE([AM_SET_DEPDIR])dnl
9217251883SpeterAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9218251883SpeterAC_REQUIRE([AM_MAKE_INCLUDE])dnl
9219251883SpeterAC_REQUIRE([AM_DEP_TRACK])dnl
9220251883Speter
9221298161Sbaptm4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
9222298161Sbapt      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
9223298161Sbapt      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9224298161Sbapt      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
9225298161Sbapt      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
9226298161Sbapt      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
9227298161Sbapt                    [depcc="$$1"   am_compiler_list=])
9228251883Speter
9229251883SpeterAC_CACHE_CHECK([dependency style of $depcc],
9230251883Speter               [am_cv_$1_dependencies_compiler_type],
9231251883Speter[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9232251883Speter  # We make a subdir and do the tests there.  Otherwise we can end up
9233251883Speter  # making bogus files that we don't know about and never remove.  For
9234251883Speter  # instance it was reported that on HP-UX the gcc test will end up
9235298161Sbapt  # making a dummy file named 'D' -- because '-MD' means "put the output
9236298161Sbapt  # in D".
9237269851Speter  rm -rf conftest.dir
9238251883Speter  mkdir conftest.dir
9239251883Speter  # Copy depcomp to subdir because otherwise we won't find it if we're
9240251883Speter  # using a relative directory.
9241251883Speter  cp "$am_depcomp" conftest.dir
9242251883Speter  cd conftest.dir
9243251883Speter  # We will build objects and dependencies in a subdirectory because
9244251883Speter  # it helps to detect inapplicable dependency modes.  For instance
9245251883Speter  # both Tru64's cc and ICC support -MD to output dependencies as a
9246251883Speter  # side effect of compilation, but ICC will put the dependencies in
9247251883Speter  # the current directory while Tru64 will put them in the object
9248251883Speter  # directory.
9249251883Speter  mkdir sub
9250251883Speter
9251251883Speter  am_cv_$1_dependencies_compiler_type=none
9252251883Speter  if test "$am_compiler_list" = ""; then
9253251883Speter     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9254251883Speter  fi
9255269851Speter  am__universal=false
9256269851Speter  m4_case([$1], [CC],
9257269851Speter    [case " $depcc " in #(
9258269851Speter     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9259269851Speter     esac],
9260269851Speter    [CXX],
9261269851Speter    [case " $depcc " in #(
9262269851Speter     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9263269851Speter     esac])
9264269851Speter
9265251883Speter  for depmode in $am_compiler_list; do
9266251883Speter    # Setup a source with many dependencies, because some compilers
9267251883Speter    # like to wrap large dependency lists on column 80 (with \), and
9268251883Speter    # we should not choose a depcomp mode which is confused by this.
9269251883Speter    #
9270251883Speter    # We need to recreate these files for each test, as the compiler may
9271251883Speter    # overwrite some of them when testing with obscure command lines.
9272251883Speter    # This happens at least with the AIX C compiler.
9273251883Speter    : > sub/conftest.c
9274251883Speter    for i in 1 2 3 4 5 6; do
9275251883Speter      echo '#include "conftst'$i'.h"' >> sub/conftest.c
9276298161Sbapt      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
9277298161Sbapt      # Solaris 10 /bin/sh.
9278298161Sbapt      echo '/* dummy */' > sub/conftst$i.h
9279251883Speter    done
9280251883Speter    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9281251883Speter
9282298161Sbapt    # We check with '-c' and '-o' for the sake of the "dashmstdout"
9283269851Speter    # mode.  It turns out that the SunPro C++ compiler does not properly
9284298161Sbapt    # handle '-M -o', and we need to detect this.  Also, some Intel
9285298161Sbapt    # versions had trouble with output in subdirs.
9286269851Speter    am__obj=sub/conftest.${OBJEXT-o}
9287269851Speter    am__minus_obj="-o $am__obj"
9288251883Speter    case $depmode in
9289269851Speter    gcc)
9290269851Speter      # This depmode causes a compiler race in universal mode.
9291269851Speter      test "$am__universal" = false || continue
9292269851Speter      ;;
9293251883Speter    nosideeffect)
9294298161Sbapt      # After this tag, mechanisms are not by side-effect, so they'll
9295298161Sbapt      # only be used when explicitly requested.
9296251883Speter      if test "x$enable_dependency_tracking" = xyes; then
9297251883Speter	continue
9298251883Speter      else
9299251883Speter	break
9300251883Speter      fi
9301251883Speter      ;;
9302269851Speter    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
9303298161Sbapt      # This compiler won't grok '-c -o', but also, the minuso test has
9304269851Speter      # not run yet.  These depmodes are late enough in the game, and
9305269851Speter      # so weak that their functioning should not be impacted.
9306269851Speter      am__obj=conftest.${OBJEXT-o}
9307269851Speter      am__minus_obj=
9308269851Speter      ;;
9309251883Speter    none) break ;;
9310251883Speter    esac
9311251883Speter    if depmode=$depmode \
9312269851Speter       source=sub/conftest.c object=$am__obj \
9313251883Speter       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9314269851Speter       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9315251883Speter         >/dev/null 2>conftest.err &&
9316269851Speter       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9317251883Speter       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9318269851Speter       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9319251883Speter       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9320251883Speter      # icc doesn't choke on unknown options, it will just issue warnings
9321251883Speter      # or remarks (even with -Werror).  So we grep stderr for any message
9322251883Speter      # that says an option was ignored or not supported.
9323251883Speter      # When given -MP, icc 7.0 and 7.1 complain thusly:
9324251883Speter      #   icc: Command line warning: ignoring option '-M'; no argument required
9325251883Speter      # The diagnosis changed in icc 8.0:
9326251883Speter      #   icc: Command line remark: option '-MP' not supported
9327251883Speter      if (grep 'ignoring option' conftest.err ||
9328251883Speter          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9329251883Speter        am_cv_$1_dependencies_compiler_type=$depmode
9330251883Speter        break
9331251883Speter      fi
9332251883Speter    fi
9333251883Speter  done
9334251883Speter
9335251883Speter  cd ..
9336251883Speter  rm -rf conftest.dir
9337251883Speterelse
9338251883Speter  am_cv_$1_dependencies_compiler_type=none
9339251883Speterfi
9340251883Speter])
9341251883SpeterAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9342251883SpeterAM_CONDITIONAL([am__fastdep$1], [
9343251883Speter  test "x$enable_dependency_tracking" != xno \
9344251883Speter  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9345251883Speter])
9346251883Speter
9347251883Speter
9348251883Speter# AM_SET_DEPDIR
9349251883Speter# -------------
9350251883Speter# Choose a directory name for dependency files.
9351298161Sbapt# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
9352251883SpeterAC_DEFUN([AM_SET_DEPDIR],
9353251883Speter[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9354251883SpeterAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9355251883Speter])
9356251883Speter
9357251883Speter
9358251883Speter# AM_DEP_TRACK
9359251883Speter# ------------
9360251883SpeterAC_DEFUN([AM_DEP_TRACK],
9361298161Sbapt[AC_ARG_ENABLE([dependency-tracking], [dnl
9362298161SbaptAS_HELP_STRING(
9363298161Sbapt  [--enable-dependency-tracking],
9364298161Sbapt  [do not reject slow dependency extractors])
9365298161SbaptAS_HELP_STRING(
9366298161Sbapt  [--disable-dependency-tracking],
9367298161Sbapt  [speeds up one-time build])])
9368251883Speterif test "x$enable_dependency_tracking" != xno; then
9369251883Speter  am_depcomp="$ac_aux_dir/depcomp"
9370251883Speter  AMDEPBACKSLASH='\'
9371269851Speter  am__nodep='_no'
9372251883Speterfi
9373251883SpeterAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9374269851SpeterAC_SUBST([AMDEPBACKSLASH])dnl
9375269851Speter_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9376269851SpeterAC_SUBST([am__nodep])dnl
9377269851Speter_AM_SUBST_NOTMAKE([am__nodep])dnl
9378251883Speter])
9379251883Speter
9380251883Speter# Generate code to set up dependency tracking.              -*- Autoconf -*-
9381251883Speter
9382346442Scy# Copyright (C) 1999-2017 Free Software Foundation, Inc.
9383251883Speter#
9384251883Speter# This file is free software; the Free Software Foundation
9385251883Speter# gives unlimited permission to copy and/or distribute it,
9386251883Speter# with or without modifications, as long as this notice is preserved.
9387251883Speter
9388251883Speter
9389251883Speter# _AM_OUTPUT_DEPENDENCY_COMMANDS
9390251883Speter# ------------------------------
9391251883SpeterAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9392269851Speter[{
9393298161Sbapt  # Older Autoconf quotes --file arguments for eval, but not when files
9394269851Speter  # are listed without --file.  Let's play safe and only enable the eval
9395269851Speter  # if we detect the quoting.
9396269851Speter  case $CONFIG_FILES in
9397269851Speter  *\'*) eval set x "$CONFIG_FILES" ;;
9398269851Speter  *)   set x $CONFIG_FILES ;;
9399269851Speter  esac
9400269851Speter  shift
9401269851Speter  for mf
9402269851Speter  do
9403269851Speter    # Strip MF so we end up with the name of the file.
9404269851Speter    mf=`echo "$mf" | sed -e 's/:.*$//'`
9405269851Speter    # Check whether this is an Automake generated Makefile or not.
9406298161Sbapt    # We used to match only the files named 'Makefile.in', but
9407269851Speter    # some people rename them; so instead we look at the file content.
9408269851Speter    # Grep'ing the first line is not enough: some people post-process
9409269851Speter    # each Makefile.in and add a new line on top of each file to say so.
9410269851Speter    # Grep'ing the whole file is not good either: AIX grep has a line
9411269851Speter    # limit of 2048, but all sed's we know have understand at least 4000.
9412269851Speter    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9413269851Speter      dirpart=`AS_DIRNAME("$mf")`
9414269851Speter    else
9415269851Speter      continue
9416269851Speter    fi
9417269851Speter    # Extract the definition of DEPDIR, am__include, and am__quote
9418298161Sbapt    # from the Makefile without running 'make'.
9419269851Speter    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9420269851Speter    test -z "$DEPDIR" && continue
9421269851Speter    am__include=`sed -n 's/^am__include = //p' < "$mf"`
9422298161Sbapt    test -z "$am__include" && continue
9423269851Speter    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9424269851Speter    # Find all dependency output files, they are included files with
9425269851Speter    # $(DEPDIR) in their names.  We invoke sed twice because it is the
9426269851Speter    # simplest approach to changing $(DEPDIR) to its actual value in the
9427269851Speter    # expansion.
9428269851Speter    for file in `sed -n "
9429269851Speter      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9430298161Sbapt	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
9431269851Speter      # Make sure the directory exists.
9432269851Speter      test -f "$dirpart/$file" && continue
9433269851Speter      fdir=`AS_DIRNAME(["$file"])`
9434269851Speter      AS_MKDIR_P([$dirpart/$fdir])
9435269851Speter      # echo "creating $dirpart/$file"
9436269851Speter      echo '# dummy' > "$dirpart/$file"
9437269851Speter    done
9438251883Speter  done
9439269851Speter}
9440251883Speter])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9441251883Speter
9442251883Speter
9443251883Speter# AM_OUTPUT_DEPENDENCY_COMMANDS
9444251883Speter# -----------------------------
9445251883Speter# This macro should only be invoked once -- use via AC_REQUIRE.
9446251883Speter#
9447251883Speter# This code is only required when automatic dependency tracking
9448298161Sbapt# is enabled.  FIXME.  This creates each '.P' file that we will
9449251883Speter# need in order to bootstrap the dependency handling code.
9450251883SpeterAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9451251883Speter[AC_CONFIG_COMMANDS([depfiles],
9452251883Speter     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9453251883Speter     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9454251883Speter])
9455251883Speter
9456251883Speter# Do all the work for Automake.                             -*- Autoconf -*-
9457251883Speter
9458346442Scy# Copyright (C) 1996-2017 Free Software Foundation, Inc.
9459251883Speter#
9460251883Speter# This file is free software; the Free Software Foundation
9461251883Speter# gives unlimited permission to copy and/or distribute it,
9462251883Speter# with or without modifications, as long as this notice is preserved.
9463251883Speter
9464251883Speter# This macro actually does too much.  Some checks are only needed if
9465251883Speter# your package does certain things.  But this isn't really a big deal.
9466251883Speter
9467298161Sbaptdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
9468298161Sbaptm4_define([AC_PROG_CC],
9469298161Sbaptm4_defn([AC_PROG_CC])
9470298161Sbapt[_AM_PROG_CC_C_O
9471298161Sbapt])
9472298161Sbapt
9473251883Speter# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9474251883Speter# AM_INIT_AUTOMAKE([OPTIONS])
9475251883Speter# -----------------------------------------------
9476251883Speter# The call with PACKAGE and VERSION arguments is the old style
9477251883Speter# call (pre autoconf-2.50), which is being phased out.  PACKAGE
9478251883Speter# and VERSION should now be passed to AC_INIT and removed from
9479251883Speter# the call to AM_INIT_AUTOMAKE.
9480251883Speter# We support both call styles for the transition.  After
9481251883Speter# the next Automake release, Autoconf can make the AC_INIT
9482251883Speter# arguments mandatory, and then we can depend on a new Autoconf
9483251883Speter# release and drop the old call support.
9484251883SpeterAC_DEFUN([AM_INIT_AUTOMAKE],
9485298161Sbapt[AC_PREREQ([2.65])dnl
9486251883Speterdnl Autoconf wants to disallow AM_ names.  We explicitly allow
9487251883Speterdnl the ones we care about.
9488251883Speterm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9489251883SpeterAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9490251883SpeterAC_REQUIRE([AC_PROG_INSTALL])dnl
9491269851Speterif test "`cd $srcdir && pwd`" != "`pwd`"; then
9492269851Speter  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9493269851Speter  # is not polluted with repeated "-I."
9494269851Speter  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9495269851Speter  # test to see if srcdir already configured
9496269851Speter  if test -f $srcdir/config.status; then
9497269851Speter    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9498269851Speter  fi
9499251883Speterfi
9500251883Speter
9501251883Speter# test whether we have cygpath
9502251883Speterif test -z "$CYGPATH_W"; then
9503251883Speter  if (cygpath --version) >/dev/null 2>/dev/null; then
9504251883Speter    CYGPATH_W='cygpath -w'
9505251883Speter  else
9506251883Speter    CYGPATH_W=echo
9507251883Speter  fi
9508251883Speterfi
9509251883SpeterAC_SUBST([CYGPATH_W])
9510251883Speter
9511251883Speter# Define the identity of the package.
9512251883Speterdnl Distinguish between old-style and new-style calls.
9513251883Speterm4_ifval([$2],
9514298161Sbapt[AC_DIAGNOSE([obsolete],
9515298161Sbapt             [$0: two- and three-arguments forms are deprecated.])
9516298161Sbaptm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9517251883Speter AC_SUBST([PACKAGE], [$1])dnl
9518251883Speter AC_SUBST([VERSION], [$2])],
9519251883Speter[_AM_SET_OPTIONS([$1])dnl
9520269851Speterdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9521298161Sbaptm4_if(
9522298161Sbapt  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
9523298161Sbapt  [ok:ok],,
9524269851Speter  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9525251883Speter AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9526251883Speter AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9527251883Speter
9528251883Speter_AM_IF_OPTION([no-define],,
9529298161Sbapt[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
9530298161Sbapt AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
9531251883Speter
9532251883Speter# Some tools Automake needs.
9533251883SpeterAC_REQUIRE([AM_SANITY_CHECK])dnl
9534251883SpeterAC_REQUIRE([AC_ARG_PROGRAM])dnl
9535298161SbaptAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
9536298161SbaptAM_MISSING_PROG([AUTOCONF], [autoconf])
9537298161SbaptAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
9538298161SbaptAM_MISSING_PROG([AUTOHEADER], [autoheader])
9539298161SbaptAM_MISSING_PROG([MAKEINFO], [makeinfo])
9540269851SpeterAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9541269851SpeterAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9542298161SbaptAC_REQUIRE([AC_PROG_MKDIR_P])dnl
9543298161Sbapt# For better backward compatibility.  To be removed once Automake 1.9.x
9544298161Sbapt# dies out for good.  For more background, see:
9545298161Sbapt# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
9546298161Sbapt# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
9547298161SbaptAC_SUBST([mkdir_p], ['$(MKDIR_P)'])
9548298161Sbapt# We need awk for the "check" target (and possibly the TAP driver).  The
9549298161Sbapt# system "awk" is bad on some platforms.
9550251883SpeterAC_REQUIRE([AC_PROG_AWK])dnl
9551251883SpeterAC_REQUIRE([AC_PROG_MAKE_SET])dnl
9552251883SpeterAC_REQUIRE([AM_SET_LEADING_DOT])dnl
9553251883Speter_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9554269851Speter	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9555269851Speter			     [_AM_PROG_TAR([v7])])])
9556251883Speter_AM_IF_OPTION([no-dependencies],,
9557251883Speter[AC_PROVIDE_IFELSE([AC_PROG_CC],
9558298161Sbapt		  [_AM_DEPENDENCIES([CC])],
9559298161Sbapt		  [m4_define([AC_PROG_CC],
9560298161Sbapt			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
9561251883SpeterAC_PROVIDE_IFELSE([AC_PROG_CXX],
9562298161Sbapt		  [_AM_DEPENDENCIES([CXX])],
9563298161Sbapt		  [m4_define([AC_PROG_CXX],
9564298161Sbapt			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
9565269851SpeterAC_PROVIDE_IFELSE([AC_PROG_OBJC],
9566298161Sbapt		  [_AM_DEPENDENCIES([OBJC])],
9567298161Sbapt		  [m4_define([AC_PROG_OBJC],
9568298161Sbapt			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
9569298161SbaptAC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
9570298161Sbapt		  [_AM_DEPENDENCIES([OBJCXX])],
9571298161Sbapt		  [m4_define([AC_PROG_OBJCXX],
9572298161Sbapt			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
9573251883Speter])
9574298161SbaptAC_REQUIRE([AM_SILENT_RULES])dnl
9575298161Sbaptdnl The testsuite driver may need to know about EXEEXT, so add the
9576298161Sbaptdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
9577298161Sbaptdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
9578269851SpeterAC_CONFIG_COMMANDS_PRE(dnl
9579269851Speter[m4_provide_if([_AM_COMPILER_EXEEXT],
9580269851Speter  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9581298161Sbapt
9582298161Sbapt# POSIX will say in a future version that running "rm -f" with no argument
9583298161Sbapt# is OK; and we want to be able to make that assumption in our Makefile
9584298161Sbapt# recipes.  So use an aggressive probe to check that the usage we want is
9585298161Sbapt# actually supported "in the wild" to an acceptable degree.
9586298161Sbapt# See automake bug#10828.
9587298161Sbapt# To make any issue more visible, cause the running configure to be aborted
9588298161Sbapt# by default if the 'rm' program in use doesn't match our expectations; the
9589298161Sbapt# user can still override this though.
9590298161Sbaptif rm -f && rm -fr && rm -rf; then : OK; else
9591298161Sbapt  cat >&2 <<'END'
9592298161SbaptOops!
9593298161Sbapt
9594298161SbaptYour 'rm' program seems unable to run without file operands specified
9595298161Sbapton the command line, even when the '-f' option is present.  This is contrary
9596298161Sbaptto the behaviour of most rm programs out there, and not conforming with
9597298161Sbaptthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
9598298161Sbapt
9599298161SbaptPlease tell bug-automake@gnu.org about your system, including the value
9600298161Sbaptof your $PATH and any error possibly output before this message.  This
9601298161Sbaptcan help us improve future automake versions.
9602298161Sbapt
9603298161SbaptEND
9604298161Sbapt  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
9605298161Sbapt    echo 'Configuration will proceed anyway, since you have set the' >&2
9606298161Sbapt    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
9607298161Sbapt    echo >&2
9608298161Sbapt  else
9609298161Sbapt    cat >&2 <<'END'
9610298161SbaptAborting the configuration process, to ensure you take notice of the issue.
9611298161Sbapt
9612298161SbaptYou can download and install GNU coreutils to get an 'rm' implementation
9613298161Sbaptthat behaves properly: <http://www.gnu.org/software/coreutils/>.
9614298161Sbapt
9615298161SbaptIf you want to complete the configuration process using your problematic
9616298161Sbapt'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
9617298161Sbaptto "yes", and re-run configure.
9618298161Sbapt
9619298161SbaptEND
9620298161Sbapt    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
9621298161Sbapt  fi
9622298161Sbaptfi
9623298161Sbaptdnl The trailing newline in this macro's definition is deliberate, for
9624298161Sbaptdnl backward compatibility and to allow trailing 'dnl'-style comments
9625298161Sbaptdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
9626251883Speter])
9627251883Speter
9628298161Sbaptdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
9629269851Speterdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9630269851Speterdnl mangled by Autoconf and run in a shell conditional statement.
9631269851Speterm4_define([_AC_COMPILER_EXEEXT],
9632269851Speterm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9633251883Speter
9634251883Speter# When config.status generates a header, we must update the stamp-h file.
9635251883Speter# This file resides in the same directory as the config header
9636251883Speter# that is generated.  The stamp files are numbered to have different names.
9637251883Speter
9638251883Speter# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9639251883Speter# loop where config.status creates the headers, so we can generate
9640251883Speter# our stamp files there.
9641251883SpeterAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9642251883Speter[# Compute $1's index in $config_headers.
9643269851Speter_am_arg=$1
9644251883Speter_am_stamp_count=1
9645251883Speterfor _am_header in $config_headers :; do
9646251883Speter  case $_am_header in
9647269851Speter    $_am_arg | $_am_arg:* )
9648251883Speter      break ;;
9649251883Speter    * )
9650251883Speter      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9651251883Speter  esac
9652251883Speterdone
9653269851Speterecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9654251883Speter
9655346442Scy# Copyright (C) 2001-2017 Free Software Foundation, Inc.
9656251883Speter#
9657251883Speter# This file is free software; the Free Software Foundation
9658251883Speter# gives unlimited permission to copy and/or distribute it,
9659251883Speter# with or without modifications, as long as this notice is preserved.
9660251883Speter
9661251883Speter# AM_PROG_INSTALL_SH
9662251883Speter# ------------------
9663251883Speter# Define $install_sh.
9664251883SpeterAC_DEFUN([AM_PROG_INSTALL_SH],
9665251883Speter[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9666298161Sbaptif test x"${install_sh+set}" != xset; then
9667269851Speter  case $am_aux_dir in
9668269851Speter  *\ * | *\	*)
9669269851Speter    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9670269851Speter  *)
9671269851Speter    install_sh="\${SHELL} $am_aux_dir/install-sh"
9672269851Speter  esac
9673269851Speterfi
9674298161SbaptAC_SUBST([install_sh])])
9675251883Speter
9676346442Scy# Copyright (C) 2003-2017 Free Software Foundation, Inc.
9677251883Speter#
9678251883Speter# This file is free software; the Free Software Foundation
9679251883Speter# gives unlimited permission to copy and/or distribute it,
9680251883Speter# with or without modifications, as long as this notice is preserved.
9681251883Speter
9682251883Speter# Check whether the underlying file-system supports filenames
9683251883Speter# with a leading dot.  For instance MS-DOS doesn't.
9684251883SpeterAC_DEFUN([AM_SET_LEADING_DOT],
9685251883Speter[rm -rf .tst 2>/dev/null
9686251883Spetermkdir .tst 2>/dev/null
9687251883Speterif test -d .tst; then
9688251883Speter  am__leading_dot=.
9689251883Speterelse
9690251883Speter  am__leading_dot=_
9691251883Speterfi
9692251883Speterrmdir .tst 2>/dev/null
9693251883SpeterAC_SUBST([am__leading_dot])])
9694251883Speter
9695251883Speter# Check to see how 'make' treats includes.	            -*- Autoconf -*-
9696251883Speter
9697346442Scy# Copyright (C) 2001-2017 Free Software Foundation, Inc.
9698251883Speter#
9699251883Speter# This file is free software; the Free Software Foundation
9700251883Speter# gives unlimited permission to copy and/or distribute it,
9701251883Speter# with or without modifications, as long as this notice is preserved.
9702251883Speter
9703251883Speter# AM_MAKE_INCLUDE()
9704251883Speter# -----------------
9705251883Speter# Check to see how make treats includes.
9706251883SpeterAC_DEFUN([AM_MAKE_INCLUDE],
9707251883Speter[am_make=${MAKE-make}
9708251883Spetercat > confinc << 'END'
9709251883Speteram__doit:
9710269851Speter	@echo this is the am__doit target
9711251883Speter.PHONY: am__doit
9712251883SpeterEND
9713251883Speter# If we don't find an include directive, just comment out the code.
9714251883SpeterAC_MSG_CHECKING([for style of include used by $am_make])
9715251883Speteram__include="#"
9716251883Speteram__quote=
9717251883Speter_am_result=none
9718251883Speter# First try GNU make style include.
9719251883Speterecho "include confinc" > confmf
9720298161Sbapt# Ignore all kinds of additional output from 'make'.
9721269851Spetercase `$am_make -s -f confmf 2> /dev/null` in #(
9722269851Speter*the\ am__doit\ target*)
9723269851Speter  am__include=include
9724269851Speter  am__quote=
9725269851Speter  _am_result=GNU
9726269851Speter  ;;
9727269851Speteresac
9728251883Speter# Now try BSD make style include.
9729251883Speterif test "$am__include" = "#"; then
9730251883Speter   echo '.include "confinc"' > confmf
9731269851Speter   case `$am_make -s -f confmf 2> /dev/null` in #(
9732269851Speter   *the\ am__doit\ target*)
9733269851Speter     am__include=.include
9734269851Speter     am__quote="\""
9735269851Speter     _am_result=BSD
9736269851Speter     ;;
9737269851Speter   esac
9738251883Speterfi
9739251883SpeterAC_SUBST([am__include])
9740251883SpeterAC_SUBST([am__quote])
9741251883SpeterAC_MSG_RESULT([$_am_result])
9742251883Speterrm -f confinc confmf
9743251883Speter])
9744251883Speter
9745251883Speter# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
9746251883Speter
9747346442Scy# Copyright (C) 1997-2017 Free Software Foundation, Inc.
9748251883Speter#
9749251883Speter# This file is free software; the Free Software Foundation
9750251883Speter# gives unlimited permission to copy and/or distribute it,
9751251883Speter# with or without modifications, as long as this notice is preserved.
9752251883Speter
9753251883Speter# AM_MISSING_PROG(NAME, PROGRAM)
9754251883Speter# ------------------------------
9755251883SpeterAC_DEFUN([AM_MISSING_PROG],
9756251883Speter[AC_REQUIRE([AM_MISSING_HAS_RUN])
9757251883Speter$1=${$1-"${am_missing_run}$2"}
9758251883SpeterAC_SUBST($1)])
9759251883Speter
9760251883Speter# AM_MISSING_HAS_RUN
9761251883Speter# ------------------
9762298161Sbapt# Define MISSING if not defined so far and test if it is modern enough.
9763298161Sbapt# If it is, set am_missing_run to use it, otherwise, to nothing.
9764251883SpeterAC_DEFUN([AM_MISSING_HAS_RUN],
9765251883Speter[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9766269851SpeterAC_REQUIRE_AUX_FILE([missing])dnl
9767269851Speterif test x"${MISSING+set}" != xset; then
9768269851Speter  case $am_aux_dir in
9769269851Speter  *\ * | *\	*)
9770269851Speter    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
9771269851Speter  *)
9772269851Speter    MISSING="\${SHELL} $am_aux_dir/missing" ;;
9773269851Speter  esac
9774269851Speterfi
9775251883Speter# Use eval to expand $SHELL
9776298161Sbaptif eval "$MISSING --is-lightweight"; then
9777298161Sbapt  am_missing_run="$MISSING "
9778251883Speterelse
9779251883Speter  am_missing_run=
9780298161Sbapt  AC_MSG_WARN(['missing' script is too old or missing])
9781251883Speterfi
9782251883Speter])
9783251883Speter
9784251883Speter# Helper functions for option handling.                     -*- Autoconf -*-
9785251883Speter
9786346442Scy# Copyright (C) 2001-2017 Free Software Foundation, Inc.
9787251883Speter#
9788251883Speter# This file is free software; the Free Software Foundation
9789251883Speter# gives unlimited permission to copy and/or distribute it,
9790251883Speter# with or without modifications, as long as this notice is preserved.
9791251883Speter
9792251883Speter# _AM_MANGLE_OPTION(NAME)
9793251883Speter# -----------------------
9794251883SpeterAC_DEFUN([_AM_MANGLE_OPTION],
9795251883Speter[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9796251883Speter
9797251883Speter# _AM_SET_OPTION(NAME)
9798269851Speter# --------------------
9799251883Speter# Set option NAME.  Presently that only means defining a flag for this option.
9800251883SpeterAC_DEFUN([_AM_SET_OPTION],
9801298161Sbapt[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
9802251883Speter
9803251883Speter# _AM_SET_OPTIONS(OPTIONS)
9804269851Speter# ------------------------
9805251883Speter# OPTIONS is a space-separated list of Automake options.
9806251883SpeterAC_DEFUN([_AM_SET_OPTIONS],
9807269851Speter[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9808251883Speter
9809251883Speter# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9810251883Speter# -------------------------------------------
9811251883Speter# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9812251883SpeterAC_DEFUN([_AM_IF_OPTION],
9813251883Speter[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9814251883Speter
9815346442Scy# Copyright (C) 1999-2017 Free Software Foundation, Inc.
9816298161Sbapt#
9817298161Sbapt# This file is free software; the Free Software Foundation
9818298161Sbapt# gives unlimited permission to copy and/or distribute it,
9819298161Sbapt# with or without modifications, as long as this notice is preserved.
9820298161Sbapt
9821298161Sbapt# _AM_PROG_CC_C_O
9822298161Sbapt# ---------------
9823298161Sbapt# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
9824298161Sbapt# to automatically call this.
9825298161SbaptAC_DEFUN([_AM_PROG_CC_C_O],
9826298161Sbapt[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9827298161SbaptAC_REQUIRE_AUX_FILE([compile])dnl
9828298161SbaptAC_LANG_PUSH([C])dnl
9829298161SbaptAC_CACHE_CHECK(
9830298161Sbapt  [whether $CC understands -c and -o together],
9831298161Sbapt  [am_cv_prog_cc_c_o],
9832298161Sbapt  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
9833298161Sbapt  # Make sure it works both with $CC and with simple cc.
9834298161Sbapt  # Following AC_PROG_CC_C_O, we do the test twice because some
9835298161Sbapt  # compilers refuse to overwrite an existing .o file with -o,
9836298161Sbapt  # though they will create one.
9837298161Sbapt  am_cv_prog_cc_c_o=yes
9838298161Sbapt  for am_i in 1 2; do
9839298161Sbapt    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
9840298161Sbapt         && test -f conftest2.$ac_objext; then
9841298161Sbapt      : OK
9842298161Sbapt    else
9843298161Sbapt      am_cv_prog_cc_c_o=no
9844298161Sbapt      break
9845298161Sbapt    fi
9846298161Sbapt  done
9847298161Sbapt  rm -f core conftest*
9848298161Sbapt  unset am_i])
9849298161Sbaptif test "$am_cv_prog_cc_c_o" != yes; then
9850298161Sbapt   # Losing compiler, so override with the script.
9851298161Sbapt   # FIXME: It is wrong to rewrite CC.
9852298161Sbapt   # But if we don't then we get into trouble of one sort or another.
9853298161Sbapt   # A longer-term fix would be to have automake use am__CC in this case,
9854298161Sbapt   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
9855298161Sbapt   CC="$am_aux_dir/compile $CC"
9856298161Sbaptfi
9857298161SbaptAC_LANG_POP([C])])
9858298161Sbapt
9859298161Sbapt# For backward compatibility.
9860298161SbaptAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
9861298161Sbapt
9862346442Scy# Copyright (C) 2001-2017 Free Software Foundation, Inc.
9863298161Sbapt#
9864298161Sbapt# This file is free software; the Free Software Foundation
9865298161Sbapt# gives unlimited permission to copy and/or distribute it,
9866298161Sbapt# with or without modifications, as long as this notice is preserved.
9867298161Sbapt
9868298161Sbapt# AM_RUN_LOG(COMMAND)
9869298161Sbapt# -------------------
9870298161Sbapt# Run COMMAND, save the exit status in ac_status, and log it.
9871298161Sbapt# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
9872298161SbaptAC_DEFUN([AM_RUN_LOG],
9873298161Sbapt[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
9874298161Sbapt   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
9875298161Sbapt   ac_status=$?
9876298161Sbapt   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
9877298161Sbapt   (exit $ac_status); }])
9878298161Sbapt
9879251883Speter# Check to make sure that the build environment is sane.    -*- Autoconf -*-
9880251883Speter
9881346442Scy# Copyright (C) 1996-2017 Free Software Foundation, Inc.
9882251883Speter#
9883251883Speter# This file is free software; the Free Software Foundation
9884251883Speter# gives unlimited permission to copy and/or distribute it,
9885251883Speter# with or without modifications, as long as this notice is preserved.
9886251883Speter
9887251883Speter# AM_SANITY_CHECK
9888251883Speter# ---------------
9889251883SpeterAC_DEFUN([AM_SANITY_CHECK],
9890251883Speter[AC_MSG_CHECKING([whether build environment is sane])
9891269851Speter# Reject unsafe characters in $srcdir or the absolute working directory
9892269851Speter# name.  Accept space and tab only in the latter.
9893269851Speteram_lf='
9894269851Speter'
9895269851Spetercase `pwd` in
9896269851Speter  *[[\\\"\#\$\&\'\`$am_lf]]*)
9897269851Speter    AC_MSG_ERROR([unsafe absolute working directory name]);;
9898269851Speteresac
9899269851Spetercase $srcdir in
9900269851Speter  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
9901298161Sbapt    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
9902269851Speteresac
9903269851Speter
9904298161Sbapt# Do 'set' in a subshell so we don't clobber the current shell's
9905251883Speter# arguments.  Must try -L first in case configure is actually a
9906251883Speter# symlink; some systems play weird games with the mod time of symlinks
9907251883Speter# (eg FreeBSD returns the mod time of the symlink's containing
9908251883Speter# directory).
9909251883Speterif (
9910298161Sbapt   am_has_slept=no
9911298161Sbapt   for am_try in 1 2; do
9912298161Sbapt     echo "timestamp, slept: $am_has_slept" > conftest.file
9913298161Sbapt     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
9914298161Sbapt     if test "$[*]" = "X"; then
9915298161Sbapt	# -L didn't work.
9916298161Sbapt	set X `ls -t "$srcdir/configure" conftest.file`
9917298161Sbapt     fi
9918298161Sbapt     if test "$[*]" != "X $srcdir/configure conftest.file" \
9919298161Sbapt	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
9920251883Speter
9921298161Sbapt	# If neither matched, then we have a broken ls.  This can happen
9922298161Sbapt	# if, for instance, CONFIG_SHELL is bash and it inherits a
9923298161Sbapt	# broken ls alias from the environment.  This has actually
9924298161Sbapt	# happened.  Such a system could not be considered "sane".
9925298161Sbapt	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
9926298161Sbapt  alias in your environment])
9927298161Sbapt     fi
9928298161Sbapt     if test "$[2]" = conftest.file || test $am_try -eq 2; then
9929298161Sbapt       break
9930298161Sbapt     fi
9931298161Sbapt     # Just in case.
9932298161Sbapt     sleep 1
9933298161Sbapt     am_has_slept=yes
9934298161Sbapt   done
9935251883Speter   test "$[2]" = conftest.file
9936251883Speter   )
9937251883Speterthen
9938251883Speter   # Ok.
9939251883Speter   :
9940251883Speterelse
9941251883Speter   AC_MSG_ERROR([newly created file is older than distributed files!
9942251883SpeterCheck your system clock])
9943251883Speterfi
9944298161SbaptAC_MSG_RESULT([yes])
9945298161Sbapt# If we didn't sleep, we still need to ensure time stamps of config.status and
9946298161Sbapt# generated files are strictly newer.
9947298161Sbaptam_sleep_pid=
9948298161Sbaptif grep 'slept: no' conftest.file >/dev/null 2>&1; then
9949298161Sbapt  ( sleep 1 ) &
9950298161Sbapt  am_sleep_pid=$!
9951298161Sbaptfi
9952298161SbaptAC_CONFIG_COMMANDS_PRE(
9953298161Sbapt  [AC_MSG_CHECKING([that generated files are newer than configure])
9954298161Sbapt   if test -n "$am_sleep_pid"; then
9955298161Sbapt     # Hide warnings about reused PIDs.
9956298161Sbapt     wait $am_sleep_pid 2>/dev/null
9957298161Sbapt   fi
9958298161Sbapt   AC_MSG_RESULT([done])])
9959298161Sbaptrm -f conftest.file
9960298161Sbapt])
9961251883Speter
9962346442Scy# Copyright (C) 2009-2017 Free Software Foundation, Inc.
9963251883Speter#
9964251883Speter# This file is free software; the Free Software Foundation
9965251883Speter# gives unlimited permission to copy and/or distribute it,
9966251883Speter# with or without modifications, as long as this notice is preserved.
9967251883Speter
9968298161Sbapt# AM_SILENT_RULES([DEFAULT])
9969298161Sbapt# --------------------------
9970298161Sbapt# Enable less verbose build rules; with the default set to DEFAULT
9971298161Sbapt# ("yes" being less verbose, "no" or empty being verbose).
9972298161SbaptAC_DEFUN([AM_SILENT_RULES],
9973298161Sbapt[AC_ARG_ENABLE([silent-rules], [dnl
9974298161SbaptAS_HELP_STRING(
9975298161Sbapt  [--enable-silent-rules],
9976298161Sbapt  [less verbose build output (undo: "make V=1")])
9977298161SbaptAS_HELP_STRING(
9978298161Sbapt  [--disable-silent-rules],
9979298161Sbapt  [verbose build output (undo: "make V=0")])dnl
9980298161Sbapt])
9981298161Sbaptcase $enable_silent_rules in @%:@ (((
9982298161Sbapt  yes) AM_DEFAULT_VERBOSITY=0;;
9983298161Sbapt   no) AM_DEFAULT_VERBOSITY=1;;
9984298161Sbapt    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
9985298161Sbaptesac
9986298161Sbaptdnl
9987298161Sbaptdnl A few 'make' implementations (e.g., NonStop OS and NextStep)
9988298161Sbaptdnl do not support nested variable expansions.
9989298161Sbaptdnl See automake bug#9928 and bug#10237.
9990298161Sbaptam_make=${MAKE-make}
9991298161SbaptAC_CACHE_CHECK([whether $am_make supports nested variables],
9992298161Sbapt   [am_cv_make_support_nested_variables],
9993298161Sbapt   [if AS_ECHO([['TRUE=$(BAR$(V))
9994298161SbaptBAR0=false
9995298161SbaptBAR1=true
9996298161SbaptV=1
9997298161Sbaptam__doit:
9998298161Sbapt	@$(TRUE)
9999298161Sbapt.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
10000298161Sbapt  am_cv_make_support_nested_variables=yes
10001298161Sbaptelse
10002298161Sbapt  am_cv_make_support_nested_variables=no
10003298161Sbaptfi])
10004298161Sbaptif test $am_cv_make_support_nested_variables = yes; then
10005298161Sbapt  dnl Using '$V' instead of '$(V)' breaks IRIX make.
10006298161Sbapt  AM_V='$(V)'
10007298161Sbapt  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
10008298161Sbaptelse
10009298161Sbapt  AM_V=$AM_DEFAULT_VERBOSITY
10010298161Sbapt  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
10011298161Sbaptfi
10012298161SbaptAC_SUBST([AM_V])dnl
10013298161SbaptAM_SUBST_NOTMAKE([AM_V])dnl
10014298161SbaptAC_SUBST([AM_DEFAULT_V])dnl
10015298161SbaptAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
10016298161SbaptAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
10017298161SbaptAM_BACKSLASH='\'
10018298161SbaptAC_SUBST([AM_BACKSLASH])dnl
10019298161Sbapt_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10020298161Sbapt])
10021269851Speter
10022346442Scy# Copyright (C) 2001-2017 Free Software Foundation, Inc.
10023298161Sbapt#
10024298161Sbapt# This file is free software; the Free Software Foundation
10025298161Sbapt# gives unlimited permission to copy and/or distribute it,
10026298161Sbapt# with or without modifications, as long as this notice is preserved.
10027298161Sbapt
10028251883Speter# AM_PROG_INSTALL_STRIP
10029251883Speter# ---------------------
10030298161Sbapt# One issue with vendor 'install' (even GNU) is that you can't
10031251883Speter# specify the program used to strip binaries.  This is especially
10032251883Speter# annoying in cross-compiling environments, where the build's strip
10033251883Speter# is unlikely to handle the host's binaries.
10034251883Speter# Fortunately install-sh will honor a STRIPPROG variable, so we
10035298161Sbapt# always use install-sh in "make install-strip", and initialize
10036251883Speter# STRIPPROG with the value of the STRIP variable (set by the user).
10037251883SpeterAC_DEFUN([AM_PROG_INSTALL_STRIP],
10038251883Speter[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10039298161Sbapt# Installed binaries are usually stripped using 'strip' when the user
10040298161Sbapt# run "make install-strip".  However 'strip' might not be the right
10041251883Speter# tool to use in cross-compilation environments, therefore Automake
10042298161Sbapt# will honor the 'STRIP' environment variable to overrule this program.
10043298161Sbaptdnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
10044251883Speterif test "$cross_compiling" != no; then
10045251883Speter  AC_CHECK_TOOL([STRIP], [strip], :)
10046251883Speterfi
10047269851SpeterINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10048251883SpeterAC_SUBST([INSTALL_STRIP_PROGRAM])])
10049251883Speter
10050346442Scy# Copyright (C) 2006-2017 Free Software Foundation, Inc.
10051269851Speter#
10052269851Speter# This file is free software; the Free Software Foundation
10053269851Speter# gives unlimited permission to copy and/or distribute it,
10054269851Speter# with or without modifications, as long as this notice is preserved.
10055269851Speter
10056269851Speter# _AM_SUBST_NOTMAKE(VARIABLE)
10057269851Speter# ---------------------------
10058269851Speter# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10059269851Speter# This macro is traced by Automake.
10060269851SpeterAC_DEFUN([_AM_SUBST_NOTMAKE])
10061269851Speter
10062269851Speter# AM_SUBST_NOTMAKE(VARIABLE)
10063269851Speter# --------------------------
10064269851Speter# Public sister of _AM_SUBST_NOTMAKE.
10065269851SpeterAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10066269851Speter
10067251883Speter# Check how to create a tarball.                            -*- Autoconf -*-
10068251883Speter
10069346442Scy# Copyright (C) 2004-2017 Free Software Foundation, Inc.
10070251883Speter#
10071251883Speter# This file is free software; the Free Software Foundation
10072251883Speter# gives unlimited permission to copy and/or distribute it,
10073251883Speter# with or without modifications, as long as this notice is preserved.
10074251883Speter
10075251883Speter# _AM_PROG_TAR(FORMAT)
10076251883Speter# --------------------
10077251883Speter# Check how to create a tarball in format FORMAT.
10078298161Sbapt# FORMAT should be one of 'v7', 'ustar', or 'pax'.
10079251883Speter#
10080251883Speter# Substitute a variable $(am__tar) that is a command
10081251883Speter# writing to stdout a FORMAT-tarball containing the directory
10082251883Speter# $tardir.
10083251883Speter#     tardir=directory && $(am__tar) > result.tar
10084251883Speter#
10085251883Speter# Substitute a variable $(am__untar) that extract such
10086251883Speter# a tarball read from stdin.
10087251883Speter#     $(am__untar) < result.tar
10088298161Sbapt#
10089251883SpeterAC_DEFUN([_AM_PROG_TAR],
10090269851Speter[# Always define AMTAR for backward compatibility.  Yes, it's still used
10091269851Speter# in the wild :-(  We should find a proper way to deprecate it ...
10092269851SpeterAC_SUBST([AMTAR], ['$${TAR-tar}'])
10093298161Sbapt
10094298161Sbapt# We'll loop over all known methods to create a tar archive until one works.
10095251883Speter_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10096251883Speter
10097298161Sbaptm4_if([$1], [v7],
10098298161Sbapt  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
10099251883Speter
10100298161Sbapt  [m4_case([$1],
10101298161Sbapt    [ustar],
10102298161Sbapt     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
10103298161Sbapt      # There is notably a 21 bits limit for the UID and the GID.  In fact,
10104298161Sbapt      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
10105298161Sbapt      # and bug#13588).
10106298161Sbapt      am_max_uid=2097151 # 2^21 - 1
10107298161Sbapt      am_max_gid=$am_max_uid
10108298161Sbapt      # The $UID and $GID variables are not portable, so we need to resort
10109298161Sbapt      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
10110298161Sbapt      # below are definitely unexpected, so allow the users to see them
10111298161Sbapt      # (that is, avoid stderr redirection).
10112298161Sbapt      am_uid=`id -u || echo unknown`
10113298161Sbapt      am_gid=`id -g || echo unknown`
10114298161Sbapt      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
10115298161Sbapt      if test $am_uid -le $am_max_uid; then
10116298161Sbapt         AC_MSG_RESULT([yes])
10117298161Sbapt      else
10118298161Sbapt         AC_MSG_RESULT([no])
10119298161Sbapt         _am_tools=none
10120298161Sbapt      fi
10121298161Sbapt      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
10122298161Sbapt      if test $am_gid -le $am_max_gid; then
10123298161Sbapt         AC_MSG_RESULT([yes])
10124298161Sbapt      else
10125298161Sbapt        AC_MSG_RESULT([no])
10126298161Sbapt        _am_tools=none
10127298161Sbapt      fi],
10128298161Sbapt
10129298161Sbapt  [pax],
10130298161Sbapt    [],
10131298161Sbapt
10132298161Sbapt  [m4_fatal([Unknown tar format])])
10133298161Sbapt
10134298161Sbapt  AC_MSG_CHECKING([how to create a $1 tar archive])
10135298161Sbapt
10136298161Sbapt  # Go ahead even if we have the value already cached.  We do so because we
10137298161Sbapt  # need to set the values for the 'am__tar' and 'am__untar' variables.
10138298161Sbapt  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
10139298161Sbapt
10140298161Sbapt  for _am_tool in $_am_tools; do
10141298161Sbapt    case $_am_tool in
10142298161Sbapt    gnutar)
10143298161Sbapt      for _am_tar in tar gnutar gtar; do
10144298161Sbapt        AM_RUN_LOG([$_am_tar --version]) && break
10145298161Sbapt      done
10146298161Sbapt      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10147298161Sbapt      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10148298161Sbapt      am__untar="$_am_tar -xf -"
10149298161Sbapt      ;;
10150298161Sbapt    plaintar)
10151298161Sbapt      # Must skip GNU tar: if it does not support --format= it doesn't create
10152298161Sbapt      # ustar tarball either.
10153298161Sbapt      (tar --version) >/dev/null 2>&1 && continue
10154298161Sbapt      am__tar='tar chf - "$$tardir"'
10155298161Sbapt      am__tar_='tar chf - "$tardir"'
10156298161Sbapt      am__untar='tar xf -'
10157298161Sbapt      ;;
10158298161Sbapt    pax)
10159298161Sbapt      am__tar='pax -L -x $1 -w "$$tardir"'
10160298161Sbapt      am__tar_='pax -L -x $1 -w "$tardir"'
10161298161Sbapt      am__untar='pax -r'
10162298161Sbapt      ;;
10163298161Sbapt    cpio)
10164298161Sbapt      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10165298161Sbapt      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10166298161Sbapt      am__untar='cpio -i -H $1 -d'
10167298161Sbapt      ;;
10168298161Sbapt    none)
10169298161Sbapt      am__tar=false
10170298161Sbapt      am__tar_=false
10171298161Sbapt      am__untar=false
10172298161Sbapt      ;;
10173298161Sbapt    esac
10174298161Sbapt
10175298161Sbapt    # If the value was cached, stop now.  We just wanted to have am__tar
10176298161Sbapt    # and am__untar set.
10177298161Sbapt    test -n "${am_cv_prog_tar_$1}" && break
10178298161Sbapt
10179298161Sbapt    # tar/untar a dummy directory, and stop if the command works.
10180298161Sbapt    rm -rf conftest.dir
10181298161Sbapt    mkdir conftest.dir
10182298161Sbapt    echo GrepMe > conftest.dir/file
10183298161Sbapt    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10184298161Sbapt    rm -rf conftest.dir
10185298161Sbapt    if test -s conftest.tar; then
10186298161Sbapt      AM_RUN_LOG([$am__untar <conftest.tar])
10187298161Sbapt      AM_RUN_LOG([cat conftest.dir/file])
10188298161Sbapt      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10189298161Sbapt    fi
10190298161Sbapt  done
10191251883Speter  rm -rf conftest.dir
10192251883Speter
10193298161Sbapt  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10194298161Sbapt  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10195298161Sbapt
10196251883SpeterAC_SUBST([am__tar])
10197251883SpeterAC_SUBST([am__untar])
10198251883Speter]) # _AM_PROG_TAR
10199251883Speter
10200