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