1dd52494dSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2dd52494dSmrg#
333adc6acSmrg#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
433adc6acSmrg#   Foundation, Inc.
5dd52494dSmrg#   Written by Gordon Matzigkeit, 1996
6dd52494dSmrg#
7dd52494dSmrg# This file is free software; the Free Software Foundation gives
8dd52494dSmrg# unlimited permission to copy and/or distribute it, with or without
9dd52494dSmrg# modifications, as long as this notice is preserved.
10dd52494dSmrg
11dd52494dSmrgm4_define([_LT_COPYING], [dnl
12dd52494dSmrg# Copyright (C) 2014 Free Software Foundation, Inc.
13dd52494dSmrg# This is free software; see the source for copying conditions.  There is NO
14dd52494dSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15dd52494dSmrg
16dd52494dSmrg# GNU Libtool is free software; you can redistribute it and/or modify
17dd52494dSmrg# it under the terms of the GNU General Public License as published by
18dd52494dSmrg# the Free Software Foundation; either version 2 of of the License, or
19dd52494dSmrg# (at your option) any later version.
20dd52494dSmrg#
21dd52494dSmrg# As a special exception to the GNU General Public License, if you
22dd52494dSmrg# distribute this file as part of a program or library that is built
23dd52494dSmrg# using GNU Libtool, you may include this file under the  same
24dd52494dSmrg# distribution terms that you use for the rest of that program.
25dd52494dSmrg#
26dd52494dSmrg# GNU Libtool is distributed in the hope that it will be useful, but
27dd52494dSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
28dd52494dSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
29dd52494dSmrg# GNU General Public License for more details.
30dd52494dSmrg#
31dd52494dSmrg# You should have received a copy of the GNU General Public License
32dd52494dSmrg# along with this program.  If not, see <http://www.gnu.org/licenses/>.
33dd52494dSmrg])
34dd52494dSmrg
3533adc6acSmrg# serial 59 LT_INIT
36dd52494dSmrg
37dd52494dSmrg
38dd52494dSmrg# LT_PREREQ(VERSION)
39dd52494dSmrg# ------------------
40dd52494dSmrg# Complain and exit if this libtool version is less that VERSION.
41dd52494dSmrgm4_defun([LT_PREREQ],
42dd52494dSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
43dd52494dSmrg       [m4_default([$3],
44dd52494dSmrg		   [m4_fatal([Libtool version $1 or higher is required],
45dd52494dSmrg		             63)])],
46dd52494dSmrg       [$2])])
47dd52494dSmrg
48dd52494dSmrg
49dd52494dSmrg# _LT_CHECK_BUILDDIR
50dd52494dSmrg# ------------------
51dd52494dSmrg# Complain if the absolute build directory name contains unusual characters
52dd52494dSmrgm4_defun([_LT_CHECK_BUILDDIR],
53dd52494dSmrg[case `pwd` in
54dd52494dSmrg  *\ * | *\	*)
55dd52494dSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
56dd52494dSmrgesac
57dd52494dSmrg])
58dd52494dSmrg
59dd52494dSmrg
60dd52494dSmrg# LT_INIT([OPTIONS])
61dd52494dSmrg# ------------------
62dd52494dSmrgAC_DEFUN([LT_INIT],
63dd52494dSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
64dd52494dSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
65dd52494dSmrgAC_BEFORE([$0], [LT_LANG])dnl
66dd52494dSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
67dd52494dSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
68dd52494dSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
69dd52494dSmrg
70dd52494dSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
71dd52494dSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
72dd52494dSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
73dd52494dSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
74dd52494dSmrgdnl unless we require an AC_DEFUNed macro:
75dd52494dSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
76dd52494dSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
77dd52494dSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
78dd52494dSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
79dd52494dSmrgm4_require([_LT_PROG_LTMAIN])dnl
80dd52494dSmrg
81dd52494dSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
82dd52494dSmrg
83dd52494dSmrgdnl Parse OPTIONS
84dd52494dSmrg_LT_SET_OPTIONS([$0], [$1])
85dd52494dSmrg
86dd52494dSmrg# This can be used to rebuild libtool when needed
87dd52494dSmrgLIBTOOL_DEPS=$ltmain
88dd52494dSmrg
89dd52494dSmrg# Always use our own libtool.
90dd52494dSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
91dd52494dSmrgAC_SUBST(LIBTOOL)dnl
92dd52494dSmrg
93dd52494dSmrg_LT_SETUP
94dd52494dSmrg
95dd52494dSmrg# Only expand once:
96dd52494dSmrgm4_define([LT_INIT])
97dd52494dSmrg])# LT_INIT
98dd52494dSmrg
99dd52494dSmrg# Old names:
100dd52494dSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
101dd52494dSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
102dd52494dSmrgdnl aclocal-1.4 backwards compatibility:
103dd52494dSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
104dd52494dSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
105dd52494dSmrg
106dd52494dSmrg
107dd52494dSmrg# _LT_PREPARE_CC_BASENAME
108dd52494dSmrg# -----------------------
109dd52494dSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [
110dd52494dSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
111dd52494dSmrgfunc_cc_basename ()
112dd52494dSmrg{
113dd52494dSmrg    for cc_temp in @S|@*""; do
114dd52494dSmrg      case $cc_temp in
115dd52494dSmrg        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
116dd52494dSmrg        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
117dd52494dSmrg        \-*) ;;
118dd52494dSmrg        *) break;;
119dd52494dSmrg      esac
120dd52494dSmrg    done
121dd52494dSmrg    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
122dd52494dSmrg}
123dd52494dSmrg])# _LT_PREPARE_CC_BASENAME
124dd52494dSmrg
125dd52494dSmrg
126dd52494dSmrg# _LT_CC_BASENAME(CC)
127dd52494dSmrg# -------------------
128dd52494dSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
129dd52494dSmrg# but that macro is also expanded into generated libtool script, which
130dd52494dSmrg# arranges for $SED and $ECHO to be set by different means.
131dd52494dSmrgm4_defun([_LT_CC_BASENAME],
132dd52494dSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl
133dd52494dSmrgAC_REQUIRE([_LT_DECL_SED])dnl
134dd52494dSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
135dd52494dSmrgfunc_cc_basename $1
136dd52494dSmrgcc_basename=$func_cc_basename_result
137dd52494dSmrg])
138dd52494dSmrg
139dd52494dSmrg
140dd52494dSmrg# _LT_FILEUTILS_DEFAULTS
141dd52494dSmrg# ----------------------
142dd52494dSmrg# It is okay to use these file commands and assume they have been set
143dd52494dSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
144dd52494dSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
145dd52494dSmrg[: ${CP="cp -f"}
146dd52494dSmrg: ${MV="mv -f"}
147dd52494dSmrg: ${RM="rm -f"}
148dd52494dSmrg])# _LT_FILEUTILS_DEFAULTS
149dd52494dSmrg
150dd52494dSmrg
151dd52494dSmrg# _LT_SETUP
152dd52494dSmrg# ---------
153dd52494dSmrgm4_defun([_LT_SETUP],
154dd52494dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
155dd52494dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
156dd52494dSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
157dd52494dSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
158dd52494dSmrg
159dd52494dSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
160dd52494dSmrgdnl
161dd52494dSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
162dd52494dSmrg_LT_DECL([], [host], [0])dnl
163dd52494dSmrg_LT_DECL([], [host_os], [0])dnl
164dd52494dSmrgdnl
165dd52494dSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
166dd52494dSmrg_LT_DECL([], [build], [0])dnl
167dd52494dSmrg_LT_DECL([], [build_os], [0])dnl
168dd52494dSmrgdnl
169dd52494dSmrgAC_REQUIRE([AC_PROG_CC])dnl
170dd52494dSmrgAC_REQUIRE([LT_PATH_LD])dnl
171dd52494dSmrgAC_REQUIRE([LT_PATH_NM])dnl
172dd52494dSmrgdnl
173dd52494dSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
174dd52494dSmrgtest -z "$LN_S" && LN_S="ln -s"
175dd52494dSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
176dd52494dSmrgdnl
177dd52494dSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
178dd52494dSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
179dd52494dSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
180dd52494dSmrgdnl
181dd52494dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
182dd52494dSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
183dd52494dSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
184dd52494dSmrgm4_require([_LT_CMD_RELOAD])dnl
18533adc6acSmrgm4_require([_LT_DECL_FILECMD])dnl
186dd52494dSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
187dd52494dSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
188dd52494dSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
189dd52494dSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
190dd52494dSmrgm4_require([_LT_WITH_SYSROOT])dnl
191dd52494dSmrgm4_require([_LT_CMD_TRUNCATE])dnl
192dd52494dSmrg
193dd52494dSmrg_LT_CONFIG_LIBTOOL_INIT([
194dd52494dSmrg# See if we are running on zsh, and set the options that allow our
195dd52494dSmrg# commands through without removal of \ escapes INIT.
196dd52494dSmrgif test -n "\${ZSH_VERSION+set}"; then
197dd52494dSmrg   setopt NO_GLOB_SUBST
198dd52494dSmrgfi
199dd52494dSmrg])
200dd52494dSmrgif test -n "${ZSH_VERSION+set}"; then
201dd52494dSmrg   setopt NO_GLOB_SUBST
202dd52494dSmrgfi
203dd52494dSmrg
204dd52494dSmrg_LT_CHECK_OBJDIR
205dd52494dSmrg
206dd52494dSmrgm4_require([_LT_TAG_COMPILER])dnl
207dd52494dSmrg
208dd52494dSmrgcase $host_os in
209dd52494dSmrgaix3*)
210dd52494dSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
211dd52494dSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
212dd52494dSmrg  # vanish in a puff of smoke.
213dd52494dSmrg  if test set != "${COLLECT_NAMES+set}"; then
214dd52494dSmrg    COLLECT_NAMES=
215dd52494dSmrg    export COLLECT_NAMES
216dd52494dSmrg  fi
217dd52494dSmrg  ;;
218dd52494dSmrgesac
219dd52494dSmrg
220dd52494dSmrg# Global variables:
221dd52494dSmrgofile=libtool
222dd52494dSmrgcan_build_shared=yes
223dd52494dSmrg
22433adc6acSmrg# All known linkers require a '.a' archive for static linking (except MSVC and
22533adc6acSmrg# ICC, which need '.lib').
226dd52494dSmrglibext=a
227dd52494dSmrg
228dd52494dSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
229dd52494dSmrg
230dd52494dSmrgold_CC=$CC
231dd52494dSmrgold_CFLAGS=$CFLAGS
232dd52494dSmrg
233dd52494dSmrg# Set sane defaults for various variables
234dd52494dSmrgtest -z "$CC" && CC=cc
235dd52494dSmrgtest -z "$LTCC" && LTCC=$CC
236dd52494dSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
237dd52494dSmrgtest -z "$LD" && LD=ld
238dd52494dSmrgtest -z "$ac_objext" && ac_objext=o
239dd52494dSmrg
240dd52494dSmrg_LT_CC_BASENAME([$compiler])
241dd52494dSmrg
242dd52494dSmrg# Only perform the check for file, if the check method requires it
243dd52494dSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
244dd52494dSmrgcase $deplibs_check_method in
245dd52494dSmrgfile_magic*)
246dd52494dSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
247dd52494dSmrg    _LT_PATH_MAGIC
248dd52494dSmrg  fi
249dd52494dSmrg  ;;
250dd52494dSmrgesac
251dd52494dSmrg
252dd52494dSmrg# Use C for the default configuration in the libtool script
253dd52494dSmrgLT_SUPPORTED_TAG([CC])
254dd52494dSmrg_LT_LANG_C_CONFIG
255dd52494dSmrg_LT_LANG_DEFAULT_CONFIG
256dd52494dSmrg_LT_CONFIG_COMMANDS
257dd52494dSmrg])# _LT_SETUP
258dd52494dSmrg
259dd52494dSmrg
260dd52494dSmrg# _LT_PREPARE_SED_QUOTE_VARS
261dd52494dSmrg# --------------------------
262dd52494dSmrg# Define a few sed substitution that help us do robust quoting.
263dd52494dSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
264dd52494dSmrg[# Backslashify metacharacters that are still active within
265dd52494dSmrg# double-quoted strings.
266dd52494dSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
267dd52494dSmrg
268dd52494dSmrg# Same as above, but do not quote variable references.
269dd52494dSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
270dd52494dSmrg
271dd52494dSmrg# Sed substitution to delay expansion of an escaped shell variable in a
272dd52494dSmrg# double_quote_subst'ed string.
273dd52494dSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
274dd52494dSmrg
275dd52494dSmrg# Sed substitution to delay expansion of an escaped single quote.
276dd52494dSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
277dd52494dSmrg
278dd52494dSmrg# Sed substitution to avoid accidental globbing in evaled expressions
279dd52494dSmrgno_glob_subst='s/\*/\\\*/g'
280dd52494dSmrg])
281dd52494dSmrg
282dd52494dSmrg# _LT_PROG_LTMAIN
283dd52494dSmrg# ---------------
284dd52494dSmrg# Note that this code is called both from 'configure', and 'config.status'
285dd52494dSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
286dd52494dSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake,
287dd52494dSmrg# so we pass a copy along to make sure it has a sensible value anyway.
288dd52494dSmrgm4_defun([_LT_PROG_LTMAIN],
289dd52494dSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
290dd52494dSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
291dd52494dSmrgltmain=$ac_aux_dir/ltmain.sh
292dd52494dSmrg])# _LT_PROG_LTMAIN
293dd52494dSmrg
294dd52494dSmrg
295dd52494dSmrg## ------------------------------------- ##
296dd52494dSmrg## Accumulate code for creating libtool. ##
297dd52494dSmrg## ------------------------------------- ##
298dd52494dSmrg
299dd52494dSmrg# So that we can recreate a full libtool script including additional
300dd52494dSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
301dd52494dSmrg# in macros and then make a single call at the end using the 'libtool'
302dd52494dSmrg# label.
303dd52494dSmrg
304dd52494dSmrg
305dd52494dSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
306dd52494dSmrg# ----------------------------------------
307dd52494dSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
308dd52494dSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
309dd52494dSmrg[m4_ifval([$1],
310dd52494dSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
311dd52494dSmrg                     [$1
312dd52494dSmrg])])])
313dd52494dSmrg
314dd52494dSmrg# Initialize.
315dd52494dSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
316dd52494dSmrg
317dd52494dSmrg
318dd52494dSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
319dd52494dSmrg# ------------------------------
320dd52494dSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
321dd52494dSmrgm4_define([_LT_CONFIG_LIBTOOL],
322dd52494dSmrg[m4_ifval([$1],
323dd52494dSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
324dd52494dSmrg                     [$1
325dd52494dSmrg])])])
326dd52494dSmrg
327dd52494dSmrg# Initialize.
328dd52494dSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
329dd52494dSmrg
330dd52494dSmrg
331dd52494dSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
332dd52494dSmrg# -----------------------------------------------------
333dd52494dSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
334dd52494dSmrg[_LT_CONFIG_LIBTOOL([$1])
335dd52494dSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
336dd52494dSmrg])
337dd52494dSmrg
338dd52494dSmrg
339dd52494dSmrg# _LT_FORMAT_COMMENT([COMMENT])
340dd52494dSmrg# -----------------------------
341dd52494dSmrg# Add leading comment marks to the start of each line, and a trailing
342dd52494dSmrg# full-stop to the whole comment if one is not present already.
343dd52494dSmrgm4_define([_LT_FORMAT_COMMENT],
344dd52494dSmrg[m4_ifval([$1], [
345dd52494dSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
346dd52494dSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
347dd52494dSmrg)])
348dd52494dSmrg
349dd52494dSmrg
350dd52494dSmrg
351dd52494dSmrg## ------------------------ ##
352dd52494dSmrg## FIXME: Eliminate VARNAME ##
353dd52494dSmrg## ------------------------ ##
354dd52494dSmrg
355dd52494dSmrg
356dd52494dSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
357dd52494dSmrg# -------------------------------------------------------------------
358dd52494dSmrg# CONFIGNAME is the name given to the value in the libtool script.
359dd52494dSmrg# VARNAME is the (base) name used in the configure script.
360dd52494dSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
361dd52494dSmrg# VARNAME.  Any other value will be used directly.
362dd52494dSmrgm4_define([_LT_DECL],
363dd52494dSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
364dd52494dSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
365dd52494dSmrg	[m4_ifval([$1], [$1], [$2])])
366dd52494dSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
367dd52494dSmrg    m4_ifval([$4],
368dd52494dSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
369dd52494dSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
370dd52494dSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
371dd52494dSmrg])
372dd52494dSmrg
373dd52494dSmrg
374dd52494dSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
375dd52494dSmrg# --------------------------------------------------------
376dd52494dSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
377dd52494dSmrg
378dd52494dSmrg
379dd52494dSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
380dd52494dSmrg# ------------------------------------------------
381dd52494dSmrgm4_define([lt_decl_tag_varnames],
382dd52494dSmrg[_lt_decl_filter([tagged?], [yes], $@)])
383dd52494dSmrg
384dd52494dSmrg
385dd52494dSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
386dd52494dSmrg# ---------------------------------------------------------
387dd52494dSmrgm4_define([_lt_decl_filter],
388dd52494dSmrg[m4_case([$#],
389dd52494dSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
390dd52494dSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
391dd52494dSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
392dd52494dSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
393dd52494dSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
394dd52494dSmrg])
395dd52494dSmrg
396dd52494dSmrg
397dd52494dSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
398dd52494dSmrg# --------------------------------------------------
399dd52494dSmrgm4_define([lt_decl_quote_varnames],
400dd52494dSmrg[_lt_decl_filter([value], [1], $@)])
401dd52494dSmrg
402dd52494dSmrg
403dd52494dSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
404dd52494dSmrg# ---------------------------------------------------
405dd52494dSmrgm4_define([lt_decl_dquote_varnames],
406dd52494dSmrg[_lt_decl_filter([value], [2], $@)])
407dd52494dSmrg
408dd52494dSmrg
409dd52494dSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
410dd52494dSmrg# ---------------------------------------------------
411dd52494dSmrgm4_define([lt_decl_varnames_tagged],
412dd52494dSmrg[m4_assert([$# <= 2])dnl
413dd52494dSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
414dd52494dSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
415dd52494dSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
416dd52494dSmrgm4_define([_lt_decl_varnames_tagged],
417dd52494dSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
418dd52494dSmrg
419dd52494dSmrg
420dd52494dSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
421dd52494dSmrg# ------------------------------------------------
422dd52494dSmrgm4_define([lt_decl_all_varnames],
423dd52494dSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
424dd52494dSmrg     m4_if([$2], [],
425dd52494dSmrg	   m4_quote(lt_decl_varnames),
426dd52494dSmrg	m4_quote(m4_shift($@))))[]dnl
427dd52494dSmrg])
428dd52494dSmrgm4_define([_lt_decl_all_varnames],
429dd52494dSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
430dd52494dSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
431dd52494dSmrg])
432dd52494dSmrg
433dd52494dSmrg
434dd52494dSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
435dd52494dSmrg# ------------------------------------
436dd52494dSmrg# Quote a variable value, and forward it to 'config.status' so that its
437dd52494dSmrg# declaration there will have the same value as in 'configure'.  VARNAME
438dd52494dSmrg# must have a single quote delimited value for this to work.
439dd52494dSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
440dd52494dSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
441dd52494dSmrg
442dd52494dSmrg
443dd52494dSmrg# _LT_CONFIG_STATUS_DECLARATIONS
444dd52494dSmrg# ------------------------------
445dd52494dSmrg# We delimit libtool config variables with single quotes, so when
446dd52494dSmrg# we write them to config.status, we have to be sure to quote all
447dd52494dSmrg# embedded single quotes properly.  In configure, this macro expands
448dd52494dSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
449dd52494dSmrg#
450dd52494dSmrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
451dd52494dSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
452dd52494dSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
453dd52494dSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
454dd52494dSmrg
455dd52494dSmrg
456dd52494dSmrg# _LT_LIBTOOL_TAGS
457dd52494dSmrg# ----------------
458dd52494dSmrg# Output comment and list of tags supported by the script
459dd52494dSmrgm4_defun([_LT_LIBTOOL_TAGS],
460dd52494dSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
461dd52494dSmrgavailable_tags='_LT_TAGS'dnl
462dd52494dSmrg])
463dd52494dSmrg
464dd52494dSmrg
465dd52494dSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
466dd52494dSmrg# -----------------------------------
467dd52494dSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
468dd52494dSmrg# expand to a commented shell variable setting:
469dd52494dSmrg#
470dd52494dSmrg#    # Some comment about what VAR is for.
471dd52494dSmrg#    visible_name=$lt_internal_name
472dd52494dSmrgm4_define([_LT_LIBTOOL_DECLARE],
473dd52494dSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
474dd52494dSmrg					   [description])))[]dnl
475dd52494dSmrgm4_pushdef([_libtool_name],
476dd52494dSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
477dd52494dSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
478dd52494dSmrg    [0], [_libtool_name=[$]$1],
479dd52494dSmrg    [1], [_libtool_name=$lt_[]$1],
480dd52494dSmrg    [2], [_libtool_name=$lt_[]$1],
481dd52494dSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
482dd52494dSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
483dd52494dSmrg])
484dd52494dSmrg
485dd52494dSmrg
486dd52494dSmrg# _LT_LIBTOOL_CONFIG_VARS
487dd52494dSmrg# -----------------------
488dd52494dSmrg# Produce commented declarations of non-tagged libtool config variables
489dd52494dSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
490dd52494dSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
491dd52494dSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
492dd52494dSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
493dd52494dSmrg[m4_foreach([_lt_var],
494dd52494dSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
495dd52494dSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
496dd52494dSmrg
497dd52494dSmrg
498dd52494dSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
499dd52494dSmrg# -------------------------
500dd52494dSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
501dd52494dSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
502dd52494dSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
503dd52494dSmrg
504dd52494dSmrg
505dd52494dSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
506dd52494dSmrg# ------------------------------
507dd52494dSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
508dd52494dSmrg
509dd52494dSmrg
510dd52494dSmrg# _LT_CONFIG_COMMANDS
511dd52494dSmrg# -------------------
512dd52494dSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
513dd52494dSmrg# variables for single and double quote escaping we saved from calls
514dd52494dSmrg# to _LT_DECL, we can put quote escaped variables declarations
515dd52494dSmrg# into 'config.status', and then the shell code to quote escape them in
516dd52494dSmrg# for loops in 'config.status'.  Finally, any additional code accumulated
517dd52494dSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
518dd52494dSmrgm4_defun([_LT_CONFIG_COMMANDS],
519dd52494dSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
520dd52494dSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
521dd52494dSmrg	dnl instead of duplicating it all over again into config.status,
522dd52494dSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
523dd52494dSmrg	dnl needs to know what name is stored there:
524dd52494dSmrg        [AC_CONFIG_COMMANDS([libtool],
525dd52494dSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
526dd52494dSmrg    dnl If the libtool generation code is destined for config.status,
527dd52494dSmrg    dnl expand the accumulated commands and init code now:
528dd52494dSmrg    [AC_CONFIG_COMMANDS([libtool],
529dd52494dSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
530dd52494dSmrg])#_LT_CONFIG_COMMANDS
531dd52494dSmrg
532dd52494dSmrg
533dd52494dSmrg# Initialize.
534dd52494dSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
535dd52494dSmrg[
536dd52494dSmrg
537dd52494dSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
538dd52494dSmrg# if CDPATH is set.
539dd52494dSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
540dd52494dSmrg
541dd52494dSmrgsed_quote_subst='$sed_quote_subst'
542dd52494dSmrgdouble_quote_subst='$double_quote_subst'
543dd52494dSmrgdelay_variable_subst='$delay_variable_subst'
544dd52494dSmrg_LT_CONFIG_STATUS_DECLARATIONS
545dd52494dSmrgLTCC='$LTCC'
546dd52494dSmrgLTCFLAGS='$LTCFLAGS'
547dd52494dSmrgcompiler='$compiler_DEFAULT'
548dd52494dSmrg
549dd52494dSmrg# A function that is used when there is no print builtin or printf.
550dd52494dSmrgfunc_fallback_echo ()
551dd52494dSmrg{
552dd52494dSmrg  eval 'cat <<_LTECHO_EOF
553dd52494dSmrg\$[]1
554dd52494dSmrg_LTECHO_EOF'
555dd52494dSmrg}
556dd52494dSmrg
557dd52494dSmrg# Quote evaled strings.
558dd52494dSmrgfor var in lt_decl_all_varnames([[ \
559dd52494dSmrg]], lt_decl_quote_varnames); do
560dd52494dSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
561dd52494dSmrg    *[[\\\\\\\`\\"\\\$]]*)
562dd52494dSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
563dd52494dSmrg      ;;
564dd52494dSmrg    *)
565dd52494dSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
566dd52494dSmrg      ;;
567dd52494dSmrg    esac
568dd52494dSmrgdone
569dd52494dSmrg
570dd52494dSmrg# Double-quote double-evaled strings.
571dd52494dSmrgfor var in lt_decl_all_varnames([[ \
572dd52494dSmrg]], lt_decl_dquote_varnames); do
573dd52494dSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
574dd52494dSmrg    *[[\\\\\\\`\\"\\\$]]*)
575dd52494dSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
576dd52494dSmrg      ;;
577dd52494dSmrg    *)
578dd52494dSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
579dd52494dSmrg      ;;
580dd52494dSmrg    esac
581dd52494dSmrgdone
582dd52494dSmrg
583dd52494dSmrg_LT_OUTPUT_LIBTOOL_INIT
584dd52494dSmrg])
585dd52494dSmrg
586dd52494dSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
587dd52494dSmrg# ------------------------------------
588dd52494dSmrg# Generate a child script FILE with all initialization necessary to
589dd52494dSmrg# reuse the environment learned by the parent script, and make the
590dd52494dSmrg# file executable.  If COMMENT is supplied, it is inserted after the
591dd52494dSmrg# '#!' sequence but before initialization text begins.  After this
592dd52494dSmrg# macro, additional text can be appended to FILE to form the body of
593dd52494dSmrg# the child script.  The macro ends with non-zero status if the
594dd52494dSmrg# file could not be fully written (such as if the disk is full).
595dd52494dSmrgm4_ifdef([AS_INIT_GENERATED],
596dd52494dSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
597dd52494dSmrg[m4_defun([_LT_GENERATED_FILE_INIT],
598dd52494dSmrg[m4_require([AS_PREPARE])]dnl
599dd52494dSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
600dd52494dSmrg[lt_write_fail=0
601dd52494dSmrgcat >$1 <<_ASEOF || lt_write_fail=1
602dd52494dSmrg#! $SHELL
603dd52494dSmrg# Generated by $as_me.
604dd52494dSmrg$2
605dd52494dSmrgSHELL=\${CONFIG_SHELL-$SHELL}
606dd52494dSmrgexport SHELL
607dd52494dSmrg_ASEOF
608dd52494dSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1
609dd52494dSmrgAS_SHELL_SANITIZE
610dd52494dSmrg_AS_PREPARE
611dd52494dSmrgexec AS_MESSAGE_FD>&1
612dd52494dSmrg_ASEOF
613dd52494dSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl
614dd52494dSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
615dd52494dSmrg
616dd52494dSmrg# LT_OUTPUT
617dd52494dSmrg# ---------
618dd52494dSmrg# This macro allows early generation of the libtool script (before
619dd52494dSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
620dd52494dSmrg# tests.
621dd52494dSmrgAC_DEFUN([LT_OUTPUT],
622dd52494dSmrg[: ${CONFIG_LT=./config.lt}
623dd52494dSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
624dd52494dSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
625dd52494dSmrg[# Run this file to recreate a libtool stub with the current configuration.])
626dd52494dSmrg
627dd52494dSmrgcat >>"$CONFIG_LT" <<\_LTEOF
628dd52494dSmrglt_cl_silent=false
629dd52494dSmrgexec AS_MESSAGE_LOG_FD>>config.log
630dd52494dSmrg{
631dd52494dSmrg  echo
632dd52494dSmrg  AS_BOX([Running $as_me.])
633dd52494dSmrg} >&AS_MESSAGE_LOG_FD
634dd52494dSmrg
635dd52494dSmrglt_cl_help="\
636dd52494dSmrg'$as_me' creates a local libtool stub from the current configuration,
637dd52494dSmrgfor use in further configure time tests before the real libtool is
638dd52494dSmrggenerated.
639dd52494dSmrg
640dd52494dSmrgUsage: $[0] [[OPTIONS]]
641dd52494dSmrg
642dd52494dSmrg  -h, --help      print this help, then exit
643dd52494dSmrg  -V, --version   print version number, then exit
644dd52494dSmrg  -q, --quiet     do not print progress messages
645dd52494dSmrg  -d, --debug     don't remove temporary files
646dd52494dSmrg
647dd52494dSmrgReport bugs to <bug-libtool@gnu.org>."
648dd52494dSmrg
649dd52494dSmrglt_cl_version="\
650dd52494dSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
651dd52494dSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
652dd52494dSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
653dd52494dSmrg
654dd52494dSmrgCopyright (C) 2011 Free Software Foundation, Inc.
655dd52494dSmrgThis config.lt script is free software; the Free Software Foundation
656dd52494dSmrggives unlimited permision to copy, distribute and modify it."
657dd52494dSmrg
658dd52494dSmrgwhile test 0 != $[#]
659dd52494dSmrgdo
660dd52494dSmrg  case $[1] in
661dd52494dSmrg    --version | --v* | -V )
662dd52494dSmrg      echo "$lt_cl_version"; exit 0 ;;
663dd52494dSmrg    --help | --h* | -h )
664dd52494dSmrg      echo "$lt_cl_help"; exit 0 ;;
665dd52494dSmrg    --debug | --d* | -d )
666dd52494dSmrg      debug=: ;;
667dd52494dSmrg    --quiet | --q* | --silent | --s* | -q )
668dd52494dSmrg      lt_cl_silent=: ;;
669dd52494dSmrg
670dd52494dSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
671dd52494dSmrgTry '$[0] --help' for more information.]) ;;
672dd52494dSmrg
673dd52494dSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
674dd52494dSmrgTry '$[0] --help' for more information.]) ;;
675dd52494dSmrg  esac
676dd52494dSmrg  shift
677dd52494dSmrgdone
678dd52494dSmrg
679dd52494dSmrgif $lt_cl_silent; then
680dd52494dSmrg  exec AS_MESSAGE_FD>/dev/null
681dd52494dSmrgfi
682dd52494dSmrg_LTEOF
683dd52494dSmrg
684dd52494dSmrgcat >>"$CONFIG_LT" <<_LTEOF
685dd52494dSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
686dd52494dSmrg_LTEOF
687dd52494dSmrg
688dd52494dSmrgcat >>"$CONFIG_LT" <<\_LTEOF
689dd52494dSmrgAC_MSG_NOTICE([creating $ofile])
690dd52494dSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
691dd52494dSmrgAS_EXIT(0)
692dd52494dSmrg_LTEOF
693dd52494dSmrgchmod +x "$CONFIG_LT"
694dd52494dSmrg
695dd52494dSmrg# configure is writing to config.log, but config.lt does its own redirection,
696dd52494dSmrg# appending to config.log, which fails on DOS, as config.log is still kept
697dd52494dSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
698dd52494dSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
699dd52494dSmrglt_cl_success=:
700dd52494dSmrgtest yes = "$silent" &&
701dd52494dSmrg  lt_config_lt_args="$lt_config_lt_args --quiet"
702dd52494dSmrgexec AS_MESSAGE_LOG_FD>/dev/null
703dd52494dSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
704dd52494dSmrgexec AS_MESSAGE_LOG_FD>>config.log
705dd52494dSmrg$lt_cl_success || AS_EXIT(1)
706dd52494dSmrg])# LT_OUTPUT
707dd52494dSmrg
708dd52494dSmrg
709dd52494dSmrg# _LT_CONFIG(TAG)
710dd52494dSmrg# ---------------
711dd52494dSmrg# If TAG is the built-in tag, create an initial libtool script with a
712dd52494dSmrg# default configuration from the untagged config vars.  Otherwise add code
713dd52494dSmrg# to config.status for appending the configuration named by TAG from the
714dd52494dSmrg# matching tagged config vars.
715dd52494dSmrgm4_defun([_LT_CONFIG],
716dd52494dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
717dd52494dSmrg_LT_CONFIG_SAVE_COMMANDS([
718dd52494dSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
719dd52494dSmrg  m4_if(_LT_TAG, [C], [
720dd52494dSmrg    # See if we are running on zsh, and set the options that allow our
721dd52494dSmrg    # commands through without removal of \ escapes.
722dd52494dSmrg    if test -n "${ZSH_VERSION+set}"; then
723dd52494dSmrg      setopt NO_GLOB_SUBST
724dd52494dSmrg    fi
725dd52494dSmrg
726dd52494dSmrg    cfgfile=${ofile}T
727dd52494dSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
728dd52494dSmrg    $RM "$cfgfile"
729dd52494dSmrg
730dd52494dSmrg    cat <<_LT_EOF >> "$cfgfile"
731dd52494dSmrg#! $SHELL
732dd52494dSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION
733dd52494dSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
734dd52494dSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
735dd52494dSmrg
736dd52494dSmrg# Provide generalized library-building support services.
737dd52494dSmrg# Written by Gordon Matzigkeit, 1996
738dd52494dSmrg
739dd52494dSmrg_LT_COPYING
740dd52494dSmrg_LT_LIBTOOL_TAGS
741dd52494dSmrg
742dd52494dSmrg# Configured defaults for sys_lib_dlsearch_path munging.
743dd52494dSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
744dd52494dSmrg
745dd52494dSmrg# ### BEGIN LIBTOOL CONFIG
746dd52494dSmrg_LT_LIBTOOL_CONFIG_VARS
747dd52494dSmrg_LT_LIBTOOL_TAG_VARS
748dd52494dSmrg# ### END LIBTOOL CONFIG
749dd52494dSmrg
750dd52494dSmrg_LT_EOF
751dd52494dSmrg
752dd52494dSmrg    cat <<'_LT_EOF' >> "$cfgfile"
753dd52494dSmrg
754dd52494dSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
755dd52494dSmrg
756dd52494dSmrg_LT_PREPARE_MUNGE_PATH_LIST
757dd52494dSmrg_LT_PREPARE_CC_BASENAME
758dd52494dSmrg
759dd52494dSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE
760dd52494dSmrg
761dd52494dSmrg_LT_EOF
762dd52494dSmrg
763dd52494dSmrg  case $host_os in
764dd52494dSmrg  aix3*)
765dd52494dSmrg    cat <<\_LT_EOF >> "$cfgfile"
766dd52494dSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
767dd52494dSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
768dd52494dSmrg# vanish in a puff of smoke.
769dd52494dSmrgif test set != "${COLLECT_NAMES+set}"; then
770dd52494dSmrg  COLLECT_NAMES=
771dd52494dSmrg  export COLLECT_NAMES
772dd52494dSmrgfi
773dd52494dSmrg_LT_EOF
774dd52494dSmrg    ;;
775dd52494dSmrg  esac
776dd52494dSmrg
777dd52494dSmrg  _LT_PROG_LTMAIN
778dd52494dSmrg
779dd52494dSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
780dd52494dSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
781dd52494dSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
782dd52494dSmrg  # is reportedly fixed, but why not run on old versions too?
78333adc6acSmrg  $SED '$q' "$ltmain" >> "$cfgfile" \
784dd52494dSmrg     || (rm -f "$cfgfile"; exit 1)
785dd52494dSmrg
786dd52494dSmrg   mv -f "$cfgfile" "$ofile" ||
787dd52494dSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
788dd52494dSmrg  chmod +x "$ofile"
789dd52494dSmrg],
790dd52494dSmrg[cat <<_LT_EOF >> "$ofile"
791dd52494dSmrg
792dd52494dSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
793dd52494dSmrgdnl in a comment (ie after a #).
794dd52494dSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
795dd52494dSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
796dd52494dSmrg# ### END LIBTOOL TAG CONFIG: $1
797dd52494dSmrg_LT_EOF
798dd52494dSmrg])dnl /m4_if
799dd52494dSmrg],
800dd52494dSmrg[m4_if([$1], [], [
801dd52494dSmrg    PACKAGE='$PACKAGE'
802dd52494dSmrg    VERSION='$VERSION'
803dd52494dSmrg    RM='$RM'
804dd52494dSmrg    ofile='$ofile'], [])
805dd52494dSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
806dd52494dSmrg])# _LT_CONFIG
807dd52494dSmrg
808dd52494dSmrg
809dd52494dSmrg# LT_SUPPORTED_TAG(TAG)
810dd52494dSmrg# ---------------------
811dd52494dSmrg# Trace this macro to discover what tags are supported by the libtool
812dd52494dSmrg# --tag option, using:
813dd52494dSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
814dd52494dSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
815dd52494dSmrg
816dd52494dSmrg
817dd52494dSmrg# C support is built-in for now
818dd52494dSmrgm4_define([_LT_LANG_C_enabled], [])
819dd52494dSmrgm4_define([_LT_TAGS], [])
820dd52494dSmrg
821dd52494dSmrg
822dd52494dSmrg# LT_LANG(LANG)
823dd52494dSmrg# -------------
824dd52494dSmrg# Enable libtool support for the given language if not already enabled.
825dd52494dSmrgAC_DEFUN([LT_LANG],
826dd52494dSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
827dd52494dSmrgm4_case([$1],
828dd52494dSmrg  [C],			[_LT_LANG(C)],
829dd52494dSmrg  [C++],		[_LT_LANG(CXX)],
830dd52494dSmrg  [Go],			[_LT_LANG(GO)],
831dd52494dSmrg  [Java],		[_LT_LANG(GCJ)],
832dd52494dSmrg  [Fortran 77],		[_LT_LANG(F77)],
833dd52494dSmrg  [Fortran],		[_LT_LANG(FC)],
834dd52494dSmrg  [Windows Resource],	[_LT_LANG(RC)],
835dd52494dSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
836dd52494dSmrg    [_LT_LANG($1)],
837dd52494dSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
838dd52494dSmrg])# LT_LANG
839dd52494dSmrg
840dd52494dSmrg
841dd52494dSmrg# _LT_LANG(LANGNAME)
842dd52494dSmrg# ------------------
843dd52494dSmrgm4_defun([_LT_LANG],
844dd52494dSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
845dd52494dSmrg  [LT_SUPPORTED_TAG([$1])dnl
846dd52494dSmrg  m4_append([_LT_TAGS], [$1 ])dnl
847dd52494dSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
848dd52494dSmrg  _LT_LANG_$1_CONFIG($1)])dnl
849dd52494dSmrg])# _LT_LANG
850dd52494dSmrg
851dd52494dSmrg
852dd52494dSmrgm4_ifndef([AC_PROG_GO], [
853dd52494dSmrg############################################################
854dd52494dSmrg# NOTE: This macro has been submitted for inclusion into   #
855dd52494dSmrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
856dd52494dSmrg#  a released version of Autoconf we should remove this    #
857dd52494dSmrg#  macro and use it instead.                               #
858dd52494dSmrg############################################################
859dd52494dSmrgm4_defun([AC_PROG_GO],
860dd52494dSmrg[AC_LANG_PUSH(Go)dnl
861dd52494dSmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
862dd52494dSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
863dd52494dSmrg_AC_ARG_VAR_LDFLAGS()dnl
864dd52494dSmrgAC_CHECK_TOOL(GOC, gccgo)
865dd52494dSmrgif test -z "$GOC"; then
866dd52494dSmrg  if test -n "$ac_tool_prefix"; then
867dd52494dSmrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
868dd52494dSmrg  fi
869dd52494dSmrgfi
870dd52494dSmrgif test -z "$GOC"; then
871dd52494dSmrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
872dd52494dSmrgfi
873dd52494dSmrg])#m4_defun
874dd52494dSmrg])#m4_ifndef
875dd52494dSmrg
876dd52494dSmrg
877dd52494dSmrg# _LT_LANG_DEFAULT_CONFIG
878dd52494dSmrg# -----------------------
879dd52494dSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
880dd52494dSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
881dd52494dSmrg  [LT_LANG(CXX)],
882dd52494dSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
883dd52494dSmrg
884dd52494dSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
885dd52494dSmrg  [LT_LANG(F77)],
886dd52494dSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
887dd52494dSmrg
888dd52494dSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
889dd52494dSmrg  [LT_LANG(FC)],
890dd52494dSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
891dd52494dSmrg
892dd52494dSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
893dd52494dSmrgdnl pulling things in needlessly.
894dd52494dSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
895dd52494dSmrg  [LT_LANG(GCJ)],
896dd52494dSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
897dd52494dSmrg    [LT_LANG(GCJ)],
898dd52494dSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
899dd52494dSmrg      [LT_LANG(GCJ)],
900dd52494dSmrg      [m4_ifdef([AC_PROG_GCJ],
901dd52494dSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
902dd52494dSmrg       m4_ifdef([A][M_PROG_GCJ],
903dd52494dSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
904dd52494dSmrg       m4_ifdef([LT_PROG_GCJ],
905dd52494dSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
906dd52494dSmrg
907dd52494dSmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
908dd52494dSmrg  [LT_LANG(GO)],
909dd52494dSmrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
910dd52494dSmrg
911dd52494dSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
912dd52494dSmrg  [LT_LANG(RC)],
913dd52494dSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
914dd52494dSmrg])# _LT_LANG_DEFAULT_CONFIG
915dd52494dSmrg
916dd52494dSmrg# Obsolete macros:
917dd52494dSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
918dd52494dSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
919dd52494dSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
920dd52494dSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
921dd52494dSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
922dd52494dSmrgdnl aclocal-1.4 backwards compatibility:
923dd52494dSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
924dd52494dSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
925dd52494dSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
926dd52494dSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
927dd52494dSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
928dd52494dSmrg
929dd52494dSmrg
930dd52494dSmrg# _LT_TAG_COMPILER
931dd52494dSmrg# ----------------
932dd52494dSmrgm4_defun([_LT_TAG_COMPILER],
933dd52494dSmrg[AC_REQUIRE([AC_PROG_CC])dnl
934dd52494dSmrg
935dd52494dSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
936dd52494dSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
937dd52494dSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
938dd52494dSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
939dd52494dSmrg
940dd52494dSmrg# If no C compiler was specified, use CC.
941dd52494dSmrgLTCC=${LTCC-"$CC"}
942dd52494dSmrg
943dd52494dSmrg# If no C compiler flags were specified, use CFLAGS.
944dd52494dSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
945dd52494dSmrg
946dd52494dSmrg# Allow CC to be a program name with arguments.
947dd52494dSmrgcompiler=$CC
948dd52494dSmrg])# _LT_TAG_COMPILER
949dd52494dSmrg
950dd52494dSmrg
951dd52494dSmrg# _LT_COMPILER_BOILERPLATE
952dd52494dSmrg# ------------------------
953dd52494dSmrg# Check for compiler boilerplate output or warnings with
954dd52494dSmrg# the simple compiler test code.
955dd52494dSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
956dd52494dSmrg[m4_require([_LT_DECL_SED])dnl
957dd52494dSmrgac_outfile=conftest.$ac_objext
958dd52494dSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
959dd52494dSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
960dd52494dSmrg_lt_compiler_boilerplate=`cat conftest.err`
961dd52494dSmrg$RM conftest*
962dd52494dSmrg])# _LT_COMPILER_BOILERPLATE
963dd52494dSmrg
964dd52494dSmrg
965dd52494dSmrg# _LT_LINKER_BOILERPLATE
966dd52494dSmrg# ----------------------
967dd52494dSmrg# Check for linker boilerplate output or warnings with
968dd52494dSmrg# the simple link test code.
969dd52494dSmrgm4_defun([_LT_LINKER_BOILERPLATE],
970dd52494dSmrg[m4_require([_LT_DECL_SED])dnl
971dd52494dSmrgac_outfile=conftest.$ac_objext
972dd52494dSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
973dd52494dSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
974dd52494dSmrg_lt_linker_boilerplate=`cat conftest.err`
975dd52494dSmrg$RM -r conftest*
976dd52494dSmrg])# _LT_LINKER_BOILERPLATE
977dd52494dSmrg
978dd52494dSmrg# _LT_REQUIRED_DARWIN_CHECKS
979dd52494dSmrg# -------------------------
980dd52494dSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
981dd52494dSmrg  case $host_os in
982dd52494dSmrg    rhapsody* | darwin*)
983dd52494dSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
984dd52494dSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
985dd52494dSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
986dd52494dSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
987dd52494dSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
988dd52494dSmrg    _LT_DECL([], [DSYMUTIL], [1],
989dd52494dSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
990dd52494dSmrg    _LT_DECL([], [NMEDIT], [1],
991dd52494dSmrg      [Tool to change global to local symbols on Mac OS X])
992dd52494dSmrg    _LT_DECL([], [LIPO], [1],
993dd52494dSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
994dd52494dSmrg    _LT_DECL([], [OTOOL], [1],
995dd52494dSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
996dd52494dSmrg    _LT_DECL([], [OTOOL64], [1],
997dd52494dSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
998dd52494dSmrg
999dd52494dSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1000dd52494dSmrg      [lt_cv_apple_cc_single_mod=no
1001dd52494dSmrg      if test -z "$LT_MULTI_MODULE"; then
1002dd52494dSmrg	# By default we will add the -single_module flag. You can override
1003dd52494dSmrg	# by either setting the environment variable LT_MULTI_MODULE
1004dd52494dSmrg	# non-empty at configure time, or by adding -multi_module to the
1005dd52494dSmrg	# link flags.
1006dd52494dSmrg	rm -rf libconftest.dylib*
1007dd52494dSmrg	echo "int foo(void){return 1;}" > conftest.c
1008dd52494dSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1009dd52494dSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1010dd52494dSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1011dd52494dSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1012dd52494dSmrg        _lt_result=$?
1013dd52494dSmrg	# If there is a non-empty error log, and "single_module"
1014dd52494dSmrg	# appears in it, assume the flag caused a linker warning
1015dd52494dSmrg        if test -s conftest.err && $GREP single_module conftest.err; then
1016dd52494dSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
1017dd52494dSmrg	# Otherwise, if the output was created with a 0 exit code from
1018dd52494dSmrg	# the compiler, it worked.
1019dd52494dSmrg	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1020dd52494dSmrg	  lt_cv_apple_cc_single_mod=yes
1021dd52494dSmrg	else
1022dd52494dSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
1023dd52494dSmrg	fi
1024dd52494dSmrg	rm -rf libconftest.dylib*
1025dd52494dSmrg	rm -f conftest.*
1026dd52494dSmrg      fi])
1027dd52494dSmrg
1028dd52494dSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1029dd52494dSmrg      [lt_cv_ld_exported_symbols_list],
1030dd52494dSmrg      [lt_cv_ld_exported_symbols_list=no
1031dd52494dSmrg      save_LDFLAGS=$LDFLAGS
1032dd52494dSmrg      echo "_main" > conftest.sym
1033dd52494dSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1034dd52494dSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1035dd52494dSmrg	[lt_cv_ld_exported_symbols_list=yes],
1036dd52494dSmrg	[lt_cv_ld_exported_symbols_list=no])
1037dd52494dSmrg	LDFLAGS=$save_LDFLAGS
1038dd52494dSmrg    ])
1039dd52494dSmrg
1040dd52494dSmrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1041dd52494dSmrg      [lt_cv_ld_force_load=no
1042dd52494dSmrg      cat > conftest.c << _LT_EOF
1043dd52494dSmrgint forced_loaded() { return 2;}
1044dd52494dSmrg_LT_EOF
1045dd52494dSmrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1046dd52494dSmrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
104733adc6acSmrg      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
104833adc6acSmrg      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1049dd52494dSmrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1050dd52494dSmrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1051dd52494dSmrg      cat > conftest.c << _LT_EOF
1052dd52494dSmrgint main() { return 0;}
1053dd52494dSmrg_LT_EOF
1054dd52494dSmrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1055dd52494dSmrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1056dd52494dSmrg      _lt_result=$?
1057dd52494dSmrg      if test -s conftest.err && $GREP force_load conftest.err; then
1058dd52494dSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
1059dd52494dSmrg      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1060dd52494dSmrg	lt_cv_ld_force_load=yes
1061dd52494dSmrg      else
1062dd52494dSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
1063dd52494dSmrg      fi
1064dd52494dSmrg        rm -f conftest.err libconftest.a conftest conftest.c
1065dd52494dSmrg        rm -rf conftest.dSYM
1066dd52494dSmrg    ])
1067dd52494dSmrg    case $host_os in
1068dd52494dSmrg    rhapsody* | darwin1.[[012]])
1069dd52494dSmrg      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1070dd52494dSmrg    darwin1.*)
1071dd52494dSmrg      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
107233adc6acSmrg    darwin*)
107333adc6acSmrg      case $MACOSX_DEPLOYMENT_TARGET,$host in
107433adc6acSmrg        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
107533adc6acSmrg          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
107633adc6acSmrg        *)
107733adc6acSmrg          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1078dd52494dSmrg      esac
1079dd52494dSmrg    ;;
1080dd52494dSmrg  esac
1081dd52494dSmrg    if test yes = "$lt_cv_apple_cc_single_mod"; then
1082dd52494dSmrg      _lt_dar_single_mod='$single_module'
1083dd52494dSmrg    fi
1084dd52494dSmrg    if test yes = "$lt_cv_ld_exported_symbols_list"; then
1085dd52494dSmrg      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1086dd52494dSmrg    else
1087dd52494dSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1088dd52494dSmrg    fi
1089dd52494dSmrg    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1090dd52494dSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
1091dd52494dSmrg    else
1092dd52494dSmrg      _lt_dsymutil=
1093dd52494dSmrg    fi
1094dd52494dSmrg    ;;
1095dd52494dSmrg  esac
1096dd52494dSmrg])
1097dd52494dSmrg
1098dd52494dSmrg
1099dd52494dSmrg# _LT_DARWIN_LINKER_FEATURES([TAG])
1100dd52494dSmrg# ---------------------------------
1101dd52494dSmrg# Checks for linker and compiler features on darwin
1102dd52494dSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
1103dd52494dSmrg[
1104dd52494dSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1105dd52494dSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1106dd52494dSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
1107dd52494dSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
1108dd52494dSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1109dd52494dSmrg  if test yes = "$lt_cv_ld_force_load"; then
1110dd52494dSmrg    _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\"`'
1111dd52494dSmrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1112dd52494dSmrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1113dd52494dSmrg  else
1114dd52494dSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1115dd52494dSmrg  fi
1116dd52494dSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
1117dd52494dSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1118dd52494dSmrg  case $cc_basename in
1119dd52494dSmrg     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1120dd52494dSmrg     *) _lt_dar_can_shared=$GCC ;;
1121dd52494dSmrg  esac
1122dd52494dSmrg  if test yes = "$_lt_dar_can_shared"; then
1123dd52494dSmrg    output_verbose_link_cmd=func_echo_all
1124dd52494dSmrg    _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"
1125dd52494dSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
112633adc6acSmrg    _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"
112733adc6acSmrg    _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"
1128dd52494dSmrg    m4_if([$1], [CXX],
1129dd52494dSmrg[   if test yes != "$lt_cv_apple_cc_single_mod"; then
1130dd52494dSmrg      _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"
113133adc6acSmrg      _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"
1132dd52494dSmrg    fi
1133dd52494dSmrg],[])
1134dd52494dSmrg  else
1135dd52494dSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
1136dd52494dSmrg  fi
1137dd52494dSmrg])
1138dd52494dSmrg
1139dd52494dSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1140dd52494dSmrg# ----------------------------------
1141dd52494dSmrg# Links a minimal program and checks the executable
1142dd52494dSmrg# for the system default hardcoded library path. In most cases,
1143dd52494dSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
1144dd52494dSmrg# the location of the communication and MPI libs are included too.
1145dd52494dSmrg# If we don't find anything, use the default library path according
1146dd52494dSmrg# to the aix ld manual.
1147dd52494dSmrg# Store the results from the different compilers for each TAGNAME.
1148dd52494dSmrg# Allow to override them for all tags through lt_cv_aix_libpath.
1149dd52494dSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
1150dd52494dSmrg[m4_require([_LT_DECL_SED])dnl
1151dd52494dSmrgif test set = "${lt_cv_aix_libpath+set}"; then
1152dd52494dSmrg  aix_libpath=$lt_cv_aix_libpath
1153dd52494dSmrgelse
1154dd52494dSmrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1155dd52494dSmrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1156dd52494dSmrg  lt_aix_libpath_sed='[
1157dd52494dSmrg      /Import File Strings/,/^$/ {
1158dd52494dSmrg	  /^0/ {
1159dd52494dSmrg	      s/^0  *\([^ ]*\) *$/\1/
1160dd52494dSmrg	      p
1161dd52494dSmrg	  }
1162dd52494dSmrg      }]'
1163dd52494dSmrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1164dd52494dSmrg  # Check for a 64-bit object if we didn't find anything.
1165dd52494dSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1166dd52494dSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1167dd52494dSmrg  fi],[])
1168dd52494dSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1169dd52494dSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1170dd52494dSmrg  fi
1171dd52494dSmrg  ])
1172dd52494dSmrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1173dd52494dSmrgfi
1174dd52494dSmrg])# _LT_SYS_MODULE_PATH_AIX
1175dd52494dSmrg
1176dd52494dSmrg
1177dd52494dSmrg# _LT_SHELL_INIT(ARG)
1178dd52494dSmrg# -------------------
1179dd52494dSmrgm4_define([_LT_SHELL_INIT],
1180dd52494dSmrg[m4_divert_text([M4SH-INIT], [$1
1181dd52494dSmrg])])# _LT_SHELL_INIT
1182dd52494dSmrg
1183dd52494dSmrg
1184dd52494dSmrg
1185dd52494dSmrg# _LT_PROG_ECHO_BACKSLASH
1186dd52494dSmrg# -----------------------
1187dd52494dSmrg# Find how we can fake an echo command that does not interpret backslash.
1188dd52494dSmrg# In particular, with Autoconf 2.60 or later we add some code to the start
1189dd52494dSmrg# of the generated configure script that will find a shell with a builtin
1190dd52494dSmrg# printf (that we can use as an echo command).
1191dd52494dSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
1192dd52494dSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1193dd52494dSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1194dd52494dSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1195dd52494dSmrg
1196dd52494dSmrgAC_MSG_CHECKING([how to print strings])
1197dd52494dSmrg# Test print first, because it will be a builtin if present.
1198dd52494dSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1199dd52494dSmrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1200dd52494dSmrg  ECHO='print -r --'
1201dd52494dSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1202dd52494dSmrg  ECHO='printf %s\n'
1203dd52494dSmrgelse
1204dd52494dSmrg  # Use this function as a fallback that always works.
1205dd52494dSmrg  func_fallback_echo ()
1206dd52494dSmrg  {
1207dd52494dSmrg    eval 'cat <<_LTECHO_EOF
1208dd52494dSmrg$[]1
1209dd52494dSmrg_LTECHO_EOF'
1210dd52494dSmrg  }
1211dd52494dSmrg  ECHO='func_fallback_echo'
1212dd52494dSmrgfi
1213dd52494dSmrg
1214dd52494dSmrg# func_echo_all arg...
1215dd52494dSmrg# Invoke $ECHO with all args, space-separated.
1216dd52494dSmrgfunc_echo_all ()
1217dd52494dSmrg{
1218dd52494dSmrg    $ECHO "$*"
1219dd52494dSmrg}
1220dd52494dSmrg
1221dd52494dSmrgcase $ECHO in
1222dd52494dSmrg  printf*) AC_MSG_RESULT([printf]) ;;
1223dd52494dSmrg  print*) AC_MSG_RESULT([print -r]) ;;
1224dd52494dSmrg  *) AC_MSG_RESULT([cat]) ;;
1225dd52494dSmrgesac
1226dd52494dSmrg
1227dd52494dSmrgm4_ifdef([_AS_DETECT_SUGGESTED],
1228dd52494dSmrg[_AS_DETECT_SUGGESTED([
1229dd52494dSmrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1230dd52494dSmrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1231dd52494dSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1232dd52494dSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1233dd52494dSmrg    PATH=/empty FPATH=/empty; export PATH FPATH
1234dd52494dSmrg    test "X`printf %s $ECHO`" = "X$ECHO" \
1235dd52494dSmrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1236dd52494dSmrg
1237dd52494dSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1238dd52494dSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1239dd52494dSmrg])# _LT_PROG_ECHO_BACKSLASH
1240dd52494dSmrg
1241dd52494dSmrg
1242dd52494dSmrg# _LT_WITH_SYSROOT
1243dd52494dSmrg# ----------------
1244dd52494dSmrgAC_DEFUN([_LT_WITH_SYSROOT],
124533adc6acSmrg[m4_require([_LT_DECL_SED])dnl
124633adc6acSmrgAC_MSG_CHECKING([for sysroot])
1247dd52494dSmrgAC_ARG_WITH([sysroot],
1248dd52494dSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1249dd52494dSmrg  [Search for dependent libraries within DIR (or the compiler's sysroot
1250dd52494dSmrg   if not specified).])],
1251dd52494dSmrg[], [with_sysroot=no])
1252dd52494dSmrg
1253dd52494dSmrgdnl lt_sysroot will always be passed unquoted.  We quote it here
1254dd52494dSmrgdnl in case the user passed a directory name.
1255dd52494dSmrglt_sysroot=
1256dd52494dSmrgcase $with_sysroot in #(
1257dd52494dSmrg yes)
1258dd52494dSmrg   if test yes = "$GCC"; then
1259dd52494dSmrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1260dd52494dSmrg   fi
1261dd52494dSmrg   ;; #(
1262dd52494dSmrg /*)
126333adc6acSmrg   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
1264dd52494dSmrg   ;; #(
1265dd52494dSmrg no|'')
1266dd52494dSmrg   ;; #(
1267dd52494dSmrg *)
1268dd52494dSmrg   AC_MSG_RESULT([$with_sysroot])
1269dd52494dSmrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
1270dd52494dSmrg   ;;
1271dd52494dSmrgesac
1272dd52494dSmrg
1273dd52494dSmrg AC_MSG_RESULT([${lt_sysroot:-no}])
1274dd52494dSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1275dd52494dSmrg[dependent libraries, and where our libraries should be installed.])])
1276dd52494dSmrg
1277dd52494dSmrg# _LT_ENABLE_LOCK
1278dd52494dSmrg# ---------------
1279dd52494dSmrgm4_defun([_LT_ENABLE_LOCK],
1280dd52494dSmrg[AC_ARG_ENABLE([libtool-lock],
1281dd52494dSmrg  [AS_HELP_STRING([--disable-libtool-lock],
1282dd52494dSmrg    [avoid locking (might break parallel builds)])])
1283dd52494dSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes
1284dd52494dSmrg
1285dd52494dSmrg# Some flags need to be propagated to the compiler or linker for good
1286dd52494dSmrg# libtool support.
1287dd52494dSmrgcase $host in
1288dd52494dSmrgia64-*-hpux*)
1289dd52494dSmrg  # Find out what ABI is being produced by ac_compile, and set mode
1290dd52494dSmrg  # options accordingly.
1291dd52494dSmrg  echo 'int i;' > conftest.$ac_ext
1292dd52494dSmrg  if AC_TRY_EVAL(ac_compile); then
129333adc6acSmrg    case `$FILECMD conftest.$ac_objext` in
1294dd52494dSmrg      *ELF-32*)
1295dd52494dSmrg	HPUX_IA64_MODE=32
1296dd52494dSmrg	;;
1297dd52494dSmrg      *ELF-64*)
1298dd52494dSmrg	HPUX_IA64_MODE=64
1299dd52494dSmrg	;;
1300dd52494dSmrg    esac
1301dd52494dSmrg  fi
1302dd52494dSmrg  rm -rf conftest*
1303dd52494dSmrg  ;;
1304dd52494dSmrg*-*-irix6*)
1305dd52494dSmrg  # Find out what ABI is being produced by ac_compile, and set linker
1306dd52494dSmrg  # options accordingly.
1307dd52494dSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1308dd52494dSmrg  if AC_TRY_EVAL(ac_compile); then
1309dd52494dSmrg    if test yes = "$lt_cv_prog_gnu_ld"; then
131033adc6acSmrg      case `$FILECMD conftest.$ac_objext` in
1311dd52494dSmrg	*32-bit*)
1312dd52494dSmrg	  LD="${LD-ld} -melf32bsmip"
1313dd52494dSmrg	  ;;
1314dd52494dSmrg	*N32*)
1315dd52494dSmrg	  LD="${LD-ld} -melf32bmipn32"
1316dd52494dSmrg	  ;;
1317dd52494dSmrg	*64-bit*)
1318dd52494dSmrg	  LD="${LD-ld} -melf64bmip"
1319dd52494dSmrg	;;
1320dd52494dSmrg      esac
1321dd52494dSmrg    else
132233adc6acSmrg      case `$FILECMD conftest.$ac_objext` in
1323dd52494dSmrg	*32-bit*)
1324dd52494dSmrg	  LD="${LD-ld} -32"
1325dd52494dSmrg	  ;;
1326dd52494dSmrg	*N32*)
1327dd52494dSmrg	  LD="${LD-ld} -n32"
1328dd52494dSmrg	  ;;
1329dd52494dSmrg	*64-bit*)
1330dd52494dSmrg	  LD="${LD-ld} -64"
1331dd52494dSmrg	  ;;
1332dd52494dSmrg      esac
1333dd52494dSmrg    fi
1334dd52494dSmrg  fi
1335dd52494dSmrg  rm -rf conftest*
1336dd52494dSmrg  ;;
1337dd52494dSmrg
1338dd52494dSmrgmips64*-*linux*)
1339dd52494dSmrg  # Find out what ABI is being produced by ac_compile, and set linker
1340dd52494dSmrg  # options accordingly.
1341dd52494dSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1342dd52494dSmrg  if AC_TRY_EVAL(ac_compile); then
1343dd52494dSmrg    emul=elf
134433adc6acSmrg    case `$FILECMD conftest.$ac_objext` in
1345dd52494dSmrg      *32-bit*)
1346dd52494dSmrg	emul="${emul}32"
1347dd52494dSmrg	;;
1348dd52494dSmrg      *64-bit*)
1349dd52494dSmrg	emul="${emul}64"
1350dd52494dSmrg	;;
1351dd52494dSmrg    esac
135233adc6acSmrg    case `$FILECMD conftest.$ac_objext` in
1353dd52494dSmrg      *MSB*)
1354dd52494dSmrg	emul="${emul}btsmip"
1355dd52494dSmrg	;;
1356dd52494dSmrg      *LSB*)
1357dd52494dSmrg	emul="${emul}ltsmip"
1358dd52494dSmrg	;;
1359dd52494dSmrg    esac
136033adc6acSmrg    case `$FILECMD conftest.$ac_objext` in
1361dd52494dSmrg      *N32*)
1362dd52494dSmrg	emul="${emul}n32"
1363dd52494dSmrg	;;
1364dd52494dSmrg    esac
1365dd52494dSmrg    LD="${LD-ld} -m $emul"
1366dd52494dSmrg  fi
1367dd52494dSmrg  rm -rf conftest*
1368dd52494dSmrg  ;;
1369dd52494dSmrg
1370dd52494dSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1371dd52494dSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1372dd52494dSmrg  # Find out what ABI is being produced by ac_compile, and set linker
1373dd52494dSmrg  # options accordingly.  Note that the listed cases only cover the
1374dd52494dSmrg  # situations where additional linker options are needed (such as when
1375dd52494dSmrg  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1376dd52494dSmrg  # vice versa); the common cases where no linker options are needed do
1377dd52494dSmrg  # not appear in the list.
1378dd52494dSmrg  echo 'int i;' > conftest.$ac_ext
1379dd52494dSmrg  if AC_TRY_EVAL(ac_compile); then
138033adc6acSmrg    case `$FILECMD conftest.o` in
1381dd52494dSmrg      *32-bit*)
1382dd52494dSmrg	case $host in
1383dd52494dSmrg	  x86_64-*kfreebsd*-gnu)
1384dd52494dSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
1385dd52494dSmrg	    ;;
1386dd52494dSmrg	  x86_64-*linux*)
138733adc6acSmrg	    case `$FILECMD conftest.o` in
1388dd52494dSmrg	      *x86-64*)
1389dd52494dSmrg		LD="${LD-ld} -m elf32_x86_64"
1390dd52494dSmrg		;;
1391dd52494dSmrg	      *)
1392dd52494dSmrg		LD="${LD-ld} -m elf_i386"
1393dd52494dSmrg		;;
1394dd52494dSmrg	    esac
1395dd52494dSmrg	    ;;
1396dd52494dSmrg	  powerpc64le-*linux*)
1397dd52494dSmrg	    LD="${LD-ld} -m elf32lppclinux"
1398dd52494dSmrg	    ;;
1399dd52494dSmrg	  powerpc64-*linux*)
1400dd52494dSmrg	    LD="${LD-ld} -m elf32ppclinux"
1401dd52494dSmrg	    ;;
1402dd52494dSmrg	  s390x-*linux*)
1403dd52494dSmrg	    LD="${LD-ld} -m elf_s390"
1404dd52494dSmrg	    ;;
1405dd52494dSmrg	  sparc64-*linux*)
1406dd52494dSmrg	    LD="${LD-ld} -m elf32_sparc"
1407dd52494dSmrg	    ;;
1408dd52494dSmrg	esac
1409dd52494dSmrg	;;
1410dd52494dSmrg      *64-bit*)
1411dd52494dSmrg	case $host in
1412dd52494dSmrg	  x86_64-*kfreebsd*-gnu)
1413dd52494dSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
1414dd52494dSmrg	    ;;
1415dd52494dSmrg	  x86_64-*linux*)
1416dd52494dSmrg	    LD="${LD-ld} -m elf_x86_64"
1417dd52494dSmrg	    ;;
1418dd52494dSmrg	  powerpcle-*linux*|powerpc64le-*linux*)
1419dd52494dSmrg	    LD="${LD-ld} -m elf64lppc"
1420dd52494dSmrg	    ;;
1421dd52494dSmrg	  powerpc-*linux*|powerpc64-*linux*)
1422dd52494dSmrg	    LD="${LD-ld} -m elf64ppc"
1423dd52494dSmrg	    ;;
1424dd52494dSmrg	  s390*-*linux*|s390*-*tpf*)
1425dd52494dSmrg	    LD="${LD-ld} -m elf64_s390"
1426dd52494dSmrg	    ;;
1427dd52494dSmrg	  sparc*-*linux*)
1428dd52494dSmrg	    LD="${LD-ld} -m elf64_sparc"
1429dd52494dSmrg	    ;;
1430dd52494dSmrg	esac
1431dd52494dSmrg	;;
1432dd52494dSmrg    esac
1433dd52494dSmrg  fi
1434dd52494dSmrg  rm -rf conftest*
1435dd52494dSmrg  ;;
1436dd52494dSmrg
1437dd52494dSmrg*-*-sco3.2v5*)
1438dd52494dSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1439dd52494dSmrg  SAVE_CFLAGS=$CFLAGS
1440dd52494dSmrg  CFLAGS="$CFLAGS -belf"
1441dd52494dSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1442dd52494dSmrg    [AC_LANG_PUSH(C)
1443dd52494dSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1444dd52494dSmrg     AC_LANG_POP])
1445dd52494dSmrg  if test yes != "$lt_cv_cc_needs_belf"; then
1446dd52494dSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1447dd52494dSmrg    CFLAGS=$SAVE_CFLAGS
1448dd52494dSmrg  fi
1449dd52494dSmrg  ;;
1450dd52494dSmrg*-*solaris*)
1451dd52494dSmrg  # Find out what ABI is being produced by ac_compile, and set linker
1452dd52494dSmrg  # options accordingly.
1453dd52494dSmrg  echo 'int i;' > conftest.$ac_ext
1454dd52494dSmrg  if AC_TRY_EVAL(ac_compile); then
145533adc6acSmrg    case `$FILECMD conftest.o` in
1456dd52494dSmrg    *64-bit*)
1457dd52494dSmrg      case $lt_cv_prog_gnu_ld in
1458dd52494dSmrg      yes*)
1459dd52494dSmrg        case $host in
1460dd52494dSmrg        i?86-*-solaris*|x86_64-*-solaris*)
1461dd52494dSmrg          LD="${LD-ld} -m elf_x86_64"
1462dd52494dSmrg          ;;
1463dd52494dSmrg        sparc*-*-solaris*)
1464dd52494dSmrg          LD="${LD-ld} -m elf64_sparc"
1465dd52494dSmrg          ;;
1466dd52494dSmrg        esac
1467dd52494dSmrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
1468dd52494dSmrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1469dd52494dSmrg          LD=${LD-ld}_sol2
1470dd52494dSmrg        fi
1471dd52494dSmrg        ;;
1472dd52494dSmrg      *)
1473dd52494dSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1474dd52494dSmrg	  LD="${LD-ld} -64"
1475dd52494dSmrg	fi
1476dd52494dSmrg	;;
1477dd52494dSmrg      esac
1478dd52494dSmrg      ;;
1479dd52494dSmrg    esac
1480dd52494dSmrg  fi
1481dd52494dSmrg  rm -rf conftest*
1482dd52494dSmrg  ;;
1483dd52494dSmrgesac
1484dd52494dSmrg
1485dd52494dSmrgneed_locks=$enable_libtool_lock
1486dd52494dSmrg])# _LT_ENABLE_LOCK
1487dd52494dSmrg
1488dd52494dSmrg
1489dd52494dSmrg# _LT_PROG_AR
1490dd52494dSmrg# -----------
1491dd52494dSmrgm4_defun([_LT_PROG_AR],
1492dd52494dSmrg[AC_CHECK_TOOLS(AR, [ar], false)
1493dd52494dSmrg: ${AR=ar}
1494dd52494dSmrg_LT_DECL([], [AR], [1], [The archiver])
149533adc6acSmrg
149633adc6acSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with
149733adc6acSmrg# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
149833adc6acSmrg# higher priority because thats what people were doing historically (setting
149933adc6acSmrg# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
150033adc6acSmrg# variable obsoleted/removed.
150133adc6acSmrg
150233adc6acSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
150333adc6acSmrglt_ar_flags=$AR_FLAGS
150433adc6acSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
150533adc6acSmrg
150633adc6acSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
150733adc6acSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
150833adc6acSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
150933adc6acSmrg         [Flags to create an archive])
1510dd52494dSmrg
1511dd52494dSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1512dd52494dSmrg  [lt_cv_ar_at_file=no
1513dd52494dSmrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1514dd52494dSmrg     [echo conftest.$ac_objext > conftest.lst
1515dd52494dSmrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1516dd52494dSmrg      AC_TRY_EVAL([lt_ar_try])
1517dd52494dSmrg      if test 0 -eq "$ac_status"; then
1518dd52494dSmrg	# Ensure the archiver fails upon bogus file names.
1519dd52494dSmrg	rm -f conftest.$ac_objext libconftest.a
1520dd52494dSmrg	AC_TRY_EVAL([lt_ar_try])
1521dd52494dSmrg	if test 0 -ne "$ac_status"; then
1522dd52494dSmrg          lt_cv_ar_at_file=@
1523dd52494dSmrg        fi
1524dd52494dSmrg      fi
1525dd52494dSmrg      rm -f conftest.* libconftest.a
1526dd52494dSmrg     ])
1527dd52494dSmrg  ])
1528dd52494dSmrg
1529dd52494dSmrgif test no = "$lt_cv_ar_at_file"; then
1530dd52494dSmrg  archiver_list_spec=
1531dd52494dSmrgelse
1532dd52494dSmrg  archiver_list_spec=$lt_cv_ar_at_file
1533dd52494dSmrgfi
1534dd52494dSmrg_LT_DECL([], [archiver_list_spec], [1],
1535dd52494dSmrg  [How to feed a file listing to the archiver])
1536dd52494dSmrg])# _LT_PROG_AR
1537dd52494dSmrg
1538dd52494dSmrg
1539dd52494dSmrg# _LT_CMD_OLD_ARCHIVE
1540dd52494dSmrg# -------------------
1541dd52494dSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
1542dd52494dSmrg[_LT_PROG_AR
1543dd52494dSmrg
1544dd52494dSmrgAC_CHECK_TOOL(STRIP, strip, :)
1545dd52494dSmrgtest -z "$STRIP" && STRIP=:
1546dd52494dSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1547dd52494dSmrg
1548dd52494dSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
1549dd52494dSmrgtest -z "$RANLIB" && RANLIB=:
1550dd52494dSmrg_LT_DECL([], [RANLIB], [1],
1551dd52494dSmrg    [Commands used to install an old-style archive])
1552dd52494dSmrg
1553dd52494dSmrg# Determine commands to create old-style static archives.
1554dd52494dSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1555dd52494dSmrgold_postinstall_cmds='chmod 644 $oldlib'
1556dd52494dSmrgold_postuninstall_cmds=
1557dd52494dSmrg
1558dd52494dSmrgif test -n "$RANLIB"; then
1559dd52494dSmrg  case $host_os in
1560dd52494dSmrg  bitrig* | openbsd*)
1561dd52494dSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1562dd52494dSmrg    ;;
1563dd52494dSmrg  *)
1564dd52494dSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1565dd52494dSmrg    ;;
1566dd52494dSmrg  esac
1567dd52494dSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1568dd52494dSmrgfi
1569dd52494dSmrg
1570dd52494dSmrgcase $host_os in
1571dd52494dSmrg  darwin*)
1572dd52494dSmrg    lock_old_archive_extraction=yes ;;
1573dd52494dSmrg  *)
1574dd52494dSmrg    lock_old_archive_extraction=no ;;
1575dd52494dSmrgesac
1576dd52494dSmrg_LT_DECL([], [old_postinstall_cmds], [2])
1577dd52494dSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
1578dd52494dSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
1579dd52494dSmrg    [Commands used to build an old-style archive])
1580dd52494dSmrg_LT_DECL([], [lock_old_archive_extraction], [0],
1581dd52494dSmrg    [Whether to use a lock for old archive extraction])
1582dd52494dSmrg])# _LT_CMD_OLD_ARCHIVE
1583dd52494dSmrg
1584dd52494dSmrg
1585dd52494dSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1586dd52494dSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1587dd52494dSmrg# ----------------------------------------------------------------
1588dd52494dSmrg# Check whether the given compiler option works
1589dd52494dSmrgAC_DEFUN([_LT_COMPILER_OPTION],
1590dd52494dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1591dd52494dSmrgm4_require([_LT_DECL_SED])dnl
1592dd52494dSmrgAC_CACHE_CHECK([$1], [$2],
1593dd52494dSmrg  [$2=no
1594dd52494dSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1595dd52494dSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1596dd52494dSmrg   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
1597dd52494dSmrg   # Insert the option either (1) after the last *FLAGS variable, or
1598dd52494dSmrg   # (2) before a word containing "conftest.", or (3) at the end.
1599dd52494dSmrg   # Note that $ac_compile itself does not contain backslashes and begins
1600dd52494dSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1601dd52494dSmrg   # The option is referenced via a variable to avoid confusing sed.
1602dd52494dSmrg   lt_compile=`echo "$ac_compile" | $SED \
1603dd52494dSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1604dd52494dSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1605dd52494dSmrg   -e 's:$: $lt_compiler_flag:'`
1606dd52494dSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1607dd52494dSmrg   (eval "$lt_compile" 2>conftest.err)
1608dd52494dSmrg   ac_status=$?
1609dd52494dSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
1610dd52494dSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1611dd52494dSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
1612dd52494dSmrg     # The compiler can only warn and ignore the option if not recognized
1613dd52494dSmrg     # So say no if there are warnings other than the usual output.
1614dd52494dSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1615dd52494dSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1616dd52494dSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1617dd52494dSmrg       $2=yes
1618dd52494dSmrg     fi
1619dd52494dSmrg   fi
1620dd52494dSmrg   $RM conftest*
1621dd52494dSmrg])
1622dd52494dSmrg
1623dd52494dSmrgif test yes = "[$]$2"; then
1624dd52494dSmrg    m4_if([$5], , :, [$5])
1625dd52494dSmrgelse
1626dd52494dSmrg    m4_if([$6], , :, [$6])
1627dd52494dSmrgfi
1628dd52494dSmrg])# _LT_COMPILER_OPTION
1629dd52494dSmrg
1630dd52494dSmrg# Old name:
1631dd52494dSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1632dd52494dSmrgdnl aclocal-1.4 backwards compatibility:
1633dd52494dSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1634dd52494dSmrg
1635dd52494dSmrg
1636dd52494dSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1637dd52494dSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1638dd52494dSmrg# ----------------------------------------------------
1639dd52494dSmrg# Check whether the given linker option works
1640dd52494dSmrgAC_DEFUN([_LT_LINKER_OPTION],
1641dd52494dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1642dd52494dSmrgm4_require([_LT_DECL_SED])dnl
1643dd52494dSmrgAC_CACHE_CHECK([$1], [$2],
1644dd52494dSmrg  [$2=no
1645dd52494dSmrg   save_LDFLAGS=$LDFLAGS
1646dd52494dSmrg   LDFLAGS="$LDFLAGS $3"
1647dd52494dSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1648dd52494dSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1649dd52494dSmrg     # The linker can only warn and ignore the option if not recognized
1650dd52494dSmrg     # So say no if there are warnings
1651dd52494dSmrg     if test -s conftest.err; then
1652dd52494dSmrg       # Append any errors to the config.log.
1653dd52494dSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1654dd52494dSmrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1655dd52494dSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1656dd52494dSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
1657dd52494dSmrg         $2=yes
1658dd52494dSmrg       fi
1659dd52494dSmrg     else
1660dd52494dSmrg       $2=yes
1661dd52494dSmrg     fi
1662dd52494dSmrg   fi
1663dd52494dSmrg   $RM -r conftest*
1664dd52494dSmrg   LDFLAGS=$save_LDFLAGS
1665dd52494dSmrg])
1666dd52494dSmrg
1667dd52494dSmrgif test yes = "[$]$2"; then
1668dd52494dSmrg    m4_if([$4], , :, [$4])
1669dd52494dSmrgelse
1670dd52494dSmrg    m4_if([$5], , :, [$5])
1671dd52494dSmrgfi
1672dd52494dSmrg])# _LT_LINKER_OPTION
1673dd52494dSmrg
1674dd52494dSmrg# Old name:
1675dd52494dSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1676dd52494dSmrgdnl aclocal-1.4 backwards compatibility:
1677dd52494dSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1678dd52494dSmrg
1679dd52494dSmrg
1680dd52494dSmrg# LT_CMD_MAX_LEN
1681dd52494dSmrg#---------------
1682dd52494dSmrgAC_DEFUN([LT_CMD_MAX_LEN],
1683dd52494dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1684dd52494dSmrg# find the maximum length of command line arguments
1685dd52494dSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
1686dd52494dSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1687dd52494dSmrg  i=0
1688dd52494dSmrg  teststring=ABCD
1689dd52494dSmrg
1690dd52494dSmrg  case $build_os in
1691dd52494dSmrg  msdosdjgpp*)
1692dd52494dSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
1693dd52494dSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
1694dd52494dSmrg    # during glob expansion).  Even if it were fixed, the result of this
1695dd52494dSmrg    # check would be larger than it should be.
1696dd52494dSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1697dd52494dSmrg    ;;
1698dd52494dSmrg
1699dd52494dSmrg  gnu*)
1700dd52494dSmrg    # Under GNU Hurd, this test is not required because there is
1701dd52494dSmrg    # no limit to the length of command line arguments.
1702dd52494dSmrg    # Libtool will interpret -1 as no limit whatsoever
1703dd52494dSmrg    lt_cv_sys_max_cmd_len=-1;
1704dd52494dSmrg    ;;
1705dd52494dSmrg
1706dd52494dSmrg  cygwin* | mingw* | cegcc*)
1707dd52494dSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
1708dd52494dSmrg    # about 5 minutes as the teststring grows exponentially.
1709dd52494dSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
1710dd52494dSmrg    # you end up with a "frozen" computer, even though with patience
1711dd52494dSmrg    # the test eventually succeeds (with a max line length of 256k).
1712dd52494dSmrg    # Instead, let's just punt: use the minimum linelength reported by
1713dd52494dSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
1714dd52494dSmrg    lt_cv_sys_max_cmd_len=8192;
1715dd52494dSmrg    ;;
1716dd52494dSmrg
1717dd52494dSmrg  mint*)
1718dd52494dSmrg    # On MiNT this can take a long time and run out of memory.
1719dd52494dSmrg    lt_cv_sys_max_cmd_len=8192;
1720dd52494dSmrg    ;;
1721dd52494dSmrg
1722dd52494dSmrg  amigaos*)
1723dd52494dSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
1724dd52494dSmrg    # So we just punt and use a minimum line length of 8192.
1725dd52494dSmrg    lt_cv_sys_max_cmd_len=8192;
1726dd52494dSmrg    ;;
1727dd52494dSmrg
172833adc6acSmrg  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
1729dd52494dSmrg    # This has been around since 386BSD, at least.  Likely further.
1730dd52494dSmrg    if test -x /sbin/sysctl; then
1731dd52494dSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1732dd52494dSmrg    elif test -x /usr/sbin/sysctl; then
1733dd52494dSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1734dd52494dSmrg    else
1735dd52494dSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1736dd52494dSmrg    fi
1737dd52494dSmrg    # And add a safety zone
1738dd52494dSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1739dd52494dSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1740dd52494dSmrg    ;;
1741dd52494dSmrg
1742dd52494dSmrg  interix*)
1743dd52494dSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1744dd52494dSmrg    lt_cv_sys_max_cmd_len=196608
1745dd52494dSmrg    ;;
1746dd52494dSmrg
1747dd52494dSmrg  os2*)
1748dd52494dSmrg    # The test takes a long time on OS/2.
1749dd52494dSmrg    lt_cv_sys_max_cmd_len=8192
1750dd52494dSmrg    ;;
1751dd52494dSmrg
1752dd52494dSmrg  osf*)
1753dd52494dSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1754dd52494dSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1755dd52494dSmrg    # nice to cause kernel panics so lets avoid the loop below.
1756dd52494dSmrg    # First set a reasonable default.
1757dd52494dSmrg    lt_cv_sys_max_cmd_len=16384
1758dd52494dSmrg    #
1759dd52494dSmrg    if test -x /sbin/sysconfig; then
1760dd52494dSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1761dd52494dSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1762dd52494dSmrg      esac
1763dd52494dSmrg    fi
1764dd52494dSmrg    ;;
1765dd52494dSmrg  sco3.2v5*)
1766dd52494dSmrg    lt_cv_sys_max_cmd_len=102400
1767dd52494dSmrg    ;;
1768dd52494dSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
1769dd52494dSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1770dd52494dSmrg    if test -n "$kargmax"; then
177133adc6acSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
1772dd52494dSmrg    else
1773dd52494dSmrg      lt_cv_sys_max_cmd_len=32768
1774dd52494dSmrg    fi
1775dd52494dSmrg    ;;
1776dd52494dSmrg  *)
1777dd52494dSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1778dd52494dSmrg    if test -n "$lt_cv_sys_max_cmd_len" && \
1779dd52494dSmrg       test undefined != "$lt_cv_sys_max_cmd_len"; then
1780dd52494dSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1781dd52494dSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1782dd52494dSmrg    else
1783dd52494dSmrg      # Make teststring a little bigger before we do anything with it.
1784dd52494dSmrg      # a 1K string should be a reasonable start.
1785dd52494dSmrg      for i in 1 2 3 4 5 6 7 8; do
1786dd52494dSmrg        teststring=$teststring$teststring
1787dd52494dSmrg      done
1788dd52494dSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1789dd52494dSmrg      # If test is not a shell built-in, we'll probably end up computing a
1790dd52494dSmrg      # maximum length that is only half of the actual maximum length, but
1791dd52494dSmrg      # we can't tell.
1792dd52494dSmrg      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1793dd52494dSmrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1794dd52494dSmrg	      test 17 != "$i" # 1/2 MB should be enough
1795dd52494dSmrg      do
1796dd52494dSmrg        i=`expr $i + 1`
1797dd52494dSmrg        teststring=$teststring$teststring
1798dd52494dSmrg      done
1799dd52494dSmrg      # Only check the string length outside the loop.
1800dd52494dSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1801dd52494dSmrg      teststring=
1802dd52494dSmrg      # Add a significant safety factor because C++ compilers can tack on
1803dd52494dSmrg      # massive amounts of additional arguments before passing them to the
1804dd52494dSmrg      # linker.  It appears as though 1/2 is a usable value.
1805dd52494dSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1806dd52494dSmrg    fi
1807dd52494dSmrg    ;;
1808dd52494dSmrg  esac
1809dd52494dSmrg])
1810dd52494dSmrgif test -n "$lt_cv_sys_max_cmd_len"; then
1811dd52494dSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1812dd52494dSmrgelse
1813dd52494dSmrg  AC_MSG_RESULT(none)
1814dd52494dSmrgfi
1815dd52494dSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
1816dd52494dSmrg_LT_DECL([], [max_cmd_len], [0],
1817dd52494dSmrg    [What is the maximum length of a command?])
1818dd52494dSmrg])# LT_CMD_MAX_LEN
1819dd52494dSmrg
1820dd52494dSmrg# Old name:
1821dd52494dSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1822dd52494dSmrgdnl aclocal-1.4 backwards compatibility:
1823dd52494dSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1824dd52494dSmrg
1825dd52494dSmrg
1826dd52494dSmrg# _LT_HEADER_DLFCN
1827dd52494dSmrg# ----------------
1828dd52494dSmrgm4_defun([_LT_HEADER_DLFCN],
1829dd52494dSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1830dd52494dSmrg])# _LT_HEADER_DLFCN
1831dd52494dSmrg
1832dd52494dSmrg
1833dd52494dSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1834dd52494dSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1835dd52494dSmrg# ----------------------------------------------------------------
1836dd52494dSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
1837dd52494dSmrg[m4_require([_LT_HEADER_DLFCN])dnl
1838dd52494dSmrgif test yes = "$cross_compiling"; then :
1839dd52494dSmrg  [$4]
1840dd52494dSmrgelse
1841dd52494dSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1842dd52494dSmrg  lt_status=$lt_dlunknown
1843dd52494dSmrg  cat > conftest.$ac_ext <<_LT_EOF
1844dd52494dSmrg[#line $LINENO "configure"
1845dd52494dSmrg#include "confdefs.h"
1846dd52494dSmrg
1847dd52494dSmrg#if HAVE_DLFCN_H
1848dd52494dSmrg#include <dlfcn.h>
1849dd52494dSmrg#endif
1850dd52494dSmrg
1851dd52494dSmrg#include <stdio.h>
1852dd52494dSmrg
1853dd52494dSmrg#ifdef RTLD_GLOBAL
1854dd52494dSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
1855dd52494dSmrg#else
1856dd52494dSmrg#  ifdef DL_GLOBAL
1857dd52494dSmrg#    define LT_DLGLOBAL		DL_GLOBAL
1858dd52494dSmrg#  else
1859dd52494dSmrg#    define LT_DLGLOBAL		0
1860dd52494dSmrg#  endif
1861dd52494dSmrg#endif
1862dd52494dSmrg
1863dd52494dSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1864dd52494dSmrg   find out it does not work in some platform. */
1865dd52494dSmrg#ifndef LT_DLLAZY_OR_NOW
1866dd52494dSmrg#  ifdef RTLD_LAZY
1867dd52494dSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1868dd52494dSmrg#  else
1869dd52494dSmrg#    ifdef DL_LAZY
1870dd52494dSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
1871dd52494dSmrg#    else
1872dd52494dSmrg#      ifdef RTLD_NOW
1873dd52494dSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1874dd52494dSmrg#      else
1875dd52494dSmrg#        ifdef DL_NOW
1876dd52494dSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
1877dd52494dSmrg#        else
1878dd52494dSmrg#          define LT_DLLAZY_OR_NOW	0
1879dd52494dSmrg#        endif
1880dd52494dSmrg#      endif
1881dd52494dSmrg#    endif
1882dd52494dSmrg#  endif
1883dd52494dSmrg#endif
1884dd52494dSmrg
1885dd52494dSmrg/* When -fvisibility=hidden is used, assume the code has been annotated
1886dd52494dSmrg   correspondingly for the symbols needed.  */
1887dd52494dSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1888dd52494dSmrgint fnord () __attribute__((visibility("default")));
1889dd52494dSmrg#endif
1890dd52494dSmrg
1891dd52494dSmrgint fnord () { return 42; }
1892dd52494dSmrgint main ()
1893dd52494dSmrg{
1894dd52494dSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1895dd52494dSmrg  int status = $lt_dlunknown;
1896dd52494dSmrg
1897dd52494dSmrg  if (self)
1898dd52494dSmrg    {
1899dd52494dSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1900dd52494dSmrg      else
1901dd52494dSmrg        {
1902dd52494dSmrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
1903dd52494dSmrg          else puts (dlerror ());
1904dd52494dSmrg	}
1905dd52494dSmrg      /* dlclose (self); */
1906dd52494dSmrg    }
1907dd52494dSmrg  else
1908dd52494dSmrg    puts (dlerror ());
1909dd52494dSmrg
1910dd52494dSmrg  return status;
1911dd52494dSmrg}]
1912dd52494dSmrg_LT_EOF
1913dd52494dSmrg  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
1914dd52494dSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1915dd52494dSmrg    lt_status=$?
1916dd52494dSmrg    case x$lt_status in
1917dd52494dSmrg      x$lt_dlno_uscore) $1 ;;
1918dd52494dSmrg      x$lt_dlneed_uscore) $2 ;;
1919dd52494dSmrg      x$lt_dlunknown|x*) $3 ;;
1920dd52494dSmrg    esac
1921dd52494dSmrg  else :
1922dd52494dSmrg    # compilation failed
1923dd52494dSmrg    $3
1924dd52494dSmrg  fi
1925dd52494dSmrgfi
1926dd52494dSmrgrm -fr conftest*
1927dd52494dSmrg])# _LT_TRY_DLOPEN_SELF
1928dd52494dSmrg
1929dd52494dSmrg
1930dd52494dSmrg# LT_SYS_DLOPEN_SELF
1931dd52494dSmrg# ------------------
1932dd52494dSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
1933dd52494dSmrg[m4_require([_LT_HEADER_DLFCN])dnl
1934dd52494dSmrgif test yes != "$enable_dlopen"; then
1935dd52494dSmrg  enable_dlopen=unknown
1936dd52494dSmrg  enable_dlopen_self=unknown
1937dd52494dSmrg  enable_dlopen_self_static=unknown
1938dd52494dSmrgelse
1939dd52494dSmrg  lt_cv_dlopen=no
1940dd52494dSmrg  lt_cv_dlopen_libs=
1941dd52494dSmrg
1942dd52494dSmrg  case $host_os in
1943dd52494dSmrg  beos*)
1944dd52494dSmrg    lt_cv_dlopen=load_add_on
1945dd52494dSmrg    lt_cv_dlopen_libs=
1946dd52494dSmrg    lt_cv_dlopen_self=yes
1947dd52494dSmrg    ;;
1948dd52494dSmrg
1949dd52494dSmrg  mingw* | pw32* | cegcc*)
1950dd52494dSmrg    lt_cv_dlopen=LoadLibrary
1951dd52494dSmrg    lt_cv_dlopen_libs=
1952dd52494dSmrg    ;;
1953dd52494dSmrg
1954dd52494dSmrg  cygwin*)
1955dd52494dSmrg    lt_cv_dlopen=dlopen
1956dd52494dSmrg    lt_cv_dlopen_libs=
1957dd52494dSmrg    ;;
1958dd52494dSmrg
1959dd52494dSmrg  darwin*)
1960dd52494dSmrg    # if libdl is installed we need to link against it
1961dd52494dSmrg    AC_CHECK_LIB([dl], [dlopen],
1962dd52494dSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1963dd52494dSmrg    lt_cv_dlopen=dyld
1964dd52494dSmrg    lt_cv_dlopen_libs=
1965dd52494dSmrg    lt_cv_dlopen_self=yes
1966dd52494dSmrg    ])
1967dd52494dSmrg    ;;
1968dd52494dSmrg
1969dd52494dSmrg  tpf*)
1970dd52494dSmrg    # Don't try to run any link tests for TPF.  We know it's impossible
1971dd52494dSmrg    # because TPF is a cross-compiler, and we know how we open DSOs.
1972dd52494dSmrg    lt_cv_dlopen=dlopen
1973dd52494dSmrg    lt_cv_dlopen_libs=
1974dd52494dSmrg    lt_cv_dlopen_self=no
1975dd52494dSmrg    ;;
1976dd52494dSmrg
1977dd52494dSmrg  *)
1978dd52494dSmrg    AC_CHECK_FUNC([shl_load],
1979dd52494dSmrg	  [lt_cv_dlopen=shl_load],
1980dd52494dSmrg      [AC_CHECK_LIB([dld], [shl_load],
1981dd52494dSmrg	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
1982dd52494dSmrg	[AC_CHECK_FUNC([dlopen],
1983dd52494dSmrg	      [lt_cv_dlopen=dlopen],
1984dd52494dSmrg	  [AC_CHECK_LIB([dl], [dlopen],
1985dd52494dSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
1986dd52494dSmrg	    [AC_CHECK_LIB([svld], [dlopen],
1987dd52494dSmrg		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
1988dd52494dSmrg	      [AC_CHECK_LIB([dld], [dld_link],
1989dd52494dSmrg		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
1990dd52494dSmrg	      ])
1991dd52494dSmrg	    ])
1992dd52494dSmrg	  ])
1993dd52494dSmrg	])
1994dd52494dSmrg      ])
1995dd52494dSmrg    ;;
1996dd52494dSmrg  esac
1997dd52494dSmrg
1998dd52494dSmrg  if test no = "$lt_cv_dlopen"; then
1999dd52494dSmrg    enable_dlopen=no
2000dd52494dSmrg  else
2001dd52494dSmrg    enable_dlopen=yes
2002dd52494dSmrg  fi
2003dd52494dSmrg
2004dd52494dSmrg  case $lt_cv_dlopen in
2005dd52494dSmrg  dlopen)
2006dd52494dSmrg    save_CPPFLAGS=$CPPFLAGS
2007dd52494dSmrg    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2008dd52494dSmrg
2009dd52494dSmrg    save_LDFLAGS=$LDFLAGS
2010dd52494dSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2011dd52494dSmrg
2012dd52494dSmrg    save_LIBS=$LIBS
2013dd52494dSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
2014dd52494dSmrg
2015dd52494dSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
2016dd52494dSmrg	  lt_cv_dlopen_self, [dnl
2017dd52494dSmrg	  _LT_TRY_DLOPEN_SELF(
2018dd52494dSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2019dd52494dSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2020dd52494dSmrg    ])
2021dd52494dSmrg
2022dd52494dSmrg    if test yes = "$lt_cv_dlopen_self"; then
2023dd52494dSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2024dd52494dSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2025dd52494dSmrg	  lt_cv_dlopen_self_static, [dnl
2026dd52494dSmrg	  _LT_TRY_DLOPEN_SELF(
2027dd52494dSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2028dd52494dSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2029dd52494dSmrg      ])
2030dd52494dSmrg    fi
2031dd52494dSmrg
2032dd52494dSmrg    CPPFLAGS=$save_CPPFLAGS
2033dd52494dSmrg    LDFLAGS=$save_LDFLAGS
2034dd52494dSmrg    LIBS=$save_LIBS
2035dd52494dSmrg    ;;
2036dd52494dSmrg  esac
2037dd52494dSmrg
2038dd52494dSmrg  case $lt_cv_dlopen_self in
2039dd52494dSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2040dd52494dSmrg  *) enable_dlopen_self=unknown ;;
2041dd52494dSmrg  esac
2042dd52494dSmrg
2043dd52494dSmrg  case $lt_cv_dlopen_self_static in
2044dd52494dSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2045dd52494dSmrg  *) enable_dlopen_self_static=unknown ;;
2046dd52494dSmrg  esac
2047dd52494dSmrgfi
2048dd52494dSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
2049dd52494dSmrg	 [Whether dlopen is supported])
2050dd52494dSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2051dd52494dSmrg	 [Whether dlopen of programs is supported])
2052dd52494dSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2053dd52494dSmrg	 [Whether dlopen of statically linked programs is supported])
2054dd52494dSmrg])# LT_SYS_DLOPEN_SELF
2055dd52494dSmrg
2056dd52494dSmrg# Old name:
2057dd52494dSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2058dd52494dSmrgdnl aclocal-1.4 backwards compatibility:
2059dd52494dSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2060dd52494dSmrg
2061dd52494dSmrg
2062dd52494dSmrg# _LT_COMPILER_C_O([TAGNAME])
2063dd52494dSmrg# ---------------------------
2064dd52494dSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
2065dd52494dSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2066dd52494dSmrgm4_defun([_LT_COMPILER_C_O],
2067dd52494dSmrg[m4_require([_LT_DECL_SED])dnl
2068dd52494dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2069dd52494dSmrgm4_require([_LT_TAG_COMPILER])dnl
2070dd52494dSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2071dd52494dSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2072dd52494dSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2073dd52494dSmrg   $RM -r conftest 2>/dev/null
2074dd52494dSmrg   mkdir conftest
2075dd52494dSmrg   cd conftest
2076dd52494dSmrg   mkdir out
2077dd52494dSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2078dd52494dSmrg
2079dd52494dSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
2080dd52494dSmrg   # Insert the option either (1) after the last *FLAGS variable, or
2081dd52494dSmrg   # (2) before a word containing "conftest.", or (3) at the end.
2082dd52494dSmrg   # Note that $ac_compile itself does not contain backslashes and begins
2083dd52494dSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
2084dd52494dSmrg   lt_compile=`echo "$ac_compile" | $SED \
2085dd52494dSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2086dd52494dSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2087dd52494dSmrg   -e 's:$: $lt_compiler_flag:'`
2088dd52494dSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2089dd52494dSmrg   (eval "$lt_compile" 2>out/conftest.err)
2090dd52494dSmrg   ac_status=$?
2091dd52494dSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2092dd52494dSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2093dd52494dSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2094dd52494dSmrg   then
2095dd52494dSmrg     # The compiler can only warn and ignore the option if not recognized
2096dd52494dSmrg     # So say no if there are warnings
2097dd52494dSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2098dd52494dSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2099dd52494dSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2100dd52494dSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2101dd52494dSmrg     fi
2102dd52494dSmrg   fi
2103dd52494dSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2104dd52494dSmrg   $RM conftest*
2105dd52494dSmrg   # SGI C++ compiler will create directory out/ii_files/ for
2106dd52494dSmrg   # template instantiation
2107dd52494dSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2108dd52494dSmrg   $RM out/* && rmdir out
2109dd52494dSmrg   cd ..
2110dd52494dSmrg   $RM -r conftest
2111dd52494dSmrg   $RM conftest*
2112dd52494dSmrg])
2113dd52494dSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2114dd52494dSmrg	[Does compiler simultaneously support -c and -o options?])
2115dd52494dSmrg])# _LT_COMPILER_C_O
2116dd52494dSmrg
2117dd52494dSmrg
2118dd52494dSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2119dd52494dSmrg# ----------------------------------
2120dd52494dSmrg# Check to see if we can do hard links to lock some files if needed
2121dd52494dSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
2122dd52494dSmrg[m4_require([_LT_ENABLE_LOCK])dnl
2123dd52494dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2124dd52494dSmrg_LT_COMPILER_C_O([$1])
2125dd52494dSmrg
2126dd52494dSmrghard_links=nottested
2127dd52494dSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2128dd52494dSmrg  # do not overwrite the value of need_locks provided by the user
2129dd52494dSmrg  AC_MSG_CHECKING([if we can lock with hard links])
2130dd52494dSmrg  hard_links=yes
2131dd52494dSmrg  $RM conftest*
2132dd52494dSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2133dd52494dSmrg  touch conftest.a
2134dd52494dSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
2135dd52494dSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2136dd52494dSmrg  AC_MSG_RESULT([$hard_links])
2137dd52494dSmrg  if test no = "$hard_links"; then
2138dd52494dSmrg    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2139dd52494dSmrg    need_locks=warn
2140dd52494dSmrg  fi
2141dd52494dSmrgelse
2142dd52494dSmrg  need_locks=no
2143dd52494dSmrgfi
2144dd52494dSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2145dd52494dSmrg])# _LT_COMPILER_FILE_LOCKS
2146dd52494dSmrg
2147dd52494dSmrg
2148dd52494dSmrg# _LT_CHECK_OBJDIR
2149dd52494dSmrg# ----------------
2150dd52494dSmrgm4_defun([_LT_CHECK_OBJDIR],
2151dd52494dSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2152dd52494dSmrg[rm -f .libs 2>/dev/null
2153dd52494dSmrgmkdir .libs 2>/dev/null
2154dd52494dSmrgif test -d .libs; then
2155dd52494dSmrg  lt_cv_objdir=.libs
2156dd52494dSmrgelse
2157dd52494dSmrg  # MS-DOS does not allow filenames that begin with a dot.
2158dd52494dSmrg  lt_cv_objdir=_libs
2159dd52494dSmrgfi
2160dd52494dSmrgrmdir .libs 2>/dev/null])
2161dd52494dSmrgobjdir=$lt_cv_objdir
2162dd52494dSmrg_LT_DECL([], [objdir], [0],
2163dd52494dSmrg         [The name of the directory that contains temporary libtool files])dnl
2164dd52494dSmrgm4_pattern_allow([LT_OBJDIR])dnl
2165dd52494dSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2166dd52494dSmrg  [Define to the sub-directory where libtool stores uninstalled libraries.])
2167dd52494dSmrg])# _LT_CHECK_OBJDIR
2168dd52494dSmrg
2169dd52494dSmrg
2170dd52494dSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2171dd52494dSmrg# --------------------------------------
2172dd52494dSmrg# Check hardcoding attributes.
2173dd52494dSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2174dd52494dSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
2175dd52494dSmrg_LT_TAGVAR(hardcode_action, $1)=
2176dd52494dSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2177dd52494dSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2178dd52494dSmrg   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2179dd52494dSmrg
2180dd52494dSmrg  # We can hardcode non-existent directories.
2181dd52494dSmrg  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2182dd52494dSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2183dd52494dSmrg     # have to relink, otherwise we might link with an installed library
2184dd52494dSmrg     # when we should be linking with a yet-to-be-installed one
2185dd52494dSmrg     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2186dd52494dSmrg     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2187dd52494dSmrg    # Linking always hardcodes the temporary library directory.
2188dd52494dSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
2189dd52494dSmrg  else
2190dd52494dSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2191dd52494dSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
2192dd52494dSmrg  fi
2193dd52494dSmrgelse
2194dd52494dSmrg  # We cannot hardcode anything, or else we can only hardcode existing
2195dd52494dSmrg  # directories.
2196dd52494dSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
2197dd52494dSmrgfi
2198dd52494dSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2199dd52494dSmrg
2200dd52494dSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2201dd52494dSmrg   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2202dd52494dSmrg  # Fast installation is not supported
2203dd52494dSmrg  enable_fast_install=no
2204dd52494dSmrgelif test yes = "$shlibpath_overrides_runpath" ||
2205dd52494dSmrg     test no = "$enable_shared"; then
2206dd52494dSmrg  # Fast installation is not necessary
2207dd52494dSmrg  enable_fast_install=needless
2208dd52494dSmrgfi
2209dd52494dSmrg_LT_TAGDECL([], [hardcode_action], [0],
2210dd52494dSmrg    [How to hardcode a shared library path into an executable])
2211dd52494dSmrg])# _LT_LINKER_HARDCODE_LIBPATH
2212dd52494dSmrg
2213dd52494dSmrg
2214dd52494dSmrg# _LT_CMD_STRIPLIB
2215dd52494dSmrg# ----------------
2216dd52494dSmrgm4_defun([_LT_CMD_STRIPLIB],
2217dd52494dSmrg[m4_require([_LT_DECL_EGREP])
2218dd52494dSmrgstriplib=
2219dd52494dSmrgold_striplib=
2220dd52494dSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
222133adc6acSmrgif test -z "$STRIP"; then
222233adc6acSmrg  AC_MSG_RESULT([no])
2223dd52494dSmrgelse
222433adc6acSmrg  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
222533adc6acSmrg    old_striplib="$STRIP --strip-debug"
222633adc6acSmrg    striplib="$STRIP --strip-unneeded"
222733adc6acSmrg    AC_MSG_RESULT([yes])
222833adc6acSmrg  else
222933adc6acSmrg    case $host_os in
223033adc6acSmrg    darwin*)
223133adc6acSmrg      # FIXME - insert some real tests, host_os isn't really good enough
2232dd52494dSmrg      striplib="$STRIP -x"
2233dd52494dSmrg      old_striplib="$STRIP -S"
2234dd52494dSmrg      AC_MSG_RESULT([yes])
223533adc6acSmrg      ;;
223633adc6acSmrg    freebsd*)
223733adc6acSmrg      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
223833adc6acSmrg        old_striplib="$STRIP --strip-debug"
223933adc6acSmrg        striplib="$STRIP --strip-unneeded"
224033adc6acSmrg        AC_MSG_RESULT([yes])
224133adc6acSmrg      else
224233adc6acSmrg        AC_MSG_RESULT([no])
224333adc6acSmrg      fi
224433adc6acSmrg      ;;
224533adc6acSmrg    *)
2246dd52494dSmrg      AC_MSG_RESULT([no])
224733adc6acSmrg      ;;
224833adc6acSmrg    esac
224933adc6acSmrg  fi
2250dd52494dSmrgfi
2251dd52494dSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2252dd52494dSmrg_LT_DECL([], [striplib], [1])
2253dd52494dSmrg])# _LT_CMD_STRIPLIB
2254dd52494dSmrg
2255dd52494dSmrg
2256dd52494dSmrg# _LT_PREPARE_MUNGE_PATH_LIST
2257dd52494dSmrg# ---------------------------
2258dd52494dSmrg# Make sure func_munge_path_list() is defined correctly.
2259dd52494dSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2260dd52494dSmrg[[# func_munge_path_list VARIABLE PATH
2261dd52494dSmrg# -----------------------------------
2262dd52494dSmrg# VARIABLE is name of variable containing _space_ separated list of
2263dd52494dSmrg# directories to be munged by the contents of PATH, which is string
2264dd52494dSmrg# having a format:
2265dd52494dSmrg# "DIR[:DIR]:"
2266dd52494dSmrg#       string "DIR[ DIR]" will be prepended to VARIABLE
2267dd52494dSmrg# ":DIR[:DIR]"
2268dd52494dSmrg#       string "DIR[ DIR]" will be appended to VARIABLE
2269dd52494dSmrg# "DIRP[:DIRP]::[DIRA:]DIRA"
2270dd52494dSmrg#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2271dd52494dSmrg#       "DIRA[ DIRA]" will be appended to VARIABLE
2272dd52494dSmrg# "DIR[:DIR]"
2273dd52494dSmrg#       VARIABLE will be replaced by "DIR[ DIR]"
2274dd52494dSmrgfunc_munge_path_list ()
2275dd52494dSmrg{
2276dd52494dSmrg    case x@S|@2 in
2277dd52494dSmrg    x)
2278dd52494dSmrg        ;;
2279dd52494dSmrg    *:)
2280dd52494dSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2281dd52494dSmrg        ;;
2282dd52494dSmrg    x:*)
2283dd52494dSmrg        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2284dd52494dSmrg        ;;
2285dd52494dSmrg    *::*)
2286dd52494dSmrg        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2287dd52494dSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2288dd52494dSmrg        ;;
2289dd52494dSmrg    *)
2290dd52494dSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2291dd52494dSmrg        ;;
2292dd52494dSmrg    esac
2293dd52494dSmrg}
2294dd52494dSmrg]])# _LT_PREPARE_PATH_LIST
2295dd52494dSmrg
2296dd52494dSmrg
2297dd52494dSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
2298dd52494dSmrg# -----------------------------
2299dd52494dSmrg# PORTME Fill in your ld.so characteristics
2300dd52494dSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
2301dd52494dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2302dd52494dSmrgm4_require([_LT_DECL_EGREP])dnl
2303dd52494dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
2304dd52494dSmrgm4_require([_LT_DECL_OBJDUMP])dnl
2305dd52494dSmrgm4_require([_LT_DECL_SED])dnl
2306dd52494dSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
2307dd52494dSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2308dd52494dSmrgAC_MSG_CHECKING([dynamic linker characteristics])
2309dd52494dSmrgm4_if([$1],
2310dd52494dSmrg	[], [
2311dd52494dSmrgif test yes = "$GCC"; then
2312dd52494dSmrg  case $host_os in
2313dd52494dSmrg    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2314dd52494dSmrg    *) lt_awk_arg='/^libraries:/' ;;
2315dd52494dSmrg  esac
2316dd52494dSmrg  case $host_os in
2317dd52494dSmrg    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2318dd52494dSmrg    *) lt_sed_strip_eq='s|=/|/|g' ;;
2319dd52494dSmrg  esac
2320dd52494dSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2321dd52494dSmrg  case $lt_search_path_spec in
2322dd52494dSmrg  *\;*)
2323dd52494dSmrg    # if the path contains ";" then we assume it to be the separator
2324dd52494dSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
2325dd52494dSmrg    # assumed that no part of a normal pathname contains ";" but that should
2326dd52494dSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
2327dd52494dSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2328dd52494dSmrg    ;;
2329dd52494dSmrg  *)
2330dd52494dSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2331dd52494dSmrg    ;;
2332dd52494dSmrg  esac
2333dd52494dSmrg  # Ok, now we have the path, separated by spaces, we can step through it
2334dd52494dSmrg  # and add multilib dir if necessary...
2335dd52494dSmrg  lt_tmp_lt_search_path_spec=
2336dd52494dSmrg  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2337dd52494dSmrg  # ...but if some path component already ends with the multilib dir we assume
2338dd52494dSmrg  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2339dd52494dSmrg  case "$lt_multi_os_dir; $lt_search_path_spec " in
2340dd52494dSmrg  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2341dd52494dSmrg    lt_multi_os_dir=
2342dd52494dSmrg    ;;
2343dd52494dSmrg  esac
2344dd52494dSmrg  for lt_sys_path in $lt_search_path_spec; do
2345dd52494dSmrg    if test -d "$lt_sys_path$lt_multi_os_dir"; then
2346dd52494dSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2347dd52494dSmrg    elif test -n "$lt_multi_os_dir"; then
2348dd52494dSmrg      test -d "$lt_sys_path" && \
2349dd52494dSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2350dd52494dSmrg    fi
2351dd52494dSmrg  done
2352dd52494dSmrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2353dd52494dSmrgBEGIN {RS = " "; FS = "/|\n";} {
2354dd52494dSmrg  lt_foo = "";
2355dd52494dSmrg  lt_count = 0;
2356dd52494dSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
2357dd52494dSmrg    if ($lt_i != "" && $lt_i != ".") {
2358dd52494dSmrg      if ($lt_i == "..") {
2359dd52494dSmrg        lt_count++;
2360dd52494dSmrg      } else {
2361dd52494dSmrg        if (lt_count == 0) {
2362dd52494dSmrg          lt_foo = "/" $lt_i lt_foo;
2363dd52494dSmrg        } else {
2364dd52494dSmrg          lt_count--;
2365dd52494dSmrg        }
2366dd52494dSmrg      }
2367dd52494dSmrg    }
2368dd52494dSmrg  }
2369dd52494dSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2370dd52494dSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2371dd52494dSmrg}'`
2372dd52494dSmrg  # AWK program above erroneously prepends '/' to C:/dos/paths
2373dd52494dSmrg  # for these hosts.
2374dd52494dSmrg  case $host_os in
2375dd52494dSmrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2376dd52494dSmrg      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2377dd52494dSmrg  esac
2378dd52494dSmrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2379dd52494dSmrgelse
2380dd52494dSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2381dd52494dSmrgfi])
2382dd52494dSmrglibrary_names_spec=
2383dd52494dSmrglibname_spec='lib$name'
2384dd52494dSmrgsoname_spec=
2385dd52494dSmrgshrext_cmds=.so
2386dd52494dSmrgpostinstall_cmds=
2387dd52494dSmrgpostuninstall_cmds=
2388dd52494dSmrgfinish_cmds=
2389dd52494dSmrgfinish_eval=
2390dd52494dSmrgshlibpath_var=
2391dd52494dSmrgshlibpath_overrides_runpath=unknown
2392dd52494dSmrgversion_type=none
2393dd52494dSmrgdynamic_linker="$host_os ld.so"
2394dd52494dSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
2395dd52494dSmrgneed_lib_prefix=unknown
2396dd52494dSmrghardcode_into_libs=no
2397dd52494dSmrg
2398dd52494dSmrg# when you set need_version to no, make sure it does not cause -set_version
2399dd52494dSmrg# flags to be left without arguments
2400dd52494dSmrgneed_version=unknown
2401dd52494dSmrg
2402dd52494dSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2403dd52494dSmrg[User-defined run-time library search path.])
2404dd52494dSmrg
2405dd52494dSmrgcase $host_os in
2406dd52494dSmrgaix3*)
2407dd52494dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2408dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2409dd52494dSmrg  shlibpath_var=LIBPATH
2410dd52494dSmrg
2411dd52494dSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
2412dd52494dSmrg  soname_spec='$libname$release$shared_ext$major'
2413dd52494dSmrg  ;;
2414dd52494dSmrg
2415dd52494dSmrgaix[[4-9]]*)
2416dd52494dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2417dd52494dSmrg  need_lib_prefix=no
2418dd52494dSmrg  need_version=no
2419dd52494dSmrg  hardcode_into_libs=yes
2420dd52494dSmrg  if test ia64 = "$host_cpu"; then
2421dd52494dSmrg    # AIX 5 supports IA64
2422dd52494dSmrg    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2423dd52494dSmrg    shlibpath_var=LD_LIBRARY_PATH
2424dd52494dSmrg  else
2425dd52494dSmrg    # With GCC up to 2.95.x, collect2 would create an import file
2426dd52494dSmrg    # for dependence libraries.  The import file would start with
2427dd52494dSmrg    # the line '#! .'.  This would cause the generated library to
2428dd52494dSmrg    # depend on '.', always an invalid library.  This was fixed in
2429dd52494dSmrg    # development snapshots of GCC prior to 3.0.
2430dd52494dSmrg    case $host_os in
2431dd52494dSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
2432dd52494dSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2433dd52494dSmrg	   echo ' yes '
2434dd52494dSmrg	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2435dd52494dSmrg	:
2436dd52494dSmrg      else
2437dd52494dSmrg	can_build_shared=no
2438dd52494dSmrg      fi
2439dd52494dSmrg      ;;
2440dd52494dSmrg    esac
2441dd52494dSmrg    # Using Import Files as archive members, it is possible to support
2442dd52494dSmrg    # filename-based versioning of shared library archives on AIX. While
2443dd52494dSmrg    # this would work for both with and without runtime linking, it will
2444dd52494dSmrg    # prevent static linking of such archives. So we do filename-based
2445dd52494dSmrg    # shared library versioning with .so extension only, which is used
2446dd52494dSmrg    # when both runtime linking and shared linking is enabled.
2447dd52494dSmrg    # Unfortunately, runtime linking may impact performance, so we do
2448dd52494dSmrg    # not want this to be the default eventually. Also, we use the
2449dd52494dSmrg    # versioned .so libs for executables only if there is the -brtl
2450dd52494dSmrg    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2451dd52494dSmrg    # To allow for filename-based versioning support, we need to create
2452dd52494dSmrg    # libNAME.so.V as an archive file, containing:
2453dd52494dSmrg    # *) an Import File, referring to the versioned filename of the
2454dd52494dSmrg    #    archive as well as the shared archive member, telling the
2455dd52494dSmrg    #    bitwidth (32 or 64) of that shared object, and providing the
2456dd52494dSmrg    #    list of exported symbols of that shared object, eventually
2457dd52494dSmrg    #    decorated with the 'weak' keyword
2458dd52494dSmrg    # *) the shared object with the F_LOADONLY flag set, to really avoid
2459dd52494dSmrg    #    it being seen by the linker.
2460dd52494dSmrg    # At run time we better use the real file rather than another symlink,
2461dd52494dSmrg    # but for link time we create the symlink libNAME.so -> libNAME.so.V
2462dd52494dSmrg
2463dd52494dSmrg    case $with_aix_soname,$aix_use_runtimelinking in
2464dd52494dSmrg    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2465dd52494dSmrg    # soname into executable. Probably we can add versioning support to
2466dd52494dSmrg    # collect2, so additional links can be useful in future.
2467dd52494dSmrg    aix,yes) # traditional libtool
2468dd52494dSmrg      dynamic_linker='AIX unversionable lib.so'
2469dd52494dSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2470dd52494dSmrg      # instead of lib<name>.a to let people know that these are not
2471dd52494dSmrg      # typical AIX shared libraries.
2472dd52494dSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2473dd52494dSmrg      ;;
2474dd52494dSmrg    aix,no) # traditional AIX only
2475dd52494dSmrg      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2476dd52494dSmrg      # We preserve .a as extension for shared libraries through AIX4.2
2477dd52494dSmrg      # and later when we are not doing run time linking.
2478dd52494dSmrg      library_names_spec='$libname$release.a $libname.a'
2479dd52494dSmrg      soname_spec='$libname$release$shared_ext$major'
2480dd52494dSmrg      ;;
2481dd52494dSmrg    svr4,*) # full svr4 only
2482dd52494dSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2483dd52494dSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2484dd52494dSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
2485dd52494dSmrg      shlibpath_overrides_runpath=yes
2486dd52494dSmrg      ;;
2487dd52494dSmrg    *,yes) # both, prefer svr4
2488dd52494dSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2489dd52494dSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2490dd52494dSmrg      # unpreferred sharedlib libNAME.a needs extra handling
2491dd52494dSmrg      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"'
2492dd52494dSmrg      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"'
2493dd52494dSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
2494dd52494dSmrg      shlibpath_overrides_runpath=yes
2495dd52494dSmrg      ;;
2496dd52494dSmrg    *,no) # both, prefer aix
2497dd52494dSmrg      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2498dd52494dSmrg      library_names_spec='$libname$release.a $libname.a'
2499dd52494dSmrg      soname_spec='$libname$release$shared_ext$major'
2500dd52494dSmrg      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2501dd52494dSmrg      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)'
2502dd52494dSmrg      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"'
2503dd52494dSmrg      ;;
2504dd52494dSmrg    esac
2505dd52494dSmrg    shlibpath_var=LIBPATH
2506dd52494dSmrg  fi
2507dd52494dSmrg  ;;
2508dd52494dSmrg
2509dd52494dSmrgamigaos*)
2510dd52494dSmrg  case $host_cpu in
2511dd52494dSmrg  powerpc)
2512dd52494dSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
2513dd52494dSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2514dd52494dSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2515dd52494dSmrg    ;;
2516dd52494dSmrg  m68k)
2517dd52494dSmrg    library_names_spec='$libname.ixlibrary $libname.a'
2518dd52494dSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2519dd52494dSmrg    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'
2520dd52494dSmrg    ;;
2521dd52494dSmrg  esac
2522dd52494dSmrg  ;;
2523dd52494dSmrg
2524dd52494dSmrgbeos*)
2525dd52494dSmrg  library_names_spec='$libname$shared_ext'
2526dd52494dSmrg  dynamic_linker="$host_os ld.so"
2527dd52494dSmrg  shlibpath_var=LIBRARY_PATH
2528dd52494dSmrg  ;;
2529dd52494dSmrg
2530dd52494dSmrgbsdi[[45]]*)
2531dd52494dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2532dd52494dSmrg  need_version=no
2533dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2534dd52494dSmrg  soname_spec='$libname$release$shared_ext$major'
2535dd52494dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2536dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
2537dd52494dSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2538dd52494dSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2539dd52494dSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
2540dd52494dSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2541dd52494dSmrg  # libtool to hard-code these into programs
2542dd52494dSmrg  ;;
2543dd52494dSmrg
2544dd52494dSmrgcygwin* | mingw* | pw32* | cegcc*)
2545dd52494dSmrg  version_type=windows
2546dd52494dSmrg  shrext_cmds=.dll
2547dd52494dSmrg  need_version=no
2548dd52494dSmrg  need_lib_prefix=no
2549dd52494dSmrg
2550dd52494dSmrg  case $GCC,$cc_basename in
2551dd52494dSmrg  yes,*)
2552dd52494dSmrg    # gcc
2553dd52494dSmrg    library_names_spec='$libname.dll.a'
2554dd52494dSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2555dd52494dSmrg    postinstall_cmds='base_file=`basename \$file`~
2556dd52494dSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2557dd52494dSmrg      dldir=$destdir/`dirname \$dlpath`~
2558dd52494dSmrg      test -d \$dldir || mkdir -p \$dldir~
2559dd52494dSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
2560dd52494dSmrg      chmod a+x \$dldir/$dlname~
2561dd52494dSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2562dd52494dSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2563dd52494dSmrg      fi'
2564dd52494dSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2565dd52494dSmrg      dlpath=$dir/\$dldll~
2566dd52494dSmrg       $RM \$dlpath'
2567dd52494dSmrg    shlibpath_overrides_runpath=yes
2568dd52494dSmrg
2569dd52494dSmrg    case $host_os in
2570dd52494dSmrg    cygwin*)
2571dd52494dSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
257233adc6acSmrg      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2573dd52494dSmrgm4_if([$1], [],[
2574dd52494dSmrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2575dd52494dSmrg      ;;
2576dd52494dSmrg    mingw* | cegcc*)
2577dd52494dSmrg      # MinGW DLLs use traditional 'lib' prefix
2578dd52494dSmrg      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2579dd52494dSmrg      ;;
2580dd52494dSmrg    pw32*)
2581dd52494dSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
258233adc6acSmrg      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2583dd52494dSmrg      ;;
2584dd52494dSmrg    esac
2585dd52494dSmrg    dynamic_linker='Win32 ld.exe'
2586dd52494dSmrg    ;;
2587dd52494dSmrg
258833adc6acSmrg  *,cl* | *,icl*)
258933adc6acSmrg    # Native MSVC or ICC
2590dd52494dSmrg    libname_spec='$name'
2591dd52494dSmrg    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2592dd52494dSmrg    library_names_spec='$libname.dll.lib'
2593dd52494dSmrg
2594dd52494dSmrg    case $build_os in
2595dd52494dSmrg    mingw*)
2596dd52494dSmrg      sys_lib_search_path_spec=
2597dd52494dSmrg      lt_save_ifs=$IFS
2598dd52494dSmrg      IFS=';'
2599dd52494dSmrg      for lt_path in $LIB
2600dd52494dSmrg      do
2601dd52494dSmrg        IFS=$lt_save_ifs
2602dd52494dSmrg        # Let DOS variable expansion print the short 8.3 style file name.
2603dd52494dSmrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2604dd52494dSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2605dd52494dSmrg      done
2606dd52494dSmrg      IFS=$lt_save_ifs
2607dd52494dSmrg      # Convert to MSYS style.
260833adc6acSmrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2609dd52494dSmrg      ;;
2610dd52494dSmrg    cygwin*)
2611dd52494dSmrg      # Convert to unix form, then to dos form, then back to unix form
2612dd52494dSmrg      # but this time dos style (no spaces!) so that the unix form looks
2613dd52494dSmrg      # like /cygdrive/c/PROGRA~1:/cygdr...
2614dd52494dSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2615dd52494dSmrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2616dd52494dSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2617dd52494dSmrg      ;;
2618dd52494dSmrg    *)
2619dd52494dSmrg      sys_lib_search_path_spec=$LIB
2620dd52494dSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2621dd52494dSmrg        # It is most probably a Windows format PATH.
2622dd52494dSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2623dd52494dSmrg      else
2624dd52494dSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2625dd52494dSmrg      fi
2626dd52494dSmrg      # FIXME: find the short name or the path components, as spaces are
2627dd52494dSmrg      # common. (e.g. "Program Files" -> "PROGRA~1")
2628dd52494dSmrg      ;;
2629dd52494dSmrg    esac
2630dd52494dSmrg
2631dd52494dSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2632dd52494dSmrg    postinstall_cmds='base_file=`basename \$file`~
2633dd52494dSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2634dd52494dSmrg      dldir=$destdir/`dirname \$dlpath`~
2635dd52494dSmrg      test -d \$dldir || mkdir -p \$dldir~
2636dd52494dSmrg      $install_prog $dir/$dlname \$dldir/$dlname'
2637dd52494dSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2638dd52494dSmrg      dlpath=$dir/\$dldll~
2639dd52494dSmrg       $RM \$dlpath'
2640dd52494dSmrg    shlibpath_overrides_runpath=yes
2641dd52494dSmrg    dynamic_linker='Win32 link.exe'
2642dd52494dSmrg    ;;
2643dd52494dSmrg
2644dd52494dSmrg  *)
264533adc6acSmrg    # Assume MSVC and ICC wrapper
2646dd52494dSmrg    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2647dd52494dSmrg    dynamic_linker='Win32 ld.exe'
2648dd52494dSmrg    ;;
2649dd52494dSmrg  esac
2650dd52494dSmrg  # FIXME: first we should search . and the directory the executable is in
2651dd52494dSmrg  shlibpath_var=PATH
2652dd52494dSmrg  ;;
2653dd52494dSmrg
2654dd52494dSmrgdarwin* | rhapsody*)
2655dd52494dSmrg  dynamic_linker="$host_os dyld"
2656dd52494dSmrg  version_type=darwin
2657dd52494dSmrg  need_lib_prefix=no
2658dd52494dSmrg  need_version=no
265992405695Smrg  library_names_spec='$libname$release$versuffix$shared_ext $libname$release$major$shared_ext $libname$shared_ext'
2660dd52494dSmrg  soname_spec='$libname$release$major$shared_ext'
2661dd52494dSmrg  shlibpath_overrides_runpath=yes
2662dd52494dSmrg  shlibpath_var=DYLD_LIBRARY_PATH
266392405695Smrg  shrext_cmds='`test .$module = .yes && echo .bundle || echo .dylib`'
2664dd52494dSmrgm4_if([$1], [],[
2665dd52494dSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2666dd52494dSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2667dd52494dSmrg  ;;
2668dd52494dSmrg
2669dd52494dSmrgdgux*)
2670dd52494dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2671dd52494dSmrg  need_lib_prefix=no
2672dd52494dSmrg  need_version=no
2673dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2674dd52494dSmrg  soname_spec='$libname$release$shared_ext$major'
2675dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
2676dd52494dSmrg  ;;
2677dd52494dSmrg
267833adc6acSmrgfreebsd* | dragonfly* | midnightbsd*)
2679dd52494dSmrg  # DragonFly does not have aout.  When/if they implement a new
2680dd52494dSmrg  # versioning mechanism, adjust this.
2681dd52494dSmrg  if test -x /usr/bin/objformat; then
2682dd52494dSmrg    objformat=`/usr/bin/objformat`
2683dd52494dSmrg  else
2684dd52494dSmrg    case $host_os in
2685dd52494dSmrg    freebsd[[23]].*) objformat=aout ;;
2686dd52494dSmrg    *) objformat=elf ;;
2687dd52494dSmrg    esac
2688dd52494dSmrg  fi
2689dd52494dSmrg  # Handle Gentoo/FreeBSD as it was Linux
2690dd52494dSmrg  case $host_vendor in
2691dd52494dSmrg    gentoo)
2692dd52494dSmrg      version_type=linux ;;
2693dd52494dSmrg    *)
2694dd52494dSmrg      version_type=freebsd-$objformat ;;
2695dd52494dSmrg  esac
2696dd52494dSmrg
2697dd52494dSmrg  case $version_type in
2698dd52494dSmrg    freebsd-elf*)
2699dd52494dSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2700dd52494dSmrg      soname_spec='$libname$release$shared_ext$major'
2701dd52494dSmrg      need_version=no
2702dd52494dSmrg      need_lib_prefix=no
2703dd52494dSmrg      ;;
2704dd52494dSmrg    freebsd-*)
2705dd52494dSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2706dd52494dSmrg      need_version=yes
2707dd52494dSmrg      ;;
2708dd52494dSmrg    linux)
2709dd52494dSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2710dd52494dSmrg      soname_spec='${libname}${release}${shared_ext}$major'
2711dd52494dSmrg      need_lib_prefix=no
2712dd52494dSmrg      need_version=no
2713dd52494dSmrg      ;;
2714dd52494dSmrg  esac
2715dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
2716dd52494dSmrg  case $host_os in
2717dd52494dSmrg  freebsd2.*)
2718dd52494dSmrg    shlibpath_overrides_runpath=yes
2719dd52494dSmrg    ;;
2720dd52494dSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2721dd52494dSmrg    shlibpath_overrides_runpath=yes
2722dd52494dSmrg    hardcode_into_libs=yes
2723dd52494dSmrg    ;;
2724dd52494dSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2725dd52494dSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2726dd52494dSmrg    shlibpath_overrides_runpath=no
2727dd52494dSmrg    hardcode_into_libs=yes
2728dd52494dSmrg    ;;
2729dd52494dSmrg  *) # from 4.6 on, and DragonFly
2730dd52494dSmrg    shlibpath_overrides_runpath=yes
2731dd52494dSmrg    hardcode_into_libs=yes
2732dd52494dSmrg    ;;
2733dd52494dSmrg  esac
2734dd52494dSmrg  ;;
2735dd52494dSmrg
2736dd52494dSmrghaiku*)
2737dd52494dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2738dd52494dSmrg  need_lib_prefix=no
2739dd52494dSmrg  need_version=no
2740dd52494dSmrg  dynamic_linker="$host_os runtime_loader"
2741dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2742dd52494dSmrg  soname_spec='$libname$release$shared_ext$major'
2743dd52494dSmrg  shlibpath_var=LIBRARY_PATH
2744dd52494dSmrg  shlibpath_overrides_runpath=no
2745dd52494dSmrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2746dd52494dSmrg  hardcode_into_libs=yes
2747dd52494dSmrg  ;;
2748dd52494dSmrg
2749dd52494dSmrghpux9* | hpux10* | hpux11*)
2750dd52494dSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
2751dd52494dSmrg  # link against other versions.
2752dd52494dSmrg  version_type=sunos
2753dd52494dSmrg  need_lib_prefix=no
2754dd52494dSmrg  need_version=no
2755dd52494dSmrg  case $host_cpu in
2756dd52494dSmrg  ia64*)
2757dd52494dSmrg    shrext_cmds='.so'
2758dd52494dSmrg    hardcode_into_libs=yes
2759dd52494dSmrg    dynamic_linker="$host_os dld.so"
2760dd52494dSmrg    shlibpath_var=LD_LIBRARY_PATH
2761dd52494dSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2762dd52494dSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2763dd52494dSmrg    soname_spec='$libname$release$shared_ext$major'
2764dd52494dSmrg    if test 32 = "$HPUX_IA64_MODE"; then
2765dd52494dSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2766dd52494dSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2767dd52494dSmrg    else
2768dd52494dSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2769dd52494dSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2770dd52494dSmrg    fi
2771dd52494dSmrg    ;;
2772dd52494dSmrg  hppa*64*)
2773dd52494dSmrg    shrext_cmds='.sl'
2774dd52494dSmrg    hardcode_into_libs=yes
2775dd52494dSmrg    dynamic_linker="$host_os dld.sl"
2776dd52494dSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2777dd52494dSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2778dd52494dSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2779dd52494dSmrg    soname_spec='$libname$release$shared_ext$major'
2780dd52494dSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2781dd52494dSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2782dd52494dSmrg    ;;
2783dd52494dSmrg  *)
2784dd52494dSmrg    shrext_cmds='.sl'
2785dd52494dSmrg    dynamic_linker="$host_os dld.sl"
2786dd52494dSmrg    shlibpath_var=SHLIB_PATH
2787dd52494dSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2788dd52494dSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2789dd52494dSmrg    soname_spec='$libname$release$shared_ext$major'
2790dd52494dSmrg    ;;
2791dd52494dSmrg  esac
2792dd52494dSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2793dd52494dSmrg  postinstall_cmds='chmod 555 $lib'
2794dd52494dSmrg  # or fails outright, so override atomically:
2795dd52494dSmrg  install_override_mode=555
2796dd52494dSmrg  ;;
2797dd52494dSmrg
2798dd52494dSmrginterix[[3-9]]*)
2799dd52494dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2800dd52494dSmrg  need_lib_prefix=no
2801dd52494dSmrg  need_version=no
2802dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2803dd52494dSmrg  soname_spec='$libname$release$shared_ext$major'
2804dd52494dSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2805dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
2806dd52494dSmrg  shlibpath_overrides_runpath=no
2807dd52494dSmrg  hardcode_into_libs=yes
2808dd52494dSmrg  ;;
2809dd52494dSmrg
2810dd52494dSmrgirix5* | irix6* | nonstopux*)
2811dd52494dSmrg  case $host_os in
2812dd52494dSmrg    nonstopux*) version_type=nonstopux ;;
2813dd52494dSmrg    *)
2814dd52494dSmrg	if test yes = "$lt_cv_prog_gnu_ld"; then
2815dd52494dSmrg		version_type=linux # correct to gnu/linux during the next big refactor
2816dd52494dSmrg	else
2817dd52494dSmrg		version_type=irix
2818dd52494dSmrg	fi ;;
2819dd52494dSmrg  esac
2820dd52494dSmrg  need_lib_prefix=no
2821dd52494dSmrg  need_version=no
2822dd52494dSmrg  soname_spec='$libname$release$shared_ext$major'
2823dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
2824dd52494dSmrg  case $host_os in
2825dd52494dSmrg  irix5* | nonstopux*)
2826dd52494dSmrg    libsuff= shlibsuff=
2827dd52494dSmrg    ;;
2828dd52494dSmrg  *)
2829dd52494dSmrg    case $LD in # libtool.m4 will add one of these switches to LD
2830dd52494dSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2831dd52494dSmrg      libsuff= shlibsuff= libmagic=32-bit;;
2832dd52494dSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2833dd52494dSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
2834dd52494dSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2835dd52494dSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2836dd52494dSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
2837dd52494dSmrg    esac
2838dd52494dSmrg    ;;
2839dd52494dSmrg  esac
2840dd52494dSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2841dd52494dSmrg  shlibpath_overrides_runpath=no
2842dd52494dSmrg  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2843dd52494dSmrg  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
2844dd52494dSmrg  hardcode_into_libs=yes
2845dd52494dSmrg  ;;
2846dd52494dSmrg
2847dd52494dSmrg# No shared lib support for Linux oldld, aout, or coff.
2848dd52494dSmrglinux*oldld* | linux*aout* | linux*coff*)
2849dd52494dSmrg  dynamic_linker=no
2850dd52494dSmrg  ;;
2851dd52494dSmrg
2852dd52494dSmrglinux*android*)
2853dd52494dSmrg  version_type=none # Android doesn't support versioned libraries.
2854dd52494dSmrg  need_lib_prefix=no
2855dd52494dSmrg  need_version=no
2856dd52494dSmrg  library_names_spec='$libname$release$shared_ext'
2857dd52494dSmrg  soname_spec='$libname$release$shared_ext'
2858dd52494dSmrg  finish_cmds=
2859dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
2860dd52494dSmrg  shlibpath_overrides_runpath=yes
2861dd52494dSmrg
2862dd52494dSmrg  # This implies no fast_install, which is unacceptable.
2863dd52494dSmrg  # Some rework will be needed to allow for fast_install
2864dd52494dSmrg  # before this can be enabled.
2865dd52494dSmrg  hardcode_into_libs=yes
2866dd52494dSmrg
2867dd52494dSmrg  dynamic_linker='Android linker'
2868dd52494dSmrg  # Don't embed -rpath directories since the linker doesn't support them.
2869dd52494dSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2870dd52494dSmrg  ;;
2871dd52494dSmrg
2872dd52494dSmrg# This must be glibc/ELF.
2873dd52494dSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2874dd52494dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2875dd52494dSmrg  need_lib_prefix=no
2876dd52494dSmrg  need_version=no
2877dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2878dd52494dSmrg  soname_spec='$libname$release$shared_ext$major'
2879dd52494dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2880dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
2881dd52494dSmrg  shlibpath_overrides_runpath=no
2882dd52494dSmrg
2883dd52494dSmrg  # Some binutils ld are patched to set DT_RUNPATH
2884dd52494dSmrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2885dd52494dSmrg    [lt_cv_shlibpath_overrides_runpath=no
2886dd52494dSmrg    save_LDFLAGS=$LDFLAGS
2887dd52494dSmrg    save_libdir=$libdir
2888dd52494dSmrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2889dd52494dSmrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2890dd52494dSmrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2891dd52494dSmrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2892dd52494dSmrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
2893dd52494dSmrg    LDFLAGS=$save_LDFLAGS
2894dd52494dSmrg    libdir=$save_libdir
2895dd52494dSmrg    ])
2896dd52494dSmrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2897dd52494dSmrg
2898dd52494dSmrg  # This implies no fast_install, which is unacceptable.
2899dd52494dSmrg  # Some rework will be needed to allow for fast_install
2900dd52494dSmrg  # before this can be enabled.
2901dd52494dSmrg  hardcode_into_libs=yes
2902dd52494dSmrg
2903dd52494dSmrg  # Ideally, we could use ldconfig to report *all* directores which are
2904dd52494dSmrg  # searched for libraries, however this is still not possible.  Aside from not
2905dd52494dSmrg  # being certain /sbin/ldconfig is available, command
2906dd52494dSmrg  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2907dd52494dSmrg  # even though it is searched at run-time.  Try to do the best guess by
2908dd52494dSmrg  # appending ld.so.conf contents (and includes) to the search path.
2909dd52494dSmrg  if test -f /etc/ld.so.conf; then
2910dd52494dSmrg    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' ' '`
2911dd52494dSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2912dd52494dSmrg  fi
2913dd52494dSmrg
2914dd52494dSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
2915dd52494dSmrg  # powerpc, because MkLinux only supported shared libraries with the
2916dd52494dSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
2917dd52494dSmrg  # most powerpc-linux boxes support dynamic linking these days and
2918dd52494dSmrg  # people can always --disable-shared, the test was removed, and we
2919dd52494dSmrg  # assume the GNU/Linux dynamic linker is in use.
2920dd52494dSmrg  dynamic_linker='GNU/Linux ld.so'
2921dd52494dSmrg  ;;
2922dd52494dSmrg
2923dd52494dSmrgnetbsd*)
2924dd52494dSmrg  version_type=sunos
2925dd52494dSmrg  need_lib_prefix=no
2926dd52494dSmrg  need_version=no
2927dd52494dSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2928dd52494dSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2929dd52494dSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2930dd52494dSmrg    dynamic_linker='NetBSD (a.out) ld.so'
2931dd52494dSmrg  else
2932dd52494dSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2933dd52494dSmrg    soname_spec='$libname$release$shared_ext$major'
2934dd52494dSmrg    dynamic_linker='NetBSD ld.elf_so'
2935dd52494dSmrg  fi
2936dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
2937dd52494dSmrg  shlibpath_overrides_runpath=yes
2938dd52494dSmrg  hardcode_into_libs=yes
2939dd52494dSmrg  ;;
2940dd52494dSmrg
2941dd52494dSmrgnewsos6)
2942dd52494dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
2943dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2944dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
2945dd52494dSmrg  shlibpath_overrides_runpath=yes
2946dd52494dSmrg  ;;
2947dd52494dSmrg
2948dd52494dSmrg*nto* | *qnx*)
2949dd52494dSmrg  version_type=qnx
2950dd52494dSmrg  need_lib_prefix=no
2951dd52494dSmrg  need_version=no
2952dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2953dd52494dSmrg  soname_spec='$libname$release$shared_ext$major'
2954dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
2955dd52494dSmrg  shlibpath_overrides_runpath=no
2956dd52494dSmrg  hardcode_into_libs=yes
2957dd52494dSmrg  dynamic_linker='ldqnx.so'
2958dd52494dSmrg  ;;
2959dd52494dSmrg
2960dd52494dSmrgopenbsd* | bitrig*)
2961dd52494dSmrg  version_type=sunos
2962dd52494dSmrg  sys_lib_dlsearch_path_spec=/usr/lib
2963dd52494dSmrg  need_lib_prefix=no
2964dd52494dSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2965dd52494dSmrg    need_version=no
2966dd52494dSmrg  else
2967dd52494dSmrg    need_version=yes
2968dd52494dSmrg  fi
2969dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2970dd52494dSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2971dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
2972dd52494dSmrg  shlibpath_overrides_runpath=yes
2973dd52494dSmrg  ;;
2974dd52494dSmrg
2975dd52494dSmrgos2*)
2976dd52494dSmrg  libname_spec='$name'
2977dd52494dSmrg  version_type=windows
2978dd52494dSmrg  shrext_cmds=.dll
2979dd52494dSmrg  need_version=no
2980dd52494dSmrg  need_lib_prefix=no
2981dd52494dSmrg  # OS/2 can only load a DLL with a base name of 8 characters or less.
2982dd52494dSmrg  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2983dd52494dSmrg    v=$($ECHO $release$versuffix | tr -d .-);
2984dd52494dSmrg    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2985dd52494dSmrg    $ECHO $n$v`$shared_ext'
2986dd52494dSmrg  library_names_spec='${libname}_dll.$libext'
2987dd52494dSmrg  dynamic_linker='OS/2 ld.exe'
2988dd52494dSmrg  shlibpath_var=BEGINLIBPATH
2989dd52494dSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2990dd52494dSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2991dd52494dSmrg  postinstall_cmds='base_file=`basename \$file`~
2992dd52494dSmrg    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2993dd52494dSmrg    dldir=$destdir/`dirname \$dlpath`~
2994dd52494dSmrg    test -d \$dldir || mkdir -p \$dldir~
2995dd52494dSmrg    $install_prog $dir/$dlname \$dldir/$dlname~
2996dd52494dSmrg    chmod a+x \$dldir/$dlname~
2997dd52494dSmrg    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2998dd52494dSmrg      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2999dd52494dSmrg    fi'
3000dd52494dSmrg  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
3001dd52494dSmrg    dlpath=$dir/\$dldll~
3002dd52494dSmrg    $RM \$dlpath'
3003dd52494dSmrg  ;;
3004dd52494dSmrg
3005dd52494dSmrgosf3* | osf4* | osf5*)
3006dd52494dSmrg  version_type=osf
3007dd52494dSmrg  need_lib_prefix=no
3008dd52494dSmrg  need_version=no
3009dd52494dSmrg  soname_spec='$libname$release$shared_ext$major'
3010dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3011dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
3012dd52494dSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3013dd52494dSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3014dd52494dSmrg  ;;
3015dd52494dSmrg
3016dd52494dSmrgrdos*)
3017dd52494dSmrg  dynamic_linker=no
3018dd52494dSmrg  ;;
3019dd52494dSmrg
3020dd52494dSmrgsolaris*)
3021dd52494dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
3022dd52494dSmrg  need_lib_prefix=no
3023dd52494dSmrg  need_version=no
3024dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3025dd52494dSmrg  soname_spec='$libname$release$shared_ext$major'
3026dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
3027dd52494dSmrg  shlibpath_overrides_runpath=yes
3028dd52494dSmrg  hardcode_into_libs=yes
3029dd52494dSmrg  # ldd complains unless libraries are executable
3030dd52494dSmrg  postinstall_cmds='chmod +x $lib'
3031dd52494dSmrg  ;;
3032dd52494dSmrg
3033dd52494dSmrgsunos4*)
3034dd52494dSmrg  version_type=sunos
3035dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3036dd52494dSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3037dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
3038dd52494dSmrg  shlibpath_overrides_runpath=yes
3039dd52494dSmrg  if test yes = "$with_gnu_ld"; then
3040dd52494dSmrg    need_lib_prefix=no
3041dd52494dSmrg  fi
3042dd52494dSmrg  need_version=yes
3043dd52494dSmrg  ;;
3044dd52494dSmrg
3045dd52494dSmrgsysv4 | sysv4.3*)
3046dd52494dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
3047dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3048dd52494dSmrg  soname_spec='$libname$release$shared_ext$major'
3049dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
3050dd52494dSmrg  case $host_vendor in
3051dd52494dSmrg    sni)
3052dd52494dSmrg      shlibpath_overrides_runpath=no
3053dd52494dSmrg      need_lib_prefix=no
3054dd52494dSmrg      runpath_var=LD_RUN_PATH
3055dd52494dSmrg      ;;
3056dd52494dSmrg    siemens)
3057dd52494dSmrg      need_lib_prefix=no
3058dd52494dSmrg      ;;
3059dd52494dSmrg    motorola)
3060dd52494dSmrg      need_lib_prefix=no
3061dd52494dSmrg      need_version=no
3062dd52494dSmrg      shlibpath_overrides_runpath=no
3063dd52494dSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3064dd52494dSmrg      ;;
3065dd52494dSmrg  esac
3066dd52494dSmrg  ;;
3067dd52494dSmrg
3068dd52494dSmrgsysv4*MP*)
3069dd52494dSmrg  if test -d /usr/nec; then
3070dd52494dSmrg    version_type=linux # correct to gnu/linux during the next big refactor
3071dd52494dSmrg    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3072dd52494dSmrg    soname_spec='$libname$shared_ext.$major'
3073dd52494dSmrg    shlibpath_var=LD_LIBRARY_PATH
3074dd52494dSmrg  fi
3075dd52494dSmrg  ;;
3076dd52494dSmrg
3077dd52494dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3078dd52494dSmrg  version_type=sco
3079dd52494dSmrg  need_lib_prefix=no
3080dd52494dSmrg  need_version=no
3081dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3082dd52494dSmrg  soname_spec='$libname$release$shared_ext$major'
3083dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
3084dd52494dSmrg  shlibpath_overrides_runpath=yes
3085dd52494dSmrg  hardcode_into_libs=yes
3086dd52494dSmrg  if test yes = "$with_gnu_ld"; then
3087dd52494dSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3088dd52494dSmrg  else
3089dd52494dSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3090dd52494dSmrg    case $host_os in
3091dd52494dSmrg      sco3.2v5*)
3092dd52494dSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3093dd52494dSmrg	;;
3094dd52494dSmrg    esac
3095dd52494dSmrg  fi
3096dd52494dSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
3097dd52494dSmrg  ;;
3098dd52494dSmrg
3099dd52494dSmrgtpf*)
3100dd52494dSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3101dd52494dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
3102dd52494dSmrg  need_lib_prefix=no
3103dd52494dSmrg  need_version=no
3104dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3105dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
3106dd52494dSmrg  shlibpath_overrides_runpath=no
3107dd52494dSmrg  hardcode_into_libs=yes
3108dd52494dSmrg  ;;
3109dd52494dSmrg
3110dd52494dSmrguts4*)
3111dd52494dSmrg  version_type=linux # correct to gnu/linux during the next big refactor
3112dd52494dSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3113dd52494dSmrg  soname_spec='$libname$release$shared_ext$major'
3114dd52494dSmrg  shlibpath_var=LD_LIBRARY_PATH
3115dd52494dSmrg  ;;
3116dd52494dSmrg
3117dd52494dSmrg*)
3118dd52494dSmrg  dynamic_linker=no
3119dd52494dSmrg  ;;
3120dd52494dSmrgesac
3121dd52494dSmrgAC_MSG_RESULT([$dynamic_linker])
3122dd52494dSmrgtest no = "$dynamic_linker" && can_build_shared=no
3123dd52494dSmrg
3124dd52494dSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3125dd52494dSmrgif test yes = "$GCC"; then
3126dd52494dSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3127dd52494dSmrgfi
3128dd52494dSmrg
3129dd52494dSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3130dd52494dSmrg  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3131dd52494dSmrgfi
3132dd52494dSmrg
3133dd52494dSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3134dd52494dSmrg  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3135dd52494dSmrgfi
3136dd52494dSmrg
3137dd52494dSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3138dd52494dSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3139dd52494dSmrg
3140dd52494dSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3141dd52494dSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3142dd52494dSmrg
3143dd52494dSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3144dd52494dSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3145dd52494dSmrg
3146dd52494dSmrg_LT_DECL([], [variables_saved_for_relink], [1],
3147dd52494dSmrg    [Variables whose values should be saved in libtool wrapper scripts and
3148dd52494dSmrg    restored at link time])
3149dd52494dSmrg_LT_DECL([], [need_lib_prefix], [0],
3150dd52494dSmrg    [Do we need the "lib" prefix for modules?])
3151dd52494dSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3152dd52494dSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
3153dd52494dSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3154dd52494dSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3155dd52494dSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
3156dd52494dSmrg    [Is shlibpath searched before the hard-coded library search path?])
3157dd52494dSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3158dd52494dSmrg_LT_DECL([], [library_names_spec], [1],
3159dd52494dSmrg    [[List of archive names.  First name is the real one, the rest are links.
3160dd52494dSmrg    The last name is the one that the linker finds with -lNAME]])
3161dd52494dSmrg_LT_DECL([], [soname_spec], [1],
3162dd52494dSmrg    [[The coded name of the library, if different from the real name]])
3163dd52494dSmrg_LT_DECL([], [install_override_mode], [1],
3164dd52494dSmrg    [Permission mode override for installation of shared libraries])
3165dd52494dSmrg_LT_DECL([], [postinstall_cmds], [2],
3166dd52494dSmrg    [Command to use after installation of a shared archive])
3167dd52494dSmrg_LT_DECL([], [postuninstall_cmds], [2],
3168dd52494dSmrg    [Command to use after uninstallation of a shared archive])
3169dd52494dSmrg_LT_DECL([], [finish_cmds], [2],
3170dd52494dSmrg    [Commands used to finish a libtool library installation in a directory])
3171dd52494dSmrg_LT_DECL([], [finish_eval], [1],
3172dd52494dSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
3173dd52494dSmrg    not shown]])
3174dd52494dSmrg_LT_DECL([], [hardcode_into_libs], [0],
3175dd52494dSmrg    [Whether we should hardcode library paths into libraries])
3176dd52494dSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
3177dd52494dSmrg    [Compile-time system search path for libraries])
3178dd52494dSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3179dd52494dSmrg    [Detected run-time system search path for libraries])
3180dd52494dSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2],
3181dd52494dSmrg    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3182dd52494dSmrg])# _LT_SYS_DYNAMIC_LINKER
3183dd52494dSmrg
3184dd52494dSmrg
3185dd52494dSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
3186dd52494dSmrg# --------------------------
3187dd52494dSmrg# find a file program that can recognize shared library
3188dd52494dSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
3189dd52494dSmrg[m4_require([_LT_DECL_EGREP])dnl
3190dd52494dSmrgAC_MSG_CHECKING([for $1])
3191dd52494dSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3192dd52494dSmrg[case $MAGIC_CMD in
3193dd52494dSmrg[[\\/*] |  ?:[\\/]*])
3194dd52494dSmrg  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3195dd52494dSmrg  ;;
3196dd52494dSmrg*)
3197dd52494dSmrg  lt_save_MAGIC_CMD=$MAGIC_CMD
3198dd52494dSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3199dd52494dSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
3200dd52494dSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
3201dd52494dSmrgdnl not every word.  This closes a longstanding sh security hole.
3202dd52494dSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
3203dd52494dSmrg  for ac_dir in $ac_dummy; do
3204dd52494dSmrg    IFS=$lt_save_ifs
3205dd52494dSmrg    test -z "$ac_dir" && ac_dir=.
3206dd52494dSmrg    if test -f "$ac_dir/$1"; then
3207dd52494dSmrg      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3208dd52494dSmrg      if test -n "$file_magic_test_file"; then
3209dd52494dSmrg	case $deplibs_check_method in
3210dd52494dSmrg	"file_magic "*)
3211dd52494dSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3212dd52494dSmrg	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3213dd52494dSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3214dd52494dSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
3215dd52494dSmrg	    :
3216dd52494dSmrg	  else
3217dd52494dSmrg	    cat <<_LT_EOF 1>&2
3218dd52494dSmrg
3219dd52494dSmrg*** Warning: the command libtool uses to detect shared libraries,
3220dd52494dSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
3221dd52494dSmrg*** The result is that libtool may fail to recognize shared libraries
3222dd52494dSmrg*** as such.  This will affect the creation of libtool libraries that
3223dd52494dSmrg*** depend on shared libraries, but programs linked with such libtool
3224dd52494dSmrg*** libraries will work regardless of this problem.  Nevertheless, you
3225dd52494dSmrg*** may want to report the problem to your system manager and/or to
3226dd52494dSmrg*** bug-libtool@gnu.org
3227dd52494dSmrg
3228dd52494dSmrg_LT_EOF
3229dd52494dSmrg	  fi ;;
3230dd52494dSmrg	esac
3231dd52494dSmrg      fi
3232dd52494dSmrg      break
3233dd52494dSmrg    fi
3234dd52494dSmrg  done
3235dd52494dSmrg  IFS=$lt_save_ifs
3236dd52494dSmrg  MAGIC_CMD=$lt_save_MAGIC_CMD
3237dd52494dSmrg  ;;
3238dd52494dSmrgesac])
3239dd52494dSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD
3240dd52494dSmrgif test -n "$MAGIC_CMD"; then
3241dd52494dSmrg  AC_MSG_RESULT($MAGIC_CMD)
3242dd52494dSmrgelse
3243dd52494dSmrg  AC_MSG_RESULT(no)
3244dd52494dSmrgfi
3245dd52494dSmrg_LT_DECL([], [MAGIC_CMD], [0],
3246dd52494dSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3247dd52494dSmrg])# _LT_PATH_TOOL_PREFIX
3248dd52494dSmrg
3249dd52494dSmrg# Old name:
3250dd52494dSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3251dd52494dSmrgdnl aclocal-1.4 backwards compatibility:
3252dd52494dSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3253dd52494dSmrg
3254dd52494dSmrg
3255dd52494dSmrg# _LT_PATH_MAGIC
3256dd52494dSmrg# --------------
3257dd52494dSmrg# find a file program that can recognize a shared library
3258dd52494dSmrgm4_defun([_LT_PATH_MAGIC],
3259dd52494dSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3260dd52494dSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
3261dd52494dSmrg  if test -n "$ac_tool_prefix"; then
3262dd52494dSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3263dd52494dSmrg  else
3264dd52494dSmrg    MAGIC_CMD=:
3265dd52494dSmrg  fi
3266dd52494dSmrgfi
3267dd52494dSmrg])# _LT_PATH_MAGIC
3268dd52494dSmrg
3269dd52494dSmrg
3270dd52494dSmrg# LT_PATH_LD
3271dd52494dSmrg# ----------
3272dd52494dSmrg# find the pathname to the GNU or non-GNU linker
3273dd52494dSmrgAC_DEFUN([LT_PATH_LD],
3274dd52494dSmrg[AC_REQUIRE([AC_PROG_CC])dnl
3275dd52494dSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
3276dd52494dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
3277dd52494dSmrgm4_require([_LT_DECL_SED])dnl
3278dd52494dSmrgm4_require([_LT_DECL_EGREP])dnl
3279dd52494dSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3280dd52494dSmrg
3281dd52494dSmrgAC_ARG_WITH([gnu-ld],
3282dd52494dSmrg    [AS_HELP_STRING([--with-gnu-ld],
3283dd52494dSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3284dd52494dSmrg    [test no = "$withval" || with_gnu_ld=yes],
3285dd52494dSmrg    [with_gnu_ld=no])dnl
3286dd52494dSmrg
3287dd52494dSmrgac_prog=ld
3288dd52494dSmrgif test yes = "$GCC"; then
3289dd52494dSmrg  # Check if gcc -print-prog-name=ld gives a path.
3290dd52494dSmrg  AC_MSG_CHECKING([for ld used by $CC])
3291dd52494dSmrg  case $host in
3292dd52494dSmrg  *-*-mingw*)
3293dd52494dSmrg    # gcc leaves a trailing carriage return, which upsets mingw
3294dd52494dSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3295dd52494dSmrg  *)
3296dd52494dSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3297dd52494dSmrg  esac
3298dd52494dSmrg  case $ac_prog in
3299dd52494dSmrg    # Accept absolute paths.
3300dd52494dSmrg    [[\\/]]* | ?:[[\\/]]*)
3301dd52494dSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
3302dd52494dSmrg      # Canonicalize the pathname of ld
3303dd52494dSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3304dd52494dSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3305dd52494dSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3306dd52494dSmrg      done
3307dd52494dSmrg      test -z "$LD" && LD=$ac_prog
3308dd52494dSmrg      ;;
3309dd52494dSmrg  "")
3310dd52494dSmrg    # If it fails, then pretend we aren't using GCC.
3311dd52494dSmrg    ac_prog=ld
3312dd52494dSmrg    ;;
3313dd52494dSmrg  *)
3314dd52494dSmrg    # If it is relative, then search for the first ld in PATH.
3315dd52494dSmrg    with_gnu_ld=unknown
3316dd52494dSmrg    ;;
3317dd52494dSmrg  esac
3318dd52494dSmrgelif test yes = "$with_gnu_ld"; then
3319dd52494dSmrg  AC_MSG_CHECKING([for GNU ld])
3320dd52494dSmrgelse
3321dd52494dSmrg  AC_MSG_CHECKING([for non-GNU ld])
3322dd52494dSmrgfi
3323dd52494dSmrgAC_CACHE_VAL(lt_cv_path_LD,
3324dd52494dSmrg[if test -z "$LD"; then
3325dd52494dSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3326dd52494dSmrg  for ac_dir in $PATH; do
3327dd52494dSmrg    IFS=$lt_save_ifs
3328dd52494dSmrg    test -z "$ac_dir" && ac_dir=.
3329dd52494dSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3330dd52494dSmrg      lt_cv_path_LD=$ac_dir/$ac_prog
3331dd52494dSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
3332dd52494dSmrg      # but apparently some variants of GNU ld only accept -v.
3333dd52494dSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
3334dd52494dSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3335dd52494dSmrg      *GNU* | *'with BFD'*)
3336dd52494dSmrg	test no != "$with_gnu_ld" && break
3337dd52494dSmrg	;;
3338dd52494dSmrg      *)
3339dd52494dSmrg	test yes != "$with_gnu_ld" && break
3340dd52494dSmrg	;;
3341dd52494dSmrg      esac
3342dd52494dSmrg    fi
3343dd52494dSmrg  done
3344dd52494dSmrg  IFS=$lt_save_ifs
3345dd52494dSmrgelse
3346dd52494dSmrg  lt_cv_path_LD=$LD # Let the user override the test with a path.
3347dd52494dSmrgfi])
3348dd52494dSmrgLD=$lt_cv_path_LD
3349dd52494dSmrgif test -n "$LD"; then
3350dd52494dSmrg  AC_MSG_RESULT($LD)
3351dd52494dSmrgelse
3352dd52494dSmrg  AC_MSG_RESULT(no)
3353dd52494dSmrgfi
3354dd52494dSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3355dd52494dSmrg_LT_PATH_LD_GNU
3356dd52494dSmrgAC_SUBST([LD])
3357dd52494dSmrg
3358dd52494dSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3359dd52494dSmrg])# LT_PATH_LD
3360dd52494dSmrg
3361dd52494dSmrg# Old names:
3362dd52494dSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3363dd52494dSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3364dd52494dSmrgdnl aclocal-1.4 backwards compatibility:
3365dd52494dSmrgdnl AC_DEFUN([AM_PROG_LD], [])
3366dd52494dSmrgdnl AC_DEFUN([AC_PROG_LD], [])
3367dd52494dSmrg
3368dd52494dSmrg
3369dd52494dSmrg# _LT_PATH_LD_GNU
3370dd52494dSmrg#- --------------
3371dd52494dSmrgm4_defun([_LT_PATH_LD_GNU],
3372dd52494dSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3373dd52494dSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3374dd52494dSmrgcase `$LD -v 2>&1 </dev/null` in
3375dd52494dSmrg*GNU* | *'with BFD'*)
3376dd52494dSmrg  lt_cv_prog_gnu_ld=yes
3377dd52494dSmrg  ;;
3378dd52494dSmrg*)
3379dd52494dSmrg  lt_cv_prog_gnu_ld=no
3380dd52494dSmrg  ;;
3381dd52494dSmrgesac])
3382dd52494dSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
3383dd52494dSmrg])# _LT_PATH_LD_GNU
3384dd52494dSmrg
3385dd52494dSmrg
3386dd52494dSmrg# _LT_CMD_RELOAD
3387dd52494dSmrg# --------------
3388dd52494dSmrg# find reload flag for linker
3389dd52494dSmrg#   -- PORTME Some linkers may need a different reload flag.
3390dd52494dSmrgm4_defun([_LT_CMD_RELOAD],
3391dd52494dSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
3392dd52494dSmrg  lt_cv_ld_reload_flag,
3393dd52494dSmrg  [lt_cv_ld_reload_flag='-r'])
3394dd52494dSmrgreload_flag=$lt_cv_ld_reload_flag
3395dd52494dSmrgcase $reload_flag in
3396dd52494dSmrg"" | " "*) ;;
3397dd52494dSmrg*) reload_flag=" $reload_flag" ;;
3398dd52494dSmrgesac
3399dd52494dSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
3400dd52494dSmrgcase $host_os in
3401dd52494dSmrg  cygwin* | mingw* | pw32* | cegcc*)
3402dd52494dSmrg    if test yes != "$GCC"; then
3403dd52494dSmrg      reload_cmds=false
3404dd52494dSmrg    fi
3405dd52494dSmrg    ;;
3406dd52494dSmrg  darwin*)
3407dd52494dSmrg    if test yes = "$GCC"; then
3408dd52494dSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3409dd52494dSmrg    else
3410dd52494dSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3411dd52494dSmrg    fi
3412dd52494dSmrg    ;;
3413dd52494dSmrgesac
3414dd52494dSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3415dd52494dSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl
3416dd52494dSmrg])# _LT_CMD_RELOAD
3417dd52494dSmrg
3418dd52494dSmrg
3419dd52494dSmrg# _LT_PATH_DD
3420dd52494dSmrg# -----------
3421dd52494dSmrg# find a working dd
3422dd52494dSmrgm4_defun([_LT_PATH_DD],
3423dd52494dSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3424dd52494dSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
3425dd52494dSmrgcat conftest.i conftest.i >conftest2.i
3426dd52494dSmrg: ${lt_DD:=$DD}
3427dd52494dSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3428dd52494dSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3429dd52494dSmrg  cmp -s conftest.i conftest.out \
3430dd52494dSmrg  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3431dd52494dSmrgfi])
3432dd52494dSmrgrm -f conftest.i conftest2.i conftest.out])
3433dd52494dSmrg])# _LT_PATH_DD
3434dd52494dSmrg
3435dd52494dSmrg
3436dd52494dSmrg# _LT_CMD_TRUNCATE
3437dd52494dSmrg# ----------------
3438dd52494dSmrg# find command to truncate a binary pipe
3439dd52494dSmrgm4_defun([_LT_CMD_TRUNCATE],
3440dd52494dSmrg[m4_require([_LT_PATH_DD])
3441dd52494dSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3442dd52494dSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
3443dd52494dSmrgcat conftest.i conftest.i >conftest2.i
3444dd52494dSmrglt_cv_truncate_bin=
3445dd52494dSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3446dd52494dSmrg  cmp -s conftest.i conftest.out \
3447dd52494dSmrg  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3448dd52494dSmrgfi
3449dd52494dSmrgrm -f conftest.i conftest2.i conftest.out
3450dd52494dSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3451dd52494dSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3452dd52494dSmrg  [Command to truncate a binary pipe])
3453dd52494dSmrg])# _LT_CMD_TRUNCATE
3454dd52494dSmrg
3455dd52494dSmrg
3456dd52494dSmrg# _LT_CHECK_MAGIC_METHOD
3457dd52494dSmrg# ----------------------
3458dd52494dSmrg# how to check for library dependencies
3459dd52494dSmrg#  -- PORTME fill in with the dynamic library characteristics
3460dd52494dSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
3461dd52494dSmrg[m4_require([_LT_DECL_EGREP])
3462dd52494dSmrgm4_require([_LT_DECL_OBJDUMP])
3463dd52494dSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
3464dd52494dSmrglt_cv_deplibs_check_method,
3465dd52494dSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
3466dd52494dSmrglt_cv_file_magic_test_file=
3467dd52494dSmrglt_cv_deplibs_check_method='unknown'
3468dd52494dSmrg# Need to set the preceding variable on all platforms that support
3469dd52494dSmrg# interlibrary dependencies.
3470dd52494dSmrg# 'none' -- dependencies not supported.
3471dd52494dSmrg# 'unknown' -- same as none, but documents that we really don't know.
3472dd52494dSmrg# 'pass_all' -- all dependencies passed with no checks.
3473dd52494dSmrg# 'test_compile' -- check by making test program.
3474dd52494dSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
3475dd52494dSmrg# that responds to the $file_magic_cmd with a given extended regex.
3476dd52494dSmrg# If you have 'file' or equivalent on your system and you're not sure
3477dd52494dSmrg# whether 'pass_all' will *always* work, you probably want this one.
3478dd52494dSmrg
3479dd52494dSmrgcase $host_os in
3480dd52494dSmrgaix[[4-9]]*)
3481dd52494dSmrg  lt_cv_deplibs_check_method=pass_all
3482dd52494dSmrg  ;;
3483dd52494dSmrg
3484dd52494dSmrgbeos*)
3485dd52494dSmrg  lt_cv_deplibs_check_method=pass_all
3486dd52494dSmrg  ;;
3487dd52494dSmrg
3488dd52494dSmrgbsdi[[45]]*)
3489dd52494dSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
349033adc6acSmrg  lt_cv_file_magic_cmd='$FILECMD -L'
3491dd52494dSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
3492dd52494dSmrg  ;;
3493dd52494dSmrg
3494dd52494dSmrgcygwin*)
3495dd52494dSmrg  # func_win32_libid is a shell function defined in ltmain.sh
3496dd52494dSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3497dd52494dSmrg  lt_cv_file_magic_cmd='func_win32_libid'
3498dd52494dSmrg  ;;
3499dd52494dSmrg
3500dd52494dSmrgmingw* | pw32*)
3501dd52494dSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
3502dd52494dSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3503dd52494dSmrg  # unless we find 'file', for example because we are cross-compiling.
3504dd52494dSmrg  if ( file / ) >/dev/null 2>&1; then
3505dd52494dSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3506dd52494dSmrg    lt_cv_file_magic_cmd='func_win32_libid'
3507dd52494dSmrg  else
3508dd52494dSmrg    # Keep this pattern in sync with the one in func_win32_libid.
3509dd52494dSmrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3510dd52494dSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
3511dd52494dSmrg  fi
3512dd52494dSmrg  ;;
3513dd52494dSmrg
3514dd52494dSmrgcegcc*)
3515dd52494dSmrg  # use the weaker test based on 'objdump'. See mingw*.
3516dd52494dSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3517dd52494dSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
3518dd52494dSmrg  ;;
3519dd52494dSmrg
3520dd52494dSmrgdarwin* | rhapsody*)
3521dd52494dSmrg  lt_cv_deplibs_check_method=pass_all
3522dd52494dSmrg  ;;
3523dd52494dSmrg
352433adc6acSmrgfreebsd* | dragonfly* | midnightbsd*)
3525dd52494dSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3526dd52494dSmrg    case $host_cpu in
3527dd52494dSmrg    i*86 )
3528dd52494dSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
3529dd52494dSmrg      # Let's accept both of them until this is cleared up.
3530dd52494dSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
353133adc6acSmrg      lt_cv_file_magic_cmd=$FILECMD
3532dd52494dSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3533dd52494dSmrg      ;;
3534dd52494dSmrg    esac
3535dd52494dSmrg  else
3536dd52494dSmrg    lt_cv_deplibs_check_method=pass_all
3537dd52494dSmrg  fi
3538dd52494dSmrg  ;;
3539dd52494dSmrg
3540dd52494dSmrghaiku*)
3541dd52494dSmrg  lt_cv_deplibs_check_method=pass_all
3542dd52494dSmrg  ;;
3543dd52494dSmrg
3544dd52494dSmrghpux10.20* | hpux11*)
354533adc6acSmrg  lt_cv_file_magic_cmd=$FILECMD
3546dd52494dSmrg  case $host_cpu in
3547dd52494dSmrg  ia64*)
3548dd52494dSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3549dd52494dSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3550dd52494dSmrg    ;;
3551dd52494dSmrg  hppa*64*)
3552dd52494dSmrg    [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]']
3553dd52494dSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3554dd52494dSmrg    ;;
3555dd52494dSmrg  *)
3556dd52494dSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3557dd52494dSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3558dd52494dSmrg    ;;
3559dd52494dSmrg  esac
3560dd52494dSmrg  ;;
3561dd52494dSmrg
3562dd52494dSmrginterix[[3-9]]*)
3563dd52494dSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3564dd52494dSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3565dd52494dSmrg  ;;
3566dd52494dSmrg
3567dd52494dSmrgirix5* | irix6* | nonstopux*)
3568dd52494dSmrg  case $LD in
3569dd52494dSmrg  *-32|*"-32 ") libmagic=32-bit;;
3570dd52494dSmrg  *-n32|*"-n32 ") libmagic=N32;;
3571dd52494dSmrg  *-64|*"-64 ") libmagic=64-bit;;
3572dd52494dSmrg  *) libmagic=never-match;;
3573dd52494dSmrg  esac
3574dd52494dSmrg  lt_cv_deplibs_check_method=pass_all
3575dd52494dSmrg  ;;
3576dd52494dSmrg
3577dd52494dSmrg# This must be glibc/ELF.
3578dd52494dSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3579dd52494dSmrg  lt_cv_deplibs_check_method=pass_all
3580dd52494dSmrg  ;;
3581dd52494dSmrg
3582dd52494dSmrgnetbsd*)
3583dd52494dSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3584dd52494dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3585dd52494dSmrg  else
3586dd52494dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3587dd52494dSmrg  fi
3588dd52494dSmrg  ;;
3589dd52494dSmrg
3590dd52494dSmrgnewos6*)
3591dd52494dSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
359233adc6acSmrg  lt_cv_file_magic_cmd=$FILECMD
3593dd52494dSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3594dd52494dSmrg  ;;
3595dd52494dSmrg
3596dd52494dSmrg*nto* | *qnx*)
3597dd52494dSmrg  lt_cv_deplibs_check_method=pass_all
3598dd52494dSmrg  ;;
3599dd52494dSmrg
3600dd52494dSmrgopenbsd* | bitrig*)
3601dd52494dSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3602dd52494dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3603dd52494dSmrg  else
3604dd52494dSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3605dd52494dSmrg  fi
3606dd52494dSmrg  ;;
3607dd52494dSmrg
3608dd52494dSmrgosf3* | osf4* | osf5*)
3609dd52494dSmrg  lt_cv_deplibs_check_method=pass_all
3610dd52494dSmrg  ;;
3611dd52494dSmrg
3612dd52494dSmrgrdos*)
3613dd52494dSmrg  lt_cv_deplibs_check_method=pass_all
3614dd52494dSmrg  ;;
3615dd52494dSmrg
3616dd52494dSmrgsolaris*)
3617dd52494dSmrg  lt_cv_deplibs_check_method=pass_all
3618dd52494dSmrg  ;;
3619dd52494dSmrg
3620dd52494dSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3621dd52494dSmrg  lt_cv_deplibs_check_method=pass_all
3622dd52494dSmrg  ;;
3623dd52494dSmrg
3624dd52494dSmrgsysv4 | sysv4.3*)
3625dd52494dSmrg  case $host_vendor in
3626dd52494dSmrg  motorola)
3627dd52494dSmrg    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]]'
3628dd52494dSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3629dd52494dSmrg    ;;
3630dd52494dSmrg  ncr)
3631dd52494dSmrg    lt_cv_deplibs_check_method=pass_all
3632dd52494dSmrg    ;;
3633dd52494dSmrg  sequent)
3634dd52494dSmrg    lt_cv_file_magic_cmd='/bin/file'
3635dd52494dSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3636dd52494dSmrg    ;;
3637dd52494dSmrg  sni)
3638dd52494dSmrg    lt_cv_file_magic_cmd='/bin/file'
3639dd52494dSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3640dd52494dSmrg    lt_cv_file_magic_test_file=/lib/libc.so
3641dd52494dSmrg    ;;
3642dd52494dSmrg  siemens)
3643dd52494dSmrg    lt_cv_deplibs_check_method=pass_all
3644dd52494dSmrg    ;;
3645dd52494dSmrg  pc)
3646dd52494dSmrg    lt_cv_deplibs_check_method=pass_all
3647dd52494dSmrg    ;;
3648dd52494dSmrg  esac
3649dd52494dSmrg  ;;
3650dd52494dSmrg
3651dd52494dSmrgtpf*)
3652dd52494dSmrg  lt_cv_deplibs_check_method=pass_all
3653dd52494dSmrg  ;;
3654dd52494dSmrgos2*)
3655dd52494dSmrg  lt_cv_deplibs_check_method=pass_all
3656dd52494dSmrg  ;;
3657dd52494dSmrgesac
3658dd52494dSmrg])
3659dd52494dSmrg
3660dd52494dSmrgfile_magic_glob=
3661dd52494dSmrgwant_nocaseglob=no
3662dd52494dSmrgif test "$build" = "$host"; then
3663dd52494dSmrg  case $host_os in
3664dd52494dSmrg  mingw* | pw32*)
3665dd52494dSmrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3666dd52494dSmrg      want_nocaseglob=yes
3667dd52494dSmrg    else
3668dd52494dSmrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3669dd52494dSmrg    fi
3670dd52494dSmrg    ;;
3671dd52494dSmrg  esac
3672dd52494dSmrgfi
3673dd52494dSmrg
3674dd52494dSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
3675dd52494dSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
3676dd52494dSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
3677dd52494dSmrg
3678dd52494dSmrg_LT_DECL([], [deplibs_check_method], [1],
3679dd52494dSmrg    [Method to check whether dependent libraries are shared objects])
3680dd52494dSmrg_LT_DECL([], [file_magic_cmd], [1],
3681dd52494dSmrg    [Command to use when deplibs_check_method = "file_magic"])
3682dd52494dSmrg_LT_DECL([], [file_magic_glob], [1],
3683dd52494dSmrg    [How to find potential files when deplibs_check_method = "file_magic"])
3684dd52494dSmrg_LT_DECL([], [want_nocaseglob], [1],
3685dd52494dSmrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3686dd52494dSmrg])# _LT_CHECK_MAGIC_METHOD
3687dd52494dSmrg
3688dd52494dSmrg
3689dd52494dSmrg# LT_PATH_NM
3690dd52494dSmrg# ----------
3691dd52494dSmrg# find the pathname to a BSD- or MS-compatible name lister
3692dd52494dSmrgAC_DEFUN([LT_PATH_NM],
3693dd52494dSmrg[AC_REQUIRE([AC_PROG_CC])dnl
3694dd52494dSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3695dd52494dSmrg[if test -n "$NM"; then
3696dd52494dSmrg  # Let the user override the test.
3697dd52494dSmrg  lt_cv_path_NM=$NM
3698dd52494dSmrgelse
3699dd52494dSmrg  lt_nm_to_check=${ac_tool_prefix}nm
3700dd52494dSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3701dd52494dSmrg    lt_nm_to_check="$lt_nm_to_check nm"
3702dd52494dSmrg  fi
3703dd52494dSmrg  for lt_tmp_nm in $lt_nm_to_check; do
3704dd52494dSmrg    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3705dd52494dSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3706dd52494dSmrg      IFS=$lt_save_ifs
3707dd52494dSmrg      test -z "$ac_dir" && ac_dir=.
3708dd52494dSmrg      tmp_nm=$ac_dir/$lt_tmp_nm
3709dd52494dSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3710dd52494dSmrg	# Check to see if the nm accepts a BSD-compat flag.
3711dd52494dSmrg	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3712dd52494dSmrg	#   nm: unknown option "B" ignored
3713dd52494dSmrg	# Tru64's nm complains that /dev/null is an invalid object file
3714dd52494dSmrg	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3715dd52494dSmrg	case $build_os in
3716dd52494dSmrg	mingw*) lt_bad_file=conftest.nm/nofile ;;
3717dd52494dSmrg	*) lt_bad_file=/dev/null ;;
3718dd52494dSmrg	esac
371933adc6acSmrg	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
3720dd52494dSmrg	*$lt_bad_file* | *'Invalid file or object type'*)
3721dd52494dSmrg	  lt_cv_path_NM="$tmp_nm -B"
3722dd52494dSmrg	  break 2
3723dd52494dSmrg	  ;;
3724dd52494dSmrg	*)
372533adc6acSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
3726dd52494dSmrg	  */dev/null*)
3727dd52494dSmrg	    lt_cv_path_NM="$tmp_nm -p"
3728dd52494dSmrg	    break 2
3729dd52494dSmrg	    ;;
3730dd52494dSmrg	  *)
3731dd52494dSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3732dd52494dSmrg	    continue # so that we can try to find one that supports BSD flags
3733dd52494dSmrg	    ;;
3734dd52494dSmrg	  esac
3735dd52494dSmrg	  ;;
3736dd52494dSmrg	esac
3737dd52494dSmrg      fi
3738dd52494dSmrg    done
3739dd52494dSmrg    IFS=$lt_save_ifs
3740dd52494dSmrg  done
3741dd52494dSmrg  : ${lt_cv_path_NM=no}
3742dd52494dSmrgfi])
3743dd52494dSmrgif test no != "$lt_cv_path_NM"; then
3744dd52494dSmrg  NM=$lt_cv_path_NM
3745dd52494dSmrgelse
3746dd52494dSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
3747dd52494dSmrg  if test -n "$DUMPBIN"; then :
3748dd52494dSmrg    # Let the user override the test.
3749dd52494dSmrg  else
3750dd52494dSmrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
375133adc6acSmrg    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
3752dd52494dSmrg    *COFF*)
3753dd52494dSmrg      DUMPBIN="$DUMPBIN -symbols -headers"
3754dd52494dSmrg      ;;
3755dd52494dSmrg    *)
3756dd52494dSmrg      DUMPBIN=:
3757dd52494dSmrg      ;;
3758dd52494dSmrg    esac
3759dd52494dSmrg  fi
3760dd52494dSmrg  AC_SUBST([DUMPBIN])
3761dd52494dSmrg  if test : != "$DUMPBIN"; then
3762dd52494dSmrg    NM=$DUMPBIN
3763dd52494dSmrg  fi
3764dd52494dSmrgfi
3765dd52494dSmrgtest -z "$NM" && NM=nm
3766dd52494dSmrgAC_SUBST([NM])
3767dd52494dSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3768dd52494dSmrg
3769dd52494dSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3770dd52494dSmrg  [lt_cv_nm_interface="BSD nm"
3771dd52494dSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
3772dd52494dSmrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3773dd52494dSmrg  (eval "$ac_compile" 2>conftest.err)
3774dd52494dSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3775dd52494dSmrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3776dd52494dSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3777dd52494dSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3778dd52494dSmrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3779dd52494dSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
3780dd52494dSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3781dd52494dSmrg    lt_cv_nm_interface="MS dumpbin"
3782dd52494dSmrg  fi
3783dd52494dSmrg  rm -f conftest*])
3784dd52494dSmrg])# LT_PATH_NM
3785dd52494dSmrg
3786dd52494dSmrg# Old names:
3787dd52494dSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3788dd52494dSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3789dd52494dSmrgdnl aclocal-1.4 backwards compatibility:
3790dd52494dSmrgdnl AC_DEFUN([AM_PROG_NM], [])
3791dd52494dSmrgdnl AC_DEFUN([AC_PROG_NM], [])
3792dd52494dSmrg
3793dd52494dSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3794dd52494dSmrg# --------------------------------
3795dd52494dSmrg# how to determine the name of the shared library
3796dd52494dSmrg# associated with a specific link library.
3797dd52494dSmrg#  -- PORTME fill in with the dynamic library characteristics
3798dd52494dSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3799dd52494dSmrg[m4_require([_LT_DECL_EGREP])
3800dd52494dSmrgm4_require([_LT_DECL_OBJDUMP])
3801dd52494dSmrgm4_require([_LT_DECL_DLLTOOL])
3802dd52494dSmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
3803dd52494dSmrglt_cv_sharedlib_from_linklib_cmd,
3804dd52494dSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
3805dd52494dSmrg
3806dd52494dSmrgcase $host_os in
3807dd52494dSmrgcygwin* | mingw* | pw32* | cegcc*)
3808dd52494dSmrg  # two different shell functions defined in ltmain.sh;
3809dd52494dSmrg  # decide which one to use based on capabilities of $DLLTOOL
3810dd52494dSmrg  case `$DLLTOOL --help 2>&1` in
3811dd52494dSmrg  *--identify-strict*)
3812dd52494dSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3813dd52494dSmrg    ;;
3814dd52494dSmrg  *)
3815dd52494dSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3816dd52494dSmrg    ;;
3817dd52494dSmrg  esac
3818dd52494dSmrg  ;;
3819dd52494dSmrg*)
3820dd52494dSmrg  # fallback: assume linklib IS sharedlib
3821dd52494dSmrg  lt_cv_sharedlib_from_linklib_cmd=$ECHO
3822dd52494dSmrg  ;;
3823dd52494dSmrgesac
3824dd52494dSmrg])
3825dd52494dSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3826dd52494dSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3827dd52494dSmrg
3828dd52494dSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3829dd52494dSmrg    [Command to associate shared and link libraries])
3830dd52494dSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3831dd52494dSmrg
3832dd52494dSmrg
3833dd52494dSmrg# _LT_PATH_MANIFEST_TOOL
3834dd52494dSmrg# ----------------------
3835dd52494dSmrg# locate the manifest tool
3836dd52494dSmrgm4_defun([_LT_PATH_MANIFEST_TOOL],
3837dd52494dSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3838dd52494dSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3839dd52494dSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3840dd52494dSmrg  [lt_cv_path_mainfest_tool=no
3841dd52494dSmrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3842dd52494dSmrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3843dd52494dSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
3844dd52494dSmrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3845dd52494dSmrg    lt_cv_path_mainfest_tool=yes
3846dd52494dSmrg  fi
3847dd52494dSmrg  rm -f conftest*])
3848dd52494dSmrgif test yes != "$lt_cv_path_mainfest_tool"; then
3849dd52494dSmrg  MANIFEST_TOOL=:
3850dd52494dSmrgfi
3851dd52494dSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3852dd52494dSmrg])# _LT_PATH_MANIFEST_TOOL
3853dd52494dSmrg
3854dd52494dSmrg
3855dd52494dSmrg# _LT_DLL_DEF_P([FILE])
3856dd52494dSmrg# ---------------------
3857dd52494dSmrg# True iff FILE is a Windows DLL '.def' file.
3858dd52494dSmrg# Keep in sync with func_dll_def_p in the libtool script
3859dd52494dSmrgAC_DEFUN([_LT_DLL_DEF_P],
3860dd52494dSmrg[dnl
3861dd52494dSmrg  test DEF = "`$SED -n dnl
3862dd52494dSmrg    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
3863dd52494dSmrg    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
3864dd52494dSmrg    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
3865dd52494dSmrg    -e q dnl                          Only consider the first "real" line
3866dd52494dSmrg    $1`" dnl
3867dd52494dSmrg])# _LT_DLL_DEF_P
3868dd52494dSmrg
3869dd52494dSmrg
3870dd52494dSmrg# LT_LIB_M
3871dd52494dSmrg# --------
3872dd52494dSmrg# check for math library
3873dd52494dSmrgAC_DEFUN([LT_LIB_M],
3874dd52494dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3875dd52494dSmrgLIBM=
3876dd52494dSmrgcase $host in
3877dd52494dSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3878dd52494dSmrg  # These system don't have libm, or don't need it
3879dd52494dSmrg  ;;
3880dd52494dSmrg*-ncr-sysv4.3*)
3881dd52494dSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
3882dd52494dSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3883dd52494dSmrg  ;;
3884dd52494dSmrg*)
3885dd52494dSmrg  AC_CHECK_LIB(m, cos, LIBM=-lm)
3886dd52494dSmrg  ;;
3887dd52494dSmrgesac
3888dd52494dSmrgAC_SUBST([LIBM])
3889dd52494dSmrg])# LT_LIB_M
3890dd52494dSmrg
3891dd52494dSmrg# Old name:
3892dd52494dSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3893dd52494dSmrgdnl aclocal-1.4 backwards compatibility:
3894dd52494dSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
3895dd52494dSmrg
3896dd52494dSmrg
3897dd52494dSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
3898dd52494dSmrg# -------------------------------
3899dd52494dSmrgm4_defun([_LT_COMPILER_NO_RTTI],
3900dd52494dSmrg[m4_require([_LT_TAG_COMPILER])dnl
3901dd52494dSmrg
3902dd52494dSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3903dd52494dSmrg
3904dd52494dSmrgif test yes = "$GCC"; then
3905dd52494dSmrg  case $cc_basename in
3906dd52494dSmrg  nvcc*)
3907dd52494dSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3908dd52494dSmrg  *)
3909dd52494dSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3910dd52494dSmrg  esac
3911dd52494dSmrg
3912dd52494dSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3913dd52494dSmrg    lt_cv_prog_compiler_rtti_exceptions,
3914dd52494dSmrg    [-fno-rtti -fno-exceptions], [],
3915dd52494dSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3916dd52494dSmrgfi
3917dd52494dSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3918dd52494dSmrg	[Compiler flag to turn off builtin functions])
3919dd52494dSmrg])# _LT_COMPILER_NO_RTTI
3920dd52494dSmrg
3921dd52494dSmrg
3922dd52494dSmrg# _LT_CMD_GLOBAL_SYMBOLS
3923dd52494dSmrg# ----------------------
3924dd52494dSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3925dd52494dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3926dd52494dSmrgAC_REQUIRE([AC_PROG_CC])dnl
3927dd52494dSmrgAC_REQUIRE([AC_PROG_AWK])dnl
3928dd52494dSmrgAC_REQUIRE([LT_PATH_NM])dnl
3929dd52494dSmrgAC_REQUIRE([LT_PATH_LD])dnl
3930dd52494dSmrgm4_require([_LT_DECL_SED])dnl
3931dd52494dSmrgm4_require([_LT_DECL_EGREP])dnl
3932dd52494dSmrgm4_require([_LT_TAG_COMPILER])dnl
3933dd52494dSmrg
3934dd52494dSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
3935dd52494dSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
3936dd52494dSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3937dd52494dSmrg[
3938dd52494dSmrg# These are sane defaults that work on at least a few old systems.
3939dd52494dSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3940dd52494dSmrg
3941dd52494dSmrg# Character class describing NM global symbol codes.
3942dd52494dSmrgsymcode='[[BCDEGRST]]'
3943dd52494dSmrg
3944dd52494dSmrg# Regexp to match symbols that can be accessed directly from C.
3945dd52494dSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3946dd52494dSmrg
3947dd52494dSmrg# Define system-specific variables.
3948dd52494dSmrgcase $host_os in
3949dd52494dSmrgaix*)
3950dd52494dSmrg  symcode='[[BCDT]]'
3951dd52494dSmrg  ;;
3952dd52494dSmrgcygwin* | mingw* | pw32* | cegcc*)
3953dd52494dSmrg  symcode='[[ABCDGISTW]]'
3954dd52494dSmrg  ;;
3955dd52494dSmrghpux*)
3956dd52494dSmrg  if test ia64 = "$host_cpu"; then
3957dd52494dSmrg    symcode='[[ABCDEGRST]]'
3958dd52494dSmrg  fi
3959dd52494dSmrg  ;;
3960dd52494dSmrgirix* | nonstopux*)
3961dd52494dSmrg  symcode='[[BCDEGRST]]'
3962dd52494dSmrg  ;;
3963dd52494dSmrgosf*)
3964dd52494dSmrg  symcode='[[BCDEGQRST]]'
3965dd52494dSmrg  ;;
3966dd52494dSmrgsolaris*)
3967dd52494dSmrg  symcode='[[BDRT]]'
3968dd52494dSmrg  ;;
3969dd52494dSmrgsco3.2v5*)
3970dd52494dSmrg  symcode='[[DT]]'
3971dd52494dSmrg  ;;
3972dd52494dSmrgsysv4.2uw2*)
3973dd52494dSmrg  symcode='[[DT]]'
3974dd52494dSmrg  ;;
3975dd52494dSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
3976dd52494dSmrg  symcode='[[ABDT]]'
3977dd52494dSmrg  ;;
3978dd52494dSmrgsysv4)
3979dd52494dSmrg  symcode='[[DFNSTU]]'
3980dd52494dSmrg  ;;
3981dd52494dSmrgesac
3982dd52494dSmrg
3983dd52494dSmrg# If we're using GNU nm, then use its standard symbol codes.
3984dd52494dSmrgcase `$NM -V 2>&1` in
3985dd52494dSmrg*GNU* | *'with BFD'*)
3986dd52494dSmrg  symcode='[[ABCDGIRSTW]]' ;;
3987dd52494dSmrgesac
3988dd52494dSmrg
3989dd52494dSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
3990dd52494dSmrg  # Gets list of data symbols to import.
399133adc6acSmrg  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
3992dd52494dSmrg  # Adjust the below global symbol transforms to fixup imported variables.
3993dd52494dSmrg  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
3994dd52494dSmrg  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
3995dd52494dSmrg  lt_c_name_lib_hook="\
3996dd52494dSmrg  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
3997dd52494dSmrg  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
3998dd52494dSmrgelse
3999dd52494dSmrg  # Disable hooks by default.
4000dd52494dSmrg  lt_cv_sys_global_symbol_to_import=
4001dd52494dSmrg  lt_cdecl_hook=
4002dd52494dSmrg  lt_c_name_hook=
4003dd52494dSmrg  lt_c_name_lib_hook=
4004dd52494dSmrgfi
4005dd52494dSmrg
4006dd52494dSmrg# Transform an extracted symbol line into a proper C declaration.
4007dd52494dSmrg# Some systems (esp. on ia64) link data and code symbols differently,
4008dd52494dSmrg# so use this general approach.
400933adc6acSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\
4010dd52494dSmrg$lt_cdecl_hook\
4011dd52494dSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
4012dd52494dSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
4013dd52494dSmrg
4014dd52494dSmrg# Transform an extracted symbol line into symbol name and symbol address
401533adc6acSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
4016dd52494dSmrg$lt_c_name_hook\
4017dd52494dSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
4018dd52494dSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
4019dd52494dSmrg
4020dd52494dSmrg# Transform an extracted symbol line into symbol name with lib prefix and
4021dd52494dSmrg# symbol address.
402233adc6acSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
4023dd52494dSmrg$lt_c_name_lib_hook\
4024dd52494dSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
4025dd52494dSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
4026dd52494dSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
4027dd52494dSmrg
4028dd52494dSmrg# Handle CRLF in mingw tool chain
4029dd52494dSmrgopt_cr=
4030dd52494dSmrgcase $build_os in
4031dd52494dSmrgmingw*)
4032dd52494dSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4033dd52494dSmrg  ;;
4034dd52494dSmrgesac
4035dd52494dSmrg
4036dd52494dSmrg# Try without a prefix underscore, then with it.
4037dd52494dSmrgfor ac_symprfx in "" "_"; do
4038dd52494dSmrg
4039dd52494dSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4040dd52494dSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
4041dd52494dSmrg
4042dd52494dSmrg  # Write the raw and C identifiers.
4043dd52494dSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4044dd52494dSmrg    # Fake it for dumpbin and say T for any non-static function,
4045dd52494dSmrg    # D for any global variable and I for any imported variable.
404633adc6acSmrg    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
4047dd52494dSmrg    # which start with @ or ?.
4048dd52494dSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4049dd52494dSmrg"     {last_section=section; section=\$ 3};"\
4050dd52494dSmrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4051dd52494dSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4052dd52494dSmrg"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4053dd52494dSmrg"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4054dd52494dSmrg"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4055dd52494dSmrg"     \$ 0!~/External *\|/{next};"\
4056dd52494dSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4057dd52494dSmrg"     {if(hide[section]) next};"\
4058dd52494dSmrg"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4059dd52494dSmrg"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4060dd52494dSmrg"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4061dd52494dSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4062dd52494dSmrg"     ' prfx=^$ac_symprfx]"
4063dd52494dSmrg  else
406433adc6acSmrg    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4065dd52494dSmrg  fi
406633adc6acSmrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
4067dd52494dSmrg
4068dd52494dSmrg  # Check to see that the pipe works correctly.
4069dd52494dSmrg  pipe_works=no
4070dd52494dSmrg
4071dd52494dSmrg  rm -f conftest*
4072dd52494dSmrg  cat > conftest.$ac_ext <<_LT_EOF
4073dd52494dSmrg#ifdef __cplusplus
4074dd52494dSmrgextern "C" {
4075dd52494dSmrg#endif
4076dd52494dSmrgchar nm_test_var;
4077dd52494dSmrgvoid nm_test_func(void);
4078dd52494dSmrgvoid nm_test_func(void){}
4079dd52494dSmrg#ifdef __cplusplus
4080dd52494dSmrg}
4081dd52494dSmrg#endif
4082dd52494dSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
4083dd52494dSmrg_LT_EOF
4084dd52494dSmrg
4085dd52494dSmrg  if AC_TRY_EVAL(ac_compile); then
4086dd52494dSmrg    # Now try to grab the symbols.
4087dd52494dSmrg    nlist=conftest.nm
4088dd52494dSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4089dd52494dSmrg      # Try sorting and uniquifying the output.
4090dd52494dSmrg      if sort "$nlist" | uniq > "$nlist"T; then
4091dd52494dSmrg	mv -f "$nlist"T "$nlist"
4092dd52494dSmrg      else
4093dd52494dSmrg	rm -f "$nlist"T
4094dd52494dSmrg      fi
4095dd52494dSmrg
4096dd52494dSmrg      # Make sure that we snagged all the symbols we need.
4097dd52494dSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4098dd52494dSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4099dd52494dSmrg	  cat <<_LT_EOF > conftest.$ac_ext
4100dd52494dSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4101dd52494dSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4102dd52494dSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime
4103dd52494dSmrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
4104dd52494dSmrg# define LT@&t@_DLSYM_CONST
4105dd52494dSmrg#elif defined __osf__
4106dd52494dSmrg/* This system does not cope well with relocations in const data.  */
4107dd52494dSmrg# define LT@&t@_DLSYM_CONST
4108dd52494dSmrg#else
4109dd52494dSmrg# define LT@&t@_DLSYM_CONST const
4110dd52494dSmrg#endif
4111dd52494dSmrg
4112dd52494dSmrg#ifdef __cplusplus
4113dd52494dSmrgextern "C" {
4114dd52494dSmrg#endif
4115dd52494dSmrg
4116dd52494dSmrg_LT_EOF
4117dd52494dSmrg	  # Now generate the symbol file.
4118dd52494dSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4119dd52494dSmrg
4120dd52494dSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
4121dd52494dSmrg
4122dd52494dSmrg/* The mapping between symbol names and symbols.  */
4123dd52494dSmrgLT@&t@_DLSYM_CONST struct {
4124dd52494dSmrg  const char *name;
4125dd52494dSmrg  void       *address;
4126dd52494dSmrg}
4127dd52494dSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
4128dd52494dSmrg{
4129dd52494dSmrg  { "@PROGRAM@", (void *) 0 },
4130dd52494dSmrg_LT_EOF
4131dd52494dSmrg	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4132dd52494dSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
4133dd52494dSmrg  {0, (void *) 0}
4134dd52494dSmrg};
4135dd52494dSmrg
4136dd52494dSmrg/* This works around a problem in FreeBSD linker */
4137dd52494dSmrg#ifdef FREEBSD_WORKAROUND
4138dd52494dSmrgstatic const void *lt_preloaded_setup() {
4139dd52494dSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
4140dd52494dSmrg}
4141dd52494dSmrg#endif
4142dd52494dSmrg
4143dd52494dSmrg#ifdef __cplusplus
4144dd52494dSmrg}
4145dd52494dSmrg#endif
4146dd52494dSmrg_LT_EOF
4147dd52494dSmrg	  # Now try linking the two files.
4148dd52494dSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
4149dd52494dSmrg	  lt_globsym_save_LIBS=$LIBS
4150dd52494dSmrg	  lt_globsym_save_CFLAGS=$CFLAGS
4151dd52494dSmrg	  LIBS=conftstm.$ac_objext
4152dd52494dSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4153dd52494dSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4154dd52494dSmrg	    pipe_works=yes
4155dd52494dSmrg	  fi
4156dd52494dSmrg	  LIBS=$lt_globsym_save_LIBS
4157dd52494dSmrg	  CFLAGS=$lt_globsym_save_CFLAGS
4158dd52494dSmrg	else
4159dd52494dSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4160dd52494dSmrg	fi
4161dd52494dSmrg      else
4162dd52494dSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4163dd52494dSmrg      fi
4164dd52494dSmrg    else
4165dd52494dSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4166dd52494dSmrg    fi
4167dd52494dSmrg  else
4168dd52494dSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4169dd52494dSmrg    cat conftest.$ac_ext >&5
4170dd52494dSmrg  fi
4171dd52494dSmrg  rm -rf conftest* conftst*
4172dd52494dSmrg
4173dd52494dSmrg  # Do not use the global_symbol_pipe unless it works.
4174dd52494dSmrg  if test yes = "$pipe_works"; then
4175dd52494dSmrg    break
4176dd52494dSmrg  else
4177dd52494dSmrg    lt_cv_sys_global_symbol_pipe=
4178dd52494dSmrg  fi
4179dd52494dSmrgdone
4180dd52494dSmrg])
4181dd52494dSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
4182dd52494dSmrg  lt_cv_sys_global_symbol_to_cdecl=
4183dd52494dSmrgfi
4184dd52494dSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4185dd52494dSmrg  AC_MSG_RESULT(failed)
4186dd52494dSmrgelse
4187dd52494dSmrg  AC_MSG_RESULT(ok)
4188dd52494dSmrgfi
4189dd52494dSmrg
4190dd52494dSmrg# Response file support.
4191dd52494dSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
4192dd52494dSmrg  nm_file_list_spec='@'
4193dd52494dSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4194dd52494dSmrg  nm_file_list_spec='@'
4195dd52494dSmrgfi
4196dd52494dSmrg
4197dd52494dSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4198dd52494dSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
4199dd52494dSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4200dd52494dSmrg    [Transform the output of nm in a proper C declaration])
4201dd52494dSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4202dd52494dSmrg    [Transform the output of nm into a list of symbols to manually relocate])
4203dd52494dSmrg_LT_DECL([global_symbol_to_c_name_address],
4204dd52494dSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4205dd52494dSmrg    [Transform the output of nm in a C name address pair])
4206dd52494dSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4207dd52494dSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4208dd52494dSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
4209dd52494dSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4210dd52494dSmrg    [The name lister interface])
4211dd52494dSmrg_LT_DECL([], [nm_file_list_spec], [1],
4212dd52494dSmrg    [Specify filename containing input files for $NM])
4213dd52494dSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
4214dd52494dSmrg
4215dd52494dSmrg
4216dd52494dSmrg# _LT_COMPILER_PIC([TAGNAME])
4217dd52494dSmrg# ---------------------------
4218dd52494dSmrgm4_defun([_LT_COMPILER_PIC],
4219dd52494dSmrg[m4_require([_LT_TAG_COMPILER])dnl
4220dd52494dSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4221dd52494dSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4222dd52494dSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
4223dd52494dSmrg
4224dd52494dSmrgm4_if([$1], [CXX], [
4225dd52494dSmrg  # C++ specific cases for pic, static, wl, etc.
4226dd52494dSmrg  if test yes = "$GXX"; then
4227dd52494dSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4228dd52494dSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4229dd52494dSmrg
4230dd52494dSmrg    case $host_os in
4231dd52494dSmrg    aix*)
4232dd52494dSmrg      # All AIX code is PIC.
4233dd52494dSmrg      if test ia64 = "$host_cpu"; then
4234dd52494dSmrg	# AIX 5 now supports IA64 processor
4235dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4236dd52494dSmrg      fi
4237dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4238dd52494dSmrg      ;;
4239dd52494dSmrg
4240dd52494dSmrg    amigaos*)
4241dd52494dSmrg      case $host_cpu in
4242dd52494dSmrg      powerpc)
4243dd52494dSmrg            # see comment about AmigaOS4 .so support
4244dd52494dSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4245dd52494dSmrg        ;;
4246dd52494dSmrg      m68k)
4247dd52494dSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
4248dd52494dSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
4249dd52494dSmrg            # like '-m68040'.
4250dd52494dSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4251dd52494dSmrg        ;;
4252dd52494dSmrg      esac
4253dd52494dSmrg      ;;
4254dd52494dSmrg
4255dd52494dSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4256dd52494dSmrg      # PIC is the default for these OSes.
4257dd52494dSmrg      ;;
4258dd52494dSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
4259dd52494dSmrg      # This hack is so that the source file can tell whether it is being
4260dd52494dSmrg      # built for inclusion in a dll (and should export symbols for example).
4261dd52494dSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4262dd52494dSmrg      # (--disable-auto-import) libraries
4263dd52494dSmrg      m4_if([$1], [GCJ], [],
4264dd52494dSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4265dd52494dSmrg      case $host_os in
4266dd52494dSmrg      os2*)
4267dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4268dd52494dSmrg	;;
4269dd52494dSmrg      esac
4270dd52494dSmrg      ;;
4271dd52494dSmrg    darwin* | rhapsody*)
4272dd52494dSmrg      # PIC is the default on this platform
4273dd52494dSmrg      # Common symbols not allowed in MH_DYLIB files
4274dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4275dd52494dSmrg      ;;
4276dd52494dSmrg    *djgpp*)
4277dd52494dSmrg      # DJGPP does not support shared libraries at all
4278dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4279dd52494dSmrg      ;;
4280dd52494dSmrg    haiku*)
4281dd52494dSmrg      # PIC is the default for Haiku.
4282dd52494dSmrg      # The "-static" flag exists, but is broken.
4283dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4284dd52494dSmrg      ;;
4285dd52494dSmrg    interix[[3-9]]*)
4286dd52494dSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4287dd52494dSmrg      # Instead, we relocate shared libraries at runtime.
4288dd52494dSmrg      ;;
4289dd52494dSmrg    sysv4*MP*)
4290dd52494dSmrg      if test -d /usr/nec; then
4291dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4292dd52494dSmrg      fi
4293dd52494dSmrg      ;;
4294dd52494dSmrg    hpux*)
4295dd52494dSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4296dd52494dSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4297dd52494dSmrg      # sets the default TLS model and affects inlining.
4298dd52494dSmrg      case $host_cpu in
4299dd52494dSmrg      hppa*64*)
4300dd52494dSmrg	;;
4301dd52494dSmrg      *)
4302dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4303dd52494dSmrg	;;
4304dd52494dSmrg      esac
4305dd52494dSmrg      ;;
4306dd52494dSmrg    *qnx* | *nto*)
4307dd52494dSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
4308dd52494dSmrg      # it will coredump.
4309dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4310dd52494dSmrg      ;;
4311dd52494dSmrg    *)
4312dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4313dd52494dSmrg      ;;
4314dd52494dSmrg    esac
4315dd52494dSmrg  else
4316dd52494dSmrg    case $host_os in
4317dd52494dSmrg      aix[[4-9]]*)
4318dd52494dSmrg	# All AIX code is PIC.
4319dd52494dSmrg	if test ia64 = "$host_cpu"; then
4320dd52494dSmrg	  # AIX 5 now supports IA64 processor
4321dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4322dd52494dSmrg	else
4323dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4324dd52494dSmrg	fi
4325dd52494dSmrg	;;
4326dd52494dSmrg      chorus*)
4327dd52494dSmrg	case $cc_basename in
4328dd52494dSmrg	cxch68*)
4329dd52494dSmrg	  # Green Hills C++ Compiler
4330dd52494dSmrg	  # _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"
4331dd52494dSmrg	  ;;
4332dd52494dSmrg	esac
4333dd52494dSmrg	;;
4334dd52494dSmrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
4335dd52494dSmrg	# This hack is so that the source file can tell whether it is being
4336dd52494dSmrg	# built for inclusion in a dll (and should export symbols for example).
4337dd52494dSmrg	m4_if([$1], [GCJ], [],
4338dd52494dSmrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4339dd52494dSmrg	;;
4340dd52494dSmrg      dgux*)
4341dd52494dSmrg	case $cc_basename in
4342dd52494dSmrg	  ec++*)
4343dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4344dd52494dSmrg	    ;;
4345dd52494dSmrg	  ghcx*)
4346dd52494dSmrg	    # Green Hills C++ Compiler
4347dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4348dd52494dSmrg	    ;;
4349dd52494dSmrg	  *)
4350dd52494dSmrg	    ;;
4351dd52494dSmrg	esac
4352dd52494dSmrg	;;
435333adc6acSmrg      freebsd* | dragonfly* | midnightbsd*)
4354dd52494dSmrg	# FreeBSD uses GNU C++
4355dd52494dSmrg	;;
4356dd52494dSmrg      hpux9* | hpux10* | hpux11*)
4357dd52494dSmrg	case $cc_basename in
4358dd52494dSmrg	  CC*)
4359dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4360dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4361dd52494dSmrg	    if test ia64 != "$host_cpu"; then
4362dd52494dSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4363dd52494dSmrg	    fi
4364dd52494dSmrg	    ;;
4365dd52494dSmrg	  aCC*)
4366dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4367dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4368dd52494dSmrg	    case $host_cpu in
4369dd52494dSmrg	    hppa*64*|ia64*)
4370dd52494dSmrg	      # +Z the default
4371dd52494dSmrg	      ;;
4372dd52494dSmrg	    *)
4373dd52494dSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4374dd52494dSmrg	      ;;
4375dd52494dSmrg	    esac
4376dd52494dSmrg	    ;;
4377dd52494dSmrg	  *)
4378dd52494dSmrg	    ;;
4379dd52494dSmrg	esac
4380dd52494dSmrg	;;
4381dd52494dSmrg      interix*)
4382dd52494dSmrg	# This is c89, which is MS Visual C++ (no shared libs)
4383dd52494dSmrg	# Anyone wants to do a port?
4384dd52494dSmrg	;;
4385dd52494dSmrg      irix5* | irix6* | nonstopux*)
4386dd52494dSmrg	case $cc_basename in
4387dd52494dSmrg	  CC*)
4388dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4389dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4390dd52494dSmrg	    # CC pic flag -KPIC is the default.
4391dd52494dSmrg	    ;;
4392dd52494dSmrg	  *)
4393dd52494dSmrg	    ;;
4394dd52494dSmrg	esac
4395dd52494dSmrg	;;
4396dd52494dSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4397dd52494dSmrg	case $cc_basename in
4398dd52494dSmrg	  KCC*)
4399dd52494dSmrg	    # KAI C++ Compiler
4400dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4401dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4402dd52494dSmrg	    ;;
4403dd52494dSmrg	  ecpc* )
4404dd52494dSmrg	    # old Intel C++ for x86_64, which still supported -KPIC.
4405dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4406dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4407dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4408dd52494dSmrg	    ;;
4409dd52494dSmrg	  icpc* )
4410dd52494dSmrg	    # Intel C++, used to be incompatible with GCC.
4411dd52494dSmrg	    # ICC 10 doesn't accept -KPIC any more.
4412dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4413dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4414dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4415dd52494dSmrg	    ;;
4416dd52494dSmrg	  pgCC* | pgcpp*)
4417dd52494dSmrg	    # Portland Group C++ compiler
4418dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4419dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4420dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4421dd52494dSmrg	    ;;
4422dd52494dSmrg	  cxx*)
4423dd52494dSmrg	    # Compaq C++
4424dd52494dSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
4425dd52494dSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
4426dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4427dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4428dd52494dSmrg	    ;;
4429dd52494dSmrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4430dd52494dSmrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
4431dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4432dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4433dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4434dd52494dSmrg	    ;;
4435dd52494dSmrg	  *)
443633adc6acSmrg	    case `$CC -V 2>&1 | $SED 5q` in
4437dd52494dSmrg	    *Sun\ C*)
4438dd52494dSmrg	      # Sun C++ 5.9
4439dd52494dSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4440dd52494dSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4441dd52494dSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4442dd52494dSmrg	      ;;
4443dd52494dSmrg	    esac
4444dd52494dSmrg	    ;;
4445dd52494dSmrg	esac
4446dd52494dSmrg	;;
4447dd52494dSmrg      lynxos*)
4448dd52494dSmrg	;;
4449dd52494dSmrg      m88k*)
4450dd52494dSmrg	;;
4451dd52494dSmrg      mvs*)
4452dd52494dSmrg	case $cc_basename in
4453dd52494dSmrg	  cxx*)
4454dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4455dd52494dSmrg	    ;;
4456dd52494dSmrg	  *)
4457dd52494dSmrg	    ;;
4458dd52494dSmrg	esac
4459dd52494dSmrg	;;
4460dd52494dSmrg      netbsd*)
4461dd52494dSmrg	;;
4462dd52494dSmrg      *qnx* | *nto*)
4463dd52494dSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
4464dd52494dSmrg        # it will coredump.
4465dd52494dSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4466dd52494dSmrg        ;;
4467dd52494dSmrg      osf3* | osf4* | osf5*)
4468dd52494dSmrg	case $cc_basename in
4469dd52494dSmrg	  KCC*)
4470dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4471dd52494dSmrg	    ;;
4472dd52494dSmrg	  RCC*)
4473dd52494dSmrg	    # Rational C++ 2.4.1
4474dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4475dd52494dSmrg	    ;;
4476dd52494dSmrg	  cxx*)
4477dd52494dSmrg	    # Digital/Compaq C++
4478dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4479dd52494dSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
4480dd52494dSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
4481dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4482dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4483dd52494dSmrg	    ;;
4484dd52494dSmrg	  *)
4485dd52494dSmrg	    ;;
4486dd52494dSmrg	esac
4487dd52494dSmrg	;;
4488dd52494dSmrg      psos*)
4489dd52494dSmrg	;;
4490dd52494dSmrg      solaris*)
4491dd52494dSmrg	case $cc_basename in
4492dd52494dSmrg	  CC* | sunCC*)
4493dd52494dSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
4494dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4495dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4496dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4497dd52494dSmrg	    ;;
4498dd52494dSmrg	  gcx*)
4499dd52494dSmrg	    # Green Hills C++ Compiler
4500dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4501dd52494dSmrg	    ;;
4502dd52494dSmrg	  *)
4503dd52494dSmrg	    ;;
4504dd52494dSmrg	esac
4505dd52494dSmrg	;;
4506dd52494dSmrg      sunos4*)
4507dd52494dSmrg	case $cc_basename in
4508dd52494dSmrg	  CC*)
4509dd52494dSmrg	    # Sun C++ 4.x
4510dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4511dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4512dd52494dSmrg	    ;;
4513dd52494dSmrg	  lcc*)
4514dd52494dSmrg	    # Lucid
4515dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4516dd52494dSmrg	    ;;
4517dd52494dSmrg	  *)
4518dd52494dSmrg	    ;;
4519dd52494dSmrg	esac
4520dd52494dSmrg	;;
4521dd52494dSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4522dd52494dSmrg	case $cc_basename in
4523dd52494dSmrg	  CC*)
4524dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4525dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4526dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4527dd52494dSmrg	    ;;
4528dd52494dSmrg	esac
4529dd52494dSmrg	;;
4530dd52494dSmrg      tandem*)
4531dd52494dSmrg	case $cc_basename in
4532dd52494dSmrg	  NCC*)
4533dd52494dSmrg	    # NonStop-UX NCC 3.20
4534dd52494dSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4535dd52494dSmrg	    ;;
4536dd52494dSmrg	  *)
4537dd52494dSmrg	    ;;
4538dd52494dSmrg	esac
4539dd52494dSmrg	;;
4540dd52494dSmrg      vxworks*)
4541dd52494dSmrg	;;
4542dd52494dSmrg      *)
4543dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4544dd52494dSmrg	;;
4545dd52494dSmrg    esac
4546dd52494dSmrg  fi
4547dd52494dSmrg],
4548dd52494dSmrg[
4549dd52494dSmrg  if test yes = "$GCC"; then
4550dd52494dSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4551dd52494dSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4552dd52494dSmrg
4553dd52494dSmrg    case $host_os in
4554dd52494dSmrg      aix*)
4555dd52494dSmrg      # All AIX code is PIC.
4556dd52494dSmrg      if test ia64 = "$host_cpu"; then
4557dd52494dSmrg	# AIX 5 now supports IA64 processor
4558dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4559dd52494dSmrg      fi
4560dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4561dd52494dSmrg      ;;
4562dd52494dSmrg
4563dd52494dSmrg    amigaos*)
4564dd52494dSmrg      case $host_cpu in
4565dd52494dSmrg      powerpc)
4566dd52494dSmrg            # see comment about AmigaOS4 .so support
4567dd52494dSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4568dd52494dSmrg        ;;
4569dd52494dSmrg      m68k)
4570dd52494dSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
4571dd52494dSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
4572dd52494dSmrg            # like '-m68040'.
4573dd52494dSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4574dd52494dSmrg        ;;
4575dd52494dSmrg      esac
4576dd52494dSmrg      ;;
4577dd52494dSmrg
4578dd52494dSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4579dd52494dSmrg      # PIC is the default for these OSes.
4580dd52494dSmrg      ;;
4581dd52494dSmrg
4582dd52494dSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
4583dd52494dSmrg      # This hack is so that the source file can tell whether it is being
4584dd52494dSmrg      # built for inclusion in a dll (and should export symbols for example).
4585dd52494dSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4586dd52494dSmrg      # (--disable-auto-import) libraries
4587dd52494dSmrg      m4_if([$1], [GCJ], [],
4588dd52494dSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4589dd52494dSmrg      case $host_os in
4590dd52494dSmrg      os2*)
4591dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4592dd52494dSmrg	;;
4593dd52494dSmrg      esac
4594dd52494dSmrg      ;;
4595dd52494dSmrg
4596dd52494dSmrg    darwin* | rhapsody*)
4597dd52494dSmrg      # PIC is the default on this platform
4598dd52494dSmrg      # Common symbols not allowed in MH_DYLIB files
4599dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4600dd52494dSmrg      ;;
4601dd52494dSmrg
4602dd52494dSmrg    haiku*)
4603dd52494dSmrg      # PIC is the default for Haiku.
4604dd52494dSmrg      # The "-static" flag exists, but is broken.
4605dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4606dd52494dSmrg      ;;
4607dd52494dSmrg
4608dd52494dSmrg    hpux*)
4609dd52494dSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4610dd52494dSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4611dd52494dSmrg      # sets the default TLS model and affects inlining.
4612dd52494dSmrg      case $host_cpu in
4613dd52494dSmrg      hppa*64*)
4614dd52494dSmrg	# +Z the default
4615dd52494dSmrg	;;
4616dd52494dSmrg      *)
4617dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4618dd52494dSmrg	;;
4619dd52494dSmrg      esac
4620dd52494dSmrg      ;;
4621dd52494dSmrg
4622dd52494dSmrg    interix[[3-9]]*)
4623dd52494dSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4624dd52494dSmrg      # Instead, we relocate shared libraries at runtime.
4625dd52494dSmrg      ;;
4626dd52494dSmrg
4627dd52494dSmrg    msdosdjgpp*)
4628dd52494dSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
4629dd52494dSmrg      # on systems that don't support them.
4630dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4631dd52494dSmrg      enable_shared=no
4632dd52494dSmrg      ;;
4633dd52494dSmrg
4634dd52494dSmrg    *nto* | *qnx*)
4635dd52494dSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
4636dd52494dSmrg      # it will coredump.
4637dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4638dd52494dSmrg      ;;
4639dd52494dSmrg
4640dd52494dSmrg    sysv4*MP*)
4641dd52494dSmrg      if test -d /usr/nec; then
4642dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4643dd52494dSmrg      fi
4644dd52494dSmrg      ;;
4645dd52494dSmrg
4646dd52494dSmrg    *)
4647dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4648dd52494dSmrg      ;;
4649dd52494dSmrg    esac
4650dd52494dSmrg
4651dd52494dSmrg    case $cc_basename in
4652dd52494dSmrg    nvcc*) # Cuda Compiler Driver 2.2
4653dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4654dd52494dSmrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4655dd52494dSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4656dd52494dSmrg      fi
4657dd52494dSmrg      ;;
4658dd52494dSmrg    esac
4659dd52494dSmrg  else
4660dd52494dSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
4661dd52494dSmrg    case $host_os in
4662dd52494dSmrg    aix*)
4663dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4664dd52494dSmrg      if test ia64 = "$host_cpu"; then
4665dd52494dSmrg	# AIX 5 now supports IA64 processor
4666dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4667dd52494dSmrg      else
4668dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4669dd52494dSmrg      fi
4670dd52494dSmrg      ;;
4671dd52494dSmrg
4672dd52494dSmrg    darwin* | rhapsody*)
4673dd52494dSmrg      # PIC is the default on this platform
4674dd52494dSmrg      # Common symbols not allowed in MH_DYLIB files
4675dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4676dd52494dSmrg      case $cc_basename in
4677dd52494dSmrg      nagfor*)
4678dd52494dSmrg        # NAG Fortran compiler
4679dd52494dSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4680dd52494dSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4681dd52494dSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4682dd52494dSmrg        ;;
4683dd52494dSmrg      esac
4684dd52494dSmrg      ;;
4685dd52494dSmrg
4686dd52494dSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
4687dd52494dSmrg      # This hack is so that the source file can tell whether it is being
4688dd52494dSmrg      # built for inclusion in a dll (and should export symbols for example).
4689dd52494dSmrg      m4_if([$1], [GCJ], [],
4690dd52494dSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4691dd52494dSmrg      case $host_os in
4692dd52494dSmrg      os2*)
4693dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4694dd52494dSmrg	;;
4695dd52494dSmrg      esac
4696dd52494dSmrg      ;;
4697dd52494dSmrg
4698dd52494dSmrg    hpux9* | hpux10* | hpux11*)
4699dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4700dd52494dSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4701dd52494dSmrg      # not for PA HP-UX.
4702dd52494dSmrg      case $host_cpu in
4703dd52494dSmrg      hppa*64*|ia64*)
4704dd52494dSmrg	# +Z the default
4705dd52494dSmrg	;;
4706dd52494dSmrg      *)
4707dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4708dd52494dSmrg	;;
4709dd52494dSmrg      esac
4710dd52494dSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4711dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4712dd52494dSmrg      ;;
4713dd52494dSmrg
4714dd52494dSmrg    irix5* | irix6* | nonstopux*)
4715dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4716dd52494dSmrg      # PIC (with -KPIC) is the default.
4717dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4718dd52494dSmrg      ;;
4719dd52494dSmrg
4720dd52494dSmrg    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4721dd52494dSmrg      case $cc_basename in
4722dd52494dSmrg      # old Intel for x86_64, which still supported -KPIC.
4723dd52494dSmrg      ecc*)
4724dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4725dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4726dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4727dd52494dSmrg        ;;
4728dd52494dSmrg      # icc used to be incompatible with GCC.
4729dd52494dSmrg      # ICC 10 doesn't accept -KPIC any more.
4730dd52494dSmrg      icc* | ifort*)
4731dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4732dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4733dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4734dd52494dSmrg        ;;
4735dd52494dSmrg      # Lahey Fortran 8.1.
4736dd52494dSmrg      lf95*)
4737dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4738dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4739dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4740dd52494dSmrg	;;
4741dd52494dSmrg      nagfor*)
4742dd52494dSmrg	# NAG Fortran compiler
4743dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4744dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4745dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4746dd52494dSmrg	;;
4747dd52494dSmrg      tcc*)
4748dd52494dSmrg	# Fabrice Bellard et al's Tiny C Compiler
4749dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4750dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4751dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4752dd52494dSmrg	;;
4753dd52494dSmrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4754dd52494dSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
4755dd52494dSmrg	# which looks to be a dead project)
4756dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4757dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4758dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4759dd52494dSmrg        ;;
4760dd52494dSmrg      ccc*)
4761dd52494dSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4762dd52494dSmrg        # All Alpha code is PIC.
4763dd52494dSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4764dd52494dSmrg        ;;
4765dd52494dSmrg      xl* | bgxl* | bgf* | mpixl*)
4766dd52494dSmrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4767dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4768dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4769dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4770dd52494dSmrg	;;
4771dd52494dSmrg      *)
477233adc6acSmrg	case `$CC -V 2>&1 | $SED 5q` in
4773dd52494dSmrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4774dd52494dSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4775dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4776dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4777dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4778dd52494dSmrg	  ;;
4779dd52494dSmrg	*Sun\ F* | *Sun*Fortran*)
4780dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4781dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4782dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4783dd52494dSmrg	  ;;
4784dd52494dSmrg	*Sun\ C*)
4785dd52494dSmrg	  # Sun C 5.9
4786dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4787dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4788dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4789dd52494dSmrg	  ;;
4790dd52494dSmrg        *Intel*\ [[CF]]*Compiler*)
4791dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4792dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4793dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4794dd52494dSmrg	  ;;
4795dd52494dSmrg	*Portland\ Group*)
4796dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4797dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4798dd52494dSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4799dd52494dSmrg	  ;;
4800dd52494dSmrg	esac
4801dd52494dSmrg	;;
4802dd52494dSmrg      esac
4803dd52494dSmrg      ;;
4804dd52494dSmrg
4805dd52494dSmrg    newsos6)
4806dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4807dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4808dd52494dSmrg      ;;
4809dd52494dSmrg
4810dd52494dSmrg    *nto* | *qnx*)
4811dd52494dSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
4812dd52494dSmrg      # it will coredump.
4813dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4814dd52494dSmrg      ;;
4815dd52494dSmrg
4816dd52494dSmrg    osf3* | osf4* | osf5*)
4817dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4818dd52494dSmrg      # All OSF/1 code is PIC.
4819dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4820dd52494dSmrg      ;;
4821dd52494dSmrg
4822dd52494dSmrg    rdos*)
4823dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4824dd52494dSmrg      ;;
4825dd52494dSmrg
4826dd52494dSmrg    solaris*)
4827dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4828dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4829dd52494dSmrg      case $cc_basename in
4830dd52494dSmrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4831dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4832dd52494dSmrg      *)
4833dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4834dd52494dSmrg      esac
4835dd52494dSmrg      ;;
4836dd52494dSmrg
4837dd52494dSmrg    sunos4*)
4838dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4839dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4840dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4841dd52494dSmrg      ;;
4842dd52494dSmrg
4843dd52494dSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
4844dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4845dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4846dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4847dd52494dSmrg      ;;
4848dd52494dSmrg
4849dd52494dSmrg    sysv4*MP*)
4850dd52494dSmrg      if test -d /usr/nec; then
4851dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4852dd52494dSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4853dd52494dSmrg      fi
4854dd52494dSmrg      ;;
4855dd52494dSmrg
4856dd52494dSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4857dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4858dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4859dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4860dd52494dSmrg      ;;
4861dd52494dSmrg
4862dd52494dSmrg    unicos*)
4863dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4864dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4865dd52494dSmrg      ;;
4866dd52494dSmrg
4867dd52494dSmrg    uts4*)
4868dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4869dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4870dd52494dSmrg      ;;
4871dd52494dSmrg
4872dd52494dSmrg    *)
4873dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4874dd52494dSmrg      ;;
4875dd52494dSmrg    esac
4876dd52494dSmrg  fi
4877dd52494dSmrg])
4878dd52494dSmrgcase $host_os in
4879dd52494dSmrg  # For platforms that do not support PIC, -DPIC is meaningless:
4880dd52494dSmrg  *djgpp*)
4881dd52494dSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4882dd52494dSmrg    ;;
4883dd52494dSmrg  *)
4884dd52494dSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4885dd52494dSmrg    ;;
4886dd52494dSmrgesac
4887dd52494dSmrg
4888dd52494dSmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
4889dd52494dSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4890dd52494dSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4891dd52494dSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4892dd52494dSmrg
4893dd52494dSmrg#
4894dd52494dSmrg# Check to make sure the PIC flag actually works.
4895dd52494dSmrg#
4896dd52494dSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4897dd52494dSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4898dd52494dSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4899dd52494dSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4900dd52494dSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4901dd52494dSmrg     "" | " "*) ;;
4902dd52494dSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4903dd52494dSmrg     esac],
4904dd52494dSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4905dd52494dSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4906dd52494dSmrgfi
4907dd52494dSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4908dd52494dSmrg	[Additional compiler flags for building library objects])
4909dd52494dSmrg
4910dd52494dSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4911dd52494dSmrg	[How to pass a linker flag through the compiler])
4912dd52494dSmrg#
4913dd52494dSmrg# Check to make sure the static flag actually works.
4914dd52494dSmrg#
4915dd52494dSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4916dd52494dSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4917dd52494dSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4918dd52494dSmrg  $lt_tmp_static_flag,
4919dd52494dSmrg  [],
4920dd52494dSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4921dd52494dSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4922dd52494dSmrg	[Compiler flag to prevent dynamic linking])
4923dd52494dSmrg])# _LT_COMPILER_PIC
4924dd52494dSmrg
4925dd52494dSmrg
4926dd52494dSmrg# _LT_LINKER_SHLIBS([TAGNAME])
4927dd52494dSmrg# ----------------------------
4928dd52494dSmrg# See if the linker supports building shared libraries.
4929dd52494dSmrgm4_defun([_LT_LINKER_SHLIBS],
4930dd52494dSmrg[AC_REQUIRE([LT_PATH_LD])dnl
4931dd52494dSmrgAC_REQUIRE([LT_PATH_NM])dnl
4932dd52494dSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
4933dd52494dSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
4934dd52494dSmrgm4_require([_LT_DECL_EGREP])dnl
4935dd52494dSmrgm4_require([_LT_DECL_SED])dnl
4936dd52494dSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4937dd52494dSmrgm4_require([_LT_TAG_COMPILER])dnl
4938dd52494dSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4939dd52494dSmrgm4_if([$1], [CXX], [
4940dd52494dSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4941dd52494dSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4942dd52494dSmrg  case $host_os in
4943dd52494dSmrg  aix[[4-9]]*)
4944dd52494dSmrg    # If we're using GNU nm, then we don't want the "-C" option.
4945dd52494dSmrg    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4946dd52494dSmrg    # Without the "-l" option, or with the "-B" option, AIX nm treats
4947dd52494dSmrg    # weak defined symbols like other global defined symbols, whereas
4948dd52494dSmrg    # GNU nm marks them as "W".
4949dd52494dSmrg    # While the 'weak' keyword is ignored in the Export File, we need
4950dd52494dSmrg    # it in the Import File for the 'aix-soname' feature, so we have
4951dd52494dSmrg    # to replace the "-B" option with "-P" for AIX nm.
4952dd52494dSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4953dd52494dSmrg      _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'
4954dd52494dSmrg    else
495533adc6acSmrg      _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 == "L") || (\$ 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'
4956dd52494dSmrg    fi
4957dd52494dSmrg    ;;
4958dd52494dSmrg  pw32*)
4959dd52494dSmrg    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
4960dd52494dSmrg    ;;
4961dd52494dSmrg  cygwin* | mingw* | cegcc*)
4962dd52494dSmrg    case $cc_basename in
496333adc6acSmrg    cl* | icl*)
4964dd52494dSmrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4965dd52494dSmrg      ;;
4966dd52494dSmrg    *)
4967dd52494dSmrg      _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'
4968dd52494dSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4969dd52494dSmrg      ;;
4970dd52494dSmrg    esac
4971dd52494dSmrg    ;;
4972dd52494dSmrg  *)
4973dd52494dSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4974dd52494dSmrg    ;;
4975dd52494dSmrg  esac
4976dd52494dSmrg], [
4977dd52494dSmrg  runpath_var=
4978dd52494dSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
4979dd52494dSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
4980dd52494dSmrg  _LT_TAGVAR(archive_cmds, $1)=
4981dd52494dSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
4982dd52494dSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
4983dd52494dSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4984dd52494dSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4985dd52494dSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4986dd52494dSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
4987dd52494dSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
4988dd52494dSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4989dd52494dSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4990dd52494dSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4991dd52494dSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
4992dd52494dSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4993dd52494dSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
4994dd52494dSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4995dd52494dSmrg  _LT_TAGVAR(module_cmds, $1)=
4996dd52494dSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
4997dd52494dSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4998dd52494dSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4999dd52494dSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5000dd52494dSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5001dd52494dSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
5002dd52494dSmrg  # included in the symbol list
5003dd52494dSmrg  _LT_TAGVAR(include_expsyms, $1)=
5004dd52494dSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
5005dd52494dSmrg  # it will be wrapped by ' (' and ')$', so one must not match beginning or
5006dd52494dSmrg  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
5007dd52494dSmrg  # as well as any symbol that contains 'd'.
5008dd52494dSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5009dd52494dSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5010dd52494dSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
5011dd52494dSmrg  # the symbol is explicitly referenced.  Since portable code cannot
5012dd52494dSmrg  # rely on this symbol name, it's probably fine to never include it in
5013dd52494dSmrg  # preloaded symbol tables.
5014dd52494dSmrg  # Exclude shared library initialization/finalization symbols.
5015dd52494dSmrgdnl Note also adjust exclude_expsyms for C++ above.
5016dd52494dSmrg  extract_expsyms_cmds=
5017dd52494dSmrg
5018dd52494dSmrg  case $host_os in
5019dd52494dSmrg  cygwin* | mingw* | pw32* | cegcc*)
502033adc6acSmrg    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
5021dd52494dSmrg    # When not using gcc, we currently assume that we are using
502233adc6acSmrg    # Microsoft Visual C++ or Intel C++ Compiler.
5023dd52494dSmrg    if test yes != "$GCC"; then
5024dd52494dSmrg      with_gnu_ld=no
5025dd52494dSmrg    fi
5026dd52494dSmrg    ;;
5027dd52494dSmrg  interix*)
502833adc6acSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
5029dd52494dSmrg    with_gnu_ld=yes
5030dd52494dSmrg    ;;
5031dd52494dSmrg  openbsd* | bitrig*)
5032dd52494dSmrg    with_gnu_ld=no
5033dd52494dSmrg    ;;
5034dd52494dSmrg  esac
5035dd52494dSmrg
5036dd52494dSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
5037dd52494dSmrg
5038dd52494dSmrg  # On some targets, GNU ld is compatible enough with the native linker
5039dd52494dSmrg  # that we're better off using the native interface for both.
5040dd52494dSmrg  lt_use_gnu_ld_interface=no
5041dd52494dSmrg  if test yes = "$with_gnu_ld"; then
5042dd52494dSmrg    case $host_os in
5043dd52494dSmrg      aix*)
5044dd52494dSmrg	# The AIX port of GNU ld has always aspired to compatibility
5045dd52494dSmrg	# with the native linker.  However, as the warning in the GNU ld
5046dd52494dSmrg	# block says, versions before 2.19.5* couldn't really create working
5047dd52494dSmrg	# shared libraries, regardless of the interface used.
5048dd52494dSmrg	case `$LD -v 2>&1` in
5049dd52494dSmrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5050dd52494dSmrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5051dd52494dSmrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5052dd52494dSmrg	  *)
5053dd52494dSmrg	    lt_use_gnu_ld_interface=yes
5054dd52494dSmrg	    ;;
5055dd52494dSmrg	esac
5056dd52494dSmrg	;;
5057dd52494dSmrg      *)
5058dd52494dSmrg	lt_use_gnu_ld_interface=yes
5059dd52494dSmrg	;;
5060dd52494dSmrg    esac
5061dd52494dSmrg  fi
5062dd52494dSmrg
5063dd52494dSmrg  if test yes = "$lt_use_gnu_ld_interface"; then
5064dd52494dSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
5065dd52494dSmrg    wlarc='$wl'
5066dd52494dSmrg
5067dd52494dSmrg    # Set some defaults for GNU ld with shared library support. These
5068dd52494dSmrg    # are reset later if shared libraries are not supported. Putting them
5069dd52494dSmrg    # here allows them to be overridden if necessary.
5070dd52494dSmrg    runpath_var=LD_RUN_PATH
5071dd52494dSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5072dd52494dSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5073dd52494dSmrg    # ancient GNU ld didn't support --whole-archive et. al.
5074dd52494dSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5075dd52494dSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5076dd52494dSmrg    else
5077dd52494dSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5078dd52494dSmrg    fi
5079dd52494dSmrg    supports_anon_versioning=no
508033adc6acSmrg    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
5081dd52494dSmrg      *GNU\ gold*) supports_anon_versioning=yes ;;
5082dd52494dSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5083dd52494dSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5084dd52494dSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5085dd52494dSmrg      *\ 2.11.*) ;; # other 2.11 versions
5086dd52494dSmrg      *) supports_anon_versioning=yes ;;
5087dd52494dSmrg    esac
5088dd52494dSmrg
5089dd52494dSmrg    # See if GNU ld supports shared libraries.
5090dd52494dSmrg    case $host_os in
5091dd52494dSmrg    aix[[3-9]]*)
5092dd52494dSmrg      # On AIX/PPC, the GNU linker is very broken
5093dd52494dSmrg      if test ia64 != "$host_cpu"; then
5094dd52494dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
5095dd52494dSmrg	cat <<_LT_EOF 1>&2
5096dd52494dSmrg
5097dd52494dSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported
5098dd52494dSmrg*** to be unable to reliably create shared libraries on AIX.
5099dd52494dSmrg*** Therefore, libtool is disabling shared libraries support.  If you
5100dd52494dSmrg*** really care for shared libraries, you may want to install binutils
5101dd52494dSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5102dd52494dSmrg*** You will then need to restart the configuration process.
5103dd52494dSmrg
5104dd52494dSmrg_LT_EOF
5105dd52494dSmrg      fi
5106dd52494dSmrg      ;;
5107dd52494dSmrg
5108dd52494dSmrg    amigaos*)
5109dd52494dSmrg      case $host_cpu in
5110dd52494dSmrg      powerpc)
5111dd52494dSmrg            # see comment about AmigaOS4 .so support
5112dd52494dSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5113dd52494dSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5114dd52494dSmrg        ;;
5115dd52494dSmrg      m68k)
5116dd52494dSmrg            _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)'
5117dd52494dSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5118dd52494dSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5119dd52494dSmrg        ;;
5120dd52494dSmrg      esac
5121dd52494dSmrg      ;;
5122dd52494dSmrg
5123dd52494dSmrg    beos*)
5124dd52494dSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5125dd52494dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5126dd52494dSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5127dd52494dSmrg	# support --undefined.  This deserves some investigation.  FIXME
5128dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5129dd52494dSmrg      else
5130dd52494dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
5131dd52494dSmrg      fi
5132dd52494dSmrg      ;;
5133dd52494dSmrg
5134dd52494dSmrg    cygwin* | mingw* | pw32* | cegcc*)
5135dd52494dSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5136dd52494dSmrg      # as there is no search path for DLLs.
5137dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5138dd52494dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5139dd52494dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5140dd52494dSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
5141dd52494dSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5142dd52494dSmrg      _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'
5143dd52494dSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5144dd52494dSmrg
5145dd52494dSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5146dd52494dSmrg        _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'
5147dd52494dSmrg	# If the export-symbols file already is a .def file, use it as
5148dd52494dSmrg	# is; otherwise, prepend EXPORTS...
5149dd52494dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5150dd52494dSmrg          cp $export_symbols $output_objdir/$soname.def;
5151dd52494dSmrg        else
5152dd52494dSmrg          echo EXPORTS > $output_objdir/$soname.def;
5153dd52494dSmrg          cat $export_symbols >> $output_objdir/$soname.def;
5154dd52494dSmrg        fi~
5155dd52494dSmrg        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5156dd52494dSmrg      else
5157dd52494dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
5158dd52494dSmrg      fi
5159dd52494dSmrg      ;;
5160dd52494dSmrg
5161dd52494dSmrg    haiku*)
5162dd52494dSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5163dd52494dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5164dd52494dSmrg      ;;
5165dd52494dSmrg
5166dd52494dSmrg    os2*)
5167dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5168dd52494dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5169dd52494dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5170dd52494dSmrg      shrext_cmds=.dll
5171dd52494dSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5172dd52494dSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5173dd52494dSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5174dd52494dSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
5175dd52494dSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5176dd52494dSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5177dd52494dSmrg	emximp -o $lib $output_objdir/$libname.def'
5178dd52494dSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5179dd52494dSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5180dd52494dSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5181dd52494dSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
5182dd52494dSmrg	prefix_cmds="$SED"~
5183dd52494dSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5184dd52494dSmrg	  prefix_cmds="$prefix_cmds -e 1d";
5185dd52494dSmrg	fi~
5186dd52494dSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5187dd52494dSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5188dd52494dSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5189dd52494dSmrg	emximp -o $lib $output_objdir/$libname.def'
5190dd52494dSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5191dd52494dSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
519233adc6acSmrg      _LT_TAGVAR(file_list_spec, $1)='@'
5193dd52494dSmrg      ;;
5194dd52494dSmrg
5195dd52494dSmrg    interix[[3-9]]*)
5196dd52494dSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
5197dd52494dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5198dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5199dd52494dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5200dd52494dSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5201dd52494dSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
5202dd52494dSmrg      # default) and relocated if they conflict, which is a slow very memory
5203dd52494dSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
5204dd52494dSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5205dd52494dSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5206dd52494dSmrg      _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'
520733adc6acSmrg      _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'
5208dd52494dSmrg      ;;
5209dd52494dSmrg
5210dd52494dSmrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5211dd52494dSmrg      tmp_diet=no
5212dd52494dSmrg      if test linux-dietlibc = "$host_os"; then
5213dd52494dSmrg	case $cc_basename in
5214dd52494dSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5215dd52494dSmrg	esac
5216dd52494dSmrg      fi
5217dd52494dSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5218dd52494dSmrg	 && test no = "$tmp_diet"
5219dd52494dSmrg      then
5220dd52494dSmrg	tmp_addflag=' $pic_flag'
5221dd52494dSmrg	tmp_sharedflag='-shared'
5222dd52494dSmrg	case $cc_basename,$host_cpu in
5223dd52494dSmrg        pgcc*)				# Portland Group C compiler
5224dd52494dSmrg	  _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'
5225dd52494dSmrg	  tmp_addflag=' $pic_flag'
5226dd52494dSmrg	  ;;
5227dd52494dSmrg	pgf77* | pgf90* | pgf95* | pgfortran*)
5228dd52494dSmrg					# Portland Group f77 and f90 compilers
5229dd52494dSmrg	  _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'
5230dd52494dSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
5231dd52494dSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5232dd52494dSmrg	  tmp_addflag=' -i_dynamic' ;;
5233dd52494dSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5234dd52494dSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5235dd52494dSmrg	ifc* | ifort*)			# Intel Fortran compiler
5236dd52494dSmrg	  tmp_addflag=' -nofor_main' ;;
5237dd52494dSmrg	lf95*)				# Lahey Fortran 8.1
5238dd52494dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5239dd52494dSmrg	  tmp_sharedflag='--shared' ;;
5240dd52494dSmrg        nagfor*)                        # NAGFOR 5.3
5241dd52494dSmrg          tmp_sharedflag='-Wl,-shared' ;;
5242dd52494dSmrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5243dd52494dSmrg	  tmp_sharedflag='-qmkshrobj'
5244dd52494dSmrg	  tmp_addflag= ;;
5245dd52494dSmrg	nvcc*)	# Cuda Compiler Driver 2.2
5246dd52494dSmrg	  _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'
5247dd52494dSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5248dd52494dSmrg	  ;;
5249dd52494dSmrg	esac
525033adc6acSmrg	case `$CC -V 2>&1 | $SED 5q` in
5251dd52494dSmrg	*Sun\ C*)			# Sun C 5.9
5252dd52494dSmrg	  _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'
5253dd52494dSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5254dd52494dSmrg	  tmp_sharedflag='-G' ;;
5255dd52494dSmrg	*Sun\ F*)			# Sun Fortran 8.3
5256dd52494dSmrg	  tmp_sharedflag='-G' ;;
5257dd52494dSmrg	esac
5258dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5259dd52494dSmrg
5260dd52494dSmrg        if test yes = "$supports_anon_versioning"; then
5261dd52494dSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
526233adc6acSmrg            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5263dd52494dSmrg            echo "local: *; };" >> $output_objdir/$libname.ver~
5264dd52494dSmrg            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5265dd52494dSmrg        fi
5266dd52494dSmrg
5267dd52494dSmrg	case $cc_basename in
5268dd52494dSmrg	tcc*)
5269dd52494dSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5270dd52494dSmrg	  ;;
5271dd52494dSmrg	xlf* | bgf* | bgxlf* | mpixlf*)
5272dd52494dSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5273dd52494dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5274dd52494dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5275dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5276dd52494dSmrg	  if test yes = "$supports_anon_versioning"; then
5277dd52494dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
527833adc6acSmrg              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5279dd52494dSmrg              echo "local: *; };" >> $output_objdir/$libname.ver~
5280dd52494dSmrg              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5281dd52494dSmrg	  fi
5282dd52494dSmrg	  ;;
5283dd52494dSmrg	esac
5284dd52494dSmrg      else
5285dd52494dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
5286dd52494dSmrg      fi
5287dd52494dSmrg      ;;
5288dd52494dSmrg
5289dd52494dSmrg    netbsd*)
5290dd52494dSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5291dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5292dd52494dSmrg	wlarc=
5293dd52494dSmrg      else
5294dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5295dd52494dSmrg	_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'
5296dd52494dSmrg      fi
5297dd52494dSmrg      ;;
5298dd52494dSmrg
5299dd52494dSmrg    solaris*)
5300dd52494dSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5301dd52494dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
5302dd52494dSmrg	cat <<_LT_EOF 1>&2
5303dd52494dSmrg
5304dd52494dSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5305dd52494dSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
5306dd52494dSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
5307dd52494dSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
5308dd52494dSmrg*** your PATH or compiler configuration so that the native linker is
5309dd52494dSmrg*** used, and then restart.
5310dd52494dSmrg
5311dd52494dSmrg_LT_EOF
5312dd52494dSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5313dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5314dd52494dSmrg	_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'
5315dd52494dSmrg      else
5316dd52494dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
5317dd52494dSmrg      fi
5318dd52494dSmrg      ;;
5319dd52494dSmrg
5320dd52494dSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5321dd52494dSmrg      case `$LD -v 2>&1` in
5322dd52494dSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5323dd52494dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
5324dd52494dSmrg	cat <<_LT_EOF 1>&2
5325dd52494dSmrg
5326dd52494dSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5327dd52494dSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
5328dd52494dSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
5329dd52494dSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5330dd52494dSmrg*** your PATH or compiler configuration so that the native linker is
5331dd52494dSmrg*** used, and then restart.
5332dd52494dSmrg
5333dd52494dSmrg_LT_EOF
5334dd52494dSmrg	;;
5335dd52494dSmrg	*)
5336dd52494dSmrg	  # For security reasons, it is highly recommended that you always
5337dd52494dSmrg	  # use absolute paths for naming shared libraries, and exclude the
5338dd52494dSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
5339dd52494dSmrg	  # requires that you compile everything twice, which is a pain.
5340dd52494dSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5341dd52494dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5342dd52494dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5343dd52494dSmrg	    _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'
5344dd52494dSmrg	  else
5345dd52494dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
5346dd52494dSmrg	  fi
5347dd52494dSmrg	;;
5348dd52494dSmrg      esac
5349dd52494dSmrg      ;;
5350dd52494dSmrg
5351dd52494dSmrg    sunos4*)
5352dd52494dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5353dd52494dSmrg      wlarc=
5354dd52494dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5355dd52494dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5356dd52494dSmrg      ;;
5357dd52494dSmrg
5358dd52494dSmrg    *)
5359dd52494dSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5360dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5361dd52494dSmrg	_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'
5362dd52494dSmrg      else
5363dd52494dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
5364dd52494dSmrg      fi
5365dd52494dSmrg      ;;
5366dd52494dSmrg    esac
5367dd52494dSmrg
5368dd52494dSmrg    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5369dd52494dSmrg      runpath_var=
5370dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5371dd52494dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5372dd52494dSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5373dd52494dSmrg    fi
5374dd52494dSmrg  else
5375dd52494dSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
5376dd52494dSmrg    case $host_os in
5377dd52494dSmrg    aix3*)
5378dd52494dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5379dd52494dSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
5380dd52494dSmrg      _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'
5381dd52494dSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
5382dd52494dSmrg      # are no directories specified by -L.
5383dd52494dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5384dd52494dSmrg      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5385dd52494dSmrg	# Neither direct hardcoding nor static linking is supported with a
5386dd52494dSmrg	# broken collect2.
5387dd52494dSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5388dd52494dSmrg      fi
5389dd52494dSmrg      ;;
5390dd52494dSmrg
5391dd52494dSmrg    aix[[4-9]]*)
5392dd52494dSmrg      if test ia64 = "$host_cpu"; then
5393dd52494dSmrg	# On IA64, the linker does run time linking by default, so we don't
5394dd52494dSmrg	# have to do anything special.
5395dd52494dSmrg	aix_use_runtimelinking=no
5396dd52494dSmrg	exp_sym_flag='-Bexport'
5397dd52494dSmrg	no_entry_flag=
5398dd52494dSmrg      else
5399dd52494dSmrg	# If we're using GNU nm, then we don't want the "-C" option.
5400dd52494dSmrg	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
5401dd52494dSmrg	# Without the "-l" option, or with the "-B" option, AIX nm treats
5402dd52494dSmrg	# weak defined symbols like other global defined symbols, whereas
5403dd52494dSmrg	# GNU nm marks them as "W".
5404dd52494dSmrg	# While the 'weak' keyword is ignored in the Export File, we need
5405dd52494dSmrg	# it in the Import File for the 'aix-soname' feature, so we have
5406dd52494dSmrg	# to replace the "-B" option with "-P" for AIX nm.
5407dd52494dSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5408dd52494dSmrg	  _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'
5409dd52494dSmrg	else
541033adc6acSmrg	  _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 == "L") || (\$ 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'
5411dd52494dSmrg	fi
5412dd52494dSmrg	aix_use_runtimelinking=no
5413dd52494dSmrg
5414dd52494dSmrg	# Test if we are trying to use run time linking or normal
5415dd52494dSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5416dd52494dSmrg	# have runtime linking enabled, and use it for executables.
5417dd52494dSmrg	# For shared libraries, we enable/disable runtime linking
5418dd52494dSmrg	# depending on the kind of the shared library created -
5419dd52494dSmrg	# when "with_aix_soname,aix_use_runtimelinking" is:
5420dd52494dSmrg	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
5421dd52494dSmrg	# "aix,yes"  lib.so          shared, rtl:yes, for executables
5422dd52494dSmrg	#            lib.a           static archive
5423dd52494dSmrg	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
5424dd52494dSmrg	#            lib.a(lib.so.V) shared, rtl:no,  for executables
5425dd52494dSmrg	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5426dd52494dSmrg	#            lib.a(lib.so.V) shared, rtl:no
5427dd52494dSmrg	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
5428dd52494dSmrg	#            lib.a           static archive
5429dd52494dSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5430dd52494dSmrg	  for ld_flag in $LDFLAGS; do
5431dd52494dSmrg	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5432dd52494dSmrg	    aix_use_runtimelinking=yes
5433dd52494dSmrg	    break
5434dd52494dSmrg	  fi
5435dd52494dSmrg	  done
5436dd52494dSmrg	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5437dd52494dSmrg	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
5438dd52494dSmrg	    # so we don't have lib.a shared libs to link our executables.
5439dd52494dSmrg	    # We have to force runtime linking in this case.
5440dd52494dSmrg	    aix_use_runtimelinking=yes
5441dd52494dSmrg	    LDFLAGS="$LDFLAGS -Wl,-brtl"
5442dd52494dSmrg	  fi
5443dd52494dSmrg	  ;;
5444dd52494dSmrg	esac
5445dd52494dSmrg
5446dd52494dSmrg	exp_sym_flag='-bexport'
5447dd52494dSmrg	no_entry_flag='-bnoentry'
5448dd52494dSmrg      fi
5449dd52494dSmrg
5450dd52494dSmrg      # When large executables or shared objects are built, AIX ld can
5451dd52494dSmrg      # have problems creating the table of contents.  If linking a library
5452dd52494dSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
5453dd52494dSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5454dd52494dSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5455dd52494dSmrg
5456dd52494dSmrg      _LT_TAGVAR(archive_cmds, $1)=''
5457dd52494dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5458dd52494dSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5459dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5460dd52494dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5461dd52494dSmrg      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5462dd52494dSmrg      case $with_aix_soname,$aix_use_runtimelinking in
5463dd52494dSmrg      aix,*) ;; # traditional, no import file
5464dd52494dSmrg      svr4,* | *,yes) # use import file
5465dd52494dSmrg	# The Import File defines what to hardcode.
5466dd52494dSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
5467dd52494dSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5468dd52494dSmrg	;;
5469dd52494dSmrg      esac
5470dd52494dSmrg
5471dd52494dSmrg      if test yes = "$GCC"; then
5472dd52494dSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5473dd52494dSmrg	# We only want to do this on AIX 4.2 and lower, the check
5474dd52494dSmrg	# below for broken collect2 doesn't work under 4.3+
5475dd52494dSmrg	  collect2name=`$CC -print-prog-name=collect2`
5476dd52494dSmrg	  if test -f "$collect2name" &&
5477dd52494dSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5478dd52494dSmrg	  then
5479dd52494dSmrg	  # We have reworked collect2
5480dd52494dSmrg	  :
5481dd52494dSmrg	  else
5482dd52494dSmrg	  # We have old collect2
5483dd52494dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5484dd52494dSmrg	  # It fails to find uninstalled libraries when the uninstalled
5485dd52494dSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
5486dd52494dSmrg	  # to unsupported forces relinking
5487dd52494dSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5488dd52494dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5489dd52494dSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5490dd52494dSmrg	  fi
5491dd52494dSmrg	  ;;
5492dd52494dSmrg	esac
5493dd52494dSmrg	shared_flag='-shared'
5494dd52494dSmrg	if test yes = "$aix_use_runtimelinking"; then
5495dd52494dSmrg	  shared_flag="$shared_flag "'$wl-G'
5496dd52494dSmrg	fi
5497dd52494dSmrg	# Need to ensure runtime linking is disabled for the traditional
5498dd52494dSmrg	# shared library, or the linker may eventually find shared libraries
5499dd52494dSmrg	# /with/ Import File - we do not want to mix them.
5500dd52494dSmrg	shared_flag_aix='-shared'
5501dd52494dSmrg	shared_flag_svr4='-shared $wl-G'
5502dd52494dSmrg      else
5503dd52494dSmrg	# not using gcc
5504dd52494dSmrg	if test ia64 = "$host_cpu"; then
5505dd52494dSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5506dd52494dSmrg	# chokes on -Wl,-G. The following line is correct:
5507dd52494dSmrg	  shared_flag='-G'
5508dd52494dSmrg	else
5509dd52494dSmrg	  if test yes = "$aix_use_runtimelinking"; then
5510dd52494dSmrg	    shared_flag='$wl-G'
5511dd52494dSmrg	  else
5512dd52494dSmrg	    shared_flag='$wl-bM:SRE'
5513dd52494dSmrg	  fi
5514dd52494dSmrg	  shared_flag_aix='$wl-bM:SRE'
5515dd52494dSmrg	  shared_flag_svr4='$wl-G'
5516dd52494dSmrg	fi
5517dd52494dSmrg      fi
5518dd52494dSmrg
5519dd52494dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5520dd52494dSmrg      # It seems that -bexpall does not export symbols beginning with
5521dd52494dSmrg      # underscore (_), so it is better to generate a list of symbols to export.
5522dd52494dSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
5523dd52494dSmrg      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5524dd52494dSmrg	# Warning - without using the other runtime loading flags (-brtl),
5525dd52494dSmrg	# -berok will link without error, but may produce a broken library.
5526dd52494dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5527dd52494dSmrg        # Determine the default libpath from the value encoded in an
5528dd52494dSmrg        # empty executable.
5529dd52494dSmrg        _LT_SYS_MODULE_PATH_AIX([$1])
5530dd52494dSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5531dd52494dSmrg        _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
5532dd52494dSmrg      else
5533dd52494dSmrg	if test ia64 = "$host_cpu"; then
5534dd52494dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5535dd52494dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5536dd52494dSmrg	  _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"
5537dd52494dSmrg	else
5538dd52494dSmrg	 # Determine the default libpath from the value encoded in an
5539dd52494dSmrg	 # empty executable.
5540dd52494dSmrg	 _LT_SYS_MODULE_PATH_AIX([$1])
5541dd52494dSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5542dd52494dSmrg	  # Warning - without using the other run time loading flags,
5543dd52494dSmrg	  # -berok will link without error, but may produce a broken library.
5544dd52494dSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5545dd52494dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5546dd52494dSmrg	  if test yes = "$with_gnu_ld"; then
5547dd52494dSmrg	    # We only use this code for GNU lds that support --whole-archive.
5548dd52494dSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5549dd52494dSmrg	  else
5550dd52494dSmrg	    # Exported symbols can be pulled into shared objects from archives
5551dd52494dSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5552dd52494dSmrg	  fi
5553dd52494dSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5554dd52494dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5555dd52494dSmrg	  # -brtl affects multiple linker settings, -berok does not and is overridden later
5556dd52494dSmrg	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5557dd52494dSmrg	  if test svr4 != "$with_aix_soname"; then
5558dd52494dSmrg	    # This is similar to how AIX traditionally builds its shared libraries.
5559dd52494dSmrg	    _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'
5560dd52494dSmrg	  fi
5561dd52494dSmrg	  if test aix != "$with_aix_soname"; then
5562dd52494dSmrg	    _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'
5563dd52494dSmrg	  else
5564dd52494dSmrg	    # used by -dlpreopen to get the symbols
5565dd52494dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
5566dd52494dSmrg	  fi
5567dd52494dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5568dd52494dSmrg	fi
5569dd52494dSmrg      fi
5570dd52494dSmrg      ;;
5571dd52494dSmrg
5572dd52494dSmrg    amigaos*)
5573dd52494dSmrg      case $host_cpu in
5574dd52494dSmrg      powerpc)
5575dd52494dSmrg            # see comment about AmigaOS4 .so support
5576dd52494dSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5577dd52494dSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5578dd52494dSmrg        ;;
5579dd52494dSmrg      m68k)
5580dd52494dSmrg            _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)'
5581dd52494dSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5582dd52494dSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5583dd52494dSmrg        ;;
5584dd52494dSmrg      esac
5585dd52494dSmrg      ;;
5586dd52494dSmrg
5587dd52494dSmrg    bsdi[[45]]*)
5588dd52494dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5589dd52494dSmrg      ;;
5590dd52494dSmrg
5591dd52494dSmrg    cygwin* | mingw* | pw32* | cegcc*)
5592dd52494dSmrg      # When not using gcc, we currently assume that we are using
559333adc6acSmrg      # Microsoft Visual C++ or Intel C++ Compiler.
5594dd52494dSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
5595dd52494dSmrg      # no search path for DLLs.
5596dd52494dSmrg      case $cc_basename in
559733adc6acSmrg      cl* | icl*)
559833adc6acSmrg	# Native MSVC or ICC
5599dd52494dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5600dd52494dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5601dd52494dSmrg	_LT_TAGVAR(always_export_symbols, $1)=yes
5602dd52494dSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
5603dd52494dSmrg	# Tell ltmain to make .lib files, not .a files.
5604dd52494dSmrg	libext=lib
5605dd52494dSmrg	# Tell ltmain to make .dll files, not .so files.
5606dd52494dSmrg	shrext_cmds=.dll
5607dd52494dSmrg	# FIXME: Setting linknames here is a bad hack.
5608dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5609dd52494dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5610dd52494dSmrg            cp "$export_symbols" "$output_objdir/$soname.def";
5611dd52494dSmrg            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5612dd52494dSmrg          else
5613dd52494dSmrg            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5614dd52494dSmrg          fi~
5615dd52494dSmrg          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5616dd52494dSmrg          linknames='
5617dd52494dSmrg	# The linker will not automatically build a static lib if we build a DLL.
5618dd52494dSmrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5619dd52494dSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5620dd52494dSmrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5621dd52494dSmrg	_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'
5622dd52494dSmrg	# Don't use ranlib
5623dd52494dSmrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5624dd52494dSmrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5625dd52494dSmrg          lt_tool_outputfile="@TOOL_OUTPUT@"~
5626dd52494dSmrg          case $lt_outputfile in
5627dd52494dSmrg            *.exe|*.EXE) ;;
5628dd52494dSmrg            *)
5629dd52494dSmrg              lt_outputfile=$lt_outputfile.exe
5630dd52494dSmrg              lt_tool_outputfile=$lt_tool_outputfile.exe
5631dd52494dSmrg              ;;
5632dd52494dSmrg          esac~
5633dd52494dSmrg          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5634dd52494dSmrg            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5635dd52494dSmrg            $RM "$lt_outputfile.manifest";
5636dd52494dSmrg          fi'
5637dd52494dSmrg	;;
5638dd52494dSmrg      *)
563933adc6acSmrg	# Assume MSVC and ICC wrapper
5640dd52494dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5641dd52494dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5642dd52494dSmrg	# Tell ltmain to make .lib files, not .a files.
5643dd52494dSmrg	libext=lib
5644dd52494dSmrg	# Tell ltmain to make .dll files, not .so files.
5645dd52494dSmrg	shrext_cmds=.dll
5646dd52494dSmrg	# FIXME: Setting linknames here is a bad hack.
5647dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5648dd52494dSmrg	# The linker will automatically build a .lib file if we build a DLL.
5649dd52494dSmrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5650dd52494dSmrg	# FIXME: Should let the user specify the lib program.
5651dd52494dSmrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5652dd52494dSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5653dd52494dSmrg	;;
5654dd52494dSmrg      esac
5655dd52494dSmrg      ;;
5656dd52494dSmrg
5657dd52494dSmrg    darwin* | rhapsody*)
5658dd52494dSmrg      _LT_DARWIN_LINKER_FEATURES($1)
5659dd52494dSmrg      ;;
5660dd52494dSmrg
5661dd52494dSmrg    dgux*)
5662dd52494dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5663dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5664dd52494dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5665dd52494dSmrg      ;;
5666dd52494dSmrg
5667dd52494dSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5668dd52494dSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
5669dd52494dSmrg    # does not break anything, and helps significantly (at the cost of a little
5670dd52494dSmrg    # extra space).
5671dd52494dSmrg    freebsd2.2*)
5672dd52494dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5673dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5674dd52494dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5675dd52494dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5676dd52494dSmrg      ;;
5677dd52494dSmrg
5678dd52494dSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5679dd52494dSmrg    freebsd2.*)
5680dd52494dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5681dd52494dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5682dd52494dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5683dd52494dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5684dd52494dSmrg      ;;
5685dd52494dSmrg
5686dd52494dSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
568733adc6acSmrg    freebsd* | dragonfly* | midnightbsd*)
5688dd52494dSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5689dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5690dd52494dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5691dd52494dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5692dd52494dSmrg      ;;
5693dd52494dSmrg
5694dd52494dSmrg    hpux9*)
5695dd52494dSmrg      if test yes = "$GCC"; then
5696dd52494dSmrg	_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'
5697dd52494dSmrg      else
5698dd52494dSmrg	_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'
5699dd52494dSmrg      fi
5700dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5701dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5702dd52494dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5703dd52494dSmrg
5704dd52494dSmrg      # hardcode_minus_L: Not really in the search PATH,
5705dd52494dSmrg      # but as the default location of the library.
5706dd52494dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5707dd52494dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5708dd52494dSmrg      ;;
5709dd52494dSmrg
5710dd52494dSmrg    hpux10*)
5711dd52494dSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
5712dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5713dd52494dSmrg      else
5714dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5715dd52494dSmrg      fi
5716dd52494dSmrg      if test no = "$with_gnu_ld"; then
5717dd52494dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5718dd52494dSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5719dd52494dSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
5720dd52494dSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5721dd52494dSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5722dd52494dSmrg	# hardcode_minus_L: Not really in the search PATH,
5723dd52494dSmrg	# but as the default location of the library.
5724dd52494dSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5725dd52494dSmrg      fi
5726dd52494dSmrg      ;;
5727dd52494dSmrg
5728dd52494dSmrg    hpux11*)
5729dd52494dSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
5730dd52494dSmrg	case $host_cpu in
5731dd52494dSmrg	hppa*64*)
5732dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5733dd52494dSmrg	  ;;
5734dd52494dSmrg	ia64*)
5735dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5736dd52494dSmrg	  ;;
5737dd52494dSmrg	*)
5738dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5739dd52494dSmrg	  ;;
5740dd52494dSmrg	esac
5741dd52494dSmrg      else
5742dd52494dSmrg	case $host_cpu in
5743dd52494dSmrg	hppa*64*)
5744dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5745dd52494dSmrg	  ;;
5746dd52494dSmrg	ia64*)
5747dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5748dd52494dSmrg	  ;;
5749dd52494dSmrg	*)
5750dd52494dSmrg	m4_if($1, [], [
5751dd52494dSmrg	  # Older versions of the 11.00 compiler do not understand -b yet
5752dd52494dSmrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5753dd52494dSmrg	  _LT_LINKER_OPTION([if $CC understands -b],
5754dd52494dSmrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5755dd52494dSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5756dd52494dSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5757dd52494dSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5758dd52494dSmrg	  ;;
5759dd52494dSmrg	esac
5760dd52494dSmrg      fi
5761dd52494dSmrg      if test no = "$with_gnu_ld"; then
5762dd52494dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5763dd52494dSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5764dd52494dSmrg
5765dd52494dSmrg	case $host_cpu in
5766dd52494dSmrg	hppa*64*|ia64*)
5767dd52494dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
5768dd52494dSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5769dd52494dSmrg	  ;;
5770dd52494dSmrg	*)
5771dd52494dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
5772dd52494dSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5773dd52494dSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5774dd52494dSmrg
5775dd52494dSmrg	  # hardcode_minus_L: Not really in the search PATH,
5776dd52494dSmrg	  # but as the default location of the library.
5777dd52494dSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5778dd52494dSmrg	  ;;
5779dd52494dSmrg	esac
5780dd52494dSmrg      fi
5781dd52494dSmrg      ;;
5782dd52494dSmrg
5783dd52494dSmrg    irix5* | irix6* | nonstopux*)
5784dd52494dSmrg      if test yes = "$GCC"; then
5785dd52494dSmrg	_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'
5786dd52494dSmrg	# Try to use the -exported_symbol ld option, if it does not
5787dd52494dSmrg	# work, assume that -exports_file does not work either and
5788dd52494dSmrg	# implicitly export all symbols.
5789dd52494dSmrg	# This should be the same for all languages, so no per-tag cache variable.
5790dd52494dSmrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5791dd52494dSmrg	  [lt_cv_irix_exported_symbol],
5792dd52494dSmrg	  [save_LDFLAGS=$LDFLAGS
5793dd52494dSmrg	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
5794dd52494dSmrg	   AC_LINK_IFELSE(
5795dd52494dSmrg	     [AC_LANG_SOURCE(
5796dd52494dSmrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5797dd52494dSmrg			      [C++], [[int foo (void) { return 0; }]],
5798dd52494dSmrg			      [Fortran 77], [[
5799dd52494dSmrg      subroutine foo
5800dd52494dSmrg      end]],
5801dd52494dSmrg			      [Fortran], [[
5802dd52494dSmrg      subroutine foo
5803dd52494dSmrg      end]])])],
5804dd52494dSmrg	      [lt_cv_irix_exported_symbol=yes],
5805dd52494dSmrg	      [lt_cv_irix_exported_symbol=no])
5806dd52494dSmrg           LDFLAGS=$save_LDFLAGS])
5807dd52494dSmrg	if test yes = "$lt_cv_irix_exported_symbol"; then
5808dd52494dSmrg          _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'
5809dd52494dSmrg	fi
5810dd52494dSmrg      else
5811dd52494dSmrg	_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'
5812dd52494dSmrg	_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'
5813dd52494dSmrg      fi
5814dd52494dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5815dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5816dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5817dd52494dSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
5818dd52494dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5819dd52494dSmrg      ;;
5820dd52494dSmrg
5821dd52494dSmrg    linux*)
5822dd52494dSmrg      case $cc_basename in
5823dd52494dSmrg      tcc*)
5824dd52494dSmrg	# Fabrice Bellard et al's Tiny C Compiler
5825dd52494dSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
5826dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5827dd52494dSmrg	;;
5828dd52494dSmrg      esac
5829dd52494dSmrg      ;;
5830dd52494dSmrg
5831dd52494dSmrg    netbsd*)
5832dd52494dSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5833dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5834dd52494dSmrg      else
5835dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5836dd52494dSmrg      fi
5837dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5838dd52494dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5839dd52494dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5840dd52494dSmrg      ;;
5841dd52494dSmrg
5842dd52494dSmrg    newsos6)
5843dd52494dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5844dd52494dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5845dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5846dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5847dd52494dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5848dd52494dSmrg      ;;
5849dd52494dSmrg
5850dd52494dSmrg    *nto* | *qnx*)
5851dd52494dSmrg      ;;
5852dd52494dSmrg
5853dd52494dSmrg    openbsd* | bitrig*)
5854dd52494dSmrg      if test -f /usr/libexec/ld.so; then
5855dd52494dSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
5856dd52494dSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5857dd52494dSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5858dd52494dSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5859dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5860dd52494dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5861dd52494dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5862dd52494dSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5863dd52494dSmrg	else
5864dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5865dd52494dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5866dd52494dSmrg	fi
5867dd52494dSmrg      else
5868dd52494dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
5869dd52494dSmrg      fi
5870dd52494dSmrg      ;;
5871dd52494dSmrg
5872dd52494dSmrg    os2*)
5873dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5874dd52494dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5875dd52494dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5876dd52494dSmrg      shrext_cmds=.dll
5877dd52494dSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5878dd52494dSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5879dd52494dSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5880dd52494dSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
5881dd52494dSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5882dd52494dSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5883dd52494dSmrg	emximp -o $lib $output_objdir/$libname.def'
5884dd52494dSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5885dd52494dSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5886dd52494dSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5887dd52494dSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
5888dd52494dSmrg	prefix_cmds="$SED"~
5889dd52494dSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
5890dd52494dSmrg	  prefix_cmds="$prefix_cmds -e 1d";
5891dd52494dSmrg	fi~
5892dd52494dSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5893dd52494dSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5894dd52494dSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5895dd52494dSmrg	emximp -o $lib $output_objdir/$libname.def'
5896dd52494dSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5897dd52494dSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
589833adc6acSmrg      _LT_TAGVAR(file_list_spec, $1)='@'
5899dd52494dSmrg      ;;
5900dd52494dSmrg
5901dd52494dSmrg    osf3*)
5902dd52494dSmrg      if test yes = "$GCC"; then
5903dd52494dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5904dd52494dSmrg	_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'
5905dd52494dSmrg      else
5906dd52494dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5907dd52494dSmrg	_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'
5908dd52494dSmrg      fi
5909dd52494dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5910dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5911dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5912dd52494dSmrg      ;;
5913dd52494dSmrg
5914dd52494dSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5915dd52494dSmrg      if test yes = "$GCC"; then
5916dd52494dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5917dd52494dSmrg	_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'
5918dd52494dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5919dd52494dSmrg      else
5920dd52494dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5921dd52494dSmrg	_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'
5922dd52494dSmrg	_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~
5923dd52494dSmrg          $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'
5924dd52494dSmrg
5925dd52494dSmrg	# Both c and cxx compiler support -rpath directly
5926dd52494dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5927dd52494dSmrg      fi
5928dd52494dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5929dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5930dd52494dSmrg      ;;
5931dd52494dSmrg
5932dd52494dSmrg    solaris*)
5933dd52494dSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5934dd52494dSmrg      if test yes = "$GCC"; then
5935dd52494dSmrg	wlarc='$wl'
5936dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5937dd52494dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5938dd52494dSmrg          $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'
5939dd52494dSmrg      else
5940dd52494dSmrg	case `$CC -V 2>&1` in
5941dd52494dSmrg	*"Compilers 5.0"*)
5942dd52494dSmrg	  wlarc=''
5943dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
5944dd52494dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5945dd52494dSmrg            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5946dd52494dSmrg	  ;;
5947dd52494dSmrg	*)
5948dd52494dSmrg	  wlarc='$wl'
5949dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5950dd52494dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5951dd52494dSmrg            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5952dd52494dSmrg	  ;;
5953dd52494dSmrg	esac
5954dd52494dSmrg      fi
5955dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5956dd52494dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5957dd52494dSmrg      case $host_os in
5958dd52494dSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5959dd52494dSmrg      *)
5960dd52494dSmrg	# The compiler driver will combine and reorder linker options,
5961dd52494dSmrg	# but understands '-z linker_flag'.  GCC discards it without '$wl',
5962dd52494dSmrg	# but is careful enough not to reorder.
5963dd52494dSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
5964dd52494dSmrg	if test yes = "$GCC"; then
5965dd52494dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
5966dd52494dSmrg	else
5967dd52494dSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5968dd52494dSmrg	fi
5969dd52494dSmrg	;;
5970dd52494dSmrg      esac
5971dd52494dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
5972dd52494dSmrg      ;;
5973dd52494dSmrg
5974dd52494dSmrg    sunos4*)
5975dd52494dSmrg      if test sequent = "$host_vendor"; then
5976dd52494dSmrg	# Use $CC to link under sequent, because it throws in some extra .o
5977dd52494dSmrg	# files that make .init and .fini sections work.
5978dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5979dd52494dSmrg      else
5980dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5981dd52494dSmrg      fi
5982dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5983dd52494dSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
5984dd52494dSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5985dd52494dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5986dd52494dSmrg      ;;
5987dd52494dSmrg
5988dd52494dSmrg    sysv4)
5989dd52494dSmrg      case $host_vendor in
5990dd52494dSmrg	sni)
5991dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5992dd52494dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5993dd52494dSmrg	;;
5994dd52494dSmrg	siemens)
5995dd52494dSmrg	  ## LD is ld it makes a PLAMLIB
5996dd52494dSmrg	  ## CC just makes a GrossModule.
5997dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5998dd52494dSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5999dd52494dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
6000dd52494dSmrg        ;;
6001dd52494dSmrg	motorola)
6002dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6003dd52494dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6004dd52494dSmrg	;;
6005dd52494dSmrg      esac
6006dd52494dSmrg      runpath_var='LD_RUN_PATH'
6007dd52494dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6008dd52494dSmrg      ;;
6009dd52494dSmrg
6010dd52494dSmrg    sysv4.3*)
6011dd52494dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6012dd52494dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6013dd52494dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6014dd52494dSmrg      ;;
6015dd52494dSmrg
6016dd52494dSmrg    sysv4*MP*)
6017dd52494dSmrg      if test -d /usr/nec; then
6018dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6019dd52494dSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6020dd52494dSmrg	runpath_var=LD_RUN_PATH
6021dd52494dSmrg	hardcode_runpath_var=yes
6022dd52494dSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
6023dd52494dSmrg      fi
6024dd52494dSmrg      ;;
6025dd52494dSmrg
6026dd52494dSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6027dd52494dSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6028dd52494dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6029dd52494dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6030dd52494dSmrg      runpath_var='LD_RUN_PATH'
6031dd52494dSmrg
6032dd52494dSmrg      if test yes = "$GCC"; then
6033dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6034dd52494dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6035dd52494dSmrg      else
6036dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6037dd52494dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6038dd52494dSmrg      fi
6039dd52494dSmrg      ;;
6040dd52494dSmrg
6041dd52494dSmrg    sysv5* | sco3.2v5* | sco5v6*)
6042dd52494dSmrg      # Note: We CANNOT use -z defs as we might desire, because we do not
6043dd52494dSmrg      # link with -lc, and that would cause any symbols used from libc to
6044dd52494dSmrg      # always be unresolved, which means just about no library would
6045dd52494dSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
6046dd52494dSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
6047dd52494dSmrg      # as -z defs.
6048dd52494dSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6049dd52494dSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6050dd52494dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6051dd52494dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6052dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6053dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6054dd52494dSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
6055dd52494dSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6056dd52494dSmrg      runpath_var='LD_RUN_PATH'
6057dd52494dSmrg
6058dd52494dSmrg      if test yes = "$GCC"; then
6059dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6060dd52494dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6061dd52494dSmrg      else
6062dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6063dd52494dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6064dd52494dSmrg      fi
6065dd52494dSmrg      ;;
6066dd52494dSmrg
6067dd52494dSmrg    uts4*)
6068dd52494dSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6069dd52494dSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6070dd52494dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6071dd52494dSmrg      ;;
6072dd52494dSmrg
6073dd52494dSmrg    *)
6074dd52494dSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
6075dd52494dSmrg      ;;
6076dd52494dSmrg    esac
6077dd52494dSmrg
6078dd52494dSmrg    if test sni = "$host_vendor"; then
6079dd52494dSmrg      case $host in
6080dd52494dSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6081dd52494dSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6082dd52494dSmrg	;;
6083dd52494dSmrg      esac
6084dd52494dSmrg    fi
6085dd52494dSmrg  fi
6086dd52494dSmrg])
6087dd52494dSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6088dd52494dSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6089dd52494dSmrg
6090dd52494dSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6091dd52494dSmrg
6092dd52494dSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6093dd52494dSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6094dd52494dSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
6095dd52494dSmrg    [The commands to extract the exported symbol list from a shared archive])
6096dd52494dSmrg
6097dd52494dSmrg#
6098dd52494dSmrg# Do we need to explicitly link libc?
6099dd52494dSmrg#
6100dd52494dSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6101dd52494dSmrgx|xyes)
6102dd52494dSmrg  # Assume -lc should be added
6103dd52494dSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6104dd52494dSmrg
6105dd52494dSmrg  if test yes,yes = "$GCC,$enable_shared"; then
6106dd52494dSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
6107dd52494dSmrg    *'~'*)
6108dd52494dSmrg      # FIXME: we may have to deal with multi-command sequences.
6109dd52494dSmrg      ;;
6110dd52494dSmrg    '$CC '*)
6111dd52494dSmrg      # Test whether the compiler implicitly links with -lc since on some
6112dd52494dSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6113dd52494dSmrg      # to ld, don't add -lc before -lgcc.
6114dd52494dSmrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6115dd52494dSmrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6116dd52494dSmrg	[$RM conftest*
6117dd52494dSmrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6118dd52494dSmrg
6119dd52494dSmrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6120dd52494dSmrg	  soname=conftest
6121dd52494dSmrg	  lib=conftest
6122dd52494dSmrg	  libobjs=conftest.$ac_objext
6123dd52494dSmrg	  deplibs=
6124dd52494dSmrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6125dd52494dSmrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6126dd52494dSmrg	  compiler_flags=-v
6127dd52494dSmrg	  linker_flags=-v
6128dd52494dSmrg	  verstring=
6129dd52494dSmrg	  output_objdir=.
6130dd52494dSmrg	  libname=conftest
6131dd52494dSmrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6132dd52494dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
6133dd52494dSmrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6134dd52494dSmrg	  then
6135dd52494dSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6136dd52494dSmrg	  else
6137dd52494dSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6138dd52494dSmrg	  fi
6139dd52494dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6140dd52494dSmrg	else
6141dd52494dSmrg	  cat conftest.err 1>&5
6142dd52494dSmrg	fi
6143dd52494dSmrg	$RM conftest*
6144dd52494dSmrg	])
6145dd52494dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6146dd52494dSmrg      ;;
6147dd52494dSmrg    esac
6148dd52494dSmrg  fi
6149dd52494dSmrg  ;;
6150dd52494dSmrgesac
6151dd52494dSmrg
6152dd52494dSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6153dd52494dSmrg    [Whether or not to add -lc for building shared libraries])
6154dd52494dSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6155dd52494dSmrg    [enable_shared_with_static_runtimes], [0],
6156dd52494dSmrg    [Whether or not to disallow shared libs when runtime libs are static])
6157dd52494dSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6158dd52494dSmrg    [Compiler flag to allow reflexive dlopens])
6159dd52494dSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6160dd52494dSmrg    [Compiler flag to generate shared objects directly from archives])
6161dd52494dSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
6162dd52494dSmrg    [Whether the compiler copes with passing no objects directly])
6163dd52494dSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6164dd52494dSmrg    [Create an old-style archive from a shared archive])
6165dd52494dSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6166dd52494dSmrg    [Create a temporary old-style archive to link instead of a shared archive])
6167dd52494dSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6168dd52494dSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
6169dd52494dSmrg_LT_TAGDECL([], [module_cmds], [2],
6170dd52494dSmrg    [Commands used to build a loadable module if different from building
6171dd52494dSmrg    a shared archive.])
6172dd52494dSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
6173dd52494dSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
6174dd52494dSmrg    [Whether we are building with GNU ld or not])
6175dd52494dSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
6176dd52494dSmrg    [Flag that allows shared libraries with undefined symbols to be built])
6177dd52494dSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
6178dd52494dSmrg    [Flag that enforces no undefined symbols])
6179dd52494dSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6180dd52494dSmrg    [Flag to hardcode $libdir into a binary during linking.
6181dd52494dSmrg    This must work even if $libdir does not exist])
6182dd52494dSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6183dd52494dSmrg    [Whether we need a single "-rpath" flag with a separated argument])
6184dd52494dSmrg_LT_TAGDECL([], [hardcode_direct], [0],
6185dd52494dSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6186dd52494dSmrg    DIR into the resulting binary])
6187dd52494dSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6188dd52494dSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6189dd52494dSmrg    DIR into the resulting binary and the resulting library dependency is
6190dd52494dSmrg    "absolute", i.e impossible to change by setting $shlibpath_var if the
6191dd52494dSmrg    library is relocated])
6192dd52494dSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
6193dd52494dSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6194dd52494dSmrg    into the resulting binary])
6195dd52494dSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6196dd52494dSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6197dd52494dSmrg    into the resulting binary])
6198dd52494dSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
6199dd52494dSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
6200dd52494dSmrg    into the library and all subsequent libraries and executables linked
6201dd52494dSmrg    against it])
6202dd52494dSmrg_LT_TAGDECL([], [inherit_rpath], [0],
6203dd52494dSmrg    [Set to yes if linker adds runtime paths of dependent libraries
6204dd52494dSmrg    to runtime path list])
6205dd52494dSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
6206dd52494dSmrg    [Whether libtool must link a program against all its dependency libraries])
6207dd52494dSmrg_LT_TAGDECL([], [always_export_symbols], [0],
6208dd52494dSmrg    [Set to "yes" if exported symbols are required])
6209dd52494dSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
6210dd52494dSmrg    [The commands to list exported symbols])
6211dd52494dSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
6212dd52494dSmrg    [Symbols that should not be listed in the preloaded symbols])
6213dd52494dSmrg_LT_TAGDECL([], [include_expsyms], [1],
6214dd52494dSmrg    [Symbols that must always be exported])
6215dd52494dSmrg_LT_TAGDECL([], [prelink_cmds], [2],
6216dd52494dSmrg    [Commands necessary for linking programs (against libraries) with templates])
6217dd52494dSmrg_LT_TAGDECL([], [postlink_cmds], [2],
6218dd52494dSmrg    [Commands necessary for finishing linking programs])
6219dd52494dSmrg_LT_TAGDECL([], [file_list_spec], [1],
6220dd52494dSmrg    [Specify filename containing input files])
6221dd52494dSmrgdnl FIXME: Not yet implemented
6222dd52494dSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6223dd52494dSmrgdnl    [Compiler flag to generate thread safe objects])
6224dd52494dSmrg])# _LT_LINKER_SHLIBS
6225dd52494dSmrg
6226dd52494dSmrg
6227dd52494dSmrg# _LT_LANG_C_CONFIG([TAG])
6228dd52494dSmrg# ------------------------
6229dd52494dSmrg# Ensure that the configuration variables for a C compiler are suitably
6230dd52494dSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
6231dd52494dSmrg# the compiler configuration to 'libtool'.
6232dd52494dSmrgm4_defun([_LT_LANG_C_CONFIG],
6233dd52494dSmrg[m4_require([_LT_DECL_EGREP])dnl
6234dd52494dSmrglt_save_CC=$CC
6235dd52494dSmrgAC_LANG_PUSH(C)
6236dd52494dSmrg
6237dd52494dSmrg# Source file extension for C test sources.
6238dd52494dSmrgac_ext=c
6239dd52494dSmrg
6240dd52494dSmrg# Object file extension for compiled C test sources.
6241dd52494dSmrgobjext=o
6242dd52494dSmrg_LT_TAGVAR(objext, $1)=$objext
6243dd52494dSmrg
6244dd52494dSmrg# Code to be used in simple compile tests
6245dd52494dSmrglt_simple_compile_test_code="int some_variable = 0;"
6246dd52494dSmrg
6247dd52494dSmrg# Code to be used in simple link tests
6248dd52494dSmrglt_simple_link_test_code='int main(){return(0);}'
6249dd52494dSmrg
6250dd52494dSmrg_LT_TAG_COMPILER
6251dd52494dSmrg# Save the default compiler, since it gets overwritten when the other
6252dd52494dSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6253dd52494dSmrgcompiler_DEFAULT=$CC
6254dd52494dSmrg
6255dd52494dSmrg# save warnings/boilerplate of simple test code
6256dd52494dSmrg_LT_COMPILER_BOILERPLATE
6257dd52494dSmrg_LT_LINKER_BOILERPLATE
6258dd52494dSmrg
6259dd52494dSmrg## CAVEAT EMPTOR:
6260dd52494dSmrg## There is no encapsulation within the following macros, do not change
6261dd52494dSmrg## the running order or otherwise move them around unless you know exactly
6262dd52494dSmrg## what you are doing...
6263dd52494dSmrgif test -n "$compiler"; then
6264dd52494dSmrg  _LT_COMPILER_NO_RTTI($1)
6265dd52494dSmrg  _LT_COMPILER_PIC($1)
6266dd52494dSmrg  _LT_COMPILER_C_O($1)
6267dd52494dSmrg  _LT_COMPILER_FILE_LOCKS($1)
6268dd52494dSmrg  _LT_LINKER_SHLIBS($1)
6269dd52494dSmrg  _LT_SYS_DYNAMIC_LINKER($1)
6270dd52494dSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
6271dd52494dSmrg  LT_SYS_DLOPEN_SELF
6272dd52494dSmrg  _LT_CMD_STRIPLIB
6273dd52494dSmrg
6274dd52494dSmrg  # Report what library types will actually be built
6275dd52494dSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
6276dd52494dSmrg  AC_MSG_RESULT([$can_build_shared])
6277dd52494dSmrg
6278dd52494dSmrg  AC_MSG_CHECKING([whether to build shared libraries])
6279dd52494dSmrg  test no = "$can_build_shared" && enable_shared=no
6280dd52494dSmrg
6281dd52494dSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
6282dd52494dSmrg  # are all built from PIC.
6283dd52494dSmrg  case $host_os in
6284dd52494dSmrg  aix3*)
6285dd52494dSmrg    test yes = "$enable_shared" && enable_static=no
6286dd52494dSmrg    if test -n "$RANLIB"; then
6287dd52494dSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6288dd52494dSmrg      postinstall_cmds='$RANLIB $lib'
6289dd52494dSmrg    fi
6290dd52494dSmrg    ;;
6291dd52494dSmrg
6292dd52494dSmrg  aix[[4-9]]*)
6293dd52494dSmrg    if test ia64 != "$host_cpu"; then
6294dd52494dSmrg      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6295dd52494dSmrg      yes,aix,yes) ;;			# shared object as lib.so file only
6296dd52494dSmrg      yes,svr4,*) ;;			# shared object as lib.so archive member only
6297dd52494dSmrg      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
6298dd52494dSmrg      esac
6299dd52494dSmrg    fi
6300dd52494dSmrg    ;;
6301dd52494dSmrg  esac
6302dd52494dSmrg  AC_MSG_RESULT([$enable_shared])
6303dd52494dSmrg
6304dd52494dSmrg  AC_MSG_CHECKING([whether to build static libraries])
6305dd52494dSmrg  # Make sure either enable_shared or enable_static is yes.
6306dd52494dSmrg  test yes = "$enable_shared" || enable_static=yes
6307dd52494dSmrg  AC_MSG_RESULT([$enable_static])
6308dd52494dSmrg
6309dd52494dSmrg  _LT_CONFIG($1)
6310dd52494dSmrgfi
6311dd52494dSmrgAC_LANG_POP
6312dd52494dSmrgCC=$lt_save_CC
6313dd52494dSmrg])# _LT_LANG_C_CONFIG
6314dd52494dSmrg
6315dd52494dSmrg
6316dd52494dSmrg# _LT_LANG_CXX_CONFIG([TAG])
6317dd52494dSmrg# --------------------------
6318dd52494dSmrg# Ensure that the configuration variables for a C++ compiler are suitably
6319dd52494dSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
6320dd52494dSmrg# the compiler configuration to 'libtool'.
6321dd52494dSmrgm4_defun([_LT_LANG_CXX_CONFIG],
6322dd52494dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6323dd52494dSmrgm4_require([_LT_DECL_EGREP])dnl
6324dd52494dSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
6325dd52494dSmrgif test -n "$CXX" && ( test no != "$CXX" &&
6326dd52494dSmrg    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6327dd52494dSmrg    (test g++ != "$CXX"))); then
6328dd52494dSmrg  AC_PROG_CXXCPP
6329dd52494dSmrgelse
6330dd52494dSmrg  _lt_caught_CXX_error=yes
6331dd52494dSmrgfi
6332dd52494dSmrg
6333dd52494dSmrgAC_LANG_PUSH(C++)
6334dd52494dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6335dd52494dSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
6336dd52494dSmrg_LT_TAGVAR(always_export_symbols, $1)=no
6337dd52494dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
6338dd52494dSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
6339dd52494dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6340dd52494dSmrg_LT_TAGVAR(hardcode_direct, $1)=no
6341dd52494dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6342dd52494dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6343dd52494dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
6344dd52494dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
6345dd52494dSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6346dd52494dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
6347dd52494dSmrg_LT_TAGVAR(inherit_rpath, $1)=no
6348dd52494dSmrg_LT_TAGVAR(module_cmds, $1)=
6349dd52494dSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
6350dd52494dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
6351dd52494dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6352dd52494dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
6353dd52494dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6354dd52494dSmrg_LT_TAGVAR(no_undefined_flag, $1)=
6355dd52494dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
6356dd52494dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6357dd52494dSmrg
6358dd52494dSmrg# Source file extension for C++ test sources.
6359dd52494dSmrgac_ext=cpp
6360dd52494dSmrg
6361dd52494dSmrg# Object file extension for compiled C++ test sources.
6362dd52494dSmrgobjext=o
6363dd52494dSmrg_LT_TAGVAR(objext, $1)=$objext
6364dd52494dSmrg
6365dd52494dSmrg# No sense in running all these tests if we already determined that
6366dd52494dSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
6367dd52494dSmrg# are currently assumed to apply to all compilers on this platform,
6368dd52494dSmrg# and will be corrupted by setting them based on a non-working compiler.
6369dd52494dSmrgif test yes != "$_lt_caught_CXX_error"; then
6370dd52494dSmrg  # Code to be used in simple compile tests
6371dd52494dSmrg  lt_simple_compile_test_code="int some_variable = 0;"
6372dd52494dSmrg
6373dd52494dSmrg  # Code to be used in simple link tests
6374dd52494dSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6375dd52494dSmrg
6376dd52494dSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6377dd52494dSmrg  _LT_TAG_COMPILER
6378dd52494dSmrg
6379dd52494dSmrg  # save warnings/boilerplate of simple test code
6380dd52494dSmrg  _LT_COMPILER_BOILERPLATE
6381dd52494dSmrg  _LT_LINKER_BOILERPLATE
6382dd52494dSmrg
6383dd52494dSmrg  # Allow CC to be a program name with arguments.
6384dd52494dSmrg  lt_save_CC=$CC
6385dd52494dSmrg  lt_save_CFLAGS=$CFLAGS
6386dd52494dSmrg  lt_save_LD=$LD
6387dd52494dSmrg  lt_save_GCC=$GCC
6388dd52494dSmrg  GCC=$GXX
6389dd52494dSmrg  lt_save_with_gnu_ld=$with_gnu_ld
6390dd52494dSmrg  lt_save_path_LD=$lt_cv_path_LD
6391dd52494dSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6392dd52494dSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6393dd52494dSmrg  else
6394dd52494dSmrg    $as_unset lt_cv_prog_gnu_ld
6395dd52494dSmrg  fi
6396dd52494dSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
6397dd52494dSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
6398dd52494dSmrg  else
6399dd52494dSmrg    $as_unset lt_cv_path_LD
6400dd52494dSmrg  fi
6401dd52494dSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
6402dd52494dSmrg  CC=${CXX-"c++"}
6403dd52494dSmrg  CFLAGS=$CXXFLAGS
6404dd52494dSmrg  compiler=$CC
6405dd52494dSmrg  _LT_TAGVAR(compiler, $1)=$CC
6406dd52494dSmrg  _LT_CC_BASENAME([$compiler])
6407dd52494dSmrg
6408dd52494dSmrg  if test -n "$compiler"; then
6409dd52494dSmrg    # We don't want -fno-exception when compiling C++ code, so set the
6410dd52494dSmrg    # no_builtin_flag separately
6411dd52494dSmrg    if test yes = "$GXX"; then
6412dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6413dd52494dSmrg    else
6414dd52494dSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6415dd52494dSmrg    fi
6416dd52494dSmrg
6417dd52494dSmrg    if test yes = "$GXX"; then
6418dd52494dSmrg      # Set up default GNU C++ configuration
6419dd52494dSmrg
6420dd52494dSmrg      LT_PATH_LD
6421dd52494dSmrg
6422dd52494dSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6423dd52494dSmrg      # archiving commands below assume that GNU ld is being used.
6424dd52494dSmrg      if test yes = "$with_gnu_ld"; then
6425dd52494dSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6426dd52494dSmrg        _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'
6427dd52494dSmrg
6428dd52494dSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6429dd52494dSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6430dd52494dSmrg
6431dd52494dSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
6432dd52494dSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6433dd52494dSmrg        #     investigate it a little bit more. (MM)
6434dd52494dSmrg        wlarc='$wl'
6435dd52494dSmrg
6436dd52494dSmrg        # ancient GNU ld didn't support --whole-archive et. al.
6437dd52494dSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6438dd52494dSmrg	  $GREP 'no-whole-archive' > /dev/null; then
6439dd52494dSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6440dd52494dSmrg        else
6441dd52494dSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6442dd52494dSmrg        fi
6443dd52494dSmrg      else
6444dd52494dSmrg        with_gnu_ld=no
6445dd52494dSmrg        wlarc=
6446dd52494dSmrg
6447dd52494dSmrg        # A generic and very simple default shared library creation
6448dd52494dSmrg        # command for GNU C++ for the case where it uses the native
6449dd52494dSmrg        # linker, instead of GNU ld.  If possible, this setting should
6450dd52494dSmrg        # overridden to take advantage of the native linker features on
6451dd52494dSmrg        # the platform it is being used on.
6452dd52494dSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6453dd52494dSmrg      fi
6454dd52494dSmrg
6455dd52494dSmrg      # Commands to make compiler produce verbose output that lists
6456dd52494dSmrg      # what "hidden" libraries, object files and flags are used when
6457dd52494dSmrg      # linking a shared library.
6458dd52494dSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6459dd52494dSmrg
6460dd52494dSmrg    else
6461dd52494dSmrg      GXX=no
6462dd52494dSmrg      with_gnu_ld=no
6463dd52494dSmrg      wlarc=
6464dd52494dSmrg    fi
6465dd52494dSmrg
6466dd52494dSmrg    # PORTME: fill in a description of your system's C++ link characteristics
6467dd52494dSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6468dd52494dSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
6469dd52494dSmrg    case $host_os in
6470dd52494dSmrg      aix3*)
6471dd52494dSmrg        # FIXME: insert proper C++ library support
6472dd52494dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6473dd52494dSmrg        ;;
6474dd52494dSmrg      aix[[4-9]]*)
6475dd52494dSmrg        if test ia64 = "$host_cpu"; then
6476dd52494dSmrg          # On IA64, the linker does run time linking by default, so we don't
6477dd52494dSmrg          # have to do anything special.
6478dd52494dSmrg          aix_use_runtimelinking=no
6479dd52494dSmrg          exp_sym_flag='-Bexport'
6480dd52494dSmrg          no_entry_flag=
6481dd52494dSmrg        else
6482dd52494dSmrg          aix_use_runtimelinking=no
6483dd52494dSmrg
6484dd52494dSmrg          # Test if we are trying to use run time linking or normal
6485dd52494dSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6486dd52494dSmrg          # have runtime linking enabled, and use it for executables.
6487dd52494dSmrg          # For shared libraries, we enable/disable runtime linking
6488dd52494dSmrg          # depending on the kind of the shared library created -
6489dd52494dSmrg          # when "with_aix_soname,aix_use_runtimelinking" is:
6490dd52494dSmrg          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
6491dd52494dSmrg          # "aix,yes"  lib.so          shared, rtl:yes, for executables
6492dd52494dSmrg          #            lib.a           static archive
6493dd52494dSmrg          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
6494dd52494dSmrg          #            lib.a(lib.so.V) shared, rtl:no,  for executables
6495dd52494dSmrg          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6496dd52494dSmrg          #            lib.a(lib.so.V) shared, rtl:no
6497dd52494dSmrg          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
6498dd52494dSmrg          #            lib.a           static archive
6499dd52494dSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6500dd52494dSmrg	    for ld_flag in $LDFLAGS; do
6501dd52494dSmrg	      case $ld_flag in
6502dd52494dSmrg	      *-brtl*)
6503dd52494dSmrg	        aix_use_runtimelinking=yes
6504dd52494dSmrg	        break
6505dd52494dSmrg	        ;;
6506dd52494dSmrg	      esac
6507dd52494dSmrg	    done
6508dd52494dSmrg	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6509dd52494dSmrg	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
6510dd52494dSmrg	      # so we don't have lib.a shared libs to link our executables.
6511dd52494dSmrg	      # We have to force runtime linking in this case.
6512dd52494dSmrg	      aix_use_runtimelinking=yes
6513dd52494dSmrg	      LDFLAGS="$LDFLAGS -Wl,-brtl"
6514dd52494dSmrg	    fi
6515dd52494dSmrg	    ;;
6516dd52494dSmrg          esac
6517dd52494dSmrg
6518dd52494dSmrg          exp_sym_flag='-bexport'
6519dd52494dSmrg          no_entry_flag='-bnoentry'
6520dd52494dSmrg        fi
6521dd52494dSmrg
6522dd52494dSmrg        # When large executables or shared objects are built, AIX ld can
6523dd52494dSmrg        # have problems creating the table of contents.  If linking a library
6524dd52494dSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
6525dd52494dSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6526dd52494dSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6527dd52494dSmrg
6528dd52494dSmrg        _LT_TAGVAR(archive_cmds, $1)=''
6529dd52494dSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
6530dd52494dSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6531dd52494dSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6532dd52494dSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
6533dd52494dSmrg        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6534dd52494dSmrg        case $with_aix_soname,$aix_use_runtimelinking in
6535dd52494dSmrg        aix,*) ;;	# no import file
6536dd52494dSmrg        svr4,* | *,yes) # use import file
6537dd52494dSmrg          # The Import File defines what to hardcode.
6538dd52494dSmrg          _LT_TAGVAR(hardcode_direct, $1)=no
6539dd52494dSmrg          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6540dd52494dSmrg          ;;
6541dd52494dSmrg        esac
6542dd52494dSmrg
6543dd52494dSmrg        if test yes = "$GXX"; then
6544dd52494dSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6545dd52494dSmrg          # We only want to do this on AIX 4.2 and lower, the check
6546dd52494dSmrg          # below for broken collect2 doesn't work under 4.3+
6547dd52494dSmrg	  collect2name=`$CC -print-prog-name=collect2`
6548dd52494dSmrg	  if test -f "$collect2name" &&
6549dd52494dSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6550dd52494dSmrg	  then
6551dd52494dSmrg	    # We have reworked collect2
6552dd52494dSmrg	    :
6553dd52494dSmrg	  else
6554dd52494dSmrg	    # We have old collect2
6555dd52494dSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6556dd52494dSmrg	    # It fails to find uninstalled libraries when the uninstalled
6557dd52494dSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
6558dd52494dSmrg	    # to unsupported forces relinking
6559dd52494dSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6560dd52494dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6561dd52494dSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6562dd52494dSmrg	  fi
6563dd52494dSmrg          esac
6564dd52494dSmrg          shared_flag='-shared'
6565dd52494dSmrg	  if test yes = "$aix_use_runtimelinking"; then
6566dd52494dSmrg	    shared_flag=$shared_flag' $wl-G'
6567dd52494dSmrg	  fi
6568dd52494dSmrg	  # Need to ensure runtime linking is disabled for the traditional
6569dd52494dSmrg	  # shared library, or the linker may eventually find shared libraries
6570dd52494dSmrg	  # /with/ Import File - we do not want to mix them.
6571dd52494dSmrg	  shared_flag_aix='-shared'
6572dd52494dSmrg	  shared_flag_svr4='-shared $wl-G'
6573dd52494dSmrg        else
6574dd52494dSmrg          # not using gcc
6575dd52494dSmrg          if test ia64 = "$host_cpu"; then
6576dd52494dSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6577dd52494dSmrg	  # chokes on -Wl,-G. The following line is correct:
6578dd52494dSmrg	  shared_flag='-G'
6579dd52494dSmrg          else
6580dd52494dSmrg	    if test yes = "$aix_use_runtimelinking"; then
6581dd52494dSmrg	      shared_flag='$wl-G'
6582dd52494dSmrg	    else
6583dd52494dSmrg	      shared_flag='$wl-bM:SRE'
6584dd52494dSmrg	    fi
6585dd52494dSmrg	    shared_flag_aix='$wl-bM:SRE'
6586dd52494dSmrg	    shared_flag_svr4='$wl-G'
6587dd52494dSmrg          fi
6588dd52494dSmrg        fi
6589dd52494dSmrg
6590dd52494dSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6591dd52494dSmrg        # It seems that -bexpall does not export symbols beginning with
6592dd52494dSmrg        # underscore (_), so it is better to generate a list of symbols to
6593dd52494dSmrg	# export.
6594dd52494dSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
6595dd52494dSmrg	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6596dd52494dSmrg          # Warning - without using the other runtime loading flags (-brtl),
6597dd52494dSmrg          # -berok will link without error, but may produce a broken library.
6598dd52494dSmrg          # The "-G" linker flag allows undefined symbols.
6599dd52494dSmrg          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
6600dd52494dSmrg          # Determine the default libpath from the value encoded in an empty
6601dd52494dSmrg          # executable.
6602dd52494dSmrg          _LT_SYS_MODULE_PATH_AIX([$1])
6603dd52494dSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6604dd52494dSmrg
6605dd52494dSmrg          _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
6606dd52494dSmrg        else
6607dd52494dSmrg          if test ia64 = "$host_cpu"; then
6608dd52494dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6609dd52494dSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6610dd52494dSmrg	    _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"
6611dd52494dSmrg          else
6612dd52494dSmrg	    # Determine the default libpath from the value encoded in an
6613dd52494dSmrg	    # empty executable.
6614dd52494dSmrg	    _LT_SYS_MODULE_PATH_AIX([$1])
6615dd52494dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6616dd52494dSmrg	    # Warning - without using the other run time loading flags,
6617dd52494dSmrg	    # -berok will link without error, but may produce a broken library.
6618dd52494dSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6619dd52494dSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6620dd52494dSmrg	    if test yes = "$with_gnu_ld"; then
6621dd52494dSmrg	      # We only use this code for GNU lds that support --whole-archive.
6622dd52494dSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6623dd52494dSmrg	    else
6624dd52494dSmrg	      # Exported symbols can be pulled into shared objects from archives
6625dd52494dSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6626dd52494dSmrg	    fi
6627dd52494dSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6628dd52494dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6629dd52494dSmrg	    # -brtl affects multiple linker settings, -berok does not and is overridden later
6630dd52494dSmrg	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6631dd52494dSmrg	    if test svr4 != "$with_aix_soname"; then
6632dd52494dSmrg	      # This is similar to how AIX traditionally builds its shared
6633dd52494dSmrg	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6634dd52494dSmrg	      _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'
6635dd52494dSmrg	    fi
6636dd52494dSmrg	    if test aix != "$with_aix_soname"; then
6637dd52494dSmrg	      _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'
6638dd52494dSmrg	    else
6639dd52494dSmrg	      # used by -dlpreopen to get the symbols
6640dd52494dSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
6641dd52494dSmrg	    fi
6642dd52494dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6643dd52494dSmrg          fi
6644dd52494dSmrg        fi
6645dd52494dSmrg        ;;
6646dd52494dSmrg
6647dd52494dSmrg      beos*)
6648dd52494dSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6649dd52494dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6650dd52494dSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6651dd52494dSmrg	  # support --undefined.  This deserves some investigation.  FIXME
6652dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6653dd52494dSmrg	else
6654dd52494dSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
6655dd52494dSmrg	fi
6656dd52494dSmrg	;;
6657dd52494dSmrg
6658dd52494dSmrg      chorus*)
6659dd52494dSmrg        case $cc_basename in
6660dd52494dSmrg          *)
6661dd52494dSmrg	  # FIXME: insert proper C++ library support
6662dd52494dSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
6663dd52494dSmrg	  ;;
6664dd52494dSmrg        esac
6665dd52494dSmrg        ;;
6666dd52494dSmrg
6667dd52494dSmrg      cygwin* | mingw* | pw32* | cegcc*)
6668dd52494dSmrg	case $GXX,$cc_basename in
666933adc6acSmrg	,cl* | no,cl* | ,icl* | no,icl*)
667033adc6acSmrg	  # Native MSVC or ICC
6671dd52494dSmrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
6672dd52494dSmrg	  # no search path for DLLs.
6673dd52494dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6674dd52494dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6675dd52494dSmrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
6676dd52494dSmrg	  _LT_TAGVAR(file_list_spec, $1)='@'
6677dd52494dSmrg	  # Tell ltmain to make .lib files, not .a files.
6678dd52494dSmrg	  libext=lib
6679dd52494dSmrg	  # Tell ltmain to make .dll files, not .so files.
6680dd52494dSmrg	  shrext_cmds=.dll
6681dd52494dSmrg	  # FIXME: Setting linknames here is a bad hack.
6682dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6683dd52494dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6684dd52494dSmrg              cp "$export_symbols" "$output_objdir/$soname.def";
6685dd52494dSmrg              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6686dd52494dSmrg            else
6687dd52494dSmrg              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6688dd52494dSmrg            fi~
6689dd52494dSmrg            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6690dd52494dSmrg            linknames='
6691dd52494dSmrg	  # The linker will not automatically build a static lib if we build a DLL.
6692dd52494dSmrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6693dd52494dSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6694dd52494dSmrg	  # Don't use ranlib
6695dd52494dSmrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6696dd52494dSmrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6697dd52494dSmrg            lt_tool_outputfile="@TOOL_OUTPUT@"~
6698dd52494dSmrg            case $lt_outputfile in
6699dd52494dSmrg              *.exe|*.EXE) ;;
6700dd52494dSmrg              *)
6701dd52494dSmrg                lt_outputfile=$lt_outputfile.exe
6702dd52494dSmrg                lt_tool_outputfile=$lt_tool_outputfile.exe
6703dd52494dSmrg                ;;
6704dd52494dSmrg            esac~
6705dd52494dSmrg            func_to_tool_file "$lt_outputfile"~
6706dd52494dSmrg            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6707dd52494dSmrg              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6708dd52494dSmrg              $RM "$lt_outputfile.manifest";
6709dd52494dSmrg            fi'
6710dd52494dSmrg	  ;;
6711dd52494dSmrg	*)
6712dd52494dSmrg	  # g++
6713dd52494dSmrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6714dd52494dSmrg	  # as there is no search path for DLLs.
6715dd52494dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6716dd52494dSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6717dd52494dSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6718dd52494dSmrg	  _LT_TAGVAR(always_export_symbols, $1)=no
6719dd52494dSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6720dd52494dSmrg
6721dd52494dSmrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6722dd52494dSmrg	    _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'
6723dd52494dSmrg	    # If the export-symbols file already is a .def file, use it as
6724dd52494dSmrg	    # is; otherwise, prepend EXPORTS...
6725dd52494dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6726dd52494dSmrg              cp $export_symbols $output_objdir/$soname.def;
6727dd52494dSmrg            else
6728dd52494dSmrg              echo EXPORTS > $output_objdir/$soname.def;
6729dd52494dSmrg              cat $export_symbols >> $output_objdir/$soname.def;
6730dd52494dSmrg            fi~
6731dd52494dSmrg            $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'
6732dd52494dSmrg	  else
6733dd52494dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6734dd52494dSmrg	  fi
6735dd52494dSmrg	  ;;
6736dd52494dSmrg	esac
6737dd52494dSmrg	;;
6738dd52494dSmrg      darwin* | rhapsody*)
6739dd52494dSmrg        _LT_DARWIN_LINKER_FEATURES($1)
6740dd52494dSmrg	;;
6741dd52494dSmrg
6742dd52494dSmrg      os2*)
6743dd52494dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6744dd52494dSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6745dd52494dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6746dd52494dSmrg	shrext_cmds=.dll
6747dd52494dSmrg	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6748dd52494dSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6749dd52494dSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6750dd52494dSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
6751dd52494dSmrg	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6752dd52494dSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6753dd52494dSmrg	  emximp -o $lib $output_objdir/$libname.def'
6754dd52494dSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6755dd52494dSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6756dd52494dSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6757dd52494dSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
6758dd52494dSmrg	  prefix_cmds="$SED"~
6759dd52494dSmrg	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
6760dd52494dSmrg	    prefix_cmds="$prefix_cmds -e 1d";
6761dd52494dSmrg	  fi~
6762dd52494dSmrg	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6763dd52494dSmrg	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6764dd52494dSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6765dd52494dSmrg	  emximp -o $lib $output_objdir/$libname.def'
6766dd52494dSmrg	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6767dd52494dSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
676833adc6acSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
6769dd52494dSmrg	;;
6770dd52494dSmrg
6771dd52494dSmrg      dgux*)
6772dd52494dSmrg        case $cc_basename in
6773dd52494dSmrg          ec++*)
6774dd52494dSmrg	    # FIXME: insert proper C++ library support
6775dd52494dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6776dd52494dSmrg	    ;;
6777dd52494dSmrg          ghcx*)
6778dd52494dSmrg	    # Green Hills C++ Compiler
6779dd52494dSmrg	    # FIXME: insert proper C++ library support
6780dd52494dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6781dd52494dSmrg	    ;;
6782dd52494dSmrg          *)
6783dd52494dSmrg	    # FIXME: insert proper C++ library support
6784dd52494dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6785dd52494dSmrg	    ;;
6786dd52494dSmrg        esac
6787dd52494dSmrg        ;;
6788dd52494dSmrg
6789dd52494dSmrg      freebsd2.*)
6790dd52494dSmrg        # C++ shared libraries reported to be fairly broken before
6791dd52494dSmrg	# switch to ELF
6792dd52494dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
6793dd52494dSmrg        ;;
6794dd52494dSmrg
6795dd52494dSmrg      freebsd-elf*)
6796dd52494dSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6797dd52494dSmrg        ;;
6798dd52494dSmrg
679933adc6acSmrg      freebsd* | dragonfly* | midnightbsd*)
6800dd52494dSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6801dd52494dSmrg        # conventions
6802dd52494dSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
6803dd52494dSmrg        ;;
6804dd52494dSmrg
6805dd52494dSmrg      haiku*)
6806dd52494dSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6807dd52494dSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
6808dd52494dSmrg        ;;
6809dd52494dSmrg
6810dd52494dSmrg      hpux9*)
6811dd52494dSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6812dd52494dSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6813dd52494dSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6814dd52494dSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
6815dd52494dSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6816dd52494dSmrg				             # but as the default
6817dd52494dSmrg				             # location of the library.
6818dd52494dSmrg
6819dd52494dSmrg        case $cc_basename in
6820dd52494dSmrg          CC*)
6821dd52494dSmrg            # FIXME: insert proper C++ library support
6822dd52494dSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
6823dd52494dSmrg            ;;
6824dd52494dSmrg          aCC*)
6825dd52494dSmrg            _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'
6826dd52494dSmrg            # Commands to make compiler produce verbose output that lists
6827dd52494dSmrg            # what "hidden" libraries, object files and flags are used when
6828dd52494dSmrg            # linking a shared library.
6829dd52494dSmrg            #
6830dd52494dSmrg            # There doesn't appear to be a way to prevent this compiler from
6831dd52494dSmrg            # explicitly linking system object files so we need to strip them
6832dd52494dSmrg            # from the output so that they don't get included in the library
6833dd52494dSmrg            # dependencies.
6834dd52494dSmrg            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"'
6835dd52494dSmrg            ;;
6836dd52494dSmrg          *)
6837dd52494dSmrg            if test yes = "$GXX"; then
6838dd52494dSmrg              _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'
6839dd52494dSmrg            else
6840dd52494dSmrg              # FIXME: insert proper C++ library support
6841dd52494dSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
6842dd52494dSmrg            fi
6843dd52494dSmrg            ;;
6844dd52494dSmrg        esac
6845dd52494dSmrg        ;;
6846dd52494dSmrg
6847dd52494dSmrg      hpux10*|hpux11*)
6848dd52494dSmrg        if test no = "$with_gnu_ld"; then
6849dd52494dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6850dd52494dSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6851dd52494dSmrg
6852dd52494dSmrg          case $host_cpu in
6853dd52494dSmrg            hppa*64*|ia64*)
6854dd52494dSmrg              ;;
6855dd52494dSmrg            *)
6856dd52494dSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6857dd52494dSmrg              ;;
6858dd52494dSmrg          esac
6859dd52494dSmrg        fi
6860dd52494dSmrg        case $host_cpu in
6861dd52494dSmrg          hppa*64*|ia64*)
6862dd52494dSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
6863dd52494dSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6864dd52494dSmrg            ;;
6865dd52494dSmrg          *)
6866dd52494dSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
6867dd52494dSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6868dd52494dSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6869dd52494dSmrg					         # but as the default
6870dd52494dSmrg					         # location of the library.
6871dd52494dSmrg            ;;
6872dd52494dSmrg        esac
6873dd52494dSmrg
6874dd52494dSmrg        case $cc_basename in
6875dd52494dSmrg          CC*)
6876dd52494dSmrg	    # FIXME: insert proper C++ library support
6877dd52494dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
6878dd52494dSmrg	    ;;
6879dd52494dSmrg          aCC*)
6880dd52494dSmrg	    case $host_cpu in
6881dd52494dSmrg	      hppa*64*)
6882dd52494dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6883dd52494dSmrg	        ;;
6884dd52494dSmrg	      ia64*)
6885dd52494dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6886dd52494dSmrg	        ;;
6887dd52494dSmrg	      *)
6888dd52494dSmrg	        _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'
6889dd52494dSmrg	        ;;
6890dd52494dSmrg	    esac
6891dd52494dSmrg	    # Commands to make compiler produce verbose output that lists
6892dd52494dSmrg	    # what "hidden" libraries, object files and flags are used when
6893dd52494dSmrg	    # linking a shared library.
6894dd52494dSmrg	    #
6895dd52494dSmrg	    # There doesn't appear to be a way to prevent this compiler from
6896dd52494dSmrg	    # explicitly linking system object files so we need to strip them
6897dd52494dSmrg	    # from the output so that they don't get included in the library
6898dd52494dSmrg	    # dependencies.
6899dd52494dSmrg	    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"'
6900dd52494dSmrg	    ;;
6901dd52494dSmrg          *)
6902dd52494dSmrg	    if test yes = "$GXX"; then
6903dd52494dSmrg	      if test no = "$with_gnu_ld"; then
6904dd52494dSmrg	        case $host_cpu in
6905dd52494dSmrg	          hppa*64*)
6906dd52494dSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6907dd52494dSmrg	            ;;
6908dd52494dSmrg	          ia64*)
6909dd52494dSmrg	            _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'
6910dd52494dSmrg	            ;;
6911dd52494dSmrg	          *)
6912dd52494dSmrg	            _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'
6913dd52494dSmrg	            ;;
6914dd52494dSmrg	        esac
6915dd52494dSmrg	      fi
6916dd52494dSmrg	    else
6917dd52494dSmrg	      # FIXME: insert proper C++ library support
6918dd52494dSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
6919dd52494dSmrg	    fi
6920dd52494dSmrg	    ;;
6921dd52494dSmrg        esac
6922dd52494dSmrg        ;;
6923dd52494dSmrg
6924dd52494dSmrg      interix[[3-9]]*)
6925dd52494dSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
6926dd52494dSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6927dd52494dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6928dd52494dSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6929dd52494dSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6930dd52494dSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
6931dd52494dSmrg	# default) and relocated if they conflict, which is a slow very memory
6932dd52494dSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
6933dd52494dSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6934dd52494dSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6935dd52494dSmrg	_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'
693633adc6acSmrg	_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'
6937dd52494dSmrg	;;
6938dd52494dSmrg      irix5* | irix6*)
6939dd52494dSmrg        case $cc_basename in
6940dd52494dSmrg          CC*)
6941dd52494dSmrg	    # SGI C++
6942dd52494dSmrg	    _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'
6943dd52494dSmrg
6944dd52494dSmrg	    # Archives containing C++ object files must be created using
6945dd52494dSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6946dd52494dSmrg	    # necessary to make sure instantiated templates are included
6947dd52494dSmrg	    # in the archive.
6948dd52494dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6949dd52494dSmrg	    ;;
6950dd52494dSmrg          *)
6951dd52494dSmrg	    if test yes = "$GXX"; then
6952dd52494dSmrg	      if test no = "$with_gnu_ld"; then
6953dd52494dSmrg	        _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'
6954dd52494dSmrg	      else
6955dd52494dSmrg	        _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'
6956dd52494dSmrg	      fi
6957dd52494dSmrg	    fi
6958dd52494dSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6959dd52494dSmrg	    ;;
6960dd52494dSmrg        esac
6961dd52494dSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6962dd52494dSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6963dd52494dSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
6964dd52494dSmrg        ;;
6965dd52494dSmrg
6966dd52494dSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6967dd52494dSmrg        case $cc_basename in
6968dd52494dSmrg          KCC*)
6969dd52494dSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6970dd52494dSmrg
6971dd52494dSmrg	    # KCC will only create a shared library if the output file
6972dd52494dSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6973dd52494dSmrg	    # to its proper name (with version) after linking.
6974dd52494dSmrg	    _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'
6975dd52494dSmrg	    _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'
6976dd52494dSmrg	    # Commands to make compiler produce verbose output that lists
6977dd52494dSmrg	    # what "hidden" libraries, object files and flags are used when
6978dd52494dSmrg	    # linking a shared library.
6979dd52494dSmrg	    #
6980dd52494dSmrg	    # There doesn't appear to be a way to prevent this compiler from
6981dd52494dSmrg	    # explicitly linking system object files so we need to strip them
6982dd52494dSmrg	    # from the output so that they don't get included in the library
6983dd52494dSmrg	    # dependencies.
6984dd52494dSmrg	    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"'
6985dd52494dSmrg
6986dd52494dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6987dd52494dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6988dd52494dSmrg
6989dd52494dSmrg	    # Archives containing C++ object files must be created using
6990dd52494dSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6991dd52494dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6992dd52494dSmrg	    ;;
6993dd52494dSmrg	  icpc* | ecpc* )
6994dd52494dSmrg	    # Intel C++
6995dd52494dSmrg	    with_gnu_ld=yes
6996dd52494dSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
6997dd52494dSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
6998dd52494dSmrg	    # earlier do not add the objects themselves.
6999dd52494dSmrg	    case `$CC -V 2>&1` in
7000dd52494dSmrg	      *"Version 7."*)
7001dd52494dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7002dd52494dSmrg		_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'
7003dd52494dSmrg		;;
7004dd52494dSmrg	      *)  # Version 8.0 or newer
7005dd52494dSmrg	        tmp_idyn=
7006dd52494dSmrg	        case $host_cpu in
7007dd52494dSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
7008dd52494dSmrg		esac
7009dd52494dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7010dd52494dSmrg		_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'
7011dd52494dSmrg		;;
7012dd52494dSmrg	    esac
7013dd52494dSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7014dd52494dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7015dd52494dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7016dd52494dSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7017dd52494dSmrg	    ;;
7018dd52494dSmrg          pgCC* | pgcpp*)
7019dd52494dSmrg            # Portland Group C++ compiler
7020dd52494dSmrg	    case `$CC -V` in
7021dd52494dSmrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7022dd52494dSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7023dd52494dSmrg               rm -rf $tpldir~
7024dd52494dSmrg               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7025dd52494dSmrg               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7026dd52494dSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7027dd52494dSmrg                rm -rf $tpldir~
7028dd52494dSmrg                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7029dd52494dSmrg                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7030dd52494dSmrg                $RANLIB $oldlib'
7031dd52494dSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7032dd52494dSmrg                rm -rf $tpldir~
7033dd52494dSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7034dd52494dSmrg                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7035dd52494dSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7036dd52494dSmrg                rm -rf $tpldir~
7037dd52494dSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7038dd52494dSmrg                $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'
7039dd52494dSmrg	      ;;
7040dd52494dSmrg	    *) # Version 6 and above use weak symbols
7041dd52494dSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7042dd52494dSmrg	      _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'
7043dd52494dSmrg	      ;;
7044dd52494dSmrg	    esac
7045dd52494dSmrg
7046dd52494dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7047dd52494dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7048dd52494dSmrg	    _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'
7049dd52494dSmrg            ;;
7050dd52494dSmrg	  cxx*)
7051dd52494dSmrg	    # Compaq C++
7052dd52494dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7053dd52494dSmrg	    _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'
7054dd52494dSmrg
7055dd52494dSmrg	    runpath_var=LD_RUN_PATH
7056dd52494dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7057dd52494dSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7058dd52494dSmrg
7059dd52494dSmrg	    # Commands to make compiler produce verbose output that lists
7060dd52494dSmrg	    # what "hidden" libraries, object files and flags are used when
7061dd52494dSmrg	    # linking a shared library.
7062dd52494dSmrg	    #
7063dd52494dSmrg	    # There doesn't appear to be a way to prevent this compiler from
7064dd52494dSmrg	    # explicitly linking system object files so we need to strip them
7065dd52494dSmrg	    # from the output so that they don't get included in the library
7066dd52494dSmrg	    # dependencies.
7067dd52494dSmrg	    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'
7068dd52494dSmrg	    ;;
7069dd52494dSmrg	  xl* | mpixl* | bgxl*)
7070dd52494dSmrg	    # IBM XL 8.0 on PPC, with GNU ld
7071dd52494dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7072dd52494dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7073dd52494dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7074dd52494dSmrg	    if test yes = "$supports_anon_versioning"; then
7075dd52494dSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
707633adc6acSmrg                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7077dd52494dSmrg                echo "local: *; };" >> $output_objdir/$libname.ver~
7078dd52494dSmrg                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7079dd52494dSmrg	    fi
7080dd52494dSmrg	    ;;
7081dd52494dSmrg	  *)
708233adc6acSmrg	    case `$CC -V 2>&1 | $SED 5q` in
7083dd52494dSmrg	    *Sun\ C*)
7084dd52494dSmrg	      # Sun C++ 5.9
7085dd52494dSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7086dd52494dSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7087dd52494dSmrg	      _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'
7088dd52494dSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7089dd52494dSmrg	      _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'
7090dd52494dSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7091dd52494dSmrg
7092dd52494dSmrg	      # Not sure whether something based on
7093dd52494dSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7094dd52494dSmrg	      # would be better.
7095dd52494dSmrg	      output_verbose_link_cmd='func_echo_all'
7096dd52494dSmrg
7097dd52494dSmrg	      # Archives containing C++ object files must be created using
7098dd52494dSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7099dd52494dSmrg	      # necessary to make sure instantiated templates are included
7100dd52494dSmrg	      # in the archive.
7101dd52494dSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7102dd52494dSmrg	      ;;
7103dd52494dSmrg	    esac
7104dd52494dSmrg	    ;;
7105dd52494dSmrg	esac
7106dd52494dSmrg	;;
7107dd52494dSmrg
7108dd52494dSmrg      lynxos*)
7109dd52494dSmrg        # FIXME: insert proper C++ library support
7110dd52494dSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
7111dd52494dSmrg	;;
7112dd52494dSmrg
7113dd52494dSmrg      m88k*)
7114dd52494dSmrg        # FIXME: insert proper C++ library support
7115dd52494dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
7116dd52494dSmrg	;;
7117dd52494dSmrg
7118dd52494dSmrg      mvs*)
7119dd52494dSmrg        case $cc_basename in
7120dd52494dSmrg          cxx*)
7121dd52494dSmrg	    # FIXME: insert proper C++ library support
7122dd52494dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7123dd52494dSmrg	    ;;
7124dd52494dSmrg	  *)
7125dd52494dSmrg	    # FIXME: insert proper C++ library support
7126dd52494dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7127dd52494dSmrg	    ;;
7128dd52494dSmrg	esac
7129dd52494dSmrg	;;
7130dd52494dSmrg
7131dd52494dSmrg      netbsd*)
7132dd52494dSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7133dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7134dd52494dSmrg	  wlarc=
7135dd52494dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7136dd52494dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
7137dd52494dSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7138dd52494dSmrg	fi
7139dd52494dSmrg	# Workaround some broken pre-1.5 toolchains
7140dd52494dSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7141dd52494dSmrg	;;
7142dd52494dSmrg
7143dd52494dSmrg      *nto* | *qnx*)
7144dd52494dSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
7145dd52494dSmrg	;;
7146dd52494dSmrg
7147dd52494dSmrg      openbsd* | bitrig*)
7148dd52494dSmrg	if test -f /usr/libexec/ld.so; then
7149dd52494dSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
7150dd52494dSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7151dd52494dSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7152dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7153dd52494dSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7154dd52494dSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7155dd52494dSmrg	    _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'
7156dd52494dSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7157dd52494dSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7158dd52494dSmrg	  fi
7159dd52494dSmrg	  output_verbose_link_cmd=func_echo_all
7160dd52494dSmrg	else
7161dd52494dSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
7162dd52494dSmrg	fi
7163dd52494dSmrg	;;
7164dd52494dSmrg
7165dd52494dSmrg      osf3* | osf4* | osf5*)
7166dd52494dSmrg        case $cc_basename in
7167dd52494dSmrg          KCC*)
7168dd52494dSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7169dd52494dSmrg
7170dd52494dSmrg	    # KCC will only create a shared library if the output file
7171dd52494dSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7172dd52494dSmrg	    # to its proper name (with version) after linking.
7173dd52494dSmrg	    _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'
7174dd52494dSmrg
7175dd52494dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7176dd52494dSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7177dd52494dSmrg
7178dd52494dSmrg	    # Archives containing C++ object files must be created using
7179dd52494dSmrg	    # the KAI C++ compiler.
7180dd52494dSmrg	    case $host in
7181dd52494dSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7182dd52494dSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7183dd52494dSmrg	    esac
7184dd52494dSmrg	    ;;
7185dd52494dSmrg          RCC*)
7186dd52494dSmrg	    # Rational C++ 2.4.1
7187dd52494dSmrg	    # FIXME: insert proper C++ library support
7188dd52494dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7189dd52494dSmrg	    ;;
7190dd52494dSmrg          cxx*)
7191dd52494dSmrg	    case $host in
7192dd52494dSmrg	      osf3*)
7193dd52494dSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7194dd52494dSmrg	        _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'
7195dd52494dSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7196dd52494dSmrg		;;
7197dd52494dSmrg	      *)
7198dd52494dSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7199dd52494dSmrg	        _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'
7200dd52494dSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7201dd52494dSmrg                  echo "-hidden">> $lib.exp~
7202dd52494dSmrg                  $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~
7203dd52494dSmrg                  $RM $lib.exp'
7204dd52494dSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7205dd52494dSmrg		;;
7206dd52494dSmrg	    esac
7207dd52494dSmrg
7208dd52494dSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7209dd52494dSmrg
7210dd52494dSmrg	    # Commands to make compiler produce verbose output that lists
7211dd52494dSmrg	    # what "hidden" libraries, object files and flags are used when
7212dd52494dSmrg	    # linking a shared library.
7213dd52494dSmrg	    #
7214dd52494dSmrg	    # There doesn't appear to be a way to prevent this compiler from
7215dd52494dSmrg	    # explicitly linking system object files so we need to strip them
7216dd52494dSmrg	    # from the output so that they don't get included in the library
7217dd52494dSmrg	    # dependencies.
7218dd52494dSmrg	    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"'
7219dd52494dSmrg	    ;;
7220dd52494dSmrg	  *)
7221dd52494dSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
7222dd52494dSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7223dd52494dSmrg	      case $host in
7224dd52494dSmrg	        osf3*)
7225dd52494dSmrg	          _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'
7226dd52494dSmrg		  ;;
7227dd52494dSmrg	        *)
7228dd52494dSmrg	          _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'
7229dd52494dSmrg		  ;;
7230dd52494dSmrg	      esac
7231dd52494dSmrg
7232dd52494dSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7233dd52494dSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7234dd52494dSmrg
7235dd52494dSmrg	      # Commands to make compiler produce verbose output that lists
7236dd52494dSmrg	      # what "hidden" libraries, object files and flags are used when
7237dd52494dSmrg	      # linking a shared library.
7238dd52494dSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7239dd52494dSmrg
7240dd52494dSmrg	    else
7241dd52494dSmrg	      # FIXME: insert proper C++ library support
7242dd52494dSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
7243dd52494dSmrg	    fi
7244dd52494dSmrg	    ;;
7245dd52494dSmrg        esac
7246dd52494dSmrg        ;;
7247dd52494dSmrg
7248dd52494dSmrg      psos*)
7249dd52494dSmrg        # FIXME: insert proper C++ library support
7250dd52494dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
7251dd52494dSmrg        ;;
7252dd52494dSmrg
7253dd52494dSmrg      sunos4*)
7254dd52494dSmrg        case $cc_basename in
7255dd52494dSmrg          CC*)
7256dd52494dSmrg	    # Sun C++ 4.x
7257dd52494dSmrg	    # FIXME: insert proper C++ library support
7258dd52494dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7259dd52494dSmrg	    ;;
7260dd52494dSmrg          lcc*)
7261dd52494dSmrg	    # Lucid
7262dd52494dSmrg	    # FIXME: insert proper C++ library support
7263dd52494dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7264dd52494dSmrg	    ;;
7265dd52494dSmrg          *)
7266dd52494dSmrg	    # FIXME: insert proper C++ library support
7267dd52494dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7268dd52494dSmrg	    ;;
7269dd52494dSmrg        esac
7270dd52494dSmrg        ;;
7271dd52494dSmrg
7272dd52494dSmrg      solaris*)
7273dd52494dSmrg        case $cc_basename in
7274dd52494dSmrg          CC* | sunCC*)
7275dd52494dSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
7276dd52494dSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7277dd52494dSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7278dd52494dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7279dd52494dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7280dd52494dSmrg              $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'
7281dd52494dSmrg
7282dd52494dSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7283dd52494dSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7284dd52494dSmrg	    case $host_os in
7285dd52494dSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7286dd52494dSmrg	      *)
7287dd52494dSmrg		# The compiler driver will combine and reorder linker options,
7288dd52494dSmrg		# but understands '-z linker_flag'.
7289dd52494dSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7290dd52494dSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7291dd52494dSmrg	        ;;
7292dd52494dSmrg	    esac
7293dd52494dSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7294dd52494dSmrg
7295dd52494dSmrg	    output_verbose_link_cmd='func_echo_all'
7296dd52494dSmrg
7297dd52494dSmrg	    # Archives containing C++ object files must be created using
7298dd52494dSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7299dd52494dSmrg	    # necessary to make sure instantiated templates are included
7300dd52494dSmrg	    # in the archive.
7301dd52494dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7302dd52494dSmrg	    ;;
7303dd52494dSmrg          gcx*)
7304dd52494dSmrg	    # Green Hills C++ Compiler
7305dd52494dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7306dd52494dSmrg
7307dd52494dSmrg	    # The C++ compiler must be used to create the archive.
7308dd52494dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7309dd52494dSmrg	    ;;
7310dd52494dSmrg          *)
7311dd52494dSmrg	    # GNU C++ compiler with Solaris linker
7312dd52494dSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
7313dd52494dSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7314dd52494dSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7315dd52494dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7316dd52494dSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7317dd52494dSmrg                  $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'
7318dd52494dSmrg
7319dd52494dSmrg	        # Commands to make compiler produce verbose output that lists
7320dd52494dSmrg	        # what "hidden" libraries, object files and flags are used when
7321dd52494dSmrg	        # linking a shared library.
7322dd52494dSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7323dd52494dSmrg	      else
7324dd52494dSmrg	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
7325dd52494dSmrg	        # platform.
7326dd52494dSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7327dd52494dSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7328dd52494dSmrg                  $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'
7329dd52494dSmrg
7330dd52494dSmrg	        # Commands to make compiler produce verbose output that lists
7331dd52494dSmrg	        # what "hidden" libraries, object files and flags are used when
7332dd52494dSmrg	        # linking a shared library.
7333dd52494dSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7334dd52494dSmrg	      fi
7335dd52494dSmrg
7336dd52494dSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7337dd52494dSmrg	      case $host_os in
7338dd52494dSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7339dd52494dSmrg		*)
7340dd52494dSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7341dd52494dSmrg		  ;;
7342dd52494dSmrg	      esac
7343dd52494dSmrg	    fi
7344dd52494dSmrg	    ;;
7345dd52494dSmrg        esac
7346dd52494dSmrg        ;;
7347dd52494dSmrg
7348dd52494dSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7349dd52494dSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7350dd52494dSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7351dd52494dSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7352dd52494dSmrg      runpath_var='LD_RUN_PATH'
7353dd52494dSmrg
7354dd52494dSmrg      case $cc_basename in
7355dd52494dSmrg        CC*)
7356dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7357dd52494dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7358dd52494dSmrg	  ;;
7359dd52494dSmrg	*)
7360dd52494dSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7361dd52494dSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7362dd52494dSmrg	  ;;
7363dd52494dSmrg      esac
7364dd52494dSmrg      ;;
7365dd52494dSmrg
7366dd52494dSmrg      sysv5* | sco3.2v5* | sco5v6*)
7367dd52494dSmrg	# Note: We CANNOT use -z defs as we might desire, because we do not
7368dd52494dSmrg	# link with -lc, and that would cause any symbols used from libc to
7369dd52494dSmrg	# always be unresolved, which means just about no library would
7370dd52494dSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
7371dd52494dSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
7372dd52494dSmrg	# as -z defs.
7373dd52494dSmrg	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7374dd52494dSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7375dd52494dSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7376dd52494dSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7377dd52494dSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7378dd52494dSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7379dd52494dSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
7380dd52494dSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7381dd52494dSmrg	runpath_var='LD_RUN_PATH'
7382dd52494dSmrg
7383dd52494dSmrg	case $cc_basename in
7384dd52494dSmrg          CC*)
7385dd52494dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7386dd52494dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7387dd52494dSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7388dd52494dSmrg              '"$_LT_TAGVAR(old_archive_cmds, $1)"
7389dd52494dSmrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7390dd52494dSmrg              '"$_LT_TAGVAR(reload_cmds, $1)"
7391dd52494dSmrg	    ;;
7392dd52494dSmrg	  *)
7393dd52494dSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7394dd52494dSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7395dd52494dSmrg	    ;;
7396dd52494dSmrg	esac
7397dd52494dSmrg      ;;
7398dd52494dSmrg
7399dd52494dSmrg      tandem*)
7400dd52494dSmrg        case $cc_basename in
7401dd52494dSmrg          NCC*)
7402dd52494dSmrg	    # NonStop-UX NCC 3.20
7403dd52494dSmrg	    # FIXME: insert proper C++ library support
7404dd52494dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7405dd52494dSmrg	    ;;
7406dd52494dSmrg          *)
7407dd52494dSmrg	    # FIXME: insert proper C++ library support
7408dd52494dSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
7409dd52494dSmrg	    ;;
7410dd52494dSmrg        esac
7411dd52494dSmrg        ;;
7412dd52494dSmrg
7413dd52494dSmrg      vxworks*)
7414dd52494dSmrg        # FIXME: insert proper C++ library support
7415dd52494dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
7416dd52494dSmrg        ;;
7417dd52494dSmrg
7418dd52494dSmrg      *)
7419dd52494dSmrg        # FIXME: insert proper C++ library support
7420dd52494dSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
7421dd52494dSmrg        ;;
7422dd52494dSmrg    esac
7423dd52494dSmrg
7424dd52494dSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7425dd52494dSmrg    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7426dd52494dSmrg
7427dd52494dSmrg    _LT_TAGVAR(GCC, $1)=$GXX
7428dd52494dSmrg    _LT_TAGVAR(LD, $1)=$LD
7429dd52494dSmrg
7430dd52494dSmrg    ## CAVEAT EMPTOR:
7431dd52494dSmrg    ## There is no encapsulation within the following macros, do not change
7432dd52494dSmrg    ## the running order or otherwise move them around unless you know exactly
7433dd52494dSmrg    ## what you are doing...
7434dd52494dSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
7435dd52494dSmrg    _LT_COMPILER_PIC($1)
7436dd52494dSmrg    _LT_COMPILER_C_O($1)
7437dd52494dSmrg    _LT_COMPILER_FILE_LOCKS($1)
7438dd52494dSmrg    _LT_LINKER_SHLIBS($1)
7439dd52494dSmrg    _LT_SYS_DYNAMIC_LINKER($1)
7440dd52494dSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
7441dd52494dSmrg
7442dd52494dSmrg    _LT_CONFIG($1)
7443dd52494dSmrg  fi # test -n "$compiler"
7444dd52494dSmrg
7445dd52494dSmrg  CC=$lt_save_CC
7446dd52494dSmrg  CFLAGS=$lt_save_CFLAGS
7447dd52494dSmrg  LDCXX=$LD
7448dd52494dSmrg  LD=$lt_save_LD
7449dd52494dSmrg  GCC=$lt_save_GCC
7450dd52494dSmrg  with_gnu_ld=$lt_save_with_gnu_ld
7451dd52494dSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
7452dd52494dSmrg  lt_cv_path_LD=$lt_save_path_LD
7453dd52494dSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7454dd52494dSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7455dd52494dSmrgfi # test yes != "$_lt_caught_CXX_error"
7456dd52494dSmrg
7457dd52494dSmrgAC_LANG_POP
7458dd52494dSmrg])# _LT_LANG_CXX_CONFIG
7459dd52494dSmrg
7460dd52494dSmrg
7461dd52494dSmrg# _LT_FUNC_STRIPNAME_CNF
7462dd52494dSmrg# ----------------------
7463dd52494dSmrg# func_stripname_cnf prefix suffix name
7464dd52494dSmrg# strip PREFIX and SUFFIX off of NAME.
7465dd52494dSmrg# PREFIX and SUFFIX must not contain globbing or regex special
7466dd52494dSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
7467dd52494dSmrg# dot (in which case that matches only a dot).
7468dd52494dSmrg#
7469dd52494dSmrg# This function is identical to the (non-XSI) version of func_stripname,
7470dd52494dSmrg# except this one can be used by m4 code that may be executed by configure,
7471dd52494dSmrg# rather than the libtool script.
7472dd52494dSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7473dd52494dSmrgAC_REQUIRE([_LT_DECL_SED])
7474dd52494dSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7475dd52494dSmrgfunc_stripname_cnf ()
7476dd52494dSmrg{
7477dd52494dSmrg  case @S|@2 in
7478dd52494dSmrg  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7479dd52494dSmrg  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7480dd52494dSmrg  esac
7481dd52494dSmrg} # func_stripname_cnf
7482dd52494dSmrg])# _LT_FUNC_STRIPNAME_CNF
7483dd52494dSmrg
7484dd52494dSmrg
7485dd52494dSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7486dd52494dSmrg# ---------------------------------
7487dd52494dSmrg# Figure out "hidden" library dependencies from verbose
7488dd52494dSmrg# compiler output when linking a shared library.
7489dd52494dSmrg# Parse the compiler output and extract the necessary
7490dd52494dSmrg# objects, libraries and library flags.
7491dd52494dSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7492dd52494dSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7493dd52494dSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7494dd52494dSmrg# Dependencies to place before and after the object being linked:
7495dd52494dSmrg_LT_TAGVAR(predep_objects, $1)=
7496dd52494dSmrg_LT_TAGVAR(postdep_objects, $1)=
7497dd52494dSmrg_LT_TAGVAR(predeps, $1)=
7498dd52494dSmrg_LT_TAGVAR(postdeps, $1)=
7499dd52494dSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
7500dd52494dSmrg
7501dd52494dSmrgdnl we can't use the lt_simple_compile_test_code here,
7502dd52494dSmrgdnl because it contains code intended for an executable,
7503dd52494dSmrgdnl not a library.  It's possible we should let each
7504dd52494dSmrgdnl tag define a new lt_????_link_test_code variable,
7505dd52494dSmrgdnl but it's only used here...
7506dd52494dSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7507dd52494dSmrgint a;
7508dd52494dSmrgvoid foo (void) { a = 0; }
7509dd52494dSmrg_LT_EOF
7510dd52494dSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7511dd52494dSmrgclass Foo
7512dd52494dSmrg{
7513dd52494dSmrgpublic:
7514dd52494dSmrg  Foo (void) { a = 0; }
7515dd52494dSmrgprivate:
7516dd52494dSmrg  int a;
7517dd52494dSmrg};
7518dd52494dSmrg_LT_EOF
7519dd52494dSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7520dd52494dSmrg      subroutine foo
7521dd52494dSmrg      implicit none
7522dd52494dSmrg      integer*4 a
7523dd52494dSmrg      a=0
7524dd52494dSmrg      return
7525dd52494dSmrg      end
7526dd52494dSmrg_LT_EOF
7527dd52494dSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7528dd52494dSmrg      subroutine foo
7529dd52494dSmrg      implicit none
7530dd52494dSmrg      integer a
7531dd52494dSmrg      a=0
7532dd52494dSmrg      return
7533dd52494dSmrg      end
7534dd52494dSmrg_LT_EOF
7535dd52494dSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7536dd52494dSmrgpublic class foo {
7537dd52494dSmrg  private int a;
7538dd52494dSmrg  public void bar (void) {
7539dd52494dSmrg    a = 0;
7540dd52494dSmrg  }
7541dd52494dSmrg};
7542dd52494dSmrg_LT_EOF
7543dd52494dSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7544dd52494dSmrgpackage foo
7545dd52494dSmrgfunc foo() {
7546dd52494dSmrg}
7547dd52494dSmrg_LT_EOF
7548dd52494dSmrg])
7549dd52494dSmrg
7550dd52494dSmrg_lt_libdeps_save_CFLAGS=$CFLAGS
7551dd52494dSmrgcase "$CC $CFLAGS " in #(
7552dd52494dSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7553dd52494dSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7554dd52494dSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7555dd52494dSmrgesac
7556dd52494dSmrg
7557dd52494dSmrgdnl Parse the compiler output and extract the necessary
7558dd52494dSmrgdnl objects, libraries and library flags.
7559dd52494dSmrgif AC_TRY_EVAL(ac_compile); then
7560dd52494dSmrg  # Parse the compiler output and extract the necessary
7561dd52494dSmrg  # objects, libraries and library flags.
7562dd52494dSmrg
7563dd52494dSmrg  # Sentinel used to keep track of whether or not we are before
7564dd52494dSmrg  # the conftest object file.
7565dd52494dSmrg  pre_test_object_deps_done=no
7566dd52494dSmrg
7567dd52494dSmrg  for p in `eval "$output_verbose_link_cmd"`; do
7568dd52494dSmrg    case $prev$p in
7569dd52494dSmrg
7570dd52494dSmrg    -L* | -R* | -l*)
7571dd52494dSmrg       # Some compilers place space between "-{L,R}" and the path.
7572dd52494dSmrg       # Remove the space.
7573dd52494dSmrg       if test x-L = "$p" ||
7574dd52494dSmrg          test x-R = "$p"; then
7575dd52494dSmrg	 prev=$p
7576dd52494dSmrg	 continue
7577dd52494dSmrg       fi
7578dd52494dSmrg
7579dd52494dSmrg       # Expand the sysroot to ease extracting the directories later.
7580dd52494dSmrg       if test -z "$prev"; then
7581dd52494dSmrg         case $p in
7582dd52494dSmrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7583dd52494dSmrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7584dd52494dSmrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7585dd52494dSmrg         esac
7586dd52494dSmrg       fi
7587dd52494dSmrg       case $p in
7588dd52494dSmrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7589dd52494dSmrg       esac
7590dd52494dSmrg       if test no = "$pre_test_object_deps_done"; then
7591dd52494dSmrg	 case $prev in
7592dd52494dSmrg	 -L | -R)
7593dd52494dSmrg	   # Internal compiler library paths should come after those
7594dd52494dSmrg	   # provided the user.  The postdeps already come after the
7595dd52494dSmrg	   # user supplied libs so there is no need to process them.
7596dd52494dSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7597dd52494dSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
7598dd52494dSmrg	   else
7599dd52494dSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
7600dd52494dSmrg	   fi
7601dd52494dSmrg	   ;;
7602dd52494dSmrg	 # The "-l" case would never come before the object being
7603dd52494dSmrg	 # linked, so don't bother handling this case.
7604dd52494dSmrg	 esac
7605dd52494dSmrg       else
7606dd52494dSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7607dd52494dSmrg	   _LT_TAGVAR(postdeps, $1)=$prev$p
7608dd52494dSmrg	 else
7609dd52494dSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
7610dd52494dSmrg	 fi
7611dd52494dSmrg       fi
7612dd52494dSmrg       prev=
7613dd52494dSmrg       ;;
7614dd52494dSmrg
7615dd52494dSmrg    *.lto.$objext) ;; # Ignore GCC LTO objects
7616dd52494dSmrg    *.$objext)
7617dd52494dSmrg       # This assumes that the test object file only shows up
7618dd52494dSmrg       # once in the compiler output.
7619dd52494dSmrg       if test "$p" = "conftest.$objext"; then
7620dd52494dSmrg	 pre_test_object_deps_done=yes
7621dd52494dSmrg	 continue
7622dd52494dSmrg       fi
7623dd52494dSmrg
7624dd52494dSmrg       if test no = "$pre_test_object_deps_done"; then
7625dd52494dSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7626dd52494dSmrg	   _LT_TAGVAR(predep_objects, $1)=$p
7627dd52494dSmrg	 else
7628dd52494dSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7629dd52494dSmrg	 fi
7630dd52494dSmrg       else
7631dd52494dSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7632dd52494dSmrg	   _LT_TAGVAR(postdep_objects, $1)=$p
7633dd52494dSmrg	 else
7634dd52494dSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7635dd52494dSmrg	 fi
7636dd52494dSmrg       fi
7637dd52494dSmrg       ;;
7638dd52494dSmrg
7639dd52494dSmrg    *) ;; # Ignore the rest.
7640dd52494dSmrg
7641dd52494dSmrg    esac
7642dd52494dSmrg  done
7643dd52494dSmrg
7644dd52494dSmrg  # Clean up.
7645dd52494dSmrg  rm -f a.out a.exe
7646dd52494dSmrgelse
7647dd52494dSmrg  echo "libtool.m4: error: problem compiling $1 test program"
7648dd52494dSmrgfi
7649dd52494dSmrg
7650dd52494dSmrg$RM -f confest.$objext
7651dd52494dSmrgCFLAGS=$_lt_libdeps_save_CFLAGS
7652dd52494dSmrg
7653dd52494dSmrg# PORTME: override above test on systems where it is broken
7654dd52494dSmrgm4_if([$1], [CXX],
7655dd52494dSmrg[case $host_os in
7656dd52494dSmrginterix[[3-9]]*)
7657dd52494dSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7658dd52494dSmrg  # hack all around it, let's just trust "g++" to DTRT.
7659dd52494dSmrg  _LT_TAGVAR(predep_objects,$1)=
7660dd52494dSmrg  _LT_TAGVAR(postdep_objects,$1)=
7661dd52494dSmrg  _LT_TAGVAR(postdeps,$1)=
7662dd52494dSmrg  ;;
7663dd52494dSmrgesac
7664dd52494dSmrg])
7665dd52494dSmrg
7666dd52494dSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
7667dd52494dSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7668dd52494dSmrgesac
7669dd52494dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7670dd52494dSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7671dd52494dSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
7672dd52494dSmrgfi
7673dd52494dSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7674dd52494dSmrg    [The directories searched by this compiler when creating a shared library])
7675dd52494dSmrg_LT_TAGDECL([], [predep_objects], [1],
7676dd52494dSmrg    [Dependencies to place before and after the objects being linked to
7677dd52494dSmrg    create a shared library])
7678dd52494dSmrg_LT_TAGDECL([], [postdep_objects], [1])
7679dd52494dSmrg_LT_TAGDECL([], [predeps], [1])
7680dd52494dSmrg_LT_TAGDECL([], [postdeps], [1])
7681dd52494dSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
7682dd52494dSmrg    [The library search path used internally by the compiler when linking
7683dd52494dSmrg    a shared library])
7684dd52494dSmrg])# _LT_SYS_HIDDEN_LIBDEPS
7685dd52494dSmrg
7686dd52494dSmrg
7687dd52494dSmrg# _LT_LANG_F77_CONFIG([TAG])
7688dd52494dSmrg# --------------------------
7689dd52494dSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
7690dd52494dSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
7691dd52494dSmrg# to write the compiler configuration to 'libtool'.
7692dd52494dSmrgm4_defun([_LT_LANG_F77_CONFIG],
7693dd52494dSmrg[AC_LANG_PUSH(Fortran 77)
7694dd52494dSmrgif test -z "$F77" || test no = "$F77"; then
7695dd52494dSmrg  _lt_disable_F77=yes
7696dd52494dSmrgfi
7697dd52494dSmrg
7698dd52494dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7699dd52494dSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
7700dd52494dSmrg_LT_TAGVAR(always_export_symbols, $1)=no
7701dd52494dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
7702dd52494dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7703dd52494dSmrg_LT_TAGVAR(hardcode_direct, $1)=no
7704dd52494dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7705dd52494dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7706dd52494dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
7707dd52494dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
7708dd52494dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
7709dd52494dSmrg_LT_TAGVAR(inherit_rpath, $1)=no
7710dd52494dSmrg_LT_TAGVAR(module_cmds, $1)=
7711dd52494dSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
7712dd52494dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
7713dd52494dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7714dd52494dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
7715dd52494dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7716dd52494dSmrg_LT_TAGVAR(no_undefined_flag, $1)=
7717dd52494dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
7718dd52494dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7719dd52494dSmrg
7720dd52494dSmrg# Source file extension for f77 test sources.
7721dd52494dSmrgac_ext=f
7722dd52494dSmrg
7723dd52494dSmrg# Object file extension for compiled f77 test sources.
7724dd52494dSmrgobjext=o
7725dd52494dSmrg_LT_TAGVAR(objext, $1)=$objext
7726dd52494dSmrg
7727dd52494dSmrg# No sense in running all these tests if we already determined that
7728dd52494dSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
7729dd52494dSmrg# are currently assumed to apply to all compilers on this platform,
7730dd52494dSmrg# and will be corrupted by setting them based on a non-working compiler.
7731dd52494dSmrgif test yes != "$_lt_disable_F77"; then
7732dd52494dSmrg  # Code to be used in simple compile tests
7733dd52494dSmrg  lt_simple_compile_test_code="\
7734dd52494dSmrg      subroutine t
7735dd52494dSmrg      return
7736dd52494dSmrg      end
7737dd52494dSmrg"
7738dd52494dSmrg
7739dd52494dSmrg  # Code to be used in simple link tests
7740dd52494dSmrg  lt_simple_link_test_code="\
7741dd52494dSmrg      program t
7742dd52494dSmrg      end
7743dd52494dSmrg"
7744dd52494dSmrg
7745dd52494dSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7746dd52494dSmrg  _LT_TAG_COMPILER
7747dd52494dSmrg
7748dd52494dSmrg  # save warnings/boilerplate of simple test code
7749dd52494dSmrg  _LT_COMPILER_BOILERPLATE
7750dd52494dSmrg  _LT_LINKER_BOILERPLATE
7751dd52494dSmrg
7752dd52494dSmrg  # Allow CC to be a program name with arguments.
7753dd52494dSmrg  lt_save_CC=$CC
7754dd52494dSmrg  lt_save_GCC=$GCC
7755dd52494dSmrg  lt_save_CFLAGS=$CFLAGS
7756dd52494dSmrg  CC=${F77-"f77"}
7757dd52494dSmrg  CFLAGS=$FFLAGS
7758dd52494dSmrg  compiler=$CC
7759dd52494dSmrg  _LT_TAGVAR(compiler, $1)=$CC
7760dd52494dSmrg  _LT_CC_BASENAME([$compiler])
7761dd52494dSmrg  GCC=$G77
7762dd52494dSmrg  if test -n "$compiler"; then
7763dd52494dSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
7764dd52494dSmrg    AC_MSG_RESULT([$can_build_shared])
7765dd52494dSmrg
7766dd52494dSmrg    AC_MSG_CHECKING([whether to build shared libraries])
7767dd52494dSmrg    test no = "$can_build_shared" && enable_shared=no
7768dd52494dSmrg
7769dd52494dSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
7770dd52494dSmrg    # are all built from PIC.
7771dd52494dSmrg    case $host_os in
7772dd52494dSmrg      aix3*)
7773dd52494dSmrg        test yes = "$enable_shared" && enable_static=no
7774dd52494dSmrg        if test -n "$RANLIB"; then
7775dd52494dSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7776dd52494dSmrg          postinstall_cmds='$RANLIB $lib'
7777dd52494dSmrg        fi
7778dd52494dSmrg        ;;
7779dd52494dSmrg      aix[[4-9]]*)
7780dd52494dSmrg	if test ia64 != "$host_cpu"; then
7781dd52494dSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7782dd52494dSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
7783dd52494dSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
7784dd52494dSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
7785dd52494dSmrg	  esac
7786dd52494dSmrg	fi
7787dd52494dSmrg        ;;
7788dd52494dSmrg    esac
7789dd52494dSmrg    AC_MSG_RESULT([$enable_shared])
7790dd52494dSmrg
7791dd52494dSmrg    AC_MSG_CHECKING([whether to build static libraries])
7792dd52494dSmrg    # Make sure either enable_shared or enable_static is yes.
7793dd52494dSmrg    test yes = "$enable_shared" || enable_static=yes
7794dd52494dSmrg    AC_MSG_RESULT([$enable_static])
7795dd52494dSmrg
7796dd52494dSmrg    _LT_TAGVAR(GCC, $1)=$G77
7797dd52494dSmrg    _LT_TAGVAR(LD, $1)=$LD
7798dd52494dSmrg
7799dd52494dSmrg    ## CAVEAT EMPTOR:
7800dd52494dSmrg    ## There is no encapsulation within the following macros, do not change
7801dd52494dSmrg    ## the running order or otherwise move them around unless you know exactly
7802dd52494dSmrg    ## what you are doing...
7803dd52494dSmrg    _LT_COMPILER_PIC($1)
7804dd52494dSmrg    _LT_COMPILER_C_O($1)
7805dd52494dSmrg    _LT_COMPILER_FILE_LOCKS($1)
7806dd52494dSmrg    _LT_LINKER_SHLIBS($1)
7807dd52494dSmrg    _LT_SYS_DYNAMIC_LINKER($1)
7808dd52494dSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
7809dd52494dSmrg
7810dd52494dSmrg    _LT_CONFIG($1)
7811dd52494dSmrg  fi # test -n "$compiler"
7812dd52494dSmrg
7813dd52494dSmrg  GCC=$lt_save_GCC
7814dd52494dSmrg  CC=$lt_save_CC
7815dd52494dSmrg  CFLAGS=$lt_save_CFLAGS
7816dd52494dSmrgfi # test yes != "$_lt_disable_F77"
7817dd52494dSmrg
7818dd52494dSmrgAC_LANG_POP
7819dd52494dSmrg])# _LT_LANG_F77_CONFIG
7820dd52494dSmrg
7821dd52494dSmrg
7822dd52494dSmrg# _LT_LANG_FC_CONFIG([TAG])
7823dd52494dSmrg# -------------------------
7824dd52494dSmrg# Ensure that the configuration variables for a Fortran compiler are
7825dd52494dSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
7826dd52494dSmrg# to write the compiler configuration to 'libtool'.
7827dd52494dSmrgm4_defun([_LT_LANG_FC_CONFIG],
7828dd52494dSmrg[AC_LANG_PUSH(Fortran)
7829dd52494dSmrg
7830dd52494dSmrgif test -z "$FC" || test no = "$FC"; then
7831dd52494dSmrg  _lt_disable_FC=yes
7832dd52494dSmrgfi
7833dd52494dSmrg
7834dd52494dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7835dd52494dSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
7836dd52494dSmrg_LT_TAGVAR(always_export_symbols, $1)=no
7837dd52494dSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
7838dd52494dSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7839dd52494dSmrg_LT_TAGVAR(hardcode_direct, $1)=no
7840dd52494dSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7841dd52494dSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7842dd52494dSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
7843dd52494dSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
7844dd52494dSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
7845dd52494dSmrg_LT_TAGVAR(inherit_rpath, $1)=no
7846dd52494dSmrg_LT_TAGVAR(module_cmds, $1)=
7847dd52494dSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
7848dd52494dSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
7849dd52494dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7850dd52494dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
7851dd52494dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7852dd52494dSmrg_LT_TAGVAR(no_undefined_flag, $1)=
7853dd52494dSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
7854dd52494dSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7855dd52494dSmrg
7856dd52494dSmrg# Source file extension for fc test sources.
7857dd52494dSmrgac_ext=${ac_fc_srcext-f}
7858dd52494dSmrg
7859dd52494dSmrg# Object file extension for compiled fc test sources.
7860dd52494dSmrgobjext=o
7861dd52494dSmrg_LT_TAGVAR(objext, $1)=$objext
7862dd52494dSmrg
7863dd52494dSmrg# No sense in running all these tests if we already determined that
7864dd52494dSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
7865dd52494dSmrg# are currently assumed to apply to all compilers on this platform,
7866dd52494dSmrg# and will be corrupted by setting them based on a non-working compiler.
7867dd52494dSmrgif test yes != "$_lt_disable_FC"; then
7868dd52494dSmrg  # Code to be used in simple compile tests
7869dd52494dSmrg  lt_simple_compile_test_code="\
7870dd52494dSmrg      subroutine t
7871dd52494dSmrg      return
7872dd52494dSmrg      end
7873dd52494dSmrg"
7874dd52494dSmrg
7875dd52494dSmrg  # Code to be used in simple link tests
7876dd52494dSmrg  lt_simple_link_test_code="\
7877dd52494dSmrg      program t
7878dd52494dSmrg      end
7879dd52494dSmrg"
7880dd52494dSmrg
7881dd52494dSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7882dd52494dSmrg  _LT_TAG_COMPILER
7883dd52494dSmrg
7884dd52494dSmrg  # save warnings/boilerplate of simple test code
7885dd52494dSmrg  _LT_COMPILER_BOILERPLATE
7886dd52494dSmrg  _LT_LINKER_BOILERPLATE
7887dd52494dSmrg
7888dd52494dSmrg  # Allow CC to be a program name with arguments.
7889dd52494dSmrg  lt_save_CC=$CC
7890dd52494dSmrg  lt_save_GCC=$GCC
7891dd52494dSmrg  lt_save_CFLAGS=$CFLAGS
7892dd52494dSmrg  CC=${FC-"f95"}
7893dd52494dSmrg  CFLAGS=$FCFLAGS
7894dd52494dSmrg  compiler=$CC
7895dd52494dSmrg  GCC=$ac_cv_fc_compiler_gnu
7896dd52494dSmrg
7897dd52494dSmrg  _LT_TAGVAR(compiler, $1)=$CC
7898dd52494dSmrg  _LT_CC_BASENAME([$compiler])
7899dd52494dSmrg
7900dd52494dSmrg  if test -n "$compiler"; then
7901dd52494dSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
7902dd52494dSmrg    AC_MSG_RESULT([$can_build_shared])
7903dd52494dSmrg
7904dd52494dSmrg    AC_MSG_CHECKING([whether to build shared libraries])
7905dd52494dSmrg    test no = "$can_build_shared" && enable_shared=no
7906dd52494dSmrg
7907dd52494dSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
7908dd52494dSmrg    # are all built from PIC.
7909dd52494dSmrg    case $host_os in
7910dd52494dSmrg      aix3*)
7911dd52494dSmrg        test yes = "$enable_shared" && enable_static=no
7912dd52494dSmrg        if test -n "$RANLIB"; then
7913dd52494dSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7914dd52494dSmrg          postinstall_cmds='$RANLIB $lib'
7915dd52494dSmrg        fi
7916dd52494dSmrg        ;;
7917dd52494dSmrg      aix[[4-9]]*)
7918dd52494dSmrg	if test ia64 != "$host_cpu"; then
7919dd52494dSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7920dd52494dSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
7921dd52494dSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
7922dd52494dSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
7923dd52494dSmrg	  esac
7924dd52494dSmrg	fi
7925dd52494dSmrg        ;;
7926dd52494dSmrg    esac
7927dd52494dSmrg    AC_MSG_RESULT([$enable_shared])
7928dd52494dSmrg
7929dd52494dSmrg    AC_MSG_CHECKING([whether to build static libraries])
7930dd52494dSmrg    # Make sure either enable_shared or enable_static is yes.
7931dd52494dSmrg    test yes = "$enable_shared" || enable_static=yes
7932dd52494dSmrg    AC_MSG_RESULT([$enable_static])
7933dd52494dSmrg
7934dd52494dSmrg    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7935dd52494dSmrg    _LT_TAGVAR(LD, $1)=$LD
7936dd52494dSmrg
7937dd52494dSmrg    ## CAVEAT EMPTOR:
7938dd52494dSmrg    ## There is no encapsulation within the following macros, do not change
7939dd52494dSmrg    ## the running order or otherwise move them around unless you know exactly
7940dd52494dSmrg    ## what you are doing...
7941dd52494dSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
7942dd52494dSmrg    _LT_COMPILER_PIC($1)
7943dd52494dSmrg    _LT_COMPILER_C_O($1)
7944dd52494dSmrg    _LT_COMPILER_FILE_LOCKS($1)
7945dd52494dSmrg    _LT_LINKER_SHLIBS($1)
7946dd52494dSmrg    _LT_SYS_DYNAMIC_LINKER($1)
7947dd52494dSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
7948dd52494dSmrg
7949dd52494dSmrg    _LT_CONFIG($1)
7950dd52494dSmrg  fi # test -n "$compiler"
7951dd52494dSmrg
7952dd52494dSmrg  GCC=$lt_save_GCC
7953dd52494dSmrg  CC=$lt_save_CC
7954dd52494dSmrg  CFLAGS=$lt_save_CFLAGS
7955dd52494dSmrgfi # test yes != "$_lt_disable_FC"
7956dd52494dSmrg
7957dd52494dSmrgAC_LANG_POP
7958dd52494dSmrg])# _LT_LANG_FC_CONFIG
7959dd52494dSmrg
7960dd52494dSmrg
7961dd52494dSmrg# _LT_LANG_GCJ_CONFIG([TAG])
7962dd52494dSmrg# --------------------------
7963dd52494dSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
7964dd52494dSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7965dd52494dSmrg# to write the compiler configuration to 'libtool'.
7966dd52494dSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
7967dd52494dSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
7968dd52494dSmrgAC_LANG_SAVE
7969dd52494dSmrg
7970dd52494dSmrg# Source file extension for Java test sources.
7971dd52494dSmrgac_ext=java
7972dd52494dSmrg
7973dd52494dSmrg# Object file extension for compiled Java test sources.
7974dd52494dSmrgobjext=o
7975dd52494dSmrg_LT_TAGVAR(objext, $1)=$objext
7976dd52494dSmrg
7977dd52494dSmrg# Code to be used in simple compile tests
7978dd52494dSmrglt_simple_compile_test_code="class foo {}"
7979dd52494dSmrg
7980dd52494dSmrg# Code to be used in simple link tests
7981dd52494dSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7982dd52494dSmrg
7983dd52494dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7984dd52494dSmrg_LT_TAG_COMPILER
7985dd52494dSmrg
7986dd52494dSmrg# save warnings/boilerplate of simple test code
7987dd52494dSmrg_LT_COMPILER_BOILERPLATE
7988dd52494dSmrg_LT_LINKER_BOILERPLATE
7989dd52494dSmrg
7990dd52494dSmrg# Allow CC to be a program name with arguments.
7991dd52494dSmrglt_save_CC=$CC
7992dd52494dSmrglt_save_CFLAGS=$CFLAGS
7993dd52494dSmrglt_save_GCC=$GCC
7994dd52494dSmrgGCC=yes
7995dd52494dSmrgCC=${GCJ-"gcj"}
7996dd52494dSmrgCFLAGS=$GCJFLAGS
7997dd52494dSmrgcompiler=$CC
7998dd52494dSmrg_LT_TAGVAR(compiler, $1)=$CC
7999dd52494dSmrg_LT_TAGVAR(LD, $1)=$LD
8000dd52494dSmrg_LT_CC_BASENAME([$compiler])
8001dd52494dSmrg
8002dd52494dSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
8003dd52494dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8004dd52494dSmrg
8005dd52494dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8006dd52494dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
8007dd52494dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8008dd52494dSmrg
8009dd52494dSmrg## CAVEAT EMPTOR:
8010dd52494dSmrg## There is no encapsulation within the following macros, do not change
8011dd52494dSmrg## the running order or otherwise move them around unless you know exactly
8012dd52494dSmrg## what you are doing...
8013dd52494dSmrgif test -n "$compiler"; then
8014dd52494dSmrg  _LT_COMPILER_NO_RTTI($1)
8015dd52494dSmrg  _LT_COMPILER_PIC($1)
8016dd52494dSmrg  _LT_COMPILER_C_O($1)
8017dd52494dSmrg  _LT_COMPILER_FILE_LOCKS($1)
8018dd52494dSmrg  _LT_LINKER_SHLIBS($1)
8019dd52494dSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
8020dd52494dSmrg
8021dd52494dSmrg  _LT_CONFIG($1)
8022dd52494dSmrgfi
8023dd52494dSmrg
8024dd52494dSmrgAC_LANG_RESTORE
8025dd52494dSmrg
8026dd52494dSmrgGCC=$lt_save_GCC
8027dd52494dSmrgCC=$lt_save_CC
8028dd52494dSmrgCFLAGS=$lt_save_CFLAGS
8029dd52494dSmrg])# _LT_LANG_GCJ_CONFIG
8030dd52494dSmrg
8031dd52494dSmrg
8032dd52494dSmrg# _LT_LANG_GO_CONFIG([TAG])
8033dd52494dSmrg# --------------------------
8034dd52494dSmrg# Ensure that the configuration variables for the GNU Go compiler
8035dd52494dSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8036dd52494dSmrg# to write the compiler configuration to 'libtool'.
8037dd52494dSmrgm4_defun([_LT_LANG_GO_CONFIG],
8038dd52494dSmrg[AC_REQUIRE([LT_PROG_GO])dnl
8039dd52494dSmrgAC_LANG_SAVE
8040dd52494dSmrg
8041dd52494dSmrg# Source file extension for Go test sources.
8042dd52494dSmrgac_ext=go
8043dd52494dSmrg
8044dd52494dSmrg# Object file extension for compiled Go test sources.
8045dd52494dSmrgobjext=o
8046dd52494dSmrg_LT_TAGVAR(objext, $1)=$objext
8047dd52494dSmrg
8048dd52494dSmrg# Code to be used in simple compile tests
8049dd52494dSmrglt_simple_compile_test_code="package main; func main() { }"
8050dd52494dSmrg
8051dd52494dSmrg# Code to be used in simple link tests
8052dd52494dSmrglt_simple_link_test_code='package main; func main() { }'
8053dd52494dSmrg
8054dd52494dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8055dd52494dSmrg_LT_TAG_COMPILER
8056dd52494dSmrg
8057dd52494dSmrg# save warnings/boilerplate of simple test code
8058dd52494dSmrg_LT_COMPILER_BOILERPLATE
8059dd52494dSmrg_LT_LINKER_BOILERPLATE
8060dd52494dSmrg
8061dd52494dSmrg# Allow CC to be a program name with arguments.
8062dd52494dSmrglt_save_CC=$CC
8063dd52494dSmrglt_save_CFLAGS=$CFLAGS
8064dd52494dSmrglt_save_GCC=$GCC
8065dd52494dSmrgGCC=yes
8066dd52494dSmrgCC=${GOC-"gccgo"}
8067dd52494dSmrgCFLAGS=$GOFLAGS
8068dd52494dSmrgcompiler=$CC
8069dd52494dSmrg_LT_TAGVAR(compiler, $1)=$CC
8070dd52494dSmrg_LT_TAGVAR(LD, $1)=$LD
8071dd52494dSmrg_LT_CC_BASENAME([$compiler])
8072dd52494dSmrg
8073dd52494dSmrg# Go did not exist at the time GCC didn't implicitly link libc in.
8074dd52494dSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8075dd52494dSmrg
8076dd52494dSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8077dd52494dSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
8078dd52494dSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8079dd52494dSmrg
8080dd52494dSmrg## CAVEAT EMPTOR:
8081dd52494dSmrg## There is no encapsulation within the following macros, do not change
8082dd52494dSmrg## the running order or otherwise move them around unless you know exactly
8083dd52494dSmrg## what you are doing...
8084dd52494dSmrgif test -n "$compiler"; then
8085dd52494dSmrg  _LT_COMPILER_NO_RTTI($1)
8086dd52494dSmrg  _LT_COMPILER_PIC($1)
8087dd52494dSmrg  _LT_COMPILER_C_O($1)
8088dd52494dSmrg  _LT_COMPILER_FILE_LOCKS($1)
8089dd52494dSmrg  _LT_LINKER_SHLIBS($1)
8090dd52494dSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
8091dd52494dSmrg
8092dd52494dSmrg  _LT_CONFIG($1)
8093dd52494dSmrgfi
8094dd52494dSmrg
8095dd52494dSmrgAC_LANG_RESTORE
8096dd52494dSmrg
8097dd52494dSmrgGCC=$lt_save_GCC
8098dd52494dSmrgCC=$lt_save_CC
8099dd52494dSmrgCFLAGS=$lt_save_CFLAGS
8100dd52494dSmrg])# _LT_LANG_GO_CONFIG
8101dd52494dSmrg
8102dd52494dSmrg
8103dd52494dSmrg# _LT_LANG_RC_CONFIG([TAG])
8104dd52494dSmrg# -------------------------
8105dd52494dSmrg# Ensure that the configuration variables for the Windows resource compiler
8106dd52494dSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8107dd52494dSmrg# to write the compiler configuration to 'libtool'.
8108dd52494dSmrgm4_defun([_LT_LANG_RC_CONFIG],
8109dd52494dSmrg[AC_REQUIRE([LT_PROG_RC])dnl
8110dd52494dSmrgAC_LANG_SAVE
8111dd52494dSmrg
8112dd52494dSmrg# Source file extension for RC test sources.
8113dd52494dSmrgac_ext=rc
8114dd52494dSmrg
8115dd52494dSmrg# Object file extension for compiled RC test sources.
8116dd52494dSmrgobjext=o
8117dd52494dSmrg_LT_TAGVAR(objext, $1)=$objext
8118dd52494dSmrg
8119dd52494dSmrg# Code to be used in simple compile tests
8120dd52494dSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8121dd52494dSmrg
8122dd52494dSmrg# Code to be used in simple link tests
8123dd52494dSmrglt_simple_link_test_code=$lt_simple_compile_test_code
8124dd52494dSmrg
8125dd52494dSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8126dd52494dSmrg_LT_TAG_COMPILER
8127dd52494dSmrg
8128dd52494dSmrg# save warnings/boilerplate of simple test code
8129dd52494dSmrg_LT_COMPILER_BOILERPLATE
8130dd52494dSmrg_LT_LINKER_BOILERPLATE
8131dd52494dSmrg
8132dd52494dSmrg# Allow CC to be a program name with arguments.
8133dd52494dSmrglt_save_CC=$CC
8134dd52494dSmrglt_save_CFLAGS=$CFLAGS
8135dd52494dSmrglt_save_GCC=$GCC
8136dd52494dSmrgGCC=
8137dd52494dSmrgCC=${RC-"windres"}
8138dd52494dSmrgCFLAGS=
8139dd52494dSmrgcompiler=$CC
8140dd52494dSmrg_LT_TAGVAR(compiler, $1)=$CC
8141dd52494dSmrg_LT_CC_BASENAME([$compiler])
8142dd52494dSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8143dd52494dSmrg
8144dd52494dSmrgif test -n "$compiler"; then
8145dd52494dSmrg  :
8146dd52494dSmrg  _LT_CONFIG($1)
8147dd52494dSmrgfi
8148dd52494dSmrg
8149dd52494dSmrgGCC=$lt_save_GCC
8150dd52494dSmrgAC_LANG_RESTORE
8151dd52494dSmrgCC=$lt_save_CC
8152dd52494dSmrgCFLAGS=$lt_save_CFLAGS
8153dd52494dSmrg])# _LT_LANG_RC_CONFIG
8154dd52494dSmrg
8155dd52494dSmrg
8156dd52494dSmrg# LT_PROG_GCJ
8157dd52494dSmrg# -----------
8158dd52494dSmrgAC_DEFUN([LT_PROG_GCJ],
8159dd52494dSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8160dd52494dSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8161dd52494dSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
8162dd52494dSmrg      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8163dd52494dSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
8164dd52494dSmrg])
8165dd52494dSmrg
8166dd52494dSmrg# Old name:
8167dd52494dSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8168dd52494dSmrgdnl aclocal-1.4 backwards compatibility:
8169dd52494dSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8170dd52494dSmrg
8171dd52494dSmrg
8172dd52494dSmrg# LT_PROG_GO
8173dd52494dSmrg# ----------
8174dd52494dSmrgAC_DEFUN([LT_PROG_GO],
8175dd52494dSmrg[AC_CHECK_TOOL(GOC, gccgo,)
8176dd52494dSmrg])
8177dd52494dSmrg
8178dd52494dSmrg
8179dd52494dSmrg# LT_PROG_RC
8180dd52494dSmrg# ----------
8181dd52494dSmrgAC_DEFUN([LT_PROG_RC],
8182dd52494dSmrg[AC_CHECK_TOOL(RC, windres,)
8183dd52494dSmrg])
8184dd52494dSmrg
8185dd52494dSmrg# Old name:
8186dd52494dSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8187dd52494dSmrgdnl aclocal-1.4 backwards compatibility:
8188dd52494dSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
8189dd52494dSmrg
8190dd52494dSmrg
8191dd52494dSmrg# _LT_DECL_EGREP
8192dd52494dSmrg# --------------
8193dd52494dSmrg# If we don't have a new enough Autoconf to choose the best grep
8194dd52494dSmrg# available, choose the one first in the user's PATH.
8195dd52494dSmrgm4_defun([_LT_DECL_EGREP],
8196dd52494dSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
8197dd52494dSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
8198dd52494dSmrgtest -z "$GREP" && GREP=grep
8199dd52494dSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8200dd52494dSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
8201dd52494dSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
8202dd52494dSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8203dd52494dSmrgAC_SUBST([GREP])
8204dd52494dSmrg])
8205dd52494dSmrg
8206dd52494dSmrg
8207dd52494dSmrg# _LT_DECL_OBJDUMP
8208dd52494dSmrg# --------------
8209dd52494dSmrg# If we don't have a new enough Autoconf to choose the best objdump
8210dd52494dSmrg# available, choose the one first in the user's PATH.
8211dd52494dSmrgm4_defun([_LT_DECL_OBJDUMP],
8212dd52494dSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8213dd52494dSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
8214dd52494dSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8215dd52494dSmrgAC_SUBST([OBJDUMP])
8216dd52494dSmrg])
8217dd52494dSmrg
8218dd52494dSmrg# _LT_DECL_DLLTOOL
8219dd52494dSmrg# ----------------
8220dd52494dSmrg# Ensure DLLTOOL variable is set.
8221dd52494dSmrgm4_defun([_LT_DECL_DLLTOOL],
8222dd52494dSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8223dd52494dSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
8224dd52494dSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8225dd52494dSmrgAC_SUBST([DLLTOOL])
8226dd52494dSmrg])
8227dd52494dSmrg
822833adc6acSmrg# _LT_DECL_FILECMD
822933adc6acSmrg# ----------------
823033adc6acSmrg# Check for a file(cmd) program that can be used to detect file type and magic
823133adc6acSmrgm4_defun([_LT_DECL_FILECMD],
823233adc6acSmrg[AC_CHECK_TOOL([FILECMD], [file], [:])
823333adc6acSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
823433adc6acSmrg])# _LD_DECL_FILECMD
823533adc6acSmrg
8236dd52494dSmrg# _LT_DECL_SED
8237dd52494dSmrg# ------------
8238dd52494dSmrg# Check for a fully-functional sed program, that truncates
8239dd52494dSmrg# as few characters as possible.  Prefer GNU sed if found.
8240dd52494dSmrgm4_defun([_LT_DECL_SED],
8241dd52494dSmrg[AC_PROG_SED
8242dd52494dSmrgtest -z "$SED" && SED=sed
8243dd52494dSmrgXsed="$SED -e 1s/^X//"
8244dd52494dSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8245dd52494dSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8246dd52494dSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8247dd52494dSmrg])# _LT_DECL_SED
8248dd52494dSmrg
8249dd52494dSmrgm4_ifndef([AC_PROG_SED], [
8250dd52494dSmrg############################################################
8251dd52494dSmrg# NOTE: This macro has been submitted for inclusion into   #
8252dd52494dSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8253dd52494dSmrg#  a released version of Autoconf we should remove this    #
8254dd52494dSmrg#  macro and use it instead.                               #
8255dd52494dSmrg############################################################
8256dd52494dSmrg
8257dd52494dSmrgm4_defun([AC_PROG_SED],
8258dd52494dSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
8259dd52494dSmrgAC_CACHE_VAL(lt_cv_path_SED,
8260dd52494dSmrg[# Loop through the user's path and test for sed and gsed.
8261dd52494dSmrg# Then use that list of sed's as ones to test for truncation.
8262dd52494dSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8263dd52494dSmrgfor as_dir in $PATH
8264dd52494dSmrgdo
8265dd52494dSmrg  IFS=$as_save_IFS
8266dd52494dSmrg  test -z "$as_dir" && as_dir=.
8267dd52494dSmrg  for lt_ac_prog in sed gsed; do
8268dd52494dSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
8269dd52494dSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8270dd52494dSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8271dd52494dSmrg      fi
8272dd52494dSmrg    done
8273dd52494dSmrg  done
8274dd52494dSmrgdone
8275dd52494dSmrgIFS=$as_save_IFS
8276dd52494dSmrglt_ac_max=0
8277dd52494dSmrglt_ac_count=0
8278dd52494dSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8279dd52494dSmrg# along with /bin/sed that truncates output.
8280dd52494dSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8281dd52494dSmrg  test ! -f "$lt_ac_sed" && continue
8282dd52494dSmrg  cat /dev/null > conftest.in
8283dd52494dSmrg  lt_ac_count=0
8284dd52494dSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8285dd52494dSmrg  # Check for GNU sed and select it if it is found.
8286dd52494dSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8287dd52494dSmrg    lt_cv_path_SED=$lt_ac_sed
8288dd52494dSmrg    break
8289dd52494dSmrg  fi
8290dd52494dSmrg  while true; do
8291dd52494dSmrg    cat conftest.in conftest.in >conftest.tmp
8292dd52494dSmrg    mv conftest.tmp conftest.in
8293dd52494dSmrg    cp conftest.in conftest.nl
8294dd52494dSmrg    echo >>conftest.nl
8295dd52494dSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8296dd52494dSmrg    cmp -s conftest.out conftest.nl || break
8297dd52494dSmrg    # 10000 chars as input seems more than enough
8298dd52494dSmrg    test 10 -lt "$lt_ac_count" && break
8299dd52494dSmrg    lt_ac_count=`expr $lt_ac_count + 1`
8300dd52494dSmrg    if test "$lt_ac_count" -gt "$lt_ac_max"; then
8301dd52494dSmrg      lt_ac_max=$lt_ac_count
8302dd52494dSmrg      lt_cv_path_SED=$lt_ac_sed
8303dd52494dSmrg    fi
8304dd52494dSmrg  done
8305dd52494dSmrgdone
8306dd52494dSmrg])
8307dd52494dSmrgSED=$lt_cv_path_SED
8308dd52494dSmrgAC_SUBST([SED])
8309dd52494dSmrgAC_MSG_RESULT([$SED])
8310dd52494dSmrg])#AC_PROG_SED
8311dd52494dSmrg])#m4_ifndef
8312dd52494dSmrg
8313dd52494dSmrg# Old name:
8314dd52494dSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8315dd52494dSmrgdnl aclocal-1.4 backwards compatibility:
8316dd52494dSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
8317dd52494dSmrg
8318dd52494dSmrg
8319dd52494dSmrg# _LT_CHECK_SHELL_FEATURES
8320dd52494dSmrg# ------------------------
8321dd52494dSmrg# Find out whether the shell is Bourne or XSI compatible,
8322dd52494dSmrg# or has some other useful features.
8323dd52494dSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
8324dd52494dSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8325dd52494dSmrg  lt_unset=unset
8326dd52494dSmrgelse
8327dd52494dSmrg  lt_unset=false
8328dd52494dSmrgfi
8329dd52494dSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8330dd52494dSmrg
8331dd52494dSmrg# test EBCDIC or ASCII
8332dd52494dSmrgcase `echo X|tr X '\101'` in
8333dd52494dSmrg A) # ASCII based system
8334dd52494dSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8335dd52494dSmrg  lt_SP2NL='tr \040 \012'
8336dd52494dSmrg  lt_NL2SP='tr \015\012 \040\040'
8337dd52494dSmrg  ;;
8338dd52494dSmrg *) # EBCDIC based system
8339dd52494dSmrg  lt_SP2NL='tr \100 \n'
8340dd52494dSmrg  lt_NL2SP='tr \r\n \100\100'
8341dd52494dSmrg  ;;
8342dd52494dSmrgesac
8343dd52494dSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8344dd52494dSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8345dd52494dSmrg])# _LT_CHECK_SHELL_FEATURES
8346dd52494dSmrg
8347dd52494dSmrg
8348dd52494dSmrg# _LT_PATH_CONVERSION_FUNCTIONS
8349dd52494dSmrg# -----------------------------
8350dd52494dSmrg# Determine what file name conversion functions should be used by
8351dd52494dSmrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8352dd52494dSmrg# for certain cross-compile configurations and native mingw.
8353dd52494dSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8354dd52494dSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8355dd52494dSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
8356dd52494dSmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
8357dd52494dSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
8358dd52494dSmrg[case $host in
8359dd52494dSmrg  *-*-mingw* )
8360dd52494dSmrg    case $build in
8361dd52494dSmrg      *-*-mingw* ) # actually msys
8362dd52494dSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8363dd52494dSmrg        ;;
8364dd52494dSmrg      *-*-cygwin* )
8365dd52494dSmrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8366dd52494dSmrg        ;;
8367dd52494dSmrg      * ) # otherwise, assume *nix
8368dd52494dSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8369dd52494dSmrg        ;;
8370dd52494dSmrg    esac
8371dd52494dSmrg    ;;
8372dd52494dSmrg  *-*-cygwin* )
8373dd52494dSmrg    case $build in
8374dd52494dSmrg      *-*-mingw* ) # actually msys
8375dd52494dSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8376dd52494dSmrg        ;;
8377dd52494dSmrg      *-*-cygwin* )
8378dd52494dSmrg        lt_cv_to_host_file_cmd=func_convert_file_noop
8379dd52494dSmrg        ;;
8380dd52494dSmrg      * ) # otherwise, assume *nix
8381dd52494dSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8382dd52494dSmrg        ;;
8383dd52494dSmrg    esac
8384dd52494dSmrg    ;;
8385dd52494dSmrg  * ) # unhandled hosts (and "normal" native builds)
8386dd52494dSmrg    lt_cv_to_host_file_cmd=func_convert_file_noop
8387dd52494dSmrg    ;;
8388dd52494dSmrgesac
8389dd52494dSmrg])
8390dd52494dSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd
8391dd52494dSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8392dd52494dSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8393dd52494dSmrg         [0], [convert $build file names to $host format])dnl
8394dd52494dSmrg
8395dd52494dSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
8396dd52494dSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8397dd52494dSmrg[#assume ordinary cross tools, or native build.
8398dd52494dSmrglt_cv_to_tool_file_cmd=func_convert_file_noop
8399dd52494dSmrgcase $host in
8400dd52494dSmrg  *-*-mingw* )
8401dd52494dSmrg    case $build in
8402dd52494dSmrg      *-*-mingw* ) # actually msys
8403dd52494dSmrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8404dd52494dSmrg        ;;
8405dd52494dSmrg    esac
8406dd52494dSmrg    ;;
8407dd52494dSmrgesac
8408dd52494dSmrg])
8409dd52494dSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
8410dd52494dSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8411dd52494dSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8412dd52494dSmrg         [0], [convert $build files to toolchain format])dnl
8413dd52494dSmrg])# _LT_PATH_CONVERSION_FUNCTIONS
8414