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