summaryrefslogtreecommitdiffstats
path: root/libtool.m4
diff options
context:
space:
mode:
authorSteve Ellcey <sje@cup.hp.com>2007-05-24 16:37:27 +0000
committerSteve Ellcey <sje@gcc.gnu.org>2007-05-24 16:37:27 +0000
commit1cf3d07da6506564682d18d7c10c9bf80527ab7e (patch)
tree05f83b527820e4462766b5ce11d0cc346fafeaca /libtool.m4
parentpasses.texi: Document predictive commoning. (diff)
downloadgcc-1cf3d07da6506564682d18d7c10c9bf80527ab7e.tar.gz
gcc-1cf3d07da6506564682d18d7c10c9bf80527ab7e.tar.bz2
gcc-1cf3d07da6506564682d18d7c10c9bf80527ab7e.tar.xz
ltmain.sh: Update from ToT Libtool.
* ltmain.sh: Update from ToT Libtool. * libtool.m4: Update from ToT Libtool. * ltsugar.m4: New. Update from ToT Libtool. * ltversion.m4: New. Update from ToT Libtool. * ltoptions.m4: New. Update from ToT Libtool. * ltconfig: Remove. * ltcf-c.sh: Remove. * ltcf-cxx.sh: Remove. * ltcf-gcj.sh: Remove. * Regenerate all subdirs From-SVN: r125032
Diffstat (limited to 'libtool.m4')
-rw-r--r--libtool.m47380
1 files changed, 6769 insertions, 611 deletions
diff --git a/libtool.m4 b/libtool.m4
index cbd74d57161..46d59635dfa 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -1,233 +1,1181 @@
1## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*- 1# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2## Copyright 1996, 1997, 1998, 1999, 2000, 2001 2#
3## Free Software Foundation, Inc. 3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
4## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 4# 2006, 2007 Free Software Foundation, Inc.
5## 5#
6## This program is free software; you can redistribute it and/or modify 6# This file is part of GNU Libtool:
7## it under the terms of the GNU General Public License as published by 7# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
8## the Free Software Foundation; either version 2 of the License, or 8#
9## (at your option) any later version. 9# This file is free software; the Free Software Foundation gives
10## 10# unlimited permission to copy and/or distribute it, with or without
11## This program is distributed in the hope that it will be useful, but 11# modifications, as long as this notice is preserved.
12## WITHOUT ANY WARRANTY; without even the implied warranty of 12
13## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13m4_define([_LT_COPYING], [dnl
14## General Public License for more details. 14# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
15## 15# 2006, 2007 Free Software Foundation, Inc.
16## You should have received a copy of the GNU General Public License 16#
17## along with this program; if not, write to the Free Software 17# This file is part of GNU Libtool:
18## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
19## 19#
20## As a special exception to the GNU General Public License, if you 20# This program is free software; you can redistribute it and/or modify
21## distribute this file as part of a program that contains a 21# it under the terms of the GNU General Public License as published by
22## configuration script generated by Autoconf, you may include it under 22# the Free Software Foundation; either version 2 of the License, or
23## the same distribution terms that you use for the rest of that program. 23# (at your option) any later version.
24 24#
25# serial 46 AC_PROG_LIBTOOL 25# This program is distributed in the hope that it will be useful, but
26AC_DEFUN([AC_PROG_LIBTOOL], 26# WITHOUT ANY WARRANTY; without even the implied warranty of
27[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl 27# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX 28# General Public License for more details.
29dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. 29#
30 AC_PROVIDE_IFELSE([AC_PROG_CXX], 30# You should have received a copy of the GNU General Public License
31 [AC_LIBTOOL_CXX], 31# along with this program; if not, a copy can be downloaded from
32 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX 32# http://www.gnu.org/copyleft/gpl.html, or by writing to the Free
33])]) 33# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
34 34# MA 02110-1301, USA.
35dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. 35#
36dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run 36# As a special exception to the GNU General Public License, if you
37dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. 37# distribute this file as part of a program that contains a
38 AC_PROVIDE_IFELSE([AC_PROG_GCJ], 38# configuration script generated by Autoconf, you may include it under
39 [AC_LIBTOOL_GCJ], 39# the same distribution terms that you use for the rest of that program.
40 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 40])
41 [AC_LIBTOOL_GCJ], 41
42 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], 42# serial 53 LT_INIT
43 [AC_LIBTOOL_GCJ], 43
44 [ifdef([AC_PROG_GCJ], 44
45 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ 45# LT_PREREQ(VERSION)
46])]) 46# ------------------
47 ifdef([A][M_PROG_GCJ], 47# Complain and exit if this libtool version is less that VERSION.
48 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ 48m4_defun([LT_PREREQ],
49])]) 49[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
50 ifdef([LT_AC_PROG_GCJ], 50 [m4_default([$3],
51 [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ 51 [m4_fatal([Libtool version $1 or higher is required],
52])])])])])]) 52 63)])],
53 53 [$2])])
54AC_DEFUN([_AC_PROG_LIBTOOL], 54
55[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 55
56AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl 56# LT_INIT([OPTIONS])
57AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl 57# ------------------
58 58AC_DEFUN([LT_INIT],
59# Save cache, so that ltconfig can load it 59[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
60AC_CACHE_SAVE 60AC_BEFORE([$0], [LT_LANG])dnl
61 61AC_BEFORE([$0], [LT_OUTPUT])dnl
62# Actually configure libtool. ac_aux_dir is where install-sh is found. 62
63AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ 63dnl Autoconf doesn't catch unexpanded LT_ macros by default:
64MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ 64m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
65LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \ 65m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
66AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \ 66dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
67objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \ 67dnl unless we require an AC_DEFUNed macro:
68deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \ 68AC_REQUIRE([LTOPTIONS_VERSION])dnl
69${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ 69AC_REQUIRE([LTSUGAR_VERSION])dnl
70$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \ 70AC_REQUIRE([LTVERSION_VERSION])dnl
71|| AC_MSG_ERROR([libtool configure failed]) 71m4_require([_LT_PROG_LTMAIN])dnl
72 72m4_require([_LT_SET_OPTIONS], [_LT_SET_OPTIONS([$1])])dnl
73# Reload cache, that may have been modified by ltconfig
74AC_CACHE_LOAD
75 73
76# This can be used to rebuild libtool when needed 74# This can be used to rebuild libtool when needed
77LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh" 75LIBTOOL_DEPS="$ltmain"
78 76
79# Always use our own libtool. 77# Always use our own libtool.
80LIBTOOL='$(SHELL) $(top_builddir)/libtool' 78LIBTOOL='$(SHELL) $(top_builddir)/libtool'
81AC_SUBST(LIBTOOL)dnl 79AC_SUBST(LIBTOOL)dnl
82 80
83# Redirect the config.log output again, so that the ltconfig log is not 81_LT_SETUP
84# clobbered by the next message. 82
85exec 5>>./config.log 83# Only expand once:
84m4_define([LT_INIT])
85])# _LT_INIT
86
87# Old names:
88AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
89AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
90dnl aclocal-1.4 backwards compatibility:
91dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
92dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
93
94
95# _LT_CC_BASENAME(CC)
96# -------------------
97# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
98m4_defun([_LT_CC_BASENAME],
99[for cc_temp in $1""; do
100 case $cc_temp in
101 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
102 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
103 \-*) ;;
104 *) break;;
105 esac
106done
107cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
86]) 108])
87 109
88AC_DEFUN([AC_LIBTOOL_SETUP], 110
89[AC_PREREQ(2.13)dnl 111# _LT_FILEUTILS_DEFAULTS
90AC_REQUIRE([AC_ENABLE_SHARED])dnl 112# ----------------------
91AC_REQUIRE([AC_ENABLE_STATIC])dnl 113# It is okay to use these file commands and assume they have been set
92AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 114# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
93AC_REQUIRE([AC_CANONICAL_HOST])dnl 115m4_defun([_LT_FILEUTILS_DEFAULTS],
116[: ${CP="cp -f"}
117: ${MV="mv -f"}
118: ${RM="rm -f"}
119])# _LT_FILEUTILS_DEFAULTS
120
121
122# _LT_SETUP
123# ---------
124m4_defun([_LT_SETUP],
125[AC_REQUIRE([AC_CANONICAL_HOST])dnl
94AC_REQUIRE([AC_CANONICAL_BUILD])dnl 126AC_REQUIRE([AC_CANONICAL_BUILD])dnl
127_LT_DECL([], [host_alias], [0], [The host system])dnl
128_LT_DECL([], [host], [0])dnl
129_LT_DECL([], [host_os], [0])dnl
130dnl
131_LT_DECL([], [build_alias], [0], [The build system])dnl
132_LT_DECL([], [build], [0])dnl
133_LT_DECL([], [build_os], [0])dnl
134dnl
95AC_REQUIRE([AC_PROG_CC])dnl 135AC_REQUIRE([AC_PROG_CC])dnl
96AC_REQUIRE([AC_PROG_LD])dnl 136AC_REQUIRE([LT_PATH_LD])dnl
97AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl 137AC_REQUIRE([LT_PATH_NM])dnl
98AC_REQUIRE([AC_PROG_NM])dnl 138dnl
99AC_REQUIRE([AC_PROG_LN_S])dnl 139AC_REQUIRE([AC_PROG_LN_S])dnl
100AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl 140test -z "$LN_S" && LN_S="ln -s"
101# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! 141_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
142dnl
143AC_REQUIRE([LT_CMD_MAX_LEN])dnl
102AC_REQUIRE([AC_OBJEXT])dnl 144AC_REQUIRE([AC_OBJEXT])dnl
145_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
103AC_REQUIRE([AC_EXEEXT])dnl 146AC_REQUIRE([AC_EXEEXT])dnl
147_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
104dnl 148dnl
149m4_require([_LT_FILEUTILS_DEFAULTS])dnl
150m4_require([_LT_CHECK_SHELL_FEATURES])dnl
151m4_require([_LT_CMD_RELOAD])dnl
152m4_require([_LT_CHECK_MAGIC_METHOD])dnl
153m4_require([_LT_CMD_OLD_ARCHIVE])dnl
154m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
105 155
106AC_LIBTOOL_SYS_MAX_CMD_LEN 156_LT_CONFIG_LIBTOOL_INIT([
157# See if we are running on zsh, and set the options which allow our
158# commands through without removal of \ escapes INIT.
159if test -n "\${ZSH_VERSION+set}" ; then
160 setopt NO_GLOB_SUBST
161fi
162])
163if test -n "${ZSH_VERSION+set}" ; then
164 setopt NO_GLOB_SUBST
165fi
166
167_LT_CHECK_OBJDIR
168
169m4_require([_LT_TAG_COMPILER])dnl
170_LT_PROG_ECHO_BACKSLASH
171
172case $host_os in
173aix3*)
174 # AIX sometimes has problems with the GCC collect2 program. For some
175 # reason, if we set the COLLECT_NAMES environment variable, the problems
176 # vanish in a puff of smoke.
177 if test "X${COLLECT_NAMES+set}" != Xset; then
178 COLLECT_NAMES=
179 export COLLECT_NAMES
180 fi
181 ;;
182esac
183
184# Sed substitution that helps us do robust quoting. It backslashifies
185# metacharacters that are still active within double-quoted strings.
186sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
187
188# Same as above, but do not quote variable references.
189double_quote_subst='s/\([["`\\]]\)/\\\1/g'
190
191# Sed substitution to delay expansion of an escaped shell variable in a
192# double_quote_subst'ed string.
193delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
194
195# Sed substitution to delay expansion of an escaped single quote.
196delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
197
198# Sed substitution to avoid accidental globbing in evaled expressions
199no_glob_subst='s/\*/\\\*/g'
200
201# Global variables:
202ofile=libtool
203can_build_shared=yes
204
205# All known linkers require a `.a' archive for static linking (except MSVC,
206# which needs '.lib').
207libext=a
208
209with_gnu_ld="$lt_cv_prog_gnu_ld"
210
211old_CC="$CC"
212old_CFLAGS="$CFLAGS"
213
214# Set sane defaults for various variables
215test -z "$CC" && CC=cc
216test -z "$LTCC" && LTCC=$CC
217test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
218test -z "$LD" && LD=ld
219test -z "$ac_objext" && ac_objext=o
220
221_LT_CC_BASENAME([$compiler])
107 222
108# Only perform the check for file, if the check method requires it 223# Only perform the check for file, if the check method requires it
224test -z "$MAGIC_CMD" && MAGIC_CMD=file
109case $deplibs_check_method in 225case $deplibs_check_method in
110file_magic*) 226file_magic*)
111 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 227 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
112 AC_PATH_MAGIC 228 _LT_PATH_MAGIC
113 fi 229 fi
114 ;; 230 ;;
115esac 231esac
116 232
117AC_CHECK_TOOL(RANLIB, ranlib, :) 233# Use C for the default configuration in the libtool script
118AC_CHECK_TOOL(STRIP, strip, :) 234LT_SUPPORTED_TAG([CC])
235_LT_LANG_C_CONFIG
236_LT_LANG_DEFAULT_CONFIG
237_LT_CONFIG_COMMANDS
238])# _LT_SETUP
119 239
120# Check for any special flags to pass to ltconfig.
121libtool_flags="--cache-file=$cache_file"
122test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
123test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
124test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
125test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
126test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
127ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
128[libtool_flags="$libtool_flags --enable-dlopen"])
129ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
130[libtool_flags="$libtool_flags --enable-win32-dll"])
131AC_ARG_ENABLE(libtool-lock,
132 [ --disable-libtool-lock avoid locking (might break parallel builds)])
133test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
134test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
135
136AC_ARG_WITH(pic,
137 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
138 pic_mode="$withval", pic_mode=default)
139test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
140test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
141 240
142# Some flags need to be propagated to the compiler or linker for good 241# _LT_PROG_LTMAIN
143# libtool support. 242# ---------------
144case $host in 243# Note that this code is called both from `configure', and `config.status'
145*-*-irix6*) 244# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
146 # Find out which ABI we are using. 245# `config.status' has no value for ac_aux_dir unless we are using Automake,
147 echo '[#]line __oline__ "configure"' > conftest.$ac_ext 246# so we pass a copy along to make sure it has a sensible value anyway.
148 if AC_TRY_EVAL(ac_compile); then 247m4_defun([_LT_PROG_LTMAIN],
149 if test "$lt_cv_prog_gnu_ld" = yes; then 248[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
150 case `/usr/bin/file conftest.$ac_objext` in 249_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
151 *32-bit*) 250ltmain="$ac_aux_dir/ltmain.sh"
152 LD="${LD-ld} -melf32bsmip" 251])# _LT_PROG_LTMAIN
153 ;; 252
154 *N32*) 253
155 LD="${LD-ld} -melf32bmipn32" 254## ------------------------------------- ##
255## Accumulate code for creating libtool. ##
256## ------------------------------------- ##
257
258# So that we can recreate a full libtool script including additional
259# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
260# in macros and then make a single call at the end using the `libtool'
261# label.
262
263
264# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
265# ----------------------------------------
266# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
267m4_define([_LT_CONFIG_LIBTOOL_INIT],
268[m4_ifval([$1],
269 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
270 [$1
271])])])
272
273# Initialize.
274m4_define([_LT_OUTPUT_LIBTOOL_INIT])
275
276
277# _LT_CONFIG_LIBTOOL([COMMANDS])
278# ------------------------------
279# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
280m4_define([_LT_CONFIG_LIBTOOL],
281[m4_ifval([$1],
282 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
283 [$1
284])])])
285
286# Initialize.
287m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
288
289
290# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
291# -----------------------------------------------------
292m4_defun([_LT_CONFIG_SAVE_COMMANDS],
293[_LT_CONFIG_LIBTOOL([$1])
294_LT_CONFIG_LIBTOOL_INIT([$2])
295])
296
297
298# _LT_FORMAT_COMMENT([COMMENT])
299# -----------------------------
300# Add leading comment marks to the start of each line, and a trailing
301# full-stop to the whole comment if one is not present already.
302m4_define([_LT_FORMAT_COMMENT],
303[m4_ifval([$1], [
304m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
305 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
306)])
307
308
309
310## ------------------------ ##
311## FIXME: Eliminate VARNAME ##
312## ------------------------ ##
313
314
315# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
316# -------------------------------------------------------------------
317# CONFIGNAME is the name given to the value in the libtool script.
318# VARNAME is the (base) name used in the configure script.
319# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
320# VARNAME. Any other value will be used directly.
321m4_define([_LT_DECL],
322[lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]],
323 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
324 [m4_ifval([$1], [$1], [$2])])
325 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
326 m4_ifval([$4],
327 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
328 lt_dict_add_subkey([lt_decl_dict], [$2],
329 [tagged?], [m4_ifval([$5], [yes], [no])])])
330])
331
332
333# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
334# --------------------------------------------------------
335m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
336
337
338# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
339# ------------------------------------------------
340m4_define([lt_decl_tag_varnames],
341[_lt_decl_filter([tagged?], [yes], $@)])
342
343
344# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
345# ---------------------------------------------------------
346m4_define([_lt_decl_filter],
347[m4_case([$#],
348 [0], [m4_fatal([$0: too few arguments: $#])],
349 [1], [m4_fatal([$0: too few arguments: $#: $1])],
350 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
351 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
352 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
353])
354
355
356# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
357# --------------------------------------------------
358m4_define([lt_decl_quote_varnames],
359[_lt_decl_filter([value], [1], $@)])
360
361
362# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
363# ---------------------------------------------------
364m4_define([lt_decl_dquote_varnames],
365[_lt_decl_filter([value], [2], $@)])
366
367
368# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
369# ---------------------------------------------------
370m4_define([lt_decl_varnames_tagged],
371[_$0(m4_quote(m4_default([$1], [[, ]])),
372 m4_quote(m4_if([$2], [],
373 m4_quote(lt_decl_tag_varnames),
374 m4_quote(m4_shift($@)))),
375 m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
376m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
377
378
379# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
380# ------------------------------------------------
381m4_define([lt_decl_all_varnames],
382[_$0(m4_quote(m4_default([$1], [[, ]])),
383 m4_if([$2], [],
384 m4_quote(lt_decl_varnames),
385 m4_quote(m4_shift($@))))[]dnl
386])
387m4_define([_lt_decl_all_varnames],
388[lt_join($@, lt_decl_varnames_tagged([$1],
389 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
390])
391
392
393# _LT_CONFIG_STATUS_DECLARE([VARNAME])
394# ------------------------------------
395# Quote a variable value, and forward it to `config.status' so that its
396# declaration there will have the same value as in `configure'. VARNAME
397# must have a single quote delimited value for this to work.
398m4_define([_LT_CONFIG_STATUS_DECLARE],
399[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
400
401
402# _LT_CONFIG_STATUS_DECLARATIONS
403# ------------------------------
404# We delimit libtool config variables with single quotes, so when
405# we write them to config.status, we have to be sure to quote all
406# embedded single quotes properly. In configure, this macro expands
407# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
408#
409# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
410m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
411[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
412 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
413
414
415# _LT_LIBTOOL_TAGS
416# ----------------
417# Output comment and list of tags supported by the script
418m4_defun([_LT_LIBTOOL_TAGS],
419[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
420available_tags="_LT_TAGS"dnl
421])
422
423
424# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
425# -----------------------------------
426# Extract the dictionary values for VARNAME (optionally with TAG) and
427# expand to a commented shell variable setting:
428#
429# # Some comment about what VAR is for.
430# visible_name=$lt_internal_name
431m4_define([_LT_LIBTOOL_DECLARE],
432[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
433 [description])))[]dnl
434m4_pushdef([_libtool_name],
435 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
436m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
437 [0], [_libtool_name=[$]$1],
438 [1], [_libtool_name=$lt_[]$1],
439 [2], [_libtool_name=$lt_[]$1],
440 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
441m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
442])
443
444
445# _LT_LIBTOOL_CONFIG_VARS
446# -----------------------
447# Produce commented declarations of non-tagged libtool config variables
448# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
449# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
450# section) are produced by _LT_LIBTOOL_TAG_VARS.
451m4_defun([_LT_LIBTOOL_CONFIG_VARS],
452[m4_foreach([_lt_var],
453 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
454 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
455
456
457# _LT_LIBTOOL_TAG_VARS(TAG)
458# -------------------------
459m4_define([_LT_LIBTOOL_TAG_VARS],
460[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
461 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
462
463
464# _LT_TAGVAR(VARNAME, [TAGNAME])
465# ------------------------------
466m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
467
468
469# _LT_CONFIG_COMMANDS
470# -------------------
471# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
472# variables for single and double quote escaping we saved from calls
473# to _LT_DECL, we can put quote escaped variables declarations
474# into `config.status', and then the shell code to quote escape them in
475# for loops in `config.status'. Finally, any additional code accumulated
476# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
477m4_defun([_LT_CONFIG_COMMANDS],
478[AC_PROVIDE_IFELSE([LT_OUTPUT],
479 dnl If the libtool generation code has been placed in $CONFIG_LT,
480 dnl instead of duplicating it all over again into config.status,
481 dnl then we will have config.status run $CONFIG_LT later, so it
482 dnl needs to know what name is stored there:
483 [AC_CONFIG_COMMANDS([libtool],
484 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
485 dnl If the libtool generation code is destined for config.status,
486 dnl expand the accumulated commands and init code now:
487 [AC_CONFIG_COMMANDS([libtool],
488 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
489])#_LT_CONFIG_COMMANDS
490
491
492# Initialize.
493m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
494[
495
496# The HP-UX ksh and POSIX shell print the target directory to stdout
497# if CDPATH is set.
498(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
499
500sed_quote_subst='$sed_quote_subst'
501double_quote_subst='$double_quote_subst'
502delay_variable_subst='$delay_variable_subst'
503_LT_CONFIG_STATUS_DECLARATIONS
504LTCC='$LTCC'
505LTCFLAGS='$LTCFLAGS'
506compiler='$compiler_DEFAULT'
507
508# Quote evaled strings.
509for var in lt_decl_all_varnames([[ \
510]], lt_decl_quote_varnames); do
511 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
512 *[[\\\\\\\`\\"\\\$]]*)
513 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
156 ;; 514 ;;
157 *64-bit*) 515 *)
158 LD="${LD-ld} -melf64bmip" 516 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
159 ;; 517 ;;
160 esac 518 esac
161 else 519done
162 case `/usr/bin/file conftest.$ac_objext` in 520
163 *32-bit*) 521# Double-quote double-evaled strings.
164 LD="${LD-ld} -32" 522for var in lt_decl_all_varnames([[ \
523]], lt_decl_dquote_varnames); do
524 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
525 *[[\\\\\\\`\\"\\\$]]*)
526 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
165 ;; 527 ;;
166 *N32*) 528 *)
167 LD="${LD-ld} -n32" 529 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
168 ;;
169 *64-bit*)
170 LD="${LD-ld} -64"
171 ;; 530 ;;
172 esac 531 esac
173 fi 532done
174 fi 533
175 rm -rf conftest* 534# Fix-up fallback echo if it was mangled by the above quoting rules.
535case \$lt_ECHO in
536*'\\\[$]0 --fallback-echo"')dnl "
537 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
176 ;; 538 ;;
539esac
540
541_LT_OUTPUT_LIBTOOL_INIT
542])
543
544
545# LT_OUTPUT
546# ---------
547# This macro allows early generation of the libtool script (before
548# AC_OUTPUT is called), incase it is used in configure for compilation
549# tests.
550AC_DEFUN([LT_OUTPUT],
551[: ${CONFIG_LT=./config.lt}
552AC_MSG_NOTICE([creating $CONFIG_LT])
553cat >"$CONFIG_LT" <<_LTEOF
554#! $SHELL
555# Generated by $as_me.
556# Run this file to recreate a libtool stub with the current configuration.
557
558lt_cl_silent=false
559SHELL=\${CONFIG_SHELL-$SHELL}
560_LTEOF
561
562cat >>"$CONFIG_LT" <<\_LTEOF
563AS_SHELL_SANITIZE
564_AS_PREPARE
565
566exec AS_MESSAGE_FD>&1
567exec AS_MESSAGE_LOG_FD>>config.log
568{
569 echo
570 AS_BOX([Running $as_me.])
571} >&AS_MESSAGE_LOG_FD
572
573lt_cl_help="\
574\`$as_me' creates a local libtool stub from the current configuration,
575for use in further configure time tests before the real libtool is
576generated.
577
578Usage: $[0] [[OPTIONS]]
579
580 -h, --help print this help, then exit
581 -V, --version print version number, then exit
582 -q, --quiet do not print progress messages
583 -d, --debug don't remove temporary files
584
585Report bugs to <bug-libtool@gnu.org>."
586
587lt_cl_version="\
588m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
589m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
590configured by $[0], generated by m4_PACKAGE_STRING.
591
592Copyright (C) 2007 Free Software Foundation, Inc.
593This config.lt script is free software; the Free Software Foundation
594gives unlimited permision to copy, distribute and modify it."
595
596while test $[#] != 0
597do
598 case $[1] in
599 --version | --v* | -V )
600 echo "$lt_cl_version"; exit 0 ;;
601 --help | --h* | -h )
602 echo "$lt_cl_help"; exit 0 ;;
603 --debug | --d* | -d )
604 debug=: ;;
605 --quiet | --q* | --silent | --s* | -q )
606 lt_cl_silent=: ;;
607
608 -*) AC_MSG_ERROR([unrecognized option: $[1]
609Try `$[0] --help' for more information.]) ;;
610
611 *) AC_MSG_ERROR([unrecognized argument: $[1]
612Try `$[0] --help for more information.]) ;;
613 esac
614 shift
615done
616
617if $lt_cl_silent; then
618 exec AS_MESSAGE_FD>/dev/null
619fi
620_LTEOF
621
622cat >>"$CONFIG_LT" <<_LTEOF
623_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
624_LTEOF
625
626cat >>"$CONFIG_LT" <<\_LTEOF
627AC_MSG_NOTICE([creating $ofile])
628_LT_OUTPUT_LIBTOOL_COMMANDS
629AS_EXIT(0)
630_LTEOF
631chmod +x "$CONFIG_LT"
632
633# configure is writing to config.log, but config.lt does its own redirection,
634# appending to config.log, which fails on DOS, as config.log is still kept
635# open by configure. Here we exec the FD to /dev/null, effectively closing
636# config.log, so it can be properly (re)opened and appended to by config.lt.
637if test "$no_create" != yes; then
638 lt_cl_success=:
639 test "$silent" = yes &&
640 lt_config_lt_args="$lt_config_lt_args --quiet"
641 exec AS_MESSAGE_LOG_FD>/dev/null
642 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
643 exec AS_MESSAGE_LOG_FD>>config.log
644 $lt_cl_success || AS_EXIT(1)
645fi
646])# LT_OUTPUT
647
648
649# _LT_CONFIG(TAG)
650# ---------------
651# If TAG is the built-in tag, create an initial libtool script with a
652# default configuration from the untagged config vars. Otherwise add code
653# to config.status for appending the configuration named by TAG from the
654# matching tagged config vars.
655m4_defun([_LT_CONFIG],
656[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
657_LT_CONFIG_SAVE_COMMANDS([
658 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
659 m4_if(_LT_TAG, [C], [
660 # See if we are running on zsh, and set the options which allow our
661 # commands through without removal of \ escapes.
662 if test -n "${ZSH_VERSION+set}" ; then
663 setopt NO_GLOB_SUBST
664 fi
665
666 cfgfile="${ofile}T"
667 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
668 $RM "$cfgfile"
669
670 cat <<_LT_EOF >> "$cfgfile"
671#! $SHELL
672
673# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
674# Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION
675# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
676# NOTE: Changes made to this file will be lost: look at ltmain.sh.
677#
678_LT_COPYING
679_LT_LIBTOOL_TAGS
680
681# ### BEGIN LIBTOOL CONFIG
682_LT_LIBTOOL_CONFIG_VARS
683_LT_LIBTOOL_TAG_VARS
684# ### END LIBTOOL CONFIG
685
686_LT_EOF
687
688 case $host_os in
689 aix3*)
690 cat <<\_LT_EOF >> "$cfgfile"
691# AIX sometimes has problems with the GCC collect2 program. For some
692# reason, if we set the COLLECT_NAMES environment variable, the problems
693# vanish in a puff of smoke.
694if test "X${COLLECT_NAMES+set}" != Xset; then
695 COLLECT_NAMES=
696 export COLLECT_NAMES
697fi
698_LT_EOF
699 ;;
700 esac
701
702 _LT_PROG_LTMAIN
703
704 # We use sed instead of cat because bash on DJGPP gets confused if
705 # if finds mixed CR/LF and LF-only lines. Since sed operates in
706 # text mode, it properly converts lines to CR/LF. This bash problem
707 # is reportedly fixed, but why not run on old versions too?
708 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
709 || (rm -f "$cfgfile"; exit 1)
710
711 _LT_PROG_XSI_SHELLFNS
712
713 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
714 || (rm -f "$cfgfile"; exit 1)
715
716 mv -f "$cfgfile" "$ofile" ||
717 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
718 chmod +x "$ofile"
719],
720[cat <<_LT_EOF >> "$ofile"
721
722dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
723dnl in a comment (ie after a #).
724# ### BEGIN LIBTOOL TAG CONFIG: $1
725_LT_LIBTOOL_TAG_VARS(_LT_TAG)
726# ### END LIBTOOL TAG CONFIG: $1
727_LT_EOF
728])dnl /m4_if
729],
730[m4_if([$1], [], [
731 PACKAGE='$PACKAGE'
732 VERSION='$VERSION'
733 TIMESTAMP='$TIMESTAMP'
734 RM='$RM'
735 ofile='$ofile'], [])
736])dnl /_LT_CONFIG_SAVE_COMMANDS
737])# _LT_CONFIG
738
739
740# LT_SUPPORTED_TAG(TAG)
741# ---------------------
742# Trace this macro to discover what tags are supported by the libtool
743# --tag option, using:
744# autoconf --trace 'LT_SUPPORTED_TAG:$1'
745AC_DEFUN([LT_SUPPORTED_TAG], [])
746
747
748# C support is built-in for now
749m4_define([_LT_LANG_C_enabled], [])
750m4_define([_LT_TAGS], [])
751
752
753# LT_LANG(LANG)
754# -------------
755# Enable libtool support for the given language if not already enabled.
756AC_DEFUN([LT_LANG],
757[AC_BEFORE([$0], [LT_OUTPUT])dnl
758m4_case([$1],
759 [C], [_LT_LANG(C)],
760 [C++], [_LT_LANG(CXX)],
761 [Java], [_LT_LANG(GCJ)],
762 [Fortran 77], [_LT_LANG(F77)],
763 [Fortran], [_LT_LANG(FC)],
764 [Windows Resource], [_LT_LANG(RC)],
765 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
766 [_LT_LANG($1)],
767 [m4_fatal([$0: unsupported language: "$1"])])])dnl
768])# LT_LANG
769
177 770
771# _LT_LANG(LANGNAME)
772# ------------------
773m4_defun([_LT_LANG],
774[m4_ifdef([_LT_LANG_]$1[_enabled], [],
775 [LT_SUPPORTED_TAG([$1])dnl
776 m4_append([_LT_TAGS], [$1 ])dnl
777 m4_define([_LT_LANG_]$1[_enabled], [])dnl
778 _LT_LANG_$1_CONFIG($1)])dnl
779])# _LT_LANG
780
781
782# _LT_LANG_DEFAULT_CONFIG
783# -----------------------
784m4_defun([_LT_LANG_DEFAULT_CONFIG],
785[AC_PROVIDE_IFELSE([AC_PROG_CXX],
786 [LT_LANG(CXX)],
787 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
788
789AC_PROVIDE_IFELSE([AC_PROG_F77],
790 [LT_LANG(F77)],
791 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
792
793AC_PROVIDE_IFELSE([AC_PROG_FC],
794 [LT_LANG(FC)],
795 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
796
797dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
798dnl pulling things in needlessly.
799AC_PROVIDE_IFELSE([AC_PROG_GCJ],
800 [LT_LANG(GCJ)],
801 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
802 [LT_LANG(GCJ)],
803 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
804 [LT_LANG(GCJ)],
805 [m4_ifdef([AC_PROG_GCJ],
806 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
807 m4_ifdef([A][M_PROG_GCJ],
808 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
809 m4_ifdef([LT_PROG_GCJ],
810 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
811
812AC_PROVIDE_IFELSE([LT_PROG_RC],
813 [LT_LANG(RC)],
814 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
815])# _LT_LANG_DEFAULT_CONFIG
816
817# Obsolete macros:
818AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
819AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
820AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
821AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
822dnl aclocal-1.4 backwards compatibility:
823dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
824dnl AC_DEFUN([AC_LIBTOOL_F77], [])
825dnl AC_DEFUN([AC_LIBTOOL_FC], [])
826dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
827
828
829# _LT_TAG_COMPILER
830# ----------------
831m4_defun([_LT_TAG_COMPILER],
832[AC_REQUIRE([AC_PROG_CC])dnl
833
834_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
835_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
836_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
837_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
838
839# If no C compiler was specified, use CC.
840LTCC=${LTCC-"$CC"}
841
842# If no C compiler flags were specified, use CFLAGS.
843LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
844
845# Allow CC to be a program name with arguments.
846compiler=$CC
847])# _LT_TAG_COMPILER
848
849
850# _LT_COMPILER_BOILERPLATE
851# ------------------------
852# Check for compiler boilerplate output or warnings with
853# the simple compiler test code.
854m4_defun([_LT_COMPILER_BOILERPLATE],
855[m4_require([_LT_DECL_SED])dnl
856ac_outfile=conftest.$ac_objext
857echo "$lt_simple_compile_test_code" >conftest.$ac_ext
858eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
859_lt_compiler_boilerplate=`cat conftest.err`
860$RM conftest*
861])# _LT_COMPILER_BOILERPLATE
862
863
864# _LT_LINKER_BOILERPLATE
865# ----------------------
866# Check for linker boilerplate output or warnings with
867# the simple link test code.
868m4_defun([_LT_LINKER_BOILERPLATE],
869[m4_require([_LT_DECL_SED])dnl
870ac_outfile=conftest.$ac_objext
871echo "$lt_simple_link_test_code" >conftest.$ac_ext
872eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
873_lt_linker_boilerplate=`cat conftest.err`
874$RM conftest*
875])# _LT_LINKER_BOILERPLATE
876
877
878# _LT_SYS_MODULE_PATH_AIX
879# -----------------------
880# Links a minimal program and checks the executable
881# for the system default hardcoded library path. In most cases,
882# this is /usr/lib:/lib, but when the MPI compilers are used
883# the location of the communication and MPI libs are included too.
884# If we don't find anything, use the default library path according
885# to the aix ld manual.
886m4_defun([_LT_SYS_MODULE_PATH_AIX],
887[m4_require([_LT_DECL_SED])dnl
888AC_LINK_IFELSE(AC_LANG_PROGRAM,[
889lt_aix_libpath_sed='
890 /Import File Strings/,/^$/ {
891 /^0/ {
892 s/^0 *\(.*\)$/\1/
893 p
894 }
895 }'
896aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
897# Check for a 64-bit object if we didn't find anything.
898if test -z "$aix_libpath"; then
899 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
900fi],[])
901if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
902])# _LT_SYS_MODULE_PATH_AIX
903
904
905# _LT_SHELL_INIT(ARG)
906# -------------------
907m4_define([_LT_SHELL_INIT],
908[ifdef([AC_DIVERSION_NOTICE],
909 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
910 [AC_DIVERT_PUSH(NOTICE)])
911$1
912AC_DIVERT_POP
913])# _LT_SHELL_INIT
914
915
916# _LT_PROG_ECHO_BACKSLASH
917# -----------------------
918# Add some code to the start of the generated configure script which
919# will find an echo command which doesn't interpret backslashes.
920m4_defun([_LT_PROG_ECHO_BACKSLASH],
921[_LT_SHELL_INIT([
922# Check that we are running under the correct shell.
923SHELL=${CONFIG_SHELL-/bin/sh}
924
925case X$lt_ECHO in
926X*--fallback-echo)
927 # Remove one level of quotation (which was required for Make).
928 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
929 ;;
930esac
931
932ECHO=${lt_ECHO-echo}
933if test "X[$]1" = X--no-reexec; then
934 # Discard the --no-reexec flag, and continue.
935 shift
936elif test "X[$]1" = X--fallback-echo; then
937 # Avoid inline document here, it may be left over
938 :
939elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
940 # Yippee, $ECHO works!
941 :
942else
943 # Restart under the correct shell.
944 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
945fi
946
947if test "X[$]1" = X--fallback-echo; then
948 # used as fallback echo
949 shift
950 cat <<_LT_EOF
951[$]*
952_LT_EOF
953 exit 0
954fi
955
956# The HP-UX ksh and POSIX shell print the target directory to stdout
957# if CDPATH is set.
958(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
959
960if test -z "$lt_ECHO"; then
961 if test "X${echo_test_string+set}" != Xset; then
962 # find a string as large as possible, as long as the shell can cope with it
963 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
964 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
965 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
966 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
967 then
968 break
969 fi
970 done
971 fi
972
973 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
974 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
975 test "X$echo_testing_string" = "X$echo_test_string"; then
976 :
977 else
978 # The Solaris, AIX, and Digital Unix default echo programs unquote
979 # backslashes. This makes it impossible to quote backslashes using
980 # echo "$something" | sed 's/\\/\\\\/g'
981 #
982 # So, first we look for a working echo in the user's PATH.
983
984 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
985 for dir in $PATH /usr/ucb; do
986 IFS="$lt_save_ifs"
987 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
988 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
989 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
990 test "X$echo_testing_string" = "X$echo_test_string"; then
991 ECHO="$dir/echo"
992 break
993 fi
994 done
995 IFS="$lt_save_ifs"
996
997 if test "X$ECHO" = Xecho; then
998 # We didn't find a better echo, so look for alternatives.
999 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1000 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1001 test "X$echo_testing_string" = "X$echo_test_string"; then
1002 # This shell has a builtin print -r that does the trick.
1003 ECHO='print -r'
1004 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1005 test "X$CONFIG_SHELL" != X/bin/ksh; then
1006 # If we have ksh, try running configure again with it.
1007 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1008 export ORIGINAL_CONFIG_SHELL
1009 CONFIG_SHELL=/bin/ksh
1010 export CONFIG_SHELL
1011 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1012 else
1013 # Try using printf.
1014 ECHO='printf %s\n'
1015 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1016 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1017 test "X$echo_testing_string" = "X$echo_test_string"; then
1018 # Cool, printf works
1019 :
1020 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1021 test "X$echo_testing_string" = 'X\t' &&
1022 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1023 test "X$echo_testing_string" = "X$echo_test_string"; then
1024 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1025 export CONFIG_SHELL
1026 SHELL="$CONFIG_SHELL"
1027 export SHELL
1028 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1029 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1030 test "X$echo_testing_string" = 'X\t' &&
1031 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1032 test "X$echo_testing_string" = "X$echo_test_string"; then
1033 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1034 else
1035 # maybe with a smaller string...
1036 prev=:
1037
1038 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1039 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1040 then
1041 break
1042 fi
1043 prev="$cmd"
1044 done
1045
1046 if test "$prev" != 'sed 50q "[$]0"'; then
1047 echo_test_string=`eval $prev`
1048 export echo_test_string
1049 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1050 else
1051 # Oops. We lost completely, so just stick with echo.
1052 ECHO=echo
1053 fi
1054 fi
1055 fi
1056 fi
1057 fi
1058fi
1059
1060# Copy echo and quote the copy suitably for passing to libtool from
1061# the Makefile, instead of quoting the original, which is used later.
1062lt_ECHO=$ECHO
1063if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1064 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1065fi
1066
1067AC_SUBST(lt_ECHO)
1068])
1069_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1070_LT_DECL([], [ECHO], [1],
1071 [An echo program that does not interpret backslashes])
1072])# _LT_PROG_ECHO_BACKSLASH
1073
1074
1075# _LT_ENABLE_LOCK
1076# ---------------
1077m4_defun([_LT_ENABLE_LOCK],
1078[AC_REQUIRE([AC_OBJEXT])dnl
1079AC_ARG_ENABLE([libtool-lock],
1080 [AS_HELP_STRING([--disable-libtool-lock],
1081 [avoid locking (might break parallel builds)])])
1082test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1083
1084# Some flags need to be propagated to the compiler or linker for good
1085# libtool support.
1086case $host in
178ia64-*-hpux*) 1087ia64-*-hpux*)
179 # Find out which ABI we are using. 1088 # Find out which ABI we are using.
180 echo 'int i;' > conftest.$ac_ext 1089 echo 'int i;' > conftest.$ac_ext
181 if AC_TRY_EVAL(ac_compile); then 1090 if AC_TRY_EVAL(ac_compile); then
182 case "`/usr/bin/file conftest.o`" in 1091 case `/usr/bin/file conftest.$ac_objext` in
183 *ELF-32*) 1092 *ELF-32*)
184 HPUX_IA64_MODE="32" 1093 HPUX_IA64_MODE="32"
185 ;; 1094 ;;
186 *ELF-64*) 1095 *ELF-64*)
187 HPUX_IA64_MODE="64" 1096 HPUX_IA64_MODE="64"
188 ;; 1097 ;;
189 esac 1098 esac
190 fi 1099 fi
191 rm -rf conftest* 1100 rm -rf conftest*
192 ;; 1101 ;;
193 1102*-*-irix6*)
194x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
195 # Find out which ABI we are using. 1103 # Find out which ABI we are using.
196 echo 'int i;' > conftest.$ac_ext 1104 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
197 if AC_TRY_EVAL(ac_compile); then 1105 if AC_TRY_EVAL(ac_compile); then
198 case "`/usr/bin/file conftest.o`" in 1106 if test "$lt_cv_prog_gnu_ld" = yes; then
199 *32-bit*) 1107 case `/usr/bin/file conftest.$ac_objext` in
200 case $host in 1108 *32-bit*)
201 x86_64-*linux*) 1109 LD="${LD-ld} -melf32bsmip"
202 LD="${LD-ld} -m elf_i386" 1110 ;;
203 ;; 1111 *N32*)
204 ppc64-*linux*|powerpc64-*linux*) 1112 LD="${LD-ld} -melf32bmipn32"
205 LD="${LD-ld} -m elf32ppclinux" 1113 ;;
206 ;; 1114 *64-bit*)
207 s390x-*linux*) 1115 LD="${LD-ld} -melf64bmip"
208 LD="${LD-ld} -m elf_s390" 1116 ;;
209 ;;
210 sparc64-*linux*)
211 LD="${LD-ld} -m elf32_sparc"
212 ;;
213 esac 1117 esac
214 ;; 1118 else
215 *64-bit*) 1119 case `/usr/bin/file conftest.$ac_objext` in
216 case $host in 1120 *32-bit*)
217 x86_64-*linux*) 1121 LD="${LD-ld} -32"
218 LD="${LD-ld} -m elf_x86_64" 1122 ;;
219 ;; 1123 *N32*)
220 ppc*-*linux*|powerpc*-*linux*) 1124 LD="${LD-ld} -n32"
221 LD="${LD-ld} -m elf64ppc" 1125 ;;
222 ;; 1126 *64-bit*)
223 s390*-*linux*) 1127 LD="${LD-ld} -64"
224 LD="${LD-ld} -m elf64_s390" 1128 ;;
225 ;;
226 sparc*-*linux*)
227 LD="${LD-ld} -m elf64_sparc"
228 ;;
229 esac 1129 esac
230 ;; 1130 fi
1131 fi
1132 rm -rf conftest*
1133 ;;
1134
1135x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1136s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1137 # Find out which ABI we are using.
1138 echo 'int i;' > conftest.$ac_ext
1139 if AC_TRY_EVAL(ac_compile); then
1140 case `/usr/bin/file conftest.o` in
1141 *32-bit*)
1142 case $host in
1143 x86_64-*kfreebsd*-gnu)
1144 LD="${LD-ld} -m elf_i386_fbsd"
1145 ;;
1146 x86_64-*linux*)
1147 LD="${LD-ld} -m elf_i386"
1148 ;;
1149 ppc64-*linux*|powerpc64-*linux*)
1150 LD="${LD-ld} -m elf32ppclinux"
1151 ;;
1152 s390x-*linux*)
1153 LD="${LD-ld} -m elf_s390"
1154 ;;
1155 sparc64-*linux*)
1156 LD="${LD-ld} -m elf32_sparc"
1157 ;;
1158 esac
1159 ;;
1160 *64-bit*)
1161 case $host in
1162 x86_64-*kfreebsd*-gnu)
1163 LD="${LD-ld} -m elf_x86_64_fbsd"
1164 ;;
1165 x86_64-*linux*)
1166 LD="${LD-ld} -m elf_x86_64"
1167 ;;
1168 ppc*-*linux*|powerpc*-*linux*)
1169 LD="${LD-ld} -m elf64ppc"
1170 ;;
1171 s390*-*linux*|s390*-*tpf*)
1172 LD="${LD-ld} -m elf64_s390"
1173 ;;
1174 sparc*-*linux*)
1175 LD="${LD-ld} -m elf64_sparc"
1176 ;;
1177 esac
1178 ;;
231 esac 1179 esac
232 fi 1180 fi
233 rm -rf conftest* 1181 rm -rf conftest*
@@ -238,54 +1186,177 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
238 SAVE_CFLAGS="$CFLAGS" 1186 SAVE_CFLAGS="$CFLAGS"
239 CFLAGS="$CFLAGS -belf" 1187 CFLAGS="$CFLAGS -belf"
240 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1188 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
241 [AC_LANG_SAVE 1189 [AC_LANG_PUSH(C)
242 AC_LANG_C 1190 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
243 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1191 AC_LANG_POP])
244 AC_LANG_RESTORE])
245 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1192 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
246 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1193 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
247 CFLAGS="$SAVE_CFLAGS" 1194 CFLAGS="$SAVE_CFLAGS"
248 fi 1195 fi
249 ;; 1196 ;;
250 1197sparc*-*solaris*)
251ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], 1198 # Find out which ABI we are using.
252[*-*-cygwin* | *-*-mingw* | *-*-pw32*) 1199 echo 'int i;' > conftest.$ac_ext
253 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 1200 if AC_TRY_EVAL(ac_compile); then
254 AC_CHECK_TOOL(AS, as, false) 1201 case `/usr/bin/file conftest.o` in
255 AC_CHECK_TOOL(OBJDUMP, objdump, false) 1202 *64-bit*)
256 1203 case $lt_cv_prog_gnu_ld in
257 # recent cygwin and mingw systems supply a stub DllMain which the user 1204 yes*) LD="${LD-ld} -m elf64_sparc" ;;
258 # can override, but on older systems we have to supply one 1205 *) LD="${LD-ld} -64" ;;
259 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain, 1206 esac
260 [AC_TRY_LINK([], 1207 ;;
261 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*); 1208 esac
262 DllMain (0, 0, 0);], 1209 fi
263 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])]) 1210 rm -rf conftest*
264 1211 ;;
265 case $host/$CC in
266 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
267 # old mingw systems require "-dll" to link a DLL, while more recent ones
268 # require "-mdll"
269 SAVE_CFLAGS="$CFLAGS"
270 CFLAGS="$CFLAGS -mdll"
271 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
272 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
273 CFLAGS="$SAVE_CFLAGS" ;;
274 *-*-cygwin* | *-*-pw32*)
275 # cygwin systems need to pass --dll to the linker, and not link
276 # crt.o which will require a WinMain@16 definition.
277 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
278 esac
279 ;;
280 ])
281esac 1212esac
1213
1214need_locks="$enable_libtool_lock"
1215])# _LT_ENABLE_LOCK
1216
1217
1218# _LT_CMD_OLD_ARCHIVE
1219# -------------------
1220m4_defun([_LT_CMD_OLD_ARCHIVE],
1221[AC_CHECK_TOOL(AR, ar, false)
1222test -z "$AR" && AR=ar
1223test -z "$AR_FLAGS" && AR_FLAGS=cru
1224_LT_DECL([], [AR], [1], [The archiver])
1225_LT_DECL([], [AR_FLAGS], [1])
1226
1227AC_CHECK_TOOL(STRIP, strip, :)
1228test -z "$STRIP" && STRIP=:
1229_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1230
1231AC_CHECK_TOOL(RANLIB, ranlib, :)
1232test -z "$RANLIB" && RANLIB=:
1233_LT_DECL([], [RANLIB], [1],
1234 [Commands used to install an old-style archive])
1235
1236# Determine commands to create old-style static archives.
1237old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1238old_postinstall_cmds='chmod 644 $oldlib'
1239old_postuninstall_cmds=
1240
1241if test -n "$RANLIB"; then
1242 case $host_os in
1243 openbsd*)
1244 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1245 ;;
1246 *)
1247 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1248 ;;
1249 esac
1250 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1251fi
1252_LT_DECL([], [old_postinstall_cmds], [2])
1253_LT_DECL([], [old_postuninstall_cmds], [2])
1254_LT_TAGDECL([], [old_archive_cmds], [2],
1255 [Commands used to build an old-style archive])
1256])# _LT_CMD_OLD_ARCHIVE
1257
1258
1259# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1260# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1261# ----------------------------------------------------------------
1262# Check whether the given compiler option works
1263AC_DEFUN([_LT_COMPILER_OPTION],
1264[AC_REQUIRE([AC_OBJEXT])dnl
1265m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1266m4_require([_LT_DECL_SED])dnl
1267AC_CACHE_CHECK([$1], [$2],
1268 [$2=no
1269 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1270 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1271 lt_compiler_flag="$3"
1272 # Insert the option either (1) after the last *FLAGS variable, or
1273 # (2) before a word containing "conftest.", or (3) at the end.
1274 # Note that $ac_compile itself does not contain backslashes and begins
1275 # with a dollar sign (not a hyphen), so the echo should work correctly.
1276 # The option is referenced via a variable to avoid confusing sed.
1277 lt_compile=`echo "$ac_compile" | $SED \
1278 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1279 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1280 -e 's:$: $lt_compiler_flag:'`
1281 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1282 (eval "$lt_compile" 2>conftest.err)
1283 ac_status=$?
1284 cat conftest.err >&AS_MESSAGE_LOG_FD
1285 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1286 if (exit $ac_status) && test -s "$ac_outfile"; then
1287 # The compiler can only warn and ignore the option if not recognized
1288 # So say no if there are warnings other than the usual output.
1289 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1290 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1291 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1292 $2=yes
1293 fi
1294 fi
1295 $RM conftest*
282]) 1296])
283 1297
1298if test x"[$]$2" = xyes; then
1299 m4_if([$5], , :, [$5])
1300else
1301 m4_if([$6], , :, [$6])
1302fi
1303])# _LT_COMPILER_OPTION
284 1304
285# AC_LIBTOOL_SYS_MAX_CMD_LEN 1305# Old name:
286# -------------------------- 1306AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
287AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], 1307dnl aclocal-1.4 backwards compatibility:
288[# find the maximum length of command line arguments 1308dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1309
1310
1311# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1312# [ACTION-SUCCESS], [ACTION-FAILURE])
1313# ----------------------------------------------------
1314# Check whether the given linker option works
1315AC_DEFUN([_LT_LINKER_OPTION],
1316[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1317m4_require([_LT_DECL_SED])dnl
1318AC_CACHE_CHECK([$1], [$2],
1319 [$2=no
1320 save_LDFLAGS="$LDFLAGS"
1321 LDFLAGS="$LDFLAGS $3"
1322 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1323 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1324 # The linker can only warn and ignore the option if not recognized
1325 # So say no if there are warnings
1326 if test -s conftest.err; then
1327 # Append any errors to the config.log.
1328 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1329 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1330 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1331 if diff conftest.exp conftest.er2 >/dev/null; then
1332 $2=yes
1333 fi
1334 else
1335 $2=yes
1336 fi
1337 fi
1338 $RM conftest*
1339 LDFLAGS="$save_LDFLAGS"
1340])
1341
1342if test x"[$]$2" = xyes; then
1343 m4_if([$4], , :, [$4])
1344else
1345 m4_if([$5], , :, [$5])
1346fi
1347])# _LT_LINKER_OPTION
1348
1349# Old name:
1350AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1351dnl aclocal-1.4 backwards compatibility:
1352dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1353
1354
1355# LT_CMD_MAX_LEN
1356#---------------
1357AC_DEFUN([LT_CMD_MAX_LEN],
1358[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1359# find the maximum length of command line arguments
289AC_MSG_CHECKING([the maximum length of command line arguments]) 1360AC_MSG_CHECKING([the maximum length of command line arguments])
290AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1361AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
291 i=0 1362 i=0
@@ -300,6 +1371,13 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
300 lt_cv_sys_max_cmd_len=12288; # 12K is about right 1371 lt_cv_sys_max_cmd_len=12288; # 12K is about right
301 ;; 1372 ;;
302 1373
1374 gnu*)
1375 # Under GNU Hurd, this test is not required because there is
1376 # no limit to the length of command line arguments.
1377 # Libtool will interpret -1 as no limit whatsoever
1378 lt_cv_sys_max_cmd_len=-1;
1379 ;;
1380
303 cygwin* | mingw*) 1381 cygwin* | mingw*)
304 # On Win9x/ME, this test blows up -- it succeeds, but takes 1382 # On Win9x/ME, this test blows up -- it succeeds, but takes
305 # about 5 minutes as the teststring grows exponentially. 1383 # about 5 minutes as the teststring grows exponentially.
@@ -324,171 +1402,1214 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
324 elif test -x /usr/sbin/sysctl; then 1402 elif test -x /usr/sbin/sysctl; then
325 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1403 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
326 else 1404 else
327 lt_cv_sys_max_cmd_len=65536 # usable default for *BSD 1405 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
328 fi 1406 fi
329 # And add a safety zone 1407 # And add a safety zone
330 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1408 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
331 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1409 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
332 ;; 1410 ;;
1411
1412 interix*)
1413 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1414 lt_cv_sys_max_cmd_len=196608
1415 ;;
1416
1417 osf*)
1418 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1419 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1420 # nice to cause kernel panics so lets avoid the loop below.
1421 # First set a reasonable default.
1422 lt_cv_sys_max_cmd_len=16384
1423 #
1424 if test -x /sbin/sysconfig; then
1425 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1426 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1427 esac
1428 fi
1429 ;;
1430 sco3.2v5*)
1431 lt_cv_sys_max_cmd_len=102400
1432 ;;
1433 sysv5* | sco5v6* | sysv4.2uw2*)
1434 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1435 if test -n "$kargmax"; then
1436 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1437 else
1438 lt_cv_sys_max_cmd_len=32768
1439 fi
1440 ;;
1441 *)
1442 # Make teststring a little bigger before we do anything with it.
1443 # a 1K string should be a reasonable start.
1444 for i in 1 2 3 4 5 6 7 8 ; do
1445 teststring=$teststring$teststring
1446 done
1447 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1448 # If test is not a shell built-in, we'll probably end up computing a
1449 # maximum length that is only half of the actual maximum length, but
1450 # we can't tell.
1451 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1452 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1453 test $i != 17 # 1/2 MB should be enough
1454 do
1455 i=`expr $i + 1`
1456 teststring=$teststring$teststring
1457 done
1458 # Only check the string length outside the loop.
1459 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1460 teststring=
1461 # Add a significant safety factor because C++ compilers can tack on massive
1462 # amounts of additional arguments before passing them to the linker.
1463 # It appears as though 1/2 is a usable value.
1464 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1465 ;;
333 esac 1466 esac
334]) 1467])
335if test -n "$lt_cv_sys_max_cmd_len" ; then 1468if test -n $lt_cv_sys_max_cmd_len ; then
336 AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1469 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
337else 1470else
338 AC_MSG_RESULT(none) 1471 AC_MSG_RESULT(none)
339fi 1472fi
340])# AC_LIBTOOL_SYS_MAX_CMD_LEN 1473max_cmd_len=$lt_cv_sys_max_cmd_len
341 1474_LT_DECL([], [max_cmd_len], [0],
342 1475 [What is the maximum length of a command?])
343# AC_LIBTOOL_DLOPEN - enable checks for dlopen support 1476])# LT_CMD_MAX_LEN
344AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) 1477
345 1478# Old name:
346# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's 1479AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
347AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) 1480dnl aclocal-1.4 backwards compatibility:
348 1481dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
349# AC_ENABLE_SHARED - implement the --enable-shared flag 1482
350# Usage: AC_ENABLE_SHARED[(DEFAULT)] 1483
351# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to 1484# _LT_HEADER_DLFCN
352# `yes'. 1485# ----------------
353AC_DEFUN([AC_ENABLE_SHARED], 1486m4_defun([_LT_HEADER_DLFCN],
354[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 1487[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
355AC_ARG_ENABLE(shared, 1488])# _LT_HEADER_DLFCN
356changequote(<<, >>)dnl 1489
357<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], 1490
358changequote([, ])dnl 1491# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
359[p=${PACKAGE-default} 1492# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
360case $enableval in 1493# ----------------------------------------------------------------
361yes) enable_shared=yes ;; 1494m4_defun([_LT_TRY_DLOPEN_SELF],
362no) enable_shared=no ;; 1495[m4_require([_LT_HEADER_DLFCN])dnl
363*) 1496if test "$cross_compiling" = yes; then :
364 enable_shared=no 1497 [$4]
365 # Look at the argument we got. We use all the common list separators. 1498else
366 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," 1499 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
367 for pkg in $enableval; do 1500 lt_status=$lt_dlunknown
368 if test "X$pkg" = "X$p"; then 1501 cat > conftest.$ac_ext <<_LT_EOF
369 enable_shared=yes 1502[#line __oline__ "configure"
1503#include "confdefs.h"
1504
1505#if HAVE_DLFCN_H
1506#include <dlfcn.h>
1507#endif
1508
1509#include <stdio.h>
1510
1511#ifdef RTLD_GLOBAL
1512# define LT_DLGLOBAL RTLD_GLOBAL
1513#else
1514# ifdef DL_GLOBAL
1515# define LT_DLGLOBAL DL_GLOBAL
1516# else
1517# define LT_DLGLOBAL 0
1518# endif
1519#endif
1520
1521/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1522 find out it does not work in some platform. */
1523#ifndef LT_DLLAZY_OR_NOW
1524# ifdef RTLD_LAZY
1525# define LT_DLLAZY_OR_NOW RTLD_LAZY
1526# else
1527# ifdef DL_LAZY
1528# define LT_DLLAZY_OR_NOW DL_LAZY
1529# else
1530# ifdef RTLD_NOW
1531# define LT_DLLAZY_OR_NOW RTLD_NOW
1532# else
1533# ifdef DL_NOW
1534# define LT_DLLAZY_OR_NOW DL_NOW
1535# else
1536# define LT_DLLAZY_OR_NOW 0
1537# endif
1538# endif
1539# endif
1540# endif
1541#endif
1542
1543#ifdef __cplusplus
1544extern "C" void exit (int);
1545#endif
1546
1547void fnord() { int i=42;}
1548int main ()
1549{
1550 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1551 int status = $lt_dlunknown;
1552
1553 if (self)
1554 {
1555 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1556 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1557 /* dlclose (self); */
1558 }
1559 else
1560 puts (dlerror ());
1561
1562 exit (status);
1563}]
1564_LT_EOF
1565 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1566 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1567 lt_status=$?
1568 case x$lt_status in
1569 x$lt_dlno_uscore) $1 ;;
1570 x$lt_dlneed_uscore) $2 ;;
1571 x$lt_dlunknown|x*) $3 ;;
1572 esac
1573 else :
1574 # compilation failed
1575 $3
1576 fi
1577fi
1578rm -fr conftest*
1579])# _LT_TRY_DLOPEN_SELF
1580
1581
1582# LT_SYS_DLOPEN_SELF
1583# ------------------
1584AC_DEFUN([LT_SYS_DLOPEN_SELF],
1585[m4_require([_LT_HEADER_DLFCN])dnl
1586if test "x$enable_dlopen" != xyes; then
1587 enable_dlopen=unknown
1588 enable_dlopen_self=unknown
1589 enable_dlopen_self_static=unknown
1590else
1591 lt_cv_dlopen=no
1592 lt_cv_dlopen_libs=
1593
1594 case $host_os in
1595 beos*)
1596 lt_cv_dlopen="load_add_on"
1597 lt_cv_dlopen_libs=
1598 lt_cv_dlopen_self=yes
1599 ;;
1600
1601 mingw* | pw32*)
1602 lt_cv_dlopen="LoadLibrary"
1603 lt_cv_dlopen_libs=
1604 ;;
1605
1606 cygwin*)
1607 lt_cv_dlopen="dlopen"
1608 lt_cv_dlopen_libs=
1609 ;;
1610
1611 darwin*)
1612 # if libdl is installed we need to link against it
1613 AC_CHECK_LIB([dl], [dlopen],
1614 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1615 lt_cv_dlopen="dyld"
1616 lt_cv_dlopen_libs=
1617 lt_cv_dlopen_self=yes
1618 ])
1619 ;;
1620
1621 *)
1622 AC_CHECK_FUNC([shl_load],
1623 [lt_cv_dlopen="shl_load"],
1624 [AC_CHECK_LIB([dld], [shl_load],
1625 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1626 [AC_CHECK_FUNC([dlopen],
1627 [lt_cv_dlopen="dlopen"],
1628 [AC_CHECK_LIB([dl], [dlopen],
1629 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1630 [AC_CHECK_LIB([svld], [dlopen],
1631 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1632 [AC_CHECK_LIB([dld], [dld_link],
1633 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1634 ])
1635 ])
1636 ])
1637 ])
1638 ])
1639 ;;
1640 esac
1641
1642 if test "x$lt_cv_dlopen" != xno; then
1643 enable_dlopen=yes
1644 else
1645 enable_dlopen=no
1646 fi
1647
1648 case $lt_cv_dlopen in
1649 dlopen)
1650 save_CPPFLAGS="$CPPFLAGS"
1651 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1652
1653 save_LDFLAGS="$LDFLAGS"
1654 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1655
1656 save_LIBS="$LIBS"
1657 LIBS="$lt_cv_dlopen_libs $LIBS"
1658
1659 AC_CACHE_CHECK([whether a program can dlopen itself],
1660 lt_cv_dlopen_self, [dnl
1661 _LT_TRY_DLOPEN_SELF(
1662 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1663 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1664 ])
1665
1666 if test "x$lt_cv_dlopen_self" = xyes; then
1667 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1668 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1669 lt_cv_dlopen_self_static, [dnl
1670 _LT_TRY_DLOPEN_SELF(
1671 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1672 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1673 ])
370 fi 1674 fi
371 done 1675
372 IFS="$ac_save_ifs" 1676 CPPFLAGS="$save_CPPFLAGS"
373 ;; 1677 LDFLAGS="$save_LDFLAGS"
374esac], 1678 LIBS="$save_LIBS"
375enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl 1679 ;;
1680 esac
1681
1682 case $lt_cv_dlopen_self in
1683 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1684 *) enable_dlopen_self=unknown ;;
1685 esac
1686
1687 case $lt_cv_dlopen_self_static in
1688 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1689 *) enable_dlopen_self_static=unknown ;;
1690 esac
1691fi
1692_LT_DECL([dlopen_support], [enable_dlopen], [0],
1693 [Whether dlopen is supported])
1694_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1695 [Whether dlopen of programs is supported])
1696_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1697 [Whether dlopen of statically linked programs is supported])
1698])# LT_SYS_DLOPEN_SELF
1699
1700# Old name:
1701AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1702dnl aclocal-1.4 backwards compatibility:
1703dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1704
1705
1706# _LT_COMPILER_C_O([TAGNAME])
1707# ---------------------------
1708# Check to see if options -c and -o are simultaneously supported by compiler.
1709# This macro does not hard code the compiler like AC_PROG_CC_C_O.
1710m4_defun([_LT_COMPILER_C_O],
1711[AC_REQUIRE([AC_OBJEXT])dnl
1712m4_require([_LT_DECL_SED])dnl
1713m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1714m4_require([_LT_TAG_COMPILER])dnl
1715AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1716 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1717 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1718 $RM -r conftest 2>/dev/null
1719 mkdir conftest
1720 cd conftest
1721 mkdir out
1722 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1723
1724 lt_compiler_flag="-o out/conftest2.$ac_objext"
1725 # Insert the option either (1) after the last *FLAGS variable, or
1726 # (2) before a word containing "conftest.", or (3) at the end.
1727 # Note that $ac_compile itself does not contain backslashes and begins
1728 # with a dollar sign (not a hyphen), so the echo should work correctly.
1729 lt_compile=`echo "$ac_compile" | $SED \
1730 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1731 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1732 -e 's:$: $lt_compiler_flag:'`
1733 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1734 (eval "$lt_compile" 2>out/conftest.err)
1735 ac_status=$?
1736 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1737 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1738 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1739 then
1740 # The compiler can only warn and ignore the option if not recognized
1741 # So say no if there are warnings
1742 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1743 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1744 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1745 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1746 fi
1747 fi
1748 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1749 $RM conftest*
1750 # SGI C++ compiler will create directory out/ii_files/ for
1751 # template instantiation
1752 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1753 $RM out/* && rmdir out
1754 cd ..
1755 $RM -r conftest
1756 $RM conftest*
376]) 1757])
1758_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1759 [Does compiler simultaneously support -c and -o options?])
1760])# _LT_COMPILER_C_O
377 1761
378# AC_DISABLE_SHARED - set the default shared flag to --disable-shared 1762
379AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1763# _LT_COMPILER_FILE_LOCKS([TAGNAME])
380AC_ENABLE_SHARED(no)]) 1764# ----------------------------------
381 1765# Check to see if we can do hard links to lock some files if needed
382# AC_ENABLE_STATIC - implement the --enable-static flag 1766m4_defun([_LT_COMPILER_FILE_LOCKS],
383# Usage: AC_ENABLE_STATIC[(DEFAULT)] 1767[m4_require([_LT_ENABLE_LOCK])dnl
384# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to 1768m4_require([_LT_FILEUTILS_DEFAULTS])dnl
385# `yes'. 1769_LT_COMPILER_C_O([$1])
386AC_DEFUN([AC_ENABLE_STATIC], 1770
387[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 1771hard_links="nottested"
388AC_ARG_ENABLE(static, 1772if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
389changequote(<<, >>)dnl 1773 # do not overwrite the value of need_locks provided by the user
390<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], 1774 AC_MSG_CHECKING([if we can lock with hard links])
391changequote([, ])dnl 1775 hard_links=yes
392[p=${PACKAGE-default} 1776 $RM conftest*
393case $enableval in 1777 ln conftest.a conftest.b 2>/dev/null && hard_links=no
394yes) enable_static=yes ;; 1778 touch conftest.a
395no) enable_static=no ;; 1779 ln conftest.a conftest.b 2>&5 || hard_links=no
396*) 1780 ln conftest.a conftest.b 2>/dev/null && hard_links=no
397 enable_static=no 1781 AC_MSG_RESULT([$hard_links])
398 # Look at the argument we got. We use all the common list separators. 1782 if test "$hard_links" = no; then
399 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," 1783 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
400 for pkg in $enableval; do 1784 need_locks=warn
401 if test "X$pkg" = "X$p"; then 1785 fi
402 enable_static=yes 1786else
1787 need_locks=no
1788fi
1789_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1790])# _LT_COMPILER_FILE_LOCKS
1791
1792
1793# _LT_CHECK_OBJDIR
1794# ----------------
1795m4_defun([_LT_CHECK_OBJDIR],
1796[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1797[rm -f .libs 2>/dev/null
1798mkdir .libs 2>/dev/null
1799if test -d .libs; then
1800 lt_cv_objdir=.libs
1801else
1802 # MS-DOS does not allow filenames that begin with a dot.
1803 lt_cv_objdir=_libs
1804fi
1805rmdir .libs 2>/dev/null])
1806objdir=$lt_cv_objdir
1807_LT_DECL([], [objdir], [0],
1808 [The name of the directory that contains temporary libtool files])dnl
1809m4_pattern_allow([LT_OBJDIR])dnl
1810AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1811 [Define to the sub-directory in which libtool stores uninstalled libraries.])
1812])# _LT_CHECK_OBJDIR
1813
1814
1815# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1816# --------------------------------------
1817# Check hardcoding attributes.
1818m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1819[AC_MSG_CHECKING([how to hardcode library paths into programs])
1820_LT_TAGVAR(hardcode_action, $1)=
1821if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1822 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1823 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1824
1825 # We can hardcode non-existent directories.
1826 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1827 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1828 # have to relink, otherwise we might link with an installed library
1829 # when we should be linking with a yet-to-be-installed one
1830 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1831 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1832 # Linking always hardcodes the temporary library directory.
1833 _LT_TAGVAR(hardcode_action, $1)=relink
1834 else
1835 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1836 _LT_TAGVAR(hardcode_action, $1)=immediate
1837 fi
1838else
1839 # We cannot hardcode anything, or else we can only hardcode existing
1840 # directories.
1841 _LT_TAGVAR(hardcode_action, $1)=unsupported
1842fi
1843AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1844
1845if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
1846 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
1847 # Fast installation is not supported
1848 enable_fast_install=no
1849elif test "$shlibpath_overrides_runpath" = yes ||
1850 test "$enable_shared" = no; then
1851 # Fast installation is not necessary
1852 enable_fast_install=needless
1853fi
1854_LT_TAGDECL([], [hardcode_action], [0],
1855 [How to hardcode a shared library path into an executable])
1856])# _LT_LINKER_HARDCODE_LIBPATH
1857
1858
1859# _LT_CMD_STRIPLIB
1860# ----------------
1861m4_defun([_LT_CMD_STRIPLIB],
1862[m4_require([_LT_DECL_EGREP])
1863striplib=
1864old_striplib=
1865AC_MSG_CHECKING([whether stripping libraries is possible])
1866if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
1867 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1868 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1869 AC_MSG_RESULT([yes])
1870else
1871# FIXME - insert some real tests, host_os isn't really good enough
1872 case $host_os in
1873 darwin*)
1874 if test -n "$STRIP" ; then
1875 striplib="$STRIP -x"
1876 old_striplib="$STRIP -S"
1877 AC_MSG_RESULT([yes])
1878 else
1879 AC_MSG_RESULT([no])
1880 fi
1881 ;;
1882 *)
1883 AC_MSG_RESULT([no])
1884 ;;
1885 esac
1886fi
1887_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
1888_LT_DECL([], [striplib], [1])
1889])# _LT_CMD_STRIPLIB
1890
1891
1892# _LT_SYS_DYNAMIC_LINKER([TAG])
1893# -----------------------------
1894# PORTME Fill in your ld.so characteristics
1895m4_defun([_LT_SYS_DYNAMIC_LINKER],
1896[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1897m4_require([_LT_DECL_EGREP])dnl
1898m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1899m4_require([_LT_DECL_SED])dnl
1900AC_MSG_CHECKING([dynamic linker characteristics])
1901m4_case([$1],
1902 [C], [withGCC=$GCC],
1903 [CXX], [withGCC=$GXX],
1904 [F77], [withGCC=$G77],
1905 [FC], [withGCC=$ac_cv_fc_compiler_gnu],
1906 [GCJ], [withGCC=$GCC],
1907 [], [withGCC=$GCC
1908if test "$withGCC" = yes; then
1909 case $host_os in
1910 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1911 *) lt_awk_arg="/^libraries:/" ;;
1912 esac
1913 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1914 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
1915 # if the path contains ";" then we assume it to be the separator
1916 # otherwise default to the standard path separator (i.e. ":") - it is
1917 # assumed that no part of a normal pathname contains ";" but that should
1918 # okay in the real world where ";" in dirpaths is itself problematic.
1919 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1920 else
1921 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1922 fi
1923 # Ok, now we have the path, separated by spaces, we can step through it
1924 # and add multilib dir if necessary.
1925 lt_tmp_lt_search_path_spec=
1926 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1927 for lt_sys_path in $lt_search_path_spec; do
1928 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1929 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1930 else
1931 test -d "$lt_sys_path" && \
1932 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
403 fi 1933 fi
404 done 1934 done
405 IFS="$ac_save_ifs" 1935 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
1936BEGIN {RS=" "; FS="/|\n";} {
1937 lt_foo="";
1938 lt_count=0;
1939 for (lt_i = NF; lt_i > 0; lt_i--) {
1940 if ($lt_i != "" && $lt_i != ".") {
1941 if ($lt_i == "..") {
1942 lt_count++;
1943 } else {
1944 if (lt_count == 0) {
1945 lt_foo="/" $lt_i lt_foo;
1946 } else {
1947 lt_count--;
1948 }
1949 }
1950 }
1951 }
1952 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1953 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1954}'`
1955 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
1956else
1957 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1958fi],
1959[withGCC=$GCC])
1960library_names_spec=
1961libname_spec='lib$name'
1962soname_spec=
1963shrext_cmds=".so"
1964postinstall_cmds=
1965postuninstall_cmds=
1966finish_cmds=
1967finish_eval=
1968shlibpath_var=
1969shlibpath_overrides_runpath=unknown
1970version_type=none
1971dynamic_linker="$host_os ld.so"
1972sys_lib_dlsearch_path_spec="/lib /usr/lib"
1973need_lib_prefix=unknown
1974hardcode_into_libs=no
1975
1976# when you set need_version to no, make sure it does not cause -set_version
1977# flags to be left without arguments
1978need_version=unknown
1979
1980case $host_os in
1981aix3*)
1982 version_type=linux
1983 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1984 shlibpath_var=LIBPATH
1985
1986 # AIX 3 has no versioning support, so we append a major version to the name.
1987 soname_spec='${libname}${release}${shared_ext}$major'
406 ;; 1988 ;;
407esac],
408enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
409])
410 1989
411# AC_DISABLE_STATIC - set the default static flag to --disable-static 1990aix4* | aix5*)
412AC_DEFUN([AC_DISABLE_STATIC], 1991 version_type=linux
413[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1992 need_lib_prefix=no
414AC_ENABLE_STATIC(no)]) 1993 need_version=no
415 1994 hardcode_into_libs=yes
416 1995 if test "$host_cpu" = ia64; then
417# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag 1996 # AIX 5 supports IA64
418# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] 1997 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
419# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to 1998 shlibpath_var=LD_LIBRARY_PATH
420# `yes'. 1999 else
421AC_DEFUN([AC_ENABLE_FAST_INSTALL], 2000 # With GCC up to 2.95.x, collect2 would create an import file
422[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 2001 # for dependence libraries. The import file would start with
423AC_ARG_ENABLE(fast-install, 2002 # the line `#! .'. This would cause the generated library to
424changequote(<<, >>)dnl 2003 # depend on `.', always an invalid library. This was fixed in
425<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], 2004 # development snapshots of GCC prior to 3.0.
426changequote([, ])dnl 2005 case $host_os in
427[p=${PACKAGE-default} 2006 aix4 | aix4.[[01]] | aix4.[[01]].*)
428case $enableval in 2007 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
429yes) enable_fast_install=yes ;; 2008 echo ' yes '
430no) enable_fast_install=no ;; 2009 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
431*) 2010 :
432 enable_fast_install=no 2011 else
433 # Look at the argument we got. We use all the common list separators. 2012 can_build_shared=no
434 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," 2013 fi
435 for pkg in $enableval; do 2014 ;;
436 if test "X$pkg" = "X$p"; then 2015 esac
437 enable_fast_install=yes 2016 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2017 # soname into executable. Probably we can add versioning support to
2018 # collect2, so additional links can be useful in future.
2019 if test "$aix_use_runtimelinking" = yes; then
2020 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2021 # instead of lib<name>.a to let people know that these are not
2022 # typical AIX shared libraries.
2023 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2024 else
2025 # We preserve .a as extension for shared libraries through AIX4.2
2026 # and later when we are not doing run time linking.
2027 library_names_spec='${libname}${release}.a $libname.a'
2028 soname_spec='${libname}${release}${shared_ext}$major'
438 fi 2029 fi
439 done 2030 shlibpath_var=LIBPATH
440 IFS="$ac_save_ifs" 2031 fi
2032 ;;
2033
2034amigaos*)
2035 if test "$host_cpu" = m68k; then
2036 library_names_spec='$libname.ixlibrary $libname.a'
2037 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2038 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2039 else
2040 dynamic_linker=no
2041 fi
2042 ;;
2043
2044beos*)
2045 library_names_spec='${libname}${shared_ext}'
2046 dynamic_linker="$host_os ld.so"
2047 shlibpath_var=LIBRARY_PATH
2048 ;;
2049
2050bsdi[[45]]*)
2051 version_type=linux
2052 need_version=no
2053 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2054 soname_spec='${libname}${release}${shared_ext}$major'
2055 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2056 shlibpath_var=LD_LIBRARY_PATH
2057 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2058 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2059 # the default ld.so.conf also contains /usr/contrib/lib and
2060 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2061 # libtool to hard-code these into programs
2062 ;;
2063
2064cygwin* | mingw* | pw32*)
2065 version_type=windows
2066 shrext_cmds=".dll"
2067 need_version=no
2068 need_lib_prefix=no
2069
2070 case $withGCC,$host_os in
2071 yes,cygwin* | yes,mingw* | yes,pw32*)
2072 library_names_spec='$libname.dll.a'
2073 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2074 postinstall_cmds='base_file=`basename \${file}`~
2075 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2076 dldir=$destdir/`dirname \$dlpath`~
2077 test -d \$dldir || mkdir -p \$dldir~
2078 $install_prog $dir/$dlname \$dldir/$dlname~
2079 chmod a+x \$dldir/$dlname~
2080 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2081 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2082 fi'
2083 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2084 dlpath=$dir/\$dldll~
2085 $RM \$dlpath'
2086 shlibpath_overrides_runpath=yes
2087
2088 case $host_os in
2089 cygwin*)
2090 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2091 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2092 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2093 ;;
2094 mingw*)
2095 # MinGW DLLs use traditional 'lib' prefix
2096 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2097 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2098 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2099 # It is most probably a Windows format PATH printed by
2100 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2101 # path with ; separators, and with drive letters. We can handle the
2102 # drive letters (cygwin fileutils understands them), so leave them,
2103 # especially as we might pass files found there to a mingw objdump,
2104 # which wouldn't understand a cygwinified path. Ahh.
2105 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2106 else
2107 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2108 fi
2109 ;;
2110 pw32*)
2111 # pw32 DLLs use 'pw' prefix rather than 'lib'
2112 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2113 ;;
2114 esac
2115 ;;
2116
2117 *)
2118 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2119 ;;
2120 esac
2121 dynamic_linker='Win32 ld.exe'
2122 # FIXME: first we should search . and the directory the executable is in
2123 shlibpath_var=PATH
2124 ;;
2125
2126darwin* | rhapsody*)
2127 dynamic_linker="$host_os dyld"
2128 version_type=darwin
2129 need_lib_prefix=no
2130 need_version=no
2131 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2132 soname_spec='${libname}${release}${major}$shared_ext'
2133 shlibpath_overrides_runpath=yes
2134 shlibpath_var=DYLD_LIBRARY_PATH
2135 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2136m4_if([$1], [],[
2137 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2138 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2139 ;;
2140
2141dgux*)
2142 version_type=linux
2143 need_lib_prefix=no
2144 need_version=no
2145 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2146 soname_spec='${libname}${release}${shared_ext}$major'
2147 shlibpath_var=LD_LIBRARY_PATH
2148 ;;
2149
2150freebsd1*)
2151 dynamic_linker=no
2152 ;;
2153
2154freebsd* | dragonfly*)
2155 # DragonFly does not have aout. When/if they implement a new
2156 # versioning mechanism, adjust this.
2157 if test -x /usr/bin/objformat; then
2158 objformat=`/usr/bin/objformat`
2159 else
2160 case $host_os in
2161 freebsd[[123]]*) objformat=aout ;;
2162 *) objformat=elf ;;
2163 esac
2164 fi
2165 version_type=freebsd-$objformat
2166 case $version_type in
2167 freebsd-elf*)
2168 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2169 need_version=no
2170 need_lib_prefix=no
2171 ;;
2172 freebsd-*)
2173 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2174 need_version=yes
2175 ;;
2176 esac
2177 shlibpath_var=LD_LIBRARY_PATH
2178 case $host_os in
2179 freebsd2*)
2180 shlibpath_overrides_runpath=yes
2181 ;;
2182 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2183 shlibpath_overrides_runpath=yes
2184 hardcode_into_libs=yes
2185 ;;
2186 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2187 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2188 shlibpath_overrides_runpath=no
2189 hardcode_into_libs=yes
2190 ;;
2191 *) # from 4.6 on, and DragonFly
2192 shlibpath_overrides_runpath=yes
2193 hardcode_into_libs=yes
2194 ;;
2195 esac
2196 ;;
2197
2198gnu*)
2199 version_type=linux
2200 need_lib_prefix=no
2201 need_version=no
2202 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2203 soname_spec='${libname}${release}${shared_ext}$major'
2204 shlibpath_var=LD_LIBRARY_PATH
2205 hardcode_into_libs=yes
2206 ;;
2207
2208hpux9* | hpux10* | hpux11*)
2209 # Give a soname corresponding to the major version so that dld.sl refuses to
2210 # link against other versions.
2211 version_type=sunos
2212 need_lib_prefix=no
2213 need_version=no
2214 case $host_cpu in
2215 ia64*)
2216 shrext_cmds='.so'
2217 hardcode_into_libs=yes
2218 dynamic_linker="$host_os dld.so"
2219 shlibpath_var=LD_LIBRARY_PATH
2220 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2221 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2222 soname_spec='${libname}${release}${shared_ext}$major'
2223 if test "X$HPUX_IA64_MODE" = X32; then
2224 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2225 else
2226 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2227 fi
2228 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2229 ;;
2230 hppa*64*)
2231 shrext_cmds='.sl'
2232 hardcode_into_libs=yes
2233 dynamic_linker="$host_os dld.sl"
2234 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2235 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2236 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2237 soname_spec='${libname}${release}${shared_ext}$major'
2238 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2239 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2240 ;;
2241 *)
2242 shrext_cmds='.sl'
2243 dynamic_linker="$host_os dld.sl"
2244 shlibpath_var=SHLIB_PATH
2245 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2246 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2247 soname_spec='${libname}${release}${shared_ext}$major'
2248 ;;
2249 esac
2250 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2251 postinstall_cmds='chmod 555 $lib'
2252 ;;
2253
2254interix[[3-9]]*)
2255 version_type=linux
2256 need_lib_prefix=no
2257 need_version=no
2258 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2259 soname_spec='${libname}${release}${shared_ext}$major'
2260 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2261 shlibpath_var=LD_LIBRARY_PATH
2262 shlibpath_overrides_runpath=no
2263 hardcode_into_libs=yes
2264 ;;
2265
2266irix5* | irix6* | nonstopux*)
2267 case $host_os in
2268 nonstopux*) version_type=nonstopux ;;
2269 *)
2270 if test "$lt_cv_prog_gnu_ld" = yes; then
2271 version_type=linux
2272 else
2273 version_type=irix
2274 fi ;;
2275 esac
2276 need_lib_prefix=no
2277 need_version=no
2278 soname_spec='${libname}${release}${shared_ext}$major'
2279 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2280 case $host_os in
2281 irix5* | nonstopux*)
2282 libsuff= shlibsuff=
2283 ;;
2284 *)
2285 case $LD in # libtool.m4 will add one of these switches to LD
2286 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2287 libsuff= shlibsuff= libmagic=32-bit;;
2288 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2289 libsuff=32 shlibsuff=N32 libmagic=N32;;
2290 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2291 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2292 *) libsuff= shlibsuff= libmagic=never-match;;
2293 esac
2294 ;;
2295 esac
2296 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2297 shlibpath_overrides_runpath=no
2298 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2299 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2300 hardcode_into_libs=yes
2301 ;;
2302
2303# No shared lib support for Linux oldld, aout, or coff.
2304linux*oldld* | linux*aout* | linux*coff*)
2305 dynamic_linker=no
2306 ;;
2307
2308# This must be Linux ELF.
2309linux* | k*bsd*-gnu)
2310 version_type=linux
2311 need_lib_prefix=no
2312 need_version=no
2313 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2314 soname_spec='${libname}${release}${shared_ext}$major'
2315 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2316 shlibpath_var=LD_LIBRARY_PATH
2317 shlibpath_overrides_runpath=no
2318 # Some binutils ld are patched to set DT_RUNPATH
2319 save_LDFLAGS=$LDFLAGS
2320 save_libdir=$libdir
2321 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2322 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2323 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2324 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir"],
2325 [shlibpath_overrides_runpath=yes])])
2326 LDFLAGS=$save_LDFLAGS
2327 libdir=$save_libdir
2328
2329 # This implies no fast_install, which is unacceptable.
2330 # Some rework will be needed to allow for fast_install
2331 # before this can be enabled.
2332 hardcode_into_libs=yes
2333
2334 # Append ld.so.conf contents to the search path
2335 if test -f /etc/ld.so.conf; then
2336 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/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2337 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2338 fi
2339
2340 # We used to test for /lib/ld.so.1 and disable shared libraries on
2341 # powerpc, because MkLinux only supported shared libraries with the
2342 # GNU dynamic linker. Since this was broken with cross compilers,
2343 # most powerpc-linux boxes support dynamic linking these days and
2344 # people can always --disable-shared, the test was removed, and we
2345 # assume the GNU/Linux dynamic linker is in use.
2346 dynamic_linker='GNU/Linux ld.so'
2347 ;;
2348
2349netbsd*)
2350 version_type=sunos
2351 need_lib_prefix=no
2352 need_version=no
2353 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2354 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2355 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2356 dynamic_linker='NetBSD (a.out) ld.so'
2357 else
2358 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2359 soname_spec='${libname}${release}${shared_ext}$major'
2360 dynamic_linker='NetBSD ld.elf_so'
2361 fi
2362 shlibpath_var=LD_LIBRARY_PATH
2363 shlibpath_overrides_runpath=yes
2364 hardcode_into_libs=yes
441 ;; 2365 ;;
442esac],
443enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
444])
445 2366
446# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install 2367newsos6)
447AC_DEFUN([AC_DISABLE_FAST_INSTALL], 2368 version_type=linux
448[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2369 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
449AC_ENABLE_FAST_INSTALL(no)]) 2370 shlibpath_var=LD_LIBRARY_PATH
2371 shlibpath_overrides_runpath=yes
2372 ;;
2373
2374*nto* | *qnx*)
2375 version_type=qnx
2376 need_lib_prefix=no
2377 need_version=no
2378 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2379 soname_spec='${libname}${release}${shared_ext}$major'
2380 shlibpath_var=LD_LIBRARY_PATH
2381 shlibpath_overrides_runpath=no
2382 hardcode_into_libs=yes
2383 dynamic_linker='ldqnx.so'
2384 ;;
2385
2386openbsd*)
2387 version_type=sunos
2388 sys_lib_dlsearch_path_spec="/usr/lib"
2389 need_lib_prefix=no
2390 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2391 case $host_os in
2392 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2393 *) need_version=no ;;
2394 esac
2395 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2396 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2397 shlibpath_var=LD_LIBRARY_PATH
2398 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2399 case $host_os in
2400 openbsd2.[[89]] | openbsd2.[[89]].*)
2401 shlibpath_overrides_runpath=no
2402 ;;
2403 *)
2404 shlibpath_overrides_runpath=yes
2405 ;;
2406 esac
2407 else
2408 shlibpath_overrides_runpath=yes
2409 fi
2410 ;;
2411
2412os2*)
2413 libname_spec='$name'
2414 shrext_cmds=".dll"
2415 need_lib_prefix=no
2416 library_names_spec='$libname${shared_ext} $libname.a'
2417 dynamic_linker='OS/2 ld.exe'
2418 shlibpath_var=LIBPATH
2419 ;;
2420
2421osf3* | osf4* | osf5*)
2422 version_type=osf
2423 need_lib_prefix=no
2424 need_version=no
2425 soname_spec='${libname}${release}${shared_ext}$major'
2426 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2427 shlibpath_var=LD_LIBRARY_PATH
2428 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2429 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2430 ;;
2431
2432rdos*)
2433 dynamic_linker=no
2434 ;;
2435
2436solaris*)
2437 version_type=linux
2438 need_lib_prefix=no
2439 need_version=no
2440 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2441 soname_spec='${libname}${release}${shared_ext}$major'
2442 shlibpath_var=LD_LIBRARY_PATH
2443 shlibpath_overrides_runpath=yes
2444 hardcode_into_libs=yes
2445 # ldd complains unless libraries are executable
2446 postinstall_cmds='chmod +x $lib'
2447 ;;
2448
2449sunos4*)
2450 version_type=sunos
2451 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2452 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2453 shlibpath_var=LD_LIBRARY_PATH
2454 shlibpath_overrides_runpath=yes
2455 if test "$with_gnu_ld" = yes; then
2456 need_lib_prefix=no
2457 fi
2458 need_version=yes
2459 ;;
2460
2461sysv4 | sysv4.3*)
2462 version_type=linux
2463 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2464 soname_spec='${libname}${release}${shared_ext}$major'
2465 shlibpath_var=LD_LIBRARY_PATH
2466 case $host_vendor in
2467 sni)
2468 shlibpath_overrides_runpath=no
2469 need_lib_prefix=no
2470 runpath_var=LD_RUN_PATH
2471 ;;
2472 siemens)
2473 need_lib_prefix=no
2474 ;;
2475 motorola)
2476 need_lib_prefix=no
2477 need_version=no
2478 shlibpath_overrides_runpath=no
2479 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2480 ;;
2481 esac
2482 ;;
2483
2484sysv4*MP*)
2485 if test -d /usr/nec ;then
2486 version_type=linux
2487 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2488 soname_spec='$libname${shared_ext}.$major'
2489 shlibpath_var=LD_LIBRARY_PATH
2490 fi
2491 ;;
2492
2493sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2494 version_type=freebsd-elf
2495 need_lib_prefix=no
2496 need_version=no
2497 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2498 soname_spec='${libname}${release}${shared_ext}$major'
2499 shlibpath_var=LD_LIBRARY_PATH
2500 shlibpath_overrides_runpath=yes
2501 hardcode_into_libs=yes
2502 if test "$with_gnu_ld" = yes; then
2503 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2504 else
2505 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2506 case $host_os in
2507 sco3.2v5*)
2508 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2509 ;;
2510 esac
2511 fi
2512 sys_lib_dlsearch_path_spec='/usr/lib'
2513 ;;
2514
2515tpf*)
2516 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2517 version_type=linux
2518 need_lib_prefix=no
2519 need_version=no
2520 library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2521 shlibpath_var=LD_LIBRARY_PATH
2522 shlibpath_overrides_runpath=no
2523 hardcode_into_libs=yes
2524 ;;
2525
2526uts4*)
2527 version_type=linux
2528 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2529 soname_spec='${libname}${release}${shared_ext}$major'
2530 shlibpath_var=LD_LIBRARY_PATH
2531 ;;
450 2532
451# AC_LIBTOOL_PICMODE - implement the --with-pic flag 2533*)
452# Usage: AC_LIBTOOL_PICMODE[(MODE)] 2534 dynamic_linker=no
453# Where MODE is either `yes' or `no'. If omitted, it defaults to 2535 ;;
454# `both'. 2536esac
455AC_DEFUN([AC_LIBTOOL_PICMODE], 2537AC_MSG_RESULT([$dynamic_linker])
456[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2538test "$dynamic_linker" = no && can_build_shared=no
457pic_mode=ifelse($#,1,$1,default)]) 2539
2540variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2541if test "$GCC" = yes; then
2542 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2543fi
458 2544
2545_LT_DECL([], [variables_saved_for_relink], [1],
2546 [Variables whose values should be saved in libtool wrapper scripts and
2547 restored at link time])
2548_LT_DECL([], [need_lib_prefix], [0],
2549 [Do we need the "lib" prefix for modules?])
2550_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2551_LT_DECL([], [version_type], [0], [Library versioning type])
2552_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2553_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2554_LT_DECL([], [shlibpath_overrides_runpath], [0],
2555 [Is shlibpath searched before the hard-coded library search path?])
2556_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2557_LT_DECL([], [library_names_spec], [1],
2558 [[List of archive names. First name is the real one, the rest are links.
2559 The last name is the one that the linker finds with -lNAME]])
2560_LT_DECL([], [soname_spec], [1],
2561 [[The coded name of the library, if different from the real name]])
2562_LT_DECL([], [postinstall_cmds], [2],
2563 [Command to use after installation of a shared archive])
2564_LT_DECL([], [postuninstall_cmds], [2],
2565 [Command to use after uninstallation of a shared archive])
2566_LT_DECL([], [finish_cmds], [2],
2567 [Commands used to finish a libtool library installation in a directory])
2568_LT_DECL([], [finish_eval], [1],
2569 [[As "finish_cmds", except a single script fragment to be evaled but
2570 not shown]])
2571_LT_DECL([], [hardcode_into_libs], [0],
2572 [Whether we should hardcode library paths into libraries])
2573_LT_DECL([], [sys_lib_search_path_spec], [2],
2574 [Compile-time system search path for libraries])
2575_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2576 [Run-time system search path for libraries])
2577])# _LT_SYS_DYNAMIC_LINKER
459 2578
460# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library 2579
461AC_DEFUN([AC_PATH_TOOL_PREFIX], 2580# _LT_PATH_TOOL_PREFIX(TOOL)
462[AC_MSG_CHECKING([for $1]) 2581# --------------------------
2582# find a file program which can recognize shared library
2583AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2584[m4_require([_LT_DECL_EGREP])dnl
2585AC_MSG_CHECKING([for $1])
463AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2586AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
464[case $MAGIC_CMD in 2587[case $MAGIC_CMD in
465 /*) 2588[[\\/*] | ?:[\\/]*])
466 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2589 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
467 ;; 2590 ;;
468 ?:/*) 2591*)
469 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path. 2592 lt_save_MAGIC_CMD="$MAGIC_CMD"
470 ;; 2593 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
471 *)
472 ac_save_MAGIC_CMD="$MAGIC_CMD"
473 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
474dnl $ac_dummy forces splitting on constant user-supplied paths. 2594dnl $ac_dummy forces splitting on constant user-supplied paths.
475dnl POSIX.2 word splitting is done only on the output of word expansions, 2595dnl POSIX.2 word splitting is done only on the output of word expansions,
476dnl not every word. This closes a longstanding sh security hole. 2596dnl not every word. This closes a longstanding sh security hole.
477 ac_dummy="ifelse([$2], , $PATH, [$2])" 2597 ac_dummy="m4_if([$2], , $PATH, [$2])"
478 for ac_dir in $ac_dummy; do 2598 for ac_dir in $ac_dummy; do
2599 IFS="$lt_save_ifs"
479 test -z "$ac_dir" && ac_dir=. 2600 test -z "$ac_dir" && ac_dir=.
480 if test -f $ac_dir/$1; then 2601 if test -f $ac_dir/$1; then
481 lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2602 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
482 if test -n "$file_magic_test_file"; then 2603 if test -n "$file_magic_test_file"; then
483 case $deplibs_check_method in 2604 case $deplibs_check_method in
484 "file_magic "*) 2605 "file_magic "*)
485 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" 2606 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
486 MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2607 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
487 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2608 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
488 egrep "$file_magic_regex" > /dev/null; then 2609 $EGREP "$file_magic_regex" > /dev/null; then
489 : 2610 :
490 else 2611 else
491 cat <<EOF 1>&2 2612 cat <<_LT_EOF 1>&2
492 2613
493*** Warning: the command libtool uses to detect shared libraries, 2614*** Warning: the command libtool uses to detect shared libraries,
494*** $file_magic_cmd, produces output that libtool cannot recognize. 2615*** $file_magic_cmd, produces output that libtool cannot recognize.
@@ -499,15 +2620,15 @@ dnl not every word. This closes a longstanding sh security hole.
499*** may want to report the problem to your system manager and/or to 2620*** may want to report the problem to your system manager and/or to
500*** bug-libtool@gnu.org 2621*** bug-libtool@gnu.org
501 2622
502EOF 2623_LT_EOF
503 fi ;; 2624 fi ;;
504 esac 2625 esac
505 fi 2626 fi
506 break 2627 break
507 fi 2628 fi
508 done 2629 done
509 IFS="$ac_save_ifs" 2630 IFS="$lt_save_ifs"
510 MAGIC_CMD="$ac_save_MAGIC_CMD" 2631 MAGIC_CMD="$lt_save_MAGIC_CMD"
511 ;; 2632 ;;
512esac]) 2633esac])
513MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2634MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
@@ -516,35 +2637,51 @@ if test -n "$MAGIC_CMD"; then
516else 2637else
517 AC_MSG_RESULT(no) 2638 AC_MSG_RESULT(no)
518fi 2639fi
519]) 2640_LT_DECL([], [MAGIC_CMD], [0],
2641 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2642])# _LT_PATH_TOOL_PREFIX
2643
2644# Old name:
2645AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2646dnl aclocal-1.4 backwards compatibility:
2647dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
520 2648
521 2649
522# AC_PATH_MAGIC - find a file program which can recognise a shared library 2650# _LT_PATH_MAGIC
523AC_DEFUN([AC_PATH_MAGIC], 2651# --------------
524[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl 2652# find a file program which can recognize a shared library
525AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH) 2653m4_defun([_LT_PATH_MAGIC],
2654[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
526if test -z "$lt_cv_path_MAGIC_CMD"; then 2655if test -z "$lt_cv_path_MAGIC_CMD"; then
527 if test -n "$ac_tool_prefix"; then 2656 if test -n "$ac_tool_prefix"; then
528 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH) 2657 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
529 else 2658 else
530 MAGIC_CMD=: 2659 MAGIC_CMD=:
531 fi 2660 fi
532fi 2661fi
533]) 2662])# _LT_PATH_MAGIC
534 2663
535 2664
536# AC_PROG_LD - find the path to the GNU or non-GNU linker 2665# LT_PATH_LD
537AC_DEFUN([AC_PROG_LD], 2666# ----------
538[AC_ARG_WITH(gnu-ld, 2667# find the pathname to the GNU or non-GNU linker
539[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], 2668AC_DEFUN([LT_PATH_LD],
540test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) 2669[AC_REQUIRE([AC_PROG_CC])dnl
541AC_REQUIRE([AC_PROG_CC])dnl
542AC_REQUIRE([AC_CANONICAL_HOST])dnl 2670AC_REQUIRE([AC_CANONICAL_HOST])dnl
543AC_REQUIRE([AC_CANONICAL_BUILD])dnl 2671AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2672m4_require([_LT_DECL_SED])dnl
2673m4_require([_LT_DECL_EGREP])dnl
2674
2675AC_ARG_WITH([gnu-ld],
2676 [AS_HELP_STRING([--with-gnu-ld],
2677 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2678 [test "$withval" = no || with_gnu_ld=yes],
2679 [with_gnu_ld=no])dnl
2680
544ac_prog=ld 2681ac_prog=ld
545if test "$GCC" = yes; then 2682if test "$GCC" = yes; then
546 # Check if gcc -print-prog-name=ld gives a path. 2683 # Check if gcc -print-prog-name=ld gives a path.
547 AC_MSG_CHECKING([for ld used by GCC]) 2684 AC_MSG_CHECKING([for ld used by $CC])
548 case $host in 2685 case $host in
549 *-*-mingw*) 2686 *-*-mingw*)
550 # gcc leaves a trailing carriage return which upsets mingw 2687 # gcc leaves a trailing carriage return which upsets mingw
@@ -554,12 +2691,12 @@ if test "$GCC" = yes; then
554 esac 2691 esac
555 case $ac_prog in 2692 case $ac_prog in
556 # Accept absolute paths. 2693 # Accept absolute paths.
557 [[\\/]* | [A-Za-z]:[\\/]*)] 2694 [[\\/]]* | ?:[[\\/]]*)
558 re_direlt=['/[^/][^/]*/\.\./'] 2695 re_direlt='/[[^/]][[^/]]*/\.\./'
559 # Canonicalize the path of ld 2696 # Canonicalize the pathname of ld
560 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` 2697 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
561 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2698 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
562 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 2699 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
563 done 2700 done
564 test -z "$LD" && LD="$ac_prog" 2701 test -z "$LD" && LD="$ac_prog"
565 ;; 2702 ;;
@@ -579,22 +2716,26 @@ else
579fi 2716fi
580AC_CACHE_VAL(lt_cv_path_LD, 2717AC_CACHE_VAL(lt_cv_path_LD,
581[if test -z "$LD"; then 2718[if test -z "$LD"; then
582 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" 2719 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
583 for ac_dir in $PATH; do 2720 for ac_dir in $PATH; do
2721 IFS="$lt_save_ifs"
584 test -z "$ac_dir" && ac_dir=. 2722 test -z "$ac_dir" && ac_dir=.
585 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2723 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
586 lt_cv_path_LD="$ac_dir/$ac_prog" 2724 lt_cv_path_LD="$ac_dir/$ac_prog"
587 # Check to see if the program is GNU ld. I'd rather use --version, 2725 # Check to see if the program is GNU ld. I'd rather use --version,
588 # but apparently some GNU ld's only accept -v. 2726 # but apparently some variants of GNU ld only accept -v.
589 # Break only if it was the GNU/non-GNU ld that we prefer. 2727 # Break only if it was the GNU/non-GNU ld that we prefer.
590 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then 2728 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2729 *GNU* | *'with BFD'*)
591 test "$with_gnu_ld" != no && break 2730 test "$with_gnu_ld" != no && break
592 else 2731 ;;
2732 *)
593 test "$with_gnu_ld" != yes && break 2733 test "$with_gnu_ld" != yes && break
594 fi 2734 ;;
2735 esac
595 fi 2736 fi
596 done 2737 done
597 IFS="$ac_save_ifs" 2738 IFS="$lt_save_ifs"
598else 2739else
599 lt_cv_path_LD="$LD" # Let the user override the test with a path. 2740 lt_cv_path_LD="$LD" # Let the user override the test with a path.
600fi]) 2741fi])
@@ -605,33 +2746,72 @@ else
605 AC_MSG_RESULT(no) 2746 AC_MSG_RESULT(no)
606fi 2747fi
607test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2748test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
608AC_PROG_LD_GNU 2749_LT_PATH_LD_GNU
609]) 2750AC_SUBST([LD])
2751
2752_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2753])# LT_PATH_LD
610 2754
611AC_DEFUN([AC_PROG_LD_GNU], 2755# Old names:
2756AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2757AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2758dnl aclocal-1.4 backwards compatibility:
2759dnl AC_DEFUN([AM_PROG_LD], [])
2760dnl AC_DEFUN([AC_PROG_LD], [])
2761
2762
2763# _LT_PATH_LD_GNU
2764#- --------------
2765m4_defun([_LT_PATH_LD_GNU],
612[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2766[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
613[# I'd rather use --version here, but apparently some GNU ld's only accept -v. 2767[# I'd rather use --version here, but apparently some GNU lds only accept -v.
614if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then 2768case `$LD -v 2>&1 </dev/null` in
2769*GNU* | *'with BFD'*)
615 lt_cv_prog_gnu_ld=yes 2770 lt_cv_prog_gnu_ld=yes
616else 2771 ;;
2772*)
617 lt_cv_prog_gnu_ld=no 2773 lt_cv_prog_gnu_ld=no
618fi]) 2774 ;;
2775esac])
619with_gnu_ld=$lt_cv_prog_gnu_ld 2776with_gnu_ld=$lt_cv_prog_gnu_ld
620]) 2777])# _LT_PATH_LD_GNU
621 2778
622# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker 2779
2780# _LT_CMD_RELOAD
2781# --------------
2782# find reload flag for linker
623# -- PORTME Some linkers may need a different reload flag. 2783# -- PORTME Some linkers may need a different reload flag.
624AC_DEFUN([AC_PROG_LD_RELOAD_FLAG], 2784m4_defun([_LT_CMD_RELOAD],
625[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag, 2785[AC_CACHE_CHECK([for $LD option to reload object files],
626[lt_cv_ld_reload_flag='-r']) 2786 lt_cv_ld_reload_flag,
2787 [lt_cv_ld_reload_flag='-r'])
627reload_flag=$lt_cv_ld_reload_flag 2788reload_flag=$lt_cv_ld_reload_flag
628test -n "$reload_flag" && reload_flag=" $reload_flag" 2789case $reload_flag in
629]) 2790"" | " "*) ;;
2791*) reload_flag=" $reload_flag" ;;
2792esac
2793reload_cmds='$LD$reload_flag -o $output$reload_objs'
2794case $host_os in
2795 darwin*)
2796 if test "$GCC" = yes; then
2797 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2798 else
2799 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2800 fi
2801 ;;
2802esac
2803_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2804_LT_DECL([], [reload_cmds], [2])dnl
2805])# _LT_CMD_RELOAD
2806
630 2807
631# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies 2808# _LT_CHECK_MAGIC_METHOD
2809# ----------------------
2810# how to check for library dependencies
632# -- PORTME fill in with the dynamic library characteristics 2811# -- PORTME fill in with the dynamic library characteristics
633AC_DEFUN([AC_DEPLIBS_CHECK_METHOD], 2812m4_defun([_LT_CHECK_MAGIC_METHOD],
634[AC_CACHE_CHECK([how to recognise dependant libraries], 2813[m4_require([_LT_DECL_EGREP])
2814AC_CACHE_CHECK([how to recognize dependent libraries],
635lt_cv_deplibs_check_method, 2815lt_cv_deplibs_check_method,
636[lt_cv_file_magic_cmd='$MAGIC_CMD' 2816[lt_cv_file_magic_cmd='$MAGIC_CMD'
637lt_cv_file_magic_test_file= 2817lt_cv_file_magic_test_file=
@@ -642,13 +2822,13 @@ lt_cv_deplibs_check_method='unknown'
642# `unknown' -- same as none, but documents that we really don't know. 2822# `unknown' -- same as none, but documents that we really don't know.
643# 'pass_all' -- all dependencies passed with no checks. 2823# 'pass_all' -- all dependencies passed with no checks.
644# 'test_compile' -- check by making test program. 2824# 'test_compile' -- check by making test program.
645# 'file_magic [regex]' -- check by looking for files in library path 2825# 'file_magic [[regex]]' -- check by looking for files in library path
646# which responds to the $file_magic_cmd with a given egrep regex. 2826# which responds to the $file_magic_cmd with a given extended regex.
647# If you have `file' or equivalent on your system and you're not sure 2827# If you have `file' or equivalent on your system and you're not sure
648# whether `pass_all' will *always* work, you probably want this one. 2828# whether `pass_all' will *always* work, you probably want this one.
649 2829
650case $host_os in 2830case $host_os in
651aix*) 2831aix4* | aix5*)
652 lt_cv_deplibs_check_method=pass_all 2832 lt_cv_deplibs_check_method=pass_all
653 ;; 2833 ;;
654 2834
@@ -656,39 +2836,42 @@ beos*)
656 lt_cv_deplibs_check_method=pass_all 2836 lt_cv_deplibs_check_method=pass_all
657 ;; 2837 ;;
658 2838
659bsdi4*) 2839bsdi[[45]]*)
660 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'] 2840 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
661 lt_cv_file_magic_cmd='/usr/bin/file -L' 2841 lt_cv_file_magic_cmd='/usr/bin/file -L'
662 lt_cv_file_magic_test_file=/shlib/libc.so 2842 lt_cv_file_magic_test_file=/shlib/libc.so
663 ;; 2843 ;;
664 2844
665cygwin* | mingw* |pw32*) 2845cygwin*)
666 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 2846 # func_win32_libid is a shell function defined in ltmain.sh
667 lt_cv_file_magic_cmd='$OBJDUMP -f' 2847 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2848 lt_cv_file_magic_cmd='func_win32_libid'
2849 ;;
2850
2851mingw* | pw32*)
2852 # Base MSYS/MinGW do not provide the 'file' command needed by
2853 # func_win32_libid shell function, so use a weaker test based on 'objdump',
2854 # unless we find 'file', for example because we are cross-compiling.
2855 if ( file / ) >/dev/null 2>&1; then
2856 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2857 lt_cv_file_magic_cmd='func_win32_libid'
2858 else
2859 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2860 lt_cv_file_magic_cmd='$OBJDUMP -f'
2861 fi
668 ;; 2862 ;;
669 2863
670darwin* | rhapsody*) 2864darwin* | rhapsody*)
671 # this will be overwritten by pass_all, but leave it in just in case
672 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
673 lt_cv_file_magic_cmd='/usr/bin/file -L'
674 case "$host_os" in
675 rhapsody* | darwin1.[012])
676 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
677 ;;
678 *) # Darwin 1.3 on
679 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
680 ;;
681 esac
682 lt_cv_deplibs_check_method=pass_all 2865 lt_cv_deplibs_check_method=pass_all
683 ;; 2866 ;;
684 2867
685freebsd* | kfreebsd*-gnu) 2868freebsd* | dragonfly*)
686 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2869 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
687 case $host_cpu in 2870 case $host_cpu in
688 i*86 ) 2871 i*86 )
689 # Not sure whether the presence of OpenBSD here was a mistake. 2872 # Not sure whether the presence of OpenBSD here was a mistake.
690 # Let's accept both of them until this is cleared up. 2873 # Let's accept both of them until this is cleared up.
691 lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'] 2874 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
692 lt_cv_file_magic_cmd=/usr/bin/file 2875 lt_cv_file_magic_cmd=/usr/bin/file
693 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 2876 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
694 ;; 2877 ;;
@@ -702,291 +2885,4266 @@ gnu*)
702 lt_cv_deplibs_check_method=pass_all 2885 lt_cv_deplibs_check_method=pass_all
703 ;; 2886 ;;
704 2887
705hpux10.20*|hpux11*) 2888hpux10.20* | hpux11*)
2889 lt_cv_file_magic_cmd=/usr/bin/file
706 case $host_cpu in 2890 case $host_cpu in
707 hppa*)
708 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
709 lt_cv_file_magic_cmd=/usr/bin/file
710 lt_cv_file_magic_test_file=/usr/lib/libc.sl
711 ;;
712 ia64*) 2891 ia64*)
713 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'] 2892 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
714 lt_cv_file_magic_cmd=/usr/bin/file
715 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 2893 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
716 ;; 2894 ;;
717 esac 2895 hppa*64*)
718 ;; 2896 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
719 2897 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
720irix5* | irix6*)
721 case $host_os in
722 irix5*)
723 # this will be overridden with pass_all, but let us keep it just in case
724 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
725 ;; 2898 ;;
726 *) 2899 *)
727 case $LD in 2900 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
728 *-32|*"-32 ") libmagic=32-bit;; 2901 lt_cv_file_magic_test_file=/usr/lib/libc.sl
729 *-n32|*"-n32 ") libmagic=N32;;
730 *-64|*"-64 ") libmagic=64-bit;;
731 *) libmagic=never-match;;
732 esac
733 # this will be overridden with pass_all, but let us keep it just in case
734 lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
735 ;; 2902 ;;
736 esac 2903 esac
737 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` 2904 ;;
2905
2906interix[[3-9]]*)
2907 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2908 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2909 ;;
2910
2911irix5* | irix6* | nonstopux*)
2912 case $LD in
2913 *-32|*"-32 ") libmagic=32-bit;;
2914 *-n32|*"-n32 ") libmagic=N32;;
2915 *-64|*"-64 ") libmagic=64-bit;;
2916 *) libmagic=never-match;;
2917 esac
738 lt_cv_deplibs_check_method=pass_all 2918 lt_cv_deplibs_check_method=pass_all
739 ;; 2919 ;;
740 2920
741# This must be Linux ELF. 2921# This must be Linux ELF.
742linux-gnu*) 2922linux* | k*bsd*-gnu)
743 lt_cv_deplibs_check_method=pass_all 2923 lt_cv_deplibs_check_method=pass_all
744 ;; 2924 ;;
745 2925
746netbsd* | knetbsd*-gnu) 2926netbsd*)
747 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then 2927 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
748 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] 2928 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
749 else 2929 else
750 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'] 2930 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
751 fi 2931 fi
752 ;; 2932 ;;
753 2933
754newsos6) 2934newos6*)
755 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'] 2935 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
756 lt_cv_file_magic_cmd=/usr/bin/file 2936 lt_cv_file_magic_cmd=/usr/bin/file
757 lt_cv_file_magic_test_file=/usr/lib/libnls.so 2937 lt_cv_file_magic_test_file=/usr/lib/libnls.so
758 ;; 2938 ;;
759 2939
2940*nto* | *qnx*)
2941 lt_cv_deplibs_check_method=pass_all
2942 ;;
2943
2944openbsd*)
2945 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2946 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2947 else
2948 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2949 fi
2950 ;;
2951
760osf3* | osf4* | osf5*) 2952osf3* | osf4* | osf5*)
761 # this will be overridden with pass_all, but let us keep it just in case
762 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
763 lt_cv_file_magic_test_file=/shlib/libc.so
764 lt_cv_deplibs_check_method=pass_all 2953 lt_cv_deplibs_check_method=pass_all
765 ;; 2954 ;;
766 2955
767sco3.2v5*) 2956rdos*)
768 lt_cv_deplibs_check_method=pass_all 2957 lt_cv_deplibs_check_method=pass_all
769 ;; 2958 ;;
770 2959
771solaris*) 2960solaris*)
772 lt_cv_deplibs_check_method=pass_all 2961 lt_cv_deplibs_check_method=pass_all
773 lt_cv_file_magic_test_file=/lib/libc.so
774 ;; 2962 ;;
775 2963
776[sysv5uw[78]* | sysv4*uw2*)] 2964sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
777 lt_cv_deplibs_check_method=pass_all 2965 lt_cv_deplibs_check_method=pass_all
778 ;; 2966 ;;
779 2967
780sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 2968sysv4 | sysv4.3*)
781 case $host_vendor in 2969 case $host_vendor in
2970 motorola)
2971 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]]'
2972 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2973 ;;
782 ncr) 2974 ncr)
783 lt_cv_deplibs_check_method=pass_all 2975 lt_cv_deplibs_check_method=pass_all
784 ;; 2976 ;;
785 motorola) 2977 sequent)
786 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]'] 2978 lt_cv_file_magic_cmd='/bin/file'
787 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 2979 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2980 ;;
2981 sni)
2982 lt_cv_file_magic_cmd='/bin/file'
2983 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2984 lt_cv_file_magic_test_file=/lib/libc.so
2985 ;;
2986 siemens)
2987 lt_cv_deplibs_check_method=pass_all
2988 ;;
2989 pc)
2990 lt_cv_deplibs_check_method=pass_all
788 ;; 2991 ;;
789 esac 2992 esac
790 ;; 2993 ;;
2994
2995tpf*)
2996 lt_cv_deplibs_check_method=pass_all
2997 ;;
791esac 2998esac
792]) 2999])
793file_magic_cmd=$lt_cv_file_magic_cmd 3000file_magic_cmd=$lt_cv_file_magic_cmd
794deplibs_check_method=$lt_cv_deplibs_check_method 3001deplibs_check_method=$lt_cv_deplibs_check_method
795]) 3002test -z "$deplibs_check_method" && deplibs_check_method=unknown
3003
3004_LT_DECL([], [deplibs_check_method], [1],
3005 [Method to check whether dependent libraries are shared objects])
3006_LT_DECL([], [file_magic_cmd], [1],
3007 [Command to use when deplibs_check_method == "file_magic"])
3008])# _LT_CHECK_MAGIC_METHOD
796 3009
797 3010
798# AC_PROG_NM - find the path to a BSD-compatible name lister 3011# LT_PATH_NM
799AC_DEFUN([AC_PROG_NM], 3012# ----------
800[AC_MSG_CHECKING([for BSD-compatible nm]) 3013# find the pathname to a BSD- or MS-compatible name lister
801AC_CACHE_VAL(lt_cv_path_NM, 3014AC_DEFUN([LT_PATH_NM],
3015[AC_REQUIRE([AC_PROG_CC])dnl
3016AC_REQUIRE([AC_OBJEXT])dnl
3017AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
802[if test -n "$NM"; then 3018[if test -n "$NM"; then
803 # Let the user override the test. 3019 # Let the user override the test.
804 lt_cv_path_NM="$NM" 3020 lt_cv_path_NM="$NM"
805else 3021else
806 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" 3022 lt_nm_to_check="${ac_tool_prefix}nm"
807 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do 3023 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
808 test -z "$ac_dir" && ac_dir=. 3024 lt_nm_to_check="$lt_nm_to_check nm"
809 tmp_nm=$ac_dir/${ac_tool_prefix}nm 3025 fi
810 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then 3026 for lt_tmp_nm in $lt_nm_to_check; do
811 # Check to see if the nm accepts a BSD-compat flag. 3027 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
812 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3028 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
813 # nm: unknown option "B" ignored 3029 IFS="$lt_save_ifs"
814 # Tru64's nm complains that /dev/null is an invalid object file 3030 test -z "$ac_dir" && ac_dir=.
815 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then 3031 tmp_nm="$ac_dir/$lt_tmp_nm"
816 lt_cv_path_NM="$tmp_nm -B" 3032 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
817 break 3033 # Check to see if the nm accepts a BSD-compat flag.
818 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then 3034 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
819 lt_cv_path_NM="$tmp_nm -p" 3035 # nm: unknown option "B" ignored
820 break 3036 # Tru64's nm complains that /dev/null is an invalid object file
821 else 3037 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
822 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3038 */dev/null* | *'Invalid file or object type'*)
823 continue # so that we can try to find one that supports BSD flags 3039 lt_cv_path_NM="$tmp_nm -B"
3040 break
3041 ;;
3042 *)
3043 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3044 */dev/null*)
3045 lt_cv_path_NM="$tmp_nm -p"
3046 break
3047 ;;
3048 *)
3049 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3050 continue # so that we can try to find one that supports BSD flags
3051 ;;
3052 esac
3053 ;;
3054 esac
824 fi 3055 fi
825 fi 3056 done
3057 IFS="$lt_save_ifs"
826 done 3058 done
827 IFS="$ac_save_ifs" 3059 : ${lt_cv_path_NM=no}
828 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
829fi]) 3060fi])
830NM="$lt_cv_path_NM" 3061if test "$lt_cv_path_NM" != "no"; then
831AC_MSG_RESULT([$NM]) 3062 NM="$lt_cv_path_NM"
832]) 3063else
3064 # Didn't find any BSD compatible name lister, look for dumpbin.
3065 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3066 AC_SUBST([DUMPBIN])
3067 if test "$DUMPBIN" != ":"; then
3068 NM="$DUMPBIN"
3069 fi
3070fi
3071test -z "$NM" && NM=nm
3072AC_SUBST([NM])
3073_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3074
3075AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3076 [lt_cv_nm_interface="BSD nm"
3077 echo "int some_variable = 0;" > conftest.$ac_ext
3078 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3079 (eval "$ac_compile" 2>conftest.err)
3080 cat conftest.err >&AS_MESSAGE_LOG_FD
3081 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3082 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3083 cat conftest.err >&AS_MESSAGE_LOG_FD
3084 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3085 cat conftest.out >&AS_MESSAGE_LOG_FD
3086 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3087 lt_cv_nm_interface="MS dumpbin"
3088 fi
3089 rm -f conftest*])
3090])# LT_PATH_NM
833 3091
834# AC_CHECK_LIBM - check for math library 3092# Old names:
835AC_DEFUN([AC_CHECK_LIBM], 3093AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3094AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3095dnl aclocal-1.4 backwards compatibility:
3096dnl AC_DEFUN([AM_PROG_NM], [])
3097dnl AC_DEFUN([AC_PROG_NM], [])
3098
3099
3100# LT_LIB_M
3101# --------
3102# check for math library
3103AC_DEFUN([LT_LIB_M],
836[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3104[AC_REQUIRE([AC_CANONICAL_HOST])dnl
837LIBM= 3105LIBM=
838case $host in 3106case $host in
839*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 3107*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
840 # These system don't have libm 3108 # These system don't have libm, or don't need it
841 # on darwin the libm is a symbolic link to libSystem.dylib
842 ;; 3109 ;;
843*-ncr-sysv4.3*) 3110*-ncr-sysv4.3*)
844 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3111 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
845 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") 3112 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
846 ;; 3113 ;;
847*) 3114*)
848 AC_CHECK_LIB(m, main, LIBM="-lm") 3115 AC_CHECK_LIB(m, cos, LIBM="-lm")
3116 ;;
3117esac
3118AC_SUBST([LIBM])
3119])# LT_LIB_M
3120
3121# Old name:
3122AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3123dnl aclocal-1.4 backwards compatibility:
3124dnl AC_DEFUN([AC_CHECK_LIBM], [])
3125
3126
3127# _LT_COMPILER_NO_RTTI([TAGNAME])
3128# -------------------------------
3129m4_defun([_LT_COMPILER_NO_RTTI],
3130[m4_require([_LT_TAG_COMPILER])dnl
3131
3132_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3133
3134if test "$GCC" = yes; then
3135 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3136
3137 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3138 lt_cv_prog_compiler_rtti_exceptions,
3139 [-fno-rtti -fno-exceptions], [],
3140 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3141fi
3142_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3143 [Compiler flag to turn off builtin functions])
3144])# _LT_COMPILER_NO_RTTI
3145
3146
3147# _LT_CMD_GLOBAL_SYMBOLS
3148# ----------------------
3149m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3150[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3151AC_REQUIRE([AC_PROG_CC])dnl
3152AC_REQUIRE([AC_OBJEXT])dnl
3153AC_REQUIRE([LT_PATH_NM])dnl
3154AC_REQUIRE([LT_PATH_LD])dnl
3155m4_require([_LT_DECL_SED])dnl
3156m4_require([_LT_DECL_EGREP])dnl
3157m4_require([_LT_TAG_COMPILER])dnl
3158
3159# Check for command to grab the raw symbol name followed by C symbol from nm.
3160AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3161AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3162[
3163# These are sane defaults that work on at least a few old systems.
3164# [They come from Ultrix. What could be older than Ultrix?!! ;)]
3165
3166# Character class describing NM global symbol codes.
3167symcode='[[BCDEGRST]]'
3168
3169# Regexp to match symbols that can be accessed directly from C.
3170sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3171
3172# Define system-specific variables.
3173case $host_os in
3174aix*)
3175 symcode='[[BCDT]]'
3176 ;;
3177cygwin* | mingw* | pw32*)
3178 symcode='[[ABCDGISTW]]'
3179 ;;
3180hpux*)
3181 if test "$host_cpu" = ia64; then
3182 symcode='[[ABCDEGRST]]'
3183 fi
3184 ;;
3185irix* | nonstopux*)
3186 symcode='[[BCDEGRST]]'
3187 ;;
3188osf*)
3189 symcode='[[BCDEGQRST]]'
3190 ;;
3191solaris*)
3192 symcode='[[BDRT]]'
3193 ;;
3194sco3.2v5*)
3195 symcode='[[DT]]'
3196 ;;
3197sysv4.2uw2*)
3198 symcode='[[DT]]'
3199 ;;
3200sysv5* | sco5v6* | unixware* | OpenUNIX*)
3201 symcode='[[ABDT]]'
3202 ;;
3203sysv4)
3204 symcode='[[DFNSTU]]'
3205 ;;
3206esac
3207
3208# If we're using GNU nm, then use its standard symbol codes.
3209case `$NM -V 2>&1` in
3210*GNU* | *'with BFD'*)
3211 symcode='[[ABCDGIRSTW]]' ;;
3212esac
3213
3214# Transform an extracted symbol line into a proper C declaration.
3215# Some systems (esp. on ia64) link data and code symbols differently,
3216# so use this general approach.
3217lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3218
3219# Transform an extracted symbol line into symbol name and symbol address
3220lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3221
3222# Handle CRLF in mingw tool chain
3223opt_cr=
3224case $build_os in
3225mingw*)
3226 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
849 ;; 3227 ;;
850esac 3228esac
3229
3230# Try without a prefix underscore, then with it.
3231for ac_symprfx in "" "_"; do
3232
3233 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3234 symxfrm="\\1 $ac_symprfx\\2 \\2"
3235
3236 # Write the raw and C identifiers.
3237 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3238 # Fake it for dumpbin and say T for any non-static function
3239 # and D for any global variable.
3240 # Also find C++ and __fastcall symbols from MSVC++,
3241 # which start with @ or ?.
3242 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3243" {last_section=section; section=\$ 3};"\
3244" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3245" \$ 0!~/External *\|/{next};"\
3246" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3247" {if(hide[section]) next};"\
3248" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3249" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3250" s[1]~/^[@?]/{print s[1], s[1]; next};"\
3251" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3252" ' prfx=^$ac_symprfx]"
3253 else
3254 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3255 fi
3256
3257 # Check to see that the pipe works correctly.
3258 pipe_works=no
3259
3260 rm -f conftest*
3261 cat > conftest.$ac_ext <<_LT_EOF
3262#ifdef __cplusplus
3263extern "C" {
3264#endif
3265char nm_test_var;
3266void nm_test_func(void);
3267void nm_test_func(void){}
3268#ifdef __cplusplus
3269}
3270#endif
3271int main(){nm_test_var='a';nm_test_func();return(0);}
3272_LT_EOF
3273
3274 if AC_TRY_EVAL(ac_compile); then
3275 # Now try to grab the symbols.
3276 nlist=conftest.nm
3277 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3278 # Try sorting and uniquifying the output.
3279 if sort "$nlist" | uniq > "$nlist"T; then
3280 mv -f "$nlist"T "$nlist"
3281 else
3282 rm -f "$nlist"T
3283 fi
3284
3285 # Make sure that we snagged all the symbols we need.
3286 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3287 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3288 cat <<_LT_EOF > conftest.$ac_ext
3289#ifdef __cplusplus
3290extern "C" {
3291#endif
3292
3293_LT_EOF
3294 # Now generate the symbol file.
3295 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3296
3297 cat <<_LT_EOF >> conftest.$ac_ext
3298
3299/* The mapping between symbol names and symbols. */
3300const struct {
3301 const char *name;
3302 void *address;
3303}
3304lt__PROGRAM__LTX_preloaded_symbols[[]] =
3305{
3306 { "@PROGRAM@", (void *) 0 },
3307_LT_EOF
3308 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3309 cat <<\_LT_EOF >> conftest.$ac_ext
3310 {0, (void *) 0}
3311};
3312
3313/* This works around a problem in FreeBSD linker */
3314#ifdef FREEBSD_WORKAROUND
3315static const void *lt_preloaded_setup() {
3316 return lt__PROGRAM__LTX_preloaded_symbols;
3317}
3318#endif
3319
3320#ifdef __cplusplus
3321}
3322#endif
3323_LT_EOF
3324 # Now try linking the two files.
3325 mv conftest.$ac_objext conftstm.$ac_objext
3326 lt_save_LIBS="$LIBS"
3327 lt_save_CFLAGS="$CFLAGS"
3328 LIBS="conftstm.$ac_objext"
3329 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3330 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3331 pipe_works=yes
3332 fi
3333 LIBS="$lt_save_LIBS"
3334 CFLAGS="$lt_save_CFLAGS"
3335 else
3336 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3337 fi
3338 else
3339 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3340 fi
3341 else
3342 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3343 fi
3344 else
3345 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3346 cat conftest.$ac_ext >&5
3347 fi
3348 rm -f conftest* conftst*
3349
3350 # Do not use the global_symbol_pipe unless it works.
3351 if test "$pipe_works" = yes; then
3352 break
3353 else
3354 lt_cv_sys_global_symbol_pipe=
3355 fi
3356done
851]) 3357])
3358if test -z "$lt_cv_sys_global_symbol_pipe"; then
3359 lt_cv_sys_global_symbol_to_cdecl=
3360fi
3361if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3362 AC_MSG_RESULT(failed)
3363else
3364 AC_MSG_RESULT(ok)
3365fi
3366
3367_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3368 [Take the output of nm and produce a listing of raw symbols and C names])
3369_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3370 [Transform the output of nm in a proper C declaration])
3371_LT_DECL([global_symbol_to_c_name_address],
3372 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3373 [Transform the output of nm in a C name address pair])
3374]) # _LT_CMD_GLOBAL_SYMBOLS
3375
852 3376
853# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for 3377# _LT_COMPILER_PIC([TAGNAME])
854# the libltdl convenience library and INCLTDL to the include flags for 3378# ---------------------------
855# the libltdl header and adds --enable-ltdl-convenience to the 3379m4_defun([_LT_COMPILER_PIC],
856# configure arguments. Note that LIBLTDL and INCLTDL are not 3380[m4_require([_LT_TAG_COMPILER])dnl
857# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not 3381_LT_TAGVAR(lt_prog_compiler_wl, $1)=
858# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed 3382_LT_TAGVAR(lt_prog_compiler_pic, $1)=
859# with '${top_builddir}/' and INCLTDL will be prefixed with 3383_LT_TAGVAR(lt_prog_compiler_static, $1)=
860# '${top_srcdir}/' (note the single quotes!). If your package is not 3384
861# flat and you're not using automake, define top_builddir and 3385AC_MSG_CHECKING([for $compiler option to produce PIC])
862# top_srcdir appropriately in the Makefiles. 3386m4_if([$1], [CXX], [
863AC_DEFUN([AC_LIBLTDL_CONVENIENCE], 3387 # C++ specific cases for pic, static, wl, etc.
864[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 3388 if test "$GXX" = yes; then
865 case $enable_ltdl_convenience in 3389 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
866 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 3390 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
867 "") enable_ltdl_convenience=yes 3391
868 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 3392 case $host_os in
869 esac 3393 aix*)
870 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 3394 # All AIX code is PIC.
871 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 3395 if test "$host_cpu" = ia64; then
3396 # AIX 5 now supports IA64 processor
3397 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3398 fi
3399 ;;
3400 amigaos*)
3401 if test "$host_cpu" = m68k; then
3402 # FIXME: we need at least 68020 code to build shared libraries, but
3403 # adding the `-m68020' flag to GCC prevents building anything better,
3404 # like `-m68040'.
3405 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3406 fi
3407 ;;
3408 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3409 # PIC is the default for these OSes.
3410 ;;
3411 mingw* | cygwin* | os2* | pw32*)
3412 # This hack is so that the source file can tell whether it is being
3413 # built for inclusion in a dll (and should export symbols for example).
3414 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3415 # (--disable-auto-import) libraries
3416 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3417 ;;
3418 darwin* | rhapsody*)
3419 # PIC is the default on this platform
3420 # Common symbols not allowed in MH_DYLIB files
3421 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3422 ;;
3423 *djgpp*)
3424 # DJGPP does not support shared libraries at all
3425 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3426 ;;
3427 interix[[3-9]]*)
3428 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3429 # Instead, we relocate shared libraries at runtime.
3430 ;;
3431 sysv4*MP*)
3432 if test -d /usr/nec; then
3433 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3434 fi
3435 ;;
3436 hpux*)
3437 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3438 # not for PA HP-UX.
3439 case $host_cpu in
3440 hppa*64*|ia64*)
3441 ;;
3442 *)
3443 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3444 ;;
3445 esac
3446 ;;
3447 *qnx* | *nto*)
3448 # QNX uses GNU C++, but need to define -shared option too, otherwise
3449 # it will coredump.
3450 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3451 ;;
3452 *)
3453 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3454 ;;
3455 esac
3456 else
3457 case $host_os in
3458 aix4* | aix5*)
3459 # All AIX code is PIC.
3460 if test "$host_cpu" = ia64; then
3461 # AIX 5 now supports IA64 processor
3462 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3463 else
3464 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3465 fi
3466 ;;
3467 chorus*)
3468 case $cc_basename in
3469 cxch68*)
3470 # Green Hills C++ Compiler
3471 # _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"
3472 ;;
3473 esac
3474 ;;
3475 darwin*)
3476 # PIC is the default on this platform
3477 # Common symbols not allowed in MH_DYLIB files
3478 case $cc_basename in
3479 xlc*)
3480 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
3481 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3482 ;;
3483 esac
3484 ;;
3485 dgux*)
3486 case $cc_basename in
3487 ec++*)
3488 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3489 ;;
3490 ghcx*)
3491 # Green Hills C++ Compiler
3492 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3493 ;;
3494 *)
3495 ;;
3496 esac
3497 ;;
3498 freebsd* | dragonfly*)
3499 # FreeBSD uses GNU C++
3500 ;;
3501 hpux9* | hpux10* | hpux11*)
3502 case $cc_basename in
3503 CC*)
3504 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3505 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3506 if test "$host_cpu" != ia64; then
3507 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3508 fi
3509 ;;
3510 aCC*)
3511 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3512 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3513 case $host_cpu in
3514 hppa*64*|ia64*)
3515 # +Z the default
3516 ;;
3517 *)
3518 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3519 ;;
3520 esac
3521 ;;
3522 *)
3523 ;;
3524 esac
3525 ;;
3526 interix*)
3527 # This is c89, which is MS Visual C++ (no shared libs)
3528 # Anyone wants to do a port?
3529 ;;
3530 irix5* | irix6* | nonstopux*)
3531 case $cc_basename in
3532 CC*)
3533 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3534 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3535 # CC pic flag -KPIC is the default.
3536 ;;
3537 *)
3538 ;;
3539 esac
3540 ;;
3541 linux* | k*bsd*-gnu)
3542 case $cc_basename in
3543 KCC*)
3544 # KAI C++ Compiler
3545 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3546 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3547 ;;
3548 icpc* | ecpc* )
3549 # Intel C++
3550 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3551 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3552 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3553 ;;
3554 pgCC*)
3555 # Portland Group C++ compiler
3556 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3557 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3558 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3559 ;;
3560 cxx*)
3561 # Compaq C++
3562 # Make sure the PIC flag is empty. It appears that all Alpha
3563 # Linux and Compaq Tru64 Unix objects are PIC.
3564 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3565 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3566 ;;
3567 *)
3568 case `$CC -V 2>&1 | sed 5q` in
3569 *Sun\ C*)
3570 # Sun C++ 5.9
3571 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3572 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3573 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3574 ;;
3575 esac
3576 ;;
3577 esac
3578 ;;
3579 lynxos*)
3580 ;;
3581 m88k*)
3582 ;;
3583 mvs*)
3584 case $cc_basename in
3585 cxx*)
3586 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3587 ;;
3588 *)
3589 ;;
3590 esac
3591 ;;
3592 netbsd*)
3593 ;;
3594 *qnx* | *nto*)
3595 # QNX uses GNU C++, but need to define -shared option too, otherwise
3596 # it will coredump.
3597 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3598 ;;
3599 osf3* | osf4* | osf5*)
3600 case $cc_basename in
3601 KCC*)
3602 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3603 ;;
3604 RCC*)
3605 # Rational C++ 2.4.1
3606 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3607 ;;
3608 cxx*)
3609 # Digital/Compaq C++
3610 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3611 # Make sure the PIC flag is empty. It appears that all Alpha
3612 # Linux and Compaq Tru64 Unix objects are PIC.
3613 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3614 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3615 ;;
3616 *)
3617 ;;
3618 esac
3619 ;;
3620 psos*)
3621 ;;
3622 solaris*)
3623 case $cc_basename in
3624 CC*)
3625 # Sun C++ 4.2, 5.x and Centerline C++
3626 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3627 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3628 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3629 ;;
3630 gcx*)
3631 # Green Hills C++ Compiler
3632 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3633 ;;
3634 *)
3635 ;;
3636 esac
3637 ;;
3638 sunos4*)
3639 case $cc_basename in
3640 CC*)
3641 # Sun C++ 4.x
3642 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3643 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3644 ;;
3645 lcc*)
3646 # Lucid
3647 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3648 ;;
3649 *)
3650 ;;
3651 esac
3652 ;;
3653 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3654 case $cc_basename in
3655 CC*)
3656 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3657 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3658 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3659 ;;
3660 esac
3661 ;;
3662 tandem*)
3663 case $cc_basename in
3664 NCC*)
3665 # NonStop-UX NCC 3.20
3666 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3667 ;;
3668 *)
3669 ;;
3670 esac
3671 ;;
3672 vxworks*)
3673 ;;
3674 *)
3675 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3676 ;;
3677 esac
3678 fi
3679],
3680[
3681 if test "$GCC" = yes; then
3682 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3683 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3684
3685 case $host_os in
3686 aix*)
3687 # All AIX code is PIC.
3688 if test "$host_cpu" = ia64; then
3689 # AIX 5 now supports IA64 processor
3690 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3691 fi
3692 ;;
3693
3694 amigaos*)
3695 if test "$host_cpu" = m68k; then
3696 # FIXME: we need at least 68020 code to build shared libraries, but
3697 # adding the `-m68020' flag to GCC prevents building anything better,
3698 # like `-m68040'.
3699 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3700 fi
3701 ;;
3702
3703 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3704 # PIC is the default for these OSes.
3705 ;;
3706
3707 mingw* | cygwin* | pw32* | os2*)
3708 # This hack is so that the source file can tell whether it is being
3709 # built for inclusion in a dll (and should export symbols for example).
3710 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3711 # (--disable-auto-import) libraries
3712 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3713 ;;
3714
3715 darwin* | rhapsody*)
3716 # PIC is the default on this platform
3717 # Common symbols not allowed in MH_DYLIB files
3718 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3719 ;;
3720
3721 hpux*)
3722 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3723 # not for PA HP-UX.
3724 case $host_cpu in
3725 hppa*64*|ia64*)
3726 # +Z the default
3727 ;;
3728 *)
3729 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3730 ;;
3731 esac
3732 ;;
3733
3734 interix[[3-9]]*)
3735 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3736 # Instead, we relocate shared libraries at runtime.
3737 ;;
3738
3739 msdosdjgpp*)
3740 # Just because we use GCC doesn't mean we suddenly get shared libraries
3741 # on systems that don't support them.
3742 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3743 enable_shared=no
3744 ;;
3745
3746 *nto* | *qnx*)
3747 # QNX uses GNU C++, but need to define -shared option too, otherwise
3748 # it will coredump.
3749 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3750 ;;
3751
3752 sysv4*MP*)
3753 if test -d /usr/nec; then
3754 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3755 fi
3756 ;;
3757
3758 *)
3759 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3760 ;;
3761 esac
3762 else
3763 # PORTME Check for flag to pass linker flags through the system compiler.
3764 case $host_os in
3765 aix*)
3766 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3767 if test "$host_cpu" = ia64; then
3768 # AIX 5 now supports IA64 processor
3769 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3770 else
3771 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3772 fi
3773 ;;
3774 darwin*)
3775 # PIC is the default on this platform
3776 # Common symbols not allowed in MH_DYLIB files
3777 case $cc_basename in
3778 xlc*)
3779 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
3780 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3781 ;;
3782 esac
3783 ;;
3784
3785 mingw* | cygwin* | pw32* | os2*)
3786 # This hack is so that the source file can tell whether it is being
3787 # built for inclusion in a dll (and should export symbols for example).
3788 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3789 ;;
3790
3791 hpux9* | hpux10* | hpux11*)
3792 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3793 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3794 # not for PA HP-UX.
3795 case $host_cpu in
3796 hppa*64*|ia64*)
3797 # +Z the default
3798 ;;
3799 *)
3800 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3801 ;;
3802 esac
3803 # Is there a better lt_prog_compiler_static that works with the bundled CC?
3804 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3805 ;;
3806
3807 irix5* | irix6* | nonstopux*)
3808 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3809 # PIC (with -KPIC) is the default.
3810 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3811 ;;
3812
3813 linux* | k*bsd*-gnu)
3814 case $cc_basename in
3815 icc* | ecc*)
3816 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3817 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3818 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3819 ;;
3820 pgcc* | pgf77* | pgf90* | pgf95*)
3821 # Portland Group compilers (*not* the Pentium gcc compiler,
3822 # which looks to be a dead project)
3823 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3824 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3825 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3826 ;;
3827 ccc*)
3828 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3829 # All Alpha code is PIC.
3830 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3831 ;;
3832 *)
3833 case `$CC -V 2>&1 | sed 5q` in
3834 *Sun\ C*)
3835 # Sun C 5.9
3836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3837 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3838 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3839 ;;
3840 *Sun\ F*)
3841 # Sun Fortran 8.3 passes all unrecognized flags to the linker
3842 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3843 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3844 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
3845 ;;
3846 esac
3847 ;;
3848 esac
3849 ;;
3850
3851 newsos6)
3852 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3853 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3854 ;;
3855
3856 *nto* | *qnx*)
3857 # QNX uses GNU C++, but need to define -shared option too, otherwise
3858 # it will coredump.
3859 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3860 ;;
3861
3862 osf3* | osf4* | osf5*)
3863 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3864 # All OSF/1 code is PIC.
3865 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3866 ;;
3867
3868