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_XSI_SHELL])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 Xsed='sed -e 1s/^X//'
185 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
187 # Same as above, but do not quote variable references.
188 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
190 # Sed substitution to delay expansion of an escaped shell variable in a
191 # double_quote_subst'ed string.
192 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
194 # Sed substitution to delay expansion of an escaped single quote.
195 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
197 # Sed substitution to avoid accidental globbing in evaled expressions
198 no_glob_subst='s/\*/\\\*/g'
204 # All known linkers require a `.a' archive for static linking (except MSVC,
205 # which needs '.lib').
208 with_gnu_ld="$lt_cv_prog_gnu_ld"
213 # Set sane defaults for various variables
214 test -z "$CC" && CC=cc
215 test -z "$LTCC" && LTCC=$CC
216 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
217 test -z "$LD" && LD=ld
218 test -z "$ac_objext" && ac_objext=o
220 _LT_CC_BASENAME([$compiler])
222 # Only perform the check for file, if the check method requires it
223 test -z "$MAGIC_CMD" && MAGIC_CMD=file
224 case $deplibs_check_method in
226 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
232 # Use C for the default configuration in the libtool script
233 LT_SUPPORTED_TAG([CC])
235 _LT_LANG_DEFAULT_CONFIG
242 # Note that this code is called both from `configure', and `config.status'
243 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
244 # `config.status' has no value for ac_aux_dir unless we are using Automake,
245 # so we pass a copy along to make sure it has a sensible value anyway.
246 m4_defun([_LT_PROG_LTMAIN],
247 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
248 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
249 ltmain="$ac_aux_dir/ltmain.sh"
253 ## ------------------------------------- ##
254 ## Accumulate code for creating libtool. ##
255 ## ------------------------------------- ##
257 # So that we can recreate a full libtool script including additional
258 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
259 # in macros and then make a single call at the end using the `libtool'
263 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
264 # ----------------------------------------
265 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
266 m4_define([_LT_CONFIG_LIBTOOL_INIT],
268 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
273 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
276 # _LT_CONFIG_LIBTOOL([COMMANDS])
277 # ------------------------------
278 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
279 m4_define([_LT_CONFIG_LIBTOOL],
281 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
286 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
289 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
290 # -----------------------------------------------------
291 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
292 [_LT_CONFIG_LIBTOOL([$1])
293 _LT_CONFIG_LIBTOOL_INIT([$2])
297 # _LT_FORMAT_COMMENT([COMMENT])
298 # -----------------------------
299 # Add leading comment marks to the start of each line, and a trailing
300 # full-stop to the whole comment if one is not present already.
301 m4_define([_LT_FORMAT_COMMENT],
303 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
304 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
309 ## ------------------------ ##
310 ## FIXME: Eliminate VARNAME ##
311 ## ------------------------ ##
314 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
315 # -------------------------------------------------------------------
316 # CONFIGNAME is the name given to the value in the libtool script.
317 # VARNAME is the (base) name used in the configure script.
318 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
319 # VARNAME. Any other value will be used directly.
320 m4_define([_LT_DECL],
321 [lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]],
322 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
323 [m4_ifval([$1], [$1], [$2])])
324 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
326 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
327 lt_dict_add_subkey([lt_decl_dict], [$2],
328 [tagged?], [m4_ifval([$5], [yes], [no])])])
332 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
333 # --------------------------------------------------------
334 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
337 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
338 # ------------------------------------------------
339 m4_define([lt_decl_tag_varnames],
340 [_lt_decl_filter([tagged?], [yes], $@)])
343 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
344 # ---------------------------------------------------------
345 m4_define([_lt_decl_filter],
347 [0], [m4_fatal([$0: too few arguments: $#])],
348 [1], [m4_fatal([$0: too few arguments: $#: $1])],
349 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
350 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
351 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
355 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
356 # --------------------------------------------------
357 m4_define([lt_decl_quote_varnames],
358 [_lt_decl_filter([value], [1], $@)])
361 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
362 # ---------------------------------------------------
363 m4_define([lt_decl_dquote_varnames],
364 [_lt_decl_filter([value], [2], $@)])
367 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
368 # ---------------------------------------------------
369 m4_define([lt_decl_varnames_tagged],
370 [_$0(m4_quote(m4_default([$1], [[, ]])),
371 m4_quote(m4_if([$2], [],
372 m4_quote(lt_decl_tag_varnames),
373 m4_quote(m4_shift($@)))),
374 m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
375 m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
378 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
379 # ------------------------------------------------
380 m4_define([lt_decl_all_varnames],
381 [_$0(m4_quote(m4_default([$1], [[, ]])),
383 m4_quote(lt_decl_varnames),
384 m4_quote(m4_shift($@))))[]dnl
386 m4_define([_lt_decl_all_varnames],
387 [lt_join($@, lt_decl_varnames_tagged([$1],
388 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
392 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
393 # ------------------------------------
394 # Quote a variable value, and forward it to `config.status' so that its
395 # declaration there will have the same value as in `configure'. VARNAME
396 # must have a single quote delimited value for this to work.
397 m4_define([_LT_CONFIG_STATUS_DECLARE],
398 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
401 # _LT_CONFIG_STATUS_DECLARATIONS
402 # ------------------------------
403 # We delimit libtool config variables with single quotes, so when
404 # we write them to config.status, we have to be sure to quote all
405 # embedded single quotes properly. In configure, this macro expands
406 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
408 # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
409 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
410 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
411 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
416 # Output comment and list of tags supported by the script
417 m4_defun([_LT_LIBTOOL_TAGS],
418 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
419 available_tags="_LT_TAGS"dnl
423 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
424 # -----------------------------------
425 # Extract the dictionary values for VARNAME (optionally with TAG) and
426 # expand to a commented shell variable setting:
428 # # Some comment about what VAR is for.
429 # visible_name=$lt_internal_name
430 m4_define([_LT_LIBTOOL_DECLARE],
431 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
432 [description])))[]dnl
433 m4_pushdef([_libtool_name],
434 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
435 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
436 [0], [_libtool_name=[$]$1],
437 [1], [_libtool_name=$lt_[]$1],
438 [2], [_libtool_name=$lt_[]$1],
439 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
440 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
444 # _LT_LIBTOOL_CONFIG_VARS
445 # -----------------------
446 # Produce commented declarations of non-tagged libtool config variables
447 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
448 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
449 # section) are produced by _LT_LIBTOOL_TAG_VARS.
450 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
451 [m4_foreach([_lt_var],
452 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
453 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
456 # _LT_LIBTOOL_TAG_VARS(TAG)
457 # -------------------------
458 m4_define([_LT_LIBTOOL_TAG_VARS],
459 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
460 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
463 # _LT_TAGVAR(VARNAME, [TAGNAME])
464 # ------------------------------
465 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
468 # _LT_CONFIG_COMMANDS
469 # -------------------
470 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
471 # variables for single and double quote escaping we saved from calls
472 # to _LT_DECL, we can put quote escaped variables declarations
473 # into `config.status', and then the shell code to quote escape them in
474 # for loops in `config.status'. Finally, any additional code accumulated
475 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
476 m4_defun([_LT_CONFIG_COMMANDS],
477 [AC_PROVIDE_IFELSE([LT_OUTPUT],
478 dnl If the libtool generation code has been placed in $CONFIG_LT,
479 dnl instead of duplicating it all over again into config.status,
480 dnl then we will have config.status run $CONFIG_LT later, so it
481 dnl needs to know what name is stored there:
482 [AC_CONFIG_COMMANDS([libtool],
483 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
484 dnl If the libtool generation code is destined for config.status,
485 dnl expand the accumulated commands and init code now:
486 [AC_CONFIG_COMMANDS([libtool],
487 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
488 ])#_LT_CONFIG_COMMANDS
492 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
495 # The HP-UX ksh and POSIX shell print the target directory to stdout
497 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
499 sed_quote_subst='$sed_quote_subst'
500 double_quote_subst='$double_quote_subst'
501 delay_variable_subst='$delay_variable_subst'
502 _LT_CONFIG_STATUS_DECLARATIONS
505 compiler='$compiler_DEFAULT'
507 # Quote evaled strings.
508 for var in lt_decl_all_varnames([[ \
509 ]], lt_decl_quote_varnames); do
510 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
511 *[[\\\\\\\`\\"\\\$]]*)
512 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
515 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
520 # Double-quote double-evaled strings.
521 for var in lt_decl_all_varnames([[ \
522 ]], lt_decl_dquote_varnames); do
523 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
524 *[[\\\\\\\`\\"\\\$]]*)
525 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
528 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
533 # Fix-up fallback echo if it was mangled by the above quoting rules.
535 *'\\\[$]0 --fallback-echo"')dnl "
536 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
540 _LT_OUTPUT_LIBTOOL_INIT
546 # This macro allows early generation of the libtool script (before
547 # AC_OUTPUT is called), incase it is used in configure for compilation
549 AC_DEFUN([LT_OUTPUT],
550 [: ${CONFIG_LT=./config.lt}
551 AC_MSG_NOTICE([creating $CONFIG_LT])
552 cat >"$CONFIG_LT" <<_LTEOF
554 # Generated by $as_me.
555 # Run this file to recreate a libtool stub with the current configuration.
558 SHELL=\${CONFIG_SHELL-$SHELL}
561 cat >>"$CONFIG_LT" <<\_LTEOF
565 exec AS_MESSAGE_FD>&1
566 exec AS_MESSAGE_LOG_FD>>config.log
569 AS_BOX([Running $as_me.])
570 } >&AS_MESSAGE_LOG_FD
573 \`$as_me' creates a local libtool stub from the current configuration,
574 for use in further configure time tests before the real libtool is
577 Usage: $[0] [[OPTIONS]]
579 -h, --help print this help, then exit
580 -V, --version print version number, then exit
581 -q, --quiet do not print progress messages
582 -d, --debug don't remove temporary files
584 Report bugs to <bug-libtool@gnu.org>."
587 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
588 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
589 configured by $[0], generated by m4_PACKAGE_STRING.
591 Copyright (C) 2006 Free Software Foundation, Inc.
592 This config.lt script is free software; the Free Software Foundation
593 gives unlimited permision to copy, distribute and modify it."
598 --version | --v* | -V )
599 echo "$lt_cl_version"; exit 0 ;;
601 echo "$lt_cl_help"; exit 0 ;;
602 --debug | --d* | -d )
604 --quiet | --q* | --silent | --s* | -q )
607 -*) AC_MSG_ERROR([unrecognized option: $[1]
608 Try `$[0] --help' for more information.]) ;;
610 *) AC_MSG_ERROR([unrecognised argument: $[1]
611 Try `$[0] --help for more information.]) ;;
616 if $lt_cl_silent; then
617 exec AS_MESSAGE_FD>/dev/null
621 cat >>"$CONFIG_LT" <<_LTEOF
622 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
625 cat >>"$CONFIG_LT" <<\_LTEOF
626 AC_MSG_NOTICE([creating $ofile])
627 _LT_OUTPUT_LIBTOOL_COMMANDS
630 chmod +x "$CONFIG_LT"
632 # configure is writing to config.log, but config.lt does its own redirection,
633 # appending to config.log, which fails on DOS, as config.log is still kept
634 # open by configure. Here we exec the FD to /dev/null, effectively closing
635 # config.log, so it can be properly (re)opened and appended to by config.lt.
636 if test "$no_create" != yes; then
638 test "$silent" = yes &&
639 lt_config_lt_args="$lt_config_lt_args --quiet"
640 exec AS_MESSAGE_LOG_FD>/dev/null
641 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
642 exec AS_MESSAGE_LOG_FD>>config.log
643 $lt_cl_success || AS_EXIT(1)
650 # If TAG is the built-in tag, create an initial libtool script with a
651 # default configuration from the untagged config vars. Otherwise add code
652 # to config.status for appending the configuration named by TAG from the
653 # matching tagged config vars.
654 m4_defun([_LT_CONFIG],
655 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
656 _LT_CONFIG_SAVE_COMMANDS([
657 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
658 m4_if(_LT_TAG, [C], [
659 # See if we are running on zsh, and set the options which allow our
660 # commands through without removal of \ escapes.
661 if test -n "${ZSH_VERSION+set}" ; then
666 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
669 cat <<_LT_EOF >> "$cfgfile"
672 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
673 # Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION
674 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
675 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
678 # TEST SUITE MARKER ## BEGIN SOURCABLE
681 # ### BEGIN LIBTOOL CONFIG
682 _LT_LIBTOOL_CONFIG_VARS
684 # ### END LIBTOOL CONFIG
686 # The HP-UX ksh and POSIX shell print the target directory to stdout
688 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
694 cat <<\_LT_EOF >> "$cfgfile"
695 # AIX sometimes has problems with the GCC collect2 program. For some
696 # reason, if we set the COLLECT_NAMES environment variable, the problems
697 # vanish in a puff of smoke.
698 if test "X${COLLECT_NAMES+set}" != Xset; then
708 # We use sed instead of cat because bash on DJGPP gets confused if
709 # if finds mixed CR/LF and LF-only lines. Since sed operates in
710 # text mode, it properly converts lines to CR/LF. This bash problem
711 # is reportedly fixed, but why not run on old versions too?
712 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
713 || (rm -f "$cfgfile"; exit 1)
715 _LT_PROG_XSI_SHELLFNS
717 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
718 || (rm -f "$cfgfile"; exit 1)
720 mv -f "$cfgfile" "$ofile" ||
721 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
724 [cat <<_LT_EOF >> "$ofile"
726 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
727 dnl in a comment (ie after a #).
728 # ### BEGIN LIBTOOL TAG CONFIG: $1
729 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
730 # ### END LIBTOOL TAG CONFIG: $1
737 TIMESTAMP='$TIMESTAMP'
740 ])dnl /_LT_CONFIG_SAVE_COMMANDS
744 # LT_SUPPORTED_TAG(TAG)
745 # ---------------------
746 # Trace this macro to discover what tags are supported by the libtool
747 # --tag option, using:
748 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
749 AC_DEFUN([LT_SUPPORTED_TAG], [])
752 # C support is built-in for now
753 m4_define([_LT_LANG_C_enabled], [])
754 m4_define([_LT_TAGS], [])
759 # Enable libtool support for the given language if not already enabled.
761 [AC_BEFORE([$0], [LT_OUTPUT])dnl
764 [C++], [_LT_LANG(CXX)],
765 [Java], [_LT_LANG(GCJ)],
766 [Fortran 77], [_LT_LANG(F77)],
767 [Fortran], [_LT_LANG(FC)],
768 [Windows Resource], [_LT_LANG(RC)],
769 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
771 [m4_fatal([$0: unsupported language: "$1"])])])dnl
778 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
779 [LT_SUPPORTED_TAG([$1])dnl
780 m4_append([_LT_TAGS], [$1 ])dnl
781 m4_define([_LT_LANG_]$1[_enabled], [])dnl
782 _LT_LANG_$1_CONFIG($1)])dnl
786 # _LT_LANG_DEFAULT_CONFIG
787 # -----------------------
788 m4_defun([_LT_LANG_DEFAULT_CONFIG],
789 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
791 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
793 AC_PROVIDE_IFELSE([AC_PROG_F77],
795 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
797 AC_PROVIDE_IFELSE([AC_PROG_FC],
799 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
801 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
802 dnl pulling things in needlessly.
803 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
805 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
807 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
809 [m4_ifdef([AC_PROG_GCJ],
810 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
811 m4_ifdef([A][M_PROG_GCJ],
812 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
813 m4_ifdef([LT_PROG_GCJ],
814 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
816 AC_PROVIDE_IFELSE([LT_PROG_RC],
818 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
819 ])# _LT_LANG_DEFAULT_CONFIG
822 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
823 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
824 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
825 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
826 dnl aclocal-1.4 backwards compatibility:
827 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
828 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
829 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
830 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
835 m4_defun([_LT_TAG_COMPILER],
836 [AC_REQUIRE([AC_PROG_CC])dnl
838 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
839 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
840 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
841 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
843 # If no C compiler was specified, use CC.
846 # If no C compiler flags were specified, use CFLAGS.
847 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
849 # Allow CC to be a program name with arguments.
854 # _LT_COMPILER_BOILERPLATE
855 # ------------------------
856 # Check for compiler boilerplate output or warnings with
857 # the simple compiler test code.
858 m4_defun([_LT_COMPILER_BOILERPLATE],
859 [ac_outfile=conftest.$ac_objext
860 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
861 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
862 _lt_compiler_boilerplate=`cat conftest.err`
864 ])# _LT_COMPILER_BOILERPLATE
867 # _LT_LINKER_BOILERPLATE
868 # ----------------------
869 # Check for linker boilerplate output or warnings with
870 # the simple link test code.
871 m4_defun([_LT_LINKER_BOILERPLATE],
872 [ac_outfile=conftest.$ac_objext
873 printf "$lt_simple_link_test_code" >conftest.$ac_ext
874 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
875 _lt_linker_boilerplate=`cat conftest.err`
877 ])# _LT_LINKER_BOILERPLATE
880 # _LT_SYS_MODULE_PATH_AIX
881 # -----------------------
882 # Links a minimal program and checks the executable
883 # for the system default hardcoded library path. In most cases,
884 # this is /usr/lib:/lib, but when the MPI compilers are used
885 # the location of the communication and MPI libs are included too.
886 # If we don't find anything, use the default library path according
887 # to the aix ld manual.
888 m4_defun([_LT_SYS_MODULE_PATH_AIX],
889 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
891 /Import File Strings/,/^$/ {
897 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
898 # Check for a 64-bit object if we didn't find anything.
899 if test -z "$aix_libpath"; then
900 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
902 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
903 ])# _LT_SYS_MODULE_PATH_AIX
906 # _LT_SHELL_INIT(ARG)
907 # -------------------
908 m4_define([_LT_SHELL_INIT],
909 [ifdef([AC_DIVERSION_NOTICE],
910 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
911 [AC_DIVERT_PUSH(NOTICE)])
917 # _LT_PROG_ECHO_BACKSLASH
918 # -----------------------
919 # Add some code to the start of the generated configure script which
920 # will find an echo command which doesn't interpret backslashes.
921 m4_defun([_LT_PROG_ECHO_BACKSLASH],
923 # Check that we are running under the correct shell.
924 SHELL=${CONFIG_SHELL-/bin/sh}
928 # Remove one level of quotation (which was required for Make).
929 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
934 if test "X[$]1" = X--no-reexec; then
935 # Discard the --no-reexec flag, and continue.
937 elif test "X[$]1" = X--fallback-echo; then
938 # Avoid inline document here, it may be left over
940 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
941 # Yippee, $ECHO works!
944 # Restart under the correct shell.
945 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
948 if test "X[$]1" = X--fallback-echo; then
949 # used as fallback echo
957 # The HP-UX ksh and POSIX shell print the target directory to stdout
959 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
961 if test -z "$lt_ECHO"; then
962 if test "X${echo_test_string+set}" != Xset; then
963 # find a string as large as possible, as long as the shell can cope with it
964 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
965 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
966 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
967 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
974 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
975 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
976 test "X$echo_testing_string" = "X$echo_test_string"; then
979 # The Solaris, AIX, and Digital Unix default echo programs unquote
980 # backslashes. This makes it impossible to quote backslashes using
981 # echo "$something" | sed 's/\\/\\\\/g'
983 # So, first we look for a working echo in the user's PATH.
985 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
986 for dir in $PATH /usr/ucb; do
988 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
989 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
990 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
991 test "X$echo_testing_string" = "X$echo_test_string"; then
998 if test "X$ECHO" = Xecho; then
999 # We didn't find a better echo, so look for alternatives.
1000 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1001 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1002 test "X$echo_testing_string" = "X$echo_test_string"; then
1003 # This shell has a builtin print -r that does the trick.
1005 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1006 test "X$CONFIG_SHELL" != X/bin/ksh; then
1007 # If we have ksh, try running configure again with it.
1008 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1009 export ORIGINAL_CONFIG_SHELL
1010 CONFIG_SHELL=/bin/ksh
1012 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1016 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1017 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1018 test "X$echo_testing_string" = "X$echo_test_string"; then
1019 # Cool, printf works
1021 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1022 test "X$echo_testing_string" = 'X\t' &&
1023 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1024 test "X$echo_testing_string" = "X$echo_test_string"; then
1025 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1027 SHELL="$CONFIG_SHELL"
1029 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1030 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1031 test "X$echo_testing_string" = 'X\t' &&
1032 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1033 test "X$echo_testing_string" = "X$echo_test_string"; then
1034 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1036 # maybe with a smaller string...
1039 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1040 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1047 if test "$prev" != 'sed 50q "[$]0"'; then
1048 echo_test_string=`eval $prev`
1049 export echo_test_string
1050 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1052 # Oops. We lost completely, so just stick with echo.
1061 # Copy echo and quote the copy suitably for passing to libtool from
1062 # the Makefile, instead of quoting the original, which is used later.
1064 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1065 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1070 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1071 _LT_DECL([], [ECHO], [1],
1072 [An echo program that does not interpret backslashes])
1073 ])# _LT_PROG_ECHO_BACKSLASH
1078 m4_defun([_LT_ENABLE_LOCK],
1079 [AC_REQUIRE([AC_OBJEXT])dnl
1080 AC_ARG_ENABLE([libtool-lock],
1081 [AS_HELP_STRING([--disable-libtool-lock],
1082 [avoid locking (might break parallel builds)])])
1083 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1085 # Some flags need to be propagated to the compiler or linker for good
1089 # Find out which ABI we are using.
1090 echo 'int i;' > conftest.$ac_ext
1091 if AC_TRY_EVAL(ac_compile); then
1092 case `/usr/bin/file conftest.$ac_objext` in
1104 # Find out which ABI we are using.
1105 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1106 if AC_TRY_EVAL(ac_compile); then
1107 if test "$lt_cv_prog_gnu_ld" = yes; then
1108 case `/usr/bin/file conftest.$ac_objext` in
1110 LD="${LD-ld} -melf32bsmip"
1113 LD="${LD-ld} -melf32bmipn32"
1116 LD="${LD-ld} -melf64bmip"
1120 case `/usr/bin/file conftest.$ac_objext` in
1136 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1137 # Find out which ABI we are using.
1138 echo 'int i;' > conftest.$ac_ext
1139 if AC_TRY_EVAL(ac_compile); then
1140 case `/usr/bin/file conftest.o` in
1144 LD="${LD-ld} -m elf_i386"
1146 ppc64-*linux*|powerpc64-*linux*)
1147 LD="${LD-ld} -m elf32ppclinux"
1150 LD="${LD-ld} -m elf_s390"
1153 LD="${LD-ld} -m elf32_sparc"
1160 LD="${LD-ld} -m elf_x86_64"
1162 ppc*-*linux*|powerpc*-*linux*)
1163 LD="${LD-ld} -m elf64ppc"
1165 s390*-*linux*|s390*-*tpf*)
1166 LD="${LD-ld} -m elf64_s390"
1169 LD="${LD-ld} -m elf64_sparc"
1179 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1180 SAVE_CFLAGS="$CFLAGS"
1181 CFLAGS="$CFLAGS -belf"
1182 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1184 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1186 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1187 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1188 CFLAGS="$SAVE_CFLAGS"
1192 # Find out which ABI we are using.
1193 echo 'int i;' > conftest.$ac_ext
1194 if AC_TRY_EVAL(ac_compile); then
1195 case `/usr/bin/file conftest.o` in
1197 case $lt_cv_prog_gnu_ld in
1198 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1199 *) LD="${LD-ld} -64" ;;
1208 need_locks="$enable_libtool_lock"
1212 # _LT_CMD_OLD_ARCHIVE
1213 # -------------------
1214 m4_defun([_LT_CMD_OLD_ARCHIVE],
1215 [AC_CHECK_TOOL(AR, ar, false)
1216 test -z "$AR" && AR=ar
1217 test -z "$AR_FLAGS" && AR_FLAGS=cru
1218 _LT_DECL([], [AR], [1], [The archiver])
1219 _LT_DECL([], [AR_FLAGS], [1])
1221 AC_CHECK_TOOL(STRIP, strip, :)
1222 test -z "$STRIP" && STRIP=:
1223 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1225 AC_CHECK_TOOL(RANLIB, ranlib, :)
1226 test -z "$RANLIB" && RANLIB=:
1227 _LT_DECL([], [RANLIB], [1],
1228 [Commands used to install an old-style archive])
1230 # Determine commands to create old-style static archives.
1231 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1232 old_postinstall_cmds='chmod 644 $oldlib'
1233 old_postuninstall_cmds=
1235 if test -n "$RANLIB"; then
1238 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1241 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1244 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1246 _LT_DECL([], [old_postinstall_cmds], [2])
1247 _LT_DECL([], [old_postuninstall_cmds], [2])
1248 _LT_TAGDECL([], [old_archive_cmds], [2],
1249 [Commands used to build an old-style archive])
1250 ])# _LT_CMD_OLD_ARCHIVE
1253 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1254 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1255 # ----------------------------------------------------------------
1256 # Check whether the given compiler option works
1257 AC_DEFUN([_LT_COMPILER_OPTION],
1258 [AC_REQUIRE([AC_OBJEXT])dnl
1259 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1260 m4_require([_LT_DECL_SED])dnl
1261 AC_CACHE_CHECK([$1], [$2],
1263 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1264 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1265 lt_compiler_flag="$3"
1266 # Insert the option either (1) after the last *FLAGS variable, or
1267 # (2) before a word containing "conftest.", or (3) at the end.
1268 # Note that $ac_compile itself does not contain backslashes and begins
1269 # with a dollar sign (not a hyphen), so the echo should work correctly.
1270 # The option is referenced via a variable to avoid confusing sed.
1271 lt_compile=`echo "$ac_compile" | $SED \
1272 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1273 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1274 -e 's:$: $lt_compiler_flag:'`
1275 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1276 (eval "$lt_compile" 2>conftest.err)
1278 cat conftest.err >&AS_MESSAGE_LOG_FD
1279 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1280 if (exit $ac_status) && test -s "$ac_outfile"; then
1281 # The compiler can only warn and ignore the option if not recognized
1282 # So say no if there are warnings other than the usual output.
1283 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1284 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1285 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1292 if test x"[$]$2" = xyes; then
1293 m4_if([$5], , :, [$5])
1295 m4_if([$6], , :, [$6])
1297 ])# _LT_COMPILER_OPTION
1300 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1301 dnl aclocal-1.4 backwards compatibility:
1302 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1305 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1306 # [ACTION-SUCCESS], [ACTION-FAILURE])
1307 # ----------------------------------------------------
1308 # Check whether the given linker option works
1309 AC_DEFUN([_LT_LINKER_OPTION],
1310 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1311 AC_CACHE_CHECK([$1], [$2],
1313 save_LDFLAGS="$LDFLAGS"
1314 LDFLAGS="$LDFLAGS $3"
1315 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1316 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1317 # The linker can only warn and ignore the option if not recognized
1318 # So say no if there are warnings
1319 if test -s conftest.err; then
1320 # Append any errors to the config.log.
1321 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1322 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1323 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1324 if diff conftest.exp conftest.er2 >/dev/null; then
1332 LDFLAGS="$save_LDFLAGS"
1335 if test x"[$]$2" = xyes; then
1336 m4_if([$4], , :, [$4])
1338 m4_if([$5], , :, [$5])
1340 ])# _LT_LINKER_OPTION
1343 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1344 dnl aclocal-1.4 backwards compatibility:
1345 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1350 AC_DEFUN([LT_CMD_MAX_LEN],
1351 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1352 # find the maximum length of command line arguments
1353 AC_MSG_CHECKING([the maximum length of command line arguments])
1354 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1360 # On DJGPP, this test can blow up pretty badly due to problems in libc
1361 # (any single argument exceeding 2000 bytes causes a buffer overrun
1362 # during glob expansion). Even if it were fixed, the result of this
1363 # check would be larger than it should be.
1364 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1368 # Under GNU Hurd, this test is not required because there is
1369 # no limit to the length of command line arguments.
1370 # Libtool will interpret -1 as no limit whatsoever
1371 lt_cv_sys_max_cmd_len=-1;
1375 # On Win9x/ME, this test blows up -- it succeeds, but takes
1376 # about 5 minutes as the teststring grows exponentially.
1377 # Worse, since 9x/ME are not pre-emptively multitasking,
1378 # you end up with a "frozen" computer, even though with patience
1379 # the test eventually succeeds (with a max line length of 256k).
1380 # Instead, let's just punt: use the minimum linelength reported by
1381 # all of the supported platforms: 8192 (on NT/2K/XP).
1382 lt_cv_sys_max_cmd_len=8192;
1386 # On AmigaOS with pdksh, this test takes hours, literally.
1387 # So we just punt and use a minimum line length of 8192.
1388 lt_cv_sys_max_cmd_len=8192;
1391 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1392 # This has been around since 386BSD, at least. Likely further.
1393 if test -x /sbin/sysctl; then
1394 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1395 elif test -x /usr/sbin/sysctl; then
1396 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1398 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1400 # And add a safety zone
1401 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1402 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1406 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1407 lt_cv_sys_max_cmd_len=196608
1411 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1412 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1413 # nice to cause kernel panics so lets avoid the loop below.
1414 # First set a reasonable default.
1415 lt_cv_sys_max_cmd_len=16384
1417 if test -x /sbin/sysconfig; then
1418 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1419 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1424 lt_cv_sys_max_cmd_len=102400
1426 sysv5* | sco5v6* | sysv4.2uw2*)
1427 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1428 if test -n "$kargmax"; then
1429 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1431 lt_cv_sys_max_cmd_len=32768
1435 # Make teststring a little bigger before we do anything with it.
1436 # a 1K string should be a reasonable start.
1437 for i in 1 2 3 4 5 6 7 8 ; do
1438 teststring=$teststring$teststring
1440 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1441 # If test is not a shell built-in, we'll probably end up computing a
1442 # maximum length that is only half of the actual maximum length, but
1444 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1445 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1446 test $i != 17 # 1/2 MB should be enough
1449 teststring=$teststring$teststring
1451 # Only check the string length outside the loop.
1452 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1454 # Add a significant safety factor because C++ compilers can tack on massive
1455 # amounts of additional arguments before passing them to the linker.
1456 # It appears as though 1/2 is a usable value.
1457 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1461 if test -n $lt_cv_sys_max_cmd_len ; then
1462 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1466 max_cmd_len=$lt_cv_sys_max_cmd_len
1467 _LT_DECL([], [max_cmd_len], [0],
1468 [What is the maximum length of a command?])
1472 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1473 dnl aclocal-1.4 backwards compatibility:
1474 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1479 m4_defun([_LT_HEADER_DLFCN],
1480 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1481 ])# _LT_HEADER_DLFCN
1484 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1485 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1486 # ----------------------------------------------------------------
1487 m4_defun([_LT_TRY_DLOPEN_SELF],
1488 [m4_require([_LT_HEADER_DLFCN])dnl
1489 if test "$cross_compiling" = yes; then :
1492 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1493 lt_status=$lt_dlunknown
1494 cat > conftest.$ac_ext <<_LT_EOF
1495 [#line __oline__ "configure"
1496 #include "confdefs.h"
1505 # define LT_DLGLOBAL RTLD_GLOBAL
1508 # define LT_DLGLOBAL DL_GLOBAL
1510 # define LT_DLGLOBAL 0
1514 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1515 find out it does not work in some platform. */
1516 #ifndef LT_DLLAZY_OR_NOW
1518 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1521 # define LT_DLLAZY_OR_NOW DL_LAZY
1524 # define LT_DLLAZY_OR_NOW RTLD_NOW
1527 # define LT_DLLAZY_OR_NOW DL_NOW
1529 # define LT_DLLAZY_OR_NOW 0
1537 extern "C" void exit (int);
1540 void fnord() { int i=42;}
1543 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1544 int status = $lt_dlunknown;
1548 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1549 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1550 /* dlclose (self); */
1558 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1559 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1562 x$lt_dlno_uscore) $1 ;;
1563 x$lt_dlneed_uscore) $2 ;;
1564 x$lt_dlunknown|x*) $3 ;;
1567 # compilation failed
1572 ])# _LT_TRY_DLOPEN_SELF
1575 # LT_SYS_DLOPEN_SELF
1576 # ------------------
1577 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1578 [m4_require([_LT_HEADER_DLFCN])dnl
1579 if test "x$enable_dlopen" != xyes; then
1580 enable_dlopen=unknown
1581 enable_dlopen_self=unknown
1582 enable_dlopen_self_static=unknown
1589 lt_cv_dlopen="load_add_on"
1591 lt_cv_dlopen_self=yes
1595 lt_cv_dlopen="LoadLibrary"
1600 lt_cv_dlopen="dlopen"
1605 # if libdl is installed we need to link against it
1606 AC_CHECK_LIB([dl], [dlopen],
1607 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1610 lt_cv_dlopen_self=yes
1615 AC_CHECK_FUNC([shl_load],
1616 [lt_cv_dlopen="shl_load"],
1617 [AC_CHECK_LIB([dld], [shl_load],
1618 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1619 [AC_CHECK_FUNC([dlopen],
1620 [lt_cv_dlopen="dlopen"],
1621 [AC_CHECK_LIB([dl], [dlopen],
1622 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1623 [AC_CHECK_LIB([svld], [dlopen],
1624 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1625 [AC_CHECK_LIB([dld], [dld_link],
1626 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1635 if test "x$lt_cv_dlopen" != xno; then
1641 case $lt_cv_dlopen in
1643 save_CPPFLAGS="$CPPFLAGS"
1644 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1646 save_LDFLAGS="$LDFLAGS"
1647 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1650 LIBS="$lt_cv_dlopen_libs $LIBS"
1652 AC_CACHE_CHECK([whether a program can dlopen itself],
1653 lt_cv_dlopen_self, [dnl
1654 _LT_TRY_DLOPEN_SELF(
1655 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1656 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1659 if test "x$lt_cv_dlopen_self" = xyes; then
1660 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1661 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1662 lt_cv_dlopen_self_static, [dnl
1663 _LT_TRY_DLOPEN_SELF(
1664 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1665 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1669 CPPFLAGS="$save_CPPFLAGS"
1670 LDFLAGS="$save_LDFLAGS"
1675 case $lt_cv_dlopen_self in
1676 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1677 *) enable_dlopen_self=unknown ;;
1680 case $lt_cv_dlopen_self_static in
1681 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1682 *) enable_dlopen_self_static=unknown ;;
1685 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1686 [Whether dlopen is supported])
1687 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1688 [Whether dlopen of programs is supported])
1689 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1690 [Whether dlopen of statically linked programs is supported])
1691 ])# LT_SYS_DLOPEN_SELF
1694 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1695 dnl aclocal-1.4 backwards compatibility:
1696 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1699 # _LT_COMPILER_C_O([TAGNAME])
1700 # ---------------------------
1701 # Check to see if options -c and -o are simultaneously supported by compiler.
1702 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1703 m4_defun([_LT_COMPILER_C_O],
1704 [AC_REQUIRE([AC_OBJEXT])dnl
1705 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1706 m4_require([_LT_TAG_COMPILER])dnl
1707 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1708 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1709 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1710 $RM -r conftest 2>/dev/null
1714 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1716 lt_compiler_flag="-o out/conftest2.$ac_objext"
1717 # Insert the option either (1) after the last *FLAGS variable, or
1718 # (2) before a word containing "conftest.", or (3) at the end.
1719 # Note that $ac_compile itself does not contain backslashes and begins
1720 # with a dollar sign (not a hyphen), so the echo should work correctly.
1721 lt_compile=`echo "$ac_compile" | $SED \
1722 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1723 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1724 -e 's:$: $lt_compiler_flag:'`
1725 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1726 (eval "$lt_compile" 2>out/conftest.err)
1728 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1729 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1730 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1732 # The compiler can only warn and ignore the option if not recognized
1733 # So say no if there are warnings
1734 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1735 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1736 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1737 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1740 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1742 # SGI C++ compiler will create directory out/ii_files/ for
1743 # template instantiation
1744 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1745 $RM out/* && rmdir out
1750 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1751 [Does compiler simultaneously support -c and -o options?])
1752 ])# _LT_COMPILER_C_O
1755 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
1756 # ----------------------------------
1757 # Check to see if we can do hard links to lock some files if needed
1758 m4_defun([_LT_COMPILER_FILE_LOCKS],
1759 [m4_require([_LT_ENABLE_LOCK])dnl
1760 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1761 _LT_COMPILER_C_O([$1])
1763 hard_links="nottested"
1764 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1765 # do not overwrite the value of need_locks provided by the user
1766 AC_MSG_CHECKING([if we can lock with hard links])
1769 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1771 ln conftest.a conftest.b 2>&5 || hard_links=no
1772 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1773 AC_MSG_RESULT([$hard_links])
1774 if test "$hard_links" = no; then
1775 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1781 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1782 ])# _LT_COMPILER_FILE_LOCKS
1787 m4_defun([_LT_CHECK_OBJDIR],
1788 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1789 [rm -f .libs 2>/dev/null
1790 mkdir .libs 2>/dev/null
1791 if test -d .libs; then
1794 # MS-DOS does not allow filenames that begin with a dot.
1797 rmdir .libs 2>/dev/null])
1798 objdir=$lt_cv_objdir
1799 _LT_DECL([], [objdir], [0],
1800 [The name of the directory that contains temporary libtool files])dnl
1801 m4_pattern_allow([LT_OBJDIR])dnl
1802 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1803 [Define to the sub-directory in which libtool stores uninstalled libraries.])
1804 ])# _LT_CHECK_OBJDIR
1807 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1808 # --------------------------------------
1809 # Check hardcoding attributes.
1810 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1811 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1812 _LT_TAGVAR(hardcode_action, $1)=
1813 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1814 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1815 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1817 # We can hardcode non-existent directories.
1818 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1819 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1820 # have to relink, otherwise we might link with an installed library
1821 # when we should be linking with a yet-to-be-installed one
1822 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1823 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1824 # Linking always hardcodes the temporary library directory.
1825 _LT_TAGVAR(hardcode_action, $1)=relink
1827 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1828 _LT_TAGVAR(hardcode_action, $1)=immediate
1831 # We cannot hardcode anything, or else we can only hardcode existing
1833 _LT_TAGVAR(hardcode_action, $1)=unsupported
1835 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1837 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
1838 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
1839 # Fast installation is not supported
1840 enable_fast_install=no
1841 elif test "$shlibpath_overrides_runpath" = yes ||
1842 test "$enable_shared" = no; then
1843 # Fast installation is not necessary
1844 enable_fast_install=needless
1846 _LT_TAGDECL([], [hardcode_action], [0],
1847 [How to hardcode a shared library path into an executable])
1848 ])# _LT_LINKER_HARDCODE_LIBPATH
1853 m4_defun([_LT_CMD_STRIPLIB],
1854 [m4_require([_LT_DECL_EGREP])
1857 AC_MSG_CHECKING([whether stripping libraries is possible])
1858 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
1859 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1860 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1861 AC_MSG_RESULT([yes])
1863 # FIXME - insert some real tests, host_os isn't really good enough
1866 if test -n "$STRIP" ; then
1867 striplib="$STRIP -x"
1868 old_striplib="$STRIP -S"
1869 AC_MSG_RESULT([yes])
1879 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
1880 _LT_DECL([], [striplib], [1])
1881 ])# _LT_CMD_STRIPLIB
1884 # _LT_SYS_DYNAMIC_LINKER([TAG])
1885 # -----------------------------
1886 # PORTME Fill in your ld.so characteristics
1887 m4_defun([_LT_SYS_DYNAMIC_LINKER],
1888 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1889 m4_require([_LT_DECL_EGREP])dnl
1890 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1891 m4_require([_LT_DECL_SED])dnl
1892 AC_MSG_CHECKING([dynamic linker characteristics])
1894 [C], [withGCC=$GCC],
1895 [CXX], [withGCC=$GXX],
1896 [F77], [withGCC=$G77],
1897 [FC], [withGCC=$ac_cv_fc_compiler_gnu],
1900 libname_spec='lib$name'
1908 shlibpath_overrides_runpath=unknown
1910 dynamic_linker="$host_os ld.so"
1911 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1912 if test "$withGCC" = yes; then
1913 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1914 if $ECHO "$sys_lib_search_path_spec" | $GREP ';' >/dev/null ; then
1915 # if the path contains ";" then we assume it to be the separator
1916 # otherwise default to the standard path separator (i.e. ":") - it is
1917 # assumed that no part of a normal pathname contains ";" but that should
1918 # okay in the real world where ";" in dirpaths is itself problematic.
1919 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1921 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1924 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1926 need_lib_prefix=unknown
1927 hardcode_into_libs=no
1929 # when you set need_version to no, make sure it does not cause -set_version
1930 # flags to be left without arguments
1931 need_version=unknown
1936 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1937 shlibpath_var=LIBPATH
1939 # AIX 3 has no versioning support, so we append a major version to the name.
1940 soname_spec='${libname}${release}${shared_ext}$major'
1947 hardcode_into_libs=yes
1948 if test "$host_cpu" = ia64; then
1949 # AIX 5 supports IA64
1950 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1951 shlibpath_var=LD_LIBRARY_PATH
1953 # With GCC up to 2.95.x, collect2 would create an import file
1954 # for dependence libraries. The import file would start with
1955 # the line `#! .'. This would cause the generated library to
1956 # depend on `.', always an invalid library. This was fixed in
1957 # development snapshots of GCC prior to 3.0.
1959 aix4 | aix4.[[01]] | aix4.[[01]].*)
1960 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1962 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
1969 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1970 # soname into executable. Probably we can add versioning support to
1971 # collect2, so additional links can be useful in future.
1972 if test "$aix_use_runtimelinking" = yes; then
1973 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1974 # instead of lib<name>.a to let people know that these are not
1975 # typical AIX shared libraries.
1976 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1978 # We preserve .a as extension for shared libraries through AIX4.2
1979 # and later when we are not doing run time linking.
1980 library_names_spec='${libname}${release}.a $libname.a'
1981 soname_spec='${libname}${release}${shared_ext}$major'
1983 shlibpath_var=LIBPATH
1988 if test "$host_cpu" = m68k; then
1989 library_names_spec='$libname.ixlibrary $libname.a'
1990 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1991 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'
1998 library_names_spec='${libname}${shared_ext}'
1999 dynamic_linker="$host_os ld.so"
2000 shlibpath_var=LIBRARY_PATH
2006 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2007 soname_spec='${libname}${release}${shared_ext}$major'
2008 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2009 shlibpath_var=LD_LIBRARY_PATH
2010 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2011 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2012 # the default ld.so.conf also contains /usr/contrib/lib and
2013 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2014 # libtool to hard-code these into programs
2017 cygwin* | mingw* | pw32*)
2018 version_type=windows
2023 case $withGCC,$host_os in
2024 yes,cygwin* | yes,mingw* | yes,pw32*)
2025 library_names_spec='$libname.dll.a'
2026 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2027 postinstall_cmds='base_file=`basename \${file}`~
2028 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2029 dldir=$destdir/`dirname \$dlpath`~
2030 test -d \$dldir || mkdir -p \$dldir~
2031 $install_prog $dir/$dlname \$dldir/$dlname~
2032 chmod a+x \$dldir/$dlname~
2033 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2034 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2036 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2037 dlpath=$dir/\$dldll~
2039 shlibpath_overrides_runpath=yes
2043 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2044 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2045 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2048 # MinGW DLLs use traditional 'lib' prefix
2049 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2050 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2051 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2052 # It is most probably a Windows format PATH printed by
2053 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2054 # path with ; separators, and with drive letters. We can handle the
2055 # drive letters (cygwin fileutils understands them), so leave them,
2056 # especially as we might pass files found there to a mingw objdump,
2057 # which wouldn't understand a cygwinified path. Ahh.
2058 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2060 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2064 # pw32 DLLs use 'pw' prefix rather than 'lib'
2065 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2071 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2074 dynamic_linker='Win32 ld.exe'
2075 # FIXME: first we should search . and the directory the executable is in
2079 darwin* | rhapsody*)
2080 dynamic_linker="$host_os dyld"
2084 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2085 soname_spec='${libname}${release}${major}$shared_ext'
2086 shlibpath_overrides_runpath=yes
2087 shlibpath_var=DYLD_LIBRARY_PATH
2088 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2089 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2090 if test "$withGCC" = yes; then
2091 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | $GREP "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2093 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2095 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2102 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2103 soname_spec='${libname}${release}${shared_ext}$major'
2104 shlibpath_var=LD_LIBRARY_PATH
2115 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2116 soname_spec='${libname}${release}${shared_ext}$major'
2117 shlibpath_var=LD_LIBRARY_PATH
2118 shlibpath_overrides_runpath=no
2119 hardcode_into_libs=yes
2120 dynamic_linker='GNU ld.so'
2123 freebsd* | dragonfly*)
2124 # DragonFly does not have aout. When/if they implement a new
2125 # versioning mechanism, adjust this.
2126 if test -x /usr/bin/objformat; then
2127 objformat=`/usr/bin/objformat`
2130 freebsd[[123]]*) objformat=aout ;;
2134 version_type=freebsd-$objformat
2135 case $version_type in
2137 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2142 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2146 shlibpath_var=LD_LIBRARY_PATH
2149 shlibpath_overrides_runpath=yes
2151 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2152 shlibpath_overrides_runpath=yes
2153 hardcode_into_libs=yes
2155 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2156 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2157 shlibpath_overrides_runpath=no
2158 hardcode_into_libs=yes
2160 freebsd*) # from 4.6 on
2161 shlibpath_overrides_runpath=yes
2162 hardcode_into_libs=yes
2171 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2172 soname_spec='${libname}${release}${shared_ext}$major'
2173 shlibpath_var=LD_LIBRARY_PATH
2174 hardcode_into_libs=yes
2177 hpux9* | hpux10* | hpux11*)
2178 # Give a soname corresponding to the major version so that dld.sl refuses to
2179 # link against other versions.
2186 hardcode_into_libs=yes
2187 dynamic_linker="$host_os dld.so"
2188 shlibpath_var=LD_LIBRARY_PATH
2189 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2190 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2191 soname_spec='${libname}${release}${shared_ext}$major'
2192 if test "X$HPUX_IA64_MODE" = X32; then
2193 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2195 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2197 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2201 hardcode_into_libs=yes
2202 dynamic_linker="$host_os dld.sl"
2203 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2204 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2205 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2206 soname_spec='${libname}${release}${shared_ext}$major'
2207 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2208 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2212 dynamic_linker="$host_os dld.sl"
2213 shlibpath_var=SHLIB_PATH
2214 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2215 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2216 soname_spec='${libname}${release}${shared_ext}$major'
2219 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2220 postinstall_cmds='chmod 555 $lib'
2227 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2228 soname_spec='${libname}${release}${shared_ext}$major'
2229 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2230 shlibpath_var=LD_LIBRARY_PATH
2231 shlibpath_overrides_runpath=no
2232 hardcode_into_libs=yes
2235 irix5* | irix6* | nonstopux*)
2237 nonstopux*) version_type=nonstopux ;;
2239 if test "$lt_cv_prog_gnu_ld" = yes; then
2247 soname_spec='${libname}${release}${shared_ext}$major'
2248 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2250 irix5* | nonstopux*)
2254 case $LD in # libtool.m4 will add one of these switches to LD
2255 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2256 libsuff= shlibsuff= libmagic=32-bit;;
2257 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2258 libsuff=32 shlibsuff=N32 libmagic=N32;;
2259 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2260 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2261 *) libsuff= shlibsuff= libmagic=never-match;;
2265 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2266 shlibpath_overrides_runpath=no
2267 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2268 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2269 hardcode_into_libs=yes
2272 # No shared lib support for Linux oldld, aout, or coff.
2273 linux*oldld* | linux*aout* | linux*coff*)
2277 # This must be Linux ELF.
2282 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2283 soname_spec='${libname}${release}${shared_ext}$major'
2284 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2285 shlibpath_var=LD_LIBRARY_PATH
2286 shlibpath_overrides_runpath=no
2287 # This implies no fast_install, which is unacceptable.
2288 # Some rework will be needed to allow for fast_install
2289 # before this can be enabled.
2290 hardcode_into_libs=yes
2292 # Append ld.so.conf contents to the search path
2293 if test -f /etc/ld.so.conf; then
2294 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2295 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2298 # We used to test for /lib/ld.so.1 and disable shared libraries on
2299 # powerpc, because MkLinux only supported shared libraries with the
2300 # GNU dynamic linker. Since this was broken with cross compilers,
2301 # most powerpc-linux boxes support dynamic linking these days and
2302 # people can always --disable-shared, the test was removed, and we
2303 # assume the GNU/Linux dynamic linker is in use.
2304 dynamic_linker='GNU/Linux ld.so'
2311 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2312 soname_spec='${libname}${release}${shared_ext}$major'
2313 shlibpath_var=LD_LIBRARY_PATH
2314 shlibpath_overrides_runpath=no
2315 hardcode_into_libs=yes
2316 dynamic_linker='GNU ld.so'
2323 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2324 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2325 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2326 dynamic_linker='NetBSD (a.out) ld.so'
2328 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2329 soname_spec='${libname}${release}${shared_ext}$major'
2330 dynamic_linker='NetBSD ld.elf_so'
2332 shlibpath_var=LD_LIBRARY_PATH
2333 shlibpath_overrides_runpath=yes
2334 hardcode_into_libs=yes
2339 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2340 shlibpath_var=LD_LIBRARY_PATH
2341 shlibpath_overrides_runpath=yes
2348 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2349 soname_spec='${libname}${release}${shared_ext}$major'
2350 shlibpath_var=LD_LIBRARY_PATH
2351 shlibpath_overrides_runpath=no
2352 hardcode_into_libs=yes
2353 dynamic_linker='ldqnx.so'
2358 sys_lib_dlsearch_path_spec="/usr/lib"
2360 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2362 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2363 *) need_version=no ;;
2365 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2366 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2367 shlibpath_var=LD_LIBRARY_PATH
2368 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2370 openbsd2.[[89]] | openbsd2.[[89]].*)
2371 shlibpath_overrides_runpath=no
2374 shlibpath_overrides_runpath=yes
2378 shlibpath_overrides_runpath=yes
2383 libname_spec='$name'
2386 library_names_spec='$libname${shared_ext} $libname.a'
2387 dynamic_linker='OS/2 ld.exe'
2388 shlibpath_var=LIBPATH
2391 osf3* | osf4* | osf5*)
2395 soname_spec='${libname}${release}${shared_ext}$major'
2396 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2397 shlibpath_var=LD_LIBRARY_PATH
2398 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2399 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2410 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2411 soname_spec='${libname}${release}${shared_ext}$major'
2412 shlibpath_var=LD_LIBRARY_PATH
2413 shlibpath_overrides_runpath=yes
2414 hardcode_into_libs=yes
2415 # ldd complains unless libraries are executable
2416 postinstall_cmds='chmod +x $lib'
2421 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2422 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2423 shlibpath_var=LD_LIBRARY_PATH
2424 shlibpath_overrides_runpath=yes
2425 if test "$with_gnu_ld" = yes; then
2433 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2434 soname_spec='${libname}${release}${shared_ext}$major'
2435 shlibpath_var=LD_LIBRARY_PATH
2436 case $host_vendor in
2438 shlibpath_overrides_runpath=no
2440 runpath_var=LD_RUN_PATH
2448 shlibpath_overrides_runpath=no
2449 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2455 if test -d /usr/nec ;then
2457 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2458 soname_spec='$libname${shared_ext}.$major'
2459 shlibpath_var=LD_LIBRARY_PATH
2463 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2464 version_type=freebsd-elf
2467 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2468 soname_spec='${libname}${release}${shared_ext}$major'
2469 shlibpath_var=LD_LIBRARY_PATH
2470 shlibpath_overrides_runpath=yes
2471 hardcode_into_libs=yes
2472 if test "$with_gnu_ld" = yes; then
2473 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2475 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2478 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2482 sys_lib_dlsearch_path_spec='/usr/lib'
2486 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2490 library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2491 shlibpath_var=LD_LIBRARY_PATH
2492 shlibpath_overrides_runpath=no
2493 hardcode_into_libs=yes
2498 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2499 soname_spec='${libname}${release}${shared_ext}$major'
2500 shlibpath_var=LD_LIBRARY_PATH
2507 AC_MSG_RESULT([$dynamic_linker])
2508 test "$dynamic_linker" = no && can_build_shared=no
2510 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2511 if test "$GCC" = yes; then
2512 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2515 _LT_DECL([], [variables_saved_for_relink], [1],
2516 [Variables whose values should be saved in libtool wrapper scripts and
2517 restored at link time])
2518 _LT_DECL([], [need_lib_prefix], [0],
2519 [Do we need the "lib" prefix for modules?])
2520 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2521 _LT_DECL([], [version_type], [0], [Library versioning type])
2522 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2523 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2524 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2525 [Is shlibpath searched before the hard-coded library search path?])
2526 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2527 _LT_DECL([], [library_names_spec], [1],
2528 [[List of archive names. First name is the real one, the rest are links.
2529 The last name is the one that the linker finds with -lNAME]])
2530 _LT_DECL([], [soname_spec], [1],
2531 [[The coded name of the library, if different from the real name]])
2532 _LT_DECL([], [postinstall_cmds], [2],
2533 [Command to use after installation of a shared archive])
2534 _LT_DECL([], [postuninstall_cmds], [2],
2535 [Command to use after uninstallation of a shared archive])
2536 _LT_DECL([], [finish_cmds], [2],
2537 [Commands used to finish a libtool library installation in a directory])
2538 _LT_DECL([], [finish_eval], [1],
2539 [[As "finish_cmds", except a single script fragment to be evaled but
2541 _LT_DECL([], [hardcode_into_libs], [0],
2542 [Whether we should hardcode library paths into libraries])
2543 _LT_DECL([], [sys_lib_search_path_spec], [2],
2544 [Compile-time system search path for libraries])
2545 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2546 [Run-time system search path for libraries])
2547 ])# _LT_SYS_DYNAMIC_LINKER
2550 # _LT_PATH_TOOL_PREFIX(TOOL)
2551 # --------------------------
2552 # find a file program which can recognise shared library
2553 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2554 [m4_require([_LT_DECL_EGREP])dnl
2555 AC_MSG_CHECKING([for $1])
2556 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2558 [[\\/*] | ?:[\\/]*])
2559 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2562 lt_save_MAGIC_CMD="$MAGIC_CMD"
2563 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2564 dnl $ac_dummy forces splitting on constant user-supplied paths.
2565 dnl POSIX.2 word splitting is done only on the output of word expansions,
2566 dnl not every word. This closes a longstanding sh security hole.
2567 ac_dummy="m4_if([$2], , $PATH, [$2])"
2568 for ac_dir in $ac_dummy; do
2570 test -z "$ac_dir" && ac_dir=.
2571 if test -f $ac_dir/$1; then
2572 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2573 if test -n "$file_magic_test_file"; then
2574 case $deplibs_check_method in
2576 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2577 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2578 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2579 $EGREP "$file_magic_regex" > /dev/null; then
2584 *** Warning: the command libtool uses to detect shared libraries,
2585 *** $file_magic_cmd, produces output that libtool cannot recognize.
2586 *** The result is that libtool may fail to recognize shared libraries
2587 *** as such. This will affect the creation of libtool libraries that
2588 *** depend on shared libraries, but programs linked with such libtool
2589 *** libraries will work regardless of this problem. Nevertheless, you
2590 *** may want to report the problem to your system manager and/or to
2591 *** bug-libtool@gnu.org
2601 MAGIC_CMD="$lt_save_MAGIC_CMD"
2604 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2605 if test -n "$MAGIC_CMD"; then
2606 AC_MSG_RESULT($MAGIC_CMD)
2610 _LT_DECL([], [MAGIC_CMD], [0],
2611 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2612 ])# _LT_PATH_TOOL_PREFIX
2615 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2616 dnl aclocal-1.4 backwards compatibility:
2617 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2622 # find a file program which can recognise a shared library
2623 m4_defun([_LT_PATH_MAGIC],
2624 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2625 if test -z "$lt_cv_path_MAGIC_CMD"; then
2626 if test -n "$ac_tool_prefix"; then
2627 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2637 # find the pathname to the GNU or non-GNU linker
2638 AC_DEFUN([LT_PATH_LD],
2639 [AC_REQUIRE([AC_PROG_CC])dnl
2640 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2641 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2642 m4_require([_LT_DECL_SED])dnl
2643 m4_require([_LT_DECL_EGREP])dnl
2645 AC_ARG_WITH([gnu-ld],
2646 [AS_HELP_STRING([--with-gnu-ld],
2647 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2648 [test "$withval" = no || with_gnu_ld=yes],
2649 [with_gnu_ld=no])dnl
2652 if test "$GCC" = yes; then
2653 # Check if gcc -print-prog-name=ld gives a path.
2654 AC_MSG_CHECKING([for ld used by $CC])
2657 # gcc leaves a trailing carriage return which upsets mingw
2658 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2660 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2663 # Accept absolute paths.
2664 [[\\/]]* | ?:[[\\/]]*)
2665 re_direlt='/[[^/]][[^/]]*/\.\./'
2666 # Canonicalize the pathname of ld
2667 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2668 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2669 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2671 test -z "$LD" && LD="$ac_prog"
2674 # If it fails, then pretend we aren't using GCC.
2678 # If it is relative, then search for the first ld in PATH.
2682 elif test "$with_gnu_ld" = yes; then
2683 AC_MSG_CHECKING([for GNU ld])
2685 AC_MSG_CHECKING([for non-GNU ld])
2687 AC_CACHE_VAL(lt_cv_path_LD,
2688 [if test -z "$LD"; then
2689 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2690 for ac_dir in $PATH; do
2692 test -z "$ac_dir" && ac_dir=.
2693 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2694 lt_cv_path_LD="$ac_dir/$ac_prog"
2695 # Check to see if the program is GNU ld. I'd rather use --version,
2696 # but apparently some variants of GNU ld only accept -v.
2697 # Break only if it was the GNU/non-GNU ld that we prefer.
2698 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2699 *GNU* | *'with BFD'*)
2700 test "$with_gnu_ld" != no && break
2703 test "$with_gnu_ld" != yes && break
2710 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2713 if test -n "$LD"; then
2718 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2722 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2726 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2727 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2728 dnl aclocal-1.4 backwards compatibility:
2729 dnl AC_DEFUN([AM_PROG_LD], [])
2730 dnl AC_DEFUN([AC_PROG_LD], [])
2735 m4_defun([_LT_PATH_LD_GNU],
2736 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2737 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2738 case `$LD -v 2>&1 </dev/null` in
2739 *GNU* | *'with BFD'*)
2740 lt_cv_prog_gnu_ld=yes
2743 lt_cv_prog_gnu_ld=no
2746 with_gnu_ld=$lt_cv_prog_gnu_ld
2752 # find reload flag for linker
2753 # -- PORTME Some linkers may need a different reload flag.
2754 m4_defun([_LT_CMD_RELOAD],
2755 [AC_CACHE_CHECK([for $LD option to reload object files],
2756 lt_cv_ld_reload_flag,
2757 [lt_cv_ld_reload_flag='-r'])
2758 reload_flag=$lt_cv_ld_reload_flag
2759 case $reload_flag in
2761 *) reload_flag=" $reload_flag" ;;
2763 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2766 if test "$GCC" = yes; then
2767 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2769 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2773 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2774 _LT_DECL([], [reload_cmds], [2])dnl
2778 # _LT_CHECK_MAGIC_METHOD
2779 # ----------------------
2780 # how to check for library dependencies
2781 # -- PORTME fill in with the dynamic library characteristics
2782 m4_defun([_LT_CHECK_MAGIC_METHOD],
2783 [m4_require([_LT_DECL_EGREP])
2784 AC_CACHE_CHECK([how to recognise dependent libraries],
2785 lt_cv_deplibs_check_method,
2786 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2787 lt_cv_file_magic_test_file=
2788 lt_cv_deplibs_check_method='unknown'
2789 # Need to set the preceding variable on all platforms that support
2790 # interlibrary dependencies.
2791 # 'none' -- dependencies not supported.
2792 # `unknown' -- same as none, but documents that we really don't know.
2793 # 'pass_all' -- all dependencies passed with no checks.
2794 # 'test_compile' -- check by making test program.
2795 # 'file_magic [[regex]]' -- check by looking for files in library path
2796 # which responds to the $file_magic_cmd with a given extended regex.
2797 # If you have `file' or equivalent on your system and you're not sure
2798 # whether `pass_all' will *always* work, you probably want this one.
2802 lt_cv_deplibs_check_method=pass_all
2806 lt_cv_deplibs_check_method=pass_all
2810 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2811 lt_cv_file_magic_cmd='/usr/bin/file -L'
2812 lt_cv_file_magic_test_file=/shlib/libc.so
2816 # func_win32_libid is a shell function defined in ltmain.sh
2817 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2818 lt_cv_file_magic_cmd='func_win32_libid'
2821 # Base MSYS/MinGW do not provide the 'file' command needed by
2822 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2824 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2825 lt_cv_file_magic_cmd='$OBJDUMP -f'
2828 darwin* | rhapsody*)
2829 lt_cv_deplibs_check_method=pass_all
2832 freebsd* | kfreebsd*-gnu | dragonfly*)
2833 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
2836 # Not sure whether the presence of OpenBSD here was a mistake.
2837 # Let's accept both of them until this is cleared up.
2838 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2839 lt_cv_file_magic_cmd=/usr/bin/file
2840 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2844 lt_cv_deplibs_check_method=pass_all
2849 lt_cv_deplibs_check_method=pass_all
2852 hpux10.20* | hpux11*)
2853 lt_cv_file_magic_cmd=/usr/bin/file
2856 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2857 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2860 [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]']
2861 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2864 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2865 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2871 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2872 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2875 irix5* | irix6* | nonstopux*)
2877 *-32|*"-32 ") libmagic=32-bit;;
2878 *-n32|*"-n32 ") libmagic=N32;;
2879 *-64|*"-64 ") libmagic=64-bit;;
2880 *) libmagic=never-match;;
2882 lt_cv_deplibs_check_method=pass_all
2885 # This must be Linux ELF.
2887 lt_cv_deplibs_check_method=pass_all
2890 netbsd* | knetbsd*-gnu)
2891 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
2892 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2894 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2899 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2900 lt_cv_file_magic_cmd=/usr/bin/file
2901 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2905 lt_cv_deplibs_check_method=pass_all
2909 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2910 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2912 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2916 osf3* | osf4* | osf5*)
2917 lt_cv_deplibs_check_method=pass_all
2921 lt_cv_deplibs_check_method=pass_all
2925 lt_cv_deplibs_check_method=pass_all
2928 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2929 lt_cv_deplibs_check_method=pass_all
2933 case $host_vendor in
2935 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]]'
2936 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2939 lt_cv_deplibs_check_method=pass_all
2942 lt_cv_file_magic_cmd='/bin/file'
2943 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2946 lt_cv_file_magic_cmd='/bin/file'
2947 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2948 lt_cv_file_magic_test_file=/lib/libc.so
2951 lt_cv_deplibs_check_method=pass_all
2954 lt_cv_deplibs_check_method=pass_all
2960 lt_cv_deplibs_check_method=pass_all
2964 file_magic_cmd=$lt_cv_file_magic_cmd
2965 deplibs_check_method=$lt_cv_deplibs_check_method
2966 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2968 _LT_DECL([], [deplibs_check_method], [1],
2969 [Method to check whether dependent libraries are shared objects])
2970 _LT_DECL([], [file_magic_cmd], [1],
2971 [Command to use when deplibs_check_method == "file_magic"])
2972 ])# _LT_CHECK_MAGIC_METHOD
2977 # find the pathname to a BSD- or MS-compatible name lister
2978 AC_DEFUN([LT_PATH_NM],
2979 [AC_REQUIRE([AC_PROG_CC])dnl
2980 AC_REQUIRE([AC_OBJEXT])dnl
2981 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
2982 [if test -n "$NM"; then
2983 # Let the user override the test.
2986 lt_nm_to_check="${ac_tool_prefix}nm"
2987 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2988 lt_nm_to_check="$lt_nm_to_check nm"
2990 for lt_tmp_nm in $lt_nm_to_check; do
2991 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2992 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2994 test -z "$ac_dir" && ac_dir=.
2995 tmp_nm="$ac_dir/$lt_tmp_nm"
2996 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2997 # Check to see if the nm accepts a BSD-compat flag.
2998 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2999 # nm: unknown option "B" ignored
3000 # Tru64's nm complains that /dev/null is an invalid object file
3001 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3002 */dev/null* | *'Invalid file or object type'*)
3003 lt_cv_path_NM="$tmp_nm -B"
3007 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3009 lt_cv_path_NM="$tmp_nm -p"
3013 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3014 continue # so that we can try to find one that supports BSD flags
3023 : ${lt_cv_path_NM=no}
3025 if test "$lt_cv_path_NM" != "no"; then
3028 # Didn't find any BSD compatible name lister, look for dumpbin.
3029 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3031 if test "$DUMPBIN" != ":"; then
3035 test -z "$NM" && NM=nm
3037 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3039 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3040 [lt_cv_nm_interface="BSD nm"
3041 echo "int some_variable = 0;" > conftest.$ac_ext
3042 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3043 (eval "$ac_compile" 2>conftest.err)
3044 cat conftest.err >&AS_MESSAGE_LOG_FD
3045 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3046 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3047 cat conftest.err >&AS_MESSAGE_LOG_FD
3048 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3049 cat conftest.out >&AS_MESSAGE_LOG_FD
3050 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3051 lt_cv_nm_interface="MS dumpbin"
3057 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3058 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3059 dnl aclocal-1.4 backwards compatibility:
3060 dnl AC_DEFUN([AM_PROG_NM], [])
3061 dnl AC_DEFUN([AC_PROG_NM], [])
3066 # check for math library
3067 AC_DEFUN([LT_LIB_M],
3068 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3071 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3072 # These system don't have libm, or don't need it
3075 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3076 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3079 AC_CHECK_LIB(m, cos, LIBM="-lm")
3086 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3087 dnl aclocal-1.4 backwards compatibility:
3088 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3091 # _LT_COMPILER_NO_RTTI([TAGNAME])
3092 # -------------------------------
3093 m4_defun([_LT_COMPILER_NO_RTTI],
3094 [m4_require([_LT_TAG_COMPILER])dnl
3096 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3098 if test "$GCC" = yes; then
3099 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3101 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3102 lt_cv_prog_compiler_rtti_exceptions,
3103 [-fno-rtti -fno-exceptions], [],
3104 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3106 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3107 [Compiler flag to turn off builtin functions])
3108 ])# _LT_COMPILER_NO_RTTI
3111 # _LT_CMD_GLOBAL_SYMBOLS
3112 # ----------------------
3113 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3114 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3115 AC_REQUIRE([AC_PROG_CC])dnl
3116 AC_REQUIRE([AC_OBJEXT])dnl
3117 AC_REQUIRE([LT_PATH_NM])dnl
3118 AC_REQUIRE([LT_PATH_LD])dnl
3119 m4_require([_LT_DECL_EGREP])dnl
3120 m4_require([_LT_TAG_COMPILER])dnl
3122 # Check for command to grab the raw symbol name followed by C symbol from nm.
3123 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3124 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3126 # These are sane defaults that work on at least a few old systems.
3127 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3129 # Character class describing NM global symbol codes.
3130 symcode='[[BCDEGRST]]'
3132 # Regexp to match symbols that can be accessed directly from C.
3133 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3135 # Define system-specific variables.
3140 cygwin* | mingw* | pw32*)
3141 symcode='[[ABCDGISTW]]'
3144 if test "$host_cpu" = ia64; then
3145 symcode='[[ABCDEGRST]]'
3149 symcode='[[BCDEGRST]]'
3152 symcode='[[BCDEGQRST]]'
3163 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3167 symcode='[[DFNSTU]]'
3171 # If we're using GNU nm, then use its standard symbol codes.
3172 case `$NM -V 2>&1` in
3173 *GNU* | *'with BFD'*)
3174 symcode='[[ABCDGIRSTW]]' ;;
3177 # Transform an extracted symbol line into a proper C declaration.
3178 # Some systems (esp. on ia64) link data and code symbols differently,
3179 # so use this general approach.
3180 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3182 # Transform an extracted symbol line into symbol name and symbol address
3183 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3185 # Handle CRLF in mingw tool chain
3189 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3193 # Try without a prefix underscore, then with it.
3194 for ac_symprfx in "" "_"; do
3196 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3197 symxfrm="\\1 $ac_symprfx\\2 \\2"
3199 # Write the raw and C identifiers.
3200 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3201 # Fake it for dumpbin and say T for any non-static function
3202 # and D for any global variable.
3203 # Also find C++ and __fastcall symbols from MSVC++,
3204 # which start with @ or ?.
3205 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3206 " {last_section=section; section=\$ 3};"\
3207 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3208 " \$ 0!~/External *\|/{next};"\
3209 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3210 " {if(hide[section]) next};"\
3211 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3212 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3213 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3214 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3215 " ' prfx=^$ac_symprfx]"
3217 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3220 # Check to see that the pipe works correctly.
3224 cat > conftest.$ac_ext <<_LT_EOF
3229 void nm_test_func(){}
3233 int main(){nm_test_var='a';nm_test_func();return(0);}
3236 if AC_TRY_EVAL(ac_compile); then
3237 # Now try to grab the symbols.
3239 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3240 # Try sorting and uniquifying the output.
3241 if sort "$nlist" | uniq > "$nlist"T; then
3242 mv -f "$nlist"T "$nlist"
3247 # Make sure that we snagged all the symbols we need.
3248 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3249 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3250 cat <<_LT_EOF > conftest.$ac_ext
3256 # Now generate the symbol file.
3257 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3259 cat <<_LT_EOF >> conftest.$ac_ext
3261 /* The mapping between symbol names and symbols. */
3266 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3268 { "@PROGRAM@", (void *) 0 },
3270 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3271 cat <<\_LT_EOF >> conftest.$ac_ext
3275 /* This works around a problem in FreeBSD linker */
3276 #ifdef FREEBSD_WORKAROUND
3277 static const void *lt_preloaded_setup() {
3278 return lt__PROGRAM__LTX_preloaded_symbols;
3286 # Now try linking the two files.
3287 mv conftest.$ac_objext conftstm.$ac_objext
3288 lt_save_LIBS="$LIBS"
3289 lt_save_CFLAGS="$CFLAGS"
3290 LIBS="conftstm.$ac_objext"
3291 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3292 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3295 LIBS="$lt_save_LIBS"
3296 CFLAGS="$lt_save_CFLAGS"
3298 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3301 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3304 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3307 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3308 cat conftest.$ac_ext >&5
3310 rm -f conftest* conftst*
3312 # Do not use the global_symbol_pipe unless it works.
3313 if test "$pipe_works" = yes; then
3316 lt_cv_sys_global_symbol_pipe=
3320 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3321 lt_cv_sys_global_symbol_to_cdecl=
3323 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3324 AC_MSG_RESULT(failed)
3329 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3330 [Take the output of nm and produce a listing of raw symbols and C names])
3331 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3332 [Transform the output of nm in a proper C declaration])
3333 _LT_DECL([global_symbol_to_c_name_address],
3334 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3335 [Transform the output of nm in a C name address pair])
3336 ]) # _LT_CMD_GLOBAL_SYMBOLS
3339 # _LT_COMPILER_PIC([TAGNAME])
3340 # ---------------------------
3341 m4_defun([_LT_COMPILER_PIC],
3342 [m4_require([_LT_TAG_COMPILER])dnl
3343 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3344 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3345 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3347 AC_MSG_CHECKING([for $compiler option to produce PIC])
3348 m4_if([$1], [CXX], [
3349 # C++ specific cases for pic, static, wl, etc.
3350 if test "$GXX" = yes; then
3351 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3352 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3356 # All AIX code is PIC.
3357 if test "$host_cpu" = ia64; then
3358 # AIX 5 now supports IA64 processor
3359 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3363 if test "$host_cpu" = m68k; then
3364 # FIXME: we need at least 68020 code to build shared libraries, but
3365 # adding the `-m68020' flag to GCC prevents building anything better,
3367 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3370 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3371 # PIC is the default for these OSes.
3373 mingw* | os2* | pw32*)
3374 # This hack is so that the source file can tell whether it is being
3375 # built for inclusion in a dll (and should export symbols for example).
3376 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3378 darwin* | rhapsody*)
3379 # PIC is the default on this platform
3380 # Common symbols not allowed in MH_DYLIB files
3381 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3384 # DJGPP does not support shared libraries at all
3385 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3388 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3389 # Instead, we relocate shared libraries at runtime.
3392 if test -d /usr/nec; then
3393 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3397 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3403 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3408 # QNX uses GNU C++, but need to define -shared option too, otherwise
3410 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3413 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3419 # All AIX code is PIC.
3420 if test "$host_cpu" = ia64; then
3421 # AIX 5 now supports IA64 processor
3422 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3424 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3428 case $cc_basename in
3430 # Green Hills C++ Compiler
3431 # _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"
3436 # PIC is the default on this platform
3437 # Common symbols not allowed in MH_DYLIB files
3438 case $cc_basename in
3440 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
3441 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3446 case $cc_basename in
3448 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3451 # Green Hills C++ Compiler
3452 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3458 freebsd* | kfreebsd*-gnu | dragonfly*)
3459 # FreeBSD uses GNU C++
3461 hpux9* | hpux10* | hpux11*)
3462 case $cc_basename in
3464 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3465 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3466 if test "$host_cpu" != ia64; then
3467 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3471 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3472 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3478 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3487 # This is c89, which is MS Visual C++ (no shared libs)
3488 # Anyone wants to do a port?
3490 irix5* | irix6* | nonstopux*)
3491 case $cc_basename in
3493 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3494 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3495 # CC pic flag -KPIC is the default.
3502 case $cc_basename in
3505 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3506 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3510 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3511 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3512 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3515 # Portland Group C++ compiler
3516 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3517 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3518 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3522 # Make sure the PIC flag is empty. It appears that all Alpha
3523 # Linux and Compaq Tru64 Unix objects are PIC.
3524 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3525 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3536 case $cc_basename in
3538 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3547 # QNX uses GNU C++, but need to define -shared option too, otherwise
3549 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3551 osf3* | osf4* | osf5*)
3552 case $cc_basename in
3554 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3557 # Rational C++ 2.4.1
3558 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3561 # Digital/Compaq C++
3562 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3563 # Make sure the PIC flag is empty. It appears that all Alpha
3564 # Linux and Compaq Tru64 Unix objects are PIC.
3565 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3566 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3575 case $cc_basename in
3577 # Sun C++ 4.2, 5.x and Centerline C++
3578 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3579 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3580 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3583 # Green Hills C++ Compiler
3584 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3591 case $cc_basename in
3594 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3595 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3599 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3605 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3606 case $cc_basename in
3608 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3609 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3610 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3615 case $cc_basename in
3617 # NonStop-UX NCC 3.20
3618 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3627 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3633 if test "$GCC" = yes; then
3634 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3635 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3639 # All AIX code is PIC.
3640 if test "$host_cpu" = ia64; then
3641 # AIX 5 now supports IA64 processor
3642 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3647 if test "$host_cpu" = m68k; then
3648 # FIXME: we need at least 68020 code to build shared libraries, but
3649 # adding the `-m68020' flag to GCC prevents building anything better,
3651 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3655 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3656 # PIC is the default for these OSes.
3659 mingw* | pw32* | os2*)
3660 # This hack is so that the source file can tell whether it is being
3661 # built for inclusion in a dll (and should export symbols for example).
3662 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3665 darwin* | rhapsody*)
3666 # PIC is the default on this platform
3667 # Common symbols not allowed in MH_DYLIB files
3668 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3672 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3679 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3685 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3686 # Instead, we relocate shared libraries at runtime.
3690 # Just because we use GCC doesn't mean we suddenly get shared libraries
3691 # on systems that don't support them.
3692 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3697 # QNX uses GNU C++, but need to define -shared option too, otherwise
3699 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3703 if test -d /usr/nec; then
3704 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3709 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3713 # PORTME Check for flag to pass linker flags through the system compiler.
3716 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3717 if test "$host_cpu" = ia64; then
3718 # AIX 5 now supports IA64 processor
3719 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3721 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3725 # PIC is the default on this platform
3726 # Common symbols not allowed in MH_DYLIB files
3727 case $cc_basename in
3729 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
3730 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3735 mingw* | pw32* | os2*)
3736 # This hack is so that the source file can tell whether it is being
3737 # built for inclusion in a dll (and should export symbols for example).
3738 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3741 hpux9* | hpux10* | hpux11*)
3742 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3743 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3750 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3753 # Is there a better lt_prog_compiler_static that works with the bundled CC?
3754 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3757 irix5* | irix6* | nonstopux*)
3758 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3759 # PIC (with -KPIC) is the default.
3760 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3764 case $cc_basename in
3766 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3767 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3768 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3770 pgcc* | pgf77* | pgf90* | pgf95*)
3771 # Portland Group compilers (*not* the Pentium gcc compiler,
3772 # which looks to be a dead project)
3773 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3774 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3775 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3778 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3779 # All Alpha code is PIC.
3780 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3786 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3787 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3791 # QNX uses GNU C++, but need to define -shared option too, otherwise
3793 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3796 osf3* | osf4* | osf5*)
3797 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3798 # All OSF/1 code is PIC.
3799 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3803 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3807 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3808 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3809 case $cc_basename in
3811 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
3813 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
3818 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3819 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3820 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3823 sysv4 | sysv4.2uw2* | sysv4.3*)
3824 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3825 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3826 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3830 if test -d /usr/nec ;then
3831 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
3832 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3836 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3837 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3838 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3839 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3843 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3844 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3848 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3849 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3853 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3859 # For platforms which do not support PIC, -DPIC is meaningless:
3861 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3864 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
3867 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
3868 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
3869 [How to pass a linker flag through the compiler])
3872 # Check to make sure the PIC flag actually works.
3874 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
3875 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
3876 [_LT_TAGVAR(lt_prog_compiler_pic_works, $1)],
3877 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
3878 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
3880 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
3882 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3883 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
3885 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
3886 [Additional compiler flags for building library objects])
3889 # Check to make sure the static flag actually works.
3891 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
3892 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
3893 _LT_TAGVAR(lt_prog_compiler_static_works, $1),
3894 $lt_tmp_static_flag,
3896 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
3897 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
3898 [Compiler flag to prevent dynamic linking])
3899 ])# _LT_COMPILER_PIC
3902 # _LT_LINKER_SHLIBS([TAGNAME])
3903 # ----------------------------
3904 # See if the linker supports building shared libraries.
3905 m4_defun([_LT_LINKER_SHLIBS],
3906 [AC_REQUIRE([LT_PATH_LD])dnl
3907 AC_REQUIRE([LT_PATH_NM])dnl
3908 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3909 m4_require([_LT_DECL_EGREP])dnl
3910 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
3911 m4_require([_LT_TAG_COMPILER])dnl
3912 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3913 m4_if([$1], [CXX], [
3914 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3917 # If we're using GNU nm, then we don't want the "-C" option.
3918 # -C means demangle to AIX nm, but means don't demangle with GNU nm
3919 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
3920 _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'
3922 _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'
3926 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
3929 _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'
3932 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3937 _LT_TAGVAR(allow_undefined_flag, $1)=
3938 _LT_TAGVAR(always_export_symbols, $1)=no
3939 _LT_TAGVAR(archive_cmds, $1)=
3940 _LT_TAGVAR(archive_expsym_cmds, $1)=
3941 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3942 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
3943 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3944 _LT_TAGVAR(hardcode_automatic, $1)=no
3945 _LT_TAGVAR(hardcode_direct, $1)=no
3946 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
3947 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3948 _LT_TAGVAR(hardcode_libdir_separator, $1)=
3949 _LT_TAGVAR(hardcode_minus_L, $1)=no
3950 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3951 _LT_TAGVAR(inherit_rpath, $1)=no
3952 _LT_TAGVAR(link_all_deplibs, $1)=unknown
3953 _LT_TAGVAR(module_cmds, $1)=
3954 _LT_TAGVAR(module_expsym_cmds, $1)=
3955 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
3956 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
3957 _LT_TAGVAR(thread_safe_flag_spec, $1)=
3958 _LT_TAGVAR(whole_archive_flag_spec, $1)=
3959 # include_expsyms should be a list of space-separated symbols to be *always*
3960 # included in the symbol list
3961 _LT_TAGVAR(include_expsyms, $1)=
3962 # exclude_expsyms can be an extended regexp of symbols to exclude
3963 # it will be wrapped by ` (' and `)$', so one must not match beginning or
3964 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
3965 # as well as any symbol that contains `d'.
3966 _LT_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
3967 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
3968 # platforms (ab)use it in PIC code, but their linkers get confused if
3969 # the symbol is explicitly referenced. Since portable code cannot
3970 # rely on this symbol name, it's probably fine to never include it in
3971 # preloaded symbol tables.
3972 extract_expsyms_cmds=
3975 cygwin* | mingw* | pw32*)
3976 # FIXME: the MSVC++ port hasn't been tested in a loooong time
3977 # When not using gcc, we currently assume that we are using
3978 # Microsoft Visual C++.
3979 if test "$GCC" != yes; then
3984 # we just hope/assume this is gcc and not c89 (= MSVC++)
3992 _LT_TAGVAR(ld_shlibs, $1)=yes
3993 if test "$with_gnu_ld" = yes; then
3994 # If archive_cmds runs LD, not CC, wlarc should be empty
3997 # Set some defaults for GNU ld with shared library support. These
3998 # are reset later if shared libraries are not supported. Putting them
3999 # here allows them to be overridden if necessary.
4000 runpath_var=LD_RUN_PATH
4001 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4002 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4003 # ancient GNU ld didn't support --whole-archive et. al.
4004 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4005 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4007 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4009 supports_anon_versioning=no
4010 case `$LD -v 2>&1` in
4011 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4012 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4013 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4014 *\ 2.11.*) ;; # other 2.11 versions
4015 *) supports_anon_versioning=yes ;;
4018 # See if GNU ld supports shared libraries.
4020 aix3* | aix4* | aix5*)
4021 # On AIX/PPC, the GNU linker is very broken
4022 if test "$host_cpu" != ia64; then
4023 _LT_TAGVAR(ld_shlibs, $1)=no
4026 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4027 *** to be unable to reliably create shared libraries on AIX.
4028 *** Therefore, libtool is disabling shared libraries support. If you
4029 *** really care for shared libraries, you may want to modify your PATH
4030 *** so that a non-GNU linker is found, and then restart.
4037 if test "$host_cpu" = m68k; then
4038 _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)'
4039 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4040 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4043 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
4044 # that the semantics of dynamic libraries on AmigaOS, at least up
4045 # to version 4, is to share data among multiple programs linked
4046 # with the same dynamic library. Since this doesn't match the
4047 # behavior of shared libraries on other platforms, we can't use
4049 _LT_TAGVAR(ld_shlibs, $1)=no
4053 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4054 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4055 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4056 # support --undefined. This deserves some investigation. FIXME
4057 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4059 _LT_TAGVAR(ld_shlibs, $1)=no
4063 cygwin* | mingw* | pw32*)
4064 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4065 # as there is no search path for DLLs.
4066 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4067 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4068 _LT_TAGVAR(always_export_symbols, $1)=no
4069 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4070 _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'
4072 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4073 _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'
4074 # If the export-symbols file already is a .def file (1st line
4075 # is EXPORTS), use it as is; otherwise, prepend...
4076 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4077 cp $export_symbols $output_objdir/$soname.def;
4079 echo EXPORTS > $output_objdir/$soname.def;
4080 cat $export_symbols >> $output_objdir/$soname.def;
4082 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4084 _LT_TAGVAR(ld_shlibs, $1)=no
4089 _LT_TAGVAR(hardcode_direct, $1)=no
4090 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4091 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4092 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4093 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4094 # Instead, shared libraries are loaded at an image base (0x10000000 by
4095 # default) and relocated if they conflict, which is a slow very memory
4096 # consuming and fragmenting process. To avoid this, we pick a random,
4097 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4098 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4099 _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'
4100 _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'
4105 if test "$host_os" = linux-dietlibc; then
4106 case $cc_basename in
4107 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4110 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4111 && test "$tmp_diet" = no
4114 case $cc_basename,$host_cpu in
4115 pgcc*) # Portland Group C compiler
4116 _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'
4117 tmp_addflag=' $pic_flag'
4119 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
4120 _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'
4121 tmp_addflag=' $pic_flag -Mnomain' ;;
4122 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4123 tmp_addflag=' -i_dynamic' ;;
4124 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4125 tmp_addflag=' -i_dynamic -nofor_main' ;;
4126 ifc* | ifort*) # Intel Fortran compiler
4127 tmp_addflag=' -nofor_main' ;;
4130 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4132 if test "x$supports_anon_versioning" = xyes; then
4133 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~echo "local: *; };" >> $output_objdir/$libname.ver~$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4136 _LT_TAGVAR(ld_shlibs, $1)=no
4141 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4142 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4145 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4146 _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'
4151 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4152 _LT_TAGVAR(ld_shlibs, $1)=no
4155 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4156 *** create shared libraries on Solaris systems. Therefore, libtool
4157 *** is disabling shared libraries support. We urge you to upgrade GNU
4158 *** binutils to release 2.9.1 or newer. Another option is to modify
4159 *** your PATH or compiler configuration so that the native linker is
4160 *** used, and then restart.
4163 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4164 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4165 _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'
4167 _LT_TAGVAR(ld_shlibs, $1)=no
4171 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4172 case `$LD -v 2>&1` in
4173 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4174 _LT_TAGVAR(ld_shlibs, $1)=no
4177 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4178 *** reliably create shared libraries on SCO systems. Therefore, libtool
4179 *** is disabling shared libraries support. We urge you to upgrade GNU
4180 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4181 *** your PATH or compiler configuration so that the native linker is
4182 *** used, and then restart.
4187 # For security reasons, it is highly recommended that you always
4188 # use absolute paths for naming shared libraries, and exclude the
4189 # DT_RUNPATH tag from executables and libraries. But doing so
4190 # requires that you compile everything twice, which is a pain.
4191 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4192 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4193 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4194 _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'
4196 _LT_TAGVAR(ld_shlibs, $1)=no
4203 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4205 _LT_TAGVAR(hardcode_direct, $1)=yes
4206 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4210 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4211 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4212 _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'
4214 _LT_TAGVAR(ld_shlibs, $1)=no
4219 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4221 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4222 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4223 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4226 # PORTME fill in a description of your system's linker (not GNU ld)
4229 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4230 _LT_TAGVAR(always_export_symbols, $1)=yes
4231 _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'
4232 # Note: this linker hardcodes the directories in LIBPATH if there
4233 # are no directories specified by -L.
4234 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4235 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4236 # Neither direct hardcoding nor static linking is supported with a
4238 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4243 if test "$host_cpu" = ia64; then
4244 # On IA64, the linker does run time linking by default, so we don't
4245 # have to do anything special.
4246 aix_use_runtimelinking=no
4247 exp_sym_flag='-Bexport'
4250 # If we're using GNU nm, then we don't want the "-C" option.
4251 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4252 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4253 _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'
4255 _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'
4257 aix_use_runtimelinking=no
4259 # Test if we are trying to use run time linking or normal
4260 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4261 # need to do runtime linking.
4262 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4263 for ld_flag in $LDFLAGS; do
4264 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4265 aix_use_runtimelinking=yes
4272 exp_sym_flag='-bexport'
4273 no_entry_flag='-bnoentry'
4276 # When large executables or shared objects are built, AIX ld can
4277 # have problems creating the table of contents. If linking a library
4278 # or program results in "error TOC overflow" add -mminimal-toc to
4279 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4280 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4282 _LT_TAGVAR(archive_cmds, $1)=''
4283 _LT_TAGVAR(hardcode_direct, $1)=yes
4284 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4285 _LT_TAGVAR(link_all_deplibs, $1)=yes
4286 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4288 if test "$GCC" = yes; then
4289 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4290 # We only want to do this on AIX 4.2 and lower, the check
4291 # below for broken collect2 doesn't work under 4.3+
4292 collect2name=`${CC} -print-prog-name=collect2`
4293 if test -f "$collect2name" &&
4294 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4296 # We have reworked collect2
4297 _LT_TAGVAR(hardcode_direct, $1)=yes
4299 # We have old collect2
4300 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4301 # It fails to find uninstalled libraries when the uninstalled
4302 # path is not listed in the libpath. Setting hardcode_minus_L
4303 # to unsupported forces relinking
4304 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4305 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4306 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4310 shared_flag='-shared'
4311 if test "$aix_use_runtimelinking" = yes; then
4312 shared_flag="$shared_flag "'${wl}-G'
4316 if test "$host_cpu" = ia64; then
4317 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4318 # chokes on -Wl,-G. The following line is correct:
4321 if test "$aix_use_runtimelinking" = yes; then
4322 shared_flag='${wl}-G'
4324 shared_flag='${wl}-bM:SRE'
4329 # It seems that -bexpall does not export symbols beginning with
4330 # underscore (_), so it is better to generate a list of symbols to export.
4331 _LT_TAGVAR(always_export_symbols, $1)=yes
4332 if test "$aix_use_runtimelinking" = yes; then
4333 # Warning - without using the other runtime loading flags (-brtl),
4334 # -berok will link without error, but may produce a broken library.
4335 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4336 # Determine the default libpath from the value encoded in an
4338 _LT_SYS_MODULE_PATH_AIX
4339 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4340 _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"
4342 if test "$host_cpu" = ia64; then
4343 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4344 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4345 _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"
4347 # Determine the default libpath from the value encoded in an
4349 _LT_SYS_MODULE_PATH_AIX
4350 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4351 # Warning - without using the other run time loading flags,
4352 # -berok will link without error, but may produce a broken library.
4353 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4354 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4355 # Exported symbols can be pulled into shared objects from archives
4356 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4357 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4358 # This is similar to how AIX traditionally builds its shared libraries.
4359 _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'
4365 if test "$host_cpu" = m68k; then
4366 _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)'
4367 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4368 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4370 # see comment about different semantics on the GNU ld section
4371 _LT_TAGVAR(ld_shlibs, $1)=no
4375 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4378 cygwin* | mingw* | pw32*)
4379 # When not using gcc, we currently assume that we are using
4380 # Microsoft Visual C++.
4381 # hardcode_libdir_flag_spec is actually meaningless, as there is
4382 # no search path for DLLs.
4383 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4384 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4385 # Tell ltmain to make .lib files, not .a files.
4387 # Tell ltmain to make .dll files, not .so files.
4389 # FIXME: Setting linknames here is a bad hack.
4390 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4391 # The linker will automatically build a .lib file if we build a DLL.
4392 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4393 # FIXME: Should let the user specify the lib program.
4394 _LT_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
4395 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4396 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4399 darwin* | rhapsody*)
4401 rhapsody* | darwin1.[[012]])
4402 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4405 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
4407 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4410 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4415 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4416 _LT_TAGVAR(hardcode_direct, $1)=no
4417 _LT_TAGVAR(hardcode_automatic, $1)=yes
4418 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4419 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
4420 _LT_TAGVAR(link_all_deplibs, $1)=yes
4421 if test "$GCC" = yes ; then
4422 AC_CACHE_VAL([lt_cv_apple_cc_single_mod],
4423 [lt_cv_apple_cc_single_mod=no
4424 if test -z "${LT_MULTI_MODULE}"; then
4425 # By default we will add the -single_module flag. You can override
4426 # by either setting the environment variable LT_MULTI_MODULE
4427 # non-empty at configure time, or by adding -multi-module to the
4429 echo "int foo(void){return 1;}" > conftest.c
4430 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
4431 -dynamiclib ${wl}-single_module conftest.c
4432 if test -f libconftest.dylib; then
4433 lt_cv_apple_cc_single_mod=yes
4434 rm libconftest.dylib
4438 output_verbose_link_cmd=echo
4439 if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
4440 _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4441 _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}'
4443 _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4444 _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}'
4446 _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4447 _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}'
4449 case $cc_basename in
4451 output_verbose_link_cmd=echo
4452 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
4453 _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4454 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4455 _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}'
4456 _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}'
4459 _LT_TAGVAR(ld_shlibs, $1)=no
4466 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4467 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4468 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4472 _LT_TAGVAR(ld_shlibs, $1)=no
4475 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4476 # support. Future versions do this automatically, but an explicit c++rt0.o
4477 # does not break anything, and helps significantly (at the cost of a little
4480 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4481 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4482 _LT_TAGVAR(hardcode_direct, $1)=yes
4483 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4486 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4488 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4489 _LT_TAGVAR(hardcode_direct, $1)=yes
4490 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4491 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4494 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4495 freebsd* | kfreebsd*-gnu | dragonfly*)
4496 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4497 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4498 _LT_TAGVAR(hardcode_direct, $1)=yes
4499 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4503 if test "$GCC" = yes; then
4504 _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'
4506 _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'
4508 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4509 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4510 _LT_TAGVAR(hardcode_direct, $1)=yes
4512 # hardcode_minus_L: Not really in the search PATH,
4513 # but as the default location of the library.
4514 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4515 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4519 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4520 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4522 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4524 if test "$with_gnu_ld" = no; then
4525 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4526 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4527 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4528 _LT_TAGVAR(hardcode_direct, $1)=yes
4529 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4530 # hardcode_minus_L: Not really in the search PATH,
4531 # but as the default location of the library.
4532 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4537 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4540 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4543 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4546 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4552 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4555 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4558 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4562 if test "$with_gnu_ld" = no; then
4563 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4564 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4568 _LT_TAGVAR(hardcode_direct, $1)=no
4569 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4572 _LT_TAGVAR(hardcode_direct, $1)=yes
4573 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4575 # hardcode_minus_L: Not really in the search PATH,
4576 # but as the default location of the library.
4577 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4583 irix5* | irix6* | nonstopux*)
4584 if test "$GCC" = yes; then
4585 _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'
4586 # Try to use the -exported_symbol ld option, if it does not
4587 # work, assume that -exports_file does not work either and
4588 # implicitly export all symbols.
4589 save_LDFLAGS="$LDFLAGS"
4590 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4591 AC_LINK_IFELSE(int foo(void) {},
4592 _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'
4594 LDFLAGS="$save_LDFLAGS"
4596 _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'
4597 _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'
4599 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4600 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4601 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4602 _LT_TAGVAR(inherit_rpath, $1)=yes
4603 _LT_TAGVAR(link_all_deplibs, $1)=yes
4607 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4608 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
4610 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
4612 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4613 _LT_TAGVAR(hardcode_direct, $1)=yes
4614 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4618 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4619 _LT_TAGVAR(hardcode_direct, $1)=yes
4620 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4621 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4622 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4629 _LT_TAGVAR(hardcode_direct, $1)=yes
4630 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4631 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4632 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4633 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4634 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4635 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4638 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4639 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4640 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4643 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4644 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4651 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4652 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4653 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4654 _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'
4655 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4659 if test "$GCC" = yes; then
4660 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4661 _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'
4663 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4664 _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'
4666 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4667 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4668 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4671 osf4* | osf5*) # as osf3* with the addition of -msym flag
4672 if test "$GCC" = yes; then
4673 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4674 _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'
4675 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4677 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4678 _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'
4679 _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~
4680 $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'
4682 # Both c and cxx compiler support -rpath directly
4683 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4685 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4686 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4690 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4691 if test "$GCC" = yes; then
4693 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4694 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4695 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4697 case `$CC -V 2>&1` in
4700 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4701 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4702 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4706 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4707 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4708 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4712 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4713 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4715 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4717 # The compiler driver will combine linker options so we
4718 # cannot just pass the convenience library names through
4719 # without $wl, iff we do not link with $LD.
4720 # Luckily, gcc supports the same syntax we need for Sun Studio.
4721 # Supported since Solaris 2.6 (maybe 2.5.1?)
4724 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
4726 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
4729 _LT_TAGVAR(link_all_deplibs, $1)=yes
4733 if test "x$host_vendor" = xsequent; then
4734 # Use $CC to link under sequent, because it throws in some extra .o
4735 # files that make .init and .fini sections work.
4736 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4738 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4740 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4741 _LT_TAGVAR(hardcode_direct, $1)=yes
4742 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4743 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4747 case $host_vendor in
4749 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4750 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
4753 ## LD is ld it makes a PLAMLIB
4754 ## CC just makes a GrossModule.
4755 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
4756 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
4757 _LT_TAGVAR(hardcode_direct, $1)=no
4760 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4761 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
4764 runpath_var='LD_RUN_PATH'
4765 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4769 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4770 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4771 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
4775 if test -d /usr/nec; then
4776 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4777 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4778 runpath_var=LD_RUN_PATH
4779 hardcode_runpath_var=yes
4780 _LT_TAGVAR(ld_shlibs, $1)=yes
4784 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4785 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4786 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4787 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4788 runpath_var='LD_RUN_PATH'
4790 if test "$GCC" = yes; then
4791 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4792 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4794 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4795 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4799 sysv5* | sco3.2v5* | sco5v6*)
4800 # Note: We can NOT use -z defs as we might desire, because we do not
4801 # link with -lc, and that would cause any symbols used from libc to
4802 # always be unresolved, which means just about no library would
4803 # ever link correctly. If we're not using GNU ld we use -z text
4804 # though, which does catch some bad symbols but isn't as heavy-handed
4806 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4807 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4808 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4809 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4810 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
4811 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4812 _LT_TAGVAR(link_all_deplibs, $1)=yes
4813 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4814 runpath_var='LD_RUN_PATH'
4816 if test "$GCC" = yes; then
4817 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4818 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4820 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4821 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4826 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4827 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4828 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4832 _LT_TAGVAR(ld_shlibs, $1)=no
4836 if test x$host_vendor = xsni; then
4838 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4839 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
4845 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
4846 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4848 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
4850 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
4851 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
4852 _LT_DECL([], [extract_expsyms_cmds], [2],
4853 [The commands to extract the exported symbol list from a shared archive])
4856 # Do we need to explicitly link libc?
4858 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
4860 # Assume -lc should be added
4861 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4863 if test "$enable_shared" = yes && test "$GCC" = yes; then
4864 case $_LT_TAGVAR(archive_cmds, $1) in
4866 # FIXME: we may have to deal with multi-command sequences.
4869 # Test whether the compiler implicitly links with -lc since on some
4870 # systems, -lgcc has to come before -lc. If gcc already passes -lc
4871 # to ld, don't add -lc before -lgcc.
4872 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
4874 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
4876 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
4879 libobjs=conftest.$ac_objext
4881 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
4882 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
4888 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
4889 _LT_TAGVAR(allow_undefined_flag, $1)=
4890 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
4892 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4894 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4896 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
4898 cat conftest.err 1>&5
4901 AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
4908 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
4909 [Whether or not to add -lc for building shared libraries])
4910 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
4911 [enable_shared_with_static_runtimes], [0],
4912 [Whether or not to disallow shared libs when runtime libs are static])
4913 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
4914 [Compiler flag to allow reflexive dlopens])
4915 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
4916 [Compiler flag to generate shared objects directly from archives])
4917 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
4918 [Create an old-style archive from a shared archive])
4919 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
4920 [Create a temporary old-style archive to link instead of a shared archive])
4921 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
4922 _LT_TAGDECL([], [archive_expsym_cmds], [2])
4923 _LT_TAGDECL([], [module_cmds], [2],
4924 [Commands used to build a loadable module if different from building
4926 _LT_TAGDECL([], [module_expsym_cmds], [2])
4927 _LT_TAGDECL([], [with_gnu_ld], [1],
4928 [Whether we are building with GNU ld or not])
4929 _LT_TAGDECL([], [allow_undefined_flag], [1],
4930 [Flag that allows shared libraries with undefined symbols to be built])
4931 _LT_TAGDECL([], [no_undefined_flag], [1],
4932 [Flag that enforces no undefined symbols])
4933 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
4934 [Flag to hardcode $libdir into a binary during linking.
4935 This must work even if $libdir does not exist])
4936 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
4937 [[If ld is used when linking, flag to hardcode $libdir into a binary
4938 during linking. This must work even if $libdir does not exist]])
4939 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
4940 [Whether we need a single "-rpath" flag with a separated argument])
4941 _LT_TAGDECL([], [hardcode_direct], [0],
4942 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
4943 DIR into the resulting binary])
4944 _LT_TAGDECL([], [hardcode_minus_L], [0],
4945 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
4946 into the resulting binary])
4947 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
4948 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
4949 into the resulting binary])
4950 _LT_TAGDECL([], [hardcode_automatic], [0],
4951 [Set to "yes" if building a shared library automatically hardcodes DIR
4952 into the library and all subsequent libraries and executables linked
4954 _LT_TAGDECL([], [inherit_rpath], [0],
4955 [Set to yes if linker adds runtime paths of dependent libraries
4956 to runtime path list])
4957 _LT_TAGDECL([], [link_all_deplibs], [0],
4958 [Whether libtool must link a program against all its dependency libraries])
4959 _LT_TAGDECL([], [fix_srcfile_path], [1],
4960 [Fix the shell variable $srcfile for the compiler])
4961 _LT_TAGDECL([], [always_export_symbols], [0],
4962 [Set to "yes" if exported symbols are required])
4963 _LT_TAGDECL([], [export_symbols_cmds], [2],
4964 [The commands to list exported symbols])
4965 _LT_TAGDECL([], [exclude_expsyms], [1],
4966 [Symbols that should not be listed in the preloaded symbols])
4967 _LT_TAGDECL([], [include_expsyms], [1],
4968 [Symbols that must always be exported])
4969 _LT_TAGDECL([], [prelink_cmds], [2],
4970 [Commands necessary for linking programs (against libraries) with templates])
4971 _LT_TAGDECL([], [file_list_spec], [1],
4972 [Specify filename containing input files])
4973 dnl FIXME: Not yet implemented
4974 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
4975 dnl [Compiler flag to generate thread safe objects])
4976 ])# _LT_LINKER_SHLIBS
4979 # _LT_LANG_C_CONFIG([TAG])
4980 # ------------------------
4981 # Ensure that the configuration variables for a C compiler are suitably
4982 # defined. These variables are subsequently used by _LT_CONFIG to write
4983 # the compiler configuration to `libtool'.
4984 m4_defun([_LT_LANG_C_CONFIG],
4985 [m4_require([_LT_DECL_EGREP])dnl
4989 # Source file extension for C test sources.
4992 # Object file extension for compiled C test sources.
4994 _LT_TAGVAR(objext, $1)=$objext
4996 # Code to be used in simple compile tests
4997 lt_simple_compile_test_code="int some_variable = 0;\n"
4999 # Code to be used in simple link tests
5000 lt_simple_link_test_code='int main(){return(0);}\n'
5003 # Save the default compiler, since it gets overwritten when the other
5004 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5005 compiler_DEFAULT=$CC
5007 # save warnings/boilerplate of simple test code
5008 _LT_COMPILER_BOILERPLATE
5009 _LT_LINKER_BOILERPLATE
5012 ## There is no encapsulation within the following macros, do not change
5013 ## the running order or otherwise move them around unless you know exactly
5014 ## what you are doing...
5015 if test -n "$compiler"; then
5016 _LT_COMPILER_NO_RTTI($1)
5017 _LT_COMPILER_PIC($1)
5018 _LT_COMPILER_C_O($1)
5019 _LT_COMPILER_FILE_LOCKS($1)
5020 _LT_LINKER_SHLIBS($1)
5021 _LT_SYS_DYNAMIC_LINKER($1)
5022 _LT_LINKER_HARDCODE_LIBPATH($1)
5026 # Report which library types will actually be built
5027 AC_MSG_CHECKING([if libtool supports shared libraries])
5028 AC_MSG_RESULT([$can_build_shared])
5030 AC_MSG_CHECKING([whether to build shared libraries])
5031 test "$can_build_shared" = "no" && enable_shared=no
5033 # On AIX, shared libraries and static libraries use the same namespace, and
5034 # are all built from PIC.
5037 test "$enable_shared" = yes && enable_static=no
5038 if test -n "$RANLIB"; then
5039 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5040 postinstall_cmds='$RANLIB $lib'
5045 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5046 test "$enable_shared" = yes && enable_static=no
5050 AC_MSG_RESULT([$enable_shared])
5052 AC_MSG_CHECKING([whether to build static libraries])
5053 # Make sure either enable_shared or enable_static is yes.
5054 test "$enable_shared" = yes || enable_static=yes
5055 AC_MSG_RESULT([$enable_static])
5061 ])# _LT_LANG_C_CONFIG
5066 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5067 # compiler, we have our own version here.
5068 m4_defun([_LT_PROG_CXX],
5070 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5072 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5073 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5074 (test "X$CXX" != "Xg++"))) ; then
5077 _lt_caught_CXX_error=yes
5079 popdef([AC_MSG_ERROR])
5082 dnl aclocal-1.4 backwards compatibility:
5083 dnl AC_DEFUN([_LT_PROG_CXX], [])
5086 # _LT_LANG_CXX_CONFIG([TAG])
5087 # --------------------------
5088 # Ensure that the configuration variables for a C++ compiler are suitably
5089 # defined. These variables are subsequently used by _LT_CONFIG to write
5090 # the compiler configuration to `libtool'.
5091 m4_defun([_LT_LANG_CXX_CONFIG],
5092 [AC_REQUIRE([_LT_PROG_CXX])dnl
5093 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5094 m4_require([_LT_DECL_EGREP])dnl
5097 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5098 _LT_TAGVAR(allow_undefined_flag, $1)=
5099 _LT_TAGVAR(always_export_symbols, $1)=no
5100 _LT_TAGVAR(archive_expsym_cmds, $1)=
5101 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5102 _LT_TAGVAR(hardcode_direct, $1)=no
5103 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5104 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5105 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5106 _LT_TAGVAR(hardcode_minus_L, $1)=no
5107 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5108 _LT_TAGVAR(hardcode_automatic, $1)=no
5109 _LT_TAGVAR(inherit_rpath, $1)=no
5110 _LT_TAGVAR(module_cmds, $1)=
5111 _LT_TAGVAR(module_expsym_cmds, $1)=
5112 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5113 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5114 _LT_TAGVAR(no_undefined_flag, $1)=
5115 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5116 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5118 # Source file extension for C++ test sources.
5121 # Object file extension for compiled C++ test sources.
5123 _LT_TAGVAR(objext, $1)=$objext
5125 # No sense in running all these tests if we already determined that
5126 # the CXX compiler isn't working. Some variables (like enable_shared)
5127 # are currently assumed to apply to all compilers on this platform,
5128 # and will be corrupted by setting them based on a non-working compiler.
5129 if test "$_lt_caught_CXX_error" != yes; then
5130 # Code to be used in simple compile tests
5131 lt_simple_compile_test_code="int some_variable = 0;\n"
5133 # Code to be used in simple link tests
5134 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
5136 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5139 # save warnings/boilerplate of simple test code
5140 _LT_COMPILER_BOILERPLATE
5141 _LT_LINKER_BOILERPLATE
5143 # Allow CC to be a program name with arguments.
5148 lt_save_with_gnu_ld=$with_gnu_ld
5149 lt_save_path_LD=$lt_cv_path_LD
5150 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5151 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5153 $as_unset lt_cv_prog_gnu_ld
5155 if test -n "${lt_cv_path_LDCXX+set}"; then
5156 lt_cv_path_LD=$lt_cv_path_LDCXX
5158 $as_unset lt_cv_path_LD
5160 test -z "${LDCXX+set}" || LD=$LDCXX
5163 _LT_TAGVAR(compiler, $1)=$CC
5164 _LT_CC_BASENAME([$compiler])
5166 if test -n "$compiler"; then
5167 # We don't want -fno-exception when compiling C++ code, so set the
5168 # no_builtin_flag separately
5169 if test "$GXX" = yes; then
5170 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5172 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5175 if test "$GXX" = yes; then
5176 # Set up default GNU C++ configuration
5180 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5181 # archiving commands below assume that GNU ld is being used.
5182 if test "$with_gnu_ld" = yes; then
5183 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5184 _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'
5186 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5187 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5189 # If archive_cmds runs LD, not CC, wlarc should be empty
5190 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5191 # investigate it a little bit more. (MM)
5194 # ancient GNU ld didn't support --whole-archive et. al.
5195 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5196 $GREP 'no-whole-archive' > /dev/null; then
5197 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5199 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5205 # A generic and very simple default shared library creation
5206 # command for GNU C++ for the case where it uses the native
5207 # linker, instead of GNU ld. If possible, this setting should
5208 # overridden to take advantage of the native linker features on
5209 # the platform it is being used on.
5210 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5213 # Commands to make compiler produce verbose output that lists
5214 # what "hidden" libraries, object files and flags are used when
5215 # linking a shared library.
5216 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5224 # PORTME: fill in a description of your system's C++ link characteristics
5225 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5226 _LT_TAGVAR(ld_shlibs, $1)=yes
5229 # FIXME: insert proper C++ library support
5230 _LT_TAGVAR(ld_shlibs, $1)=no
5233 if test "$host_cpu" = ia64; then
5234 # On IA64, the linker does run time linking by default, so we don't
5235 # have to do anything special.
5236 aix_use_runtimelinking=no
5237 exp_sym_flag='-Bexport'
5240 aix_use_runtimelinking=no
5242 # Test if we are trying to use run time linking or normal
5243 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5244 # need to do runtime linking.
5245 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5246 for ld_flag in $LDFLAGS; do
5249 aix_use_runtimelinking=yes
5257 exp_sym_flag='-bexport'
5258 no_entry_flag='-bnoentry'
5261 # When large executables or shared objects are built, AIX ld can
5262 # have problems creating the table of contents. If linking a library
5263 # or program results in "error TOC overflow" add -mminimal-toc to
5264 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5265 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5267 _LT_TAGVAR(archive_cmds, $1)=''
5268 _LT_TAGVAR(hardcode_direct, $1)=yes
5269 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5270 _LT_TAGVAR(link_all_deplibs, $1)=yes
5271 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5273 if test "$GXX" = yes; then
5274 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5275 # We only want to do this on AIX 4.2 and lower, the check
5276 # below for broken collect2 doesn't work under 4.3+
5277 collect2name=`${CC} -print-prog-name=collect2`
5278 if test -f "$collect2name" &&
5279 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5281 # We have reworked collect2
5282 _LT_TAGVAR(hardcode_direct, $1)=yes
5284 # We have old collect2
5285 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5286 # It fails to find uninstalled libraries when the uninstalled
5287 # path is not listed in the libpath. Setting hardcode_minus_L
5288 # to unsupported forces relinking
5289 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5290 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5291 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5294 shared_flag='-shared'
5295 if test "$aix_use_runtimelinking" = yes; then
5296 shared_flag="$shared_flag "'${wl}-G'
5300 if test "$host_cpu" = ia64; then
5301 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5302 # chokes on -Wl,-G. The following line is correct:
5305 if test "$aix_use_runtimelinking" = yes; then
5306 shared_flag='${wl}-G'
5308 shared_flag='${wl}-bM:SRE'
5313 # It seems that -bexpall does not export symbols beginning with
5314 # underscore (_), so it is better to generate a list of symbols to
5316 _LT_TAGVAR(always_export_symbols, $1)=yes
5317 if test "$aix_use_runtimelinking" = yes; then
5318 # Warning - without using the other runtime loading flags (-brtl),
5319 # -berok will link without error, but may produce a broken library.
5320 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5321 # Determine the default libpath from the value encoded in an empty
5323 _LT_SYS_MODULE_PATH_AIX
5324 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5326 _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"
5328 if test "$host_cpu" = ia64; then
5329 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5330 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5331 _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"
5333 # Determine the default libpath from the value encoded in an
5335 _LT_SYS_MODULE_PATH_AIX
5336 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5337 # Warning - without using the other run time loading flags,
5338 # -berok will link without error, but may produce a broken library.
5339 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5340 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5341 # Exported symbols can be pulled into shared objects from archives
5342 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5343 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5344 # This is similar to how AIX traditionally builds its shared
5346 _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'
5352 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5353 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5354 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5355 # support --undefined. This deserves some investigation. FIXME
5356 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5358 _LT_TAGVAR(ld_shlibs, $1)=no
5363 case $cc_basename in
5365 # FIXME: insert proper C++ library support
5366 _LT_TAGVAR(ld_shlibs, $1)=no
5371 cygwin* | mingw* | pw32*)
5372 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5373 # as there is no search path for DLLs.
5374 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5375 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5376 _LT_TAGVAR(always_export_symbols, $1)=no
5377 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5379 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5380 _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'
5381 # If the export-symbols file already is a .def file (1st line
5382 # is EXPORTS), use it as is; otherwise, prepend...
5383 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5384 cp $export_symbols $output_objdir/$soname.def;
5386 echo EXPORTS > $output_objdir/$soname.def;
5387 cat $export_symbols >> $output_objdir/$soname.def;
5389 $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'
5391 _LT_TAGVAR(ld_shlibs, $1)=no
5394 darwin* | rhapsody*)
5396 rhapsody* | darwin1.[[012]])
5397 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5400 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
5402 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5405 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5410 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5411 _LT_TAGVAR(hardcode_direct, $1)=no
5412 _LT_TAGVAR(hardcode_automatic, $1)=yes
5413 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5414 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
5415 _LT_TAGVAR(link_all_deplibs, $1)=yes
5417 if test "$GXX" = yes ; then
5418 AC_CACHE_VAL([lt_cv_apple_cc_single_mod],
5419 [lt_cv_apple_cc_single_mod=no
5420 if test -z "${LT_MULTI_MODULE}"; then
5421 # By default we will add the -single_module flag. You can override
5422 # by either setting the environment variable LT_MULTI_MODULE
5423 # non-empty at configure time, or by adding -multi-module to the
5425 echo "int foo(void){return 1;}" > conftest.c
5426 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
5427 -dynamiclib ${wl}-single_module conftest.c
5428 if test -f libconftest.dylib; then
5429 lt_cv_apple_cc_single_mod=yes
5430 rm libconftest.dylib
5434 output_verbose_link_cmd=echo
5435 if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
5436 _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5437 _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}'
5439 _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'
5440 _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}'
5442 _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5443 _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}'
5445 case $cc_basename in
5447 output_verbose_link_cmd=echo
5448 _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'
5449 _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5450 # Don't fix this by using the ld -exported_symbols_list flag,
5451 # it doesn't exist in older darwin lds
5452 _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}'
5453 _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}'
5456 _LT_TAGVAR(ld_shlibs, $1)=no
5463 case $cc_basename in
5465 # FIXME: insert proper C++ library support
5466 _LT_TAGVAR(ld_shlibs, $1)=no
5469 # Green Hills C++ Compiler
5470 # FIXME: insert proper C++ library support
5471 _LT_TAGVAR(ld_shlibs, $1)=no
5474 # FIXME: insert proper C++ library support
5475 _LT_TAGVAR(ld_shlibs, $1)=no
5481 # C++ shared libraries reported to be fairly broken before
5483 _LT_TAGVAR(ld_shlibs, $1)=no
5487 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5490 freebsd* | kfreebsd*-gnu | dragonfly*)
5491 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5493 _LT_TAGVAR(ld_shlibs, $1)=yes
5500 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5501 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5502 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5503 _LT_TAGVAR(hardcode_direct, $1)=yes
5504 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5505 # but as the default
5506 # location of the library.
5508 case $cc_basename in
5510 # FIXME: insert proper C++ library support
5511 _LT_TAGVAR(ld_shlibs, $1)=no
5514 _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'
5515 # Commands to make compiler produce verbose output that lists
5516 # what "hidden" libraries, object files and flags are used when
5517 # linking a shared library.
5519 # There doesn't appear to be a way to prevent this compiler from
5520 # explicitly linking system object files so we need to strip them
5521 # from the output so that they don't get included in the library
5523 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'
5526 if test "$GXX" = yes; then
5527 _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'
5529 # FIXME: insert proper C++ library support
5530 _LT_TAGVAR(ld_shlibs, $1)=no
5537 if test $with_gnu_ld = no; then
5538 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5539 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5545 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5551 _LT_TAGVAR(hardcode_direct, $1)=no
5552 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5555 _LT_TAGVAR(hardcode_direct, $1)=yes
5556 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5557 # but as the default
5558 # location of the library.
5562 case $cc_basename in
5564 # FIXME: insert proper C++ library support
5565 _LT_TAGVAR(ld_shlibs, $1)=no
5570 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5573 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5576 _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'
5579 # Commands to make compiler produce verbose output that lists
5580 # what "hidden" libraries, object files and flags are used when
5581 # linking a shared library.
5583 # There doesn't appear to be a way to prevent this compiler from
5584 # explicitly linking system object files so we need to strip them
5585 # from the output so that they don't get included in the library
5587 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'
5590 if test "$GXX" = yes; then
5591 if test $with_gnu_ld = no; then
5594 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5597 _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'
5600 _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'
5605 # FIXME: insert proper C++ library support
5606 _LT_TAGVAR(ld_shlibs, $1)=no
5613 _LT_TAGVAR(hardcode_direct, $1)=no
5614 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5615 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5616 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5617 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5618 # Instead, shared libraries are loaded at an image base (0x10000000 by
5619 # default) and relocated if they conflict, which is a slow very memory
5620 # consuming and fragmenting process. To avoid this, we pick a random,
5621 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5622 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5623 _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'
5624 _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'
5627 case $cc_basename in
5630 _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'
5632 # Archives containing C++ object files must be created using
5633 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
5634 # necessary to make sure instantiated templates are included
5636 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5639 if test "$GXX" = yes; then
5640 if test "$with_gnu_ld" = no; then
5641 _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'
5643 _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'
5646 _LT_TAGVAR(link_all_deplibs, $1)=yes
5649 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5650 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5651 _LT_TAGVAR(inherit_rpath, $1)=yes
5655 case $cc_basename in
5657 # Kuck and Associates, Inc. (KAI) C++ Compiler
5659 # KCC will only create a shared library if the output file
5660 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5661 # to its proper name (with version) after linking.
5662 _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'
5663 _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'
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 $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'
5674 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5675 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5677 # Archives containing C++ object files must be created using
5678 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5679 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5684 # version 8.0 and above of icpc choke on multiply defined symbols
5685 # if we add $predep_objects and $postdep_objects, however 7.1 and
5686 # earlier do not add the objects themselves.
5687 case `$CC -V 2>&1` in
5689 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5690 _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'
5692 *) # Version 8.0 or newer
5695 ia64*) tmp_idyn=' -i_dynamic';;
5697 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5698 _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'
5701 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5702 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5703 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5704 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5707 # Portland Group C++ compiler
5710 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5712 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5713 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5714 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5716 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5717 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5719 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5721 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5722 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5723 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5725 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5726 $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'
5728 *) # Version 6 will use weak symbols
5729 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5730 _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'
5734 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5735 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5736 _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'
5740 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5741 _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'
5743 runpath_var=LD_RUN_PATH
5744 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5745 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5747 # Commands to make compiler produce verbose output that lists
5748 # what "hidden" libraries, object files and flags are used when
5749 # linking a shared library.
5751 # There doesn't appear to be a way to prevent this compiler from
5752 # explicitly linking system object files so we need to strip them
5753 # from the output so that they don't get included in the library
5755 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'
5761 # FIXME: insert proper C++ library support
5762 _LT_TAGVAR(ld_shlibs, $1)=no
5766 # FIXME: insert proper C++ library support
5767 _LT_TAGVAR(ld_shlibs, $1)=no
5771 case $cc_basename in
5773 # FIXME: insert proper C++ library support
5774 _LT_TAGVAR(ld_shlibs, $1)=no
5777 # FIXME: insert proper C++ library support
5778 _LT_TAGVAR(ld_shlibs, $1)=no
5784 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5785 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
5787 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5788 _LT_TAGVAR(hardcode_direct, $1)=yes
5789 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5791 # Workaround some broken pre-1.5 toolchains
5792 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
5796 _LT_TAGVAR(ld_shlibs, $1)=yes
5800 # C++ shared libraries are fairly broken
5801 _LT_TAGVAR(ld_shlibs, $1)=no
5805 _LT_TAGVAR(hardcode_direct, $1)=yes
5806 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5807 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5808 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5809 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5810 _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'
5811 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5812 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5814 output_verbose_link_cmd=echo
5817 osf3* | osf4* | osf5*)
5818 case $cc_basename in
5820 # Kuck and Associates, Inc. (KAI) C++ Compiler
5822 # KCC will only create a shared library if the output file
5823 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5824 # to its proper name (with version) after linking.
5825 _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'
5827 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5828 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5830 # Archives containing C++ object files must be created using
5831 # the KAI C++ compiler.
5833 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
5834 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
5838 # Rational C++ 2.4.1
5839 # FIXME: insert proper C++ library support
5840 _LT_TAGVAR(ld_shlibs, $1)=no
5845 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5846 _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'
5847 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5850 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5851 _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'
5852 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5853 echo "-hidden">> $lib.exp~
5854 $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~
5856 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5860 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5862 # Commands to make compiler produce verbose output that lists
5863 # what "hidden" libraries, object files and flags are used when
5864 # linking a shared library.
5866 # There doesn't appear to be a way to prevent this compiler from
5867 # explicitly linking system object files so we need to strip them
5868 # from the output so that they don't get included in the library
5870 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'
5873 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5874 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5877 _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'
5880 _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'
5884 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5885 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5887 # Commands to make compiler produce verbose output that lists
5888 # what "hidden" libraries, object files and flags are used when
5889 # linking a shared library.
5890 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5893 # FIXME: insert proper C++ library support
5894 _LT_TAGVAR(ld_shlibs, $1)=no
5901 # FIXME: insert proper C++ library support
5902 _LT_TAGVAR(ld_shlibs, $1)=no
5906 case $cc_basename in
5909 # FIXME: insert proper C++ library support
5910 _LT_TAGVAR(ld_shlibs, $1)=no
5914 # FIXME: insert proper C++ library support
5915 _LT_TAGVAR(ld_shlibs, $1)=no
5918 # FIXME: insert proper C++ library support
5919 _LT_TAGVAR(ld_shlibs, $1)=no
5925 case $cc_basename in
5927 # Sun C++ 4.2, 5.x and Centerline C++
5928 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
5929 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5930 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5931 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5932 $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'
5934 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5935 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5937 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5939 # The C++ compiler is used as linker so we must use $wl
5940 # flag to pass the commands to the underlying system
5941 # linker. We must also pass each convenience library through
5942 # to the system linker between allextract/defaultextract.
5943 # The C++ compiler will combine linker options so we
5944 # cannot just pass the convenience library names through
5946 # Supported since Solaris 2.6 (maybe 2.5.1?)
5947 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
5950 _LT_TAGVAR(link_all_deplibs, $1)=yes
5952 output_verbose_link_cmd='echo'
5954 # Archives containing C++ object files must be created using
5955 # "CC -xar", where "CC" is the Sun C++ compiler. This is
5956 # necessary to make sure instantiated templates are included
5958 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5961 # Green Hills C++ Compiler
5962 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5964 # The C++ compiler must be used to create the archive.
5965 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
5968 # GNU C++ compiler with Solaris linker
5969 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5970 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
5971 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
5972 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5973 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5974 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
5976 # Commands to make compiler produce verbose output that lists
5977 # what "hidden" libraries, object files and flags are used when
5978 # linking a shared library.
5979 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5981 # g++ 2.7 appears to require `-G' NOT `-shared' on this
5983 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5984 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5985 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
5987 # Commands to make compiler produce verbose output that lists
5988 # what "hidden" libraries, object files and flags are used when
5989 # linking a shared library.
5990 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5993 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
5999 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6000 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6001 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6002 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6003 runpath_var='LD_RUN_PATH'
6005 case $cc_basename in
6007 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6008 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6011 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6012 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6017 sysv5* | sco3.2v5* | sco5v6*)
6018 # Note: We can NOT use -z defs as we might desire, because we do not
6019 # link with -lc, and that would cause any symbols used from libc to
6020 # always be unresolved, which means just about no library would
6021 # ever link correctly. If we're not using GNU ld we use -z text
6022 # though, which does catch some bad symbols but isn't as heavy-handed
6024 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6025 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6026 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6027 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6028 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6029 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6030 _LT_TAGVAR(link_all_deplibs, $1)=yes
6031 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6032 runpath_var='LD_RUN_PATH'
6034 case $cc_basename in
6036 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6037 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6040 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6041 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6047 case $cc_basename in
6049 # NonStop-UX NCC 3.20
6050 # FIXME: insert proper C++ library support
6051 _LT_TAGVAR(ld_shlibs, $1)=no
6054 # FIXME: insert proper C++ library support
6055 _LT_TAGVAR(ld_shlibs, $1)=no
6061 # FIXME: insert proper C++ library support
6062 _LT_TAGVAR(ld_shlibs, $1)=no
6066 # FIXME: insert proper C++ library support
6067 _LT_TAGVAR(ld_shlibs, $1)=no
6071 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6072 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6074 _LT_TAGVAR(GCC, $1)="$GXX"
6075 _LT_TAGVAR(LD, $1)="$LD"
6078 ## There is no encapsulation within the following macros, do not change
6079 ## the running order or otherwise move them around unless you know exactly
6080 ## what you are doing...
6081 _LT_SYS_HIDDEN_LIBDEPS($1)
6082 _LT_COMPILER_PIC($1)
6083 _LT_COMPILER_C_O($1)
6084 _LT_COMPILER_FILE_LOCKS($1)
6085 _LT_LINKER_SHLIBS($1)
6086 _LT_SYS_DYNAMIC_LINKER($1)
6087 _LT_LINKER_HARDCODE_LIBPATH($1)
6090 fi # test -n "$compiler"
6096 with_gnu_ld=$lt_save_with_gnu_ld
6097 lt_cv_path_LDCXX=$lt_cv_path_LD
6098 lt_cv_path_LD=$lt_save_path_LD
6099 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6100 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6101 fi # test "$_lt_caught_CXX_error" != yes
6104 ])# _LT_LANG_CXX_CONFIG
6107 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6108 # ---------------------------------
6109 # Figure out "hidden" library dependencies from verbose
6110 # compiler output when linking a shared library.
6111 # Parse the compiler output and extract the necessary
6112 # objects, libraries and library flags.
6113 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6114 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6115 # Dependencies to place before and after the object being linked:
6116 _LT_TAGVAR(predep_objects, $1)=
6117 _LT_TAGVAR(postdep_objects, $1)=
6118 _LT_TAGVAR(predeps, $1)=
6119 _LT_TAGVAR(postdeps, $1)=
6120 _LT_TAGVAR(compiler_lib_search_path, $1)=
6122 dnl we can't use the lt_simple_compile_test_code here,
6123 dnl because it contains code intended for an executable,
6124 dnl not a library. It's possible we should let each
6125 dnl tag define a new lt_????_link_test_code variable,
6126 dnl but it's only used here...
6127 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6129 void foo (void) { a = 0; }
6131 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6135 Foo (void) { a = 0; }
6140 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6148 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6156 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6159 public void bar (void) {
6165 dnl Parse the compiler output and extract the necessary
6166 dnl objects, libraries and library flags.
6167 if AC_TRY_EVAL(ac_compile); then
6168 # Parse the compiler output and extract the necessary
6169 # objects, libraries and library flags.
6171 # Sentinel used to keep track of whether or not we are before
6172 # the conftest object file.
6173 pre_test_object_deps_done=no
6175 # The `*' in the case matches for architectures that use `case' in
6176 # $output_verbose_cmd can trigger glob expansion during the loop
6177 # eval without this substitution.
6178 output_verbose_link_cmd=`$ECHO "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
6180 for p in `eval $output_verbose_link_cmd`; do
6184 # Some compilers place space between "-{L,R}" and the path.
6186 if test $p = "-L" ||
6187 test $p = "-R"; then
6194 if test "$pre_test_object_deps_done" = no; then
6197 # Internal compiler library paths should come after those
6198 # provided the user. The postdeps already come after the
6199 # user supplied libs so there is no need to process them.
6200 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6201 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6203 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6206 # The "-l" case would never come before the object being
6207 # linked, so don't bother handling this case.
6210 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6211 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6213 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6219 # This assumes that the test object file only shows up
6220 # once in the compiler output.
6221 if test "$p" = "conftest.$objext"; then
6222 pre_test_object_deps_done=yes
6226 if test "$pre_test_object_deps_done" = no; then
6227 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6228 _LT_TAGVAR(predep_objects, $1)="$p"
6230 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6233 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6234 _LT_TAGVAR(postdep_objects, $1)="$p"
6236 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6241 *) ;; # Ignore the rest.
6249 echo "libtool.m4: error: problem compiling $1 test program"
6252 $RM -f confest.$objext
6254 # PORTME: override above test on systems where it is broken
6258 # Interix 3.5 installs completely hosed .la files for C++, so rather than
6259 # hack all around it, let's just trust "g++" to DTRT.
6260 _LT_TAGVAR(predep_objects,$1)=
6261 _LT_TAGVAR(postdep_objects,$1)=
6262 _LT_TAGVAR(postdeps,$1)=
6266 case $cc_basename in
6268 # Adding this requires a known-good setup of shared libraries for
6269 # Sun compiler versions before 5.6, else PIC objects from an old
6270 # archive will be linked into the output, leading to subtle bugs.
6271 _LT_TAGVAR(postdeps,$1)='-lCstd -lCrun'
6278 case " $_LT_TAGVAR(postdeps, $1) " in
6279 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6281 _LT_TAGDECL([], [predep_objects], [1],
6282 [Dependencies to place before and after the objects being linked to
6283 create a shared library])
6284 _LT_TAGDECL([], [postdep_objects], [1])
6285 _LT_TAGDECL([], [predeps], [1])
6286 _LT_TAGDECL([], [postdeps], [1])
6287 _LT_TAGDECL([], [compiler_lib_search_path], [1],
6288 [The library search path used internally by the compiler when linking
6290 ])# _LT_SYS_HIDDEN_LIBDEPS
6295 # Since AC_PROG_F77 is broken, in that it returns the empty string
6296 # if there is no fortran compiler, we have our own version here.
6297 m4_defun([_LT_PROG_F77],
6299 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6301 if test -z "$F77" || test "X$F77" = "Xno"; then
6304 popdef([AC_MSG_ERROR])
6307 dnl aclocal-1.4 backwards compatibility:
6308 dnl AC_DEFUN([_LT_PROG_F77], [])
6311 # _LT_LANG_F77_CONFIG([TAG])
6312 # --------------------------
6313 # Ensure that the configuration variables for a Fortran 77 compiler are
6314 # suitably defined. These variables are subsequently used by _LT_CONFIG
6315 # to write the compiler configuration to `libtool'.
6316 m4_defun([_LT_LANG_F77_CONFIG],
6317 [AC_REQUIRE([_LT_PROG_F77])dnl
6318 AC_LANG_PUSH(Fortran 77)
6320 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6321 _LT_TAGVAR(allow_undefined_flag, $1)=
6322 _LT_TAGVAR(always_export_symbols, $1)=no
6323 _LT_TAGVAR(archive_expsym_cmds, $1)=
6324 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6325 _LT_TAGVAR(hardcode_direct, $1)=no
6326 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6327 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6328 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6329 _LT_TAGVAR(hardcode_minus_L, $1)=no
6330 _LT_TAGVAR(hardcode_automatic, $1)=no
6331 _LT_TAGVAR(inherit_rpath, $1)=no
6332 _LT_TAGVAR(module_cmds, $1)=
6333 _LT_TAGVAR(module_expsym_cmds, $1)=
6334 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6335 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6336 _LT_TAGVAR(no_undefined_flag, $1)=
6337 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6338 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6340 # Source file extension for f77 test sources.
6343 # Object file extension for compiled f77 test sources.
6345 _LT_TAGVAR(objext, $1)=$objext
6347 # No sense in running all these tests if we already determined that
6348 # the F77 compiler isn't working. Some variables (like enable_shared)
6349 # are currently assumed to apply to all compilers on this platform,
6350 # and will be corrupted by setting them based on a non-working compiler.
6351 if test "$_lt_disable_F77" != yes; then
6352 # Code to be used in simple compile tests
6353 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
6355 # Code to be used in simple link tests
6356 lt_simple_link_test_code=" program t\n end\n"
6358 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6361 # save warnings/boilerplate of simple test code
6362 _LT_COMPILER_BOILERPLATE
6363 _LT_LINKER_BOILERPLATE
6365 # Allow CC to be a program name with arguments.
6369 _LT_TAGVAR(compiler, $1)=$CC
6370 _LT_CC_BASENAME([$compiler])
6372 if test -n "$compiler"; then
6373 AC_MSG_CHECKING([if libtool supports shared libraries])
6374 AC_MSG_RESULT([$can_build_shared])
6376 AC_MSG_CHECKING([whether to build shared libraries])
6377 test "$can_build_shared" = "no" && enable_shared=no
6379 # On AIX, shared libraries and static libraries use the same namespace, and
6380 # are all built from PIC.
6383 test "$enable_shared" = yes && enable_static=no
6384 if test -n "$RANLIB"; then
6385 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6386 postinstall_cmds='$RANLIB $lib'
6390 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6391 test "$enable_shared" = yes && enable_static=no
6395 AC_MSG_RESULT([$enable_shared])
6397 AC_MSG_CHECKING([whether to build static libraries])
6398 # Make sure either enable_shared or enable_static is yes.
6399 test "$enable_shared" = yes || enable_static=yes
6400 AC_MSG_RESULT([$enable_static])
6402 _LT_TAGVAR(GCC, $1)="$G77"
6403 _LT_TAGVAR(LD, $1)="$LD"
6406 ## There is no encapsulation within the following macros, do not change
6407 ## the running order or otherwise move them around unless you know exactly
6408 ## what you are doing...
6409 _LT_COMPILER_PIC($1)
6410 _LT_COMPILER_C_O($1)
6411 _LT_COMPILER_FILE_LOCKS($1)
6412 _LT_LINKER_SHLIBS($1)
6413 _LT_SYS_DYNAMIC_LINKER($1)
6414 _LT_LINKER_HARDCODE_LIBPATH($1)
6417 fi # test -n "$compiler"
6420 fi # test "$_lt_disable_F77" != yes
6423 ])# _LT_LANG_F77_CONFIG
6428 # Since AC_PROG_FC is broken, in that it returns the empty string
6429 # if there is no fortran compiler, we have our own version here.
6430 m4_defun([_LT_PROG_FC],
6432 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6434 if test -z "$FC" || test "X$FC" = "Xno"; then
6437 popdef([AC_MSG_ERROR])
6440 dnl aclocal-1.4 backwards compatibility:
6441 dnl AC_DEFUN([_LT_PROG_FC], [])
6444 # _LT_LANG_FC_CONFIG([TAG])
6445 # -------------------------
6446 # Ensure that the configuration variables for a Fortran compiler are
6447 # suitably defined. These variables are subsequently used by _LT_CONFIG
6448 # to write the compiler configuration to `libtool'.
6449 m4_defun([_LT_LANG_FC_CONFIG],
6450 [AC_REQUIRE([_LT_PROG_FC])dnl
6451 AC_LANG_PUSH(Fortran)
6453 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6454 _LT_TAGVAR(allow_undefined_flag, $1)=
6455 _LT_TAGVAR(always_export_symbols, $1)=no
6456 _LT_TAGVAR(archive_expsym_cmds, $1)=
6457 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6458 _LT_TAGVAR(hardcode_direct, $1)=no
6459 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6460 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6461 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6462 _LT_TAGVAR(hardcode_minus_L, $1)=no
6463 _LT_TAGVAR(hardcode_automatic, $1)=no
6464 _LT_TAGVAR(inherit_rpath, $1)=no
6465 _LT_TAGVAR(module_cmds, $1)=
6466 _LT_TAGVAR(module_expsym_cmds, $1)=
6467 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6468 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6469 _LT_TAGVAR(no_undefined_flag, $1)=
6470 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6471 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6473 # Source file extension for fc test sources.
6474 ac_ext=${ac_fc_srcext-f}
6476 # Object file extension for compiled fc test sources.
6478 _LT_TAGVAR(objext, $1)=$objext
6480 # No sense in running all these tests if we already determined that
6481 # the FC compiler isn't working. Some variables (like enable_shared)
6482 # are currently assumed to apply to all compilers on this platform,
6483 # and will be corrupted by setting them based on a non-working compiler.
6484 if test "$_lt_disable_FC" != yes; then
6485 # Code to be used in simple compile tests
6486 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
6488 # Code to be used in simple link tests
6489 lt_simple_link_test_code=" program t\n end\n"
6491 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6494 # save warnings/boilerplate of simple test code
6495 _LT_COMPILER_BOILERPLATE
6496 _LT_LINKER_BOILERPLATE
6498 # Allow CC to be a program name with arguments.
6502 _LT_TAGVAR(compiler, $1)=$CC
6503 _LT_CC_BASENAME([$compiler])
6505 if test -n "$compiler"; then
6506 AC_MSG_CHECKING([if libtool supports shared libraries])
6507 AC_MSG_RESULT([$can_build_shared])
6509 AC_MSG_CHECKING([whether to build shared libraries])
6510 test "$can_build_shared" = "no" && enable_shared=no
6512 # On AIX, shared libraries and static libraries use the same namespace, and
6513 # are all built from PIC.
6516 test "$enable_shared" = yes && enable_static=no
6517 if test -n "$RANLIB"; then
6518 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6519 postinstall_cmds='$RANLIB $lib'
6523 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6524 test "$enable_shared" = yes && enable_static=no
6528 AC_MSG_RESULT([$enable_shared])
6530 AC_MSG_CHECKING([whether to build static libraries])
6531 # Make sure either enable_shared or enable_static is yes.
6532 test "$enable_shared" = yes || enable_static=yes
6533 AC_MSG_RESULT([$enable_static])
6535 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6536 _LT_TAGVAR(LD, $1)="$LD"
6539 ## There is no encapsulation within the following macros, do not change
6540 ## the running order or otherwise move them around unless you know exactly
6541 ## what you are doing...
6542 _LT_SYS_HIDDEN_LIBDEPS($1)
6543 _LT_COMPILER_PIC($1)
6544 _LT_COMPILER_C_O($1)
6545 _LT_COMPILER_FILE_LOCKS($1)
6546 _LT_LINKER_SHLIBS($1)
6547 _LT_SYS_DYNAMIC_LINKER($1)
6548 _LT_LINKER_HARDCODE_LIBPATH($1)
6551 fi # test -n "$compiler"
6554 fi # test "$_lt_disable_FC" != yes
6557 ])# _LT_LANG_FC_CONFIG
6560 # _LT_LANG_GCJ_CONFIG([TAG])
6561 # --------------------------
6562 # Ensure that the configuration variables for the GNU Java Compiler compiler
6563 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6564 # to write the compiler configuration to `libtool'.
6565 m4_defun([_LT_LANG_GCJ_CONFIG],
6566 [AC_REQUIRE([LT_PROG_GCJ])dnl
6569 # Source file extension for Java test sources.
6572 # Object file extension for compiled Java test sources.
6574 _LT_TAGVAR(objext, $1)=$objext
6576 # Code to be used in simple compile tests
6577 lt_simple_compile_test_code="class foo {}\n"
6579 # Code to be used in simple link tests
6580 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
6582 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6585 # save warnings/boilerplate of simple test code
6586 _LT_COMPILER_BOILERPLATE
6587 _LT_LINKER_BOILERPLATE
6589 # Allow CC to be a program name with arguments.
6593 _LT_TAGVAR(compiler, $1)=$CC
6594 _LT_CC_BASENAME([$compiler])
6596 # GCJ did not exist at the time GCC didn't implicitly link libc in.
6597 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6599 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6602 ## There is no encapsulation within the following macros, do not change
6603 ## the running order or otherwise move them around unless you know exactly
6604 ## what you are doing...
6605 if test -n "$compiler"; then
6606 _LT_COMPILER_NO_RTTI($1)
6607 _LT_COMPILER_PIC($1)
6608 _LT_COMPILER_C_O($1)
6609 _LT_COMPILER_FILE_LOCKS($1)
6610 _LT_LINKER_SHLIBS($1)
6611 _LT_SYS_DYNAMIC_LINKER($1)
6612 _LT_LINKER_HARDCODE_LIBPATH($1)
6619 ])# _LT_LANG_GCJ_CONFIG
6622 # _LT_LANG_RC_CONFIG([TAG])
6623 # -------------------------
6624 # Ensure that the configuration variables for the Windows resource compiler
6625 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6626 # to write the compiler configuration to `libtool'.
6627 m4_defun([_LT_LANG_RC_CONFIG],
6628 [AC_REQUIRE([LT_PROG_RC])dnl
6631 # Source file extension for RC test sources.
6634 # Object file extension for compiled RC test sources.
6636 _LT_TAGVAR(objext, $1)=$objext
6638 # Code to be used in simple compile tests
6639 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
6641 # Code to be used in simple link tests
6642 lt_simple_link_test_code="$lt_simple_compile_test_code"
6644 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6647 # save warnings/boilerplate of simple test code
6648 _LT_COMPILER_BOILERPLATE
6649 _LT_LINKER_BOILERPLATE
6651 # Allow CC to be a program name with arguments.
6655 _LT_TAGVAR(compiler, $1)=$CC
6656 _LT_CC_BASENAME([$compiler])
6657 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6659 if test -n "$compiler"; then
6666 ])# _LT_LANG_RC_CONFIG
6671 AC_DEFUN([LT_PROG_GCJ],
6672 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6673 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6674 [AC_CHECK_TOOL(GCJ, gcj,)
6675 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6676 AC_SUBST(GCJFLAGS)])])dnl
6680 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
6681 dnl aclocal-1.4 backwards compatibility:
6682 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
6687 AC_DEFUN([LT_PROG_RC],
6688 [AC_CHECK_TOOL(RC, windres,)
6692 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
6693 dnl aclocal-1.4 backwards compatibility:
6694 dnl AC_DEFUN([LT_AC_PROG_RC], [])
6699 # If we don't have a new enough Autoconf to choose the best grep
6700 # available, choose the one first in the user's PATH.
6701 m4_defun([_LT_DECL_EGREP],
6702 [AC_REQUIRE([AC_PROG_EGREP])dnl
6703 AC_REQUIRE([AC_PROG_FGREP])dnl
6704 test -z "$GREP" && GREP=grep
6705 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
6706 _LT_DECL([], [EGREP], [1], [An ERE matcher])
6707 _LT_DECL([], [FGREP], [1], [A literal string matcher])
6708 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
6715 # Check for a fully-functional sed program, that truncates
6716 # as few characters as possible. Prefer GNU sed if found.
6717 m4_defun([_LT_DECL_SED],
6719 test -z "$SED" && SED=sed
6720 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
6721 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
6722 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
6725 m4_ifndef([AC_PROG_SED], [
6726 ############################################################
6727 # NOTE: This macro has been submitted for inclusion into #
6728 # GNU Autoconf as AC_PROG_SED. When it is available in #
6729 # a released version of Autoconf we should remove this #
6730 # macro and use it instead. #
6731 ############################################################
6733 AC_DEFUN([AC_PROG_SED],
6734 [AC_MSG_CHECKING([for a sed that does not truncate output])
6735 AC_CACHE_VAL(lt_cv_path_SED,
6736 [# Loop through the user's path and test for sed and gsed.
6737 # Then use that list of sed's as ones to test for truncation.
6738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6742 test -z "$as_dir" && as_dir=.
6743 for lt_ac_prog in sed gsed; do
6744 for ac_exec_ext in '' $ac_executable_extensions; do
6745 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6746 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6753 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6754 # along with /bin/sed that truncates output.
6755 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6756 test ! -f $lt_ac_sed && continue
6757 cat /dev/null > conftest.in
6759 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6760 # Check for GNU sed and select it if it is found.
6761 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6762 lt_cv_path_SED=$lt_ac_sed
6766 cat conftest.in conftest.in >conftest.tmp
6767 mv conftest.tmp conftest.in
6768 cp conftest.in conftest.nl
6770 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6771 cmp -s conftest.out conftest.nl || break
6772 # 10000 chars as input seems more than enough
6773 test $lt_ac_count -gt 10 && break
6774 lt_ac_count=`expr $lt_ac_count + 1`
6775 if test $lt_ac_count -gt $lt_ac_max; then
6776 lt_ac_max=$lt_ac_count
6777 lt_cv_path_SED=$lt_ac_sed
6784 AC_MSG_RESULT([$SED])
6789 # _LT_CHECK_XSI_SHELL
6790 # -------------------
6791 # define func_basename as either Bourne or XSI compatible
6792 m4_defun([_LT_CHECK_XSI_SHELL],
6793 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
6794 # Try some XSI features
6797 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
6798 = c,a/b,, ) >/dev/null 2>&1 \
6800 AC_MSG_RESULT([$xsi_shell])
6801 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
6802 ])# _LT_CHECK_XSI_SHELL
6805 # _LT_PROG_XSI_SHELLFNS
6806 # ---------------------
6807 # Bourne and XSI compatible variants of some useful shell functions.
6808 m4_defun([_LT_PROG_XSI_SHELLFNS],
6811 cat << \_LT_EOF >> "$cfgfile"
6812 # func_dirname file append nondir_replacement
6813 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
6814 # otherwise set result to NONDIR_REPLACEMENT.
6818 */*) func_dirname_result="${1%/*}${2}" ;;
6819 * ) func_dirname_result="${3}" ;;
6823 # func_basename file
6826 func_basename_result="${1##*/}"
6829 # func_stripname prefix suffix name
6830 # strip PREFIX and SUFFIX off of NAME.
6831 # PREFIX and SUFFIX must not contain globbing or regex special
6832 # characters, hashes, percent signs, but SUFFIX may contain a leading
6833 # dot (in which case that matches only a dot).
6836 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
6837 # positional parameters, so assign one to ordinary parameter first.
6838 func_stripname_result=${3}
6839 func_stripname_result=${func_stripname_result#"${1}"}
6840 func_stripname_result=${func_stripname_result%"${2}"}
6844 *) # Bourne compatible functions.
6845 cat << \_LT_EOF >> "$cfgfile"
6846 # func_dirname file append nondir_replacement
6847 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
6848 # otherwise set result to NONDIR_REPLACEMENT.
6851 # Extract subdirectory from the argument.
6852 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
6853 if test "X$func_dirname_result" = "X${1}"; then
6854 func_dirname_result="${3}"
6856 func_dirname_result="$func_dirname_result${2}"
6860 # func_basename file
6863 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
6866 # func_stripname prefix suffix name
6867 # strip PREFIX and SUFFIX off of NAME.
6868 # PREFIX and SUFFIX must not contain globbing or regex special
6869 # characters, hashes, percent signs, but SUFFIX may contain a leading
6870 # dot (in which case that matches only a dot).
6871 # func_strip_suffix prefix name
6875 .*) func_stripname_result=`$ECHO "X${3}" \
6876 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
6877 *) func_stripname_result=`$ECHO "X${3}" \
6878 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;