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