1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
4 # 2006 Free Software Foundation, Inc.
6 # This file is part of GNU Libtool:
7 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9 # This file is free software; the Free Software Foundation gives
10 # unlimited permission to copy and/or distribute it, with or without
11 # modifications, as long as this notice is preserved.
13 m4_define([_LT_COPYING], [dnl
14 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
15 # 2006 Free Software Foundation, Inc.
17 # This file is part of GNU Libtool:
18 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
20 # This program is free software; you can redistribute it and/or modify
21 # it under the terms of the GNU General Public License as published by
22 # the Free Software Foundation; either version 2 of the License, or
23 # (at your option) any later version.
25 # This program is distributed in the hope that it will be useful, but
26 # WITHOUT ANY WARRANTY; without even the implied warranty of
27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 # General Public License for more details.
30 # You should have received a copy of the GNU General Public License
31 # along with this program; if not, write to the Free Software
32 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
34 # As a special exception to the GNU General Public License, if you
35 # distribute this file as part of a program that contains a
36 # configuration script generated by Autoconf, you may include it under
37 # the same distribution terms that you use for the rest of that program.
45 # Complain and exit if this libtool version is less that VERSION.
47 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
49 [m4_fatal([Libtool version $1 or higher is required],
57 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
58 AC_BEFORE([$0], [LT_LANG])dnl
59 AC_BEFORE([$0], [LT_OUTPUT])dnl
61 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
62 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
63 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
64 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
65 dnl unless we require an AC_DEFUNed macro:
66 AC_REQUIRE([LTOPTIONS_VERSION])dnl
67 AC_REQUIRE([LTSUGAR_VERSION])dnl
68 AC_REQUIRE([LTVERSION_VERSION])dnl
69 m4_require([_LT_PROG_LTMAIN])dnl
70 m4_require([_LT_SET_OPTIONS], [_LT_SET_OPTIONS([$1])])dnl
72 # This can be used to rebuild libtool when needed
73 LIBTOOL_DEPS="$ltmain"
75 # Always use our own libtool.
76 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
86 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
87 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
88 dnl aclocal-1.4 backwards compatibility:
89 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
90 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
95 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
96 m4_defun([_LT_CC_BASENAME],
97 [for cc_temp in $1""; do
99 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
100 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
105 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
109 # _LT_FILEUTILS_DEFAULTS
110 # ----------------------
111 # It is okay to use these file commands and assume they have been set
112 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
113 m4_defun([_LT_FILEUTILS_DEFAULTS],
117 ])# _LT_FILEUTILS_DEFAULTS
122 m4_defun([_LT_SETUP],
123 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
124 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
125 _LT_DECL([], [host_alias], [0], [The host system])dnl
126 _LT_DECL([], [host], [0])dnl
127 _LT_DECL([], [host_os], [0])dnl
129 _LT_DECL([], [build_alias], [0], [The build system])dnl
130 _LT_DECL([], [build], [0])dnl
131 _LT_DECL([], [build_os], [0])dnl
133 AC_REQUIRE([AC_PROG_CC])dnl
134 AC_REQUIRE([LT_PATH_LD])dnl
135 AC_REQUIRE([LT_PATH_NM])dnl
137 AC_REQUIRE([AC_PROG_LN_S])dnl
138 test -z "$LN_S" && LN_S="ln -s"
139 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
141 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
142 AC_REQUIRE([AC_OBJEXT])dnl
143 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
144 AC_REQUIRE([AC_EXEEXT])dnl
145 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
147 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
148 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
149 m4_require([_LT_CMD_RELOAD])dnl
150 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
151 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
152 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
154 _LT_CONFIG_LIBTOOL_INIT([
155 # See if we are running on zsh, and set the options which allow our
156 # commands through without removal of \ escapes INIT.
157 if test -n "\${ZSH_VERSION+set}" ; then
161 if test -n "${ZSH_VERSION+set}" ; then
167 m4_require([_LT_TAG_COMPILER])dnl
168 _LT_PROG_ECHO_BACKSLASH
172 # AIX sometimes has problems with the GCC collect2 program. For some
173 # reason, if we set the COLLECT_NAMES environment variable, the problems
174 # vanish in a puff of smoke.
175 if test "X${COLLECT_NAMES+set}" != Xset; then
182 # Sed substitution that helps us do robust quoting. It backslashifies
183 # metacharacters that are still active within double-quoted strings.
184 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
186 # Same as above, but do not quote variable references.
187 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
189 # Sed substitution to delay expansion of an escaped shell variable in a
190 # double_quote_subst'ed string.
191 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
193 # Sed substitution to delay expansion of an escaped single quote.
194 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
196 # Sed substitution to avoid accidental globbing in evaled expressions
197 no_glob_subst='s/\*/\\\*/g'
203 # All known linkers require a `.a' archive for static linking (except MSVC,
204 # which needs '.lib').
207 with_gnu_ld="$lt_cv_prog_gnu_ld"
212 # Set sane defaults for various variables
213 test -z "$CC" && CC=cc
214 test -z "$LTCC" && LTCC=$CC
215 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
216 test -z "$LD" && LD=ld
217 test -z "$ac_objext" && ac_objext=o
219 _LT_CC_BASENAME([$compiler])
221 # Only perform the check for file, if the check method requires it
222 test -z "$MAGIC_CMD" && MAGIC_CMD=file
223 case $deplibs_check_method in
225 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
231 # Use C for the default configuration in the libtool script
232 LT_SUPPORTED_TAG([CC])
234 _LT_LANG_DEFAULT_CONFIG
241 # Note that this code is called both from `configure', and `config.status'
242 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
243 # `config.status' has no value for ac_aux_dir unless we are using Automake,
244 # so we pass a copy along to make sure it has a sensible value anyway.
245 m4_defun([_LT_PROG_LTMAIN],
246 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
247 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
248 ltmain="$ac_aux_dir/ltmain.sh"
252 ## ------------------------------------- ##
253 ## Accumulate code for creating libtool. ##
254 ## ------------------------------------- ##
256 # So that we can recreate a full libtool script including additional
257 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
258 # in macros and then make a single call at the end using the `libtool'
262 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
263 # ----------------------------------------
264 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
265 m4_define([_LT_CONFIG_LIBTOOL_INIT],
267 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
272 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
275 # _LT_CONFIG_LIBTOOL([COMMANDS])
276 # ------------------------------
277 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
278 m4_define([_LT_CONFIG_LIBTOOL],
280 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
285 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
288 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
289 # -----------------------------------------------------
290 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
291 [_LT_CONFIG_LIBTOOL([$1])
292 _LT_CONFIG_LIBTOOL_INIT([$2])
296 # _LT_FORMAT_COMMENT([COMMENT])
297 # -----------------------------
298 # Add leading comment marks to the start of each line, and a trailing
299 # full-stop to the whole comment if one is not present already.
300 m4_define([_LT_FORMAT_COMMENT],
302 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
303 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
308 ## ------------------------ ##
309 ## FIXME: Eliminate VARNAME ##
310 ## ------------------------ ##
313 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
314 # -------------------------------------------------------------------
315 # CONFIGNAME is the name given to the value in the libtool script.
316 # VARNAME is the (base) name used in the configure script.
317 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
318 # VARNAME. Any other value will be used directly.
319 m4_define([_LT_DECL],
320 [lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]],
321 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
322 [m4_ifval([$1], [$1], [$2])])
323 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
325 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
326 lt_dict_add_subkey([lt_decl_dict], [$2],
327 [tagged?], [m4_ifval([$5], [yes], [no])])])
331 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
332 # --------------------------------------------------------
333 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
336 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
337 # ------------------------------------------------
338 m4_define([lt_decl_tag_varnames],
339 [_lt_decl_filter([tagged?], [yes], $@)])
342 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
343 # ---------------------------------------------------------
344 m4_define([_lt_decl_filter],
346 [0], [m4_fatal([$0: too few arguments: $#])],
347 [1], [m4_fatal([$0: too few arguments: $#: $1])],
348 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
349 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
350 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
354 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
355 # --------------------------------------------------
356 m4_define([lt_decl_quote_varnames],
357 [_lt_decl_filter([value], [1], $@)])
360 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
361 # ---------------------------------------------------
362 m4_define([lt_decl_dquote_varnames],
363 [_lt_decl_filter([value], [2], $@)])
366 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
367 # ---------------------------------------------------
368 m4_define([lt_decl_varnames_tagged],
369 [_$0(m4_quote(m4_default([$1], [[, ]])),
370 m4_quote(m4_if([$2], [],
371 m4_quote(lt_decl_tag_varnames),
372 m4_quote(m4_shift($@)))),
373 m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
374 m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
377 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
378 # ------------------------------------------------
379 m4_define([lt_decl_all_varnames],
380 [_$0(m4_quote(m4_default([$1], [[, ]])),
382 m4_quote(lt_decl_varnames),
383 m4_quote(m4_shift($@))))[]dnl
385 m4_define([_lt_decl_all_varnames],
386 [lt_join($@, lt_decl_varnames_tagged([$1],
387 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
391 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
392 # ------------------------------------
393 # Quote a variable value, and forward it to `config.status' so that its
394 # declaration there will have the same value as in `configure'. VARNAME
395 # must have a single quote delimited value for this to work.
396 m4_define([_LT_CONFIG_STATUS_DECLARE],
397 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
400 # _LT_CONFIG_STATUS_DECLARATIONS
401 # ------------------------------
402 # We delimit libtool config variables with single quotes, so when
403 # we write them to config.status, we have to be sure to quote all
404 # embedded single quotes properly. In configure, this macro expands
405 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
407 # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
408 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
409 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
410 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
415 # Output comment and list of tags supported by the script
416 m4_defun([_LT_LIBTOOL_TAGS],
417 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
418 available_tags="_LT_TAGS"dnl
422 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
423 # -----------------------------------
424 # Extract the dictionary values for VARNAME (optionally with TAG) and
425 # expand to a commented shell variable setting:
427 # # Some comment about what VAR is for.
428 # visible_name=$lt_internal_name
429 m4_define([_LT_LIBTOOL_DECLARE],
430 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
431 [description])))[]dnl
432 m4_pushdef([_libtool_name],
433 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
434 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
435 [0], [_libtool_name=[$]$1],
436 [1], [_libtool_name=$lt_[]$1],
437 [2], [_libtool_name=$lt_[]$1],
438 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
439 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
443 # _LT_LIBTOOL_CONFIG_VARS
444 # -----------------------
445 # Produce commented declarations of non-tagged libtool config variables
446 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
447 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
448 # section) are produced by _LT_LIBTOOL_TAG_VARS.
449 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
450 [m4_foreach([_lt_var],
451 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
452 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
455 # _LT_LIBTOOL_TAG_VARS(TAG)
456 # -------------------------
457 m4_define([_LT_LIBTOOL_TAG_VARS],
458 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
459 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
462 # _LT_TAGVAR(VARNAME, [TAGNAME])
463 # ------------------------------
464 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
467 # _LT_CONFIG_COMMANDS
468 # -------------------
469 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
470 # variables for single and double quote escaping we saved from calls
471 # to _LT_DECL, we can put quote escaped variables declarations
472 # into `config.status', and then the shell code to quote escape them in
473 # for loops in `config.status'. Finally, any additional code accumulated
474 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
475 m4_defun([_LT_CONFIG_COMMANDS],
476 [AC_PROVIDE_IFELSE([LT_OUTPUT],
477 dnl If the libtool generation code has been placed in $CONFIG_LT,
478 dnl instead of duplicating it all over again into config.status,
479 dnl then we will have config.status run $CONFIG_LT later, so it
480 dnl needs to know what name is stored there:
481 [AC_CONFIG_COMMANDS([libtool],
482 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
483 dnl If the libtool generation code is destined for config.status,
484 dnl expand the accumulated commands and init code now:
485 [AC_CONFIG_COMMANDS([libtool],
486 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
487 ])#_LT_CONFIG_COMMANDS
491 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
494 # The HP-UX ksh and POSIX shell print the target directory to stdout
496 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
498 sed_quote_subst='$sed_quote_subst'
499 double_quote_subst='$double_quote_subst'
500 delay_variable_subst='$delay_variable_subst'
501 _LT_CONFIG_STATUS_DECLARATIONS
504 compiler='$compiler_DEFAULT'
506 # Quote evaled strings.
507 for var in lt_decl_all_varnames([[ \
508 ]], lt_decl_quote_varnames); do
509 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
510 *[[\\\\\\\`\\"\\\$]]*)
511 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
514 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
519 # Double-quote double-evaled strings.
520 for var in lt_decl_all_varnames([[ \
521 ]], lt_decl_dquote_varnames); do
522 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
523 *[[\\\\\\\`\\"\\\$]]*)
524 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
527 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
532 # Fix-up fallback echo if it was mangled by the above quoting rules.
534 *'\\\[$]0 --fallback-echo"')dnl "
535 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
539 _LT_OUTPUT_LIBTOOL_INIT
545 # This macro allows early generation of the libtool script (before
546 # AC_OUTPUT is called), incase it is used in configure for compilation
548 AC_DEFUN([LT_OUTPUT],
549 [: ${CONFIG_LT=./config.lt}
550 AC_MSG_NOTICE([creating $CONFIG_LT])
551 cat >"$CONFIG_LT" <<_LTEOF
553 # Generated by $as_me.
554 # Run this file to recreate a libtool stub with the current configuration.
557 SHELL=\${CONFIG_SHELL-$SHELL}
560 cat >>"$CONFIG_LT" <<\_LTEOF
564 exec AS_MESSAGE_FD>&1
565 exec AS_MESSAGE_LOG_FD>>config.log
568 AS_BOX([Running $as_me.])
569 } >&AS_MESSAGE_LOG_FD
572 \`$as_me' creates a local libtool stub from the current configuration,
573 for use in further configure time tests before the real libtool is
576 Usage: $[0] [[OPTIONS]]
578 -h, --help print this help, then exit
579 -V, --version print version number, then exit
580 -q, --quiet do not print progress messages
581 -d, --debug don't remove temporary files
583 Report bugs to <bug-libtool@gnu.org>."
586 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
587 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
588 configured by $[0], generated by m4_PACKAGE_STRING.
590 Copyright (C) 2006 Free Software Foundation, Inc.
591 This config.lt script is free software; the Free Software Foundation
592 gives unlimited permision to copy, distribute and modify it."
597 --version | --v* | -V )
598 echo "$lt_cl_version"; exit 0 ;;
600 echo "$lt_cl_help"; exit 0 ;;
601 --debug | --d* | -d )
603 --quiet | --q* | --silent | --s* | -q )
606 -*) AC_MSG_ERROR([unrecognized option: $[1]
607 Try `$[0] --help' for more information.]) ;;
609 *) AC_MSG_ERROR([unrecognized argument: $[1]
610 Try `$[0] --help for more information.]) ;;
615 if $lt_cl_silent; then
616 exec AS_MESSAGE_FD>/dev/null
620 cat >>"$CONFIG_LT" <<_LTEOF
621 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
624 cat >>"$CONFIG_LT" <<\_LTEOF
625 AC_MSG_NOTICE([creating $ofile])
626 _LT_OUTPUT_LIBTOOL_COMMANDS
629 chmod +x "$CONFIG_LT"
631 # configure is writing to config.log, but config.lt does its own redirection,
632 # appending to config.log, which fails on DOS, as config.log is still kept
633 # open by configure. Here we exec the FD to /dev/null, effectively closing
634 # config.log, so it can be properly (re)opened and appended to by config.lt.
635 if test "$no_create" != yes; then
637 test "$silent" = yes &&
638 lt_config_lt_args="$lt_config_lt_args --quiet"
639 exec AS_MESSAGE_LOG_FD>/dev/null
640 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
641 exec AS_MESSAGE_LOG_FD>>config.log
642 $lt_cl_success || AS_EXIT(1)
649 # If TAG is the built-in tag, create an initial libtool script with a
650 # default configuration from the untagged config vars. Otherwise add code
651 # to config.status for appending the configuration named by TAG from the
652 # matching tagged config vars.
653 m4_defun([_LT_CONFIG],
654 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
655 _LT_CONFIG_SAVE_COMMANDS([
656 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
657 m4_if(_LT_TAG, [C], [
658 # See if we are running on zsh, and set the options which allow our
659 # commands through without removal of \ escapes.
660 if test -n "${ZSH_VERSION+set}" ; then
665 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
668 cat <<_LT_EOF >> "$cfgfile"
671 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
672 # Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION
673 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
674 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
677 # TEST SUITE MARKER ## BEGIN SOURCABLE
680 # ### BEGIN LIBTOOL CONFIG
681 _LT_LIBTOOL_CONFIG_VARS
683 # ### END LIBTOOL CONFIG
689 cat <<\_LT_EOF >> "$cfgfile"
690 # AIX sometimes has problems with the GCC collect2 program. For some
691 # reason, if we set the COLLECT_NAMES environment variable, the problems
692 # vanish in a puff of smoke.
693 if test "X${COLLECT_NAMES+set}" != Xset; then
703 # We use sed instead of cat because bash on DJGPP gets confused if
704 # if finds mixed CR/LF and LF-only lines. Since sed operates in
705 # text mode, it properly converts lines to CR/LF. This bash problem
706 # is reportedly fixed, but why not run on old versions too?
707 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
708 || (rm -f "$cfgfile"; exit 1)
710 _LT_PROG_XSI_SHELLFNS
712 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
713 || (rm -f "$cfgfile"; exit 1)
715 mv -f "$cfgfile" "$ofile" ||
716 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
719 [cat <<_LT_EOF >> "$ofile"
721 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
722 dnl in a comment (ie after a #).
723 # ### BEGIN LIBTOOL TAG CONFIG: $1
724 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
725 # ### END LIBTOOL TAG CONFIG: $1
732 TIMESTAMP='$TIMESTAMP'
735 ])dnl /_LT_CONFIG_SAVE_COMMANDS
739 # LT_SUPPORTED_TAG(TAG)
740 # ---------------------
741 # Trace this macro to discover what tags are supported by the libtool
742 # --tag option, using:
743 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
744 AC_DEFUN([LT_SUPPORTED_TAG], [])
747 # C support is built-in for now
748 m4_define([_LT_LANG_C_enabled], [])
749 m4_define([_LT_TAGS], [])
754 # Enable libtool support for the given language if not already enabled.
756 [AC_BEFORE([$0], [LT_OUTPUT])dnl
759 [C++], [_LT_LANG(CXX)],
760 [Java], [_LT_LANG(GCJ)],
761 [Fortran 77], [_LT_LANG(F77)],
762 [Fortran], [_LT_LANG(FC)],
763 [Windows Resource], [_LT_LANG(RC)],
764 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
766 [m4_fatal([$0: unsupported language: "$1"])])])dnl
773 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
774 [LT_SUPPORTED_TAG([$1])dnl
775 m4_append([_LT_TAGS], [$1 ])dnl
776 m4_define([_LT_LANG_]$1[_enabled], [])dnl
777 _LT_LANG_$1_CONFIG($1)])dnl
781 # _LT_LANG_DEFAULT_CONFIG
782 # -----------------------
783 m4_defun([_LT_LANG_DEFAULT_CONFIG],
784 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
786 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
788 AC_PROVIDE_IFELSE([AC_PROG_F77],
790 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
792 AC_PROVIDE_IFELSE([AC_PROG_FC],
794 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
796 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
797 dnl pulling things in needlessly.
798 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
800 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
802 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
804 [m4_ifdef([AC_PROG_GCJ],
805 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
806 m4_ifdef([A][M_PROG_GCJ],
807 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
808 m4_ifdef([LT_PROG_GCJ],
809 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
811 AC_PROVIDE_IFELSE([LT_PROG_RC],
813 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
814 ])# _LT_LANG_DEFAULT_CONFIG
817 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
818 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
819 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
820 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
821 dnl aclocal-1.4 backwards compatibility:
822 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
823 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
824 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
825 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
830 m4_defun([_LT_TAG_COMPILER],
831 [AC_REQUIRE([AC_PROG_CC])dnl
833 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
834 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
835 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
836 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
838 # If no C compiler was specified, use CC.
841 # If no C compiler flags were specified, use CFLAGS.
842 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
844 # Allow CC to be a program name with arguments.
849 # _LT_COMPILER_BOILERPLATE
850 # ------------------------
851 # Check for compiler boilerplate output or warnings with
852 # the simple compiler test code.
853 m4_defun([_LT_COMPILER_BOILERPLATE],
854 [ac_outfile=conftest.$ac_objext
855 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
856 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
857 _lt_compiler_boilerplate=`cat conftest.err`
859 ])# _LT_COMPILER_BOILERPLATE
862 # _LT_LINKER_BOILERPLATE
863 # ----------------------
864 # Check for linker boilerplate output or warnings with
865 # the simple link test code.
866 m4_defun([_LT_LINKER_BOILERPLATE],
867 [ac_outfile=conftest.$ac_objext
868 echo "$lt_simple_link_test_code" >conftest.$ac_ext
869 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
870 _lt_linker_boilerplate=`cat conftest.err`
872 ])# _LT_LINKER_BOILERPLATE
875 # _LT_SYS_MODULE_PATH_AIX
876 # -----------------------
877 # Links a minimal program and checks the executable
878 # for the system default hardcoded library path. In most cases,
879 # this is /usr/lib:/lib, but when the MPI compilers are used
880 # the location of the communication and MPI libs are included too.
881 # If we don't find anything, use the default library path according
882 # to the aix ld manual.
883 m4_defun([_LT_SYS_MODULE_PATH_AIX],
884 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
886 /Import File Strings/,/^$/ {
892 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
893 # Check for a 64-bit object if we didn't find anything.
894 if test -z "$aix_libpath"; then
895 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
897 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
898 ])# _LT_SYS_MODULE_PATH_AIX
901 # _LT_SHELL_INIT(ARG)
902 # -------------------
903 m4_define([_LT_SHELL_INIT],
904 [ifdef([AC_DIVERSION_NOTICE],
905 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
906 [AC_DIVERT_PUSH(NOTICE)])
912 # _LT_PROG_ECHO_BACKSLASH
913 # -----------------------
914 # Add some code to the start of the generated configure script which
915 # will find an echo command which doesn't interpret backslashes.
916 m4_defun([_LT_PROG_ECHO_BACKSLASH],
918 # Check that we are running under the correct shell.
919 SHELL=${CONFIG_SHELL-/bin/sh}
923 # Remove one level of quotation (which was required for Make).
924 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
929 if test "X[$]1" = X--no-reexec; then
930 # Discard the --no-reexec flag, and continue.
932 elif test "X[$]1" = X--fallback-echo; then
933 # Avoid inline document here, it may be left over
935 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
936 # Yippee, $ECHO works!
939 # Restart under the correct shell.
940 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
943 if test "X[$]1" = X--fallback-echo; then
944 # used as fallback echo
952 # The HP-UX ksh and POSIX shell print the target directory to stdout
954 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
956 if test -z "$lt_ECHO"; then
957 if test "X${echo_test_string+set}" != Xset; then
958 # find a string as large as possible, as long as the shell can cope with it
959 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
960 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
961 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
962 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
969 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
970 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
971 test "X$echo_testing_string" = "X$echo_test_string"; then
974 # The Solaris, AIX, and Digital Unix default echo programs unquote
975 # backslashes. This makes it impossible to quote backslashes using
976 # echo "$something" | sed 's/\\/\\\\/g'
978 # So, first we look for a working echo in the user's PATH.
980 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
981 for dir in $PATH /usr/ucb; do
983 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
984 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
985 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
986 test "X$echo_testing_string" = "X$echo_test_string"; then
993 if test "X$ECHO" = Xecho; then
994 # We didn't find a better echo, so look for alternatives.
995 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
996 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
997 test "X$echo_testing_string" = "X$echo_test_string"; then
998 # This shell has a builtin print -r that does the trick.
1000 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1001 test "X$CONFIG_SHELL" != X/bin/ksh; then
1002 # If we have ksh, try running configure again with it.
1003 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1004 export ORIGINAL_CONFIG_SHELL
1005 CONFIG_SHELL=/bin/ksh
1007 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1011 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1012 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1013 test "X$echo_testing_string" = "X$echo_test_string"; then
1014 # Cool, printf works
1016 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1017 test "X$echo_testing_string" = 'X\t' &&
1018 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1019 test "X$echo_testing_string" = "X$echo_test_string"; then
1020 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1022 SHELL="$CONFIG_SHELL"
1024 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1025 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1026 test "X$echo_testing_string" = 'X\t' &&
1027 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1028 test "X$echo_testing_string" = "X$echo_test_string"; then
1029 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1031 # maybe with a smaller string...
1034 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1035 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1042 if test "$prev" != 'sed 50q "[$]0"'; then
1043 echo_test_string=`eval $prev`
1044 export echo_test_string
1045 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1047 # Oops. We lost completely, so just stick with echo.
1056 # Copy echo and quote the copy suitably for passing to libtool from
1057 # the Makefile, instead of quoting the original, which is used later.
1059 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1060 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1065 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1066 _LT_DECL([], [ECHO], [1],
1067 [An echo program that does not interpret backslashes])
1068 ])# _LT_PROG_ECHO_BACKSLASH
1073 m4_defun([_LT_ENABLE_LOCK],
1074 [AC_REQUIRE([AC_OBJEXT])dnl
1075 AC_ARG_ENABLE([libtool-lock],
1076 [AS_HELP_STRING([--disable-libtool-lock],
1077 [avoid locking (might break parallel builds)])])
1078 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1080 # Some flags need to be propagated to the compiler or linker for good
1084 # Find out which ABI we are using.
1085 echo 'int i;' > conftest.$ac_ext
1086 if AC_TRY_EVAL(ac_compile); then
1087 case `/usr/bin/file conftest.$ac_objext` in
1099 # Find out which ABI we are using.
1100 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1101 if AC_TRY_EVAL(ac_compile); then
1102 if test "$lt_cv_prog_gnu_ld" = yes; then
1103 case `/usr/bin/file conftest.$ac_objext` in
1105 LD="${LD-ld} -melf32bsmip"
1108 LD="${LD-ld} -melf32bmipn32"
1111 LD="${LD-ld} -melf64bmip"
1115 case `/usr/bin/file conftest.$ac_objext` in
1131 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1132 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1133 # Find out which ABI we are using.
1134 echo 'int i;' > conftest.$ac_ext
1135 if AC_TRY_EVAL(ac_compile); then
1136 case `/usr/bin/file conftest.o` in
1139 x86_64-*kfreebsd*-gnu)
1140 LD="${LD-ld} -m elf_i386_fbsd"
1143 LD="${LD-ld} -m elf_i386"
1145 ppc64-*linux*|powerpc64-*linux*)
1146 LD="${LD-ld} -m elf32ppclinux"
1149 LD="${LD-ld} -m elf_s390"
1152 LD="${LD-ld} -m elf32_sparc"
1158 x86_64-*kfreebsd*-gnu)
1159 LD="${LD-ld} -m elf_x86_64_fbsd"
1162 LD="${LD-ld} -m elf_x86_64"
1164 ppc*-*linux*|powerpc*-*linux*)
1165 LD="${LD-ld} -m elf64ppc"
1167 s390*-*linux*|s390*-*tpf*)
1168 LD="${LD-ld} -m elf64_s390"
1171 LD="${LD-ld} -m elf64_sparc"
1181 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1182 SAVE_CFLAGS="$CFLAGS"
1183 CFLAGS="$CFLAGS -belf"
1184 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1186 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1188 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1189 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1190 CFLAGS="$SAVE_CFLAGS"
1194 # Find out which ABI we are using.
1195 echo 'int i;' > conftest.$ac_ext
1196 if AC_TRY_EVAL(ac_compile); then
1197 case `/usr/bin/file conftest.o` in
1199 case $lt_cv_prog_gnu_ld in
1200 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1201 *) LD="${LD-ld} -64" ;;
1210 need_locks="$enable_libtool_lock"
1214 # _LT_CMD_OLD_ARCHIVE
1215 # -------------------
1216 m4_defun([_LT_CMD_OLD_ARCHIVE],
1217 [AC_CHECK_TOOL(AR, ar, false)
1218 test -z "$AR" && AR=ar
1219 test -z "$AR_FLAGS" && AR_FLAGS=cru
1220 _LT_DECL([], [AR], [1], [The archiver])
1221 _LT_DECL([], [AR_FLAGS], [1])
1223 AC_CHECK_TOOL(STRIP, strip, :)
1224 test -z "$STRIP" && STRIP=:
1225 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1227 AC_CHECK_TOOL(RANLIB, ranlib, :)
1228 test -z "$RANLIB" && RANLIB=:
1229 _LT_DECL([], [RANLIB], [1],
1230 [Commands used to install an old-style archive])
1232 # Determine commands to create old-style static archives.
1233 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1234 old_postinstall_cmds='chmod 644 $oldlib'
1235 old_postuninstall_cmds=
1237 if test -n "$RANLIB"; then
1240 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1243 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1246 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1248 _LT_DECL([], [old_postinstall_cmds], [2])
1249 _LT_DECL([], [old_postuninstall_cmds], [2])
1250 _LT_TAGDECL([], [old_archive_cmds], [2],
1251 [Commands used to build an old-style archive])
1252 ])# _LT_CMD_OLD_ARCHIVE
1255 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1256 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1257 # ----------------------------------------------------------------
1258 # Check whether the given compiler option works
1259 AC_DEFUN([_LT_COMPILER_OPTION],
1260 [AC_REQUIRE([AC_OBJEXT])dnl
1261 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1262 m4_require([_LT_DECL_SED])dnl
1263 AC_CACHE_CHECK([$1], [$2],
1265 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1266 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1267 lt_compiler_flag="$3"
1268 # Insert the option either (1) after the last *FLAGS variable, or
1269 # (2) before a word containing "conftest.", or (3) at the end.
1270 # Note that $ac_compile itself does not contain backslashes and begins
1271 # with a dollar sign (not a hyphen), so the echo should work correctly.
1272 # The option is referenced via a variable to avoid confusing sed.
1273 lt_compile=`echo "$ac_compile" | $SED \
1274 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1275 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1276 -e 's:$: $lt_compiler_flag:'`
1277 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1278 (eval "$lt_compile" 2>conftest.err)
1280 cat conftest.err >&AS_MESSAGE_LOG_FD
1281 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1282 if (exit $ac_status) && test -s "$ac_outfile"; then
1283 # The compiler can only warn and ignore the option if not recognized
1284 # So say no if there are warnings other than the usual output.
1285 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1286 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1287 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1294 if test x"[$]$2" = xyes; then
1295 m4_if([$5], , :, [$5])
1297 m4_if([$6], , :, [$6])
1299 ])# _LT_COMPILER_OPTION
1302 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1303 dnl aclocal-1.4 backwards compatibility:
1304 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1307 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1308 # [ACTION-SUCCESS], [ACTION-FAILURE])
1309 # ----------------------------------------------------
1310 # Check whether the given linker option works
1311 AC_DEFUN([_LT_LINKER_OPTION],
1312 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1313 m4_require([_LT_DECL_SED])dnl
1314 AC_CACHE_CHECK([$1], [$2],
1316 save_LDFLAGS="$LDFLAGS"
1317 LDFLAGS="$LDFLAGS $3"
1318 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1319 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1320 # The linker can only warn and ignore the option if not recognized
1321 # So say no if there are warnings
1322 if test -s conftest.err; then
1323 # Append any errors to the config.log.
1324 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1325 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1326 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1327 if diff conftest.exp conftest.er2 >/dev/null; then
1335 LDFLAGS="$save_LDFLAGS"
1338 if test x"[$]$2" = xyes; then
1339 m4_if([$4], , :, [$4])
1341 m4_if([$5], , :, [$5])
1343 ])# _LT_LINKER_OPTION
1346 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1347 dnl aclocal-1.4 backwards compatibility:
1348 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1353 AC_DEFUN([LT_CMD_MAX_LEN],
1354 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1355 # find the maximum length of command line arguments
1356 AC_MSG_CHECKING([the maximum length of command line arguments])
1357 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1363 # On DJGPP, this test can blow up pretty badly due to problems in libc
1364 # (any single argument exceeding 2000 bytes causes a buffer overrun
1365 # during glob expansion). Even if it were fixed, the result of this
1366 # check would be larger than it should be.
1367 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1371 # Under GNU Hurd, this test is not required because there is
1372 # no limit to the length of command line arguments.
1373 # Libtool will interpret -1 as no limit whatsoever
1374 lt_cv_sys_max_cmd_len=-1;
1378 # On Win9x/ME, this test blows up -- it succeeds, but takes
1379 # about 5 minutes as the teststring grows exponentially.
1380 # Worse, since 9x/ME are not pre-emptively multitasking,
1381 # you end up with a "frozen" computer, even though with patience
1382 # the test eventually succeeds (with a max line length of 256k).
1383 # Instead, let's just punt: use the minimum linelength reported by
1384 # all of the supported platforms: 8192 (on NT/2K/XP).
1385 lt_cv_sys_max_cmd_len=8192;
1389 # On AmigaOS with pdksh, this test takes hours, literally.
1390 # So we just punt and use a minimum line length of 8192.
1391 lt_cv_sys_max_cmd_len=8192;
1394 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1395 # This has been around since 386BSD, at least. Likely further.
1396 if test -x /sbin/sysctl; then
1397 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1398 elif test -x /usr/sbin/sysctl; then
1399 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1401 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1403 # And add a safety zone
1404 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1405 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1409 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1410 lt_cv_sys_max_cmd_len=196608
1414 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1415 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1416 # nice to cause kernel panics so lets avoid the loop below.
1417 # First set a reasonable default.
1418 lt_cv_sys_max_cmd_len=16384
1420 if test -x /sbin/sysconfig; then
1421 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1422 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1427 lt_cv_sys_max_cmd_len=102400
1429 sysv5* | sco5v6* | sysv4.2uw2*)
1430 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1431 if test -n "$kargmax"; then
1432 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1434 lt_cv_sys_max_cmd_len=32768
1438 # Make teststring a little bigger before we do anything with it.
1439 # a 1K string should be a reasonable start.
1440 for i in 1 2 3 4 5 6 7 8 ; do
1441 teststring=$teststring$teststring
1443 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1444 # If test is not a shell built-in, we'll probably end up computing a
1445 # maximum length that is only half of the actual maximum length, but
1447 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1448 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1449 test $i != 17 # 1/2 MB should be enough
1452 teststring=$teststring$teststring
1454 # Only check the string length outside the loop.
1455 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1457 # Add a significant safety factor because C++ compilers can tack on massive
1458 # amounts of additional arguments before passing them to the linker.
1459 # It appears as though 1/2 is a usable value.
1460 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1464 if test -n $lt_cv_sys_max_cmd_len ; then
1465 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1469 max_cmd_len=$lt_cv_sys_max_cmd_len
1470 _LT_DECL([], [max_cmd_len], [0],
1471 [What is the maximum length of a command?])
1475 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1476 dnl aclocal-1.4 backwards compatibility:
1477 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1482 m4_defun([_LT_HEADER_DLFCN],
1483 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1484 ])# _LT_HEADER_DLFCN
1487 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1488 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1489 # ----------------------------------------------------------------
1490 m4_defun([_LT_TRY_DLOPEN_SELF],
1491 [m4_require([_LT_HEADER_DLFCN])dnl
1492 if test "$cross_compiling" = yes; then :
1495 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1496 lt_status=$lt_dlunknown
1497 cat > conftest.$ac_ext <<_LT_EOF
1498 [#line __oline__ "configure"
1499 #include "confdefs.h"
1508 # define LT_DLGLOBAL RTLD_GLOBAL
1511 # define LT_DLGLOBAL DL_GLOBAL
1513 # define LT_DLGLOBAL 0
1517 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1518 find out it does not work in some platform. */
1519 #ifndef LT_DLLAZY_OR_NOW
1521 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1524 # define LT_DLLAZY_OR_NOW DL_LAZY
1527 # define LT_DLLAZY_OR_NOW RTLD_NOW
1530 # define LT_DLLAZY_OR_NOW DL_NOW
1532 # define LT_DLLAZY_OR_NOW 0
1540 extern "C" void exit (int);
1543 void fnord() { int i=42;}
1546 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1547 int status = $lt_dlunknown;
1551 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1552 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1553 /* dlclose (self); */
1561 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1562 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1565 x$lt_dlno_uscore) $1 ;;
1566 x$lt_dlneed_uscore) $2 ;;
1567 x$lt_dlunknown|x*) $3 ;;
1570 # compilation failed
1575 ])# _LT_TRY_DLOPEN_SELF
1578 # LT_SYS_DLOPEN_SELF
1579 # ------------------
1580 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1581 [m4_require([_LT_HEADER_DLFCN])dnl
1582 if test "x$enable_dlopen" != xyes; then
1583 enable_dlopen=unknown
1584 enable_dlopen_self=unknown
1585 enable_dlopen_self_static=unknown
1592 lt_cv_dlopen="load_add_on"
1594 lt_cv_dlopen_self=yes
1598 lt_cv_dlopen="LoadLibrary"
1603 lt_cv_dlopen="dlopen"
1608 # if libdl is installed we need to link against it
1609 AC_CHECK_LIB([dl], [dlopen],
1610 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1613 lt_cv_dlopen_self=yes
1618 AC_CHECK_FUNC([shl_load],
1619 [lt_cv_dlopen="shl_load"],
1620 [AC_CHECK_LIB([dld], [shl_load],
1621 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1622 [AC_CHECK_FUNC([dlopen],
1623 [lt_cv_dlopen="dlopen"],
1624 [AC_CHECK_LIB([dl], [dlopen],
1625 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1626 [AC_CHECK_LIB([svld], [dlopen],
1627 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1628 [AC_CHECK_LIB([dld], [dld_link],
1629 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1638 if test "x$lt_cv_dlopen" != xno; then
1644 case $lt_cv_dlopen in
1646 save_CPPFLAGS="$CPPFLAGS"
1647 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1649 save_LDFLAGS="$LDFLAGS"
1650 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1653 LIBS="$lt_cv_dlopen_libs $LIBS"
1655 AC_CACHE_CHECK([whether a program can dlopen itself],
1656 lt_cv_dlopen_self, [dnl
1657 _LT_TRY_DLOPEN_SELF(
1658 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1659 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1662 if test "x$lt_cv_dlopen_self" = xyes; then
1663 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1664 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1665 lt_cv_dlopen_self_static, [dnl
1666 _LT_TRY_DLOPEN_SELF(
1667 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1668 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1672 CPPFLAGS="$save_CPPFLAGS"
1673 LDFLAGS="$save_LDFLAGS"
1678 case $lt_cv_dlopen_self in
1679 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1680 *) enable_dlopen_self=unknown ;;
1683 case $lt_cv_dlopen_self_static in
1684 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1685 *) enable_dlopen_self_static=unknown ;;
1688 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1689 [Whether dlopen is supported])
1690 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1691 [Whether dlopen of programs is supported])
1692 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1693 [Whether dlopen of statically linked programs is supported])
1694 ])# LT_SYS_DLOPEN_SELF
1697 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1698 dnl aclocal-1.4 backwards compatibility:
1699 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1702 # _LT_COMPILER_C_O([TAGNAME])
1703 # ---------------------------
1704 # Check to see if options -c and -o are simultaneously supported by compiler.
1705 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1706 m4_defun([_LT_COMPILER_C_O],
1707 [AC_REQUIRE([AC_OBJEXT])dnl
1708 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1709 m4_require([_LT_TAG_COMPILER])dnl
1710 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1711 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1712 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1713 $RM -r conftest 2>/dev/null
1717 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1719 lt_compiler_flag="-o out/conftest2.$ac_objext"
1720 # Insert the option either (1) after the last *FLAGS variable, or
1721 # (2) before a word containing "conftest.", or (3) at the end.
1722 # Note that $ac_compile itself does not contain backslashes and begins
1723 # with a dollar sign (not a hyphen), so the echo should work correctly.
1724 lt_compile=`echo "$ac_compile" | $SED \
1725 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1726 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1727 -e 's:$: $lt_compiler_flag:'`
1728 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1729 (eval "$lt_compile" 2>out/conftest.err)
1731 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1732 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1733 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1735 # The compiler can only warn and ignore the option if not recognized
1736 # So say no if there are warnings
1737 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1738 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1739 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1740 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1743 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1745 # SGI C++ compiler will create directory out/ii_files/ for
1746 # template instantiation
1747 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1748 $RM out/* && rmdir out
1753 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1754 [Does compiler simultaneously support -c and -o options?])
1755 ])# _LT_COMPILER_C_O
1758 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
1759 # ----------------------------------
1760 # Check to see if we can do hard links to lock some files if needed
1761 m4_defun([_LT_COMPILER_FILE_LOCKS],
1762 [m4_require([_LT_ENABLE_LOCK])dnl
1763 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1764 _LT_COMPILER_C_O([$1])
1766 hard_links="nottested"
1767 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1768 # do not overwrite the value of need_locks provided by the user
1769 AC_MSG_CHECKING([if we can lock with hard links])
1772 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1774 ln conftest.a conftest.b 2>&5 || hard_links=no
1775 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1776 AC_MSG_RESULT([$hard_links])
1777 if test "$hard_links" = no; then
1778 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1784 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1785 ])# _LT_COMPILER_FILE_LOCKS
1790 m4_defun([_LT_CHECK_OBJDIR],
1791 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1792 [rm -f .libs 2>/dev/null
1793 mkdir .libs 2>/dev/null
1794 if test -d .libs; then
1797 # MS-DOS does not allow filenames that begin with a dot.
1800 rmdir .libs 2>/dev/null])
1801 objdir=$lt_cv_objdir
1802 _LT_DECL([], [objdir], [0],
1803 [The name of the directory that contains temporary libtool files])dnl
1804 m4_pattern_allow([LT_OBJDIR])dnl
1805 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1806 [Define to the sub-directory in which libtool stores uninstalled libraries.])
1807 ])# _LT_CHECK_OBJDIR
1810 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1811 # --------------------------------------
1812 # Check hardcoding attributes.
1813 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1814 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1815 _LT_TAGVAR(hardcode_action, $1)=
1816 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1817 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1818 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1820 # We can hardcode non-existent directories.
1821 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1822 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1823 # have to relink, otherwise we might link with an installed library
1824 # when we should be linking with a yet-to-be-installed one
1825 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1826 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1827 # Linking always hardcodes the temporary library directory.
1828 _LT_TAGVAR(hardcode_action, $1)=relink
1830 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1831 _LT_TAGVAR(hardcode_action, $1)=immediate
1834 # We cannot hardcode anything, or else we can only hardcode existing
1836 _LT_TAGVAR(hardcode_action, $1)=unsupported
1838 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1840 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
1841 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
1842 # Fast installation is not supported
1843 enable_fast_install=no
1844 elif test "$shlibpath_overrides_runpath" = yes ||
1845 test "$enable_shared" = no; then
1846 # Fast installation is not necessary
1847 enable_fast_install=needless
1849 _LT_TAGDECL([], [hardcode_action], [0],
1850 [How to hardcode a shared library path into an executable])
1851 ])# _LT_LINKER_HARDCODE_LIBPATH
1856 m4_defun([_LT_CMD_STRIPLIB],
1857 [m4_require([_LT_DECL_EGREP])
1860 AC_MSG_CHECKING([whether stripping libraries is possible])
1861 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
1862 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1863 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1864 AC_MSG_RESULT([yes])
1866 # FIXME - insert some real tests, host_os isn't really good enough
1869 if test -n "$STRIP" ; then
1870 striplib="$STRIP -x"
1871 old_striplib="$STRIP -S"
1872 AC_MSG_RESULT([yes])
1882 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
1883 _LT_DECL([], [striplib], [1])
1884 ])# _LT_CMD_STRIPLIB
1887 # _LT_SYS_DYNAMIC_LINKER([TAG])
1888 # -----------------------------
1889 # PORTME Fill in your ld.so characteristics
1890 m4_defun([_LT_SYS_DYNAMIC_LINKER],
1891 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1892 m4_require([_LT_DECL_EGREP])dnl
1893 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1894 m4_require([_LT_DECL_SED])dnl
1895 AC_MSG_CHECKING([dynamic linker characteristics])
1897 [C], [withGCC=$GCC],
1898 [CXX], [withGCC=$GXX],
1899 [F77], [withGCC=$G77],
1900 [FC], [withGCC=$ac_cv_fc_compiler_gnu],
1901 [GCJ], [withGCC=$GCC],
1903 if test "$withGCC" = yes; then
1905 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1906 *) lt_awk_arg="/^libraries:/" ;;
1908 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1909 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
1910 # if the path contains ";" then we assume it to be the separator
1911 # otherwise default to the standard path separator (i.e. ":") - it is
1912 # assumed that no part of a normal pathname contains ";" but that should
1913 # okay in the real world where ";" in dirpaths is itself problematic.
1914 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1916 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1918 # Ok, now we have the path, separated by spaces, we can step through it
1919 # and add multilib dir if necessary.
1920 lt_tmp_lt_search_path_spec=
1921 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1922 for lt_sys_path in $lt_search_path_spec; do
1923 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1924 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1926 test -d "$lt_sys_path" && \
1927 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1930 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
1931 BEGIN {RS=" "; FS="/|\n";} {
1934 for (lt_i = NF; lt_i > 0; lt_i--) {
1935 if ($lt_i != "" && $lt_i != ".") {
1936 if ($lt_i == "..") {
1939 if (lt_count == 0) {
1940 lt_foo="/" $lt_i lt_foo;
1947 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1948 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1950 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
1952 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1956 libname_spec='lib$name'
1964 shlibpath_overrides_runpath=unknown
1966 dynamic_linker="$host_os ld.so"
1967 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1968 need_lib_prefix=unknown
1969 hardcode_into_libs=no
1971 # when you set need_version to no, make sure it does not cause -set_version
1972 # flags to be left without arguments
1973 need_version=unknown
1978 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1979 shlibpath_var=LIBPATH
1981 # AIX 3 has no versioning support, so we append a major version to the name.
1982 soname_spec='${libname}${release}${shared_ext}$major'
1989 hardcode_into_libs=yes
1990 if test "$host_cpu" = ia64; then
1991 # AIX 5 supports IA64
1992 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1993 shlibpath_var=LD_LIBRARY_PATH
1995 # With GCC up to 2.95.x, collect2 would create an import file
1996 # for dependence libraries. The import file would start with
1997 # the line `#! .'. This would cause the generated library to
1998 # depend on `.', always an invalid library. This was fixed in
1999 # development snapshots of GCC prior to 3.0.
2001 aix4 | aix4.[[01]] | aix4.[[01]].*)
2002 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2004 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2011 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2012 # soname into executable. Probably we can add versioning support to
2013 # collect2, so additional links can be useful in future.
2014 if test "$aix_use_runtimelinking" = yes; then
2015 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2016 # instead of lib<name>.a to let people know that these are not
2017 # typical AIX shared libraries.
2018 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2020 # We preserve .a as extension for shared libraries through AIX4.2
2021 # and later when we are not doing run time linking.
2022 library_names_spec='${libname}${release}.a $libname.a'
2023 soname_spec='${libname}${release}${shared_ext}$major'
2025 shlibpath_var=LIBPATH
2030 if test "$host_cpu" = m68k; then
2031 library_names_spec='$libname.ixlibrary $libname.a'
2032 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2033 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2040 library_names_spec='${libname}${shared_ext}'
2041 dynamic_linker="$host_os ld.so"
2042 shlibpath_var=LIBRARY_PATH
2048 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2049 soname_spec='${libname}${release}${shared_ext}$major'
2050 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2051 shlibpath_var=LD_LIBRARY_PATH
2052 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2053 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2054 # the default ld.so.conf also contains /usr/contrib/lib and
2055 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2056 # libtool to hard-code these into programs
2059 cygwin* | mingw* | pw32*)
2060 version_type=windows
2065 case $withGCC,$host_os in
2066 yes,cygwin* | yes,mingw* | yes,pw32*)
2067 library_names_spec='$libname.dll.a'
2068 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2069 postinstall_cmds='base_file=`basename \${file}`~
2070 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2071 dldir=$destdir/`dirname \$dlpath`~
2072 test -d \$dldir || mkdir -p \$dldir~
2073 $install_prog $dir/$dlname \$dldir/$dlname~
2074 chmod a+x \$dldir/$dlname~
2075 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2076 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2078 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2079 dlpath=$dir/\$dldll~
2081 shlibpath_overrides_runpath=yes
2085 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2086 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2087 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2090 # MinGW DLLs use traditional 'lib' prefix
2091 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2092 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2093 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2094 # It is most probably a Windows format PATH printed by
2095 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2096 # path with ; separators, and with drive letters. We can handle the
2097 # drive letters (cygwin fileutils understands them), so leave them,
2098 # especially as we might pass files found there to a mingw objdump,
2099 # which wouldn't understand a cygwinified path. Ahh.
2100 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2102 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2106 # pw32 DLLs use 'pw' prefix rather than 'lib'
2107 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2113 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2116 dynamic_linker='Win32 ld.exe'
2117 # FIXME: first we should search . and the directory the executable is in
2121 darwin* | rhapsody*)
2122 dynamic_linker="$host_os dyld"
2126 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2127 soname_spec='${libname}${release}${major}$shared_ext'
2128 shlibpath_overrides_runpath=yes
2129 shlibpath_var=DYLD_LIBRARY_PATH
2130 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2132 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2133 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2140 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2141 soname_spec='${libname}${release}${shared_ext}$major'
2142 shlibpath_var=LD_LIBRARY_PATH
2149 freebsd* | dragonfly*)
2150 # DragonFly does not have aout. When/if they implement a new
2151 # versioning mechanism, adjust this.
2152 if test -x /usr/bin/objformat; then
2153 objformat=`/usr/bin/objformat`
2156 freebsd[[123]]*) objformat=aout ;;
2160 version_type=freebsd-$objformat
2161 case $version_type in
2163 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2168 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2172 shlibpath_var=LD_LIBRARY_PATH
2175 shlibpath_overrides_runpath=yes
2177 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2178 shlibpath_overrides_runpath=yes
2179 hardcode_into_libs=yes
2181 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2182 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2183 shlibpath_overrides_runpath=no
2184 hardcode_into_libs=yes
2186 *) # from 4.6 on, and DragonFly
2187 shlibpath_overrides_runpath=yes
2188 hardcode_into_libs=yes
2197 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2198 soname_spec='${libname}${release}${shared_ext}$major'
2199 shlibpath_var=LD_LIBRARY_PATH
2200 hardcode_into_libs=yes
2203 hpux9* | hpux10* | hpux11*)
2204 # Give a soname corresponding to the major version so that dld.sl refuses to
2205 # link against other versions.
2212 hardcode_into_libs=yes
2213 dynamic_linker="$host_os dld.so"
2214 shlibpath_var=LD_LIBRARY_PATH
2215 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2216 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2217 soname_spec='${libname}${release}${shared_ext}$major'
2218 if test "X$HPUX_IA64_MODE" = X32; then
2219 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2221 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2223 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2227 hardcode_into_libs=yes
2228 dynamic_linker="$host_os dld.sl"
2229 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2230 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2231 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2232 soname_spec='${libname}${release}${shared_ext}$major'
2233 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2234 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2238 dynamic_linker="$host_os dld.sl"
2239 shlibpath_var=SHLIB_PATH
2240 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2241 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2242 soname_spec='${libname}${release}${shared_ext}$major'
2245 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2246 postinstall_cmds='chmod 555 $lib'
2253 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2254 soname_spec='${libname}${release}${shared_ext}$major'
2255 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2256 shlibpath_var=LD_LIBRARY_PATH
2257 shlibpath_overrides_runpath=no
2258 hardcode_into_libs=yes
2261 irix5* | irix6* | nonstopux*)
2263 nonstopux*) version_type=nonstopux ;;
2265 if test "$lt_cv_prog_gnu_ld" = yes; then
2273 soname_spec='${libname}${release}${shared_ext}$major'
2274 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2276 irix5* | nonstopux*)
2280 case $LD in # libtool.m4 will add one of these switches to LD
2281 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2282 libsuff= shlibsuff= libmagic=32-bit;;
2283 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2284 libsuff=32 shlibsuff=N32 libmagic=N32;;
2285 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2286 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2287 *) libsuff= shlibsuff= libmagic=never-match;;
2291 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2292 shlibpath_overrides_runpath=no
2293 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2294 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2295 hardcode_into_libs=yes
2298 # No shared lib support for Linux oldld, aout, or coff.
2299 linux*oldld* | linux*aout* | linux*coff*)
2303 # This must be Linux ELF.
2304 linux* | k*bsd*-gnu)
2308 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2309 soname_spec='${libname}${release}${shared_ext}$major'
2310 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2311 shlibpath_var=LD_LIBRARY_PATH
2312 shlibpath_overrides_runpath=no
2313 # Some binutils ld are patched to set DT_RUNPATH
2314 save_LDFLAGS=$LDFLAGS
2316 eval libdir=/foo wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) \
2317 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"
2318 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2319 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir"],
2320 [shlibpath_overrides_runpath=yes])])
2321 LDFLAGS=$save_LDFLAGS
2324 # This implies no fast_install, which is unacceptable.
2325 # Some rework will be needed to allow for fast_install
2326 # before this can be enabled.
2327 hardcode_into_libs=yes
2329 # Append ld.so.conf contents to the search path
2330 if test -f /etc/ld.so.conf; then
2331 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/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2332 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2335 # We used to test for /lib/ld.so.1 and disable shared libraries on
2336 # powerpc, because MkLinux only supported shared libraries with the
2337 # GNU dynamic linker. Since this was broken with cross compilers,
2338 # most powerpc-linux boxes support dynamic linking these days and
2339 # people can always --disable-shared, the test was removed, and we
2340 # assume the GNU/Linux dynamic linker is in use.
2341 dynamic_linker='GNU/Linux ld.so'
2348 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2349 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2350 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2351 dynamic_linker='NetBSD (a.out) ld.so'
2353 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2354 soname_spec='${libname}${release}${shared_ext}$major'
2355 dynamic_linker='NetBSD ld.elf_so'
2357 shlibpath_var=LD_LIBRARY_PATH
2358 shlibpath_overrides_runpath=yes
2359 hardcode_into_libs=yes
2364 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2365 shlibpath_var=LD_LIBRARY_PATH
2366 shlibpath_overrides_runpath=yes
2373 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2374 soname_spec='${libname}${release}${shared_ext}$major'
2375 shlibpath_var=LD_LIBRARY_PATH
2376 shlibpath_overrides_runpath=no
2377 hardcode_into_libs=yes
2378 dynamic_linker='ldqnx.so'
2383 sys_lib_dlsearch_path_spec="/usr/lib"
2385 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2387 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2388 *) need_version=no ;;
2390 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2391 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2392 shlibpath_var=LD_LIBRARY_PATH
2393 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2395 openbsd2.[[89]] | openbsd2.[[89]].*)
2396 shlibpath_overrides_runpath=no
2399 shlibpath_overrides_runpath=yes
2403 shlibpath_overrides_runpath=yes
2408 libname_spec='$name'
2411 library_names_spec='$libname${shared_ext} $libname.a'
2412 dynamic_linker='OS/2 ld.exe'
2413 shlibpath_var=LIBPATH
2416 osf3* | osf4* | osf5*)
2420 soname_spec='${libname}${release}${shared_ext}$major'
2421 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2422 shlibpath_var=LD_LIBRARY_PATH
2423 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2424 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2435 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2436 soname_spec='${libname}${release}${shared_ext}$major'
2437 shlibpath_var=LD_LIBRARY_PATH
2438 shlibpath_overrides_runpath=yes
2439 hardcode_into_libs=yes
2440 # ldd complains unless libraries are executable
2441 postinstall_cmds='chmod +x $lib'
2446 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2447 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2448 shlibpath_var=LD_LIBRARY_PATH
2449 shlibpath_overrides_runpath=yes
2450 if test "$with_gnu_ld" = yes; then
2458 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2459 soname_spec='${libname}${release}${shared_ext}$major'
2460 shlibpath_var=LD_LIBRARY_PATH
2461 case $host_vendor in
2463 shlibpath_overrides_runpath=no
2465 runpath_var=LD_RUN_PATH
2473 shlibpath_overrides_runpath=no
2474 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2480 if test -d /usr/nec ;then
2482 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2483 soname_spec='$libname${shared_ext}.$major'
2484 shlibpath_var=LD_LIBRARY_PATH
2488 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2489 version_type=freebsd-elf
2492 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2493 soname_spec='${libname}${release}${shared_ext}$major'
2494 shlibpath_var=LD_LIBRARY_PATH
2495 shlibpath_overrides_runpath=yes
2496 hardcode_into_libs=yes
2497 if test "$with_gnu_ld" = yes; then
2498 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2500 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2503 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2507 sys_lib_dlsearch_path_spec='/usr/lib'
2511 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2515 library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2516 shlibpath_var=LD_LIBRARY_PATH
2517 shlibpath_overrides_runpath=no
2518 hardcode_into_libs=yes
2523 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2524 soname_spec='${libname}${release}${shared_ext}$major'
2525 shlibpath_var=LD_LIBRARY_PATH
2532 AC_MSG_RESULT([$dynamic_linker])
2533 test "$dynamic_linker" = no && can_build_shared=no
2535 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2536 if test "$GCC" = yes; then
2537 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2540 _LT_DECL([], [variables_saved_for_relink], [1],
2541 [Variables whose values should be saved in libtool wrapper scripts and
2542 restored at link time])
2543 _LT_DECL([], [need_lib_prefix], [0],
2544 [Do we need the "lib" prefix for modules?])
2545 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2546 _LT_DECL([], [version_type], [0], [Library versioning type])
2547 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2548 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2549 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2550 [Is shlibpath searched before the hard-coded library search path?])
2551 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2552 _LT_DECL([], [library_names_spec], [1],
2553 [[List of archive names. First name is the real one, the rest are links.
2554 The last name is the one that the linker finds with -lNAME]])
2555 _LT_DECL([], [soname_spec], [1],
2556 [[The coded name of the library, if different from the real name]])
2557 _LT_DECL([], [postinstall_cmds], [2],
2558 [Command to use after installation of a shared archive])
2559 _LT_DECL([], [postuninstall_cmds], [2],
2560 [Command to use after uninstallation of a shared archive])
2561 _LT_DECL([], [finish_cmds], [2],
2562 [Commands used to finish a libtool library installation in a directory])
2563 _LT_DECL([], [finish_eval], [1],
2564 [[As "finish_cmds", except a single script fragment to be evaled but
2566 _LT_DECL([], [hardcode_into_libs], [0],
2567 [Whether we should hardcode library paths into libraries])
2568 _LT_DECL([], [sys_lib_search_path_spec], [2],
2569 [Compile-time system search path for libraries])
2570 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2571 [Run-time system search path for libraries])
2572 ])# _LT_SYS_DYNAMIC_LINKER
2575 # _LT_PATH_TOOL_PREFIX(TOOL)
2576 # --------------------------
2577 # find a file program which can recognize shared library
2578 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2579 [m4_require([_LT_DECL_EGREP])dnl
2580 AC_MSG_CHECKING([for $1])
2581 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2583 [[\\/*] | ?:[\\/]*])
2584 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2587 lt_save_MAGIC_CMD="$MAGIC_CMD"
2588 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2589 dnl $ac_dummy forces splitting on constant user-supplied paths.
2590 dnl POSIX.2 word splitting is done only on the output of word expansions,
2591 dnl not every word. This closes a longstanding sh security hole.
2592 ac_dummy="m4_if([$2], , $PATH, [$2])"
2593 for ac_dir in $ac_dummy; do
2595 test -z "$ac_dir" && ac_dir=.
2596 if test -f $ac_dir/$1; then
2597 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2598 if test -n "$file_magic_test_file"; then
2599 case $deplibs_check_method in
2601 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2602 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2603 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2604 $EGREP "$file_magic_regex" > /dev/null; then
2609 *** Warning: the command libtool uses to detect shared libraries,
2610 *** $file_magic_cmd, produces output that libtool cannot recognize.
2611 *** The result is that libtool may fail to recognize shared libraries
2612 *** as such. This will affect the creation of libtool libraries that
2613 *** depend on shared libraries, but programs linked with such libtool
2614 *** libraries will work regardless of this problem. Nevertheless, you
2615 *** may want to report the problem to your system manager and/or to
2616 *** bug-libtool@gnu.org
2626 MAGIC_CMD="$lt_save_MAGIC_CMD"
2629 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2630 if test -n "$MAGIC_CMD"; then
2631 AC_MSG_RESULT($MAGIC_CMD)
2635 _LT_DECL([], [MAGIC_CMD], [0],
2636 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2637 ])# _LT_PATH_TOOL_PREFIX
2640 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2641 dnl aclocal-1.4 backwards compatibility:
2642 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2647 # find a file program which can recognize a shared library
2648 m4_defun([_LT_PATH_MAGIC],
2649 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2650 if test -z "$lt_cv_path_MAGIC_CMD"; then
2651 if test -n "$ac_tool_prefix"; then
2652 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2662 # find the pathname to the GNU or non-GNU linker
2663 AC_DEFUN([LT_PATH_LD],
2664 [AC_REQUIRE([AC_PROG_CC])dnl
2665 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2666 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2667 m4_require([_LT_DECL_SED])dnl
2668 m4_require([_LT_DECL_EGREP])dnl
2670 AC_ARG_WITH([gnu-ld],
2671 [AS_HELP_STRING([--with-gnu-ld],
2672 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2673 [test "$withval" = no || with_gnu_ld=yes],
2674 [with_gnu_ld=no])dnl
2677 if test "$GCC" = yes; then
2678 # Check if gcc -print-prog-name=ld gives a path.
2679 AC_MSG_CHECKING([for ld used by $CC])
2682 # gcc leaves a trailing carriage return which upsets mingw
2683 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2685 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2688 # Accept absolute paths.
2689 [[\\/]]* | ?:[[\\/]]*)
2690 re_direlt='/[[^/]][[^/]]*/\.\./'
2691 # Canonicalize the pathname of ld
2692 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2693 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2694 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2696 test -z "$LD" && LD="$ac_prog"
2699 # If it fails, then pretend we aren't using GCC.
2703 # If it is relative, then search for the first ld in PATH.
2707 elif test "$with_gnu_ld" = yes; then
2708 AC_MSG_CHECKING([for GNU ld])
2710 AC_MSG_CHECKING([for non-GNU ld])
2712 AC_CACHE_VAL(lt_cv_path_LD,
2713 [if test -z "$LD"; then
2714 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2715 for ac_dir in $PATH; do
2717 test -z "$ac_dir" && ac_dir=.
2718 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2719 lt_cv_path_LD="$ac_dir/$ac_prog"
2720 # Check to see if the program is GNU ld. I'd rather use --version,
2721 # but apparently some variants of GNU ld only accept -v.
2722 # Break only if it was the GNU/non-GNU ld that we prefer.
2723 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2724 *GNU* | *'with BFD'*)
2725 test "$with_gnu_ld" != no && break
2728 test "$with_gnu_ld" != yes && break
2735 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2738 if test -n "$LD"; then
2743 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2747 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2751 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2752 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2753 dnl aclocal-1.4 backwards compatibility:
2754 dnl AC_DEFUN([AM_PROG_LD], [])
2755 dnl AC_DEFUN([AC_PROG_LD], [])
2760 m4_defun([_LT_PATH_LD_GNU],
2761 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2762 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2763 case `$LD -v 2>&1 </dev/null` in
2764 *GNU* | *'with BFD'*)
2765 lt_cv_prog_gnu_ld=yes
2768 lt_cv_prog_gnu_ld=no
2771 with_gnu_ld=$lt_cv_prog_gnu_ld
2777 # find reload flag for linker
2778 # -- PORTME Some linkers may need a different reload flag.
2779 m4_defun([_LT_CMD_RELOAD],
2780 [AC_CACHE_CHECK([for $LD option to reload object files],
2781 lt_cv_ld_reload_flag,
2782 [lt_cv_ld_reload_flag='-r'])
2783 reload_flag=$lt_cv_ld_reload_flag
2784 case $reload_flag in
2786 *) reload_flag=" $reload_flag" ;;
2788 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2791 if test "$GCC" = yes; then
2792 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2794 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2798 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2799 _LT_DECL([], [reload_cmds], [2])dnl
2803 # _LT_CHECK_MAGIC_METHOD
2804 # ----------------------
2805 # how to check for library dependencies
2806 # -- PORTME fill in with the dynamic library characteristics
2807 m4_defun([_LT_CHECK_MAGIC_METHOD],
2808 [m4_require([_LT_DECL_EGREP])
2809 AC_CACHE_CHECK([how to recognize dependent libraries],
2810 lt_cv_deplibs_check_method,
2811 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2812 lt_cv_file_magic_test_file=
2813 lt_cv_deplibs_check_method='unknown'
2814 # Need to set the preceding variable on all platforms that support
2815 # interlibrary dependencies.
2816 # 'none' -- dependencies not supported.
2817 # `unknown' -- same as none, but documents that we really don't know.
2818 # 'pass_all' -- all dependencies passed with no checks.
2819 # 'test_compile' -- check by making test program.
2820 # 'file_magic [[regex]]' -- check by looking for files in library path
2821 # which responds to the $file_magic_cmd with a given extended regex.
2822 # If you have `file' or equivalent on your system and you're not sure
2823 # whether `pass_all' will *always* work, you probably want this one.
2827 lt_cv_deplibs_check_method=pass_all
2831 lt_cv_deplibs_check_method=pass_all
2835 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2836 lt_cv_file_magic_cmd='/usr/bin/file -L'
2837 lt_cv_file_magic_test_file=/shlib/libc.so
2841 # func_win32_libid is a shell function defined in ltmain.sh
2842 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2843 lt_cv_file_magic_cmd='func_win32_libid'
2847 # Base MSYS/MinGW do not provide the 'file' command needed by
2848 # func_win32_libid shell function, so use a weaker test based on 'objdump',
2849 # unless we find 'file', for example because we are cross-compiling.
2850 if ( file / ) >/dev/null 2>&1; then
2851 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2852 lt_cv_file_magic_cmd='func_win32_libid'
2854 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2855 lt_cv_file_magic_cmd='$OBJDUMP -f'
2859 darwin* | rhapsody*)
2860 lt_cv_deplibs_check_method=pass_all
2863 freebsd* | dragonfly*)
2864 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
2867 # Not sure whether the presence of OpenBSD here was a mistake.
2868 # Let's accept both of them until this is cleared up.
2869 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2870 lt_cv_file_magic_cmd=/usr/bin/file
2871 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2875 lt_cv_deplibs_check_method=pass_all
2880 lt_cv_deplibs_check_method=pass_all
2883 hpux10.20* | hpux11*)
2884 lt_cv_file_magic_cmd=/usr/bin/file
2887 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2888 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2891 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
2892 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2895 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2896 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2902 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2903 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2906 irix5* | irix6* | nonstopux*)
2908 *-32|*"-32 ") libmagic=32-bit;;
2909 *-n32|*"-n32 ") libmagic=N32;;
2910 *-64|*"-64 ") libmagic=64-bit;;
2911 *) libmagic=never-match;;
2913 lt_cv_deplibs_check_method=pass_all
2916 # This must be Linux ELF.
2917 linux* | k*bsd*-gnu)
2918 lt_cv_deplibs_check_method=pass_all
2922 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
2923 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2925 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2930 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2931 lt_cv_file_magic_cmd=/usr/bin/file
2932 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2936 lt_cv_deplibs_check_method=pass_all
2940 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2941 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2943 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2947 osf3* | osf4* | osf5*)
2948 lt_cv_deplibs_check_method=pass_all
2952 lt_cv_deplibs_check_method=pass_all
2956 lt_cv_deplibs_check_method=pass_all
2959 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2960 lt_cv_deplibs_check_method=pass_all
2964 case $host_vendor in
2966 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]]'
2967 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2970 lt_cv_deplibs_check_method=pass_all
2973 lt_cv_file_magic_cmd='/bin/file'
2974 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2977 lt_cv_file_magic_cmd='/bin/file'
2978 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2979 lt_cv_file_magic_test_file=/lib/libc.so
2982 lt_cv_deplibs_check_method=pass_all
2985 lt_cv_deplibs_check_method=pass_all
2991 lt_cv_deplibs_check_method=pass_all
2995 file_magic_cmd=$lt_cv_file_magic_cmd
2996 deplibs_check_method=$lt_cv_deplibs_check_method
2997 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2999 _LT_DECL([], [deplibs_check_method], [1],
3000 [Method to check whether dependent libraries are shared objects])
3001 _LT_DECL([], [file_magic_cmd], [1],
3002 [Command to use when deplibs_check_method == "file_magic"])
3003 ])# _LT_CHECK_MAGIC_METHOD
3008 # find the pathname to a BSD- or MS-compatible name lister
3009 AC_DEFUN([LT_PATH_NM],
3010 [AC_REQUIRE([AC_PROG_CC])dnl
3011 AC_REQUIRE([AC_OBJEXT])dnl
3012 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3013 [if test -n "$NM"; then
3014 # Let the user override the test.
3017 lt_nm_to_check="${ac_tool_prefix}nm"
3018 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3019 lt_nm_to_check="$lt_nm_to_check nm"
3021 for lt_tmp_nm in $lt_nm_to_check; do
3022 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3023 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3025 test -z "$ac_dir" && ac_dir=.
3026 tmp_nm="$ac_dir/$lt_tmp_nm"
3027 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3028 # Check to see if the nm accepts a BSD-compat flag.
3029 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3030 # nm: unknown option "B" ignored
3031 # Tru64's nm complains that /dev/null is an invalid object file
3032 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3033 */dev/null* | *'Invalid file or object type'*)
3034 lt_cv_path_NM="$tmp_nm -B"
3038 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3040 lt_cv_path_NM="$tmp_nm -p"
3044 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3045 continue # so that we can try to find one that supports BSD flags
3054 : ${lt_cv_path_NM=no}
3056 if test "$lt_cv_path_NM" != "no"; then
3059 # Didn't find any BSD compatible name lister, look for dumpbin.
3060 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3062 if test "$DUMPBIN" != ":"; then
3066 test -z "$NM" && NM=nm
3068 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3070 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3071 [lt_cv_nm_interface="BSD nm"
3072 echo "int some_variable = 0;" > conftest.$ac_ext
3073 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3074 (eval "$ac_compile" 2>conftest.err)
3075 cat conftest.err >&AS_MESSAGE_LOG_FD
3076 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3077 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3078 cat conftest.err >&AS_MESSAGE_LOG_FD
3079 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3080 cat conftest.out >&AS_MESSAGE_LOG_FD
3081 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3082 lt_cv_nm_interface="MS dumpbin"
3088 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3089 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3090 dnl aclocal-1.4 backwards compatibility:
3091 dnl AC_DEFUN([AM_PROG_NM], [])
3092 dnl AC_DEFUN([AC_PROG_NM], [])
3097 # check for math library
3098 AC_DEFUN([LT_LIB_M],
3099 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3102 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3103 # These system don't have libm, or don't need it
3106 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3107 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3110 AC_CHECK_LIB(m, cos, LIBM="-lm")
3117 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3118 dnl aclocal-1.4 backwards compatibility:
3119 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3122 # _LT_COMPILER_NO_RTTI([TAGNAME])
3123 # -------------------------------
3124 m4_defun([_LT_COMPILER_NO_RTTI],
3125 [m4_require([_LT_TAG_COMPILER])dnl
3127 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3129 if test "$GCC" = yes; then
3130 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3132 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3133 lt_cv_prog_compiler_rtti_exceptions,
3134 [-fno-rtti -fno-exceptions], [],
3135 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3137 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3138 [Compiler flag to turn off builtin functions])
3139 ])# _LT_COMPILER_NO_RTTI
3142 # _LT_CMD_GLOBAL_SYMBOLS
3143 # ----------------------
3144 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3145 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3146 AC_REQUIRE([AC_PROG_CC])dnl
3147 AC_REQUIRE([AC_OBJEXT])dnl
3148 AC_REQUIRE([LT_PATH_NM])dnl
3149 AC_REQUIRE([LT_PATH_LD])dnl
3150 m4_require([_LT_DECL_SED])dnl
3151 m4_require([_LT_DECL_EGREP])dnl
3152 m4_require([_LT_TAG_COMPILER])dnl
3154 # Check for command to grab the raw symbol name followed by C symbol from nm.
3155 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3156 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3158 # These are sane defaults that work on at least a few old systems.
3159 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3161 # Character class describing NM global symbol codes.
3162 symcode='[[BCDEGRST]]'
3164 # Regexp to match symbols that can be accessed directly from C.
3165 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3167 # Define system-specific variables.
3172 cygwin* | mingw* | pw32*)
3173 symcode='[[ABCDGISTW]]'
3176 if test "$host_cpu" = ia64; then
3177 symcode='[[ABCDEGRST]]'
3181 symcode='[[BCDEGRST]]'
3184 symcode='[[BCDEGQRST]]'
3195 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3199 symcode='[[DFNSTU]]'
3203 # If we're using GNU nm, then use its standard symbol codes.
3204 case `$NM -V 2>&1` in
3205 *GNU* | *'with BFD'*)
3206 symcode='[[ABCDGIRSTW]]' ;;
3209 # Transform an extracted symbol line into a proper C declaration.
3210 # Some systems (esp. on ia64) link data and code symbols differently,
3211 # so use this general approach.
3212 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3214 # Transform an extracted symbol line into symbol name and symbol address
3215 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3217 # Handle CRLF in mingw tool chain
3221 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3225 # Try without a prefix underscore, then with it.
3226 for ac_symprfx in "" "_"; do
3228 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3229 symxfrm="\\1 $ac_symprfx\\2 \\2"
3231 # Write the raw and C identifiers.
3232 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3233 # Fake it for dumpbin and say T for any non-static function
3234 # and D for any global variable.
3235 # Also find C++ and __fastcall symbols from MSVC++,
3236 # which start with @ or ?.
3237 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3238 " {last_section=section; section=\$ 3};"\
3239 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3240 " \$ 0!~/External *\|/{next};"\
3241 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3242 " {if(hide[section]) next};"\
3243 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3244 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3245 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3246 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3247 " ' prfx=^$ac_symprfx]"
3249 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3252 # Check to see that the pipe works correctly.
3256 cat > conftest.$ac_ext <<_LT_EOF
3261 void nm_test_func(void);
3262 void nm_test_func(void){}
3266 int main(){nm_test_var='a';nm_test_func();return(0);}
3269 if AC_TRY_EVAL(ac_compile); then
3270 # Now try to grab the symbols.
3272 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3273 # Try sorting and uniquifying the output.
3274 if sort "$nlist" | uniq > "$nlist"T; then
3275 mv -f "$nlist"T "$nlist"
3280 # Make sure that we snagged all the symbols we need.
3281 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3282 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3283 cat <<_LT_EOF > conftest.$ac_ext
3289 # Now generate the symbol file.
3290 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3292 cat <<_LT_EOF >> conftest.$ac_ext
3294 /* The mapping between symbol names and symbols. */
3299 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3301 { "@PROGRAM@", (void *) 0 },
3303 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3304 cat <<\_LT_EOF >> conftest.$ac_ext
3308 /* This works around a problem in FreeBSD linker */
3309 #ifdef FREEBSD_WORKAROUND
3310 static const void *lt_preloaded_setup() {
3311 return lt__PROGRAM__LTX_preloaded_symbols;
3319 # Now try linking the two files.
3320 mv conftest.$ac_objext conftstm.$ac_objext
3321 lt_save_LIBS="$LIBS"
3322 lt_save_CFLAGS="$CFLAGS"
3323 LIBS="conftstm.$ac_objext"
3324 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3325 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3328 LIBS="$lt_save_LIBS"
3329 CFLAGS="$lt_save_CFLAGS"
3331 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3334 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3337 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3340 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3341 cat conftest.$ac_ext >&5
3343 rm -f conftest* conftst*
3345 # Do not use the global_symbol_pipe unless it works.
3346 if test "$pipe_works" = yes; then
3349 lt_cv_sys_global_symbol_pipe=
3353 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3354 lt_cv_sys_global_symbol_to_cdecl=
3356 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3357 AC_MSG_RESULT(failed)
3362 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3363 [Take the output of nm and produce a listing of raw symbols and C names])
3364 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3365 [Transform the output of nm in a proper C declaration])
3366 _LT_DECL([global_symbol_to_c_name_address],
3367 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3368 [Transform the output of nm in a C name address pair])
3369 ]) # _LT_CMD_GLOBAL_SYMBOLS
3372 # _LT_COMPILER_PIC([TAGNAME])
3373 # ---------------------------
3374 m4_defun([_LT_COMPILER_PIC],
3375 [m4_require([_LT_TAG_COMPILER])dnl
3376 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3377 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3378 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3380 AC_MSG_CHECKING([for $compiler option to produce PIC])
3381 m4_if([$1], [CXX], [
3382 # C++ specific cases for pic, static, wl, etc.
3383 if test "$GXX" = yes; then
3384 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3385 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3389 # All AIX code is PIC.
3390 if test "$host_cpu" = ia64; then
3391 # AIX 5 now supports IA64 processor
3392 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3396 if test "$host_cpu" = m68k; then
3397 # FIXME: we need at least 68020 code to build shared libraries, but
3398 # adding the `-m68020' flag to GCC prevents building anything better,
3400 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3403 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3404 # PIC is the default for these OSes.
3406 mingw* | cygwin* | os2* | pw32*)
3407 # This hack is so that the source file can tell whether it is being
3408 # built for inclusion in a dll (and should export symbols for example).
3409 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3410 # (--disable-auto-import) libraries
3411 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3413 darwin* | rhapsody*)
3414 # PIC is the default on this platform
3415 # Common symbols not allowed in MH_DYLIB files
3416 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3419 # DJGPP does not support shared libraries at all
3420 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3423 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3424 # Instead, we relocate shared libraries at runtime.
3427 if test -d /usr/nec; then
3428 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3432 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3438 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3443 # QNX uses GNU C++, but need to define -shared option too, otherwise
3445 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3448 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3454 # All AIX code is PIC.
3455 if test "$host_cpu" = ia64; then
3456 # AIX 5 now supports IA64 processor
3457 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3459 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3463 case $cc_basename in
3465 # Green Hills C++ Compiler
3466 # _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"
3471 # PIC is the default on this platform
3472 # Common symbols not allowed in MH_DYLIB files
3473 case $cc_basename in
3475 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
3476 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3481 case $cc_basename in
3483 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3486 # Green Hills C++ Compiler
3487 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3493 freebsd* | dragonfly*)
3494 # FreeBSD uses GNU C++
3496 hpux9* | hpux10* | hpux11*)
3497 case $cc_basename in
3499 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3500 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3501 if test "$host_cpu" != ia64; then
3502 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3506 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3507 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3513 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3522 # This is c89, which is MS Visual C++ (no shared libs)
3523 # Anyone wants to do a port?
3525 irix5* | irix6* | nonstopux*)
3526 case $cc_basename in
3528 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3529 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3530 # CC pic flag -KPIC is the default.
3536 linux* | k*bsd*-gnu)
3537 case $cc_basename in
3540 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3541 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3545 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3546 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3547 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3550 # Portland Group C++ compiler
3551 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3552 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3553 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3557 # Make sure the PIC flag is empty. It appears that all Alpha
3558 # Linux and Compaq Tru64 Unix objects are PIC.
3559 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3560 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3563 case `$CC -V 2>&1 | sed 5q` in
3566 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3567 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3568 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3579 case $cc_basename in
3581 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3590 # QNX uses GNU C++, but need to define -shared option too, otherwise
3592 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3594 osf3* | osf4* | osf5*)
3595 case $cc_basename in
3597 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3600 # Rational C++ 2.4.1
3601 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3604 # Digital/Compaq C++
3605 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3606 # Make sure the PIC flag is empty. It appears that all Alpha
3607 # Linux and Compaq Tru64 Unix objects are PIC.
3608 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3609 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3618 case $cc_basename in
3620 # Sun C++ 4.2, 5.x and Centerline C++
3621 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3622 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3623 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3626 # Green Hills C++ Compiler
3627 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3634 case $cc_basename in
3637 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3638 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3642 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3648 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3649 case $cc_basename in
3651 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3652 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3653 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3658 case $cc_basename in
3660 # NonStop-UX NCC 3.20
3661 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3670 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3676 if test "$GCC" = yes; then
3677 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3678 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3682 # All AIX code is PIC.
3683 if test "$host_cpu" = ia64; then
3684 # AIX 5 now supports IA64 processor
3685 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3690 if test "$host_cpu" = m68k; then
3691 # FIXME: we need at least 68020 code to build shared libraries, but
3692 # adding the `-m68020' flag to GCC prevents building anything better,
3694 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3698 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3699 # PIC is the default for these OSes.
3702 mingw* | cygwin* | pw32* | os2*)
3703 # This hack is so that the source file can tell whether it is being
3704 # built for inclusion in a dll (and should export symbols for example).
3705 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3706 # (--disable-auto-import) libraries
3707 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3710 darwin* | rhapsody*)
3711 # PIC is the default on this platform
3712 # Common symbols not allowed in MH_DYLIB files
3713 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3717 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3724 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3730 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3731 # Instead, we relocate shared libraries at runtime.
3735 # Just because we use GCC doesn't mean we suddenly get shared libraries
3736 # on systems that don't support them.
3737 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3742 # QNX uses GNU C++, but need to define -shared option too, otherwise
3744 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3748 if test -d /usr/nec; then
3749 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3754 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3758 # PORTME Check for flag to pass linker flags through the system compiler.
3761 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3762 if test "$host_cpu" = ia64; then
3763 # AIX 5 now supports IA64 processor
3764 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3766 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3770 # PIC is the default on this platform
3771 # Common symbols not allowed in MH_DYLIB files
3772 case $cc_basename in
3774 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
3775 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3780 mingw* | cygwin* | pw32* | os2*)
3781 # This hack is so that the source file can tell whether it is being
3782 # built for inclusion in a dll (and should export symbols for example).
3783 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3786 hpux9* | hpux10* | hpux11*)
3787 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3788 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3795 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3798 # Is there a better lt_prog_compiler_static that works with the bundled CC?
3799 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3802 irix5* | irix6* | nonstopux*)
3803 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3804 # PIC (with -KPIC) is the default.
3805 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3808 linux* | k*bsd*-gnu)
3809 case $cc_basename in
3811 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3812 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3813 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3815 pgcc* | pgf77* | pgf90* | pgf95*)
3816 # Portland Group compilers (*not* the Pentium gcc compiler,
3817 # which looks to be a dead project)
3818 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3819 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3820 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3823 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3824 # All Alpha code is PIC.
3825 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3828 case `$CC -V 2>&1 | sed 5q` in
3831 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3832 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3833 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3836 # Sun Fortran 8.3 passes all unrecognized flags to the linker
3837 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3838 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3839 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
3847 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3848 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3852 # QNX uses GNU C++, but need to define -shared option too, otherwise
3854 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3857 osf3* | osf4* | osf5*)
3858 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3859 # All OSF/1 code is PIC.
3860 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3864 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3868 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3869 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3870 case $cc_basename in
3872 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
3874 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
3879 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3880 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3881 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3884 sysv4 | sysv4.2uw2* | sysv4.3*)
3885 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3886 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3887 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3891 if test -d /usr/nec ;then
3892 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
3893 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3897 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3898 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3899 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3900 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3904 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3905 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3909 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3910 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3914 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3920 # For platforms which do not support PIC, -DPIC is meaningless:
3922 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3925 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
3928 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
3929 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
3930 [How to pass a linker flag through the compiler])
3933 # Check to make sure the PIC flag actually works.
3935 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
3936 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
3937 [_LT_TAGVAR(lt_prog_compiler_pic_works, $1)],
3938 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
3939 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
3941 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
3943 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3944 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
3946 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
3947 [Additional compiler flags for building library objects])
3950 # Check to make sure the static flag actually works.
3952 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
3953 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
3954 _LT_TAGVAR(lt_prog_compiler_static_works, $1),
3955 $lt_tmp_static_flag,
3957 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
3958 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
3959 [Compiler flag to prevent dynamic linking])
3960 ])# _LT_COMPILER_PIC
3963 # _LT_LINKER_SHLIBS([TAGNAME])
3964 # ----------------------------
3965 # See if the linker supports building shared libraries.
3966 m4_defun([_LT_LINKER_SHLIBS],
3967 [AC_REQUIRE([LT_PATH_LD])dnl
3968 AC_REQUIRE([LT_PATH_NM])dnl
3969 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3970 m4_require([_LT_DECL_EGREP])dnl
3971 m4_require([_LT_DECL_SED])dnl
3972 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
3973 m4_require([_LT_TAG_COMPILER])dnl
3974 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3975 m4_if([$1], [CXX], [
3976 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3979 # If we're using GNU nm, then we don't want the "-C" option.
3980 # -C means demangle to AIX nm, but means don't demangle with GNU nm
3981 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
3982 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
3984 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
3988 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
3991 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
3994 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3999 _LT_TAGVAR(allow_undefined_flag, $1)=
4000 _LT_TAGVAR(always_export_symbols, $1)=no
4001 _LT_TAGVAR(archive_cmds, $1)=
4002 _LT_TAGVAR(archive_expsym_cmds, $1)=
4003 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4004 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4005 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4006 _LT_TAGVAR(hardcode_automatic, $1)=no
4007 _LT_TAGVAR(hardcode_direct, $1)=no
4008 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4009 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4010 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4011 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4012 _LT_TAGVAR(hardcode_minus_L, $1)=no
4013 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4014 _LT_TAGVAR(inherit_rpath, $1)=no
4015 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4016 _LT_TAGVAR(module_cmds, $1)=
4017 _LT_TAGVAR(module_expsym_cmds, $1)=
4018 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4019 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4020 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4021 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4022 # include_expsyms should be a list of space-separated symbols to be *always*
4023 # included in the symbol list
4024 _LT_TAGVAR(include_expsyms, $1)=
4025 # exclude_expsyms can be an extended regexp of symbols to exclude
4026 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4027 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4028 # as well as any symbol that contains `d'.
4029 _LT_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
4030 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4031 # platforms (ab)use it in PIC code, but their linkers get confused if
4032 # the symbol is explicitly referenced. Since portable code cannot
4033 # rely on this symbol name, it's probably fine to never include it in
4034 # preloaded symbol tables.
4035 extract_expsyms_cmds=
4038 cygwin* | mingw* | pw32*)
4039 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4040 # When not using gcc, we currently assume that we are using
4041 # Microsoft Visual C++.
4042 if test "$GCC" != yes; then
4047 # we just hope/assume this is gcc and not c89 (= MSVC++)
4055 _LT_TAGVAR(ld_shlibs, $1)=yes
4056 if test "$with_gnu_ld" = yes; then
4057 # If archive_cmds runs LD, not CC, wlarc should be empty
4060 # Set some defaults for GNU ld with shared library support. These
4061 # are reset later if shared libraries are not supported. Putting them
4062 # here allows them to be overridden if necessary.
4063 runpath_var=LD_RUN_PATH
4064 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4065 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4066 # ancient GNU ld didn't support --whole-archive et. al.
4067 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4068 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4070 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4072 supports_anon_versioning=no
4073 case `$LD -v 2>&1` in
4074 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4075 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4076 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4077 *\ 2.11.*) ;; # other 2.11 versions
4078 *) supports_anon_versioning=yes ;;
4081 # See if GNU ld supports shared libraries.
4083 aix3* | aix4* | aix5*)
4084 # On AIX/PPC, the GNU linker is very broken
4085 if test "$host_cpu" != ia64; then
4086 _LT_TAGVAR(ld_shlibs, $1)=no
4089 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4090 *** to be unable to reliably create shared libraries on AIX.
4091 *** Therefore, libtool is disabling shared libraries support. If you
4092 *** really care for shared libraries, you may want to modify your PATH
4093 *** so that a non-GNU linker is found, and then restart.
4100 if test "$host_cpu" = m68k; then
4101 _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)'
4102 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4103 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4106 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
4107 # that the semantics of dynamic libraries on AmigaOS, at least up
4108 # to version 4, is to share data among multiple programs linked
4109 # with the same dynamic library. Since this doesn't match the
4110 # behavior of shared libraries on other platforms, we can't use
4112 _LT_TAGVAR(ld_shlibs, $1)=no
4116 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4117 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4118 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4119 # support --undefined. This deserves some investigation. FIXME
4120 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4122 _LT_TAGVAR(ld_shlibs, $1)=no
4126 cygwin* | mingw* | pw32*)
4127 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4128 # as there is no search path for DLLs.
4129 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4130 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4131 _LT_TAGVAR(always_export_symbols, $1)=no
4132 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4133 _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'
4135 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4136 _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'
4137 # If the export-symbols file already is a .def file (1st line
4138 # is EXPORTS), use it as is; otherwise, prepend...
4139 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4140 cp $export_symbols $output_objdir/$soname.def;
4142 echo EXPORTS > $output_objdir/$soname.def;
4143 cat $export_symbols >> $output_objdir/$soname.def;
4145 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4147 _LT_TAGVAR(ld_shlibs, $1)=no
4152 _LT_TAGVAR(hardcode_direct, $1)=no
4153 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4154 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4155 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4156 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4157 # Instead, shared libraries are loaded at an image base (0x10000000 by
4158 # default) and relocated if they conflict, which is a slow very memory
4159 # consuming and fragmenting process. To avoid this, we pick a random,
4160 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4161 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4162 _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'
4163 _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'
4166 linux* | tpf* | k*bsd*-gnu)
4168 if test "$host_os" = linux-dietlibc; then
4169 case $cc_basename in
4170 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4173 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4174 && test "$tmp_diet" = no
4177 case $cc_basename,$host_cpu in
4178 pgcc*) # Portland Group C compiler
4179 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4180 tmp_addflag=' $pic_flag'
4182 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
4183 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4184 tmp_addflag=' $pic_flag -Mnomain' ;;
4185 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4186 tmp_addflag=' -i_dynamic' ;;
4187 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4188 tmp_addflag=' -i_dynamic -nofor_main' ;;
4189 ifc* | ifort*) # Intel Fortran compiler
4190 tmp_addflag=' -nofor_main' ;;
4192 case `$CC -V 2>&1 | sed 5q` in
4193 *Sun\ C*) # Sun C 5.9
4194 _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive /dev/null'
4195 tmp_sharedflag='-G' ;;
4196 *Sun\ F*) # Sun Fortran 8.3
4197 tmp_sharedflag='-G' ;;
4199 tmp_sharedflag='-shared' ;;
4201 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4203 if test "x$supports_anon_versioning" = xyes; then
4204 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4205 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4206 echo "local: *; };" >> $output_objdir/$libname.ver~
4207 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4210 _LT_TAGVAR(ld_shlibs, $1)=no
4215 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4216 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4219 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4220 _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'
4225 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4226 _LT_TAGVAR(ld_shlibs, $1)=no
4229 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4230 *** create shared libraries on Solaris systems. Therefore, libtool
4231 *** is disabling shared libraries support. We urge you to upgrade GNU
4232 *** binutils to release 2.9.1 or newer. Another option is to modify
4233 *** your PATH or compiler configuration so that the native linker is
4234 *** used, and then restart.
4237 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4238 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4239 _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'
4241 _LT_TAGVAR(ld_shlibs, $1)=no
4245 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4246 case `$LD -v 2>&1` in
4247 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4248 _LT_TAGVAR(ld_shlibs, $1)=no
4251 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4252 *** reliably create shared libraries on SCO systems. Therefore, libtool
4253 *** is disabling shared libraries support. We urge you to upgrade GNU
4254 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4255 *** your PATH or compiler configuration so that the native linker is
4256 *** used, and then restart.
4261 # For security reasons, it is highly recommended that you always
4262 # use absolute paths for naming shared libraries, and exclude the
4263 # DT_RUNPATH tag from executables and libraries. But doing so
4264 # requires that you compile everything twice, which is a pain.
4265 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4266 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4267 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4268 _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'
4270 _LT_TAGVAR(ld_shlibs, $1)=no
4277 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4279 _LT_TAGVAR(hardcode_direct, $1)=yes
4280 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4284 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4285 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4286 _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'
4288 _LT_TAGVAR(ld_shlibs, $1)=no
4293 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4295 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4296 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4297 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4300 # PORTME fill in a description of your system's linker (not GNU ld)
4303 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4304 _LT_TAGVAR(always_export_symbols, $1)=yes
4305 _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'
4306 # Note: this linker hardcodes the directories in LIBPATH if there
4307 # are no directories specified by -L.
4308 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4309 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4310 # Neither direct hardcoding nor static linking is supported with a
4312 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4317 if test "$host_cpu" = ia64; then
4318 # On IA64, the linker does run time linking by default, so we don't
4319 # have to do anything special.
4320 aix_use_runtimelinking=no
4321 exp_sym_flag='-Bexport'
4324 # If we're using GNU nm, then we don't want the "-C" option.
4325 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4326 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4327 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4329 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4331 aix_use_runtimelinking=no
4333 # Test if we are trying to use run time linking or normal
4334 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4335 # need to do runtime linking.
4336 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4337 for ld_flag in $LDFLAGS; do
4338 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4339 aix_use_runtimelinking=yes
4346 exp_sym_flag='-bexport'
4347 no_entry_flag='-bnoentry'
4350 # When large executables or shared objects are built, AIX ld can
4351 # have problems creating the table of contents. If linking a library
4352 # or program results in "error TOC overflow" add -mminimal-toc to
4353 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4354 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4356 _LT_TAGVAR(archive_cmds, $1)=''
4357 _LT_TAGVAR(hardcode_direct, $1)=yes
4358 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4359 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4360 _LT_TAGVAR(link_all_deplibs, $1)=yes
4361 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4363 if test "$GCC" = yes; then
4364 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4365 # We only want to do this on AIX 4.2 and lower, the check
4366 # below for broken collect2 doesn't work under 4.3+
4367 collect2name=`${CC} -print-prog-name=collect2`
4368 if test -f "$collect2name" &&
4369 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4371 # We have reworked collect2
4374 # We have old collect2
4375 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4376 # It fails to find uninstalled libraries when the uninstalled
4377 # path is not listed in the libpath. Setting hardcode_minus_L
4378 # to unsupported forces relinking
4379 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4380 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4381 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4385 shared_flag='-shared'
4386 if test "$aix_use_runtimelinking" = yes; then
4387 shared_flag="$shared_flag "'${wl}-G'
4391 if test "$host_cpu" = ia64; then
4392 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4393 # chokes on -Wl,-G. The following line is correct:
4396 if test "$aix_use_runtimelinking" = yes; then
4397 shared_flag='${wl}-G'
4399 shared_flag='${wl}-bM:SRE'
4404 # It seems that -bexpall does not export symbols beginning with
4405 # underscore (_), so it is better to generate a list of symbols to export.
4406 _LT_TAGVAR(always_export_symbols, $1)=yes
4407 if test "$aix_use_runtimelinking" = yes; then
4408 # Warning - without using the other runtime loading flags (-brtl),
4409 # -berok will link without error, but may produce a broken library.
4410 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4411 # Determine the default libpath from the value encoded in an
4413 _LT_SYS_MODULE_PATH_AIX
4414 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4415 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4417 if test "$host_cpu" = ia64; then
4418 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4419 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4420 _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"
4422 # Determine the default libpath from the value encoded in an
4424 _LT_SYS_MODULE_PATH_AIX
4425 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4426 # Warning - without using the other run time loading flags,
4427 # -berok will link without error, but may produce a broken library.
4428 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4429 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4430 # Exported symbols can be pulled into shared objects from archives
4431 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4432 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4433 # This is similar to how AIX traditionally builds its shared libraries.
4434 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4440 if test "$host_cpu" = m68k; then
4441 _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)'
4442 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4443 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4445 # see comment about different semantics on the GNU ld section
4446 _LT_TAGVAR(ld_shlibs, $1)=no
4450 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4453 cygwin* | mingw* | pw32*)
4454 # When not using gcc, we currently assume that we are using
4455 # Microsoft Visual C++.
4456 # hardcode_libdir_flag_spec is actually meaningless, as there is
4457 # no search path for DLLs.
4458 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4459 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4460 # Tell ltmain to make .lib files, not .a files.
4462 # Tell ltmain to make .dll files, not .so files.
4464 # FIXME: Setting linknames here is a bad hack.
4465 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4466 # The linker will automatically build a .lib file if we build a DLL.
4467 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4468 # FIXME: Should let the user specify the lib program.
4469 _LT_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
4470 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4471 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4474 darwin* | rhapsody*)
4476 rhapsody* | darwin1.[[012]])
4477 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4480 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
4482 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4485 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4490 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4491 _LT_TAGVAR(hardcode_direct, $1)=no
4492 _LT_TAGVAR(hardcode_automatic, $1)=yes
4493 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4494 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
4495 _LT_TAGVAR(link_all_deplibs, $1)=yes
4496 if test "$GCC" = yes ; then
4497 AC_CACHE_VAL([lt_cv_apple_cc_single_mod],
4498 [lt_cv_apple_cc_single_mod=no
4499 if test -z "${LT_MULTI_MODULE}"; then
4500 # By default we will add the -single_module flag. You can override
4501 # by either setting the environment variable LT_MULTI_MODULE
4502 # non-empty at configure time, or by adding -multi-module to the
4504 echo "int foo(void){return 1;}" > conftest.c
4505 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
4506 -dynamiclib ${wl}-single_module conftest.c
4507 if test -f libconftest.dylib; then
4508 lt_cv_apple_cc_single_mod=yes
4509 rm libconftest.dylib
4513 output_verbose_link_cmd=echo
4514 if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
4515 _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4516 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $single_module -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4518 _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4519 _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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4521 _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4522 _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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4524 case $cc_basename in
4526 output_verbose_link_cmd=echo
4527 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
4528 _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4529 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4530 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4531 _LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4534 _LT_TAGVAR(ld_shlibs, $1)=no
4541 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4542 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4543 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4547 _LT_TAGVAR(ld_shlibs, $1)=no
4550 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4551 # support. Future versions do this automatically, but an explicit c++rt0.o
4552 # does not break anything, and helps significantly (at the cost of a little
4555 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4556 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4557 _LT_TAGVAR(hardcode_direct, $1)=yes
4558 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4561 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4563 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4564 _LT_TAGVAR(hardcode_direct, $1)=yes
4565 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4566 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4569 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4570 freebsd* | dragonfly*)
4571 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4572 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4573 _LT_TAGVAR(hardcode_direct, $1)=yes
4574 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4578 if test "$GCC" = yes; then
4579 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4581 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4583 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4584 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4585 _LT_TAGVAR(hardcode_direct, $1)=yes
4587 # hardcode_minus_L: Not really in the search PATH,
4588 # but as the default location of the library.
4589 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4590 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4594 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4595 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4597 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4599 if test "$with_gnu_ld" = no; then
4600 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4601 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4602 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4603 _LT_TAGVAR(hardcode_direct, $1)=yes
4604 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4605 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4606 # hardcode_minus_L: Not really in the search PATH,
4607 # but as the default location of the library.
4608 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4613 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4616 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4619 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4622 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4628 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4631 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4634 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4638 if test "$with_gnu_ld" = no; then
4639 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4640 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4644 _LT_TAGVAR(hardcode_direct, $1)=no
4645 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4648 _LT_TAGVAR(hardcode_direct, $1)=yes
4649 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4650 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4652 # hardcode_minus_L: Not really in the search PATH,
4653 # but as the default location of the library.
4654 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4660 irix5* | irix6* | nonstopux*)
4661 if test "$GCC" = yes; then
4662 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4663 # Try to use the -exported_symbol ld option, if it does not
4664 # work, assume that -exports_file does not work either and
4665 # implicitly export all symbols.
4666 save_LDFLAGS="$LDFLAGS"
4667 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4668 AC_LINK_IFELSE(int foo(void) {},
4669 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
4671 LDFLAGS="$save_LDFLAGS"
4673 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4674 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
4676 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4677 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4678 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4679 _LT_TAGVAR(inherit_rpath, $1)=yes
4680 _LT_TAGVAR(link_all_deplibs, $1)=yes
4684 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4685 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
4687 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
4689 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4690 _LT_TAGVAR(hardcode_direct, $1)=yes
4691 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4695 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4696 _LT_TAGVAR(hardcode_direct, $1)=yes
4697 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4698 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4699 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4706 _LT_TAGVAR(hardcode_direct, $1)=yes
4707 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4708 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4709 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4710 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4711 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4712 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4713 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4716 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4717 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4718 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4721 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4722 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4729 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4730 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4731 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4732 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
4733 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4737 if test "$GCC" = yes; then
4738 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4739 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4741 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4742 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4744 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4745 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4746 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4749 osf4* | osf5*) # as osf3* with the addition of -msym flag
4750 if test "$GCC" = yes; then
4751 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4752 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4753 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4755 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4756 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
4757 _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~
4758 $CC -shared${allow_undefined_flag} -input $lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
4760 # Both c and cxx compiler support -rpath directly
4761 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4763 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4764 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4768 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4769 if test "$GCC" = yes; then
4771 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4772 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4773 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4775 case `$CC -V 2>&1` in
4778 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4779 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4780 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4784 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4785 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4786 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4790 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4791 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4793 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4795 # The compiler driver will combine and reorder linker options,
4796 # but understands `-z linker_flag'. GCC discards it without `$wl',
4797 # but is careful enough not to reorder.
4798 # Supported since Solaris 2.6 (maybe 2.5.1?)
4799 if test "$GCC" = yes; then
4800 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4802 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4806 _LT_TAGVAR(link_all_deplibs, $1)=yes
4810 if test "x$host_vendor" = xsequent; then
4811 # Use $CC to link under sequent, because it throws in some extra .o
4812 # files that make .init and .fini sections work.
4813 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4815 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4817 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4818 _LT_TAGVAR(hardcode_direct, $1)=yes
4819 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4820 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4824 case $host_vendor in
4826 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4827 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
4830 ## LD is ld it makes a PLAMLIB
4831 ## CC just makes a GrossModule.
4832 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
4833 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
4834 _LT_TAGVAR(hardcode_direct, $1)=no
4837 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4838 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
4841 runpath_var='LD_RUN_PATH'
4842 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4846 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4847 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4848 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
4852 if test -d /usr/nec; then
4853 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4854 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4855 runpath_var=LD_RUN_PATH
4856 hardcode_runpath_var=yes
4857 _LT_TAGVAR(ld_shlibs, $1)=yes
4861 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4862 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4863 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4864 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4865 runpath_var='LD_RUN_PATH'
4867 if test "$GCC" = yes; then
4868 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4869 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4871 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4872 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4876 sysv5* | sco3.2v5* | sco5v6*)
4877 # Note: We can NOT use -z defs as we might desire, because we do not
4878 # link with -lc, and that would cause any symbols used from libc to
4879 # always be unresolved, which means just about no library would
4880 # ever link correctly. If we're not using GNU ld we use -z text
4881 # though, which does catch some bad symbols but isn't as heavy-handed
4883 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4884 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4885 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4886 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4887 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
4888 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4889 _LT_TAGVAR(link_all_deplibs, $1)=yes
4890 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4891 runpath_var='LD_RUN_PATH'
4893 if test "$GCC" = yes; then
4894 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4895 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4897 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4898 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4903 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4904 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4905 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4909 _LT_TAGVAR(ld_shlibs, $1)=no
4913 if test x$host_vendor = xsni; then
4915 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4916 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
4922 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
4923 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4925 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
4927 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
4928 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
4929 _LT_DECL([], [extract_expsyms_cmds], [2],
4930 [The commands to extract the exported symbol list from a shared archive])
4933 # Do we need to explicitly link libc?
4935 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
4937 # Assume -lc should be added
4938 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4940 if test "$enable_shared" = yes && test "$GCC" = yes; then
4941 case $_LT_TAGVAR(archive_cmds, $1) in
4943 # FIXME: we may have to deal with multi-command sequences.
4946 # Test whether the compiler implicitly links with -lc since on some
4947 # systems, -lgcc has to come before -lc. If gcc already passes -lc
4948 # to ld, don't add -lc before -lgcc.
4949 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
4951 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4953 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
4956 libobjs=conftest.$ac_objext
4958 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
4959 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
4965 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
4966 _LT_TAGVAR(allow_undefined_flag, $1)=
4967 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
4969 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4971 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4973 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
4975 cat conftest.err 1>&5
4978 AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
4985 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
4986 [Whether or not to add -lc for building shared libraries])
4987 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
4988 [enable_shared_with_static_runtimes], [0],
4989 [Whether or not to disallow shared libs when runtime libs are static])
4990 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
4991 [Compiler flag to allow reflexive dlopens])
4992 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
4993 [Compiler flag to generate shared objects directly from archives])
4994 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
4995 [Create an old-style archive from a shared archive])
4996 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
4997 [Create a temporary old-style archive to link instead of a shared archive])
4998 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
4999 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5000 _LT_TAGDECL([], [module_cmds], [2],
5001 [Commands used to build a loadable module if different from building
5003 _LT_TAGDECL([], [module_expsym_cmds], [2])
5004 _LT_TAGDECL([], [with_gnu_ld], [1],
5005 [Whether we are building with GNU ld or not])
5006 _LT_TAGDECL([], [allow_undefined_flag], [1],
5007 [Flag that allows shared libraries with undefined symbols to be built])
5008 _LT_TAGDECL([], [no_undefined_flag], [1],
5009 [Flag that enforces no undefined symbols])
5010 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5011 [Flag to hardcode $libdir into a binary during linking.
5012 This must work even if $libdir does not exist])
5013 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5014 [[If ld is used when linking, flag to hardcode $libdir into a binary
5015 during linking. This must work even if $libdir does not exist]])
5016 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5017 [Whether we need a single "-rpath" flag with a separated argument])
5018 _LT_TAGDECL([], [hardcode_direct], [0],
5019 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5020 DIR into the resulting binary])
5021 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5022 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5023 DIR into the resulting binary and the resulting library dependency is
5024 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5025 library is relocated])
5026 _LT_TAGDECL([], [hardcode_minus_L], [0],
5027 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5028 into the resulting binary])
5029 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5030 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5031 into the resulting binary])
5032 _LT_TAGDECL([], [hardcode_automatic], [0],
5033 [Set to "yes" if building a shared library automatically hardcodes DIR
5034 into the library and all subsequent libraries and executables linked
5036 _LT_TAGDECL([], [inherit_rpath], [0],
5037 [Set to yes if linker adds runtime paths of dependent libraries
5038 to runtime path list])
5039 _LT_TAGDECL([], [link_all_deplibs], [0],
5040 [Whether libtool must link a program against all its dependency libraries])
5041 _LT_TAGDECL([], [fix_srcfile_path], [1],
5042 [Fix the shell variable $srcfile for the compiler])
5043 _LT_TAGDECL([], [always_export_symbols], [0],
5044 [Set to "yes" if exported symbols are required])
5045 _LT_TAGDECL([], [export_symbols_cmds], [2],
5046 [The commands to list exported symbols])
5047 _LT_TAGDECL([], [exclude_expsyms], [1],
5048 [Symbols that should not be listed in the preloaded symbols])
5049 _LT_TAGDECL([], [include_expsyms], [1],
5050 [Symbols that must always be exported])
5051 _LT_TAGDECL([], [prelink_cmds], [2],
5052 [Commands necessary for linking programs (against libraries) with templates])
5053 _LT_TAGDECL([], [file_list_spec], [1],
5054 [Specify filename containing input files])
5055 dnl FIXME: Not yet implemented
5056 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5057 dnl [Compiler flag to generate thread safe objects])
5058 ])# _LT_LINKER_SHLIBS
5061 # _LT_LANG_C_CONFIG([TAG])
5062 # ------------------------
5063 # Ensure that the configuration variables for a C compiler are suitably
5064 # defined. These variables are subsequently used by _LT_CONFIG to write
5065 # the compiler configuration to `libtool'.
5066 m4_defun([_LT_LANG_C_CONFIG],
5067 [m4_require([_LT_DECL_EGREP])dnl
5071 # Source file extension for C test sources.
5074 # Object file extension for compiled C test sources.
5076 _LT_TAGVAR(objext, $1)=$objext
5078 # Code to be used in simple compile tests
5079 lt_simple_compile_test_code="int some_variable = 0;"
5081 # Code to be used in simple link tests
5082 lt_simple_link_test_code='int main(){return(0);}'
5085 # Save the default compiler, since it gets overwritten when the other
5086 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5087 compiler_DEFAULT=$CC
5089 # save warnings/boilerplate of simple test code
5090 _LT_COMPILER_BOILERPLATE
5091 _LT_LINKER_BOILERPLATE
5094 ## There is no encapsulation within the following macros, do not change
5095 ## the running order or otherwise move them around unless you know exactly
5096 ## what you are doing...
5097 if test -n "$compiler"; then
5098 _LT_COMPILER_NO_RTTI($1)
5099 _LT_COMPILER_PIC($1)
5100 _LT_COMPILER_C_O($1)
5101 _LT_COMPILER_FILE_LOCKS($1)
5102 _LT_LINKER_SHLIBS($1)
5103 _LT_SYS_DYNAMIC_LINKER($1)
5104 _LT_LINKER_HARDCODE_LIBPATH($1)
5108 # Report which library types will actually be built
5109 AC_MSG_CHECKING([if libtool supports shared libraries])
5110 AC_MSG_RESULT([$can_build_shared])
5112 AC_MSG_CHECKING([whether to build shared libraries])
5113 test "$can_build_shared" = "no" && enable_shared=no
5115 # On AIX, shared libraries and static libraries use the same namespace, and
5116 # are all built from PIC.
5119 test "$enable_shared" = yes && enable_static=no
5120 if test -n "$RANLIB"; then
5121 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5122 postinstall_cmds='$RANLIB $lib'
5127 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5128 test "$enable_shared" = yes && enable_static=no
5132 AC_MSG_RESULT([$enable_shared])
5134 AC_MSG_CHECKING([whether to build static libraries])
5135 # Make sure either enable_shared or enable_static is yes.
5136 test "$enable_shared" = yes || enable_static=yes
5137 AC_MSG_RESULT([$enable_static])
5143 ])# _LT_LANG_C_CONFIG
5148 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5149 # compiler, we have our own version here.
5150 m4_defun([_LT_PROG_CXX],
5152 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5154 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5155 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5156 (test "X$CXX" != "Xg++"))) ; then
5159 _lt_caught_CXX_error=yes
5161 popdef([AC_MSG_ERROR])
5164 dnl aclocal-1.4 backwards compatibility:
5165 dnl AC_DEFUN([_LT_PROG_CXX], [])
5168 # _LT_LANG_CXX_CONFIG([TAG])
5169 # --------------------------
5170 # Ensure that the configuration variables for a C++ compiler are suitably
5171 # defined. These variables are subsequently used by _LT_CONFIG to write
5172 # the compiler configuration to `libtool'.
5173 m4_defun([_LT_LANG_CXX_CONFIG],
5174 [AC_REQUIRE([_LT_PROG_CXX])dnl
5175 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5176 m4_require([_LT_DECL_EGREP])dnl
5179 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5180 _LT_TAGVAR(allow_undefined_flag, $1)=
5181 _LT_TAGVAR(always_export_symbols, $1)=no
5182 _LT_TAGVAR(archive_expsym_cmds, $1)=
5183 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5184 _LT_TAGVAR(hardcode_direct, $1)=no
5185 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5186 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5187 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5188 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5189 _LT_TAGVAR(hardcode_minus_L, $1)=no
5190 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5191 _LT_TAGVAR(hardcode_automatic, $1)=no
5192 _LT_TAGVAR(inherit_rpath, $1)=no
5193 _LT_TAGVAR(module_cmds, $1)=
5194 _LT_TAGVAR(module_expsym_cmds, $1)=
5195 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5196 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5197 _LT_TAGVAR(no_undefined_flag, $1)=
5198 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5199 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5201 # Source file extension for C++ test sources.
5204 # Object file extension for compiled C++ test sources.
5206 _LT_TAGVAR(objext, $1)=$objext
5208 # No sense in running all these tests if we already determined that
5209 # the CXX compiler isn't working. Some variables (like enable_shared)
5210 # are currently assumed to apply to all compilers on this platform,
5211 # and will be corrupted by setting them based on a non-working compiler.
5212 if test "$_lt_caught_CXX_error" != yes; then
5213 # Code to be used in simple compile tests
5214 lt_simple_compile_test_code="int some_variable = 0;"
5216 # Code to be used in simple link tests
5217 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5219 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5222 # save warnings/boilerplate of simple test code
5223 _LT_COMPILER_BOILERPLATE
5224 _LT_LINKER_BOILERPLATE
5226 # Allow CC to be a program name with arguments.
5231 lt_save_with_gnu_ld=$with_gnu_ld
5232 lt_save_path_LD=$lt_cv_path_LD
5233 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5234 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5236 $as_unset lt_cv_prog_gnu_ld
5238 if test -n "${lt_cv_path_LDCXX+set}"; then
5239 lt_cv_path_LD=$lt_cv_path_LDCXX
5241 $as_unset lt_cv_path_LD
5243 test -z "${LDCXX+set}" || LD=$LDCXX
5246 _LT_TAGVAR(compiler, $1)=$CC
5247 _LT_CC_BASENAME([$compiler])
5249 if test -n "$compiler"; then
5250 # We don't want -fno-exception when compiling C++ code, so set the
5251 # no_builtin_flag separately
5252 if test "$GXX" = yes; then
5253 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5255 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5258 if test "$GXX" = yes; then
5259 # Set up default GNU C++ configuration
5263 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5264 # archiving commands below assume that GNU ld is being used.
5265 if test "$with_gnu_ld" = yes; then
5266 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5267 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5269 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5270 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5272 # If archive_cmds runs LD, not CC, wlarc should be empty
5273 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5274 # investigate it a little bit more. (MM)
5277 # ancient GNU ld didn't support --whole-archive et. al.
5278 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5279 $GREP 'no-whole-archive' > /dev/null; then
5280 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5282 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5288 # A generic and very simple default shared library creation
5289 # command for GNU C++ for the case where it uses the native
5290 # linker, instead of GNU ld. If possible, this setting should
5291 # overridden to take advantage of the native linker features on
5292 # the platform it is being used on.
5293 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5296 # Commands to make compiler produce verbose output that lists
5297 # what "hidden" libraries, object files and flags are used when
5298 # linking a shared library.
5299 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5307 # PORTME: fill in a description of your system's C++ link characteristics
5308 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5309 _LT_TAGVAR(ld_shlibs, $1)=yes
5312 # FIXME: insert proper C++ library support
5313 _LT_TAGVAR(ld_shlibs, $1)=no
5316 if test "$host_cpu" = ia64; then
5317 # On IA64, the linker does run time linking by default, so we don't
5318 # have to do anything special.
5319 aix_use_runtimelinking=no
5320 exp_sym_flag='-Bexport'
5323 aix_use_runtimelinking=no
5325 # Test if we are trying to use run time linking or normal
5326 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5327 # need to do runtime linking.
5328 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5329 for ld_flag in $LDFLAGS; do
5332 aix_use_runtimelinking=yes
5340 exp_sym_flag='-bexport'
5341 no_entry_flag='-bnoentry'
5344 # When large executables or shared objects are built, AIX ld can
5345 # have problems creating the table of contents. If linking a library
5346 # or program results in "error TOC overflow" add -mminimal-toc to
5347 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5348 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5350 _LT_TAGVAR(archive_cmds, $1)=''
5351 _LT_TAGVAR(hardcode_direct, $1)=yes
5352 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5353 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5354 _LT_TAGVAR(link_all_deplibs, $1)=yes
5355 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5357 if test "$GXX" = yes; then
5358 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5359 # We only want to do this on AIX 4.2 and lower, the check
5360 # below for broken collect2 doesn't work under 4.3+
5361 collect2name=`${CC} -print-prog-name=collect2`
5362 if test -f "$collect2name" &&
5363 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5365 # We have reworked collect2
5368 # We have old collect2
5369 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5370 # It fails to find uninstalled libraries when the uninstalled
5371 # path is not listed in the libpath. Setting hardcode_minus_L
5372 # to unsupported forces relinking
5373 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5374 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5375 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5378 shared_flag='-shared'
5379 if test "$aix_use_runtimelinking" = yes; then
5380 shared_flag="$shared_flag "'${wl}-G'
5384 if test "$host_cpu" = ia64; then
5385 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5386 # chokes on -Wl,-G. The following line is correct:
5389 if test "$aix_use_runtimelinking" = yes; then
5390 shared_flag='${wl}-G'
5392 shared_flag='${wl}-bM:SRE'
5397 # It seems that -bexpall does not export symbols beginning with
5398 # underscore (_), so it is better to generate a list of symbols to
5400 _LT_TAGVAR(always_export_symbols, $1)=yes
5401 if test "$aix_use_runtimelinking" = yes; then
5402 # Warning - without using the other runtime loading flags (-brtl),
5403 # -berok will link without error, but may produce a broken library.
5404 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5405 # Determine the default libpath from the value encoded in an empty
5407 _LT_SYS_MODULE_PATH_AIX
5408 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5410 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5412 if test "$host_cpu" = ia64; then
5413 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5414 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5415 _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"
5417 # Determine the default libpath from the value encoded in an
5419 _LT_SYS_MODULE_PATH_AIX
5420 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5421 # Warning - without using the other run time loading flags,
5422 # -berok will link without error, but may produce a broken library.
5423 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5424 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5425 # Exported symbols can be pulled into shared objects from archives
5426 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5427 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5428 # This is similar to how AIX traditionally builds its shared
5430 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5436 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5437 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5438 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5439 # support --undefined. This deserves some investigation. FIXME
5440 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5442 _LT_TAGVAR(ld_shlibs, $1)=no
5447 case $cc_basename in
5449 # FIXME: insert proper C++ library support
5450 _LT_TAGVAR(ld_shlibs, $1)=no
5455 cygwin* | mingw* | pw32*)
5456 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5457 # as there is no search path for DLLs.
5458 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5459 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5460 _LT_TAGVAR(always_export_symbols, $1)=no
5461 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5463 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5464 _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'
5465 # If the export-symbols file already is a .def file (1st line
5466 # is EXPORTS), use it as is; otherwise, prepend...
5467 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5468 cp $export_symbols $output_objdir/$soname.def;
5470 echo EXPORTS > $output_objdir/$soname.def;
5471 cat $export_symbols >> $output_objdir/$soname.def;
5473 $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'
5475 _LT_TAGVAR(ld_shlibs, $1)=no
5478 darwin* | rhapsody*)
5480 rhapsody* | darwin1.[[012]])
5481 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5484 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
5486 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5489 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5494 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5495 _LT_TAGVAR(hardcode_direct, $1)=no
5496 _LT_TAGVAR(hardcode_automatic, $1)=yes
5497 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5498 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
5499 _LT_TAGVAR(link_all_deplibs, $1)=yes
5501 if test "$GXX" = yes ; then
5502 AC_CACHE_VAL([lt_cv_apple_cc_single_mod],
5503 [lt_cv_apple_cc_single_mod=no
5504 if test -z "${LT_MULTI_MODULE}"; then
5505 # By default we will add the -single_module flag. You can override
5506 # by either setting the environment variable LT_MULTI_MODULE
5507 # non-empty at configure time, or by adding -multi-module to the
5509 echo "int foo(void){return 1;}" > conftest.c
5510 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
5511 -dynamiclib ${wl}-single_module conftest.c
5512 if test -f libconftest.dylib; then
5513 lt_cv_apple_cc_single_mod=yes
5514 rm libconftest.dylib
5518 output_verbose_link_cmd=echo
5519 if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
5520 _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5521 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5523 _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'
5524 _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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5526 _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5527 _LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5529 case $cc_basename in
5531 output_verbose_link_cmd=echo
5532 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO "$rpath/$soname"` $verstring'
5533 _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5534 # Don't fix this by using the ld -exported_symbols_list flag,
5535 # it doesn't exist in older darwin lds
5536 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5537 _LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5540 _LT_TAGVAR(ld_shlibs, $1)=no
5547 case $cc_basename in
5549 # FIXME: insert proper C++ library support
5550 _LT_TAGVAR(ld_shlibs, $1)=no
5553 # Green Hills C++ Compiler
5554 # FIXME: insert proper C++ library support
5555 _LT_TAGVAR(ld_shlibs, $1)=no
5558 # FIXME: insert proper C++ library support
5559 _LT_TAGVAR(ld_shlibs, $1)=no
5565 # C++ shared libraries reported to be fairly broken before
5567 _LT_TAGVAR(ld_shlibs, $1)=no
5571 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5574 freebsd* | dragonfly*)
5575 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5577 _LT_TAGVAR(ld_shlibs, $1)=yes
5584 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5585 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5586 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5587 _LT_TAGVAR(hardcode_direct, $1)=yes
5588 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5589 # but as the default
5590 # location of the library.
5592 case $cc_basename in
5594 # FIXME: insert proper C++ library support
5595 _LT_TAGVAR(ld_shlibs, $1)=no
5598 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5599 # Commands to make compiler produce verbose output that lists
5600 # what "hidden" libraries, object files and flags are used when
5601 # linking a shared library.
5603 # There doesn't appear to be a way to prevent this compiler from
5604 # explicitly linking system object files so we need to strip them
5605 # from the output so that they don't get included in the library
5607 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; $ECHO "X$list" | $Xsed'
5610 if test "$GXX" = yes; then
5611 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5613 # FIXME: insert proper C++ library support
5614 _LT_TAGVAR(ld_shlibs, $1)=no
5621 if test $with_gnu_ld = no; then
5622 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5623 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5629 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5635 _LT_TAGVAR(hardcode_direct, $1)=no
5636 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5639 _LT_TAGVAR(hardcode_direct, $1)=yes
5640 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5641 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5642 # but as the default
5643 # location of the library.
5647 case $cc_basename in
5649 # FIXME: insert proper C++ library support
5650 _LT_TAGVAR(ld_shlibs, $1)=no
5655 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5658 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5661 _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'
5664 # Commands to make compiler produce verbose output that lists
5665 # what "hidden" libraries, object files and flags are used when
5666 # linking a shared library.
5668 # There doesn't appear to be a way to prevent this compiler from
5669 # explicitly linking system object files so we need to strip them
5670 # from the output so that they don't get included in the library
5672 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; $ECHO "X$list" | $Xsed'
5675 if test "$GXX" = yes; then
5676 if test $with_gnu_ld = no; then
5679 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5682 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5685 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5690 # FIXME: insert proper C++ library support
5691 _LT_TAGVAR(ld_shlibs, $1)=no
5698 _LT_TAGVAR(hardcode_direct, $1)=no
5699 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5700 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5701 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5702 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5703 # Instead, shared libraries are loaded at an image base (0x10000000 by
5704 # default) and relocated if they conflict, which is a slow very memory
5705 # consuming and fragmenting process. To avoid this, we pick a random,
5706 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5707 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5708 _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'
5709 _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'
5712 case $cc_basename in
5715 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5717 # Archives containing C++ object files must be created using
5718 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
5719 # necessary to make sure instantiated templates are included
5721 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5724 if test "$GXX" = yes; then
5725 if test "$with_gnu_ld" = no; then
5726 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5728 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
5731 _LT_TAGVAR(link_all_deplibs, $1)=yes
5734 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5735 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5736 _LT_TAGVAR(inherit_rpath, $1)=yes
5739 linux* | k*bsd*-gnu)
5740 case $cc_basename in
5742 # Kuck and Associates, Inc. (KAI) C++ Compiler
5744 # KCC will only create a shared library if the output file
5745 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5746 # to its proper name (with version) after linking.
5747 _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'
5748 _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'
5749 # Commands to make compiler produce verbose output that lists
5750 # what "hidden" libraries, object files and flags are used when
5751 # linking a shared library.
5753 # There doesn't appear to be a way to prevent this compiler from
5754 # explicitly linking system object files so we need to strip them
5755 # from the output so that they don't get included in the library
5757 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; $ECHO "X$list" | $Xsed'
5759 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5760 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5762 # Archives containing C++ object files must be created using
5763 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5764 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5769 # version 8.0 and above of icpc choke on multiply defined symbols
5770 # if we add $predep_objects and $postdep_objects, however 7.1 and
5771 # earlier do not add the objects themselves.
5772 case `$CC -V 2>&1` in
5774 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5775 _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'
5777 *) # Version 8.0 or newer
5780 ia64*) tmp_idyn=' -i_dynamic';;
5782 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5783 _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'
5786 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5787 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5788 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5789 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5792 # Portland Group C++ compiler
5795 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5797 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5798 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5799 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5801 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5802 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5804 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5806 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5807 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5808 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5810 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5811 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
5813 *) # Version 6 will use weak symbols
5814 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5815 _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'
5819 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5820 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5821 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5825 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5826 _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'
5828 runpath_var=LD_RUN_PATH
5829 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5830 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5832 # Commands to make compiler produce verbose output that lists
5833 # what "hidden" libraries, object files and flags are used when
5834 # linking a shared library.
5836 # There doesn't appear to be a way to prevent this compiler from
5837 # explicitly linking system object files so we need to strip them
5838 # from the output so that they don't get included in the library
5840 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
5843 case `$CC -V 2>&1 | sed 5q` in
5846 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5847 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5848 _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'
5849 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5850 _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5852 # Not sure whether something based on
5853 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5855 output_verbose_link_cmd='echo'
5857 # Archives containing C++ object files must be created using
5858 # "CC -xar", where "CC" is the Sun C++ compiler. This is
5859 # necessary to make sure instantiated templates are included
5861 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5869 # FIXME: insert proper C++ library support
5870 _LT_TAGVAR(ld_shlibs, $1)=no
5874 # FIXME: insert proper C++ library support
5875 _LT_TAGVAR(ld_shlibs, $1)=no
5879 case $cc_basename in
5881 # FIXME: insert proper C++ library support
5882 _LT_TAGVAR(ld_shlibs, $1)=no
5885 # FIXME: insert proper C++ library support
5886 _LT_TAGVAR(ld_shlibs, $1)=no
5892 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5893 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
5895 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5896 _LT_TAGVAR(hardcode_direct, $1)=yes
5897 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5899 # Workaround some broken pre-1.5 toolchains
5900 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
5904 _LT_TAGVAR(ld_shlibs, $1)=yes
5908 # C++ shared libraries are fairly broken
5909 _LT_TAGVAR(ld_shlibs, $1)=no
5913 _LT_TAGVAR(hardcode_direct, $1)=yes
5914 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5915 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5916 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5917 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5918 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5919 _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'
5920 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5921 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5923 output_verbose_link_cmd=echo
5926 osf3* | osf4* | osf5*)
5927 case $cc_basename in
5929 # Kuck and Associates, Inc. (KAI) C++ Compiler
5931 # KCC will only create a shared library if the output file
5932 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5933 # to its proper name (with version) after linking.
5934 _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'
5936 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5937 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5939 # Archives containing C++ object files must be created using
5940 # the KAI C++ compiler.
5942 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
5943 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
5947 # Rational C++ 2.4.1
5948 # FIXME: insert proper C++ library support
5949 _LT_TAGVAR(ld_shlibs, $1)=no
5954 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5955 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5956 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5959 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5960 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
5961 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5962 echo "-hidden">> $lib.exp~
5963 $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
5965 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5969 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5971 # Commands to make compiler produce verbose output that lists
5972 # what "hidden" libraries, object files and flags are used when
5973 # linking a shared library.
5975 # There doesn't appear to be a way to prevent this compiler from
5976 # explicitly linking system object files so we need to strip them
5977 # from the output so that they don't get included in the library
5979 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
5982 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5983 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5986 _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5989 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5993 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5994 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5996 # Commands to make compiler produce verbose output that lists
5997 # what "hidden" libraries, object files and flags are used when
5998 # linking a shared library.
5999 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6002 # FIXME: insert proper C++ library support
6003 _LT_TAGVAR(ld_shlibs, $1)=no
6010 # FIXME: insert proper C++ library support
6011 _LT_TAGVAR(ld_shlibs, $1)=no
6015 case $cc_basename in
6018 # FIXME: insert proper C++ library support
6019 _LT_TAGVAR(ld_shlibs, $1)=no
6023 # FIXME: insert proper C++ library support
6024 _LT_TAGVAR(ld_shlibs, $1)=no
6027 # FIXME: insert proper C++ library support
6028 _LT_TAGVAR(ld_shlibs, $1)=no
6034 case $cc_basename in
6036 # Sun C++ 4.2, 5.x and Centerline C++
6037 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6038 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6039 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6040 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6041 $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'
6043 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6044 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6046 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6048 # The compiler driver will combine and reorder linker options,
6049 # but understands `-z linker_flag'.
6050 # Supported since Solaris 2.6 (maybe 2.5.1?)
6051 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6054 _LT_TAGVAR(link_all_deplibs, $1)=yes
6056 output_verbose_link_cmd='echo'
6058 # Archives containing C++ object files must be created using
6059 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6060 # necessary to make sure instantiated templates are included
6062 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6065 # Green Hills C++ Compiler
6066 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6068 # The C++ compiler must be used to create the archive.
6069 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6072 # GNU C++ compiler with Solaris linker
6073 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6074 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6075 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6076 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6077 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6078 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6080 # Commands to make compiler produce verbose output that lists
6081 # what "hidden" libraries, object files and flags are used when
6082 # linking a shared library.
6083 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6085 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6087 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6088 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6089 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6091 # Commands to make compiler produce verbose output that lists
6092 # what "hidden" libraries, object files and flags are used when
6093 # linking a shared library.
6094 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6097 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6099 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6101 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6109 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6110 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6111 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6112 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6113 runpath_var='LD_RUN_PATH'
6115 case $cc_basename in
6117 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6118 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6121 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6122 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6127 sysv5* | sco3.2v5* | sco5v6*)
6128 # Note: We can NOT use -z defs as we might desire, because we do not
6129 # link with -lc, and that would cause any symbols used from libc to
6130 # always be unresolved, which means just about no library would
6131 # ever link correctly. If we're not using GNU ld we use -z text
6132 # though, which does catch some bad symbols but isn't as heavy-handed
6134 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6135 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6136 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6137 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6138 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6139 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6140 _LT_TAGVAR(link_all_deplibs, $1)=yes
6141 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6142 runpath_var='LD_RUN_PATH'
6144 case $cc_basename in
6146 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6147 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6150 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6151 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6157 case $cc_basename in
6159 # NonStop-UX NCC 3.20
6160 # FIXME: insert proper C++ library support
6161 _LT_TAGVAR(ld_shlibs, $1)=no
6164 # FIXME: insert proper C++ library support
6165 _LT_TAGVAR(ld_shlibs, $1)=no
6171 # FIXME: insert proper C++ library support
6172 _LT_TAGVAR(ld_shlibs, $1)=no
6176 # FIXME: insert proper C++ library support
6177 _LT_TAGVAR(ld_shlibs, $1)=no
6181 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6182 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6184 _LT_TAGVAR(GCC, $1)="$GXX"
6185 _LT_TAGVAR(LD, $1)="$LD"
6188 ## There is no encapsulation within the following macros, do not change
6189 ## the running order or otherwise move them around unless you know exactly
6190 ## what you are doing...
6191 _LT_SYS_HIDDEN_LIBDEPS($1)
6192 _LT_COMPILER_PIC($1)
6193 _LT_COMPILER_C_O($1)
6194 _LT_COMPILER_FILE_LOCKS($1)
6195 _LT_LINKER_SHLIBS($1)
6196 _LT_SYS_DYNAMIC_LINKER($1)
6197 _LT_LINKER_HARDCODE_LIBPATH($1)
6200 fi # test -n "$compiler"
6206 with_gnu_ld=$lt_save_with_gnu_ld
6207 lt_cv_path_LDCXX=$lt_cv_path_LD
6208 lt_cv_path_LD=$lt_save_path_LD
6209 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6210 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6211 fi # test "$_lt_caught_CXX_error" != yes
6214 ])# _LT_LANG_CXX_CONFIG
6217 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6218 # ---------------------------------
6219 # Figure out "hidden" library dependencies from verbose
6220 # compiler output when linking a shared library.
6221 # Parse the compiler output and extract the necessary
6222 # objects, libraries and library flags.
6223 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6224 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6225 # Dependencies to place before and after the object being linked:
6226 _LT_TAGVAR(predep_objects, $1)=
6227 _LT_TAGVAR(postdep_objects, $1)=
6228 _LT_TAGVAR(predeps, $1)=
6229 _LT_TAGVAR(postdeps, $1)=
6230 _LT_TAGVAR(compiler_lib_search_path, $1)=
6232 dnl we can't use the lt_simple_compile_test_code here,
6233 dnl because it contains code intended for an executable,
6234 dnl not a library. It's possible we should let each
6235 dnl tag define a new lt_????_link_test_code variable,
6236 dnl but it's only used here...
6237 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6239 void foo (void) { a = 0; }
6241 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6245 Foo (void) { a = 0; }
6250 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6258 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6266 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6269 public void bar (void) {
6275 dnl Parse the compiler output and extract the necessary
6276 dnl objects, libraries and library flags.
6277 if AC_TRY_EVAL(ac_compile); then
6278 # Parse the compiler output and extract the necessary
6279 # objects, libraries and library flags.
6281 # Sentinel used to keep track of whether or not we are before
6282 # the conftest object file.
6283 pre_test_object_deps_done=no
6285 # The `*' in the case matches for architectures that use `case' in
6286 # $output_verbose_cmd can trigger glob expansion during the loop
6287 # eval without this substitution.
6288 output_verbose_link_cmd=`$ECHO "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
6290 for p in `eval $output_verbose_link_cmd`; do
6294 # Some compilers place space between "-{L,R}" and the path.
6296 if test $p = "-L" ||
6297 test $p = "-R"; then
6304 if test "$pre_test_object_deps_done" = no; then
6307 # Internal compiler library paths should come after those
6308 # provided the user. The postdeps already come after the
6309 # user supplied libs so there is no need to process them.
6310 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6311 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6313 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6316 # The "-l" case would never come before the object being
6317 # linked, so don't bother handling this case.
6320 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6321 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6323 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6329 # This assumes that the test object file only shows up
6330 # once in the compiler output.
6331 if test "$p" = "conftest.$objext"; then
6332 pre_test_object_deps_done=yes
6336 if test "$pre_test_object_deps_done" = no; then
6337 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6338 _LT_TAGVAR(predep_objects, $1)="$p"
6340 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6343 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6344 _LT_TAGVAR(postdep_objects, $1)="$p"
6346 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6351 *) ;; # Ignore the rest.
6359 echo "libtool.m4: error: problem compiling $1 test program"
6362 $RM -f confest.$objext
6364 # PORTME: override above test on systems where it is broken
6368 # Interix 3.5 installs completely hosed .la files for C++, so rather than
6369 # hack all around it, let's just trust "g++" to DTRT.
6370 _LT_TAGVAR(predep_objects,$1)=
6371 _LT_TAGVAR(postdep_objects,$1)=
6372 _LT_TAGVAR(postdeps,$1)=
6376 case `$CC -V 2>&1 | sed 5q` in
6380 # The more standards-conforming stlport4 library is
6381 # incompatible with the Cstd library. Avoid specifying
6382 # it if it's in CXXFLAGS. Ignore libCrun as
6383 # -library=stlport4 depends on it.
6384 case " $CXX $CXXFLAGS " in
6385 *" -library=stlport4 "*)
6386 solaris_use_stlport4=yes
6390 if test "$solaris_use_stlport4" != yes; then
6391 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6398 case $cc_basename in
6400 # The more standards-conforming stlport4 library is
6401 # incompatible with the Cstd library. Avoid specifying
6402 # it if it's in CXXFLAGS. Ignore libCrun as
6403 # -library=stlport4 depends on it.
6404 case " $CXX $CXXFLAGS " in
6405 *" -library=stlport4 "*)
6406 solaris_use_stlport4=yes
6410 # Adding this requires a known-good setup of shared libraries for
6411 # Sun compiler versions before 5.6, else PIC objects from an old
6412 # archive will be linked into the output, leading to subtle bugs.
6413 if test "$solaris_use_stlport4" != yes; then
6414 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6422 case " $_LT_TAGVAR(postdeps, $1) " in
6423 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6425 _LT_TAGDECL([], [predep_objects], [1],
6426 [Dependencies to place before and after the objects being linked to
6427 create a shared library])
6428 _LT_TAGDECL([], [postdep_objects], [1])
6429 _LT_TAGDECL([], [predeps], [1])
6430 _LT_TAGDECL([], [postdeps], [1])
6431 _LT_TAGDECL([], [compiler_lib_search_path], [1],
6432 [The library search path used internally by the compiler when linking
6434 ])# _LT_SYS_HIDDEN_LIBDEPS
6439 # Since AC_PROG_F77 is broken, in that it returns the empty string
6440 # if there is no fortran compiler, we have our own version here.
6441 m4_defun([_LT_PROG_F77],
6443 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6445 if test -z "$F77" || test "X$F77" = "Xno"; then
6448 popdef([AC_MSG_ERROR])
6451 dnl aclocal-1.4 backwards compatibility:
6452 dnl AC_DEFUN([_LT_PROG_F77], [])
6455 # _LT_LANG_F77_CONFIG([TAG])
6456 # --------------------------
6457 # Ensure that the configuration variables for a Fortran 77 compiler are
6458 # suitably defined. These variables are subsequently used by _LT_CONFIG
6459 # to write the compiler configuration to `libtool'.
6460 m4_defun([_LT_LANG_F77_CONFIG],
6461 [AC_REQUIRE([_LT_PROG_F77])dnl
6462 AC_LANG_PUSH(Fortran 77)
6464 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6465 _LT_TAGVAR(allow_undefined_flag, $1)=
6466 _LT_TAGVAR(always_export_symbols, $1)=no
6467 _LT_TAGVAR(archive_expsym_cmds, $1)=
6468 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6469 _LT_TAGVAR(hardcode_direct, $1)=no
6470 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6471 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6472 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6473 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6474 _LT_TAGVAR(hardcode_minus_L, $1)=no
6475 _LT_TAGVAR(hardcode_automatic, $1)=no
6476 _LT_TAGVAR(inherit_rpath, $1)=no
6477 _LT_TAGVAR(module_cmds, $1)=
6478 _LT_TAGVAR(module_expsym_cmds, $1)=
6479 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6480 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6481 _LT_TAGVAR(no_undefined_flag, $1)=
6482 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6483 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6485 # Source file extension for f77 test sources.
6488 # Object file extension for compiled f77 test sources.
6490 _LT_TAGVAR(objext, $1)=$objext
6492 # No sense in running all these tests if we already determined that
6493 # the F77 compiler isn't working. Some variables (like enable_shared)
6494 # are currently assumed to apply to all compilers on this platform,
6495 # and will be corrupted by setting them based on a non-working compiler.
6496 if test "$_lt_disable_F77" != yes; then
6497 # Code to be used in simple compile tests
6498 lt_simple_compile_test_code="\
6504 # Code to be used in simple link tests
6505 lt_simple_link_test_code="\
6510 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6513 # save warnings/boilerplate of simple test code
6514 _LT_COMPILER_BOILERPLATE
6515 _LT_LINKER_BOILERPLATE
6517 # Allow CC to be a program name with arguments.
6521 _LT_TAGVAR(compiler, $1)=$CC
6522 _LT_CC_BASENAME([$compiler])
6524 if test -n "$compiler"; then
6525 AC_MSG_CHECKING([if libtool supports shared libraries])
6526 AC_MSG_RESULT([$can_build_shared])
6528 AC_MSG_CHECKING([whether to build shared libraries])
6529 test "$can_build_shared" = "no" && enable_shared=no
6531 # On AIX, shared libraries and static libraries use the same namespace, and
6532 # are all built from PIC.
6535 test "$enable_shared" = yes && enable_static=no
6536 if test -n "$RANLIB"; then
6537 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6538 postinstall_cmds='$RANLIB $lib'
6542 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6543 test "$enable_shared" = yes && enable_static=no
6547 AC_MSG_RESULT([$enable_shared])
6549 AC_MSG_CHECKING([whether to build static libraries])
6550 # Make sure either enable_shared or enable_static is yes.
6551 test "$enable_shared" = yes || enable_static=yes
6552 AC_MSG_RESULT([$enable_static])
6554 _LT_TAGVAR(GCC, $1)="$G77"
6555 _LT_TAGVAR(LD, $1)="$LD"
6558 ## There is no encapsulation within the following macros, do not change
6559 ## the running order or otherwise move them around unless you know exactly
6560 ## what you are doing...
6561 _LT_COMPILER_PIC($1)
6562 _LT_COMPILER_C_O($1)
6563 _LT_COMPILER_FILE_LOCKS($1)
6564 _LT_LINKER_SHLIBS($1)
6565 _LT_SYS_DYNAMIC_LINKER($1)
6566 _LT_LINKER_HARDCODE_LIBPATH($1)
6569 fi # test -n "$compiler"
6572 fi # test "$_lt_disable_F77" != yes
6575 ])# _LT_LANG_F77_CONFIG
6580 # Since AC_PROG_FC is broken, in that it returns the empty string
6581 # if there is no fortran compiler, we have our own version here.
6582 m4_defun([_LT_PROG_FC],
6584 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6586 if test -z "$FC" || test "X$FC" = "Xno"; then
6589 popdef([AC_MSG_ERROR])
6592 dnl aclocal-1.4 backwards compatibility:
6593 dnl AC_DEFUN([_LT_PROG_FC], [])
6596 # _LT_LANG_FC_CONFIG([TAG])
6597 # -------------------------
6598 # Ensure that the configuration variables for a Fortran compiler are
6599 # suitably defined. These variables are subsequently used by _LT_CONFIG
6600 # to write the compiler configuration to `libtool'.
6601 m4_defun([_LT_LANG_FC_CONFIG],
6602 [AC_REQUIRE([_LT_PROG_FC])dnl
6603 AC_LANG_PUSH(Fortran)
6605 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6606 _LT_TAGVAR(allow_undefined_flag, $1)=
6607 _LT_TAGVAR(always_export_symbols, $1)=no
6608 _LT_TAGVAR(archive_expsym_cmds, $1)=
6609 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6610 _LT_TAGVAR(hardcode_direct, $1)=no
6611 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6612 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6613 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6614 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6615 _LT_TAGVAR(hardcode_minus_L, $1)=no
6616 _LT_TAGVAR(hardcode_automatic, $1)=no
6617 _LT_TAGVAR(inherit_rpath, $1)=no
6618 _LT_TAGVAR(module_cmds, $1)=
6619 _LT_TAGVAR(module_expsym_cmds, $1)=
6620 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6621 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6622 _LT_TAGVAR(no_undefined_flag, $1)=
6623 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6624 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6626 # Source file extension for fc test sources.
6627 ac_ext=${ac_fc_srcext-f}
6629 # Object file extension for compiled fc test sources.
6631 _LT_TAGVAR(objext, $1)=$objext
6633 # No sense in running all these tests if we already determined that
6634 # the FC compiler isn't working. Some variables (like enable_shared)
6635 # are currently assumed to apply to all compilers on this platform,
6636 # and will be corrupted by setting them based on a non-working compiler.
6637 if test "$_lt_disable_FC" != yes; then
6638 # Code to be used in simple compile tests
6639 lt_simple_compile_test_code="\
6645 # Code to be used in simple link tests
6646 lt_simple_link_test_code="\
6651 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6654 # save warnings/boilerplate of simple test code
6655 _LT_COMPILER_BOILERPLATE
6656 _LT_LINKER_BOILERPLATE
6658 # Allow CC to be a program name with arguments.
6662 _LT_TAGVAR(compiler, $1)=$CC
6663 _LT_CC_BASENAME([$compiler])
6665 if test -n "$compiler"; then
6666 AC_MSG_CHECKING([if libtool supports shared libraries])
6667 AC_MSG_RESULT([$can_build_shared])
6669 AC_MSG_CHECKING([whether to build shared libraries])
6670 test "$can_build_shared" = "no" && enable_shared=no
6672 # On AIX, shared libraries and static libraries use the same namespace, and
6673 # are all built from PIC.
6676 test "$enable_shared" = yes && enable_static=no
6677 if test -n "$RANLIB"; then
6678 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6679 postinstall_cmds='$RANLIB $lib'
6683 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6684 test "$enable_shared" = yes && enable_static=no
6688 AC_MSG_RESULT([$enable_shared])
6690 AC_MSG_CHECKING([whether to build static libraries])
6691 # Make sure either enable_shared or enable_static is yes.
6692 test "$enable_shared" = yes || enable_static=yes
6693 AC_MSG_RESULT([$enable_static])
6695 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6696 _LT_TAGVAR(LD, $1)="$LD"
6699 ## There is no encapsulation within the following macros, do not change
6700 ## the running order or otherwise move them around unless you know exactly
6701 ## what you are doing...
6702 _LT_SYS_HIDDEN_LIBDEPS($1)
6703 _LT_COMPILER_PIC($1)
6704 _LT_COMPILER_C_O($1)
6705 _LT_COMPILER_FILE_LOCKS($1)
6706 _LT_LINKER_SHLIBS($1)
6707 _LT_SYS_DYNAMIC_LINKER($1)
6708 _LT_LINKER_HARDCODE_LIBPATH($1)
6711 fi # test -n "$compiler"
6714 fi # test "$_lt_disable_FC" != yes
6717 ])# _LT_LANG_FC_CONFIG
6720 # _LT_LANG_GCJ_CONFIG([TAG])
6721 # --------------------------
6722 # Ensure that the configuration variables for the GNU Java Compiler compiler
6723 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6724 # to write the compiler configuration to `libtool'.
6725 m4_defun([_LT_LANG_GCJ_CONFIG],
6726 [AC_REQUIRE([LT_PROG_GCJ])dnl
6729 # Source file extension for Java test sources.
6732 # Object file extension for compiled Java test sources.
6734 _LT_TAGVAR(objext, $1)=$objext
6736 # Code to be used in simple compile tests
6737 lt_simple_compile_test_code="class foo {}"
6739 # Code to be used in simple link tests
6740 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
6742 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6745 # save warnings/boilerplate of simple test code
6746 _LT_COMPILER_BOILERPLATE
6747 _LT_LINKER_BOILERPLATE
6749 # Allow CC to be a program name with arguments.
6753 _LT_TAGVAR(compiler, $1)=$CC
6754 _LT_CC_BASENAME([$compiler])
6756 # GCJ did not exist at the time GCC didn't implicitly link libc in.
6757 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6759 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6762 ## There is no encapsulation within the following macros, do not change
6763 ## the running order or otherwise move them around unless you know exactly
6764 ## what you are doing...
6765 if test -n "$compiler"; then
6766 _LT_COMPILER_NO_RTTI($1)
6767 _LT_COMPILER_PIC($1)
6768 _LT_COMPILER_C_O($1)
6769 _LT_COMPILER_FILE_LOCKS($1)
6770 _LT_LINKER_SHLIBS($1)
6771 _LT_SYS_DYNAMIC_LINKER($1)
6772 _LT_LINKER_HARDCODE_LIBPATH($1)
6779 ])# _LT_LANG_GCJ_CONFIG
6782 # _LT_LANG_RC_CONFIG([TAG])
6783 # -------------------------
6784 # Ensure that the configuration variables for the Windows resource compiler
6785 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6786 # to write the compiler configuration to `libtool'.
6787 m4_defun([_LT_LANG_RC_CONFIG],
6788 [AC_REQUIRE([LT_PROG_RC])dnl
6791 # Source file extension for RC test sources.
6794 # Object file extension for compiled RC test sources.
6796 _LT_TAGVAR(objext, $1)=$objext
6798 # Code to be used in simple compile tests
6799 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
6801 # Code to be used in simple link tests
6802 lt_simple_link_test_code="$lt_simple_compile_test_code"
6804 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6807 # save warnings/boilerplate of simple test code
6808 _LT_COMPILER_BOILERPLATE
6809 _LT_LINKER_BOILERPLATE
6811 # Allow CC to be a program name with arguments.
6815 _LT_TAGVAR(compiler, $1)=$CC
6816 _LT_CC_BASENAME([$compiler])
6817 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6819 if test -n "$compiler"; then
6826 ])# _LT_LANG_RC_CONFIG
6831 AC_DEFUN([LT_PROG_GCJ],
6832 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6833 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6834 [AC_CHECK_TOOL(GCJ, gcj,)
6835 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6836 AC_SUBST(GCJFLAGS)])])dnl
6840 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
6841 dnl aclocal-1.4 backwards compatibility:
6842 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
6847 AC_DEFUN([LT_PROG_RC],
6848 [AC_CHECK_TOOL(RC, windres,)
6852 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
6853 dnl aclocal-1.4 backwards compatibility:
6854 dnl AC_DEFUN([LT_AC_PROG_RC], [])
6859 # If we don't have a new enough Autoconf to choose the best grep
6860 # available, choose the one first in the user's PATH.
6861 m4_defun([_LT_DECL_EGREP],
6862 [AC_REQUIRE([AC_PROG_EGREP])dnl
6863 AC_REQUIRE([AC_PROG_FGREP])dnl
6864 test -z "$GREP" && GREP=grep
6865 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
6866 _LT_DECL([], [EGREP], [1], [An ERE matcher])
6867 _LT_DECL([], [FGREP], [1], [A literal string matcher])
6868 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
6875 # Check for a fully-functional sed program, that truncates
6876 # as few characters as possible. Prefer GNU sed if found.
6877 m4_defun([_LT_DECL_SED],
6879 test -z "$SED" && SED=sed
6880 Xsed="$SED -e 1s/^X//"
6881 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
6882 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
6883 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
6886 m4_ifndef([AC_PROG_SED], [
6887 ############################################################
6888 # NOTE: This macro has been submitted for inclusion into #
6889 # GNU Autoconf as AC_PROG_SED. When it is available in #
6890 # a released version of Autoconf we should remove this #
6891 # macro and use it instead. #
6892 ############################################################
6894 m4_defun([AC_PROG_SED],
6895 [AC_MSG_CHECKING([for a sed that does not truncate output])
6896 AC_CACHE_VAL(lt_cv_path_SED,
6897 [# Loop through the user's path and test for sed and gsed.
6898 # Then use that list of sed's as ones to test for truncation.
6899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6903 test -z "$as_dir" && as_dir=.
6904 for lt_ac_prog in sed gsed; do
6905 for ac_exec_ext in '' $ac_executable_extensions; do
6906 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6907 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6915 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6916 # along with /bin/sed that truncates output.
6917 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6918 test ! -f $lt_ac_sed && continue
6919 cat /dev/null > conftest.in
6921 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6922 # Check for GNU sed and select it if it is found.
6923 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6924 lt_cv_path_SED=$lt_ac_sed
6928 cat conftest.in conftest.in >conftest.tmp
6929 mv conftest.tmp conftest.in
6930 cp conftest.in conftest.nl
6932 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6933 cmp -s conftest.out conftest.nl || break
6934 # 10000 chars as input seems more than enough
6935 test $lt_ac_count -gt 10 && break
6936 lt_ac_count=`expr $lt_ac_count + 1`
6937 if test $lt_ac_count -gt $lt_ac_max; then
6938 lt_ac_max=$lt_ac_count
6939 lt_cv_path_SED=$lt_ac_sed
6946 AC_MSG_RESULT([$SED])
6951 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
6952 dnl aclocal-1.4 backwards compatibility:
6953 dnl AC_DEFUN([LT_AC_PROG_SED], [])
6956 # _LT_CHECK_SHELL_FEATURES
6957 # ------------------------
6958 # Find out whether the shell is Bourne or XSI compatible,
6959 # or has some other useful features.
6960 m4_defun([_LT_CHECK_SHELL_FEATURES],
6961 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
6962 # Try some XSI features
6965 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
6966 = c,a/b,, ) >/dev/null 2>&1 \
6968 AC_MSG_RESULT([$xsi_shell])
6969 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
6971 AC_MSG_CHECKING([whether the shell understands "+="])
6973 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
6975 && lt_shell_append=yes
6976 AC_MSG_RESULT([$lt_shell_append])
6977 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
6979 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
6984 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
6986 # test EBCDIC or ASCII
6987 case `echo X|tr X '\101'` in
6988 A) # ASCII based system
6989 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
6990 lt_SP2NL='tr \040 \012'
6991 lt_NL2SP='tr \015\012 \040\040'
6993 *) # EBCDIC based system
6994 lt_SP2NL='tr \100 \n'
6995 lt_NL2SP='tr \r\n \100\100'
6998 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
6999 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7000 ])# _LT_CHECK_SHELL_FEATURES
7003 # _LT_PROG_XSI_SHELLFNS
7004 # ---------------------
7005 # Bourne and XSI compatible variants of some useful shell functions.
7006 m4_defun([_LT_PROG_XSI_SHELLFNS],
7009 cat << \_LT_EOF >> "$cfgfile"
7010 # func_dirname file append nondir_replacement
7011 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7012 # otherwise set result to NONDIR_REPLACEMENT.
7016 */*) func_dirname_result="${1%/*}${2}" ;;
7017 * ) func_dirname_result="${3}" ;;
7021 # func_basename file
7024 func_basename_result="${1##*/}"
7027 # func_stripname prefix suffix name
7028 # strip PREFIX and SUFFIX off of NAME.
7029 # PREFIX and SUFFIX must not contain globbing or regex special
7030 # characters, hashes, percent signs, but SUFFIX may contain a leading
7031 # dot (in which case that matches only a dot).
7034 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7035 # positional parameters, so assign one to ordinary parameter first.
7036 func_stripname_result=${3}
7037 func_stripname_result=${func_stripname_result#"${1}"}
7038 func_stripname_result=${func_stripname_result%"${2}"}
7042 *) # Bourne compatible functions.
7043 cat << \_LT_EOF >> "$cfgfile"
7044 # func_dirname file append nondir_replacement
7045 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7046 # otherwise set result to NONDIR_REPLACEMENT.
7049 # Extract subdirectory from the argument.
7050 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7051 if test "X$func_dirname_result" = "X${1}"; then
7052 func_dirname_result="${3}"
7054 func_dirname_result="$func_dirname_result${2}"
7058 # func_basename file
7061 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7064 # func_stripname prefix suffix name
7065 # strip PREFIX and SUFFIX off of NAME.
7066 # PREFIX and SUFFIX must not contain globbing or regex special
7067 # characters, hashes, percent signs, but SUFFIX may contain a leading
7068 # dot (in which case that matches only a dot).
7069 # func_strip_suffix prefix name
7073 .*) func_stripname_result=`$ECHO "X${3}" \
7074 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7075 *) func_stripname_result=`$ECHO "X${3}" \
7076 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7082 case $lt_shell_append in
7084 cat << \_LT_EOF >> "$cfgfile"
7086 # func_append var value
7087 # Append VALUE to the end of shell variable VAR.
7095 cat << \_LT_EOF >> "$cfgfile"
7097 # func_append var value
7098 # Append VALUE to the end of shell variable VAR.
7101 eval "$[1]=\$$[1]\$[2]"