1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
3 # Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
5 # Written by Gordon Matzigkeit, 1996
7 # This file is free software; the Free Software Foundation gives
8 # unlimited permission to copy and/or distribute it, with or without
9 # modifications, as long as this notice is preserved.
11 m4_define([_LT_COPYING], [dnl
12 # Copyright (C) 2014 Free Software Foundation, Inc.
13 # This is free software; see the source for copying conditions. There is NO
14 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 # GNU Libtool is free software; you can redistribute it and/or modify
17 # it under the terms of the GNU General Public License as published by
18 # the Free Software Foundation; either version 2 of of the License, or
19 # (at your option) any later version.
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program or library that is built
23 # using GNU Libtool, you may include this file under the same
24 # distribution terms that you use for the rest of that program.
26 # GNU Libtool is distributed in the hope that it will be useful, but
27 # WITHOUT ANY WARRANTY; without even the implied warranty of
28 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 # GNU General Public License for more details.
31 # You should have received a copy of the GNU General Public License
32 # along with this program. If not, see <http://www.gnu.org/licenses/>.
40 # Complain and exit if this libtool version is less that VERSION.
42 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
44 [m4_fatal([Libtool version $1 or higher is required],
51 # Complain if the absolute build directory name contains unusual characters
52 m4_defun([_LT_CHECK_BUILDDIR],
55 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
63 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
64 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
65 AC_BEFORE([$0], [LT_LANG])dnl
66 AC_BEFORE([$0], [LT_OUTPUT])dnl
67 AC_BEFORE([$0], [LTDL_INIT])dnl
68 m4_require([_LT_CHECK_BUILDDIR])dnl
70 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
71 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
72 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
73 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
74 dnl unless we require an AC_DEFUNed macro:
75 AC_REQUIRE([LTOPTIONS_VERSION])dnl
76 AC_REQUIRE([LTSUGAR_VERSION])dnl
77 AC_REQUIRE([LTVERSION_VERSION])dnl
78 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
79 m4_require([_LT_PROG_LTMAIN])dnl
81 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
84 _LT_SET_OPTIONS([$0], [$1])
86 # This can be used to rebuild libtool when needed
89 # Always use our own libtool.
90 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
100 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
101 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
102 dnl aclocal-1.4 backwards compatibility:
103 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
104 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
107 # _LT_PREPARE_CC_BASENAME
108 # -----------------------
109 m4_defun([_LT_PREPARE_CC_BASENAME], [
110 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
113 for cc_temp in @S|@*""; do
115 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
116 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
121 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
123 ])# _LT_PREPARE_CC_BASENAME
126 # _LT_CC_BASENAME(CC)
127 # -------------------
128 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
129 # but that macro is also expanded into generated libtool script, which
130 # arranges for $SED and $ECHO to be set by different means.
131 m4_defun([_LT_CC_BASENAME],
132 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
133 AC_REQUIRE([_LT_DECL_SED])dnl
134 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
136 cc_basename=$func_cc_basename_result
140 # _LT_FILEUTILS_DEFAULTS
141 # ----------------------
142 # It is okay to use these file commands and assume they have been set
143 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
144 m4_defun([_LT_FILEUTILS_DEFAULTS],
148 ])# _LT_FILEUTILS_DEFAULTS
153 m4_defun([_LT_SETUP],
154 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
155 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
156 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
157 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
159 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
161 _LT_DECL([], [host_alias], [0], [The host system])dnl
162 _LT_DECL([], [host], [0])dnl
163 _LT_DECL([], [host_os], [0])dnl
165 _LT_DECL([], [build_alias], [0], [The build system])dnl
166 _LT_DECL([], [build], [0])dnl
167 _LT_DECL([], [build_os], [0])dnl
169 AC_REQUIRE([AC_PROG_CC])dnl
170 AC_REQUIRE([LT_PATH_LD])dnl
171 AC_REQUIRE([LT_PATH_NM])dnl
173 AC_REQUIRE([AC_PROG_LN_S])dnl
174 test -z "$LN_S" && LN_S="ln -s"
175 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
177 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
178 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
179 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
181 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
182 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
183 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
184 m4_require([_LT_CMD_RELOAD])dnl
185 m4_require([_LT_DECL_FILECMD])dnl
186 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
187 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
188 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
189 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
190 m4_require([_LT_WITH_SYSROOT])dnl
191 m4_require([_LT_CMD_TRUNCATE])dnl
193 _LT_CONFIG_LIBTOOL_INIT([
194 # See if we are running on zsh, and set the options that allow our
195 # commands through without removal of \ escapes INIT.
196 if test -n "\${ZSH_VERSION+set}"; then
200 if test -n "${ZSH_VERSION+set}"; then
206 m4_require([_LT_TAG_COMPILER])dnl
210 # AIX sometimes has problems with the GCC collect2 program. For some
211 # reason, if we set the COLLECT_NAMES environment variable, the problems
212 # vanish in a puff of smoke.
213 if test set != "${COLLECT_NAMES+set}"; then
224 # All known linkers require a '.a' archive for static linking (except MSVC and
225 # ICC, which need '.lib').
228 with_gnu_ld=$lt_cv_prog_gnu_ld
233 # Set sane defaults for various variables
234 test -z "$CC" && CC=cc
235 test -z "$LTCC" && LTCC=$CC
236 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
237 test -z "$LD" && LD=ld
238 test -z "$ac_objext" && ac_objext=o
240 _LT_CC_BASENAME([$compiler])
242 # Only perform the check for file, if the check method requires it
243 test -z "$MAGIC_CMD" && MAGIC_CMD=file
244 case $deplibs_check_method in
246 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
252 # Use C for the default configuration in the libtool script
253 LT_SUPPORTED_TAG([CC])
255 _LT_LANG_DEFAULT_CONFIG
260 # _LT_PREPARE_SED_QUOTE_VARS
261 # --------------------------
262 # Define a few sed substitution that help us do robust quoting.
263 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
264 [# Backslashify metacharacters that are still active within
265 # double-quoted strings.
266 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
268 # Same as above, but do not quote variable references.
269 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
271 # Sed substitution to delay expansion of an escaped shell variable in a
272 # double_quote_subst'ed string.
273 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
275 # Sed substitution to delay expansion of an escaped single quote.
276 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
278 # Sed substitution to avoid accidental globbing in evaled expressions
279 no_glob_subst='s/\*/\\\*/g'
284 # Note that this code is called both from 'configure', and 'config.status'
285 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
286 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
287 # so we pass a copy along to make sure it has a sensible value anyway.
288 m4_defun([_LT_PROG_LTMAIN],
289 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
290 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
291 ltmain=$ac_aux_dir/ltmain.sh
295 ## ------------------------------------- ##
296 ## Accumulate code for creating libtool. ##
297 ## ------------------------------------- ##
299 # So that we can recreate a full libtool script including additional
300 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
301 # in macros and then make a single call at the end using the 'libtool'
305 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
306 # ----------------------------------------
307 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
308 m4_define([_LT_CONFIG_LIBTOOL_INIT],
310 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
315 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
318 # _LT_CONFIG_LIBTOOL([COMMANDS])
319 # ------------------------------
320 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
321 m4_define([_LT_CONFIG_LIBTOOL],
323 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
328 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
331 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
332 # -----------------------------------------------------
333 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
334 [_LT_CONFIG_LIBTOOL([$1])
335 _LT_CONFIG_LIBTOOL_INIT([$2])
339 # _LT_FORMAT_COMMENT([COMMENT])
340 # -----------------------------
341 # Add leading comment marks to the start of each line, and a trailing
342 # full-stop to the whole comment if one is not present already.
343 m4_define([_LT_FORMAT_COMMENT],
345 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
346 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
351 ## ------------------------ ##
352 ## FIXME: Eliminate VARNAME ##
353 ## ------------------------ ##
356 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
357 # -------------------------------------------------------------------
358 # CONFIGNAME is the name given to the value in the libtool script.
359 # VARNAME is the (base) name used in the configure script.
360 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
361 # VARNAME. Any other value will be used directly.
362 m4_define([_LT_DECL],
363 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
364 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
365 [m4_ifval([$1], [$1], [$2])])
366 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
368 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
369 lt_dict_add_subkey([lt_decl_dict], [$2],
370 [tagged?], [m4_ifval([$5], [yes], [no])])])
374 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
375 # --------------------------------------------------------
376 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
379 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
380 # ------------------------------------------------
381 m4_define([lt_decl_tag_varnames],
382 [_lt_decl_filter([tagged?], [yes], $@)])
385 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
386 # ---------------------------------------------------------
387 m4_define([_lt_decl_filter],
389 [0], [m4_fatal([$0: too few arguments: $#])],
390 [1], [m4_fatal([$0: too few arguments: $#: $1])],
391 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
392 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
393 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
397 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
398 # --------------------------------------------------
399 m4_define([lt_decl_quote_varnames],
400 [_lt_decl_filter([value], [1], $@)])
403 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
404 # ---------------------------------------------------
405 m4_define([lt_decl_dquote_varnames],
406 [_lt_decl_filter([value], [2], $@)])
409 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
410 # ---------------------------------------------------
411 m4_define([lt_decl_varnames_tagged],
412 [m4_assert([$# <= 2])dnl
413 _$0(m4_quote(m4_default([$1], [[, ]])),
414 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
415 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
416 m4_define([_lt_decl_varnames_tagged],
417 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
420 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
421 # ------------------------------------------------
422 m4_define([lt_decl_all_varnames],
423 [_$0(m4_quote(m4_default([$1], [[, ]])),
425 m4_quote(lt_decl_varnames),
426 m4_quote(m4_shift($@))))[]dnl
428 m4_define([_lt_decl_all_varnames],
429 [lt_join($@, lt_decl_varnames_tagged([$1],
430 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
434 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
435 # ------------------------------------
436 # Quote a variable value, and forward it to 'config.status' so that its
437 # declaration there will have the same value as in 'configure'. VARNAME
438 # must have a single quote delimited value for this to work.
439 m4_define([_LT_CONFIG_STATUS_DECLARE],
440 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
443 # _LT_CONFIG_STATUS_DECLARATIONS
444 # ------------------------------
445 # We delimit libtool config variables with single quotes, so when
446 # we write them to config.status, we have to be sure to quote all
447 # embedded single quotes properly. In configure, this macro expands
448 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
450 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
451 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
452 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
453 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
458 # Output comment and list of tags supported by the script
459 m4_defun([_LT_LIBTOOL_TAGS],
460 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
461 available_tags='_LT_TAGS'dnl
465 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
466 # -----------------------------------
467 # Extract the dictionary values for VARNAME (optionally with TAG) and
468 # expand to a commented shell variable setting:
470 # # Some comment about what VAR is for.
471 # visible_name=$lt_internal_name
472 m4_define([_LT_LIBTOOL_DECLARE],
473 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
474 [description])))[]dnl
475 m4_pushdef([_libtool_name],
476 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
477 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
478 [0], [_libtool_name=[$]$1],
479 [1], [_libtool_name=$lt_[]$1],
480 [2], [_libtool_name=$lt_[]$1],
481 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
482 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
486 # _LT_LIBTOOL_CONFIG_VARS
487 # -----------------------
488 # Produce commented declarations of non-tagged libtool config variables
489 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
490 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
491 # section) are produced by _LT_LIBTOOL_TAG_VARS.
492 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
493 [m4_foreach([_lt_var],
494 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
495 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
498 # _LT_LIBTOOL_TAG_VARS(TAG)
499 # -------------------------
500 m4_define([_LT_LIBTOOL_TAG_VARS],
501 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
502 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
505 # _LT_TAGVAR(VARNAME, [TAGNAME])
506 # ------------------------------
507 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
510 # _LT_CONFIG_COMMANDS
511 # -------------------
512 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
513 # variables for single and double quote escaping we saved from calls
514 # to _LT_DECL, we can put quote escaped variables declarations
515 # into 'config.status', and then the shell code to quote escape them in
516 # for loops in 'config.status'. Finally, any additional code accumulated
517 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
518 m4_defun([_LT_CONFIG_COMMANDS],
519 [AC_PROVIDE_IFELSE([LT_OUTPUT],
520 dnl If the libtool generation code has been placed in $CONFIG_LT,
521 dnl instead of duplicating it all over again into config.status,
522 dnl then we will have config.status run $CONFIG_LT later, so it
523 dnl needs to know what name is stored there:
524 [AC_CONFIG_COMMANDS([libtool],
525 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
526 dnl If the libtool generation code is destined for config.status,
527 dnl expand the accumulated commands and init code now:
528 [AC_CONFIG_COMMANDS([libtool],
529 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
530 ])#_LT_CONFIG_COMMANDS
534 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
537 # The HP-UX ksh and POSIX shell print the target directory to stdout
539 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
541 sed_quote_subst='$sed_quote_subst'
542 double_quote_subst='$double_quote_subst'
543 delay_variable_subst='$delay_variable_subst'
544 _LT_CONFIG_STATUS_DECLARATIONS
547 compiler='$compiler_DEFAULT'
549 # A function that is used when there is no print builtin or printf.
550 func_fallback_echo ()
552 eval 'cat <<_LTECHO_EOF
557 # Quote evaled strings.
558 for var in lt_decl_all_varnames([[ \
559 ]], lt_decl_quote_varnames); do
560 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
561 *[[\\\\\\\`\\"\\\$]]*)
562 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
565 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
570 # Double-quote double-evaled strings.
571 for var in lt_decl_all_varnames([[ \
572 ]], lt_decl_dquote_varnames); do
573 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
574 *[[\\\\\\\`\\"\\\$]]*)
575 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
578 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
583 _LT_OUTPUT_LIBTOOL_INIT
586 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
587 # ------------------------------------
588 # Generate a child script FILE with all initialization necessary to
589 # reuse the environment learned by the parent script, and make the
590 # file executable. If COMMENT is supplied, it is inserted after the
591 # '#!' sequence but before initialization text begins. After this
592 # macro, additional text can be appended to FILE to form the body of
593 # the child script. The macro ends with non-zero status if the
594 # file could not be fully written (such as if the disk is full).
595 m4_ifdef([AS_INIT_GENERATED],
596 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
597 [m4_defun([_LT_GENERATED_FILE_INIT],
598 [m4_require([AS_PREPARE])]dnl
599 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
601 cat >$1 <<_ASEOF || lt_write_fail=1
603 # Generated by $as_me.
605 SHELL=\${CONFIG_SHELL-$SHELL}
608 cat >>$1 <<\_ASEOF || lt_write_fail=1
611 exec AS_MESSAGE_FD>&1
613 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
614 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
618 # This macro allows early generation of the libtool script (before
619 # AC_OUTPUT is called), incase it is used in configure for compilation
621 AC_DEFUN([LT_OUTPUT],
622 [: ${CONFIG_LT=./config.lt}
623 AC_MSG_NOTICE([creating $CONFIG_LT])
624 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
625 [# Run this file to recreate a libtool stub with the current configuration.])
627 cat >>"$CONFIG_LT" <<\_LTEOF
629 exec AS_MESSAGE_LOG_FD>>config.log
632 AS_BOX([Running $as_me.])
633 } >&AS_MESSAGE_LOG_FD
636 '$as_me' creates a local libtool stub from the current configuration,
637 for use in further configure time tests before the real libtool is
640 Usage: $[0] [[OPTIONS]]
642 -h, --help print this help, then exit
643 -V, --version print version number, then exit
644 -q, --quiet do not print progress messages
645 -d, --debug don't remove temporary files
647 Report bugs to <bug-libtool@gnu.org>."
650 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
651 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
652 configured by $[0], generated by m4_PACKAGE_STRING.
654 Copyright (C) 2011 Free Software Foundation, Inc.
655 This config.lt script is free software; the Free Software Foundation
656 gives unlimited permision to copy, distribute and modify it."
661 --version | --v* | -V )
662 echo "$lt_cl_version"; exit 0 ;;
664 echo "$lt_cl_help"; exit 0 ;;
665 --debug | --d* | -d )
667 --quiet | --q* | --silent | --s* | -q )
670 -*) AC_MSG_ERROR([unrecognized option: $[1]
671 Try '$[0] --help' for more information.]) ;;
673 *) AC_MSG_ERROR([unrecognized argument: $[1]
674 Try '$[0] --help' for more information.]) ;;
679 if $lt_cl_silent; then
680 exec AS_MESSAGE_FD>/dev/null
684 cat >>"$CONFIG_LT" <<_LTEOF
685 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
688 cat >>"$CONFIG_LT" <<\_LTEOF
689 AC_MSG_NOTICE([creating $ofile])
690 _LT_OUTPUT_LIBTOOL_COMMANDS
693 chmod +x "$CONFIG_LT"
695 # configure is writing to config.log, but config.lt does its own redirection,
696 # appending to config.log, which fails on DOS, as config.log is still kept
697 # open by configure. Here we exec the FD to /dev/null, effectively closing
698 # config.log, so it can be properly (re)opened and appended to by config.lt.
700 test yes = "$silent" &&
701 lt_config_lt_args="$lt_config_lt_args --quiet"
702 exec AS_MESSAGE_LOG_FD>/dev/null
703 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
704 exec AS_MESSAGE_LOG_FD>>config.log
705 $lt_cl_success || AS_EXIT(1)
711 # If TAG is the built-in tag, create an initial libtool script with a
712 # default configuration from the untagged config vars. Otherwise add code
713 # to config.status for appending the configuration named by TAG from the
714 # matching tagged config vars.
715 m4_defun([_LT_CONFIG],
716 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
717 _LT_CONFIG_SAVE_COMMANDS([
718 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
719 m4_if(_LT_TAG, [C], [
720 # See if we are running on zsh, and set the options that allow our
721 # commands through without removal of \ escapes.
722 if test -n "${ZSH_VERSION+set}"; then
727 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
730 cat <<_LT_EOF >> "$cfgfile"
732 # Generated automatically by $as_me ($PACKAGE) $VERSION
733 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
734 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
736 # Provide generalized library-building support services.
737 # Written by Gordon Matzigkeit, 1996
742 # Configured defaults for sys_lib_dlsearch_path munging.
743 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
745 # ### BEGIN LIBTOOL CONFIG
746 _LT_LIBTOOL_CONFIG_VARS
748 # ### END LIBTOOL CONFIG
752 cat <<'_LT_EOF' >> "$cfgfile"
754 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
756 _LT_PREPARE_MUNGE_PATH_LIST
757 _LT_PREPARE_CC_BASENAME
759 # ### END FUNCTIONS SHARED WITH CONFIGURE
765 cat <<\_LT_EOF >> "$cfgfile"
766 # AIX sometimes has problems with the GCC collect2 program. For some
767 # reason, if we set the COLLECT_NAMES environment variable, the problems
768 # vanish in a puff of smoke.
769 if test set != "${COLLECT_NAMES+set}"; then
779 # We use sed instead of cat because bash on DJGPP gets confused if
780 # if finds mixed CR/LF and LF-only lines. Since sed operates in
781 # text mode, it properly converts lines to CR/LF. This bash problem
782 # is reportedly fixed, but why not run on old versions too?
783 $SED '$q' "$ltmain" >> "$cfgfile" \
784 || (rm -f "$cfgfile"; exit 1)
786 mv -f "$cfgfile" "$ofile" ||
787 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
790 [cat <<_LT_EOF >> "$ofile"
792 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
793 dnl in a comment (ie after a #).
794 # ### BEGIN LIBTOOL TAG CONFIG: $1
795 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
796 # ### END LIBTOOL TAG CONFIG: $1
805 ])dnl /_LT_CONFIG_SAVE_COMMANDS
809 # LT_SUPPORTED_TAG(TAG)
810 # ---------------------
811 # Trace this macro to discover what tags are supported by the libtool
812 # --tag option, using:
813 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
814 AC_DEFUN([LT_SUPPORTED_TAG], [])
817 # C support is built-in for now
818 m4_define([_LT_LANG_C_enabled], [])
819 m4_define([_LT_TAGS], [])
824 # Enable libtool support for the given language if not already enabled.
826 [AC_BEFORE([$0], [LT_OUTPUT])dnl
829 [C++], [_LT_LANG(CXX)],
830 [Go], [_LT_LANG(GO)],
831 [Java], [_LT_LANG(GCJ)],
832 [Fortran 77], [_LT_LANG(F77)],
833 [Fortran], [_LT_LANG(FC)],
834 [Windows Resource], [_LT_LANG(RC)],
835 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
837 [m4_fatal([$0: unsupported language: "$1"])])])dnl
844 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
845 [LT_SUPPORTED_TAG([$1])dnl
846 m4_append([_LT_TAGS], [$1 ])dnl
847 m4_define([_LT_LANG_]$1[_enabled], [])dnl
848 _LT_LANG_$1_CONFIG($1)])dnl
852 m4_ifndef([AC_PROG_GO], [
853 ############################################################
854 # NOTE: This macro has been submitted for inclusion into #
855 # GNU Autoconf as AC_PROG_GO. When it is available in #
856 # a released version of Autoconf we should remove this #
857 # macro and use it instead. #
858 ############################################################
859 m4_defun([AC_PROG_GO],
861 AC_ARG_VAR([GOC], [Go compiler command])dnl
862 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
863 _AC_ARG_VAR_LDFLAGS()dnl
864 AC_CHECK_TOOL(GOC, gccgo)
865 if test -z "$GOC"; then
866 if test -n "$ac_tool_prefix"; then
867 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
870 if test -z "$GOC"; then
871 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
877 # _LT_LANG_DEFAULT_CONFIG
878 # -----------------------
879 m4_defun([_LT_LANG_DEFAULT_CONFIG],
880 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
882 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
884 AC_PROVIDE_IFELSE([AC_PROG_F77],
886 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
888 AC_PROVIDE_IFELSE([AC_PROG_FC],
890 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
892 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
893 dnl pulling things in needlessly.
894 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
896 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
898 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
900 [m4_ifdef([AC_PROG_GCJ],
901 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
902 m4_ifdef([A][M_PROG_GCJ],
903 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
904 m4_ifdef([LT_PROG_GCJ],
905 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
907 AC_PROVIDE_IFELSE([AC_PROG_GO],
909 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
911 AC_PROVIDE_IFELSE([LT_PROG_RC],
913 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
914 ])# _LT_LANG_DEFAULT_CONFIG
917 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
918 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
919 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
920 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
921 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
922 dnl aclocal-1.4 backwards compatibility:
923 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
924 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
925 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
926 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
927 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
932 m4_defun([_LT_TAG_COMPILER],
933 [AC_REQUIRE([AC_PROG_CC])dnl
935 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
936 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
937 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
938 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
940 # If no C compiler was specified, use CC.
943 # If no C compiler flags were specified, use CFLAGS.
944 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
946 # Allow CC to be a program name with arguments.
951 # _LT_COMPILER_BOILERPLATE
952 # ------------------------
953 # Check for compiler boilerplate output or warnings with
954 # the simple compiler test code.
955 m4_defun([_LT_COMPILER_BOILERPLATE],
956 [m4_require([_LT_DECL_SED])dnl
957 ac_outfile=conftest.$ac_objext
958 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
959 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
960 _lt_compiler_boilerplate=`cat conftest.err`
962 ])# _LT_COMPILER_BOILERPLATE
965 # _LT_LINKER_BOILERPLATE
966 # ----------------------
967 # Check for linker boilerplate output or warnings with
968 # the simple link test code.
969 m4_defun([_LT_LINKER_BOILERPLATE],
970 [m4_require([_LT_DECL_SED])dnl
971 ac_outfile=conftest.$ac_objext
972 echo "$lt_simple_link_test_code" >conftest.$ac_ext
973 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
974 _lt_linker_boilerplate=`cat conftest.err`
976 ])# _LT_LINKER_BOILERPLATE
978 # _LT_REQUIRED_DARWIN_CHECKS
979 # -------------------------
980 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
983 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
984 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
985 AC_CHECK_TOOL([LIPO], [lipo], [:])
986 AC_CHECK_TOOL([OTOOL], [otool], [:])
987 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
988 _LT_DECL([], [DSYMUTIL], [1],
989 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
990 _LT_DECL([], [NMEDIT], [1],
991 [Tool to change global to local symbols on Mac OS X])
992 _LT_DECL([], [LIPO], [1],
993 [Tool to manipulate fat objects and archives on Mac OS X])
994 _LT_DECL([], [OTOOL], [1],
995 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
996 _LT_DECL([], [OTOOL64], [1],
997 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
999 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1000 [lt_cv_apple_cc_single_mod=no
1001 if test -z "$LT_MULTI_MODULE"; then
1002 # By default we will add the -single_module flag. You can override
1003 # by either setting the environment variable LT_MULTI_MODULE
1004 # non-empty at configure time, or by adding -multi_module to the
1006 rm -rf libconftest.dylib*
1007 echo "int foo(void){return 1;}" > conftest.c
1008 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1009 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1010 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1011 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1013 # If there is a non-empty error log, and "single_module"
1014 # appears in it, assume the flag caused a linker warning
1015 if test -s conftest.err && $GREP single_module conftest.err; then
1016 cat conftest.err >&AS_MESSAGE_LOG_FD
1017 # Otherwise, if the output was created with a 0 exit code from
1018 # the compiler, it worked.
1019 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
1020 lt_cv_apple_cc_single_mod=yes
1022 cat conftest.err >&AS_MESSAGE_LOG_FD
1024 rm -rf libconftest.dylib*
1028 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1029 [lt_cv_ld_exported_symbols_list],
1030 [lt_cv_ld_exported_symbols_list=no
1031 save_LDFLAGS=$LDFLAGS
1032 echo "_main" > conftest.sym
1033 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1034 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1035 [lt_cv_ld_exported_symbols_list=yes],
1036 [lt_cv_ld_exported_symbols_list=no])
1037 LDFLAGS=$save_LDFLAGS
1040 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1041 [lt_cv_ld_force_load=no
1042 cat > conftest.c << _LT_EOF
1043 int forced_loaded() { return 2;}
1045 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1046 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1047 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1048 $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1049 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1050 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
1051 cat > conftest.c << _LT_EOF
1052 int main() { return 0;}
1054 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
1055 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
1057 if test -s conftest.err && $GREP force_load conftest.err; then
1058 cat conftest.err >&AS_MESSAGE_LOG_FD
1059 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
1060 lt_cv_ld_force_load=yes
1062 cat conftest.err >&AS_MESSAGE_LOG_FD
1064 rm -f conftest.err libconftest.a conftest conftest.c
1065 rm -rf conftest.dSYM
1068 rhapsody* | darwin1.[[012]])
1069 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
1071 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1073 case $MACOSX_DEPLOYMENT_TARGET,$host in
1074 10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
1075 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
1077 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1081 if test yes = "$lt_cv_apple_cc_single_mod"; then
1082 _lt_dar_single_mod='$single_module'
1084 if test yes = "$lt_cv_ld_exported_symbols_list"; then
1085 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
1087 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
1089 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
1090 _lt_dsymutil='~$DSYMUTIL $lib || :'
1099 # _LT_DARWIN_LINKER_FEATURES([TAG])
1100 # ---------------------------------
1101 # Checks for linker and compiler features on darwin
1102 m4_defun([_LT_DARWIN_LINKER_FEATURES],
1104 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
1105 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
1106 _LT_TAGVAR(hardcode_direct, $1)=no
1107 _LT_TAGVAR(hardcode_automatic, $1)=yes
1108 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1109 if test yes = "$lt_cv_ld_force_load"; then
1110 _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\"`'
1111 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
1112 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
1114 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
1116 _LT_TAGVAR(link_all_deplibs, $1)=yes
1117 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
1118 case $cc_basename in
1119 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1120 *) _lt_dar_can_shared=$GCC ;;
1122 if test yes = "$_lt_dar_can_shared"; then
1123 output_verbose_link_cmd=func_echo_all
1124 _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"
1125 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1126 _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"
1127 _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"
1129 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
1130 _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"
1131 _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"
1135 _LT_TAGVAR(ld_shlibs, $1)=no
1139 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
1140 # ----------------------------------
1141 # Links a minimal program and checks the executable
1142 # for the system default hardcoded library path. In most cases,
1143 # this is /usr/lib:/lib, but when the MPI compilers are used
1144 # the location of the communication and MPI libs are included too.
1145 # If we don't find anything, use the default library path according
1146 # to the aix ld manual.
1147 # Store the results from the different compilers for each TAGNAME.
1148 # Allow to override them for all tags through lt_cv_aix_libpath.
1149 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1150 [m4_require([_LT_DECL_SED])dnl
1151 if test set = "${lt_cv_aix_libpath+set}"; then
1152 aix_libpath=$lt_cv_aix_libpath
1154 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
1155 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
1156 lt_aix_libpath_sed='[
1157 /Import File Strings/,/^$/ {
1159 s/^0 *\([^ ]*\) *$/\1/
1163 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1164 # Check for a 64-bit object if we didn't find anything.
1165 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1166 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1168 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1169 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
1172 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
1174 ])# _LT_SYS_MODULE_PATH_AIX
1177 # _LT_SHELL_INIT(ARG)
1178 # -------------------
1179 m4_define([_LT_SHELL_INIT],
1180 [m4_divert_text([M4SH-INIT], [$1
1181 ])])# _LT_SHELL_INIT
1185 # _LT_PROG_ECHO_BACKSLASH
1186 # -----------------------
1187 # Find how we can fake an echo command that does not interpret backslash.
1188 # In particular, with Autoconf 2.60 or later we add some code to the start
1189 # of the generated configure script that will find a shell with a builtin
1190 # printf (that we can use as an echo command).
1191 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1192 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1193 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1194 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1196 AC_MSG_CHECKING([how to print strings])
1197 # Test print first, because it will be a builtin if present.
1198 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
1199 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
1201 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
1204 # Use this function as a fallback that always works.
1205 func_fallback_echo ()
1207 eval 'cat <<_LTECHO_EOF
1211 ECHO='func_fallback_echo'
1214 # func_echo_all arg...
1215 # Invoke $ECHO with all args, space-separated.
1222 printf*) AC_MSG_RESULT([printf]) ;;
1223 print*) AC_MSG_RESULT([print -r]) ;;
1224 *) AC_MSG_RESULT([cat]) ;;
1227 m4_ifdef([_AS_DETECT_SUGGESTED],
1228 [_AS_DETECT_SUGGESTED([
1229 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
1230 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
1231 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
1232 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
1233 PATH=/empty FPATH=/empty; export PATH FPATH
1234 test "X`printf %s $ECHO`" = "X$ECHO" \
1235 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
1237 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1238 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
1239 ])# _LT_PROG_ECHO_BACKSLASH
1244 AC_DEFUN([_LT_WITH_SYSROOT],
1245 [m4_require([_LT_DECL_SED])dnl
1246 AC_MSG_CHECKING([for sysroot])
1247 AC_ARG_WITH([sysroot],
1248 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1249 [Search for dependent libraries within DIR (or the compiler's sysroot
1250 if not specified).])],
1251 [], [with_sysroot=no])
1253 dnl lt_sysroot will always be passed unquoted. We quote it here
1254 dnl in case the user passed a directory name.
1256 case $with_sysroot in #(
1258 if test yes = "$GCC"; then
1259 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
1263 lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
1268 AC_MSG_RESULT([$with_sysroot])
1269 AC_MSG_ERROR([The sysroot must be an absolute path.])
1273 AC_MSG_RESULT([${lt_sysroot:-no}])
1274 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1275 [dependent libraries, and where our libraries should be installed.])])
1279 m4_defun([_LT_ENABLE_LOCK],
1280 [AC_ARG_ENABLE([libtool-lock],
1281 [AS_HELP_STRING([--disable-libtool-lock],
1282 [avoid locking (might break parallel builds)])])
1283 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
1285 # Some flags need to be propagated to the compiler or linker for good
1289 # Find out what ABI is being produced by ac_compile, and set mode
1290 # options accordingly.
1291 echo 'int i;' > conftest.$ac_ext
1292 if AC_TRY_EVAL(ac_compile); then
1293 case `$FILECMD conftest.$ac_objext` in
1305 # Find out what ABI is being produced by ac_compile, and set linker
1306 # options accordingly.
1307 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1308 if AC_TRY_EVAL(ac_compile); then
1309 if test yes = "$lt_cv_prog_gnu_ld"; then
1310 case `$FILECMD conftest.$ac_objext` in
1312 LD="${LD-ld} -melf32bsmip"
1315 LD="${LD-ld} -melf32bmipn32"
1318 LD="${LD-ld} -melf64bmip"
1322 case `$FILECMD conftest.$ac_objext` in
1339 # Find out what ABI is being produced by ac_compile, and set linker
1340 # options accordingly.
1341 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1342 if AC_TRY_EVAL(ac_compile); then
1344 case `$FILECMD conftest.$ac_objext` in
1352 case `$FILECMD conftest.$ac_objext` in
1354 emul="${emul}btsmip"
1357 emul="${emul}ltsmip"
1360 case `$FILECMD conftest.$ac_objext` in
1365 LD="${LD-ld} -m $emul"
1370 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
1371 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1372 # Find out what ABI is being produced by ac_compile, and set linker
1373 # options accordingly. Note that the listed cases only cover the
1374 # situations where additional linker options are needed (such as when
1375 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1376 # vice versa); the common cases where no linker options are needed do
1377 # not appear in the list.
1378 echo 'int i;' > conftest.$ac_ext
1379 if AC_TRY_EVAL(ac_compile); then
1380 case `$FILECMD conftest.o` in
1383 x86_64-*kfreebsd*-gnu)
1384 LD="${LD-ld} -m elf_i386_fbsd"
1387 case `$FILECMD conftest.o` in
1389 LD="${LD-ld} -m elf32_x86_64"
1392 LD="${LD-ld} -m elf_i386"
1396 powerpc64le-*linux*)
1397 LD="${LD-ld} -m elf32lppclinux"
1400 LD="${LD-ld} -m elf32ppclinux"
1403 LD="${LD-ld} -m elf_s390"
1406 LD="${LD-ld} -m elf32_sparc"
1412 x86_64-*kfreebsd*-gnu)
1413 LD="${LD-ld} -m elf_x86_64_fbsd"
1416 LD="${LD-ld} -m elf_x86_64"
1419 LD="${LD-ld} -m elf64lppc"
1422 LD="${LD-ld} -m elf64ppc"
1424 s390*-*linux*|s390*-*tpf*)
1425 LD="${LD-ld} -m elf64_s390"
1428 LD="${LD-ld} -m elf64_sparc"
1438 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1440 CFLAGS="$CFLAGS -belf"
1441 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1443 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1445 if test yes != "$lt_cv_cc_needs_belf"; then
1446 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1451 # Find out what ABI is being produced by ac_compile, and set linker
1452 # options accordingly.
1453 echo 'int i;' > conftest.$ac_ext
1454 if AC_TRY_EVAL(ac_compile); then
1455 case `$FILECMD conftest.o` in
1457 case $lt_cv_prog_gnu_ld in
1460 i?86-*-solaris*|x86_64-*-solaris*)
1461 LD="${LD-ld} -m elf_x86_64"
1464 LD="${LD-ld} -m elf64_sparc"
1467 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
1468 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1473 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1485 need_locks=$enable_libtool_lock
1491 m4_defun([_LT_PROG_AR],
1492 [AC_CHECK_TOOLS(AR, [ar], false)
1494 _LT_DECL([], [AR], [1], [The archiver])
1496 # Use ARFLAGS variable as AR's operation code to sync the variable naming with
1497 # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
1498 # higher priority because thats what people were doing historically (setting
1499 # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
1500 # variable obsoleted/removed.
1502 test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
1503 lt_ar_flags=$AR_FLAGS
1504 _LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
1506 # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
1507 # by AR_FLAGS because that was never working and AR_FLAGS is about to die.
1508 _LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
1509 [Flags to create an archive])
1511 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
1512 [lt_cv_ar_at_file=no
1513 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
1514 [echo conftest.$ac_objext > conftest.lst
1515 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
1516 AC_TRY_EVAL([lt_ar_try])
1517 if test 0 -eq "$ac_status"; then
1518 # Ensure the archiver fails upon bogus file names.
1519 rm -f conftest.$ac_objext libconftest.a
1520 AC_TRY_EVAL([lt_ar_try])
1521 if test 0 -ne "$ac_status"; then
1525 rm -f conftest.* libconftest.a
1529 if test no = "$lt_cv_ar_at_file"; then
1532 archiver_list_spec=$lt_cv_ar_at_file
1534 _LT_DECL([], [archiver_list_spec], [1],
1535 [How to feed a file listing to the archiver])
1539 # _LT_CMD_OLD_ARCHIVE
1540 # -------------------
1541 m4_defun([_LT_CMD_OLD_ARCHIVE],
1544 AC_CHECK_TOOL(STRIP, strip, :)
1545 test -z "$STRIP" && STRIP=:
1546 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1548 AC_CHECK_TOOL(RANLIB, ranlib, :)
1549 test -z "$RANLIB" && RANLIB=:
1550 _LT_DECL([], [RANLIB], [1],
1551 [Commands used to install an old-style archive])
1553 # Determine commands to create old-style static archives.
1554 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1555 old_postinstall_cmds='chmod 644 $oldlib'
1556 old_postuninstall_cmds=
1558 if test -n "$RANLIB"; then
1561 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
1564 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
1567 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
1572 lock_old_archive_extraction=yes ;;
1574 lock_old_archive_extraction=no ;;
1576 _LT_DECL([], [old_postinstall_cmds], [2])
1577 _LT_DECL([], [old_postuninstall_cmds], [2])
1578 _LT_TAGDECL([], [old_archive_cmds], [2],
1579 [Commands used to build an old-style archive])
1580 _LT_DECL([], [lock_old_archive_extraction], [0],
1581 [Whether to use a lock for old archive extraction])
1582 ])# _LT_CMD_OLD_ARCHIVE
1585 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1586 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1587 # ----------------------------------------------------------------
1588 # Check whether the given compiler option works
1589 AC_DEFUN([_LT_COMPILER_OPTION],
1590 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1591 m4_require([_LT_DECL_SED])dnl
1592 AC_CACHE_CHECK([$1], [$2],
1594 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1595 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1596 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
1597 # Insert the option either (1) after the last *FLAGS variable, or
1598 # (2) before a word containing "conftest.", or (3) at the end.
1599 # Note that $ac_compile itself does not contain backslashes and begins
1600 # with a dollar sign (not a hyphen), so the echo should work correctly.
1601 # The option is referenced via a variable to avoid confusing sed.
1602 lt_compile=`echo "$ac_compile" | $SED \
1603 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1604 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1605 -e 's:$: $lt_compiler_flag:'`
1606 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1607 (eval "$lt_compile" 2>conftest.err)
1609 cat conftest.err >&AS_MESSAGE_LOG_FD
1610 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1611 if (exit $ac_status) && test -s "$ac_outfile"; then
1612 # The compiler can only warn and ignore the option if not recognized
1613 # So say no if there are warnings other than the usual output.
1614 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
1615 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1616 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1623 if test yes = "[$]$2"; then
1624 m4_if([$5], , :, [$5])
1626 m4_if([$6], , :, [$6])
1628 ])# _LT_COMPILER_OPTION
1631 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1632 dnl aclocal-1.4 backwards compatibility:
1633 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1636 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1637 # [ACTION-SUCCESS], [ACTION-FAILURE])
1638 # ----------------------------------------------------
1639 # Check whether the given linker option works
1640 AC_DEFUN([_LT_LINKER_OPTION],
1641 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1642 m4_require([_LT_DECL_SED])dnl
1643 AC_CACHE_CHECK([$1], [$2],
1645 save_LDFLAGS=$LDFLAGS
1646 LDFLAGS="$LDFLAGS $3"
1647 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1648 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1649 # The linker can only warn and ignore the option if not recognized
1650 # So say no if there are warnings
1651 if test -s conftest.err; then
1652 # Append any errors to the config.log.
1653 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1654 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
1655 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1656 if diff conftest.exp conftest.er2 >/dev/null; then
1664 LDFLAGS=$save_LDFLAGS
1667 if test yes = "[$]$2"; then
1668 m4_if([$4], , :, [$4])
1670 m4_if([$5], , :, [$5])
1672 ])# _LT_LINKER_OPTION
1675 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1676 dnl aclocal-1.4 backwards compatibility:
1677 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1682 AC_DEFUN([LT_CMD_MAX_LEN],
1683 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1684 # find the maximum length of command line arguments
1685 AC_MSG_CHECKING([the maximum length of command line arguments])
1686 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1692 # On DJGPP, this test can blow up pretty badly due to problems in libc
1693 # (any single argument exceeding 2000 bytes causes a buffer overrun
1694 # during glob expansion). Even if it were fixed, the result of this
1695 # check would be larger than it should be.
1696 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1700 # Under GNU Hurd, this test is not required because there is
1701 # no limit to the length of command line arguments.
1702 # Libtool will interpret -1 as no limit whatsoever
1703 lt_cv_sys_max_cmd_len=-1;
1706 cygwin* | mingw* | cegcc*)
1707 # On Win9x/ME, this test blows up -- it succeeds, but takes
1708 # about 5 minutes as the teststring grows exponentially.
1709 # Worse, since 9x/ME are not pre-emptively multitasking,
1710 # you end up with a "frozen" computer, even though with patience
1711 # the test eventually succeeds (with a max line length of 256k).
1712 # Instead, let's just punt: use the minimum linelength reported by
1713 # all of the supported platforms: 8192 (on NT/2K/XP).
1714 lt_cv_sys_max_cmd_len=8192;
1718 # On MiNT this can take a long time and run out of memory.
1719 lt_cv_sys_max_cmd_len=8192;
1723 # On AmigaOS with pdksh, this test takes hours, literally.
1724 # So we just punt and use a minimum line length of 8192.
1725 lt_cv_sys_max_cmd_len=8192;
1728 bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
1729 # This has been around since 386BSD, at least. Likely further.
1730 if test -x /sbin/sysctl; then
1731 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1732 elif test -x /usr/sbin/sysctl; then
1733 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1735 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1737 # And add a safety zone
1738 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1739 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1743 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1744 lt_cv_sys_max_cmd_len=196608
1748 # The test takes a long time on OS/2.
1749 lt_cv_sys_max_cmd_len=8192
1753 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1754 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1755 # nice to cause kernel panics so lets avoid the loop below.
1756 # First set a reasonable default.
1757 lt_cv_sys_max_cmd_len=16384
1759 if test -x /sbin/sysconfig; then
1760 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1761 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1766 lt_cv_sys_max_cmd_len=102400
1768 sysv5* | sco5v6* | sysv4.2uw2*)
1769 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1770 if test -n "$kargmax"; then
1771 lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'`
1773 lt_cv_sys_max_cmd_len=32768
1777 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1778 if test -n "$lt_cv_sys_max_cmd_len" && \
1779 test undefined != "$lt_cv_sys_max_cmd_len"; then
1780 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1781 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1783 # Make teststring a little bigger before we do anything with it.
1784 # a 1K string should be a reasonable start.
1785 for i in 1 2 3 4 5 6 7 8; do
1786 teststring=$teststring$teststring
1788 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1789 # If test is not a shell built-in, we'll probably end up computing a
1790 # maximum length that is only half of the actual maximum length, but
1792 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
1793 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1794 test 17 != "$i" # 1/2 MB should be enough
1797 teststring=$teststring$teststring
1799 # Only check the string length outside the loop.
1800 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1802 # Add a significant safety factor because C++ compilers can tack on
1803 # massive amounts of additional arguments before passing them to the
1804 # linker. It appears as though 1/2 is a usable value.
1805 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1810 if test -n "$lt_cv_sys_max_cmd_len"; then
1811 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1815 max_cmd_len=$lt_cv_sys_max_cmd_len
1816 _LT_DECL([], [max_cmd_len], [0],
1817 [What is the maximum length of a command?])
1821 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1822 dnl aclocal-1.4 backwards compatibility:
1823 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1828 m4_defun([_LT_HEADER_DLFCN],
1829 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1830 ])# _LT_HEADER_DLFCN
1833 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1834 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1835 # ----------------------------------------------------------------
1836 m4_defun([_LT_TRY_DLOPEN_SELF],
1837 [m4_require([_LT_HEADER_DLFCN])dnl
1838 if test yes = "$cross_compiling"; then :
1841 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1842 lt_status=$lt_dlunknown
1843 cat > conftest.$ac_ext <<_LT_EOF
1844 [#line $LINENO "configure"
1845 #include "confdefs.h"
1854 # define LT_DLGLOBAL RTLD_GLOBAL
1857 # define LT_DLGLOBAL DL_GLOBAL
1859 # define LT_DLGLOBAL 0
1863 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1864 find out it does not work in some platform. */
1865 #ifndef LT_DLLAZY_OR_NOW
1867 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1870 # define LT_DLLAZY_OR_NOW DL_LAZY
1873 # define LT_DLLAZY_OR_NOW RTLD_NOW
1876 # define LT_DLLAZY_OR_NOW DL_NOW
1878 # define LT_DLLAZY_OR_NOW 0
1885 /* When -fvisibility=hidden is used, assume the code has been annotated
1886 correspondingly for the symbols needed. */
1887 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1888 int fnord () __attribute__((visibility("default")));
1891 int fnord () { return 42; }
1894 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1895 int status = $lt_dlunknown;
1899 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1902 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1903 else puts (dlerror ());
1905 /* dlclose (self); */
1913 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
1914 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1917 x$lt_dlno_uscore) $1 ;;
1918 x$lt_dlneed_uscore) $2 ;;
1919 x$lt_dlunknown|x*) $3 ;;
1922 # compilation failed
1927 ])# _LT_TRY_DLOPEN_SELF
1930 # LT_SYS_DLOPEN_SELF
1931 # ------------------
1932 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1933 [m4_require([_LT_HEADER_DLFCN])dnl
1934 if test yes != "$enable_dlopen"; then
1935 enable_dlopen=unknown
1936 enable_dlopen_self=unknown
1937 enable_dlopen_self_static=unknown
1944 lt_cv_dlopen=load_add_on
1946 lt_cv_dlopen_self=yes
1949 mingw* | pw32* | cegcc*)
1950 lt_cv_dlopen=LoadLibrary
1960 # if libdl is installed we need to link against it
1961 AC_CHECK_LIB([dl], [dlopen],
1962 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1965 lt_cv_dlopen_self=yes
1970 # Don't try to run any link tests for TPF. We know it's impossible
1971 # because TPF is a cross-compiler, and we know how we open DSOs.
1974 lt_cv_dlopen_self=no
1978 AC_CHECK_FUNC([shl_load],
1979 [lt_cv_dlopen=shl_load],
1980 [AC_CHECK_LIB([dld], [shl_load],
1981 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
1982 [AC_CHECK_FUNC([dlopen],
1983 [lt_cv_dlopen=dlopen],
1984 [AC_CHECK_LIB([dl], [dlopen],
1985 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
1986 [AC_CHECK_LIB([svld], [dlopen],
1987 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
1988 [AC_CHECK_LIB([dld], [dld_link],
1989 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
1998 if test no = "$lt_cv_dlopen"; then
2004 case $lt_cv_dlopen in
2006 save_CPPFLAGS=$CPPFLAGS
2007 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2009 save_LDFLAGS=$LDFLAGS
2010 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2013 LIBS="$lt_cv_dlopen_libs $LIBS"
2015 AC_CACHE_CHECK([whether a program can dlopen itself],
2016 lt_cv_dlopen_self, [dnl
2017 _LT_TRY_DLOPEN_SELF(
2018 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2019 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2022 if test yes = "$lt_cv_dlopen_self"; then
2023 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2024 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2025 lt_cv_dlopen_self_static, [dnl
2026 _LT_TRY_DLOPEN_SELF(
2027 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2028 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2032 CPPFLAGS=$save_CPPFLAGS
2033 LDFLAGS=$save_LDFLAGS
2038 case $lt_cv_dlopen_self in
2039 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2040 *) enable_dlopen_self=unknown ;;
2043 case $lt_cv_dlopen_self_static in
2044 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2045 *) enable_dlopen_self_static=unknown ;;
2048 _LT_DECL([dlopen_support], [enable_dlopen], [0],
2049 [Whether dlopen is supported])
2050 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2051 [Whether dlopen of programs is supported])
2052 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2053 [Whether dlopen of statically linked programs is supported])
2054 ])# LT_SYS_DLOPEN_SELF
2057 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2058 dnl aclocal-1.4 backwards compatibility:
2059 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2062 # _LT_COMPILER_C_O([TAGNAME])
2063 # ---------------------------
2064 # Check to see if options -c and -o are simultaneously supported by compiler.
2065 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
2066 m4_defun([_LT_COMPILER_C_O],
2067 [m4_require([_LT_DECL_SED])dnl
2068 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2069 m4_require([_LT_TAG_COMPILER])dnl
2070 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2071 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2072 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2073 $RM -r conftest 2>/dev/null
2077 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2079 lt_compiler_flag="-o out/conftest2.$ac_objext"
2080 # Insert the option either (1) after the last *FLAGS variable, or
2081 # (2) before a word containing "conftest.", or (3) at the end.
2082 # Note that $ac_compile itself does not contain backslashes and begins
2083 # with a dollar sign (not a hyphen), so the echo should work correctly.
2084 lt_compile=`echo "$ac_compile" | $SED \
2085 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2086 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2087 -e 's:$: $lt_compiler_flag:'`
2088 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2089 (eval "$lt_compile" 2>out/conftest.err)
2091 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2092 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2093 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2095 # The compiler can only warn and ignore the option if not recognized
2096 # So say no if there are warnings
2097 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2098 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2099 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2100 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2103 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2105 # SGI C++ compiler will create directory out/ii_files/ for
2106 # template instantiation
2107 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2108 $RM out/* && rmdir out
2113 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2114 [Does compiler simultaneously support -c and -o options?])
2115 ])# _LT_COMPILER_C_O
2118 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
2119 # ----------------------------------
2120 # Check to see if we can do hard links to lock some files if needed
2121 m4_defun([_LT_COMPILER_FILE_LOCKS],
2122 [m4_require([_LT_ENABLE_LOCK])dnl
2123 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2124 _LT_COMPILER_C_O([$1])
2126 hard_links=nottested
2127 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
2128 # do not overwrite the value of need_locks provided by the user
2129 AC_MSG_CHECKING([if we can lock with hard links])
2132 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2134 ln conftest.a conftest.b 2>&5 || hard_links=no
2135 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2136 AC_MSG_RESULT([$hard_links])
2137 if test no = "$hard_links"; then
2138 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
2144 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
2145 ])# _LT_COMPILER_FILE_LOCKS
2150 m4_defun([_LT_CHECK_OBJDIR],
2151 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2152 [rm -f .libs 2>/dev/null
2153 mkdir .libs 2>/dev/null
2154 if test -d .libs; then
2157 # MS-DOS does not allow filenames that begin with a dot.
2160 rmdir .libs 2>/dev/null])
2161 objdir=$lt_cv_objdir
2162 _LT_DECL([], [objdir], [0],
2163 [The name of the directory that contains temporary libtool files])dnl
2164 m4_pattern_allow([LT_OBJDIR])dnl
2165 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2166 [Define to the sub-directory where libtool stores uninstalled libraries.])
2167 ])# _LT_CHECK_OBJDIR
2170 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
2171 # --------------------------------------
2172 # Check hardcoding attributes.
2173 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
2174 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2175 _LT_TAGVAR(hardcode_action, $1)=
2176 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
2177 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2178 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
2180 # We can hardcode non-existent directories.
2181 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
2182 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2183 # have to relink, otherwise we might link with an installed library
2184 # when we should be linking with a yet-to-be-installed one
2185 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2186 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
2187 # Linking always hardcodes the temporary library directory.
2188 _LT_TAGVAR(hardcode_action, $1)=relink
2190 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2191 _LT_TAGVAR(hardcode_action, $1)=immediate
2194 # We cannot hardcode anything, or else we can only hardcode existing
2196 _LT_TAGVAR(hardcode_action, $1)=unsupported
2198 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
2200 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2201 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
2202 # Fast installation is not supported
2203 enable_fast_install=no
2204 elif test yes = "$shlibpath_overrides_runpath" ||
2205 test no = "$enable_shared"; then
2206 # Fast installation is not necessary
2207 enable_fast_install=needless
2209 _LT_TAGDECL([], [hardcode_action], [0],
2210 [How to hardcode a shared library path into an executable])
2211 ])# _LT_LINKER_HARDCODE_LIBPATH
2216 m4_defun([_LT_CMD_STRIPLIB],
2217 [m4_require([_LT_DECL_EGREP])
2220 AC_MSG_CHECKING([whether stripping libraries is possible])
2221 if test -z "$STRIP"; then
2224 if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2225 old_striplib="$STRIP --strip-debug"
2226 striplib="$STRIP --strip-unneeded"
2227 AC_MSG_RESULT([yes])
2231 # FIXME - insert some real tests, host_os isn't really good enough
2232 striplib="$STRIP -x"
2233 old_striplib="$STRIP -S"
2234 AC_MSG_RESULT([yes])
2237 if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
2238 old_striplib="$STRIP --strip-debug"
2239 striplib="$STRIP --strip-unneeded"
2240 AC_MSG_RESULT([yes])
2251 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2252 _LT_DECL([], [striplib], [1])
2253 ])# _LT_CMD_STRIPLIB
2256 # _LT_PREPARE_MUNGE_PATH_LIST
2257 # ---------------------------
2258 # Make sure func_munge_path_list() is defined correctly.
2259 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2260 [[# func_munge_path_list VARIABLE PATH
2261 # -----------------------------------
2262 # VARIABLE is name of variable containing _space_ separated list of
2263 # directories to be munged by the contents of PATH, which is string
2266 # string "DIR[ DIR]" will be prepended to VARIABLE
2268 # string "DIR[ DIR]" will be appended to VARIABLE
2269 # "DIRP[:DIRP]::[DIRA:]DIRA"
2270 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2271 # "DIRA[ DIRA]" will be appended to VARIABLE
2273 # VARIABLE will be replaced by "DIR[ DIR]"
2274 func_munge_path_list ()
2280 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2283 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2286 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2287 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2290 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2294 ]])# _LT_PREPARE_PATH_LIST
2297 # _LT_SYS_DYNAMIC_LINKER([TAG])
2298 # -----------------------------
2299 # PORTME Fill in your ld.so characteristics
2300 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2301 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2302 m4_require([_LT_DECL_EGREP])dnl
2303 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2304 m4_require([_LT_DECL_OBJDUMP])dnl
2305 m4_require([_LT_DECL_SED])dnl
2306 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2307 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
2308 AC_MSG_CHECKING([dynamic linker characteristics])
2311 if test yes = "$GCC"; then
2313 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2314 *) lt_awk_arg='/^libraries:/' ;;
2317 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2318 *) lt_sed_strip_eq='s|=/|/|g' ;;
2320 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
2321 case $lt_search_path_spec in
2323 # if the path contains ";" then we assume it to be the separator
2324 # otherwise default to the standard path separator (i.e. ":") - it is
2325 # assumed that no part of a normal pathname contains ";" but that should
2326 # okay in the real world where ";" in dirpaths is itself problematic.
2327 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
2330 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
2333 # Ok, now we have the path, separated by spaces, we can step through it
2334 # and add multilib dir if necessary...
2335 lt_tmp_lt_search_path_spec=
2336 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2337 # ...but if some path component already ends with the multilib dir we assume
2338 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2339 case "$lt_multi_os_dir; $lt_search_path_spec " in
2340 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2344 for lt_sys_path in $lt_search_path_spec; do
2345 if test -d "$lt_sys_path$lt_multi_os_dir"; then
2346 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2347 elif test -n "$lt_multi_os_dir"; then
2348 test -d "$lt_sys_path" && \
2349 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2352 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2353 BEGIN {RS = " "; FS = "/|\n";} {
2356 for (lt_i = NF; lt_i > 0; lt_i--) {
2357 if ($lt_i != "" && $lt_i != ".") {
2358 if ($lt_i == "..") {
2361 if (lt_count == 0) {
2362 lt_foo = "/" $lt_i lt_foo;
2369 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2370 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2372 # AWK program above erroneously prepends '/' to C:/dos/paths
2375 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2376 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
2378 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
2380 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2383 libname_spec='lib$name'
2391 shlibpath_overrides_runpath=unknown
2393 dynamic_linker="$host_os ld.so"
2394 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2395 need_lib_prefix=unknown
2396 hardcode_into_libs=no
2398 # when you set need_version to no, make sure it does not cause -set_version
2399 # flags to be left without arguments
2400 need_version=unknown
2402 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2403 [User-defined run-time library search path.])
2407 version_type=linux # correct to gnu/linux during the next big refactor
2408 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
2409 shlibpath_var=LIBPATH
2411 # AIX 3 has no versioning support, so we append a major version to the name.
2412 soname_spec='$libname$release$shared_ext$major'
2416 version_type=linux # correct to gnu/linux during the next big refactor
2419 hardcode_into_libs=yes
2420 if test ia64 = "$host_cpu"; then
2421 # AIX 5 supports IA64
2422 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
2423 shlibpath_var=LD_LIBRARY_PATH
2425 # With GCC up to 2.95.x, collect2 would create an import file
2426 # for dependence libraries. The import file would start with
2427 # the line '#! .'. This would cause the generated library to
2428 # depend on '.', always an invalid library. This was fixed in
2429 # development snapshots of GCC prior to 3.0.
2431 aix4 | aix4.[[01]] | aix4.[[01]].*)
2432 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2434 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
2441 # Using Import Files as archive members, it is possible to support
2442 # filename-based versioning of shared library archives on AIX. While
2443 # this would work for both with and without runtime linking, it will
2444 # prevent static linking of such archives. So we do filename-based
2445 # shared library versioning with .so extension only, which is used
2446 # when both runtime linking and shared linking is enabled.
2447 # Unfortunately, runtime linking may impact performance, so we do
2448 # not want this to be the default eventually. Also, we use the
2449 # versioned .so libs for executables only if there is the -brtl
2450 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2451 # To allow for filename-based versioning support, we need to create
2452 # libNAME.so.V as an archive file, containing:
2453 # *) an Import File, referring to the versioned filename of the
2454 # archive as well as the shared archive member, telling the
2455 # bitwidth (32 or 64) of that shared object, and providing the
2456 # list of exported symbols of that shared object, eventually
2457 # decorated with the 'weak' keyword
2458 # *) the shared object with the F_LOADONLY flag set, to really avoid
2459 # it being seen by the linker.
2460 # At run time we better use the real file rather than another symlink,
2461 # but for link time we create the symlink libNAME.so -> libNAME.so.V
2463 case $with_aix_soname,$aix_use_runtimelinking in
2464 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
2465 # soname into executable. Probably we can add versioning support to
2466 # collect2, so additional links can be useful in future.
2467 aix,yes) # traditional libtool
2468 dynamic_linker='AIX unversionable lib.so'
2469 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2470 # instead of lib<name>.a to let people know that these are not
2471 # typical AIX shared libraries.
2472 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2474 aix,no) # traditional AIX only
2475 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
2476 # We preserve .a as extension for shared libraries through AIX4.2
2477 # and later when we are not doing run time linking.
2478 library_names_spec='$libname$release.a $libname.a'
2479 soname_spec='$libname$release$shared_ext$major'
2481 svr4,*) # full svr4 only
2482 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2483 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2484 # We do not specify a path in Import Files, so LIBPATH fires.
2485 shlibpath_overrides_runpath=yes
2487 *,yes) # both, prefer svr4
2488 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2489 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2490 # unpreferred sharedlib libNAME.a needs extra handling
2491 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"'
2492 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"'
2493 # We do not specify a path in Import Files, so LIBPATH fires.
2494 shlibpath_overrides_runpath=yes
2496 *,no) # both, prefer aix
2497 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2498 library_names_spec='$libname$release.a $libname.a'
2499 soname_spec='$libname$release$shared_ext$major'
2500 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2501 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)'
2502 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"'
2505 shlibpath_var=LIBPATH
2512 # Since July 2007 AmigaOS4 officially supports .so libraries.
2513 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2514 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2517 library_names_spec='$libname.ixlibrary $libname.a'
2518 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2519 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'
2525 library_names_spec='$libname$shared_ext'
2526 dynamic_linker="$host_os ld.so"
2527 shlibpath_var=LIBRARY_PATH
2531 version_type=linux # correct to gnu/linux during the next big refactor
2533 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2534 soname_spec='$libname$release$shared_ext$major'
2535 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2536 shlibpath_var=LD_LIBRARY_PATH
2537 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2538 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2539 # the default ld.so.conf also contains /usr/contrib/lib and
2540 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2541 # libtool to hard-code these into programs
2544 cygwin* | mingw* | pw32* | cegcc*)
2545 version_type=windows
2550 case $GCC,$cc_basename in
2553 library_names_spec='$libname.dll.a'
2554 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2555 postinstall_cmds='base_file=`basename \$file`~
2556 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2557 dldir=$destdir/`dirname \$dlpath`~
2558 test -d \$dldir || mkdir -p \$dldir~
2559 $install_prog $dir/$dlname \$dldir/$dlname~
2560 chmod a+x \$dldir/$dlname~
2561 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2562 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2564 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2565 dlpath=$dir/\$dldll~
2567 shlibpath_overrides_runpath=yes
2571 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2572 soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2574 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
2577 # MinGW DLLs use traditional 'lib' prefix
2578 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2581 # pw32 DLLs use 'pw' prefix rather than 'lib'
2582 library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2585 dynamic_linker='Win32 ld.exe'
2589 # Native MSVC or ICC
2590 libname_spec='$name'
2591 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2592 library_names_spec='$libname.dll.lib'
2596 sys_lib_search_path_spec=
2602 # Let DOS variable expansion print the short 8.3 style file name.
2603 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
2604 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
2607 # Convert to MSYS style.
2608 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
2611 # Convert to unix form, then to dos form, then back to unix form
2612 # but this time dos style (no spaces!) so that the unix form looks
2613 # like /cygdrive/c/PROGRA~1:/cygdr...
2614 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
2615 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
2616 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2619 sys_lib_search_path_spec=$LIB
2620 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2621 # It is most probably a Windows format PATH.
2622 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2624 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2626 # FIXME: find the short name or the path components, as spaces are
2627 # common. (e.g. "Program Files" -> "PROGRA~1")
2631 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2632 postinstall_cmds='base_file=`basename \$file`~
2633 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
2634 dldir=$destdir/`dirname \$dlpath`~
2635 test -d \$dldir || mkdir -p \$dldir~
2636 $install_prog $dir/$dlname \$dldir/$dlname'
2637 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2638 dlpath=$dir/\$dldll~
2640 shlibpath_overrides_runpath=yes
2641 dynamic_linker='Win32 link.exe'
2645 # Assume MSVC and ICC wrapper
2646 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
2647 dynamic_linker='Win32 ld.exe'
2650 # FIXME: first we should search . and the directory the executable is in
2654 darwin* | rhapsody*)
2655 dynamic_linker="$host_os dyld"
2659 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2660 soname_spec='$libname$release$major$shared_ext'
2661 shlibpath_overrides_runpath=yes
2662 shlibpath_var=DYLD_LIBRARY_PATH
2663 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2665 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2666 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2670 version_type=linux # correct to gnu/linux during the next big refactor
2673 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2674 soname_spec='$libname$release$shared_ext$major'
2675 shlibpath_var=LD_LIBRARY_PATH
2678 freebsd* | dragonfly* | midnightbsd*)
2679 # DragonFly does not have aout. When/if they implement a new
2680 # versioning mechanism, adjust this.
2681 if test -x /usr/bin/objformat; then
2682 objformat=`/usr/bin/objformat`
2685 freebsd[[23]].*) objformat=aout ;;
2689 version_type=freebsd-$objformat
2690 case $version_type in
2692 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2693 soname_spec='$libname$release$shared_ext$major'
2698 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2702 shlibpath_var=LD_LIBRARY_PATH
2705 shlibpath_overrides_runpath=yes
2707 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2708 shlibpath_overrides_runpath=yes
2709 hardcode_into_libs=yes
2711 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2712 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2713 shlibpath_overrides_runpath=no
2714 hardcode_into_libs=yes
2716 *) # from 4.6 on, and DragonFly
2717 shlibpath_overrides_runpath=yes
2718 hardcode_into_libs=yes
2724 version_type=linux # correct to gnu/linux during the next big refactor
2727 dynamic_linker="$host_os runtime_loader"
2728 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2729 soname_spec='$libname$release$shared_ext$major'
2730 shlibpath_var=LIBRARY_PATH
2731 shlibpath_overrides_runpath=no
2732 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
2733 hardcode_into_libs=yes
2736 hpux9* | hpux10* | hpux11*)
2737 # Give a soname corresponding to the major version so that dld.sl refuses to
2738 # link against other versions.
2745 hardcode_into_libs=yes
2746 dynamic_linker="$host_os dld.so"
2747 shlibpath_var=LD_LIBRARY_PATH
2748 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2749 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2750 soname_spec='$libname$release$shared_ext$major'
2751 if test 32 = "$HPUX_IA64_MODE"; then
2752 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2753 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
2755 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2756 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
2761 hardcode_into_libs=yes
2762 dynamic_linker="$host_os dld.sl"
2763 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2764 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2765 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2766 soname_spec='$libname$release$shared_ext$major'
2767 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2768 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2772 dynamic_linker="$host_os dld.sl"
2773 shlibpath_var=SHLIB_PATH
2774 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2775 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2776 soname_spec='$libname$release$shared_ext$major'
2779 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
2780 postinstall_cmds='chmod 555 $lib'
2781 # or fails outright, so override atomically:
2782 install_override_mode=555
2786 version_type=linux # correct to gnu/linux during the next big refactor
2789 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2790 soname_spec='$libname$release$shared_ext$major'
2791 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2792 shlibpath_var=LD_LIBRARY_PATH
2793 shlibpath_overrides_runpath=no
2794 hardcode_into_libs=yes
2797 irix5* | irix6* | nonstopux*)
2799 nonstopux*) version_type=nonstopux ;;
2801 if test yes = "$lt_cv_prog_gnu_ld"; then
2802 version_type=linux # correct to gnu/linux during the next big refactor
2809 soname_spec='$libname$release$shared_ext$major'
2810 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
2812 irix5* | nonstopux*)
2816 case $LD in # libtool.m4 will add one of these switches to LD
2817 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2818 libsuff= shlibsuff= libmagic=32-bit;;
2819 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2820 libsuff=32 shlibsuff=N32 libmagic=N32;;
2821 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2822 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2823 *) libsuff= shlibsuff= libmagic=never-match;;
2827 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2828 shlibpath_overrides_runpath=no
2829 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2830 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
2831 hardcode_into_libs=yes
2834 # No shared lib support for Linux oldld, aout, or coff.
2835 linux*oldld* | linux*aout* | linux*coff*)
2840 version_type=none # Android doesn't support versioned libraries.
2843 library_names_spec='$libname$release$shared_ext'
2844 soname_spec='$libname$release$shared_ext'
2846 shlibpath_var=LD_LIBRARY_PATH
2847 shlibpath_overrides_runpath=yes
2849 # This implies no fast_install, which is unacceptable.
2850 # Some rework will be needed to allow for fast_install
2851 # before this can be enabled.
2852 hardcode_into_libs=yes
2854 dynamic_linker='Android linker'
2855 # Don't embed -rpath directories since the linker doesn't support them.
2856 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2859 # This must be glibc/ELF.
2860 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
2861 version_type=linux # correct to gnu/linux during the next big refactor
2864 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2865 soname_spec='$libname$release$shared_ext$major'
2866 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2867 shlibpath_var=LD_LIBRARY_PATH
2868 shlibpath_overrides_runpath=no
2870 # Some binutils ld are patched to set DT_RUNPATH
2871 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
2872 [lt_cv_shlibpath_overrides_runpath=no
2873 save_LDFLAGS=$LDFLAGS
2875 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2876 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2877 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2878 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2879 [lt_cv_shlibpath_overrides_runpath=yes])])
2880 LDFLAGS=$save_LDFLAGS
2883 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
2885 # This implies no fast_install, which is unacceptable.
2886 # Some rework will be needed to allow for fast_install
2887 # before this can be enabled.
2888 hardcode_into_libs=yes
2890 # Ideally, we could use ldconfig to report *all* directores which are
2891 # searched for libraries, however this is still not possible. Aside from not
2892 # being certain /sbin/ldconfig is available, command
2893 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2894 # even though it is searched at run-time. Try to do the best guess by
2895 # appending ld.so.conf contents (and includes) to the search path.
2896 if test -f /etc/ld.so.conf; then
2897 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' ' '`
2898 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2901 # We used to test for /lib/ld.so.1 and disable shared libraries on
2902 # powerpc, because MkLinux only supported shared libraries with the
2903 # GNU dynamic linker. Since this was broken with cross compilers,
2904 # most powerpc-linux boxes support dynamic linking these days and
2905 # people can always --disable-shared, the test was removed, and we
2906 # assume the GNU/Linux dynamic linker is in use.
2907 dynamic_linker='GNU/Linux ld.so'
2914 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2915 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2916 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2917 dynamic_linker='NetBSD (a.out) ld.so'
2919 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2920 soname_spec='$libname$release$shared_ext$major'
2921 dynamic_linker='NetBSD ld.elf_so'
2923 shlibpath_var=LD_LIBRARY_PATH
2924 shlibpath_overrides_runpath=yes
2925 hardcode_into_libs=yes
2929 version_type=linux # correct to gnu/linux during the next big refactor
2930 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2931 shlibpath_var=LD_LIBRARY_PATH
2932 shlibpath_overrides_runpath=yes
2939 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2940 soname_spec='$libname$release$shared_ext$major'
2941 shlibpath_var=LD_LIBRARY_PATH
2942 shlibpath_overrides_runpath=no
2943 hardcode_into_libs=yes
2944 dynamic_linker='ldqnx.so'
2949 sys_lib_dlsearch_path_spec=/usr/lib
2951 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2956 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
2957 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2958 shlibpath_var=LD_LIBRARY_PATH
2959 shlibpath_overrides_runpath=yes
2963 libname_spec='$name'
2964 version_type=windows
2968 # OS/2 can only load a DLL with a base name of 8 characters or less.
2969 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2970 v=$($ECHO $release$versuffix | tr -d .-);
2971 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2972 $ECHO $n$v`$shared_ext'
2973 library_names_spec='${libname}_dll.$libext'
2974 dynamic_linker='OS/2 ld.exe'
2975 shlibpath_var=BEGINLIBPATH
2976 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2977 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2978 postinstall_cmds='base_file=`basename \$file`~
2979 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2980 dldir=$destdir/`dirname \$dlpath`~
2981 test -d \$dldir || mkdir -p \$dldir~
2982 $install_prog $dir/$dlname \$dldir/$dlname~
2983 chmod a+x \$dldir/$dlname~
2984 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2985 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2987 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
2988 dlpath=$dir/\$dldll~
2992 osf3* | osf4* | osf5*)
2996 soname_spec='$libname$release$shared_ext$major'
2997 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2998 shlibpath_var=LD_LIBRARY_PATH
2999 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3000 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3008 version_type=linux # correct to gnu/linux during the next big refactor
3011 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3012 soname_spec='$libname$release$shared_ext$major'
3013 shlibpath_var=LD_LIBRARY_PATH
3014 shlibpath_overrides_runpath=yes
3015 hardcode_into_libs=yes
3016 # ldd complains unless libraries are executable
3017 postinstall_cmds='chmod +x $lib'
3022 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
3023 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3024 shlibpath_var=LD_LIBRARY_PATH
3025 shlibpath_overrides_runpath=yes
3026 if test yes = "$with_gnu_ld"; then
3033 version_type=linux # correct to gnu/linux during the next big refactor
3034 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3035 soname_spec='$libname$release$shared_ext$major'
3036 shlibpath_var=LD_LIBRARY_PATH
3037 case $host_vendor in
3039 shlibpath_overrides_runpath=no
3041 runpath_var=LD_RUN_PATH
3049 shlibpath_overrides_runpath=no
3050 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3056 if test -d /usr/nec; then
3057 version_type=linux # correct to gnu/linux during the next big refactor
3058 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3059 soname_spec='$libname$shared_ext.$major'
3060 shlibpath_var=LD_LIBRARY_PATH
3064 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3068 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3069 soname_spec='$libname$release$shared_ext$major'
3070 shlibpath_var=LD_LIBRARY_PATH
3071 shlibpath_overrides_runpath=yes
3072 hardcode_into_libs=yes
3073 if test yes = "$with_gnu_ld"; then
3074 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3076 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3079 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3083 sys_lib_dlsearch_path_spec='/usr/lib'
3087 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
3088 version_type=linux # correct to gnu/linux during the next big refactor
3091 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3092 shlibpath_var=LD_LIBRARY_PATH
3093 shlibpath_overrides_runpath=no
3094 hardcode_into_libs=yes
3098 version_type=linux # correct to gnu/linux during the next big refactor
3099 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3100 soname_spec='$libname$release$shared_ext$major'
3101 shlibpath_var=LD_LIBRARY_PATH
3108 AC_MSG_RESULT([$dynamic_linker])
3109 test no = "$dynamic_linker" && can_build_shared=no
3111 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3112 if test yes = "$GCC"; then
3113 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3116 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3117 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
3120 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3121 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
3124 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3125 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3127 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3128 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3130 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3131 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
3133 _LT_DECL([], [variables_saved_for_relink], [1],
3134 [Variables whose values should be saved in libtool wrapper scripts and
3135 restored at link time])
3136 _LT_DECL([], [need_lib_prefix], [0],
3137 [Do we need the "lib" prefix for modules?])
3138 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3139 _LT_DECL([], [version_type], [0], [Library versioning type])
3140 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
3141 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3142 _LT_DECL([], [shlibpath_overrides_runpath], [0],
3143 [Is shlibpath searched before the hard-coded library search path?])
3144 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3145 _LT_DECL([], [library_names_spec], [1],
3146 [[List of archive names. First name is the real one, the rest are links.
3147 The last name is the one that the linker finds with -lNAME]])
3148 _LT_DECL([], [soname_spec], [1],
3149 [[The coded name of the library, if different from the real name]])
3150 _LT_DECL([], [install_override_mode], [1],
3151 [Permission mode override for installation of shared libraries])
3152 _LT_DECL([], [postinstall_cmds], [2],
3153 [Command to use after installation of a shared archive])
3154 _LT_DECL([], [postuninstall_cmds], [2],
3155 [Command to use after uninstallation of a shared archive])
3156 _LT_DECL([], [finish_cmds], [2],
3157 [Commands used to finish a libtool library installation in a directory])
3158 _LT_DECL([], [finish_eval], [1],
3159 [[As "finish_cmds", except a single script fragment to be evaled but
3161 _LT_DECL([], [hardcode_into_libs], [0],
3162 [Whether we should hardcode library paths into libraries])
3163 _LT_DECL([], [sys_lib_search_path_spec], [2],
3164 [Compile-time system search path for libraries])
3165 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3166 [Detected run-time system search path for libraries])
3167 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
3168 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
3169 ])# _LT_SYS_DYNAMIC_LINKER
3172 # _LT_PATH_TOOL_PREFIX(TOOL)
3173 # --------------------------
3174 # find a file program that can recognize shared library
3175 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3176 [m4_require([_LT_DECL_EGREP])dnl
3177 AC_MSG_CHECKING([for $1])
3178 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3180 [[\\/*] | ?:[\\/]*])
3181 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
3184 lt_save_MAGIC_CMD=$MAGIC_CMD
3185 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3186 dnl $ac_dummy forces splitting on constant user-supplied paths.
3187 dnl POSIX.2 word splitting is done only on the output of word expansions,
3188 dnl not every word. This closes a longstanding sh security hole.
3189 ac_dummy="m4_if([$2], , $PATH, [$2])"
3190 for ac_dir in $ac_dummy; do
3192 test -z "$ac_dir" && ac_dir=.
3193 if test -f "$ac_dir/$1"; then
3194 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
3195 if test -n "$file_magic_test_file"; then
3196 case $deplibs_check_method in
3198 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3199 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3200 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3201 $EGREP "$file_magic_regex" > /dev/null; then
3206 *** Warning: the command libtool uses to detect shared libraries,
3207 *** $file_magic_cmd, produces output that libtool cannot recognize.
3208 *** The result is that libtool may fail to recognize shared libraries
3209 *** as such. This will affect the creation of libtool libraries that
3210 *** depend on shared libraries, but programs linked with such libtool
3211 *** libraries will work regardless of this problem. Nevertheless, you
3212 *** may want to report the problem to your system manager and/or to
3213 *** bug-libtool@gnu.org
3223 MAGIC_CMD=$lt_save_MAGIC_CMD
3226 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
3227 if test -n "$MAGIC_CMD"; then
3228 AC_MSG_RESULT($MAGIC_CMD)
3232 _LT_DECL([], [MAGIC_CMD], [0],
3233 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3234 ])# _LT_PATH_TOOL_PREFIX
3237 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3238 dnl aclocal-1.4 backwards compatibility:
3239 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3244 # find a file program that can recognize a shared library
3245 m4_defun([_LT_PATH_MAGIC],
3246 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3247 if test -z "$lt_cv_path_MAGIC_CMD"; then
3248 if test -n "$ac_tool_prefix"; then
3249 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3259 # find the pathname to the GNU or non-GNU linker
3260 AC_DEFUN([LT_PATH_LD],
3261 [AC_REQUIRE([AC_PROG_CC])dnl
3262 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3263 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3264 m4_require([_LT_DECL_SED])dnl
3265 m4_require([_LT_DECL_EGREP])dnl
3266 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3268 AC_ARG_WITH([gnu-ld],
3269 [AS_HELP_STRING([--with-gnu-ld],
3270 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3271 [test no = "$withval" || with_gnu_ld=yes],
3272 [with_gnu_ld=no])dnl
3275 if test yes = "$GCC"; then
3276 # Check if gcc -print-prog-name=ld gives a path.
3277 AC_MSG_CHECKING([for ld used by $CC])
3280 # gcc leaves a trailing carriage return, which upsets mingw
3281 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3283 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3286 # Accept absolute paths.
3287 [[\\/]]* | ?:[[\\/]]*)
3288 re_direlt='/[[^/]][[^/]]*/\.\./'
3289 # Canonicalize the pathname of ld
3290 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
3291 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
3292 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
3294 test -z "$LD" && LD=$ac_prog
3297 # If it fails, then pretend we aren't using GCC.
3301 # If it is relative, then search for the first ld in PATH.
3305 elif test yes = "$with_gnu_ld"; then
3306 AC_MSG_CHECKING([for GNU ld])
3308 AC_MSG_CHECKING([for non-GNU ld])
3310 AC_CACHE_VAL(lt_cv_path_LD,
3311 [if test -z "$LD"; then
3312 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3313 for ac_dir in $PATH; do
3315 test -z "$ac_dir" && ac_dir=.
3316 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3317 lt_cv_path_LD=$ac_dir/$ac_prog
3318 # Check to see if the program is GNU ld. I'd rather use --version,
3319 # but apparently some variants of GNU ld only accept -v.
3320 # Break only if it was the GNU/non-GNU ld that we prefer.
3321 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3322 *GNU* | *'with BFD'*)
3323 test no != "$with_gnu_ld" && break
3326 test yes != "$with_gnu_ld" && break
3333 lt_cv_path_LD=$LD # Let the user override the test with a path.
3336 if test -n "$LD"; then
3341 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3345 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
3349 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
3350 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
3351 dnl aclocal-1.4 backwards compatibility:
3352 dnl AC_DEFUN([AM_PROG_LD], [])
3353 dnl AC_DEFUN([AC_PROG_LD], [])
3358 m4_defun([_LT_PATH_LD_GNU],
3359 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3360 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3361 case `$LD -v 2>&1 </dev/null` in
3362 *GNU* | *'with BFD'*)
3363 lt_cv_prog_gnu_ld=yes
3366 lt_cv_prog_gnu_ld=no
3369 with_gnu_ld=$lt_cv_prog_gnu_ld
3375 # find reload flag for linker
3376 # -- PORTME Some linkers may need a different reload flag.
3377 m4_defun([_LT_CMD_RELOAD],
3378 [AC_CACHE_CHECK([for $LD option to reload object files],
3379 lt_cv_ld_reload_flag,
3380 [lt_cv_ld_reload_flag='-r'])
3381 reload_flag=$lt_cv_ld_reload_flag
3382 case $reload_flag in
3384 *) reload_flag=" $reload_flag" ;;
3386 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3388 cygwin* | mingw* | pw32* | cegcc*)
3389 if test yes != "$GCC"; then
3394 if test yes = "$GCC"; then
3395 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
3397 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3401 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
3402 _LT_TAGDECL([], [reload_cmds], [2])dnl
3409 m4_defun([_LT_PATH_DD],
3410 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3411 [printf 0123456789abcdef0123456789abcdef >conftest.i
3412 cat conftest.i conftest.i >conftest2.i
3414 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3415 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3416 cmp -s conftest.i conftest.out \
3417 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3419 rm -f conftest.i conftest2.i conftest.out])
3425 # find command to truncate a binary pipe
3426 m4_defun([_LT_CMD_TRUNCATE],
3427 [m4_require([_LT_PATH_DD])
3428 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3429 [printf 0123456789abcdef0123456789abcdef >conftest.i
3430 cat conftest.i conftest.i >conftest2.i
3432 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3433 cmp -s conftest.i conftest.out \
3434 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3436 rm -f conftest.i conftest2.i conftest.out
3437 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3438 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3439 [Command to truncate a binary pipe])
3440 ])# _LT_CMD_TRUNCATE
3443 # _LT_CHECK_MAGIC_METHOD
3444 # ----------------------
3445 # how to check for library dependencies
3446 # -- PORTME fill in with the dynamic library characteristics
3447 m4_defun([_LT_CHECK_MAGIC_METHOD],
3448 [m4_require([_LT_DECL_EGREP])
3449 m4_require([_LT_DECL_OBJDUMP])
3450 AC_CACHE_CHECK([how to recognize dependent libraries],
3451 lt_cv_deplibs_check_method,
3452 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3453 lt_cv_file_magic_test_file=
3454 lt_cv_deplibs_check_method='unknown'
3455 # Need to set the preceding variable on all platforms that support
3456 # interlibrary dependencies.
3457 # 'none' -- dependencies not supported.
3458 # 'unknown' -- same as none, but documents that we really don't know.
3459 # 'pass_all' -- all dependencies passed with no checks.
3460 # 'test_compile' -- check by making test program.
3461 # 'file_magic [[regex]]' -- check by looking for files in library path
3462 # that responds to the $file_magic_cmd with a given extended regex.
3463 # If you have 'file' or equivalent on your system and you're not sure
3464 # whether 'pass_all' will *always* work, you probably want this one.
3468 lt_cv_deplibs_check_method=pass_all
3472 lt_cv_deplibs_check_method=pass_all
3476 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3477 lt_cv_file_magic_cmd='$FILECMD -L'
3478 lt_cv_file_magic_test_file=/shlib/libc.so
3482 # func_win32_libid is a shell function defined in ltmain.sh
3483 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3484 lt_cv_file_magic_cmd='func_win32_libid'
3488 # Base MSYS/MinGW do not provide the 'file' command needed by
3489 # func_win32_libid shell function, so use a weaker test based on 'objdump',
3490 # unless we find 'file', for example because we are cross-compiling.
3491 if ( file / ) >/dev/null 2>&1; then
3492 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3493 lt_cv_file_magic_cmd='func_win32_libid'
3495 # Keep this pattern in sync with the one in func_win32_libid.
3496 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
3497 lt_cv_file_magic_cmd='$OBJDUMP -f'
3502 # use the weaker test based on 'objdump'. See mingw*.
3503 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
3504 lt_cv_file_magic_cmd='$OBJDUMP -f'
3507 darwin* | rhapsody*)
3508 lt_cv_deplibs_check_method=pass_all
3511 freebsd* | dragonfly* | midnightbsd*)
3512 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3515 # Not sure whether the presence of OpenBSD here was a mistake.
3516 # Let's accept both of them until this is cleared up.
3517 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3518 lt_cv_file_magic_cmd=$FILECMD
3519 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3523 lt_cv_deplibs_check_method=pass_all
3528 lt_cv_deplibs_check_method=pass_all
3531 hpux10.20* | hpux11*)
3532 lt_cv_file_magic_cmd=$FILECMD
3535 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3536 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3539 [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]']
3540 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3543 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
3544 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3550 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3551 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3554 irix5* | irix6* | nonstopux*)
3556 *-32|*"-32 ") libmagic=32-bit;;
3557 *-n32|*"-n32 ") libmagic=N32;;
3558 *-64|*"-64 ") libmagic=64-bit;;
3559 *) libmagic=never-match;;
3561 lt_cv_deplibs_check_method=pass_all
3564 # This must be glibc/ELF.
3565 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3566 lt_cv_deplibs_check_method=pass_all
3570 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3571 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3573 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3578 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3579 lt_cv_file_magic_cmd=$FILECMD
3580 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3584 lt_cv_deplibs_check_method=pass_all
3588 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
3589 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3591 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3595 osf3* | osf4* | osf5*)
3596 lt_cv_deplibs_check_method=pass_all
3600 lt_cv_deplibs_check_method=pass_all
3604 lt_cv_deplibs_check_method=pass_all
3607 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3608 lt_cv_deplibs_check_method=pass_all
3612 case $host_vendor in
3614 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]]'
3615 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3618 lt_cv_deplibs_check_method=pass_all
3621 lt_cv_file_magic_cmd='/bin/file'
3622 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3625 lt_cv_file_magic_cmd='/bin/file'
3626 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3627 lt_cv_file_magic_test_file=/lib/libc.so
3630 lt_cv_deplibs_check_method=pass_all
3633 lt_cv_deplibs_check_method=pass_all
3639 lt_cv_deplibs_check_method=pass_all
3642 lt_cv_deplibs_check_method=pass_all
3649 if test "$build" = "$host"; then
3652 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
3655 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
3661 file_magic_cmd=$lt_cv_file_magic_cmd
3662 deplibs_check_method=$lt_cv_deplibs_check_method
3663 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3665 _LT_DECL([], [deplibs_check_method], [1],
3666 [Method to check whether dependent libraries are shared objects])
3667 _LT_DECL([], [file_magic_cmd], [1],
3668 [Command to use when deplibs_check_method = "file_magic"])
3669 _LT_DECL([], [file_magic_glob], [1],
3670 [How to find potential files when deplibs_check_method = "file_magic"])
3671 _LT_DECL([], [want_nocaseglob], [1],
3672 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
3673 ])# _LT_CHECK_MAGIC_METHOD
3678 # find the pathname to a BSD- or MS-compatible name lister
3679 AC_DEFUN([LT_PATH_NM],
3680 [AC_REQUIRE([AC_PROG_CC])dnl
3681 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3682 [if test -n "$NM"; then
3683 # Let the user override the test.
3686 lt_nm_to_check=${ac_tool_prefix}nm
3687 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3688 lt_nm_to_check="$lt_nm_to_check nm"
3690 for lt_tmp_nm in $lt_nm_to_check; do
3691 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
3692 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3694 test -z "$ac_dir" && ac_dir=.
3695 tmp_nm=$ac_dir/$lt_tmp_nm
3696 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
3697 # Check to see if the nm accepts a BSD-compat flag.
3698 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
3699 # nm: unknown option "B" ignored
3700 # Tru64's nm complains that /dev/null is an invalid object file
3701 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3703 mingw*) lt_bad_file=conftest.nm/nofile ;;
3704 *) lt_bad_file=/dev/null ;;
3706 case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
3707 *$lt_bad_file* | *'Invalid file or object type'*)
3708 lt_cv_path_NM="$tmp_nm -B"
3712 case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
3714 lt_cv_path_NM="$tmp_nm -p"
3718 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3719 continue # so that we can try to find one that supports BSD flags
3728 : ${lt_cv_path_NM=no}
3730 if test no != "$lt_cv_path_NM"; then
3733 # Didn't find any BSD compatible name lister, look for dumpbin.
3734 if test -n "$DUMPBIN"; then :
3735 # Let the user override the test.
3737 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3738 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
3740 DUMPBIN="$DUMPBIN -symbols -headers"
3748 if test : != "$DUMPBIN"; then
3752 test -z "$NM" && NM=nm
3754 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3756 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3757 [lt_cv_nm_interface="BSD nm"
3758 echo "int some_variable = 0;" > conftest.$ac_ext
3759 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3760 (eval "$ac_compile" 2>conftest.err)
3761 cat conftest.err >&AS_MESSAGE_LOG_FD
3762 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3763 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3764 cat conftest.err >&AS_MESSAGE_LOG_FD
3765 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
3766 cat conftest.out >&AS_MESSAGE_LOG_FD
3767 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3768 lt_cv_nm_interface="MS dumpbin"
3774 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3775 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3776 dnl aclocal-1.4 backwards compatibility:
3777 dnl AC_DEFUN([AM_PROG_NM], [])
3778 dnl AC_DEFUN([AC_PROG_NM], [])
3780 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3781 # --------------------------------
3782 # how to determine the name of the shared library
3783 # associated with a specific link library.
3784 # -- PORTME fill in with the dynamic library characteristics
3785 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
3786 [m4_require([_LT_DECL_EGREP])
3787 m4_require([_LT_DECL_OBJDUMP])
3788 m4_require([_LT_DECL_DLLTOOL])
3789 AC_CACHE_CHECK([how to associate runtime and link libraries],
3790 lt_cv_sharedlib_from_linklib_cmd,
3791 [lt_cv_sharedlib_from_linklib_cmd='unknown'
3794 cygwin* | mingw* | pw32* | cegcc*)
3795 # two different shell functions defined in ltmain.sh;
3796 # decide which one to use based on capabilities of $DLLTOOL
3797 case `$DLLTOOL --help 2>&1` in
3798 *--identify-strict*)
3799 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
3802 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
3807 # fallback: assume linklib IS sharedlib
3808 lt_cv_sharedlib_from_linklib_cmd=$ECHO
3812 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
3813 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
3815 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
3816 [Command to associate shared and link libraries])
3817 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
3820 # _LT_PATH_MANIFEST_TOOL
3821 # ----------------------
3822 # locate the manifest tool
3823 m4_defun([_LT_PATH_MANIFEST_TOOL],
3824 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
3825 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
3826 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
3827 [lt_cv_path_mainfest_tool=no
3828 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
3829 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
3830 cat conftest.err >&AS_MESSAGE_LOG_FD
3831 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
3832 lt_cv_path_mainfest_tool=yes
3835 if test yes != "$lt_cv_path_mainfest_tool"; then
3838 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
3839 ])# _LT_PATH_MANIFEST_TOOL
3842 # _LT_DLL_DEF_P([FILE])
3843 # ---------------------
3844 # True iff FILE is a Windows DLL '.def' file.
3845 # Keep in sync with func_dll_def_p in the libtool script
3846 AC_DEFUN([_LT_DLL_DEF_P],
3848 test DEF = "`$SED -n dnl
3849 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
3850 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
3851 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
3852 -e q dnl Only consider the first "real" line
3859 # check for math library
3860 AC_DEFUN([LT_LIB_M],
3861 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3864 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
3865 # These system don't have libm, or don't need it
3868 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
3869 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3872 AC_CHECK_LIB(m, cos, LIBM=-lm)
3879 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3880 dnl aclocal-1.4 backwards compatibility:
3881 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3884 # _LT_COMPILER_NO_RTTI([TAGNAME])
3885 # -------------------------------
3886 m4_defun([_LT_COMPILER_NO_RTTI],
3887 [m4_require([_LT_TAG_COMPILER])dnl
3889 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3891 if test yes = "$GCC"; then
3892 case $cc_basename in
3894 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
3896 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
3899 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3900 lt_cv_prog_compiler_rtti_exceptions,
3901 [-fno-rtti -fno-exceptions], [],
3902 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3904 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3905 [Compiler flag to turn off builtin functions])
3906 ])# _LT_COMPILER_NO_RTTI
3909 # _LT_CMD_GLOBAL_SYMBOLS
3910 # ----------------------
3911 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3912 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3913 AC_REQUIRE([AC_PROG_CC])dnl
3914 AC_REQUIRE([AC_PROG_AWK])dnl
3915 AC_REQUIRE([LT_PATH_NM])dnl
3916 AC_REQUIRE([LT_PATH_LD])dnl
3917 m4_require([_LT_DECL_SED])dnl
3918 m4_require([_LT_DECL_EGREP])dnl
3919 m4_require([_LT_TAG_COMPILER])dnl
3921 # Check for command to grab the raw symbol name followed by C symbol from nm.
3922 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3923 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3925 # These are sane defaults that work on at least a few old systems.
3926 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3928 # Character class describing NM global symbol codes.
3929 symcode='[[BCDEGRST]]'
3931 # Regexp to match symbols that can be accessed directly from C.
3932 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3934 # Define system-specific variables.
3939 cygwin* | mingw* | pw32* | cegcc*)
3940 symcode='[[ABCDGISTW]]'
3943 if test ia64 = "$host_cpu"; then
3944 symcode='[[ABCDEGRST]]'
3948 symcode='[[BCDEGRST]]'
3951 symcode='[[BCDEGQRST]]'
3962 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3966 symcode='[[DFNSTU]]'
3970 # If we're using GNU nm, then use its standard symbol codes.
3971 case `$NM -V 2>&1` in
3972 *GNU* | *'with BFD'*)
3973 symcode='[[ABCDGIRSTW]]' ;;
3976 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3977 # Gets list of data symbols to import.
3978 lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
3979 # Adjust the below global symbol transforms to fixup imported variables.
3980 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
3981 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
3982 lt_c_name_lib_hook="\
3983 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
3984 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
3986 # Disable hooks by default.
3987 lt_cv_sys_global_symbol_to_import=
3993 # Transform an extracted symbol line into a proper C declaration.
3994 # Some systems (esp. on ia64) link data and code symbols differently,
3995 # so use this general approach.
3996 lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
3998 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
3999 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
4001 # Transform an extracted symbol line into symbol name and symbol address
4002 lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
4004 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
4005 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
4007 # Transform an extracted symbol line into symbol name with lib prefix and
4009 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
4010 $lt_c_name_lib_hook\
4011 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
4012 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
4013 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
4015 # Handle CRLF in mingw tool chain
4019 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4023 # Try without a prefix underscore, then with it.
4024 for ac_symprfx in "" "_"; do
4026 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4027 symxfrm="\\1 $ac_symprfx\\2 \\2"
4029 # Write the raw and C identifiers.
4030 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4031 # Fake it for dumpbin and say T for any non-static function,
4032 # D for any global variable and I for any imported variable.
4033 # Also find C++ and __fastcall symbols from MSVC++ or ICC,
4034 # which start with @ or ?.
4035 lt_cv_sys_global_symbol_pipe="$AWK ['"\
4036 " {last_section=section; section=\$ 3};"\
4037 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4038 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4039 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4040 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4041 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
4042 " \$ 0!~/External *\|/{next};"\
4043 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4044 " {if(hide[section]) next};"\
4045 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4046 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4047 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4048 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
4049 " ' prfx=^$ac_symprfx]"
4051 lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4053 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
4055 # Check to see that the pipe works correctly.
4059 cat > conftest.$ac_ext <<_LT_EOF
4064 void nm_test_func(void);
4065 void nm_test_func(void){}
4069 int main(){nm_test_var='a';nm_test_func();return(0);}
4072 if AC_TRY_EVAL(ac_compile); then
4073 # Now try to grab the symbols.
4075 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4076 # Try sorting and uniquifying the output.
4077 if sort "$nlist" | uniq > "$nlist"T; then
4078 mv -f "$nlist"T "$nlist"
4083 # Make sure that we snagged all the symbols we need.
4084 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4085 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4086 cat <<_LT_EOF > conftest.$ac_ext
4087 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
4088 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4089 /* DATA imports from DLLs on WIN32 can't be const, because runtime
4090 relocations are performed -- see ld's documentation on pseudo-relocs. */
4091 # define LT@&t@_DLSYM_CONST
4092 #elif defined __osf__
4093 /* This system does not cope well with relocations in const data. */
4094 # define LT@&t@_DLSYM_CONST
4096 # define LT@&t@_DLSYM_CONST const
4104 # Now generate the symbol file.
4105 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4107 cat <<_LT_EOF >> conftest.$ac_ext
4109 /* The mapping between symbol names and symbols. */
4110 LT@&t@_DLSYM_CONST struct {
4114 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4116 { "@PROGRAM@", (void *) 0 },
4118 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4119 cat <<\_LT_EOF >> conftest.$ac_ext
4123 /* This works around a problem in FreeBSD linker */
4124 #ifdef FREEBSD_WORKAROUND
4125 static const void *lt_preloaded_setup() {
4126 return lt__PROGRAM__LTX_preloaded_symbols;
4134 # Now try linking the two files.
4135 mv conftest.$ac_objext conftstm.$ac_objext
4136 lt_globsym_save_LIBS=$LIBS
4137 lt_globsym_save_CFLAGS=$CFLAGS
4138 LIBS=conftstm.$ac_objext
4139 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4140 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
4143 LIBS=$lt_globsym_save_LIBS
4144 CFLAGS=$lt_globsym_save_CFLAGS
4146 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4149 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4152 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4155 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4156 cat conftest.$ac_ext >&5
4158 rm -rf conftest* conftst*
4160 # Do not use the global_symbol_pipe unless it works.
4161 if test yes = "$pipe_works"; then
4164 lt_cv_sys_global_symbol_pipe=
4168 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4169 lt_cv_sys_global_symbol_to_cdecl=
4171 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4172 AC_MSG_RESULT(failed)
4177 # Response file support.
4178 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4179 nm_file_list_spec='@'
4180 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4181 nm_file_list_spec='@'
4184 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4185 [Take the output of nm and produce a listing of raw symbols and C names])
4186 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4187 [Transform the output of nm in a proper C declaration])
4188 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4189 [Transform the output of nm into a list of symbols to manually relocate])
4190 _LT_DECL([global_symbol_to_c_name_address],
4191 [lt_cv_sys_global_symbol_to_c_name_address], [1],
4192 [Transform the output of nm in a C name address pair])
4193 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4194 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4195 [Transform the output of nm in a C name address pair when lib prefix is needed])
4196 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4197 [The name lister interface])
4198 _LT_DECL([], [nm_file_list_spec], [1],
4199 [Specify filename containing input files for $NM])
4200 ]) # _LT_CMD_GLOBAL_SYMBOLS
4203 # _LT_COMPILER_PIC([TAGNAME])
4204 # ---------------------------
4205 m4_defun([_LT_COMPILER_PIC],
4206 [m4_require([_LT_TAG_COMPILER])dnl
4207 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4208 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4209 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4211 m4_if([$1], [CXX], [
4212 # C++ specific cases for pic, static, wl, etc.
4213 if test yes = "$GXX"; then
4214 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4215 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4219 # All AIX code is PIC.
4220 if test ia64 = "$host_cpu"; then
4221 # AIX 5 now supports IA64 processor
4222 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4224 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4230 # see comment about AmigaOS4 .so support
4231 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4234 # FIXME: we need at least 68020 code to build shared libraries, but
4235 # adding the '-m68020' flag to GCC prevents building anything better,
4237 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4242 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4243 # PIC is the default for these OSes.
4245 mingw* | cygwin* | os2* | pw32* | cegcc*)
4246 # This hack is so that the source file can tell whether it is being
4247 # built for inclusion in a dll (and should export symbols for example).
4248 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4249 # (--disable-auto-import) libraries
4250 m4_if([$1], [GCJ], [],
4251 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4254 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4258 darwin* | rhapsody*)
4259 # PIC is the default on this platform
4260 # Common symbols not allowed in MH_DYLIB files
4261 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4264 # DJGPP does not support shared libraries at all
4265 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4268 # PIC is the default for Haiku.
4269 # The "-static" flag exists, but is broken.
4270 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4273 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4274 # Instead, we relocate shared libraries at runtime.
4277 if test -d /usr/nec; then
4278 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4282 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4283 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4284 # sets the default TLS model and affects inlining.
4289 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4294 # QNX uses GNU C++, but need to define -shared option too, otherwise
4296 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4299 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4305 # All AIX code is PIC.
4306 if test ia64 = "$host_cpu"; then
4307 # AIX 5 now supports IA64 processor
4308 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4310 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4314 case $cc_basename in
4316 # Green Hills C++ Compiler
4317 # _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"
4321 mingw* | cygwin* | os2* | pw32* | cegcc*)
4322 # This hack is so that the source file can tell whether it is being
4323 # built for inclusion in a dll (and should export symbols for example).
4324 m4_if([$1], [GCJ], [],
4325 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4328 case $cc_basename in
4330 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4333 # Green Hills C++ Compiler
4334 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4340 freebsd* | dragonfly* | midnightbsd*)
4341 # FreeBSD uses GNU C++
4343 hpux9* | hpux10* | hpux11*)
4344 case $cc_basename in
4346 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4347 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4348 if test ia64 != "$host_cpu"; then
4349 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4353 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4354 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4360 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4369 # This is c89, which is MS Visual C++ (no shared libs)
4370 # Anyone wants to do a port?
4372 irix5* | irix6* | nonstopux*)
4373 case $cc_basename in
4375 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4376 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4377 # CC pic flag -KPIC is the default.
4383 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4384 case $cc_basename in
4387 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4388 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4391 # old Intel C++ for x86_64, which still supported -KPIC.
4392 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4393 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4394 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4397 # Intel C++, used to be incompatible with GCC.
4398 # ICC 10 doesn't accept -KPIC any more.
4399 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4400 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4401 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4404 # Portland Group C++ compiler
4405 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4406 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4407 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4411 # Make sure the PIC flag is empty. It appears that all Alpha
4412 # Linux and Compaq Tru64 Unix objects are PIC.
4413 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4414 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4416 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
4417 # IBM XL 8.0, 9.0 on PPC and BlueGene
4418 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4419 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4420 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4423 case `$CC -V 2>&1 | $SED 5q` in
4426 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4427 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4428 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4439 case $cc_basename in
4441 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4450 # QNX uses GNU C++, but need to define -shared option too, otherwise
4452 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4454 osf3* | osf4* | osf5*)
4455 case $cc_basename in
4457 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4460 # Rational C++ 2.4.1
4461 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4464 # Digital/Compaq C++
4465 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4466 # Make sure the PIC flag is empty. It appears that all Alpha
4467 # Linux and Compaq Tru64 Unix objects are PIC.
4468 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4469 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4478 case $cc_basename in
4480 # Sun C++ 4.2, 5.x and Centerline C++
4481 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4482 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4483 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4486 # Green Hills C++ Compiler
4487 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4494 case $cc_basename in
4497 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4498 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4502 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4508 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4509 case $cc_basename in
4511 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4512 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4513 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4518 case $cc_basename in
4520 # NonStop-UX NCC 3.20
4521 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4530 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4536 if test yes = "$GCC"; then
4537 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4538 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4542 # All AIX code is PIC.
4543 if test ia64 = "$host_cpu"; then
4544 # AIX 5 now supports IA64 processor
4545 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4547 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4553 # see comment about AmigaOS4 .so support
4554 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4557 # FIXME: we need at least 68020 code to build shared libraries, but
4558 # adding the '-m68020' flag to GCC prevents building anything better,
4560 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4565 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4566 # PIC is the default for these OSes.
4569 mingw* | cygwin* | pw32* | os2* | cegcc*)
4570 # This hack is so that the source file can tell whether it is being
4571 # built for inclusion in a dll (and should export symbols for example).
4572 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4573 # (--disable-auto-import) libraries
4574 m4_if([$1], [GCJ], [],
4575 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4578 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4583 darwin* | rhapsody*)
4584 # PIC is the default on this platform
4585 # Common symbols not allowed in MH_DYLIB files
4586 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4590 # PIC is the default for Haiku.
4591 # The "-static" flag exists, but is broken.
4592 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4596 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4597 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4598 # sets the default TLS model and affects inlining.
4604 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4610 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4611 # Instead, we relocate shared libraries at runtime.
4615 # Just because we use GCC doesn't mean we suddenly get shared libraries
4616 # on systems that don't support them.
4617 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4622 # QNX uses GNU C++, but need to define -shared option too, otherwise
4624 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4628 if test -d /usr/nec; then
4629 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4634 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4638 case $cc_basename in
4639 nvcc*) # Cuda Compiler Driver 2.2
4640 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
4641 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4642 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
4647 # PORTME Check for flag to pass linker flags through the system compiler.
4650 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4651 if test ia64 = "$host_cpu"; then
4652 # AIX 5 now supports IA64 processor
4653 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4655 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4659 darwin* | rhapsody*)
4660 # PIC is the default on this platform
4661 # Common symbols not allowed in MH_DYLIB files
4662 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4663 case $cc_basename in
4665 # NAG Fortran compiler
4666 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4667 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4668 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4673 mingw* | cygwin* | pw32* | os2* | cegcc*)
4674 # This hack is so that the source file can tell whether it is being
4675 # built for inclusion in a dll (and should export symbols for example).
4676 m4_if([$1], [GCJ], [],
4677 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4680 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4685 hpux9* | hpux10* | hpux11*)
4686 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4687 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4694 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4697 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4698 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4701 irix5* | irix6* | nonstopux*)
4702 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4703 # PIC (with -KPIC) is the default.
4704 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4707 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4708 case $cc_basename in
4709 # old Intel for x86_64, which still supported -KPIC.
4711 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4712 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4713 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4715 # icc used to be incompatible with GCC.
4716 # ICC 10 doesn't accept -KPIC any more.
4718 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4719 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4720 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4722 # Lahey Fortran 8.1.
4724 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4725 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
4726 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
4729 # NAG Fortran compiler
4730 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4731 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4732 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4735 # Fabrice Bellard et al's Tiny C Compiler
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)='-static'
4740 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
4741 # Portland Group compilers (*not* the Pentium gcc compiler,
4742 # which looks to be a dead project)
4743 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4744 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4745 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4748 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4749 # All Alpha code is PIC.
4750 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4752 xl* | bgxl* | bgf* | mpixl*)
4753 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
4754 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4755 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
4756 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
4759 case `$CC -V 2>&1 | $SED 5q` in
4760 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
4761 # Sun Fortran 8.3 passes all unrecognized flags to the linker
4762 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4763 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4764 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
4766 *Sun\ F* | *Sun*Fortran*)
4767 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4768 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4769 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4773 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4774 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4775 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4777 *Intel*\ [[CF]]*Compiler*)
4778 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4779 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4780 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4783 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4784 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4785 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4793 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4794 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4798 # QNX uses GNU C++, but need to define -shared option too, otherwise
4800 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4803 osf3* | osf4* | osf5*)
4804 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4805 # All OSF/1 code is PIC.
4806 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4810 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4814 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4815 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4816 case $cc_basename in
4817 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
4818 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4820 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4825 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4826 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4827 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4830 sysv4 | sysv4.2uw2* | sysv4.3*)
4831 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4832 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4833 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4837 if test -d /usr/nec; then
4838 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4839 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4843 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4844 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4845 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4846 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4850 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4851 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4855 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4856 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4860 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4866 # For platforms that do not support PIC, -DPIC is meaningless:
4868 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4871 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4875 AC_CACHE_CHECK([for $compiler option to produce PIC],
4876 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
4877 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4878 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
4881 # Check to make sure the PIC flag actually works.
4883 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4884 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4885 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4886 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4887 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4889 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4891 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4892 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4894 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4895 [Additional compiler flags for building library objects])
4897 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4898 [How to pass a linker flag through the compiler])
4900 # Check to make sure the static flag actually works.
4902 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4903 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4904 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4905 $lt_tmp_static_flag,
4907 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4908 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4909 [Compiler flag to prevent dynamic linking])
4910 ])# _LT_COMPILER_PIC
4913 # _LT_LINKER_SHLIBS([TAGNAME])
4914 # ----------------------------
4915 # See if the linker supports building shared libraries.
4916 m4_defun([_LT_LINKER_SHLIBS],
4917 [AC_REQUIRE([LT_PATH_LD])dnl
4918 AC_REQUIRE([LT_PATH_NM])dnl
4919 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
4920 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4921 m4_require([_LT_DECL_EGREP])dnl
4922 m4_require([_LT_DECL_SED])dnl
4923 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4924 m4_require([_LT_TAG_COMPILER])dnl
4925 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4926 m4_if([$1], [CXX], [
4927 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4928 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4931 # If we're using GNU nm, then we don't want the "-C" option.
4932 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4933 # Without the "-l" option, or with the "-B" option, AIX nm treats
4934 # weak defined symbols like other global defined symbols, whereas
4935 # GNU nm marks them as "W".
4936 # While the 'weak' keyword is ignored in the Export File, we need
4937 # it in the Import File for the 'aix-soname' feature, so we have
4938 # to replace the "-B" option with "-P" for AIX nm.
4939 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4940 _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'
4942 _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 == "L") || (\$ 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'
4946 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
4948 cygwin* | mingw* | cegcc*)
4949 case $cc_basename in
4951 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
4954 _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'
4955 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
4960 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4965 _LT_TAGVAR(allow_undefined_flag, $1)=
4966 _LT_TAGVAR(always_export_symbols, $1)=no
4967 _LT_TAGVAR(archive_cmds, $1)=
4968 _LT_TAGVAR(archive_expsym_cmds, $1)=
4969 _LT_TAGVAR(compiler_needs_object, $1)=no
4970 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4971 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4972 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4973 _LT_TAGVAR(hardcode_automatic, $1)=no
4974 _LT_TAGVAR(hardcode_direct, $1)=no
4975 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4976 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4977 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4978 _LT_TAGVAR(hardcode_minus_L, $1)=no
4979 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4980 _LT_TAGVAR(inherit_rpath, $1)=no
4981 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4982 _LT_TAGVAR(module_cmds, $1)=
4983 _LT_TAGVAR(module_expsym_cmds, $1)=
4984 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4985 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4986 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4987 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4988 # include_expsyms should be a list of space-separated symbols to be *always*
4989 # included in the symbol list
4990 _LT_TAGVAR(include_expsyms, $1)=
4991 # exclude_expsyms can be an extended regexp of symbols to exclude
4992 # it will be wrapped by ' (' and ')$', so one must not match beginning or
4993 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
4994 # as well as any symbol that contains 'd'.
4995 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4996 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4997 # platforms (ab)use it in PIC code, but their linkers get confused if
4998 # the symbol is explicitly referenced. Since portable code cannot
4999 # rely on this symbol name, it's probably fine to never include it in
5000 # preloaded symbol tables.
5001 # Exclude shared library initialization/finalization symbols.
5002 dnl Note also adjust exclude_expsyms for C++ above.
5003 extract_expsyms_cmds=
5006 cygwin* | mingw* | pw32* | cegcc*)
5007 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
5008 # When not using gcc, we currently assume that we are using
5009 # Microsoft Visual C++ or Intel C++ Compiler.
5010 if test yes != "$GCC"; then
5015 # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
5023 _LT_TAGVAR(ld_shlibs, $1)=yes
5025 # On some targets, GNU ld is compatible enough with the native linker
5026 # that we're better off using the native interface for both.
5027 lt_use_gnu_ld_interface=no
5028 if test yes = "$with_gnu_ld"; then
5031 # The AIX port of GNU ld has always aspired to compatibility
5032 # with the native linker. However, as the warning in the GNU ld
5033 # block says, versions before 2.19.5* couldn't really create working
5034 # shared libraries, regardless of the interface used.
5035 case `$LD -v 2>&1` in
5036 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5037 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5038 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5040 lt_use_gnu_ld_interface=yes
5045 lt_use_gnu_ld_interface=yes
5050 if test yes = "$lt_use_gnu_ld_interface"; then
5051 # If archive_cmds runs LD, not CC, wlarc should be empty
5054 # Set some defaults for GNU ld with shared library support. These
5055 # are reset later if shared libraries are not supported. Putting them
5056 # here allows them to be overridden if necessary.
5057 runpath_var=LD_RUN_PATH
5058 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5059 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
5060 # ancient GNU ld didn't support --whole-archive et. al.
5061 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5062 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
5064 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5066 supports_anon_versioning=no
5067 case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
5068 *GNU\ gold*) supports_anon_versioning=yes ;;
5069 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5070 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5071 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5072 *\ 2.11.*) ;; # other 2.11 versions
5073 *) supports_anon_versioning=yes ;;
5076 # See if GNU ld supports shared libraries.
5079 # On AIX/PPC, the GNU linker is very broken
5080 if test ia64 != "$host_cpu"; then
5081 _LT_TAGVAR(ld_shlibs, $1)=no
5084 *** Warning: the GNU linker, at least up to release 2.19, is reported
5085 *** to be unable to reliably create shared libraries on AIX.
5086 *** Therefore, libtool is disabling shared libraries support. If you
5087 *** really care for shared libraries, you may want to install binutils
5088 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5089 *** You will then need to restart the configuration process.
5098 # see comment about AmigaOS4 .so support
5099 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5100 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5103 _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)'
5104 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5105 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5111 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5112 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5113 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5114 # support --undefined. This deserves some investigation. FIXME
5115 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5117 _LT_TAGVAR(ld_shlibs, $1)=no
5121 cygwin* | mingw* | pw32* | cegcc*)
5122 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5123 # as there is no search path for DLLs.
5124 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5125 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
5126 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5127 _LT_TAGVAR(always_export_symbols, $1)=no
5128 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5129 _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'
5130 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5132 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5133 _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'
5134 # If the export-symbols file already is a .def file, use it as
5135 # is; otherwise, prepend EXPORTS...
5136 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5137 cp $export_symbols $output_objdir/$soname.def;
5139 echo EXPORTS > $output_objdir/$soname.def;
5140 cat $export_symbols >> $output_objdir/$soname.def;
5142 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5144 _LT_TAGVAR(ld_shlibs, $1)=no
5149 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5150 _LT_TAGVAR(link_all_deplibs, $1)=yes
5154 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5155 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5156 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5158 _LT_TAGVAR(archive_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~
5162 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5163 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5164 emximp -o $lib $output_objdir/$libname.def'
5165 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5166 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5167 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5168 $ECHO EXPORTS >> $output_objdir/$libname.def~
5170 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5171 prefix_cmds="$prefix_cmds -e 1d";
5173 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5174 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5175 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5176 emximp -o $lib $output_objdir/$libname.def'
5177 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5178 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5179 _LT_TAGVAR(file_list_spec, $1)='@'
5183 _LT_TAGVAR(hardcode_direct, $1)=no
5184 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5185 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5186 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5187 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5188 # Instead, shared libraries are loaded at an image base (0x10000000 by
5189 # default) and relocated if they conflict, which is a slow very memory
5190 # consuming and fragmenting process. To avoid this, we pick a random,
5191 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5192 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5193 _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'
5194 _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'
5197 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5199 if test linux-dietlibc = "$host_os"; then
5200 case $cc_basename in
5201 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5204 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5205 && test no = "$tmp_diet"
5207 tmp_addflag=' $pic_flag'
5208 tmp_sharedflag='-shared'
5209 case $cc_basename,$host_cpu in
5210 pgcc*) # Portland Group C compiler
5211 _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'
5212 tmp_addflag=' $pic_flag'
5214 pgf77* | pgf90* | pgf95* | pgfortran*)
5215 # Portland Group f77 and f90 compilers
5216 _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'
5217 tmp_addflag=' $pic_flag -Mnomain' ;;
5218 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5219 tmp_addflag=' -i_dynamic' ;;
5220 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5221 tmp_addflag=' -i_dynamic -nofor_main' ;;
5222 ifc* | ifort*) # Intel Fortran compiler
5223 tmp_addflag=' -nofor_main' ;;
5224 lf95*) # Lahey Fortran 8.1
5225 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5226 tmp_sharedflag='--shared' ;;
5227 nagfor*) # NAGFOR 5.3
5228 tmp_sharedflag='-Wl,-shared' ;;
5229 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5230 tmp_sharedflag='-qmkshrobj'
5232 nvcc*) # Cuda Compiler Driver 2.2
5233 _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'
5234 _LT_TAGVAR(compiler_needs_object, $1)=yes
5237 case `$CC -V 2>&1 | $SED 5q` in
5238 *Sun\ C*) # Sun C 5.9
5239 _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'
5240 _LT_TAGVAR(compiler_needs_object, $1)=yes
5241 tmp_sharedflag='-G' ;;
5242 *Sun\ F*) # Sun Fortran 8.3
5243 tmp_sharedflag='-G' ;;
5245 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5247 if test yes = "$supports_anon_versioning"; then
5248 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5249 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5250 echo "local: *; };" >> $output_objdir/$libname.ver~
5251 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
5254 case $cc_basename in
5256 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5258 xlf* | bgf* | bgxlf* | mpixlf*)
5259 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5260 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5261 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5262 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5263 if test yes = "$supports_anon_versioning"; then
5264 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5265 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5266 echo "local: *; };" >> $output_objdir/$libname.ver~
5267 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5272 _LT_TAGVAR(ld_shlibs, $1)=no
5277 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5278 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5281 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5282 _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'
5287 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5288 _LT_TAGVAR(ld_shlibs, $1)=no
5291 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5292 *** create shared libraries on Solaris systems. Therefore, libtool
5293 *** is disabling shared libraries support. We urge you to upgrade GNU
5294 *** binutils to release 2.9.1 or newer. Another option is to modify
5295 *** your PATH or compiler configuration so that the native linker is
5296 *** used, and then restart.
5299 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5300 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5301 _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'
5303 _LT_TAGVAR(ld_shlibs, $1)=no
5307 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5308 case `$LD -v 2>&1` in
5309 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5310 _LT_TAGVAR(ld_shlibs, $1)=no
5313 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
5314 *** reliably create shared libraries on SCO systems. Therefore, libtool
5315 *** is disabling shared libraries support. We urge you to upgrade GNU
5316 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5317 *** your PATH or compiler configuration so that the native linker is
5318 *** used, and then restart.
5323 # For security reasons, it is highly recommended that you always
5324 # use absolute paths for naming shared libraries, and exclude the
5325 # DT_RUNPATH tag from executables and libraries. But doing so
5326 # requires that you compile everything twice, which is a pain.
5327 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5328 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5329 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5330 _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'
5332 _LT_TAGVAR(ld_shlibs, $1)=no
5339 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5341 _LT_TAGVAR(hardcode_direct, $1)=yes
5342 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5346 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5347 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5348 _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'
5350 _LT_TAGVAR(ld_shlibs, $1)=no
5355 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
5357 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5358 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5359 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5362 # PORTME fill in a description of your system's linker (not GNU ld)
5365 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5366 _LT_TAGVAR(always_export_symbols, $1)=yes
5367 _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'
5368 # Note: this linker hardcodes the directories in LIBPATH if there
5369 # are no directories specified by -L.
5370 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5371 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
5372 # Neither direct hardcoding nor static linking is supported with a
5374 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5379 if test ia64 = "$host_cpu"; then
5380 # On IA64, the linker does run time linking by default, so we don't
5381 # have to do anything special.
5382 aix_use_runtimelinking=no
5383 exp_sym_flag='-Bexport'
5386 # If we're using GNU nm, then we don't want the "-C" option.
5387 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5388 # Without the "-l" option, or with the "-B" option, AIX nm treats
5389 # weak defined symbols like other global defined symbols, whereas
5390 # GNU nm marks them as "W".
5391 # While the 'weak' keyword is ignored in the Export File, we need
5392 # it in the Import File for the 'aix-soname' feature, so we have
5393 # to replace the "-B" option with "-P" for AIX nm.
5394 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5395 _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'
5397 _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 == "L") || (\$ 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'
5399 aix_use_runtimelinking=no
5401 # Test if we are trying to use run time linking or normal
5402 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5403 # have runtime linking enabled, and use it for executables.
5404 # For shared libraries, we enable/disable runtime linking
5405 # depending on the kind of the shared library created -
5406 # when "with_aix_soname,aix_use_runtimelinking" is:
5407 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
5408 # "aix,yes" lib.so shared, rtl:yes, for executables
5409 # lib.a static archive
5410 # "both,no" lib.so.V(shr.o) shared, rtl:yes
5411 # lib.a(lib.so.V) shared, rtl:no, for executables
5412 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5413 # lib.a(lib.so.V) shared, rtl:no
5414 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
5415 # lib.a static archive
5416 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5417 for ld_flag in $LDFLAGS; do
5418 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
5419 aix_use_runtimelinking=yes
5423 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5424 # With aix-soname=svr4, we create the lib.so.V shared archives only,
5425 # so we don't have lib.a shared libs to link our executables.
5426 # We have to force runtime linking in this case.
5427 aix_use_runtimelinking=yes
5428 LDFLAGS="$LDFLAGS -Wl,-brtl"
5433 exp_sym_flag='-bexport'
5434 no_entry_flag='-bnoentry'
5437 # When large executables or shared objects are built, AIX ld can
5438 # have problems creating the table of contents. If linking a library
5439 # or program results in "error TOC overflow" add -mminimal-toc to
5440 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5441 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5443 _LT_TAGVAR(archive_cmds, $1)=''
5444 _LT_TAGVAR(hardcode_direct, $1)=yes
5445 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5446 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5447 _LT_TAGVAR(link_all_deplibs, $1)=yes
5448 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5449 case $with_aix_soname,$aix_use_runtimelinking in
5450 aix,*) ;; # traditional, no import file
5451 svr4,* | *,yes) # use import file
5452 # The Import File defines what to hardcode.
5453 _LT_TAGVAR(hardcode_direct, $1)=no
5454 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5458 if test yes = "$GCC"; then
5459 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5460 # We only want to do this on AIX 4.2 and lower, the check
5461 # below for broken collect2 doesn't work under 4.3+
5462 collect2name=`$CC -print-prog-name=collect2`
5463 if test -f "$collect2name" &&
5464 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5466 # We have reworked collect2
5469 # We have old collect2
5470 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5471 # It fails to find uninstalled libraries when the uninstalled
5472 # path is not listed in the libpath. Setting hardcode_minus_L
5473 # to unsupported forces relinking
5474 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5475 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5476 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5480 shared_flag='-shared'
5481 if test yes = "$aix_use_runtimelinking"; then
5482 shared_flag="$shared_flag "'$wl-G'
5484 # Need to ensure runtime linking is disabled for the traditional
5485 # shared library, or the linker may eventually find shared libraries
5486 # /with/ Import File - we do not want to mix them.
5487 shared_flag_aix='-shared'
5488 shared_flag_svr4='-shared $wl-G'
5491 if test ia64 = "$host_cpu"; then
5492 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5493 # chokes on -Wl,-G. The following line is correct:
5496 if test yes = "$aix_use_runtimelinking"; then
5499 shared_flag='$wl-bM:SRE'
5501 shared_flag_aix='$wl-bM:SRE'
5502 shared_flag_svr4='$wl-G'
5506 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
5507 # It seems that -bexpall does not export symbols beginning with
5508 # underscore (_), so it is better to generate a list of symbols to export.
5509 _LT_TAGVAR(always_export_symbols, $1)=yes
5510 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
5511 # Warning - without using the other runtime loading flags (-brtl),
5512 # -berok will link without error, but may produce a broken library.
5513 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5514 # Determine the default libpath from the value encoded in an
5516 _LT_SYS_MODULE_PATH_AIX([$1])
5517 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5518 _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
5520 if test ia64 = "$host_cpu"; then
5521 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
5522 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5523 _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"
5525 # Determine the default libpath from the value encoded in an
5527 _LT_SYS_MODULE_PATH_AIX([$1])
5528 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5529 # Warning - without using the other run time loading flags,
5530 # -berok will link without error, but may produce a broken library.
5531 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5532 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5533 if test yes = "$with_gnu_ld"; then
5534 # We only use this code for GNU lds that support --whole-archive.
5535 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
5537 # Exported symbols can be pulled into shared objects from archives
5538 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5540 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5541 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5542 # -brtl affects multiple linker settings, -berok does not and is overridden later
5543 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5544 if test svr4 != "$with_aix_soname"; then
5545 # This is similar to how AIX traditionally builds its shared libraries.
5546 _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'
5548 if test aix != "$with_aix_soname"; then
5549 _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'
5551 # used by -dlpreopen to get the symbols
5552 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
5554 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
5562 # see comment about AmigaOS4 .so support
5563 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5564 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5567 _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)'
5568 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5569 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5575 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5578 cygwin* | mingw* | pw32* | cegcc*)
5579 # When not using gcc, we currently assume that we are using
5580 # Microsoft Visual C++ or Intel C++ Compiler.
5581 # hardcode_libdir_flag_spec is actually meaningless, as there is
5582 # no search path for DLLs.
5583 case $cc_basename in
5585 # Native MSVC or ICC
5586 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5587 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5588 _LT_TAGVAR(always_export_symbols, $1)=yes
5589 _LT_TAGVAR(file_list_spec, $1)='@'
5590 # Tell ltmain to make .lib files, not .a files.
5592 # Tell ltmain to make .dll files, not .so files.
5594 # FIXME: Setting linknames here is a bad hack.
5595 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5596 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5597 cp "$export_symbols" "$output_objdir/$soname.def";
5598 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5600 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5602 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5604 # The linker will not automatically build a static lib if we build a DLL.
5605 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5606 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5607 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5608 _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'
5610 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
5611 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5612 lt_tool_outputfile="@TOOL_OUTPUT@"~
5613 case $lt_outputfile in
5616 lt_outputfile=$lt_outputfile.exe
5617 lt_tool_outputfile=$lt_tool_outputfile.exe
5620 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5621 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5622 $RM "$lt_outputfile.manifest";
5626 # Assume MSVC and ICC wrapper
5627 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5628 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5629 # Tell ltmain to make .lib files, not .a files.
5631 # Tell ltmain to make .dll files, not .so files.
5633 # FIXME: Setting linknames here is a bad hack.
5634 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
5635 # The linker will automatically build a .lib file if we build a DLL.
5636 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
5637 # FIXME: Should let the user specify the lib program.
5638 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5639 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5644 darwin* | rhapsody*)
5645 _LT_DARWIN_LINKER_FEATURES($1)
5649 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5650 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5651 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5654 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5655 # support. Future versions do this automatically, but an explicit c++rt0.o
5656 # does not break anything, and helps significantly (at the cost of a little
5659 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5660 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5661 _LT_TAGVAR(hardcode_direct, $1)=yes
5662 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5665 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5667 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5668 _LT_TAGVAR(hardcode_direct, $1)=yes
5669 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5670 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5673 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5674 freebsd* | dragonfly* | midnightbsd*)
5675 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5676 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5677 _LT_TAGVAR(hardcode_direct, $1)=yes
5678 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5682 if test yes = "$GCC"; then
5683 _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'
5685 _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'
5687 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5688 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5689 _LT_TAGVAR(hardcode_direct, $1)=yes
5691 # hardcode_minus_L: Not really in the search PATH,
5692 # but as the default location of the library.
5693 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5694 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5698 if test yes,no = "$GCC,$with_gnu_ld"; then
5699 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5701 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5703 if test no = "$with_gnu_ld"; then
5704 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5705 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5706 _LT_TAGVAR(hardcode_direct, $1)=yes
5707 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5708 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5709 # hardcode_minus_L: Not really in the search PATH,
5710 # but as the default location of the library.
5711 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5716 if test yes,no = "$GCC,$with_gnu_ld"; then
5719 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5722 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5725 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5731 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5734 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5738 # Older versions of the 11.00 compiler do not understand -b yet
5739 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
5740 _LT_LINKER_OPTION([if $CC understands -b],
5741 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5742 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5743 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5744 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5748 if test no = "$with_gnu_ld"; then
5749 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
5750 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5754 _LT_TAGVAR(hardcode_direct, $1)=no
5755 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5758 _LT_TAGVAR(hardcode_direct, $1)=yes
5759 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5760 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5762 # hardcode_minus_L: Not really in the search PATH,
5763 # but as the default location of the library.
5764 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5770 irix5* | irix6* | nonstopux*)
5771 if test yes = "$GCC"; then
5772 _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'
5773 # Try to use the -exported_symbol ld option, if it does not
5774 # work, assume that -exports_file does not work either and
5775 # implicitly export all symbols.
5776 # This should be the same for all languages, so no per-tag cache variable.
5777 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
5778 [lt_cv_irix_exported_symbol],
5779 [save_LDFLAGS=$LDFLAGS
5780 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
5783 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
5784 [C++], [[int foo (void) { return 0; }]],
5791 [lt_cv_irix_exported_symbol=yes],
5792 [lt_cv_irix_exported_symbol=no])
5793 LDFLAGS=$save_LDFLAGS])
5794 if test yes = "$lt_cv_irix_exported_symbol"; then
5795 _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'
5798 _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'
5799 _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'
5801 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5802 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5803 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5804 _LT_TAGVAR(inherit_rpath, $1)=yes
5805 _LT_TAGVAR(link_all_deplibs, $1)=yes
5809 case $cc_basename in
5811 # Fabrice Bellard et al's Tiny C Compiler
5812 _LT_TAGVAR(ld_shlibs, $1)=yes
5813 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5819 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5820 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5822 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5824 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5825 _LT_TAGVAR(hardcode_direct, $1)=yes
5826 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5830 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5831 _LT_TAGVAR(hardcode_direct, $1)=yes
5832 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5833 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5834 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5841 if test -f /usr/libexec/ld.so; then
5842 _LT_TAGVAR(hardcode_direct, $1)=yes
5843 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5844 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5845 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
5846 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5847 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5848 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5849 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
5851 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5852 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5855 _LT_TAGVAR(ld_shlibs, $1)=no
5860 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5861 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5862 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5864 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5865 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5866 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5867 $ECHO EXPORTS >> $output_objdir/$libname.def~
5868 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5869 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5870 emximp -o $lib $output_objdir/$libname.def'
5871 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5872 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5873 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5874 $ECHO EXPORTS >> $output_objdir/$libname.def~
5876 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5877 prefix_cmds="$prefix_cmds -e 1d";
5879 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5880 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5881 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5882 emximp -o $lib $output_objdir/$libname.def'
5883 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5884 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5885 _LT_TAGVAR(file_list_spec, $1)='@'
5889 if test yes = "$GCC"; then
5890 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5891 _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'
5893 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5894 _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'
5896 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5897 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5898 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5901 osf4* | osf5*) # as osf3* with the addition of -msym flag
5902 if test yes = "$GCC"; then
5903 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5904 _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'
5905 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5907 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5908 _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'
5909 _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~
5910 $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'
5912 # Both c and cxx compiler support -rpath directly
5913 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5915 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5916 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5920 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5921 if test yes = "$GCC"; then
5923 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
5924 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5925 $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'
5927 case `$CC -V 2>&1` in
5930 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
5931 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5932 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5936 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5937 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5938 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5942 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5943 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5945 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5947 # The compiler driver will combine and reorder linker options,
5948 # but understands '-z linker_flag'. GCC discards it without '$wl',
5949 # but is careful enough not to reorder.
5950 # Supported since Solaris 2.6 (maybe 2.5.1?)
5951 if test yes = "$GCC"; then
5952 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
5954 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5958 _LT_TAGVAR(link_all_deplibs, $1)=yes
5962 if test sequent = "$host_vendor"; then
5963 # Use $CC to link under sequent, because it throws in some extra .o
5964 # files that make .init and .fini sections work.
5965 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5967 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5969 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5970 _LT_TAGVAR(hardcode_direct, $1)=yes
5971 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5972 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5976 case $host_vendor in
5978 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5979 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5982 ## LD is ld it makes a PLAMLIB
5983 ## CC just makes a GrossModule.
5984 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5985 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5986 _LT_TAGVAR(hardcode_direct, $1)=no
5989 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5990 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5993 runpath_var='LD_RUN_PATH'
5994 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5998 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5999 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6000 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6004 if test -d /usr/nec; then
6005 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6006 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6007 runpath_var=LD_RUN_PATH
6008 hardcode_runpath_var=yes
6009 _LT_TAGVAR(ld_shlibs, $1)=yes
6013 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6014 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6015 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6016 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6017 runpath_var='LD_RUN_PATH'
6019 if test yes = "$GCC"; then
6020 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6021 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6023 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6024 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6028 sysv5* | sco3.2v5* | sco5v6*)
6029 # Note: We CANNOT use -z defs as we might desire, because we do not
6030 # link with -lc, and that would cause any symbols used from libc to
6031 # always be unresolved, which means just about no library would
6032 # ever link correctly. If we're not using GNU ld we use -z text
6033 # though, which does catch some bad symbols but isn't as heavy-handed
6035 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6036 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
6037 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6038 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6039 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
6040 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6041 _LT_TAGVAR(link_all_deplibs, $1)=yes
6042 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
6043 runpath_var='LD_RUN_PATH'
6045 if test yes = "$GCC"; then
6046 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6047 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6049 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6050 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6055 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6056 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6057 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6061 _LT_TAGVAR(ld_shlibs, $1)=no
6065 if test sni = "$host_vendor"; then
6067 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6068 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
6074 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6075 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
6077 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6079 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6080 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6081 _LT_DECL([], [extract_expsyms_cmds], [2],
6082 [The commands to extract the exported symbol list from a shared archive])
6085 # Do we need to explicitly link libc?
6087 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6089 # Assume -lc should be added
6090 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6092 if test yes,yes = "$GCC,$enable_shared"; then
6093 case $_LT_TAGVAR(archive_cmds, $1) in
6095 # FIXME: we may have to deal with multi-command sequences.
6098 # Test whether the compiler implicitly links with -lc since on some
6099 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6100 # to ld, don't add -lc before -lgcc.
6101 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6102 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6104 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6106 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6109 libobjs=conftest.$ac_objext
6111 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6112 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6118 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6119 _LT_TAGVAR(allow_undefined_flag, $1)=
6120 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6122 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6124 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6126 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6128 cat conftest.err 1>&5
6132 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6139 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6140 [Whether or not to add -lc for building shared libraries])
6141 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6142 [enable_shared_with_static_runtimes], [0],
6143 [Whether or not to disallow shared libs when runtime libs are static])
6144 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6145 [Compiler flag to allow reflexive dlopens])
6146 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6147 [Compiler flag to generate shared objects directly from archives])
6148 _LT_TAGDECL([], [compiler_needs_object], [1],
6149 [Whether the compiler copes with passing no objects directly])
6150 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6151 [Create an old-style archive from a shared archive])
6152 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6153 [Create a temporary old-style archive to link instead of a shared archive])
6154 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6155 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6156 _LT_TAGDECL([], [module_cmds], [2],
6157 [Commands used to build a loadable module if different from building
6159 _LT_TAGDECL([], [module_expsym_cmds], [2])
6160 _LT_TAGDECL([], [with_gnu_ld], [1],
6161 [Whether we are building with GNU ld or not])
6162 _LT_TAGDECL([], [allow_undefined_flag], [1],
6163 [Flag that allows shared libraries with undefined symbols to be built])
6164 _LT_TAGDECL([], [no_undefined_flag], [1],
6165 [Flag that enforces no undefined symbols])
6166 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6167 [Flag to hardcode $libdir into a binary during linking.
6168 This must work even if $libdir does not exist])
6169 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6170 [Whether we need a single "-rpath" flag with a separated argument])
6171 _LT_TAGDECL([], [hardcode_direct], [0],
6172 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6173 DIR into the resulting binary])
6174 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6175 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
6176 DIR into the resulting binary and the resulting library dependency is
6177 "absolute", i.e impossible to change by setting $shlibpath_var if the
6178 library is relocated])
6179 _LT_TAGDECL([], [hardcode_minus_L], [0],
6180 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6181 into the resulting binary])
6182 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6183 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6184 into the resulting binary])
6185 _LT_TAGDECL([], [hardcode_automatic], [0],
6186 [Set to "yes" if building a shared library automatically hardcodes DIR
6187 into the library and all subsequent libraries and executables linked
6189 _LT_TAGDECL([], [inherit_rpath], [0],
6190 [Set to yes if linker adds runtime paths of dependent libraries
6191 to runtime path list])
6192 _LT_TAGDECL([], [link_all_deplibs], [0],
6193 [Whether libtool must link a program against all its dependency libraries])
6194 _LT_TAGDECL([], [always_export_symbols], [0],
6195 [Set to "yes" if exported symbols are required])
6196 _LT_TAGDECL([], [export_symbols_cmds], [2],
6197 [The commands to list exported symbols])
6198 _LT_TAGDECL([], [exclude_expsyms], [1],
6199 [Symbols that should not be listed in the preloaded symbols])
6200 _LT_TAGDECL([], [include_expsyms], [1],
6201 [Symbols that must always be exported])
6202 _LT_TAGDECL([], [prelink_cmds], [2],
6203 [Commands necessary for linking programs (against libraries) with templates])
6204 _LT_TAGDECL([], [postlink_cmds], [2],
6205 [Commands necessary for finishing linking programs])
6206 _LT_TAGDECL([], [file_list_spec], [1],
6207 [Specify filename containing input files])
6208 dnl FIXME: Not yet implemented
6209 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6210 dnl [Compiler flag to generate thread safe objects])
6211 ])# _LT_LINKER_SHLIBS
6214 # _LT_LANG_C_CONFIG([TAG])
6215 # ------------------------
6216 # Ensure that the configuration variables for a C compiler are suitably
6217 # defined. These variables are subsequently used by _LT_CONFIG to write
6218 # the compiler configuration to 'libtool'.
6219 m4_defun([_LT_LANG_C_CONFIG],
6220 [m4_require([_LT_DECL_EGREP])dnl
6224 # Source file extension for C test sources.
6227 # Object file extension for compiled C test sources.
6229 _LT_TAGVAR(objext, $1)=$objext
6231 # Code to be used in simple compile tests
6232 lt_simple_compile_test_code="int some_variable = 0;"
6234 # Code to be used in simple link tests
6235 lt_simple_link_test_code='int main(){return(0);}'
6238 # Save the default compiler, since it gets overwritten when the other
6239 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6240 compiler_DEFAULT=$CC
6242 # save warnings/boilerplate of simple test code
6243 _LT_COMPILER_BOILERPLATE
6244 _LT_LINKER_BOILERPLATE
6247 ## There is no encapsulation within the following macros, do not change
6248 ## the running order or otherwise move them around unless you know exactly
6249 ## what you are doing...
6250 if test -n "$compiler"; then
6251 _LT_COMPILER_NO_RTTI($1)
6252 _LT_COMPILER_PIC($1)
6253 _LT_COMPILER_C_O($1)
6254 _LT_COMPILER_FILE_LOCKS($1)
6255 _LT_LINKER_SHLIBS($1)
6256 _LT_SYS_DYNAMIC_LINKER($1)
6257 _LT_LINKER_HARDCODE_LIBPATH($1)
6261 # Report what library types will actually be built
6262 AC_MSG_CHECKING([if libtool supports shared libraries])
6263 AC_MSG_RESULT([$can_build_shared])
6265 AC_MSG_CHECKING([whether to build shared libraries])
6266 test no = "$can_build_shared" && enable_shared=no
6268 # On AIX, shared libraries and static libraries use the same namespace, and
6269 # are all built from PIC.
6272 test yes = "$enable_shared" && enable_static=no
6273 if test -n "$RANLIB"; then
6274 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6275 postinstall_cmds='$RANLIB $lib'
6280 if test ia64 != "$host_cpu"; then
6281 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6282 yes,aix,yes) ;; # shared object as lib.so file only
6283 yes,svr4,*) ;; # shared object as lib.so archive member only
6284 yes,*) enable_static=no ;; # shared object in lib.a archive as well
6289 AC_MSG_RESULT([$enable_shared])
6291 AC_MSG_CHECKING([whether to build static libraries])
6292 # Make sure either enable_shared or enable_static is yes.
6293 test yes = "$enable_shared" || enable_static=yes
6294 AC_MSG_RESULT([$enable_static])
6300 ])# _LT_LANG_C_CONFIG
6303 # _LT_LANG_CXX_CONFIG([TAG])
6304 # --------------------------
6305 # Ensure that the configuration variables for a C++ compiler are suitably
6306 # defined. These variables are subsequently used by _LT_CONFIG to write
6307 # the compiler configuration to 'libtool'.
6308 m4_defun([_LT_LANG_CXX_CONFIG],
6309 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6310 m4_require([_LT_DECL_EGREP])dnl
6311 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6312 if test -n "$CXX" && ( test no != "$CXX" &&
6313 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6314 (test g++ != "$CXX"))); then
6317 _lt_caught_CXX_error=yes
6321 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6322 _LT_TAGVAR(allow_undefined_flag, $1)=
6323 _LT_TAGVAR(always_export_symbols, $1)=no
6324 _LT_TAGVAR(archive_expsym_cmds, $1)=
6325 _LT_TAGVAR(compiler_needs_object, $1)=no
6326 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6327 _LT_TAGVAR(hardcode_direct, $1)=no
6328 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6329 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6330 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6331 _LT_TAGVAR(hardcode_minus_L, $1)=no
6332 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6333 _LT_TAGVAR(hardcode_automatic, $1)=no
6334 _LT_TAGVAR(inherit_rpath, $1)=no
6335 _LT_TAGVAR(module_cmds, $1)=
6336 _LT_TAGVAR(module_expsym_cmds, $1)=
6337 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6338 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6339 _LT_TAGVAR(reload_flag, $1)=$reload_flag
6340 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6341 _LT_TAGVAR(no_undefined_flag, $1)=
6342 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6343 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6345 # Source file extension for C++ test sources.
6348 # Object file extension for compiled C++ test sources.
6350 _LT_TAGVAR(objext, $1)=$objext
6352 # No sense in running all these tests if we already determined that
6353 # the CXX compiler isn't working. Some variables (like enable_shared)
6354 # are currently assumed to apply to all compilers on this platform,
6355 # and will be corrupted by setting them based on a non-working compiler.
6356 if test yes != "$_lt_caught_CXX_error"; then
6357 # Code to be used in simple compile tests
6358 lt_simple_compile_test_code="int some_variable = 0;"
6360 # Code to be used in simple link tests
6361 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6363 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6366 # save warnings/boilerplate of simple test code
6367 _LT_COMPILER_BOILERPLATE
6368 _LT_LINKER_BOILERPLATE
6370 # Allow CC to be a program name with arguments.
6372 lt_save_CFLAGS=$CFLAGS
6376 lt_save_with_gnu_ld=$with_gnu_ld
6377 lt_save_path_LD=$lt_cv_path_LD
6378 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6379 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6381 $as_unset lt_cv_prog_gnu_ld
6383 if test -n "${lt_cv_path_LDCXX+set}"; then
6384 lt_cv_path_LD=$lt_cv_path_LDCXX
6386 $as_unset lt_cv_path_LD
6388 test -z "${LDCXX+set}" || LD=$LDCXX
6392 _LT_TAGVAR(compiler, $1)=$CC
6393 _LT_CC_BASENAME([$compiler])
6395 if test -n "$compiler"; then
6396 # We don't want -fno-exception when compiling C++ code, so set the
6397 # no_builtin_flag separately
6398 if test yes = "$GXX"; then
6399 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6401 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6404 if test yes = "$GXX"; then
6405 # Set up default GNU C++ configuration
6409 # Check if GNU C++ uses GNU ld as the underlying linker, since the
6410 # archiving commands below assume that GNU ld is being used.
6411 if test yes = "$with_gnu_ld"; then
6412 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6413 _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'
6415 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6416 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6418 # If archive_cmds runs LD, not CC, wlarc should be empty
6419 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6420 # investigate it a little bit more. (MM)
6423 # ancient GNU ld didn't support --whole-archive et. al.
6424 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6425 $GREP 'no-whole-archive' > /dev/null; then
6426 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
6428 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6434 # A generic and very simple default shared library creation
6435 # command for GNU C++ for the case where it uses the native
6436 # linker, instead of GNU ld. If possible, this setting should
6437 # overridden to take advantage of the native linker features on
6438 # the platform it is being used on.
6439 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6442 # Commands to make compiler produce verbose output that lists
6443 # what "hidden" libraries, object files and flags are used when
6444 # linking a shared library.
6445 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6453 # PORTME: fill in a description of your system's C++ link characteristics
6454 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6455 _LT_TAGVAR(ld_shlibs, $1)=yes
6458 # FIXME: insert proper C++ library support
6459 _LT_TAGVAR(ld_shlibs, $1)=no
6462 if test ia64 = "$host_cpu"; then
6463 # On IA64, the linker does run time linking by default, so we don't
6464 # have to do anything special.
6465 aix_use_runtimelinking=no
6466 exp_sym_flag='-Bexport'
6469 aix_use_runtimelinking=no
6471 # Test if we are trying to use run time linking or normal
6472 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6473 # have runtime linking enabled, and use it for executables.
6474 # For shared libraries, we enable/disable runtime linking
6475 # depending on the kind of the shared library created -
6476 # when "with_aix_soname,aix_use_runtimelinking" is:
6477 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
6478 # "aix,yes" lib.so shared, rtl:yes, for executables
6479 # lib.a static archive
6480 # "both,no" lib.so.V(shr.o) shared, rtl:yes
6481 # lib.a(lib.so.V) shared, rtl:no, for executables
6482 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6483 # lib.a(lib.so.V) shared, rtl:no
6484 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
6485 # lib.a static archive
6486 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6487 for ld_flag in $LDFLAGS; do
6490 aix_use_runtimelinking=yes
6495 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6496 # With aix-soname=svr4, we create the lib.so.V shared archives only,
6497 # so we don't have lib.a shared libs to link our executables.
6498 # We have to force runtime linking in this case.
6499 aix_use_runtimelinking=yes
6500 LDFLAGS="$LDFLAGS -Wl,-brtl"
6505 exp_sym_flag='-bexport'
6506 no_entry_flag='-bnoentry'
6509 # When large executables or shared objects are built, AIX ld can
6510 # have problems creating the table of contents. If linking a library
6511 # or program results in "error TOC overflow" add -mminimal-toc to
6512 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6513 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6515 _LT_TAGVAR(archive_cmds, $1)=''
6516 _LT_TAGVAR(hardcode_direct, $1)=yes
6517 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6518 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6519 _LT_TAGVAR(link_all_deplibs, $1)=yes
6520 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6521 case $with_aix_soname,$aix_use_runtimelinking in
6522 aix,*) ;; # no import file
6523 svr4,* | *,yes) # use import file
6524 # The Import File defines what to hardcode.
6525 _LT_TAGVAR(hardcode_direct, $1)=no
6526 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6530 if test yes = "$GXX"; then
6531 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6532 # We only want to do this on AIX 4.2 and lower, the check
6533 # below for broken collect2 doesn't work under 4.3+
6534 collect2name=`$CC -print-prog-name=collect2`
6535 if test -f "$collect2name" &&
6536 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6538 # We have reworked collect2
6541 # We have old collect2
6542 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6543 # It fails to find uninstalled libraries when the uninstalled
6544 # path is not listed in the libpath. Setting hardcode_minus_L
6545 # to unsupported forces relinking
6546 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6547 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6548 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6551 shared_flag='-shared'
6552 if test yes = "$aix_use_runtimelinking"; then
6553 shared_flag=$shared_flag' $wl-G'
6555 # Need to ensure runtime linking is disabled for the traditional
6556 # shared library, or the linker may eventually find shared libraries
6557 # /with/ Import File - we do not want to mix them.
6558 shared_flag_aix='-shared'
6559 shared_flag_svr4='-shared $wl-G'
6562 if test ia64 = "$host_cpu"; then
6563 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6564 # chokes on -Wl,-G. The following line is correct:
6567 if test yes = "$aix_use_runtimelinking"; then
6570 shared_flag='$wl-bM:SRE'
6572 shared_flag_aix='$wl-bM:SRE'
6573 shared_flag_svr4='$wl-G'
6577 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
6578 # It seems that -bexpall does not export symbols beginning with
6579 # underscore (_), so it is better to generate a list of symbols to
6581 _LT_TAGVAR(always_export_symbols, $1)=yes
6582 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
6583 # Warning - without using the other runtime loading flags (-brtl),
6584 # -berok will link without error, but may produce a broken library.
6585 # The "-G" linker flag allows undefined symbols.
6586 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
6587 # Determine the default libpath from the value encoded in an empty
6589 _LT_SYS_MODULE_PATH_AIX([$1])
6590 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6592 _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
6594 if test ia64 = "$host_cpu"; then
6595 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
6596 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6597 _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"
6599 # Determine the default libpath from the value encoded in an
6601 _LT_SYS_MODULE_PATH_AIX([$1])
6602 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6603 # Warning - without using the other run time loading flags,
6604 # -berok will link without error, but may produce a broken library.
6605 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6606 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6607 if test yes = "$with_gnu_ld"; then
6608 # We only use this code for GNU lds that support --whole-archive.
6609 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
6611 # Exported symbols can be pulled into shared objects from archives
6612 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6614 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6615 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6616 # -brtl affects multiple linker settings, -berok does not and is overridden later
6617 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6618 if test svr4 != "$with_aix_soname"; then
6619 # This is similar to how AIX traditionally builds its shared
6620 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6621 _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'
6623 if test aix != "$with_aix_soname"; then
6624 _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'
6626 # used by -dlpreopen to get the symbols
6627 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
6629 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
6635 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6636 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6637 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6638 # support --undefined. This deserves some investigation. FIXME
6639 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6641 _LT_TAGVAR(ld_shlibs, $1)=no
6646 case $cc_basename in
6648 # FIXME: insert proper C++ library support
6649 _LT_TAGVAR(ld_shlibs, $1)=no
6654 cygwin* | mingw* | pw32* | cegcc*)
6655 case $GXX,$cc_basename in
6656 ,cl* | no,cl* | ,icl* | no,icl*)
6657 # Native MSVC or ICC
6658 # hardcode_libdir_flag_spec is actually meaningless, as there is
6659 # no search path for DLLs.
6660 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6661 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6662 _LT_TAGVAR(always_export_symbols, $1)=yes
6663 _LT_TAGVAR(file_list_spec, $1)='@'
6664 # Tell ltmain to make .lib files, not .a files.
6666 # Tell ltmain to make .dll files, not .so files.
6668 # FIXME: Setting linknames here is a bad hack.
6669 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6670 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6671 cp "$export_symbols" "$output_objdir/$soname.def";
6672 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6674 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6676 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6678 # The linker will not automatically build a static lib if we build a DLL.
6679 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6680 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6682 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6683 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6684 lt_tool_outputfile="@TOOL_OUTPUT@"~
6685 case $lt_outputfile in
6688 lt_outputfile=$lt_outputfile.exe
6689 lt_tool_outputfile=$lt_tool_outputfile.exe
6692 func_to_tool_file "$lt_outputfile"~
6693 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6694 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6695 $RM "$lt_outputfile.manifest";
6700 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6701 # as there is no search path for DLLs.
6702 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6703 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
6704 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6705 _LT_TAGVAR(always_export_symbols, $1)=no
6706 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6708 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6709 _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'
6710 # If the export-symbols file already is a .def file, use it as
6711 # is; otherwise, prepend EXPORTS...
6712 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6713 cp $export_symbols $output_objdir/$soname.def;
6715 echo EXPORTS > $output_objdir/$soname.def;
6716 cat $export_symbols >> $output_objdir/$soname.def;
6718 $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'
6720 _LT_TAGVAR(ld_shlibs, $1)=no
6725 darwin* | rhapsody*)
6726 _LT_DARWIN_LINKER_FEATURES($1)
6730 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6731 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6732 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6734 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6735 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6736 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6737 $ECHO EXPORTS >> $output_objdir/$libname.def~
6738 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6739 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6740 emximp -o $lib $output_objdir/$libname.def'
6741 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6742 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6743 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6744 $ECHO EXPORTS >> $output_objdir/$libname.def~
6746 if test EXPORTS = "`$SED 1q $export_symbols`"; then
6747 prefix_cmds="$prefix_cmds -e 1d";
6749 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6750 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6751 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6752 emximp -o $lib $output_objdir/$libname.def'
6753 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6754 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6755 _LT_TAGVAR(file_list_spec, $1)='@'
6759 case $cc_basename in
6761 # FIXME: insert proper C++ library support
6762 _LT_TAGVAR(ld_shlibs, $1)=no
6765 # Green Hills C++ Compiler
6766 # FIXME: insert proper C++ library support
6767 _LT_TAGVAR(ld_shlibs, $1)=no
6770 # FIXME: insert proper C++ library support
6771 _LT_TAGVAR(ld_shlibs, $1)=no
6777 # C++ shared libraries reported to be fairly broken before
6779 _LT_TAGVAR(ld_shlibs, $1)=no
6783 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6786 freebsd* | dragonfly* | midnightbsd*)
6787 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
6789 _LT_TAGVAR(ld_shlibs, $1)=yes
6793 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6794 _LT_TAGVAR(link_all_deplibs, $1)=yes
6798 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6799 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6800 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6801 _LT_TAGVAR(hardcode_direct, $1)=yes
6802 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6803 # but as the default
6804 # location of the library.
6806 case $cc_basename in
6808 # FIXME: insert proper C++ library support
6809 _LT_TAGVAR(ld_shlibs, $1)=no
6812 _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'
6813 # Commands to make compiler produce verbose output that lists
6814 # what "hidden" libraries, object files and flags are used when
6815 # linking a shared library.
6817 # There doesn't appear to be a way to prevent this compiler from
6818 # explicitly linking system object files so we need to strip them
6819 # from the output so that they don't get included in the library
6821 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"'
6824 if test yes = "$GXX"; then
6825 _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'
6827 # FIXME: insert proper C++ library support
6828 _LT_TAGVAR(ld_shlibs, $1)=no
6835 if test no = "$with_gnu_ld"; then
6836 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
6837 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6843 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6849 _LT_TAGVAR(hardcode_direct, $1)=no
6850 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6853 _LT_TAGVAR(hardcode_direct, $1)=yes
6854 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6855 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
6856 # but as the default
6857 # location of the library.
6861 case $cc_basename in
6863 # FIXME: insert proper C++ library support
6864 _LT_TAGVAR(ld_shlibs, $1)=no
6869 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6872 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6875 _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'
6878 # Commands to make compiler produce verbose output that lists
6879 # what "hidden" libraries, object files and flags are used when
6880 # linking a shared library.
6882 # There doesn't appear to be a way to prevent this compiler from
6883 # explicitly linking system object files so we need to strip them
6884 # from the output so that they don't get included in the library
6886 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"'
6889 if test yes = "$GXX"; then
6890 if test no = "$with_gnu_ld"; then
6893 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6896 _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'
6899 _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'
6904 # FIXME: insert proper C++ library support
6905 _LT_TAGVAR(ld_shlibs, $1)=no
6912 _LT_TAGVAR(hardcode_direct, $1)=no
6913 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6914 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6915 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
6916 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6917 # Instead, shared libraries are loaded at an image base (0x10000000 by
6918 # default) and relocated if they conflict, which is a slow very memory
6919 # consuming and fragmenting process. To avoid this, we pick a random,
6920 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6921 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6922 _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'
6923 _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'
6926 case $cc_basename in
6929 _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'
6931 # Archives containing C++ object files must be created using
6932 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
6933 # necessary to make sure instantiated templates are included
6935 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
6938 if test yes = "$GXX"; then
6939 if test no = "$with_gnu_ld"; then
6940 _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'
6942 _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'
6945 _LT_TAGVAR(link_all_deplibs, $1)=yes
6948 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6949 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6950 _LT_TAGVAR(inherit_rpath, $1)=yes
6953 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6954 case $cc_basename in
6956 # Kuck and Associates, Inc. (KAI) C++ Compiler
6958 # KCC will only create a shared library if the output file
6959 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6960 # to its proper name (with version) after linking.
6961 _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'
6962 _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'
6963 # Commands to make compiler produce verbose output that lists
6964 # what "hidden" libraries, object files and flags are used when
6965 # linking a shared library.
6967 # There doesn't appear to be a way to prevent this compiler from
6968 # explicitly linking system object files so we need to strip them
6969 # from the output so that they don't get included in the library
6971 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"'
6973 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6974 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6976 # Archives containing C++ object files must be created using
6977 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
6978 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
6983 # version 8.0 and above of icpc choke on multiply defined symbols
6984 # if we add $predep_objects and $postdep_objects, however 7.1 and
6985 # earlier do not add the objects themselves.
6986 case `$CC -V 2>&1` in
6988 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6989 _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'
6991 *) # Version 8.0 or newer
6994 ia64*) tmp_idyn=' -i_dynamic';;
6996 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6997 _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'
7000 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7001 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7002 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7003 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
7006 # Portland Group C++ compiler
7008 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7009 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7011 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7012 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7013 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7015 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7016 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7018 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7020 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7021 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7022 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7024 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7025 $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'
7027 *) # Version 6 and above use weak symbols
7028 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7029 _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'
7033 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7034 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7035 _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'
7039 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7040 _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'
7042 runpath_var=LD_RUN_PATH
7043 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7044 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7046 # Commands to make compiler produce verbose output that lists
7047 # what "hidden" libraries, object files and flags are used when
7048 # linking a shared library.
7050 # There doesn't appear to be a way to prevent this compiler from
7051 # explicitly linking system object files so we need to strip them
7052 # from the output so that they don't get included in the library
7054 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'
7056 xl* | mpixl* | bgxl*)
7057 # IBM XL 8.0 on PPC, with GNU ld
7058 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7059 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7060 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7061 if test yes = "$supports_anon_versioning"; then
7062 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7063 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7064 echo "local: *; };" >> $output_objdir/$libname.ver~
7065 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
7069 case `$CC -V 2>&1 | $SED 5q` in
7072 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7073 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7074 _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'
7075 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7076 _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'
7077 _LT_TAGVAR(compiler_needs_object, $1)=yes
7079 # Not sure whether something based on
7080 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7082 output_verbose_link_cmd='func_echo_all'
7084 # Archives containing C++ object files must be created using
7085 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7086 # necessary to make sure instantiated templates are included
7088 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7096 # FIXME: insert proper C++ library support
7097 _LT_TAGVAR(ld_shlibs, $1)=no
7101 # FIXME: insert proper C++ library support
7102 _LT_TAGVAR(ld_shlibs, $1)=no
7106 case $cc_basename in
7108 # FIXME: insert proper C++ library support
7109 _LT_TAGVAR(ld_shlibs, $1)=no
7112 # FIXME: insert proper C++ library support
7113 _LT_TAGVAR(ld_shlibs, $1)=no
7119 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7120 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7122 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7123 _LT_TAGVAR(hardcode_direct, $1)=yes
7124 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7126 # Workaround some broken pre-1.5 toolchains
7127 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7131 _LT_TAGVAR(ld_shlibs, $1)=yes
7135 if test -f /usr/libexec/ld.so; then
7136 _LT_TAGVAR(hardcode_direct, $1)=yes
7137 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7138 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7139 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7140 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7141 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7142 _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'
7143 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7144 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
7146 output_verbose_link_cmd=func_echo_all
7148 _LT_TAGVAR(ld_shlibs, $1)=no
7152 osf3* | osf4* | osf5*)
7153 case $cc_basename in
7155 # Kuck and Associates, Inc. (KAI) C++ Compiler
7157 # KCC will only create a shared library if the output file
7158 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7159 # to its proper name (with version) after linking.
7160 _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'
7162 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7163 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7165 # Archives containing C++ object files must be created using
7166 # the KAI C++ compiler.
7168 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7169 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7173 # Rational C++ 2.4.1
7174 # FIXME: insert proper C++ library support
7175 _LT_TAGVAR(ld_shlibs, $1)=no
7180 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7181 _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'
7182 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7185 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7186 _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'
7187 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7188 echo "-hidden">> $lib.exp~
7189 $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~
7191 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7195 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7197 # Commands to make compiler produce verbose output that lists
7198 # what "hidden" libraries, object files and flags are used when
7199 # linking a shared library.
7201 # There doesn't appear to be a way to prevent this compiler from
7202 # explicitly linking system object files so we need to strip them
7203 # from the output so that they don't get included in the library
7205 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"'
7208 if test yes,no = "$GXX,$with_gnu_ld"; then
7209 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7212 _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'
7215 _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'
7219 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7220 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7222 # Commands to make compiler produce verbose output that lists
7223 # what "hidden" libraries, object files and flags are used when
7224 # linking a shared library.
7225 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7228 # FIXME: insert proper C++ library support
7229 _LT_TAGVAR(ld_shlibs, $1)=no
7236 # FIXME: insert proper C++ library support
7237 _LT_TAGVAR(ld_shlibs, $1)=no
7241 case $cc_basename in
7244 # FIXME: insert proper C++ library support
7245 _LT_TAGVAR(ld_shlibs, $1)=no
7249 # FIXME: insert proper C++ library support
7250 _LT_TAGVAR(ld_shlibs, $1)=no
7253 # FIXME: insert proper C++ library support
7254 _LT_TAGVAR(ld_shlibs, $1)=no
7260 case $cc_basename in
7262 # Sun C++ 4.2, 5.x and Centerline C++
7263 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7264 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7265 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7266 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7267 $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'
7269 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7270 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7272 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7274 # The compiler driver will combine and reorder linker options,
7275 # but understands '-z linker_flag'.
7276 # Supported since Solaris 2.6 (maybe 2.5.1?)
7277 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7280 _LT_TAGVAR(link_all_deplibs, $1)=yes
7282 output_verbose_link_cmd='func_echo_all'
7284 # Archives containing C++ object files must be created using
7285 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7286 # necessary to make sure instantiated templates are included
7288 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7291 # Green Hills C++ Compiler
7292 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7294 # The C++ compiler must be used to create the archive.
7295 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7298 # GNU C++ compiler with Solaris linker
7299 if test yes,no = "$GXX,$with_gnu_ld"; then
7300 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
7301 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7302 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7303 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7304 $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'
7306 # Commands to make compiler produce verbose output that lists
7307 # what "hidden" libraries, object files and flags are used when
7308 # linking a shared library.
7309 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7311 # g++ 2.7 appears to require '-G' NOT '-shared' on this
7313 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
7314 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7315 $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'
7317 # Commands to make compiler produce verbose output that lists
7318 # what "hidden" libraries, object files and flags are used when
7319 # linking a shared library.
7320 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7323 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
7325 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7327 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
7335 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7336 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7337 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7338 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7339 runpath_var='LD_RUN_PATH'
7341 case $cc_basename in
7343 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7344 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7347 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7348 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7353 sysv5* | sco3.2v5* | sco5v6*)
7354 # Note: We CANNOT use -z defs as we might desire, because we do not
7355 # link with -lc, and that would cause any symbols used from libc to
7356 # always be unresolved, which means just about no library would
7357 # ever link correctly. If we're not using GNU ld we use -z text
7358 # though, which does catch some bad symbols but isn't as heavy-handed
7360 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7361 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
7362 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7363 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7364 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
7365 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7366 _LT_TAGVAR(link_all_deplibs, $1)=yes
7367 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
7368 runpath_var='LD_RUN_PATH'
7370 case $cc_basename in
7372 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7373 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7374 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7375 '"$_LT_TAGVAR(old_archive_cmds, $1)"
7376 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7377 '"$_LT_TAGVAR(reload_cmds, $1)"
7380 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7381 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7387 case $cc_basename in
7389 # NonStop-UX NCC 3.20
7390 # FIXME: insert proper C++ library support
7391 _LT_TAGVAR(ld_shlibs, $1)=no
7394 # FIXME: insert proper C++ library support
7395 _LT_TAGVAR(ld_shlibs, $1)=no
7401 # FIXME: insert proper C++ library support
7402 _LT_TAGVAR(ld_shlibs, $1)=no
7406 # FIXME: insert proper C++ library support
7407 _LT_TAGVAR(ld_shlibs, $1)=no
7411 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7412 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7414 _LT_TAGVAR(GCC, $1)=$GXX
7415 _LT_TAGVAR(LD, $1)=$LD
7418 ## There is no encapsulation within the following macros, do not change
7419 ## the running order or otherwise move them around unless you know exactly
7420 ## what you are doing...
7421 _LT_SYS_HIDDEN_LIBDEPS($1)
7422 _LT_COMPILER_PIC($1)
7423 _LT_COMPILER_C_O($1)
7424 _LT_COMPILER_FILE_LOCKS($1)
7425 _LT_LINKER_SHLIBS($1)
7426 _LT_SYS_DYNAMIC_LINKER($1)
7427 _LT_LINKER_HARDCODE_LIBPATH($1)
7430 fi # test -n "$compiler"
7433 CFLAGS=$lt_save_CFLAGS
7437 with_gnu_ld=$lt_save_with_gnu_ld
7438 lt_cv_path_LDCXX=$lt_cv_path_LD
7439 lt_cv_path_LD=$lt_save_path_LD
7440 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7441 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7442 fi # test yes != "$_lt_caught_CXX_error"
7445 ])# _LT_LANG_CXX_CONFIG
7448 # _LT_FUNC_STRIPNAME_CNF
7449 # ----------------------
7450 # func_stripname_cnf prefix suffix name
7451 # strip PREFIX and SUFFIX off of NAME.
7452 # PREFIX and SUFFIX must not contain globbing or regex special
7453 # characters, hashes, percent signs, but SUFFIX may contain a leading
7454 # dot (in which case that matches only a dot).
7456 # This function is identical to the (non-XSI) version of func_stripname,
7457 # except this one can be used by m4 code that may be executed by configure,
7458 # rather than the libtool script.
7459 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7460 AC_REQUIRE([_LT_DECL_SED])
7461 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7462 func_stripname_cnf ()
7465 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7466 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
7468 } # func_stripname_cnf
7469 ])# _LT_FUNC_STRIPNAME_CNF
7472 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7473 # ---------------------------------
7474 # Figure out "hidden" library dependencies from verbose
7475 # compiler output when linking a shared library.
7476 # Parse the compiler output and extract the necessary
7477 # objects, libraries and library flags.
7478 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7479 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7480 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7481 # Dependencies to place before and after the object being linked:
7482 _LT_TAGVAR(predep_objects, $1)=
7483 _LT_TAGVAR(postdep_objects, $1)=
7484 _LT_TAGVAR(predeps, $1)=
7485 _LT_TAGVAR(postdeps, $1)=
7486 _LT_TAGVAR(compiler_lib_search_path, $1)=
7488 dnl we can't use the lt_simple_compile_test_code here,
7489 dnl because it contains code intended for an executable,
7490 dnl not a library. It's possible we should let each
7491 dnl tag define a new lt_????_link_test_code variable,
7492 dnl but it's only used here...
7493 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7495 void foo (void) { a = 0; }
7497 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7501 Foo (void) { a = 0; }
7506 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7514 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7522 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7525 public void bar (void) {
7530 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
7537 _lt_libdeps_save_CFLAGS=$CFLAGS
7538 case "$CC $CFLAGS " in #(
7539 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7540 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7541 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
7544 dnl Parse the compiler output and extract the necessary
7545 dnl objects, libraries and library flags.
7546 if AC_TRY_EVAL(ac_compile); then
7547 # Parse the compiler output and extract the necessary
7548 # objects, libraries and library flags.
7550 # Sentinel used to keep track of whether or not we are before
7551 # the conftest object file.
7552 pre_test_object_deps_done=no
7554 for p in `eval "$output_verbose_link_cmd"`; do
7558 # Some compilers place space between "-{L,R}" and the path.
7560 if test x-L = "$p" ||
7561 test x-R = "$p"; then
7566 # Expand the sysroot to ease extracting the directories later.
7567 if test -z "$prev"; then
7569 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7570 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7571 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7575 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7577 if test no = "$pre_test_object_deps_done"; then
7580 # Internal compiler library paths should come after those
7581 # provided the user. The postdeps already come after the
7582 # user supplied libs so there is no need to process them.
7583 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7584 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
7586 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
7589 # The "-l" case would never come before the object being
7590 # linked, so don't bother handling this case.
7593 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7594 _LT_TAGVAR(postdeps, $1)=$prev$p
7596 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
7602 *.lto.$objext) ;; # Ignore GCC LTO objects
7604 # This assumes that the test object file only shows up
7605 # once in the compiler output.
7606 if test "$p" = "conftest.$objext"; then
7607 pre_test_object_deps_done=yes
7611 if test no = "$pre_test_object_deps_done"; then
7612 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7613 _LT_TAGVAR(predep_objects, $1)=$p
7615 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7618 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7619 _LT_TAGVAR(postdep_objects, $1)=$p
7621 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7626 *) ;; # Ignore the rest.
7634 echo "libtool.m4: error: problem compiling $1 test program"
7637 $RM -f confest.$objext
7638 CFLAGS=$_lt_libdeps_save_CFLAGS
7640 # PORTME: override above test on systems where it is broken
7644 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7645 # hack all around it, let's just trust "g++" to DTRT.
7646 _LT_TAGVAR(predep_objects,$1)=
7647 _LT_TAGVAR(postdep_objects,$1)=
7648 _LT_TAGVAR(postdeps,$1)=
7653 case " $_LT_TAGVAR(postdeps, $1) " in
7654 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7656 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7657 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7658 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
7660 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7661 [The directories searched by this compiler when creating a shared library])
7662 _LT_TAGDECL([], [predep_objects], [1],
7663 [Dependencies to place before and after the objects being linked to
7664 create a shared library])
7665 _LT_TAGDECL([], [postdep_objects], [1])
7666 _LT_TAGDECL([], [predeps], [1])
7667 _LT_TAGDECL([], [postdeps], [1])
7668 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7669 [The library search path used internally by the compiler when linking
7671 ])# _LT_SYS_HIDDEN_LIBDEPS
7674 # _LT_LANG_F77_CONFIG([TAG])
7675 # --------------------------
7676 # Ensure that the configuration variables for a Fortran 77 compiler are
7677 # suitably defined. These variables are subsequently used by _LT_CONFIG
7678 # to write the compiler configuration to 'libtool'.
7679 m4_defun([_LT_LANG_F77_CONFIG],
7680 [AC_LANG_PUSH(Fortran 77)
7681 if test -z "$F77" || test no = "$F77"; then
7685 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7686 _LT_TAGVAR(allow_undefined_flag, $1)=
7687 _LT_TAGVAR(always_export_symbols, $1)=no
7688 _LT_TAGVAR(archive_expsym_cmds, $1)=
7689 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7690 _LT_TAGVAR(hardcode_direct, $1)=no
7691 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7692 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7693 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7694 _LT_TAGVAR(hardcode_minus_L, $1)=no
7695 _LT_TAGVAR(hardcode_automatic, $1)=no
7696 _LT_TAGVAR(inherit_rpath, $1)=no
7697 _LT_TAGVAR(module_cmds, $1)=
7698 _LT_TAGVAR(module_expsym_cmds, $1)=
7699 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7700 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7701 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7702 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7703 _LT_TAGVAR(no_undefined_flag, $1)=
7704 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7705 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7707 # Source file extension for f77 test sources.
7710 # Object file extension for compiled f77 test sources.
7712 _LT_TAGVAR(objext, $1)=$objext
7714 # No sense in running all these tests if we already determined that
7715 # the F77 compiler isn't working. Some variables (like enable_shared)
7716 # are currently assumed to apply to all compilers on this platform,
7717 # and will be corrupted by setting them based on a non-working compiler.
7718 if test yes != "$_lt_disable_F77"; then
7719 # Code to be used in simple compile tests
7720 lt_simple_compile_test_code="\
7726 # Code to be used in simple link tests
7727 lt_simple_link_test_code="\
7732 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7735 # save warnings/boilerplate of simple test code
7736 _LT_COMPILER_BOILERPLATE
7737 _LT_LINKER_BOILERPLATE
7739 # Allow CC to be a program name with arguments.
7742 lt_save_CFLAGS=$CFLAGS
7746 _LT_TAGVAR(compiler, $1)=$CC
7747 _LT_CC_BASENAME([$compiler])
7749 if test -n "$compiler"; then
7750 AC_MSG_CHECKING([if libtool supports shared libraries])
7751 AC_MSG_RESULT([$can_build_shared])
7753 AC_MSG_CHECKING([whether to build shared libraries])
7754 test no = "$can_build_shared" && enable_shared=no
7756 # On AIX, shared libraries and static libraries use the same namespace, and
7757 # are all built from PIC.
7760 test yes = "$enable_shared" && enable_static=no
7761 if test -n "$RANLIB"; then
7762 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7763 postinstall_cmds='$RANLIB $lib'
7767 if test ia64 != "$host_cpu"; then
7768 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7769 yes,aix,yes) ;; # shared object as lib.so file only
7770 yes,svr4,*) ;; # shared object as lib.so archive member only
7771 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7776 AC_MSG_RESULT([$enable_shared])
7778 AC_MSG_CHECKING([whether to build static libraries])
7779 # Make sure either enable_shared or enable_static is yes.
7780 test yes = "$enable_shared" || enable_static=yes
7781 AC_MSG_RESULT([$enable_static])
7783 _LT_TAGVAR(GCC, $1)=$G77
7784 _LT_TAGVAR(LD, $1)=$LD
7787 ## There is no encapsulation within the following macros, do not change
7788 ## the running order or otherwise move them around unless you know exactly
7789 ## what you are doing...
7790 _LT_COMPILER_PIC($1)
7791 _LT_COMPILER_C_O($1)
7792 _LT_COMPILER_FILE_LOCKS($1)
7793 _LT_LINKER_SHLIBS($1)
7794 _LT_SYS_DYNAMIC_LINKER($1)
7795 _LT_LINKER_HARDCODE_LIBPATH($1)
7798 fi # test -n "$compiler"
7802 CFLAGS=$lt_save_CFLAGS
7803 fi # test yes != "$_lt_disable_F77"
7806 ])# _LT_LANG_F77_CONFIG
7809 # _LT_LANG_FC_CONFIG([TAG])
7810 # -------------------------
7811 # Ensure that the configuration variables for a Fortran compiler are
7812 # suitably defined. These variables are subsequently used by _LT_CONFIG
7813 # to write the compiler configuration to 'libtool'.
7814 m4_defun([_LT_LANG_FC_CONFIG],
7815 [AC_LANG_PUSH(Fortran)
7817 if test -z "$FC" || test no = "$FC"; then
7821 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7822 _LT_TAGVAR(allow_undefined_flag, $1)=
7823 _LT_TAGVAR(always_export_symbols, $1)=no
7824 _LT_TAGVAR(archive_expsym_cmds, $1)=
7825 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7826 _LT_TAGVAR(hardcode_direct, $1)=no
7827 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7828 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7829 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7830 _LT_TAGVAR(hardcode_minus_L, $1)=no
7831 _LT_TAGVAR(hardcode_automatic, $1)=no
7832 _LT_TAGVAR(inherit_rpath, $1)=no
7833 _LT_TAGVAR(module_cmds, $1)=
7834 _LT_TAGVAR(module_expsym_cmds, $1)=
7835 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7836 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7837 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7838 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7839 _LT_TAGVAR(no_undefined_flag, $1)=
7840 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7841 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7843 # Source file extension for fc test sources.
7844 ac_ext=${ac_fc_srcext-f}
7846 # Object file extension for compiled fc test sources.
7848 _LT_TAGVAR(objext, $1)=$objext
7850 # No sense in running all these tests if we already determined that
7851 # the FC compiler isn't working. Some variables (like enable_shared)
7852 # are currently assumed to apply to all compilers on this platform,
7853 # and will be corrupted by setting them based on a non-working compiler.
7854 if test yes != "$_lt_disable_FC"; then
7855 # Code to be used in simple compile tests
7856 lt_simple_compile_test_code="\
7862 # Code to be used in simple link tests
7863 lt_simple_link_test_code="\
7868 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7871 # save warnings/boilerplate of simple test code
7872 _LT_COMPILER_BOILERPLATE
7873 _LT_LINKER_BOILERPLATE
7875 # Allow CC to be a program name with arguments.
7878 lt_save_CFLAGS=$CFLAGS
7882 GCC=$ac_cv_fc_compiler_gnu
7884 _LT_TAGVAR(compiler, $1)=$CC
7885 _LT_CC_BASENAME([$compiler])
7887 if test -n "$compiler"; then
7888 AC_MSG_CHECKING([if libtool supports shared libraries])
7889 AC_MSG_RESULT([$can_build_shared])
7891 AC_MSG_CHECKING([whether to build shared libraries])
7892 test no = "$can_build_shared" && enable_shared=no
7894 # On AIX, shared libraries and static libraries use the same namespace, and
7895 # are all built from PIC.
7898 test yes = "$enable_shared" && enable_static=no
7899 if test -n "$RANLIB"; then
7900 archive_cmds="$archive_cmds~\$RANLIB \$lib"
7901 postinstall_cmds='$RANLIB $lib'
7905 if test ia64 != "$host_cpu"; then
7906 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7907 yes,aix,yes) ;; # shared object as lib.so file only
7908 yes,svr4,*) ;; # shared object as lib.so archive member only
7909 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7914 AC_MSG_RESULT([$enable_shared])
7916 AC_MSG_CHECKING([whether to build static libraries])
7917 # Make sure either enable_shared or enable_static is yes.
7918 test yes = "$enable_shared" || enable_static=yes
7919 AC_MSG_RESULT([$enable_static])
7921 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7922 _LT_TAGVAR(LD, $1)=$LD
7925 ## There is no encapsulation within the following macros, do not change
7926 ## the running order or otherwise move them around unless you know exactly
7927 ## what you are doing...
7928 _LT_SYS_HIDDEN_LIBDEPS($1)
7929 _LT_COMPILER_PIC($1)
7930 _LT_COMPILER_C_O($1)
7931 _LT_COMPILER_FILE_LOCKS($1)
7932 _LT_LINKER_SHLIBS($1)
7933 _LT_SYS_DYNAMIC_LINKER($1)
7934 _LT_LINKER_HARDCODE_LIBPATH($1)
7937 fi # test -n "$compiler"
7941 CFLAGS=$lt_save_CFLAGS
7942 fi # test yes != "$_lt_disable_FC"
7945 ])# _LT_LANG_FC_CONFIG
7948 # _LT_LANG_GCJ_CONFIG([TAG])
7949 # --------------------------
7950 # Ensure that the configuration variables for the GNU Java Compiler compiler
7951 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7952 # to write the compiler configuration to 'libtool'.
7953 m4_defun([_LT_LANG_GCJ_CONFIG],
7954 [AC_REQUIRE([LT_PROG_GCJ])dnl
7957 # Source file extension for Java test sources.
7960 # Object file extension for compiled Java test sources.
7962 _LT_TAGVAR(objext, $1)=$objext
7964 # Code to be used in simple compile tests
7965 lt_simple_compile_test_code="class foo {}"
7967 # Code to be used in simple link tests
7968 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
7970 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7973 # save warnings/boilerplate of simple test code
7974 _LT_COMPILER_BOILERPLATE
7975 _LT_LINKER_BOILERPLATE
7977 # Allow CC to be a program name with arguments.
7979 lt_save_CFLAGS=$CFLAGS
7985 _LT_TAGVAR(compiler, $1)=$CC
7986 _LT_TAGVAR(LD, $1)=$LD
7987 _LT_CC_BASENAME([$compiler])
7989 # GCJ did not exist at the time GCC didn't implicitly link libc in.
7990 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7992 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7993 _LT_TAGVAR(reload_flag, $1)=$reload_flag
7994 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7997 ## There is no encapsulation within the following macros, do not change
7998 ## the running order or otherwise move them around unless you know exactly
7999 ## what you are doing...
8000 if test -n "$compiler"; then
8001 _LT_COMPILER_NO_RTTI($1)
8002 _LT_COMPILER_PIC($1)
8003 _LT_COMPILER_C_O($1)
8004 _LT_COMPILER_FILE_LOCKS($1)
8005 _LT_LINKER_SHLIBS($1)
8006 _LT_LINKER_HARDCODE_LIBPATH($1)
8015 CFLAGS=$lt_save_CFLAGS
8016 ])# _LT_LANG_GCJ_CONFIG
8019 # _LT_LANG_GO_CONFIG([TAG])
8020 # --------------------------
8021 # Ensure that the configuration variables for the GNU Go compiler
8022 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8023 # to write the compiler configuration to 'libtool'.
8024 m4_defun([_LT_LANG_GO_CONFIG],
8025 [AC_REQUIRE([LT_PROG_GO])dnl
8028 # Source file extension for Go test sources.
8031 # Object file extension for compiled Go test sources.
8033 _LT_TAGVAR(objext, $1)=$objext
8035 # Code to be used in simple compile tests
8036 lt_simple_compile_test_code="package main; func main() { }"
8038 # Code to be used in simple link tests
8039 lt_simple_link_test_code='package main; func main() { }'
8041 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8044 # save warnings/boilerplate of simple test code
8045 _LT_COMPILER_BOILERPLATE
8046 _LT_LINKER_BOILERPLATE
8048 # Allow CC to be a program name with arguments.
8050 lt_save_CFLAGS=$CFLAGS
8056 _LT_TAGVAR(compiler, $1)=$CC
8057 _LT_TAGVAR(LD, $1)=$LD
8058 _LT_CC_BASENAME([$compiler])
8060 # Go did not exist at the time GCC didn't implicitly link libc in.
8061 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8063 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8064 _LT_TAGVAR(reload_flag, $1)=$reload_flag
8065 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8068 ## There is no encapsulation within the following macros, do not change
8069 ## the running order or otherwise move them around unless you know exactly
8070 ## what you are doing...
8071 if test -n "$compiler"; then
8072 _LT_COMPILER_NO_RTTI($1)
8073 _LT_COMPILER_PIC($1)
8074 _LT_COMPILER_C_O($1)
8075 _LT_COMPILER_FILE_LOCKS($1)
8076 _LT_LINKER_SHLIBS($1)
8077 _LT_LINKER_HARDCODE_LIBPATH($1)
8086 CFLAGS=$lt_save_CFLAGS
8087 ])# _LT_LANG_GO_CONFIG
8090 # _LT_LANG_RC_CONFIG([TAG])
8091 # -------------------------
8092 # Ensure that the configuration variables for the Windows resource compiler
8093 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8094 # to write the compiler configuration to 'libtool'.
8095 m4_defun([_LT_LANG_RC_CONFIG],
8096 [AC_REQUIRE([LT_PROG_RC])dnl
8099 # Source file extension for RC test sources.
8102 # Object file extension for compiled RC test sources.
8104 _LT_TAGVAR(objext, $1)=$objext
8106 # Code to be used in simple compile tests
8107 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8109 # Code to be used in simple link tests
8110 lt_simple_link_test_code=$lt_simple_compile_test_code
8112 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8115 # save warnings/boilerplate of simple test code
8116 _LT_COMPILER_BOILERPLATE
8117 _LT_LINKER_BOILERPLATE
8119 # Allow CC to be a program name with arguments.
8121 lt_save_CFLAGS=$CFLAGS
8127 _LT_TAGVAR(compiler, $1)=$CC
8128 _LT_CC_BASENAME([$compiler])
8129 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8131 if test -n "$compiler"; then
8139 CFLAGS=$lt_save_CFLAGS
8140 ])# _LT_LANG_RC_CONFIG
8145 AC_DEFUN([LT_PROG_GCJ],
8146 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8147 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8148 [AC_CHECK_TOOL(GCJ, gcj,)
8149 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
8150 AC_SUBST(GCJFLAGS)])])[]dnl
8154 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8155 dnl aclocal-1.4 backwards compatibility:
8156 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8161 AC_DEFUN([LT_PROG_GO],
8162 [AC_CHECK_TOOL(GOC, gccgo,)
8168 AC_DEFUN([LT_PROG_RC],
8169 [AC_CHECK_TOOL(RC, windres,)
8173 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8174 dnl aclocal-1.4 backwards compatibility:
8175 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8180 # If we don't have a new enough Autoconf to choose the best grep
8181 # available, choose the one first in the user's PATH.
8182 m4_defun([_LT_DECL_EGREP],
8183 [AC_REQUIRE([AC_PROG_EGREP])dnl
8184 AC_REQUIRE([AC_PROG_FGREP])dnl
8185 test -z "$GREP" && GREP=grep
8186 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8187 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8188 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8189 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8196 # If we don't have a new enough Autoconf to choose the best objdump
8197 # available, choose the one first in the user's PATH.
8198 m4_defun([_LT_DECL_OBJDUMP],
8199 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8200 test -z "$OBJDUMP" && OBJDUMP=objdump
8201 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8207 # Ensure DLLTOOL variable is set.
8208 m4_defun([_LT_DECL_DLLTOOL],
8209 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8210 test -z "$DLLTOOL" && DLLTOOL=dlltool
8211 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8217 # Check for a file(cmd) program that can be used to detect file type and magic
8218 m4_defun([_LT_DECL_FILECMD],
8219 [AC_CHECK_TOOL([FILECMD], [file], [:])
8220 _LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
8221 ])# _LD_DECL_FILECMD
8225 # Check for a fully-functional sed program, that truncates
8226 # as few characters as possible. Prefer GNU sed if found.
8227 m4_defun([_LT_DECL_SED],
8229 test -z "$SED" && SED=sed
8230 Xsed="$SED -e 1s/^X//"
8231 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8232 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8233 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8236 m4_ifndef([AC_PROG_SED], [
8237 ############################################################
8238 # NOTE: This macro has been submitted for inclusion into #
8239 # GNU Autoconf as AC_PROG_SED. When it is available in #
8240 # a released version of Autoconf we should remove this #
8241 # macro and use it instead. #
8242 ############################################################
8244 m4_defun([AC_PROG_SED],
8245 [AC_MSG_CHECKING([for a sed that does not truncate output])
8246 AC_CACHE_VAL(lt_cv_path_SED,
8247 [# Loop through the user's path and test for sed and gsed.
8248 # Then use that list of sed's as ones to test for truncation.
8249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8253 test -z "$as_dir" && as_dir=.
8254 for lt_ac_prog in sed gsed; do
8255 for ac_exec_ext in '' $ac_executable_extensions; do
8256 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8257 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8265 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8266 # along with /bin/sed that truncates output.
8267 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8268 test ! -f "$lt_ac_sed" && continue
8269 cat /dev/null > conftest.in
8271 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8272 # Check for GNU sed and select it if it is found.
8273 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8274 lt_cv_path_SED=$lt_ac_sed
8278 cat conftest.in conftest.in >conftest.tmp
8279 mv conftest.tmp conftest.in
8280 cp conftest.in conftest.nl
8282 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8283 cmp -s conftest.out conftest.nl || break
8284 # 10000 chars as input seems more than enough
8285 test 10 -lt "$lt_ac_count" && break
8286 lt_ac_count=`expr $lt_ac_count + 1`
8287 if test "$lt_ac_count" -gt "$lt_ac_max"; then
8288 lt_ac_max=$lt_ac_count
8289 lt_cv_path_SED=$lt_ac_sed
8296 AC_MSG_RESULT([$SED])
8301 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8302 dnl aclocal-1.4 backwards compatibility:
8303 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8306 # _LT_CHECK_SHELL_FEATURES
8307 # ------------------------
8308 # Find out whether the shell is Bourne or XSI compatible,
8309 # or has some other useful features.
8310 m4_defun([_LT_CHECK_SHELL_FEATURES],
8311 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8316 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8318 # test EBCDIC or ASCII
8319 case `echo X|tr X '\101'` in
8320 A) # ASCII based system
8321 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8322 lt_SP2NL='tr \040 \012'
8323 lt_NL2SP='tr \015\012 \040\040'
8325 *) # EBCDIC based system
8326 lt_SP2NL='tr \100 \n'
8327 lt_NL2SP='tr \r\n \100\100'
8330 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8331 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8332 ])# _LT_CHECK_SHELL_FEATURES
8335 # _LT_PATH_CONVERSION_FUNCTIONS
8336 # -----------------------------
8337 # Determine what file name conversion functions should be used by
8338 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
8339 # for certain cross-compile configurations and native mingw.
8340 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8341 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8342 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8343 AC_MSG_CHECKING([how to convert $build file names to $host format])
8344 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8348 *-*-mingw* ) # actually msys
8349 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8352 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8354 * ) # otherwise, assume *nix
8355 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8361 *-*-mingw* ) # actually msys
8362 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8365 lt_cv_to_host_file_cmd=func_convert_file_noop
8367 * ) # otherwise, assume *nix
8368 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8372 * ) # unhandled hosts (and "normal" native builds)
8373 lt_cv_to_host_file_cmd=func_convert_file_noop
8377 to_host_file_cmd=$lt_cv_to_host_file_cmd
8378 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8379 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8380 [0], [convert $build file names to $host format])dnl
8382 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8383 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8384 [#assume ordinary cross tools, or native build.
8385 lt_cv_to_tool_file_cmd=func_convert_file_noop
8389 *-*-mingw* ) # actually msys
8390 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8396 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8397 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8398 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8399 [0], [convert $build files to toolchain format])dnl
8400 ])# _LT_PATH_CONVERSION_FUNCTIONS