1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
4 # 2006, 2007, 2008 Free Software Foundation, Inc.
5 # Written by Gordon Matzigkeit, 1996
7 # This file is free software; the Free Software Foundation gives
8 # unlimited permission to copy and/or distribute it, with or without
9 # modifications, as long as this notice is preserved.
11 m4_define([_LT_COPYING], [dnl
12 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
13 # 2006, 2007, 2008 Free Software Foundation, Inc.
14 # Written by Gordon Matzigkeit, 1996
16 # This file is part of GNU Libtool.
18 # GNU Libtool is free software; you can redistribute it and/or
19 # modify it under the terms of the GNU General Public License as
20 # published by the Free Software Foundation; either version 2 of
21 # the License, or (at your option) any later version.
23 # As a special exception to the GNU General Public License,
24 # if you distribute this file as part of a program or library that
25 # is built using GNU Libtool, you may include this file under the
26 # same distribution terms that you use for the rest of that program.
28 # GNU Libtool is distributed in the hope that it will be useful,
29 # but WITHOUT ANY WARRANTY; without even the implied warranty of
30 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 # GNU General Public License for more details.
33 # You should have received a copy of the GNU General Public License
34 # along with GNU Libtool; see the file COPYING. If not, a copy
35 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
36 # obtained by writing to the Free Software Foundation, Inc.,
37 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
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],
56 # Complain if the absolute build directory name contains unusual characters
57 m4_defun([_LT_CHECK_BUILDDIR],
60 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
68 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
69 AC_BEFORE([$0], [LT_LANG])dnl
70 AC_BEFORE([$0], [LT_OUTPUT])dnl
71 AC_BEFORE([$0], [LTDL_INIT])dnl
72 m4_require([_LT_CHECK_BUILDDIR])dnl
74 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
75 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
76 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
77 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
78 dnl unless we require an AC_DEFUNed macro:
79 AC_REQUIRE([LTOPTIONS_VERSION])dnl
80 AC_REQUIRE([LTSUGAR_VERSION])dnl
81 AC_REQUIRE([LTVERSION_VERSION])dnl
82 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
83 m4_require([_LT_PROG_LTMAIN])dnl
86 _LT_SET_OPTIONS([$0], [$1])
88 # This can be used to rebuild libtool when needed
89 LIBTOOL_DEPS="$ltmain"
91 # Always use our own libtool.
92 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
102 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
103 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
104 dnl aclocal-1.4 backwards compatibility:
105 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
106 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
109 # _LT_CC_BASENAME(CC)
110 # -------------------
111 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
112 m4_defun([_LT_CC_BASENAME],
113 [for cc_temp in $1""; do
115 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
116 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
121 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
125 # _LT_FILEUTILS_DEFAULTS
126 # ----------------------
127 # It is okay to use these file commands and assume they have been set
128 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
129 m4_defun([_LT_FILEUTILS_DEFAULTS],
133 ])# _LT_FILEUTILS_DEFAULTS
138 m4_defun([_LT_SETUP],
139 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
140 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
141 _LT_DECL([], [host_alias], [0], [The host system])dnl
142 _LT_DECL([], [host], [0])dnl
143 _LT_DECL([], [host_os], [0])dnl
145 _LT_DECL([], [build_alias], [0], [The build system])dnl
146 _LT_DECL([], [build], [0])dnl
147 _LT_DECL([], [build_os], [0])dnl
149 AC_REQUIRE([AC_PROG_CC])dnl
150 AC_REQUIRE([LT_PATH_LD])dnl
151 AC_REQUIRE([LT_PATH_NM])dnl
153 AC_REQUIRE([AC_PROG_LN_S])dnl
154 test -z "$LN_S" && LN_S="ln -s"
155 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
157 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
158 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
159 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
161 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
162 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
163 m4_require([_LT_CMD_RELOAD])dnl
164 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
165 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
166 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
168 _LT_CONFIG_LIBTOOL_INIT([
169 # See if we are running on zsh, and set the options which allow our
170 # commands through without removal of \ escapes INIT.
171 if test -n "\${ZSH_VERSION+set}" ; then
175 if test -n "${ZSH_VERSION+set}" ; then
181 m4_require([_LT_TAG_COMPILER])dnl
182 _LT_PROG_ECHO_BACKSLASH
186 # AIX sometimes has problems with the GCC collect2 program. For some
187 # reason, if we set the COLLECT_NAMES environment variable, the problems
188 # vanish in a puff of smoke.
189 if test "X${COLLECT_NAMES+set}" != Xset; then
196 # Sed substitution that helps us do robust quoting. It backslashifies
197 # metacharacters that are still active within double-quoted strings.
198 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
200 # Same as above, but do not quote variable references.
201 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
203 # Sed substitution to delay expansion of an escaped shell variable in a
204 # double_quote_subst'ed string.
205 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
207 # Sed substitution to delay expansion of an escaped single quote.
208 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
210 # Sed substitution to avoid accidental globbing in evaled expressions
211 no_glob_subst='s/\*/\\\*/g'
217 # All known linkers require a `.a' archive for static linking (except MSVC,
218 # which needs '.lib').
221 with_gnu_ld="$lt_cv_prog_gnu_ld"
226 # Set sane defaults for various variables
227 test -z "$CC" && CC=cc
228 test -z "$LTCC" && LTCC=$CC
229 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
230 test -z "$LD" && LD=ld
231 test -z "$ac_objext" && ac_objext=o
233 _LT_CC_BASENAME([$compiler])
235 # Only perform the check for file, if the check method requires it
236 test -z "$MAGIC_CMD" && MAGIC_CMD=file
237 case $deplibs_check_method in
239 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
245 # Use C for the default configuration in the libtool script
246 LT_SUPPORTED_TAG([CC])
248 _LT_LANG_DEFAULT_CONFIG
255 # Note that this code is called both from `configure', and `config.status'
256 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
257 # `config.status' has no value for ac_aux_dir unless we are using Automake,
258 # so we pass a copy along to make sure it has a sensible value anyway.
259 m4_defun([_LT_PROG_LTMAIN],
260 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
261 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
262 ltmain="$ac_aux_dir/ltmain.sh"
266 ## ------------------------------------- ##
267 ## Accumulate code for creating libtool. ##
268 ## ------------------------------------- ##
270 # So that we can recreate a full libtool script including additional
271 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
272 # in macros and then make a single call at the end using the `libtool'
276 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
277 # ----------------------------------------
278 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
279 m4_define([_LT_CONFIG_LIBTOOL_INIT],
281 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
286 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
289 # _LT_CONFIG_LIBTOOL([COMMANDS])
290 # ------------------------------
291 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
292 m4_define([_LT_CONFIG_LIBTOOL],
294 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
299 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
302 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
303 # -----------------------------------------------------
304 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
305 [_LT_CONFIG_LIBTOOL([$1])
306 _LT_CONFIG_LIBTOOL_INIT([$2])
310 # _LT_FORMAT_COMMENT([COMMENT])
311 # -----------------------------
312 # Add leading comment marks to the start of each line, and a trailing
313 # full-stop to the whole comment if one is not present already.
314 m4_define([_LT_FORMAT_COMMENT],
316 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
317 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
322 ## ------------------------ ##
323 ## FIXME: Eliminate VARNAME ##
324 ## ------------------------ ##
327 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
328 # -------------------------------------------------------------------
329 # CONFIGNAME is the name given to the value in the libtool script.
330 # VARNAME is the (base) name used in the configure script.
331 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
332 # VARNAME. Any other value will be used directly.
333 m4_define([_LT_DECL],
334 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
335 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
336 [m4_ifval([$1], [$1], [$2])])
337 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
339 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
340 lt_dict_add_subkey([lt_decl_dict], [$2],
341 [tagged?], [m4_ifval([$5], [yes], [no])])])
345 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
346 # --------------------------------------------------------
347 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
350 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
351 # ------------------------------------------------
352 m4_define([lt_decl_tag_varnames],
353 [_lt_decl_filter([tagged?], [yes], $@)])
356 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
357 # ---------------------------------------------------------
358 m4_define([_lt_decl_filter],
360 [0], [m4_fatal([$0: too few arguments: $#])],
361 [1], [m4_fatal([$0: too few arguments: $#: $1])],
362 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
363 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
364 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
368 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
369 # --------------------------------------------------
370 m4_define([lt_decl_quote_varnames],
371 [_lt_decl_filter([value], [1], $@)])
374 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
375 # ---------------------------------------------------
376 m4_define([lt_decl_dquote_varnames],
377 [_lt_decl_filter([value], [2], $@)])
380 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
381 # ---------------------------------------------------
382 m4_define([lt_decl_varnames_tagged],
383 [_$0(m4_quote(m4_default([$1], [[, ]])),
384 m4_quote(m4_if([$2], [],
385 m4_quote(lt_decl_tag_varnames),
386 m4_quote(m4_shift($@)))),
387 m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
388 m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
391 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
392 # ------------------------------------------------
393 m4_define([lt_decl_all_varnames],
394 [_$0(m4_quote(m4_default([$1], [[, ]])),
396 m4_quote(lt_decl_varnames),
397 m4_quote(m4_shift($@))))[]dnl
399 m4_define([_lt_decl_all_varnames],
400 [lt_join($@, lt_decl_varnames_tagged([$1],
401 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
405 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
406 # ------------------------------------
407 # Quote a variable value, and forward it to `config.status' so that its
408 # declaration there will have the same value as in `configure'. VARNAME
409 # must have a single quote delimited value for this to work.
410 m4_define([_LT_CONFIG_STATUS_DECLARE],
411 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
414 # _LT_CONFIG_STATUS_DECLARATIONS
415 # ------------------------------
416 # We delimit libtool config variables with single quotes, so when
417 # we write them to config.status, we have to be sure to quote all
418 # embedded single quotes properly. In configure, this macro expands
419 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
421 # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
422 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
423 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
424 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
429 # Output comment and list of tags supported by the script
430 m4_defun([_LT_LIBTOOL_TAGS],
431 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
432 available_tags="_LT_TAGS"dnl
436 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
437 # -----------------------------------
438 # Extract the dictionary values for VARNAME (optionally with TAG) and
439 # expand to a commented shell variable setting:
441 # # Some comment about what VAR is for.
442 # visible_name=$lt_internal_name
443 m4_define([_LT_LIBTOOL_DECLARE],
444 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
445 [description])))[]dnl
446 m4_pushdef([_libtool_name],
447 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
448 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
449 [0], [_libtool_name=[$]$1],
450 [1], [_libtool_name=$lt_[]$1],
451 [2], [_libtool_name=$lt_[]$1],
452 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
453 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
457 # _LT_LIBTOOL_CONFIG_VARS
458 # -----------------------
459 # Produce commented declarations of non-tagged libtool config variables
460 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
461 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
462 # section) are produced by _LT_LIBTOOL_TAG_VARS.
463 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
464 [m4_foreach([_lt_var],
465 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
466 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
469 # _LT_LIBTOOL_TAG_VARS(TAG)
470 # -------------------------
471 m4_define([_LT_LIBTOOL_TAG_VARS],
472 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
473 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
476 # _LT_TAGVAR(VARNAME, [TAGNAME])
477 # ------------------------------
478 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
481 # _LT_CONFIG_COMMANDS
482 # -------------------
483 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
484 # variables for single and double quote escaping we saved from calls
485 # to _LT_DECL, we can put quote escaped variables declarations
486 # into `config.status', and then the shell code to quote escape them in
487 # for loops in `config.status'. Finally, any additional code accumulated
488 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
489 m4_defun([_LT_CONFIG_COMMANDS],
490 [AC_PROVIDE_IFELSE([LT_OUTPUT],
491 dnl If the libtool generation code has been placed in $CONFIG_LT,
492 dnl instead of duplicating it all over again into config.status,
493 dnl then we will have config.status run $CONFIG_LT later, so it
494 dnl needs to know what name is stored there:
495 [AC_CONFIG_COMMANDS([libtool],
496 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
497 dnl If the libtool generation code is destined for config.status,
498 dnl expand the accumulated commands and init code now:
499 [AC_CONFIG_COMMANDS([libtool],
500 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
501 ])#_LT_CONFIG_COMMANDS
505 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
508 # The HP-UX ksh and POSIX shell print the target directory to stdout
510 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
512 sed_quote_subst='$sed_quote_subst'
513 double_quote_subst='$double_quote_subst'
514 delay_variable_subst='$delay_variable_subst'
515 _LT_CONFIG_STATUS_DECLARATIONS
518 compiler='$compiler_DEFAULT'
520 # Quote evaled strings.
521 for var in lt_decl_all_varnames([[ \
522 ]], lt_decl_quote_varnames); do
523 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
524 *[[\\\\\\\`\\"\\\$]]*)
525 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
528 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
533 # Double-quote double-evaled strings.
534 for var in lt_decl_all_varnames([[ \
535 ]], lt_decl_dquote_varnames); do
536 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
537 *[[\\\\\\\`\\"\\\$]]*)
538 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
541 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
546 # Fix-up fallback echo if it was mangled by the above quoting rules.
548 *'\\\[$]0 --fallback-echo"')dnl "
549 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
553 _LT_OUTPUT_LIBTOOL_INIT
559 # This macro allows early generation of the libtool script (before
560 # AC_OUTPUT is called), incase it is used in configure for compilation
562 AC_DEFUN([LT_OUTPUT],
563 [: ${CONFIG_LT=./config.lt}
564 AC_MSG_NOTICE([creating $CONFIG_LT])
565 cat >"$CONFIG_LT" <<_LTEOF
567 # Generated by $as_me.
568 # Run this file to recreate a libtool stub with the current configuration.
571 SHELL=\${CONFIG_SHELL-$SHELL}
574 cat >>"$CONFIG_LT" <<\_LTEOF
578 exec AS_MESSAGE_FD>&1
579 exec AS_MESSAGE_LOG_FD>>config.log
582 AS_BOX([Running $as_me.])
583 } >&AS_MESSAGE_LOG_FD
586 \`$as_me' creates a local libtool stub from the current configuration,
587 for use in further configure time tests before the real libtool is
590 Usage: $[0] [[OPTIONS]]
592 -h, --help print this help, then exit
593 -V, --version print version number, then exit
594 -q, --quiet do not print progress messages
595 -d, --debug don't remove temporary files
597 Report bugs to <bug-libtool@gnu.org>."
600 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
601 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
602 configured by $[0], generated by m4_PACKAGE_STRING.
604 Copyright (C) 2008 Free Software Foundation, Inc.
605 This config.lt script is free software; the Free Software Foundation
606 gives unlimited permision to copy, distribute and modify it."
611 --version | --v* | -V )
612 echo "$lt_cl_version"; exit 0 ;;
614 echo "$lt_cl_help"; exit 0 ;;
615 --debug | --d* | -d )
617 --quiet | --q* | --silent | --s* | -q )
620 -*) AC_MSG_ERROR([unrecognized option: $[1]
621 Try \`$[0] --help' for more information.]) ;;
623 *) AC_MSG_ERROR([unrecognized argument: $[1]
624 Try \`$[0] --help' for more information.]) ;;
629 if $lt_cl_silent; then
630 exec AS_MESSAGE_FD>/dev/null
634 cat >>"$CONFIG_LT" <<_LTEOF
635 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
638 cat >>"$CONFIG_LT" <<\_LTEOF
639 AC_MSG_NOTICE([creating $ofile])
640 _LT_OUTPUT_LIBTOOL_COMMANDS
643 chmod +x "$CONFIG_LT"
645 # configure is writing to config.log, but config.lt does its own redirection,
646 # appending to config.log, which fails on DOS, as config.log is still kept
647 # open by configure. Here we exec the FD to /dev/null, effectively closing
648 # config.log, so it can be properly (re)opened and appended to by config.lt.
649 if test "$no_create" != yes; then
651 test "$silent" = yes &&
652 lt_config_lt_args="$lt_config_lt_args --quiet"
653 exec AS_MESSAGE_LOG_FD>/dev/null
654 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
655 exec AS_MESSAGE_LOG_FD>>config.log
656 $lt_cl_success || AS_EXIT(1)
663 # If TAG is the built-in tag, create an initial libtool script with a
664 # default configuration from the untagged config vars. Otherwise add code
665 # to config.status for appending the configuration named by TAG from the
666 # matching tagged config vars.
667 m4_defun([_LT_CONFIG],
668 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
669 _LT_CONFIG_SAVE_COMMANDS([
670 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
671 m4_if(_LT_TAG, [C], [
672 # See if we are running on zsh, and set the options which allow our
673 # commands through without removal of \ escapes.
674 if test -n "${ZSH_VERSION+set}" ; then
679 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
682 cat <<_LT_EOF >> "$cfgfile"
685 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
686 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
687 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
688 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
693 # ### BEGIN LIBTOOL CONFIG
694 _LT_LIBTOOL_CONFIG_VARS
696 # ### END LIBTOOL CONFIG
702 cat <<\_LT_EOF >> "$cfgfile"
703 # AIX sometimes has problems with the GCC collect2 program. For some
704 # reason, if we set the COLLECT_NAMES environment variable, the problems
705 # vanish in a puff of smoke.
706 if test "X${COLLECT_NAMES+set}" != Xset; then
716 # We use sed instead of cat because bash on DJGPP gets confused if
717 # if finds mixed CR/LF and LF-only lines. Since sed operates in
718 # text mode, it properly converts lines to CR/LF. This bash problem
719 # is reportedly fixed, but why not run on old versions too?
720 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
721 || (rm -f "$cfgfile"; exit 1)
723 _LT_PROG_XSI_SHELLFNS
725 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
726 || (rm -f "$cfgfile"; exit 1)
728 mv -f "$cfgfile" "$ofile" ||
729 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
732 [cat <<_LT_EOF >> "$ofile"
734 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
735 dnl in a comment (ie after a #).
736 # ### BEGIN LIBTOOL TAG CONFIG: $1
737 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
738 # ### END LIBTOOL TAG CONFIG: $1
745 TIMESTAMP='$TIMESTAMP'
748 ])dnl /_LT_CONFIG_SAVE_COMMANDS
752 # LT_SUPPORTED_TAG(TAG)
753 # ---------------------
754 # Trace this macro to discover what tags are supported by the libtool
755 # --tag option, using:
756 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
757 AC_DEFUN([LT_SUPPORTED_TAG], [])
760 # C support is built-in for now
761 m4_define([_LT_LANG_C_enabled], [])
762 m4_define([_LT_TAGS], [])
767 # Enable libtool support for the given language if not already enabled.
769 [AC_BEFORE([$0], [LT_OUTPUT])dnl
772 [C++], [_LT_LANG(CXX)],
773 [Java], [_LT_LANG(GCJ)],
774 [Fortran 77], [_LT_LANG(F77)],
775 [Fortran], [_LT_LANG(FC)],
776 [Windows Resource], [_LT_LANG(RC)],
777 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
779 [m4_fatal([$0: unsupported language: "$1"])])])dnl
786 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
787 [LT_SUPPORTED_TAG([$1])dnl
788 m4_append([_LT_TAGS], [$1 ])dnl
789 m4_define([_LT_LANG_]$1[_enabled], [])dnl
790 _LT_LANG_$1_CONFIG($1)])dnl
794 # _LT_LANG_DEFAULT_CONFIG
795 # -----------------------
796 m4_defun([_LT_LANG_DEFAULT_CONFIG],
797 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
799 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
801 AC_PROVIDE_IFELSE([AC_PROG_F77],
803 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
805 AC_PROVIDE_IFELSE([AC_PROG_FC],
807 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
809 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
810 dnl pulling things in needlessly.
811 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
813 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
815 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
817 [m4_ifdef([AC_PROG_GCJ],
818 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
819 m4_ifdef([A][M_PROG_GCJ],
820 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
821 m4_ifdef([LT_PROG_GCJ],
822 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
824 AC_PROVIDE_IFELSE([LT_PROG_RC],
826 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
827 ])# _LT_LANG_DEFAULT_CONFIG
830 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
831 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
832 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
833 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
834 dnl aclocal-1.4 backwards compatibility:
835 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
836 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
837 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
838 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
843 m4_defun([_LT_TAG_COMPILER],
844 [AC_REQUIRE([AC_PROG_CC])dnl
846 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
847 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
848 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
849 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
851 # If no C compiler was specified, use CC.
854 # If no C compiler flags were specified, use CFLAGS.
855 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
857 # Allow CC to be a program name with arguments.
862 # _LT_COMPILER_BOILERPLATE
863 # ------------------------
864 # Check for compiler boilerplate output or warnings with
865 # the simple compiler test code.
866 m4_defun([_LT_COMPILER_BOILERPLATE],
867 [m4_require([_LT_DECL_SED])dnl
868 ac_outfile=conftest.$ac_objext
869 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
870 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
871 _lt_compiler_boilerplate=`cat conftest.err`
873 ])# _LT_COMPILER_BOILERPLATE
876 # _LT_LINKER_BOILERPLATE
877 # ----------------------
878 # Check for linker boilerplate output or warnings with
879 # the simple link test code.
880 m4_defun([_LT_LINKER_BOILERPLATE],
881 [m4_require([_LT_DECL_SED])dnl
882 ac_outfile=conftest.$ac_objext
883 echo "$lt_simple_link_test_code" >conftest.$ac_ext
884 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
885 _lt_linker_boilerplate=`cat conftest.err`
887 ])# _LT_LINKER_BOILERPLATE
889 # _LT_REQUIRED_DARWIN_CHECKS
890 # -------------------------
891 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
894 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
895 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
896 _LT_DECL([], [DSYMUTIL], [1],
897 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
898 _LT_DECL([], [NMEDIT], [1],
899 [Tool to change global to local symbols on Mac OS X])
901 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
902 [lt_cv_apple_cc_single_mod=no
903 if test -z "${LT_MULTI_MODULE}"; then
904 # By default we will add the -single_module flag. You can override
905 # by either setting the environment variable LT_MULTI_MODULE
906 # non-empty at configure time, or by adding -multi_module to the
908 rm -rf libconftest.dylib*
909 echo "int foo(void){return 1;}" > conftest.c
910 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
911 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
912 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
913 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
915 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
916 lt_cv_apple_cc_single_mod=yes
918 cat conftest.err >&AS_MESSAGE_LOG_FD
920 rm -rf libconftest.dylib*
923 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
924 [lt_cv_ld_exported_symbols_list],
925 [lt_cv_ld_exported_symbols_list=no
926 save_LDFLAGS=$LDFLAGS
927 echo "_main" > conftest.sym
928 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
929 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
930 [lt_cv_ld_exported_symbols_list=yes],
931 [lt_cv_ld_exported_symbols_list=no])
932 LDFLAGS="$save_LDFLAGS"
935 rhapsody* | darwin1.[[012]])
936 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
938 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
939 darwin*) # darwin 5.x on
940 # if running on 10.5 or later, the deployment target defaults
941 # to the OS version, if on x86, and 10.4, the deployment
942 # target defaults to 10.4. Don't you love it?
943 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
944 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
945 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
947 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
949 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
953 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
954 _lt_dar_single_mod='$single_module'
956 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
957 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
959 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
961 if test "$DSYMUTIL" != ":"; then
962 _lt_dsymutil='~$DSYMUTIL $lib || :'
971 # _LT_DARWIN_LINKER_FEATURES
972 # --------------------------
973 # Checks for linker and compiler features on darwin
974 m4_defun([_LT_DARWIN_LINKER_FEATURES],
976 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
977 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
978 _LT_TAGVAR(hardcode_direct, $1)=no
979 _LT_TAGVAR(hardcode_automatic, $1)=yes
980 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
981 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
982 _LT_TAGVAR(link_all_deplibs, $1)=yes
983 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
984 if test "$GCC" = "yes"; then
985 output_verbose_link_cmd=echo
986 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
987 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
988 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
989 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
991 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
992 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
993 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
997 _LT_TAGVAR(ld_shlibs, $1)=no
1001 # _LT_SYS_MODULE_PATH_AIX
1002 # -----------------------
1003 # Links a minimal program and checks the executable
1004 # for the system default hardcoded library path. In most cases,
1005 # this is /usr/lib:/lib, but when the MPI compilers are used
1006 # the location of the communication and MPI libs are included too.
1007 # If we don't find anything, use the default library path according
1008 # to the aix ld manual.
1009 m4_defun([_LT_SYS_MODULE_PATH_AIX],
1010 [m4_require([_LT_DECL_SED])dnl
1011 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1012 lt_aix_libpath_sed='
1013 /Import File Strings/,/^$/ {
1019 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1020 # Check for a 64-bit object if we didn't find anything.
1021 if test -z "$aix_libpath"; then
1022 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1024 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1025 ])# _LT_SYS_MODULE_PATH_AIX
1028 # _LT_SHELL_INIT(ARG)
1029 # -------------------
1030 m4_define([_LT_SHELL_INIT],
1031 [ifdef([AC_DIVERSION_NOTICE],
1032 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1033 [AC_DIVERT_PUSH(NOTICE)])
1039 # _LT_PROG_ECHO_BACKSLASH
1040 # -----------------------
1041 # Add some code to the start of the generated configure script which
1042 # will find an echo command which doesn't interpret backslashes.
1043 m4_defun([_LT_PROG_ECHO_BACKSLASH],
1045 # Check that we are running under the correct shell.
1046 SHELL=${CONFIG_SHELL-/bin/sh}
1050 # Remove one level of quotation (which was required for Make).
1051 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1055 ECHO=${lt_ECHO-echo}
1056 if test "X[$]1" = X--no-reexec; then
1057 # Discard the --no-reexec flag, and continue.
1059 elif test "X[$]1" = X--fallback-echo; then
1060 # Avoid inline document here, it may be left over
1062 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
1063 # Yippee, $ECHO works!
1066 # Restart under the correct shell.
1067 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1070 if test "X[$]1" = X--fallback-echo; then
1071 # used as fallback echo
1079 # The HP-UX ksh and POSIX shell print the target directory to stdout
1081 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1083 if test -z "$lt_ECHO"; then
1084 if test "X${echo_test_string+set}" != Xset; then
1085 # find a string as large as possible, as long as the shell can cope with it
1086 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1087 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1088 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
1089 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
1096 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1097 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1098 test "X$echo_testing_string" = "X$echo_test_string"; then
1101 # The Solaris, AIX, and Digital Unix default echo programs unquote
1102 # backslashes. This makes it impossible to quote backslashes using
1103 # echo "$something" | sed 's/\\/\\\\/g'
1105 # So, first we look for a working echo in the user's PATH.
1107 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1108 for dir in $PATH /usr/ucb; do
1110 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1111 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1112 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1113 test "X$echo_testing_string" = "X$echo_test_string"; then
1120 if test "X$ECHO" = Xecho; then
1121 # We didn't find a better echo, so look for alternatives.
1122 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
1123 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
1124 test "X$echo_testing_string" = "X$echo_test_string"; then
1125 # This shell has a builtin print -r that does the trick.
1127 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1128 test "X$CONFIG_SHELL" != X/bin/ksh; then
1129 # If we have ksh, try running configure again with it.
1130 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1131 export ORIGINAL_CONFIG_SHELL
1132 CONFIG_SHELL=/bin/ksh
1134 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1138 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1139 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1140 test "X$echo_testing_string" = "X$echo_test_string"; then
1141 # Cool, printf works
1143 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1144 test "X$echo_testing_string" = 'X\t' &&
1145 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1146 test "X$echo_testing_string" = "X$echo_test_string"; then
1147 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1149 SHELL="$CONFIG_SHELL"
1151 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1152 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1153 test "X$echo_testing_string" = 'X\t' &&
1154 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1155 test "X$echo_testing_string" = "X$echo_test_string"; then
1156 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1158 # maybe with a smaller string...
1161 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1162 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1169 if test "$prev" != 'sed 50q "[$]0"'; then
1170 echo_test_string=`eval $prev`
1171 export echo_test_string
1172 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1174 # Oops. We lost completely, so just stick with echo.
1183 # Copy echo and quote the copy suitably for passing to libtool from
1184 # the Makefile, instead of quoting the original, which is used later.
1186 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1187 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1192 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1193 _LT_DECL([], [ECHO], [1],
1194 [An echo program that does not interpret backslashes])
1195 ])# _LT_PROG_ECHO_BACKSLASH
1200 m4_defun([_LT_ENABLE_LOCK],
1201 [AC_ARG_ENABLE([libtool-lock],
1202 [AS_HELP_STRING([--disable-libtool-lock],
1203 [avoid locking (might break parallel builds)])])
1204 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1206 # Some flags need to be propagated to the compiler or linker for good
1210 # Find out which ABI we are using.
1211 echo 'int i;' > conftest.$ac_ext
1212 if AC_TRY_EVAL(ac_compile); then
1213 case `/usr/bin/file conftest.$ac_objext` in
1225 # Find out which ABI we are using.
1226 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1227 if AC_TRY_EVAL(ac_compile); then
1228 if test "$lt_cv_prog_gnu_ld" = yes; then
1229 case `/usr/bin/file conftest.$ac_objext` in
1231 LD="${LD-ld} -melf32bsmip"
1234 LD="${LD-ld} -melf32bmipn32"
1237 LD="${LD-ld} -melf64bmip"
1241 case `/usr/bin/file conftest.$ac_objext` in
1257 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1258 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1259 # Find out which ABI we are using.
1260 echo 'int i;' > conftest.$ac_ext
1261 if AC_TRY_EVAL(ac_compile); then
1262 case `/usr/bin/file conftest.o` in
1265 x86_64-*kfreebsd*-gnu)
1266 LD="${LD-ld} -m elf_i386_fbsd"
1269 LD="${LD-ld} -m elf_i386"
1271 ppc64-*linux*|powerpc64-*linux*)
1272 LD="${LD-ld} -m elf32ppclinux"
1275 LD="${LD-ld} -m elf_s390"
1278 LD="${LD-ld} -m elf32_sparc"
1284 x86_64-*kfreebsd*-gnu)
1285 LD="${LD-ld} -m elf_x86_64_fbsd"
1288 LD="${LD-ld} -m elf_x86_64"
1290 ppc*-*linux*|powerpc*-*linux*)
1291 LD="${LD-ld} -m elf64ppc"
1293 s390*-*linux*|s390*-*tpf*)
1294 LD="${LD-ld} -m elf64_s390"
1297 LD="${LD-ld} -m elf64_sparc"
1307 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1308 SAVE_CFLAGS="$CFLAGS"
1309 CFLAGS="$CFLAGS -belf"
1310 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1312 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1314 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1315 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1316 CFLAGS="$SAVE_CFLAGS"
1320 # Find out which ABI we are using.
1321 echo 'int i;' > conftest.$ac_ext
1322 if AC_TRY_EVAL(ac_compile); then
1323 case `/usr/bin/file conftest.o` in
1325 case $lt_cv_prog_gnu_ld in
1326 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1328 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1340 need_locks="$enable_libtool_lock"
1344 # _LT_CMD_OLD_ARCHIVE
1345 # -------------------
1346 m4_defun([_LT_CMD_OLD_ARCHIVE],
1347 [AC_CHECK_TOOL(AR, ar, false)
1348 test -z "$AR" && AR=ar
1349 test -z "$AR_FLAGS" && AR_FLAGS=cru
1350 _LT_DECL([], [AR], [1], [The archiver])
1351 _LT_DECL([], [AR_FLAGS], [1])
1353 AC_CHECK_TOOL(STRIP, strip, :)
1354 test -z "$STRIP" && STRIP=:
1355 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1357 AC_CHECK_TOOL(RANLIB, ranlib, :)
1358 test -z "$RANLIB" && RANLIB=:
1359 _LT_DECL([], [RANLIB], [1],
1360 [Commands used to install an old-style archive])
1362 # Determine commands to create old-style static archives.
1363 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1364 old_postinstall_cmds='chmod 644 $oldlib'
1365 old_postuninstall_cmds=
1367 if test -n "$RANLIB"; then
1370 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1373 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1376 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1378 _LT_DECL([], [old_postinstall_cmds], [2])
1379 _LT_DECL([], [old_postuninstall_cmds], [2])
1380 _LT_TAGDECL([], [old_archive_cmds], [2],
1381 [Commands used to build an old-style archive])
1382 ])# _LT_CMD_OLD_ARCHIVE
1385 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1386 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1387 # ----------------------------------------------------------------
1388 # Check whether the given compiler option works
1389 AC_DEFUN([_LT_COMPILER_OPTION],
1390 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1391 m4_require([_LT_DECL_SED])dnl
1392 AC_CACHE_CHECK([$1], [$2],
1394 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1395 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1396 lt_compiler_flag="$3"
1397 # Insert the option either (1) after the last *FLAGS variable, or
1398 # (2) before a word containing "conftest.", or (3) at the end.
1399 # Note that $ac_compile itself does not contain backslashes and begins
1400 # with a dollar sign (not a hyphen), so the echo should work correctly.
1401 # The option is referenced via a variable to avoid confusing sed.
1402 lt_compile=`echo "$ac_compile" | $SED \
1403 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1404 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1405 -e 's:$: $lt_compiler_flag:'`
1406 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1407 (eval "$lt_compile" 2>conftest.err)
1409 cat conftest.err >&AS_MESSAGE_LOG_FD
1410 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1411 if (exit $ac_status) && test -s "$ac_outfile"; then
1412 # The compiler can only warn and ignore the option if not recognized
1413 # So say no if there are warnings other than the usual output.
1414 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1415 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1416 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1423 if test x"[$]$2" = xyes; then
1424 m4_if([$5], , :, [$5])
1426 m4_if([$6], , :, [$6])
1428 ])# _LT_COMPILER_OPTION
1431 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1432 dnl aclocal-1.4 backwards compatibility:
1433 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1436 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1437 # [ACTION-SUCCESS], [ACTION-FAILURE])
1438 # ----------------------------------------------------
1439 # Check whether the given linker option works
1440 AC_DEFUN([_LT_LINKER_OPTION],
1441 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1442 m4_require([_LT_DECL_SED])dnl
1443 AC_CACHE_CHECK([$1], [$2],
1445 save_LDFLAGS="$LDFLAGS"
1446 LDFLAGS="$LDFLAGS $3"
1447 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1448 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1449 # The linker can only warn and ignore the option if not recognized
1450 # So say no if there are warnings
1451 if test -s conftest.err; then
1452 # Append any errors to the config.log.
1453 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1454 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1455 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1456 if diff conftest.exp conftest.er2 >/dev/null; then
1464 LDFLAGS="$save_LDFLAGS"
1467 if test x"[$]$2" = xyes; then
1468 m4_if([$4], , :, [$4])
1470 m4_if([$5], , :, [$5])
1472 ])# _LT_LINKER_OPTION
1475 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1476 dnl aclocal-1.4 backwards compatibility:
1477 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1482 AC_DEFUN([LT_CMD_MAX_LEN],
1483 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1484 # find the maximum length of command line arguments
1485 AC_MSG_CHECKING([the maximum length of command line arguments])
1486 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1492 # On DJGPP, this test can blow up pretty badly due to problems in libc
1493 # (any single argument exceeding 2000 bytes causes a buffer overrun
1494 # during glob expansion). Even if it were fixed, the result of this
1495 # check would be larger than it should be.
1496 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1500 # Under GNU Hurd, this test is not required because there is
1501 # no limit to the length of command line arguments.
1502 # Libtool will interpret -1 as no limit whatsoever
1503 lt_cv_sys_max_cmd_len=-1;
1507 # On Win9x/ME, this test blows up -- it succeeds, but takes
1508 # about 5 minutes as the teststring grows exponentially.
1509 # Worse, since 9x/ME are not pre-emptively multitasking,
1510 # you end up with a "frozen" computer, even though with patience
1511 # the test eventually succeeds (with a max line length of 256k).
1512 # Instead, let's just punt: use the minimum linelength reported by
1513 # all of the supported platforms: 8192 (on NT/2K/XP).
1514 lt_cv_sys_max_cmd_len=8192;
1518 # On AmigaOS with pdksh, this test takes hours, literally.
1519 # So we just punt and use a minimum line length of 8192.
1520 lt_cv_sys_max_cmd_len=8192;
1523 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1524 # This has been around since 386BSD, at least. Likely further.
1525 if test -x /sbin/sysctl; then
1526 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1527 elif test -x /usr/sbin/sysctl; then
1528 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1530 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1532 # And add a safety zone
1533 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1534 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1538 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1539 lt_cv_sys_max_cmd_len=196608
1543 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1544 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1545 # nice to cause kernel panics so lets avoid the loop below.
1546 # First set a reasonable default.
1547 lt_cv_sys_max_cmd_len=16384
1549 if test -x /sbin/sysconfig; then
1550 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1551 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1556 lt_cv_sys_max_cmd_len=102400
1558 sysv5* | sco5v6* | sysv4.2uw2*)
1559 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1560 if test -n "$kargmax"; then
1561 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1563 lt_cv_sys_max_cmd_len=32768
1567 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1568 if test -n "$lt_cv_sys_max_cmd_len"; then
1569 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1570 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1572 # Make teststring a little bigger before we do anything with it.
1573 # a 1K string should be a reasonable start.
1574 for i in 1 2 3 4 5 6 7 8 ; do
1575 teststring=$teststring$teststring
1577 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1578 # If test is not a shell built-in, we'll probably end up computing a
1579 # maximum length that is only half of the actual maximum length, but
1581 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1582 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1583 test $i != 17 # 1/2 MB should be enough
1586 teststring=$teststring$teststring
1588 # Only check the string length outside the loop.
1589 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1591 # Add a significant safety factor because C++ compilers can tack on
1592 # massive amounts of additional arguments before passing them to the
1593 # linker. It appears as though 1/2 is a usable value.
1594 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1599 if test -n $lt_cv_sys_max_cmd_len ; then
1600 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1604 max_cmd_len=$lt_cv_sys_max_cmd_len
1605 _LT_DECL([], [max_cmd_len], [0],
1606 [What is the maximum length of a command?])
1610 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1611 dnl aclocal-1.4 backwards compatibility:
1612 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1617 m4_defun([_LT_HEADER_DLFCN],
1618 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1619 ])# _LT_HEADER_DLFCN
1622 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1623 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1624 # ----------------------------------------------------------------
1625 m4_defun([_LT_TRY_DLOPEN_SELF],
1626 [m4_require([_LT_HEADER_DLFCN])dnl
1627 if test "$cross_compiling" = yes; then :
1630 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1631 lt_status=$lt_dlunknown
1632 cat > conftest.$ac_ext <<_LT_EOF
1633 [#line __oline__ "configure"
1634 #include "confdefs.h"
1643 # define LT_DLGLOBAL RTLD_GLOBAL
1646 # define LT_DLGLOBAL DL_GLOBAL
1648 # define LT_DLGLOBAL 0
1652 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1653 find out it does not work in some platform. */
1654 #ifndef LT_DLLAZY_OR_NOW
1656 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1659 # define LT_DLLAZY_OR_NOW DL_LAZY
1662 # define LT_DLLAZY_OR_NOW RTLD_NOW
1665 # define LT_DLLAZY_OR_NOW DL_NOW
1667 # define LT_DLLAZY_OR_NOW 0
1675 extern "C" void exit (int);
1678 void fnord() { int i=42;}
1681 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1682 int status = $lt_dlunknown;
1686 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1687 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1688 /* dlclose (self); */
1696 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1697 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1700 x$lt_dlno_uscore) $1 ;;
1701 x$lt_dlneed_uscore) $2 ;;
1702 x$lt_dlunknown|x*) $3 ;;
1705 # compilation failed
1710 ])# _LT_TRY_DLOPEN_SELF
1713 # LT_SYS_DLOPEN_SELF
1714 # ------------------
1715 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1716 [m4_require([_LT_HEADER_DLFCN])dnl
1717 if test "x$enable_dlopen" != xyes; then
1718 enable_dlopen=unknown
1719 enable_dlopen_self=unknown
1720 enable_dlopen_self_static=unknown
1727 lt_cv_dlopen="load_add_on"
1729 lt_cv_dlopen_self=yes
1733 lt_cv_dlopen="LoadLibrary"
1738 lt_cv_dlopen="dlopen"
1743 # if libdl is installed we need to link against it
1744 AC_CHECK_LIB([dl], [dlopen],
1745 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1748 lt_cv_dlopen_self=yes
1753 AC_CHECK_FUNC([shl_load],
1754 [lt_cv_dlopen="shl_load"],
1755 [AC_CHECK_LIB([dld], [shl_load],
1756 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1757 [AC_CHECK_FUNC([dlopen],
1758 [lt_cv_dlopen="dlopen"],
1759 [AC_CHECK_LIB([dl], [dlopen],
1760 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1761 [AC_CHECK_LIB([svld], [dlopen],
1762 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1763 [AC_CHECK_LIB([dld], [dld_link],
1764 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1773 if test "x$lt_cv_dlopen" != xno; then
1779 case $lt_cv_dlopen in
1781 save_CPPFLAGS="$CPPFLAGS"
1782 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1784 save_LDFLAGS="$LDFLAGS"
1785 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1788 LIBS="$lt_cv_dlopen_libs $LIBS"
1790 AC_CACHE_CHECK([whether a program can dlopen itself],
1791 lt_cv_dlopen_self, [dnl
1792 _LT_TRY_DLOPEN_SELF(
1793 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1794 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1797 if test "x$lt_cv_dlopen_self" = xyes; then
1798 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1799 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1800 lt_cv_dlopen_self_static, [dnl
1801 _LT_TRY_DLOPEN_SELF(
1802 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1803 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1807 CPPFLAGS="$save_CPPFLAGS"
1808 LDFLAGS="$save_LDFLAGS"
1813 case $lt_cv_dlopen_self in
1814 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1815 *) enable_dlopen_self=unknown ;;
1818 case $lt_cv_dlopen_self_static in
1819 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1820 *) enable_dlopen_self_static=unknown ;;
1823 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1824 [Whether dlopen is supported])
1825 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1826 [Whether dlopen of programs is supported])
1827 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1828 [Whether dlopen of statically linked programs is supported])
1829 ])# LT_SYS_DLOPEN_SELF
1832 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1833 dnl aclocal-1.4 backwards compatibility:
1834 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1837 # _LT_COMPILER_C_O([TAGNAME])
1838 # ---------------------------
1839 # Check to see if options -c and -o are simultaneously supported by compiler.
1840 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1841 m4_defun([_LT_COMPILER_C_O],
1842 [m4_require([_LT_DECL_SED])dnl
1843 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1844 m4_require([_LT_TAG_COMPILER])dnl
1845 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1846 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1847 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1848 $RM -r conftest 2>/dev/null
1852 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1854 lt_compiler_flag="-o out/conftest2.$ac_objext"
1855 # Insert the option either (1) after the last *FLAGS variable, or
1856 # (2) before a word containing "conftest.", or (3) at the end.
1857 # Note that $ac_compile itself does not contain backslashes and begins
1858 # with a dollar sign (not a hyphen), so the echo should work correctly.
1859 lt_compile=`echo "$ac_compile" | $SED \
1860 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1861 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1862 -e 's:$: $lt_compiler_flag:'`
1863 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1864 (eval "$lt_compile" 2>out/conftest.err)
1866 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1867 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1868 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1870 # The compiler can only warn and ignore the option if not recognized
1871 # So say no if there are warnings
1872 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1873 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1874 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1875 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1878 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1880 # SGI C++ compiler will create directory out/ii_files/ for
1881 # template instantiation
1882 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1883 $RM out/* && rmdir out
1888 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1889 [Does compiler simultaneously support -c and -o options?])
1890 ])# _LT_COMPILER_C_O
1893 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
1894 # ----------------------------------
1895 # Check to see if we can do hard links to lock some files if needed
1896 m4_defun([_LT_COMPILER_FILE_LOCKS],
1897 [m4_require([_LT_ENABLE_LOCK])dnl
1898 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1899 _LT_COMPILER_C_O([$1])
1901 hard_links="nottested"
1902 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1903 # do not overwrite the value of need_locks provided by the user
1904 AC_MSG_CHECKING([if we can lock with hard links])
1907 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1909 ln conftest.a conftest.b 2>&5 || hard_links=no
1910 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1911 AC_MSG_RESULT([$hard_links])
1912 if test "$hard_links" = no; then
1913 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1919 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1920 ])# _LT_COMPILER_FILE_LOCKS
1925 m4_defun([_LT_CHECK_OBJDIR],
1926 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1927 [rm -f .libs 2>/dev/null
1928 mkdir .libs 2>/dev/null
1929 if test -d .libs; then
1932 # MS-DOS does not allow filenames that begin with a dot.
1935 rmdir .libs 2>/dev/null])
1936 objdir=$lt_cv_objdir
1937 _LT_DECL([], [objdir], [0],
1938 [The name of the directory that contains temporary libtool files])dnl
1939 m4_pattern_allow([LT_OBJDIR])dnl
1940 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1941 [Define to the sub-directory in which libtool stores uninstalled libraries.])
1942 ])# _LT_CHECK_OBJDIR
1945 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1946 # --------------------------------------
1947 # Check hardcoding attributes.
1948 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1949 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1950 _LT_TAGVAR(hardcode_action, $1)=
1951 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1952 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1953 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1955 # We can hardcode non-existent directories.
1956 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1957 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1958 # have to relink, otherwise we might link with an installed library
1959 # when we should be linking with a yet-to-be-installed one
1960 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1961 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1962 # Linking always hardcodes the temporary library directory.
1963 _LT_TAGVAR(hardcode_action, $1)=relink
1965 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1966 _LT_TAGVAR(hardcode_action, $1)=immediate
1969 # We cannot hardcode anything, or else we can only hardcode existing
1971 _LT_TAGVAR(hardcode_action, $1)=unsupported
1973 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1975 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
1976 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
1977 # Fast installation is not supported
1978 enable_fast_install=no
1979 elif test "$shlibpath_overrides_runpath" = yes ||
1980 test "$enable_shared" = no; then
1981 # Fast installation is not necessary
1982 enable_fast_install=needless
1984 _LT_TAGDECL([], [hardcode_action], [0],
1985 [How to hardcode a shared library path into an executable])
1986 ])# _LT_LINKER_HARDCODE_LIBPATH
1991 m4_defun([_LT_CMD_STRIPLIB],
1992 [m4_require([_LT_DECL_EGREP])
1995 AC_MSG_CHECKING([whether stripping libraries is possible])
1996 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
1997 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1998 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1999 AC_MSG_RESULT([yes])
2001 # FIXME - insert some real tests, host_os isn't really good enough
2004 if test -n "$STRIP" ; then
2005 striplib="$STRIP -x"
2006 old_striplib="$STRIP -S"
2007 AC_MSG_RESULT([yes])
2017 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
2018 _LT_DECL([], [striplib], [1])
2019 ])# _LT_CMD_STRIPLIB
2022 # _LT_SYS_DYNAMIC_LINKER([TAG])
2023 # -----------------------------
2024 # PORTME Fill in your ld.so characteristics
2025 m4_defun([_LT_SYS_DYNAMIC_LINKER],
2026 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2027 m4_require([_LT_DECL_EGREP])dnl
2028 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2029 m4_require([_LT_DECL_SED])dnl
2030 AC_MSG_CHECKING([dynamic linker characteristics])
2033 if test "$GCC" = yes; then
2035 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2036 *) lt_awk_arg="/^libraries:/" ;;
2038 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2039 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
2040 # if the path contains ";" then we assume it to be the separator
2041 # otherwise default to the standard path separator (i.e. ":") - it is
2042 # assumed that no part of a normal pathname contains ";" but that should
2043 # okay in the real world where ";" in dirpaths is itself problematic.
2044 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2046 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2048 # Ok, now we have the path, separated by spaces, we can step through it
2049 # and add multilib dir if necessary.
2050 lt_tmp_lt_search_path_spec=
2051 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2052 for lt_sys_path in $lt_search_path_spec; do
2053 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2054 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2056 test -d "$lt_sys_path" && \
2057 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2060 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
2061 BEGIN {RS=" "; FS="/|\n";} {
2064 for (lt_i = NF; lt_i > 0; lt_i--) {
2065 if ($lt_i != "" && $lt_i != ".") {
2066 if ($lt_i == "..") {
2069 if (lt_count == 0) {
2070 lt_foo="/" $lt_i lt_foo;
2077 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2078 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2080 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
2082 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2085 libname_spec='lib$name'
2093 shlibpath_overrides_runpath=unknown
2095 dynamic_linker="$host_os ld.so"
2096 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2097 need_lib_prefix=unknown
2098 hardcode_into_libs=no
2100 # when you set need_version to no, make sure it does not cause -set_version
2101 # flags to be left without arguments
2102 need_version=unknown
2107 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2108 shlibpath_var=LIBPATH
2110 # AIX 3 has no versioning support, so we append a major version to the name.
2111 soname_spec='${libname}${release}${shared_ext}$major'
2118 hardcode_into_libs=yes
2119 if test "$host_cpu" = ia64; then
2120 # AIX 5 supports IA64
2121 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2122 shlibpath_var=LD_LIBRARY_PATH
2124 # With GCC up to 2.95.x, collect2 would create an import file
2125 # for dependence libraries. The import file would start with
2126 # the line `#! .'. This would cause the generated library to
2127 # depend on `.', always an invalid library. This was fixed in
2128 # development snapshots of GCC prior to 3.0.
2130 aix4 | aix4.[[01]] | aix4.[[01]].*)
2131 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2133 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2140 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2141 # soname into executable. Probably we can add versioning support to
2142 # collect2, so additional links can be useful in future.
2143 if test "$aix_use_runtimelinking" = yes; then
2144 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2145 # instead of lib<name>.a to let people know that these are not
2146 # typical AIX shared libraries.
2147 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2149 # We preserve .a as extension for shared libraries through AIX4.2
2150 # and later when we are not doing run time linking.
2151 library_names_spec='${libname}${release}.a $libname.a'
2152 soname_spec='${libname}${release}${shared_ext}$major'
2154 shlibpath_var=LIBPATH
2161 # Since July 2007 AmigaOS4 officially supports .so libraries.
2162 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2163 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2166 library_names_spec='$libname.ixlibrary $libname.a'
2167 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2168 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'
2174 library_names_spec='${libname}${shared_ext}'
2175 dynamic_linker="$host_os ld.so"
2176 shlibpath_var=LIBRARY_PATH
2182 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2183 soname_spec='${libname}${release}${shared_ext}$major'
2184 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2185 shlibpath_var=LD_LIBRARY_PATH
2186 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2187 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2188 # the default ld.so.conf also contains /usr/contrib/lib and
2189 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2190 # libtool to hard-code these into programs
2193 cygwin* | mingw* | pw32*)
2194 version_type=windows
2199 case $GCC,$host_os in
2200 yes,cygwin* | yes,mingw* | yes,pw32*)
2201 library_names_spec='$libname.dll.a'
2202 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2203 postinstall_cmds='base_file=`basename \${file}`~
2204 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2205 dldir=$destdir/`dirname \$dlpath`~
2206 test -d \$dldir || mkdir -p \$dldir~
2207 $install_prog $dir/$dlname \$dldir/$dlname~
2208 chmod a+x \$dldir/$dlname~
2209 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2210 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2212 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2213 dlpath=$dir/\$dldll~
2215 shlibpath_overrides_runpath=yes
2219 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2220 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2221 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2224 # MinGW DLLs use traditional 'lib' prefix
2225 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2226 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2227 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2228 # It is most probably a Windows format PATH printed by
2229 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2230 # path with ; separators, and with drive letters. We can handle the
2231 # drive letters (cygwin fileutils understands them), so leave them,
2232 # especially as we might pass files found there to a mingw objdump,
2233 # which wouldn't understand a cygwinified path. Ahh.
2234 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2236 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2240 # pw32 DLLs use 'pw' prefix rather than 'lib'
2241 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2247 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2250 dynamic_linker='Win32 ld.exe'
2251 # FIXME: first we should search . and the directory the executable is in
2255 darwin* | rhapsody*)
2256 dynamic_linker="$host_os dyld"
2260 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2261 soname_spec='${libname}${release}${major}$shared_ext'
2262 shlibpath_overrides_runpath=yes
2263 shlibpath_var=DYLD_LIBRARY_PATH
2264 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2266 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
2267 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2274 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2275 soname_spec='${libname}${release}${shared_ext}$major'
2276 shlibpath_var=LD_LIBRARY_PATH
2283 freebsd* | dragonfly*)
2284 # DragonFly does not have aout. When/if they implement a new
2285 # versioning mechanism, adjust this.
2286 if test -x /usr/bin/objformat; then
2287 objformat=`/usr/bin/objformat`
2290 freebsd[[123]]*) objformat=aout ;;
2294 version_type=freebsd-$objformat
2295 case $version_type in
2297 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2302 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2306 shlibpath_var=LD_LIBRARY_PATH
2309 shlibpath_overrides_runpath=yes
2311 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2312 shlibpath_overrides_runpath=yes
2313 hardcode_into_libs=yes
2315 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2316 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2317 shlibpath_overrides_runpath=no
2318 hardcode_into_libs=yes
2320 *) # from 4.6 on, and DragonFly
2321 shlibpath_overrides_runpath=yes
2322 hardcode_into_libs=yes
2331 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2332 soname_spec='${libname}${release}${shared_ext}$major'
2333 shlibpath_var=LD_LIBRARY_PATH
2334 hardcode_into_libs=yes
2337 hpux9* | hpux10* | hpux11*)
2338 # Give a soname corresponding to the major version so that dld.sl refuses to
2339 # link against other versions.
2346 hardcode_into_libs=yes
2347 dynamic_linker="$host_os dld.so"
2348 shlibpath_var=LD_LIBRARY_PATH
2349 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2350 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2351 soname_spec='${libname}${release}${shared_ext}$major'
2352 if test "X$HPUX_IA64_MODE" = X32; then
2353 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2355 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2357 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2361 hardcode_into_libs=yes
2362 dynamic_linker="$host_os dld.sl"
2363 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2364 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2365 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2366 soname_spec='${libname}${release}${shared_ext}$major'
2367 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2368 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2372 dynamic_linker="$host_os dld.sl"
2373 shlibpath_var=SHLIB_PATH
2374 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2375 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2376 soname_spec='${libname}${release}${shared_ext}$major'
2379 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2380 postinstall_cmds='chmod 555 $lib'
2387 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2388 soname_spec='${libname}${release}${shared_ext}$major'
2389 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2390 shlibpath_var=LD_LIBRARY_PATH
2391 shlibpath_overrides_runpath=no
2392 hardcode_into_libs=yes
2395 irix5* | irix6* | nonstopux*)
2397 nonstopux*) version_type=nonstopux ;;
2399 if test "$lt_cv_prog_gnu_ld" = yes; then
2407 soname_spec='${libname}${release}${shared_ext}$major'
2408 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2410 irix5* | nonstopux*)
2414 case $LD in # libtool.m4 will add one of these switches to LD
2415 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2416 libsuff= shlibsuff= libmagic=32-bit;;
2417 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2418 libsuff=32 shlibsuff=N32 libmagic=N32;;
2419 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2420 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2421 *) libsuff= shlibsuff= libmagic=never-match;;
2425 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2426 shlibpath_overrides_runpath=no
2427 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2428 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2429 hardcode_into_libs=yes
2432 # No shared lib support for Linux oldld, aout, or coff.
2433 linux*oldld* | linux*aout* | linux*coff*)
2437 # This must be Linux ELF.
2438 linux* | k*bsd*-gnu)
2442 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2443 soname_spec='${libname}${release}${shared_ext}$major'
2444 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2445 shlibpath_var=LD_LIBRARY_PATH
2446 shlibpath_overrides_runpath=no
2447 # Some binutils ld are patched to set DT_RUNPATH
2448 save_LDFLAGS=$LDFLAGS
2450 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
2451 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
2452 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2453 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
2454 [shlibpath_overrides_runpath=yes])])
2455 LDFLAGS=$save_LDFLAGS
2458 # This implies no fast_install, which is unacceptable.
2459 # Some rework will be needed to allow for fast_install
2460 # before this can be enabled.
2461 hardcode_into_libs=yes
2463 # Append ld.so.conf contents to the search path
2464 if test -f /etc/ld.so.conf; then
2465 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2466 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2469 # We used to test for /lib/ld.so.1 and disable shared libraries on
2470 # powerpc, because MkLinux only supported shared libraries with the
2471 # GNU dynamic linker. Since this was broken with cross compilers,
2472 # most powerpc-linux boxes support dynamic linking these days and
2473 # people can always --disable-shared, the test was removed, and we
2474 # assume the GNU/Linux dynamic linker is in use.
2475 dynamic_linker='GNU/Linux ld.so'
2482 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2483 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2484 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2485 dynamic_linker='NetBSD (a.out) ld.so'
2487 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2488 soname_spec='${libname}${release}${shared_ext}$major'
2489 dynamic_linker='NetBSD ld.elf_so'
2491 shlibpath_var=LD_LIBRARY_PATH
2492 shlibpath_overrides_runpath=yes
2493 hardcode_into_libs=yes
2498 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2499 shlibpath_var=LD_LIBRARY_PATH
2500 shlibpath_overrides_runpath=yes
2507 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2508 soname_spec='${libname}${release}${shared_ext}$major'
2509 shlibpath_var=LD_LIBRARY_PATH
2510 shlibpath_overrides_runpath=no
2511 hardcode_into_libs=yes
2512 dynamic_linker='ldqnx.so'
2517 sys_lib_dlsearch_path_spec="/usr/lib"
2519 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2521 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2522 *) need_version=no ;;
2524 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2525 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2526 shlibpath_var=LD_LIBRARY_PATH
2527 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2529 openbsd2.[[89]] | openbsd2.[[89]].*)
2530 shlibpath_overrides_runpath=no
2533 shlibpath_overrides_runpath=yes
2537 shlibpath_overrides_runpath=yes
2542 libname_spec='$name'
2545 library_names_spec='$libname${shared_ext} $libname.a'
2546 dynamic_linker='OS/2 ld.exe'
2547 shlibpath_var=LIBPATH
2550 osf3* | osf4* | osf5*)
2554 soname_spec='${libname}${release}${shared_ext}$major'
2555 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2556 shlibpath_var=LD_LIBRARY_PATH
2557 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2558 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2569 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2570 soname_spec='${libname}${release}${shared_ext}$major'
2571 shlibpath_var=LD_LIBRARY_PATH
2572 shlibpath_overrides_runpath=yes
2573 hardcode_into_libs=yes
2574 # ldd complains unless libraries are executable
2575 postinstall_cmds='chmod +x $lib'
2580 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2581 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2582 shlibpath_var=LD_LIBRARY_PATH
2583 shlibpath_overrides_runpath=yes
2584 if test "$with_gnu_ld" = yes; then
2592 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2593 soname_spec='${libname}${release}${shared_ext}$major'
2594 shlibpath_var=LD_LIBRARY_PATH
2595 case $host_vendor in
2597 shlibpath_overrides_runpath=no
2599 runpath_var=LD_RUN_PATH
2607 shlibpath_overrides_runpath=no
2608 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2614 if test -d /usr/nec ;then
2616 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2617 soname_spec='$libname${shared_ext}.$major'
2618 shlibpath_var=LD_LIBRARY_PATH
2622 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2623 version_type=freebsd-elf
2626 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2627 soname_spec='${libname}${release}${shared_ext}$major'
2628 shlibpath_var=LD_LIBRARY_PATH
2629 shlibpath_overrides_runpath=yes
2630 hardcode_into_libs=yes
2631 if test "$with_gnu_ld" = yes; then
2632 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2634 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2637 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2641 sys_lib_dlsearch_path_spec='/usr/lib'
2645 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2649 library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2650 shlibpath_var=LD_LIBRARY_PATH
2651 shlibpath_overrides_runpath=no
2652 hardcode_into_libs=yes
2657 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2658 soname_spec='${libname}${release}${shared_ext}$major'
2659 shlibpath_var=LD_LIBRARY_PATH
2666 AC_MSG_RESULT([$dynamic_linker])
2667 test "$dynamic_linker" = no && can_build_shared=no
2669 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2670 if test "$GCC" = yes; then
2671 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2674 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2675 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2677 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2678 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2681 _LT_DECL([], [variables_saved_for_relink], [1],
2682 [Variables whose values should be saved in libtool wrapper scripts and
2683 restored at link time])
2684 _LT_DECL([], [need_lib_prefix], [0],
2685 [Do we need the "lib" prefix for modules?])
2686 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2687 _LT_DECL([], [version_type], [0], [Library versioning type])
2688 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2689 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2690 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2691 [Is shlibpath searched before the hard-coded library search path?])
2692 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2693 _LT_DECL([], [library_names_spec], [1],
2694 [[List of archive names. First name is the real one, the rest are links.
2695 The last name is the one that the linker finds with -lNAME]])
2696 _LT_DECL([], [soname_spec], [1],
2697 [[The coded name of the library, if different from the real name]])
2698 _LT_DECL([], [postinstall_cmds], [2],
2699 [Command to use after installation of a shared archive])
2700 _LT_DECL([], [postuninstall_cmds], [2],
2701 [Command to use after uninstallation of a shared archive])
2702 _LT_DECL([], [finish_cmds], [2],
2703 [Commands used to finish a libtool library installation in a directory])
2704 _LT_DECL([], [finish_eval], [1],
2705 [[As "finish_cmds", except a single script fragment to be evaled but
2707 _LT_DECL([], [hardcode_into_libs], [0],
2708 [Whether we should hardcode library paths into libraries])
2709 _LT_DECL([], [sys_lib_search_path_spec], [2],
2710 [Compile-time system search path for libraries])
2711 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2712 [Run-time system search path for libraries])
2713 ])# _LT_SYS_DYNAMIC_LINKER
2716 # _LT_PATH_TOOL_PREFIX(TOOL)
2717 # --------------------------
2718 # find a file program which can recognize shared library
2719 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2720 [m4_require([_LT_DECL_EGREP])dnl
2721 AC_MSG_CHECKING([for $1])
2722 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2724 [[\\/*] | ?:[\\/]*])
2725 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2728 lt_save_MAGIC_CMD="$MAGIC_CMD"
2729 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2730 dnl $ac_dummy forces splitting on constant user-supplied paths.
2731 dnl POSIX.2 word splitting is done only on the output of word expansions,
2732 dnl not every word. This closes a longstanding sh security hole.
2733 ac_dummy="m4_if([$2], , $PATH, [$2])"
2734 for ac_dir in $ac_dummy; do
2736 test -z "$ac_dir" && ac_dir=.
2737 if test -f $ac_dir/$1; then
2738 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2739 if test -n "$file_magic_test_file"; then
2740 case $deplibs_check_method in
2742 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2743 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2744 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2745 $EGREP "$file_magic_regex" > /dev/null; then
2750 *** Warning: the command libtool uses to detect shared libraries,
2751 *** $file_magic_cmd, produces output that libtool cannot recognize.
2752 *** The result is that libtool may fail to recognize shared libraries
2753 *** as such. This will affect the creation of libtool libraries that
2754 *** depend on shared libraries, but programs linked with such libtool
2755 *** libraries will work regardless of this problem. Nevertheless, you
2756 *** may want to report the problem to your system manager and/or to
2757 *** bug-libtool@gnu.org
2767 MAGIC_CMD="$lt_save_MAGIC_CMD"
2770 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2771 if test -n "$MAGIC_CMD"; then
2772 AC_MSG_RESULT($MAGIC_CMD)
2776 _LT_DECL([], [MAGIC_CMD], [0],
2777 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2778 ])# _LT_PATH_TOOL_PREFIX
2781 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2782 dnl aclocal-1.4 backwards compatibility:
2783 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2788 # find a file program which can recognize a shared library
2789 m4_defun([_LT_PATH_MAGIC],
2790 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2791 if test -z "$lt_cv_path_MAGIC_CMD"; then
2792 if test -n "$ac_tool_prefix"; then
2793 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2803 # find the pathname to the GNU or non-GNU linker
2804 AC_DEFUN([LT_PATH_LD],
2805 [AC_REQUIRE([AC_PROG_CC])dnl
2806 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2807 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2808 m4_require([_LT_DECL_SED])dnl
2809 m4_require([_LT_DECL_EGREP])dnl
2811 AC_ARG_WITH([gnu-ld],
2812 [AS_HELP_STRING([--with-gnu-ld],
2813 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2814 [test "$withval" = no || with_gnu_ld=yes],
2815 [with_gnu_ld=no])dnl
2818 if test "$GCC" = yes; then
2819 # Check if gcc -print-prog-name=ld gives a path.
2820 AC_MSG_CHECKING([for ld used by $CC])
2823 # gcc leaves a trailing carriage return which upsets mingw
2824 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2826 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2829 # Accept absolute paths.
2830 [[\\/]]* | ?:[[\\/]]*)
2831 re_direlt='/[[^/]][[^/]]*/\.\./'
2832 # Canonicalize the pathname of ld
2833 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2834 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2835 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2837 test -z "$LD" && LD="$ac_prog"
2840 # If it fails, then pretend we aren't using GCC.
2844 # If it is relative, then search for the first ld in PATH.
2848 elif test "$with_gnu_ld" = yes; then
2849 AC_MSG_CHECKING([for GNU ld])
2851 AC_MSG_CHECKING([for non-GNU ld])
2853 AC_CACHE_VAL(lt_cv_path_LD,
2854 [if test -z "$LD"; then
2855 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2856 for ac_dir in $PATH; do
2858 test -z "$ac_dir" && ac_dir=.
2859 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2860 lt_cv_path_LD="$ac_dir/$ac_prog"
2861 # Check to see if the program is GNU ld. I'd rather use --version,
2862 # but apparently some variants of GNU ld only accept -v.
2863 # Break only if it was the GNU/non-GNU ld that we prefer.
2864 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2865 *GNU* | *'with BFD'*)
2866 test "$with_gnu_ld" != no && break
2869 test "$with_gnu_ld" != yes && break
2876 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2879 if test -n "$LD"; then
2884 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2888 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2892 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2893 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2894 dnl aclocal-1.4 backwards compatibility:
2895 dnl AC_DEFUN([AM_PROG_LD], [])
2896 dnl AC_DEFUN([AC_PROG_LD], [])
2901 m4_defun([_LT_PATH_LD_GNU],
2902 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2903 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2904 case `$LD -v 2>&1 </dev/null` in
2905 *GNU* | *'with BFD'*)
2906 lt_cv_prog_gnu_ld=yes
2909 lt_cv_prog_gnu_ld=no
2912 with_gnu_ld=$lt_cv_prog_gnu_ld
2918 # find reload flag for linker
2919 # -- PORTME Some linkers may need a different reload flag.
2920 m4_defun([_LT_CMD_RELOAD],
2921 [AC_CACHE_CHECK([for $LD option to reload object files],
2922 lt_cv_ld_reload_flag,
2923 [lt_cv_ld_reload_flag='-r'])
2924 reload_flag=$lt_cv_ld_reload_flag
2925 case $reload_flag in
2927 *) reload_flag=" $reload_flag" ;;
2929 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2932 if test "$GCC" = yes; then
2933 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2935 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2939 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2940 _LT_DECL([], [reload_cmds], [2])dnl
2944 # _LT_CHECK_MAGIC_METHOD
2945 # ----------------------
2946 # how to check for library dependencies
2947 # -- PORTME fill in with the dynamic library characteristics
2948 m4_defun([_LT_CHECK_MAGIC_METHOD],
2949 [m4_require([_LT_DECL_EGREP])
2950 AC_CACHE_CHECK([how to recognize dependent libraries],
2951 lt_cv_deplibs_check_method,
2952 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2953 lt_cv_file_magic_test_file=
2954 lt_cv_deplibs_check_method='unknown'
2955 # Need to set the preceding variable on all platforms that support
2956 # interlibrary dependencies.
2957 # 'none' -- dependencies not supported.
2958 # `unknown' -- same as none, but documents that we really don't know.
2959 # 'pass_all' -- all dependencies passed with no checks.
2960 # 'test_compile' -- check by making test program.
2961 # 'file_magic [[regex]]' -- check by looking for files in library path
2962 # which responds to the $file_magic_cmd with a given extended regex.
2963 # If you have `file' or equivalent on your system and you're not sure
2964 # whether `pass_all' will *always* work, you probably want this one.
2968 lt_cv_deplibs_check_method=pass_all
2972 lt_cv_deplibs_check_method=pass_all
2976 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2977 lt_cv_file_magic_cmd='/usr/bin/file -L'
2978 lt_cv_file_magic_test_file=/shlib/libc.so
2982 # func_win32_libid is a shell function defined in ltmain.sh
2983 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2984 lt_cv_file_magic_cmd='func_win32_libid'
2988 # Base MSYS/MinGW do not provide the 'file' command needed by
2989 # func_win32_libid shell function, so use a weaker test based on 'objdump',
2990 # unless we find 'file', for example because we are cross-compiling.
2991 if ( file / ) >/dev/null 2>&1; then
2992 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2993 lt_cv_file_magic_cmd='func_win32_libid'
2995 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2996 lt_cv_file_magic_cmd='$OBJDUMP -f'
3000 darwin* | rhapsody*)
3001 lt_cv_deplibs_check_method=pass_all
3004 freebsd* | dragonfly*)
3005 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3008 # Not sure whether the presence of OpenBSD here was a mistake.
3009 # Let's accept both of them until this is cleared up.
3010 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3011 lt_cv_file_magic_cmd=/usr/bin/file
3012 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3016 lt_cv_deplibs_check_method=pass_all
3021 lt_cv_deplibs_check_method=pass_all
3024 hpux10.20* | hpux11*)
3025 lt_cv_file_magic_cmd=/usr/bin/file
3028 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3029 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3032 [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]']
3033 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3036 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3037 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3043 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3044 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3047 irix5* | irix6* | nonstopux*)
3049 *-32|*"-32 ") libmagic=32-bit;;
3050 *-n32|*"-n32 ") libmagic=N32;;
3051 *-64|*"-64 ") libmagic=64-bit;;
3052 *) libmagic=never-match;;
3054 lt_cv_deplibs_check_method=pass_all
3057 # This must be Linux ELF.
3058 linux* | k*bsd*-gnu)
3059 lt_cv_deplibs_check_method=pass_all
3063 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
3064 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3066 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3071 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3072 lt_cv_file_magic_cmd=/usr/bin/file
3073 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3077 lt_cv_deplibs_check_method=pass_all
3081 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3082 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3084 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3088 osf3* | osf4* | osf5*)
3089 lt_cv_deplibs_check_method=pass_all
3093 lt_cv_deplibs_check_method=pass_all
3097 lt_cv_deplibs_check_method=pass_all
3100 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3101 lt_cv_deplibs_check_method=pass_all
3105 case $host_vendor in
3107 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]]'
3108 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3111 lt_cv_deplibs_check_method=pass_all
3114 lt_cv_file_magic_cmd='/bin/file'
3115 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3118 lt_cv_file_magic_cmd='/bin/file'
3119 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3120 lt_cv_file_magic_test_file=/lib/libc.so
3123 lt_cv_deplibs_check_method=pass_all
3126 lt_cv_deplibs_check_method=pass_all
3132 lt_cv_deplibs_check_method=pass_all
3136 file_magic_cmd=$lt_cv_file_magic_cmd
3137 deplibs_check_method=$lt_cv_deplibs_check_method
3138 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3140 _LT_DECL([], [deplibs_check_method], [1],
3141 [Method to check whether dependent libraries are shared objects])
3142 _LT_DECL([], [file_magic_cmd], [1],
3143 [Command to use when deplibs_check_method == "file_magic"])
3144 ])# _LT_CHECK_MAGIC_METHOD
3149 # find the pathname to a BSD- or MS-compatible name lister
3150 AC_DEFUN([LT_PATH_NM],
3151 [AC_REQUIRE([AC_PROG_CC])dnl
3152 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
3153 [if test -n "$NM"; then
3154 # Let the user override the test.
3157 lt_nm_to_check="${ac_tool_prefix}nm"
3158 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3159 lt_nm_to_check="$lt_nm_to_check nm"
3161 for lt_tmp_nm in $lt_nm_to_check; do
3162 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3163 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3165 test -z "$ac_dir" && ac_dir=.
3166 tmp_nm="$ac_dir/$lt_tmp_nm"
3167 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3168 # Check to see if the nm accepts a BSD-compat flag.
3169 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3170 # nm: unknown option "B" ignored
3171 # Tru64's nm complains that /dev/null is an invalid object file
3172 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3173 */dev/null* | *'Invalid file or object type'*)
3174 lt_cv_path_NM="$tmp_nm -B"
3178 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3180 lt_cv_path_NM="$tmp_nm -p"
3184 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3185 continue # so that we can try to find one that supports BSD flags
3194 : ${lt_cv_path_NM=no}
3196 if test "$lt_cv_path_NM" != "no"; then
3199 # Didn't find any BSD compatible name lister, look for dumpbin.
3200 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3202 if test "$DUMPBIN" != ":"; then
3206 test -z "$NM" && NM=nm
3208 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3210 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3211 [lt_cv_nm_interface="BSD nm"
3212 echo "int some_variable = 0;" > conftest.$ac_ext
3213 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3214 (eval "$ac_compile" 2>conftest.err)
3215 cat conftest.err >&AS_MESSAGE_LOG_FD
3216 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3217 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3218 cat conftest.err >&AS_MESSAGE_LOG_FD
3219 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3220 cat conftest.out >&AS_MESSAGE_LOG_FD
3221 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3222 lt_cv_nm_interface="MS dumpbin"
3228 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3229 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3230 dnl aclocal-1.4 backwards compatibility:
3231 dnl AC_DEFUN([AM_PROG_NM], [])
3232 dnl AC_DEFUN([AC_PROG_NM], [])
3237 # check for math library
3238 AC_DEFUN([LT_LIB_M],
3239 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3242 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3243 # These system don't have libm, or don't need it
3246 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3247 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3250 AC_CHECK_LIB(m, cos, LIBM="-lm")
3257 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3258 dnl aclocal-1.4 backwards compatibility:
3259 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3262 # _LT_COMPILER_NO_RTTI([TAGNAME])
3263 # -------------------------------
3264 m4_defun([_LT_COMPILER_NO_RTTI],
3265 [m4_require([_LT_TAG_COMPILER])dnl
3267 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3269 if test "$GCC" = yes; then
3270 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3272 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3273 lt_cv_prog_compiler_rtti_exceptions,
3274 [-fno-rtti -fno-exceptions], [],
3275 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3277 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3278 [Compiler flag to turn off builtin functions])
3279 ])# _LT_COMPILER_NO_RTTI
3282 # _LT_CMD_GLOBAL_SYMBOLS
3283 # ----------------------
3284 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3285 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3286 AC_REQUIRE([AC_PROG_CC])dnl
3287 AC_REQUIRE([LT_PATH_NM])dnl
3288 AC_REQUIRE([LT_PATH_LD])dnl
3289 m4_require([_LT_DECL_SED])dnl
3290 m4_require([_LT_DECL_EGREP])dnl
3291 m4_require([_LT_TAG_COMPILER])dnl
3293 # Check for command to grab the raw symbol name followed by C symbol from nm.
3294 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3295 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3297 # These are sane defaults that work on at least a few old systems.
3298 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3300 # Character class describing NM global symbol codes.
3301 symcode='[[BCDEGRST]]'
3303 # Regexp to match symbols that can be accessed directly from C.
3304 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3306 # Define system-specific variables.
3311 cygwin* | mingw* | pw32*)
3312 symcode='[[ABCDGISTW]]'
3315 if test "$host_cpu" = ia64; then
3316 symcode='[[ABCDEGRST]]'
3320 symcode='[[BCDEGRST]]'
3323 symcode='[[BCDEGQRST]]'
3334 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3338 symcode='[[DFNSTU]]'
3342 # If we're using GNU nm, then use its standard symbol codes.
3343 case `$NM -V 2>&1` in
3344 *GNU* | *'with BFD'*)
3345 symcode='[[ABCDGIRSTW]]' ;;
3348 # Transform an extracted symbol line into a proper C declaration.
3349 # Some systems (esp. on ia64) link data and code symbols differently,
3350 # so use this general approach.
3351 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3353 # Transform an extracted symbol line into symbol name and symbol address
3354 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3355 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3357 # Handle CRLF in mingw tool chain
3361 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3365 # Try without a prefix underscore, then with it.
3366 for ac_symprfx in "" "_"; do
3368 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3369 symxfrm="\\1 $ac_symprfx\\2 \\2"
3371 # Write the raw and C identifiers.
3372 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3373 # Fake it for dumpbin and say T for any non-static function
3374 # and D for any global variable.
3375 # Also find C++ and __fastcall symbols from MSVC++,
3376 # which start with @ or ?.
3377 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3378 " {last_section=section; section=\$ 3};"\
3379 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3380 " \$ 0!~/External *\|/{next};"\
3381 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3382 " {if(hide[section]) next};"\
3383 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3384 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3385 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3386 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3387 " ' prfx=^$ac_symprfx]"
3389 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3392 # Check to see that the pipe works correctly.
3396 cat > conftest.$ac_ext <<_LT_EOF
3401 void nm_test_func(void);
3402 void nm_test_func(void){}
3406 int main(){nm_test_var='a';nm_test_func();return(0);}
3409 if AC_TRY_EVAL(ac_compile); then
3410 # Now try to grab the symbols.
3412 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3413 # Try sorting and uniquifying the output.
3414 if sort "$nlist" | uniq > "$nlist"T; then
3415 mv -f "$nlist"T "$nlist"
3420 # Make sure that we snagged all the symbols we need.
3421 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3422 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3423 cat <<_LT_EOF > conftest.$ac_ext
3429 # Now generate the symbol file.
3430 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3432 cat <<_LT_EOF >> conftest.$ac_ext
3434 /* The mapping between symbol names and symbols. */
3439 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3441 { "@PROGRAM@", (void *) 0 },
3443 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3444 cat <<\_LT_EOF >> conftest.$ac_ext
3448 /* This works around a problem in FreeBSD linker */
3449 #ifdef FREEBSD_WORKAROUND
3450 static const void *lt_preloaded_setup() {
3451 return lt__PROGRAM__LTX_preloaded_symbols;
3459 # Now try linking the two files.
3460 mv conftest.$ac_objext conftstm.$ac_objext
3461 lt_save_LIBS="$LIBS"
3462 lt_save_CFLAGS="$CFLAGS"
3463 LIBS="conftstm.$ac_objext"
3464 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3465 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3468 LIBS="$lt_save_LIBS"
3469 CFLAGS="$lt_save_CFLAGS"
3471 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3474 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3477 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3480 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3481 cat conftest.$ac_ext >&5
3483 rm -rf conftest* conftst*
3485 # Do not use the global_symbol_pipe unless it works.
3486 if test "$pipe_works" = yes; then
3489 lt_cv_sys_global_symbol_pipe=
3493 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3494 lt_cv_sys_global_symbol_to_cdecl=
3496 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3497 AC_MSG_RESULT(failed)
3502 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3503 [Take the output of nm and produce a listing of raw symbols and C names])
3504 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3505 [Transform the output of nm in a proper C declaration])
3506 _LT_DECL([global_symbol_to_c_name_address],
3507 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3508 [Transform the output of nm in a C name address pair])
3509 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
3510 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
3511 [Transform the output of nm in a C name address pair when lib prefix is needed])
3512 ]) # _LT_CMD_GLOBAL_SYMBOLS
3515 # _LT_COMPILER_PIC([TAGNAME])
3516 # ---------------------------
3517 m4_defun([_LT_COMPILER_PIC],
3518 [m4_require([_LT_TAG_COMPILER])dnl
3519 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3520 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3521 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3523 AC_MSG_CHECKING([for $compiler option to produce PIC])
3524 m4_if([$1], [CXX], [
3525 # C++ specific cases for pic, static, wl, etc.
3526 if test "$GXX" = yes; then
3527 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3528 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3532 # All AIX code is PIC.
3533 if test "$host_cpu" = ia64; then
3534 # AIX 5 now supports IA64 processor
3535 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3542 # see comment about AmigaOS4 .so support
3543 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3546 # FIXME: we need at least 68020 code to build shared libraries, but
3547 # adding the `-m68020' flag to GCC prevents building anything better,
3549 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3554 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3555 # PIC is the default for these OSes.
3557 mingw* | cygwin* | os2* | pw32*)
3558 # This hack is so that the source file can tell whether it is being
3559 # built for inclusion in a dll (and should export symbols for example).
3560 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3561 # (--disable-auto-import) libraries
3562 m4_if([$1], [GCJ], [],
3563 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3565 darwin* | rhapsody*)
3566 # PIC is the default on this platform
3567 # Common symbols not allowed in MH_DYLIB files
3568 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3571 # DJGPP does not support shared libraries at all
3572 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3575 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3576 # Instead, we relocate shared libraries at runtime.
3579 if test -d /usr/nec; then
3580 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3584 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3590 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3595 # QNX uses GNU C++, but need to define -shared option too, otherwise
3597 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3600 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3606 # All AIX code is PIC.
3607 if test "$host_cpu" = ia64; then
3608 # AIX 5 now supports IA64 processor
3609 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3611 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3615 case $cc_basename in
3617 # Green Hills C++ Compiler
3618 # _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"
3623 case $cc_basename in
3625 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3628 # Green Hills C++ Compiler
3629 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3635 freebsd* | dragonfly*)
3636 # FreeBSD uses GNU C++
3638 hpux9* | hpux10* | hpux11*)
3639 case $cc_basename in
3641 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3642 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3643 if test "$host_cpu" != ia64; then
3644 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3648 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3649 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3655 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3664 # This is c89, which is MS Visual C++ (no shared libs)
3665 # Anyone wants to do a port?
3667 irix5* | irix6* | nonstopux*)
3668 case $cc_basename in
3670 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3671 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3672 # CC pic flag -KPIC is the default.
3678 linux* | k*bsd*-gnu)
3679 case $cc_basename in
3682 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3683 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3687 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3688 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3689 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3692 # Portland Group C++ compiler
3693 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3694 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3695 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3699 # Make sure the PIC flag is empty. It appears that all Alpha
3700 # Linux and Compaq Tru64 Unix objects are PIC.
3701 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3702 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3706 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3707 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3708 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3711 case `$CC -V 2>&1 | sed 5q` in
3714 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3715 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3716 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3727 case $cc_basename in
3729 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3738 # QNX uses GNU C++, but need to define -shared option too, otherwise
3740 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3742 osf3* | osf4* | osf5*)
3743 case $cc_basename in
3745 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3748 # Rational C++ 2.4.1
3749 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3752 # Digital/Compaq C++
3753 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3754 # Make sure the PIC flag is empty. It appears that all Alpha
3755 # Linux and Compaq Tru64 Unix objects are PIC.
3756 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3757 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3766 case $cc_basename in
3768 # Sun C++ 4.2, 5.x and Centerline C++
3769 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3770 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3771 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3774 # Green Hills C++ Compiler
3775 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3782 case $cc_basename in
3785 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3786 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3790 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3796 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3797 case $cc_basename in
3799 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3800 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3801 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3806 case $cc_basename in
3808 # NonStop-UX NCC 3.20
3809 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3818 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3824 if test "$GCC" = yes; then
3825 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3826 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3830 # All AIX code is PIC.
3831 if test "$host_cpu" = ia64; then
3832 # AIX 5 now supports IA64 processor
3833 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3840 # see comment about AmigaOS4 .so support
3841 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3844 # FIXME: we need at least 68020 code to build shared libraries, but
3845 # adding the `-m68020' flag to GCC prevents building anything better,
3847 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3852 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3853 # PIC is the default for these OSes.
3856 mingw* | cygwin* | pw32* | os2*)
3857 # This hack is so that the source file can tell whether it is being
3858 # built for inclusion in a dll (and should export symbols for example).
3859 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3860 # (--disable-auto-import) libraries
3861 m4_if([$1], [GCJ], [],
3862 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3865 darwin* | rhapsody*)
3866 # PIC is the default on this platform
3867 # Common symbols not allowed in MH_DYLIB files
3868 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3872 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3879 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3885 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3886 # Instead, we relocate shared libraries at runtime.
3890 # Just because we use GCC doesn't mean we suddenly get shared libraries
3891 # on systems that don't support them.
3892 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3897 # QNX uses GNU C++, but need to define -shared option too, otherwise
3899 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3903 if test -d /usr/nec; then
3904 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3909 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3913 # PORTME Check for flag to pass linker flags through the system compiler.
3916 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3917 if test "$host_cpu" = ia64; then
3918 # AIX 5 now supports IA64 processor
3919 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3921 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3925 mingw* | cygwin* | pw32* | os2*)
3926 # This hack is so that the source file can tell whether it is being
3927 # built for inclusion in a dll (and should export symbols for example).
3928 m4_if([$1], [GCJ], [],
3929 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
3932 hpux9* | hpux10* | hpux11*)
3933 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3934 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3941 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3944 # Is there a better lt_prog_compiler_static that works with the bundled CC?
3945 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3948 irix5* | irix6* | nonstopux*)
3949 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3950 # PIC (with -KPIC) is the default.
3951 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3954 linux* | k*bsd*-gnu)
3955 case $cc_basename in
3956 icc* | ecc* | ifort*)
3957 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3958 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3959 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3961 pgcc* | pgf77* | pgf90* | pgf95*)
3962 # Portland Group compilers (*not* the Pentium gcc compiler,
3963 # which looks to be a dead project)
3964 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3965 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3966 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3969 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3970 # All Alpha code is PIC.
3971 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3974 # IBM XL C 8.0/Fortran 10.1 on PPC
3975 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3976 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
3977 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
3980 case `$CC -V 2>&1 | sed 5q` in
3983 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3984 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3985 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3988 # Sun Fortran 8.3 passes all unrecognized flags to the linker
3989 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3990 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3991 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
3999 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4000 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4004 # QNX uses GNU C++, but need to define -shared option too, otherwise
4006 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4009 osf3* | osf4* | osf5*)
4010 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4011 # All OSF/1 code is PIC.
4012 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4016 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4020 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4021 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4022 case $cc_basename in
4024 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
4026 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
4031 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4032 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4033 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4036 sysv4 | sysv4.2uw2* | sysv4.3*)
4037 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4038 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4039 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4043 if test -d /usr/nec ;then
4044 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
4045 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4049 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
4050 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4051 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4052 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4056 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4057 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4061 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4062 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4066 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4072 # For platforms which do not support PIC, -DPIC is meaningless:
4074 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4077 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
4080 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
4081 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
4082 [How to pass a linker flag through the compiler])
4085 # Check to make sure the PIC flag actually works.
4087 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
4088 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
4089 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
4090 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
4091 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
4093 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
4095 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4096 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4098 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
4099 [Additional compiler flags for building library objects])
4102 # Check to make sure the static flag actually works.
4104 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
4105 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
4106 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
4107 $lt_tmp_static_flag,
4109 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
4110 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
4111 [Compiler flag to prevent dynamic linking])
4112 ])# _LT_COMPILER_PIC
4115 # _LT_LINKER_SHLIBS([TAGNAME])
4116 # ----------------------------
4117 # See if the linker supports building shared libraries.
4118 m4_defun([_LT_LINKER_SHLIBS],
4119 [AC_REQUIRE([LT_PATH_LD])dnl
4120 AC_REQUIRE([LT_PATH_NM])dnl
4121 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4122 m4_require([_LT_DECL_EGREP])dnl
4123 m4_require([_LT_DECL_SED])dnl
4124 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
4125 m4_require([_LT_TAG_COMPILER])dnl
4126 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4127 m4_if([$1], [CXX], [
4128 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4131 # If we're using GNU nm, then we don't want the "-C" option.
4132 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4133 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4134 _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'
4136 _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'
4140 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4143 _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'
4146 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4149 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4152 _LT_TAGVAR(allow_undefined_flag, $1)=
4153 _LT_TAGVAR(always_export_symbols, $1)=no
4154 _LT_TAGVAR(archive_cmds, $1)=
4155 _LT_TAGVAR(archive_expsym_cmds, $1)=
4156 _LT_TAGVAR(compiler_needs_object, $1)=no
4157 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4158 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4159 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
4160 _LT_TAGVAR(hardcode_automatic, $1)=no
4161 _LT_TAGVAR(hardcode_direct, $1)=no
4162 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
4163 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4164 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4165 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4166 _LT_TAGVAR(hardcode_minus_L, $1)=no
4167 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4168 _LT_TAGVAR(inherit_rpath, $1)=no
4169 _LT_TAGVAR(link_all_deplibs, $1)=unknown
4170 _LT_TAGVAR(module_cmds, $1)=
4171 _LT_TAGVAR(module_expsym_cmds, $1)=
4172 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
4173 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
4174 _LT_TAGVAR(thread_safe_flag_spec, $1)=
4175 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4176 # include_expsyms should be a list of space-separated symbols to be *always*
4177 # included in the symbol list
4178 _LT_TAGVAR(include_expsyms, $1)=
4179 # exclude_expsyms can be an extended regexp of symbols to exclude
4180 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4181 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4182 # as well as any symbol that contains `d'.
4183 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
4184 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4185 # platforms (ab)use it in PIC code, but their linkers get confused if
4186 # the symbol is explicitly referenced. Since portable code cannot
4187 # rely on this symbol name, it's probably fine to never include it in
4188 # preloaded symbol tables.
4189 # Exclude shared library initialization/finalization symbols.
4190 dnl Note also adjust exclude_expsyms for C++ above.
4191 extract_expsyms_cmds=
4194 cygwin* | mingw* | pw32*)
4195 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4196 # When not using gcc, we currently assume that we are using
4197 # Microsoft Visual C++.
4198 if test "$GCC" != yes; then
4203 # we just hope/assume this is gcc and not c89 (= MSVC++)
4211 _LT_TAGVAR(ld_shlibs, $1)=yes
4212 if test "$with_gnu_ld" = yes; then
4213 # If archive_cmds runs LD, not CC, wlarc should be empty
4216 # Set some defaults for GNU ld with shared library support. These
4217 # are reset later if shared libraries are not supported. Putting them
4218 # here allows them to be overridden if necessary.
4219 runpath_var=LD_RUN_PATH
4220 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4221 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4222 # ancient GNU ld didn't support --whole-archive et. al.
4223 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4224 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4226 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4228 supports_anon_versioning=no
4229 case `$LD -v 2>&1` in
4230 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4231 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4232 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4233 *\ 2.11.*) ;; # other 2.11 versions
4234 *) supports_anon_versioning=yes ;;
4237 # See if GNU ld supports shared libraries.
4240 # On AIX/PPC, the GNU linker is very broken
4241 if test "$host_cpu" != ia64; then
4242 _LT_TAGVAR(ld_shlibs, $1)=no
4245 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4246 *** to be unable to reliably create shared libraries on AIX.
4247 *** Therefore, libtool is disabling shared libraries support. If you
4248 *** really care for shared libraries, you may want to modify your PATH
4249 *** so that a non-GNU linker is found, and then restart.
4258 # see comment about AmigaOS4 .so support
4259 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4260 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4263 _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)'
4264 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4265 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4271 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4272 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4273 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4274 # support --undefined. This deserves some investigation. FIXME
4275 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4277 _LT_TAGVAR(ld_shlibs, $1)=no
4281 cygwin* | mingw* | pw32*)
4282 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4283 # as there is no search path for DLLs.
4284 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4285 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4286 _LT_TAGVAR(always_export_symbols, $1)=no
4287 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4288 _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'
4290 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4291 _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'
4292 # If the export-symbols file already is a .def file (1st line
4293 # is EXPORTS), use it as is; otherwise, prepend...
4294 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4295 cp $export_symbols $output_objdir/$soname.def;
4297 echo EXPORTS > $output_objdir/$soname.def;
4298 cat $export_symbols >> $output_objdir/$soname.def;
4300 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4302 _LT_TAGVAR(ld_shlibs, $1)=no
4307 _LT_TAGVAR(hardcode_direct, $1)=no
4308 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4309 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4310 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4311 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4312 # Instead, shared libraries are loaded at an image base (0x10000000 by
4313 # default) and relocated if they conflict, which is a slow very memory
4314 # consuming and fragmenting process. To avoid this, we pick a random,
4315 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4316 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4317 _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'
4318 _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'
4321 gnu* | linux* | tpf* | k*bsd*-gnu)
4323 if test "$host_os" = linux-dietlibc; then
4324 case $cc_basename in
4325 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4328 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4329 && test "$tmp_diet" = no
4332 tmp_sharedflag='-shared'
4333 case $cc_basename,$host_cpu in
4334 pgcc*) # Portland Group C compiler
4335 _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'
4336 tmp_addflag=' $pic_flag'
4338 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
4339 _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'
4340 tmp_addflag=' $pic_flag -Mnomain' ;;
4341 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4342 tmp_addflag=' -i_dynamic' ;;
4343 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4344 tmp_addflag=' -i_dynamic -nofor_main' ;;
4345 ifc* | ifort*) # Intel Fortran compiler
4346 tmp_addflag=' -nofor_main' ;;
4347 xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
4348 tmp_sharedflag='-qmkshrobj'
4351 case `$CC -V 2>&1 | sed 5q` in
4352 *Sun\ C*) # Sun C 5.9
4353 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
4354 _LT_TAGVAR(compiler_needs_object, $1)=yes
4355 tmp_sharedflag='-G' ;;
4356 *Sun\ F*) # Sun Fortran 8.3
4357 tmp_sharedflag='-G' ;;
4359 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4361 if test "x$supports_anon_versioning" = xyes; then
4362 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4363 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4364 echo "local: *; };" >> $output_objdir/$libname.ver~
4365 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4368 case $cc_basename in
4370 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
4371 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4372 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4373 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4374 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
4375 if test "x$supports_anon_versioning" = xyes; then
4376 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4377 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4378 echo "local: *; };" >> $output_objdir/$libname.ver~
4379 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
4384 _LT_TAGVAR(ld_shlibs, $1)=no
4389 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4390 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4393 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4394 _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'
4399 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4400 _LT_TAGVAR(ld_shlibs, $1)=no
4403 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4404 *** create shared libraries on Solaris systems. Therefore, libtool
4405 *** is disabling shared libraries support. We urge you to upgrade GNU
4406 *** binutils to release 2.9.1 or newer. Another option is to modify
4407 *** your PATH or compiler configuration so that the native linker is
4408 *** used, and then restart.
4411 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4412 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4413 _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'
4415 _LT_TAGVAR(ld_shlibs, $1)=no
4419 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4420 case `$LD -v 2>&1` in
4421 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4422 _LT_TAGVAR(ld_shlibs, $1)=no
4425 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4426 *** reliably create shared libraries on SCO systems. Therefore, libtool
4427 *** is disabling shared libraries support. We urge you to upgrade GNU
4428 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4429 *** your PATH or compiler configuration so that the native linker is
4430 *** used, and then restart.
4435 # For security reasons, it is highly recommended that you always
4436 # use absolute paths for naming shared libraries, and exclude the
4437 # DT_RUNPATH tag from executables and libraries. But doing so
4438 # requires that you compile everything twice, which is a pain.
4439 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4440 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4441 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4442 _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'
4444 _LT_TAGVAR(ld_shlibs, $1)=no
4451 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4453 _LT_TAGVAR(hardcode_direct, $1)=yes
4454 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4458 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4459 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4460 _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'
4462 _LT_TAGVAR(ld_shlibs, $1)=no
4467 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4469 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4470 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4471 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4474 # PORTME fill in a description of your system's linker (not GNU ld)
4477 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4478 _LT_TAGVAR(always_export_symbols, $1)=yes
4479 _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'
4480 # Note: this linker hardcodes the directories in LIBPATH if there
4481 # are no directories specified by -L.
4482 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4483 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4484 # Neither direct hardcoding nor static linking is supported with a
4486 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4491 if test "$host_cpu" = ia64; then
4492 # On IA64, the linker does run time linking by default, so we don't
4493 # have to do anything special.
4494 aix_use_runtimelinking=no
4495 exp_sym_flag='-Bexport'
4498 # If we're using GNU nm, then we don't want the "-C" option.
4499 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4500 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4501 _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'
4503 _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'
4505 aix_use_runtimelinking=no
4507 # Test if we are trying to use run time linking or normal
4508 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4509 # need to do runtime linking.
4510 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4511 for ld_flag in $LDFLAGS; do
4512 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4513 aix_use_runtimelinking=yes
4520 exp_sym_flag='-bexport'
4521 no_entry_flag='-bnoentry'
4524 # When large executables or shared objects are built, AIX ld can
4525 # have problems creating the table of contents. If linking a library
4526 # or program results in "error TOC overflow" add -mminimal-toc to
4527 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4528 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4530 _LT_TAGVAR(archive_cmds, $1)=''
4531 _LT_TAGVAR(hardcode_direct, $1)=yes
4532 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4533 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4534 _LT_TAGVAR(link_all_deplibs, $1)=yes
4535 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4537 if test "$GCC" = yes; then
4538 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4539 # We only want to do this on AIX 4.2 and lower, the check
4540 # below for broken collect2 doesn't work under 4.3+
4541 collect2name=`${CC} -print-prog-name=collect2`
4542 if test -f "$collect2name" &&
4543 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4545 # We have reworked collect2
4548 # We have old collect2
4549 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4550 # It fails to find uninstalled libraries when the uninstalled
4551 # path is not listed in the libpath. Setting hardcode_minus_L
4552 # to unsupported forces relinking
4553 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4554 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4555 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4559 shared_flag='-shared'
4560 if test "$aix_use_runtimelinking" = yes; then
4561 shared_flag="$shared_flag "'${wl}-G'
4565 if test "$host_cpu" = ia64; then
4566 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4567 # chokes on -Wl,-G. The following line is correct:
4570 if test "$aix_use_runtimelinking" = yes; then
4571 shared_flag='${wl}-G'
4573 shared_flag='${wl}-bM:SRE'
4578 # It seems that -bexpall does not export symbols beginning with
4579 # underscore (_), so it is better to generate a list of symbols to export.
4580 _LT_TAGVAR(always_export_symbols, $1)=yes
4581 if test "$aix_use_runtimelinking" = yes; then
4582 # Warning - without using the other runtime loading flags (-brtl),
4583 # -berok will link without error, but may produce a broken library.
4584 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4585 # Determine the default libpath from the value encoded in an
4587 _LT_SYS_MODULE_PATH_AIX
4588 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4589 _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"
4591 if test "$host_cpu" = ia64; then
4592 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4593 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4594 _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"
4596 # Determine the default libpath from the value encoded in an
4598 _LT_SYS_MODULE_PATH_AIX
4599 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4600 # Warning - without using the other run time loading flags,
4601 # -berok will link without error, but may produce a broken library.
4602 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4603 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4604 # Exported symbols can be pulled into shared objects from archives
4605 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4606 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4607 # This is similar to how AIX traditionally builds its shared libraries.
4608 _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'
4616 # see comment about AmigaOS4 .so support
4617 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4618 _LT_TAGVAR(archive_expsym_cmds, $1)=''
4621 _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)'
4622 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4623 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4629 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4632 cygwin* | mingw* | pw32*)
4633 # When not using gcc, we currently assume that we are using
4634 # Microsoft Visual C++.
4635 # hardcode_libdir_flag_spec is actually meaningless, as there is
4636 # no search path for DLLs.
4637 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4638 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4639 # Tell ltmain to make .lib files, not .a files.
4641 # Tell ltmain to make .dll files, not .so files.
4643 # FIXME: Setting linknames here is a bad hack.
4644 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4645 # The linker will automatically build a .lib file if we build a DLL.
4646 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4647 # FIXME: Should let the user specify the lib program.
4648 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
4649 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4650 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4653 darwin* | rhapsody*)
4654 _LT_DARWIN_LINKER_FEATURES($1)
4658 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4659 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4660 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4664 _LT_TAGVAR(ld_shlibs, $1)=no
4667 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4668 # support. Future versions do this automatically, but an explicit c++rt0.o
4669 # does not break anything, and helps significantly (at the cost of a little
4672 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4673 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4674 _LT_TAGVAR(hardcode_direct, $1)=yes
4675 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4678 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4680 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4681 _LT_TAGVAR(hardcode_direct, $1)=yes
4682 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4683 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4686 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4687 freebsd* | dragonfly*)
4688 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4689 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4690 _LT_TAGVAR(hardcode_direct, $1)=yes
4691 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4695 if test "$GCC" = yes; then
4696 _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'
4698 _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'
4700 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4701 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4702 _LT_TAGVAR(hardcode_direct, $1)=yes
4704 # hardcode_minus_L: Not really in the search PATH,
4705 # but as the default location of the library.
4706 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4707 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4711 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4712 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4714 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4716 if test "$with_gnu_ld" = no; then
4717 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4718 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4719 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4720 _LT_TAGVAR(hardcode_direct, $1)=yes
4721 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4722 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4723 # hardcode_minus_L: Not really in the search PATH,
4724 # but as the default location of the library.
4725 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4730 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4733 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4736 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4739 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4745 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4748 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4751 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4755 if test "$with_gnu_ld" = no; then
4756 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4757 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4761 _LT_TAGVAR(hardcode_direct, $1)=no
4762 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4765 _LT_TAGVAR(hardcode_direct, $1)=yes
4766 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4767 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4769 # hardcode_minus_L: Not really in the search PATH,
4770 # but as the default location of the library.
4771 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4777 irix5* | irix6* | nonstopux*)
4778 if test "$GCC" = yes; then
4779 _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'
4780 # Try to use the -exported_symbol ld option, if it does not
4781 # work, assume that -exports_file does not work either and
4782 # implicitly export all symbols.
4783 save_LDFLAGS="$LDFLAGS"
4784 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4785 AC_LINK_IFELSE(int foo(void) {},
4786 _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'
4788 LDFLAGS="$save_LDFLAGS"
4790 _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'
4791 _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'
4793 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4794 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4795 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4796 _LT_TAGVAR(inherit_rpath, $1)=yes
4797 _LT_TAGVAR(link_all_deplibs, $1)=yes
4801 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4802 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
4804 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
4806 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4807 _LT_TAGVAR(hardcode_direct, $1)=yes
4808 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4812 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4813 _LT_TAGVAR(hardcode_direct, $1)=yes
4814 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4815 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4816 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4823 if test -f /usr/libexec/ld.so; then
4824 _LT_TAGVAR(hardcode_direct, $1)=yes
4825 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4826 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4827 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4828 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4829 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4830 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4831 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4834 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4835 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4836 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4839 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4840 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4845 _LT_TAGVAR(ld_shlibs, $1)=no
4850 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4851 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4852 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4853 _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'
4854 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4858 if test "$GCC" = yes; then
4859 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4860 _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'
4862 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4863 _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'
4865 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4866 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4867 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4870 osf4* | osf5*) # as osf3* with the addition of -msym flag
4871 if test "$GCC" = yes; then
4872 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4873 _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'
4874 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4876 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4877 _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'
4878 _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~
4879 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$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'
4881 # Both c and cxx compiler support -rpath directly
4882 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4884 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4885 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4889 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4890 if test "$GCC" = yes; then
4892 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4893 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4894 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4896 case `$CC -V 2>&1` in
4899 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4900 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4901 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4905 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4906 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4907 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4911 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4912 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4914 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4916 # The compiler driver will combine and reorder linker options,
4917 # but understands `-z linker_flag'. GCC discards it without `$wl',
4918 # but is careful enough not to reorder.
4919 # Supported since Solaris 2.6 (maybe 2.5.1?)
4920 if test "$GCC" = yes; then
4921 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4923 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4927 _LT_TAGVAR(link_all_deplibs, $1)=yes
4931 if test "x$host_vendor" = xsequent; then
4932 # Use $CC to link under sequent, because it throws in some extra .o
4933 # files that make .init and .fini sections work.
4934 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4936 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4938 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4939 _LT_TAGVAR(hardcode_direct, $1)=yes
4940 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4941 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4945 case $host_vendor in
4947 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4948 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
4951 ## LD is ld it makes a PLAMLIB
4952 ## CC just makes a GrossModule.
4953 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
4954 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
4955 _LT_TAGVAR(hardcode_direct, $1)=no
4958 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4959 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
4962 runpath_var='LD_RUN_PATH'
4963 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4967 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4968 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4969 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
4973 if test -d /usr/nec; then
4974 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4975 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4976 runpath_var=LD_RUN_PATH
4977 hardcode_runpath_var=yes
4978 _LT_TAGVAR(ld_shlibs, $1)=yes
4982 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4983 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4984 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4985 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4986 runpath_var='LD_RUN_PATH'
4988 if test "$GCC" = yes; then
4989 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4990 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4992 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4993 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4997 sysv5* | sco3.2v5* | sco5v6*)
4998 # Note: We can NOT use -z defs as we might desire, because we do not
4999 # link with -lc, and that would cause any symbols used from libc to
5000 # always be unresolved, which means just about no library would
5001 # ever link correctly. If we're not using GNU ld we use -z text
5002 # though, which does catch some bad symbols but isn't as heavy-handed
5004 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5005 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5006 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5007 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5008 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
5009 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5010 _LT_TAGVAR(link_all_deplibs, $1)=yes
5011 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5012 runpath_var='LD_RUN_PATH'
5014 if test "$GCC" = yes; then
5015 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5016 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5018 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5019 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5024 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5025 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5026 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5030 _LT_TAGVAR(ld_shlibs, $1)=no
5034 if test x$host_vendor = xsni; then
5036 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5037 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
5043 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5044 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5046 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
5048 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
5049 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
5050 _LT_DECL([], [extract_expsyms_cmds], [2],
5051 [The commands to extract the exported symbol list from a shared archive])
5054 # Do we need to explicitly link libc?
5056 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
5058 # Assume -lc should be added
5059 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5061 if test "$enable_shared" = yes && test "$GCC" = yes; then
5062 case $_LT_TAGVAR(archive_cmds, $1) in
5064 # FIXME: we may have to deal with multi-command sequences.
5067 # Test whether the compiler implicitly links with -lc since on some
5068 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5069 # to ld, don't add -lc before -lgcc.
5070 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5072 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5074 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5077 libobjs=conftest.$ac_objext
5079 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
5080 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
5086 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
5087 _LT_TAGVAR(allow_undefined_flag, $1)=
5088 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
5090 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5092 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5094 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5096 cat conftest.err 1>&5
5099 AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
5106 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
5107 [Whether or not to add -lc for building shared libraries])
5108 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
5109 [enable_shared_with_static_runtimes], [0],
5110 [Whether or not to disallow shared libs when runtime libs are static])
5111 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
5112 [Compiler flag to allow reflexive dlopens])
5113 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
5114 [Compiler flag to generate shared objects directly from archives])
5115 _LT_TAGDECL([], [compiler_needs_object], [1],
5116 [Whether the compiler copes with passing no objects directly])
5117 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
5118 [Create an old-style archive from a shared archive])
5119 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
5120 [Create a temporary old-style archive to link instead of a shared archive])
5121 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
5122 _LT_TAGDECL([], [archive_expsym_cmds], [2])
5123 _LT_TAGDECL([], [module_cmds], [2],
5124 [Commands used to build a loadable module if different from building
5126 _LT_TAGDECL([], [module_expsym_cmds], [2])
5127 _LT_TAGDECL([], [with_gnu_ld], [1],
5128 [Whether we are building with GNU ld or not])
5129 _LT_TAGDECL([], [allow_undefined_flag], [1],
5130 [Flag that allows shared libraries with undefined symbols to be built])
5131 _LT_TAGDECL([], [no_undefined_flag], [1],
5132 [Flag that enforces no undefined symbols])
5133 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
5134 [Flag to hardcode $libdir into a binary during linking.
5135 This must work even if $libdir does not exist])
5136 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
5137 [[If ld is used when linking, flag to hardcode $libdir into a binary
5138 during linking. This must work even if $libdir does not exist]])
5139 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
5140 [Whether we need a single "-rpath" flag with a separated argument])
5141 _LT_TAGDECL([], [hardcode_direct], [0],
5142 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5143 DIR into the resulting binary])
5144 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5145 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5146 DIR into the resulting binary and the resulting library dependency is
5147 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5148 library is relocated])
5149 _LT_TAGDECL([], [hardcode_minus_L], [0],
5150 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5151 into the resulting binary])
5152 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5153 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5154 into the resulting binary])
5155 _LT_TAGDECL([], [hardcode_automatic], [0],
5156 [Set to "yes" if building a shared library automatically hardcodes DIR
5157 into the library and all subsequent libraries and executables linked
5159 _LT_TAGDECL([], [inherit_rpath], [0],
5160 [Set to yes if linker adds runtime paths of dependent libraries
5161 to runtime path list])
5162 _LT_TAGDECL([], [link_all_deplibs], [0],
5163 [Whether libtool must link a program against all its dependency libraries])
5164 _LT_TAGDECL([], [fix_srcfile_path], [1],
5165 [Fix the shell variable $srcfile for the compiler])
5166 _LT_TAGDECL([], [always_export_symbols], [0],
5167 [Set to "yes" if exported symbols are required])
5168 _LT_TAGDECL([], [export_symbols_cmds], [2],
5169 [The commands to list exported symbols])
5170 _LT_TAGDECL([], [exclude_expsyms], [1],
5171 [Symbols that should not be listed in the preloaded symbols])
5172 _LT_TAGDECL([], [include_expsyms], [1],
5173 [Symbols that must always be exported])
5174 _LT_TAGDECL([], [prelink_cmds], [2],
5175 [Commands necessary for linking programs (against libraries) with templates])
5176 _LT_TAGDECL([], [file_list_spec], [1],
5177 [Specify filename containing input files])
5178 dnl FIXME: Not yet implemented
5179 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5180 dnl [Compiler flag to generate thread safe objects])
5181 ])# _LT_LINKER_SHLIBS
5184 # _LT_LANG_C_CONFIG([TAG])
5185 # ------------------------
5186 # Ensure that the configuration variables for a C compiler are suitably
5187 # defined. These variables are subsequently used by _LT_CONFIG to write
5188 # the compiler configuration to `libtool'.
5189 m4_defun([_LT_LANG_C_CONFIG],
5190 [m4_require([_LT_DECL_EGREP])dnl
5194 # Source file extension for C test sources.
5197 # Object file extension for compiled C test sources.
5199 _LT_TAGVAR(objext, $1)=$objext
5201 # Code to be used in simple compile tests
5202 lt_simple_compile_test_code="int some_variable = 0;"
5204 # Code to be used in simple link tests
5205 lt_simple_link_test_code='int main(){return(0);}'
5208 # Save the default compiler, since it gets overwritten when the other
5209 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5210 compiler_DEFAULT=$CC
5212 # save warnings/boilerplate of simple test code
5213 _LT_COMPILER_BOILERPLATE
5214 _LT_LINKER_BOILERPLATE
5217 ## There is no encapsulation within the following macros, do not change
5218 ## the running order or otherwise move them around unless you know exactly
5219 ## what you are doing...
5220 if test -n "$compiler"; then
5221 _LT_COMPILER_NO_RTTI($1)
5222 _LT_COMPILER_PIC($1)
5223 _LT_COMPILER_C_O($1)
5224 _LT_COMPILER_FILE_LOCKS($1)
5225 _LT_LINKER_SHLIBS($1)
5226 _LT_SYS_DYNAMIC_LINKER($1)
5227 _LT_LINKER_HARDCODE_LIBPATH($1)
5231 # Report which library types will actually be built
5232 AC_MSG_CHECKING([if libtool supports shared libraries])
5233 AC_MSG_RESULT([$can_build_shared])
5235 AC_MSG_CHECKING([whether to build shared libraries])
5236 test "$can_build_shared" = "no" && enable_shared=no
5238 # On AIX, shared libraries and static libraries use the same namespace, and
5239 # are all built from PIC.
5242 test "$enable_shared" = yes && enable_static=no
5243 if test -n "$RANLIB"; then
5244 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5245 postinstall_cmds='$RANLIB $lib'
5250 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5251 test "$enable_shared" = yes && enable_static=no
5255 AC_MSG_RESULT([$enable_shared])
5257 AC_MSG_CHECKING([whether to build static libraries])
5258 # Make sure either enable_shared or enable_static is yes.
5259 test "$enable_shared" = yes || enable_static=yes
5260 AC_MSG_RESULT([$enable_static])
5266 ])# _LT_LANG_C_CONFIG
5271 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5272 # compiler, we have our own version here.
5273 m4_defun([_LT_PROG_CXX],
5275 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5277 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5278 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5279 (test "X$CXX" != "Xg++"))) ; then
5282 _lt_caught_CXX_error=yes
5284 popdef([AC_MSG_ERROR])
5287 dnl aclocal-1.4 backwards compatibility:
5288 dnl AC_DEFUN([_LT_PROG_CXX], [])
5291 # _LT_LANG_CXX_CONFIG([TAG])
5292 # --------------------------
5293 # Ensure that the configuration variables for a C++ compiler are suitably
5294 # defined. These variables are subsequently used by _LT_CONFIG to write
5295 # the compiler configuration to `libtool'.
5296 m4_defun([_LT_LANG_CXX_CONFIG],
5297 [AC_REQUIRE([_LT_PROG_CXX])dnl
5298 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5299 m4_require([_LT_DECL_EGREP])dnl
5302 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5303 _LT_TAGVAR(allow_undefined_flag, $1)=
5304 _LT_TAGVAR(always_export_symbols, $1)=no
5305 _LT_TAGVAR(archive_expsym_cmds, $1)=
5306 _LT_TAGVAR(compiler_needs_object, $1)=no
5307 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5308 _LT_TAGVAR(hardcode_direct, $1)=no
5309 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5310 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5311 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5312 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5313 _LT_TAGVAR(hardcode_minus_L, $1)=no
5314 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5315 _LT_TAGVAR(hardcode_automatic, $1)=no
5316 _LT_TAGVAR(inherit_rpath, $1)=no
5317 _LT_TAGVAR(module_cmds, $1)=
5318 _LT_TAGVAR(module_expsym_cmds, $1)=
5319 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5320 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5321 _LT_TAGVAR(no_undefined_flag, $1)=
5322 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5323 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5325 # Source file extension for C++ test sources.
5328 # Object file extension for compiled C++ test sources.
5330 _LT_TAGVAR(objext, $1)=$objext
5332 # No sense in running all these tests if we already determined that
5333 # the CXX compiler isn't working. Some variables (like enable_shared)
5334 # are currently assumed to apply to all compilers on this platform,
5335 # and will be corrupted by setting them based on a non-working compiler.
5336 if test "$_lt_caught_CXX_error" != yes; then
5337 # Code to be used in simple compile tests
5338 lt_simple_compile_test_code="int some_variable = 0;"
5340 # Code to be used in simple link tests
5341 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5343 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5346 # save warnings/boilerplate of simple test code
5347 _LT_COMPILER_BOILERPLATE
5348 _LT_LINKER_BOILERPLATE
5350 # Allow CC to be a program name with arguments.
5355 lt_save_with_gnu_ld=$with_gnu_ld
5356 lt_save_path_LD=$lt_cv_path_LD
5357 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5358 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5360 $as_unset lt_cv_prog_gnu_ld
5362 if test -n "${lt_cv_path_LDCXX+set}"; then
5363 lt_cv_path_LD=$lt_cv_path_LDCXX
5365 $as_unset lt_cv_path_LD
5367 test -z "${LDCXX+set}" || LD=$LDCXX
5370 _LT_TAGVAR(compiler, $1)=$CC
5371 _LT_CC_BASENAME([$compiler])
5373 if test -n "$compiler"; then
5374 # We don't want -fno-exception when compiling C++ code, so set the
5375 # no_builtin_flag separately
5376 if test "$GXX" = yes; then
5377 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5379 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5382 if test "$GXX" = yes; then
5383 # Set up default GNU C++ configuration
5387 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5388 # archiving commands below assume that GNU ld is being used.
5389 if test "$with_gnu_ld" = yes; then
5390 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5391 _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'
5393 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5394 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5396 # If archive_cmds runs LD, not CC, wlarc should be empty
5397 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5398 # investigate it a little bit more. (MM)
5401 # ancient GNU ld didn't support --whole-archive et. al.
5402 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5403 $GREP 'no-whole-archive' > /dev/null; then
5404 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5406 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5412 # A generic and very simple default shared library creation
5413 # command for GNU C++ for the case where it uses the native
5414 # linker, instead of GNU ld. If possible, this setting should
5415 # overridden to take advantage of the native linker features on
5416 # the platform it is being used on.
5417 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5420 # Commands to make compiler produce verbose output that lists
5421 # what "hidden" libraries, object files and flags are used when
5422 # linking a shared library.
5423 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5431 # PORTME: fill in a description of your system's C++ link characteristics
5432 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5433 _LT_TAGVAR(ld_shlibs, $1)=yes
5436 # FIXME: insert proper C++ library support
5437 _LT_TAGVAR(ld_shlibs, $1)=no
5440 if test "$host_cpu" = ia64; then
5441 # On IA64, the linker does run time linking by default, so we don't
5442 # have to do anything special.
5443 aix_use_runtimelinking=no
5444 exp_sym_flag='-Bexport'
5447 aix_use_runtimelinking=no
5449 # Test if we are trying to use run time linking or normal
5450 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5451 # need to do runtime linking.
5452 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5453 for ld_flag in $LDFLAGS; do
5456 aix_use_runtimelinking=yes
5464 exp_sym_flag='-bexport'
5465 no_entry_flag='-bnoentry'
5468 # When large executables or shared objects are built, AIX ld can
5469 # have problems creating the table of contents. If linking a library
5470 # or program results in "error TOC overflow" add -mminimal-toc to
5471 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5472 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5474 _LT_TAGVAR(archive_cmds, $1)=''
5475 _LT_TAGVAR(hardcode_direct, $1)=yes
5476 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5477 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5478 _LT_TAGVAR(link_all_deplibs, $1)=yes
5479 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5481 if test "$GXX" = yes; then
5482 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5483 # We only want to do this on AIX 4.2 and lower, the check
5484 # below for broken collect2 doesn't work under 4.3+
5485 collect2name=`${CC} -print-prog-name=collect2`
5486 if test -f "$collect2name" &&
5487 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5489 # We have reworked collect2
5492 # We have old collect2
5493 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5494 # It fails to find uninstalled libraries when the uninstalled
5495 # path is not listed in the libpath. Setting hardcode_minus_L
5496 # to unsupported forces relinking
5497 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5498 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5499 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5502 shared_flag='-shared'
5503 if test "$aix_use_runtimelinking" = yes; then
5504 shared_flag="$shared_flag "'${wl}-G'
5508 if test "$host_cpu" = ia64; then
5509 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5510 # chokes on -Wl,-G. The following line is correct:
5513 if test "$aix_use_runtimelinking" = yes; then
5514 shared_flag='${wl}-G'
5516 shared_flag='${wl}-bM:SRE'
5521 # It seems that -bexpall does not export symbols beginning with
5522 # underscore (_), so it is better to generate a list of symbols to
5524 _LT_TAGVAR(always_export_symbols, $1)=yes
5525 if test "$aix_use_runtimelinking" = yes; then
5526 # Warning - without using the other runtime loading flags (-brtl),
5527 # -berok will link without error, but may produce a broken library.
5528 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5529 # Determine the default libpath from the value encoded in an empty
5531 _LT_SYS_MODULE_PATH_AIX
5532 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5534 _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"
5536 if test "$host_cpu" = ia64; then
5537 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5538 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5539 _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"
5541 # Determine the default libpath from the value encoded in an
5543 _LT_SYS_MODULE_PATH_AIX
5544 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5545 # Warning - without using the other run time loading flags,
5546 # -berok will link without error, but may produce a broken library.
5547 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5548 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5549 # Exported symbols can be pulled into shared objects from archives
5550 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5551 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5552 # This is similar to how AIX traditionally builds its shared
5554 _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'
5560 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5561 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5562 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5563 # support --undefined. This deserves some investigation. FIXME
5564 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5566 _LT_TAGVAR(ld_shlibs, $1)=no
5571 case $cc_basename in
5573 # FIXME: insert proper C++ library support
5574 _LT_TAGVAR(ld_shlibs, $1)=no
5579 cygwin* | mingw* | pw32*)
5580 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5581 # as there is no search path for DLLs.
5582 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5583 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5584 _LT_TAGVAR(always_export_symbols, $1)=no
5585 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5587 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5588 _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'
5589 # If the export-symbols file already is a .def file (1st line
5590 # is EXPORTS), use it as is; otherwise, prepend...
5591 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5592 cp $export_symbols $output_objdir/$soname.def;
5594 echo EXPORTS > $output_objdir/$soname.def;
5595 cat $export_symbols >> $output_objdir/$soname.def;
5597 $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'
5599 _LT_TAGVAR(ld_shlibs, $1)=no
5602 darwin* | rhapsody*)
5603 _LT_DARWIN_LINKER_FEATURES($1)
5607 case $cc_basename in
5609 # FIXME: insert proper C++ library support
5610 _LT_TAGVAR(ld_shlibs, $1)=no
5613 # Green Hills C++ Compiler
5614 # FIXME: insert proper C++ library support
5615 _LT_TAGVAR(ld_shlibs, $1)=no
5618 # FIXME: insert proper C++ library support
5619 _LT_TAGVAR(ld_shlibs, $1)=no
5625 # C++ shared libraries reported to be fairly broken before
5627 _LT_TAGVAR(ld_shlibs, $1)=no
5631 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5634 freebsd* | dragonfly*)
5635 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5637 _LT_TAGVAR(ld_shlibs, $1)=yes
5644 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5645 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5646 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5647 _LT_TAGVAR(hardcode_direct, $1)=yes
5648 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5649 # but as the default
5650 # location of the library.
5652 case $cc_basename in
5654 # FIXME: insert proper C++ library support
5655 _LT_TAGVAR(ld_shlibs, $1)=no
5658 _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'
5659 # Commands to make compiler produce verbose output that lists
5660 # what "hidden" libraries, object files and flags are used when
5661 # linking a shared library.
5663 # There doesn't appear to be a way to prevent this compiler from
5664 # explicitly linking system object files so we need to strip them
5665 # from the output so that they don't get included in the library
5667 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'
5670 if test "$GXX" = yes; then
5671 _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'
5673 # FIXME: insert proper C++ library support
5674 _LT_TAGVAR(ld_shlibs, $1)=no
5681 if test $with_gnu_ld = no; then
5682 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5683 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5689 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5695 _LT_TAGVAR(hardcode_direct, $1)=no
5696 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5699 _LT_TAGVAR(hardcode_direct, $1)=yes
5700 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5701 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5702 # but as the default
5703 # location of the library.
5707 case $cc_basename in
5709 # FIXME: insert proper C++ library support
5710 _LT_TAGVAR(ld_shlibs, $1)=no
5715 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5718 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5721 _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'
5724 # Commands to make compiler produce verbose output that lists
5725 # what "hidden" libraries, object files and flags are used when
5726 # linking a shared library.
5728 # There doesn't appear to be a way to prevent this compiler from
5729 # explicitly linking system object files so we need to strip them
5730 # from the output so that they don't get included in the library
5732 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'
5735 if test "$GXX" = yes; then
5736 if test $with_gnu_ld = no; then
5739 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5742 _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'
5745 _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'
5750 # FIXME: insert proper C++ library support
5751 _LT_TAGVAR(ld_shlibs, $1)=no
5758 _LT_TAGVAR(hardcode_direct, $1)=no
5759 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5760 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5761 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5762 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5763 # Instead, shared libraries are loaded at an image base (0x10000000 by
5764 # default) and relocated if they conflict, which is a slow very memory
5765 # consuming and fragmenting process. To avoid this, we pick a random,
5766 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5767 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5768 _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'
5769 _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'
5772 case $cc_basename in
5775 _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'
5777 # Archives containing C++ object files must be created using
5778 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
5779 # necessary to make sure instantiated templates are included
5781 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5784 if test "$GXX" = yes; then
5785 if test "$with_gnu_ld" = no; then
5786 _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'
5788 _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'
5791 _LT_TAGVAR(link_all_deplibs, $1)=yes
5794 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5795 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5796 _LT_TAGVAR(inherit_rpath, $1)=yes
5799 linux* | k*bsd*-gnu)
5800 case $cc_basename in
5802 # Kuck and Associates, Inc. (KAI) C++ Compiler
5804 # KCC will only create a shared library if the output file
5805 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5806 # to its proper name (with version) after linking.
5807 _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'
5808 _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'
5809 # Commands to make compiler produce verbose output that lists
5810 # what "hidden" libraries, object files and flags are used when
5811 # linking a shared library.
5813 # There doesn't appear to be a way to prevent this compiler from
5814 # explicitly linking system object files so we need to strip them
5815 # from the output so that they don't get included in the library
5817 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'
5819 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5820 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5822 # Archives containing C++ object files must be created using
5823 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5824 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5829 # version 8.0 and above of icpc choke on multiply defined symbols
5830 # if we add $predep_objects and $postdep_objects, however 7.1 and
5831 # earlier do not add the objects themselves.
5832 case `$CC -V 2>&1` in
5834 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5835 _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'
5837 *) # Version 8.0 or newer
5840 ia64*) tmp_idyn=' -i_dynamic';;
5842 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5843 _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'
5846 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5847 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5848 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5849 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5852 # Portland Group C++ compiler
5854 *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
5855 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5857 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5858 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5859 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5861 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5862 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5864 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5866 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5867 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5868 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5870 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5871 $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'
5873 *) # Version 6 will use weak symbols
5874 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5875 _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'
5879 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5880 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5881 _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'
5885 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5886 _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'
5888 runpath_var=LD_RUN_PATH
5889 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5890 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5892 # Commands to make compiler produce verbose output that lists
5893 # what "hidden" libraries, object files and flags are used when
5894 # linking a shared library.
5896 # There doesn't appear to be a way to prevent this compiler from
5897 # explicitly linking system object files so we need to strip them
5898 # from the output so that they don't get included in the library
5900 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'
5903 # IBM XL 8.0 on PPC, with GNU ld
5904 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5905 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5906 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5907 if test "x$supports_anon_versioning" = xyes; then
5908 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5909 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5910 echo "local: *; };" >> $output_objdir/$libname.ver~
5911 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5915 case `$CC -V 2>&1 | sed 5q` in
5918 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5919 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5920 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
5921 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5922 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5923 _LT_TAGVAR(compiler_needs_object, $1)=yes
5925 # Not sure whether something based on
5926 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5928 output_verbose_link_cmd='echo'
5930 # Archives containing C++ object files must be created using
5931 # "CC -xar", where "CC" is the Sun C++ compiler. This is
5932 # necessary to make sure instantiated templates are included
5934 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5942 # FIXME: insert proper C++ library support
5943 _LT_TAGVAR(ld_shlibs, $1)=no
5947 # FIXME: insert proper C++ library support
5948 _LT_TAGVAR(ld_shlibs, $1)=no
5952 case $cc_basename in
5954 # FIXME: insert proper C++ library support
5955 _LT_TAGVAR(ld_shlibs, $1)=no
5958 # FIXME: insert proper C++ library support
5959 _LT_TAGVAR(ld_shlibs, $1)=no
5965 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5966 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
5968 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5969 _LT_TAGVAR(hardcode_direct, $1)=yes
5970 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5972 # Workaround some broken pre-1.5 toolchains
5973 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
5977 _LT_TAGVAR(ld_shlibs, $1)=yes
5981 # C++ shared libraries are fairly broken
5982 _LT_TAGVAR(ld_shlibs, $1)=no
5986 if test -f /usr/libexec/ld.so; then
5987 _LT_TAGVAR(hardcode_direct, $1)=yes
5988 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5989 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5990 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5991 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5992 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5993 _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'
5994 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5995 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5997 output_verbose_link_cmd=echo
5999 _LT_TAGVAR(ld_shlibs, $1)=no
6003 osf3* | osf4* | osf5*)
6004 case $cc_basename in
6006 # Kuck and Associates, Inc. (KAI) C++ Compiler
6008 # KCC will only create a shared library if the output file
6009 # ends with ".so" (or ".sl" for HP-UX), so rename the library
6010 # to its proper name (with version) after linking.
6011 _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'
6013 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6014 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6016 # Archives containing C++ object files must be created using
6017 # the KAI C++ compiler.
6019 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
6020 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
6024 # Rational C++ 2.4.1
6025 # FIXME: insert proper C++ library support
6026 _LT_TAGVAR(ld_shlibs, $1)=no
6031 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6032 _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'
6033 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6036 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6037 _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'
6038 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6039 echo "-hidden">> $lib.exp~
6040 $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~
6042 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6046 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6048 # Commands to make compiler produce verbose output that lists
6049 # what "hidden" libraries, object files and flags are used when
6050 # linking a shared library.
6052 # There doesn't appear to be a way to prevent this compiler from
6053 # explicitly linking system object files so we need to strip them
6054 # from the output so that they don't get included in the library
6056 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'
6059 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6060 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6063 _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'
6066 _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'
6070 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6071 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6073 # Commands to make compiler produce verbose output that lists
6074 # what "hidden" libraries, object files and flags are used when
6075 # linking a shared library.
6076 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6079 # FIXME: insert proper C++ library support
6080 _LT_TAGVAR(ld_shlibs, $1)=no
6087 # FIXME: insert proper C++ library support
6088 _LT_TAGVAR(ld_shlibs, $1)=no
6092 case $cc_basename in
6095 # FIXME: insert proper C++ library support
6096 _LT_TAGVAR(ld_shlibs, $1)=no
6100 # FIXME: insert proper C++ library support
6101 _LT_TAGVAR(ld_shlibs, $1)=no
6104 # FIXME: insert proper C++ library support
6105 _LT_TAGVAR(ld_shlibs, $1)=no
6111 case $cc_basename in
6113 # Sun C++ 4.2, 5.x and Centerline C++
6114 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6115 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6116 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6117 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6118 $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'
6120 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6121 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6123 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6125 # The compiler driver will combine and reorder linker options,
6126 # but understands `-z linker_flag'.
6127 # Supported since Solaris 2.6 (maybe 2.5.1?)
6128 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6131 _LT_TAGVAR(link_all_deplibs, $1)=yes
6133 output_verbose_link_cmd='echo'
6135 # Archives containing C++ object files must be created using
6136 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6137 # necessary to make sure instantiated templates are included
6139 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6142 # Green Hills C++ Compiler
6143 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6145 # The C++ compiler must be used to create the archive.
6146 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6149 # GNU C++ compiler with Solaris linker
6150 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6151 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6152 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6153 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6154 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6155 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6157 # Commands to make compiler produce verbose output that lists
6158 # what "hidden" libraries, object files and flags are used when
6159 # linking a shared library.
6160 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6162 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6164 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6165 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6166 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6168 # Commands to make compiler produce verbose output that lists
6169 # what "hidden" libraries, object files and flags are used when
6170 # linking a shared library.
6171 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6174 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6176 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6178 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6186 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6187 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6188 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6189 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6190 runpath_var='LD_RUN_PATH'
6192 case $cc_basename in
6194 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6195 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6198 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6199 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6204 sysv5* | sco3.2v5* | sco5v6*)
6205 # Note: We can NOT use -z defs as we might desire, because we do not
6206 # link with -lc, and that would cause any symbols used from libc to
6207 # always be unresolved, which means just about no library would
6208 # ever link correctly. If we're not using GNU ld we use -z text
6209 # though, which does catch some bad symbols but isn't as heavy-handed
6211 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6212 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6213 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6214 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6215 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6216 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6217 _LT_TAGVAR(link_all_deplibs, $1)=yes
6218 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6219 runpath_var='LD_RUN_PATH'
6221 case $cc_basename in
6223 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6224 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6227 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6228 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6234 case $cc_basename in
6236 # NonStop-UX NCC 3.20
6237 # FIXME: insert proper C++ library support
6238 _LT_TAGVAR(ld_shlibs, $1)=no
6241 # FIXME: insert proper C++ library support
6242 _LT_TAGVAR(ld_shlibs, $1)=no
6248 # FIXME: insert proper C++ library support
6249 _LT_TAGVAR(ld_shlibs, $1)=no
6253 # FIXME: insert proper C++ library support
6254 _LT_TAGVAR(ld_shlibs, $1)=no
6258 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6259 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6261 _LT_TAGVAR(GCC, $1)="$GXX"
6262 _LT_TAGVAR(LD, $1)="$LD"
6265 ## There is no encapsulation within the following macros, do not change
6266 ## the running order or otherwise move them around unless you know exactly
6267 ## what you are doing...
6268 _LT_SYS_HIDDEN_LIBDEPS($1)
6269 _LT_COMPILER_PIC($1)
6270 _LT_COMPILER_C_O($1)
6271 _LT_COMPILER_FILE_LOCKS($1)
6272 _LT_LINKER_SHLIBS($1)
6273 _LT_SYS_DYNAMIC_LINKER($1)
6274 _LT_LINKER_HARDCODE_LIBPATH($1)
6277 fi # test -n "$compiler"
6283 with_gnu_ld=$lt_save_with_gnu_ld
6284 lt_cv_path_LDCXX=$lt_cv_path_LD
6285 lt_cv_path_LD=$lt_save_path_LD
6286 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6287 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6288 fi # test "$_lt_caught_CXX_error" != yes
6291 ])# _LT_LANG_CXX_CONFIG
6294 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6295 # ---------------------------------
6296 # Figure out "hidden" library dependencies from verbose
6297 # compiler output when linking a shared library.
6298 # Parse the compiler output and extract the necessary
6299 # objects, libraries and library flags.
6300 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6301 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6302 # Dependencies to place before and after the object being linked:
6303 _LT_TAGVAR(predep_objects, $1)=
6304 _LT_TAGVAR(postdep_objects, $1)=
6305 _LT_TAGVAR(predeps, $1)=
6306 _LT_TAGVAR(postdeps, $1)=
6307 _LT_TAGVAR(compiler_lib_search_path, $1)=
6309 dnl we can't use the lt_simple_compile_test_code here,
6310 dnl because it contains code intended for an executable,
6311 dnl not a library. It's possible we should let each
6312 dnl tag define a new lt_????_link_test_code variable,
6313 dnl but it's only used here...
6314 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6316 void foo (void) { a = 0; }
6318 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6322 Foo (void) { a = 0; }
6327 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6335 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6343 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6346 public void bar (void) {
6352 dnl Parse the compiler output and extract the necessary
6353 dnl objects, libraries and library flags.
6354 if AC_TRY_EVAL(ac_compile); then
6355 # Parse the compiler output and extract the necessary
6356 # objects, libraries and library flags.
6358 # Sentinel used to keep track of whether or not we are before
6359 # the conftest object file.
6360 pre_test_object_deps_done=no
6362 for p in `eval "$output_verbose_link_cmd"`; do
6366 # Some compilers place space between "-{L,R}" and the path.
6368 if test $p = "-L" ||
6369 test $p = "-R"; then
6376 if test "$pre_test_object_deps_done" = no; then
6379 # Internal compiler library paths should come after those
6380 # provided the user. The postdeps already come after the
6381 # user supplied libs so there is no need to process them.
6382 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6383 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6385 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6388 # The "-l" case would never come before the object being
6389 # linked, so don't bother handling this case.
6392 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6393 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6395 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6401 # This assumes that the test object file only shows up
6402 # once in the compiler output.
6403 if test "$p" = "conftest.$objext"; then
6404 pre_test_object_deps_done=yes
6408 if test "$pre_test_object_deps_done" = no; then
6409 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6410 _LT_TAGVAR(predep_objects, $1)="$p"
6412 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6415 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6416 _LT_TAGVAR(postdep_objects, $1)="$p"
6418 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6423 *) ;; # Ignore the rest.
6431 echo "libtool.m4: error: problem compiling $1 test program"
6434 $RM -f confest.$objext
6436 # PORTME: override above test on systems where it is broken
6440 # Interix 3.5 installs completely hosed .la files for C++, so rather than
6441 # hack all around it, let's just trust "g++" to DTRT.
6442 _LT_TAGVAR(predep_objects,$1)=
6443 _LT_TAGVAR(postdep_objects,$1)=
6444 _LT_TAGVAR(postdeps,$1)=
6448 case `$CC -V 2>&1 | sed 5q` in
6452 # The more standards-conforming stlport4 library is
6453 # incompatible with the Cstd library. Avoid specifying
6454 # it if it's in CXXFLAGS. Ignore libCrun as
6455 # -library=stlport4 depends on it.
6456 case " $CXX $CXXFLAGS " in
6457 *" -library=stlport4 "*)
6458 solaris_use_stlport4=yes
6462 if test "$solaris_use_stlport4" != yes; then
6463 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6470 case $cc_basename in
6472 # The more standards-conforming stlport4 library is
6473 # incompatible with the Cstd library. Avoid specifying
6474 # it if it's in CXXFLAGS. Ignore libCrun as
6475 # -library=stlport4 depends on it.
6476 case " $CXX $CXXFLAGS " in
6477 *" -library=stlport4 "*)
6478 solaris_use_stlport4=yes
6482 # Adding this requires a known-good setup of shared libraries for
6483 # Sun compiler versions before 5.6, else PIC objects from an old
6484 # archive will be linked into the output, leading to subtle bugs.
6485 if test "$solaris_use_stlport4" != yes; then
6486 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6494 case " $_LT_TAGVAR(postdeps, $1) " in
6495 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6497 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
6498 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
6499 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
6501 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
6502 [The directories searched by this compiler when creating a shared library])
6503 _LT_TAGDECL([], [predep_objects], [1],
6504 [Dependencies to place before and after the objects being linked to
6505 create a shared library])
6506 _LT_TAGDECL([], [postdep_objects], [1])
6507 _LT_TAGDECL([], [predeps], [1])
6508 _LT_TAGDECL([], [postdeps], [1])
6509 _LT_TAGDECL([], [compiler_lib_search_path], [1],
6510 [The library search path used internally by the compiler when linking
6512 ])# _LT_SYS_HIDDEN_LIBDEPS
6517 # Since AC_PROG_F77 is broken, in that it returns the empty string
6518 # if there is no fortran compiler, we have our own version here.
6519 m4_defun([_LT_PROG_F77],
6521 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6523 if test -z "$F77" || test "X$F77" = "Xno"; then
6526 popdef([AC_MSG_ERROR])
6529 dnl aclocal-1.4 backwards compatibility:
6530 dnl AC_DEFUN([_LT_PROG_F77], [])
6533 # _LT_LANG_F77_CONFIG([TAG])
6534 # --------------------------
6535 # Ensure that the configuration variables for a Fortran 77 compiler are
6536 # suitably defined. These variables are subsequently used by _LT_CONFIG
6537 # to write the compiler configuration to `libtool'.
6538 m4_defun([_LT_LANG_F77_CONFIG],
6539 [AC_REQUIRE([_LT_PROG_F77])dnl
6540 AC_LANG_PUSH(Fortran 77)
6542 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6543 _LT_TAGVAR(allow_undefined_flag, $1)=
6544 _LT_TAGVAR(always_export_symbols, $1)=no
6545 _LT_TAGVAR(archive_expsym_cmds, $1)=
6546 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6547 _LT_TAGVAR(hardcode_direct, $1)=no
6548 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6549 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6550 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6551 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6552 _LT_TAGVAR(hardcode_minus_L, $1)=no
6553 _LT_TAGVAR(hardcode_automatic, $1)=no
6554 _LT_TAGVAR(inherit_rpath, $1)=no
6555 _LT_TAGVAR(module_cmds, $1)=
6556 _LT_TAGVAR(module_expsym_cmds, $1)=
6557 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6558 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6559 _LT_TAGVAR(no_undefined_flag, $1)=
6560 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6561 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6563 # Source file extension for f77 test sources.
6566 # Object file extension for compiled f77 test sources.
6568 _LT_TAGVAR(objext, $1)=$objext
6570 # No sense in running all these tests if we already determined that
6571 # the F77 compiler isn't working. Some variables (like enable_shared)
6572 # are currently assumed to apply to all compilers on this platform,
6573 # and will be corrupted by setting them based on a non-working compiler.
6574 if test "$_lt_disable_F77" != yes; then
6575 # Code to be used in simple compile tests
6576 lt_simple_compile_test_code="\
6582 # Code to be used in simple link tests
6583 lt_simple_link_test_code="\
6588 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6591 # save warnings/boilerplate of simple test code
6592 _LT_COMPILER_BOILERPLATE
6593 _LT_LINKER_BOILERPLATE
6595 # Allow CC to be a program name with arguments.
6600 _LT_TAGVAR(compiler, $1)=$CC
6601 _LT_CC_BASENAME([$compiler])
6603 if test -n "$compiler"; then
6604 AC_MSG_CHECKING([if libtool supports shared libraries])
6605 AC_MSG_RESULT([$can_build_shared])
6607 AC_MSG_CHECKING([whether to build shared libraries])
6608 test "$can_build_shared" = "no" && enable_shared=no
6610 # On AIX, shared libraries and static libraries use the same namespace, and
6611 # are all built from PIC.
6614 test "$enable_shared" = yes && enable_static=no
6615 if test -n "$RANLIB"; then
6616 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6617 postinstall_cmds='$RANLIB $lib'
6621 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6622 test "$enable_shared" = yes && enable_static=no
6626 AC_MSG_RESULT([$enable_shared])
6628 AC_MSG_CHECKING([whether to build static libraries])
6629 # Make sure either enable_shared or enable_static is yes.
6630 test "$enable_shared" = yes || enable_static=yes
6631 AC_MSG_RESULT([$enable_static])
6633 _LT_TAGVAR(GCC, $1)="$G77"
6634 _LT_TAGVAR(LD, $1)="$LD"
6637 ## There is no encapsulation within the following macros, do not change
6638 ## the running order or otherwise move them around unless you know exactly
6639 ## what you are doing...
6640 _LT_COMPILER_PIC($1)
6641 _LT_COMPILER_C_O($1)
6642 _LT_COMPILER_FILE_LOCKS($1)
6643 _LT_LINKER_SHLIBS($1)
6644 _LT_SYS_DYNAMIC_LINKER($1)
6645 _LT_LINKER_HARDCODE_LIBPATH($1)
6648 fi # test -n "$compiler"
6652 fi # test "$_lt_disable_F77" != yes
6655 ])# _LT_LANG_F77_CONFIG
6660 # Since AC_PROG_FC is broken, in that it returns the empty string
6661 # if there is no fortran compiler, we have our own version here.
6662 m4_defun([_LT_PROG_FC],
6664 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6666 if test -z "$FC" || test "X$FC" = "Xno"; then
6669 popdef([AC_MSG_ERROR])
6672 dnl aclocal-1.4 backwards compatibility:
6673 dnl AC_DEFUN([_LT_PROG_FC], [])
6676 # _LT_LANG_FC_CONFIG([TAG])
6677 # -------------------------
6678 # Ensure that the configuration variables for a Fortran compiler are
6679 # suitably defined. These variables are subsequently used by _LT_CONFIG
6680 # to write the compiler configuration to `libtool'.
6681 m4_defun([_LT_LANG_FC_CONFIG],
6682 [AC_REQUIRE([_LT_PROG_FC])dnl
6683 AC_LANG_PUSH(Fortran)
6685 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6686 _LT_TAGVAR(allow_undefined_flag, $1)=
6687 _LT_TAGVAR(always_export_symbols, $1)=no
6688 _LT_TAGVAR(archive_expsym_cmds, $1)=
6689 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6690 _LT_TAGVAR(hardcode_direct, $1)=no
6691 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6692 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6693 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6694 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6695 _LT_TAGVAR(hardcode_minus_L, $1)=no
6696 _LT_TAGVAR(hardcode_automatic, $1)=no
6697 _LT_TAGVAR(inherit_rpath, $1)=no
6698 _LT_TAGVAR(module_cmds, $1)=
6699 _LT_TAGVAR(module_expsym_cmds, $1)=
6700 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6701 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6702 _LT_TAGVAR(no_undefined_flag, $1)=
6703 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6704 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6706 # Source file extension for fc test sources.
6707 ac_ext=${ac_fc_srcext-f}
6709 # Object file extension for compiled fc test sources.
6711 _LT_TAGVAR(objext, $1)=$objext
6713 # No sense in running all these tests if we already determined that
6714 # the FC compiler isn't working. Some variables (like enable_shared)
6715 # are currently assumed to apply to all compilers on this platform,
6716 # and will be corrupted by setting them based on a non-working compiler.
6717 if test "$_lt_disable_FC" != yes; then
6718 # Code to be used in simple compile tests
6719 lt_simple_compile_test_code="\
6725 # Code to be used in simple link tests
6726 lt_simple_link_test_code="\
6731 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6734 # save warnings/boilerplate of simple test code
6735 _LT_COMPILER_BOILERPLATE
6736 _LT_LINKER_BOILERPLATE
6738 # Allow CC to be a program name with arguments.
6743 GCC=$ac_cv_fc_compiler_gnu
6745 _LT_TAGVAR(compiler, $1)=$CC
6746 _LT_CC_BASENAME([$compiler])
6748 if test -n "$compiler"; then
6749 AC_MSG_CHECKING([if libtool supports shared libraries])
6750 AC_MSG_RESULT([$can_build_shared])
6752 AC_MSG_CHECKING([whether to build shared libraries])
6753 test "$can_build_shared" = "no" && enable_shared=no
6755 # On AIX, shared libraries and static libraries use the same namespace, and
6756 # are all built from PIC.
6759 test "$enable_shared" = yes && enable_static=no
6760 if test -n "$RANLIB"; then
6761 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6762 postinstall_cmds='$RANLIB $lib'
6766 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6767 test "$enable_shared" = yes && enable_static=no
6771 AC_MSG_RESULT([$enable_shared])
6773 AC_MSG_CHECKING([whether to build static libraries])
6774 # Make sure either enable_shared or enable_static is yes.
6775 test "$enable_shared" = yes || enable_static=yes
6776 AC_MSG_RESULT([$enable_static])
6778 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6779 _LT_TAGVAR(LD, $1)="$LD"
6782 ## There is no encapsulation within the following macros, do not change
6783 ## the running order or otherwise move them around unless you know exactly
6784 ## what you are doing...
6785 _LT_SYS_HIDDEN_LIBDEPS($1)
6786 _LT_COMPILER_PIC($1)
6787 _LT_COMPILER_C_O($1)
6788 _LT_COMPILER_FILE_LOCKS($1)
6789 _LT_LINKER_SHLIBS($1)
6790 _LT_SYS_DYNAMIC_LINKER($1)
6791 _LT_LINKER_HARDCODE_LIBPATH($1)
6794 fi # test -n "$compiler"
6798 fi # test "$_lt_disable_FC" != yes
6801 ])# _LT_LANG_FC_CONFIG
6804 # _LT_LANG_GCJ_CONFIG([TAG])
6805 # --------------------------
6806 # Ensure that the configuration variables for the GNU Java Compiler compiler
6807 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6808 # to write the compiler configuration to `libtool'.
6809 m4_defun([_LT_LANG_GCJ_CONFIG],
6810 [AC_REQUIRE([LT_PROG_GCJ])dnl
6813 # Source file extension for Java test sources.
6816 # Object file extension for compiled Java test sources.
6818 _LT_TAGVAR(objext, $1)=$objext
6820 # Code to be used in simple compile tests
6821 lt_simple_compile_test_code="class foo {}"
6823 # Code to be used in simple link tests
6824 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
6826 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6829 # save warnings/boilerplate of simple test code
6830 _LT_COMPILER_BOILERPLATE
6831 _LT_LINKER_BOILERPLATE
6833 # Allow CC to be a program name with arguments.
6839 _LT_TAGVAR(compiler, $1)=$CC
6840 _LT_TAGVAR(LD, $1)="$LD"
6841 _LT_CC_BASENAME([$compiler])
6843 # GCJ did not exist at the time GCC didn't implicitly link libc in.
6844 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6846 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6849 ## There is no encapsulation within the following macros, do not change
6850 ## the running order or otherwise move them around unless you know exactly
6851 ## what you are doing...
6852 if test -n "$compiler"; then
6853 _LT_COMPILER_NO_RTTI($1)
6854 _LT_COMPILER_PIC($1)
6855 _LT_COMPILER_C_O($1)
6856 _LT_COMPILER_FILE_LOCKS($1)
6857 _LT_LINKER_SHLIBS($1)
6858 _LT_LINKER_HARDCODE_LIBPATH($1)
6867 ])# _LT_LANG_GCJ_CONFIG
6870 # _LT_LANG_RC_CONFIG([TAG])
6871 # -------------------------
6872 # Ensure that the configuration variables for the Windows resource compiler
6873 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6874 # to write the compiler configuration to `libtool'.
6875 m4_defun([_LT_LANG_RC_CONFIG],
6876 [AC_REQUIRE([LT_PROG_RC])dnl
6879 # Source file extension for RC test sources.
6882 # Object file extension for compiled RC test sources.
6884 _LT_TAGVAR(objext, $1)=$objext
6886 # Code to be used in simple compile tests
6887 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
6889 # Code to be used in simple link tests
6890 lt_simple_link_test_code="$lt_simple_compile_test_code"
6892 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6895 # save warnings/boilerplate of simple test code
6896 _LT_COMPILER_BOILERPLATE
6897 _LT_LINKER_BOILERPLATE
6899 # Allow CC to be a program name with arguments.
6905 _LT_TAGVAR(compiler, $1)=$CC
6906 _LT_CC_BASENAME([$compiler])
6907 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6909 if test -n "$compiler"; then
6917 ])# _LT_LANG_RC_CONFIG
6922 AC_DEFUN([LT_PROG_GCJ],
6923 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6924 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6925 [AC_CHECK_TOOL(GCJ, gcj,)
6926 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6927 AC_SUBST(GCJFLAGS)])])[]dnl
6931 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
6932 dnl aclocal-1.4 backwards compatibility:
6933 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
6938 AC_DEFUN([LT_PROG_RC],
6939 [AC_CHECK_TOOL(RC, windres,)
6943 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
6944 dnl aclocal-1.4 backwards compatibility:
6945 dnl AC_DEFUN([LT_AC_PROG_RC], [])
6950 # If we don't have a new enough Autoconf to choose the best grep
6951 # available, choose the one first in the user's PATH.
6952 m4_defun([_LT_DECL_EGREP],
6953 [AC_REQUIRE([AC_PROG_EGREP])dnl
6954 AC_REQUIRE([AC_PROG_FGREP])dnl
6955 test -z "$GREP" && GREP=grep
6956 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
6957 _LT_DECL([], [EGREP], [1], [An ERE matcher])
6958 _LT_DECL([], [FGREP], [1], [A literal string matcher])
6959 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
6966 # Check for a fully-functional sed program, that truncates
6967 # as few characters as possible. Prefer GNU sed if found.
6968 m4_defun([_LT_DECL_SED],
6970 test -z "$SED" && SED=sed
6971 Xsed="$SED -e 1s/^X//"
6972 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
6973 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
6974 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
6977 m4_ifndef([AC_PROG_SED], [
6978 ############################################################
6979 # NOTE: This macro has been submitted for inclusion into #
6980 # GNU Autoconf as AC_PROG_SED. When it is available in #
6981 # a released version of Autoconf we should remove this #
6982 # macro and use it instead. #
6983 ############################################################
6985 m4_defun([AC_PROG_SED],
6986 [AC_MSG_CHECKING([for a sed that does not truncate output])
6987 AC_CACHE_VAL(lt_cv_path_SED,
6988 [# Loop through the user's path and test for sed and gsed.
6989 # Then use that list of sed's as ones to test for truncation.
6990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6994 test -z "$as_dir" && as_dir=.
6995 for lt_ac_prog in sed gsed; do
6996 for ac_exec_ext in '' $ac_executable_extensions; do
6997 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6998 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7006 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7007 # along with /bin/sed that truncates output.
7008 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7009 test ! -f $lt_ac_sed && continue
7010 cat /dev/null > conftest.in
7012 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7013 # Check for GNU sed and select it if it is found.
7014 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7015 lt_cv_path_SED=$lt_ac_sed
7019 cat conftest.in conftest.in >conftest.tmp
7020 mv conftest.tmp conftest.in
7021 cp conftest.in conftest.nl
7023 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7024 cmp -s conftest.out conftest.nl || break
7025 # 10000 chars as input seems more than enough
7026 test $lt_ac_count -gt 10 && break
7027 lt_ac_count=`expr $lt_ac_count + 1`
7028 if test $lt_ac_count -gt $lt_ac_max; then
7029 lt_ac_max=$lt_ac_count
7030 lt_cv_path_SED=$lt_ac_sed
7037 AC_MSG_RESULT([$SED])
7042 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
7043 dnl aclocal-1.4 backwards compatibility:
7044 dnl AC_DEFUN([LT_AC_PROG_SED], [])
7047 # _LT_CHECK_SHELL_FEATURES
7048 # ------------------------
7049 # Find out whether the shell is Bourne or XSI compatible,
7050 # or has some other useful features.
7051 m4_defun([_LT_CHECK_SHELL_FEATURES],
7052 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7053 # Try some XSI features
7056 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
7057 = c,a/b,, ) >/dev/null 2>&1 \
7059 AC_MSG_RESULT([$xsi_shell])
7060 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7062 AC_MSG_CHECKING([whether the shell understands "+="])
7064 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7066 && lt_shell_append=yes
7067 AC_MSG_RESULT([$lt_shell_append])
7068 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7070 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7075 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
7077 # test EBCDIC or ASCII
7078 case `echo X|tr X '\101'` in
7079 A) # ASCII based system
7080 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7081 lt_SP2NL='tr \040 \012'
7082 lt_NL2SP='tr \015\012 \040\040'
7084 *) # EBCDIC based system
7085 lt_SP2NL='tr \100 \n'
7086 lt_NL2SP='tr \r\n \100\100'
7089 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
7090 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
7091 ])# _LT_CHECK_SHELL_FEATURES
7094 # _LT_PROG_XSI_SHELLFNS
7095 # ---------------------
7096 # Bourne and XSI compatible variants of some useful shell functions.
7097 m4_defun([_LT_PROG_XSI_SHELLFNS],
7100 cat << \_LT_EOF >> "$cfgfile"
7101 # func_dirname file append nondir_replacement
7102 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7103 # otherwise set result to NONDIR_REPLACEMENT.
7107 */*) func_dirname_result="${1%/*}${2}" ;;
7108 * ) func_dirname_result="${3}" ;;
7112 # func_basename file
7115 func_basename_result="${1##*/}"
7118 # func_dirname_and_basename file append nondir_replacement
7119 # perform func_basename and func_dirname in a single function
7121 # dirname: Compute the dirname of FILE. If nonempty,
7122 # add APPEND to the result, otherwise set result
7123 # to NONDIR_REPLACEMENT.
7124 # value returned in "$func_dirname_result"
7125 # basename: Compute filename of FILE.
7126 # value retuned in "$func_basename_result"
7127 # Implementation must be kept synchronized with func_dirname
7128 # and func_basename. For efficiency, we do not delegate to
7129 # those functions but instead duplicate the functionality here.
7130 func_dirname_and_basename ()
7133 */*) func_dirname_result="${1%/*}${2}" ;;
7134 * ) func_dirname_result="${3}" ;;
7136 func_basename_result="${1##*/}"
7139 # func_stripname prefix suffix name
7140 # strip PREFIX and SUFFIX off of NAME.
7141 # PREFIX and SUFFIX must not contain globbing or regex special
7142 # characters, hashes, percent signs, but SUFFIX may contain a leading
7143 # dot (in which case that matches only a dot).
7146 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7147 # positional parameters, so assign one to ordinary parameter first.
7148 func_stripname_result=${3}
7149 func_stripname_result=${func_stripname_result#"${1}"}
7150 func_stripname_result=${func_stripname_result%"${2}"}
7156 func_opt_split_opt=${1%%=*}
7157 func_opt_split_arg=${1#*=}
7164 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7165 *) func_lo2o_result=${1} ;;
7170 *) # Bourne compatible functions.
7171 cat << \_LT_EOF >> "$cfgfile"
7172 # func_dirname file append nondir_replacement
7173 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7174 # otherwise set result to NONDIR_REPLACEMENT.
7177 # Extract subdirectory from the argument.
7178 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7179 if test "X$func_dirname_result" = "X${1}"; then
7180 func_dirname_result="${3}"
7182 func_dirname_result="$func_dirname_result${2}"
7186 # func_basename file
7189 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7192 # func_dirname_and_basename file append nondir_replacement
7193 # perform func_basename and func_dirname in a single function
7195 # dirname: Compute the dirname of FILE. If nonempty,
7196 # add APPEND to the result, otherwise set result
7197 # to NONDIR_REPLACEMENT.
7198 # value returned in "$func_dirname_result"
7199 # basename: Compute filename of FILE.
7200 # value retuned in "$func_basename_result"
7201 # Implementation must be kept synchronized with func_dirname
7202 # and func_basename. For efficiency, we do not delegate to
7203 # those functions but instead duplicate the functionality here.
7204 func_dirname_and_basename ()
7206 # Extract subdirectory from the argument.
7207 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7208 if test "X$func_dirname_result" = "X${1}"; then
7209 func_dirname_result="${3}"
7211 func_dirname_result="$func_dirname_result${2}"
7213 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7216 # func_stripname prefix suffix name
7217 # strip PREFIX and SUFFIX off of NAME.
7218 # PREFIX and SUFFIX must not contain globbing or regex special
7219 # characters, hashes, percent signs, but SUFFIX may contain a leading
7220 # dot (in which case that matches only a dot).
7221 # func_strip_suffix prefix name
7225 .*) func_stripname_result=`$ECHO "X${3}" \
7226 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7227 *) func_stripname_result=`$ECHO "X${3}" \
7228 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7233 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
7234 my_sed_long_arg='1s/^-[[^=]]*=//'
7239 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
7240 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
7246 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
7251 case $lt_shell_append in
7253 cat << \_LT_EOF >> "$cfgfile"
7255 # func_append var value
7256 # Append VALUE to the end of shell variable VAR.
7264 cat << \_LT_EOF >> "$cfgfile"
7266 # func_append var value
7267 # Append VALUE to the end of shell variable VAR.
7270 eval "$[1]=\$$[1]\$[2]"