1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
3 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
4 # Written by Gordon Matzigkeit, 1996
6 # This file is free software; the Free Software Foundation gives
7 # unlimited permission to copy and/or distribute it, with or without
8 # modifications, as long as this notice is preserved.
10 m4_define([_LT_COPYING], [dnl
11 # Copyright (C) 2014 Free Software Foundation, Inc.
12 # This is free software; see the source for copying conditions. There is NO
13 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 # GNU Libtool is free software; you can redistribute it and/or modify
16 # it under the terms of the GNU General Public License as published by
17 # the Free Software Foundation; either version 2 of of the License, or
18 # (at your option) any later version.
20 # As a special exception to the GNU General Public License, if you
21 # distribute this file as part of a program or library that is built
22 # using GNU Libtool, you may include this file under the same
23 # distribution terms that you use for the rest of that program.
25 # GNU Libtool is distributed in the hope that it will be useful, but
26 # WITHOUT ANY WARRANTY; without even the implied warranty of
27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 # GNU General Public License for more details.
30 # You should have received a copy of the GNU General Public License
31 # along with this program. If not, see <http://www.gnu.org/licenses/>.
39 # Complain and exit if this libtool version is less that VERSION.
41 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
43 [m4_fatal([Libtool version $1 or higher is required],
50 # Complain if the absolute build directory name contains unusual characters
51 m4_defun([_LT_CHECK_BUILDDIR],
54 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
62 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
63 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
64 AC_BEFORE([$0], [LT_LANG])dnl
65 AC_BEFORE([$0], [LT_OUTPUT])dnl
66 AC_BEFORE([$0], [LTDL_INIT])dnl
67 m4_require([_LT_CHECK_BUILDDIR])dnl
69 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
70 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
71 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
72 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
73 dnl unless we require an AC_DEFUNed macro:
74 AC_REQUIRE([LTOPTIONS_VERSION])dnl
75 AC_REQUIRE([LTSUGAR_VERSION])dnl
76 AC_REQUIRE([LTVERSION_VERSION])dnl
77 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
78 m4_require([_LT_PROG_LTMAIN])dnl
80 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
83 _LT_SET_OPTIONS([$0], [$1])
85 # This can be used to rebuild libtool when needed
88 # Always use our own libtool.
89 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
99 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
100 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
101 dnl aclocal-1.4 backwards compatibility:
102 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
103 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
106 # _LT_PREPARE_CC_BASENAME
107 # -----------------------
108 m4_defun([_LT_PREPARE_CC_BASENAME], [
109 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
112 for cc_temp in @S|@*""; do
114 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
115 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
120 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
122 ])# _LT_PREPARE_CC_BASENAME
125 # _LT_CC_BASENAME(CC)
126 # -------------------
127 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
128 # but that macro is also expanded into generated libtool script, which
129 # arranges for $SED and $ECHO to be set by different means.
130 m4_defun([_LT_CC_BASENAME],
131 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
132 AC_REQUIRE([_LT_DECL_SED])dnl
133 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
135 cc_basename=$func_cc_basename_result
139 # _LT_FILEUTILS_DEFAULTS
140 # ----------------------
141 # It is okay to use these file commands and assume they have been set
142 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
143 m4_defun([_LT_FILEUTILS_DEFAULTS],
147 ])# _LT_FILEUTILS_DEFAULTS
152 m4_defun([_LT_SETUP],
153 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
154 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
155 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
156 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
158 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
160 _LT_DECL([], [host_alias], [0], [The host system])dnl
161 _LT_DECL([], [host], [0])dnl
162 _LT_DECL([], [host_os], [0])dnl
164 _LT_DECL([], [build_alias], [0], [The build system])dnl
165 _LT_DECL([], [build], [0])dnl
166 _LT_DECL([], [build_os], [0])dnl
168 AC_REQUIRE([AC_PROG_CC])dnl
169 AC_REQUIRE([LT_PATH_LD])dnl
170 AC_REQUIRE([LT_PATH_NM])dnl
172 AC_REQUIRE([AC_PROG_LN_S])dnl
173 test -z "$LN_S" && LN_S="ln -s"
174 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
176 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
177 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
178 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
180 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
181 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
182 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
183 m4_require([_LT_CMD_RELOAD])dnl
184 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
185 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
186 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
187 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
188 m4_require([_LT_WITH_SYSROOT])dnl
189 m4_require([_LT_CMD_TRUNCATE])dnl
191 _LT_CONFIG_LIBTOOL_INIT([
192 # See if we are running on zsh, and set the options that allow our
193 # commands through without removal of \ escapes INIT.
194 if test -n "\${ZSH_VERSION+set}"; then
198 if test -n "${ZSH_VERSION+set}"; then
204 m4_require([_LT_TAG_COMPILER])dnl
208 # AIX sometimes has problems with the GCC collect2 program. For some
209 # reason, if we set the COLLECT_NAMES environment variable, the problems
210 # vanish in a puff of smoke.
211 if test set != "${COLLECT_NAMES+set}"; then
222 # All known linkers require a '.a' archive for static linking (except MSVC,
223 # which needs '.lib').
226 with_gnu_ld=$lt_cv_prog_gnu_ld
231 # Set sane defaults for various variables
232 test -z "$CC" && CC=cc
233 test -z "$LTCC" && LTCC=$CC
234 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
235 test -z "$LD" && LD=ld
236 test -z "$ac_objext" && ac_objext=o
238 _LT_CC_BASENAME([$compiler])
240 # Only perform the check for file, if the check method requires it
241 test -z "$MAGIC_CMD" && MAGIC_CMD=file
242 case $deplibs_check_method in
244 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
250 # Use C for the default configuration in the libtool script
251 LT_SUPPORTED_TAG([CC])
253 _LT_LANG_DEFAULT_CONFIG
258 # _LT_PREPARE_SED_QUOTE_VARS
259 # --------------------------
260 # Define a few sed substitution that help us do robust quoting.
261 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
262 [# Backslashify metacharacters that are still active within
263 # double-quoted strings.
264 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
266 # Same as above, but do not quote variable references.
267 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
269 # Sed substitution to delay expansion of an escaped shell variable in a
270 # double_quote_subst'ed string.
271 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
273 # Sed substitution to delay expansion of an escaped single quote.
274 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
276 # Sed substitution to avoid accidental globbing in evaled expressions
277 no_glob_subst='s/\*/\\\*/g'
282 # Note that this code is called both from 'configure', and 'config.status'
283 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
284 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
285 # so we pass a copy along to make sure it has a sensible value anyway.
286 m4_defun([_LT_PROG_LTMAIN],
287 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
288 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
289 ltmain=$ac_aux_dir/ltmain.sh
293 ## ------------------------------------- ##
294 ## Accumulate code for creating libtool. ##
295 ## ------------------------------------- ##
297 # So that we can recreate a full libtool script including additional
298 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
299 # in macros and then make a single call at the end using the 'libtool'
303 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
304 # ----------------------------------------
305 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
306 m4_define([_LT_CONFIG_LIBTOOL_INIT],
308 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
313 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
316 # _LT_CONFIG_LIBTOOL([COMMANDS])
317 # ------------------------------
318 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
319 m4_define([_LT_CONFIG_LIBTOOL],
321 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
326 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
329 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
330 # -----------------------------------------------------
331 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
332 [_LT_CONFIG_LIBTOOL([$1])
333 _LT_CONFIG_LIBTOOL_INIT([$2])
337 # _LT_FORMAT_COMMENT([COMMENT])
338 # -----------------------------
339 # Add leading comment marks to the start of each line, and a trailing
340 # full-stop to the whole comment if one is not present already.
341 m4_define([_LT_FORMAT_COMMENT],
343 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
344 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
349 ## ------------------------ ##
350 ## FIXME: Eliminate VARNAME ##
351 ## ------------------------ ##
354 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
355 # -------------------------------------------------------------------
356 # CONFIGNAME is the name given to the value in the libtool script.
357 # VARNAME is the (base) name used in the configure script.
358 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
359 # VARNAME. Any other value will be used directly.
360 m4_define([_LT_DECL],
361 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
362 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
363 [m4_ifval([$1], [$1], [$2])])
364 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
366 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
367 lt_dict_add_subkey([lt_decl_dict], [$2],
368 [tagged?], [m4_ifval([$5], [yes], [no])])])
372 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
373 # --------------------------------------------------------
374 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
377 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
378 # ------------------------------------------------
379 m4_define([lt_decl_tag_varnames],
380 [_lt_decl_filter([tagged?], [yes], $@)])
383 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
384 # ---------------------------------------------------------
385 m4_define([_lt_decl_filter],
387 [0], [m4_fatal([$0: too few arguments: $#])],
388 [1], [m4_fatal([$0: too few arguments: $#: $1])],
389 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
390 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
391 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
395 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
396 # --------------------------------------------------
397 m4_define([lt_decl_quote_varnames],
398 [_lt_decl_filter([value], [1], $@)])
401 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
402 # ---------------------------------------------------
403 m4_define([lt_decl_dquote_varnames],
404 [_lt_decl_filter([value], [2], $@)])
407 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
408 # ---------------------------------------------------
409 m4_define([lt_decl_varnames_tagged],
410 [m4_assert([$# <= 2])dnl
411 _$0(m4_quote(m4_default([$1], [[, ]])),
412 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
413 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
414 m4_define([_lt_decl_varnames_tagged],
415 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
418 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
419 # ------------------------------------------------
420 m4_define([lt_decl_all_varnames],
421 [_$0(m4_quote(m4_default([$1], [[, ]])),
423 m4_quote(lt_decl_varnames),
424 m4_quote(m4_shift($@))))[]dnl
426 m4_define([_lt_decl_all_varnames],
427 [lt_join($@, lt_decl_varnames_tagged([$1],
428 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
432 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
433 # ------------------------------------
434 # Quote a variable value, and forward it to 'config.status' so that its
435 # declaration there will have the same value as in 'configure'. VARNAME
436 # must have a single quote delimited value for this to work.
437 m4_define([_LT_CONFIG_STATUS_DECLARE],
438 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
441 # _LT_CONFIG_STATUS_DECLARATIONS
442 # ------------------------------
443 # We delimit libtool config variables with single quotes, so when
444 # we write them to config.status, we have to be sure to quote all
445 # embedded single quotes properly. In configure, this macro expands
446 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
448 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
449 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
450 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
451 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
456 # Output comment and list of tags supported by the script
457 m4_defun([_LT_LIBTOOL_TAGS],
458 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
459 available_tags='_LT_TAGS'dnl
463 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
464 # -----------------------------------
465 # Extract the dictionary values for VARNAME (optionally with TAG) and
466 # expand to a commented shell variable setting:
468 # # Some comment about what VAR is for.
469 # visible_name=$lt_internal_name
470 m4_define([_LT_LIBTOOL_DECLARE],
471 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
472 [description])))[]dnl
473 m4_pushdef([_libtool_name],
474 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
475 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
476 [0], [_libtool_name=[$]$1],
477 [1], [_libtool_name=$lt_[]$1],
478 [2], [_libtool_name=$lt_[]$1],
479 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
480 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
484 # _LT_LIBTOOL_CONFIG_VARS
485 # -----------------------
486 # Produce commented declarations of non-tagged libtool config variables
487 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
488 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
489 # section) are produced by _LT_LIBTOOL_TAG_VARS.
490 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
491 [m4_foreach([_lt_var],
492 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
493 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
496 # _LT_LIBTOOL_TAG_VARS(TAG)
497 # -------------------------
498 m4_define([_LT_LIBTOOL_TAG_VARS],
499 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
500 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
503 # _LT_TAGVAR(VARNAME, [TAGNAME])
504 # ------------------------------
505 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
508 # _LT_CONFIG_COMMANDS
509 # -------------------
510 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
511 # variables for single and double quote escaping we saved from calls
512 # to _LT_DECL, we can put quote escaped variables declarations
513 # into 'config.status', and then the shell code to quote escape them in
514 # for loops in 'config.status'. Finally, any additional code accumulated
515 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
516 m4_defun([_LT_CONFIG_COMMANDS],
517 [AC_PROVIDE_IFELSE([LT_OUTPUT],
518 dnl If the libtool generation code has been placed in $CONFIG_LT,
519 dnl instead of duplicating it all over again into config.status,
520 dnl then we will have config.status run $CONFIG_LT later, so it
521 dnl needs to know what name is stored there:
522 [AC_CONFIG_COMMANDS([libtool],
523 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
524 dnl If the libtool generation code is destined for config.status,
525 dnl expand the accumulated commands and init code now:
526 [AC_CONFIG_COMMANDS([libtool],
527 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
528 ])#_LT_CONFIG_COMMANDS
532 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
535 # The HP-UX ksh and POSIX shell print the target directory to stdout
537 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
539 sed_quote_subst='$sed_quote_subst'
540 double_quote_subst='$double_quote_subst'
541 delay_variable_subst='$delay_variable_subst'
542 _LT_CONFIG_STATUS_DECLARATIONS
545 compiler='$compiler_DEFAULT'
547 # A function that is used when there is no print builtin or printf.
548 func_fallback_echo ()
550 eval 'cat <<_LTECHO_EOF
555 # Quote evaled strings.
556 for var in lt_decl_all_varnames([[ \
557 ]], lt_decl_quote_varnames); do
558 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
559 *[[\\\\\\\`\\"\\\$]]*)
560 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
563 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
568 # Double-quote double-evaled strings.
569 for var in lt_decl_all_varnames([[ \
570 ]], lt_decl_dquote_varnames); do
571 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
572 *[[\\\\\\\`\\"\\\$]]*)
573 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
576 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
581 _LT_OUTPUT_LIBTOOL_INIT
584 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
585 # ------------------------------------
586 # Generate a child script FILE with all initialization necessary to
587 # reuse the environment learned by the parent script, and make the
588 # file executable. If COMMENT is supplied, it is inserted after the
589 # '#!' sequence but before initialization text begins. After this
590 # macro, additional text can be appended to FILE to form the body of
591 # the child script. The macro ends with non-zero status if the
592 # file could not be fully written (such as if the disk is full).
593 m4_ifdef([AS_INIT_GENERATED],
594 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
595 [m4_defun([_LT_GENERATED_FILE_INIT],
596 [m4_require([AS_PREPARE])]dnl
597 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
599 cat >$1 <<_ASEOF || lt_write_fail=1
601 # Generated by $as_me.
603 SHELL=\${CONFIG_SHELL-$SHELL}
606 cat >>$1 <<\_ASEOF || lt_write_fail=1
609 exec AS_MESSAGE_FD>&1
611 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
612 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
616 # This macro allows early generation of the libtool script (before
617 # AC_OUTPUT is called), incase it is used in configure for compilation
619 AC_DEFUN([LT_OUTPUT],
620 [: ${CONFIG_LT=./config.lt}
621 AC_MSG_NOTICE([creating $CONFIG_LT])
622 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
623 [# Run this file to recreate a libtool stub with the current configuration.])
625 cat >>"$CONFIG_LT" <<\_LTEOF
627 exec AS_MESSAGE_LOG_FD>>config.log
630 AS_BOX([Running $as_me.])
631 } >&AS_MESSAGE_LOG_FD
634 '$as_me' creates a local libtool stub from the current configuration,
635 for use in further configure time tests before the real libtool is
638 Usage: $[0] [[OPTIONS]]
640 -h, --help print this help, then exit
641 -V, --version print version number, then exit
642 -q, --quiet do not print progress messages
643 -d, --debug don't remove temporary files
645 Report bugs to <bug-libtool@gnu.org>."
648 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
649 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
650 configured by $[0], generated by m4_PACKAGE_STRING.
652 Copyright (C) 2011 Free Software Foundation, Inc.
653 This config.lt script is free software; the Free Software Foundation
654 gives unlimited permision to copy, distribute and modify it."
659 --version | --v* | -V )
660 echo "$lt_cl_version"; exit 0 ;;
662 echo "$lt_cl_help"; exit 0 ;;
663 --debug | --d* | -d )
665 --quiet | --q* | --silent | --s* | -q )
668 -*) AC_MSG_ERROR([unrecognized option: $[1]
669 Try '$[0] --help' for more information.]) ;;
671 *) AC_MSG_ERROR([unrecognized argument: $[1]
672 Try '$[0] --help' for more information.]) ;;
677 if $lt_cl_silent; then
678 exec AS_MESSAGE_FD>/dev/null
682 cat >>"$CONFIG_LT" <<_LTEOF
683 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
686 cat >>"$CONFIG_LT" <<\_LTEOF
687 AC_MSG_NOTICE([creating $ofile])
688 _LT_OUTPUT_LIBTOOL_COMMANDS
691 chmod +x "$CONFIG_LT"
693 # configure is writing to config.log, but config.lt does its own redirection,
694 # appending to config.log, which fails on DOS, as config.log is still kept
695 # open by configure. Here we exec the FD to /dev/null, effectively closing
696 # config.log, so it can be properly (re)opened and appended to by config.lt.
698 test yes = "$silent" &&
699 lt_config_lt_args="$lt_config_lt_args --quiet"
700 exec AS_MESSAGE_LOG_FD>/dev/null
701 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
702 exec AS_MESSAGE_LOG_FD>>config.log
703 $lt_cl_success || AS_EXIT(1)
709 # If TAG is the built-in tag, create an initial libtool script with a
710 # default configuration from the untagged config vars. Otherwise add code
711 # to config.status for appending the configuration named by TAG from the
712 # matching tagged config vars.
713 m4_defun([_LT_CONFIG],
714 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
715 _LT_CONFIG_SAVE_COMMANDS([
716 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
717 m4_if(_LT_TAG, [C], [
718 # See if we are running on zsh, and set the options that allow our
719 # commands through without removal of \ escapes.
720 if test -n "${ZSH_VERSION+set}"; then
725 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
728 cat <<_LT_EOF >> "$cfgfile"
730 # Generated automatically by $as_me ($PACKAGE) $VERSION
731 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
732 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
734 # Provide generalized library-building support services.
735 # Written by Gordon Matzigkeit, 1996
740 # Configured defaults for sys_lib_dlsearch_path munging.
741 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
743 # ### BEGIN LIBTOOL CONFIG
744 _LT_LIBTOOL_CONFIG_VARS
746 # ### END LIBTOOL CONFIG
750 cat <<'_LT_EOF' >> "$cfgfile"
752 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
754 _LT_PREPARE_MUNGE_PATH_LIST
755 _LT_PREPARE_CC_BASENAME
757 # ### END FUNCTIONS SHARED WITH CONFIGURE
763 cat <<\_LT_EOF >> "$cfgfile"
764 # AIX sometimes has problems with the GCC collect2 program. For some
765 # reason, if we set the COLLECT_NAMES environment variable, the problems
766 # vanish in a puff of smoke.
767 if test set != "${COLLECT_NAMES+set}"; then
777 # We use sed instead of cat because bash on DJGPP gets confused if
778 # if finds mixed CR/LF and LF-only lines. Since sed operates in
779 # text mode, it properly converts lines to CR/LF. This bash problem
780 # is reportedly fixed, but why not run on old versions too?
781 sed '$q' "$ltmain" >> "$cfgfile" \
782 || (rm -f "$cfgfile"; exit 1)
784 mv -f "$cfgfile" "$ofile" ||
785 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
788 [cat <<_LT_EOF >> "$ofile"
790 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
791 dnl in a comment (ie after a #).
792 # ### BEGIN LIBTOOL TAG CONFIG: $1
793 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
794 # ### END LIBTOOL TAG CONFIG: $1
803 ])dnl /_LT_CONFIG_SAVE_COMMANDS
807 # LT_SUPPORTED_TAG(TAG)
808 # ---------------------
809 # Trace this macro to discover what tags are supported by the libtool
810 # --tag option, using:
811 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
812 AC_DEFUN([LT_SUPPORTED_TAG], [])
815 # C support is built-in for now
816 m4_define([_LT_LANG_C_enabled], [])
817 m4_define([_LT_TAGS], [])
822 # Enable libtool support for the given language if not already enabled.
824 [AC_BEFORE([$0], [LT_OUTPUT])dnl
827 [C++], [_LT_LANG(CXX)],
828 [Go], [_LT_LANG(GO)],
829 [Java], [_LT_LANG(GCJ)],
830 [Fortran 77], [_LT_LANG(F77)],
831 [Fortran], [_LT_LANG(FC)],
832 [Windows Resource], [_LT_LANG(RC)],
833 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
835 [m4_fatal([$0: unsupported language: "$1"])])])dnl
842 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
843 [LT_SUPPORTED_TAG([$1])dnl
844 m4_append([_LT_TAGS], [$1 ])dnl
845 m4_define([_LT_LANG_]$1[_enabled], [])dnl
846 _LT_LANG_$1_CONFIG($1)])dnl
850 m4_ifndef([AC_PROG_GO], [
851 ############################################################
852 # NOTE: This macro has been submitted for inclusion into #
853 # GNU Autoconf as AC_PROG_GO. When it is available in #
854 # a released version of Autoconf we should remove this #
855 # macro and use it instead. #
856 ############################################################
857 m4_defun([AC_PROG_GO],
859 AC_ARG_VAR([GOC], [Go compiler command])dnl
860 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
861 _AC_ARG_VAR_LDFLAGS()dnl
862 AC_CHECK_TOOL(GOC, gccgo)
863 if test -z "$GOC"; then
864 if test -n "$ac_tool_prefix"; then
865 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
868 if test -z "$GOC"; then
869 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
875 # _LT_LANG_DEFAULT_CONFIG
876 # -----------------------
877 m4_defun([_LT_LANG_DEFAULT_CONFIG],
878 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
880 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
882 AC_PROVIDE_IFELSE([AC_PROG_F77],
884 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
886 AC_PROVIDE_IFELSE([AC_PROG_FC],
888 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
890 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
891 dnl pulling things in needlessly.
892 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
894 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
896 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
898 [m4_ifdef([AC_PROG_GCJ],
899 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
900 m4_ifdef([A][M_PROG_GCJ],
901 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
902 m4_ifdef([LT_PROG_GCJ],
903 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
905 AC_PROVIDE_IFELSE([AC_PROG_GO],
907 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
909 AC_PROVIDE_IFELSE([LT_PROG_RC],
911 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
912 ])# _LT_LANG_DEFAULT_CONFIG
915 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
916 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
917 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
918 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
919 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
920 dnl aclocal-1.4 backwards compatibility:
921 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
922 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
923 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
924 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
925 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
930 m4_defun([_LT_TAG_COMPILER],
931 [AC_REQUIRE([AC_PROG_CC])dnl
933 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
934 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
935 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
936 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
938 # If no C compiler was specified, use CC.
941 # If no C compiler flags were specified, use CFLAGS.
942 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
944 # Allow CC to be a program name with arguments.
949 # _LT_COMPILER_BOILERPLATE
950 # ------------------------
951 # Check for compiler boilerplate output or warnings with
952 # the simple compiler test code.
953 m4_defun([_LT_COMPILER_BOILERPLATE],
954 [m4_require([_LT_DECL_SED])dnl
955 ac_outfile=conftest.$ac_objext
956 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
957 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
958 _lt_compiler_boilerplate=`cat conftest.err`
960 ])# _LT_COMPILER_BOILERPLATE
963 # _LT_LINKER_BOILERPLATE
964 # ----------------------
965 # Check for linker boilerplate output or warnings with
966 # the simple link test code.
967 m4_defun([_LT_LINKER_BOILERPLATE],
968 [m4_require([_LT_DECL_SED])dnl
969 ac_outfile=conftest.$ac_objext
970 echo "$lt_simple_link_test_code" >conftest.$ac_ext
971 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
972 _lt_linker_boilerplate=`cat conftest.err`
974 ])# _LT_LINKER_BOILERPLATE
976 # _LT_REQUIRED_DARWIN_CHECKS
977 # -------------------------
978 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
981 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
982 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
983 AC_CHECK_TOOL([LIPO], [lipo], [:])
984 AC_CHECK_TOOL([OTOOL], [otool], [:])
985 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
986 _LT_DECL([], [DSYMUTIL], [1],
987 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
988 _LT_DECL([], [NMEDIT], [1],
989 [Tool to change global to local symbols on Mac OS X])
990 _LT_DECL([], [LIPO], [1],
991 [Tool to manipulate fat objects and archives on Mac OS X])
992 _LT_DECL([], [OTOOL], [1],
993 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
994 _LT_DECL([], [OTOOL64], [1],
995 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
997 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
998 [lt_cv_apple_cc_single_mod=no
999 if test -z "$LT_MULTI_MODULE"; then
1000 # By default we will add the -single_module flag. You can override
1001 # by either setting the environment variable LT_MULTI_MODULE
1002 # non-empty at configure time, or by adding -multi_module to the
1004 rm -rf libconftest.dylib*
1005 echo "int foo(void){return 1;}" > conftest.c
1006 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1007 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1008 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1009 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1011 # If there is a non-empty error log, and "single_module"
1012 # appears in it, assume the flag caused a linker warning
1013 if test -s conftest.err && $GREP single_module conftest.err; then
1014 cat conftest.err >&AS_MESSAGE_LOG_FD
1015 # Otherwise, if the output was created with a 0 exit code from
1016 # the compiler, it worked.
1017 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1018 lt_cv_apple_cc_single_mod=yes
1020 cat conftest.err >&AS_MESSAGE_LOG_FD
1022 rm -rf libconftest.dylib*
1026 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1027 [lt_cv_ld_exported_symbols_list],
1028 [lt_cv_ld_exported_symbols_list=no
1029 save_LDFLAGS=$LDFLAGS
1030 echo "_main" > conftest.sym
1031 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1032 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1033 [lt_cv_ld_exported_symbols_list=yes],
1034 [lt_cv_ld_exported_symbols_list=no])
1035 LDFLAGS=$save_LDFLAGS
1038 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1039 [lt_cv_ld_force_load=no
1040 cat > conftest.c << _LT_EOF
1041 int forced_loaded() { return 2;}
1043 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1044 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1045 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1046 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1047 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1048 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1049 cat > conftest.c << _LT_EOF
1050 int main() { return 0;}
1052 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1053 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1055 if test -s conftest.err && $GREP force_load conftest.err; then
1056 cat conftest.err >&AS_MESSAGE_LOG_FD
1057 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1058 lt_cv_ld_force_load=yes
1060 cat conftest.err >&AS_MESSAGE_LOG_FD
1062 rm -f conftest.err libconftest.a conftest conftest.c
1063 rm -rf conftest.dSYM
1066 rhapsody* | darwin1.[[012]])
1067 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1069 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1070 darwin*) # darwin 5.x on
1071 # if running on 10.5 or later, the deployment target defaults
1072 # to the OS version, if on x86, and 10.4, the deployment
1073 # target defaults to 10.4. Don't you love it?
1074 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1075 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1076 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1078 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1080 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1084 if test yes = "$lt_cv_apple_cc_single_mod"; then
1085 _lt_dar_single_mod='$single_module'
1087 if test yes = "$lt_cv_ld_exported_symbols_list"; then
1088 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1090 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1092 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1093 _lt_dsymutil='~$DSYMUTIL $lib || :'
1102 # _LT_DARWIN_LINKER_FEATURES([TAG])
1103 # ---------------------------------
1104 # Checks for linker and compiler features on darwin
1105 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1107 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1108 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1109 _LT_TAGVAR(hardcode_direct, $1)=no
1110 _LT_TAGVAR(hardcode_automatic, $1)=yes
1111 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1112 if test yes = "$lt_cv_ld_force_load"; then
1113 _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\"`'
1114 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1115 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1117 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1119 _LT_TAGVAR(link_all_deplibs, $1)=yes
1120 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1121 case $cc_basename in
1122 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1123 *) _lt_dar_can_shared=$GCC ;;
1125 if test yes = "$_lt_dar_can_shared"; then
1126 output_verbose_link_cmd=func_echo_all
1127 _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"
1128 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1129 _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"
1130 _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"
1132 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
1133 _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"
1134 _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"
1138 _LT_TAGVAR(ld_shlibs, $1)=no
1142 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1143 # ----------------------------------
1144 # Links a minimal program and checks the executable
1145 # for the system default hardcoded library path. In most cases,
1146 # this is /usr/lib:/lib, but when the MPI compilers are used
1147 # the location of the communication and MPI libs are included too.
1148 # If we don't find anything, use the default library path according
1149 # to the aix ld manual.
1150 # Store the results from the different compilers for each TAGNAME.
1151 # Allow to override them for all tags through lt_cv_aix_libpath.
1152 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1153 [m4_require([_LT_DECL_SED])dnl
1154 if test set = "${lt_cv_aix_libpath+set}"; then
1155 aix_libpath=$lt_cv_aix_libpath
1157 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1158 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1159 lt_aix_libpath_sed='[
1160 /Import File Strings/,/^$/ {
1162 s/^0 *\([^ ]*\) *$/\1/
1166 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1167 # Check for a 64-bit object if we didn't find anything.
1168 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1169 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1171 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1172 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1175 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1177 ])# _LT_SYS_MODULE_PATH_AIX
1180 # _LT_SHELL_INIT(ARG)
1181 # -------------------
1182 m4_define([_LT_SHELL_INIT],
1183 [m4_divert_text([M4SH-INIT], [$1
1184 ])])# _LT_SHELL_INIT
1188 # _LT_PROG_ECHO_BACKSLASH
1189 # -----------------------
1190 # Find how we can fake an echo command that does not interpret backslash.
1191 # In particular, with Autoconf 2.60 or later we add some code to the start
1192 # of the generated configure script that will find a shell with a builtin
1193 # printf (that we can use as an echo command).
1194 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1195 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1196 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1197 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1199 AC_MSG_CHECKING([how to print strings])
1200 # Test print first, because it will be a builtin if present.
1201 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1202 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1204 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1207 # Use this function as a fallback that always works.
1208 func_fallback_echo ()
1210 eval 'cat <<_LTECHO_EOF
1214 ECHO='func_fallback_echo'
1217 # func_echo_all arg...
1218 # Invoke $ECHO with all args, space-separated.
1225 printf*) AC_MSG_RESULT([printf]) ;;
1226 print*) AC_MSG_RESULT([print -r]) ;;
1227 *) AC_MSG_RESULT([cat]) ;;
1230 m4_ifdef([_AS_DETECT_SUGGESTED],
1231 [_AS_DETECT_SUGGESTED([
1232 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1233 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1234 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1235 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1236 PATH=/empty FPATH=/empty; export PATH FPATH
1237 test "X`printf %s $ECHO`" = "X$ECHO" \
1238 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1240 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1241 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1242 ])# _LT_PROG_ECHO_BACKSLASH
1247 AC_DEFUN([_LT_WITH_SYSROOT],
1248 [AC_MSG_CHECKING([for sysroot])
1249 AC_ARG_WITH([sysroot],
1250 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1251 [Search for dependent libraries within DIR (or the compiler's sysroot
1252 if not specified).])],
1253 [], [with_sysroot=no])
1255 dnl lt_sysroot will always be passed unquoted. We quote it here
1256 dnl in case the user passed a directory name.
1258 case $with_sysroot in #(
1260 if test yes = "$GCC"; then
1261 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1265 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
1270 AC_MSG_RESULT([$with_sysroot])
1271 AC_MSG_ERROR([The sysroot must be an absolute path.])
1275 AC_MSG_RESULT([${lt_sysroot:-no}])
1276 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1277 [dependent libraries, and where our libraries should be installed.])])
1281 m4_defun([_LT_ENABLE_LOCK],
1282 [AC_ARG_ENABLE([libtool-lock],
1283 [AS_HELP_STRING([--disable-libtool-lock],
1284 [avoid locking (might break parallel builds)])])
1285 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
1287 # Some flags need to be propagated to the compiler or linker for good
1291 # Find out what ABI is being produced by ac_compile, and set mode
1292 # options accordingly.
1293 echo 'int i;' > conftest.$ac_ext
1294 if AC_TRY_EVAL(ac_compile); then
1295 case `/usr/bin/file conftest.$ac_objext` in
1307 # Find out what ABI is being produced by ac_compile, and set linker
1308 # options accordingly.
1309 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1310 if AC_TRY_EVAL(ac_compile); then
1311 if test yes = "$lt_cv_prog_gnu_ld"; then
1312 case `/usr/bin/file conftest.$ac_objext` in
1314 LD="${LD-ld} -melf32bsmip"
1317 LD="${LD-ld} -melf32bmipn32"
1320 LD="${LD-ld} -melf64bmip"
1324 case `/usr/bin/file conftest.$ac_objext` in
1341 # Find out what ABI is being produced by ac_compile, and set linker
1342 # options accordingly.
1343 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1344 if AC_TRY_EVAL(ac_compile); then
1346 case `/usr/bin/file conftest.$ac_objext` in
1354 case `/usr/bin/file conftest.$ac_objext` in
1356 emul="${emul}btsmip"
1359 emul="${emul}ltsmip"
1362 case `/usr/bin/file conftest.$ac_objext` in
1367 LD="${LD-ld} -m $emul"
1372 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1373 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1374 # Find out what ABI is being produced by ac_compile, and set linker
1375 # options accordingly. Note that the listed cases only cover the
1376 # situations where additional linker options are needed (such as when
1377 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1378 # vice versa); the common cases where no linker options are needed do
1379 # not appear in the list.
1380 echo 'int i;' > conftest.$ac_ext
1381 if AC_TRY_EVAL(ac_compile); then
1382 case `/usr/bin/file conftest.o` in
1385 x86_64-*kfreebsd*-gnu)
1386 LD="${LD-ld} -m elf_i386_fbsd"
1389 case `/usr/bin/file conftest.o` in
1391 LD="${LD-ld} -m elf32_x86_64"
1394 LD="${LD-ld} -m elf_i386"
1398 powerpc64le-*linux*)
1399 LD="${LD-ld} -m elf32lppclinux"
1402 LD="${LD-ld} -m elf32ppclinux"
1405 LD="${LD-ld} -m elf_s390"
1408 LD="${LD-ld} -m elf32_sparc"
1414 x86_64-*kfreebsd*-gnu)
1415 LD="${LD-ld} -m elf_x86_64_fbsd"
1418 LD="${LD-ld} -m elf_x86_64"
1421 LD="${LD-ld} -m elf64lppc"
1424 LD="${LD-ld} -m elf64ppc"
1426 s390*-*linux*|s390*-*tpf*)
1427 LD="${LD-ld} -m elf64_s390"
1430 LD="${LD-ld} -m elf64_sparc"
1440 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1442 CFLAGS="$CFLAGS -belf"
1443 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1445 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1447 if test yes != "$lt_cv_cc_needs_belf"; then
1448 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1453 # Find out what ABI is being produced by ac_compile, and set linker
1454 # options accordingly.
1455 echo 'int i;' > conftest.$ac_ext
1456 if AC_TRY_EVAL(ac_compile); then
1457 case `/usr/bin/file conftest.o` in
1459 case $lt_cv_prog_gnu_ld in
1462 i?86-*-solaris*|x86_64-*-solaris*)
1463 LD="${LD-ld} -m elf_x86_64"
1466 LD="${LD-ld} -m elf64_sparc"
1469 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1470 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1475 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1487 need_locks=$enable_libtool_lock
1493 m4_defun([_LT_PROG_AR],
1494 [AC_CHECK_TOOLS(AR, [ar], false)
1497 _LT_DECL([], [AR], [1], [The archiver])
1498 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
1500 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1501 [lt_cv_ar_at_file=no
1502 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1503 [echo conftest.$ac_objext > conftest.lst
1504 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1505 AC_TRY_EVAL([lt_ar_try])
1506 if test 0 -eq "$ac_status"; then
1507 # Ensure the archiver fails upon bogus file names.
1508 rm -f conftest.$ac_objext libconftest.a
1509 AC_TRY_EVAL([lt_ar_try])
1510 if test 0 -ne "$ac_status"; then
1514 rm -f conftest.* libconftest.a
1518 if test no = "$lt_cv_ar_at_file"; then
1521 archiver_list_spec=$lt_cv_ar_at_file
1523 _LT_DECL([], [archiver_list_spec], [1],
1524 [How to feed a file listing to the archiver])
1528 # _LT_CMD_OLD_ARCHIVE
1529 # -------------------
1530 m4_defun([_LT_CMD_OLD_ARCHIVE],
1533 AC_CHECK_TOOL(STRIP, strip, :)
1534 test -z "$STRIP" && STRIP=:
1535 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1537 AC_CHECK_TOOL(RANLIB, ranlib, :)
1538 test -z "$RANLIB" && RANLIB=:
1539 _LT_DECL([], [RANLIB], [1],
1540 [Commands used to install an old-style archive])
1542 # Determine commands to create old-style static archives.
1543 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1544 old_postinstall_cmds='chmod 644 $oldlib'
1545 old_postuninstall_cmds=
1547 if test -n "$RANLIB"; then
1550 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1553 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1556 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1561 lock_old_archive_extraction=yes ;;
1563 lock_old_archive_extraction=no ;;
1565 _LT_DECL([], [old_postinstall_cmds], [2])
1566 _LT_DECL([], [old_postuninstall_cmds], [2])
1567 _LT_TAGDECL([], [old_archive_cmds], [2],
1568 [Commands used to build an old-style archive])
1569 _LT_DECL([], [lock_old_archive_extraction], [0],
1570 [Whether to use a lock for old archive extraction])
1571 ])# _LT_CMD_OLD_ARCHIVE
1574 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1575 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1576 # ----------------------------------------------------------------
1577 # Check whether the given compiler option works
1578 AC_DEFUN([_LT_COMPILER_OPTION],
1579 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1580 m4_require([_LT_DECL_SED])dnl
1581 AC_CACHE_CHECK([$1], [$2],
1583 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1584 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1585 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
1586 # Insert the option either (1) after the last *FLAGS variable, or
1587 # (2) before a word containing "conftest.", or (3) at the end.
1588 # Note that $ac_compile itself does not contain backslashes and begins
1589 # with a dollar sign (not a hyphen), so the echo should work correctly.
1590 # The option is referenced via a variable to avoid confusing sed.
1591 lt_compile=`echo "$ac_compile" | $SED \
1592 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1593 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1594 -e 's:$: $lt_compiler_flag:'`
1595 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1596 (eval "$lt_compile" 2>conftest.err)
1598 cat conftest.err >&AS_MESSAGE_LOG_FD
1599 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1600 if (exit $ac_status) && test -s "$ac_outfile"; then
1601 # The compiler can only warn and ignore the option if not recognized
1602 # So say no if there are warnings other than the usual output.
1603 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1604 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1605 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1612 if test yes = "[$]$2"; then
1613 m4_if([$5], , :, [$5])
1615 m4_if([$6], , :, [$6])
1617 ])# _LT_COMPILER_OPTION
1620 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1621 dnl aclocal-1.4 backwards compatibility:
1622 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1625 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1626 # [ACTION-SUCCESS], [ACTION-FAILURE])
1627 # ----------------------------------------------------
1628 # Check whether the given linker option works
1629 AC_DEFUN([_LT_LINKER_OPTION],
1630 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1631 m4_require([_LT_DECL_SED])dnl
1632 AC_CACHE_CHECK([$1], [$2],
1634 save_LDFLAGS=$LDFLAGS
1635 LDFLAGS="$LDFLAGS $3"
1636 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1637 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1638 # The linker can only warn and ignore the option if not recognized
1639 # So say no if there are warnings
1640 if test -s conftest.err; then
1641 # Append any errors to the config.log.
1642 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1643 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1644 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1645 if diff conftest.exp conftest.er2 >/dev/null; then
1653 LDFLAGS=$save_LDFLAGS
1656 if test yes = "[$]$2"; then
1657 m4_if([$4], , :, [$4])
1659 m4_if([$5], , :, [$5])
1661 ])# _LT_LINKER_OPTION
1664 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1665 dnl aclocal-1.4 backwards compatibility:
1666 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1671 AC_DEFUN([LT_CMD_MAX_LEN],
1672 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1673 # find the maximum length of command line arguments
1674 AC_MSG_CHECKING([the maximum length of command line arguments])
1675 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1681 # On DJGPP, this test can blow up pretty badly due to problems in libc
1682 # (any single argument exceeding 2000 bytes causes a buffer overrun
1683 # during glob expansion). Even if it were fixed, the result of this
1684 # check would be larger than it should be.
1685 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1689 # Under GNU Hurd, this test is not required because there is
1690 # no limit to the length of command line arguments.
1691 # Libtool will interpret -1 as no limit whatsoever
1692 lt_cv_sys_max_cmd_len=-1;
1695 cygwin* | mingw* | cegcc*)
1696 # On Win9x/ME, this test blows up -- it succeeds, but takes
1697 # about 5 minutes as the teststring grows exponentially.
1698 # Worse, since 9x/ME are not pre-emptively multitasking,
1699 # you end up with a "frozen" computer, even though with patience
1700 # the test eventually succeeds (with a max line length of 256k).
1701 # Instead, let's just punt: use the minimum linelength reported by
1702 # all of the supported platforms: 8192 (on NT/2K/XP).
1703 lt_cv_sys_max_cmd_len=8192;
1707 # On MiNT this can take a long time and run out of memory.
1708 lt_cv_sys_max_cmd_len=8192;
1712 # On AmigaOS with pdksh, this test takes hours, literally.
1713 # So we just punt and use a minimum line length of 8192.
1714 lt_cv_sys_max_cmd_len=8192;
1717 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
1718 # This has been around since 386BSD, at least. Likely further.
1719 if test -x /sbin/sysctl; then
1720 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1721 elif test -x /usr/sbin/sysctl; then
1722 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1724 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1726 # And add a safety zone
1727 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1728 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1732 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1733 lt_cv_sys_max_cmd_len=196608
1737 # The test takes a long time on OS/2.
1738 lt_cv_sys_max_cmd_len=8192
1742 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1743 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1744 # nice to cause kernel panics so lets avoid the loop below.
1745 # First set a reasonable default.
1746 lt_cv_sys_max_cmd_len=16384
1748 if test -x /sbin/sysconfig; then
1749 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1750 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1755 lt_cv_sys_max_cmd_len=102400
1757 sysv5* | sco5v6* | sysv4.2uw2*)
1758 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1759 if test -n "$kargmax"; then
1760 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1762 lt_cv_sys_max_cmd_len=32768
1766 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1767 if test -n "$lt_cv_sys_max_cmd_len" && \
1768 test undefined != "$lt_cv_sys_max_cmd_len"; then
1769 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1770 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1772 # Make teststring a little bigger before we do anything with it.
1773 # a 1K string should be a reasonable start.
1774 for i in 1 2 3 4 5 6 7 8; do
1775 teststring=$teststring$teststring
1777 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1778 # If test is not a shell built-in, we'll probably end up computing a
1779 # maximum length that is only half of the actual maximum length, but
1781 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1782 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1783 test 17 != "$i" # 1/2 MB should be enough
1786 teststring=$teststring$teststring
1788 # Only check the string length outside the loop.
1789 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1791 # Add a significant safety factor because C++ compilers can tack on
1792 # massive amounts of additional arguments before passing them to the
1793 # linker. It appears as though 1/2 is a usable value.
1794 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1799 if test -n "$lt_cv_sys_max_cmd_len"; then
1800 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1804 max_cmd_len=$lt_cv_sys_max_cmd_len
1805 _LT_DECL([], [max_cmd_len], [0],
1806 [What is the maximum length of a command?])
1810 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1811 dnl aclocal-1.4 backwards compatibility:
1812 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1817 m4_defun([_LT_HEADER_DLFCN],
1818 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1819 ])# _LT_HEADER_DLFCN
1822 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1823 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1824 # ----------------------------------------------------------------
1825 m4_defun([_LT_TRY_DLOPEN_SELF],
1826 [m4_require([_LT_HEADER_DLFCN])dnl
1827 if test yes = "$cross_compiling"; then :
1830 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1831 lt_status=$lt_dlunknown
1832 cat > conftest.$ac_ext <<_LT_EOF
1833 [#line $LINENO "configure"
1834 #include "confdefs.h"
1843 # define LT_DLGLOBAL RTLD_GLOBAL
1846 # define LT_DLGLOBAL DL_GLOBAL
1848 # define LT_DLGLOBAL 0
1852 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1853 find out it does not work in some platform. */
1854 #ifndef LT_DLLAZY_OR_NOW
1856 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1859 # define LT_DLLAZY_OR_NOW DL_LAZY
1862 # define LT_DLLAZY_OR_NOW RTLD_NOW
1865 # define LT_DLLAZY_OR_NOW DL_NOW
1867 # define LT_DLLAZY_OR_NOW 0
1874 /* When -fvisibility=hidden is used, assume the code has been annotated
1875 correspondingly for the symbols needed. */
1876 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1877 int fnord () __attribute__((visibility("default")));
1880 int fnord () { return 42; }
1883 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1884 int status = $lt_dlunknown;
1888 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1891 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1892 else puts (dlerror ());
1894 /* dlclose (self); */
1902 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
1903 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1906 x$lt_dlno_uscore) $1 ;;
1907 x$lt_dlneed_uscore) $2 ;;
1908 x$lt_dlunknown|x*) $3 ;;
1911 # compilation failed
1916 ])# _LT_TRY_DLOPEN_SELF
1919 # LT_SYS_DLOPEN_SELF
1920 # ------------------
1921 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1922 [m4_require([_LT_HEADER_DLFCN])dnl
1923 if test yes != "$enable_dlopen"; then
1924 enable_dlopen=unknown
1925 enable_dlopen_self=unknown
1926 enable_dlopen_self_static=unknown
1933 lt_cv_dlopen=load_add_on
1935 lt_cv_dlopen_self=yes
1938 mingw* | pw32* | cegcc*)
1939 lt_cv_dlopen=LoadLibrary
1949 # if libdl is installed we need to link against it
1950 AC_CHECK_LIB([dl], [dlopen],
1951 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1954 lt_cv_dlopen_self=yes
1959 # Don't try to run any link tests for TPF. We know it's impossible
1960 # because TPF is a cross-compiler, and we know how we open DSOs.
1963 lt_cv_dlopen_self=no
1967 AC_CHECK_FUNC([shl_load],
1968 [lt_cv_dlopen=shl_load],
1969 [AC_CHECK_LIB([dld], [shl_load],
1970 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
1971 [AC_CHECK_FUNC([dlopen],
1972 [lt_cv_dlopen=dlopen],
1973 [AC_CHECK_LIB([dl], [dlopen],
1974 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
1975 [AC_CHECK_LIB([svld], [dlopen],
1976 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
1977 [AC_CHECK_LIB([dld], [dld_link],
1978 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
1987 if test no = "$lt_cv_dlopen"; then
1993 case $lt_cv_dlopen in
1995 save_CPPFLAGS=$CPPFLAGS
1996 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1998 save_LDFLAGS=$LDFLAGS
1999 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2002 LIBS="$lt_cv_dlopen_libs $LIBS"
2004 AC_CACHE_CHECK([whether a program can dlopen itself],
2005 lt_cv_dlopen_self, [dnl
2006 _LT_TRY_DLOPEN_SELF(
2007 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2008 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2011 if test yes = "$lt_cv_dlopen_self"; then
2012 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2013 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2014 lt_cv_dlopen_self_static, [dnl
2015 _LT_TRY_DLOPEN_SELF(
2016 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2017 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2021 CPPFLAGS=$save_CPPFLAGS
2022 LDFLAGS=$save_LDFLAGS
2027 case $lt_cv_dlopen_self in
2028 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2029 *) enable_dlopen_self=unknown ;;
2032 case $lt_cv_dlopen_self_static in
2033 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2034 *) enable_dlopen_self_static=unknown ;;
2037 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2038 [Whether dlopen is supported])
2039 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2040 [Whether dlopen of programs is supported])
2041 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2042 [Whether dlopen of statically linked programs is supported])
2043 ])# LT_SYS_DLOPEN_SELF
2046 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2047 dnl aclocal-1.4 backwards compatibility:
2048 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2051 # _LT_COMPILER_C_O([TAGNAME])
2052 # ---------------------------
2053 # Check to see if options -c and -o are simultaneously supported by compiler.
2054 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2055 m4_defun([_LT_COMPILER_C_O],
2056 [m4_require([_LT_DECL_SED])dnl
2057 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2058 m4_require([_LT_TAG_COMPILER])dnl
2059 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2060 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2061 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2062 $RM -r conftest 2>/dev/null
2066 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2068 lt_compiler_flag="-o out/conftest2.$ac_objext"
2069 # Insert the option either (1) after the last *FLAGS variable, or
2070 # (2) before a word containing "conftest.", or (3) at the end.
2071 # Note that $ac_compile itself does not contain backslashes and begins
2072 # with a dollar sign (not a hyphen), so the echo should work correctly.
2073 lt_compile=`echo "$ac_compile" | $SED \
2074 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2075 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2076 -e 's:$: $lt_compiler_flag:'`
2077 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2078 (eval "$lt_compile" 2>out/conftest.err)
2080 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2081 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2082 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2084 # The compiler can only warn and ignore the option if not recognized
2085 # So say no if there are warnings
2086 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2087 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2088 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2089 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2092 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2094 # SGI C++ compiler will create directory out/ii_files/ for
2095 # template instantiation
2096 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2097 $RM out/* && rmdir out
2102 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2103 [Does compiler simultaneously support -c and -o options?])
2104 ])# _LT_COMPILER_C_O
2107 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2108 # ----------------------------------
2109 # Check to see if we can do hard links to lock some files if needed
2110 m4_defun([_LT_COMPILER_FILE_LOCKS],
2111 [m4_require([_LT_ENABLE_LOCK])dnl
2112 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2113 _LT_COMPILER_C_O([$1])
2115 hard_links=nottested
2116 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2117 # do not overwrite the value of need_locks provided by the user
2118 AC_MSG_CHECKING([if we can lock with hard links])
2121 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2123 ln conftest.a conftest.b 2>&5 || hard_links=no
2124 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2125 AC_MSG_RESULT([$hard_links])
2126 if test no = "$hard_links"; then
2127 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2133 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2134 ])# _LT_COMPILER_FILE_LOCKS
2139 m4_defun([_LT_CHECK_OBJDIR],
2140 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2141 [rm -f .libs 2>/dev/null
2142 mkdir .libs 2>/dev/null
2143 if test -d .libs; then
2146 # MS-DOS does not allow filenames that begin with a dot.
2149 rmdir .libs 2>/dev/null])
2150 objdir=$lt_cv_objdir
2151 _LT_DECL([], [objdir], [0],
2152 [The name of the directory that contains temporary libtool files])dnl
2153 m4_pattern_allow([LT_OBJDIR])dnl
2154 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2155 [Define to the sub-directory where libtool stores uninstalled libraries.])
2156 ])# _LT_CHECK_OBJDIR
2159 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2160 # --------------------------------------
2161 # Check hardcoding attributes.
2162 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2163 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2164 _LT_TAGVAR(hardcode_action, $1)=
2165 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2166 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2167 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2169 # We can hardcode non-existent directories.
2170 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2171 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2172 # have to relink, otherwise we might link with an installed library
2173 # when we should be linking with a yet-to-be-installed one
2174 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2175 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2176 # Linking always hardcodes the temporary library directory.
2177 _LT_TAGVAR(hardcode_action, $1)=relink
2179 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2180 _LT_TAGVAR(hardcode_action, $1)=immediate
2183 # We cannot hardcode anything, or else we can only hardcode existing
2185 _LT_TAGVAR(hardcode_action, $1)=unsupported
2187 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2189 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2190 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2191 # Fast installation is not supported
2192 enable_fast_install=no
2193 elif test yes = "$shlibpath_overrides_runpath" ||
2194 test no = "$enable_shared"; then
2195 # Fast installation is not necessary
2196 enable_fast_install=needless
2198 _LT_TAGDECL([], [hardcode_action], [0],
2199 [How to hardcode a shared library path into an executable])
2200 ])# _LT_LINKER_HARDCODE_LIBPATH
2205 m4_defun([_LT_CMD_STRIPLIB],
2206 [m4_require([_LT_DECL_EGREP])
2209 AC_MSG_CHECKING([whether stripping libraries is possible])
2210 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2211 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2212 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2213 AC_MSG_RESULT([yes])
2215 # FIXME - insert some real tests, host_os isn't really good enough
2218 if test -n "$STRIP"; then
2219 striplib="$STRIP -x"
2220 old_striplib="$STRIP -S"
2221 AC_MSG_RESULT([yes])
2231 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2232 _LT_DECL([], [striplib], [1])
2233 ])# _LT_CMD_STRIPLIB
2236 # _LT_PREPARE_MUNGE_PATH_LIST
2237 # ---------------------------
2238 # Make sure func_munge_path_list() is defined correctly.
2239 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2240 [[# func_munge_path_list VARIABLE PATH
2241 # -----------------------------------
2242 # VARIABLE is name of variable containing _space_ separated list of
2243 # directories to be munged by the contents of PATH, which is string
2246 # string "DIR[ DIR]" will be prepended to VARIABLE
2248 # string "DIR[ DIR]" will be appended to VARIABLE
2249 # "DIRP[:DIRP]::[DIRA:]DIRA"
2250 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2251 # "DIRA[ DIRA]" will be appended to VARIABLE
2253 # VARIABLE will be replaced by "DIR[ DIR]"
2254 func_munge_path_list ()
2260 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2263 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2266 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2267 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2270 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2274 ]])# _LT_PREPARE_PATH_LIST
2277 # _LT_SYS_DYNAMIC_LINKER([TAG])
2278 # -----------------------------
2279 # PORTME Fill in your ld.so characteristics
2280 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2281 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2282 m4_require([_LT_DECL_EGREP])dnl
2283 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2284 m4_require([_LT_DECL_OBJDUMP])dnl
2285 m4_require([_LT_DECL_SED])dnl
2286 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2287 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2288 AC_MSG_CHECKING([dynamic linker characteristics])
2291 if test yes = "$GCC"; then
2293 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2294 *) lt_awk_arg='/^libraries:/' ;;
2297 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2298 *) lt_sed_strip_eq='s|=/|/|g' ;;
2300 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2301 case $lt_search_path_spec in
2303 # if the path contains ";" then we assume it to be the separator
2304 # otherwise default to the standard path separator (i.e. ":") - it is
2305 # assumed that no part of a normal pathname contains ";" but that should
2306 # okay in the real world where ";" in dirpaths is itself problematic.
2307 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2310 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2313 # Ok, now we have the path, separated by spaces, we can step through it
2314 # and add multilib dir if necessary...
2315 lt_tmp_lt_search_path_spec=
2316 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2317 # ...but if some path component already ends with the multilib dir we assume
2318 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2319 case "$lt_multi_os_dir; $lt_search_path_spec " in
2320 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2324 for lt_sys_path in $lt_search_path_spec; do
2325 if test -d "$lt_sys_path$lt_multi_os_dir"; then
2326 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2327 elif test -n "$lt_multi_os_dir"; then
2328 test -d "$lt_sys_path" && \
2329 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2332 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2333 BEGIN {RS = " "; FS = "/|\n";} {
2336 for (lt_i = NF; lt_i > 0; lt_i--) {
2337 if ($lt_i != "" && $lt_i != ".") {
2338 if ($lt_i == "..") {
2341 if (lt_count == 0) {
2342 lt_foo = "/" $lt_i lt_foo;
2349 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2350 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2352 # AWK program above erroneously prepends '/' to C:/dos/paths
2355 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2356 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2358 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2360 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2363 libname_spec='lib$name'
2371 shlibpath_overrides_runpath=unknown
2373 dynamic_linker="$host_os ld.so"
2374 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2375 need_lib_prefix=unknown
2376 hardcode_into_libs=no
2378 # when you set need_version to no, make sure it does not cause -set_version
2379 # flags to be left without arguments
2380 need_version=unknown
2382 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2383 [User-defined run-time library search path.])
2387 version_type=linux # correct to gnu/linux during the next big refactor
2388 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2389 shlibpath_var=LIBPATH
2391 # AIX 3 has no versioning support, so we append a major version to the name.
2392 soname_spec='$libname$release$shared_ext$major'
2396 version_type=linux # correct to gnu/linux during the next big refactor
2399 hardcode_into_libs=yes
2400 if test ia64 = "$host_cpu"; then
2401 # AIX 5 supports IA64
2402 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2403 shlibpath_var=LD_LIBRARY_PATH
2405 # With GCC up to 2.95.x, collect2 would create an import file
2406 # for dependence libraries. The import file would start with
2407 # the line '#! .'. This would cause the generated library to
2408 # depend on '.', always an invalid library. This was fixed in
2409 # development snapshots of GCC prior to 3.0.
2411 aix4 | aix4.[[01]] | aix4.[[01]].*)
2412 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2414 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2421 # Using Import Files as archive members, it is possible to support
2422 # filename-based versioning of shared library archives on AIX. While
2423 # this would work for both with and without runtime linking, it will
2424 # prevent static linking of such archives. So we do filename-based
2425 # shared library versioning with .so extension only, which is used
2426 # when both runtime linking and shared linking is enabled.
2427 # Unfortunately, runtime linking may impact performance, so we do
2428 # not want this to be the default eventually. Also, we use the
2429 # versioned .so libs for executables only if there is the -brtl
2430 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2431 # To allow for filename-based versioning support, we need to create
2432 # libNAME.so.V as an archive file, containing:
2433 # *) an Import File, referring to the versioned filename of the
2434 # archive as well as the shared archive member, telling the
2435 # bitwidth (32 or 64) of that shared object, and providing the
2436 # list of exported symbols of that shared object, eventually
2437 # decorated with the 'weak' keyword
2438 # *) the shared object with the F_LOADONLY flag set, to really avoid
2439 # it being seen by the linker.
2440 # At run time we better use the real file rather than another symlink,
2441 # but for link time we create the symlink libNAME.so -> libNAME.so.V
2443 case $with_aix_soname,$aix_use_runtimelinking in
2444 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2445 # soname into executable. Probably we can add versioning support to
2446 # collect2, so additional links can be useful in future.
2447 aix,yes) # traditional libtool
2448 dynamic_linker='AIX unversionable lib.so'
2449 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2450 # instead of lib<name>.a to let people know that these are not
2451 # typical AIX shared libraries.
2452 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2454 aix,no) # traditional AIX only
2455 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2456 # We preserve .a as extension for shared libraries through AIX4.2
2457 # and later when we are not doing run time linking.
2458 library_names_spec='$libname$release.a $libname.a'
2459 soname_spec='$libname$release$shared_ext$major'
2461 svr4,*) # full svr4 only
2462 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2463 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2464 # We do not specify a path in Import Files, so LIBPATH fires.
2465 shlibpath_overrides_runpath=yes
2467 *,yes) # both, prefer svr4
2468 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2469 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2470 # unpreferred sharedlib libNAME.a needs extra handling
2471 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
2472 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
2473 # We do not specify a path in Import Files, so LIBPATH fires.
2474 shlibpath_overrides_runpath=yes
2476 *,no) # both, prefer aix
2477 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2478 library_names_spec='$libname$release.a $libname.a'
2479 soname_spec='$libname$release$shared_ext$major'
2480 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2481 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
2482 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
2485 shlibpath_var=LIBPATH
2492 # Since July 2007 AmigaOS4 officially supports .so libraries.
2493 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2494 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2497 library_names_spec='$libname.ixlibrary $libname.a'
2498 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2499 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2505 library_names_spec='$libname$shared_ext'
2506 dynamic_linker="$host_os ld.so"
2507 shlibpath_var=LIBRARY_PATH
2511 version_type=linux # correct to gnu/linux during the next big refactor
2513 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2514 soname_spec='$libname$release$shared_ext$major'
2515 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2516 shlibpath_var=LD_LIBRARY_PATH
2517 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2518 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2519 # the default ld.so.conf also contains /usr/contrib/lib and
2520 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2521 # libtool to hard-code these into programs
2524 cygwin* | mingw* | pw32* | cegcc*)
2525 version_type=windows
2530 case $GCC,$cc_basename in
2533 library_names_spec='$libname.dll.a'
2534 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2535 postinstall_cmds='base_file=`basename \$file`~
2536 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2537 dldir=$destdir/`dirname \$dlpath`~
2538 test -d \$dldir || mkdir -p \$dldir~
2539 $install_prog $dir/$dlname \$dldir/$dlname~
2540 chmod a+x \$dldir/$dlname~
2541 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2542 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2544 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2545 dlpath=$dir/\$dldll~
2547 shlibpath_overrides_runpath=yes
2551 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2552 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2554 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2557 # MinGW DLLs use traditional 'lib' prefix
2558 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2561 # pw32 DLLs use 'pw' prefix rather than 'lib'
2562 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2565 dynamic_linker='Win32 ld.exe'
2570 libname_spec='$name'
2571 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2572 library_names_spec='$libname.dll.lib'
2576 sys_lib_search_path_spec=
2582 # Let DOS variable expansion print the short 8.3 style file name.
2583 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2584 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2587 # Convert to MSYS style.
2588 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2591 # Convert to unix form, then to dos form, then back to unix form
2592 # but this time dos style (no spaces!) so that the unix form looks
2593 # like /cygdrive/c/PROGRA~1:/cygdr...
2594 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2595 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2596 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2599 sys_lib_search_path_spec=$LIB
2600 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2601 # It is most probably a Windows format PATH.
2602 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2604 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2606 # FIXME: find the short name or the path components, as spaces are
2607 # common. (e.g. "Program Files" -> "PROGRA~1")
2611 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2612 postinstall_cmds='base_file=`basename \$file`~
2613 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2614 dldir=$destdir/`dirname \$dlpath`~
2615 test -d \$dldir || mkdir -p \$dldir~
2616 $install_prog $dir/$dlname \$dldir/$dlname'
2617 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2618 dlpath=$dir/\$dldll~
2620 shlibpath_overrides_runpath=yes
2621 dynamic_linker='Win32 link.exe'
2625 # Assume MSVC wrapper
2626 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2627 dynamic_linker='Win32 ld.exe'
2630 # FIXME: first we should search . and the directory the executable is in
2634 darwin* | rhapsody*)
2635 dynamic_linker="$host_os dyld"
2639 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2640 soname_spec='$libname$release$major$shared_ext'
2641 shlibpath_overrides_runpath=yes
2642 shlibpath_var=DYLD_LIBRARY_PATH
2643 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2645 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2646 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2650 version_type=linux # correct to gnu/linux during the next big refactor
2653 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2654 soname_spec='$libname$release$shared_ext$major'
2655 shlibpath_var=LD_LIBRARY_PATH
2658 freebsd* | dragonfly*)
2659 # DragonFly does not have aout. When/if they implement a new
2660 # versioning mechanism, adjust this.
2661 if test -x /usr/bin/objformat; then
2662 objformat=`/usr/bin/objformat`
2665 freebsd[[23]].*) objformat=aout ;;
2669 # Handle Gentoo/FreeBSD as it was Linux
2670 case $host_vendor in
2672 version_type=linux ;;
2674 version_type=freebsd-$objformat ;;
2677 case $version_type in
2679 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2680 soname_spec='$libname$release$shared_ext$major'
2685 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2689 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2690 soname_spec='${libname}${release}${shared_ext}$major'
2695 shlibpath_var=LD_LIBRARY_PATH
2698 shlibpath_overrides_runpath=yes
2700 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2701 shlibpath_overrides_runpath=yes
2702 hardcode_into_libs=yes
2704 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2705 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2706 shlibpath_overrides_runpath=no
2707 hardcode_into_libs=yes
2709 *) # from 4.6 on, and DragonFly
2710 shlibpath_overrides_runpath=yes
2711 hardcode_into_libs=yes
2717 version_type=linux # correct to gnu/linux during the next big refactor
2720 dynamic_linker="$host_os runtime_loader"
2721 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2722 soname_spec='$libname$release$shared_ext$major'
2723 shlibpath_var=LIBRARY_PATH
2724 shlibpath_overrides_runpath=no
2725 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2726 hardcode_into_libs=yes
2729 hpux9* | hpux10* | hpux11*)
2730 # Give a soname corresponding to the major version so that dld.sl refuses to
2731 # link against other versions.
2738 hardcode_into_libs=yes
2739 dynamic_linker="$host_os dld.so"
2740 shlibpath_var=LD_LIBRARY_PATH
2741 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2742 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2743 soname_spec='$libname$release$shared_ext$major'
2744 if test 32 = "$HPUX_IA64_MODE"; then
2745 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2746 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2748 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2749 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2754 hardcode_into_libs=yes
2755 dynamic_linker="$host_os dld.sl"
2756 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2757 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2758 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2759 soname_spec='$libname$release$shared_ext$major'
2760 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2761 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2765 dynamic_linker="$host_os dld.sl"
2766 shlibpath_var=SHLIB_PATH
2767 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2768 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2769 soname_spec='$libname$release$shared_ext$major'
2772 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2773 postinstall_cmds='chmod 555 $lib'
2774 # or fails outright, so override atomically:
2775 install_override_mode=555
2779 version_type=linux # correct to gnu/linux during the next big refactor
2782 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2783 soname_spec='$libname$release$shared_ext$major'
2784 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2785 shlibpath_var=LD_LIBRARY_PATH
2786 shlibpath_overrides_runpath=no
2787 hardcode_into_libs=yes
2790 irix5* | irix6* | nonstopux*)
2792 nonstopux*) version_type=nonstopux ;;
2794 if test yes = "$lt_cv_prog_gnu_ld"; then
2795 version_type=linux # correct to gnu/linux during the next big refactor
2802 soname_spec='$libname$release$shared_ext$major'
2803 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
2805 irix5* | nonstopux*)
2809 case $LD in # libtool.m4 will add one of these switches to LD
2810 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2811 libsuff= shlibsuff= libmagic=32-bit;;
2812 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2813 libsuff=32 shlibsuff=N32 libmagic=N32;;
2814 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2815 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2816 *) libsuff= shlibsuff= libmagic=never-match;;
2820 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2821 shlibpath_overrides_runpath=no
2822 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2823 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
2824 hardcode_into_libs=yes
2827 # No shared lib support for Linux oldld, aout, or coff.
2828 linux*oldld* | linux*aout* | linux*coff*)
2833 version_type=none # Android doesn't support versioned libraries.
2836 library_names_spec='$libname$release$shared_ext'
2837 soname_spec='$libname$release$shared_ext'
2839 shlibpath_var=LD_LIBRARY_PATH
2840 shlibpath_overrides_runpath=yes
2842 # This implies no fast_install, which is unacceptable.
2843 # Some rework will be needed to allow for fast_install
2844 # before this can be enabled.
2845 hardcode_into_libs=yes
2847 dynamic_linker='Android linker'
2848 # Don't embed -rpath directories since the linker doesn't support them.
2849 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2852 # This must be glibc/ELF.
2853 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2854 version_type=linux # correct to gnu/linux during the next big refactor
2857 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2858 soname_spec='$libname$release$shared_ext$major'
2859 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2860 shlibpath_var=LD_LIBRARY_PATH
2861 shlibpath_overrides_runpath=no
2863 # Some binutils ld are patched to set DT_RUNPATH
2864 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2865 [lt_cv_shlibpath_overrides_runpath=no
2866 save_LDFLAGS=$LDFLAGS
2868 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2869 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2870 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2871 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2872 [lt_cv_shlibpath_overrides_runpath=yes])])
2873 LDFLAGS=$save_LDFLAGS
2876 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2878 # This implies no fast_install, which is unacceptable.
2879 # Some rework will be needed to allow for fast_install
2880 # before this can be enabled.
2881 hardcode_into_libs=yes
2883 # Ideally, we could use ldconfig to report *all* directores which are
2884 # searched for libraries, however this is still not possible. Aside from not
2885 # being certain /sbin/ldconfig is available, command
2886 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2887 # even though it is searched at run-time. Try to do the best guess by
2888 # appending ld.so.conf contents (and includes) to the search path.
2889 if test -f /etc/ld.so.conf; then
2890 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' ' '`
2891 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2894 # We used to test for /lib/ld.so.1 and disable shared libraries on
2895 # powerpc, because MkLinux only supported shared libraries with the
2896 # GNU dynamic linker. Since this was broken with cross compilers,
2897 # most powerpc-linux boxes support dynamic linking these days and
2898 # people can always --disable-shared, the test was removed, and we
2899 # assume the GNU/Linux dynamic linker is in use.
2900 dynamic_linker='GNU/Linux ld.so'
2907 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2908 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2909 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2910 dynamic_linker='NetBSD (a.out) ld.so'
2912 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2913 soname_spec='$libname$release$shared_ext$major'
2914 dynamic_linker='NetBSD ld.elf_so'
2916 shlibpath_var=LD_LIBRARY_PATH
2917 shlibpath_overrides_runpath=yes
2918 hardcode_into_libs=yes
2922 version_type=linux # correct to gnu/linux during the next big refactor
2923 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2924 shlibpath_var=LD_LIBRARY_PATH
2925 shlibpath_overrides_runpath=yes
2932 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2933 soname_spec='$libname$release$shared_ext$major'
2934 shlibpath_var=LD_LIBRARY_PATH
2935 shlibpath_overrides_runpath=no
2936 hardcode_into_libs=yes
2937 dynamic_linker='ldqnx.so'
2942 sys_lib_dlsearch_path_spec=/usr/lib
2944 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2949 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2950 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2951 shlibpath_var=LD_LIBRARY_PATH
2952 shlibpath_overrides_runpath=yes
2956 libname_spec='$name'
2957 version_type=windows
2961 # OS/2 can only load a DLL with a base name of 8 characters or less.
2962 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2963 v=$($ECHO $release$versuffix | tr -d .-);
2964 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2965 $ECHO $n$v`$shared_ext'
2966 library_names_spec='${libname}_dll.$libext'
2967 dynamic_linker='OS/2 ld.exe'
2968 shlibpath_var=BEGINLIBPATH
2969 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2970 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2971 postinstall_cmds='base_file=`basename \$file`~
2972 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2973 dldir=$destdir/`dirname \$dlpath`~
2974 test -d \$dldir || mkdir -p \$dldir~
2975 $install_prog $dir/$dlname \$dldir/$dlname~
2976 chmod a+x \$dldir/$dlname~
2977 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2978 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2980 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
2981 dlpath=$dir/\$dldll~
2985 osf3* | osf4* | osf5*)
2989 soname_spec='$libname$release$shared_ext$major'
2990 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2991 shlibpath_var=LD_LIBRARY_PATH
2992 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2993 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3001 version_type=linux # correct to gnu/linux during the next big refactor
3004 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3005 soname_spec='$libname$release$shared_ext$major'
3006 shlibpath_var=LD_LIBRARY_PATH
3007 shlibpath_overrides_runpath=yes
3008 hardcode_into_libs=yes
3009 # ldd complains unless libraries are executable
3010 postinstall_cmds='chmod +x $lib'
3015 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3016 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3017 shlibpath_var=LD_LIBRARY_PATH
3018 shlibpath_overrides_runpath=yes
3019 if test yes = "$with_gnu_ld"; then
3026 version_type=linux # correct to gnu/linux during the next big refactor
3027 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3028 soname_spec='$libname$release$shared_ext$major'
3029 shlibpath_var=LD_LIBRARY_PATH
3030 case $host_vendor in
3032 shlibpath_overrides_runpath=no
3034 runpath_var=LD_RUN_PATH
3042 shlibpath_overrides_runpath=no
3043 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3049 if test -d /usr/nec; then
3050 version_type=linux # correct to gnu/linux during the next big refactor
3051 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3052 soname_spec='$libname$shared_ext.$major'
3053 shlibpath_var=LD_LIBRARY_PATH
3057 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3061 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3062 soname_spec='$libname$release$shared_ext$major'
3063 shlibpath_var=LD_LIBRARY_PATH
3064 shlibpath_overrides_runpath=yes
3065 hardcode_into_libs=yes
3066 if test yes = "$with_gnu_ld"; then
3067 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3069 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3072 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3076 sys_lib_dlsearch_path_spec='/usr/lib'
3080 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3081 version_type=linux # correct to gnu/linux during the next big refactor
3084 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3085 shlibpath_var=LD_LIBRARY_PATH
3086 shlibpath_overrides_runpath=no
3087 hardcode_into_libs=yes
3091 version_type=linux # correct to gnu/linux during the next big refactor
3092 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3093 soname_spec='$libname$release$shared_ext$major'
3094 shlibpath_var=LD_LIBRARY_PATH
3101 AC_MSG_RESULT([$dynamic_linker])
3102 test no = "$dynamic_linker" && can_build_shared=no
3104 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3105 if test yes = "$GCC"; then
3106 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3109 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3110 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3113 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3114 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3117 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3118 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3120 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3121 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3123 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3124 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3126 _LT_DECL([], [variables_saved_for_relink], [1],
3127 [Variables whose values should be saved in libtool wrapper scripts and
3128 restored at link time])
3129 _LT_DECL([], [need_lib_prefix], [0],
3130 [Do we need the "lib" prefix for modules?])
3131 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3132 _LT_DECL([], [version_type], [0], [Library versioning type])
3133 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3134 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3135 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3136 [Is shlibpath searched before the hard-coded library search path?])
3137 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3138 _LT_DECL([], [library_names_spec], [1],
3139 [[List of archive names. First name is the real one, the rest are links.
3140 The last name is the one that the linker finds with -lNAME]])
3141 _LT_DECL([], [soname_spec], [1],
3142 [[The coded name of the library, if different from the real name]])
3143 _LT_DECL([], [install_override_mode], [1],
3144 [Permission mode override for installation of shared libraries])
3145 _LT_DECL([], [postinstall_cmds], [2],
3146 [Command to use after installation of a shared archive])
3147 _LT_DECL([], [postuninstall_cmds], [2],
3148 [Command to use after uninstallation of a shared archive])
3149 _LT_DECL([], [finish_cmds], [2],
3150 [Commands used to finish a libtool library installation in a directory])
3151 _LT_DECL([], [finish_eval], [1],
3152 [[As "finish_cmds", except a single script fragment to be evaled but
3154 _LT_DECL([], [hardcode_into_libs], [0],
3155 [Whether we should hardcode library paths into libraries])
3156 _LT_DECL([], [sys_lib_search_path_spec], [2],
3157 [Compile-time system search path for libraries])
3158 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3159 [Detected run-time system search path for libraries])
3160 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
3161 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3162 ])# _LT_SYS_DYNAMIC_LINKER
3165 # _LT_PATH_TOOL_PREFIX(TOOL)
3166 # --------------------------
3167 # find a file program that can recognize shared library
3168 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3169 [m4_require([_LT_DECL_EGREP])dnl
3170 AC_MSG_CHECKING([for $1])
3171 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3173 [[\\/*] | ?:[\\/]*])
3174 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3177 lt_save_MAGIC_CMD=$MAGIC_CMD
3178 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3179 dnl $ac_dummy forces splitting on constant user-supplied paths.
3180 dnl POSIX.2 word splitting is done only on the output of word expansions,
3181 dnl not every word. This closes a longstanding sh security hole.
3182 ac_dummy="m4_if([$2], , $PATH, [$2])"
3183 for ac_dir in $ac_dummy; do
3185 test -z "$ac_dir" && ac_dir=.
3186 if test -f "$ac_dir/$1"; then
3187 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3188 if test -n "$file_magic_test_file"; then
3189 case $deplibs_check_method in
3191 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3192 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3193 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3194 $EGREP "$file_magic_regex" > /dev/null; then
3199 *** Warning: the command libtool uses to detect shared libraries,
3200 *** $file_magic_cmd, produces output that libtool cannot recognize.
3201 *** The result is that libtool may fail to recognize shared libraries
3202 *** as such. This will affect the creation of libtool libraries that
3203 *** depend on shared libraries, but programs linked with such libtool
3204 *** libraries will work regardless of this problem. Nevertheless, you
3205 *** may want to report the problem to your system manager and/or to
3206 *** bug-libtool@gnu.org
3216 MAGIC_CMD=$lt_save_MAGIC_CMD
3219 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3220 if test -n "$MAGIC_CMD"; then
3221 AC_MSG_RESULT($MAGIC_CMD)
3225 _LT_DECL([], [MAGIC_CMD], [0],
3226 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3227 ])# _LT_PATH_TOOL_PREFIX
3230 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3231 dnl aclocal-1.4 backwards compatibility:
3232 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3237 # find a file program that can recognize a shared library
3238 m4_defun([_LT_PATH_MAGIC],
3239 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3240 if test -z "$lt_cv_path_MAGIC_CMD"; then
3241 if test -n "$ac_tool_prefix"; then
3242 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3252 # find the pathname to the GNU or non-GNU linker
3253 AC_DEFUN([LT_PATH_LD],
3254 [AC_REQUIRE([AC_PROG_CC])dnl
3255 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3256 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3257 m4_require([_LT_DECL_SED])dnl
3258 m4_require([_LT_DECL_EGREP])dnl
3259 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3261 AC_ARG_WITH([gnu-ld],
3262 [AS_HELP_STRING([--with-gnu-ld],
3263 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3264 [test no = "$withval" || with_gnu_ld=yes],
3265 [with_gnu_ld=no])dnl
3268 if test yes = "$GCC"; then
3269 # Check if gcc -print-prog-name=ld gives a path.
3270 AC_MSG_CHECKING([for ld used by $CC])
3273 # gcc leaves a trailing carriage return, which upsets mingw
3274 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3276 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3279 # Accept absolute paths.
3280 [[\\/]]* | ?:[[\\/]]*)
3281 re_direlt='/[[^/]][[^/]]*/\.\./'
3282 # Canonicalize the pathname of ld
3283 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3284 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3285 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3287 test -z "$LD" && LD=$ac_prog
3290 # If it fails, then pretend we aren't using GCC.
3294 # If it is relative, then search for the first ld in PATH.
3298 elif test yes = "$with_gnu_ld"; then
3299 AC_MSG_CHECKING([for GNU ld])
3301 AC_MSG_CHECKING([for non-GNU ld])
3303 AC_CACHE_VAL(lt_cv_path_LD,
3304 [if test -z "$LD"; then
3305 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3306 for ac_dir in $PATH; do
3308 test -z "$ac_dir" && ac_dir=.
3309 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3310 lt_cv_path_LD=$ac_dir/$ac_prog
3311 # Check to see if the program is GNU ld. I'd rather use --version,
3312 # but apparently some variants of GNU ld only accept -v.
3313 # Break only if it was the GNU/non-GNU ld that we prefer.
3314 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3315 *GNU* | *'with BFD'*)
3316 test no != "$with_gnu_ld" && break
3319 test yes != "$with_gnu_ld" && break
3326 lt_cv_path_LD=$LD # Let the user override the test with a path.
3329 if test -n "$LD"; then
3334 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3338 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3342 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3343 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3344 dnl aclocal-1.4 backwards compatibility:
3345 dnl AC_DEFUN([AM_PROG_LD], [])
3346 dnl AC_DEFUN([AC_PROG_LD], [])
3351 m4_defun([_LT_PATH_LD_GNU],
3352 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3353 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3354 case `$LD -v 2>&1 </dev/null` in
3355 *GNU* | *'with BFD'*)
3356 lt_cv_prog_gnu_ld=yes
3359 lt_cv_prog_gnu_ld=no
3362 with_gnu_ld=$lt_cv_prog_gnu_ld
3368 # find reload flag for linker
3369 # -- PORTME Some linkers may need a different reload flag.
3370 m4_defun([_LT_CMD_RELOAD],
3371 [AC_CACHE_CHECK([for $LD option to reload object files],
3372 lt_cv_ld_reload_flag,
3373 [lt_cv_ld_reload_flag='-r'])
3374 reload_flag=$lt_cv_ld_reload_flag
3375 case $reload_flag in
3377 *) reload_flag=" $reload_flag" ;;
3379 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3381 cygwin* | mingw* | pw32* | cegcc*)
3382 if test yes != "$GCC"; then
3387 if test yes = "$GCC"; then
3388 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3390 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3394 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3395 _LT_TAGDECL([], [reload_cmds], [2])dnl
3402 m4_defun([_LT_PATH_DD],
3403 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3404 [printf 0123456789abcdef0123456789abcdef >conftest.i
3405 cat conftest.i conftest.i >conftest2.i
3407 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3408 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3409 cmp -s conftest.i conftest.out \
3410 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3412 rm -f conftest.i conftest2.i conftest.out])
3418 # find command to truncate a binary pipe
3419 m4_defun([_LT_CMD_TRUNCATE],
3420 [m4_require([_LT_PATH_DD])
3421 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3422 [printf 0123456789abcdef0123456789abcdef >conftest.i
3423 cat conftest.i conftest.i >conftest2.i
3425 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3426 cmp -s conftest.i conftest.out \
3427 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3429 rm -f conftest.i conftest2.i conftest.out
3430 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3431 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3432 [Command to truncate a binary pipe])
3433 ])# _LT_CMD_TRUNCATE
3436 # _LT_CHECK_MAGIC_METHOD
3437 # ----------------------
3438 # how to check for library dependencies
3439 # -- PORTME fill in with the dynamic library characteristics
3440 m4_defun([_LT_CHECK_MAGIC_METHOD],
3441 [m4_require([_LT_DECL_EGREP])
3442 m4_require([_LT_DECL_OBJDUMP])
3443 AC_CACHE_CHECK([how to recognize dependent libraries],
3444 lt_cv_deplibs_check_method,
3445 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3446 lt_cv_file_magic_test_file=
3447 lt_cv_deplibs_check_method='unknown'
3448 # Need to set the preceding variable on all platforms that support
3449 # interlibrary dependencies.
3450 # 'none' -- dependencies not supported.
3451 # 'unknown' -- same as none, but documents that we really don't know.
3452 # 'pass_all' -- all dependencies passed with no checks.
3453 # 'test_compile' -- check by making test program.
3454 # 'file_magic [[regex]]' -- check by looking for files in library path
3455 # that responds to the $file_magic_cmd with a given extended regex.
3456 # If you have 'file' or equivalent on your system and you're not sure
3457 # whether 'pass_all' will *always* work, you probably want this one.
3461 lt_cv_deplibs_check_method=pass_all
3465 lt_cv_deplibs_check_method=pass_all
3469 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3470 lt_cv_file_magic_cmd='/usr/bin/file -L'
3471 lt_cv_file_magic_test_file=/shlib/libc.so
3475 # func_win32_libid is a shell function defined in ltmain.sh
3476 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3477 lt_cv_file_magic_cmd='func_win32_libid'
3481 # Base MSYS/MinGW do not provide the 'file' command needed by
3482 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3483 # unless we find 'file', for example because we are cross-compiling.
3484 if ( file / ) >/dev/null 2>&1; then
3485 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3486 lt_cv_file_magic_cmd='func_win32_libid'
3488 # Keep this pattern in sync with the one in func_win32_libid.
3489 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3490 lt_cv_file_magic_cmd='$OBJDUMP -f'
3495 # use the weaker test based on 'objdump'. See mingw*.
3496 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3497 lt_cv_file_magic_cmd='$OBJDUMP -f'
3500 darwin* | rhapsody*)
3501 lt_cv_deplibs_check_method=pass_all
3504 freebsd* | dragonfly*)
3505 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3508 # Not sure whether the presence of OpenBSD here was a mistake.
3509 # Let's accept both of them until this is cleared up.
3510 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3511 lt_cv_file_magic_cmd=/usr/bin/file
3512 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3516 lt_cv_deplibs_check_method=pass_all
3521 lt_cv_deplibs_check_method=pass_all
3524 hpux10.20* | hpux11*)
3525 lt_cv_file_magic_cmd=/usr/bin/file
3528 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3529 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3532 [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]']
3533 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3536 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3537 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3543 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3544 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3547 irix5* | irix6* | nonstopux*)
3549 *-32|*"-32 ") libmagic=32-bit;;
3550 *-n32|*"-n32 ") libmagic=N32;;
3551 *-64|*"-64 ") libmagic=64-bit;;
3552 *) libmagic=never-match;;
3554 lt_cv_deplibs_check_method=pass_all
3557 # This must be glibc/ELF.
3558 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3559 lt_cv_deplibs_check_method=pass_all
3563 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3564 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3566 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3571 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3572 lt_cv_file_magic_cmd=/usr/bin/file
3573 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3577 lt_cv_deplibs_check_method=pass_all
3581 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3582 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3584 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3588 osf3* | osf4* | osf5*)
3589 lt_cv_deplibs_check_method=pass_all
3593 lt_cv_deplibs_check_method=pass_all
3597 lt_cv_deplibs_check_method=pass_all
3600 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3601 lt_cv_deplibs_check_method=pass_all
3605 case $host_vendor in
3607 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]]'
3608 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3611 lt_cv_deplibs_check_method=pass_all
3614 lt_cv_file_magic_cmd='/bin/file'
3615 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3618 lt_cv_file_magic_cmd='/bin/file'
3619 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3620 lt_cv_file_magic_test_file=/lib/libc.so
3623 lt_cv_deplibs_check_method=pass_all
3626 lt_cv_deplibs_check_method=pass_all
3632 lt_cv_deplibs_check_method=pass_all
3635 lt_cv_deplibs_check_method=pass_all
3642 if test "$build" = "$host"; then
3645 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3648 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3654 file_magic_cmd=$lt_cv_file_magic_cmd
3655 deplibs_check_method=$lt_cv_deplibs_check_method
3656 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3658 _LT_DECL([], [deplibs_check_method], [1],
3659 [Method to check whether dependent libraries are shared objects])
3660 _LT_DECL([], [file_magic_cmd], [1],
3661 [Command to use when deplibs_check_method = "file_magic"])
3662 _LT_DECL([], [file_magic_glob], [1],
3663 [How to find potential files when deplibs_check_method = "file_magic"])
3664 _LT_DECL([], [want_nocaseglob], [1],
3665 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3666 ])# _LT_CHECK_MAGIC_METHOD
3671 # find the pathname to a BSD- or MS-compatible name lister
3672 AC_DEFUN([LT_PATH_NM],
3673 [AC_REQUIRE([AC_PROG_CC])dnl
3674 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3675 [if test -n "$NM"; then
3676 # Let the user override the test.
3679 lt_nm_to_check=${ac_tool_prefix}nm
3680 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3681 lt_nm_to_check="$lt_nm_to_check nm"
3683 for lt_tmp_nm in $lt_nm_to_check; do
3684 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3685 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3687 test -z "$ac_dir" && ac_dir=.
3688 tmp_nm=$ac_dir/$lt_tmp_nm
3689 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3690 # Check to see if the nm accepts a BSD-compat flag.
3691 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3692 # nm: unknown option "B" ignored
3693 # Tru64's nm complains that /dev/null is an invalid object file
3694 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3696 mingw*) lt_bad_file=conftest.nm/nofile ;;
3697 *) lt_bad_file=/dev/null ;;
3699 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3700 *$lt_bad_file* | *'Invalid file or object type'*)
3701 lt_cv_path_NM="$tmp_nm -B"
3705 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3707 lt_cv_path_NM="$tmp_nm -p"
3711 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3712 continue # so that we can try to find one that supports BSD flags
3721 : ${lt_cv_path_NM=no}
3723 if test no != "$lt_cv_path_NM"; then
3726 # Didn't find any BSD compatible name lister, look for dumpbin.
3727 if test -n "$DUMPBIN"; then :
3728 # Let the user override the test.
3730 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3731 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
3733 DUMPBIN="$DUMPBIN -symbols -headers"
3741 if test : != "$DUMPBIN"; then
3745 test -z "$NM" && NM=nm
3747 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3749 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3750 [lt_cv_nm_interface="BSD nm"
3751 echo "int some_variable = 0;" > conftest.$ac_ext
3752 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3753 (eval "$ac_compile" 2>conftest.err)
3754 cat conftest.err >&AS_MESSAGE_LOG_FD
3755 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3756 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3757 cat conftest.err >&AS_MESSAGE_LOG_FD
3758 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3759 cat conftest.out >&AS_MESSAGE_LOG_FD
3760 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3761 lt_cv_nm_interface="MS dumpbin"
3767 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3768 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3769 dnl aclocal-1.4 backwards compatibility:
3770 dnl AC_DEFUN([AM_PROG_NM], [])
3771 dnl AC_DEFUN([AC_PROG_NM], [])
3773 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3774 # --------------------------------
3775 # how to determine the name of the shared library
3776 # associated with a specific link library.
3777 # -- PORTME fill in with the dynamic library characteristics
3778 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3779 [m4_require([_LT_DECL_EGREP])
3780 m4_require([_LT_DECL_OBJDUMP])
3781 m4_require([_LT_DECL_DLLTOOL])
3782 AC_CACHE_CHECK([how to associate runtime and link libraries],
3783 lt_cv_sharedlib_from_linklib_cmd,
3784 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3787 cygwin* | mingw* | pw32* | cegcc*)
3788 # two different shell functions defined in ltmain.sh;
3789 # decide which one to use based on capabilities of $DLLTOOL
3790 case `$DLLTOOL --help 2>&1` in
3791 *--identify-strict*)
3792 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3795 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3800 # fallback: assume linklib IS sharedlib
3801 lt_cv_sharedlib_from_linklib_cmd=$ECHO
3805 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3806 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3808 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3809 [Command to associate shared and link libraries])
3810 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3813 # _LT_PATH_MANIFEST_TOOL
3814 # ----------------------
3815 # locate the manifest tool
3816 m4_defun([_LT_PATH_MANIFEST_TOOL],
3817 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3818 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3819 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3820 [lt_cv_path_mainfest_tool=no
3821 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3822 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3823 cat conftest.err >&AS_MESSAGE_LOG_FD
3824 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3825 lt_cv_path_mainfest_tool=yes
3828 if test yes != "$lt_cv_path_mainfest_tool"; then
3831 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3832 ])# _LT_PATH_MANIFEST_TOOL
3835 # _LT_DLL_DEF_P([FILE])
3836 # ---------------------
3837 # True iff FILE is a Windows DLL '.def' file.
3838 # Keep in sync with func_dll_def_p in the libtool script
3839 AC_DEFUN([_LT_DLL_DEF_P],
3841 test DEF = "`$SED -n dnl
3842 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
3843 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
3844 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
3845 -e q dnl Only consider the first "real" line
3852 # check for math library
3853 AC_DEFUN([LT_LIB_M],
3854 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3857 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3858 # These system don't have libm, or don't need it
3861 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
3862 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3865 AC_CHECK_LIB(m, cos, LIBM=-lm)
3872 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3873 dnl aclocal-1.4 backwards compatibility:
3874 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3877 # _LT_COMPILER_NO_RTTI([TAGNAME])
3878 # -------------------------------
3879 m4_defun([_LT_COMPILER_NO_RTTI],
3880 [m4_require([_LT_TAG_COMPILER])dnl
3882 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3884 if test yes = "$GCC"; then
3885 case $cc_basename in
3887 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3889 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3892 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3893 lt_cv_prog_compiler_rtti_exceptions,
3894 [-fno-rtti -fno-exceptions], [],
3895 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3897 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3898 [Compiler flag to turn off builtin functions])
3899 ])# _LT_COMPILER_NO_RTTI
3902 # _LT_CMD_GLOBAL_SYMBOLS
3903 # ----------------------
3904 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3905 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3906 AC_REQUIRE([AC_PROG_CC])dnl
3907 AC_REQUIRE([AC_PROG_AWK])dnl
3908 AC_REQUIRE([LT_PATH_NM])dnl
3909 AC_REQUIRE([LT_PATH_LD])dnl
3910 m4_require([_LT_DECL_SED])dnl
3911 m4_require([_LT_DECL_EGREP])dnl
3912 m4_require([_LT_TAG_COMPILER])dnl
3914 # Check for command to grab the raw symbol name followed by C symbol from nm.
3915 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3916 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3918 # These are sane defaults that work on at least a few old systems.
3919 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3921 # Character class describing NM global symbol codes.
3922 symcode='[[BCDEGRST]]'
3924 # Regexp to match symbols that can be accessed directly from C.
3925 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3927 # Define system-specific variables.
3932 cygwin* | mingw* | pw32* | cegcc*)
3933 symcode='[[ABCDGISTW]]'
3936 if test ia64 = "$host_cpu"; then
3937 symcode='[[ABCDEGRST]]'
3941 symcode='[[BCDEGRST]]'
3944 symcode='[[BCDEGQRST]]'
3955 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3959 symcode='[[DFNSTU]]'
3963 # If we're using GNU nm, then use its standard symbol codes.
3964 case `$NM -V 2>&1` in
3965 *GNU* | *'with BFD'*)
3966 symcode='[[ABCDGIRSTW]]' ;;
3969 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3970 # Gets list of data symbols to import.
3971 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
3972 # Adjust the below global symbol transforms to fixup imported variables.
3973 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
3974 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
3975 lt_c_name_lib_hook="\
3976 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
3977 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
3979 # Disable hooks by default.
3980 lt_cv_sys_global_symbol_to_import=
3986 # Transform an extracted symbol line into a proper C declaration.
3987 # Some systems (esp. on ia64) link data and code symbols differently,
3988 # so use this general approach.
3989 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
3991 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
3992 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
3994 # Transform an extracted symbol line into symbol name and symbol address
3995 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
3997 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
3998 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
4000 # Transform an extracted symbol line into symbol name with lib prefix and
4002 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
4003 $lt_c_name_lib_hook\
4004 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
4005 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
4006 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
4008 # Handle CRLF in mingw tool chain
4012 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4016 # Try without a prefix underscore, then with it.
4017 for ac_symprfx in "" "_"; do
4019 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4020 symxfrm="\\1 $ac_symprfx\\2 \\2"
4022 # Write the raw and C identifiers.
4023 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4024 # Fake it for dumpbin and say T for any non-static function,
4025 # D for any global variable and I for any imported variable.
4026 # Also find C++ and __fastcall symbols from MSVC++,
4027 # which start with @ or ?.
4028 lt_cv_sys_global_symbol_pipe="$AWK ['"\
4029 " {last_section=section; section=\$ 3};"\
4030 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4031 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4032 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4033 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4034 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4035 " \$ 0!~/External *\|/{next};"\
4036 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4037 " {if(hide[section]) next};"\
4038 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4039 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4040 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4041 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4042 " ' prfx=^$ac_symprfx]"
4044 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4046 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4048 # Check to see that the pipe works correctly.
4052 cat > conftest.$ac_ext <<_LT_EOF
4057 void nm_test_func(void);
4058 void nm_test_func(void){}
4062 int main(){nm_test_var='a';nm_test_func();return(0);}
4065 if AC_TRY_EVAL(ac_compile); then
4066 # Now try to grab the symbols.
4068 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4069 # Try sorting and uniquifying the output.
4070 if sort "$nlist" | uniq > "$nlist"T; then
4071 mv -f "$nlist"T "$nlist"
4076 # Make sure that we snagged all the symbols we need.
4077 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4078 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4079 cat <<_LT_EOF > conftest.$ac_ext
4080 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
4081 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4082 /* DATA imports from DLLs on WIN32 can't be const, because runtime
4083 relocations are performed -- see ld's documentation on pseudo-relocs. */
4084 # define LT@&t@_DLSYM_CONST
4085 #elif defined __osf__
4086 /* This system does not cope well with relocations in const data. */
4087 # define LT@&t@_DLSYM_CONST
4089 # define LT@&t@_DLSYM_CONST const
4097 # Now generate the symbol file.
4098 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4100 cat <<_LT_EOF >> conftest.$ac_ext
4102 /* The mapping between symbol names and symbols. */
4103 LT@&t@_DLSYM_CONST struct {
4107 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4109 { "@PROGRAM@", (void *) 0 },
4111 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4112 cat <<\_LT_EOF >> conftest.$ac_ext
4116 /* This works around a problem in FreeBSD linker */
4117 #ifdef FREEBSD_WORKAROUND
4118 static const void *lt_preloaded_setup() {
4119 return lt__PROGRAM__LTX_preloaded_symbols;
4127 # Now try linking the two files.
4128 mv conftest.$ac_objext conftstm.$ac_objext
4129 lt_globsym_save_LIBS=$LIBS
4130 lt_globsym_save_CFLAGS=$CFLAGS
4131 LIBS=conftstm.$ac_objext
4132 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4133 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4136 LIBS=$lt_globsym_save_LIBS
4137 CFLAGS=$lt_globsym_save_CFLAGS
4139 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4142 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4145 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4148 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4149 cat conftest.$ac_ext >&5
4151 rm -rf conftest* conftst*
4153 # Do not use the global_symbol_pipe unless it works.
4154 if test yes = "$pipe_works"; then
4157 lt_cv_sys_global_symbol_pipe=
4161 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4162 lt_cv_sys_global_symbol_to_cdecl=
4164 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4165 AC_MSG_RESULT(failed)
4170 # Response file support.
4171 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4172 nm_file_list_spec='@'
4173 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4174 nm_file_list_spec='@'
4177 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4178 [Take the output of nm and produce a listing of raw symbols and C names])
4179 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4180 [Transform the output of nm in a proper C declaration])
4181 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4182 [Transform the output of nm into a list of symbols to manually relocate])
4183 _LT_DECL([global_symbol_to_c_name_address],
4184 [lt_cv_sys_global_symbol_to_c_name_address], [1],
4185 [Transform the output of nm in a C name address pair])
4186 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4187 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4188 [Transform the output of nm in a C name address pair when lib prefix is needed])
4189 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4190 [The name lister interface])
4191 _LT_DECL([], [nm_file_list_spec], [1],
4192 [Specify filename containing input files for $NM])
4193 ]) # _LT_CMD_GLOBAL_SYMBOLS
4196 # _LT_COMPILER_PIC([TAGNAME])
4197 # ---------------------------
4198 m4_defun([_LT_COMPILER_PIC],
4199 [m4_require([_LT_TAG_COMPILER])dnl
4200 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4201 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4202 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4204 m4_if([$1], [CXX], [
4205 # C++ specific cases for pic, static, wl, etc.
4206 if test yes = "$GXX"; then
4207 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4208 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4212 # All AIX code is PIC.
4213 if test ia64 = "$host_cpu"; then
4214 # AIX 5 now supports IA64 processor
4215 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4217 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4223 # see comment about AmigaOS4 .so support
4224 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4227 # FIXME: we need at least 68020 code to build shared libraries, but
4228 # adding the '-m68020' flag to GCC prevents building anything better,
4230 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4235 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4236 # PIC is the default for these OSes.
4238 mingw* | cygwin* | os2* | pw32* | cegcc*)
4239 # This hack is so that the source file can tell whether it is being
4240 # built for inclusion in a dll (and should export symbols for example).
4241 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4242 # (--disable-auto-import) libraries
4243 m4_if([$1], [GCJ], [],
4244 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4247 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4251 darwin* | rhapsody*)
4252 # PIC is the default on this platform
4253 # Common symbols not allowed in MH_DYLIB files
4254 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4257 # DJGPP does not support shared libraries at all
4258 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4261 # PIC is the default for Haiku.
4262 # The "-static" flag exists, but is broken.
4263 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4266 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4267 # Instead, we relocate shared libraries at runtime.
4270 if test -d /usr/nec; then
4271 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4275 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4276 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4277 # sets the default TLS model and affects inlining.
4282 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4287 # QNX uses GNU C++, but need to define -shared option too, otherwise
4289 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4292 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4298 # All AIX code is PIC.
4299 if test ia64 = "$host_cpu"; then
4300 # AIX 5 now supports IA64 processor
4301 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4303 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4307 case $cc_basename in
4309 # Green Hills C++ Compiler
4310 # _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"
4314 mingw* | cygwin* | os2* | pw32* | cegcc*)
4315 # This hack is so that the source file can tell whether it is being
4316 # built for inclusion in a dll (and should export symbols for example).
4317 m4_if([$1], [GCJ], [],
4318 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4321 case $cc_basename in
4323 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4326 # Green Hills C++ Compiler
4327 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4333 freebsd* | dragonfly*)
4334 # FreeBSD uses GNU C++
4336 hpux9* | hpux10* | hpux11*)
4337 case $cc_basename in
4339 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4340 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4341 if test ia64 != "$host_cpu"; then
4342 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4346 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4347 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4353 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4362 # This is c89, which is MS Visual C++ (no shared libs)
4363 # Anyone wants to do a port?
4365 irix5* | irix6* | nonstopux*)
4366 case $cc_basename in
4368 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4369 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4370 # CC pic flag -KPIC is the default.
4376 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4377 case $cc_basename in
4380 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4381 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4384 # old Intel C++ for x86_64, which still supported -KPIC.
4385 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4386 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4387 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4390 # Intel C++, used to be incompatible with GCC.
4391 # ICC 10 doesn't accept -KPIC any more.
4392 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4393 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4394 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4397 # Portland Group C++ compiler
4398 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4399 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4400 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4404 # Make sure the PIC flag is empty. It appears that all Alpha
4405 # Linux and Compaq Tru64 Unix objects are PIC.
4406 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4407 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4409 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4410 # IBM XL 8.0, 9.0 on PPC and BlueGene
4411 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4412 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4413 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4416 case `$CC -V 2>&1 | sed 5q` in
4419 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4420 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4421 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4432 case $cc_basename in
4434 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4443 # QNX uses GNU C++, but need to define -shared option too, otherwise
4445 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4447 osf3* | osf4* | osf5*)
4448 case $cc_basename in
4450 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4453 # Rational C++ 2.4.1
4454 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4457 # Digital/Compaq C++
4458 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4459 # Make sure the PIC flag is empty. It appears that all Alpha
4460 # Linux and Compaq Tru64 Unix objects are PIC.
4461 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4462 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4471 case $cc_basename in
4473 # Sun C++ 4.2, 5.x and Centerline C++
4474 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4475 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4476 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4479 # Green Hills C++ Compiler
4480 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4487 case $cc_basename in
4490 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4491 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4495 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4501 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4502 case $cc_basename in
4504 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4505 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4506 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4511 case $cc_basename in
4513 # NonStop-UX NCC 3.20
4514 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4523 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4529 if test yes = "$GCC"; then
4530 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4531 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4535 # All AIX code is PIC.
4536 if test ia64 = "$host_cpu"; then
4537 # AIX 5 now supports IA64 processor
4538 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4540 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4546 # see comment about AmigaOS4 .so support
4547 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4550 # FIXME: we need at least 68020 code to build shared libraries, but
4551 # adding the '-m68020' flag to GCC prevents building anything better,
4553 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4558 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4559 # PIC is the default for these OSes.
4562 mingw* | cygwin* | pw32* | os2* | cegcc*)
4563 # This hack is so that the source file can tell whether it is being
4564 # built for inclusion in a dll (and should export symbols for example).
4565 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4566 # (--disable-auto-import) libraries
4567 m4_if([$1], [GCJ], [],
4568 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4571 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4576 darwin* | rhapsody*)
4577 # PIC is the default on this platform
4578 # Common symbols not allowed in MH_DYLIB files
4579 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4583 # PIC is the default for Haiku.
4584 # The "-static" flag exists, but is broken.
4585 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4589 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4590 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4591 # sets the default TLS model and affects inlining.
4597 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4603 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4604 # Instead, we relocate shared libraries at runtime.
4608 # Just because we use GCC doesn't mean we suddenly get shared libraries
4609 # on systems that don't support them.
4610 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4615 # QNX uses GNU C++, but need to define -shared option too, otherwise
4617 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4621 if test -d /usr/nec; then
4622 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4627 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4631 case $cc_basename in
4632 nvcc*) # Cuda Compiler Driver 2.2
4633 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4634 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4635 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4640 # PORTME Check for flag to pass linker flags through the system compiler.
4643 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4644 if test ia64 = "$host_cpu"; then
4645 # AIX 5 now supports IA64 processor
4646 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4648 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4652 darwin* | rhapsody*)
4653 # PIC is the default on this platform
4654 # Common symbols not allowed in MH_DYLIB files
4655 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4656 case $cc_basename in
4658 # NAG Fortran compiler
4659 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4660 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4661 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4666 mingw* | cygwin* | pw32* | os2* | cegcc*)
4667 # This hack is so that the source file can tell whether it is being
4668 # built for inclusion in a dll (and should export symbols for example).
4669 m4_if([$1], [GCJ], [],
4670 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4673 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4678 hpux9* | hpux10* | hpux11*)
4679 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4680 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4687 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4690 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4691 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4694 irix5* | irix6* | nonstopux*)
4695 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4696 # PIC (with -KPIC) is the default.
4697 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4700 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4701 case $cc_basename in
4702 # old Intel for x86_64, which still supported -KPIC.
4704 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4705 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4706 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4708 # icc used to be incompatible with GCC.
4709 # ICC 10 doesn't accept -KPIC any more.
4711 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4712 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4713 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4715 # Lahey Fortran 8.1.
4717 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4718 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4719 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4722 # NAG Fortran compiler
4723 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4724 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4725 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4728 # Fabrice Bellard et al's Tiny C Compiler
4729 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4730 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4731 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4733 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4734 # Portland Group compilers (*not* the Pentium gcc compiler,
4735 # which looks to be a dead project)
4736 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4737 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4738 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4741 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4742 # All Alpha code is PIC.
4743 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4745 xl* | bgxl* | bgf* | mpixl*)
4746 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4747 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4748 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4749 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4752 case `$CC -V 2>&1 | sed 5q` in
4753 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4754 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4755 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4756 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4757 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4759 *Sun\ F* | *Sun*Fortran*)
4760 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4761 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4762 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4766 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4767 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4768 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4770 *Intel*\ [[CF]]*Compiler*)
4771 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4772 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4773 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4776 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4777 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4778 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4786 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4787 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4791 # QNX uses GNU C++, but need to define -shared option too, otherwise
4793 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4796 osf3* | osf4* | osf5*)
4797 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4798 # All OSF/1 code is PIC.
4799 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4803 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4807 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4808 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4809 case $cc_basename in
4810 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4811 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4813 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4818 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4819 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4820 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4823 sysv4 | sysv4.2uw2* | sysv4.3*)
4824 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4825 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4826 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4830 if test -d /usr/nec; then
4831 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4832 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4836 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4837 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4838 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4839 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4843 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4844 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4848 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4849 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4853 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4859 # For platforms that do not support PIC, -DPIC is meaningless:
4861 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4864 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4868 AC_CACHE_CHECK([for $compiler option to produce PIC],
4869 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4870 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4871 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4874 # Check to make sure the PIC flag actually works.
4876 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4877 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4878 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4879 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4880 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4882 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4884 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4885 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4887 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4888 [Additional compiler flags for building library objects])
4890 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4891 [How to pass a linker flag through the compiler])
4893 # Check to make sure the static flag actually works.
4895 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4896 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4897 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4898 $lt_tmp_static_flag,
4900 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4901 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4902 [Compiler flag to prevent dynamic linking])
4903 ])# _LT_COMPILER_PIC
4906 # _LT_LINKER_SHLIBS([TAGNAME])
4907 # ----------------------------
4908 # See if the linker supports building shared libraries.
4909 m4_defun([_LT_LINKER_SHLIBS],
4910 [AC_REQUIRE([LT_PATH_LD])dnl
4911 AC_REQUIRE([LT_PATH_NM])dnl
4912 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4913 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4914 m4_require([_LT_DECL_EGREP])dnl
4915 m4_require([_LT_DECL_SED])dnl
4916 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4917 m4_require([_LT_TAG_COMPILER])dnl
4918 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4919 m4_if([$1], [CXX], [
4920 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4921 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4924 # If we're using GNU nm, then we don't want the "-C" option.
4925 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4926 # Without the "-l" option, or with the "-B" option, AIX nm treats
4927 # weak defined symbols like other global defined symbols, whereas
4928 # GNU nm marks them as "W".
4929 # While the 'weak' keyword is ignored in the Export File, we need
4930 # it in the Import File for the 'aix-soname' feature, so we have
4931 # to replace the "-B" option with "-P" for AIX nm.
4932 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4933 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
4935 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
4939 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
4941 cygwin* | mingw* | cegcc*)
4942 case $cc_basename in
4944 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4947 _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'
4948 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4953 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4958 _LT_TAGVAR(allow_undefined_flag, $1)=
4959 _LT_TAGVAR(always_export_symbols, $1)=no
4960 _LT_TAGVAR(archive_cmds, $1)=
4961 _LT_TAGVAR(archive_expsym_cmds, $1)=
4962 _LT_TAGVAR(compiler_needs_object, $1)=no
4963 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4964 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4965 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4966 _LT_TAGVAR(hardcode_automatic, $1)=no
4967 _LT_TAGVAR(hardcode_direct, $1)=no
4968 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4969 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4970 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4971 _LT_TAGVAR(hardcode_minus_L, $1)=no
4972 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4973 _LT_TAGVAR(inherit_rpath, $1)=no
4974 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4975 _LT_TAGVAR(module_cmds, $1)=
4976 _LT_TAGVAR(module_expsym_cmds, $1)=
4977 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4978 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4979 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4980 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4981 # include_expsyms should be a list of space-separated symbols to be *always*
4982 # included in the symbol list
4983 _LT_TAGVAR(include_expsyms, $1)=
4984 # exclude_expsyms can be an extended regexp of symbols to exclude
4985 # it will be wrapped by ' (' and ')$', so one must not match beginning or
4986 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
4987 # as well as any symbol that contains 'd'.
4988 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4989 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4990 # platforms (ab)use it in PIC code, but their linkers get confused if
4991 # the symbol is explicitly referenced. Since portable code cannot
4992 # rely on this symbol name, it's probably fine to never include it in
4993 # preloaded symbol tables.
4994 # Exclude shared library initialization/finalization symbols.
4995 dnl Note also adjust exclude_expsyms for C++ above.
4996 extract_expsyms_cmds=
4999 cygwin* | mingw* | pw32* | cegcc*)
5000 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5001 # When not using gcc, we currently assume that we are using
5002 # Microsoft Visual C++.
5003 if test yes != "$GCC"; then
5008 # we just hope/assume this is gcc and not c89 (= MSVC++)
5016 _LT_TAGVAR(ld_shlibs, $1)=yes
5018 # On some targets, GNU ld is compatible enough with the native linker
5019 # that we're better off using the native interface for both.
5020 lt_use_gnu_ld_interface=no
5021 if test yes = "$with_gnu_ld"; then
5024 # The AIX port of GNU ld has always aspired to compatibility
5025 # with the native linker. However, as the warning in the GNU ld
5026 # block says, versions before 2.19.5* couldn't really create working
5027 # shared libraries, regardless of the interface used.
5028 case `$LD -v 2>&1` in
5029 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5030 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5031 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5033 lt_use_gnu_ld_interface=yes
5038 lt_use_gnu_ld_interface=yes
5043 if test yes = "$lt_use_gnu_ld_interface"; then
5044 # If archive_cmds runs LD, not CC, wlarc should be empty
5047 # Set some defaults for GNU ld with shared library support. These
5048 # are reset later if shared libraries are not supported. Putting them
5049 # here allows them to be overridden if necessary.
5050 runpath_var=LD_RUN_PATH
5051 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5052 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5053 # ancient GNU ld didn't support --whole-archive et. al.
5054 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5055 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5057 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5059 supports_anon_versioning=no
5060 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
5061 *GNU\ gold*) supports_anon_versioning=yes ;;
5062 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5063 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5064 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5065 *\ 2.11.*) ;; # other 2.11 versions
5066 *) supports_anon_versioning=yes ;;
5069 # See if GNU ld supports shared libraries.
5072 # On AIX/PPC, the GNU linker is very broken
5073 if test ia64 != "$host_cpu"; then
5074 _LT_TAGVAR(ld_shlibs, $1)=no
5077 *** Warning: the GNU linker, at least up to release 2.19, is reported
5078 *** to be unable to reliably create shared libraries on AIX.
5079 *** Therefore, libtool is disabling shared libraries support. If you
5080 *** really care for shared libraries, you may want to install binutils
5081 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5082 *** You will then need to restart the configuration process.
5091 # see comment about AmigaOS4 .so support
5092 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5093 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5096 _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)'
5097 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5098 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5104 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5105 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5106 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5107 # support --undefined. This deserves some investigation. FIXME
5108 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5110 _LT_TAGVAR(ld_shlibs, $1)=no
5114 cygwin* | mingw* | pw32* | cegcc*)
5115 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5116 # as there is no search path for DLLs.
5117 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5118 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5119 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5120 _LT_TAGVAR(always_export_symbols, $1)=no
5121 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5122 _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'
5123 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5125 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5126 _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'
5127 # If the export-symbols file already is a .def file, use it as
5128 # is; otherwise, prepend EXPORTS...
5129 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5130 cp $export_symbols $output_objdir/$soname.def;
5132 echo EXPORTS > $output_objdir/$soname.def;
5133 cat $export_symbols >> $output_objdir/$soname.def;
5135 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5137 _LT_TAGVAR(ld_shlibs, $1)=no
5142 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5143 _LT_TAGVAR(link_all_deplibs, $1)=yes
5147 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5148 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5149 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5151 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5152 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5153 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5154 $ECHO EXPORTS >> $output_objdir/$libname.def~
5155 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5156 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5157 emximp -o $lib $output_objdir/$libname.def'
5158 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5159 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5160 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5161 $ECHO EXPORTS >> $output_objdir/$libname.def~
5163 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5164 prefix_cmds="$prefix_cmds -e 1d";
5166 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5167 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5168 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5169 emximp -o $lib $output_objdir/$libname.def'
5170 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5171 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5175 _LT_TAGVAR(hardcode_direct, $1)=no
5176 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5178 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5179 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5180 # Instead, shared libraries are loaded at an image base (0x10000000 by
5181 # default) and relocated if they conflict, which is a slow very memory
5182 # consuming and fragmenting process. To avoid this, we pick a random,
5183 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5184 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5185 _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'
5186 _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'
5189 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5191 if test linux-dietlibc = "$host_os"; then
5192 case $cc_basename in
5193 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5196 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5197 && test no = "$tmp_diet"
5199 tmp_addflag=' $pic_flag'
5200 tmp_sharedflag='-shared'
5201 case $cc_basename,$host_cpu in
5202 pgcc*) # Portland Group C compiler
5203 _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'
5204 tmp_addflag=' $pic_flag'
5206 pgf77* | pgf90* | pgf95* | pgfortran*)
5207 # Portland Group f77 and f90 compilers
5208 _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'
5209 tmp_addflag=' $pic_flag -Mnomain' ;;
5210 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5211 tmp_addflag=' -i_dynamic' ;;
5212 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5213 tmp_addflag=' -i_dynamic -nofor_main' ;;
5214 ifc* | ifort*) # Intel Fortran compiler
5215 tmp_addflag=' -nofor_main' ;;
5216 lf95*) # Lahey Fortran 8.1
5217 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5218 tmp_sharedflag='--shared' ;;
5219 nagfor*) # NAGFOR 5.3
5220 tmp_sharedflag='-Wl,-shared' ;;
5221 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5222 tmp_sharedflag='-qmkshrobj'
5224 nvcc*) # Cuda Compiler Driver 2.2
5225 _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'
5226 _LT_TAGVAR(compiler_needs_object, $1)=yes
5229 case `$CC -V 2>&1 | sed 5q` in
5230 *Sun\ C*) # Sun C 5.9
5231 _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'
5232 _LT_TAGVAR(compiler_needs_object, $1)=yes
5233 tmp_sharedflag='-G' ;;
5234 *Sun\ F*) # Sun Fortran 8.3
5235 tmp_sharedflag='-G' ;;
5237 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5239 if test yes = "$supports_anon_versioning"; then
5240 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5241 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5242 echo "local: *; };" >> $output_objdir/$libname.ver~
5243 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5246 case $cc_basename in
5248 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5250 xlf* | bgf* | bgxlf* | mpixlf*)
5251 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5252 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5253 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5254 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5255 if test yes = "$supports_anon_versioning"; then
5256 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5257 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5258 echo "local: *; };" >> $output_objdir/$libname.ver~
5259 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5264 _LT_TAGVAR(ld_shlibs, $1)=no
5269 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5270 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5273 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5274 _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'
5279 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5280 _LT_TAGVAR(ld_shlibs, $1)=no
5283 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5284 *** create shared libraries on Solaris systems. Therefore, libtool
5285 *** is disabling shared libraries support. We urge you to upgrade GNU
5286 *** binutils to release 2.9.1 or newer. Another option is to modify
5287 *** your PATH or compiler configuration so that the native linker is
5288 *** used, and then restart.
5291 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5292 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5293 _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'
5295 _LT_TAGVAR(ld_shlibs, $1)=no
5299 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5300 case `$LD -v 2>&1` in
5301 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5302 _LT_TAGVAR(ld_shlibs, $1)=no
5305 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5306 *** reliably create shared libraries on SCO systems. Therefore, libtool
5307 *** is disabling shared libraries support. We urge you to upgrade GNU
5308 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5309 *** your PATH or compiler configuration so that the native linker is
5310 *** used, and then restart.
5315 # For security reasons, it is highly recommended that you always
5316 # use absolute paths for naming shared libraries, and exclude the
5317 # DT_RUNPATH tag from executables and libraries. But doing so
5318 # requires that you compile everything twice, which is a pain.
5319 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5320 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5321 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5322 _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'
5324 _LT_TAGVAR(ld_shlibs, $1)=no
5331 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5333 _LT_TAGVAR(hardcode_direct, $1)=yes
5334 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5338 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5339 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5340 _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'
5342 _LT_TAGVAR(ld_shlibs, $1)=no
5347 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5349 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5350 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5351 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5354 # PORTME fill in a description of your system's linker (not GNU ld)
5357 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5358 _LT_TAGVAR(always_export_symbols, $1)=yes
5359 _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'
5360 # Note: this linker hardcodes the directories in LIBPATH if there
5361 # are no directories specified by -L.
5362 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5363 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5364 # Neither direct hardcoding nor static linking is supported with a
5366 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5371 if test ia64 = "$host_cpu"; then
5372 # On IA64, the linker does run time linking by default, so we don't
5373 # have to do anything special.
5374 aix_use_runtimelinking=no
5375 exp_sym_flag='-Bexport'
5378 # If we're using GNU nm, then we don't want the "-C" option.
5379 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5380 # Without the "-l" option, or with the "-B" option, AIX nm treats
5381 # weak defined symbols like other global defined symbols, whereas
5382 # GNU nm marks them as "W".
5383 # While the 'weak' keyword is ignored in the Export File, we need
5384 # it in the Import File for the 'aix-soname' feature, so we have
5385 # to replace the "-B" option with "-P" for AIX nm.
5386 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5387 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
5389 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
5391 aix_use_runtimelinking=no
5393 # Test if we are trying to use run time linking or normal
5394 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5395 # have runtime linking enabled, and use it for executables.
5396 # For shared libraries, we enable/disable runtime linking
5397 # depending on the kind of the shared library created -
5398 # when "with_aix_soname,aix_use_runtimelinking" is:
5399 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
5400 # "aix,yes" lib.so shared, rtl:yes, for executables
5401 # lib.a static archive
5402 # "both,no" lib.so.V(shr.o) shared, rtl:yes
5403 # lib.a(lib.so.V) shared, rtl:no, for executables
5404 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5405 # lib.a(lib.so.V) shared, rtl:no
5406 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
5407 # lib.a static archive
5408 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5409 for ld_flag in $LDFLAGS; do
5410 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5411 aix_use_runtimelinking=yes
5415 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5416 # With aix-soname=svr4, we create the lib.so.V shared archives only,
5417 # so we don't have lib.a shared libs to link our executables.
5418 # We have to force runtime linking in this case.
5419 aix_use_runtimelinking=yes
5420 LDFLAGS="$LDFLAGS -Wl,-brtl"
5425 exp_sym_flag='-bexport'
5426 no_entry_flag='-bnoentry'
5429 # When large executables or shared objects are built, AIX ld can
5430 # have problems creating the table of contents. If linking a library
5431 # or program results in "error TOC overflow" add -mminimal-toc to
5432 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5433 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5435 _LT_TAGVAR(archive_cmds, $1)=''
5436 _LT_TAGVAR(hardcode_direct, $1)=yes
5437 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5438 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5439 _LT_TAGVAR(link_all_deplibs, $1)=yes
5440 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5441 case $with_aix_soname,$aix_use_runtimelinking in
5442 aix,*) ;; # traditional, no import file
5443 svr4,* | *,yes) # use import file
5444 # The Import File defines what to hardcode.
5445 _LT_TAGVAR(hardcode_direct, $1)=no
5446 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5450 if test yes = "$GCC"; then
5451 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5452 # We only want to do this on AIX 4.2 and lower, the check
5453 # below for broken collect2 doesn't work under 4.3+
5454 collect2name=`$CC -print-prog-name=collect2`
5455 if test -f "$collect2name" &&
5456 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5458 # We have reworked collect2
5461 # We have old collect2
5462 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5463 # It fails to find uninstalled libraries when the uninstalled
5464 # path is not listed in the libpath. Setting hardcode_minus_L
5465 # to unsupported forces relinking
5466 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5467 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5468 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5472 shared_flag='-shared'
5473 if test yes = "$aix_use_runtimelinking"; then
5474 shared_flag="$shared_flag "'$wl-G'
5476 # Need to ensure runtime linking is disabled for the traditional
5477 # shared library, or the linker may eventually find shared libraries
5478 # /with/ Import File - we do not want to mix them.
5479 shared_flag_aix='-shared'
5480 shared_flag_svr4='-shared $wl-G'
5483 if test ia64 = "$host_cpu"; then
5484 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5485 # chokes on -Wl,-G. The following line is correct:
5488 if test yes = "$aix_use_runtimelinking"; then
5491 shared_flag='$wl-bM:SRE'
5493 shared_flag_aix='$wl-bM:SRE'
5494 shared_flag_svr4='$wl-G'
5498 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5499 # It seems that -bexpall does not export symbols beginning with
5500 # underscore (_), so it is better to generate a list of symbols to export.
5501 _LT_TAGVAR(always_export_symbols, $1)=yes
5502 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5503 # Warning - without using the other runtime loading flags (-brtl),
5504 # -berok will link without error, but may produce a broken library.
5505 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5506 # Determine the default libpath from the value encoded in an
5508 _LT_SYS_MODULE_PATH_AIX([$1])
5509 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5510 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
5512 if test ia64 = "$host_cpu"; then
5513 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5514 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5515 _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"
5517 # Determine the default libpath from the value encoded in an
5519 _LT_SYS_MODULE_PATH_AIX([$1])
5520 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5521 # Warning - without using the other run time loading flags,
5522 # -berok will link without error, but may produce a broken library.
5523 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5524 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5525 if test yes = "$with_gnu_ld"; then
5526 # We only use this code for GNU lds that support --whole-archive.
5527 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5529 # Exported symbols can be pulled into shared objects from archives
5530 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5532 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5533 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5534 # -brtl affects multiple linker settings, -berok does not and is overridden later
5535 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5536 if test svr4 != "$with_aix_soname"; then
5537 # This is similar to how AIX traditionally builds its shared libraries.
5538 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
5540 if test aix != "$with_aix_soname"; then
5541 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
5543 # used by -dlpreopen to get the symbols
5544 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
5546 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5554 # see comment about AmigaOS4 .so support
5555 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5556 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5559 _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)'
5560 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5561 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5567 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5570 cygwin* | mingw* | pw32* | cegcc*)
5571 # When not using gcc, we currently assume that we are using
5572 # Microsoft Visual C++.
5573 # hardcode_libdir_flag_spec is actually meaningless, as there is
5574 # no search path for DLLs.
5575 case $cc_basename in
5578 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5579 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5580 _LT_TAGVAR(always_export_symbols, $1)=yes
5581 _LT_TAGVAR(file_list_spec, $1)='@'
5582 # Tell ltmain to make .lib files, not .a files.
5584 # Tell ltmain to make .dll files, not .so files.
5586 # FIXME: Setting linknames here is a bad hack.
5587 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5588 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5589 cp "$export_symbols" "$output_objdir/$soname.def";
5590 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5592 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5594 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5596 # The linker will not automatically build a static lib if we build a DLL.
5597 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5598 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5599 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5600 _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'
5602 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5603 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5604 lt_tool_outputfile="@TOOL_OUTPUT@"~
5605 case $lt_outputfile in
5608 lt_outputfile=$lt_outputfile.exe
5609 lt_tool_outputfile=$lt_tool_outputfile.exe
5612 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5613 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5614 $RM "$lt_outputfile.manifest";
5618 # Assume MSVC wrapper
5619 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5620 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5621 # Tell ltmain to make .lib files, not .a files.
5623 # Tell ltmain to make .dll files, not .so files.
5625 # FIXME: Setting linknames here is a bad hack.
5626 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5627 # The linker will automatically build a .lib file if we build a DLL.
5628 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5629 # FIXME: Should let the user specify the lib program.
5630 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5631 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5636 darwin* | rhapsody*)
5637 _LT_DARWIN_LINKER_FEATURES($1)
5641 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5642 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5643 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5646 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5647 # support. Future versions do this automatically, but an explicit c++rt0.o
5648 # does not break anything, and helps significantly (at the cost of a little
5651 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5652 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5653 _LT_TAGVAR(hardcode_direct, $1)=yes
5654 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5657 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5659 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5660 _LT_TAGVAR(hardcode_direct, $1)=yes
5661 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5662 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5665 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5666 freebsd* | dragonfly*)
5667 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5668 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5669 _LT_TAGVAR(hardcode_direct, $1)=yes
5670 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5674 if test yes = "$GCC"; then
5675 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5677 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
5679 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5680 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5681 _LT_TAGVAR(hardcode_direct, $1)=yes
5683 # hardcode_minus_L: Not really in the search PATH,
5684 # but as the default location of the library.
5685 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5686 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5690 if test yes,no = "$GCC,$with_gnu_ld"; then
5691 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5693 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5695 if test no = "$with_gnu_ld"; then
5696 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5697 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5698 _LT_TAGVAR(hardcode_direct, $1)=yes
5699 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5700 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5701 # hardcode_minus_L: Not really in the search PATH,
5702 # but as the default location of the library.
5703 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5708 if test yes,no = "$GCC,$with_gnu_ld"; then
5711 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5714 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5717 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5723 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5726 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5730 # Older versions of the 11.00 compiler do not understand -b yet
5731 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5732 _LT_LINKER_OPTION([if $CC understands -b],
5733 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5734 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5735 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5736 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5740 if test no = "$with_gnu_ld"; then
5741 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5742 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5746 _LT_TAGVAR(hardcode_direct, $1)=no
5747 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5750 _LT_TAGVAR(hardcode_direct, $1)=yes
5751 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5752 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5754 # hardcode_minus_L: Not really in the search PATH,
5755 # but as the default location of the library.
5756 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5762 irix5* | irix6* | nonstopux*)
5763 if test yes = "$GCC"; then
5764 _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'
5765 # Try to use the -exported_symbol ld option, if it does not
5766 # work, assume that -exports_file does not work either and
5767 # implicitly export all symbols.
5768 # This should be the same for all languages, so no per-tag cache variable.
5769 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5770 [lt_cv_irix_exported_symbol],
5771 [save_LDFLAGS=$LDFLAGS
5772 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
5775 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5776 [C++], [[int foo (void) { return 0; }]],
5783 [lt_cv_irix_exported_symbol=yes],
5784 [lt_cv_irix_exported_symbol=no])
5785 LDFLAGS=$save_LDFLAGS])
5786 if test yes = "$lt_cv_irix_exported_symbol"; then
5787 _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'
5790 _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'
5791 _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'
5793 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5794 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5795 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5796 _LT_TAGVAR(inherit_rpath, $1)=yes
5797 _LT_TAGVAR(link_all_deplibs, $1)=yes
5801 case $cc_basename in
5803 # Fabrice Bellard et al's Tiny C Compiler
5804 _LT_TAGVAR(ld_shlibs, $1)=yes
5805 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5811 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5812 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5814 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5816 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5817 _LT_TAGVAR(hardcode_direct, $1)=yes
5818 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5822 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5823 _LT_TAGVAR(hardcode_direct, $1)=yes
5824 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5825 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5826 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5833 if test -f /usr/libexec/ld.so; then
5834 _LT_TAGVAR(hardcode_direct, $1)=yes
5835 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5836 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5837 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5838 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5839 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5840 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5841 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5844 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5847 _LT_TAGVAR(ld_shlibs, $1)=no
5852 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5853 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5854 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5856 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5857 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5858 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5859 $ECHO EXPORTS >> $output_objdir/$libname.def~
5860 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5861 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5862 emximp -o $lib $output_objdir/$libname.def'
5863 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5864 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5865 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5866 $ECHO EXPORTS >> $output_objdir/$libname.def~
5868 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5869 prefix_cmds="$prefix_cmds -e 1d";
5871 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5872 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5873 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5874 emximp -o $lib $output_objdir/$libname.def'
5875 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5876 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5880 if test yes = "$GCC"; then
5881 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5882 _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'
5884 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5885 _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'
5887 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5888 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5889 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5892 osf4* | osf5*) # as osf3* with the addition of -msym flag
5893 if test yes = "$GCC"; then
5894 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5895 _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'
5896 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5898 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5899 _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'
5900 _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~
5901 $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'
5903 # Both c and cxx compiler support -rpath directly
5904 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5906 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5907 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5911 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5912 if test yes = "$GCC"; then
5914 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5915 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5916 $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'
5918 case `$CC -V 2>&1` in
5921 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
5922 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5923 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5927 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5928 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5929 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5933 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5934 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5936 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5938 # The compiler driver will combine and reorder linker options,
5939 # but understands '-z linker_flag'. GCC discards it without '$wl',
5940 # but is careful enough not to reorder.
5941 # Supported since Solaris 2.6 (maybe 2.5.1?)
5942 if test yes = "$GCC"; then
5943 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
5945 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5949 _LT_TAGVAR(link_all_deplibs, $1)=yes
5953 if test sequent = "$host_vendor"; then
5954 # Use $CC to link under sequent, because it throws in some extra .o
5955 # files that make .init and .fini sections work.
5956 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5958 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5960 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5961 _LT_TAGVAR(hardcode_direct, $1)=yes
5962 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5963 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5967 case $host_vendor in
5969 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5970 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5973 ## LD is ld it makes a PLAMLIB
5974 ## CC just makes a GrossModule.
5975 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5976 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5977 _LT_TAGVAR(hardcode_direct, $1)=no
5980 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5981 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5984 runpath_var='LD_RUN_PATH'
5985 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5989 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5990 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5991 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5995 if test -d /usr/nec; then
5996 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5997 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5998 runpath_var=LD_RUN_PATH
5999 hardcode_runpath_var=yes
6000 _LT_TAGVAR(ld_shlibs, $1)=yes
6004 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6005 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6006 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6007 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6008 runpath_var='LD_RUN_PATH'
6010 if test yes = "$GCC"; then
6011 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6012 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6014 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6015 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6019 sysv5* | sco3.2v5* | sco5v6*)
6020 # Note: We CANNOT use -z defs as we might desire, because we do not
6021 # link with -lc, and that would cause any symbols used from libc to
6022 # always be unresolved, which means just about no library would
6023 # ever link correctly. If we're not using GNU ld we use -z text
6024 # though, which does catch some bad symbols but isn't as heavy-handed
6026 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6027 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6028 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6029 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6030 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6031 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6032 _LT_TAGVAR(link_all_deplibs, $1)=yes
6033 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6034 runpath_var='LD_RUN_PATH'
6036 if test yes = "$GCC"; then
6037 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6038 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6040 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6041 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6046 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6047 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6048 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6052 _LT_TAGVAR(ld_shlibs, $1)=no
6056 if test sni = "$host_vendor"; then
6058 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6059 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6065 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6066 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6068 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6070 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6071 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6072 _LT_DECL([], [extract_expsyms_cmds], [2],
6073 [The commands to extract the exported symbol list from a shared archive])
6076 # Do we need to explicitly link libc?
6078 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6080 # Assume -lc should be added
6081 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6083 if test yes,yes = "$GCC,$enable_shared"; then
6084 case $_LT_TAGVAR(archive_cmds, $1) in
6086 # FIXME: we may have to deal with multi-command sequences.
6089 # Test whether the compiler implicitly links with -lc since on some
6090 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6091 # to ld, don't add -lc before -lgcc.
6092 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6093 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6095 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6097 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6100 libobjs=conftest.$ac_objext
6102 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6103 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6109 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6110 _LT_TAGVAR(allow_undefined_flag, $1)=
6111 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6113 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6115 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6117 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6119 cat conftest.err 1>&5
6123 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6130 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6131 [Whether or not to add -lc for building shared libraries])
6132 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6133 [enable_shared_with_static_runtimes], [0],
6134 [Whether or not to disallow shared libs when runtime libs are static])
6135 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6136 [Compiler flag to allow reflexive dlopens])
6137 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6138 [Compiler flag to generate shared objects directly from archives])
6139 _LT_TAGDECL([], [compiler_needs_object], [1],
6140 [Whether the compiler copes with passing no objects directly])
6141 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6142 [Create an old-style archive from a shared archive])
6143 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6144 [Create a temporary old-style archive to link instead of a shared archive])
6145 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6146 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6147 _LT_TAGDECL([], [module_cmds], [2],
6148 [Commands used to build a loadable module if different from building
6150 _LT_TAGDECL([], [module_expsym_cmds], [2])
6151 _LT_TAGDECL([], [with_gnu_ld], [1],
6152 [Whether we are building with GNU ld or not])
6153 _LT_TAGDECL([], [allow_undefined_flag], [1],
6154 [Flag that allows shared libraries with undefined symbols to be built])
6155 _LT_TAGDECL([], [no_undefined_flag], [1],
6156 [Flag that enforces no undefined symbols])
6157 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6158 [Flag to hardcode $libdir into a binary during linking.
6159 This must work even if $libdir does not exist])
6160 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6161 [Whether we need a single "-rpath" flag with a separated argument])
6162 _LT_TAGDECL([], [hardcode_direct], [0],
6163 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6164 DIR into the resulting binary])
6165 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6166 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6167 DIR into the resulting binary and the resulting library dependency is
6168 "absolute", i.e impossible to change by setting $shlibpath_var if the
6169 library is relocated])
6170 _LT_TAGDECL([], [hardcode_minus_L], [0],
6171 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6172 into the resulting binary])
6173 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6174 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6175 into the resulting binary])
6176 _LT_TAGDECL([], [hardcode_automatic], [0],
6177 [Set to "yes" if building a shared library automatically hardcodes DIR
6178 into the library and all subsequent libraries and executables linked
6180 _LT_TAGDECL([], [inherit_rpath], [0],
6181 [Set to yes if linker adds runtime paths of dependent libraries
6182 to runtime path list])
6183 _LT_TAGDECL([], [link_all_deplibs], [0],
6184 [Whether libtool must link a program against all its dependency libraries])
6185 _LT_TAGDECL([], [always_export_symbols], [0],
6186 [Set to "yes" if exported symbols are required])
6187 _LT_TAGDECL([], [export_symbols_cmds], [2],
6188 [The commands to list exported symbols])
6189 _LT_TAGDECL([], [exclude_expsyms], [1],
6190 [Symbols that should not be listed in the preloaded symbols])
6191 _LT_TAGDECL([], [include_expsyms], [1],
6192 [Symbols that must always be exported])
6193 _LT_TAGDECL([], [prelink_cmds], [2],
6194 [Commands necessary for linking programs (against libraries) with templates])
6195 _LT_TAGDECL([], [postlink_cmds], [2],
6196 [Commands necessary for finishing linking programs])
6197 _LT_TAGDECL([], [file_list_spec], [1],
6198 [Specify filename containing input files])
6199 dnl FIXME: Not yet implemented
6200 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6201 dnl [Compiler flag to generate thread safe objects])
6202 ])# _LT_LINKER_SHLIBS
6205 # _LT_LANG_C_CONFIG([TAG])
6206 # ------------------------
6207 # Ensure that the configuration variables for a C compiler are suitably
6208 # defined. These variables are subsequently used by _LT_CONFIG to write
6209 # the compiler configuration to 'libtool'.
6210 m4_defun([_LT_LANG_C_CONFIG],
6211 [m4_require([_LT_DECL_EGREP])dnl
6215 # Source file extension for C test sources.
6218 # Object file extension for compiled C test sources.
6220 _LT_TAGVAR(objext, $1)=$objext
6222 # Code to be used in simple compile tests
6223 lt_simple_compile_test_code="int some_variable = 0;"
6225 # Code to be used in simple link tests
6226 lt_simple_link_test_code='int main(){return(0);}'
6229 # Save the default compiler, since it gets overwritten when the other
6230 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6231 compiler_DEFAULT=$CC
6233 # save warnings/boilerplate of simple test code
6234 _LT_COMPILER_BOILERPLATE
6235 _LT_LINKER_BOILERPLATE
6238 ## There is no encapsulation within the following macros, do not change
6239 ## the running order or otherwise move them around unless you know exactly
6240 ## what you are doing...
6241 if test -n "$compiler"; then
6242 _LT_COMPILER_NO_RTTI($1)
6243 _LT_COMPILER_PIC($1)
6244 _LT_COMPILER_C_O($1)
6245 _LT_COMPILER_FILE_LOCKS($1)
6246 _LT_LINKER_SHLIBS($1)
6247 _LT_SYS_DYNAMIC_LINKER($1)
6248 _LT_LINKER_HARDCODE_LIBPATH($1)
6252 # Report what library types will actually be built
6253 AC_MSG_CHECKING([if libtool supports shared libraries])
6254 AC_MSG_RESULT([$can_build_shared])
6256 AC_MSG_CHECKING([whether to build shared libraries])
6257 test no = "$can_build_shared" && enable_shared=no
6259 # On AIX, shared libraries and static libraries use the same namespace, and
6260 # are all built from PIC.
6263 test yes = "$enable_shared" && enable_static=no
6264 if test -n "$RANLIB"; then
6265 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6266 postinstall_cmds='$RANLIB $lib'
6271 if test ia64 != "$host_cpu"; then
6272 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6273 yes,aix,yes) ;; # shared object as lib.so file only
6274 yes,svr4,*) ;; # shared object as lib.so archive member only
6275 yes,*) enable_static=no ;; # shared object in lib.a archive as well
6280 AC_MSG_RESULT([$enable_shared])
6282 AC_MSG_CHECKING([whether to build static libraries])
6283 # Make sure either enable_shared or enable_static is yes.
6284 test yes = "$enable_shared" || enable_static=yes
6285 AC_MSG_RESULT([$enable_static])
6291 ])# _LT_LANG_C_CONFIG
6294 # _LT_LANG_CXX_CONFIG([TAG])
6295 # --------------------------
6296 # Ensure that the configuration variables for a C++ compiler are suitably
6297 # defined. These variables are subsequently used by _LT_CONFIG to write
6298 # the compiler configuration to 'libtool'.
6299 m4_defun([_LT_LANG_CXX_CONFIG],
6300 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6301 m4_require([_LT_DECL_EGREP])dnl
6302 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6303 if test -n "$CXX" && ( test no != "$CXX" &&
6304 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6305 (test g++ != "$CXX"))); then
6308 _lt_caught_CXX_error=yes
6312 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6313 _LT_TAGVAR(allow_undefined_flag, $1)=
6314 _LT_TAGVAR(always_export_symbols, $1)=no
6315 _LT_TAGVAR(archive_expsym_cmds, $1)=
6316 _LT_TAGVAR(compiler_needs_object, $1)=no
6317 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6318 _LT_TAGVAR(hardcode_direct, $1)=no
6319 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6320 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6321 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6322 _LT_TAGVAR(hardcode_minus_L, $1)=no
6323 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6324 _LT_TAGVAR(hardcode_automatic, $1)=no
6325 _LT_TAGVAR(inherit_rpath, $1)=no
6326 _LT_TAGVAR(module_cmds, $1)=
6327 _LT_TAGVAR(module_expsym_cmds, $1)=
6328 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6329 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6330 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6331 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6332 _LT_TAGVAR(no_undefined_flag, $1)=
6333 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6334 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6336 # Source file extension for C++ test sources.
6339 # Object file extension for compiled C++ test sources.
6341 _LT_TAGVAR(objext, $1)=$objext
6343 # No sense in running all these tests if we already determined that
6344 # the CXX compiler isn't working. Some variables (like enable_shared)
6345 # are currently assumed to apply to all compilers on this platform,
6346 # and will be corrupted by setting them based on a non-working compiler.
6347 if test yes != "$_lt_caught_CXX_error"; then
6348 # Code to be used in simple compile tests
6349 lt_simple_compile_test_code="int some_variable = 0;"
6351 # Code to be used in simple link tests
6352 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6354 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6357 # save warnings/boilerplate of simple test code
6358 _LT_COMPILER_BOILERPLATE
6359 _LT_LINKER_BOILERPLATE
6361 # Allow CC to be a program name with arguments.
6363 lt_save_CFLAGS=$CFLAGS
6367 lt_save_with_gnu_ld=$with_gnu_ld
6368 lt_save_path_LD=$lt_cv_path_LD
6369 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6370 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6372 $as_unset lt_cv_prog_gnu_ld
6374 if test -n "${lt_cv_path_LDCXX+set}"; then
6375 lt_cv_path_LD=$lt_cv_path_LDCXX
6377 $as_unset lt_cv_path_LD
6379 test -z "${LDCXX+set}" || LD=$LDCXX
6383 _LT_TAGVAR(compiler, $1)=$CC
6384 _LT_CC_BASENAME([$compiler])
6386 if test -n "$compiler"; then
6387 # We don't want -fno-exception when compiling C++ code, so set the
6388 # no_builtin_flag separately
6389 if test yes = "$GXX"; then
6390 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6392 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6395 if test yes = "$GXX"; then
6396 # Set up default GNU C++ configuration
6400 # Check if GNU C++ uses GNU ld as the underlying linker, since the
6401 # archiving commands below assume that GNU ld is being used.
6402 if test yes = "$with_gnu_ld"; then
6403 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6404 _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'
6406 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6407 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6409 # If archive_cmds runs LD, not CC, wlarc should be empty
6410 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6411 # investigate it a little bit more. (MM)
6414 # ancient GNU ld didn't support --whole-archive et. al.
6415 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6416 $GREP 'no-whole-archive' > /dev/null; then
6417 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6419 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6425 # A generic and very simple default shared library creation
6426 # command for GNU C++ for the case where it uses the native
6427 # linker, instead of GNU ld. If possible, this setting should
6428 # overridden to take advantage of the native linker features on
6429 # the platform it is being used on.
6430 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6433 # Commands to make compiler produce verbose output that lists
6434 # what "hidden" libraries, object files and flags are used when
6435 # linking a shared library.
6436 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6444 # PORTME: fill in a description of your system's C++ link characteristics
6445 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6446 _LT_TAGVAR(ld_shlibs, $1)=yes
6449 # FIXME: insert proper C++ library support
6450 _LT_TAGVAR(ld_shlibs, $1)=no
6453 if test ia64 = "$host_cpu"; then
6454 # On IA64, the linker does run time linking by default, so we don't
6455 # have to do anything special.
6456 aix_use_runtimelinking=no
6457 exp_sym_flag='-Bexport'
6460 aix_use_runtimelinking=no
6462 # Test if we are trying to use run time linking or normal
6463 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6464 # have runtime linking enabled, and use it for executables.
6465 # For shared libraries, we enable/disable runtime linking
6466 # depending on the kind of the shared library created -
6467 # when "with_aix_soname,aix_use_runtimelinking" is:
6468 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
6469 # "aix,yes" lib.so shared, rtl:yes, for executables
6470 # lib.a static archive
6471 # "both,no" lib.so.V(shr.o) shared, rtl:yes
6472 # lib.a(lib.so.V) shared, rtl:no, for executables
6473 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6474 # lib.a(lib.so.V) shared, rtl:no
6475 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
6476 # lib.a static archive
6477 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6478 for ld_flag in $LDFLAGS; do
6481 aix_use_runtimelinking=yes
6486 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6487 # With aix-soname=svr4, we create the lib.so.V shared archives only,
6488 # so we don't have lib.a shared libs to link our executables.
6489 # We have to force runtime linking in this case.
6490 aix_use_runtimelinking=yes
6491 LDFLAGS="$LDFLAGS -Wl,-brtl"
6496 exp_sym_flag='-bexport'
6497 no_entry_flag='-bnoentry'
6500 # When large executables or shared objects are built, AIX ld can
6501 # have problems creating the table of contents. If linking a library
6502 # or program results in "error TOC overflow" add -mminimal-toc to
6503 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6504 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6506 _LT_TAGVAR(archive_cmds, $1)=''
6507 _LT_TAGVAR(hardcode_direct, $1)=yes
6508 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6509 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6510 _LT_TAGVAR(link_all_deplibs, $1)=yes
6511 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6512 case $with_aix_soname,$aix_use_runtimelinking in
6513 aix,*) ;; # no import file
6514 svr4,* | *,yes) # use import file
6515 # The Import File defines what to hardcode.
6516 _LT_TAGVAR(hardcode_direct, $1)=no
6517 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6521 if test yes = "$GXX"; then
6522 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6523 # We only want to do this on AIX 4.2 and lower, the check
6524 # below for broken collect2 doesn't work under 4.3+
6525 collect2name=`$CC -print-prog-name=collect2`
6526 if test -f "$collect2name" &&
6527 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6529 # We have reworked collect2
6532 # We have old collect2
6533 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6534 # It fails to find uninstalled libraries when the uninstalled
6535 # path is not listed in the libpath. Setting hardcode_minus_L
6536 # to unsupported forces relinking
6537 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6538 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6539 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6542 shared_flag='-shared'
6543 if test yes = "$aix_use_runtimelinking"; then
6544 shared_flag=$shared_flag' $wl-G'
6546 # Need to ensure runtime linking is disabled for the traditional
6547 # shared library, or the linker may eventually find shared libraries
6548 # /with/ Import File - we do not want to mix them.
6549 shared_flag_aix='-shared'
6550 shared_flag_svr4='-shared $wl-G'
6553 if test ia64 = "$host_cpu"; then
6554 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6555 # chokes on -Wl,-G. The following line is correct:
6558 if test yes = "$aix_use_runtimelinking"; then
6561 shared_flag='$wl-bM:SRE'
6563 shared_flag_aix='$wl-bM:SRE'
6564 shared_flag_svr4='$wl-G'
6568 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6569 # It seems that -bexpall does not export symbols beginning with
6570 # underscore (_), so it is better to generate a list of symbols to
6572 _LT_TAGVAR(always_export_symbols, $1)=yes
6573 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6574 # Warning - without using the other runtime loading flags (-brtl),
6575 # -berok will link without error, but may produce a broken library.
6576 # The "-G" linker flag allows undefined symbols.
6577 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
6578 # Determine the default libpath from the value encoded in an empty
6580 _LT_SYS_MODULE_PATH_AIX([$1])
6581 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6583 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
6585 if test ia64 = "$host_cpu"; then
6586 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6587 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6588 _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"
6590 # Determine the default libpath from the value encoded in an
6592 _LT_SYS_MODULE_PATH_AIX([$1])
6593 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6594 # Warning - without using the other run time loading flags,
6595 # -berok will link without error, but may produce a broken library.
6596 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6597 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6598 if test yes = "$with_gnu_ld"; then
6599 # We only use this code for GNU lds that support --whole-archive.
6600 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6602 # Exported symbols can be pulled into shared objects from archives
6603 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6605 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6606 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6607 # -brtl affects multiple linker settings, -berok does not and is overridden later
6608 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6609 if test svr4 != "$with_aix_soname"; then
6610 # This is similar to how AIX traditionally builds its shared
6611 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6612 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
6614 if test aix != "$with_aix_soname"; then
6615 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
6617 # used by -dlpreopen to get the symbols
6618 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
6620 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6626 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6627 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6628 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6629 # support --undefined. This deserves some investigation. FIXME
6630 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6632 _LT_TAGVAR(ld_shlibs, $1)=no
6637 case $cc_basename in
6639 # FIXME: insert proper C++ library support
6640 _LT_TAGVAR(ld_shlibs, $1)=no
6645 cygwin* | mingw* | pw32* | cegcc*)
6646 case $GXX,$cc_basename in
6649 # hardcode_libdir_flag_spec is actually meaningless, as there is
6650 # no search path for DLLs.
6651 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6652 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6653 _LT_TAGVAR(always_export_symbols, $1)=yes
6654 _LT_TAGVAR(file_list_spec, $1)='@'
6655 # Tell ltmain to make .lib files, not .a files.
6657 # Tell ltmain to make .dll files, not .so files.
6659 # FIXME: Setting linknames here is a bad hack.
6660 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6661 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6662 cp "$export_symbols" "$output_objdir/$soname.def";
6663 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6665 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6667 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6669 # The linker will not automatically build a static lib if we build a DLL.
6670 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6671 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6673 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6674 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6675 lt_tool_outputfile="@TOOL_OUTPUT@"~
6676 case $lt_outputfile in
6679 lt_outputfile=$lt_outputfile.exe
6680 lt_tool_outputfile=$lt_tool_outputfile.exe
6683 func_to_tool_file "$lt_outputfile"~
6684 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6685 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6686 $RM "$lt_outputfile.manifest";
6691 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6692 # as there is no search path for DLLs.
6693 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6694 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6695 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6696 _LT_TAGVAR(always_export_symbols, $1)=no
6697 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6699 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6700 _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'
6701 # If the export-symbols file already is a .def file, use it as
6702 # is; otherwise, prepend EXPORTS...
6703 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6704 cp $export_symbols $output_objdir/$soname.def;
6706 echo EXPORTS > $output_objdir/$soname.def;
6707 cat $export_symbols >> $output_objdir/$soname.def;
6709 $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'
6711 _LT_TAGVAR(ld_shlibs, $1)=no
6716 darwin* | rhapsody*)
6717 _LT_DARWIN_LINKER_FEATURES($1)
6721 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6722 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6723 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6725 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6726 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6727 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6728 $ECHO EXPORTS >> $output_objdir/$libname.def~
6729 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6730 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6731 emximp -o $lib $output_objdir/$libname.def'
6732 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6733 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6734 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6735 $ECHO EXPORTS >> $output_objdir/$libname.def~
6737 if test EXPORTS = "`$SED 1q $export_symbols`"; then
6738 prefix_cmds="$prefix_cmds -e 1d";
6740 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6741 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6742 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6743 emximp -o $lib $output_objdir/$libname.def'
6744 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6745 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6749 case $cc_basename in
6751 # FIXME: insert proper C++ library support
6752 _LT_TAGVAR(ld_shlibs, $1)=no
6755 # Green Hills C++ Compiler
6756 # FIXME: insert proper C++ library support
6757 _LT_TAGVAR(ld_shlibs, $1)=no
6760 # FIXME: insert proper C++ library support
6761 _LT_TAGVAR(ld_shlibs, $1)=no
6767 # C++ shared libraries reported to be fairly broken before
6769 _LT_TAGVAR(ld_shlibs, $1)=no
6773 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6776 freebsd* | dragonfly*)
6777 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6779 _LT_TAGVAR(ld_shlibs, $1)=yes
6783 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6784 _LT_TAGVAR(link_all_deplibs, $1)=yes
6788 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6789 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6790 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6791 _LT_TAGVAR(hardcode_direct, $1)=yes
6792 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6793 # but as the default
6794 # location of the library.
6796 case $cc_basename in
6798 # FIXME: insert proper C++ library support
6799 _LT_TAGVAR(ld_shlibs, $1)=no
6802 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6803 # Commands to make compiler produce verbose output that lists
6804 # what "hidden" libraries, object files and flags are used when
6805 # linking a shared library.
6807 # There doesn't appear to be a way to prevent this compiler from
6808 # explicitly linking system object files so we need to strip them
6809 # from the output so that they don't get included in the library
6811 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"'
6814 if test yes = "$GXX"; then
6815 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
6817 # FIXME: insert proper C++ library support
6818 _LT_TAGVAR(ld_shlibs, $1)=no
6825 if test no = "$with_gnu_ld"; then
6826 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6827 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6833 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6839 _LT_TAGVAR(hardcode_direct, $1)=no
6840 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6843 _LT_TAGVAR(hardcode_direct, $1)=yes
6844 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6845 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6846 # but as the default
6847 # location of the library.
6851 case $cc_basename in
6853 # FIXME: insert proper C++ library support
6854 _LT_TAGVAR(ld_shlibs, $1)=no
6859 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6862 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6865 _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'
6868 # Commands to make compiler produce verbose output that lists
6869 # what "hidden" libraries, object files and flags are used when
6870 # linking a shared library.
6872 # There doesn't appear to be a way to prevent this compiler from
6873 # explicitly linking system object files so we need to strip them
6874 # from the output so that they don't get included in the library
6876 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"'
6879 if test yes = "$GXX"; then
6880 if test no = "$with_gnu_ld"; then
6883 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6886 _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'
6889 _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'
6894 # FIXME: insert proper C++ library support
6895 _LT_TAGVAR(ld_shlibs, $1)=no
6902 _LT_TAGVAR(hardcode_direct, $1)=no
6903 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6904 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6905 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6906 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6907 # Instead, shared libraries are loaded at an image base (0x10000000 by
6908 # default) and relocated if they conflict, which is a slow very memory
6909 # consuming and fragmenting process. To avoid this, we pick a random,
6910 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6911 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6912 _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'
6913 _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'
6916 case $cc_basename in
6919 _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'
6921 # Archives containing C++ object files must be created using
6922 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6923 # necessary to make sure instantiated templates are included
6925 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6928 if test yes = "$GXX"; then
6929 if test no = "$with_gnu_ld"; then
6930 _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'
6932 _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'
6935 _LT_TAGVAR(link_all_deplibs, $1)=yes
6938 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6939 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6940 _LT_TAGVAR(inherit_rpath, $1)=yes
6943 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6944 case $cc_basename in
6946 # Kuck and Associates, Inc. (KAI) C++ Compiler
6948 # KCC will only create a shared library if the output file
6949 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6950 # to its proper name (with version) after linking.
6951 _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'
6952 _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'
6953 # Commands to make compiler produce verbose output that lists
6954 # what "hidden" libraries, object files and flags are used when
6955 # linking a shared library.
6957 # There doesn't appear to be a way to prevent this compiler from
6958 # explicitly linking system object files so we need to strip them
6959 # from the output so that they don't get included in the library
6961 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"'
6963 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6964 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6966 # Archives containing C++ object files must be created using
6967 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6968 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6973 # version 8.0 and above of icpc choke on multiply defined symbols
6974 # if we add $predep_objects and $postdep_objects, however 7.1 and
6975 # earlier do not add the objects themselves.
6976 case `$CC -V 2>&1` in
6978 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6979 _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'
6981 *) # Version 8.0 or newer
6984 ia64*) tmp_idyn=' -i_dynamic';;
6986 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6987 _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'
6990 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6991 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6992 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6993 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6996 # Portland Group C++ compiler
6998 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
6999 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7001 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7002 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7003 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7005 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7006 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7008 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7010 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7011 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7012 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7014 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7015 $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'
7017 *) # Version 6 and above use weak symbols
7018 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7019 _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'
7023 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7024 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7025 _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'
7029 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7030 _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'
7032 runpath_var=LD_RUN_PATH
7033 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7034 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7036 # Commands to make compiler produce verbose output that lists
7037 # what "hidden" libraries, object files and flags are used when
7038 # linking a shared library.
7040 # There doesn't appear to be a way to prevent this compiler from
7041 # explicitly linking system object files so we need to strip them
7042 # from the output so that they don't get included in the library
7044 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'
7046 xl* | mpixl* | bgxl*)
7047 # IBM XL 8.0 on PPC, with GNU ld
7048 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7049 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7050 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7051 if test yes = "$supports_anon_versioning"; then
7052 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7053 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7054 echo "local: *; };" >> $output_objdir/$libname.ver~
7055 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7059 case `$CC -V 2>&1 | sed 5q` in
7062 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7063 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7064 _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'
7065 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7066 _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'
7067 _LT_TAGVAR(compiler_needs_object, $1)=yes
7069 # Not sure whether something based on
7070 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7072 output_verbose_link_cmd='func_echo_all'
7074 # Archives containing C++ object files must be created using
7075 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7076 # necessary to make sure instantiated templates are included
7078 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7086 # FIXME: insert proper C++ library support
7087 _LT_TAGVAR(ld_shlibs, $1)=no
7091 # FIXME: insert proper C++ library support
7092 _LT_TAGVAR(ld_shlibs, $1)=no
7096 case $cc_basename in
7098 # FIXME: insert proper C++ library support
7099 _LT_TAGVAR(ld_shlibs, $1)=no
7102 # FIXME: insert proper C++ library support
7103 _LT_TAGVAR(ld_shlibs, $1)=no
7109 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7110 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7112 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7113 _LT_TAGVAR(hardcode_direct, $1)=yes
7114 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7116 # Workaround some broken pre-1.5 toolchains
7117 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7121 _LT_TAGVAR(ld_shlibs, $1)=yes
7125 if test -f /usr/libexec/ld.so; then
7126 _LT_TAGVAR(hardcode_direct, $1)=yes
7127 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7128 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7129 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7130 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7131 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7132 _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'
7133 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7134 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7136 output_verbose_link_cmd=func_echo_all
7138 _LT_TAGVAR(ld_shlibs, $1)=no
7142 osf3* | osf4* | osf5*)
7143 case $cc_basename in
7145 # Kuck and Associates, Inc. (KAI) C++ Compiler
7147 # KCC will only create a shared library if the output file
7148 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7149 # to its proper name (with version) after linking.
7150 _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'
7152 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7153 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7155 # Archives containing C++ object files must be created using
7156 # the KAI C++ compiler.
7158 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7159 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7163 # Rational C++ 2.4.1
7164 # FIXME: insert proper C++ library support
7165 _LT_TAGVAR(ld_shlibs, $1)=no
7170 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7171 _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'
7172 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7175 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7176 _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'
7177 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7178 echo "-hidden">> $lib.exp~
7179 $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~
7181 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7185 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7187 # Commands to make compiler produce verbose output that lists
7188 # what "hidden" libraries, object files and flags are used when
7189 # linking a shared library.
7191 # There doesn't appear to be a way to prevent this compiler from
7192 # explicitly linking system object files so we need to strip them
7193 # from the output so that they don't get included in the library
7195 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"'
7198 if test yes,no = "$GXX,$with_gnu_ld"; then
7199 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7202 _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'
7205 _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'
7209 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7210 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7212 # Commands to make compiler produce verbose output that lists
7213 # what "hidden" libraries, object files and flags are used when
7214 # linking a shared library.
7215 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7218 # FIXME: insert proper C++ library support
7219 _LT_TAGVAR(ld_shlibs, $1)=no
7226 # FIXME: insert proper C++ library support
7227 _LT_TAGVAR(ld_shlibs, $1)=no
7231 case $cc_basename in
7234 # FIXME: insert proper C++ library support
7235 _LT_TAGVAR(ld_shlibs, $1)=no
7239 # FIXME: insert proper C++ library support
7240 _LT_TAGVAR(ld_shlibs, $1)=no
7243 # FIXME: insert proper C++ library support
7244 _LT_TAGVAR(ld_shlibs, $1)=no
7250 case $cc_basename in
7252 # Sun C++ 4.2, 5.x and Centerline C++
7253 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7254 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7255 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7256 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7257 $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'
7259 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7260 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7262 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7264 # The compiler driver will combine and reorder linker options,
7265 # but understands '-z linker_flag'.
7266 # Supported since Solaris 2.6 (maybe 2.5.1?)
7267 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7270 _LT_TAGVAR(link_all_deplibs, $1)=yes
7272 output_verbose_link_cmd='func_echo_all'
7274 # Archives containing C++ object files must be created using
7275 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7276 # necessary to make sure instantiated templates are included
7278 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7281 # Green Hills C++ Compiler
7282 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7284 # The C++ compiler must be used to create the archive.
7285 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7288 # GNU C++ compiler with Solaris linker
7289 if test yes,no = "$GXX,$with_gnu_ld"; then
7290 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7291 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7292 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7293 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7294 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7296 # Commands to make compiler produce verbose output that lists
7297 # what "hidden" libraries, object files and flags are used when
7298 # linking a shared library.
7299 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7301 # g++ 2.7 appears to require '-G' NOT '-shared' on this
7303 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7304 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7305 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7307 # Commands to make compiler produce verbose output that lists
7308 # what "hidden" libraries, object files and flags are used when
7309 # linking a shared library.
7310 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7313 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7315 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7317 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7325 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7326 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7327 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7328 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7329 runpath_var='LD_RUN_PATH'
7331 case $cc_basename in
7333 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7334 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7337 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7338 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7343 sysv5* | sco3.2v5* | sco5v6*)
7344 # Note: We CANNOT use -z defs as we might desire, because we do not
7345 # link with -lc, and that would cause any symbols used from libc to
7346 # always be unresolved, which means just about no library would
7347 # ever link correctly. If we're not using GNU ld we use -z text
7348 # though, which does catch some bad symbols but isn't as heavy-handed
7350 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7351 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7352 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7353 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7354 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7355 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7356 _LT_TAGVAR(link_all_deplibs, $1)=yes
7357 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7358 runpath_var='LD_RUN_PATH'
7360 case $cc_basename in
7362 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7363 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7364 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7365 '"$_LT_TAGVAR(old_archive_cmds, $1)"
7366 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7367 '"$_LT_TAGVAR(reload_cmds, $1)"
7370 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7371 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7377 case $cc_basename in
7379 # NonStop-UX NCC 3.20
7380 # FIXME: insert proper C++ library support
7381 _LT_TAGVAR(ld_shlibs, $1)=no
7384 # FIXME: insert proper C++ library support
7385 _LT_TAGVAR(ld_shlibs, $1)=no
7391 # FIXME: insert proper C++ library support
7392 _LT_TAGVAR(ld_shlibs, $1)=no
7396 # FIXME: insert proper C++ library support
7397 _LT_TAGVAR(ld_shlibs, $1)=no
7401 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7402 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7404 _LT_TAGVAR(GCC, $1)=$GXX
7405 _LT_TAGVAR(LD, $1)=$LD
7408 ## There is no encapsulation within the following macros, do not change
7409 ## the running order or otherwise move them around unless you know exactly
7410 ## what you are doing...
7411 _LT_SYS_HIDDEN_LIBDEPS($1)
7412 _LT_COMPILER_PIC($1)
7413 _LT_COMPILER_C_O($1)
7414 _LT_COMPILER_FILE_LOCKS($1)
7415 _LT_LINKER_SHLIBS($1)
7416 _LT_SYS_DYNAMIC_LINKER($1)
7417 _LT_LINKER_HARDCODE_LIBPATH($1)
7420 fi # test -n "$compiler"
7423 CFLAGS=$lt_save_CFLAGS
7427 with_gnu_ld=$lt_save_with_gnu_ld
7428 lt_cv_path_LDCXX=$lt_cv_path_LD
7429 lt_cv_path_LD=$lt_save_path_LD
7430 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7431 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7432 fi # test yes != "$_lt_caught_CXX_error"
7435 ])# _LT_LANG_CXX_CONFIG
7438 # _LT_FUNC_STRIPNAME_CNF
7439 # ----------------------
7440 # func_stripname_cnf prefix suffix name
7441 # strip PREFIX and SUFFIX off of NAME.
7442 # PREFIX and SUFFIX must not contain globbing or regex special
7443 # characters, hashes, percent signs, but SUFFIX may contain a leading
7444 # dot (in which case that matches only a dot).
7446 # This function is identical to the (non-XSI) version of func_stripname,
7447 # except this one can be used by m4 code that may be executed by configure,
7448 # rather than the libtool script.
7449 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7450 AC_REQUIRE([_LT_DECL_SED])
7451 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7452 func_stripname_cnf ()
7455 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7456 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7458 } # func_stripname_cnf
7459 ])# _LT_FUNC_STRIPNAME_CNF
7462 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7463 # ---------------------------------
7464 # Figure out "hidden" library dependencies from verbose
7465 # compiler output when linking a shared library.
7466 # Parse the compiler output and extract the necessary
7467 # objects, libraries and library flags.
7468 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7469 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7470 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7471 # Dependencies to place before and after the object being linked:
7472 _LT_TAGVAR(predep_objects, $1)=
7473 _LT_TAGVAR(postdep_objects, $1)=
7474 _LT_TAGVAR(predeps, $1)=
7475 _LT_TAGVAR(postdeps, $1)=
7476 _LT_TAGVAR(compiler_lib_search_path, $1)=
7478 dnl we can't use the lt_simple_compile_test_code here,
7479 dnl because it contains code intended for an executable,
7480 dnl not a library. It's possible we should let each
7481 dnl tag define a new lt_????_link_test_code variable,
7482 dnl but it's only used here...
7483 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7485 void foo (void) { a = 0; }
7487 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7491 Foo (void) { a = 0; }
7496 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7504 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7512 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7515 public void bar (void) {
7520 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7527 _lt_libdeps_save_CFLAGS=$CFLAGS
7528 case "$CC $CFLAGS " in #(
7529 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7530 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7531 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7534 dnl Parse the compiler output and extract the necessary
7535 dnl objects, libraries and library flags.
7536 if AC_TRY_EVAL(ac_compile); then
7537 # Parse the compiler output and extract the necessary
7538 # objects, libraries and library flags.
7540 # Sentinel used to keep track of whether or not we are before
7541 # the conftest object file.
7542 pre_test_object_deps_done=no
7544 for p in `eval "$output_verbose_link_cmd"`; do
7548 # Some compilers place space between "-{L,R}" and the path.
7550 if test x-L = "$p" ||
7551 test x-R = "$p"; then
7556 # Expand the sysroot to ease extracting the directories later.
7557 if test -z "$prev"; then
7559 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7560 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7561 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7565 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7567 if test no = "$pre_test_object_deps_done"; then
7570 # Internal compiler library paths should come after those
7571 # provided the user. The postdeps already come after the
7572 # user supplied libs so there is no need to process them.
7573 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7574 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
7576 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
7579 # The "-l" case would never come before the object being
7580 # linked, so don't bother handling this case.
7583 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7584 _LT_TAGVAR(postdeps, $1)=$prev$p
7586 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
7592 *.lto.$objext) ;; # Ignore GCC LTO objects
7594 # This assumes that the test object file only shows up
7595 # once in the compiler output.
7596 if test "$p" = "conftest.$objext"; then
7597 pre_test_object_deps_done=yes
7601 if test no = "$pre_test_object_deps_done"; then
7602 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7603 _LT_TAGVAR(predep_objects, $1)=$p
7605 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7608 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7609 _LT_TAGVAR(postdep_objects, $1)=$p
7611 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7616 *) ;; # Ignore the rest.
7624 echo "libtool.m4: error: problem compiling $1 test program"
7627 $RM -f confest.$objext
7628 CFLAGS=$_lt_libdeps_save_CFLAGS
7630 # PORTME: override above test on systems where it is broken
7634 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7635 # hack all around it, let's just trust "g++" to DTRT.
7636 _LT_TAGVAR(predep_objects,$1)=
7637 _LT_TAGVAR(postdep_objects,$1)=
7638 _LT_TAGVAR(postdeps,$1)=
7643 case " $_LT_TAGVAR(postdeps, $1) " in
7644 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7646 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7647 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7648 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
7650 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7651 [The directories searched by this compiler when creating a shared library])
7652 _LT_TAGDECL([], [predep_objects], [1],
7653 [Dependencies to place before and after the objects being linked to
7654 create a shared library])
7655 _LT_TAGDECL([], [postdep_objects], [1])
7656 _LT_TAGDECL([], [predeps], [1])
7657 _LT_TAGDECL([], [postdeps], [1])
7658 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7659 [The library search path used internally by the compiler when linking
7661 ])# _LT_SYS_HIDDEN_LIBDEPS
7664 # _LT_LANG_F77_CONFIG([TAG])
7665 # --------------------------
7666 # Ensure that the configuration variables for a Fortran 77 compiler are
7667 # suitably defined. These variables are subsequently used by _LT_CONFIG
7668 # to write the compiler configuration to 'libtool'.
7669 m4_defun([_LT_LANG_F77_CONFIG],
7670 [AC_LANG_PUSH(Fortran 77)
7671 if test -z "$F77" || test no = "$F77"; then
7675 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7676 _LT_TAGVAR(allow_undefined_flag, $1)=
7677 _LT_TAGVAR(always_export_symbols, $1)=no
7678 _LT_TAGVAR(archive_expsym_cmds, $1)=
7679 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7680 _LT_TAGVAR(hardcode_direct, $1)=no
7681 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7682 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7683 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7684 _LT_TAGVAR(hardcode_minus_L, $1)=no
7685 _LT_TAGVAR(hardcode_automatic, $1)=no
7686 _LT_TAGVAR(inherit_rpath, $1)=no
7687 _LT_TAGVAR(module_cmds, $1)=
7688 _LT_TAGVAR(module_expsym_cmds, $1)=
7689 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7690 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7691 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7692 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7693 _LT_TAGVAR(no_undefined_flag, $1)=
7694 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7695 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7697 # Source file extension for f77 test sources.
7700 # Object file extension for compiled f77 test sources.
7702 _LT_TAGVAR(objext, $1)=$objext
7704 # No sense in running all these tests if we already determined that
7705 # the F77 compiler isn't working. Some variables (like enable_shared)
7706 # are currently assumed to apply to all compilers on this platform,
7707 # and will be corrupted by setting them based on a non-working compiler.
7708 if test yes != "$_lt_disable_F77"; then
7709 # Code to be used in simple compile tests
7710 lt_simple_compile_test_code="\
7716 # Code to be used in simple link tests
7717 lt_simple_link_test_code="\
7722 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7725 # save warnings/boilerplate of simple test code
7726 _LT_COMPILER_BOILERPLATE
7727 _LT_LINKER_BOILERPLATE
7729 # Allow CC to be a program name with arguments.
7732 lt_save_CFLAGS=$CFLAGS
7736 _LT_TAGVAR(compiler, $1)=$CC
7737 _LT_CC_BASENAME([$compiler])
7739 if test -n "$compiler"; then
7740 AC_MSG_CHECKING([if libtool supports shared libraries])
7741 AC_MSG_RESULT([$can_build_shared])
7743 AC_MSG_CHECKING([whether to build shared libraries])
7744 test no = "$can_build_shared" && enable_shared=no
7746 # On AIX, shared libraries and static libraries use the same namespace, and
7747 # are all built from PIC.
7750 test yes = "$enable_shared" && enable_static=no
7751 if test -n "$RANLIB"; then
7752 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7753 postinstall_cmds='$RANLIB $lib'
7757 if test ia64 != "$host_cpu"; then
7758 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7759 yes,aix,yes) ;; # shared object as lib.so file only
7760 yes,svr4,*) ;; # shared object as lib.so archive member only
7761 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7766 AC_MSG_RESULT([$enable_shared])
7768 AC_MSG_CHECKING([whether to build static libraries])
7769 # Make sure either enable_shared or enable_static is yes.
7770 test yes = "$enable_shared" || enable_static=yes
7771 AC_MSG_RESULT([$enable_static])
7773 _LT_TAGVAR(GCC, $1)=$G77
7774 _LT_TAGVAR(LD, $1)=$LD
7777 ## There is no encapsulation within the following macros, do not change
7778 ## the running order or otherwise move them around unless you know exactly
7779 ## what you are doing...
7780 _LT_COMPILER_PIC($1)
7781 _LT_COMPILER_C_O($1)
7782 _LT_COMPILER_FILE_LOCKS($1)
7783 _LT_LINKER_SHLIBS($1)
7784 _LT_SYS_DYNAMIC_LINKER($1)
7785 _LT_LINKER_HARDCODE_LIBPATH($1)
7788 fi # test -n "$compiler"
7792 CFLAGS=$lt_save_CFLAGS
7793 fi # test yes != "$_lt_disable_F77"
7796 ])# _LT_LANG_F77_CONFIG
7799 # _LT_LANG_FC_CONFIG([TAG])
7800 # -------------------------
7801 # Ensure that the configuration variables for a Fortran compiler are
7802 # suitably defined. These variables are subsequently used by _LT_CONFIG
7803 # to write the compiler configuration to 'libtool'.
7804 m4_defun([_LT_LANG_FC_CONFIG],
7805 [AC_LANG_PUSH(Fortran)
7807 if test -z "$FC" || test no = "$FC"; then
7811 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7812 _LT_TAGVAR(allow_undefined_flag, $1)=
7813 _LT_TAGVAR(always_export_symbols, $1)=no
7814 _LT_TAGVAR(archive_expsym_cmds, $1)=
7815 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7816 _LT_TAGVAR(hardcode_direct, $1)=no
7817 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7818 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7819 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7820 _LT_TAGVAR(hardcode_minus_L, $1)=no
7821 _LT_TAGVAR(hardcode_automatic, $1)=no
7822 _LT_TAGVAR(inherit_rpath, $1)=no
7823 _LT_TAGVAR(module_cmds, $1)=
7824 _LT_TAGVAR(module_expsym_cmds, $1)=
7825 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7826 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7827 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7828 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7829 _LT_TAGVAR(no_undefined_flag, $1)=
7830 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7831 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7833 # Source file extension for fc test sources.
7834 ac_ext=${ac_fc_srcext-f}
7836 # Object file extension for compiled fc test sources.
7838 _LT_TAGVAR(objext, $1)=$objext
7840 # No sense in running all these tests if we already determined that
7841 # the FC compiler isn't working. Some variables (like enable_shared)
7842 # are currently assumed to apply to all compilers on this platform,
7843 # and will be corrupted by setting them based on a non-working compiler.
7844 if test yes != "$_lt_disable_FC"; then
7845 # Code to be used in simple compile tests
7846 lt_simple_compile_test_code="\
7852 # Code to be used in simple link tests
7853 lt_simple_link_test_code="\
7858 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7861 # save warnings/boilerplate of simple test code
7862 _LT_COMPILER_BOILERPLATE
7863 _LT_LINKER_BOILERPLATE
7865 # Allow CC to be a program name with arguments.
7868 lt_save_CFLAGS=$CFLAGS
7872 GCC=$ac_cv_fc_compiler_gnu
7874 _LT_TAGVAR(compiler, $1)=$CC
7875 _LT_CC_BASENAME([$compiler])
7877 if test -n "$compiler"; then
7878 AC_MSG_CHECKING([if libtool supports shared libraries])
7879 AC_MSG_RESULT([$can_build_shared])
7881 AC_MSG_CHECKING([whether to build shared libraries])
7882 test no = "$can_build_shared" && enable_shared=no
7884 # On AIX, shared libraries and static libraries use the same namespace, and
7885 # are all built from PIC.
7888 test yes = "$enable_shared" && enable_static=no
7889 if test -n "$RANLIB"; then
7890 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7891 postinstall_cmds='$RANLIB $lib'
7895 if test ia64 != "$host_cpu"; then
7896 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7897 yes,aix,yes) ;; # shared object as lib.so file only
7898 yes,svr4,*) ;; # shared object as lib.so archive member only
7899 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7904 AC_MSG_RESULT([$enable_shared])
7906 AC_MSG_CHECKING([whether to build static libraries])
7907 # Make sure either enable_shared or enable_static is yes.
7908 test yes = "$enable_shared" || enable_static=yes
7909 AC_MSG_RESULT([$enable_static])
7911 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7912 _LT_TAGVAR(LD, $1)=$LD
7915 ## There is no encapsulation within the following macros, do not change
7916 ## the running order or otherwise move them around unless you know exactly
7917 ## what you are doing...
7918 _LT_SYS_HIDDEN_LIBDEPS($1)
7919 _LT_COMPILER_PIC($1)
7920 _LT_COMPILER_C_O($1)
7921 _LT_COMPILER_FILE_LOCKS($1)
7922 _LT_LINKER_SHLIBS($1)
7923 _LT_SYS_DYNAMIC_LINKER($1)
7924 _LT_LINKER_HARDCODE_LIBPATH($1)
7927 fi # test -n "$compiler"
7931 CFLAGS=$lt_save_CFLAGS
7932 fi # test yes != "$_lt_disable_FC"
7935 ])# _LT_LANG_FC_CONFIG
7938 # _LT_LANG_GCJ_CONFIG([TAG])
7939 # --------------------------
7940 # Ensure that the configuration variables for the GNU Java Compiler compiler
7941 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7942 # to write the compiler configuration to 'libtool'.
7943 m4_defun([_LT_LANG_GCJ_CONFIG],
7944 [AC_REQUIRE([LT_PROG_GCJ])dnl
7947 # Source file extension for Java test sources.
7950 # Object file extension for compiled Java test sources.
7952 _LT_TAGVAR(objext, $1)=$objext
7954 # Code to be used in simple compile tests
7955 lt_simple_compile_test_code="class foo {}"
7957 # Code to be used in simple link tests
7958 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7960 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7963 # save warnings/boilerplate of simple test code
7964 _LT_COMPILER_BOILERPLATE
7965 _LT_LINKER_BOILERPLATE
7967 # Allow CC to be a program name with arguments.
7969 lt_save_CFLAGS=$CFLAGS
7975 _LT_TAGVAR(compiler, $1)=$CC
7976 _LT_TAGVAR(LD, $1)=$LD
7977 _LT_CC_BASENAME([$compiler])
7979 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7980 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7982 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7983 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7984 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7987 ## There is no encapsulation within the following macros, do not change
7988 ## the running order or otherwise move them around unless you know exactly
7989 ## what you are doing...
7990 if test -n "$compiler"; then
7991 _LT_COMPILER_NO_RTTI($1)
7992 _LT_COMPILER_PIC($1)
7993 _LT_COMPILER_C_O($1)
7994 _LT_COMPILER_FILE_LOCKS($1)
7995 _LT_LINKER_SHLIBS($1)
7996 _LT_LINKER_HARDCODE_LIBPATH($1)
8005 CFLAGS=$lt_save_CFLAGS
8006 ])# _LT_LANG_GCJ_CONFIG
8009 # _LT_LANG_GO_CONFIG([TAG])
8010 # --------------------------
8011 # Ensure that the configuration variables for the GNU Go compiler
8012 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8013 # to write the compiler configuration to 'libtool'.
8014 m4_defun([_LT_LANG_GO_CONFIG],
8015 [AC_REQUIRE([LT_PROG_GO])dnl
8018 # Source file extension for Go test sources.
8021 # Object file extension for compiled Go test sources.
8023 _LT_TAGVAR(objext, $1)=$objext
8025 # Code to be used in simple compile tests
8026 lt_simple_compile_test_code="package main; func main() { }"
8028 # Code to be used in simple link tests
8029 lt_simple_link_test_code='package main; func main() { }'
8031 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8034 # save warnings/boilerplate of simple test code
8035 _LT_COMPILER_BOILERPLATE
8036 _LT_LINKER_BOILERPLATE
8038 # Allow CC to be a program name with arguments.
8040 lt_save_CFLAGS=$CFLAGS
8046 _LT_TAGVAR(compiler, $1)=$CC
8047 _LT_TAGVAR(LD, $1)=$LD
8048 _LT_CC_BASENAME([$compiler])
8050 # Go did not exist at the time GCC didn't implicitly link libc in.
8051 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8053 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8054 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8055 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8058 ## There is no encapsulation within the following macros, do not change
8059 ## the running order or otherwise move them around unless you know exactly
8060 ## what you are doing...
8061 if test -n "$compiler"; then
8062 _LT_COMPILER_NO_RTTI($1)
8063 _LT_COMPILER_PIC($1)
8064 _LT_COMPILER_C_O($1)
8065 _LT_COMPILER_FILE_LOCKS($1)
8066 _LT_LINKER_SHLIBS($1)
8067 _LT_LINKER_HARDCODE_LIBPATH($1)
8076 CFLAGS=$lt_save_CFLAGS
8077 ])# _LT_LANG_GO_CONFIG
8080 # _LT_LANG_RC_CONFIG([TAG])
8081 # -------------------------
8082 # Ensure that the configuration variables for the Windows resource compiler
8083 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8084 # to write the compiler configuration to 'libtool'.
8085 m4_defun([_LT_LANG_RC_CONFIG],
8086 [AC_REQUIRE([LT_PROG_RC])dnl
8089 # Source file extension for RC test sources.
8092 # Object file extension for compiled RC test sources.
8094 _LT_TAGVAR(objext, $1)=$objext
8096 # Code to be used in simple compile tests
8097 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8099 # Code to be used in simple link tests
8100 lt_simple_link_test_code=$lt_simple_compile_test_code
8102 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8105 # save warnings/boilerplate of simple test code
8106 _LT_COMPILER_BOILERPLATE
8107 _LT_LINKER_BOILERPLATE
8109 # Allow CC to be a program name with arguments.
8111 lt_save_CFLAGS=$CFLAGS
8117 _LT_TAGVAR(compiler, $1)=$CC
8118 _LT_CC_BASENAME([$compiler])
8119 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8121 if test -n "$compiler"; then
8129 CFLAGS=$lt_save_CFLAGS
8130 ])# _LT_LANG_RC_CONFIG
8135 AC_DEFUN([LT_PROG_GCJ],
8136 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8137 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8138 [AC_CHECK_TOOL(GCJ, gcj,)
8139 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8140 AC_SUBST(GCJFLAGS)])])[]dnl
8144 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8145 dnl aclocal-1.4 backwards compatibility:
8146 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8151 AC_DEFUN([LT_PROG_GO],
8152 [AC_CHECK_TOOL(GOC, gccgo,)
8158 AC_DEFUN([LT_PROG_RC],
8159 [AC_CHECK_TOOL(RC, windres,)
8163 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8164 dnl aclocal-1.4 backwards compatibility:
8165 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8170 # If we don't have a new enough Autoconf to choose the best grep
8171 # available, choose the one first in the user's PATH.
8172 m4_defun([_LT_DECL_EGREP],
8173 [AC_REQUIRE([AC_PROG_EGREP])dnl
8174 AC_REQUIRE([AC_PROG_FGREP])dnl
8175 test -z "$GREP" && GREP=grep
8176 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8177 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8178 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8179 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8186 # If we don't have a new enough Autoconf to choose the best objdump
8187 # available, choose the one first in the user's PATH.
8188 m4_defun([_LT_DECL_OBJDUMP],
8189 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8190 test -z "$OBJDUMP" && OBJDUMP=objdump
8191 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8197 # Ensure DLLTOOL variable is set.
8198 m4_defun([_LT_DECL_DLLTOOL],
8199 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8200 test -z "$DLLTOOL" && DLLTOOL=dlltool
8201 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8207 # Check for a fully-functional sed program, that truncates
8208 # as few characters as possible. Prefer GNU sed if found.
8209 m4_defun([_LT_DECL_SED],
8211 test -z "$SED" && SED=sed
8212 Xsed="$SED -e 1s/^X//"
8213 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8214 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8215 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8218 m4_ifndef([AC_PROG_SED], [
8219 ############################################################
8220 # NOTE: This macro has been submitted for inclusion into #
8221 # GNU Autoconf as AC_PROG_SED. When it is available in #
8222 # a released version of Autoconf we should remove this #
8223 # macro and use it instead. #
8224 ############################################################
8226 m4_defun([AC_PROG_SED],
8227 [AC_MSG_CHECKING([for a sed that does not truncate output])
8228 AC_CACHE_VAL(lt_cv_path_SED,
8229 [# Loop through the user's path and test for sed and gsed.
8230 # Then use that list of sed's as ones to test for truncation.
8231 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8235 test -z "$as_dir" && as_dir=.
8236 for lt_ac_prog in sed gsed; do
8237 for ac_exec_ext in '' $ac_executable_extensions; do
8238 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8239 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8247 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8248 # along with /bin/sed that truncates output.
8249 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8250 test ! -f "$lt_ac_sed" && continue
8251 cat /dev/null > conftest.in
8253 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8254 # Check for GNU sed and select it if it is found.
8255 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8256 lt_cv_path_SED=$lt_ac_sed
8260 cat conftest.in conftest.in >conftest.tmp
8261 mv conftest.tmp conftest.in
8262 cp conftest.in conftest.nl
8264 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8265 cmp -s conftest.out conftest.nl || break
8266 # 10000 chars as input seems more than enough
8267 test 10 -lt "$lt_ac_count" && break
8268 lt_ac_count=`expr $lt_ac_count + 1`
8269 if test "$lt_ac_count" -gt "$lt_ac_max"; then
8270 lt_ac_max=$lt_ac_count
8271 lt_cv_path_SED=$lt_ac_sed
8278 AC_MSG_RESULT([$SED])
8283 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8284 dnl aclocal-1.4 backwards compatibility:
8285 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8288 # _LT_CHECK_SHELL_FEATURES
8289 # ------------------------
8290 # Find out whether the shell is Bourne or XSI compatible,
8291 # or has some other useful features.
8292 m4_defun([_LT_CHECK_SHELL_FEATURES],
8293 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8298 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8300 # test EBCDIC or ASCII
8301 case `echo X|tr X '\101'` in
8302 A) # ASCII based system
8303 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8304 lt_SP2NL='tr \040 \012'
8305 lt_NL2SP='tr \015\012 \040\040'
8307 *) # EBCDIC based system
8308 lt_SP2NL='tr \100 \n'
8309 lt_NL2SP='tr \r\n \100\100'
8312 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8313 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8314 ])# _LT_CHECK_SHELL_FEATURES
8317 # _LT_PATH_CONVERSION_FUNCTIONS
8318 # -----------------------------
8319 # Determine what file name conversion functions should be used by
8320 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8321 # for certain cross-compile configurations and native mingw.
8322 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8323 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8324 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8325 AC_MSG_CHECKING([how to convert $build file names to $host format])
8326 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8330 *-*-mingw* ) # actually msys
8331 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8334 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8336 * ) # otherwise, assume *nix
8337 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8343 *-*-mingw* ) # actually msys
8344 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8347 lt_cv_to_host_file_cmd=func_convert_file_noop
8349 * ) # otherwise, assume *nix
8350 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8354 * ) # unhandled hosts (and "normal" native builds)
8355 lt_cv_to_host_file_cmd=func_convert_file_noop
8359 to_host_file_cmd=$lt_cv_to_host_file_cmd
8360 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8361 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8362 [0], [convert $build file names to $host format])dnl
8364 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8365 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8366 [#assume ordinary cross tools, or native build.
8367 lt_cv_to_tool_file_cmd=func_convert_file_noop
8371 *-*-mingw* ) # actually msys
8372 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8378 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8379 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8380 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8381 [0], [convert $build files to toolchain format])dnl
8382 ])# _LT_PATH_CONVERSION_FUNCTIONS