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