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