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