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