1# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
5# Inc.
6# This file is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
12# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13# PARTICULAR PURPOSE.
14
15m4_ifndef([AC_AUTOCONF_VERSION],
16  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
18[m4_warning([this file was generated for autoconf 2.68.
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.
21To do so, use the procedure documented by the package, typically `autoreconf'.])])
22
23# Portability macros for glibc argz.                    -*- Autoconf -*-
24#
25#   Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
26#   Written by Gary V. Vaughan <gary@gnu.org>
27#
28# This file is free software; the Free Software Foundation gives
29# unlimited permission to copy and/or distribute it, with or without
30# modifications, as long as this notice is preserved.
31
32# serial 5 argz.m4
33
34AC_DEFUN([gl_FUNC_ARGZ],
35[gl_PREREQ_ARGZ
36
37AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT])
38
39AC_CHECK_TYPES([error_t],
40  [],
41  [AC_DEFINE([error_t], [int],
42   [Define to a type to use for `error_t' if it is not otherwise available.])
43   AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
44    does not typedef error_t.])],
45  [#if defined(HAVE_ARGZ_H)
46#  include <argz.h>
47#endif])
48
49ARGZ_H=
50AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \
51	argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])])
52
53dnl if have system argz functions, allow forced use of
54dnl libltdl-supplied implementation (and default to do so
55dnl on "known bad" systems). Could use a runtime check, but
56dnl (a) detecting malloc issues is notoriously unreliable
57dnl (b) only known system that declares argz functions,
58dnl     provides them, yet they are broken, is cygwin
59dnl     releases prior to 16-Mar-2007 (1.5.24 and earlier)
60dnl So, it's more straightforward simply to special case
61dnl this for known bad systems.
62AS_IF([test -z "$ARGZ_H"],
63    [AC_CACHE_CHECK(
64        [if argz actually works],
65        [lt_cv_sys_argz_works],
66        [[case $host_os in #(
67	 *cygwin*)
68	   lt_cv_sys_argz_works=no
69	   if test "$cross_compiling" != no; then
70	     lt_cv_sys_argz_works="guessing no"
71	   else
72	     lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
73	     save_IFS=$IFS
74	     IFS=-.
75	     set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
76	     IFS=$save_IFS
77	     lt_os_major=${2-0}
78	     lt_os_minor=${3-0}
79	     lt_os_micro=${4-0}
80	     if test "$lt_os_major" -gt 1 \
81		|| { test "$lt_os_major" -eq 1 \
82		  && { test "$lt_os_minor" -gt 5 \
83		    || { test "$lt_os_minor" -eq 5 \
84		      && test "$lt_os_micro" -gt 24; }; }; }; then
85	       lt_cv_sys_argz_works=yes
86	     fi
87	   fi
88	   ;; #(
89	 *) lt_cv_sys_argz_works=yes ;;
90	 esac]])
91     AS_IF([test "$lt_cv_sys_argz_works" = yes],
92        [AC_DEFINE([HAVE_WORKING_ARGZ], 1,
93                   [This value is set to 1 to indicate that the system argz facility works])],
94        [ARGZ_H=argz.h
95        AC_LIBOBJ([argz])])])
96
97AC_SUBST([ARGZ_H])
98])
99
100# Prerequisites of lib/argz.c.
101AC_DEFUN([gl_PREREQ_ARGZ], [:])
102
103# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
104#
105#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
106#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
107#                 Foundation, Inc.
108#   Written by Gordon Matzigkeit, 1996
109#
110# This file is free software; the Free Software Foundation gives
111# unlimited permission to copy and/or distribute it, with or without
112# modifications, as long as this notice is preserved.
113
114m4_define([_LT_COPYING], [dnl
115#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
116#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
117#                 Foundation, Inc.
118#   Written by Gordon Matzigkeit, 1996
119#
120#   This file is part of GNU Libtool.
121#
122# GNU Libtool is free software; you can redistribute it and/or
123# modify it under the terms of the GNU General Public License as
124# published by the Free Software Foundation; either version 2 of
125# the License, or (at your option) any later version.
126#
127# As a special exception to the GNU General Public License,
128# if you distribute this file as part of a program or library that
129# is built using GNU Libtool, you may include this file under the
130# same distribution terms that you use for the rest of that program.
131#
132# GNU Libtool is distributed in the hope that it will be useful,
133# but WITHOUT ANY WARRANTY; without even the implied warranty of
134# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
135# GNU General Public License for more details.
136#
137# You should have received a copy of the GNU General Public License
138# along with GNU Libtool; see the file COPYING.  If not, a copy
139# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
140# obtained by writing to the Free Software Foundation, Inc.,
141# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
142])
143
144# serial 57 LT_INIT
145
146
147# LT_PREREQ(VERSION)
148# ------------------
149# Complain and exit if this libtool version is less that VERSION.
150m4_defun([LT_PREREQ],
151[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
152       [m4_default([$3],
153		   [m4_fatal([Libtool version $1 or higher is required],
154		             63)])],
155       [$2])])
156
157
158# _LT_CHECK_BUILDDIR
159# ------------------
160# Complain if the absolute build directory name contains unusual characters
161m4_defun([_LT_CHECK_BUILDDIR],
162[case `pwd` in
163  *\ * | *\	*)
164    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
165esac
166])
167
168
169# LT_INIT([OPTIONS])
170# ------------------
171AC_DEFUN([LT_INIT],
172[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
173AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
174AC_BEFORE([$0], [LT_LANG])dnl
175AC_BEFORE([$0], [LT_OUTPUT])dnl
176AC_BEFORE([$0], [LTDL_INIT])dnl
177m4_require([_LT_CHECK_BUILDDIR])dnl
178
179dnl Autoconf doesn't catch unexpanded LT_ macros by default:
180m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
181m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
182dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
183dnl unless we require an AC_DEFUNed macro:
184AC_REQUIRE([LTOPTIONS_VERSION])dnl
185AC_REQUIRE([LTSUGAR_VERSION])dnl
186AC_REQUIRE([LTVERSION_VERSION])dnl
187AC_REQUIRE([LTOBSOLETE_VERSION])dnl
188m4_require([_LT_PROG_LTMAIN])dnl
189
190_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
191
192dnl Parse OPTIONS
193_LT_SET_OPTIONS([$0], [$1])
194
195# This can be used to rebuild libtool when needed
196LIBTOOL_DEPS="$ltmain"
197
198# Always use our own libtool.
199LIBTOOL='$(SHELL) $(top_builddir)/libtool'
200AC_SUBST(LIBTOOL)dnl
201
202_LT_SETUP
203
204# Only expand once:
205m4_define([LT_INIT])
206])# LT_INIT
207
208# Old names:
209AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
210AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
211dnl aclocal-1.4 backwards compatibility:
212dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
213dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
214
215
216# _LT_CC_BASENAME(CC)
217# -------------------
218# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
219m4_defun([_LT_CC_BASENAME],
220[for cc_temp in $1""; do
221  case $cc_temp in
222    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
223    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
224    \-*) ;;
225    *) break;;
226  esac
227done
228cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
229])
230
231
232# _LT_FILEUTILS_DEFAULTS
233# ----------------------
234# It is okay to use these file commands and assume they have been set
235# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
236m4_defun([_LT_FILEUTILS_DEFAULTS],
237[: ${CP="cp -f"}
238: ${MV="mv -f"}
239: ${RM="rm -f"}
240])# _LT_FILEUTILS_DEFAULTS
241
242
243# _LT_SETUP
244# ---------
245m4_defun([_LT_SETUP],
246[AC_REQUIRE([AC_CANONICAL_HOST])dnl
247AC_REQUIRE([AC_CANONICAL_BUILD])dnl
248AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
249AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
250
251_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
252dnl
253_LT_DECL([], [host_alias], [0], [The host system])dnl
254_LT_DECL([], [host], [0])dnl
255_LT_DECL([], [host_os], [0])dnl
256dnl
257_LT_DECL([], [build_alias], [0], [The build system])dnl
258_LT_DECL([], [build], [0])dnl
259_LT_DECL([], [build_os], [0])dnl
260dnl
261AC_REQUIRE([AC_PROG_CC])dnl
262AC_REQUIRE([LT_PATH_LD])dnl
263AC_REQUIRE([LT_PATH_NM])dnl
264dnl
265AC_REQUIRE([AC_PROG_LN_S])dnl
266test -z "$LN_S" && LN_S="ln -s"
267_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
268dnl
269AC_REQUIRE([LT_CMD_MAX_LEN])dnl
270_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
271_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
272dnl
273m4_require([_LT_FILEUTILS_DEFAULTS])dnl
274m4_require([_LT_CHECK_SHELL_FEATURES])dnl
275m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
276m4_require([_LT_CMD_RELOAD])dnl
277m4_require([_LT_CHECK_MAGIC_METHOD])dnl
278m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
279m4_require([_LT_CMD_OLD_ARCHIVE])dnl
280m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
281m4_require([_LT_WITH_SYSROOT])dnl
282
283_LT_CONFIG_LIBTOOL_INIT([
284# See if we are running on zsh, and set the options which allow our
285# commands through without removal of \ escapes INIT.
286if test -n "\${ZSH_VERSION+set}" ; then
287   setopt NO_GLOB_SUBST
288fi
289])
290if test -n "${ZSH_VERSION+set}" ; then
291   setopt NO_GLOB_SUBST
292fi
293
294_LT_CHECK_OBJDIR
295
296m4_require([_LT_TAG_COMPILER])dnl
297
298case $host_os in
299aix3*)
300  # AIX sometimes has problems with the GCC collect2 program.  For some
301  # reason, if we set the COLLECT_NAMES environment variable, the problems
302  # vanish in a puff of smoke.
303  if test "X${COLLECT_NAMES+set}" != Xset; then
304    COLLECT_NAMES=
305    export COLLECT_NAMES
306  fi
307  ;;
308esac
309
310# Global variables:
311ofile=libtool
312can_build_shared=yes
313
314# All known linkers require a `.a' archive for static linking (except MSVC,
315# which needs '.lib').
316libext=a
317
318with_gnu_ld="$lt_cv_prog_gnu_ld"
319
320old_CC="$CC"
321old_CFLAGS="$CFLAGS"
322
323# Set sane defaults for various variables
324test -z "$CC" && CC=cc
325test -z "$LTCC" && LTCC=$CC
326test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
327test -z "$LD" && LD=ld
328test -z "$ac_objext" && ac_objext=o
329
330_LT_CC_BASENAME([$compiler])
331
332# Only perform the check for file, if the check method requires it
333test -z "$MAGIC_CMD" && MAGIC_CMD=file
334case $deplibs_check_method in
335file_magic*)
336  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
337    _LT_PATH_MAGIC
338  fi
339  ;;
340esac
341
342# Use C for the default configuration in the libtool script
343LT_SUPPORTED_TAG([CC])
344_LT_LANG_C_CONFIG
345_LT_LANG_DEFAULT_CONFIG
346_LT_CONFIG_COMMANDS
347])# _LT_SETUP
348
349
350# _LT_PREPARE_SED_QUOTE_VARS
351# --------------------------
352# Define a few sed substitution that help us do robust quoting.
353m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
354[# Backslashify metacharacters that are still active within
355# double-quoted strings.
356sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
357
358# Same as above, but do not quote variable references.
359double_quote_subst='s/\([["`\\]]\)/\\\1/g'
360
361# Sed substitution to delay expansion of an escaped shell variable in a
362# double_quote_subst'ed string.
363delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
364
365# Sed substitution to delay expansion of an escaped single quote.
366delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
367
368# Sed substitution to avoid accidental globbing in evaled expressions
369no_glob_subst='s/\*/\\\*/g'
370])
371
372# _LT_PROG_LTMAIN
373# ---------------
374# Note that this code is called both from `configure', and `config.status'
375# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
376# `config.status' has no value for ac_aux_dir unless we are using Automake,
377# so we pass a copy along to make sure it has a sensible value anyway.
378m4_defun([_LT_PROG_LTMAIN],
379[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
380_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
381ltmain="$ac_aux_dir/ltmain.sh"
382])# _LT_PROG_LTMAIN
383
384
385
386# So that we can recreate a full libtool script including additional
387# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
388# in macros and then make a single call at the end using the `libtool'
389# label.
390
391
392# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
393# ----------------------------------------
394# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
395m4_define([_LT_CONFIG_LIBTOOL_INIT],
396[m4_ifval([$1],
397          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
398                     [$1
399])])])
400
401# Initialize.
402m4_define([_LT_OUTPUT_LIBTOOL_INIT])
403
404
405# _LT_CONFIG_LIBTOOL([COMMANDS])
406# ------------------------------
407# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
408m4_define([_LT_CONFIG_LIBTOOL],
409[m4_ifval([$1],
410          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
411                     [$1
412])])])
413
414# Initialize.
415m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
416
417
418# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
419# -----------------------------------------------------
420m4_defun([_LT_CONFIG_SAVE_COMMANDS],
421[_LT_CONFIG_LIBTOOL([$1])
422_LT_CONFIG_LIBTOOL_INIT([$2])
423])
424
425
426# _LT_FORMAT_COMMENT([COMMENT])
427# -----------------------------
428# Add leading comment marks to the start of each line, and a trailing
429# full-stop to the whole comment if one is not present already.
430m4_define([_LT_FORMAT_COMMENT],
431[m4_ifval([$1], [
432m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
433              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
434)])
435
436
437
438
439
440# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
441# -------------------------------------------------------------------
442# CONFIGNAME is the name given to the value in the libtool script.
443# VARNAME is the (base) name used in the configure script.
444# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
445# VARNAME.  Any other value will be used directly.
446m4_define([_LT_DECL],
447[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
448    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
449	[m4_ifval([$1], [$1], [$2])])
450    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
451    m4_ifval([$4],
452	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
453    lt_dict_add_subkey([lt_decl_dict], [$2],
454	[tagged?], [m4_ifval([$5], [yes], [no])])])
455])
456
457
458# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
459# --------------------------------------------------------
460m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
461
462
463# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
464# ------------------------------------------------
465m4_define([lt_decl_tag_varnames],
466[_lt_decl_filter([tagged?], [yes], $@)])
467
468
469# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
470# ---------------------------------------------------------
471m4_define([_lt_decl_filter],
472[m4_case([$#],
473  [0], [m4_fatal([$0: too few arguments: $#])],
474  [1], [m4_fatal([$0: too few arguments: $#: $1])],
475  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
476  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
477  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
478])
479
480
481# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
482# --------------------------------------------------
483m4_define([lt_decl_quote_varnames],
484[_lt_decl_filter([value], [1], $@)])
485
486
487# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
488# ---------------------------------------------------
489m4_define([lt_decl_dquote_varnames],
490[_lt_decl_filter([value], [2], $@)])
491
492
493# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
494# ---------------------------------------------------
495m4_define([lt_decl_varnames_tagged],
496[m4_assert([$# <= 2])dnl
497_$0(m4_quote(m4_default([$1], [[, ]])),
498    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
499    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
500m4_define([_lt_decl_varnames_tagged],
501[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
502
503
504# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
505# ------------------------------------------------
506m4_define([lt_decl_all_varnames],
507[_$0(m4_quote(m4_default([$1], [[, ]])),
508     m4_if([$2], [],
509	   m4_quote(lt_decl_varnames),
510	m4_quote(m4_shift($@))))[]dnl
511])
512m4_define([_lt_decl_all_varnames],
513[lt_join($@, lt_decl_varnames_tagged([$1],
514			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
515])
516
517
518# _LT_CONFIG_STATUS_DECLARE([VARNAME])
519# ------------------------------------
520# Quote a variable value, and forward it to `config.status' so that its
521# declaration there will have the same value as in `configure'.  VARNAME
522# must have a single quote delimited value for this to work.
523m4_define([_LT_CONFIG_STATUS_DECLARE],
524[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
525
526
527# _LT_CONFIG_STATUS_DECLARATIONS
528# ------------------------------
529# We delimit libtool config variables with single quotes, so when
530# we write them to config.status, we have to be sure to quote all
531# embedded single quotes properly.  In configure, this macro expands
532# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
533#
534#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
535m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
536[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
537    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
538
539
540# _LT_LIBTOOL_TAGS
541# ----------------
542# Output comment and list of tags supported by the script
543m4_defun([_LT_LIBTOOL_TAGS],
544[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
545available_tags="_LT_TAGS"dnl
546])
547
548
549# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
550# -----------------------------------
551# Extract the dictionary values for VARNAME (optionally with TAG) and
552# expand to a commented shell variable setting:
553#
554#    # Some comment about what VAR is for.
555#    visible_name=$lt_internal_name
556m4_define([_LT_LIBTOOL_DECLARE],
557[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
558					   [description])))[]dnl
559m4_pushdef([_libtool_name],
560    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
561m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
562    [0], [_libtool_name=[$]$1],
563    [1], [_libtool_name=$lt_[]$1],
564    [2], [_libtool_name=$lt_[]$1],
565    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
566m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
567])
568
569
570# _LT_LIBTOOL_CONFIG_VARS
571# -----------------------
572# Produce commented declarations of non-tagged libtool config variables
573# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
574# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
575# section) are produced by _LT_LIBTOOL_TAG_VARS.
576m4_defun([_LT_LIBTOOL_CONFIG_VARS],
577[m4_foreach([_lt_var],
578    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
579    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
580
581
582# _LT_LIBTOOL_TAG_VARS(TAG)
583# -------------------------
584m4_define([_LT_LIBTOOL_TAG_VARS],
585[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
586    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
587
588
589# _LT_TAGVAR(VARNAME, [TAGNAME])
590# ------------------------------
591m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
592
593
594# _LT_CONFIG_COMMANDS
595# -------------------
596# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
597# variables for single and double quote escaping we saved from calls
598# to _LT_DECL, we can put quote escaped variables declarations
599# into `config.status', and then the shell code to quote escape them in
600# for loops in `config.status'.  Finally, any additional code accumulated
601# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
602m4_defun([_LT_CONFIG_COMMANDS],
603[AC_PROVIDE_IFELSE([LT_OUTPUT],
604	dnl If the libtool generation code has been placed in $CONFIG_LT,
605	dnl instead of duplicating it all over again into config.status,
606	dnl then we will have config.status run $CONFIG_LT later, so it
607	dnl needs to know what name is stored there:
608        [AC_CONFIG_COMMANDS([libtool],
609            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
610    dnl If the libtool generation code is destined for config.status,
611    dnl expand the accumulated commands and init code now:
612    [AC_CONFIG_COMMANDS([libtool],
613        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
614])#_LT_CONFIG_COMMANDS
615
616
617# Initialize.
618m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
619[
620
621# The HP-UX ksh and POSIX shell print the target directory to stdout
622# if CDPATH is set.
623(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
624
625sed_quote_subst='$sed_quote_subst'
626double_quote_subst='$double_quote_subst'
627delay_variable_subst='$delay_variable_subst'
628_LT_CONFIG_STATUS_DECLARATIONS
629LTCC='$LTCC'
630LTCFLAGS='$LTCFLAGS'
631compiler='$compiler_DEFAULT'
632
633# A function that is used when there is no print builtin or printf.
634func_fallback_echo ()
635{
636  eval 'cat <<_LTECHO_EOF
637\$[]1
638_LTECHO_EOF'
639}
640
641# Quote evaled strings.
642for var in lt_decl_all_varnames([[ \
643]], lt_decl_quote_varnames); do
644    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
645    *[[\\\\\\\`\\"\\\$]]*)
646      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
647      ;;
648    *)
649      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
650      ;;
651    esac
652done
653
654# Double-quote double-evaled strings.
655for var in lt_decl_all_varnames([[ \
656]], lt_decl_dquote_varnames); do
657    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
658    *[[\\\\\\\`\\"\\\$]]*)
659      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
660      ;;
661    *)
662      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
663      ;;
664    esac
665done
666
667_LT_OUTPUT_LIBTOOL_INIT
668])
669
670# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
671# ------------------------------------
672# Generate a child script FILE with all initialization necessary to
673# reuse the environment learned by the parent script, and make the
674# file executable.  If COMMENT is supplied, it is inserted after the
675# `#!' sequence but before initialization text begins.  After this
676# macro, additional text can be appended to FILE to form the body of
677# the child script.  The macro ends with non-zero status if the
678# file could not be fully written (such as if the disk is full).
679m4_ifdef([AS_INIT_GENERATED],
680[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
681[m4_defun([_LT_GENERATED_FILE_INIT],
682[m4_require([AS_PREPARE])]dnl
683[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
684[lt_write_fail=0
685cat >$1 <<_ASEOF || lt_write_fail=1
686#! $SHELL
687# Generated by $as_me.
688$2
689SHELL=\${CONFIG_SHELL-$SHELL}
690export SHELL
691_ASEOF
692cat >>$1 <<\_ASEOF || lt_write_fail=1
693AS_SHELL_SANITIZE
694_AS_PREPARE
695exec AS_MESSAGE_FD>&1
696_ASEOF
697test $lt_write_fail = 0 && chmod +x $1[]dnl
698m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
699
700# LT_OUTPUT
701# ---------
702# This macro allows early generation of the libtool script (before
703# AC_OUTPUT is called), incase it is used in configure for compilation
704# tests.
705AC_DEFUN([LT_OUTPUT],
706[: ${CONFIG_LT=./config.lt}
707AC_MSG_NOTICE([creating $CONFIG_LT])
708_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
709[# Run this file to recreate a libtool stub with the current configuration.])
710
711cat >>"$CONFIG_LT" <<\_LTEOF
712lt_cl_silent=false
713exec AS_MESSAGE_LOG_FD>>config.log
714{
715  echo
716  AS_BOX([Running $as_me.])
717} >&AS_MESSAGE_LOG_FD
718
719lt_cl_help="\
720\`$as_me' creates a local libtool stub from the current configuration,
721for use in further configure time tests before the real libtool is
722generated.
723
724Usage: $[0] [[OPTIONS]]
725
726  -h, --help      print this help, then exit
727  -V, --version   print version number, then exit
728  -q, --quiet     do not print progress messages
729  -d, --debug     don't remove temporary files
730
731Report bugs to <bug-libtool@gnu.org>."
732
733lt_cl_version="\
734m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
735m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
736configured by $[0], generated by m4_PACKAGE_STRING.
737
738Copyright (C) 2011 Free Software Foundation, Inc.
739This config.lt script is free software; the Free Software Foundation
740gives unlimited permision to copy, distribute and modify it."
741
742while test $[#] != 0
743do
744  case $[1] in
745    --version | --v* | -V )
746      echo "$lt_cl_version"; exit 0 ;;
747    --help | --h* | -h )
748      echo "$lt_cl_help"; exit 0 ;;
749    --debug | --d* | -d )
750      debug=: ;;
751    --quiet | --q* | --silent | --s* | -q )
752      lt_cl_silent=: ;;
753
754    -*) AC_MSG_ERROR([unrecognized option: $[1]
755Try \`$[0] --help' for more information.]) ;;
756
757    *) AC_MSG_ERROR([unrecognized argument: $[1]
758Try \`$[0] --help' for more information.]) ;;
759  esac
760  shift
761done
762
763if $lt_cl_silent; then
764  exec AS_MESSAGE_FD>/dev/null
765fi
766_LTEOF
767
768cat >>"$CONFIG_LT" <<_LTEOF
769_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
770_LTEOF
771
772cat >>"$CONFIG_LT" <<\_LTEOF
773AC_MSG_NOTICE([creating $ofile])
774_LT_OUTPUT_LIBTOOL_COMMANDS
775AS_EXIT(0)
776_LTEOF
777chmod +x "$CONFIG_LT"
778
779# configure is writing to config.log, but config.lt does its own redirection,
780# appending to config.log, which fails on DOS, as config.log is still kept
781# open by configure.  Here we exec the FD to /dev/null, effectively closing
782# config.log, so it can be properly (re)opened and appended to by config.lt.
783lt_cl_success=:
784test "$silent" = yes &&
785  lt_config_lt_args="$lt_config_lt_args --quiet"
786exec AS_MESSAGE_LOG_FD>/dev/null
787$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
788exec AS_MESSAGE_LOG_FD>>config.log
789$lt_cl_success || AS_EXIT(1)
790])# LT_OUTPUT
791
792
793# _LT_CONFIG(TAG)
794# ---------------
795# If TAG is the built-in tag, create an initial libtool script with a
796# default configuration from the untagged config vars.  Otherwise add code
797# to config.status for appending the configuration named by TAG from the
798# matching tagged config vars.
799m4_defun([_LT_CONFIG],
800[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
801_LT_CONFIG_SAVE_COMMANDS([
802  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
803  m4_if(_LT_TAG, [C], [
804    # See if we are running on zsh, and set the options which allow our
805    # commands through without removal of \ escapes.
806    if test -n "${ZSH_VERSION+set}" ; then
807      setopt NO_GLOB_SUBST
808    fi
809
810    cfgfile="${ofile}T"
811    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
812    $RM "$cfgfile"
813
814    cat <<_LT_EOF >> "$cfgfile"
815#! $SHELL
816
817# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
818# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
819# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
820# NOTE: Changes made to this file will be lost: look at ltmain.sh.
821#
822_LT_COPYING
823_LT_LIBTOOL_TAGS
824
825# ### BEGIN LIBTOOL CONFIG
826_LT_LIBTOOL_CONFIG_VARS
827_LT_LIBTOOL_TAG_VARS
828# ### END LIBTOOL CONFIG
829
830_LT_EOF
831
832  case $host_os in
833  aix3*)
834    cat <<\_LT_EOF >> "$cfgfile"
835# AIX sometimes has problems with the GCC collect2 program.  For some
836# reason, if we set the COLLECT_NAMES environment variable, the problems
837# vanish in a puff of smoke.
838if test "X${COLLECT_NAMES+set}" != Xset; then
839  COLLECT_NAMES=
840  export COLLECT_NAMES
841fi
842_LT_EOF
843    ;;
844  esac
845
846  _LT_PROG_LTMAIN
847
848  # We use sed instead of cat because bash on DJGPP gets confused if
849  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
850  # text mode, it properly converts lines to CR/LF.  This bash problem
851  # is reportedly fixed, but why not run on old versions too?
852  sed '$q' "$ltmain" >> "$cfgfile" \
853     || (rm -f "$cfgfile"; exit 1)
854
855  _LT_PROG_REPLACE_SHELLFNS
856
857   mv -f "$cfgfile" "$ofile" ||
858    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
859  chmod +x "$ofile"
860],
861[cat <<_LT_EOF >> "$ofile"
862
863dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
864dnl in a comment (ie after a #).
865# ### BEGIN LIBTOOL TAG CONFIG: $1
866_LT_LIBTOOL_TAG_VARS(_LT_TAG)
867# ### END LIBTOOL TAG CONFIG: $1
868_LT_EOF
869])dnl /m4_if
870],
871[m4_if([$1], [], [
872    PACKAGE='$PACKAGE'
873    VERSION='$VERSION'
874    TIMESTAMP='$TIMESTAMP'
875    RM='$RM'
876    ofile='$ofile'], [])
877])dnl /_LT_CONFIG_SAVE_COMMANDS
878])# _LT_CONFIG
879
880
881# LT_SUPPORTED_TAG(TAG)
882# ---------------------
883# Trace this macro to discover what tags are supported by the libtool
884# --tag option, using:
885#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
886AC_DEFUN([LT_SUPPORTED_TAG], [])
887
888
889# C support is built-in for now
890m4_define([_LT_LANG_C_enabled], [])
891m4_define([_LT_TAGS], [])
892
893
894# LT_LANG(LANG)
895# -------------
896# Enable libtool support for the given language if not already enabled.
897AC_DEFUN([LT_LANG],
898[AC_BEFORE([$0], [LT_OUTPUT])dnl
899m4_case([$1],
900  [C],			[_LT_LANG(C)],
901  [C++],		[_LT_LANG(CXX)],
902  [Go],			[_LT_LANG(GO)],
903  [Java],		[_LT_LANG(GCJ)],
904  [Fortran 77],		[_LT_LANG(F77)],
905  [Fortran],		[_LT_LANG(FC)],
906  [Windows Resource],	[_LT_LANG(RC)],
907  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
908    [_LT_LANG($1)],
909    [m4_fatal([$0: unsupported language: "$1"])])])dnl
910])# LT_LANG
911
912
913# _LT_LANG(LANGNAME)
914# ------------------
915m4_defun([_LT_LANG],
916[m4_ifdef([_LT_LANG_]$1[_enabled], [],
917  [LT_SUPPORTED_TAG([$1])dnl
918  m4_append([_LT_TAGS], [$1 ])dnl
919  m4_define([_LT_LANG_]$1[_enabled], [])dnl
920  _LT_LANG_$1_CONFIG($1)])dnl
921])# _LT_LANG
922
923
924m4_ifndef([AC_PROG_GO], [
925# NOTE: This macro has been submitted for inclusion into   #
926#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
927#  a released version of Autoconf we should remove this    #
928#  macro and use it instead.                               #
929m4_defun([AC_PROG_GO],
930[AC_LANG_PUSH(Go)dnl
931AC_ARG_VAR([GOC],     [Go compiler command])dnl
932AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
933_AC_ARG_VAR_LDFLAGS()dnl
934AC_CHECK_TOOL(GOC, gccgo)
935if test -z "$GOC"; then
936  if test -n "$ac_tool_prefix"; then
937    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
938  fi
939fi
940if test -z "$GOC"; then
941  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
942fi
943])#m4_defun
944])#m4_ifndef
945
946
947# _LT_LANG_DEFAULT_CONFIG
948# -----------------------
949m4_defun([_LT_LANG_DEFAULT_CONFIG],
950[AC_PROVIDE_IFELSE([AC_PROG_CXX],
951  [LT_LANG(CXX)],
952  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
953
954AC_PROVIDE_IFELSE([AC_PROG_F77],
955  [LT_LANG(F77)],
956  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
957
958AC_PROVIDE_IFELSE([AC_PROG_FC],
959  [LT_LANG(FC)],
960  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
961
962dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
963dnl pulling things in needlessly.
964AC_PROVIDE_IFELSE([AC_PROG_GCJ],
965  [LT_LANG(GCJ)],
966  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
967    [LT_LANG(GCJ)],
968    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
969      [LT_LANG(GCJ)],
970      [m4_ifdef([AC_PROG_GCJ],
971	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
972       m4_ifdef([A][M_PROG_GCJ],
973	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
974       m4_ifdef([LT_PROG_GCJ],
975	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
976
977AC_PROVIDE_IFELSE([AC_PROG_GO],
978  [LT_LANG(GO)],
979  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
980
981AC_PROVIDE_IFELSE([LT_PROG_RC],
982  [LT_LANG(RC)],
983  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
984])# _LT_LANG_DEFAULT_CONFIG
985
986# Obsolete macros:
987AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
988AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
989AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
990AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
991AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
992dnl aclocal-1.4 backwards compatibility:
993dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
994dnl AC_DEFUN([AC_LIBTOOL_F77], [])
995dnl AC_DEFUN([AC_LIBTOOL_FC], [])
996dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
997dnl AC_DEFUN([AC_LIBTOOL_RC], [])
998
999
1000# _LT_TAG_COMPILER
1001# ----------------
1002m4_defun([_LT_TAG_COMPILER],
1003[AC_REQUIRE([AC_PROG_CC])dnl
1004
1005_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1006_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1007_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1008_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1009
1010# If no C compiler was specified, use CC.
1011LTCC=${LTCC-"$CC"}
1012
1013# If no C compiler flags were specified, use CFLAGS.
1014LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1015
1016# Allow CC to be a program name with arguments.
1017compiler=$CC
1018])# _LT_TAG_COMPILER
1019
1020
1021# _LT_COMPILER_BOILERPLATE
1022# ------------------------
1023# Check for compiler boilerplate output or warnings with
1024# the simple compiler test code.
1025m4_defun([_LT_COMPILER_BOILERPLATE],
1026[m4_require([_LT_DECL_SED])dnl
1027ac_outfile=conftest.$ac_objext
1028echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1029eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1030_lt_compiler_boilerplate=`cat conftest.err`
1031$RM conftest*
1032])# _LT_COMPILER_BOILERPLATE
1033
1034
1035# _LT_LINKER_BOILERPLATE
1036# ----------------------
1037# Check for linker boilerplate output or warnings with
1038# the simple link test code.
1039m4_defun([_LT_LINKER_BOILERPLATE],
1040[m4_require([_LT_DECL_SED])dnl
1041ac_outfile=conftest.$ac_objext
1042echo "$lt_simple_link_test_code" >conftest.$ac_ext
1043eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1044_lt_linker_boilerplate=`cat conftest.err`
1045$RM -r conftest*
1046])# _LT_LINKER_BOILERPLATE
1047
1048# _LT_REQUIRED_DARWIN_CHECKS
1049# -------------------------
1050m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1051  case $host_os in
1052    rhapsody* | darwin*)
1053    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1054    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1055    AC_CHECK_TOOL([LIPO], [lipo], [:])
1056    AC_CHECK_TOOL([OTOOL], [otool], [:])
1057    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1058    _LT_DECL([], [DSYMUTIL], [1],
1059      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1060    _LT_DECL([], [NMEDIT], [1],
1061      [Tool to change global to local symbols on Mac OS X])
1062    _LT_DECL([], [LIPO], [1],
1063      [Tool to manipulate fat objects and archives on Mac OS X])
1064    _LT_DECL([], [OTOOL], [1],
1065      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1066    _LT_DECL([], [OTOOL64], [1],
1067      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1068
1069    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1070      [lt_cv_apple_cc_single_mod=no
1071      if test -z "${LT_MULTI_MODULE}"; then
1072	# By default we will add the -single_module flag. You can override
1073	# by either setting the environment variable LT_MULTI_MODULE
1074	# non-empty at configure time, or by adding -multi_module to the
1075	# link flags.
1076	rm -rf libconftest.dylib*
1077	echo "int foo(void){return 1;}" > conftest.c
1078	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1079-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1080	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1081	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1082        _lt_result=$?
1083	# If there is a non-empty error log, and "single_module"
1084	# appears in it, assume the flag caused a linker warning
1085        if test -s conftest.err && $GREP single_module conftest.err; then
1086	  cat conftest.err >&AS_MESSAGE_LOG_FD
1087	# Otherwise, if the output was created with a 0 exit code from
1088	# the compiler, it worked.
1089	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
1090	  lt_cv_apple_cc_single_mod=yes
1091	else
1092	  cat conftest.err >&AS_MESSAGE_LOG_FD
1093	fi
1094	rm -rf libconftest.dylib*
1095	rm -f conftest.*
1096      fi])
1097
1098    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1099      [lt_cv_ld_exported_symbols_list],
1100      [lt_cv_ld_exported_symbols_list=no
1101      save_LDFLAGS=$LDFLAGS
1102      echo "_main" > conftest.sym
1103      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1104      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1105	[lt_cv_ld_exported_symbols_list=yes],
1106	[lt_cv_ld_exported_symbols_list=no])
1107	LDFLAGS="$save_LDFLAGS"
1108    ])
1109
1110    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1111      [lt_cv_ld_force_load=no
1112      cat > conftest.c << _LT_EOF
1113int forced_loaded() { return 2;}
1114_LT_EOF
1115      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1116      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1117      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1118      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1119      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1120      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1121      cat > conftest.c << _LT_EOF
1122int main() { return 0;}
1123_LT_EOF
1124      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1125      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1126      _lt_result=$?
1127      if test -s conftest.err && $GREP force_load conftest.err; then
1128	cat conftest.err >&AS_MESSAGE_LOG_FD
1129      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1130	lt_cv_ld_force_load=yes
1131      else
1132	cat conftest.err >&AS_MESSAGE_LOG_FD
1133      fi
1134        rm -f conftest.err libconftest.a conftest conftest.c
1135        rm -rf conftest.dSYM
1136    ])
1137    case $host_os in
1138    rhapsody* | darwin1.[[012]])
1139      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1140    darwin1.*)
1141      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1142    darwin*) # darwin 5.x on
1143      # if running on 10.5 or later, the deployment target defaults
1144      # to the OS version, if on x86, and 10.4, the deployment
1145      # target defaults to 10.4. Don't you love it?
1146      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1147	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1148	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1149	10.[[012]]*)
1150	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1151	10.*)
1152	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1153      esac
1154    ;;
1155  esac
1156    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1157      _lt_dar_single_mod='$single_module'
1158    fi
1159    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1160      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1161    else
1162      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1163    fi
1164    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1165      _lt_dsymutil='~$DSYMUTIL $lib || :'
1166    else
1167      _lt_dsymutil=
1168    fi
1169    ;;
1170  esac
1171])
1172
1173
1174# _LT_DARWIN_LINKER_FEATURES([TAG])
1175# ---------------------------------
1176# Checks for linker and compiler features on darwin
1177m4_defun([_LT_DARWIN_LINKER_FEATURES],
1178[
1179  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1180  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1181  _LT_TAGVAR(hardcode_direct, $1)=no
1182  _LT_TAGVAR(hardcode_automatic, $1)=yes
1183  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1184  if test "$lt_cv_ld_force_load" = "yes"; then
1185    _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\"`'
1186    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1187                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1188  else
1189    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1190  fi
1191  _LT_TAGVAR(link_all_deplibs, $1)=yes
1192  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1193  case $cc_basename in
1194     ifort*) _lt_dar_can_shared=yes ;;
1195     *) _lt_dar_can_shared=$GCC ;;
1196  esac
1197  if test "$_lt_dar_can_shared" = "yes"; then
1198    output_verbose_link_cmd=func_echo_all
1199    _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}"
1200    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1201    _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}"
1202    _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}"
1203    m4_if([$1], [CXX],
1204[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1205      _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}"
1206      _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}"
1207    fi
1208],[])
1209  else
1210  _LT_TAGVAR(ld_shlibs, $1)=no
1211  fi
1212])
1213
1214# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1215# ----------------------------------
1216# Links a minimal program and checks the executable
1217# for the system default hardcoded library path. In most cases,
1218# this is /usr/lib:/lib, but when the MPI compilers are used
1219# the location of the communication and MPI libs are included too.
1220# If we don't find anything, use the default library path according
1221# to the aix ld manual.
1222# Store the results from the different compilers for each TAGNAME.
1223# Allow to override them for all tags through lt_cv_aix_libpath.
1224m4_defun([_LT_SYS_MODULE_PATH_AIX],
1225[m4_require([_LT_DECL_SED])dnl
1226if test "${lt_cv_aix_libpath+set}" = set; then
1227  aix_libpath=$lt_cv_aix_libpath
1228else
1229  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1230  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1231  lt_aix_libpath_sed='[
1232      /Import File Strings/,/^$/ {
1233	  /^0/ {
1234	      s/^0  *\([^ ]*\) *$/\1/
1235	      p
1236	  }
1237      }]'
1238  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1239  # Check for a 64-bit object if we didn't find anything.
1240  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1241    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1242  fi],[])
1243  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1244    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1245  fi
1246  ])
1247  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1248fi
1249])# _LT_SYS_MODULE_PATH_AIX
1250
1251
1252# _LT_SHELL_INIT(ARG)
1253# -------------------
1254m4_define([_LT_SHELL_INIT],
1255[m4_divert_text([M4SH-INIT], [$1
1256])])# _LT_SHELL_INIT
1257
1258
1259
1260# _LT_PROG_ECHO_BACKSLASH
1261# -----------------------
1262# Find how we can fake an echo command that does not interpret backslash.
1263# In particular, with Autoconf 2.60 or later we add some code to the start
1264# of the generated configure script which will find a shell with a builtin
1265# printf (which we can use as an echo command).
1266m4_defun([_LT_PROG_ECHO_BACKSLASH],
1267[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1268ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1269ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1270
1271AC_MSG_CHECKING([how to print strings])
1272# Test print first, because it will be a builtin if present.
1273if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1274   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1275  ECHO='print -r --'
1276elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1277  ECHO='printf %s\n'
1278else
1279  # Use this function as a fallback that always works.
1280  func_fallback_echo ()
1281  {
1282    eval 'cat <<_LTECHO_EOF
1283$[]1
1284_LTECHO_EOF'
1285  }
1286  ECHO='func_fallback_echo'
1287fi
1288
1289# func_echo_all arg...
1290# Invoke $ECHO with all args, space-separated.
1291func_echo_all ()
1292{
1293    $ECHO "$*"
1294}
1295
1296case "$ECHO" in
1297  printf*) AC_MSG_RESULT([printf]) ;;
1298  print*) AC_MSG_RESULT([print -r]) ;;
1299  *) AC_MSG_RESULT([cat]) ;;
1300esac
1301
1302m4_ifdef([_AS_DETECT_SUGGESTED],
1303[_AS_DETECT_SUGGESTED([
1304  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1305    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1306    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1307    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1308    PATH=/empty FPATH=/empty; export PATH FPATH
1309    test "X`printf %s $ECHO`" = "X$ECHO" \
1310      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1311
1312_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1313_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1314])# _LT_PROG_ECHO_BACKSLASH
1315
1316
1317# _LT_WITH_SYSROOT
1318# ----------------
1319AC_DEFUN([_LT_WITH_SYSROOT],
1320[AC_MSG_CHECKING([for sysroot])
1321AC_ARG_WITH([sysroot],
1322[  --with-sysroot[=DIR] Search for dependent libraries within DIR
1323                        (or the compiler's sysroot if not specified).],
1324[], [with_sysroot=no])
1325
1326dnl lt_sysroot will always be passed unquoted.  We quote it here
1327dnl in case the user passed a directory name.
1328lt_sysroot=
1329case ${with_sysroot} in #(
1330 yes)
1331   if test "$GCC" = yes; then
1332     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1333   fi
1334   ;; #(
1335 /*)
1336   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1337   ;; #(
1338 no|'')
1339   ;; #(
1340 *)
1341   AC_MSG_RESULT([${with_sysroot}])
1342   AC_MSG_ERROR([The sysroot must be an absolute path.])
1343   ;;
1344esac
1345
1346 AC_MSG_RESULT([${lt_sysroot:-no}])
1347_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1348[dependent libraries, and in which our libraries should be installed.])])
1349
1350# _LT_ENABLE_LOCK
1351# ---------------
1352m4_defun([_LT_ENABLE_LOCK],
1353[AC_ARG_ENABLE([libtool-lock],
1354  [AS_HELP_STRING([--disable-libtool-lock],
1355    [avoid locking (might break parallel builds)])])
1356test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1357
1358# Some flags need to be propagated to the compiler or linker for good
1359# libtool support.
1360case $host in
1361ia64-*-hpux*)
1362  # Find out which ABI we are using.
1363  echo 'int i;' > conftest.$ac_ext
1364  if AC_TRY_EVAL(ac_compile); then
1365    case `/usr/bin/file conftest.$ac_objext` in
1366      *ELF-32*)
1367	HPUX_IA64_MODE="32"
1368	;;
1369      *ELF-64*)
1370	HPUX_IA64_MODE="64"
1371	;;
1372    esac
1373  fi
1374  rm -rf conftest*
1375  ;;
1376*-*-irix6*)
1377  # Find out which ABI we are using.
1378  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1379  if AC_TRY_EVAL(ac_compile); then
1380    if test "$lt_cv_prog_gnu_ld" = yes; then
1381      case `/usr/bin/file conftest.$ac_objext` in
1382	*32-bit*)
1383	  LD="${LD-ld} -melf32bsmip"
1384	  ;;
1385	*N32*)
1386	  LD="${LD-ld} -melf32bmipn32"
1387	  ;;
1388	*64-bit*)
1389	  LD="${LD-ld} -melf64bmip"
1390	;;
1391      esac
1392    else
1393      case `/usr/bin/file conftest.$ac_objext` in
1394	*32-bit*)
1395	  LD="${LD-ld} -32"
1396	  ;;
1397	*N32*)
1398	  LD="${LD-ld} -n32"
1399	  ;;
1400	*64-bit*)
1401	  LD="${LD-ld} -64"
1402	  ;;
1403      esac
1404    fi
1405  fi
1406  rm -rf conftest*
1407  ;;
1408
1409x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1410s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1411  # Find out which ABI we are using.
1412  echo 'int i;' > conftest.$ac_ext
1413  if AC_TRY_EVAL(ac_compile); then
1414    case `/usr/bin/file conftest.o` in
1415      *32-bit*)
1416	case $host in
1417	  x86_64-*kfreebsd*-gnu)
1418	    LD="${LD-ld} -m elf_i386_fbsd"
1419	    ;;
1420	  x86_64-*linux*)
1421	    LD="${LD-ld} -m elf_i386"
1422	    ;;
1423	  ppc64-*linux*|powerpc64-*linux*)
1424	    LD="${LD-ld} -m elf32ppclinux"
1425	    ;;
1426	  s390x-*linux*)
1427	    LD="${LD-ld} -m elf_s390"
1428	    ;;
1429	  sparc64-*linux*)
1430	    LD="${LD-ld} -m elf32_sparc"
1431	    ;;
1432	esac
1433	;;
1434      *64-bit*)
1435	case $host in
1436	  x86_64-*kfreebsd*-gnu)
1437	    LD="${LD-ld} -m elf_x86_64_fbsd"
1438	    ;;
1439	  x86_64-*linux*)
1440	    LD="${LD-ld} -m elf_x86_64"
1441	    ;;
1442	  ppc*-*linux*|powerpc*-*linux*)
1443	    LD="${LD-ld} -m elf64ppc"
1444	    ;;
1445	  s390*-*linux*|s390*-*tpf*)
1446	    LD="${LD-ld} -m elf64_s390"
1447	    ;;
1448	  sparc*-*linux*)
1449	    LD="${LD-ld} -m elf64_sparc"
1450	    ;;
1451	esac
1452	;;
1453    esac
1454  fi
1455  rm -rf conftest*
1456  ;;
1457
1458*-*-sco3.2v5*)
1459  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1460  SAVE_CFLAGS="$CFLAGS"
1461  CFLAGS="$CFLAGS -belf"
1462  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1463    [AC_LANG_PUSH(C)
1464     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1465     AC_LANG_POP])
1466  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1467    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1468    CFLAGS="$SAVE_CFLAGS"
1469  fi
1470  ;;
1471*-*solaris*)
1472  # Find out which ABI we are using.
1473  echo 'int i;' > conftest.$ac_ext
1474  if AC_TRY_EVAL(ac_compile); then
1475    case `/usr/bin/file conftest.o` in
1476    *64-bit*)
1477      case $lt_cv_prog_gnu_ld in
1478      yes*)
1479        case $host in
1480        i?86-*-solaris*)
1481          LD="${LD-ld} -m elf_x86_64"
1482          ;;
1483        sparc*-*-solaris*)
1484          LD="${LD-ld} -m elf64_sparc"
1485          ;;
1486        esac
1487        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
1488        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1489          LD="${LD-ld}_sol2"
1490        fi
1491        ;;
1492      *)
1493	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1494	  LD="${LD-ld} -64"
1495	fi
1496	;;
1497      esac
1498      ;;
1499    esac
1500  fi
1501  rm -rf conftest*
1502  ;;
1503esac
1504
1505need_locks="$enable_libtool_lock"
1506])# _LT_ENABLE_LOCK
1507
1508
1509# _LT_PROG_AR
1510# -----------
1511m4_defun([_LT_PROG_AR],
1512[AC_CHECK_TOOLS(AR, [ar], false)
1513: ${AR=ar}
1514: ${AR_FLAGS=cru}
1515_LT_DECL([], [AR], [1], [The archiver])
1516_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1517
1518AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1519  [lt_cv_ar_at_file=no
1520   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1521     [echo conftest.$ac_objext > conftest.lst
1522      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1523      AC_TRY_EVAL([lt_ar_try])
1524      if test "$ac_status" -eq 0; then
1525	# Ensure the archiver fails upon bogus file names.
1526	rm -f conftest.$ac_objext libconftest.a
1527	AC_TRY_EVAL([lt_ar_try])
1528	if test "$ac_status" -ne 0; then
1529          lt_cv_ar_at_file=@
1530        fi
1531      fi
1532      rm -f conftest.* libconftest.a
1533     ])
1534  ])
1535
1536if test "x$lt_cv_ar_at_file" = xno; then
1537  archiver_list_spec=
1538else
1539  archiver_list_spec=$lt_cv_ar_at_file
1540fi
1541_LT_DECL([], [archiver_list_spec], [1],
1542  [How to feed a file listing to the archiver])
1543])# _LT_PROG_AR
1544
1545
1546# _LT_CMD_OLD_ARCHIVE
1547# -------------------
1548m4_defun([_LT_CMD_OLD_ARCHIVE],
1549[_LT_PROG_AR
1550
1551AC_CHECK_TOOL(STRIP, strip, :)
1552test -z "$STRIP" && STRIP=:
1553_LT_DECL([], [STRIP], [1], [A symbol stripping program])
1554
1555AC_CHECK_TOOL(RANLIB, ranlib, :)
1556test -z "$RANLIB" && RANLIB=:
1557_LT_DECL([], [RANLIB], [1],
1558    [Commands used to install an old-style archive])
1559
1560# Determine commands to create old-style static archives.
1561old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1562old_postinstall_cmds='chmod 644 $oldlib'
1563old_postuninstall_cmds=
1564
1565if test -n "$RANLIB"; then
1566  case $host_os in
1567  openbsd*)
1568    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1569    ;;
1570  *)
1571    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1572    ;;
1573  esac
1574  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1575fi
1576
1577case $host_os in
1578  darwin*)
1579    lock_old_archive_extraction=yes ;;
1580  *)
1581    lock_old_archive_extraction=no ;;
1582esac
1583_LT_DECL([], [old_postinstall_cmds], [2])
1584_LT_DECL([], [old_postuninstall_cmds], [2])
1585_LT_TAGDECL([], [old_archive_cmds], [2],
1586    [Commands used to build an old-style archive])
1587_LT_DECL([], [lock_old_archive_extraction], [0],
1588    [Whether to use a lock for old archive extraction])
1589])# _LT_CMD_OLD_ARCHIVE
1590
1591
1592# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1593#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1594# ----------------------------------------------------------------
1595# Check whether the given compiler option works
1596AC_DEFUN([_LT_COMPILER_OPTION],
1597[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1598m4_require([_LT_DECL_SED])dnl
1599AC_CACHE_CHECK([$1], [$2],
1600  [$2=no
1601   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1602   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1603   lt_compiler_flag="$3"
1604   # Insert the option either (1) after the last *FLAGS variable, or
1605   # (2) before a word containing "conftest.", or (3) at the end.
1606   # Note that $ac_compile itself does not contain backslashes and begins
1607   # with a dollar sign (not a hyphen), so the echo should work correctly.
1608   # The option is referenced via a variable to avoid confusing sed.
1609   lt_compile=`echo "$ac_compile" | $SED \
1610   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1611   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1612   -e 's:$: $lt_compiler_flag:'`
1613   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1614   (eval "$lt_compile" 2>conftest.err)
1615   ac_status=$?
1616   cat conftest.err >&AS_MESSAGE_LOG_FD
1617   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1618   if (exit $ac_status) && test -s "$ac_outfile"; then
1619     # The compiler can only warn and ignore the option if not recognized
1620     # So say no if there are warnings other than the usual output.
1621     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1622     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1623     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1624       $2=yes
1625     fi
1626   fi
1627   $RM conftest*
1628])
1629
1630if test x"[$]$2" = xyes; then
1631    m4_if([$5], , :, [$5])
1632else
1633    m4_if([$6], , :, [$6])
1634fi
1635])# _LT_COMPILER_OPTION
1636
1637# Old name:
1638AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1639dnl aclocal-1.4 backwards compatibility:
1640dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1641
1642
1643# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1644#                  [ACTION-SUCCESS], [ACTION-FAILURE])
1645# ----------------------------------------------------
1646# Check whether the given linker option works
1647AC_DEFUN([_LT_LINKER_OPTION],
1648[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1649m4_require([_LT_DECL_SED])dnl
1650AC_CACHE_CHECK([$1], [$2],
1651  [$2=no
1652   save_LDFLAGS="$LDFLAGS"
1653   LDFLAGS="$LDFLAGS $3"
1654   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1655   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1656     # The linker can only warn and ignore the option if not recognized
1657     # So say no if there are warnings
1658     if test -s conftest.err; then
1659       # Append any errors to the config.log.
1660       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1661       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1662       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1663       if diff conftest.exp conftest.er2 >/dev/null; then
1664         $2=yes
1665       fi
1666     else
1667       $2=yes
1668     fi
1669   fi
1670   $RM -r conftest*
1671   LDFLAGS="$save_LDFLAGS"
1672])
1673
1674if test x"[$]$2" = xyes; then
1675    m4_if([$4], , :, [$4])
1676else
1677    m4_if([$5], , :, [$5])
1678fi
1679])# _LT_LINKER_OPTION
1680
1681# Old name:
1682AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1683dnl aclocal-1.4 backwards compatibility:
1684dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1685
1686
1687# LT_CMD_MAX_LEN
1688#---------------
1689AC_DEFUN([LT_CMD_MAX_LEN],
1690[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1691# find the maximum length of command line arguments
1692AC_MSG_CHECKING([the maximum length of command line arguments])
1693AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1694  i=0
1695  teststring="ABCD"
1696
1697  case $build_os in
1698  msdosdjgpp*)
1699    # On DJGPP, this test can blow up pretty badly due to problems in libc
1700    # (any single argument exceeding 2000 bytes causes a buffer overrun
1701    # during glob expansion).  Even if it were fixed, the result of this
1702    # check would be larger than it should be.
1703    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1704    ;;
1705
1706  gnu*)
1707    # Under GNU Hurd, this test is not required because there is
1708    # no limit to the length of command line arguments.
1709    # Libtool will interpret -1 as no limit whatsoever
1710    lt_cv_sys_max_cmd_len=-1;
1711    ;;
1712
1713  cygwin* | mingw* | cegcc*)
1714    # On Win9x/ME, this test blows up -- it succeeds, but takes
1715    # about 5 minutes as the teststring grows exponentially.
1716    # Worse, since 9x/ME are not pre-emptively multitasking,
1717    # you end up with a "frozen" computer, even though with patience
1718    # the test eventually succeeds (with a max line length of 256k).
1719    # Instead, let's just punt: use the minimum linelength reported by
1720    # all of the supported platforms: 8192 (on NT/2K/XP).
1721    lt_cv_sys_max_cmd_len=8192;
1722    ;;
1723
1724  mint*)
1725    # On MiNT this can take a long time and run out of memory.
1726    lt_cv_sys_max_cmd_len=8192;
1727    ;;
1728
1729  amigaos*)
1730    # On AmigaOS with pdksh, this test takes hours, literally.
1731    # So we just punt and use a minimum line length of 8192.
1732    lt_cv_sys_max_cmd_len=8192;
1733    ;;
1734
1735  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1736    # This has been around since 386BSD, at least.  Likely further.
1737    if test -x /sbin/sysctl; then
1738      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1739    elif test -x /usr/sbin/sysctl; then
1740      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1741    else
1742      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1743    fi
1744    # And add a safety zone
1745    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1746    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1747    ;;
1748
1749  interix*)
1750    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1751    lt_cv_sys_max_cmd_len=196608
1752    ;;
1753
1754  os2*)
1755    # The test takes a long time on OS/2.
1756    lt_cv_sys_max_cmd_len=8192
1757    ;;
1758
1759  osf*)
1760    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1761    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1762    # nice to cause kernel panics so lets avoid the loop below.
1763    # First set a reasonable default.
1764    lt_cv_sys_max_cmd_len=16384
1765    #
1766    if test -x /sbin/sysconfig; then
1767      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1768        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1769      esac
1770    fi
1771    ;;
1772  sco3.2v5*)
1773    lt_cv_sys_max_cmd_len=102400
1774    ;;
1775  sysv5* | sco5v6* | sysv4.2uw2*)
1776    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1777    if test -n "$kargmax"; then
1778      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
1779    else
1780      lt_cv_sys_max_cmd_len=32768
1781    fi
1782    ;;
1783  *)
1784    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1785    if test -n "$lt_cv_sys_max_cmd_len"; then
1786      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1787      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1788    else
1789      # Make teststring a little bigger before we do anything with it.
1790      # a 1K string should be a reasonable start.
1791      for i in 1 2 3 4 5 6 7 8 ; do
1792        teststring=$teststring$teststring
1793      done
1794      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1795      # If test is not a shell built-in, we'll probably end up computing a
1796      # maximum length that is only half of the actual maximum length, but
1797      # we can't tell.
1798      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
1799	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1800	      test $i != 17 # 1/2 MB should be enough
1801      do
1802        i=`expr $i + 1`
1803        teststring=$teststring$teststring
1804      done
1805      # Only check the string length outside the loop.
1806      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1807      teststring=
1808      # Add a significant safety factor because C++ compilers can tack on
1809      # massive amounts of additional arguments before passing them to the
1810      # linker.  It appears as though 1/2 is a usable value.
1811      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1812    fi
1813    ;;
1814  esac
1815])
1816if test -n $lt_cv_sys_max_cmd_len ; then
1817  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1818else
1819  AC_MSG_RESULT(none)
1820fi
1821max_cmd_len=$lt_cv_sys_max_cmd_len
1822_LT_DECL([], [max_cmd_len], [0],
1823    [What is the maximum length of a command?])
1824])# LT_CMD_MAX_LEN
1825
1826# Old name:
1827AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1828dnl aclocal-1.4 backwards compatibility:
1829dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1830
1831
1832# _LT_HEADER_DLFCN
1833# ----------------
1834m4_defun([_LT_HEADER_DLFCN],
1835[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1836])# _LT_HEADER_DLFCN
1837
1838
1839# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1840#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1841# ----------------------------------------------------------------
1842m4_defun([_LT_TRY_DLOPEN_SELF],
1843[m4_require([_LT_HEADER_DLFCN])dnl
1844if test "$cross_compiling" = yes; then :
1845  [$4]
1846else
1847  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1848  lt_status=$lt_dlunknown
1849  cat > conftest.$ac_ext <<_LT_EOF
1850[#line $LINENO "configure"
1851#include "confdefs.h"
1852
1853#if HAVE_DLFCN_H
1854#include <dlfcn.h>
1855#endif
1856
1857#include <stdio.h>
1858
1859#ifdef RTLD_GLOBAL
1860#  define LT_DLGLOBAL		RTLD_GLOBAL
1861#else
1862#  ifdef DL_GLOBAL
1863#    define LT_DLGLOBAL		DL_GLOBAL
1864#  else
1865#    define LT_DLGLOBAL		0
1866#  endif
1867#endif
1868
1869/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1870   find out it does not work in some platform. */
1871#ifndef LT_DLLAZY_OR_NOW
1872#  ifdef RTLD_LAZY
1873#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1874#  else
1875#    ifdef DL_LAZY
1876#      define LT_DLLAZY_OR_NOW		DL_LAZY
1877#    else
1878#      ifdef RTLD_NOW
1879#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1880#      else
1881#        ifdef DL_NOW
1882#          define LT_DLLAZY_OR_NOW	DL_NOW
1883#        else
1884#          define LT_DLLAZY_OR_NOW	0
1885#        endif
1886#      endif
1887#    endif
1888#  endif
1889#endif
1890
1891/* When -fvisbility=hidden is used, assume the code has been annotated
1892   correspondingly for the symbols needed.  */
1893#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1894int fnord () __attribute__((visibility("default")));
1895#endif
1896
1897int fnord () { return 42; }
1898int main ()
1899{
1900  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1901  int status = $lt_dlunknown;
1902
1903  if (self)
1904    {
1905      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1906      else
1907        {
1908	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
1909          else puts (dlerror ());
1910	}
1911      /* dlclose (self); */
1912    }
1913  else
1914    puts (dlerror ());
1915
1916  return status;
1917}]
1918_LT_EOF
1919  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1920    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1921    lt_status=$?
1922    case x$lt_status in
1923      x$lt_dlno_uscore) $1 ;;
1924      x$lt_dlneed_uscore) $2 ;;
1925      x$lt_dlunknown|x*) $3 ;;
1926    esac
1927  else :
1928    # compilation failed
1929    $3
1930  fi
1931fi
1932rm -fr conftest*
1933])# _LT_TRY_DLOPEN_SELF
1934
1935
1936# LT_SYS_DLOPEN_SELF
1937# ------------------
1938AC_DEFUN([LT_SYS_DLOPEN_SELF],
1939[m4_require([_LT_HEADER_DLFCN])dnl
1940if test "x$enable_dlopen" != xyes; then
1941  enable_dlopen=unknown
1942  enable_dlopen_self=unknown
1943  enable_dlopen_self_static=unknown
1944else
1945  lt_cv_dlopen=no
1946  lt_cv_dlopen_libs=
1947
1948  case $host_os in
1949  beos*)
1950    lt_cv_dlopen="load_add_on"
1951    lt_cv_dlopen_libs=
1952    lt_cv_dlopen_self=yes
1953    ;;
1954
1955  mingw* | pw32* | cegcc*)
1956    lt_cv_dlopen="LoadLibrary"
1957    lt_cv_dlopen_libs=
1958    ;;
1959
1960  cygwin*)
1961    lt_cv_dlopen="dlopen"
1962    lt_cv_dlopen_libs=
1963    ;;
1964
1965  darwin*)
1966  # if libdl is installed we need to link against it
1967    AC_CHECK_LIB([dl], [dlopen],
1968		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1969    lt_cv_dlopen="dyld"
1970    lt_cv_dlopen_libs=
1971    lt_cv_dlopen_self=yes
1972    ])
1973    ;;
1974
1975  *)
1976    AC_CHECK_FUNC([shl_load],
1977	  [lt_cv_dlopen="shl_load"],
1978      [AC_CHECK_LIB([dld], [shl_load],
1979	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1980	[AC_CHECK_FUNC([dlopen],
1981	      [lt_cv_dlopen="dlopen"],
1982	  [AC_CHECK_LIB([dl], [dlopen],
1983		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1984	    [AC_CHECK_LIB([svld], [dlopen],
1985		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1986	      [AC_CHECK_LIB([dld], [dld_link],
1987		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1988	      ])
1989	    ])
1990	  ])
1991	])
1992      ])
1993    ;;
1994  esac
1995
1996  if test "x$lt_cv_dlopen" != xno; then
1997    enable_dlopen=yes
1998  else
1999    enable_dlopen=no
2000  fi
2001
2002  case $lt_cv_dlopen in
2003  dlopen)
2004    save_CPPFLAGS="$CPPFLAGS"
2005    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2006
2007    save_LDFLAGS="$LDFLAGS"
2008    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2009
2010    save_LIBS="$LIBS"
2011    LIBS="$lt_cv_dlopen_libs $LIBS"
2012
2013    AC_CACHE_CHECK([whether a program can dlopen itself],
2014	  lt_cv_dlopen_self, [dnl
2015	  _LT_TRY_DLOPEN_SELF(
2016	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2017	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2018    ])
2019
2020    if test "x$lt_cv_dlopen_self" = xyes; then
2021      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2022      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2023	  lt_cv_dlopen_self_static, [dnl
2024	  _LT_TRY_DLOPEN_SELF(
2025	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2026	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2027      ])
2028    fi
2029
2030    CPPFLAGS="$save_CPPFLAGS"
2031    LDFLAGS="$save_LDFLAGS"
2032    LIBS="$save_LIBS"
2033    ;;
2034  esac
2035
2036  case $lt_cv_dlopen_self in
2037  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2038  *) enable_dlopen_self=unknown ;;
2039  esac
2040
2041  case $lt_cv_dlopen_self_static in
2042  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2043  *) enable_dlopen_self_static=unknown ;;
2044  esac
2045fi
2046_LT_DECL([dlopen_support], [enable_dlopen], [0],
2047	 [Whether dlopen is supported])
2048_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2049	 [Whether dlopen of programs is supported])
2050_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2051	 [Whether dlopen of statically linked programs is supported])
2052])# LT_SYS_DLOPEN_SELF
2053
2054# Old name:
2055AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2056dnl aclocal-1.4 backwards compatibility:
2057dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2058
2059
2060# _LT_COMPILER_C_O([TAGNAME])
2061# ---------------------------
2062# Check to see if options -c and -o are simultaneously supported by compiler.
2063# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2064m4_defun([_LT_COMPILER_C_O],
2065[m4_require([_LT_DECL_SED])dnl
2066m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2067m4_require([_LT_TAG_COMPILER])dnl
2068AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2069  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2070  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2071   $RM -r conftest 2>/dev/null
2072   mkdir conftest
2073   cd conftest
2074   mkdir out
2075   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2076
2077   lt_compiler_flag="-o out/conftest2.$ac_objext"
2078   # Insert the option either (1) after the last *FLAGS variable, or
2079   # (2) before a word containing "conftest.", or (3) at the end.
2080   # Note that $ac_compile itself does not contain backslashes and begins
2081   # with a dollar sign (not a hyphen), so the echo should work correctly.
2082   lt_compile=`echo "$ac_compile" | $SED \
2083   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2084   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2085   -e 's:$: $lt_compiler_flag:'`
2086   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2087   (eval "$lt_compile" 2>out/conftest.err)
2088   ac_status=$?
2089   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2090   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2091   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2092   then
2093     # The compiler can only warn and ignore the option if not recognized
2094     # So say no if there are warnings
2095     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2096     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2097     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2098       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2099     fi
2100   fi
2101   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2102   $RM conftest*
2103   # SGI C++ compiler will create directory out/ii_files/ for
2104   # template instantiation
2105   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2106   $RM out/* && rmdir out
2107   cd ..
2108   $RM -r conftest
2109   $RM conftest*
2110])
2111_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2112	[Does compiler simultaneously support -c and -o options?])
2113])# _LT_COMPILER_C_O
2114
2115
2116# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2117# ----------------------------------
2118# Check to see if we can do hard links to lock some files if needed
2119m4_defun([_LT_COMPILER_FILE_LOCKS],
2120[m4_require([_LT_ENABLE_LOCK])dnl
2121m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2122_LT_COMPILER_C_O([$1])
2123
2124hard_links="nottested"
2125if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2126  # do not overwrite the value of need_locks provided by the user
2127  AC_MSG_CHECKING([if we can lock with hard links])
2128  hard_links=yes
2129  $RM conftest*
2130  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2131  touch conftest.a
2132  ln conftest.a conftest.b 2>&5 || hard_links=no
2133  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2134  AC_MSG_RESULT([$hard_links])
2135  if test "$hard_links" = no; then
2136    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2137    need_locks=warn
2138  fi
2139else
2140  need_locks=no
2141fi
2142_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2143])# _LT_COMPILER_FILE_LOCKS
2144
2145
2146# _LT_CHECK_OBJDIR
2147# ----------------
2148m4_defun([_LT_CHECK_OBJDIR],
2149[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2150[rm -f .libs 2>/dev/null
2151mkdir .libs 2>/dev/null
2152if test -d .libs; then
2153  lt_cv_objdir=.libs
2154else
2155  # MS-DOS does not allow filenames that begin with a dot.
2156  lt_cv_objdir=_libs
2157fi
2158rmdir .libs 2>/dev/null])
2159objdir=$lt_cv_objdir
2160_LT_DECL([], [objdir], [0],
2161         [The name of the directory that contains temporary libtool files])dnl
2162m4_pattern_allow([LT_OBJDIR])dnl
2163AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2164  [Define to the sub-directory in which libtool stores uninstalled libraries.])
2165])# _LT_CHECK_OBJDIR
2166
2167
2168# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2169# --------------------------------------
2170# Check hardcoding attributes.
2171m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2172[AC_MSG_CHECKING([how to hardcode library paths into programs])
2173_LT_TAGVAR(hardcode_action, $1)=
2174if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2175   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2176   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2177
2178  # We can hardcode non-existent directories.
2179  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2180     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2181     # have to relink, otherwise we might link with an installed library
2182     # when we should be linking with a yet-to-be-installed one
2183     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2184     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2185    # Linking always hardcodes the temporary library directory.
2186    _LT_TAGVAR(hardcode_action, $1)=relink
2187  else
2188    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2189    _LT_TAGVAR(hardcode_action, $1)=immediate
2190  fi
2191else
2192  # We cannot hardcode anything, or else we can only hardcode existing
2193  # directories.
2194  _LT_TAGVAR(hardcode_action, $1)=unsupported
2195fi
2196AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2197
2198if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2199   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2200  # Fast installation is not supported
2201  enable_fast_install=no
2202elif test "$shlibpath_overrides_runpath" = yes ||
2203     test "$enable_shared" = no; then
2204  # Fast installation is not necessary
2205  enable_fast_install=needless
2206fi
2207_LT_TAGDECL([], [hardcode_action], [0],
2208    [How to hardcode a shared library path into an executable])
2209])# _LT_LINKER_HARDCODE_LIBPATH
2210
2211
2212# _LT_CMD_STRIPLIB
2213# ----------------
2214m4_defun([_LT_CMD_STRIPLIB],
2215[m4_require([_LT_DECL_EGREP])
2216striplib=
2217old_striplib=
2218AC_MSG_CHECKING([whether stripping libraries is possible])
2219if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2220  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2221  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2222  AC_MSG_RESULT([yes])
2223else
2224# FIXME - insert some real tests, host_os isn't really good enough
2225  case $host_os in
2226  darwin*)
2227    if test -n "$STRIP" ; then
2228      striplib="$STRIP -x"
2229      old_striplib="$STRIP -S"
2230      AC_MSG_RESULT([yes])
2231    else
2232      AC_MSG_RESULT([no])
2233    fi
2234    ;;
2235  *)
2236    AC_MSG_RESULT([no])
2237    ;;
2238  esac
2239fi
2240_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2241_LT_DECL([], [striplib], [1])
2242])# _LT_CMD_STRIPLIB
2243
2244
2245# _LT_SYS_DYNAMIC_LINKER([TAG])
2246# -----------------------------
2247# PORTME Fill in your ld.so characteristics
2248m4_defun([_LT_SYS_DYNAMIC_LINKER],
2249[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2250m4_require([_LT_DECL_EGREP])dnl
2251m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2252m4_require([_LT_DECL_OBJDUMP])dnl
2253m4_require([_LT_DECL_SED])dnl
2254m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2255AC_MSG_CHECKING([dynamic linker characteristics])
2256m4_if([$1],
2257	[], [
2258if test "$GCC" = yes; then
2259  case $host_os in
2260    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2261    *) lt_awk_arg="/^libraries:/" ;;
2262  esac
2263  case $host_os in
2264    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2265    *) lt_sed_strip_eq="s,=/,/,g" ;;
2266  esac
2267  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2268  case $lt_search_path_spec in
2269  *\;*)
2270    # if the path contains ";" then we assume it to be the separator
2271    # otherwise default to the standard path separator (i.e. ":") - it is
2272    # assumed that no part of a normal pathname contains ";" but that should
2273    # okay in the real world where ";" in dirpaths is itself problematic.
2274    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2275    ;;
2276  *)
2277    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2278    ;;
2279  esac
2280  # Ok, now we have the path, separated by spaces, we can step through it
2281  # and add multilib dir if necessary.
2282  lt_tmp_lt_search_path_spec=
2283  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2284  for lt_sys_path in $lt_search_path_spec; do
2285    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2286      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2287    else
2288      test -d "$lt_sys_path" && \
2289	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2290    fi
2291  done
2292  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2293BEGIN {RS=" "; FS="/|\n";} {
2294  lt_foo="";
2295  lt_count=0;
2296  for (lt_i = NF; lt_i > 0; lt_i--) {
2297    if ($lt_i != "" && $lt_i != ".") {
2298      if ($lt_i == "..") {
2299        lt_count++;
2300      } else {
2301        if (lt_count == 0) {
2302          lt_foo="/" $lt_i lt_foo;
2303        } else {
2304          lt_count--;
2305        }
2306      }
2307    }
2308  }
2309  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2310  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2311}'`
2312  # AWK program above erroneously prepends '/' to C:/dos/paths
2313  # for these hosts.
2314  case $host_os in
2315    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2316      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2317  esac
2318  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2319else
2320  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2321fi])
2322library_names_spec=
2323libname_spec='lib$name'
2324soname_spec=
2325shrext_cmds=".so"
2326postinstall_cmds=
2327postuninstall_cmds=
2328finish_cmds=
2329finish_eval=
2330shlibpath_var=
2331shlibpath_overrides_runpath=unknown
2332version_type=none
2333dynamic_linker="$host_os ld.so"
2334sys_lib_dlsearch_path_spec="/lib /usr/lib"
2335need_lib_prefix=unknown
2336hardcode_into_libs=no
2337
2338# when you set need_version to no, make sure it does not cause -set_version
2339# flags to be left without arguments
2340need_version=unknown
2341
2342case $host_os in
2343aix3*)
2344  version_type=linux # correct to gnu/linux during the next big refactor
2345  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2346  shlibpath_var=LIBPATH
2347
2348  # AIX 3 has no versioning support, so we append a major version to the name.
2349  soname_spec='${libname}${release}${shared_ext}$major'
2350  ;;
2351
2352aix[[4-9]]*)
2353  version_type=linux # correct to gnu/linux during the next big refactor
2354  need_lib_prefix=no
2355  need_version=no
2356  hardcode_into_libs=yes
2357  if test "$host_cpu" = ia64; then
2358    # AIX 5 supports IA64
2359    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2360    shlibpath_var=LD_LIBRARY_PATH
2361  else
2362    # With GCC up to 2.95.x, collect2 would create an import file
2363    # for dependence libraries.  The import file would start with
2364    # the line `#! .'.  This would cause the generated library to
2365    # depend on `.', always an invalid library.  This was fixed in
2366    # development snapshots of GCC prior to 3.0.
2367    case $host_os in
2368      aix4 | aix4.[[01]] | aix4.[[01]].*)
2369      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2370	   echo ' yes '
2371	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2372	:
2373      else
2374	can_build_shared=no
2375      fi
2376      ;;
2377    esac
2378    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2379    # soname into executable. Probably we can add versioning support to
2380    # collect2, so additional links can be useful in future.
2381    if test "$aix_use_runtimelinking" = yes; then
2382      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2383      # instead of lib<name>.a to let people know that these are not
2384      # typical AIX shared libraries.
2385      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2386    else
2387      # We preserve .a as extension for shared libraries through AIX4.2
2388      # and later when we are not doing run time linking.
2389      library_names_spec='${libname}${release}.a $libname.a'
2390      soname_spec='${libname}${release}${shared_ext}$major'
2391    fi
2392    shlibpath_var=LIBPATH
2393  fi
2394  ;;
2395
2396amigaos*)
2397  case $host_cpu in
2398  powerpc)
2399    # Since July 2007 AmigaOS4 officially supports .so libraries.
2400    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2401    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2402    ;;
2403  m68k)
2404    library_names_spec='$libname.ixlibrary $libname.a'
2405    # Create ${libname}_ixlibrary.a entries in /sys/libs.
2406    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'
2407    ;;
2408  esac
2409  ;;
2410
2411beos*)
2412  library_names_spec='${libname}${shared_ext}'
2413  dynamic_linker="$host_os ld.so"
2414  shlibpath_var=LIBRARY_PATH
2415  ;;
2416
2417bsdi[[45]]*)
2418  version_type=linux # correct to gnu/linux during the next big refactor
2419  need_version=no
2420  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2421  soname_spec='${libname}${release}${shared_ext}$major'
2422  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2423  shlibpath_var=LD_LIBRARY_PATH
2424  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2425  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2426  # the default ld.so.conf also contains /usr/contrib/lib and
2427  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2428  # libtool to hard-code these into programs
2429  ;;
2430
2431cygwin* | mingw* | pw32* | cegcc*)
2432  version_type=windows
2433  shrext_cmds=".dll"
2434  need_version=no
2435  need_lib_prefix=no
2436
2437  case $GCC,$cc_basename in
2438  yes,*)
2439    # gcc
2440    library_names_spec='$libname.dll.a'
2441    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2442    postinstall_cmds='base_file=`basename \${file}`~
2443      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2444      dldir=$destdir/`dirname \$dlpath`~
2445      test -d \$dldir || mkdir -p \$dldir~
2446      $install_prog $dir/$dlname \$dldir/$dlname~
2447      chmod a+x \$dldir/$dlname~
2448      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2449        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2450      fi'
2451    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2452      dlpath=$dir/\$dldll~
2453       $RM \$dlpath'
2454    shlibpath_overrides_runpath=yes
2455
2456    case $host_os in
2457    cygwin*)
2458      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2459      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2460m4_if([$1], [],[
2461      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2462      ;;
2463    mingw* | cegcc*)
2464      # MinGW DLLs use traditional 'lib' prefix
2465      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2466      ;;
2467    pw32*)
2468      # pw32 DLLs use 'pw' prefix rather than 'lib'
2469      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2470      ;;
2471    esac
2472    dynamic_linker='Win32 ld.exe'
2473    ;;
2474
2475  *,cl*)
2476    # Native MSVC
2477    libname_spec='$name'
2478    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2479    library_names_spec='${libname}.dll.lib'
2480
2481    case $build_os in
2482    mingw*)
2483      sys_lib_search_path_spec=
2484      lt_save_ifs=$IFS
2485      IFS=';'
2486      for lt_path in $LIB
2487      do
2488        IFS=$lt_save_ifs
2489        # Let DOS variable expansion print the short 8.3 style file name.
2490        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2491        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2492      done
2493      IFS=$lt_save_ifs
2494      # Convert to MSYS style.
2495      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2496      ;;
2497    cygwin*)
2498      # Convert to unix form, then to dos form, then back to unix form
2499      # but this time dos style (no spaces!) so that the unix form looks
2500      # like /cygdrive/c/PROGRA~1:/cygdr...
2501      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2502      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2503      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2504      ;;
2505    *)
2506      sys_lib_search_path_spec="$LIB"
2507      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2508        # It is most probably a Windows format PATH.
2509        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2510      else
2511        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2512      fi
2513      # FIXME: find the short name or the path components, as spaces are
2514      # common. (e.g. "Program Files" -> "PROGRA~1")
2515      ;;
2516    esac
2517
2518    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2519    postinstall_cmds='base_file=`basename \${file}`~
2520      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2521      dldir=$destdir/`dirname \$dlpath`~
2522      test -d \$dldir || mkdir -p \$dldir~
2523      $install_prog $dir/$dlname \$dldir/$dlname'
2524    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2525      dlpath=$dir/\$dldll~
2526       $RM \$dlpath'
2527    shlibpath_overrides_runpath=yes
2528    dynamic_linker='Win32 link.exe'
2529    ;;
2530
2531  *)
2532    # Assume MSVC wrapper
2533    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2534    dynamic_linker='Win32 ld.exe'
2535    ;;
2536  esac
2537  # FIXME: first we should search . and the directory the executable is in
2538  shlibpath_var=PATH
2539  ;;
2540
2541darwin* | rhapsody*)
2542  dynamic_linker="$host_os dyld"
2543  version_type=darwin
2544  need_lib_prefix=no
2545  need_version=no
2546  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2547  soname_spec='${libname}${release}${major}$shared_ext'
2548  shlibpath_overrides_runpath=yes
2549  shlibpath_var=DYLD_LIBRARY_PATH
2550  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2551m4_if([$1], [],[
2552  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2553  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2554  ;;
2555
2556dgux*)
2557  version_type=linux # correct to gnu/linux during the next big refactor
2558  need_lib_prefix=no
2559  need_version=no
2560  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2561  soname_spec='${libname}${release}${shared_ext}$major'
2562  shlibpath_var=LD_LIBRARY_PATH
2563  ;;
2564
2565freebsd* | dragonfly*)
2566  # DragonFly does not have aout.  When/if they implement a new
2567  # versioning mechanism, adjust this.
2568  if test -x /usr/bin/objformat; then
2569    objformat=`/usr/bin/objformat`
2570  else
2571    case $host_os in
2572    freebsd[[23]].*) objformat=aout ;;
2573    *) objformat=elf ;;
2574    esac
2575  fi
2576  version_type=freebsd-$objformat
2577  case $version_type in
2578    freebsd-elf*)
2579      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2580      need_version=no
2581      need_lib_prefix=no
2582      ;;
2583    freebsd-*)
2584      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2585      need_version=yes
2586      ;;
2587  esac
2588  shlibpath_var=LD_LIBRARY_PATH
2589  case $host_os in
2590  freebsd2.*)
2591    shlibpath_overrides_runpath=yes
2592    ;;
2593  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2594    shlibpath_overrides_runpath=yes
2595    hardcode_into_libs=yes
2596    ;;
2597  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2598  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2599    shlibpath_overrides_runpath=no
2600    hardcode_into_libs=yes
2601    ;;
2602  *) # from 4.6 on, and DragonFly
2603    shlibpath_overrides_runpath=yes
2604    hardcode_into_libs=yes
2605    ;;
2606  esac
2607  ;;
2608
2609gnu*)
2610  version_type=linux # correct to gnu/linux during the next big refactor
2611  need_lib_prefix=no
2612  need_version=no
2613  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2614  soname_spec='${libname}${release}${shared_ext}$major'
2615  shlibpath_var=LD_LIBRARY_PATH
2616  shlibpath_overrides_runpath=no
2617  hardcode_into_libs=yes
2618  ;;
2619
2620haiku*)
2621  version_type=linux # correct to gnu/linux during the next big refactor
2622  need_lib_prefix=no
2623  need_version=no
2624  dynamic_linker="$host_os runtime_loader"
2625  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2626  soname_spec='${libname}${release}${shared_ext}$major'
2627  shlibpath_var=LIBRARY_PATH
2628  shlibpath_overrides_runpath=yes
2629  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2630  hardcode_into_libs=yes
2631  ;;
2632
2633hpux9* | hpux10* | hpux11*)
2634  # Give a soname corresponding to the major version so that dld.sl refuses to
2635  # link against other versions.
2636  version_type=sunos
2637  need_lib_prefix=no
2638  need_version=no
2639  case $host_cpu in
2640  ia64*)
2641    shrext_cmds='.so'
2642    hardcode_into_libs=yes
2643    dynamic_linker="$host_os dld.so"
2644    shlibpath_var=LD_LIBRARY_PATH
2645    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2646    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2647    soname_spec='${libname}${release}${shared_ext}$major'
2648    if test "X$HPUX_IA64_MODE" = X32; then
2649      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2650    else
2651      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2652    fi
2653    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2654    ;;
2655  hppa*64*)
2656    shrext_cmds='.sl'
2657    hardcode_into_libs=yes
2658    dynamic_linker="$host_os dld.sl"
2659    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2660    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2661    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2662    soname_spec='${libname}${release}${shared_ext}$major'
2663    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2664    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2665    ;;
2666  *)
2667    shrext_cmds='.sl'
2668    dynamic_linker="$host_os dld.sl"
2669    shlibpath_var=SHLIB_PATH
2670    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2671    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2672    soname_spec='${libname}${release}${shared_ext}$major'
2673    ;;
2674  esac
2675  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2676  postinstall_cmds='chmod 555 $lib'
2677  # or fails outright, so override atomically:
2678  install_override_mode=555
2679  ;;
2680
2681interix[[3-9]]*)
2682  version_type=linux # correct to gnu/linux during the next big refactor
2683  need_lib_prefix=no
2684  need_version=no
2685  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2686  soname_spec='${libname}${release}${shared_ext}$major'
2687  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2688  shlibpath_var=LD_LIBRARY_PATH
2689  shlibpath_overrides_runpath=no
2690  hardcode_into_libs=yes
2691  ;;
2692
2693irix5* | irix6* | nonstopux*)
2694  case $host_os in
2695    nonstopux*) version_type=nonstopux ;;
2696    *)
2697	if test "$lt_cv_prog_gnu_ld" = yes; then
2698		version_type=linux # correct to gnu/linux during the next big refactor
2699	else
2700		version_type=irix
2701	fi ;;
2702  esac
2703  need_lib_prefix=no
2704  need_version=no
2705  soname_spec='${libname}${release}${shared_ext}$major'
2706  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2707  case $host_os in
2708  irix5* | nonstopux*)
2709    libsuff= shlibsuff=
2710    ;;
2711  *)
2712    case $LD in # libtool.m4 will add one of these switches to LD
2713    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2714      libsuff= shlibsuff= libmagic=32-bit;;
2715    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2716      libsuff=32 shlibsuff=N32 libmagic=N32;;
2717    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2718      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2719    *) libsuff= shlibsuff= libmagic=never-match;;
2720    esac
2721    ;;
2722  esac
2723  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2724  shlibpath_overrides_runpath=no
2725  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2726  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2727  hardcode_into_libs=yes
2728  ;;
2729
2730# No shared lib support for Linux oldld, aout, or coff.
2731linux*oldld* | linux*aout* | linux*coff*)
2732  dynamic_linker=no
2733  ;;
2734
2735# This must be glibc/ELF.
2736linux* | k*bsd*-gnu | kopensolaris*-gnu)
2737  version_type=linux # correct to gnu/linux during the next big refactor
2738  need_lib_prefix=no
2739  need_version=no
2740  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2741  soname_spec='${libname}${release}${shared_ext}$major'
2742  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2743  shlibpath_var=LD_LIBRARY_PATH
2744  shlibpath_overrides_runpath=no
2745
2746  # Some binutils ld are patched to set DT_RUNPATH
2747  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2748    [lt_cv_shlibpath_overrides_runpath=no
2749    save_LDFLAGS=$LDFLAGS
2750    save_libdir=$libdir
2751    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2752	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2753    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2754      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2755	 [lt_cv_shlibpath_overrides_runpath=yes])])
2756    LDFLAGS=$save_LDFLAGS
2757    libdir=$save_libdir
2758    ])
2759  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2760
2761  # This implies no fast_install, which is unacceptable.
2762  # Some rework will be needed to allow for fast_install
2763  # before this can be enabled.
2764  hardcode_into_libs=yes
2765
2766  # Append ld.so.conf contents to the search path
2767  if test -f /etc/ld.so.conf; then
2768    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' ' '`
2769    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2770  fi
2771
2772  # We used to test for /lib/ld.so.1 and disable shared libraries on
2773  # powerpc, because MkLinux only supported shared libraries with the
2774  # GNU dynamic linker.  Since this was broken with cross compilers,
2775  # most powerpc-linux boxes support dynamic linking these days and
2776  # people can always --disable-shared, the test was removed, and we
2777  # assume the GNU/Linux dynamic linker is in use.
2778  dynamic_linker='GNU/Linux ld.so'
2779  ;;
2780
2781netbsdelf*-gnu)
2782  version_type=linux
2783  need_lib_prefix=no
2784  need_version=no
2785  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2786  soname_spec='${libname}${release}${shared_ext}$major'
2787  shlibpath_var=LD_LIBRARY_PATH
2788  shlibpath_overrides_runpath=no
2789  hardcode_into_libs=yes
2790  dynamic_linker='NetBSD ld.elf_so'
2791  ;;
2792
2793netbsd*)
2794  version_type=sunos
2795  need_lib_prefix=no
2796  need_version=no
2797  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2798    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2799    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2800    dynamic_linker='NetBSD (a.out) ld.so'
2801  else
2802    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2803    soname_spec='${libname}${release}${shared_ext}$major'
2804    dynamic_linker='NetBSD ld.elf_so'
2805  fi
2806  shlibpath_var=LD_LIBRARY_PATH
2807  shlibpath_overrides_runpath=yes
2808  hardcode_into_libs=yes
2809  ;;
2810
2811newsos6)
2812  version_type=linux # correct to gnu/linux during the next big refactor
2813  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2814  shlibpath_var=LD_LIBRARY_PATH
2815  shlibpath_overrides_runpath=yes
2816  ;;
2817
2818*nto* | *qnx*)
2819  version_type=qnx
2820  need_lib_prefix=no
2821  need_version=no
2822  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2823  soname_spec='${libname}${release}${shared_ext}$major'
2824  shlibpath_var=LD_LIBRARY_PATH
2825  shlibpath_overrides_runpath=no
2826  hardcode_into_libs=yes
2827  dynamic_linker='ldqnx.so'
2828  ;;
2829
2830openbsd*)
2831  version_type=sunos
2832  sys_lib_dlsearch_path_spec="/usr/lib"
2833  need_lib_prefix=no
2834  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2835  case $host_os in
2836    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
2837    *)				need_version=no  ;;
2838  esac
2839  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2840  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2841  shlibpath_var=LD_LIBRARY_PATH
2842  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2843    case $host_os in
2844      openbsd2.[[89]] | openbsd2.[[89]].*)
2845	shlibpath_overrides_runpath=no
2846	;;
2847      *)
2848	shlibpath_overrides_runpath=yes
2849	;;
2850      esac
2851  else
2852    shlibpath_overrides_runpath=yes
2853  fi
2854  ;;
2855
2856os2*)
2857  libname_spec='$name'
2858  shrext_cmds=".dll"
2859  need_lib_prefix=no
2860  library_names_spec='$libname${shared_ext} $libname.a'
2861  dynamic_linker='OS/2 ld.exe'
2862  shlibpath_var=LIBPATH
2863  ;;
2864
2865osf3* | osf4* | osf5*)
2866  version_type=osf
2867  need_lib_prefix=no
2868  need_version=no
2869  soname_spec='${libname}${release}${shared_ext}$major'
2870  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2871  shlibpath_var=LD_LIBRARY_PATH
2872  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2873  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2874  ;;
2875
2876rdos*)
2877  dynamic_linker=no
2878  ;;
2879
2880solaris*)
2881  version_type=linux # correct to gnu/linux during the next big refactor
2882  need_lib_prefix=no
2883  need_version=no
2884  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2885  soname_spec='${libname}${release}${shared_ext}$major'
2886  shlibpath_var=LD_LIBRARY_PATH
2887  shlibpath_overrides_runpath=yes
2888  hardcode_into_libs=yes
2889  # ldd complains unless libraries are executable
2890  postinstall_cmds='chmod +x $lib'
2891  ;;
2892
2893sunos4*)
2894  version_type=sunos
2895  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2896  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2897  shlibpath_var=LD_LIBRARY_PATH
2898  shlibpath_overrides_runpath=yes
2899  if test "$with_gnu_ld" = yes; then
2900    need_lib_prefix=no
2901  fi
2902  need_version=yes
2903  ;;
2904
2905sysv4 | sysv4.3*)
2906  version_type=linux # correct to gnu/linux during the next big refactor
2907  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2908  soname_spec='${libname}${release}${shared_ext}$major'
2909  shlibpath_var=LD_LIBRARY_PATH
2910  case $host_vendor in
2911    sni)
2912      shlibpath_overrides_runpath=no
2913      need_lib_prefix=no
2914      runpath_var=LD_RUN_PATH
2915      ;;
2916    siemens)
2917      need_lib_prefix=no
2918      ;;
2919    motorola)
2920      need_lib_prefix=no
2921      need_version=no
2922      shlibpath_overrides_runpath=no
2923      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2924      ;;
2925  esac
2926  ;;
2927
2928sysv4*MP*)
2929  if test -d /usr/nec ;then
2930    version_type=linux # correct to gnu/linux during the next big refactor
2931    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2932    soname_spec='$libname${shared_ext}.$major'
2933    shlibpath_var=LD_LIBRARY_PATH
2934  fi
2935  ;;
2936
2937sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2938  version_type=freebsd-elf
2939  need_lib_prefix=no
2940  need_version=no
2941  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2942  soname_spec='${libname}${release}${shared_ext}$major'
2943  shlibpath_var=LD_LIBRARY_PATH
2944  shlibpath_overrides_runpath=yes
2945  hardcode_into_libs=yes
2946  if test "$with_gnu_ld" = yes; then
2947    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2948  else
2949    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2950    case $host_os in
2951      sco3.2v5*)
2952        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2953	;;
2954    esac
2955  fi
2956  sys_lib_dlsearch_path_spec='/usr/lib'
2957  ;;
2958
2959tpf*)
2960  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
2961  version_type=linux # correct to gnu/linux during the next big refactor
2962  need_lib_prefix=no
2963  need_version=no
2964  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2965  shlibpath_var=LD_LIBRARY_PATH
2966  shlibpath_overrides_runpath=no
2967  hardcode_into_libs=yes
2968  ;;
2969
2970uts4*)
2971  version_type=linux # correct to gnu/linux during the next big refactor
2972  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2973  soname_spec='${libname}${release}${shared_ext}$major'
2974  shlibpath_var=LD_LIBRARY_PATH
2975  ;;
2976
2977*)
2978  dynamic_linker=no
2979  ;;
2980esac
2981AC_MSG_RESULT([$dynamic_linker])
2982test "$dynamic_linker" = no && can_build_shared=no
2983
2984variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2985if test "$GCC" = yes; then
2986  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2987fi
2988
2989if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2990  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2991fi
2992if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2993  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2994fi
2995
2996_LT_DECL([], [variables_saved_for_relink], [1],
2997    [Variables whose values should be saved in libtool wrapper scripts and
2998    restored at link time])
2999_LT_DECL([], [need_lib_prefix], [0],
3000    [Do we need the "lib" prefix for modules?])
3001_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3002_LT_DECL([], [version_type], [0], [Library versioning type])
3003_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3004_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3005_LT_DECL([], [shlibpath_overrides_runpath], [0],
3006    [Is shlibpath searched before the hard-coded library search path?])
3007_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3008_LT_DECL([], [library_names_spec], [1],
3009    [[List of archive names.  First name is the real one, the rest are links.
3010    The last name is the one that the linker finds with -lNAME]])
3011_LT_DECL([], [soname_spec], [1],
3012    [[The coded name of the library, if different from the real name]])
3013_LT_DECL([], [install_override_mode], [1],
3014    [Permission mode override for installation of shared libraries])
3015_LT_DECL([], [postinstall_cmds], [2],
3016    [Command to use after installation of a shared archive])
3017_LT_DECL([], [postuninstall_cmds], [2],
3018    [Command to use after uninstallation of a shared archive])
3019_LT_DECL([], [finish_cmds], [2],
3020    [Commands used to finish a libtool library installation in a directory])
3021_LT_DECL([], [finish_eval], [1],
3022    [[As "finish_cmds", except a single script fragment to be evaled but
3023    not shown]])
3024_LT_DECL([], [hardcode_into_libs], [0],
3025    [Whether we should hardcode library paths into libraries])
3026_LT_DECL([], [sys_lib_search_path_spec], [2],
3027    [Compile-time system search path for libraries])
3028_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3029    [Run-time system search path for libraries])
3030])# _LT_SYS_DYNAMIC_LINKER
3031
3032
3033# _LT_PATH_TOOL_PREFIX(TOOL)
3034# --------------------------
3035# find a file program which can recognize shared library
3036AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3037[m4_require([_LT_DECL_EGREP])dnl
3038AC_MSG_CHECKING([for $1])
3039AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3040[case $MAGIC_CMD in
3041[[\\/*] |  ?:[\\/]*])
3042  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3043  ;;
3044*)
3045  lt_save_MAGIC_CMD="$MAGIC_CMD"
3046  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3047dnl $ac_dummy forces splitting on constant user-supplied paths.
3048dnl POSIX.2 word splitting is done only on the output of word expansions,
3049dnl not every word.  This closes a longstanding sh security hole.
3050  ac_dummy="m4_if([$2], , $PATH, [$2])"
3051  for ac_dir in $ac_dummy; do
3052    IFS="$lt_save_ifs"
3053    test -z "$ac_dir" && ac_dir=.
3054    if test -f $ac_dir/$1; then
3055      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3056      if test -n "$file_magic_test_file"; then
3057	case $deplibs_check_method in
3058	"file_magic "*)
3059	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3060	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3061	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3062	    $EGREP "$file_magic_regex" > /dev/null; then
3063	    :
3064	  else
3065	    cat <<_LT_EOF 1>&2
3066
3067*** Warning: the command libtool uses to detect shared libraries,
3068*** $file_magic_cmd, produces output that libtool cannot recognize.
3069*** The result is that libtool may fail to recognize shared libraries
3070*** as such.  This will affect the creation of libtool libraries that
3071*** depend on shared libraries, but programs linked with such libtool
3072*** libraries will work regardless of this problem.  Nevertheless, you
3073*** may want to report the problem to your system manager and/or to
3074*** bug-libtool@gnu.org
3075
3076_LT_EOF
3077	  fi ;;
3078	esac
3079      fi
3080      break
3081    fi
3082  done
3083  IFS="$lt_save_ifs"
3084  MAGIC_CMD="$lt_save_MAGIC_CMD"
3085  ;;
3086esac])
3087MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3088if test -n "$MAGIC_CMD"; then
3089  AC_MSG_RESULT($MAGIC_CMD)
3090else
3091  AC_MSG_RESULT(no)
3092fi
3093_LT_DECL([], [MAGIC_CMD], [0],
3094	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3095])# _LT_PATH_TOOL_PREFIX
3096
3097# Old name:
3098AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3099dnl aclocal-1.4 backwards compatibility:
3100dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3101
3102
3103# _LT_PATH_MAGIC
3104# --------------
3105# find a file program which can recognize a shared library
3106m4_defun([_LT_PATH_MAGIC],
3107[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3108if test -z "$lt_cv_path_MAGIC_CMD"; then
3109  if test -n "$ac_tool_prefix"; then
3110    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3111  else
3112    MAGIC_CMD=:
3113  fi
3114fi
3115])# _LT_PATH_MAGIC
3116
3117
3118# LT_PATH_LD
3119# ----------
3120# find the pathname to the GNU or non-GNU linker
3121AC_DEFUN([LT_PATH_LD],
3122[AC_REQUIRE([AC_PROG_CC])dnl
3123AC_REQUIRE([AC_CANONICAL_HOST])dnl
3124AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3125m4_require([_LT_DECL_SED])dnl
3126m4_require([_LT_DECL_EGREP])dnl
3127m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3128
3129AC_ARG_WITH([gnu-ld],
3130    [AS_HELP_STRING([--with-gnu-ld],
3131	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3132    [test "$withval" = no || with_gnu_ld=yes],
3133    [with_gnu_ld=no])dnl
3134
3135ac_prog=ld
3136if test "$GCC" = yes; then
3137  # Check if gcc -print-prog-name=ld gives a path.
3138  AC_MSG_CHECKING([for ld used by $CC])
3139  case $host in
3140  *-*-mingw*)
3141    # gcc leaves a trailing carriage return which upsets mingw
3142    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3143  *)
3144    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3145  esac
3146  case $ac_prog in
3147    # Accept absolute paths.
3148    [[\\/]]* | ?:[[\\/]]*)
3149      re_direlt='/[[^/]][[^/]]*/\.\./'
3150      # Canonicalize the pathname of ld
3151      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3152      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3153	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3154      done
3155      test -z "$LD" && LD="$ac_prog"
3156      ;;
3157  "")
3158    # If it fails, then pretend we aren't using GCC.
3159    ac_prog=ld
3160    ;;
3161  *)
3162    # If it is relative, then search for the first ld in PATH.
3163    with_gnu_ld=unknown
3164    ;;
3165  esac
3166elif test "$with_gnu_ld" = yes; then
3167  AC_MSG_CHECKING([for GNU ld])
3168else
3169  AC_MSG_CHECKING([for non-GNU ld])
3170fi
3171AC_CACHE_VAL(lt_cv_path_LD,
3172[if test -z "$LD"; then
3173  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3174  for ac_dir in $PATH; do
3175    IFS="$lt_save_ifs"
3176    test -z "$ac_dir" && ac_dir=.
3177    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3178      lt_cv_path_LD="$ac_dir/$ac_prog"
3179      # Check to see if the program is GNU ld.  I'd rather use --version,
3180      # but apparently some variants of GNU ld only accept -v.
3181      # Break only if it was the GNU/non-GNU ld that we prefer.
3182      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3183      *GNU* | *'with BFD'*)
3184	test "$with_gnu_ld" != no && break
3185	;;
3186      *)
3187	test "$with_gnu_ld" != yes && break
3188	;;
3189      esac
3190    fi
3191  done
3192  IFS="$lt_save_ifs"
3193else
3194  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3195fi])
3196LD="$lt_cv_path_LD"
3197if test -n "$LD"; then
3198  AC_MSG_RESULT($LD)
3199else
3200  AC_MSG_RESULT(no)
3201fi
3202test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3203_LT_PATH_LD_GNU
3204AC_SUBST([LD])
3205
3206_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3207])# LT_PATH_LD
3208
3209# Old names:
3210AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3211AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3212dnl aclocal-1.4 backwards compatibility:
3213dnl AC_DEFUN([AM_PROG_LD], [])
3214dnl AC_DEFUN([AC_PROG_LD], [])
3215
3216
3217# _LT_PATH_LD_GNU
3218#- --------------
3219m4_defun([_LT_PATH_LD_GNU],
3220[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3221[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3222case `$LD -v 2>&1 </dev/null` in
3223*GNU* | *'with BFD'*)
3224  lt_cv_prog_gnu_ld=yes
3225  ;;
3226*)
3227  lt_cv_prog_gnu_ld=no
3228  ;;
3229esac])
3230with_gnu_ld=$lt_cv_prog_gnu_ld
3231])# _LT_PATH_LD_GNU
3232
3233
3234# _LT_CMD_RELOAD
3235# --------------
3236# find reload flag for linker
3237#   -- PORTME Some linkers may need a different reload flag.
3238m4_defun([_LT_CMD_RELOAD],
3239[AC_CACHE_CHECK([for $LD option to reload object files],
3240  lt_cv_ld_reload_flag,
3241  [lt_cv_ld_reload_flag='-r'])
3242reload_flag=$lt_cv_ld_reload_flag
3243case $reload_flag in
3244"" | " "*) ;;
3245*) reload_flag=" $reload_flag" ;;
3246esac
3247reload_cmds='$LD$reload_flag -o $output$reload_objs'
3248case $host_os in
3249  cygwin* | mingw* | pw32* | cegcc*)
3250    if test "$GCC" != yes; then
3251      reload_cmds=false
3252    fi
3253    ;;
3254  darwin*)
3255    if test "$GCC" = yes; then
3256      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3257    else
3258      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3259    fi
3260    ;;
3261esac
3262_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3263_LT_TAGDECL([], [reload_cmds], [2])dnl
3264])# _LT_CMD_RELOAD
3265
3266
3267# _LT_CHECK_MAGIC_METHOD
3268# ----------------------
3269# how to check for library dependencies
3270#  -- PORTME fill in with the dynamic library characteristics
3271m4_defun([_LT_CHECK_MAGIC_METHOD],
3272[m4_require([_LT_DECL_EGREP])
3273m4_require([_LT_DECL_OBJDUMP])
3274AC_CACHE_CHECK([how to recognize dependent libraries],
3275lt_cv_deplibs_check_method,
3276[lt_cv_file_magic_cmd='$MAGIC_CMD'
3277lt_cv_file_magic_test_file=
3278lt_cv_deplibs_check_method='unknown'
3279# Need to set the preceding variable on all platforms that support
3280# interlibrary dependencies.
3281# 'none' -- dependencies not supported.
3282# `unknown' -- same as none, but documents that we really don't know.
3283# 'pass_all' -- all dependencies passed with no checks.
3284# 'test_compile' -- check by making test program.
3285# 'file_magic [[regex]]' -- check by looking for files in library path
3286# which responds to the $file_magic_cmd with a given extended regex.
3287# If you have `file' or equivalent on your system and you're not sure
3288# whether `pass_all' will *always* work, you probably want this one.
3289
3290case $host_os in
3291aix[[4-9]]*)
3292  lt_cv_deplibs_check_method=pass_all
3293  ;;
3294
3295beos*)
3296  lt_cv_deplibs_check_method=pass_all
3297  ;;
3298
3299bsdi[[45]]*)
3300  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3301  lt_cv_file_magic_cmd='/usr/bin/file -L'
3302  lt_cv_file_magic_test_file=/shlib/libc.so
3303  ;;
3304
3305cygwin*)
3306  # func_win32_libid is a shell function defined in ltmain.sh
3307  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3308  lt_cv_file_magic_cmd='func_win32_libid'
3309  ;;
3310
3311mingw* | pw32*)
3312  # Base MSYS/MinGW do not provide the 'file' command needed by
3313  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3314  # unless we find 'file', for example because we are cross-compiling.
3315  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3316  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3317    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3318    lt_cv_file_magic_cmd='func_win32_libid'
3319  else
3320    # Keep this pattern in sync with the one in func_win32_libid.
3321    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3322    lt_cv_file_magic_cmd='$OBJDUMP -f'
3323  fi
3324  ;;
3325
3326cegcc*)
3327  # use the weaker test based on 'objdump'. See mingw*.
3328  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3329  lt_cv_file_magic_cmd='$OBJDUMP -f'
3330  ;;
3331
3332darwin* | rhapsody*)
3333  lt_cv_deplibs_check_method=pass_all
3334  ;;
3335
3336freebsd* | dragonfly*)
3337  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3338    case $host_cpu in
3339    i*86 )
3340      # Not sure whether the presence of OpenBSD here was a mistake.
3341      # Let's accept both of them until this is cleared up.
3342      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3343      lt_cv_file_magic_cmd=/usr/bin/file
3344      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3345      ;;
3346    esac
3347  else
3348    lt_cv_deplibs_check_method=pass_all
3349  fi
3350  ;;
3351
3352gnu*)
3353  lt_cv_deplibs_check_method=pass_all
3354  ;;
3355
3356haiku*)
3357  lt_cv_deplibs_check_method=pass_all
3358  ;;
3359
3360hpux10.20* | hpux11*)
3361  lt_cv_file_magic_cmd=/usr/bin/file
3362  case $host_cpu in
3363  ia64*)
3364    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3365    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3366    ;;
3367  hppa*64*)
3368    [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]']
3369    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3370    ;;
3371  *)
3372    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3373    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3374    ;;
3375  esac
3376  ;;
3377
3378interix[[3-9]]*)
3379  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3380  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3381  ;;
3382
3383irix5* | irix6* | nonstopux*)
3384  case $LD in
3385  *-32|*"-32 ") libmagic=32-bit;;
3386  *-n32|*"-n32 ") libmagic=N32;;
3387  *-64|*"-64 ") libmagic=64-bit;;
3388  *) libmagic=never-match;;
3389  esac
3390  lt_cv_deplibs_check_method=pass_all
3391  ;;
3392
3393# This must be glibc/ELF.
3394linux* | k*bsd*-gnu | kopensolaris*-gnu)
3395  lt_cv_deplibs_check_method=pass_all
3396  ;;
3397
3398netbsd* | netbsdelf*-gnu)
3399  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3400    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3401  else
3402    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3403  fi
3404  ;;
3405
3406newos6*)
3407  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3408  lt_cv_file_magic_cmd=/usr/bin/file
3409  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3410  ;;
3411
3412*nto* | *qnx*)
3413  lt_cv_deplibs_check_method=pass_all
3414  ;;
3415
3416openbsd*)
3417  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3418    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3419  else
3420    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3421  fi
3422  ;;
3423
3424osf3* | osf4* | osf5*)
3425  lt_cv_deplibs_check_method=pass_all
3426  ;;
3427
3428rdos*)
3429  lt_cv_deplibs_check_method=pass_all
3430  ;;
3431
3432solaris*)
3433  lt_cv_deplibs_check_method=pass_all
3434  ;;
3435
3436sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3437  lt_cv_deplibs_check_method=pass_all
3438  ;;
3439
3440sysv4 | sysv4.3*)
3441  case $host_vendor in
3442  motorola)
3443    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]]'
3444    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3445    ;;
3446  ncr)
3447    lt_cv_deplibs_check_method=pass_all
3448    ;;
3449  sequent)
3450    lt_cv_file_magic_cmd='/bin/file'
3451    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3452    ;;
3453  sni)
3454    lt_cv_file_magic_cmd='/bin/file'
3455    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3456    lt_cv_file_magic_test_file=/lib/libc.so
3457    ;;
3458  siemens)
3459    lt_cv_deplibs_check_method=pass_all
3460    ;;
3461  pc)
3462    lt_cv_deplibs_check_method=pass_all
3463    ;;
3464  esac
3465  ;;
3466
3467tpf*)
3468  lt_cv_deplibs_check_method=pass_all
3469  ;;
3470esac
3471])
3472
3473file_magic_glob=
3474want_nocaseglob=no
3475if test "$build" = "$host"; then
3476  case $host_os in
3477  mingw* | pw32*)
3478    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3479      want_nocaseglob=yes
3480    else
3481      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3482    fi
3483    ;;
3484  esac
3485fi
3486
3487file_magic_cmd=$lt_cv_file_magic_cmd
3488deplibs_check_method=$lt_cv_deplibs_check_method
3489test -z "$deplibs_check_method" && deplibs_check_method=unknown
3490
3491_LT_DECL([], [deplibs_check_method], [1],
3492    [Method to check whether dependent libraries are shared objects])
3493_LT_DECL([], [file_magic_cmd], [1],
3494    [Command to use when deplibs_check_method = "file_magic"])
3495_LT_DECL([], [file_magic_glob], [1],
3496    [How to find potential files when deplibs_check_method = "file_magic"])
3497_LT_DECL([], [want_nocaseglob], [1],
3498    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3499])# _LT_CHECK_MAGIC_METHOD
3500
3501
3502# LT_PATH_NM
3503# ----------
3504# find the pathname to a BSD- or MS-compatible name lister
3505AC_DEFUN([LT_PATH_NM],
3506[AC_REQUIRE([AC_PROG_CC])dnl
3507AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3508[if test -n "$NM"; then
3509  # Let the user override the test.
3510  lt_cv_path_NM="$NM"
3511else
3512  lt_nm_to_check="${ac_tool_prefix}nm"
3513  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3514    lt_nm_to_check="$lt_nm_to_check nm"
3515  fi
3516  for lt_tmp_nm in $lt_nm_to_check; do
3517    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3518    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3519      IFS="$lt_save_ifs"
3520      test -z "$ac_dir" && ac_dir=.
3521      tmp_nm="$ac_dir/$lt_tmp_nm"
3522      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3523	# Check to see if the nm accepts a BSD-compat flag.
3524	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3525	#   nm: unknown option "B" ignored
3526	# Tru64's nm complains that /dev/null is an invalid object file
3527	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3528	*/dev/null* | *'Invalid file or object type'*)
3529	  lt_cv_path_NM="$tmp_nm -B"
3530	  break
3531	  ;;
3532	*)
3533	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3534	  */dev/null*)
3535	    lt_cv_path_NM="$tmp_nm -p"
3536	    break
3537	    ;;
3538	  *)
3539	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3540	    continue # so that we can try to find one that supports BSD flags
3541	    ;;
3542	  esac
3543	  ;;
3544	esac
3545      fi
3546    done
3547    IFS="$lt_save_ifs"
3548  done
3549  : ${lt_cv_path_NM=no}
3550fi])
3551if test "$lt_cv_path_NM" != "no"; then
3552  NM="$lt_cv_path_NM"
3553else
3554  # Didn't find any BSD compatible name lister, look for dumpbin.
3555  if test -n "$DUMPBIN"; then :
3556    # Let the user override the test.
3557  else
3558    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3559    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3560    *COFF*)
3561      DUMPBIN="$DUMPBIN -symbols"
3562      ;;
3563    *)
3564      DUMPBIN=:
3565      ;;
3566    esac
3567  fi
3568  AC_SUBST([DUMPBIN])
3569  if test "$DUMPBIN" != ":"; then
3570    NM="$DUMPBIN"
3571  fi
3572fi
3573test -z "$NM" && NM=nm
3574AC_SUBST([NM])
3575_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3576
3577AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3578  [lt_cv_nm_interface="BSD nm"
3579  echo "int some_variable = 0;" > conftest.$ac_ext
3580  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3581  (eval "$ac_compile" 2>conftest.err)
3582  cat conftest.err >&AS_MESSAGE_LOG_FD
3583  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3584  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3585  cat conftest.err >&AS_MESSAGE_LOG_FD
3586  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3587  cat conftest.out >&AS_MESSAGE_LOG_FD
3588  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3589    lt_cv_nm_interface="MS dumpbin"
3590  fi
3591  rm -f conftest*])
3592])# LT_PATH_NM
3593
3594# Old names:
3595AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3596AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3597dnl aclocal-1.4 backwards compatibility:
3598dnl AC_DEFUN([AM_PROG_NM], [])
3599dnl AC_DEFUN([AC_PROG_NM], [])
3600
3601# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3602# --------------------------------
3603# how to determine the name of the shared library
3604# associated with a specific link library.
3605#  -- PORTME fill in with the dynamic library characteristics
3606m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3607[m4_require([_LT_DECL_EGREP])
3608m4_require([_LT_DECL_OBJDUMP])
3609m4_require([_LT_DECL_DLLTOOL])
3610AC_CACHE_CHECK([how to associate runtime and link libraries],
3611lt_cv_sharedlib_from_linklib_cmd,
3612[lt_cv_sharedlib_from_linklib_cmd='unknown'
3613
3614case $host_os in
3615cygwin* | mingw* | pw32* | cegcc*)
3616  # two different shell functions defined in ltmain.sh
3617  # decide which to use based on capabilities of $DLLTOOL
3618  case `$DLLTOOL --help 2>&1` in
3619  *--identify-strict*)
3620    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3621    ;;
3622  *)
3623    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3624    ;;
3625  esac
3626  ;;
3627*)
3628  # fallback: assume linklib IS sharedlib
3629  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3630  ;;
3631esac
3632])
3633sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3634test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3635
3636_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3637    [Command to associate shared and link libraries])
3638])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3639
3640
3641# _LT_PATH_MANIFEST_TOOL
3642# ----------------------
3643# locate the manifest tool
3644m4_defun([_LT_PATH_MANIFEST_TOOL],
3645[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3646test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3647AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3648  [lt_cv_path_mainfest_tool=no
3649  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3650  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3651  cat conftest.err >&AS_MESSAGE_LOG_FD
3652  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3653    lt_cv_path_mainfest_tool=yes
3654  fi
3655  rm -f conftest*])
3656if test "x$lt_cv_path_mainfest_tool" != xyes; then
3657  MANIFEST_TOOL=:
3658fi
3659_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3660])# _LT_PATH_MANIFEST_TOOL
3661
3662
3663# LT_LIB_M
3664# --------
3665# check for math library
3666AC_DEFUN([LT_LIB_M],
3667[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3668LIBM=
3669case $host in
3670*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3671  # These system don't have libm, or don't need it
3672  ;;
3673*-ncr-sysv4.3*)
3674  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3675  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3676  ;;
3677*)
3678  AC_CHECK_LIB(m, cos, LIBM="-lm")
3679  ;;
3680esac
3681AC_SUBST([LIBM])
3682])# LT_LIB_M
3683
3684# Old name:
3685AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3686dnl aclocal-1.4 backwards compatibility:
3687dnl AC_DEFUN([AC_CHECK_LIBM], [])
3688
3689
3690# _LT_COMPILER_NO_RTTI([TAGNAME])
3691# -------------------------------
3692m4_defun([_LT_COMPILER_NO_RTTI],
3693[m4_require([_LT_TAG_COMPILER])dnl
3694
3695_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3696
3697if test "$GCC" = yes; then
3698  case $cc_basename in
3699  nvcc*)
3700    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3701  *)
3702    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3703  esac
3704
3705  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3706    lt_cv_prog_compiler_rtti_exceptions,
3707    [-fno-rtti -fno-exceptions], [],
3708    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3709fi
3710_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3711	[Compiler flag to turn off builtin functions])
3712])# _LT_COMPILER_NO_RTTI
3713
3714
3715# _LT_CMD_GLOBAL_SYMBOLS
3716# ----------------------
3717m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3718[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3719AC_REQUIRE([AC_PROG_CC])dnl
3720AC_REQUIRE([AC_PROG_AWK])dnl
3721AC_REQUIRE([LT_PATH_NM])dnl
3722AC_REQUIRE([LT_PATH_LD])dnl
3723m4_require([_LT_DECL_SED])dnl
3724m4_require([_LT_DECL_EGREP])dnl
3725m4_require([_LT_TAG_COMPILER])dnl
3726
3727# Check for command to grab the raw symbol name followed by C symbol from nm.
3728AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3729AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3730[
3731# These are sane defaults that work on at least a few old systems.
3732# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3733
3734# Character class describing NM global symbol codes.
3735symcode='[[BCDEGRST]]'
3736
3737# Regexp to match symbols that can be accessed directly from C.
3738sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3739
3740# Define system-specific variables.
3741case $host_os in
3742aix*)
3743  symcode='[[BCDT]]'
3744  ;;
3745cygwin* | mingw* | pw32* | cegcc*)
3746  symcode='[[ABCDGISTW]]'
3747  ;;
3748hpux*)
3749  if test "$host_cpu" = ia64; then
3750    symcode='[[ABCDEGRST]]'
3751  fi
3752  ;;
3753irix* | nonstopux*)
3754  symcode='[[BCDEGRST]]'
3755  ;;
3756osf*)
3757  symcode='[[BCDEGQRST]]'
3758  ;;
3759solaris*)
3760  symcode='[[BDRT]]'
3761  ;;
3762sco3.2v5*)
3763  symcode='[[DT]]'
3764  ;;
3765sysv4.2uw2*)
3766  symcode='[[DT]]'
3767  ;;
3768sysv5* | sco5v6* | unixware* | OpenUNIX*)
3769  symcode='[[ABDT]]'
3770  ;;
3771sysv4)
3772  symcode='[[DFNSTU]]'
3773  ;;
3774esac
3775
3776# If we're using GNU nm, then use its standard symbol codes.
3777case `$NM -V 2>&1` in
3778*GNU* | *'with BFD'*)
3779  symcode='[[ABCDGIRSTW]]' ;;
3780esac
3781
3782# Transform an extracted symbol line into a proper C declaration.
3783# Some systems (esp. on ia64) link data and code symbols differently,
3784# so use this general approach.
3785lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3786
3787# Transform an extracted symbol line into symbol name and symbol address
3788lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
3789lt_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'"
3790
3791# Handle CRLF in mingw tool chain
3792opt_cr=
3793case $build_os in
3794mingw*)
3795  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3796  ;;
3797esac
3798
3799# Try without a prefix underscore, then with it.
3800for ac_symprfx in "" "_"; do
3801
3802  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3803  symxfrm="\\1 $ac_symprfx\\2 \\2"
3804
3805  # Write the raw and C identifiers.
3806  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3807    # Fake it for dumpbin and say T for any non-static function
3808    # and D for any global variable.
3809    # Also find C++ and __fastcall symbols from MSVC++,
3810    # which start with @ or ?.
3811    lt_cv_sys_global_symbol_pipe="$AWK ['"\
3812"     {last_section=section; section=\$ 3};"\
3813"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
3814"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3815"     \$ 0!~/External *\|/{next};"\
3816"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3817"     {if(hide[section]) next};"\
3818"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3819"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3820"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
3821"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3822"     ' prfx=^$ac_symprfx]"
3823  else
3824    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3825  fi
3826  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
3827
3828  # Check to see that the pipe works correctly.
3829  pipe_works=no
3830
3831  rm -f conftest*
3832  cat > conftest.$ac_ext <<_LT_EOF
3833#ifdef __cplusplus
3834extern "C" {
3835#endif
3836char nm_test_var;
3837void nm_test_func(void);
3838void nm_test_func(void){}
3839#ifdef __cplusplus
3840}
3841#endif
3842int main(){nm_test_var='a';nm_test_func();return(0);}
3843_LT_EOF
3844
3845  if AC_TRY_EVAL(ac_compile); then
3846    # Now try to grab the symbols.
3847    nlist=conftest.nm
3848    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
3849      # Try sorting and uniquifying the output.
3850      if sort "$nlist" | uniq > "$nlist"T; then
3851	mv -f "$nlist"T "$nlist"
3852      else
3853	rm -f "$nlist"T
3854      fi
3855
3856      # Make sure that we snagged all the symbols we need.
3857      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3858	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3859	  cat <<_LT_EOF > conftest.$ac_ext
3860/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
3861#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3862/* DATA imports from DLLs on WIN32 con't be const, because runtime
3863   relocations are performed -- see ld's documentation on pseudo-relocs.  */
3864# define LT@&t@_DLSYM_CONST
3865#elif defined(__osf__)
3866/* This system does not cope well with relocations in const data.  */
3867# define LT@&t@_DLSYM_CONST
3868#else
3869# define LT@&t@_DLSYM_CONST const
3870#endif
3871
3872#ifdef __cplusplus
3873extern "C" {
3874#endif
3875
3876_LT_EOF
3877	  # Now generate the symbol file.
3878	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3879
3880	  cat <<_LT_EOF >> conftest.$ac_ext
3881
3882/* The mapping between symbol names and symbols.  */
3883LT@&t@_DLSYM_CONST struct {
3884  const char *name;
3885  void       *address;
3886}
3887lt__PROGRAM__LTX_preloaded_symbols[[]] =
3888{
3889  { "@PROGRAM@", (void *) 0 },
3890_LT_EOF
3891	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3892	  cat <<\_LT_EOF >> conftest.$ac_ext
3893  {0, (void *) 0}
3894};
3895
3896/* This works around a problem in FreeBSD linker */
3897#ifdef FREEBSD_WORKAROUND
3898static const void *lt_preloaded_setup() {
3899  return lt__PROGRAM__LTX_preloaded_symbols;
3900}
3901#endif
3902
3903#ifdef __cplusplus
3904}
3905#endif
3906_LT_EOF
3907	  # Now try linking the two files.
3908	  mv conftest.$ac_objext conftstm.$ac_objext
3909	  lt_globsym_save_LIBS=$LIBS
3910	  lt_globsym_save_CFLAGS=$CFLAGS
3911	  LIBS="conftstm.$ac_objext"
3912	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3913	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3914	    pipe_works=yes
3915	  fi
3916	  LIBS=$lt_globsym_save_LIBS
3917	  CFLAGS=$lt_globsym_save_CFLAGS
3918	else
3919	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3920	fi
3921      else
3922	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3923      fi
3924    else
3925      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3926    fi
3927  else
3928    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3929    cat conftest.$ac_ext >&5
3930  fi
3931  rm -rf conftest* conftst*
3932
3933  # Do not use the global_symbol_pipe unless it works.
3934  if test "$pipe_works" = yes; then
3935    break
3936  else
3937    lt_cv_sys_global_symbol_pipe=
3938  fi
3939done
3940])
3941if test -z "$lt_cv_sys_global_symbol_pipe"; then
3942  lt_cv_sys_global_symbol_to_cdecl=
3943fi
3944if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3945  AC_MSG_RESULT(failed)
3946else
3947  AC_MSG_RESULT(ok)
3948fi
3949
3950# Response file support.
3951if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3952  nm_file_list_spec='@'
3953elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
3954  nm_file_list_spec='@'
3955fi
3956
3957_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3958    [Take the output of nm and produce a listing of raw symbols and C names])
3959_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3960    [Transform the output of nm in a proper C declaration])
3961_LT_DECL([global_symbol_to_c_name_address],
3962    [lt_cv_sys_global_symbol_to_c_name_address], [1],
3963    [Transform the output of nm in a C name address pair])
3964_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3965    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3966    [Transform the output of nm in a C name address pair when lib prefix is needed])
3967_LT_DECL([], [nm_file_list_spec], [1],
3968    [Specify filename containing input files for $NM])
3969]) # _LT_CMD_GLOBAL_SYMBOLS
3970
3971
3972# _LT_COMPILER_PIC([TAGNAME])
3973# ---------------------------
3974m4_defun([_LT_COMPILER_PIC],
3975[m4_require([_LT_TAG_COMPILER])dnl
3976_LT_TAGVAR(lt_prog_compiler_wl, $1)=
3977_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3978_LT_TAGVAR(lt_prog_compiler_static, $1)=
3979
3980m4_if([$1], [CXX], [
3981  # C++ specific cases for pic, static, wl, etc.
3982  if test "$GXX" = yes; then
3983    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3984    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3985
3986    case $host_os in
3987    aix*)
3988      # All AIX code is PIC.
3989      if test "$host_cpu" = ia64; then
3990	# AIX 5 now supports IA64 processor
3991	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3992      fi
3993      ;;
3994
3995    amigaos*)
3996      case $host_cpu in
3997      powerpc)
3998            # see comment about AmigaOS4 .so support
3999            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4000        ;;
4001      m68k)
4002            # FIXME: we need at least 68020 code to build shared libraries, but
4003            # adding the `-m68020' flag to GCC prevents building anything better,
4004            # like `-m68040'.
4005            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4006        ;;
4007      esac
4008      ;;
4009
4010    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4011      # PIC is the default for these OSes.
4012      ;;
4013    mingw* | cygwin* | os2* | pw32* | cegcc*)
4014      # This hack is so that the source file can tell whether it is being
4015      # built for inclusion in a dll (and should export symbols for example).
4016      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4017      # (--disable-auto-import) libraries
4018      m4_if([$1], [GCJ], [],
4019	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4020      ;;
4021    darwin* | rhapsody*)
4022      # PIC is the default on this platform
4023      # Common symbols not allowed in MH_DYLIB files
4024      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4025      ;;
4026    *djgpp*)
4027      # DJGPP does not support shared libraries at all
4028      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4029      ;;
4030    haiku*)
4031      # PIC is the default for Haiku.
4032      # The "-static" flag exists, but is broken.
4033      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4034      ;;
4035    interix[[3-9]]*)
4036      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4037      # Instead, we relocate shared libraries at runtime.
4038      ;;
4039    sysv4*MP*)
4040      if test -d /usr/nec; then
4041	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4042      fi
4043      ;;
4044    hpux*)
4045      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4046      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4047      # sets the default TLS model and affects inlining.
4048      case $host_cpu in
4049      hppa*64*)
4050	;;
4051      *)
4052	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4053	;;
4054      esac
4055      ;;
4056    *qnx* | *nto*)
4057      # QNX uses GNU C++, but need to define -shared option too, otherwise
4058      # it will coredump.
4059      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4060      ;;
4061    *)
4062      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4063      ;;
4064    esac
4065  else
4066    case $host_os in
4067      aix[[4-9]]*)
4068	# All AIX code is PIC.
4069	if test "$host_cpu" = ia64; then
4070	  # AIX 5 now supports IA64 processor
4071	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4072	else
4073	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4074	fi
4075	;;
4076      chorus*)
4077	case $cc_basename in
4078	cxch68*)
4079	  # Green Hills C++ Compiler
4080	  # _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"
4081	  ;;
4082	esac
4083	;;
4084      mingw* | cygwin* | os2* | pw32* | cegcc*)
4085	# This hack is so that the source file can tell whether it is being
4086	# built for inclusion in a dll (and should export symbols for example).
4087	m4_if([$1], [GCJ], [],
4088	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4089	;;
4090      dgux*)
4091	case $cc_basename in
4092	  ec++*)
4093	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4094	    ;;
4095	  ghcx*)
4096	    # Green Hills C++ Compiler
4097	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4098	    ;;
4099	  *)
4100	    ;;
4101	esac
4102	;;
4103      freebsd* | dragonfly*)
4104	# FreeBSD uses GNU C++
4105	;;
4106      hpux9* | hpux10* | hpux11*)
4107	case $cc_basename in
4108	  CC*)
4109	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4110	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4111	    if test "$host_cpu" != ia64; then
4112	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4113	    fi
4114	    ;;
4115	  aCC*)
4116	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4117	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4118	    case $host_cpu in
4119	    hppa*64*|ia64*)
4120	      # +Z the default
4121	      ;;
4122	    *)
4123	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4124	      ;;
4125	    esac
4126	    ;;
4127	  *)
4128	    ;;
4129	esac
4130	;;
4131      interix*)
4132	# This is c89, which is MS Visual C++ (no shared libs)
4133	# Anyone wants to do a port?
4134	;;
4135      irix5* | irix6* | nonstopux*)
4136	case $cc_basename in
4137	  CC*)
4138	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4139	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4140	    # CC pic flag -KPIC is the default.
4141	    ;;
4142	  *)
4143	    ;;
4144	esac
4145	;;
4146      linux* | k*bsd*-gnu | kopensolaris*-gnu)
4147	case $cc_basename in
4148	  KCC*)
4149	    # KAI C++ Compiler
4150	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4151	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4152	    ;;
4153	  ecpc* )
4154	    # old Intel C++ for x86_64 which still supported -KPIC.
4155	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4156	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4157	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4158	    ;;
4159	  icpc* )
4160	    # Intel C++, used to be incompatible with GCC.
4161	    # ICC 10 doesn't accept -KPIC any more.
4162	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4163	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4164	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4165	    ;;
4166	  pgCC* | pgcpp*)
4167	    # Portland Group C++ compiler
4168	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4169	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4170	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4171	    ;;
4172	  cxx*)
4173	    # Compaq C++
4174	    # Make sure the PIC flag is empty.  It appears that all Alpha
4175	    # Linux and Compaq Tru64 Unix objects are PIC.
4176	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4177	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4178	    ;;
4179	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4180	    # IBM XL 8.0, 9.0 on PPC and BlueGene
4181	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4182	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4183	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4184	    ;;
4185	  *)
4186	    case `$CC -V 2>&1 | sed 5q` in
4187	    *Sun\ C*)
4188	      # Sun C++ 5.9
4189	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4190	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4191	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4192	      ;;
4193	    esac
4194	    ;;
4195	esac
4196	;;
4197      lynxos*)
4198	;;
4199      m88k*)
4200	;;
4201      mvs*)
4202	case $cc_basename in
4203	  cxx*)
4204	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4205	    ;;
4206	  *)
4207	    ;;
4208	esac
4209	;;
4210      netbsd* | netbsdelf*-gnu)
4211	;;
4212      *qnx* | *nto*)
4213        # QNX uses GNU C++, but need to define -shared option too, otherwise
4214        # it will coredump.
4215        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4216        ;;
4217      osf3* | osf4* | osf5*)
4218	case $cc_basename in
4219	  KCC*)
4220	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4221	    ;;
4222	  RCC*)
4223	    # Rational C++ 2.4.1
4224	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4225	    ;;
4226	  cxx*)
4227	    # Digital/Compaq C++
4228	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4229	    # Make sure the PIC flag is empty.  It appears that all Alpha
4230	    # Linux and Compaq Tru64 Unix objects are PIC.
4231	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4232	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4233	    ;;
4234	  *)
4235	    ;;
4236	esac
4237	;;
4238      psos*)
4239	;;
4240      solaris*)
4241	case $cc_basename in
4242	  CC* | sunCC*)
4243	    # Sun C++ 4.2, 5.x and Centerline C++
4244	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4245	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4246	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4247	    ;;
4248	  gcx*)
4249	    # Green Hills C++ Compiler
4250	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4251	    ;;
4252	  *)
4253	    ;;
4254	esac
4255	;;
4256      sunos4*)
4257	case $cc_basename in
4258	  CC*)
4259	    # Sun C++ 4.x
4260	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4261	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4262	    ;;
4263	  lcc*)
4264	    # Lucid
4265	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4266	    ;;
4267	  *)
4268	    ;;
4269	esac
4270	;;
4271      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4272	case $cc_basename in
4273	  CC*)
4274	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4275	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4276	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4277	    ;;
4278	esac
4279	;;
4280      tandem*)
4281	case $cc_basename in
4282	  NCC*)
4283	    # NonStop-UX NCC 3.20
4284	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4285	    ;;
4286	  *)
4287	    ;;
4288	esac
4289	;;
4290      vxworks*)
4291	;;
4292      *)
4293	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4294	;;
4295    esac
4296  fi
4297],
4298[
4299  if test "$GCC" = yes; then
4300    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4301    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4302
4303    case $host_os in
4304      aix*)
4305      # All AIX code is PIC.
4306      if test "$host_cpu" = ia64; then
4307	# AIX 5 now supports IA64 processor
4308	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4309      fi
4310      ;;
4311
4312    amigaos*)
4313      case $host_cpu in
4314      powerpc)
4315            # see comment about AmigaOS4 .so support
4316            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4317        ;;
4318      m68k)
4319            # FIXME: we need at least 68020 code to build shared libraries, but
4320            # adding the `-m68020' flag to GCC prevents building anything better,
4321            # like `-m68040'.
4322            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4323        ;;
4324      esac
4325      ;;
4326
4327    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4328      # PIC is the default for these OSes.
4329      ;;
4330
4331    mingw* | cygwin* | pw32* | os2* | cegcc*)
4332      # This hack is so that the source file can tell whether it is being
4333      # built for inclusion in a dll (and should export symbols for example).
4334      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4335      # (--disable-auto-import) libraries
4336      m4_if([$1], [GCJ], [],
4337	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4338      ;;
4339
4340    darwin* | rhapsody*)
4341      # PIC is the default on this platform
4342      # Common symbols not allowed in MH_DYLIB files
4343      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4344      ;;
4345
4346    haiku*)
4347      # PIC is the default for Haiku.
4348      # The "-static" flag exists, but is broken.
4349      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4350      ;;
4351
4352    hpux*)
4353      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4354      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4355      # sets the default TLS model and affects inlining.
4356      case $host_cpu in
4357      hppa*64*)
4358	# +Z the default
4359	;;
4360      *)
4361	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4362	;;
4363      esac
4364      ;;
4365
4366    interix[[3-9]]*)
4367      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4368      # Instead, we relocate shared libraries at runtime.
4369      ;;
4370
4371    msdosdjgpp*)
4372      # Just because we use GCC doesn't mean we suddenly get shared libraries
4373      # on systems that don't support them.
4374      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4375      enable_shared=no
4376      ;;
4377
4378    *nto* | *qnx*)
4379      # QNX uses GNU C++, but need to define -shared option too, otherwise
4380      # it will coredump.
4381      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4382      ;;
4383
4384    sysv4*MP*)
4385      if test -d /usr/nec; then
4386	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4387      fi
4388      ;;
4389
4390    *)
4391      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4392      ;;
4393    esac
4394
4395    case $cc_basename in
4396    nvcc*) # Cuda Compiler Driver 2.2
4397      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4398      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4399        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4400      fi
4401      ;;
4402    esac
4403  else
4404    # PORTME Check for flag to pass linker flags through the system compiler.
4405    case $host_os in
4406    aix*)
4407      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4408      if test "$host_cpu" = ia64; then
4409	# AIX 5 now supports IA64 processor
4410	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4411      else
4412	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4413      fi
4414      ;;
4415
4416    mingw* | cygwin* | pw32* | os2* | cegcc*)
4417      # This hack is so that the source file can tell whether it is being
4418      # built for inclusion in a dll (and should export symbols for example).
4419      m4_if([$1], [GCJ], [],
4420	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4421      ;;
4422
4423    hpux9* | hpux10* | hpux11*)
4424      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4425      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4426      # not for PA HP-UX.
4427      case $host_cpu in
4428      hppa*64*|ia64*)
4429	# +Z the default
4430	;;
4431      *)
4432	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4433	;;
4434      esac
4435      # Is there a better lt_prog_compiler_static that works with the bundled CC?
4436      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4437      ;;
4438
4439    irix5* | irix6* | nonstopux*)
4440      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4441      # PIC (with -KPIC) is the default.
4442      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4443      ;;
4444
4445    linux* | k*bsd*-gnu | kopensolaris*-gnu)
4446      case $cc_basename in
4447      # old Intel for x86_64 which still supported -KPIC.
4448      ecc*)
4449	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4450	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4451	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4452        ;;
4453      # icc used to be incompatible with GCC.
4454      # ICC 10 doesn't accept -KPIC any more.
4455      icc* | ifort*)
4456	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4457	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4458	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4459        ;;
4460      # Lahey Fortran 8.1.
4461      lf95*)
4462	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4463	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4464	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4465	;;
4466      nagfor*)
4467	# NAG Fortran compiler
4468	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4469	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4470	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4471	;;
4472      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4473        # Portland Group compilers (*not* the Pentium gcc compiler,
4474	# which looks to be a dead project)
4475	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4476	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4477	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4478        ;;
4479      ccc*)
4480        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4481        # All Alpha code is PIC.
4482        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4483        ;;
4484      xl* | bgxl* | bgf* | mpixl*)
4485	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4486	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4487	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4488	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4489	;;
4490      *)
4491	case `$CC -V 2>&1 | sed 5q` in
4492	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4493	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
4494	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4495	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4496	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4497	  ;;
4498	*Sun\ F* | *Sun*Fortran*)
4499	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4500	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4501	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4502	  ;;
4503	*Sun\ C*)
4504	  # Sun C 5.9
4505	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4506	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4507	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4508	  ;;
4509        *Intel*\ [[CF]]*Compiler*)
4510	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4511	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4512	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4513	  ;;
4514	*Portland\ Group*)
4515	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4516	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4517	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4518	  ;;
4519	esac
4520	;;
4521      esac
4522      ;;
4523
4524    newsos6)
4525      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4526      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4527      ;;
4528
4529    *nto* | *qnx*)
4530      # QNX uses GNU C++, but need to define -shared option too, otherwise
4531      # it will coredump.
4532      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4533      ;;
4534
4535    osf3* | osf4* | osf5*)
4536      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4537      # All OSF/1 code is PIC.
4538      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4539      ;;
4540
4541    rdos*)
4542      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4543      ;;
4544
4545    solaris*)
4546      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4547      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4548      case $cc_basename in
4549      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4550	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4551      *)
4552	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4553      esac
4554      ;;
4555
4556    sunos4*)
4557      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4558      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4559      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4560      ;;
4561
4562    sysv4 | sysv4.2uw2* | sysv4.3*)
4563      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4564      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4565      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4566      ;;
4567
4568    sysv4*MP*)
4569      if test -d /usr/nec ;then
4570	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4571	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4572      fi
4573      ;;
4574
4575    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4576      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4577      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4578      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4579      ;;
4580
4581    unicos*)
4582      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4583      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4584      ;;
4585
4586    uts4*)
4587      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4588      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4589      ;;
4590
4591    *)
4592      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4593      ;;
4594    esac
4595  fi
4596])
4597case $host_os in
4598  # For platforms which do not support PIC, -DPIC is meaningless:
4599  *djgpp*)
4600    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4601    ;;
4602  *)
4603    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4604    ;;
4605esac
4606
4607AC_CACHE_CHECK([for $compiler option to produce PIC],
4608  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4609  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4610_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4611
4612#
4613# Check to make sure the PIC flag actually works.
4614#
4615if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4616  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4617    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4618    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4619    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4620     "" | " "*) ;;
4621     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4622     esac],
4623    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4624     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4625fi
4626_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4627	[Additional compiler flags for building library objects])
4628
4629_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4630	[How to pass a linker flag through the compiler])
4631#
4632# Check to make sure the static flag actually works.
4633#
4634wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4635_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4636  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4637  $lt_tmp_static_flag,
4638  [],
4639  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4640_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4641	[Compiler flag to prevent dynamic linking])
4642])# _LT_COMPILER_PIC
4643
4644
4645# _LT_LINKER_SHLIBS([TAGNAME])
4646# ----------------------------
4647# See if the linker supports building shared libraries.
4648m4_defun([_LT_LINKER_SHLIBS],
4649[AC_REQUIRE([LT_PATH_LD])dnl
4650AC_REQUIRE([LT_PATH_NM])dnl
4651m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4652m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4653m4_require([_LT_DECL_EGREP])dnl
4654m4_require([_LT_DECL_SED])dnl
4655m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4656m4_require([_LT_TAG_COMPILER])dnl
4657AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4658m4_if([$1], [CXX], [
4659  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4660  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4661  case $host_os in
4662  aix[[4-9]]*)
4663    # If we're using GNU nm, then we don't want the "-C" option.
4664    # -C means demangle to AIX nm, but means don't demangle with GNU nm
4665    # Also, AIX nm treats weak defined symbols like other global defined
4666    # symbols, whereas GNU nm marks them as "W".
4667    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4668      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4669    else
4670      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4671    fi
4672    ;;
4673  pw32*)
4674    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4675    ;;
4676  cygwin* | mingw* | cegcc*)
4677    case $cc_basename in
4678    cl*)
4679      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4680      ;;
4681    *)
4682      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4683      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4684      ;;
4685    esac
4686    ;;
4687  linux* | k*bsd*-gnu | gnu*)
4688    _LT_TAGVAR(link_all_deplibs, $1)=no
4689    ;;
4690  *)
4691    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4692    ;;
4693  esac
4694], [
4695  runpath_var=
4696  _LT_TAGVAR(allow_undefined_flag, $1)=
4697  _LT_TAGVAR(always_export_symbols, $1)=no
4698  _LT_TAGVAR(archive_cmds, $1)=
4699  _LT_TAGVAR(archive_expsym_cmds, $1)=
4700  _LT_TAGVAR(compiler_needs_object, $1)=no
4701  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4702  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4703  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4704  _LT_TAGVAR(hardcode_automatic, $1)=no
4705  _LT_TAGVAR(hardcode_direct, $1)=no
4706  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4707  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4708  _LT_TAGVAR(hardcode_libdir_separator, $1)=
4709  _LT_TAGVAR(hardcode_minus_L, $1)=no
4710  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4711  _LT_TAGVAR(inherit_rpath, $1)=no
4712  _LT_TAGVAR(link_all_deplibs, $1)=unknown
4713  _LT_TAGVAR(module_cmds, $1)=
4714  _LT_TAGVAR(module_expsym_cmds, $1)=
4715  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4716  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4717  _LT_TAGVAR(thread_safe_flag_spec, $1)=
4718  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4719  # include_expsyms should be a list of space-separated symbols to be *always*
4720  # included in the symbol list
4721  _LT_TAGVAR(include_expsyms, $1)=
4722  # exclude_expsyms can be an extended regexp of symbols to exclude
4723  # it will be wrapped by ` (' and `)$', so one must not match beginning or
4724  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4725  # as well as any symbol that contains `d'.
4726  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4727  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4728  # platforms (ab)use it in PIC code, but their linkers get confused if
4729  # the symbol is explicitly referenced.  Since portable code cannot
4730  # rely on this symbol name, it's probably fine to never include it in
4731  # preloaded symbol tables.
4732  # Exclude shared library initialization/finalization symbols.
4733dnl Note also adjust exclude_expsyms for C++ above.
4734  extract_expsyms_cmds=
4735
4736  case $host_os in
4737  cygwin* | mingw* | pw32* | cegcc*)
4738    # FIXME: the MSVC++ port hasn't been tested in a loooong time
4739    # When not using gcc, we currently assume that we are using
4740    # Microsoft Visual C++.
4741    if test "$GCC" != yes; then
4742      with_gnu_ld=no
4743    fi
4744    ;;
4745  interix*)
4746    # we just hope/assume this is gcc and not c89 (= MSVC++)
4747    with_gnu_ld=yes
4748    ;;
4749  openbsd*)
4750    with_gnu_ld=no
4751    ;;
4752  linux* | k*bsd*-gnu | gnu*)
4753    _LT_TAGVAR(link_all_deplibs, $1)=no
4754    ;;
4755  esac
4756
4757  _LT_TAGVAR(ld_shlibs, $1)=yes
4758
4759  # On some targets, GNU ld is compatible enough with the native linker
4760  # that we're better off using the native interface for both.
4761  lt_use_gnu_ld_interface=no
4762  if test "$with_gnu_ld" = yes; then
4763    case $host_os in
4764      aix*)
4765	# The AIX port of GNU ld has always aspired to compatibility
4766	# with the native linker.  However, as the warning in the GNU ld
4767	# block says, versions before 2.19.5* couldn't really create working
4768	# shared libraries, regardless of the interface used.
4769	case `$LD -v 2>&1` in
4770	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
4771	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
4772	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
4773	  *)
4774	    lt_use_gnu_ld_interface=yes
4775	    ;;
4776	esac
4777	;;
4778      *)
4779	lt_use_gnu_ld_interface=yes
4780	;;
4781    esac
4782  fi
4783
4784  if test "$lt_use_gnu_ld_interface" = yes; then
4785    # If archive_cmds runs LD, not CC, wlarc should be empty
4786    wlarc='${wl}'
4787
4788    # Set some defaults for GNU ld with shared library support. These
4789    # are reset later if shared libraries are not supported. Putting them
4790    # here allows them to be overridden if necessary.
4791    runpath_var=LD_RUN_PATH
4792    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4793    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4794    # ancient GNU ld didn't support --whole-archive et. al.
4795    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4796      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4797    else
4798      _LT_TAGVAR(whole_archive_flag_spec, $1)=
4799    fi
4800    supports_anon_versioning=no
4801    case `$LD -v 2>&1` in
4802      *GNU\ gold*) supports_anon_versioning=yes ;;
4803      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4804      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4805      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4806      *\ 2.11.*) ;; # other 2.11 versions
4807      *) supports_anon_versioning=yes ;;
4808    esac
4809
4810    # See if GNU ld supports shared libraries.
4811    case $host_os in
4812    aix[[3-9]]*)
4813      # On AIX/PPC, the GNU linker is very broken
4814      if test "$host_cpu" != ia64; then
4815	_LT_TAGVAR(ld_shlibs, $1)=no
4816	cat <<_LT_EOF 1>&2
4817
4818*** Warning: the GNU linker, at least up to release 2.19, is reported
4819*** to be unable to reliably create shared libraries on AIX.
4820*** Therefore, libtool is disabling shared libraries support.  If you
4821*** really care for shared libraries, you may want to install binutils
4822*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
4823*** You will then need to restart the configuration process.
4824
4825_LT_EOF
4826      fi
4827      ;;
4828
4829    amigaos*)
4830      case $host_cpu in
4831      powerpc)
4832            # see comment about AmigaOS4 .so support
4833            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4834            _LT_TAGVAR(archive_expsym_cmds, $1)=''
4835        ;;
4836      m68k)
4837            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
4838            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4839            _LT_TAGVAR(hardcode_minus_L, $1)=yes
4840        ;;
4841      esac
4842      ;;
4843
4844    beos*)
4845      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4846	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4847	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4848	# support --undefined.  This deserves some investigation.  FIXME
4849	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4850      else
4851	_LT_TAGVAR(ld_shlibs, $1)=no
4852      fi
4853      ;;
4854
4855    cygwin* | mingw* | pw32* | cegcc*)
4856      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4857      # as there is no search path for DLLs.
4858      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4859      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
4860      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4861      _LT_TAGVAR(always_export_symbols, $1)=no
4862      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4863      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
4864      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4865
4866      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4867        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4868	# If the export-symbols file already is a .def file (1st line
4869	# is EXPORTS), use it as is; otherwise, prepend...
4870	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4871	  cp $export_symbols $output_objdir/$soname.def;
4872	else
4873	  echo EXPORTS > $output_objdir/$soname.def;
4874	  cat $export_symbols >> $output_objdir/$soname.def;
4875	fi~
4876	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4877      else
4878	_LT_TAGVAR(ld_shlibs, $1)=no
4879      fi
4880      ;;
4881
4882    haiku*)
4883      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4884      _LT_TAGVAR(link_all_deplibs, $1)=yes
4885      ;;
4886
4887    interix[[3-9]]*)
4888      _LT_TAGVAR(hardcode_direct, $1)=no
4889      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4890      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4891      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4892      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4893      # Instead, shared libraries are loaded at an image base (0x10000000 by
4894      # default) and relocated if they conflict, which is a slow very memory
4895      # consuming and fragmenting process.  To avoid this, we pick a random,
4896      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4897      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4898      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4899      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4900      ;;
4901
4902    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
4903      tmp_diet=no
4904      if test "$host_os" = linux-dietlibc; then
4905	case $cc_basename in
4906	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
4907	esac
4908      fi
4909      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4910	 && test "$tmp_diet" = no
4911      then
4912	tmp_addflag=' $pic_flag'
4913	tmp_sharedflag='-shared'
4914	case $cc_basename,$host_cpu in
4915        pgcc*)				# Portland Group C compiler
4916	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4917	  tmp_addflag=' $pic_flag'
4918	  ;;
4919	pgf77* | pgf90* | pgf95* | pgfortran*)
4920					# Portland Group f77 and f90 compilers
4921	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4922	  tmp_addflag=' $pic_flag -Mnomain' ;;
4923	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
4924	  tmp_addflag=' -i_dynamic' ;;
4925	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
4926	  tmp_addflag=' -i_dynamic -nofor_main' ;;
4927	ifc* | ifort*)			# Intel Fortran compiler
4928	  tmp_addflag=' -nofor_main' ;;
4929	lf95*)				# Lahey Fortran 8.1
4930	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
4931	  tmp_sharedflag='--shared' ;;
4932	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4933	  tmp_sharedflag='-qmkshrobj'
4934	  tmp_addflag= ;;
4935	nvcc*)	# Cuda Compiler Driver 2.2
4936	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4937	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4938	  ;;
4939	esac
4940	case `$CC -V 2>&1 | sed 5q` in
4941	*Sun\ C*)			# Sun C 5.9
4942	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
4943	  _LT_TAGVAR(compiler_needs_object, $1)=yes
4944	  tmp_sharedflag='-G' ;;
4945	*Sun\ F*)			# Sun Fortran 8.3
4946	  tmp_sharedflag='-G' ;;
4947	esac
4948	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4949
4950        if test "x$supports_anon_versioning" = xyes; then
4951          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4952	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4953	    echo "local: *; };" >> $output_objdir/$libname.ver~
4954	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4955        fi
4956
4957	case $cc_basename in
4958	xlf* | bgf* | bgxlf* | mpixlf*)
4959	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4960	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4961	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4962	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4963	  if test "x$supports_anon_versioning" = xyes; then
4964	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4965	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4966	      echo "local: *; };" >> $output_objdir/$libname.ver~
4967	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4968	  fi
4969	  ;;
4970	esac
4971      else
4972        _LT_TAGVAR(ld_shlibs, $1)=no
4973      fi
4974      ;;
4975
4976    netbsd* | netbsdelf*-gnu)
4977      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4978	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4979	wlarc=
4980      else
4981	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4982	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4983      fi
4984      ;;
4985
4986    solaris*)
4987      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4988	_LT_TAGVAR(ld_shlibs, $1)=no
4989	cat <<_LT_EOF 1>&2
4990
4991*** Warning: The releases 2.8.* of the GNU linker cannot reliably
4992*** create shared libraries on Solaris systems.  Therefore, libtool
4993*** is disabling shared libraries support.  We urge you to upgrade GNU
4994*** binutils to release 2.9.1 or newer.  Another option is to modify
4995*** your PATH or compiler configuration so that the native linker is
4996*** used, and then restart.
4997
4998_LT_EOF
4999      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5000	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5001	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5002      else
5003	_LT_TAGVAR(ld_shlibs, $1)=no
5004      fi
5005      ;;
5006
5007    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5008      case `$LD -v 2>&1` in
5009        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5010	_LT_TAGVAR(ld_shlibs, $1)=no
5011	cat <<_LT_EOF 1>&2
5012
5013*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5014*** reliably create shared libraries on SCO systems.  Therefore, libtool
5015*** is disabling shared libraries support.  We urge you to upgrade GNU
5016*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5017*** your PATH or compiler configuration so that the native linker is
5018*** used, and then restart.
5019
5020_LT_EOF
5021	;;
5022	*)
5023	  # For security reasons, it is highly recommended that you always
5024	  # use absolute paths for naming shared libraries, and exclude the
5025	  # DT_RUNPATH tag from executables and libraries.  But doing so
5026	  # requires that you compile everything twice, which is a pain.
5027	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5028	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5029	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5030	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5031	  else
5032	    _LT_TAGVAR(ld_shlibs, $1)=no
5033	  fi
5034	;;
5035      esac
5036      ;;
5037
5038    sunos4*)
5039      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5040      wlarc=
5041      _LT_TAGVAR(hardcode_direct, $1)=yes
5042      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5043      ;;
5044
5045    *)
5046      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5047	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5048	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5049      else
5050	_LT_TAGVAR(ld_shlibs, $1)=no
5051      fi
5052      ;;
5053    esac
5054
5055    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5056      runpath_var=
5057      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5058      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5059      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5060    fi
5061  else
5062    # PORTME fill in a description of your system's linker (not GNU ld)
5063    case $host_os in
5064    aix3*)
5065      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5066      _LT_TAGVAR(always_export_symbols, $1)=yes
5067      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5068      # Note: this linker hardcodes the directories in LIBPATH if there
5069      # are no directories specified by -L.
5070      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5071      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5072	# Neither direct hardcoding nor static linking is supported with a
5073	# broken collect2.
5074	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5075      fi
5076      ;;
5077
5078    aix[[4-9]]*)
5079      if test "$host_cpu" = ia64; then
5080	# On IA64, the linker does run time linking by default, so we don't
5081	# have to do anything special.
5082	aix_use_runtimelinking=no
5083	exp_sym_flag='-Bexport'
5084	no_entry_flag=""
5085      else
5086	# If we're using GNU nm, then we don't want the "-C" option.
5087	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5088	# Also, AIX nm treats weak defined symbols like other global
5089	# defined symbols, whereas GNU nm marks them as "W".
5090	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5091	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5092	else
5093	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5094	fi
5095	aix_use_runtimelinking=no
5096
5097	# Test if we are trying to use run time linking or normal
5098	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5099	# need to do runtime linking.
5100	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5101	  for ld_flag in $LDFLAGS; do
5102	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5103	    aix_use_runtimelinking=yes
5104	    break
5105	  fi
5106	  done
5107	  ;;
5108	esac
5109
5110	exp_sym_flag='-bexport'
5111	no_entry_flag='-bnoentry'
5112      fi
5113
5114      # When large executables or shared objects are built, AIX ld can
5115      # have problems creating the table of contents.  If linking a library
5116      # or program results in "error TOC overflow" add -mminimal-toc to
5117      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5118      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5119
5120      _LT_TAGVAR(archive_cmds, $1)=''
5121      _LT_TAGVAR(hardcode_direct, $1)=yes
5122      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5123      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5124      _LT_TAGVAR(link_all_deplibs, $1)=yes
5125      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5126
5127      if test "$GCC" = yes; then
5128	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5129	# We only want to do this on AIX 4.2 and lower, the check
5130	# below for broken collect2 doesn't work under 4.3+
5131	  collect2name=`${CC} -print-prog-name=collect2`
5132	  if test -f "$collect2name" &&
5133	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5134	  then
5135	  # We have reworked collect2
5136	  :
5137	  else
5138	  # We have old collect2
5139	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5140	  # It fails to find uninstalled libraries when the uninstalled
5141	  # path is not listed in the libpath.  Setting hardcode_minus_L
5142	  # to unsupported forces relinking
5143	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5144	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5145	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5146	  fi
5147	  ;;
5148	esac
5149	shared_flag='-shared'
5150	if test "$aix_use_runtimelinking" = yes; then
5151	  shared_flag="$shared_flag "'${wl}-G'
5152	fi
5153	_LT_TAGVAR(link_all_deplibs, $1)=no
5154      else
5155	# not using gcc
5156	if test "$host_cpu" = ia64; then
5157	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5158	# chokes on -Wl,-G. The following line is correct:
5159	  shared_flag='-G'
5160	else
5161	  if test "$aix_use_runtimelinking" = yes; then
5162	    shared_flag='${wl}-G'
5163	  else
5164	    shared_flag='${wl}-bM:SRE'
5165	  fi
5166	fi
5167      fi
5168
5169      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5170      # It seems that -bexpall does not export symbols beginning with
5171      # underscore (_), so it is better to generate a list of symbols to export.
5172      _LT_TAGVAR(always_export_symbols, $1)=yes
5173      if test "$aix_use_runtimelinking" = yes; then
5174	# Warning - without using the other runtime loading flags (-brtl),
5175	# -berok will link without error, but may produce a broken library.
5176	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5177        # Determine the default libpath from the value encoded in an
5178        # empty executable.
5179        _LT_SYS_MODULE_PATH_AIX([$1])
5180        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5181        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5182      else
5183	if test "$host_cpu" = ia64; then
5184	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5185	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5186	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5187	else
5188	 # Determine the default libpath from the value encoded in an
5189	 # empty executable.
5190	 _LT_SYS_MODULE_PATH_AIX([$1])
5191	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5192	  # Warning - without using the other run time loading flags,
5193	  # -berok will link without error, but may produce a broken library.
5194	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5195	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5196	  if test "$with_gnu_ld" = yes; then
5197	    # We only use this code for GNU lds that support --whole-archive.
5198	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5199	  else
5200	    # Exported symbols can be pulled into shared objects from archives
5201	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5202	  fi
5203	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5204	  # This is similar to how AIX traditionally builds its shared libraries.
5205	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5206	fi
5207      fi
5208      ;;
5209
5210    amigaos*)
5211      case $host_cpu in
5212      powerpc)
5213            # see comment about AmigaOS4 .so support
5214            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5215            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5216        ;;
5217      m68k)
5218            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5219            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5220            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5221        ;;
5222      esac
5223      ;;
5224
5225    bsdi[[45]]*)
5226      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5227      ;;
5228
5229    cygwin* | mingw* | pw32* | cegcc*)
5230      # When not using gcc, we currently assume that we are using
5231      # Microsoft Visual C++.
5232      # hardcode_libdir_flag_spec is actually meaningless, as there is
5233      # no search path for DLLs.
5234      case $cc_basename in
5235      cl*)
5236	# Native MSVC
5237	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5238	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5239	_LT_TAGVAR(always_export_symbols, $1)=yes
5240	_LT_TAGVAR(file_list_spec, $1)='@'
5241	# Tell ltmain to make .lib files, not .a files.
5242	libext=lib
5243	# Tell ltmain to make .dll files, not .so files.
5244	shrext_cmds=".dll"
5245	# FIXME: Setting linknames here is a bad hack.
5246	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5247	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5248	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5249	  else
5250	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5251	  fi~
5252	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5253	  linknames='
5254	# The linker will not automatically build a static lib if we build a DLL.
5255	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5256	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5257	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5258	_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5259	# Don't use ranlib
5260	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5261	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5262	  lt_tool_outputfile="@TOOL_OUTPUT@"~
5263	  case $lt_outputfile in
5264	    *.exe|*.EXE) ;;
5265	    *)
5266	      lt_outputfile="$lt_outputfile.exe"
5267	      lt_tool_outputfile="$lt_tool_outputfile.exe"
5268	      ;;
5269	  esac~
5270	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5271	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5272	    $RM "$lt_outputfile.manifest";
5273	  fi'
5274	;;
5275      *)
5276	# Assume MSVC wrapper
5277	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5278	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5279	# Tell ltmain to make .lib files, not .a files.
5280	libext=lib
5281	# Tell ltmain to make .dll files, not .so files.
5282	shrext_cmds=".dll"
5283	# FIXME: Setting linknames here is a bad hack.
5284	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5285	# The linker will automatically build a .lib file if we build a DLL.
5286	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5287	# FIXME: Should let the user specify the lib program.
5288	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5289	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5290	;;
5291      esac
5292      ;;
5293
5294    darwin* | rhapsody*)
5295      _LT_DARWIN_LINKER_FEATURES($1)
5296      ;;
5297
5298    dgux*)
5299      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5300      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5301      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5302      ;;
5303
5304    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5305    # support.  Future versions do this automatically, but an explicit c++rt0.o
5306    # does not break anything, and helps significantly (at the cost of a little
5307    # extra space).
5308    freebsd2.2*)
5309      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5310      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5311      _LT_TAGVAR(hardcode_direct, $1)=yes
5312      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5313      ;;
5314
5315    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5316    freebsd2.*)
5317      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5318      _LT_TAGVAR(hardcode_direct, $1)=yes
5319      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5320      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5321      ;;
5322
5323    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5324    freebsd* | dragonfly*)
5325      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5326      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5327      _LT_TAGVAR(hardcode_direct, $1)=yes
5328      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5329      ;;
5330
5331    hpux9*)
5332      if test "$GCC" = yes; then
5333	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5334      else
5335	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5336      fi
5337      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5338      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5339      _LT_TAGVAR(hardcode_direct, $1)=yes
5340
5341      # hardcode_minus_L: Not really in the search PATH,
5342      # but as the default location of the library.
5343      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5344      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5345      ;;
5346
5347    hpux10*)
5348      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5349	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5350      else
5351	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5352      fi
5353      if test "$with_gnu_ld" = no; then
5354	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5355	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5356	_LT_TAGVAR(hardcode_direct, $1)=yes
5357	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5358	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5359	# hardcode_minus_L: Not really in the search PATH,
5360	# but as the default location of the library.
5361	_LT_TAGVAR(hardcode_minus_L, $1)=yes
5362      fi
5363      ;;
5364
5365    hpux11*)
5366      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5367	case $host_cpu in
5368	hppa*64*)
5369	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5370	  ;;
5371	ia64*)
5372	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5373	  ;;
5374	*)
5375	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5376	  ;;
5377	esac
5378      else
5379	case $host_cpu in
5380	hppa*64*)
5381	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5382	  ;;
5383	ia64*)
5384	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5385	  ;;
5386	*)
5387	m4_if($1, [], [
5388	  # Older versions of the 11.00 compiler do not understand -b yet
5389	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5390	  _LT_LINKER_OPTION([if $CC understands -b],
5391	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5392	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5393	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5394	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5395	  ;;
5396	esac
5397      fi
5398      if test "$with_gnu_ld" = no; then
5399	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5400	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
5401
5402	case $host_cpu in
5403	hppa*64*|ia64*)
5404	  _LT_TAGVAR(hardcode_direct, $1)=no
5405	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5406	  ;;
5407	*)
5408	  _LT_TAGVAR(hardcode_direct, $1)=yes
5409	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5410	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5411
5412	  # hardcode_minus_L: Not really in the search PATH,
5413	  # but as the default location of the library.
5414	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5415	  ;;
5416	esac
5417      fi
5418      ;;
5419
5420    irix5* | irix6* | nonstopux*)
5421      if test "$GCC" = yes; then
5422	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5423	# Try to use the -exported_symbol ld option, if it does not
5424	# work, assume that -exports_file does not work either and
5425	# implicitly export all symbols.
5426	# This should be the same for all languages, so no per-tag cache variable.
5427	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5428	  [lt_cv_irix_exported_symbol],
5429	  [save_LDFLAGS="$LDFLAGS"
5430	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5431	   AC_LINK_IFELSE(
5432	     [AC_LANG_SOURCE(
5433	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5434			      [C++], [[int foo (void) { return 0; }]],
5435			      [Fortran 77], [[
5436      subroutine foo
5437      end]],
5438			      [Fortran], [[
5439      subroutine foo
5440      end]])])],
5441	      [lt_cv_irix_exported_symbol=yes],
5442	      [lt_cv_irix_exported_symbol=no])
5443           LDFLAGS="$save_LDFLAGS"])
5444	if test "$lt_cv_irix_exported_symbol" = yes; then
5445          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
5446	fi
5447      else
5448	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5449	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5450      fi
5451      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5452      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5453      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5454      _LT_TAGVAR(inherit_rpath, $1)=yes
5455      _LT_TAGVAR(link_all_deplibs, $1)=yes
5456      ;;
5457
5458    netbsd* | netbsdelf*-gnu)
5459      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5460	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5461      else
5462	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5463      fi
5464      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5465      _LT_TAGVAR(hardcode_direct, $1)=yes
5466      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5467      ;;
5468
5469    newsos6)
5470      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5471      _LT_TAGVAR(hardcode_direct, $1)=yes
5472      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5473      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5474      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5475      ;;
5476
5477    *nto* | *qnx*)
5478      ;;
5479
5480    openbsd*)
5481      if test -f /usr/libexec/ld.so; then
5482	_LT_TAGVAR(hardcode_direct, $1)=yes
5483	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5484	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5485	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5486	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5487	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5488	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5489	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5490	else
5491	  case $host_os in
5492	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5493	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5494	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5495	     ;;
5496	   *)
5497	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5498	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5499	     ;;
5500	  esac
5501	fi
5502      else
5503	_LT_TAGVAR(ld_shlibs, $1)=no
5504      fi
5505      ;;
5506
5507    os2*)
5508      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5509      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5510      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5511      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5512      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5513      ;;
5514
5515    osf3*)
5516      if test "$GCC" = yes; then
5517	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5518	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5519      else
5520	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5521	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5522      fi
5523      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5524      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5525      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5526      ;;
5527
5528    osf4* | osf5*)	# as osf3* with the addition of -msym flag
5529      if test "$GCC" = yes; then
5530	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5531	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5532	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5533      else
5534	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5535	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5536	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5537	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5538
5539	# Both c and cxx compiler support -rpath directly
5540	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5541      fi
5542      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5543      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5544      ;;
5545
5546    solaris*)
5547      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5548      if test "$GCC" = yes; then
5549	wlarc='${wl}'
5550	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5551	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5552	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5553      else
5554	case `$CC -V 2>&1` in
5555	*"Compilers 5.0"*)
5556	  wlarc=''
5557	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5558	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5559	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5560	  ;;
5561	*)
5562	  wlarc='${wl}'
5563	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5564	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5565	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5566	  ;;
5567	esac
5568      fi
5569      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5570      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5571      case $host_os in
5572      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5573      *)
5574	# The compiler driver will combine and reorder linker options,
5575	# but understands `-z linker_flag'.  GCC discards it without `$wl',
5576	# but is careful enough not to reorder.
5577	# Supported since Solaris 2.6 (maybe 2.5.1?)
5578	if test "$GCC" = yes; then
5579	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5580	else
5581	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5582	fi
5583	;;
5584      esac
5585      _LT_TAGVAR(link_all_deplibs, $1)=yes
5586      ;;
5587
5588    sunos4*)
5589      if test "x$host_vendor" = xsequent; then
5590	# Use $CC to link under sequent, because it throws in some extra .o
5591	# files that make .init and .fini sections work.
5592	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5593      else
5594	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5595      fi
5596      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5597      _LT_TAGVAR(hardcode_direct, $1)=yes
5598      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5599      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5600      ;;
5601
5602    sysv4)
5603      case $host_vendor in
5604	sni)
5605	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5606	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5607	;;
5608	siemens)
5609	  ## LD is ld it makes a PLAMLIB
5610	  ## CC just makes a GrossModule.
5611	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5612	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5613	  _LT_TAGVAR(hardcode_direct, $1)=no
5614        ;;
5615	motorola)
5616	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5617	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5618	;;
5619      esac
5620      runpath_var='LD_RUN_PATH'
5621      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5622      ;;
5623
5624    sysv4.3*)
5625      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5626      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5627      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5628      ;;
5629
5630    sysv4*MP*)
5631      if test -d /usr/nec; then
5632	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5633	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5634	runpath_var=LD_RUN_PATH
5635	hardcode_runpath_var=yes
5636	_LT_TAGVAR(ld_shlibs, $1)=yes
5637      fi
5638      ;;
5639
5640    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5641      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5642      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5643      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5644      runpath_var='LD_RUN_PATH'
5645
5646      if test "$GCC" = yes; then
5647	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5648	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5649      else
5650	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5651	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5652      fi
5653      ;;
5654
5655    sysv5* | sco3.2v5* | sco5v6*)
5656      # Note: We can NOT use -z defs as we might desire, because we do not
5657      # link with -lc, and that would cause any symbols used from libc to
5658      # always be unresolved, which means just about no library would
5659      # ever link correctly.  If we're not using GNU ld we use -z text
5660      # though, which does catch some bad symbols but isn't as heavy-handed
5661      # as -z defs.
5662      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5663      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5664      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5665      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5666      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5667      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5668      _LT_TAGVAR(link_all_deplibs, $1)=yes
5669      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5670      runpath_var='LD_RUN_PATH'
5671
5672      if test "$GCC" = yes; then
5673	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5674	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5675      else
5676	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5677	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5678      fi
5679      ;;
5680
5681    uts4*)
5682      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5683      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5684      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5685      ;;
5686
5687    *)
5688      _LT_TAGVAR(ld_shlibs, $1)=no
5689      ;;
5690    esac
5691
5692    if test x$host_vendor = xsni; then
5693      case $host in
5694      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5695	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5696	;;
5697      esac
5698    fi
5699  fi
5700])
5701AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5702test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5703
5704_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5705
5706_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5707_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5708_LT_DECL([], [extract_expsyms_cmds], [2],
5709    [The commands to extract the exported symbol list from a shared archive])
5710
5711#
5712# Do we need to explicitly link libc?
5713#
5714case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5715x|xyes)
5716  # Assume -lc should be added
5717  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5718
5719  if test "$enable_shared" = yes && test "$GCC" = yes; then
5720    case $_LT_TAGVAR(archive_cmds, $1) in
5721    *'~'*)
5722      # FIXME: we may have to deal with multi-command sequences.
5723      ;;
5724    '$CC '*)
5725      # Test whether the compiler implicitly links with -lc since on some
5726      # systems, -lgcc has to come before -lc. If gcc already passes -lc
5727      # to ld, don't add -lc before -lgcc.
5728      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
5729	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
5730	[$RM conftest*
5731	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5732
5733	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5734	  soname=conftest
5735	  lib=conftest
5736	  libobjs=conftest.$ac_objext
5737	  deplibs=
5738	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5739	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5740	  compiler_flags=-v
5741	  linker_flags=-v
5742	  verstring=
5743	  output_objdir=.
5744	  libname=conftest
5745	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5746	  _LT_TAGVAR(allow_undefined_flag, $1)=
5747	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5748	  then
5749	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5750	  else
5751	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5752	  fi
5753	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5754	else
5755	  cat conftest.err 1>&5
5756	fi
5757	$RM conftest*
5758	])
5759      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
5760      ;;
5761    esac
5762  fi
5763  ;;
5764esac
5765
5766_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5767    [Whether or not to add -lc for building shared libraries])
5768_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5769    [enable_shared_with_static_runtimes], [0],
5770    [Whether or not to disallow shared libs when runtime libs are static])
5771_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5772    [Compiler flag to allow reflexive dlopens])
5773_LT_TAGDECL([], [whole_archive_flag_spec], [1],
5774    [Compiler flag to generate shared objects directly from archives])
5775_LT_TAGDECL([], [compiler_needs_object], [1],
5776    [Whether the compiler copes with passing no objects directly])
5777_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5778    [Create an old-style archive from a shared archive])
5779_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5780    [Create a temporary old-style archive to link instead of a shared archive])
5781_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5782_LT_TAGDECL([], [archive_expsym_cmds], [2])
5783_LT_TAGDECL([], [module_cmds], [2],
5784    [Commands used to build a loadable module if different from building
5785    a shared archive.])
5786_LT_TAGDECL([], [module_expsym_cmds], [2])
5787_LT_TAGDECL([], [with_gnu_ld], [1],
5788    [Whether we are building with GNU ld or not])
5789_LT_TAGDECL([], [allow_undefined_flag], [1],
5790    [Flag that allows shared libraries with undefined symbols to be built])
5791_LT_TAGDECL([], [no_undefined_flag], [1],
5792    [Flag that enforces no undefined symbols])
5793_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5794    [Flag to hardcode $libdir into a binary during linking.
5795    This must work even if $libdir does not exist])
5796_LT_TAGDECL([], [hardcode_libdir_separator], [1],
5797    [Whether we need a single "-rpath" flag with a separated argument])
5798_LT_TAGDECL([], [hardcode_direct], [0],
5799    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5800    DIR into the resulting binary])
5801_LT_TAGDECL([], [hardcode_direct_absolute], [0],
5802    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5803    DIR into the resulting binary and the resulting library dependency is
5804    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5805    library is relocated])
5806_LT_TAGDECL([], [hardcode_minus_L], [0],
5807    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5808    into the resulting binary])
5809_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5810    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5811    into the resulting binary])
5812_LT_TAGDECL([], [hardcode_automatic], [0],
5813    [Set to "yes" if building a shared library automatically hardcodes DIR
5814    into the library and all subsequent libraries and executables linked
5815    against it])
5816_LT_TAGDECL([], [inherit_rpath], [0],
5817    [Set to yes if linker adds runtime paths of dependent libraries
5818    to runtime path list])
5819_LT_TAGDECL([], [link_all_deplibs], [0],
5820    [Whether libtool must link a program against all its dependency libraries])
5821_LT_TAGDECL([], [always_export_symbols], [0],
5822    [Set to "yes" if exported symbols are required])
5823_LT_TAGDECL([], [export_symbols_cmds], [2],
5824    [The commands to list exported symbols])
5825_LT_TAGDECL([], [exclude_expsyms], [1],
5826    [Symbols that should not be listed in the preloaded symbols])
5827_LT_TAGDECL([], [include_expsyms], [1],
5828    [Symbols that must always be exported])
5829_LT_TAGDECL([], [prelink_cmds], [2],
5830    [Commands necessary for linking programs (against libraries) with templates])
5831_LT_TAGDECL([], [postlink_cmds], [2],
5832    [Commands necessary for finishing linking programs])
5833_LT_TAGDECL([], [file_list_spec], [1],
5834    [Specify filename containing input files])
5835dnl FIXME: Not yet implemented
5836dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5837dnl    [Compiler flag to generate thread safe objects])
5838])# _LT_LINKER_SHLIBS
5839
5840
5841# _LT_LANG_C_CONFIG([TAG])
5842# ------------------------
5843# Ensure that the configuration variables for a C compiler are suitably
5844# defined.  These variables are subsequently used by _LT_CONFIG to write
5845# the compiler configuration to `libtool'.
5846m4_defun([_LT_LANG_C_CONFIG],
5847[m4_require([_LT_DECL_EGREP])dnl
5848lt_save_CC="$CC"
5849AC_LANG_PUSH(C)
5850
5851# Source file extension for C test sources.
5852ac_ext=c
5853
5854# Object file extension for compiled C test sources.
5855objext=o
5856_LT_TAGVAR(objext, $1)=$objext
5857
5858# Code to be used in simple compile tests
5859lt_simple_compile_test_code="int some_variable = 0;"
5860
5861# Code to be used in simple link tests
5862lt_simple_link_test_code='int main(){return(0);}'
5863
5864_LT_TAG_COMPILER
5865# Save the default compiler, since it gets overwritten when the other
5866# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5867compiler_DEFAULT=$CC
5868
5869# save warnings/boilerplate of simple test code
5870_LT_COMPILER_BOILERPLATE
5871_LT_LINKER_BOILERPLATE
5872
5873if test -n "$compiler"; then
5874  _LT_COMPILER_NO_RTTI($1)
5875  _LT_COMPILER_PIC($1)
5876  _LT_COMPILER_C_O($1)
5877  _LT_COMPILER_FILE_LOCKS($1)
5878  _LT_LINKER_SHLIBS($1)
5879  _LT_SYS_DYNAMIC_LINKER($1)
5880  _LT_LINKER_HARDCODE_LIBPATH($1)
5881  LT_SYS_DLOPEN_SELF
5882  _LT_CMD_STRIPLIB
5883
5884  # Report which library types will actually be built
5885  AC_MSG_CHECKING([if libtool supports shared libraries])
5886  AC_MSG_RESULT([$can_build_shared])
5887
5888  AC_MSG_CHECKING([whether to build shared libraries])
5889  test "$can_build_shared" = "no" && enable_shared=no
5890
5891  # On AIX, shared libraries and static libraries use the same namespace, and
5892  # are all built from PIC.
5893  case $host_os in
5894  aix3*)
5895    test "$enable_shared" = yes && enable_static=no
5896    if test -n "$RANLIB"; then
5897      archive_cmds="$archive_cmds~\$RANLIB \$lib"
5898      postinstall_cmds='$RANLIB $lib'
5899    fi
5900    ;;
5901
5902  aix[[4-9]]*)
5903    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5904      test "$enable_shared" = yes && enable_static=no
5905    fi
5906    ;;
5907  esac
5908  AC_MSG_RESULT([$enable_shared])
5909
5910  AC_MSG_CHECKING([whether to build static libraries])
5911  # Make sure either enable_shared or enable_static is yes.
5912  test "$enable_shared" = yes || enable_static=yes
5913  AC_MSG_RESULT([$enable_static])
5914
5915  _LT_CONFIG($1)
5916fi
5917AC_LANG_POP
5918CC="$lt_save_CC"
5919])# _LT_LANG_C_CONFIG
5920
5921
5922# _LT_LANG_CXX_CONFIG([TAG])
5923# --------------------------
5924# Ensure that the configuration variables for a C++ compiler are suitably
5925# defined.  These variables are subsequently used by _LT_CONFIG to write
5926# the compiler configuration to `libtool'.
5927m4_defun([_LT_LANG_CXX_CONFIG],
5928[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5929m4_require([_LT_DECL_EGREP])dnl
5930m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5931if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5932    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5933    (test "X$CXX" != "Xg++"))) ; then
5934  AC_PROG_CXXCPP
5935else
5936  _lt_caught_CXX_error=yes
5937fi
5938
5939AC_LANG_PUSH(C++)
5940_LT_TAGVAR(archive_cmds_need_lc, $1)=no
5941_LT_TAGVAR(allow_undefined_flag, $1)=
5942_LT_TAGVAR(always_export_symbols, $1)=no
5943_LT_TAGVAR(archive_expsym_cmds, $1)=
5944_LT_TAGVAR(compiler_needs_object, $1)=no
5945_LT_TAGVAR(export_dynamic_flag_spec, $1)=
5946_LT_TAGVAR(hardcode_direct, $1)=no
5947_LT_TAGVAR(hardcode_direct_absolute, $1)=no
5948_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5949_LT_TAGVAR(hardcode_libdir_separator, $1)=
5950_LT_TAGVAR(hardcode_minus_L, $1)=no
5951_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5952_LT_TAGVAR(hardcode_automatic, $1)=no
5953_LT_TAGVAR(inherit_rpath, $1)=no
5954_LT_TAGVAR(module_cmds, $1)=
5955_LT_TAGVAR(module_expsym_cmds, $1)=
5956_LT_TAGVAR(link_all_deplibs, $1)=unknown
5957_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5958_LT_TAGVAR(reload_flag, $1)=$reload_flag
5959_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
5960_LT_TAGVAR(no_undefined_flag, $1)=
5961_LT_TAGVAR(whole_archive_flag_spec, $1)=
5962_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5963
5964# Source file extension for C++ test sources.
5965ac_ext=cpp
5966
5967# Object file extension for compiled C++ test sources.
5968objext=o
5969_LT_TAGVAR(objext, $1)=$objext
5970
5971# No sense in running all these tests if we already determined that
5972# the CXX compiler isn't working.  Some variables (like enable_shared)
5973# are currently assumed to apply to all compilers on this platform,
5974# and will be corrupted by setting them based on a non-working compiler.
5975if test "$_lt_caught_CXX_error" != yes; then
5976  # Code to be used in simple compile tests
5977  lt_simple_compile_test_code="int some_variable = 0;"
5978
5979  # Code to be used in simple link tests
5980  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5981
5982  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5983  _LT_TAG_COMPILER
5984
5985  # save warnings/boilerplate of simple test code
5986  _LT_COMPILER_BOILERPLATE
5987  _LT_LINKER_BOILERPLATE
5988
5989  # Allow CC to be a program name with arguments.
5990  lt_save_CC=$CC
5991  lt_save_CFLAGS=$CFLAGS
5992  lt_save_LD=$LD
5993  lt_save_GCC=$GCC
5994  GCC=$GXX
5995  lt_save_with_gnu_ld=$with_gnu_ld
5996  lt_save_path_LD=$lt_cv_path_LD
5997  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5998    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5999  else
6000    $as_unset lt_cv_prog_gnu_ld
6001  fi
6002  if test -n "${lt_cv_path_LDCXX+set}"; then
6003    lt_cv_path_LD=$lt_cv_path_LDCXX
6004  else
6005    $as_unset lt_cv_path_LD
6006  fi
6007  test -z "${LDCXX+set}" || LD=$LDCXX
6008  CC=${CXX-"c++"}
6009  CFLAGS=$CXXFLAGS
6010  compiler=$CC
6011  _LT_TAGVAR(compiler, $1)=$CC
6012  _LT_CC_BASENAME([$compiler])
6013
6014  if test -n "$compiler"; then
6015    # We don't want -fno-exception when compiling C++ code, so set the
6016    # no_builtin_flag separately
6017    if test "$GXX" = yes; then
6018      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6019    else
6020      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6021    fi
6022
6023    if test "$GXX" = yes; then
6024      # Set up default GNU C++ configuration
6025
6026      LT_PATH_LD
6027
6028      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6029      # archiving commands below assume that GNU ld is being used.
6030      if test "$with_gnu_ld" = yes; then
6031        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6032        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6033
6034        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6035        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6036
6037        # If archive_cmds runs LD, not CC, wlarc should be empty
6038        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6039        #     investigate it a little bit more. (MM)
6040        wlarc='${wl}'
6041
6042        # ancient GNU ld didn't support --whole-archive et. al.
6043        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6044	  $GREP 'no-whole-archive' > /dev/null; then
6045          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6046        else
6047          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6048        fi
6049      else
6050        with_gnu_ld=no
6051        wlarc=
6052
6053        # A generic and very simple default shared library creation
6054        # command for GNU C++ for the case where it uses the native
6055        # linker, instead of GNU ld.  If possible, this setting should
6056        # overridden to take advantage of the native linker features on
6057        # the platform it is being used on.
6058        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6059      fi
6060
6061      # Commands to make compiler produce verbose output that lists
6062      # what "hidden" libraries, object files and flags are used when
6063      # linking a shared library.
6064      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6065
6066    else
6067      GXX=no
6068      with_gnu_ld=no
6069      wlarc=
6070    fi
6071
6072    # PORTME: fill in a description of your system's C++ link characteristics
6073    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6074    _LT_TAGVAR(ld_shlibs, $1)=yes
6075    case $host_os in
6076      aix3*)
6077        # FIXME: insert proper C++ library support
6078        _LT_TAGVAR(ld_shlibs, $1)=no
6079        ;;
6080      aix[[4-9]]*)
6081        if test "$host_cpu" = ia64; then
6082          # On IA64, the linker does run time linking by default, so we don't
6083          # have to do anything special.
6084          aix_use_runtimelinking=no
6085          exp_sym_flag='-Bexport'
6086          no_entry_flag=""
6087        else
6088          aix_use_runtimelinking=no
6089
6090          # Test if we are trying to use run time linking or normal
6091          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6092          # need to do runtime linking.
6093          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6094	    for ld_flag in $LDFLAGS; do
6095	      case $ld_flag in
6096	      *-brtl*)
6097	        aix_use_runtimelinking=yes
6098	        break
6099	        ;;
6100	      esac
6101	    done
6102	    ;;
6103          esac
6104
6105          exp_sym_flag='-bexport'
6106          no_entry_flag='-bnoentry'
6107        fi
6108
6109        # When large executables or shared objects are built, AIX ld can
6110        # have problems creating the table of contents.  If linking a library
6111        # or program results in "error TOC overflow" add -mminimal-toc to
6112        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6113        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6114
6115        _LT_TAGVAR(archive_cmds, $1)=''
6116        _LT_TAGVAR(hardcode_direct, $1)=yes
6117        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6118        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6119        _LT_TAGVAR(link_all_deplibs, $1)=yes
6120        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6121
6122        if test "$GXX" = yes; then
6123          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6124          # We only want to do this on AIX 4.2 and lower, the check
6125          # below for broken collect2 doesn't work under 4.3+
6126	  collect2name=`${CC} -print-prog-name=collect2`
6127	  if test -f "$collect2name" &&
6128	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6129	  then
6130	    # We have reworked collect2
6131	    :
6132	  else
6133	    # We have old collect2
6134	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6135	    # It fails to find uninstalled libraries when the uninstalled
6136	    # path is not listed in the libpath.  Setting hardcode_minus_L
6137	    # to unsupported forces relinking
6138	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6139	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6140	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6141	  fi
6142          esac
6143          shared_flag='-shared'
6144	  if test "$aix_use_runtimelinking" = yes; then
6145	    shared_flag="$shared_flag "'${wl}-G'
6146	  fi
6147        else
6148          # not using gcc
6149          if test "$host_cpu" = ia64; then
6150	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6151	  # chokes on -Wl,-G. The following line is correct:
6152	  shared_flag='-G'
6153          else
6154	    if test "$aix_use_runtimelinking" = yes; then
6155	      shared_flag='${wl}-G'
6156	    else
6157	      shared_flag='${wl}-bM:SRE'
6158	    fi
6159          fi
6160        fi
6161
6162        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6163        # It seems that -bexpall does not export symbols beginning with
6164        # underscore (_), so it is better to generate a list of symbols to
6165	# export.
6166        _LT_TAGVAR(always_export_symbols, $1)=yes
6167        if test "$aix_use_runtimelinking" = yes; then
6168          # Warning - without using the other runtime loading flags (-brtl),
6169          # -berok will link without error, but may produce a broken library.
6170          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6171          # Determine the default libpath from the value encoded in an empty
6172          # executable.
6173          _LT_SYS_MODULE_PATH_AIX([$1])
6174          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6175
6176          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6177        else
6178          if test "$host_cpu" = ia64; then
6179	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6180	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6181	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6182          else
6183	    # Determine the default libpath from the value encoded in an
6184	    # empty executable.
6185	    _LT_SYS_MODULE_PATH_AIX([$1])
6186	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6187	    # Warning - without using the other run time loading flags,
6188	    # -berok will link without error, but may produce a broken library.
6189	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6190	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6191	    if test "$with_gnu_ld" = yes; then
6192	      # We only use this code for GNU lds that support --whole-archive.
6193	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6194	    else
6195	      # Exported symbols can be pulled into shared objects from archives
6196	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6197	    fi
6198	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6199	    # This is similar to how AIX traditionally builds its shared
6200	    # libraries.
6201	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6202          fi
6203        fi
6204        ;;
6205
6206      beos*)
6207	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6208	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6209	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6210	  # support --undefined.  This deserves some investigation.  FIXME
6211	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6212	else
6213	  _LT_TAGVAR(ld_shlibs, $1)=no
6214	fi
6215	;;
6216
6217      chorus*)
6218        case $cc_basename in
6219          *)
6220	  # FIXME: insert proper C++ library support
6221	  _LT_TAGVAR(ld_shlibs, $1)=no
6222	  ;;
6223        esac
6224        ;;
6225
6226      cygwin* | mingw* | pw32* | cegcc*)
6227	case $GXX,$cc_basename in
6228	,cl* | no,cl*)
6229	  # Native MSVC
6230	  # hardcode_libdir_flag_spec is actually meaningless, as there is
6231	  # no search path for DLLs.
6232	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6233	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6234	  _LT_TAGVAR(always_export_symbols, $1)=yes
6235	  _LT_TAGVAR(file_list_spec, $1)='@'
6236	  # Tell ltmain to make .lib files, not .a files.
6237	  libext=lib
6238	  # Tell ltmain to make .dll files, not .so files.
6239	  shrext_cmds=".dll"
6240	  # FIXME: Setting linknames here is a bad hack.
6241	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6242	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6243	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6244	    else
6245	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6246	    fi~
6247	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6248	    linknames='
6249	  # The linker will not automatically build a static lib if we build a DLL.
6250	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6251	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6252	  # Don't use ranlib
6253	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6254	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6255	    lt_tool_outputfile="@TOOL_OUTPUT@"~
6256	    case $lt_outputfile in
6257	      *.exe|*.EXE) ;;
6258	      *)
6259		lt_outputfile="$lt_outputfile.exe"
6260		lt_tool_outputfile="$lt_tool_outputfile.exe"
6261		;;
6262	    esac~
6263	    func_to_tool_file "$lt_outputfile"~
6264	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6265	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6266	      $RM "$lt_outputfile.manifest";
6267	    fi'
6268	  ;;
6269	*)
6270	  # g++
6271	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6272	  # as there is no search path for DLLs.
6273	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6274	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6275	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6276	  _LT_TAGVAR(always_export_symbols, $1)=no
6277	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6278
6279	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6280	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6281	    # If the export-symbols file already is a .def file (1st line
6282	    # is EXPORTS), use it as is; otherwise, prepend...
6283	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6284	      cp $export_symbols $output_objdir/$soname.def;
6285	    else
6286	      echo EXPORTS > $output_objdir/$soname.def;
6287	      cat $export_symbols >> $output_objdir/$soname.def;
6288	    fi~
6289	    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6290	  else
6291	    _LT_TAGVAR(ld_shlibs, $1)=no
6292	  fi
6293	  ;;
6294	esac
6295	;;
6296      darwin* | rhapsody*)
6297        _LT_DARWIN_LINKER_FEATURES($1)
6298	;;
6299
6300      dgux*)
6301        case $cc_basename in
6302          ec++*)
6303	    # FIXME: insert proper C++ library support
6304	    _LT_TAGVAR(ld_shlibs, $1)=no
6305	    ;;
6306          ghcx*)
6307	    # Green Hills C++ Compiler
6308	    # FIXME: insert proper C++ library support
6309	    _LT_TAGVAR(ld_shlibs, $1)=no
6310	    ;;
6311          *)
6312	    # FIXME: insert proper C++ library support
6313	    _LT_TAGVAR(ld_shlibs, $1)=no
6314	    ;;
6315        esac
6316        ;;
6317
6318      freebsd2.*)
6319        # C++ shared libraries reported to be fairly broken before
6320	# switch to ELF
6321        _LT_TAGVAR(ld_shlibs, $1)=no
6322        ;;
6323
6324      freebsd-elf*)
6325        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6326        ;;
6327
6328      freebsd* | dragonfly*)
6329        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6330        # conventions
6331        _LT_TAGVAR(ld_shlibs, $1)=yes
6332        ;;
6333
6334      gnu*)
6335        ;;
6336
6337      haiku*)
6338        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6339        _LT_TAGVAR(link_all_deplibs, $1)=yes
6340        ;;
6341
6342      hpux9*)
6343        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6344        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6345        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6346        _LT_TAGVAR(hardcode_direct, $1)=yes
6347        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6348				             # but as the default
6349				             # location of the library.
6350
6351        case $cc_basename in
6352          CC*)
6353            # FIXME: insert proper C++ library support
6354            _LT_TAGVAR(ld_shlibs, $1)=no
6355            ;;
6356          aCC*)
6357            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6358            # Commands to make compiler produce verbose output that lists
6359            # what "hidden" libraries, object files and flags are used when
6360            # linking a shared library.
6361            #
6362            # There doesn't appear to be a way to prevent this compiler from
6363            # explicitly linking system object files so we need to strip them
6364            # from the output so that they don't get included in the library
6365            # dependencies.
6366            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6367            ;;
6368          *)
6369            if test "$GXX" = yes; then
6370              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6371            else
6372              # FIXME: insert proper C++ library support
6373              _LT_TAGVAR(ld_shlibs, $1)=no
6374            fi
6375            ;;
6376        esac
6377        ;;
6378
6379      hpux10*|hpux11*)
6380        if test $with_gnu_ld = no; then
6381	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6382	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6383
6384          case $host_cpu in
6385            hppa*64*|ia64*)
6386              ;;
6387            *)
6388	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6389              ;;
6390          esac
6391        fi
6392        case $host_cpu in
6393          hppa*64*|ia64*)
6394            _LT_TAGVAR(hardcode_direct, $1)=no
6395            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6396            ;;
6397          *)
6398            _LT_TAGVAR(hardcode_direct, $1)=yes
6399            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6400            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6401					         # but as the default
6402					         # location of the library.
6403            ;;
6404        esac
6405
6406        case $cc_basename in
6407          CC*)
6408	    # FIXME: insert proper C++ library support
6409	    _LT_TAGVAR(ld_shlibs, $1)=no
6410	    ;;
6411          aCC*)
6412	    case $host_cpu in
6413	      hppa*64*)
6414	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6415	        ;;
6416	      ia64*)
6417	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6418	        ;;
6419	      *)
6420	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6421	        ;;
6422	    esac
6423	    # Commands to make compiler produce verbose output that lists
6424	    # what "hidden" libraries, object files and flags are used when
6425	    # linking a shared library.
6426	    #
6427	    # There doesn't appear to be a way to prevent this compiler from
6428	    # explicitly linking system object files so we need to strip them
6429	    # from the output so that they don't get included in the library
6430	    # dependencies.
6431	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6432	    ;;
6433          *)
6434	    if test "$GXX" = yes; then
6435	      if test $with_gnu_ld = no; then
6436	        case $host_cpu in
6437	          hppa*64*)
6438	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6439	            ;;
6440	          ia64*)
6441	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6442	            ;;
6443	          *)
6444	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6445	            ;;
6446	        esac
6447	      fi
6448	    else
6449	      # FIXME: insert proper C++ library support
6450	      _LT_TAGVAR(ld_shlibs, $1)=no
6451	    fi
6452	    ;;
6453        esac
6454        ;;
6455
6456      interix[[3-9]]*)
6457	_LT_TAGVAR(hardcode_direct, $1)=no
6458	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6459	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6460	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6461	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6462	# Instead, shared libraries are loaded at an image base (0x10000000 by
6463	# default) and relocated if they conflict, which is a slow very memory
6464	# consuming and fragmenting process.  To avoid this, we pick a random,
6465	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6466	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6467	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6468	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6469	;;
6470      irix5* | irix6*)
6471        case $cc_basename in
6472          CC*)
6473	    # SGI C++
6474	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6475
6476	    # Archives containing C++ object files must be created using
6477	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
6478	    # necessary to make sure instantiated templates are included
6479	    # in the archive.
6480	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6481	    ;;
6482          *)
6483	    if test "$GXX" = yes; then
6484	      if test "$with_gnu_ld" = no; then
6485	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6486	      else
6487	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
6488	      fi
6489	    fi
6490	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6491	    ;;
6492        esac
6493        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6494        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6495        _LT_TAGVAR(inherit_rpath, $1)=yes
6496        ;;
6497
6498      linux* | k*bsd*-gnu | kopensolaris*-gnu)
6499        case $cc_basename in
6500          KCC*)
6501	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6502
6503	    # KCC will only create a shared library if the output file
6504	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6505	    # to its proper name (with version) after linking.
6506	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6507	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6508	    # Commands to make compiler produce verbose output that lists
6509	    # what "hidden" libraries, object files and flags are used when
6510	    # linking a shared library.
6511	    #
6512	    # There doesn't appear to be a way to prevent this compiler from
6513	    # explicitly linking system object files so we need to strip them
6514	    # from the output so that they don't get included in the library
6515	    # dependencies.
6516	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6517
6518	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6519	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6520
6521	    # Archives containing C++ object files must be created using
6522	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6523	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6524	    ;;
6525	  icpc* | ecpc* )
6526	    # Intel C++
6527	    with_gnu_ld=yes
6528	    # version 8.0 and above of icpc choke on multiply defined symbols
6529	    # if we add $predep_objects and $postdep_objects, however 7.1 and
6530	    # earlier do not add the objects themselves.
6531	    case `$CC -V 2>&1` in
6532	      *"Version 7."*)
6533	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6534		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6535		;;
6536	      *)  # Version 8.0 or newer
6537	        tmp_idyn=
6538	        case $host_cpu in
6539		  ia64*) tmp_idyn=' -i_dynamic';;
6540		esac
6541	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6542		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6543		;;
6544	    esac
6545	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6546	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6547	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6548	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6549	    ;;
6550          pgCC* | pgcpp*)
6551            # Portland Group C++ compiler
6552	    case `$CC -V` in
6553	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6554	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6555		rm -rf $tpldir~
6556		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6557		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6558	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6559		rm -rf $tpldir~
6560		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6561		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6562		$RANLIB $oldlib'
6563	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6564		rm -rf $tpldir~
6565		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6566		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6567	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6568		rm -rf $tpldir~
6569		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6570		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6571	      ;;
6572	    *) # Version 6 and above use weak symbols
6573	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6574	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
6575	      ;;
6576	    esac
6577
6578	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6579	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6580	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6581            ;;
6582	  cxx*)
6583	    # Compaq C++
6584	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6585	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
6586
6587	    runpath_var=LD_RUN_PATH
6588	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6589	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6590
6591	    # Commands to make compiler produce verbose output that lists
6592	    # what "hidden" libraries, object files and flags are used when
6593	    # linking a shared library.
6594	    #
6595	    # There doesn't appear to be a way to prevent this compiler from
6596	    # explicitly linking system object files so we need to strip them
6597	    # from the output so that they don't get included in the library
6598	    # dependencies.
6599	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
6600	    ;;
6601	  xl* | mpixl* | bgxl*)
6602	    # IBM XL 8.0 on PPC, with GNU ld
6603	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6604	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6605	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6606	    if test "x$supports_anon_versioning" = xyes; then
6607	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6608		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6609		echo "local: *; };" >> $output_objdir/$libname.ver~
6610		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6611	    fi
6612	    ;;
6613	  *)
6614	    case `$CC -V 2>&1 | sed 5q` in
6615	    *Sun\ C*)
6616	      # Sun C++ 5.9
6617	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6618	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6619	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
6620	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6621	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
6622	      _LT_TAGVAR(compiler_needs_object, $1)=yes
6623
6624	      # Not sure whether something based on
6625	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
6626	      # would be better.
6627	      output_verbose_link_cmd='func_echo_all'
6628
6629	      # Archives containing C++ object files must be created using
6630	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6631	      # necessary to make sure instantiated templates are included
6632	      # in the archive.
6633	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6634	      ;;
6635	    esac
6636	    ;;
6637	esac
6638	;;
6639
6640      lynxos*)
6641        # FIXME: insert proper C++ library support
6642	_LT_TAGVAR(ld_shlibs, $1)=no
6643	;;
6644
6645      m88k*)
6646        # FIXME: insert proper C++ library support
6647        _LT_TAGVAR(ld_shlibs, $1)=no
6648	;;
6649
6650      mvs*)
6651        case $cc_basename in
6652          cxx*)
6653	    # FIXME: insert proper C++ library support
6654	    _LT_TAGVAR(ld_shlibs, $1)=no
6655	    ;;
6656	  *)
6657	    # FIXME: insert proper C++ library support
6658	    _LT_TAGVAR(ld_shlibs, $1)=no
6659	    ;;
6660	esac
6661	;;
6662
6663      netbsd*)
6664        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6665	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
6666	  wlarc=
6667	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6668	  _LT_TAGVAR(hardcode_direct, $1)=yes
6669	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6670	fi
6671	# Workaround some broken pre-1.5 toolchains
6672	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
6673	;;
6674
6675      *nto* | *qnx*)
6676        _LT_TAGVAR(ld_shlibs, $1)=yes
6677	;;
6678
6679      openbsd2*)
6680        # C++ shared libraries are fairly broken
6681	_LT_TAGVAR(ld_shlibs, $1)=no
6682	;;
6683
6684      openbsd*)
6685	if test -f /usr/libexec/ld.so; then
6686	  _LT_TAGVAR(hardcode_direct, $1)=yes
6687	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6688	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6689	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6690	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6691	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6692	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6693	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6694	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6695	  fi
6696	  output_verbose_link_cmd=func_echo_all
6697	else
6698	  _LT_TAGVAR(ld_shlibs, $1)=no
6699	fi
6700	;;
6701
6702      osf3* | osf4* | osf5*)
6703        case $cc_basename in
6704          KCC*)
6705	    # Kuck and Associates, Inc. (KAI) C++ Compiler
6706
6707	    # KCC will only create a shared library if the output file
6708	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
6709	    # to its proper name (with version) after linking.
6710	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6711
6712	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6713	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6714
6715	    # Archives containing C++ object files must be created using
6716	    # the KAI C++ compiler.
6717	    case $host in
6718	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6719	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6720	    esac
6721	    ;;
6722          RCC*)
6723	    # Rational C++ 2.4.1
6724	    # FIXME: insert proper C++ library support
6725	    _LT_TAGVAR(ld_shlibs, $1)=no
6726	    ;;
6727          cxx*)
6728	    case $host in
6729	      osf3*)
6730	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6731	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6732	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6733		;;
6734	      *)
6735	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6736	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6737	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6738	          echo "-hidden">> $lib.exp~
6739	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
6740	          $RM $lib.exp'
6741	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6742		;;
6743	    esac
6744
6745	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6746
6747	    # Commands to make compiler produce verbose output that lists
6748	    # what "hidden" libraries, object files and flags are used when
6749	    # linking a shared library.
6750	    #
6751	    # There doesn't appear to be a way to prevent this compiler from
6752	    # explicitly linking system object files so we need to strip them
6753	    # from the output so that they don't get included in the library
6754	    # dependencies.
6755	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6756	    ;;
6757	  *)
6758	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6759	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6760	      case $host in
6761	        osf3*)
6762	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6763		  ;;
6764	        *)
6765	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6766		  ;;
6767	      esac
6768
6769	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6770	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6771
6772	      # Commands to make compiler produce verbose output that lists
6773	      # what "hidden" libraries, object files and flags are used when
6774	      # linking a shared library.
6775	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6776
6777	    else
6778	      # FIXME: insert proper C++ library support
6779	      _LT_TAGVAR(ld_shlibs, $1)=no
6780	    fi
6781	    ;;
6782        esac
6783        ;;
6784
6785      psos*)
6786        # FIXME: insert proper C++ library support
6787        _LT_TAGVAR(ld_shlibs, $1)=no
6788        ;;
6789
6790      sunos4*)
6791        case $cc_basename in
6792          CC*)
6793	    # Sun C++ 4.x
6794	    # FIXME: insert proper C++ library support
6795	    _LT_TAGVAR(ld_shlibs, $1)=no
6796	    ;;
6797          lcc*)
6798	    # Lucid
6799	    # FIXME: insert proper C++ library support
6800	    _LT_TAGVAR(ld_shlibs, $1)=no
6801	    ;;
6802          *)
6803	    # FIXME: insert proper C++ library support
6804	    _LT_TAGVAR(ld_shlibs, $1)=no
6805	    ;;
6806        esac
6807        ;;
6808
6809      solaris*)
6810        case $cc_basename in
6811          CC* | sunCC*)
6812	    # Sun C++ 4.2, 5.x and Centerline C++
6813            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6814	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6815	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6816	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6817	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6818
6819	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6820	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6821	    case $host_os in
6822	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6823	      *)
6824		# The compiler driver will combine and reorder linker options,
6825		# but understands `-z linker_flag'.
6826	        # Supported since Solaris 2.6 (maybe 2.5.1?)
6827		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6828	        ;;
6829	    esac
6830	    _LT_TAGVAR(link_all_deplibs, $1)=yes
6831
6832	    output_verbose_link_cmd='func_echo_all'
6833
6834	    # Archives containing C++ object files must be created using
6835	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
6836	    # necessary to make sure instantiated templates are included
6837	    # in the archive.
6838	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6839	    ;;
6840          gcx*)
6841	    # Green Hills C++ Compiler
6842	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6843
6844	    # The C++ compiler must be used to create the archive.
6845	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6846	    ;;
6847          *)
6848	    # GNU C++ compiler with Solaris linker
6849	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6850	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6851	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6852	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6853	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6854		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6855
6856	        # Commands to make compiler produce verbose output that lists
6857	        # what "hidden" libraries, object files and flags are used when
6858	        # linking a shared library.
6859	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6860	      else
6861	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
6862	        # platform.
6863	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6864	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6865		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6866
6867	        # Commands to make compiler produce verbose output that lists
6868	        # what "hidden" libraries, object files and flags are used when
6869	        # linking a shared library.
6870	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6871	      fi
6872
6873	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6874	      case $host_os in
6875		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6876		*)
6877		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6878		  ;;
6879	      esac
6880	    fi
6881	    ;;
6882        esac
6883        ;;
6884
6885    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6886      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6887      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6888      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6889      runpath_var='LD_RUN_PATH'
6890
6891      case $cc_basename in
6892        CC*)
6893	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6894	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6895	  ;;
6896	*)
6897	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6898	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6899	  ;;
6900      esac
6901      ;;
6902
6903      sysv5* | sco3.2v5* | sco5v6*)
6904	# Note: We can NOT use -z defs as we might desire, because we do not
6905	# link with -lc, and that would cause any symbols used from libc to
6906	# always be unresolved, which means just about no library would
6907	# ever link correctly.  If we're not using GNU ld we use -z text
6908	# though, which does catch some bad symbols but isn't as heavy-handed
6909	# as -z defs.
6910	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6911	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6912	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6913	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6914	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6915	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6916	_LT_TAGVAR(link_all_deplibs, $1)=yes
6917	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6918	runpath_var='LD_RUN_PATH'
6919
6920	case $cc_basename in
6921          CC*)
6922	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6923	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6924	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6925	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
6926	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6927	      '"$_LT_TAGVAR(reload_cmds, $1)"
6928	    ;;
6929	  *)
6930	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6931	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6932	    ;;
6933	esac
6934      ;;
6935
6936      tandem*)
6937        case $cc_basename in
6938          NCC*)
6939	    # NonStop-UX NCC 3.20
6940	    # FIXME: insert proper C++ library support
6941	    _LT_TAGVAR(ld_shlibs, $1)=no
6942	    ;;
6943          *)
6944	    # FIXME: insert proper C++ library support
6945	    _LT_TAGVAR(ld_shlibs, $1)=no
6946	    ;;
6947        esac
6948        ;;
6949
6950      vxworks*)
6951        # FIXME: insert proper C++ library support
6952        _LT_TAGVAR(ld_shlibs, $1)=no
6953        ;;
6954
6955      *)
6956        # FIXME: insert proper C++ library support
6957        _LT_TAGVAR(ld_shlibs, $1)=no
6958        ;;
6959    esac
6960
6961    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6962    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6963
6964    _LT_TAGVAR(GCC, $1)="$GXX"
6965    _LT_TAGVAR(LD, $1)="$LD"
6966
6967    ## CAVEAT EMPTOR:
6968    ## There is no encapsulation within the following macros, do not change
6969    ## the running order or otherwise move them around unless you know exactly
6970    ## what you are doing...
6971    _LT_SYS_HIDDEN_LIBDEPS($1)
6972    _LT_COMPILER_PIC($1)
6973    _LT_COMPILER_C_O($1)
6974    _LT_COMPILER_FILE_LOCKS($1)
6975    _LT_LINKER_SHLIBS($1)
6976    _LT_SYS_DYNAMIC_LINKER($1)
6977    _LT_LINKER_HARDCODE_LIBPATH($1)
6978
6979    _LT_CONFIG($1)
6980  fi # test -n "$compiler"
6981
6982  CC=$lt_save_CC
6983  CFLAGS=$lt_save_CFLAGS
6984  LDCXX=$LD
6985  LD=$lt_save_LD
6986  GCC=$lt_save_GCC
6987  with_gnu_ld=$lt_save_with_gnu_ld
6988  lt_cv_path_LDCXX=$lt_cv_path_LD
6989  lt_cv_path_LD=$lt_save_path_LD
6990  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6991  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6992fi # test "$_lt_caught_CXX_error" != yes
6993
6994AC_LANG_POP
6995])# _LT_LANG_CXX_CONFIG
6996
6997
6998# _LT_FUNC_STRIPNAME_CNF
6999# ----------------------
7000# func_stripname_cnf prefix suffix name
7001# strip PREFIX and SUFFIX off of NAME.
7002# PREFIX and SUFFIX must not contain globbing or regex special
7003# characters, hashes, percent signs, but SUFFIX may contain a leading
7004# dot (in which case that matches only a dot).
7005#
7006# This function is identical to the (non-XSI) version of func_stripname,
7007# except this one can be used by m4 code that may be executed by configure,
7008# rather than the libtool script.
7009m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7010AC_REQUIRE([_LT_DECL_SED])
7011AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7012func_stripname_cnf ()
7013{
7014  case ${2} in
7015  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7016  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7017  esac
7018} # func_stripname_cnf
7019])# _LT_FUNC_STRIPNAME_CNF
7020
7021# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7022# ---------------------------------
7023# Figure out "hidden" library dependencies from verbose
7024# compiler output when linking a shared library.
7025# Parse the compiler output and extract the necessary
7026# objects, libraries and library flags.
7027m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7028[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7029AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7030# Dependencies to place before and after the object being linked:
7031_LT_TAGVAR(predep_objects, $1)=
7032_LT_TAGVAR(postdep_objects, $1)=
7033_LT_TAGVAR(predeps, $1)=
7034_LT_TAGVAR(postdeps, $1)=
7035_LT_TAGVAR(compiler_lib_search_path, $1)=
7036
7037dnl we can't use the lt_simple_compile_test_code here,
7038dnl because it contains code intended for an executable,
7039dnl not a library.  It's possible we should let each
7040dnl tag define a new lt_????_link_test_code variable,
7041dnl but it's only used here...
7042m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7043int a;
7044void foo (void) { a = 0; }
7045_LT_EOF
7046], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7047class Foo
7048{
7049public:
7050  Foo (void) { a = 0; }
7051private:
7052  int a;
7053};
7054_LT_EOF
7055], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7056      subroutine foo
7057      implicit none
7058      integer*4 a
7059      a=0
7060      return
7061      end
7062_LT_EOF
7063], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7064      subroutine foo
7065      implicit none
7066      integer a
7067      a=0
7068      return
7069      end
7070_LT_EOF
7071], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7072public class foo {
7073  private int a;
7074  public void bar (void) {
7075    a = 0;
7076  }
7077};
7078_LT_EOF
7079], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7080package foo
7081func foo() {
7082}
7083_LT_EOF
7084])
7085
7086_lt_libdeps_save_CFLAGS=$CFLAGS
7087case "$CC $CFLAGS " in #(
7088*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7089*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7090*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7091esac
7092
7093dnl Parse the compiler output and extract the necessary
7094dnl objects, libraries and library flags.
7095if AC_TRY_EVAL(ac_compile); then
7096  # Parse the compiler output and extract the necessary
7097  # objects, libraries and library flags.
7098
7099  # Sentinel used to keep track of whether or not we are before
7100  # the conftest object file.
7101  pre_test_object_deps_done=no
7102
7103  for p in `eval "$output_verbose_link_cmd"`; do
7104    case ${prev}${p} in
7105
7106    -L* | -R* | -l*)
7107       # Some compilers place space between "-{L,R}" and the path.
7108       # Remove the space.
7109       if test $p = "-L" ||
7110          test $p = "-R"; then
7111	 prev=$p
7112	 continue
7113       fi
7114
7115       # Expand the sysroot to ease extracting the directories later.
7116       if test -z "$prev"; then
7117         case $p in
7118         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7119         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7120         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7121         esac
7122       fi
7123       case $p in
7124       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7125       esac
7126       if test "$pre_test_object_deps_done" = no; then
7127	 case ${prev} in
7128	 -L | -R)
7129	   # Internal compiler library paths should come after those
7130	   # provided the user.  The postdeps already come after the
7131	   # user supplied libs so there is no need to process them.
7132	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7133	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7134	   else
7135	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7136	   fi
7137	   ;;
7138	 # The "-l" case would never come before the object being
7139	 # linked, so don't bother handling this case.
7140	 esac
7141       else
7142	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7143	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7144	 else
7145	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7146	 fi
7147       fi
7148       prev=
7149       ;;
7150
7151    *.lto.$objext) ;; # Ignore GCC LTO objects
7152    *.$objext)
7153       # This assumes that the test object file only shows up
7154       # once in the compiler output.
7155       if test "$p" = "conftest.$objext"; then
7156	 pre_test_object_deps_done=yes
7157	 continue
7158       fi
7159
7160       if test "$pre_test_object_deps_done" = no; then
7161	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7162	   _LT_TAGVAR(predep_objects, $1)="$p"
7163	 else
7164	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7165	 fi
7166       else
7167	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7168	   _LT_TAGVAR(postdep_objects, $1)="$p"
7169	 else
7170	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7171	 fi
7172       fi
7173       ;;
7174
7175    *) ;; # Ignore the rest.
7176
7177    esac
7178  done
7179
7180  # Clean up.
7181  rm -f a.out a.exe
7182else
7183  echo "libtool.m4: error: problem compiling $1 test program"
7184fi
7185
7186$RM -f confest.$objext
7187CFLAGS=$_lt_libdeps_save_CFLAGS
7188
7189# PORTME: override above test on systems where it is broken
7190m4_if([$1], [CXX],
7191[case $host_os in
7192interix[[3-9]]*)
7193  # Interix 3.5 installs completely hosed .la files for C++, so rather than
7194  # hack all around it, let's just trust "g++" to DTRT.
7195  _LT_TAGVAR(predep_objects,$1)=
7196  _LT_TAGVAR(postdep_objects,$1)=
7197  _LT_TAGVAR(postdeps,$1)=
7198  ;;
7199
7200linux*)
7201  case `$CC -V 2>&1 | sed 5q` in
7202  *Sun\ C*)
7203    # Sun C++ 5.9
7204
7205    # The more standards-conforming stlport4 library is
7206    # incompatible with the Cstd library. Avoid specifying
7207    # it if it's in CXXFLAGS. Ignore libCrun as
7208    # -library=stlport4 depends on it.
7209    case " $CXX $CXXFLAGS " in
7210    *" -library=stlport4 "*)
7211      solaris_use_stlport4=yes
7212      ;;
7213    esac
7214
7215    if test "$solaris_use_stlport4" != yes; then
7216      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7217    fi
7218    ;;
7219  esac
7220  ;;
7221
7222solaris*)
7223  case $cc_basename in
7224  CC* | sunCC*)
7225    # The more standards-conforming stlport4 library is
7226    # incompatible with the Cstd library. Avoid specifying
7227    # it if it's in CXXFLAGS. Ignore libCrun as
7228    # -library=stlport4 depends on it.
7229    case " $CXX $CXXFLAGS " in
7230    *" -library=stlport4 "*)
7231      solaris_use_stlport4=yes
7232      ;;
7233    esac
7234
7235    # Adding this requires a known-good setup of shared libraries for
7236    # Sun compiler versions before 5.6, else PIC objects from an old
7237    # archive will be linked into the output, leading to subtle bugs.
7238    if test "$solaris_use_stlport4" != yes; then
7239      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7240    fi
7241    ;;
7242  esac
7243  ;;
7244esac
7245])
7246
7247case " $_LT_TAGVAR(postdeps, $1) " in
7248*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7249esac
7250 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7251if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7252 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7253fi
7254_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7255    [The directories searched by this compiler when creating a shared library])
7256_LT_TAGDECL([], [predep_objects], [1],
7257    [Dependencies to place before and after the objects being linked to
7258    create a shared library])
7259_LT_TAGDECL([], [postdep_objects], [1])
7260_LT_TAGDECL([], [predeps], [1])
7261_LT_TAGDECL([], [postdeps], [1])
7262_LT_TAGDECL([], [compiler_lib_search_path], [1],
7263    [The library search path used internally by the compiler when linking
7264    a shared library])
7265])# _LT_SYS_HIDDEN_LIBDEPS
7266
7267
7268# _LT_LANG_F77_CONFIG([TAG])
7269# --------------------------
7270# Ensure that the configuration variables for a Fortran 77 compiler are
7271# suitably defined.  These variables are subsequently used by _LT_CONFIG
7272# to write the compiler configuration to `libtool'.
7273m4_defun([_LT_LANG_F77_CONFIG],
7274[AC_LANG_PUSH(Fortran 77)
7275if test -z "$F77" || test "X$F77" = "Xno"; then
7276  _lt_disable_F77=yes
7277fi
7278
7279_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7280_LT_TAGVAR(allow_undefined_flag, $1)=
7281_LT_TAGVAR(always_export_symbols, $1)=no
7282_LT_TAGVAR(archive_expsym_cmds, $1)=
7283_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7284_LT_TAGVAR(hardcode_direct, $1)=no
7285_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7286_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7287_LT_TAGVAR(hardcode_libdir_separator, $1)=
7288_LT_TAGVAR(hardcode_minus_L, $1)=no
7289_LT_TAGVAR(hardcode_automatic, $1)=no
7290_LT_TAGVAR(inherit_rpath, $1)=no
7291_LT_TAGVAR(module_cmds, $1)=
7292_LT_TAGVAR(module_expsym_cmds, $1)=
7293_LT_TAGVAR(link_all_deplibs, $1)=unknown
7294_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7295_LT_TAGVAR(reload_flag, $1)=$reload_flag
7296_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7297_LT_TAGVAR(no_undefined_flag, $1)=
7298_LT_TAGVAR(whole_archive_flag_spec, $1)=
7299_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7300
7301# Source file extension for f77 test sources.
7302ac_ext=f
7303
7304# Object file extension for compiled f77 test sources.
7305objext=o
7306_LT_TAGVAR(objext, $1)=$objext
7307
7308# No sense in running all these tests if we already determined that
7309# the F77 compiler isn't working.  Some variables (like enable_shared)
7310# are currently assumed to apply to all compilers on this platform,
7311# and will be corrupted by setting them based on a non-working compiler.
7312if test "$_lt_disable_F77" != yes; then
7313  # Code to be used in simple compile tests
7314  lt_simple_compile_test_code="\
7315      subroutine t
7316      return
7317      end
7318"
7319
7320  # Code to be used in simple link tests
7321  lt_simple_link_test_code="\
7322      program t
7323      end
7324"
7325
7326  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7327  _LT_TAG_COMPILER
7328
7329  # save warnings/boilerplate of simple test code
7330  _LT_COMPILER_BOILERPLATE
7331  _LT_LINKER_BOILERPLATE
7332
7333  # Allow CC to be a program name with arguments.
7334  lt_save_CC="$CC"
7335  lt_save_GCC=$GCC
7336  lt_save_CFLAGS=$CFLAGS
7337  CC=${F77-"f77"}
7338  CFLAGS=$FFLAGS
7339  compiler=$CC
7340  _LT_TAGVAR(compiler, $1)=$CC
7341  _LT_CC_BASENAME([$compiler])
7342  GCC=$G77
7343  if test -n "$compiler"; then
7344    AC_MSG_CHECKING([if libtool supports shared libraries])
7345    AC_MSG_RESULT([$can_build_shared])
7346
7347    AC_MSG_CHECKING([whether to build shared libraries])
7348    test "$can_build_shared" = "no" && enable_shared=no
7349
7350    # On AIX, shared libraries and static libraries use the same namespace, and
7351    # are all built from PIC.
7352    case $host_os in
7353      aix3*)
7354        test "$enable_shared" = yes && enable_static=no
7355        if test -n "$RANLIB"; then
7356          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7357          postinstall_cmds='$RANLIB $lib'
7358        fi
7359        ;;
7360      aix[[4-9]]*)
7361	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7362	  test "$enable_shared" = yes && enable_static=no
7363	fi
7364        ;;
7365    esac
7366    AC_MSG_RESULT([$enable_shared])
7367
7368    AC_MSG_CHECKING([whether to build static libraries])
7369    # Make sure either enable_shared or enable_static is yes.
7370    test "$enable_shared" = yes || enable_static=yes
7371    AC_MSG_RESULT([$enable_static])
7372
7373    _LT_TAGVAR(GCC, $1)="$G77"
7374    _LT_TAGVAR(LD, $1)="$LD"
7375
7376    ## CAVEAT EMPTOR:
7377    ## There is no encapsulation within the following macros, do not change
7378    ## the running order or otherwise move them around unless you know exactly
7379    ## what you are doing...
7380    _LT_COMPILER_PIC($1)
7381    _LT_COMPILER_C_O($1)
7382    _LT_COMPILER_FILE_LOCKS($1)
7383    _LT_LINKER_SHLIBS($1)
7384    _LT_SYS_DYNAMIC_LINKER($1)
7385    _LT_LINKER_HARDCODE_LIBPATH($1)
7386
7387    _LT_CONFIG($1)
7388  fi # test -n "$compiler"
7389
7390  GCC=$lt_save_GCC
7391  CC="$lt_save_CC"
7392  CFLAGS="$lt_save_CFLAGS"
7393fi # test "$_lt_disable_F77" != yes
7394
7395AC_LANG_POP
7396])# _LT_LANG_F77_CONFIG
7397
7398
7399# _LT_LANG_FC_CONFIG([TAG])
7400# -------------------------
7401# Ensure that the configuration variables for a Fortran compiler are
7402# suitably defined.  These variables are subsequently used by _LT_CONFIG
7403# to write the compiler configuration to `libtool'.
7404m4_defun([_LT_LANG_FC_CONFIG],
7405[AC_LANG_PUSH(Fortran)
7406
7407if test -z "$FC" || test "X$FC" = "Xno"; then
7408  _lt_disable_FC=yes
7409fi
7410
7411_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7412_LT_TAGVAR(allow_undefined_flag, $1)=
7413_LT_TAGVAR(always_export_symbols, $1)=no
7414_LT_TAGVAR(archive_expsym_cmds, $1)=
7415_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7416_LT_TAGVAR(hardcode_direct, $1)=no
7417_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7418_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7419_LT_TAGVAR(hardcode_libdir_separator, $1)=
7420_LT_TAGVAR(hardcode_minus_L, $1)=no
7421_LT_TAGVAR(hardcode_automatic, $1)=no
7422_LT_TAGVAR(inherit_rpath, $1)=no
7423_LT_TAGVAR(module_cmds, $1)=
7424_LT_TAGVAR(module_expsym_cmds, $1)=
7425_LT_TAGVAR(link_all_deplibs, $1)=unknown
7426_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7427_LT_TAGVAR(reload_flag, $1)=$reload_flag
7428_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7429_LT_TAGVAR(no_undefined_flag, $1)=
7430_LT_TAGVAR(whole_archive_flag_spec, $1)=
7431_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7432
7433# Source file extension for fc test sources.
7434ac_ext=${ac_fc_srcext-f}
7435
7436# Object file extension for compiled fc test sources.
7437objext=o
7438_LT_TAGVAR(objext, $1)=$objext
7439
7440# No sense in running all these tests if we already determined that
7441# the FC compiler isn't working.  Some variables (like enable_shared)
7442# are currently assumed to apply to all compilers on this platform,
7443# and will be corrupted by setting them based on a non-working compiler.
7444if test "$_lt_disable_FC" != yes; then
7445  # Code to be used in simple compile tests
7446  lt_simple_compile_test_code="\
7447      subroutine t
7448      return
7449      end
7450"
7451
7452  # Code to be used in simple link tests
7453  lt_simple_link_test_code="\
7454      program t
7455      end
7456"
7457
7458  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7459  _LT_TAG_COMPILER
7460
7461  # save warnings/boilerplate of simple test code
7462  _LT_COMPILER_BOILERPLATE
7463  _LT_LINKER_BOILERPLATE
7464
7465  # Allow CC to be a program name with arguments.
7466  lt_save_CC="$CC"
7467  lt_save_GCC=$GCC
7468  lt_save_CFLAGS=$CFLAGS
7469  CC=${FC-"f95"}
7470  CFLAGS=$FCFLAGS
7471  compiler=$CC
7472  GCC=$ac_cv_fc_compiler_gnu
7473
7474  _LT_TAGVAR(compiler, $1)=$CC
7475  _LT_CC_BASENAME([$compiler])
7476
7477  if test -n "$compiler"; then
7478    AC_MSG_CHECKING([if libtool supports shared libraries])
7479    AC_MSG_RESULT([$can_build_shared])
7480
7481    AC_MSG_CHECKING([whether to build shared libraries])
7482    test "$can_build_shared" = "no" && enable_shared=no
7483
7484    # On AIX, shared libraries and static libraries use the same namespace, and
7485    # are all built from PIC.
7486    case $host_os in
7487      aix3*)
7488        test "$enable_shared" = yes && enable_static=no
7489        if test -n "$RANLIB"; then
7490          archive_cmds="$archive_cmds~\$RANLIB \$lib"
7491          postinstall_cmds='$RANLIB $lib'
7492        fi
7493        ;;
7494      aix[[4-9]]*)
7495	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7496	  test "$enable_shared" = yes && enable_static=no
7497	fi
7498        ;;
7499    esac
7500    AC_MSG_RESULT([$enable_shared])
7501
7502    AC_MSG_CHECKING([whether to build static libraries])
7503    # Make sure either enable_shared or enable_static is yes.
7504    test "$enable_shared" = yes || enable_static=yes
7505    AC_MSG_RESULT([$enable_static])
7506
7507    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7508    _LT_TAGVAR(LD, $1)="$LD"
7509
7510    ## CAVEAT EMPTOR:
7511    ## There is no encapsulation within the following macros, do not change
7512    ## the running order or otherwise move them around unless you know exactly
7513    ## what you are doing...
7514    _LT_SYS_HIDDEN_LIBDEPS($1)
7515    _LT_COMPILER_PIC($1)
7516    _LT_COMPILER_C_O($1)
7517    _LT_COMPILER_FILE_LOCKS($1)
7518    _LT_LINKER_SHLIBS($1)
7519    _LT_SYS_DYNAMIC_LINKER($1)
7520    _LT_LINKER_HARDCODE_LIBPATH($1)
7521
7522    _LT_CONFIG($1)
7523  fi # test -n "$compiler"
7524
7525  GCC=$lt_save_GCC
7526  CC=$lt_save_CC
7527  CFLAGS=$lt_save_CFLAGS
7528fi # test "$_lt_disable_FC" != yes
7529
7530AC_LANG_POP
7531])# _LT_LANG_FC_CONFIG
7532
7533
7534# _LT_LANG_GCJ_CONFIG([TAG])
7535# --------------------------
7536# Ensure that the configuration variables for the GNU Java Compiler compiler
7537# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7538# to write the compiler configuration to `libtool'.
7539m4_defun([_LT_LANG_GCJ_CONFIG],
7540[AC_REQUIRE([LT_PROG_GCJ])dnl
7541AC_LANG_SAVE
7542
7543# Source file extension for Java test sources.
7544ac_ext=java
7545
7546# Object file extension for compiled Java test sources.
7547objext=o
7548_LT_TAGVAR(objext, $1)=$objext
7549
7550# Code to be used in simple compile tests
7551lt_simple_compile_test_code="class foo {}"
7552
7553# Code to be used in simple link tests
7554lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7555
7556# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7557_LT_TAG_COMPILER
7558
7559# save warnings/boilerplate of simple test code
7560_LT_COMPILER_BOILERPLATE
7561_LT_LINKER_BOILERPLATE
7562
7563# Allow CC to be a program name with arguments.
7564lt_save_CC=$CC
7565lt_save_CFLAGS=$CFLAGS
7566lt_save_GCC=$GCC
7567GCC=yes
7568CC=${GCJ-"gcj"}
7569CFLAGS=$GCJFLAGS
7570compiler=$CC
7571_LT_TAGVAR(compiler, $1)=$CC
7572_LT_TAGVAR(LD, $1)="$LD"
7573_LT_CC_BASENAME([$compiler])
7574
7575# GCJ did not exist at the time GCC didn't implicitly link libc in.
7576_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7577
7578_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7579_LT_TAGVAR(reload_flag, $1)=$reload_flag
7580_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7581
7582if test -n "$compiler"; then
7583  _LT_COMPILER_NO_RTTI($1)
7584  _LT_COMPILER_PIC($1)
7585  _LT_COMPILER_C_O($1)
7586  _LT_COMPILER_FILE_LOCKS($1)
7587  _LT_LINKER_SHLIBS($1)
7588  _LT_LINKER_HARDCODE_LIBPATH($1)
7589
7590  _LT_CONFIG($1)
7591fi
7592
7593AC_LANG_RESTORE
7594
7595GCC=$lt_save_GCC
7596CC=$lt_save_CC
7597CFLAGS=$lt_save_CFLAGS
7598])# _LT_LANG_GCJ_CONFIG
7599
7600
7601# _LT_LANG_GO_CONFIG([TAG])
7602# --------------------------
7603# Ensure that the configuration variables for the GNU Go compiler
7604# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7605# to write the compiler configuration to `libtool'.
7606m4_defun([_LT_LANG_GO_CONFIG],
7607[AC_REQUIRE([LT_PROG_GO])dnl
7608AC_LANG_SAVE
7609
7610# Source file extension for Go test sources.
7611ac_ext=go
7612
7613# Object file extension for compiled Go test sources.
7614objext=o
7615_LT_TAGVAR(objext, $1)=$objext
7616
7617# Code to be used in simple compile tests
7618lt_simple_compile_test_code="package main; func main() { }"
7619
7620# Code to be used in simple link tests
7621lt_simple_link_test_code='package main; func main() { }'
7622
7623# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7624_LT_TAG_COMPILER
7625
7626# save warnings/boilerplate of simple test code
7627_LT_COMPILER_BOILERPLATE
7628_LT_LINKER_BOILERPLATE
7629
7630# Allow CC to be a program name with arguments.
7631lt_save_CC=$CC
7632lt_save_CFLAGS=$CFLAGS
7633lt_save_GCC=$GCC
7634GCC=yes
7635CC=${GOC-"gccgo"}
7636CFLAGS=$GOFLAGS
7637compiler=$CC
7638_LT_TAGVAR(compiler, $1)=$CC
7639_LT_TAGVAR(LD, $1)="$LD"
7640_LT_CC_BASENAME([$compiler])
7641
7642# Go did not exist at the time GCC didn't implicitly link libc in.
7643_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7644
7645_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7646_LT_TAGVAR(reload_flag, $1)=$reload_flag
7647_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7648
7649if test -n "$compiler"; then
7650  _LT_COMPILER_NO_RTTI($1)
7651  _LT_COMPILER_PIC($1)
7652  _LT_COMPILER_C_O($1)
7653  _LT_COMPILER_FILE_LOCKS($1)
7654  _LT_LINKER_SHLIBS($1)
7655  _LT_LINKER_HARDCODE_LIBPATH($1)
7656
7657  _LT_CONFIG($1)
7658fi
7659
7660AC_LANG_RESTORE
7661
7662GCC=$lt_save_GCC
7663CC=$lt_save_CC
7664CFLAGS=$lt_save_CFLAGS
7665])# _LT_LANG_GO_CONFIG
7666
7667
7668# _LT_LANG_RC_CONFIG([TAG])
7669# -------------------------
7670# Ensure that the configuration variables for the Windows resource compiler
7671# are suitably defined.  These variables are subsequently used by _LT_CONFIG
7672# to write the compiler configuration to `libtool'.
7673m4_defun([_LT_LANG_RC_CONFIG],
7674[AC_REQUIRE([LT_PROG_RC])dnl
7675AC_LANG_SAVE
7676
7677# Source file extension for RC test sources.
7678ac_ext=rc
7679
7680# Object file extension for compiled RC test sources.
7681objext=o
7682_LT_TAGVAR(objext, $1)=$objext
7683
7684# Code to be used in simple compile tests
7685lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
7686
7687# Code to be used in simple link tests
7688lt_simple_link_test_code="$lt_simple_compile_test_code"
7689
7690# ltmain only uses $CC for tagged configurations so make sure $CC is set.
7691_LT_TAG_COMPILER
7692
7693# save warnings/boilerplate of simple test code
7694_LT_COMPILER_BOILERPLATE
7695_LT_LINKER_BOILERPLATE
7696
7697# Allow CC to be a program name with arguments.
7698lt_save_CC="$CC"
7699lt_save_CFLAGS=$CFLAGS
7700lt_save_GCC=$GCC
7701GCC=
7702CC=${RC-"windres"}
7703CFLAGS=
7704compiler=$CC
7705_LT_TAGVAR(compiler, $1)=$CC
7706_LT_CC_BASENAME([$compiler])
7707_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
7708
7709if test -n "$compiler"; then
7710  :
7711  _LT_CONFIG($1)
7712fi
7713
7714GCC=$lt_save_GCC
7715AC_LANG_RESTORE
7716CC=$lt_save_CC
7717CFLAGS=$lt_save_CFLAGS
7718])# _LT_LANG_RC_CONFIG
7719
7720
7721# LT_PROG_GCJ
7722# -----------
7723AC_DEFUN([LT_PROG_GCJ],
7724[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
7725  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
7726    [AC_CHECK_TOOL(GCJ, gcj,)
7727      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7728      AC_SUBST(GCJFLAGS)])])[]dnl
7729])
7730
7731# Old name:
7732AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
7733dnl aclocal-1.4 backwards compatibility:
7734dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
7735
7736
7737# LT_PROG_GO
7738# ----------
7739AC_DEFUN([LT_PROG_GO],
7740[AC_CHECK_TOOL(GOC, gccgo,)
7741])
7742
7743
7744# LT_PROG_RC
7745# ----------
7746AC_DEFUN([LT_PROG_RC],
7747[AC_CHECK_TOOL(RC, windres,)
7748])
7749
7750# Old name:
7751AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
7752dnl aclocal-1.4 backwards compatibility:
7753dnl AC_DEFUN([LT_AC_PROG_RC], [])
7754
7755
7756# _LT_DECL_EGREP
7757# --------------
7758# If we don't have a new enough Autoconf to choose the best grep
7759# available, choose the one first in the user's PATH.
7760m4_defun([_LT_DECL_EGREP],
7761[AC_REQUIRE([AC_PROG_EGREP])dnl
7762AC_REQUIRE([AC_PROG_FGREP])dnl
7763test -z "$GREP" && GREP=grep
7764_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
7765_LT_DECL([], [EGREP], [1], [An ERE matcher])
7766_LT_DECL([], [FGREP], [1], [A literal string matcher])
7767dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
7768AC_SUBST([GREP])
7769])
7770
7771
7772# _LT_DECL_OBJDUMP
7773# --------------
7774# If we don't have a new enough Autoconf to choose the best objdump
7775# available, choose the one first in the user's PATH.
7776m4_defun([_LT_DECL_OBJDUMP],
7777[AC_CHECK_TOOL(OBJDUMP, objdump, false)
7778test -z "$OBJDUMP" && OBJDUMP=objdump
7779_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
7780AC_SUBST([OBJDUMP])
7781])
7782
7783# _LT_DECL_DLLTOOL
7784# ----------------
7785# Ensure DLLTOOL variable is set.
7786m4_defun([_LT_DECL_DLLTOOL],
7787[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7788test -z "$DLLTOOL" && DLLTOOL=dlltool
7789_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
7790AC_SUBST([DLLTOOL])
7791])
7792
7793# _LT_DECL_SED
7794# ------------
7795# Check for a fully-functional sed program, that truncates
7796# as few characters as possible.  Prefer GNU sed if found.
7797m4_defun([_LT_DECL_SED],
7798[AC_PROG_SED
7799test -z "$SED" && SED=sed
7800Xsed="$SED -e 1s/^X//"
7801_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
7802_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
7803    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
7804])# _LT_DECL_SED
7805
7806m4_ifndef([AC_PROG_SED], [
7807# NOTE: This macro has been submitted for inclusion into   #
7808#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7809#  a released version of Autoconf we should remove this    #
7810#  macro and use it instead.                               #
7811
7812m4_defun([AC_PROG_SED],
7813[AC_MSG_CHECKING([for a sed that does not truncate output])
7814AC_CACHE_VAL(lt_cv_path_SED,
7815[# Loop through the user's path and test for sed and gsed.
7816# Then use that list of sed's as ones to test for truncation.
7817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7818for as_dir in $PATH
7819do
7820  IFS=$as_save_IFS
7821  test -z "$as_dir" && as_dir=.
7822  for lt_ac_prog in sed gsed; do
7823    for ac_exec_ext in '' $ac_executable_extensions; do
7824      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7825        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7826      fi
7827    done
7828  done
7829done
7830IFS=$as_save_IFS
7831lt_ac_max=0
7832lt_ac_count=0
7833# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7834# along with /bin/sed that truncates output.
7835for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7836  test ! -f $lt_ac_sed && continue
7837  cat /dev/null > conftest.in
7838  lt_ac_count=0
7839  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7840  # Check for GNU sed and select it if it is found.
7841  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7842    lt_cv_path_SED=$lt_ac_sed
7843    break
7844  fi
7845  while true; do
7846    cat conftest.in conftest.in >conftest.tmp
7847    mv conftest.tmp conftest.in
7848    cp conftest.in conftest.nl
7849    echo >>conftest.nl
7850    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7851    cmp -s conftest.out conftest.nl || break
7852    # 10000 chars as input seems more than enough
7853    test $lt_ac_count -gt 10 && break
7854    lt_ac_count=`expr $lt_ac_count + 1`
7855    if test $lt_ac_count -gt $lt_ac_max; then
7856      lt_ac_max=$lt_ac_count
7857      lt_cv_path_SED=$lt_ac_sed
7858    fi
7859  done
7860done
7861])
7862SED=$lt_cv_path_SED
7863AC_SUBST([SED])
7864AC_MSG_RESULT([$SED])
7865])#AC_PROG_SED
7866])#m4_ifndef
7867
7868# Old name:
7869AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7870dnl aclocal-1.4 backwards compatibility:
7871dnl AC_DEFUN([LT_AC_PROG_SED], [])
7872
7873
7874# _LT_CHECK_SHELL_FEATURES
7875# ------------------------
7876# Find out whether the shell is Bourne or XSI compatible,
7877# or has some other useful features.
7878m4_defun([_LT_CHECK_SHELL_FEATURES],
7879[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7880# Try some XSI features
7881xsi_shell=no
7882( _lt_dummy="a/b/c"
7883  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7884      = c,a/b,b/c, \
7885    && eval 'test $(( 1 + 1 )) -eq 2 \
7886    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7887  && xsi_shell=yes
7888AC_MSG_RESULT([$xsi_shell])
7889_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7890
7891AC_MSG_CHECKING([whether the shell understands "+="])
7892lt_shell_append=no
7893( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7894    >/dev/null 2>&1 \
7895  && lt_shell_append=yes
7896AC_MSG_RESULT([$lt_shell_append])
7897_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7898
7899if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7900  lt_unset=unset
7901else
7902  lt_unset=false
7903fi
7904_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7905
7906# test EBCDIC or ASCII
7907case `echo X|tr X '\101'` in
7908 A) # ASCII based system
7909    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7910  lt_SP2NL='tr \040 \012'
7911  lt_NL2SP='tr \015\012 \040\040'
7912  ;;
7913 *) # EBCDIC based system
7914  lt_SP2NL='tr \100 \n'
7915  lt_NL2SP='tr \r\n \100\100'
7916  ;;
7917esac
7918_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7919_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7920])# _LT_CHECK_SHELL_FEATURES
7921
7922
7923# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7924# ------------------------------------------------------
7925# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7926# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7927m4_defun([_LT_PROG_FUNCTION_REPLACE],
7928[dnl {
7929sed -e '/^$1 ()$/,/^} # $1 /c\
7930$1 ()\
7931{\
7932m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
7933} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7934  && mv -f "$cfgfile.tmp" "$cfgfile" \
7935    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7936test 0 -eq $? || _lt_function_replace_fail=:
7937])
7938
7939
7940# _LT_PROG_REPLACE_SHELLFNS
7941# -------------------------
7942# Replace existing portable implementations of several shell functions with
7943# equivalent extended shell implementations where those features are available..
7944m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7945[if test x"$xsi_shell" = xyes; then
7946  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7947    case ${1} in
7948      */*) func_dirname_result="${1%/*}${2}" ;;
7949      *  ) func_dirname_result="${3}" ;;
7950    esac])
7951
7952  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7953    func_basename_result="${1##*/}"])
7954
7955  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7956    case ${1} in
7957      */*) func_dirname_result="${1%/*}${2}" ;;
7958      *  ) func_dirname_result="${3}" ;;
7959    esac
7960    func_basename_result="${1##*/}"])
7961
7962  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7963    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7964    # positional parameters, so assign one to ordinary parameter first.
7965    func_stripname_result=${3}
7966    func_stripname_result=${func_stripname_result#"${1}"}
7967    func_stripname_result=${func_stripname_result%"${2}"}])
7968
7969  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7970    func_split_long_opt_name=${1%%=*}
7971    func_split_long_opt_arg=${1#*=}])
7972
7973  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7974    func_split_short_opt_arg=${1#??}
7975    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7976
7977  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7978    case ${1} in
7979      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7980      *)    func_lo2o_result=${1} ;;
7981    esac])
7982
7983  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
7984
7985  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
7986
7987  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
7988fi
7989
7990if test x"$lt_shell_append" = xyes; then
7991  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
7992
7993  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7994    func_quote_for_eval "${2}"
7995dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7996    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7997
7998  # Save a `func_append' function call where possible by direct use of '+='
7999  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8000    && mv -f "$cfgfile.tmp" "$cfgfile" \
8001      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8002  test 0 -eq $? || _lt_function_replace_fail=:
8003else
8004  # Save a `func_append' function call even when '+=' is not available
8005  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8006    && mv -f "$cfgfile.tmp" "$cfgfile" \
8007      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8008  test 0 -eq $? || _lt_function_replace_fail=:
8009fi
8010
8011if test x"$_lt_function_replace_fail" = x":"; then
8012  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8013fi
8014])
8015
8016# _LT_PATH_CONVERSION_FUNCTIONS
8017# -----------------------------
8018# Determine which file name conversion functions should be used by
8019# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8020# for certain cross-compile configurations and native mingw.
8021m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8022[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8023AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8024AC_MSG_CHECKING([how to convert $build file names to $host format])
8025AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8026[case $host in
8027  *-*-mingw* )
8028    case $build in
8029      *-*-mingw* ) # actually msys
8030        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8031        ;;
8032      *-*-cygwin* )
8033        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8034        ;;
8035      * ) # otherwise, assume *nix
8036        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8037        ;;
8038    esac
8039    ;;
8040  *-*-cygwin* )
8041    case $build in
8042      *-*-mingw* ) # actually msys
8043        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8044        ;;
8045      *-*-cygwin* )
8046        lt_cv_to_host_file_cmd=func_convert_file_noop
8047        ;;
8048      * ) # otherwise, assume *nix
8049        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8050        ;;
8051    esac
8052    ;;
8053  * ) # unhandled hosts (and "normal" native builds)
8054    lt_cv_to_host_file_cmd=func_convert_file_noop
8055    ;;
8056esac
8057])
8058to_host_file_cmd=$lt_cv_to_host_file_cmd
8059AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8060_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8061         [0], [convert $build file names to $host format])dnl
8062
8063AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8064AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8065[#assume ordinary cross tools, or native build.
8066lt_cv_to_tool_file_cmd=func_convert_file_noop
8067case $host in
8068  *-*-mingw* )
8069    case $build in
8070      *-*-mingw* ) # actually msys
8071        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8072        ;;
8073    esac
8074    ;;
8075esac
8076])
8077to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8078AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8079_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8080         [0], [convert $build files to toolchain format])dnl
8081])# _LT_PATH_CONVERSION_FUNCTIONS
8082
8083# ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
8084#
8085#   Copyright (C) 1999-2006, 2007, 2008, 2011 Free Software Foundation, Inc.
8086#   Written by Thomas Tanner, 1999
8087#
8088# This file is free software; the Free Software Foundation gives
8089# unlimited permission to copy and/or distribute it, with or without
8090# modifications, as long as this notice is preserved.
8091
8092# serial 18 LTDL_INIT
8093
8094# LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
8095# ------------------------------------------
8096# DIRECTORY contains the libltdl sources.  It is okay to call this
8097# function multiple times, as long as the same DIRECTORY is always given.
8098AC_DEFUN([LT_CONFIG_LTDL_DIR],
8099[AC_BEFORE([$0], [LTDL_INIT])
8100_$0($*)
8101])# LT_CONFIG_LTDL_DIR
8102
8103# We break this out into a separate macro, so that we can call it safely
8104# internally without being caught accidentally by the sed scan in libtoolize.
8105m4_defun([_LT_CONFIG_LTDL_DIR],
8106[dnl remove trailing slashes
8107m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
8108m4_case(_LTDL_DIR,
8109	[], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
8110	     m4_if(_ARG_DIR, [.],
8111	             [],
8112		 [m4_define([_LTDL_DIR], _ARG_DIR)
8113	          _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
8114    [m4_if(_ARG_DIR, _LTDL_DIR,
8115	    [],
8116	[m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
8117m4_popdef([_ARG_DIR])
8118])# _LT_CONFIG_LTDL_DIR
8119
8120# Initialise:
8121m4_define([_LTDL_DIR], [])
8122
8123
8124# _LT_BUILD_PREFIX
8125# ----------------
8126# If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
8127# to `${top_builddir}/'.
8128m4_define([_LT_BUILD_PREFIX],
8129[m4_ifdef([AC_AUTOCONF_VERSION],
8130   [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
8131	  [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
8132			  [${top_build_prefix}],
8133			  [${top_builddir}/])],
8134	  [${top_build_prefix}])],
8135   [${top_builddir}/])[]dnl
8136])
8137
8138
8139# LTDL_CONVENIENCE
8140# ----------------
8141# sets LIBLTDL to the link flags for the libltdl convenience library and
8142# LTDLINCL to the include flags for the libltdl header and adds
8143# --enable-ltdl-convenience to the configure arguments.  Note that
8144# AC_CONFIG_SUBDIRS is not called here.  LIBLTDL will be prefixed with
8145# '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
8146# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
8147# quotes!).  If your package is not flat and you're not using automake,
8148# define top_build_prefix, top_builddir, and top_srcdir appropriately
8149# in your Makefiles.
8150AC_DEFUN([LTDL_CONVENIENCE],
8151[AC_BEFORE([$0], [LTDL_INIT])dnl
8152dnl Although the argument is deprecated and no longer documented,
8153dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
8154dnl here make sure it is the same as any other declaration of libltdl's
8155dnl location!  This also ensures lt_ltdl_dir is set when configure.ac is
8156dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8157m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8158_$0()
8159])# LTDL_CONVENIENCE
8160
8161# AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
8162# now we have LT_CONFIG_LTDL_DIR:
8163AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
8164[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8165_LTDL_CONVENIENCE])
8166
8167dnl aclocal-1.4 backwards compatibility:
8168dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
8169
8170
8171# _LTDL_CONVENIENCE
8172# -----------------
8173# Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
8174m4_defun([_LTDL_CONVENIENCE],
8175[case $enable_ltdl_convenience in
8176  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
8177  "") enable_ltdl_convenience=yes
8178      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
8179esac
8180LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
8181LTDLDEPS=$LIBLTDL
8182LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
8183
8184AC_SUBST([LIBLTDL])
8185AC_SUBST([LTDLDEPS])
8186AC_SUBST([LTDLINCL])
8187
8188# For backwards non-gettext consistent compatibility...
8189INCLTDL="$LTDLINCL"
8190AC_SUBST([INCLTDL])
8191])# _LTDL_CONVENIENCE
8192
8193
8194# LTDL_INSTALLABLE
8195# ----------------
8196# sets LIBLTDL to the link flags for the libltdl installable library
8197# and LTDLINCL to the include flags for the libltdl header and adds
8198# --enable-ltdl-install to the configure arguments.  Note that
8199# AC_CONFIG_SUBDIRS is not called from here.  If an installed libltdl
8200# is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
8201# available, otherwise with '${top_builddir}/', and LTDLINCL will be
8202# prefixed with '${top_srcdir}/' (note the single quotes!).  If your
8203# package is not flat and you're not using automake, define top_build_prefix,
8204# top_builddir, and top_srcdir appropriately in your Makefiles.
8205# In the future, this macro may have to be called after LT_INIT.
8206AC_DEFUN([LTDL_INSTALLABLE],
8207[AC_BEFORE([$0], [LTDL_INIT])dnl
8208dnl Although the argument is deprecated and no longer documented,
8209dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
8210dnl here make sure it is the same as any other declaration of libltdl's
8211dnl location!  This also ensures lt_ltdl_dir is set when configure.ac is
8212dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
8213m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
8214_$0()
8215])# LTDL_INSTALLABLE
8216
8217# AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
8218# now we have LT_CONFIG_LTDL_DIR:
8219AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
8220[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
8221_LTDL_INSTALLABLE])
8222
8223dnl aclocal-1.4 backwards compatibility:
8224dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
8225
8226
8227# _LTDL_INSTALLABLE
8228# -----------------
8229# Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
8230m4_defun([_LTDL_INSTALLABLE],
8231[if test -f $prefix/lib/libltdl.la; then
8232  lt_save_LDFLAGS="$LDFLAGS"
8233  LDFLAGS="-L$prefix/lib $LDFLAGS"
8234  AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
8235  LDFLAGS="$lt_save_LDFLAGS"
8236  if test x"${lt_lib_ltdl-no}" = xyes; then
8237    if test x"$enable_ltdl_install" != xyes; then
8238      # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
8239      AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
8240      enable_ltdl_install=no
8241    fi
8242  elif test x"$enable_ltdl_install" = xno; then
8243    AC_MSG_WARN([libltdl not installed, but installation disabled])
8244  fi
8245fi
8246
8247# If configure.ac declared an installable ltdl, and the user didn't override
8248# with --disable-ltdl-install, we will install the shipped libltdl.
8249case $enable_ltdl_install in
8250  no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
8251      LIBLTDL="-lltdl"
8252      LTDLDEPS=
8253      LTDLINCL=
8254      ;;
8255  *)  enable_ltdl_install=yes
8256      ac_configure_args="$ac_configure_args --enable-ltdl-install"
8257      LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
8258      LTDLDEPS=$LIBLTDL
8259      LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
8260      ;;
8261esac
8262
8263AC_SUBST([LIBLTDL])
8264AC_SUBST([LTDLDEPS])
8265AC_SUBST([LTDLINCL])
8266
8267# For backwards non-gettext consistent compatibility...
8268INCLTDL="$LTDLINCL"
8269AC_SUBST([INCLTDL])
8270])# LTDL_INSTALLABLE
8271
8272
8273# _LTDL_MODE_DISPATCH
8274# -------------------
8275m4_define([_LTDL_MODE_DISPATCH],
8276[dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
8277m4_if(_LTDL_DIR, [],
8278	[],
8279    dnl if _LTDL_MODE was not set already, the default value is `subproject':
8280    [m4_case(m4_default(_LTDL_MODE, [subproject]),
8281	  [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
8282			  _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
8283	  [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
8284	  [recursive], [],
8285	[m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
8286dnl Be careful not to expand twice:
8287m4_define([$0], [])
8288])# _LTDL_MODE_DISPATCH
8289
8290
8291# _LT_LIBOBJ(MODULE_NAME)
8292# -----------------------
8293# Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
8294# of into LIBOBJS.
8295AC_DEFUN([_LT_LIBOBJ], [
8296  m4_pattern_allow([^_LT_LIBOBJS$])
8297  _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
8298])# _LT_LIBOBJS
8299
8300
8301# LTDL_INIT([OPTIONS])
8302# --------------------
8303# Clients of libltdl can use this macro to allow the installer to
8304# choose between a shipped copy of the ltdl sources or a preinstalled
8305# version of the library.  If the shipped ltdl sources are not in a
8306# subdirectory named libltdl, the directory name must be given by
8307# LT_CONFIG_LTDL_DIR.
8308AC_DEFUN([LTDL_INIT],
8309[dnl Parse OPTIONS
8310_LT_SET_OPTIONS([$0], [$1])
8311
8312dnl We need to keep our own list of libobjs separate from our parent project,
8313dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
8314dnl we look for our own LIBOBJs.
8315m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
8316m4_pushdef([AC_LIBSOURCES])
8317
8318dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
8319m4_if(_LTDL_MODE, [],
8320        [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
8321        m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
8322                [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
8323
8324AC_ARG_WITH([included_ltdl],
8325    [AS_HELP_STRING([--with-included-ltdl],
8326                    [use the GNU ltdl sources included here])])
8327
8328if test "x$with_included_ltdl" != xyes; then
8329  # We are not being forced to use the included libltdl sources, so
8330  # decide whether there is a useful installed version we can use.
8331  AC_CHECK_HEADER([ltdl.h],
8332      [AC_CHECK_DECL([lt_dlinterface_register],
8333	   [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
8334	       [with_included_ltdl=no],
8335	       [with_included_ltdl=yes])],
8336	   [with_included_ltdl=yes],
8337	   [AC_INCLUDES_DEFAULT
8338	    #include <ltdl.h>])],
8339      [with_included_ltdl=yes],
8340      [AC_INCLUDES_DEFAULT]
8341  )
8342fi
8343
8344dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
8345dnl was called yet, then for old times' sake, we assume libltdl is in an
8346dnl eponymous directory:
8347AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
8348
8349AC_ARG_WITH([ltdl_include],
8350    [AS_HELP_STRING([--with-ltdl-include=DIR],
8351                    [use the ltdl headers installed in DIR])])
8352
8353if test -n "$with_ltdl_include"; then
8354  if test -f "$with_ltdl_include/ltdl.h"; then :
8355  else
8356    AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
8357  fi
8358else
8359  with_ltdl_include=no
8360fi
8361
8362AC_ARG_WITH([ltdl_lib],
8363    [AS_HELP_STRING([--with-ltdl-lib=DIR],
8364                    [use the libltdl.la installed in DIR])])
8365
8366if test -n "$with_ltdl_lib"; then
8367  if test -f "$with_ltdl_lib/libltdl.la"; then :
8368  else
8369    AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
8370  fi
8371else
8372  with_ltdl_lib=no
8373fi
8374
8375case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
8376  ,yes,no,no,)
8377	m4_case(m4_default(_LTDL_TYPE, [convenience]),
8378	    [convenience], [_LTDL_CONVENIENCE],
8379	    [installable], [_LTDL_INSTALLABLE],
8380	  [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
8381	;;
8382  ,no,no,no,)
8383	# If the included ltdl is not to be used, then use the
8384	# preinstalled libltdl we found.
8385	AC_DEFINE([HAVE_LTDL], [1],
8386	  [Define this if a modern libltdl is already installed])
8387	LIBLTDL=-lltdl
8388	LTDLDEPS=
8389	LTDLINCL=
8390	;;
8391  ,no*,no,*)
8392	AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
8393	;;
8394  *)	with_included_ltdl=no
8395	LIBLTDL="-L$with_ltdl_lib -lltdl"
8396	LTDLDEPS=
8397	LTDLINCL="-I$with_ltdl_include"
8398	;;
8399esac
8400INCLTDL="$LTDLINCL"
8401
8402# Report our decision...
8403AC_MSG_CHECKING([where to find libltdl headers])
8404AC_MSG_RESULT([$LTDLINCL])
8405AC_MSG_CHECKING([where to find libltdl library])
8406AC_MSG_RESULT([$LIBLTDL])
8407
8408_LTDL_SETUP
8409
8410dnl restore autoconf definition.
8411m4_popdef([AC_LIBOBJ])
8412m4_popdef([AC_LIBSOURCES])
8413
8414AC_CONFIG_COMMANDS_PRE([
8415    _ltdl_libobjs=
8416    _ltdl_ltlibobjs=
8417    if test -n "$_LT_LIBOBJS"; then
8418      # Remove the extension.
8419      _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
8420      for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
8421        _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
8422        _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
8423      done
8424    fi
8425    AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
8426    AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
8427])
8428
8429# Only expand once:
8430m4_define([LTDL_INIT])
8431])# LTDL_INIT
8432
8433# Old names:
8434AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
8435AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
8436AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
8437dnl aclocal-1.4 backwards compatibility:
8438dnl AC_DEFUN([AC_LIB_LTDL], [])
8439dnl AC_DEFUN([AC_WITH_LTDL], [])
8440dnl AC_DEFUN([LT_WITH_LTDL], [])
8441
8442
8443# _LTDL_SETUP
8444# -----------
8445# Perform all the checks necessary for compilation of the ltdl objects
8446#  -- including compiler checks and header checks.  This is a public
8447# interface  mainly for the benefit of libltdl's own configure.ac, most
8448# other users should call LTDL_INIT instead.
8449AC_DEFUN([_LTDL_SETUP],
8450[AC_REQUIRE([AC_PROG_CC])dnl
8451AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
8452AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
8453AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
8454AC_REQUIRE([LT_LIB_DLLOAD])dnl
8455AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8456AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
8457AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
8458AC_REQUIRE([gl_FUNC_ARGZ])dnl
8459
8460m4_require([_LT_CHECK_OBJDIR])dnl
8461m4_require([_LT_HEADER_DLFCN])dnl
8462m4_require([_LT_CHECK_DLPREOPEN])dnl
8463m4_require([_LT_DECL_SED])dnl
8464
8465dnl Don't require this, or it will be expanded earlier than the code
8466dnl that sets the variables it relies on:
8467_LT_ENABLE_INSTALL
8468
8469dnl _LTDL_MODE specific code must be called at least once:
8470_LTDL_MODE_DISPATCH
8471
8472# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
8473# the user used.  This is so that ltdl.h can pick up the parent projects
8474# config.h file, The first file in AC_CONFIG_HEADERS must contain the
8475# definitions required by ltdl.c.
8476# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
8477AC_CONFIG_COMMANDS_PRE([dnl
8478m4_pattern_allow([^LT_CONFIG_H$])dnl
8479m4_ifset([AH_HEADER],
8480    [LT_CONFIG_H=AH_HEADER],
8481    [m4_ifset([AC_LIST_HEADERS],
8482	    [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[      ]]*,,;s,[[ :]].*$,,'`],
8483	[])])])
8484AC_SUBST([LT_CONFIG_H])
8485
8486AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
8487	[], [], [AC_INCLUDES_DEFAULT])
8488
8489AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
8490AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
8491
8492m4_pattern_allow([LT_LIBEXT])dnl
8493AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
8494
8495name=
8496eval "lt_libprefix=\"$libname_spec\""
8497m4_pattern_allow([LT_LIBPREFIX])dnl
8498AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix])
8499
8500name=ltdl
8501eval "LTDLOPEN=\"$libname_spec\""
8502AC_SUBST([LTDLOPEN])
8503])# _LTDL_SETUP
8504
8505
8506# _LT_ENABLE_INSTALL
8507# ------------------
8508m4_define([_LT_ENABLE_INSTALL],
8509[AC_ARG_ENABLE([ltdl-install],
8510    [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
8511
8512case ,${enable_ltdl_install},${enable_ltdl_convenience} in
8513  *yes*) ;;
8514  *) enable_ltdl_convenience=yes ;;
8515esac
8516
8517m4_ifdef([AM_CONDITIONAL],
8518[AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
8519 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
8520])# _LT_ENABLE_INSTALL
8521
8522
8523# LT_SYS_DLOPEN_DEPLIBS
8524# ---------------------
8525AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
8526[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8527AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
8528  [lt_cv_sys_dlopen_deplibs],
8529  [# PORTME does your system automatically load deplibs for dlopen?
8530  # or its logical equivalent (e.g. shl_load for HP-UX < 11)
8531  # For now, we just catch OSes we know something about -- in the
8532  # future, we'll try test this programmatically.
8533  lt_cv_sys_dlopen_deplibs=unknown
8534  case $host_os in
8535  aix3*|aix4.1.*|aix4.2.*)
8536    # Unknown whether this is true for these versions of AIX, but
8537    # we want this `case' here to explicitly catch those versions.
8538    lt_cv_sys_dlopen_deplibs=unknown
8539    ;;
8540  aix[[4-9]]*)
8541    lt_cv_sys_dlopen_deplibs=yes
8542    ;;
8543  amigaos*)
8544    case $host_cpu in
8545    powerpc)
8546      lt_cv_sys_dlopen_deplibs=no
8547      ;;
8548    esac
8549    ;;
8550  darwin*)
8551    # Assuming the user has installed a libdl from somewhere, this is true
8552    # If you are looking for one http://www.opendarwin.org/projects/dlcompat
8553    lt_cv_sys_dlopen_deplibs=yes
8554    ;;
8555  freebsd* | dragonfly*)
8556    lt_cv_sys_dlopen_deplibs=yes
8557    ;;
8558  gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
8559    # GNU and its variants, using gnu ld.so (Glibc)
8560    lt_cv_sys_dlopen_deplibs=yes
8561    ;;
8562  hpux10*|hpux11*)
8563    lt_cv_sys_dlopen_deplibs=yes
8564    ;;
8565  interix*)
8566    lt_cv_sys_dlopen_deplibs=yes
8567    ;;
8568  irix[[12345]]*|irix6.[[01]]*)
8569    # Catch all versions of IRIX before 6.2, and indicate that we don't
8570    # know how it worked for any of those versions.
8571    lt_cv_sys_dlopen_deplibs=unknown
8572    ;;
8573  irix*)
8574    # The case above catches anything before 6.2, and it's known that
8575    # at 6.2 and later dlopen does load deplibs.
8576    lt_cv_sys_dlopen_deplibs=yes
8577    ;;
8578  netbsd* | netbsdelf*-gnu)
8579    lt_cv_sys_dlopen_deplibs=yes
8580    ;;
8581  openbsd*)
8582    lt_cv_sys_dlopen_deplibs=yes
8583    ;;
8584  osf[[1234]]*)
8585    # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
8586    # it did *not* use an RPATH in a shared library to find objects the
8587    # library depends on, so we explicitly say `no'.
8588    lt_cv_sys_dlopen_deplibs=no
8589    ;;
8590  osf5.0|osf5.0a|osf5.1)
8591    # dlopen *does* load deplibs and with the right loader patch applied
8592    # it even uses RPATH in a shared library to search for shared objects
8593    # that the library depends on, but there's no easy way to know if that
8594    # patch is installed.  Since this is the case, all we can really
8595    # say is unknown -- it depends on the patch being installed.  If
8596    # it is, this changes to `yes'.  Without it, it would be `no'.
8597    lt_cv_sys_dlopen_deplibs=unknown
8598    ;;
8599  osf*)
8600    # the two cases above should catch all versions of osf <= 5.1.  Read
8601    # the comments above for what we know about them.
8602    # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
8603    # is used to find them so we can finally say `yes'.
8604    lt_cv_sys_dlopen_deplibs=yes
8605    ;;
8606  qnx*)
8607    lt_cv_sys_dlopen_deplibs=yes
8608    ;;
8609  solaris*)
8610    lt_cv_sys_dlopen_deplibs=yes
8611    ;;
8612  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8613    libltdl_cv_sys_dlopen_deplibs=yes
8614    ;;
8615  esac
8616  ])
8617if test "$lt_cv_sys_dlopen_deplibs" != yes; then
8618 AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
8619    [Define if the OS needs help to load dependent libraries for dlopen().])
8620fi
8621])# LT_SYS_DLOPEN_DEPLIBS
8622
8623# Old name:
8624AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
8625dnl aclocal-1.4 backwards compatibility:
8626dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
8627
8628
8629# LT_SYS_MODULE_EXT
8630# -----------------
8631AC_DEFUN([LT_SYS_MODULE_EXT],
8632[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8633AC_CACHE_CHECK([which extension is used for runtime loadable modules],
8634  [libltdl_cv_shlibext],
8635[
8636module=yes
8637eval libltdl_cv_shlibext=$shrext_cmds
8638module=no
8639eval libltdl_cv_shrext=$shrext_cmds
8640  ])
8641if test -n "$libltdl_cv_shlibext"; then
8642  m4_pattern_allow([LT_MODULE_EXT])dnl
8643  AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
8644    [Define to the extension used for runtime loadable modules, say, ".so".])
8645fi
8646if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then
8647  m4_pattern_allow([LT_SHARED_EXT])dnl
8648  AC_DEFINE_UNQUOTED([LT_SHARED_EXT], ["$libltdl_cv_shrext"],
8649    [Define to the shared library suffix, say, ".dylib".])
8650fi
8651])# LT_SYS_MODULE_EXT
8652
8653# Old name:
8654AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
8655dnl aclocal-1.4 backwards compatibility:
8656dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
8657
8658
8659# LT_SYS_MODULE_PATH
8660# ------------------
8661AC_DEFUN([LT_SYS_MODULE_PATH],
8662[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8663AC_CACHE_CHECK([which variable specifies run-time module search path],
8664  [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
8665if test -n "$lt_cv_module_path_var"; then
8666  m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
8667  AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
8668    [Define to the name of the environment variable that determines the run-time module search path.])
8669fi
8670])# LT_SYS_MODULE_PATH
8671
8672# Old name:
8673AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
8674dnl aclocal-1.4 backwards compatibility:
8675dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
8676
8677
8678# LT_SYS_DLSEARCH_PATH
8679# --------------------
8680AC_DEFUN([LT_SYS_DLSEARCH_PATH],
8681[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8682AC_CACHE_CHECK([for the default library search path],
8683  [lt_cv_sys_dlsearch_path],
8684  [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
8685if test -n "$lt_cv_sys_dlsearch_path"; then
8686  sys_dlsearch_path=
8687  for dir in $lt_cv_sys_dlsearch_path; do
8688    if test -z "$sys_dlsearch_path"; then
8689      sys_dlsearch_path="$dir"
8690    else
8691      sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
8692    fi
8693  done
8694  m4_pattern_allow([LT_DLSEARCH_PATH])dnl
8695  AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
8696    [Define to the system default library search path.])
8697fi
8698])# LT_SYS_DLSEARCH_PATH
8699
8700# Old name:
8701AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
8702dnl aclocal-1.4 backwards compatibility:
8703dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
8704
8705
8706# _LT_CHECK_DLPREOPEN
8707# -------------------
8708m4_defun([_LT_CHECK_DLPREOPEN],
8709[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8710AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
8711  [libltdl_cv_preloaded_symbols],
8712  [if test -n "$lt_cv_sys_global_symbol_pipe"; then
8713    libltdl_cv_preloaded_symbols=yes
8714  else
8715    libltdl_cv_preloaded_symbols=no
8716  fi
8717  ])
8718if test x"$libltdl_cv_preloaded_symbols" = xyes; then
8719  AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
8720    [Define if libtool can extract symbol lists from object files.])
8721fi
8722])# _LT_CHECK_DLPREOPEN
8723
8724
8725# LT_LIB_DLLOAD
8726# -------------
8727AC_DEFUN([LT_LIB_DLLOAD],
8728[m4_pattern_allow([^LT_DLLOADERS$])
8729LT_DLLOADERS=
8730AC_SUBST([LT_DLLOADERS])
8731
8732AC_LANG_PUSH([C])
8733
8734LIBADD_DLOPEN=
8735AC_SEARCH_LIBS([dlopen], [dl],
8736	[AC_DEFINE([HAVE_LIBDL], [1],
8737		   [Define if you have the libdl library or equivalent.])
8738	if test "$ac_cv_search_dlopen" != "none required" ; then
8739	  LIBADD_DLOPEN="-ldl"
8740	fi
8741	libltdl_cv_lib_dl_dlopen="yes"
8742	LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
8743    [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
8744#  include <dlfcn.h>
8745#endif
8746    ]], [[dlopen(0, 0);]])],
8747	    [AC_DEFINE([HAVE_LIBDL], [1],
8748		       [Define if you have the libdl library or equivalent.])
8749	    libltdl_cv_func_dlopen="yes"
8750	    LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
8751	[AC_CHECK_LIB([svld], [dlopen],
8752		[AC_DEFINE([HAVE_LIBDL], [1],
8753			 [Define if you have the libdl library or equivalent.])
8754	        LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
8755		LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
8756if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
8757then
8758  lt_save_LIBS="$LIBS"
8759  LIBS="$LIBS $LIBADD_DLOPEN"
8760  AC_CHECK_FUNCS([dlerror])
8761  LIBS="$lt_save_LIBS"
8762fi
8763AC_SUBST([LIBADD_DLOPEN])
8764
8765LIBADD_SHL_LOAD=
8766AC_CHECK_FUNC([shl_load],
8767	[AC_DEFINE([HAVE_SHL_LOAD], [1],
8768		   [Define if you have the shl_load function.])
8769	LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
8770    [AC_CHECK_LIB([dld], [shl_load],
8771	    [AC_DEFINE([HAVE_SHL_LOAD], [1],
8772		       [Define if you have the shl_load function.])
8773	    LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
8774	    LIBADD_SHL_LOAD="-ldld"])])
8775AC_SUBST([LIBADD_SHL_LOAD])
8776
8777case $host_os in
8778darwin[[1567]].*)
8779# We only want this for pre-Mac OS X 10.4.
8780  AC_CHECK_FUNC([_dyld_func_lookup],
8781	[AC_DEFINE([HAVE_DYLD], [1],
8782		   [Define if you have the _dyld_func_lookup function.])
8783	LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
8784  ;;
8785beos*)
8786  LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
8787  ;;
8788cygwin* | mingw* | os2* | pw32*)
8789  AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
8790  LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
8791  ;;
8792esac
8793
8794AC_CHECK_LIB([dld], [dld_link],
8795	[AC_DEFINE([HAVE_DLD], [1],
8796		   [Define if you have the GNU dld library.])
8797		LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
8798AC_SUBST([LIBADD_DLD_LINK])
8799
8800m4_pattern_allow([^LT_DLPREOPEN$])
8801LT_DLPREOPEN=
8802if test -n "$LT_DLLOADERS"
8803then
8804  for lt_loader in $LT_DLLOADERS; do
8805    LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
8806  done
8807  AC_DEFINE([HAVE_LIBDLLOADER], [1],
8808            [Define if libdlloader will be built on this platform])
8809fi
8810AC_SUBST([LT_DLPREOPEN])
8811
8812dnl This isn't used anymore, but set it for backwards compatibility
8813LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
8814AC_SUBST([LIBADD_DL])
8815
8816AC_LANG_POP
8817])# LT_LIB_DLLOAD
8818
8819# Old name:
8820AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
8821dnl aclocal-1.4 backwards compatibility:
8822dnl AC_DEFUN([AC_LTDL_DLLIB], [])
8823
8824
8825# LT_SYS_SYMBOL_USCORE
8826# --------------------
8827# does the compiler prefix global symbols with an underscore?
8828AC_DEFUN([LT_SYS_SYMBOL_USCORE],
8829[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8830AC_CACHE_CHECK([for _ prefix in compiled symbols],
8831  [lt_cv_sys_symbol_underscore],
8832  [lt_cv_sys_symbol_underscore=no
8833  cat > conftest.$ac_ext <<_LT_EOF
8834void nm_test_func(){}
8835int main(){nm_test_func;return 0;}
8836_LT_EOF
8837  if AC_TRY_EVAL(ac_compile); then
8838    # Now try to grab the symbols.
8839    ac_nlist=conftest.nm
8840    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
8841      # See whether the symbols have a leading underscore.
8842      if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
8843        lt_cv_sys_symbol_underscore=yes
8844      else
8845        if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
8846	  :
8847        else
8848	  echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
8849        fi
8850      fi
8851    else
8852      echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
8853    fi
8854  else
8855    echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
8856    cat conftest.c >&AS_MESSAGE_LOG_FD
8857  fi
8858  rm -rf conftest*
8859  ])
8860  sys_symbol_underscore=$lt_cv_sys_symbol_underscore
8861  AC_SUBST([sys_symbol_underscore])
8862])# LT_SYS_SYMBOL_USCORE
8863
8864# Old name:
8865AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
8866dnl aclocal-1.4 backwards compatibility:
8867dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
8868
8869
8870# LT_FUNC_DLSYM_USCORE
8871# --------------------
8872AC_DEFUN([LT_FUNC_DLSYM_USCORE],
8873[AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8874if test x"$lt_cv_sys_symbol_underscore" = xyes; then
8875  if test x"$libltdl_cv_func_dlopen" = xyes ||
8876     test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
8877	AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
8878	  [libltdl_cv_need_uscore],
8879	  [libltdl_cv_need_uscore=unknown
8880          save_LIBS="$LIBS"
8881          LIBS="$LIBS $LIBADD_DLOPEN"
8882	  _LT_TRY_DLOPEN_SELF(
8883	    [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
8884	    [],				 [libltdl_cv_need_uscore=cross])
8885	  LIBS="$save_LIBS"
8886	])
8887  fi
8888fi
8889
8890if test x"$libltdl_cv_need_uscore" = xyes; then
8891  AC_DEFINE([NEED_USCORE], [1],
8892    [Define if dlsym() requires a leading underscore in symbol names.])
8893fi
8894])# LT_FUNC_DLSYM_USCORE
8895
8896# Old name:
8897AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
8898dnl aclocal-1.4 backwards compatibility:
8899dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
8900
8901# Helper functions for option handling.                    -*- Autoconf -*-
8902#
8903#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8904#   Inc.
8905#   Written by Gary V. Vaughan, 2004
8906#
8907# This file is free software; the Free Software Foundation gives
8908# unlimited permission to copy and/or distribute it, with or without
8909# modifications, as long as this notice is preserved.
8910
8911# serial 7 ltoptions.m4
8912
8913# This is to help aclocal find these macros, as it can't see m4_define.
8914AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8915
8916
8917# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8918# ------------------------------------------
8919m4_define([_LT_MANGLE_OPTION],
8920[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8921
8922
8923# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8924# ---------------------------------------
8925# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8926# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8927# saved as a flag.
8928m4_define([_LT_SET_OPTION],
8929[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8930m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8931        _LT_MANGLE_DEFUN([$1], [$2]),
8932    [m4_warning([Unknown $1 option `$2'])])[]dnl
8933])
8934
8935
8936# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8937# ------------------------------------------------------------
8938# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8939m4_define([_LT_IF_OPTION],
8940[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8941
8942
8943# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8944# -------------------------------------------------------
8945# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8946# are set.
8947m4_define([_LT_UNLESS_OPTIONS],
8948[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8949	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8950		      [m4_define([$0_found])])])[]dnl
8951m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8952])[]dnl
8953])
8954
8955
8956# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8957# ----------------------------------------
8958# OPTION-LIST is a space-separated list of Libtool options associated
8959# with MACRO-NAME.  If any OPTION has a matching handler declared with
8960# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8961# the unknown option and exit.
8962m4_defun([_LT_SET_OPTIONS],
8963[# Set options
8964m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8965    [_LT_SET_OPTION([$1], _LT_Option)])
8966
8967m4_if([$1],[LT_INIT],[
8968  dnl
8969  dnl Simply set some default values (i.e off) if boolean options were not
8970  dnl specified:
8971  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8972  ])
8973  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8974  ])
8975  dnl
8976  dnl If no reference was made to various pairs of opposing options, then
8977  dnl we run the default mode handler for the pair.  For example, if neither
8978  dnl `shared' nor `disable-shared' was passed, we enable building of shared
8979  dnl archives by default:
8980  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8981  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8982  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8983  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8984  		   [_LT_ENABLE_FAST_INSTALL])
8985  ])
8986])# _LT_SET_OPTIONS
8987
8988
8989
8990# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8991# -----------------------------------------
8992m4_define([_LT_MANGLE_DEFUN],
8993[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8994
8995
8996# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8997# -----------------------------------------------
8998m4_define([LT_OPTION_DEFINE],
8999[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9000])# LT_OPTION_DEFINE
9001
9002
9003# dlopen
9004# ------
9005LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9006])
9007
9008AU_DEFUN([AC_LIBTOOL_DLOPEN],
9009[_LT_SET_OPTION([LT_INIT], [dlopen])
9010AC_DIAGNOSE([obsolete],
9011[$0: Remove this warning and the call to _LT_SET_OPTION when you
9012put the `dlopen' option into LT_INIT's first parameter.])
9013])
9014
9015dnl aclocal-1.4 backwards compatibility:
9016dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9017
9018
9019# win32-dll
9020# ---------
9021# Declare package support for building win32 dll's.
9022LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9023[enable_win32_dll=yes
9024
9025case $host in
9026*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9027  AC_CHECK_TOOL(AS, as, false)
9028  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9029  AC_CHECK_TOOL(OBJDUMP, objdump, false)
9030  ;;
9031esac
9032
9033test -z "$AS" && AS=as
9034_LT_DECL([], [AS],      [1], [Assembler program])dnl
9035
9036test -z "$DLLTOOL" && DLLTOOL=dlltool
9037_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9038
9039test -z "$OBJDUMP" && OBJDUMP=objdump
9040_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9041])# win32-dll
9042
9043AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9044[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9045_LT_SET_OPTION([LT_INIT], [win32-dll])
9046AC_DIAGNOSE([obsolete],
9047[$0: Remove this warning and the call to _LT_SET_OPTION when you
9048put the `win32-dll' option into LT_INIT's first parameter.])
9049])
9050
9051dnl aclocal-1.4 backwards compatibility:
9052dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9053
9054
9055# _LT_ENABLE_SHARED([DEFAULT])
9056# ----------------------------
9057# implement the --enable-shared flag, and supports the `shared' and
9058# `disable-shared' LT_INIT options.
9059# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9060m4_define([_LT_ENABLE_SHARED],
9061[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9062AC_ARG_ENABLE([shared],
9063    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9064	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9065    [p=${PACKAGE-default}
9066    case $enableval in
9067    yes) enable_shared=yes ;;
9068    no) enable_shared=no ;;
9069    *)
9070      enable_shared=no
9071      # Look at the argument we got.  We use all the common list separators.
9072      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9073      for pkg in $enableval; do
9074	IFS="$lt_save_ifs"
9075	if test "X$pkg" = "X$p"; then
9076	  enable_shared=yes
9077	fi
9078      done
9079      IFS="$lt_save_ifs"
9080      ;;
9081    esac],
9082    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9083
9084    _LT_DECL([build_libtool_libs], [enable_shared], [0],
9085	[Whether or not to build shared libraries])
9086])# _LT_ENABLE_SHARED
9087
9088LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9089LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9090
9091# Old names:
9092AC_DEFUN([AC_ENABLE_SHARED],
9093[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9094])
9095
9096AC_DEFUN([AC_DISABLE_SHARED],
9097[_LT_SET_OPTION([LT_INIT], [disable-shared])
9098])
9099
9100AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9101AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9102
9103dnl aclocal-1.4 backwards compatibility:
9104dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9105dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9106
9107
9108
9109# _LT_ENABLE_STATIC([DEFAULT])
9110# ----------------------------
9111# implement the --enable-static flag, and support the `static' and
9112# `disable-static' LT_INIT options.
9113# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9114m4_define([_LT_ENABLE_STATIC],
9115[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9116AC_ARG_ENABLE([static],
9117    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9118	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9119    [p=${PACKAGE-default}
9120    case $enableval in
9121    yes) enable_static=yes ;;
9122    no) enable_static=no ;;
9123    *)
9124     enable_static=no
9125      # Look at the argument we got.  We use all the common list separators.
9126      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9127      for pkg in $enableval; do
9128	IFS="$lt_save_ifs"
9129	if test "X$pkg" = "X$p"; then
9130	  enable_static=yes
9131	fi
9132      done
9133      IFS="$lt_save_ifs"
9134      ;;
9135    esac],
9136    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9137
9138    _LT_DECL([build_old_libs], [enable_static], [0],
9139	[Whether or not to build static libraries])
9140])# _LT_ENABLE_STATIC
9141
9142LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9143LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9144
9145# Old names:
9146AC_DEFUN([AC_ENABLE_STATIC],
9147[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9148])
9149
9150AC_DEFUN([AC_DISABLE_STATIC],
9151[_LT_SET_OPTION([LT_INIT], [disable-static])
9152])
9153
9154AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9155AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9156
9157dnl aclocal-1.4 backwards compatibility:
9158dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9159dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9160
9161
9162
9163# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9164# ----------------------------------
9165# implement the --enable-fast-install flag, and support the `fast-install'
9166# and `disable-fast-install' LT_INIT options.
9167# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9168m4_define([_LT_ENABLE_FAST_INSTALL],
9169[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9170AC_ARG_ENABLE([fast-install],
9171    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9172    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9173    [p=${PACKAGE-default}
9174    case $enableval in
9175    yes) enable_fast_install=yes ;;
9176    no) enable_fast_install=no ;;
9177    *)
9178      enable_fast_install=no
9179      # Look at the argument we got.  We use all the common list separators.
9180      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9181      for pkg in $enableval; do
9182	IFS="$lt_save_ifs"
9183	if test "X$pkg" = "X$p"; then
9184	  enable_fast_install=yes
9185	fi
9186      done
9187      IFS="$lt_save_ifs"
9188      ;;
9189    esac],
9190    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9191
9192_LT_DECL([fast_install], [enable_fast_install], [0],
9193	 [Whether or not to optimize for fast installation])dnl
9194])# _LT_ENABLE_FAST_INSTALL
9195
9196LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9197LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9198
9199# Old names:
9200AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9201[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9202AC_DIAGNOSE([obsolete],
9203[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9204the `fast-install' option into LT_INIT's first parameter.])
9205])
9206
9207AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9208[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9209AC_DIAGNOSE([obsolete],
9210[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9211the `disable-fast-install' option into LT_INIT's first parameter.])
9212])
9213
9214dnl aclocal-1.4 backwards compatibility:
9215dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9216dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9217
9218
9219# _LT_WITH_PIC([MODE])
9220# --------------------
9221# implement the --with-pic flag, and support the `pic-only' and `no-pic'
9222# LT_INIT options.
9223# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9224m4_define([_LT_WITH_PIC],
9225[AC_ARG_WITH([pic],
9226    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9227	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9228    [lt_p=${PACKAGE-default}
9229    case $withval in
9230    yes|no) pic_mode=$withval ;;
9231    *)
9232      pic_mode=default
9233      # Look at the argument we got.  We use all the common list separators.
9234      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9235      for lt_pkg in $withval; do
9236	IFS="$lt_save_ifs"
9237	if test "X$lt_pkg" = "X$lt_p"; then
9238	  pic_mode=yes
9239	fi
9240      done
9241      IFS="$lt_save_ifs"
9242      ;;
9243    esac],
9244    [pic_mode=default])
9245
9246test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9247
9248_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9249])# _LT_WITH_PIC
9250
9251LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9252LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9253
9254# Old name:
9255AU_DEFUN([AC_LIBTOOL_PICMODE],
9256[_LT_SET_OPTION([LT_INIT], [pic-only])
9257AC_DIAGNOSE([obsolete],
9258[$0: Remove this warning and the call to _LT_SET_OPTION when you
9259put the `pic-only' option into LT_INIT's first parameter.])
9260])
9261
9262dnl aclocal-1.4 backwards compatibility:
9263dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9264
9265
9266m4_define([_LTDL_MODE], [])
9267LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9268		 [m4_define([_LTDL_MODE], [nonrecursive])])
9269LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9270		 [m4_define([_LTDL_MODE], [recursive])])
9271LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9272		 [m4_define([_LTDL_MODE], [subproject])])
9273
9274m4_define([_LTDL_TYPE], [])
9275LT_OPTION_DEFINE([LTDL_INIT], [installable],
9276		 [m4_define([_LTDL_TYPE], [installable])])
9277LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9278		 [m4_define([_LTDL_TYPE], [convenience])])
9279
9280# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9281#
9282# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9283# Written by Gary V. Vaughan, 2004
9284#
9285# This file is free software; the Free Software Foundation gives
9286# unlimited permission to copy and/or distribute it, with or without
9287# modifications, as long as this notice is preserved.
9288
9289# serial 6 ltsugar.m4
9290
9291# This is to help aclocal find these macros, as it can't see m4_define.
9292AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9293
9294
9295# lt_join(SEP, ARG1, [ARG2...])
9296# -----------------------------
9297# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9298# associated separator.
9299# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9300# versions in m4sugar had bugs.
9301m4_define([lt_join],
9302[m4_if([$#], [1], [],
9303       [$#], [2], [[$2]],
9304       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9305m4_define([_lt_join],
9306[m4_if([$#$2], [2], [],
9307       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9308
9309
9310# lt_car(LIST)
9311# lt_cdr(LIST)
9312# ------------
9313# Manipulate m4 lists.
9314# These macros are necessary as long as will still need to support
9315# Autoconf-2.59 which quotes differently.
9316m4_define([lt_car], [[$1]])
9317m4_define([lt_cdr],
9318[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9319       [$#], 1, [],
9320       [m4_dquote(m4_shift($@))])])
9321m4_define([lt_unquote], $1)
9322
9323
9324# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9325# ------------------------------------------
9326# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9327# Note that neither SEPARATOR nor STRING are expanded; they are appended
9328# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9329# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9330# than defined and empty).
9331#
9332# This macro is needed until we can rely on Autoconf 2.62, since earlier
9333# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9334m4_define([lt_append],
9335[m4_define([$1],
9336	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9337
9338
9339
9340# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9341# ----------------------------------------------------------
9342# Produce a SEP delimited list of all paired combinations of elements of
9343# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9344# has the form PREFIXmINFIXSUFFIXn.
9345# Needed until we can rely on m4_combine added in Autoconf 2.62.
9346m4_define([lt_combine],
9347[m4_if(m4_eval([$# > 3]), [1],
9348       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9349[[m4_foreach([_Lt_prefix], [$2],
9350	     [m4_foreach([_Lt_suffix],
9351		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9352	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9353
9354
9355# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9356# -----------------------------------------------------------------------
9357# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9358# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9359m4_define([lt_if_append_uniq],
9360[m4_ifdef([$1],
9361	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9362		 [lt_append([$1], [$2], [$3])$4],
9363		 [$5])],
9364	  [lt_append([$1], [$2], [$3])$4])])
9365
9366
9367# lt_dict_add(DICT, KEY, VALUE)
9368# -----------------------------
9369m4_define([lt_dict_add],
9370[m4_define([$1($2)], [$3])])
9371
9372
9373# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9374# --------------------------------------------
9375m4_define([lt_dict_add_subkey],
9376[m4_define([$1($2:$3)], [$4])])
9377
9378
9379# lt_dict_fetch(DICT, KEY, [SUBKEY])
9380# ----------------------------------
9381m4_define([lt_dict_fetch],
9382[m4_ifval([$3],
9383	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9384    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9385
9386
9387# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9388# -----------------------------------------------------------------
9389m4_define([lt_if_dict_fetch],
9390[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9391	[$5],
9392    [$6])])
9393
9394
9395# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9396# --------------------------------------------------------------
9397m4_define([lt_dict_filter],
9398[m4_if([$5], [], [],
9399  [lt_join(m4_quote(m4_default([$4], [[, ]])),
9400           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9401		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9402])
9403
9404# ltversion.m4 -- version numbers			-*- Autoconf -*-
9405#
9406#   Copyright (C) 2004 Free Software Foundation, Inc.
9407#   Written by Scott James Remnant, 2004
9408#
9409# This file is free software; the Free Software Foundation gives
9410# unlimited permission to copy and/or distribute it, with or without
9411# modifications, as long as this notice is preserved.
9412
9413# @configure_input@
9414
9415# serial 3337 ltversion.m4
9416# This file is part of GNU Libtool
9417
9418m4_define([LT_PACKAGE_VERSION], [2.4.2])
9419m4_define([LT_PACKAGE_REVISION], [1.3337])
9420
9421AC_DEFUN([LTVERSION_VERSION],
9422[macro_version='2.4.2'
9423macro_revision='1.3337'
9424_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9425_LT_DECL(, macro_revision, 0)
9426])
9427
9428# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9429#
9430#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9431#   Written by Scott James Remnant, 2004.
9432#
9433# This file is free software; the Free Software Foundation gives
9434# unlimited permission to copy and/or distribute it, with or without
9435# modifications, as long as this notice is preserved.
9436
9437# serial 5 lt~obsolete.m4
9438
9439# These exist entirely to fool aclocal when bootstrapping libtool.
9440#
9441# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9442# which have later been changed to m4_define as they aren't part of the
9443# exported API, or moved to Autoconf or Automake where they belong.
9444#
9445# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9446# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9447# using a macro with the same name in our local m4/libtool.m4 it'll
9448# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9449# and doesn't know about Autoconf macros at all.)
9450#
9451# So we provide this file, which has a silly filename so it's always
9452# included after everything else.  This provides aclocal with the
9453# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9454# because those macros already exist, or will be overwritten later.
9455# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9456#
9457# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9458# Yes, that means every name once taken will need to remain here until
9459# we give up compatibility with versions before 1.7, at which point
9460# we need to keep only those names which we still refer to.
9461
9462# This is to help aclocal find these macros, as it can't see m4_define.
9463AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9464
9465m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9466m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9467m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9468m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9469m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9470m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9471m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9472m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9473m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9474m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9475m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9476m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9477m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9478m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9479m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9480m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9481m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9482m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9483m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9484m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9485m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9486m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9487m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9488m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9489m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9490m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9491m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9492m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9493m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9494m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9495m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9496m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9497m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9498m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9499m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9500m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9501m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9502m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9503m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9504m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9505m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9506m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9507m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9508m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9509m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9510m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9511m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9512m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9513m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9514m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9515m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9516m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9517m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9518m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9519m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9520m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9521m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9522m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9523m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
9524m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
9525m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
9526
9527# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9528# serial 1 (pkg-config-0.24)
9529#
9530# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9531#
9532# This program is free software; you can redistribute it and/or modify
9533# it under the terms of the GNU General Public License as published by
9534# the Free Software Foundation; either version 2 of the License, or
9535# (at your option) any later version.
9536#
9537# This program is distributed in the hope that it will be useful, but
9538# WITHOUT ANY WARRANTY; without even the implied warranty of
9539# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9540# General Public License for more details.
9541#
9542# You should have received a copy of the GNU General Public License
9543# along with this program; if not, write to the Free Software
9544# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9545#
9546# As a special exception to the GNU General Public License, if you
9547# distribute this file as part of a program that contains a
9548# configuration script generated by Autoconf, you may include it under
9549# the same distribution terms that you use for the rest of that program.
9550
9551# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9552# ----------------------------------
9553AC_DEFUN([PKG_PROG_PKG_CONFIG],
9554[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9555m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9556m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9557AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9558AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9559AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9560
9561if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9562	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9563fi
9564if test -n "$PKG_CONFIG"; then
9565	_pkg_min_version=m4_default([$1], [0.9.0])
9566	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9567	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9568		AC_MSG_RESULT([yes])
9569	else
9570		AC_MSG_RESULT([no])
9571		PKG_CONFIG=""
9572	fi
9573fi[]dnl
9574])# PKG_PROG_PKG_CONFIG
9575
9576# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9577#
9578# Check to see whether a particular set of modules exists.  Similar
9579# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9580#
9581# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9582# only at the first occurence in configure.ac, so if the first place
9583# it's called might be skipped (such as if it is within an "if", you
9584# have to call PKG_CHECK_EXISTS manually
9585# --------------------------------------------------------------
9586AC_DEFUN([PKG_CHECK_EXISTS],
9587[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9588if test -n "$PKG_CONFIG" && \
9589    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9590  m4_default([$2], [:])
9591m4_ifvaln([$3], [else
9592  $3])dnl
9593fi])
9594
9595# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9596# ---------------------------------------------
9597m4_define([_PKG_CONFIG],
9598[if test -n "$$1"; then
9599    pkg_cv_[]$1="$$1"
9600 elif test -n "$PKG_CONFIG"; then
9601    PKG_CHECK_EXISTS([$3],
9602                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9603		      test "x$?" != "x0" && pkg_failed=yes ],
9604		     [pkg_failed=yes])
9605 else
9606    pkg_failed=untried
9607fi[]dnl
9608])# _PKG_CONFIG
9609
9610# _PKG_SHORT_ERRORS_SUPPORTED
9611# -----------------------------
9612AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9613[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9614if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9615        _pkg_short_errors_supported=yes
9616else
9617        _pkg_short_errors_supported=no
9618fi[]dnl
9619])# _PKG_SHORT_ERRORS_SUPPORTED
9620
9621
9622# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9623# [ACTION-IF-NOT-FOUND])
9624#
9625#
9626# Note that if there is a possibility the first call to
9627# PKG_CHECK_MODULES might not happen, you should be sure to include an
9628# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9629#
9630#
9631# --------------------------------------------------------------
9632AC_DEFUN([PKG_CHECK_MODULES],
9633[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9634AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9635AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9636
9637pkg_failed=no
9638AC_MSG_CHECKING([for $1])
9639
9640_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9641_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9642
9643m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9644and $1[]_LIBS to avoid the need to call pkg-config.
9645See the pkg-config man page for more details.])
9646
9647if test $pkg_failed = yes; then
9648   	AC_MSG_RESULT([no])
9649        _PKG_SHORT_ERRORS_SUPPORTED
9650        if test $_pkg_short_errors_supported = yes; then
9651	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9652        else
9653	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9654        fi
9655	# Put the nasty error message in config.log where it belongs
9656	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9657
9658	m4_default([$4], [AC_MSG_ERROR(
9659[Package requirements ($2) were not met:
9660
9661$$1_PKG_ERRORS
9662
9663Consider adjusting the PKG_CONFIG_PATH environment variable if you
9664installed software in a non-standard prefix.
9665
9666_PKG_TEXT])[]dnl
9667        ])
9668elif test $pkg_failed = untried; then
9669     	AC_MSG_RESULT([no])
9670	m4_default([$4], [AC_MSG_FAILURE(
9671[The pkg-config script could not be found or is too old.  Make sure it
9672is in your PATH or set the PKG_CONFIG environment variable to the full
9673path to pkg-config.
9674
9675_PKG_TEXT
9676
9677To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
9678        ])
9679else
9680	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9681	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9682        AC_MSG_RESULT([yes])
9683	$3
9684fi[]dnl
9685])# PKG_CHECK_MODULES
9686
9687# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
9688# Foundation, Inc.
9689#
9690# This file is free software; the Free Software Foundation
9691# gives unlimited permission to copy and/or distribute it,
9692# with or without modifications, as long as this notice is preserved.
9693
9694# serial 1
9695
9696# AM_AUTOMAKE_VERSION(VERSION)
9697# ----------------------------
9698# Automake X.Y traces this macro to ensure aclocal.m4 has been
9699# generated from the m4 files accompanying Automake X.Y.
9700# (This private macro should not be called outside this file.)
9701AC_DEFUN([AM_AUTOMAKE_VERSION],
9702[am__api_version='1.11'
9703dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9704dnl require some minimum version.  Point them to the right macro.
9705m4_if([$1], [1.11.3], [],
9706      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9707])
9708
9709# _AM_AUTOCONF_VERSION(VERSION)
9710# -----------------------------
9711# aclocal traces this macro to find the Autoconf version.
9712# This is a private macro too.  Using m4_define simplifies
9713# the logic in aclocal, which can simply ignore this definition.
9714m4_define([_AM_AUTOCONF_VERSION], [])
9715
9716# AM_SET_CURRENT_AUTOMAKE_VERSION
9717# -------------------------------
9718# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9719# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9720AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9721[AM_AUTOMAKE_VERSION([1.11.3])dnl
9722m4_ifndef([AC_AUTOCONF_VERSION],
9723  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9724_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9725
9726# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
9727
9728# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
9729#
9730# This file is free software; the Free Software Foundation
9731# gives unlimited permission to copy and/or distribute it,
9732# with or without modifications, as long as this notice is preserved.
9733
9734# serial 1
9735
9736# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9737# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
9738# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9739#
9740# Of course, Automake must honor this variable whenever it calls a
9741# tool from the auxiliary directory.  The problem is that $srcdir (and
9742# therefore $ac_aux_dir as well) can be either absolute or relative,
9743# depending on how configure is run.  This is pretty annoying, since
9744# it makes $ac_aux_dir quite unusable in subdirectories: in the top
9745# source directory, any form will work fine, but in subdirectories a
9746# relative path needs to be adjusted first.
9747#
9748# $ac_aux_dir/missing
9749#    fails when called from a subdirectory if $ac_aux_dir is relative
9750# $top_srcdir/$ac_aux_dir/missing
9751#    fails if $ac_aux_dir is absolute,
9752#    fails when called from a subdirectory in a VPATH build with
9753#          a relative $ac_aux_dir
9754#
9755# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9756# are both prefixed by $srcdir.  In an in-source build this is usually
9757# harmless because $srcdir is `.', but things will broke when you
9758# start a VPATH build or use an absolute $srcdir.
9759#
9760# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9761# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9762#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9763# and then we would define $MISSING as
9764#   MISSING="\${SHELL} $am_aux_dir/missing"
9765# This will work as long as MISSING is not called from configure, because
9766# unfortunately $(top_srcdir) has no meaning in configure.
9767# However there are other variables, like CC, which are often used in
9768# configure, and could therefore not use this "fixed" $ac_aux_dir.
9769#
9770# Another solution, used here, is to always expand $ac_aux_dir to an
9771# absolute PATH.  The drawback is that using absolute paths prevent a
9772# configured tree to be moved without reconfiguration.
9773
9774AC_DEFUN([AM_AUX_DIR_EXPAND],
9775[dnl Rely on autoconf to set up CDPATH properly.
9776AC_PREREQ([2.50])dnl
9777# expand $ac_aux_dir to an absolute path
9778am_aux_dir=`cd $ac_aux_dir && pwd`
9779])
9780
9781# AM_CONDITIONAL                                            -*- Autoconf -*-
9782
9783# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9784# Free Software Foundation, Inc.
9785#
9786# This file is free software; the Free Software Foundation
9787# gives unlimited permission to copy and/or distribute it,
9788# with or without modifications, as long as this notice is preserved.
9789
9790# serial 9
9791
9792# AM_CONDITIONAL(NAME, SHELL-CONDITION)
9793# -------------------------------------
9794# Define a conditional.
9795AC_DEFUN([AM_CONDITIONAL],
9796[AC_PREREQ(2.52)dnl
9797 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
9798	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9799AC_SUBST([$1_TRUE])dnl
9800AC_SUBST([$1_FALSE])dnl
9801_AM_SUBST_NOTMAKE([$1_TRUE])dnl
9802_AM_SUBST_NOTMAKE([$1_FALSE])dnl
9803m4_define([_AM_COND_VALUE_$1], [$2])dnl
9804if $2; then
9805  $1_TRUE=
9806  $1_FALSE='#'
9807else
9808  $1_TRUE='#'
9809  $1_FALSE=
9810fi
9811AC_CONFIG_COMMANDS_PRE(
9812[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9813  AC_MSG_ERROR([[conditional "$1" was never defined.
9814Usually this means the macro was only invoked conditionally.]])
9815fi])])
9816
9817# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
9818# 2010, 2011 Free Software Foundation, Inc.
9819#
9820# This file is free software; the Free Software Foundation
9821# gives unlimited permission to copy and/or distribute it,
9822# with or without modifications, as long as this notice is preserved.
9823
9824# serial 12
9825
9826# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9827# written in clear, in which case automake, when reading aclocal.m4,
9828# will think it sees a *use*, and therefore will trigger all it's
9829# C support machinery.  Also note that it means that autoscan, seeing
9830# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9831
9832
9833# _AM_DEPENDENCIES(NAME)
9834# ----------------------
9835# See how the compiler implements dependency checking.
9836# NAME is "CC", "CXX", "GCJ", or "OBJC".
9837# We try a few techniques and use that to set a single cache variable.
9838#
9839# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9840# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9841# dependency, and given that the user is not expected to run this macro,
9842# just rely on AC_PROG_CC.
9843AC_DEFUN([_AM_DEPENDENCIES],
9844[AC_REQUIRE([AM_SET_DEPDIR])dnl
9845AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9846AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9847AC_REQUIRE([AM_DEP_TRACK])dnl
9848
9849ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
9850       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
9851       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9852       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
9853       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
9854                   [depcc="$$1"   am_compiler_list=])
9855
9856AC_CACHE_CHECK([dependency style of $depcc],
9857               [am_cv_$1_dependencies_compiler_type],
9858[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9859  # We make a subdir and do the tests there.  Otherwise we can end up
9860  # making bogus files that we don't know about and never remove.  For
9861  # instance it was reported that on HP-UX the gcc test will end up
9862  # making a dummy file named `D' -- because `-MD' means `put the output
9863  # in D'.
9864  rm -rf conftest.dir
9865  mkdir conftest.dir
9866  # Copy depcomp to subdir because otherwise we won't find it if we're
9867  # using a relative directory.
9868  cp "$am_depcomp" conftest.dir
9869  cd conftest.dir
9870  # We will build objects and dependencies in a subdirectory because
9871  # it helps to detect inapplicable dependency modes.  For instance
9872  # both Tru64's cc and ICC support -MD to output dependencies as a
9873  # side effect of compilation, but ICC will put the dependencies in
9874  # the current directory while Tru64 will put them in the object
9875  # directory.
9876  mkdir sub
9877
9878  am_cv_$1_dependencies_compiler_type=none
9879  if test "$am_compiler_list" = ""; then
9880     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9881  fi
9882  am__universal=false
9883  m4_case([$1], [CC],
9884    [case " $depcc " in #(
9885     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9886     esac],
9887    [CXX],
9888    [case " $depcc " in #(
9889     *\ -arch\ *\ -arch\ *) am__universal=true ;;
9890     esac])
9891
9892  for depmode in $am_compiler_list; do
9893    # Setup a source with many dependencies, because some compilers
9894    # like to wrap large dependency lists on column 80 (with \), and
9895    # we should not choose a depcomp mode which is confused by this.
9896    #
9897    # We need to recreate these files for each test, as the compiler may
9898    # overwrite some of them when testing with obscure command lines.
9899    # This happens at least with the AIX C compiler.
9900    : > sub/conftest.c
9901    for i in 1 2 3 4 5 6; do
9902      echo '#include "conftst'$i'.h"' >> sub/conftest.c
9903      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9904      # Solaris 8's {/usr,}/bin/sh.
9905      touch sub/conftst$i.h
9906    done
9907    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9908
9909    # We check with `-c' and `-o' for the sake of the "dashmstdout"
9910    # mode.  It turns out that the SunPro C++ compiler does not properly
9911    # handle `-M -o', and we need to detect this.  Also, some Intel
9912    # versions had trouble with output in subdirs
9913    am__obj=sub/conftest.${OBJEXT-o}
9914    am__minus_obj="-o $am__obj"
9915    case $depmode in
9916    gcc)
9917      # This depmode causes a compiler race in universal mode.
9918      test "$am__universal" = false || continue
9919      ;;
9920    nosideeffect)
9921      # after this tag, mechanisms are not by side-effect, so they'll
9922      # only be used when explicitly requested
9923      if test "x$enable_dependency_tracking" = xyes; then
9924	continue
9925      else
9926	break
9927      fi
9928      ;;
9929    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
9930      # This compiler won't grok `-c -o', but also, the minuso test has
9931      # not run yet.  These depmodes are late enough in the game, and
9932      # so weak that their functioning should not be impacted.
9933      am__obj=conftest.${OBJEXT-o}
9934      am__minus_obj=
9935      ;;
9936    none) break ;;
9937    esac
9938    if depmode=$depmode \
9939       source=sub/conftest.c object=$am__obj \
9940       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9941       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9942         >/dev/null 2>conftest.err &&
9943       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9944       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9945       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9946       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9947      # icc doesn't choke on unknown options, it will just issue warnings
9948      # or remarks (even with -Werror).  So we grep stderr for any message
9949      # that says an option was ignored or not supported.
9950      # When given -MP, icc 7.0 and 7.1 complain thusly:
9951      #   icc: Command line warning: ignoring option '-M'; no argument required
9952      # The diagnosis changed in icc 8.0:
9953      #   icc: Command line remark: option '-MP' not supported
9954      if (grep 'ignoring option' conftest.err ||
9955          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9956        am_cv_$1_dependencies_compiler_type=$depmode
9957        break
9958      fi
9959    fi
9960  done
9961
9962  cd ..
9963  rm -rf conftest.dir
9964else
9965  am_cv_$1_dependencies_compiler_type=none
9966fi
9967])
9968AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9969AM_CONDITIONAL([am__fastdep$1], [
9970  test "x$enable_dependency_tracking" != xno \
9971  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9972])
9973
9974
9975# AM_SET_DEPDIR
9976# -------------
9977# Choose a directory name for dependency files.
9978# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9979AC_DEFUN([AM_SET_DEPDIR],
9980[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9981AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9982])
9983
9984
9985# AM_DEP_TRACK
9986# ------------
9987AC_DEFUN([AM_DEP_TRACK],
9988[AC_ARG_ENABLE(dependency-tracking,
9989[  --disable-dependency-tracking  speeds up one-time build
9990  --enable-dependency-tracking   do not reject slow dependency extractors])
9991if test "x$enable_dependency_tracking" != xno; then
9992  am_depcomp="$ac_aux_dir/depcomp"
9993  AMDEPBACKSLASH='\'
9994  am__nodep='_no'
9995fi
9996AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9997AC_SUBST([AMDEPBACKSLASH])dnl
9998_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9999AC_SUBST([am__nodep])dnl
10000_AM_SUBST_NOTMAKE([am__nodep])dnl
10001])
10002
10003# Generate code to set up dependency tracking.              -*- Autoconf -*-
10004
10005# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
10006# Free Software Foundation, Inc.
10007#
10008# This file is free software; the Free Software Foundation
10009# gives unlimited permission to copy and/or distribute it,
10010# with or without modifications, as long as this notice is preserved.
10011
10012#serial 5
10013
10014# _AM_OUTPUT_DEPENDENCY_COMMANDS
10015# ------------------------------
10016AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
10017[{
10018  # Autoconf 2.62 quotes --file arguments for eval, but not when files
10019  # are listed without --file.  Let's play safe and only enable the eval
10020  # if we detect the quoting.
10021  case $CONFIG_FILES in
10022  *\'*) eval set x "$CONFIG_FILES" ;;
10023  *)   set x $CONFIG_FILES ;;
10024  esac
10025  shift
10026  for mf
10027  do
10028    # Strip MF so we end up with the name of the file.
10029    mf=`echo "$mf" | sed -e 's/:.*$//'`
10030    # Check whether this is an Automake generated Makefile or not.
10031    # We used to match only the files named `Makefile.in', but
10032    # some people rename them; so instead we look at the file content.
10033    # Grep'ing the first line is not enough: some people post-process
10034    # each Makefile.in and add a new line on top of each file to say so.
10035    # Grep'ing the whole file is not good either: AIX grep has a line
10036    # limit of 2048, but all sed's we know have understand at least 4000.
10037    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
10038      dirpart=`AS_DIRNAME("$mf")`
10039    else
10040      continue
10041    fi
10042    # Extract the definition of DEPDIR, am__include, and am__quote
10043    # from the Makefile without running `make'.
10044    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
10045    test -z "$DEPDIR" && continue
10046    am__include=`sed -n 's/^am__include = //p' < "$mf"`
10047    test -z "am__include" && continue
10048    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
10049    # When using ansi2knr, U may be empty or an underscore; expand it
10050    U=`sed -n 's/^U = //p' < "$mf"`
10051    # Find all dependency output files, they are included files with
10052    # $(DEPDIR) in their names.  We invoke sed twice because it is the
10053    # simplest approach to changing $(DEPDIR) to its actual value in the
10054    # expansion.
10055    for file in `sed -n "
10056      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
10057	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
10058      # Make sure the directory exists.
10059      test -f "$dirpart/$file" && continue
10060      fdir=`AS_DIRNAME(["$file"])`
10061      AS_MKDIR_P([$dirpart/$fdir])
10062      # echo "creating $dirpart/$file"
10063      echo '# dummy' > "$dirpart/$file"
10064    done
10065  done
10066}
10067])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10068
10069
10070# AM_OUTPUT_DEPENDENCY_COMMANDS
10071# -----------------------------
10072# This macro should only be invoked once -- use via AC_REQUIRE.
10073#
10074# This code is only required when automatic dependency tracking
10075# is enabled.  FIXME.  This creates each `.P' file that we will
10076# need in order to bootstrap the dependency handling code.
10077AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10078[AC_CONFIG_COMMANDS([depfiles],
10079     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10080     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10081])
10082
10083# Do all the work for Automake.                             -*- Autoconf -*-
10084
10085# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
10086# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
10087#
10088# This file is free software; the Free Software Foundation
10089# gives unlimited permission to copy and/or distribute it,
10090# with or without modifications, as long as this notice is preserved.
10091
10092# serial 16
10093
10094# This macro actually does too much.  Some checks are only needed if
10095# your package does certain things.  But this isn't really a big deal.
10096
10097# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10098# AM_INIT_AUTOMAKE([OPTIONS])
10099# -----------------------------------------------
10100# The call with PACKAGE and VERSION arguments is the old style
10101# call (pre autoconf-2.50), which is being phased out.  PACKAGE
10102# and VERSION should now be passed to AC_INIT and removed from
10103# the call to AM_INIT_AUTOMAKE.
10104# We support both call styles for the transition.  After
10105# the next Automake release, Autoconf can make the AC_INIT
10106# arguments mandatory, and then we can depend on a new Autoconf
10107# release and drop the old call support.
10108AC_DEFUN([AM_INIT_AUTOMAKE],
10109[AC_PREREQ([2.62])dnl
10110dnl Autoconf wants to disallow AM_ names.  We explicitly allow
10111dnl the ones we care about.
10112m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10113AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10114AC_REQUIRE([AC_PROG_INSTALL])dnl
10115if test "`cd $srcdir && pwd`" != "`pwd`"; then
10116  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
10117  # is not polluted with repeated "-I."
10118  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
10119  # test to see if srcdir already configured
10120  if test -f $srcdir/config.status; then
10121    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10122  fi
10123fi
10124
10125# test whether we have cygpath
10126if test -z "$CYGPATH_W"; then
10127  if (cygpath --version) >/dev/null 2>/dev/null; then
10128    CYGPATH_W='cygpath -w'
10129  else
10130    CYGPATH_W=echo
10131  fi
10132fi
10133AC_SUBST([CYGPATH_W])
10134
10135# Define the identity of the package.
10136dnl Distinguish between old-style and new-style calls.
10137m4_ifval([$2],
10138[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10139 AC_SUBST([PACKAGE], [$1])dnl
10140 AC_SUBST([VERSION], [$2])],
10141[_AM_SET_OPTIONS([$1])dnl
10142dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10143m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
10144  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
10145 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10146 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10147
10148_AM_IF_OPTION([no-define],,
10149[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
10150 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
10151
10152# Some tools Automake needs.
10153AC_REQUIRE([AM_SANITY_CHECK])dnl
10154AC_REQUIRE([AC_ARG_PROGRAM])dnl
10155AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
10156AM_MISSING_PROG(AUTOCONF, autoconf)
10157AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
10158AM_MISSING_PROG(AUTOHEADER, autoheader)
10159AM_MISSING_PROG(MAKEINFO, makeinfo)
10160AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10161AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
10162AC_REQUIRE([AM_PROG_MKDIR_P])dnl
10163# We need awk for the "check" target.  The system "awk" is bad on
10164# some platforms.
10165AC_REQUIRE([AC_PROG_AWK])dnl
10166AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10167AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10168_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
10169	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10170			     [_AM_PROG_TAR([v7])])])
10171_AM_IF_OPTION([no-dependencies],,
10172[AC_PROVIDE_IFELSE([AC_PROG_CC],
10173		  [_AM_DEPENDENCIES(CC)],
10174		  [define([AC_PROG_CC],
10175			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
10176AC_PROVIDE_IFELSE([AC_PROG_CXX],
10177		  [_AM_DEPENDENCIES(CXX)],
10178		  [define([AC_PROG_CXX],
10179			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
10180AC_PROVIDE_IFELSE([AC_PROG_OBJC],
10181		  [_AM_DEPENDENCIES(OBJC)],
10182		  [define([AC_PROG_OBJC],
10183			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
10184])
10185_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
10186dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
10187dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
10188dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
10189AC_CONFIG_COMMANDS_PRE(dnl
10190[m4_provide_if([_AM_COMPILER_EXEEXT],
10191  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
10192])
10193
10194dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
10195dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
10196dnl mangled by Autoconf and run in a shell conditional statement.
10197m4_define([_AC_COMPILER_EXEEXT],
10198m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
10199
10200
10201# When config.status generates a header, we must update the stamp-h file.
10202# This file resides in the same directory as the config header
10203# that is generated.  The stamp files are numbered to have different names.
10204
10205# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10206# loop where config.status creates the headers, so we can generate
10207# our stamp files there.
10208AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10209[# Compute $1's index in $config_headers.
10210_am_arg=$1
10211_am_stamp_count=1
10212for _am_header in $config_headers :; do
10213  case $_am_header in
10214    $_am_arg | $_am_arg:* )
10215      break ;;
10216    * )
10217      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10218  esac
10219done
10220echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10221
10222# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
10223# Inc.
10224#
10225# This file is free software; the Free Software Foundation
10226# gives unlimited permission to copy and/or distribute it,
10227# with or without modifications, as long as this notice is preserved.
10228
10229# serial 1
10230
10231# AM_PROG_INSTALL_SH
10232# ------------------
10233# Define $install_sh.
10234AC_DEFUN([AM_PROG_INSTALL_SH],
10235[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10236if test x"${install_sh}" != xset; then
10237  case $am_aux_dir in
10238  *\ * | *\	*)
10239    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
10240  *)
10241    install_sh="\${SHELL} $am_aux_dir/install-sh"
10242  esac
10243fi
10244AC_SUBST(install_sh)])
10245
10246# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
10247#
10248# This file is free software; the Free Software Foundation
10249# gives unlimited permission to copy and/or distribute it,
10250# with or without modifications, as long as this notice is preserved.
10251
10252# serial 2
10253
10254# Check whether the underlying file-system supports filenames
10255# with a leading dot.  For instance MS-DOS doesn't.
10256AC_DEFUN([AM_SET_LEADING_DOT],
10257[rm -rf .tst 2>/dev/null
10258mkdir .tst 2>/dev/null
10259if test -d .tst; then
10260  am__leading_dot=.
10261else
10262  am__leading_dot=_
10263fi
10264rmdir .tst 2>/dev/null
10265AC_SUBST([am__leading_dot])])
10266
10267# Check to see how 'make' treats includes.	            -*- Autoconf -*-
10268
10269# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
10270#
10271# This file is free software; the Free Software Foundation
10272# gives unlimited permission to copy and/or distribute it,
10273# with or without modifications, as long as this notice is preserved.
10274
10275# serial 4
10276
10277# AM_MAKE_INCLUDE()
10278# -----------------
10279# Check to see how make treats includes.
10280AC_DEFUN([AM_MAKE_INCLUDE],
10281[am_make=${MAKE-make}
10282cat > confinc << 'END'
10283am__doit:
10284	@echo this is the am__doit target
10285.PHONY: am__doit
10286END
10287# If we don't find an include directive, just comment out the code.
10288AC_MSG_CHECKING([for style of include used by $am_make])
10289am__include="#"
10290am__quote=
10291_am_result=none
10292# First try GNU make style include.
10293echo "include confinc" > confmf
10294# Ignore all kinds of additional output from `make'.
10295case `$am_make -s -f confmf 2> /dev/null` in #(
10296*the\ am__doit\ target*)
10297  am__include=include
10298  am__quote=
10299  _am_result=GNU
10300  ;;
10301esac
10302# Now try BSD make style include.
10303if test "$am__include" = "#"; then
10304   echo '.include "confinc"' > confmf
10305   case `$am_make -s -f confmf 2> /dev/null` in #(
10306   *the\ am__doit\ target*)
10307     am__include=.include
10308     am__quote="\""
10309     _am_result=BSD
10310     ;;
10311   esac
10312fi
10313AC_SUBST([am__include])
10314AC_SUBST([am__quote])
10315AC_MSG_RESULT([$_am_result])
10316rm -f confinc confmf
10317])
10318
10319# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
10320
10321# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
10322# Free Software Foundation, Inc.
10323#
10324# This file is free software; the Free Software Foundation
10325# gives unlimited permission to copy and/or distribute it,
10326# with or without modifications, as long as this notice is preserved.
10327
10328# serial 6
10329
10330# AM_MISSING_PROG(NAME, PROGRAM)
10331# ------------------------------
10332AC_DEFUN([AM_MISSING_PROG],
10333[AC_REQUIRE([AM_MISSING_HAS_RUN])
10334$1=${$1-"${am_missing_run}$2"}
10335AC_SUBST($1)])
10336
10337
10338# AM_MISSING_HAS_RUN
10339# ------------------
10340# Define MISSING if not defined so far and test if it supports --run.
10341# If it does, set am_missing_run to use it, otherwise, to nothing.
10342AC_DEFUN([AM_MISSING_HAS_RUN],
10343[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10344AC_REQUIRE_AUX_FILE([missing])dnl
10345if test x"${MISSING+set}" != xset; then
10346  case $am_aux_dir in
10347  *\ * | *\	*)
10348    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10349  *)
10350    MISSING="\${SHELL} $am_aux_dir/missing" ;;
10351  esac
10352fi
10353# Use eval to expand $SHELL
10354if eval "$MISSING --run true"; then
10355  am_missing_run="$MISSING --run "
10356else
10357  am_missing_run=
10358  AC_MSG_WARN([`missing' script is too old or missing])
10359fi
10360])
10361
10362# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
10363# Inc.
10364#
10365# This file is free software; the Free Software Foundation
10366# gives unlimited permission to copy and/or distribute it,
10367# with or without modifications, as long as this notice is preserved.
10368
10369# serial 1
10370
10371# AM_PROG_MKDIR_P
10372# ---------------
10373# Check for `mkdir -p'.
10374AC_DEFUN([AM_PROG_MKDIR_P],
10375[AC_PREREQ([2.60])dnl
10376AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10377dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
10378dnl while keeping a definition of mkdir_p for backward compatibility.
10379dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
10380dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
10381dnl Makefile.ins that do not define MKDIR_P, so we do our own
10382dnl adjustment using top_builddir (which is defined more often than
10383dnl MKDIR_P).
10384AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
10385case $mkdir_p in
10386  [[\\/$]]* | ?:[[\\/]]*) ;;
10387  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
10388esac
10389])
10390
10391# Helper functions for option handling.                     -*- Autoconf -*-
10392
10393# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
10394# Foundation, Inc.
10395#
10396# This file is free software; the Free Software Foundation
10397# gives unlimited permission to copy and/or distribute it,
10398# with or without modifications, as long as this notice is preserved.
10399
10400# serial 5
10401
10402# _AM_MANGLE_OPTION(NAME)
10403# -----------------------
10404AC_DEFUN([_AM_MANGLE_OPTION],
10405[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10406
10407# _AM_SET_OPTION(NAME)
10408# --------------------
10409# Set option NAME.  Presently that only means defining a flag for this option.
10410AC_DEFUN([_AM_SET_OPTION],
10411[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10412
10413# _AM_SET_OPTIONS(OPTIONS)
10414# ------------------------
10415# OPTIONS is a space-separated list of Automake options.
10416AC_DEFUN([_AM_SET_OPTIONS],
10417[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10418
10419# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10420# -------------------------------------------
10421# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10422AC_DEFUN([_AM_IF_OPTION],
10423[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10424
10425# Check to make sure that the build environment is sane.    -*- Autoconf -*-
10426
10427# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
10428# Free Software Foundation, Inc.
10429#
10430# This file is free software; the Free Software Foundation
10431# gives unlimited permission to copy and/or distribute it,
10432# with or without modifications, as long as this notice is preserved.
10433
10434# serial 5
10435
10436# AM_SANITY_CHECK
10437# ---------------
10438AC_DEFUN([AM_SANITY_CHECK],
10439[AC_MSG_CHECKING([whether build environment is sane])
10440# Just in case
10441sleep 1
10442echo timestamp > conftest.file
10443# Reject unsafe characters in $srcdir or the absolute working directory
10444# name.  Accept space and tab only in the latter.
10445am_lf='
10446'
10447case `pwd` in
10448  *[[\\\"\#\$\&\'\`$am_lf]]*)
10449    AC_MSG_ERROR([unsafe absolute working directory name]);;
10450esac
10451case $srcdir in
10452  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
10453    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
10454esac
10455
10456# Do `set' in a subshell so we don't clobber the current shell's
10457# arguments.  Must try -L first in case configure is actually a
10458# symlink; some systems play weird games with the mod time of symlinks
10459# (eg FreeBSD returns the mod time of the symlink's containing
10460# directory).
10461if (
10462   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10463   if test "$[*]" = "X"; then
10464      # -L didn't work.
10465      set X `ls -t "$srcdir/configure" conftest.file`
10466   fi
10467   rm -f conftest.file
10468   if test "$[*]" != "X $srcdir/configure conftest.file" \
10469      && test "$[*]" != "X conftest.file $srcdir/configure"; then
10470
10471      # If neither matched, then we have a broken ls.  This can happen
10472      # if, for instance, CONFIG_SHELL is bash and it inherits a
10473      # broken ls alias from the environment.  This has actually
10474      # happened.  Such a system could not be considered "sane".
10475      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10476alias in your environment])
10477   fi
10478
10479   test "$[2]" = conftest.file
10480   )
10481then
10482   # Ok.
10483   :
10484else
10485   AC_MSG_ERROR([newly created file is older than distributed files!
10486Check your system clock])
10487fi
10488AC_MSG_RESULT(yes)])
10489
10490# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
10491#
10492# This file is free software; the Free Software Foundation
10493# gives unlimited permission to copy and/or distribute it,
10494# with or without modifications, as long as this notice is preserved.
10495
10496# serial 1
10497
10498# AM_PROG_INSTALL_STRIP
10499# ---------------------
10500# One issue with vendor `install' (even GNU) is that you can't
10501# specify the program used to strip binaries.  This is especially
10502# annoying in cross-compiling environments, where the build's strip
10503# is unlikely to handle the host's binaries.
10504# Fortunately install-sh will honor a STRIPPROG variable, so we
10505# always use install-sh in `make install-strip', and initialize
10506# STRIPPROG with the value of the STRIP variable (set by the user).
10507AC_DEFUN([AM_PROG_INSTALL_STRIP],
10508[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10509# Installed binaries are usually stripped using `strip' when the user
10510# run `make install-strip'.  However `strip' might not be the right
10511# tool to use in cross-compilation environments, therefore Automake
10512# will honor the `STRIP' environment variable to overrule this program.
10513dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10514if test "$cross_compiling" != no; then
10515  AC_CHECK_TOOL([STRIP], [strip], :)
10516fi
10517INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10518AC_SUBST([INSTALL_STRIP_PROGRAM])])
10519
10520# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
10521#
10522# This file is free software; the Free Software Foundation
10523# gives unlimited permission to copy and/or distribute it,
10524# with or without modifications, as long as this notice is preserved.
10525
10526# serial 3
10527
10528# _AM_SUBST_NOTMAKE(VARIABLE)
10529# ---------------------------
10530# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10531# This macro is traced by Automake.
10532AC_DEFUN([_AM_SUBST_NOTMAKE])
10533
10534# AM_SUBST_NOTMAKE(VARIABLE)
10535# --------------------------
10536# Public sister of _AM_SUBST_NOTMAKE.
10537AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10538
10539# Check how to create a tarball.                            -*- Autoconf -*-
10540
10541# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
10542#
10543# This file is free software; the Free Software Foundation
10544# gives unlimited permission to copy and/or distribute it,
10545# with or without modifications, as long as this notice is preserved.
10546
10547# serial 2
10548
10549# _AM_PROG_TAR(FORMAT)
10550# --------------------
10551# Check how to create a tarball in format FORMAT.
10552# FORMAT should be one of `v7', `ustar', or `pax'.
10553#
10554# Substitute a variable $(am__tar) that is a command
10555# writing to stdout a FORMAT-tarball containing the directory
10556# $tardir.
10557#     tardir=directory && $(am__tar) > result.tar
10558#
10559# Substitute a variable $(am__untar) that extract such
10560# a tarball read from stdin.
10561#     $(am__untar) < result.tar
10562AC_DEFUN([_AM_PROG_TAR],
10563[# Always define AMTAR for backward compatibility.  Yes, it's still used
10564# in the wild :-(  We should find a proper way to deprecate it ...
10565AC_SUBST([AMTAR], ['$${TAR-tar}'])
10566m4_if([$1], [v7],
10567     [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
10568     [m4_case([$1], [ustar],, [pax],,
10569              [m4_fatal([Unknown tar format])])
10570AC_MSG_CHECKING([how to create a $1 tar archive])
10571# Loop over all known methods to create a tar archive until one works.
10572_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10573_am_tools=${am_cv_prog_tar_$1-$_am_tools}
10574# Do not fold the above two line into one, because Tru64 sh and
10575# Solaris sh will not grok spaces in the rhs of `-'.
10576for _am_tool in $_am_tools
10577do
10578  case $_am_tool in
10579  gnutar)
10580    for _am_tar in tar gnutar gtar;
10581    do
10582      AM_RUN_LOG([$_am_tar --version]) && break
10583    done
10584    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10585    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10586    am__untar="$_am_tar -xf -"
10587    ;;
10588  plaintar)
10589    # Must skip GNU tar: if it does not support --format= it doesn't create
10590    # ustar tarball either.
10591    (tar --version) >/dev/null 2>&1 && continue
10592    am__tar='tar chf - "$$tardir"'
10593    am__tar_='tar chf - "$tardir"'
10594    am__untar='tar xf -'
10595    ;;
10596  pax)
10597    am__tar='pax -L -x $1 -w "$$tardir"'
10598    am__tar_='pax -L -x $1 -w "$tardir"'
10599    am__untar='pax -r'
10600    ;;
10601  cpio)
10602    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10603    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10604    am__untar='cpio -i -H $1 -d'
10605    ;;
10606  none)
10607    am__tar=false
10608    am__tar_=false
10609    am__untar=false
10610    ;;
10611  esac
10612
10613  # If the value was cached, stop now.  We just wanted to have am__tar
10614  # and am__untar set.
10615  test -n "${am_cv_prog_tar_$1}" && break
10616
10617  # tar/untar a dummy directory, and stop if the command works
10618  rm -rf conftest.dir
10619  mkdir conftest.dir
10620  echo GrepMe > conftest.dir/file
10621  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10622  rm -rf conftest.dir
10623  if test -s conftest.tar; then
10624    AM_RUN_LOG([$am__untar <conftest.tar])
10625    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10626  fi
10627done
10628rm -rf conftest.dir
10629
10630AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10631AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10632AC_SUBST([am__tar])
10633AC_SUBST([am__untar])
10634]) # _AM_PROG_TAR
10635
10636