1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
4 # 2006 Free Software Foundation, Inc.
6 # This file is part of GNU Libtool:
7 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9 # This file is free software; the Free Software Foundation gives
10 # unlimited permission to copy and/or distribute it, with or without
11 # modifications, as long as this notice is preserved.
13 m4_define([_LT_COPYING], [dnl
14 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
15 # 2006 Free Software Foundation, Inc.
17 # This file is part of GNU Libtool:
18 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
20 # This program is free software; you can redistribute it and/or modify
21 # it under the terms of the GNU General Public License as published by
22 # the Free Software Foundation; either version 2 of the License, or
23 # (at your option) any later version.
25 # This program is distributed in the hope that it will be useful, but
26 # WITHOUT ANY WARRANTY; without even the implied warranty of
27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28 # General Public License for more details.
30 # You should have received a copy of the GNU General Public License
31 # along with this program; if not, write to the Free Software
32 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
34 # As a special exception to the GNU General Public License, if you
35 # distribute this file as part of a program that contains a
36 # configuration script generated by Autoconf, you may include it under
37 # the same distribution terms that you use for the rest of that program.
45 # Complain and exit if this libtool version is less that VERSION.
47 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
49 [m4_fatal([Libtool version $1 or higher is required],
57 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
58 AC_BEFORE([$0], [LT_LANG])dnl
59 AC_BEFORE([$0], [LT_OUTPUT])dnl
61 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
62 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
63 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
64 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
65 dnl unless we require an AC_DEFUNed macro:
66 AC_REQUIRE([LTOPTIONS_VERSION])dnl
67 AC_REQUIRE([LTSUGAR_VERSION])dnl
68 AC_REQUIRE([LTVERSION_VERSION])dnl
69 m4_require([_LT_PROG_LTMAIN])dnl
70 m4_require([_LT_SET_OPTIONS], [_LT_SET_OPTIONS([$1])])dnl
72 # This can be used to rebuild libtool when needed
73 LIBTOOL_DEPS="$ltmain"
75 # Always use our own libtool.
76 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
86 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
87 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
88 dnl aclocal-1.4 backwards compatibility:
89 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
90 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
95 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
96 m4_defun([_LT_CC_BASENAME],
97 [for cc_temp in $1""; do
99 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
100 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
105 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
109 # _LT_FILEUTILS_DEFAULTS
110 # ----------------------
111 # It is okay to use these file commands and assume they have been set
112 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
113 m4_defun([_LT_FILEUTILS_DEFAULTS],
117 ])# _LT_FILEUTILS_DEFAULTS
122 m4_defun([_LT_SETUP],
123 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
124 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
125 _LT_DECL([], [host_alias], [0], [The host system])dnl
126 _LT_DECL([], [host], [0])dnl
127 _LT_DECL([], [host_os], [0])dnl
129 _LT_DECL([], [build_alias], [0], [The build system])dnl
130 _LT_DECL([], [build], [0])dnl
131 _LT_DECL([], [build_os], [0])dnl
133 AC_REQUIRE([AC_PROG_CC])dnl
134 AC_REQUIRE([LT_PATH_LD])dnl
135 AC_REQUIRE([LT_PATH_NM])dnl
137 AC_REQUIRE([AC_PROG_LN_S])dnl
138 test -z "$LN_S" && LN_S="ln -s"
139 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
141 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
142 AC_REQUIRE([AC_OBJEXT])dnl
143 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
144 AC_REQUIRE([AC_EXEEXT])dnl
145 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
147 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
148 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
149 m4_require([_LT_CMD_RELOAD])dnl
150 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
151 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
152 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
154 _LT_CONFIG_LIBTOOL_INIT([
155 # See if we are running on zsh, and set the options which allow our
156 # commands through without removal of \ escapes INIT.
157 if test -n "\${ZSH_VERSION+set}" ; then
161 if test -n "${ZSH_VERSION+set}" ; then
167 m4_require([_LT_TAG_COMPILER])dnl
168 _LT_PROG_ECHO_BACKSLASH
172 # AIX sometimes has problems with the GCC collect2 program. For some
173 # reason, if we set the COLLECT_NAMES environment variable, the problems
174 # vanish in a puff of smoke.
175 if test "X${COLLECT_NAMES+set}" != Xset; then
182 # Sed substitution that helps us do robust quoting. It backslashifies
183 # metacharacters that are still active within double-quoted strings.
184 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
186 # Same as above, but do not quote variable references.
187 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
189 # Sed substitution to delay expansion of an escaped shell variable in a
190 # double_quote_subst'ed string.
191 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
193 # Sed substitution to delay expansion of an escaped single quote.
194 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
196 # Sed substitution to avoid accidental globbing in evaled expressions
197 no_glob_subst='s/\*/\\\*/g'
203 # All known linkers require a `.a' archive for static linking (except MSVC,
204 # which needs '.lib').
207 with_gnu_ld="$lt_cv_prog_gnu_ld"
212 # Set sane defaults for various variables
213 test -z "$CC" && CC=cc
214 test -z "$LTCC" && LTCC=$CC
215 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
216 test -z "$LD" && LD=ld
217 test -z "$ac_objext" && ac_objext=o
219 _LT_CC_BASENAME([$compiler])
221 # Only perform the check for file, if the check method requires it
222 test -z "$MAGIC_CMD" && MAGIC_CMD=file
223 case $deplibs_check_method in
225 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
231 # Use C for the default configuration in the libtool script
232 LT_SUPPORTED_TAG([CC])
234 _LT_LANG_DEFAULT_CONFIG
241 # Note that this code is called both from `configure', and `config.status'
242 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
243 # `config.status' has no value for ac_aux_dir unless we are using Automake,
244 # so we pass a copy along to make sure it has a sensible value anyway.
245 m4_defun([_LT_PROG_LTMAIN],
246 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
247 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
248 ltmain="$ac_aux_dir/ltmain.sh"
252 ## ------------------------------------- ##
253 ## Accumulate code for creating libtool. ##
254 ## ------------------------------------- ##
256 # So that we can recreate a full libtool script including additional
257 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
258 # in macros and then make a single call at the end using the `libtool'
262 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
263 # ----------------------------------------
264 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
265 m4_define([_LT_CONFIG_LIBTOOL_INIT],
267 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
272 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
275 # _LT_CONFIG_LIBTOOL([COMMANDS])
276 # ------------------------------
277 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
278 m4_define([_LT_CONFIG_LIBTOOL],
280 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
285 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
288 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
289 # -----------------------------------------------------
290 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
291 [_LT_CONFIG_LIBTOOL([$1])
292 _LT_CONFIG_LIBTOOL_INIT([$2])
296 # _LT_FORMAT_COMMENT([COMMENT])
297 # -----------------------------
298 # Add leading comment marks to the start of each line, and a trailing
299 # full-stop to the whole comment if one is not present already.
300 m4_define([_LT_FORMAT_COMMENT],
302 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
303 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
308 ## ------------------------ ##
309 ## FIXME: Eliminate VARNAME ##
310 ## ------------------------ ##
313 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
314 # -------------------------------------------------------------------
315 # CONFIGNAME is the name given to the value in the libtool script.
316 # VARNAME is the (base) name used in the configure script.
317 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
318 # VARNAME. Any other value will be used directly.
319 m4_define([_LT_DECL],
320 [lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]],
321 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
322 [m4_ifval([$1], [$1], [$2])])
323 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
325 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
326 lt_dict_add_subkey([lt_decl_dict], [$2],
327 [tagged?], [m4_ifval([$5], [yes], [no])])])
331 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
332 # --------------------------------------------------------
333 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
336 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
337 # ------------------------------------------------
338 m4_define([lt_decl_tag_varnames],
339 [_lt_decl_filter([tagged?], [yes], $@)])
342 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
343 # ---------------------------------------------------------
344 m4_define([_lt_decl_filter],
346 [0], [m4_fatal([$0: too few arguments: $#])],
347 [1], [m4_fatal([$0: too few arguments: $#: $1])],
348 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
349 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
350 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
354 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
355 # --------------------------------------------------
356 m4_define([lt_decl_quote_varnames],
357 [_lt_decl_filter([value], [1], $@)])
360 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
361 # ---------------------------------------------------
362 m4_define([lt_decl_dquote_varnames],
363 [_lt_decl_filter([value], [2], $@)])
366 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
367 # ---------------------------------------------------
368 m4_define([lt_decl_varnames_tagged],
369 [_$0(m4_quote(m4_default([$1], [[, ]])),
370 m4_quote(m4_if([$2], [],
371 m4_quote(lt_decl_tag_varnames),
372 m4_quote(m4_shift($@)))),
373 m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
374 m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
377 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
378 # ------------------------------------------------
379 m4_define([lt_decl_all_varnames],
380 [_$0(m4_quote(m4_default([$1], [[, ]])),
382 m4_quote(lt_decl_varnames),
383 m4_quote(m4_shift($@))))[]dnl
385 m4_define([_lt_decl_all_varnames],
386 [lt_join($@, lt_decl_varnames_tagged([$1],
387 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
391 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
392 # ------------------------------------
393 # Quote a variable value, and forward it to `config.status' so that its
394 # declaration there will have the same value as in `configure'. VARNAME
395 # must have a single quote delimited value for this to work.
396 m4_define([_LT_CONFIG_STATUS_DECLARE],
397 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
400 # _LT_CONFIG_STATUS_DECLARATIONS
401 # ------------------------------
402 # We delimit libtool config variables with single quotes, so when
403 # we write them to config.status, we have to be sure to quote all
404 # embedded single quotes properly. In configure, this macro expands
405 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
407 # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
408 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
409 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
410 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
415 # Output comment and list of tags supported by the script
416 m4_defun([_LT_LIBTOOL_TAGS],
417 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
418 available_tags="_LT_TAGS"dnl
422 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
423 # -----------------------------------
424 # Extract the dictionary values for VARNAME (optionally with TAG) and
425 # expand to a commented shell variable setting:
427 # # Some comment about what VAR is for.
428 # visible_name=$lt_internal_name
429 m4_define([_LT_LIBTOOL_DECLARE],
430 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
431 [description])))[]dnl
432 m4_pushdef([_libtool_name],
433 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
434 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
435 [0], [_libtool_name=[$]$1],
436 [1], [_libtool_name=$lt_[]$1],
437 [2], [_libtool_name=$lt_[]$1],
438 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
439 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
443 # _LT_LIBTOOL_CONFIG_VARS
444 # -----------------------
445 # Produce commented declarations of non-tagged libtool config variables
446 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
447 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
448 # section) are produced by _LT_LIBTOOL_TAG_VARS.
449 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
450 [m4_foreach([_lt_var],
451 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
452 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
455 # _LT_LIBTOOL_TAG_VARS(TAG)
456 # -------------------------
457 m4_define([_LT_LIBTOOL_TAG_VARS],
458 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
459 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
462 # _LT_TAGVAR(VARNAME, [TAGNAME])
463 # ------------------------------
464 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
467 # _LT_CONFIG_COMMANDS
468 # -------------------
469 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
470 # variables for single and double quote escaping we saved from calls
471 # to _LT_DECL, we can put quote escaped variables declarations
472 # into `config.status', and then the shell code to quote escape them in
473 # for loops in `config.status'. Finally, any additional code accumulated
474 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
475 m4_defun([_LT_CONFIG_COMMANDS],
476 [AC_PROVIDE_IFELSE([LT_OUTPUT],
477 dnl If the libtool generation code has been placed in $CONFIG_LT,
478 dnl instead of duplicating it all over again into config.status,
479 dnl then we will have config.status run $CONFIG_LT later, so it
480 dnl needs to know what name is stored there:
481 [AC_CONFIG_COMMANDS([libtool],
482 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
483 dnl If the libtool generation code is destined for config.status,
484 dnl expand the accumulated commands and init code now:
485 [AC_CONFIG_COMMANDS([libtool],
486 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
487 ])#_LT_CONFIG_COMMANDS
491 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
494 # The HP-UX ksh and POSIX shell print the target directory to stdout
496 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
498 sed_quote_subst='$sed_quote_subst'
499 double_quote_subst='$double_quote_subst'
500 delay_variable_subst='$delay_variable_subst'
501 _LT_CONFIG_STATUS_DECLARATIONS
504 compiler='$compiler_DEFAULT'
506 # Quote evaled strings.
507 for var in lt_decl_all_varnames([[ \
508 ]], lt_decl_quote_varnames); do
509 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
510 *[[\\\\\\\`\\"\\\$]]*)
511 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
514 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
519 # Double-quote double-evaled strings.
520 for var in lt_decl_all_varnames([[ \
521 ]], lt_decl_dquote_varnames); do
522 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
523 *[[\\\\\\\`\\"\\\$]]*)
524 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
527 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
532 # Fix-up fallback echo if it was mangled by the above quoting rules.
534 *'\\\[$]0 --fallback-echo"')dnl "
535 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
539 _LT_OUTPUT_LIBTOOL_INIT
545 # This macro allows early generation of the libtool script (before
546 # AC_OUTPUT is called), incase it is used in configure for compilation
548 AC_DEFUN([LT_OUTPUT],
549 [: ${CONFIG_LT=./config.lt}
550 AC_MSG_NOTICE([creating $CONFIG_LT])
551 cat >"$CONFIG_LT" <<_LTEOF
553 # Generated by $as_me.
554 # Run this file to recreate a libtool stub with the current configuration.
557 SHELL=\${CONFIG_SHELL-$SHELL}
560 cat >>"$CONFIG_LT" <<\_LTEOF
564 exec AS_MESSAGE_FD>&1
565 exec AS_MESSAGE_LOG_FD>>config.log
568 AS_BOX([Running $as_me.])
569 } >&AS_MESSAGE_LOG_FD
572 \`$as_me' creates a local libtool stub from the current configuration,
573 for use in further configure time tests before the real libtool is
576 Usage: $[0] [[OPTIONS]]
578 -h, --help print this help, then exit
579 -V, --version print version number, then exit
580 -q, --quiet do not print progress messages
581 -d, --debug don't remove temporary files
583 Report bugs to <bug-libtool@gnu.org>."
586 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
587 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
588 configured by $[0], generated by m4_PACKAGE_STRING.
590 Copyright (C) 2006 Free Software Foundation, Inc.
591 This config.lt script is free software; the Free Software Foundation
592 gives unlimited permision to copy, distribute and modify it."
597 --version | --v* | -V )
598 echo "$lt_cl_version"; exit 0 ;;
600 echo "$lt_cl_help"; exit 0 ;;
601 --debug | --d* | -d )
603 --quiet | --q* | --silent | --s* | -q )
606 -*) AC_MSG_ERROR([unrecognized option: $[1]
607 Try `$[0] --help' for more information.]) ;;
609 *) AC_MSG_ERROR([unrecognized argument: $[1]
610 Try `$[0] --help for more information.]) ;;
615 if $lt_cl_silent; then
616 exec AS_MESSAGE_FD>/dev/null
620 cat >>"$CONFIG_LT" <<_LTEOF
621 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
624 cat >>"$CONFIG_LT" <<\_LTEOF
625 AC_MSG_NOTICE([creating $ofile])
626 _LT_OUTPUT_LIBTOOL_COMMANDS
629 chmod +x "$CONFIG_LT"
631 # configure is writing to config.log, but config.lt does its own redirection,
632 # appending to config.log, which fails on DOS, as config.log is still kept
633 # open by configure. Here we exec the FD to /dev/null, effectively closing
634 # config.log, so it can be properly (re)opened and appended to by config.lt.
635 if test "$no_create" != yes; then
637 test "$silent" = yes &&
638 lt_config_lt_args="$lt_config_lt_args --quiet"
639 exec AS_MESSAGE_LOG_FD>/dev/null
640 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
641 exec AS_MESSAGE_LOG_FD>>config.log
642 $lt_cl_success || AS_EXIT(1)
649 # If TAG is the built-in tag, create an initial libtool script with a
650 # default configuration from the untagged config vars. Otherwise add code
651 # to config.status for appending the configuration named by TAG from the
652 # matching tagged config vars.
653 m4_defun([_LT_CONFIG],
654 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
655 _LT_CONFIG_SAVE_COMMANDS([
656 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
657 m4_if(_LT_TAG, [C], [
658 # See if we are running on zsh, and set the options which allow our
659 # commands through without removal of \ escapes.
660 if test -n "${ZSH_VERSION+set}" ; then
665 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
668 cat <<_LT_EOF >> "$cfgfile"
671 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
672 # Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION
673 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
674 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
677 # TEST SUITE MARKER ## BEGIN SOURCABLE
680 # ### BEGIN LIBTOOL CONFIG
681 _LT_LIBTOOL_CONFIG_VARS
683 # ### END LIBTOOL CONFIG
689 cat <<\_LT_EOF >> "$cfgfile"
690 # AIX sometimes has problems with the GCC collect2 program. For some
691 # reason, if we set the COLLECT_NAMES environment variable, the problems
692 # vanish in a puff of smoke.
693 if test "X${COLLECT_NAMES+set}" != Xset; then
703 # We use sed instead of cat because bash on DJGPP gets confused if
704 # if finds mixed CR/LF and LF-only lines. Since sed operates in
705 # text mode, it properly converts lines to CR/LF. This bash problem
706 # is reportedly fixed, but why not run on old versions too?
707 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
708 || (rm -f "$cfgfile"; exit 1)
710 _LT_PROG_XSI_SHELLFNS
712 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
713 || (rm -f "$cfgfile"; exit 1)
715 mv -f "$cfgfile" "$ofile" ||
716 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
719 [cat <<_LT_EOF >> "$ofile"
721 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
722 dnl in a comment (ie after a #).
723 # ### BEGIN LIBTOOL TAG CONFIG: $1
724 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
725 # ### END LIBTOOL TAG CONFIG: $1
732 TIMESTAMP='$TIMESTAMP'
735 ])dnl /_LT_CONFIG_SAVE_COMMANDS
739 # LT_SUPPORTED_TAG(TAG)
740 # ---------------------
741 # Trace this macro to discover what tags are supported by the libtool
742 # --tag option, using:
743 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
744 AC_DEFUN([LT_SUPPORTED_TAG], [])
747 # C support is built-in for now
748 m4_define([_LT_LANG_C_enabled], [])
749 m4_define([_LT_TAGS], [])
754 # Enable libtool support for the given language if not already enabled.
756 [AC_BEFORE([$0], [LT_OUTPUT])dnl
759 [C++], [_LT_LANG(CXX)],
760 [Java], [_LT_LANG(GCJ)],
761 [Fortran 77], [_LT_LANG(F77)],
762 [Fortran], [_LT_LANG(FC)],
763 [Windows Resource], [_LT_LANG(RC)],
764 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
766 [m4_fatal([$0: unsupported language: "$1"])])])dnl
773 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
774 [LT_SUPPORTED_TAG([$1])dnl
775 m4_append([_LT_TAGS], [$1 ])dnl
776 m4_define([_LT_LANG_]$1[_enabled], [])dnl
777 _LT_LANG_$1_CONFIG($1)])dnl
781 # _LT_LANG_DEFAULT_CONFIG
782 # -----------------------
783 m4_defun([_LT_LANG_DEFAULT_CONFIG],
784 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
786 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
788 AC_PROVIDE_IFELSE([AC_PROG_F77],
790 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
792 AC_PROVIDE_IFELSE([AC_PROG_FC],
794 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
796 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
797 dnl pulling things in needlessly.
798 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
800 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
802 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
804 [m4_ifdef([AC_PROG_GCJ],
805 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
806 m4_ifdef([A][M_PROG_GCJ],
807 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
808 m4_ifdef([LT_PROG_GCJ],
809 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
811 AC_PROVIDE_IFELSE([LT_PROG_RC],
813 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
814 ])# _LT_LANG_DEFAULT_CONFIG
817 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
818 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
819 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
820 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
821 dnl aclocal-1.4 backwards compatibility:
822 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
823 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
824 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
825 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
830 m4_defun([_LT_TAG_COMPILER],
831 [AC_REQUIRE([AC_PROG_CC])dnl
833 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
834 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
835 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
836 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
838 # If no C compiler was specified, use CC.
841 # If no C compiler flags were specified, use CFLAGS.
842 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
844 # Allow CC to be a program name with arguments.
849 # _LT_COMPILER_BOILERPLATE
850 # ------------------------
851 # Check for compiler boilerplate output or warnings with
852 # the simple compiler test code.
853 m4_defun([_LT_COMPILER_BOILERPLATE],
854 [ac_outfile=conftest.$ac_objext
855 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
856 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
857 _lt_compiler_boilerplate=`cat conftest.err`
859 ])# _LT_COMPILER_BOILERPLATE
862 # _LT_LINKER_BOILERPLATE
863 # ----------------------
864 # Check for linker boilerplate output or warnings with
865 # the simple link test code.
866 m4_defun([_LT_LINKER_BOILERPLATE],
867 [ac_outfile=conftest.$ac_objext
868 echo "$lt_simple_link_test_code" >conftest.$ac_ext
869 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
870 _lt_linker_boilerplate=`cat conftest.err`
872 ])# _LT_LINKER_BOILERPLATE
875 # _LT_SYS_MODULE_PATH_AIX
876 # -----------------------
877 # Links a minimal program and checks the executable
878 # for the system default hardcoded library path. In most cases,
879 # this is /usr/lib:/lib, but when the MPI compilers are used
880 # the location of the communication and MPI libs are included too.
881 # If we don't find anything, use the default library path according
882 # to the aix ld manual.
883 m4_defun([_LT_SYS_MODULE_PATH_AIX],
884 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
886 /Import File Strings/,/^$/ {
892 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
893 # Check for a 64-bit object if we didn't find anything.
894 if test -z "$aix_libpath"; then
895 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
897 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
898 ])# _LT_SYS_MODULE_PATH_AIX
901 # _LT_SHELL_INIT(ARG)
902 # -------------------
903 m4_define([_LT_SHELL_INIT],
904 [ifdef([AC_DIVERSION_NOTICE],
905 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
906 [AC_DIVERT_PUSH(NOTICE)])
912 # _LT_PROG_ECHO_BACKSLASH
913 # -----------------------
914 # Add some code to the start of the generated configure script which
915 # will find an echo command which doesn't interpret backslashes.
916 m4_defun([_LT_PROG_ECHO_BACKSLASH],
918 # Check that we are running under the correct shell.
919 SHELL=${CONFIG_SHELL-/bin/sh}
923 # Remove one level of quotation (which was required for Make).
924 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
929 if test "X[$]1" = X--no-reexec; then
930 # Discard the --no-reexec flag, and continue.
932 elif test "X[$]1" = X--fallback-echo; then
933 # Avoid inline document here, it may be left over
935 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
936 # Yippee, $ECHO works!
939 # Restart under the correct shell.
940 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
943 if test "X[$]1" = X--fallback-echo; then
944 # used as fallback echo
952 # The HP-UX ksh and POSIX shell print the target directory to stdout
954 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
956 if test -z "$lt_ECHO"; then
957 if test "X${echo_test_string+set}" != Xset; then
958 # find a string as large as possible, as long as the shell can cope with it
959 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
960 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
961 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
962 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
969 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
970 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
971 test "X$echo_testing_string" = "X$echo_test_string"; then
974 # The Solaris, AIX, and Digital Unix default echo programs unquote
975 # backslashes. This makes it impossible to quote backslashes using
976 # echo "$something" | sed 's/\\/\\\\/g'
978 # So, first we look for a working echo in the user's PATH.
980 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
981 for dir in $PATH /usr/ucb; do
983 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
984 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
985 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
986 test "X$echo_testing_string" = "X$echo_test_string"; then
993 if test "X$ECHO" = Xecho; then
994 # We didn't find a better echo, so look for alternatives.
995 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
996 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
997 test "X$echo_testing_string" = "X$echo_test_string"; then
998 # This shell has a builtin print -r that does the trick.
1000 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
1001 test "X$CONFIG_SHELL" != X/bin/ksh; then
1002 # If we have ksh, try running configure again with it.
1003 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1004 export ORIGINAL_CONFIG_SHELL
1005 CONFIG_SHELL=/bin/ksh
1007 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1011 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
1012 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
1013 test "X$echo_testing_string" = "X$echo_test_string"; then
1014 # Cool, printf works
1016 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1017 test "X$echo_testing_string" = 'X\t' &&
1018 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1019 test "X$echo_testing_string" = "X$echo_test_string"; then
1020 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1022 SHELL="$CONFIG_SHELL"
1024 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1025 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1026 test "X$echo_testing_string" = 'X\t' &&
1027 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1028 test "X$echo_testing_string" = "X$echo_test_string"; then
1029 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
1031 # maybe with a smaller string...
1034 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1035 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
1042 if test "$prev" != 'sed 50q "[$]0"'; then
1043 echo_test_string=`eval $prev`
1044 export echo_test_string
1045 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1047 # Oops. We lost completely, so just stick with echo.
1056 # Copy echo and quote the copy suitably for passing to libtool from
1057 # the Makefile, instead of quoting the original, which is used later.
1059 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1060 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1065 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
1066 _LT_DECL([], [ECHO], [1],
1067 [An echo program that does not interpret backslashes])
1068 ])# _LT_PROG_ECHO_BACKSLASH
1073 m4_defun([_LT_ENABLE_LOCK],
1074 [AC_REQUIRE([AC_OBJEXT])dnl
1075 AC_ARG_ENABLE([libtool-lock],
1076 [AS_HELP_STRING([--disable-libtool-lock],
1077 [avoid locking (might break parallel builds)])])
1078 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1080 # Some flags need to be propagated to the compiler or linker for good
1084 # Find out which ABI we are using.
1085 echo 'int i;' > conftest.$ac_ext
1086 if AC_TRY_EVAL(ac_compile); then
1087 case `/usr/bin/file conftest.$ac_objext` in
1099 # Find out which ABI we are using.
1100 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1101 if AC_TRY_EVAL(ac_compile); then
1102 if test "$lt_cv_prog_gnu_ld" = yes; then
1103 case `/usr/bin/file conftest.$ac_objext` in
1105 LD="${LD-ld} -melf32bsmip"
1108 LD="${LD-ld} -melf32bmipn32"
1111 LD="${LD-ld} -melf64bmip"
1115 case `/usr/bin/file conftest.$ac_objext` in
1131 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1132 # Find out which ABI we are using.
1133 echo 'int i;' > conftest.$ac_ext
1134 if AC_TRY_EVAL(ac_compile); then
1135 case `/usr/bin/file conftest.o` in
1139 LD="${LD-ld} -m elf_i386"
1141 ppc64-*linux*|powerpc64-*linux*)
1142 LD="${LD-ld} -m elf32ppclinux"
1145 LD="${LD-ld} -m elf_s390"
1148 LD="${LD-ld} -m elf32_sparc"
1155 LD="${LD-ld} -m elf_x86_64"
1157 ppc*-*linux*|powerpc*-*linux*)
1158 LD="${LD-ld} -m elf64ppc"
1160 s390*-*linux*|s390*-*tpf*)
1161 LD="${LD-ld} -m elf64_s390"
1164 LD="${LD-ld} -m elf64_sparc"
1174 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1175 SAVE_CFLAGS="$CFLAGS"
1176 CFLAGS="$CFLAGS -belf"
1177 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1179 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1181 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1182 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1183 CFLAGS="$SAVE_CFLAGS"
1187 # Find out which ABI we are using.
1188 echo 'int i;' > conftest.$ac_ext
1189 if AC_TRY_EVAL(ac_compile); then
1190 case `/usr/bin/file conftest.o` in
1192 case $lt_cv_prog_gnu_ld in
1193 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1194 *) LD="${LD-ld} -64" ;;
1203 need_locks="$enable_libtool_lock"
1207 # _LT_CMD_OLD_ARCHIVE
1208 # -------------------
1209 m4_defun([_LT_CMD_OLD_ARCHIVE],
1210 [AC_CHECK_TOOL(AR, ar, false)
1211 test -z "$AR" && AR=ar
1212 test -z "$AR_FLAGS" && AR_FLAGS=cru
1213 _LT_DECL([], [AR], [1], [The archiver])
1214 _LT_DECL([], [AR_FLAGS], [1])
1216 AC_CHECK_TOOL(STRIP, strip, :)
1217 test -z "$STRIP" && STRIP=:
1218 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
1220 AC_CHECK_TOOL(RANLIB, ranlib, :)
1221 test -z "$RANLIB" && RANLIB=:
1222 _LT_DECL([], [RANLIB], [1],
1223 [Commands used to install an old-style archive])
1225 # Determine commands to create old-style static archives.
1226 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1227 old_postinstall_cmds='chmod 644 $oldlib'
1228 old_postuninstall_cmds=
1230 if test -n "$RANLIB"; then
1233 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1236 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1239 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1241 _LT_DECL([], [old_postinstall_cmds], [2])
1242 _LT_DECL([], [old_postuninstall_cmds], [2])
1243 _LT_TAGDECL([], [old_archive_cmds], [2],
1244 [Commands used to build an old-style archive])
1245 ])# _LT_CMD_OLD_ARCHIVE
1248 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1249 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1250 # ----------------------------------------------------------------
1251 # Check whether the given compiler option works
1252 AC_DEFUN([_LT_COMPILER_OPTION],
1253 [AC_REQUIRE([AC_OBJEXT])dnl
1254 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1255 m4_require([_LT_DECL_SED])dnl
1256 AC_CACHE_CHECK([$1], [$2],
1258 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1259 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1260 lt_compiler_flag="$3"
1261 # Insert the option either (1) after the last *FLAGS variable, or
1262 # (2) before a word containing "conftest.", or (3) at the end.
1263 # Note that $ac_compile itself does not contain backslashes and begins
1264 # with a dollar sign (not a hyphen), so the echo should work correctly.
1265 # The option is referenced via a variable to avoid confusing sed.
1266 lt_compile=`echo "$ac_compile" | $SED \
1267 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1268 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1269 -e 's:$: $lt_compiler_flag:'`
1270 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1271 (eval "$lt_compile" 2>conftest.err)
1273 cat conftest.err >&AS_MESSAGE_LOG_FD
1274 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1275 if (exit $ac_status) && test -s "$ac_outfile"; then
1276 # The compiler can only warn and ignore the option if not recognized
1277 # So say no if there are warnings other than the usual output.
1278 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1279 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1280 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1287 if test x"[$]$2" = xyes; then
1288 m4_if([$5], , :, [$5])
1290 m4_if([$6], , :, [$6])
1292 ])# _LT_COMPILER_OPTION
1295 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
1296 dnl aclocal-1.4 backwards compatibility:
1297 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
1300 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1301 # [ACTION-SUCCESS], [ACTION-FAILURE])
1302 # ----------------------------------------------------
1303 # Check whether the given linker option works
1304 AC_DEFUN([_LT_LINKER_OPTION],
1305 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1306 m4_require([_LT_DECL_SED])dnl
1307 AC_CACHE_CHECK([$1], [$2],
1309 save_LDFLAGS="$LDFLAGS"
1310 LDFLAGS="$LDFLAGS $3"
1311 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1312 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1313 # The linker can only warn and ignore the option if not recognized
1314 # So say no if there are warnings
1315 if test -s conftest.err; then
1316 # Append any errors to the config.log.
1317 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1318 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1319 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1320 if diff conftest.exp conftest.er2 >/dev/null; then
1328 LDFLAGS="$save_LDFLAGS"
1331 if test x"[$]$2" = xyes; then
1332 m4_if([$4], , :, [$4])
1334 m4_if([$5], , :, [$5])
1336 ])# _LT_LINKER_OPTION
1339 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
1340 dnl aclocal-1.4 backwards compatibility:
1341 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
1346 AC_DEFUN([LT_CMD_MAX_LEN],
1347 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1348 # find the maximum length of command line arguments
1349 AC_MSG_CHECKING([the maximum length of command line arguments])
1350 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1356 # On DJGPP, this test can blow up pretty badly due to problems in libc
1357 # (any single argument exceeding 2000 bytes causes a buffer overrun
1358 # during glob expansion). Even if it were fixed, the result of this
1359 # check would be larger than it should be.
1360 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1364 # Under GNU Hurd, this test is not required because there is
1365 # no limit to the length of command line arguments.
1366 # Libtool will interpret -1 as no limit whatsoever
1367 lt_cv_sys_max_cmd_len=-1;
1371 # On Win9x/ME, this test blows up -- it succeeds, but takes
1372 # about 5 minutes as the teststring grows exponentially.
1373 # Worse, since 9x/ME are not pre-emptively multitasking,
1374 # you end up with a "frozen" computer, even though with patience
1375 # the test eventually succeeds (with a max line length of 256k).
1376 # Instead, let's just punt: use the minimum linelength reported by
1377 # all of the supported platforms: 8192 (on NT/2K/XP).
1378 lt_cv_sys_max_cmd_len=8192;
1382 # On AmigaOS with pdksh, this test takes hours, literally.
1383 # So we just punt and use a minimum line length of 8192.
1384 lt_cv_sys_max_cmd_len=8192;
1387 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1388 # This has been around since 386BSD, at least. Likely further.
1389 if test -x /sbin/sysctl; then
1390 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1391 elif test -x /usr/sbin/sysctl; then
1392 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1394 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1396 # And add a safety zone
1397 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1398 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1402 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1403 lt_cv_sys_max_cmd_len=196608
1407 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1408 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1409 # nice to cause kernel panics so lets avoid the loop below.
1410 # First set a reasonable default.
1411 lt_cv_sys_max_cmd_len=16384
1413 if test -x /sbin/sysconfig; then
1414 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1415 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1420 lt_cv_sys_max_cmd_len=102400
1422 sysv5* | sco5v6* | sysv4.2uw2*)
1423 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1424 if test -n "$kargmax"; then
1425 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1427 lt_cv_sys_max_cmd_len=32768
1431 # Make teststring a little bigger before we do anything with it.
1432 # a 1K string should be a reasonable start.
1433 for i in 1 2 3 4 5 6 7 8 ; do
1434 teststring=$teststring$teststring
1436 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1437 # If test is not a shell built-in, we'll probably end up computing a
1438 # maximum length that is only half of the actual maximum length, but
1440 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1441 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
1442 test $i != 17 # 1/2 MB should be enough
1445 teststring=$teststring$teststring
1447 # Only check the string length outside the loop.
1448 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1450 # Add a significant safety factor because C++ compilers can tack on massive
1451 # amounts of additional arguments before passing them to the linker.
1452 # It appears as though 1/2 is a usable value.
1453 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1457 if test -n $lt_cv_sys_max_cmd_len ; then
1458 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1462 max_cmd_len=$lt_cv_sys_max_cmd_len
1463 _LT_DECL([], [max_cmd_len], [0],
1464 [What is the maximum length of a command?])
1468 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
1469 dnl aclocal-1.4 backwards compatibility:
1470 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
1475 m4_defun([_LT_HEADER_DLFCN],
1476 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1477 ])# _LT_HEADER_DLFCN
1480 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1481 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1482 # ----------------------------------------------------------------
1483 m4_defun([_LT_TRY_DLOPEN_SELF],
1484 [m4_require([_LT_HEADER_DLFCN])dnl
1485 if test "$cross_compiling" = yes; then :
1488 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1489 lt_status=$lt_dlunknown
1490 cat > conftest.$ac_ext <<_LT_EOF
1491 [#line __oline__ "configure"
1492 #include "confdefs.h"
1501 # define LT_DLGLOBAL RTLD_GLOBAL
1504 # define LT_DLGLOBAL DL_GLOBAL
1506 # define LT_DLGLOBAL 0
1510 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1511 find out it does not work in some platform. */
1512 #ifndef LT_DLLAZY_OR_NOW
1514 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1517 # define LT_DLLAZY_OR_NOW DL_LAZY
1520 # define LT_DLLAZY_OR_NOW RTLD_NOW
1523 # define LT_DLLAZY_OR_NOW DL_NOW
1525 # define LT_DLLAZY_OR_NOW 0
1533 extern "C" void exit (int);
1536 void fnord() { int i=42;}
1539 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1540 int status = $lt_dlunknown;
1544 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1545 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1546 /* dlclose (self); */
1554 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1555 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1558 x$lt_dlno_uscore) $1 ;;
1559 x$lt_dlneed_uscore) $2 ;;
1560 x$lt_dlunknown|x*) $3 ;;
1563 # compilation failed
1568 ])# _LT_TRY_DLOPEN_SELF
1571 # LT_SYS_DLOPEN_SELF
1572 # ------------------
1573 AC_DEFUN([LT_SYS_DLOPEN_SELF],
1574 [m4_require([_LT_HEADER_DLFCN])dnl
1575 if test "x$enable_dlopen" != xyes; then
1576 enable_dlopen=unknown
1577 enable_dlopen_self=unknown
1578 enable_dlopen_self_static=unknown
1585 lt_cv_dlopen="load_add_on"
1587 lt_cv_dlopen_self=yes
1591 lt_cv_dlopen="LoadLibrary"
1596 lt_cv_dlopen="dlopen"
1601 # if libdl is installed we need to link against it
1602 AC_CHECK_LIB([dl], [dlopen],
1603 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1606 lt_cv_dlopen_self=yes
1611 AC_CHECK_FUNC([shl_load],
1612 [lt_cv_dlopen="shl_load"],
1613 [AC_CHECK_LIB([dld], [shl_load],
1614 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1615 [AC_CHECK_FUNC([dlopen],
1616 [lt_cv_dlopen="dlopen"],
1617 [AC_CHECK_LIB([dl], [dlopen],
1618 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1619 [AC_CHECK_LIB([svld], [dlopen],
1620 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1621 [AC_CHECK_LIB([dld], [dld_link],
1622 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1631 if test "x$lt_cv_dlopen" != xno; then
1637 case $lt_cv_dlopen in
1639 save_CPPFLAGS="$CPPFLAGS"
1640 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1642 save_LDFLAGS="$LDFLAGS"
1643 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1646 LIBS="$lt_cv_dlopen_libs $LIBS"
1648 AC_CACHE_CHECK([whether a program can dlopen itself],
1649 lt_cv_dlopen_self, [dnl
1650 _LT_TRY_DLOPEN_SELF(
1651 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1652 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1655 if test "x$lt_cv_dlopen_self" = xyes; then
1656 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1657 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1658 lt_cv_dlopen_self_static, [dnl
1659 _LT_TRY_DLOPEN_SELF(
1660 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1661 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1665 CPPFLAGS="$save_CPPFLAGS"
1666 LDFLAGS="$save_LDFLAGS"
1671 case $lt_cv_dlopen_self in
1672 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1673 *) enable_dlopen_self=unknown ;;
1676 case $lt_cv_dlopen_self_static in
1677 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1678 *) enable_dlopen_self_static=unknown ;;
1681 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1682 [Whether dlopen is supported])
1683 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1684 [Whether dlopen of programs is supported])
1685 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1686 [Whether dlopen of statically linked programs is supported])
1687 ])# LT_SYS_DLOPEN_SELF
1690 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
1691 dnl aclocal-1.4 backwards compatibility:
1692 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
1695 # _LT_COMPILER_C_O([TAGNAME])
1696 # ---------------------------
1697 # Check to see if options -c and -o are simultaneously supported by compiler.
1698 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
1699 m4_defun([_LT_COMPILER_C_O],
1700 [AC_REQUIRE([AC_OBJEXT])dnl
1701 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1702 m4_require([_LT_TAG_COMPILER])dnl
1703 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1704 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1705 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1706 $RM -r conftest 2>/dev/null
1710 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1712 lt_compiler_flag="-o out/conftest2.$ac_objext"
1713 # Insert the option either (1) after the last *FLAGS variable, or
1714 # (2) before a word containing "conftest.", or (3) at the end.
1715 # Note that $ac_compile itself does not contain backslashes and begins
1716 # with a dollar sign (not a hyphen), so the echo should work correctly.
1717 lt_compile=`echo "$ac_compile" | $SED \
1718 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1719 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1720 -e 's:$: $lt_compiler_flag:'`
1721 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1722 (eval "$lt_compile" 2>out/conftest.err)
1724 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1725 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1726 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1728 # The compiler can only warn and ignore the option if not recognized
1729 # So say no if there are warnings
1730 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1731 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1732 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1733 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1736 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1738 # SGI C++ compiler will create directory out/ii_files/ for
1739 # template instantiation
1740 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
1741 $RM out/* && rmdir out
1746 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1747 [Does compiler simultaneously support -c and -o options?])
1748 ])# _LT_COMPILER_C_O
1751 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
1752 # ----------------------------------
1753 # Check to see if we can do hard links to lock some files if needed
1754 m4_defun([_LT_COMPILER_FILE_LOCKS],
1755 [m4_require([_LT_ENABLE_LOCK])dnl
1756 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1757 _LT_COMPILER_C_O([$1])
1759 hard_links="nottested"
1760 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1761 # do not overwrite the value of need_locks provided by the user
1762 AC_MSG_CHECKING([if we can lock with hard links])
1765 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1767 ln conftest.a conftest.b 2>&5 || hard_links=no
1768 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1769 AC_MSG_RESULT([$hard_links])
1770 if test "$hard_links" = no; then
1771 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1777 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1778 ])# _LT_COMPILER_FILE_LOCKS
1783 m4_defun([_LT_CHECK_OBJDIR],
1784 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1785 [rm -f .libs 2>/dev/null
1786 mkdir .libs 2>/dev/null
1787 if test -d .libs; then
1790 # MS-DOS does not allow filenames that begin with a dot.
1793 rmdir .libs 2>/dev/null])
1794 objdir=$lt_cv_objdir
1795 _LT_DECL([], [objdir], [0],
1796 [The name of the directory that contains temporary libtool files])dnl
1797 m4_pattern_allow([LT_OBJDIR])dnl
1798 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
1799 [Define to the sub-directory in which libtool stores uninstalled libraries.])
1800 ])# _LT_CHECK_OBJDIR
1803 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
1804 # --------------------------------------
1805 # Check hardcoding attributes.
1806 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
1807 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1808 _LT_TAGVAR(hardcode_action, $1)=
1809 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1810 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
1811 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1813 # We can hardcode non-existent directories.
1814 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
1815 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1816 # have to relink, otherwise we might link with an installed library
1817 # when we should be linking with a yet-to-be-installed one
1818 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1819 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
1820 # Linking always hardcodes the temporary library directory.
1821 _LT_TAGVAR(hardcode_action, $1)=relink
1823 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1824 _LT_TAGVAR(hardcode_action, $1)=immediate
1827 # We cannot hardcode anything, or else we can only hardcode existing
1829 _LT_TAGVAR(hardcode_action, $1)=unsupported
1831 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
1833 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
1834 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
1835 # Fast installation is not supported
1836 enable_fast_install=no
1837 elif test "$shlibpath_overrides_runpath" = yes ||
1838 test "$enable_shared" = no; then
1839 # Fast installation is not necessary
1840 enable_fast_install=needless
1842 _LT_TAGDECL([], [hardcode_action], [0],
1843 [How to hardcode a shared library path into an executable])
1844 ])# _LT_LINKER_HARDCODE_LIBPATH
1849 m4_defun([_LT_CMD_STRIPLIB],
1850 [m4_require([_LT_DECL_EGREP])
1853 AC_MSG_CHECKING([whether stripping libraries is possible])
1854 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
1855 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1856 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1857 AC_MSG_RESULT([yes])
1859 # FIXME - insert some real tests, host_os isn't really good enough
1862 if test -n "$STRIP" ; then
1863 striplib="$STRIP -x"
1864 old_striplib="$STRIP -S"
1865 AC_MSG_RESULT([yes])
1875 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
1876 _LT_DECL([], [striplib], [1])
1877 ])# _LT_CMD_STRIPLIB
1880 # _LT_SYS_DYNAMIC_LINKER([TAG])
1881 # -----------------------------
1882 # PORTME Fill in your ld.so characteristics
1883 m4_defun([_LT_SYS_DYNAMIC_LINKER],
1884 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1885 m4_require([_LT_DECL_EGREP])dnl
1886 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1887 m4_require([_LT_DECL_SED])dnl
1888 AC_MSG_CHECKING([dynamic linker characteristics])
1890 [C], [withGCC=$GCC],
1891 [CXX], [withGCC=$GXX],
1892 [F77], [withGCC=$G77],
1893 [FC], [withGCC=$ac_cv_fc_compiler_gnu],
1896 libname_spec='lib$name'
1904 shlibpath_overrides_runpath=unknown
1906 dynamic_linker="$host_os ld.so"
1907 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1908 if test "$withGCC" = yes; then
1909 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1910 if $ECHO "$sys_lib_search_path_spec" | $GREP ';' >/dev/null ; then
1911 # if the path contains ";" then we assume it to be the separator
1912 # otherwise default to the standard path separator (i.e. ":") - it is
1913 # assumed that no part of a normal pathname contains ";" but that should
1914 # okay in the real world where ";" in dirpaths is itself problematic.
1915 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1917 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1920 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1922 need_lib_prefix=unknown
1923 hardcode_into_libs=no
1925 # when you set need_version to no, make sure it does not cause -set_version
1926 # flags to be left without arguments
1927 need_version=unknown
1932 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1933 shlibpath_var=LIBPATH
1935 # AIX 3 has no versioning support, so we append a major version to the name.
1936 soname_spec='${libname}${release}${shared_ext}$major'
1943 hardcode_into_libs=yes
1944 if test "$host_cpu" = ia64; then
1945 # AIX 5 supports IA64
1946 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1947 shlibpath_var=LD_LIBRARY_PATH
1949 # With GCC up to 2.95.x, collect2 would create an import file
1950 # for dependence libraries. The import file would start with
1951 # the line `#! .'. This would cause the generated library to
1952 # depend on `.', always an invalid library. This was fixed in
1953 # development snapshots of GCC prior to 3.0.
1955 aix4 | aix4.[[01]] | aix4.[[01]].*)
1956 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1958 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
1965 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1966 # soname into executable. Probably we can add versioning support to
1967 # collect2, so additional links can be useful in future.
1968 if test "$aix_use_runtimelinking" = yes; then
1969 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1970 # instead of lib<name>.a to let people know that these are not
1971 # typical AIX shared libraries.
1972 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1974 # We preserve .a as extension for shared libraries through AIX4.2
1975 # and later when we are not doing run time linking.
1976 library_names_spec='${libname}${release}.a $libname.a'
1977 soname_spec='${libname}${release}${shared_ext}$major'
1979 shlibpath_var=LIBPATH
1984 if test "$host_cpu" = m68k; then
1985 library_names_spec='$libname.ixlibrary $libname.a'
1986 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1987 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'
1994 library_names_spec='${libname}${shared_ext}'
1995 dynamic_linker="$host_os ld.so"
1996 shlibpath_var=LIBRARY_PATH
2002 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2003 soname_spec='${libname}${release}${shared_ext}$major'
2004 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2005 shlibpath_var=LD_LIBRARY_PATH
2006 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2007 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2008 # the default ld.so.conf also contains /usr/contrib/lib and
2009 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2010 # libtool to hard-code these into programs
2013 cygwin* | mingw* | pw32*)
2014 version_type=windows
2018 libname_spec='$name'
2020 case $withGCC,$host_os in
2021 yes,cygwin* | yes,mingw* | yes,pw32*)
2022 library_names_spec='$libname-$major.dll'
2023 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2024 postinstall_cmds='base_file=`basename \${file}`~
2025 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2026 dldir=$destdir/`dirname \$dlpath`~
2027 test -d \$dldir || mkdir -p \$dldir~
2028 $install_prog $dir/$dlname \$dldir/$dlname~
2029 chmod a+x \$dldir/$dlname~
2030 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2031 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2033 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2034 dlpath=$dir/\$dldll~
2036 shlibpath_overrides_runpath=yes
2040 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2041 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2042 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2045 # MinGW DLLs use traditional 'lib' prefix
2046 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2047 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2048 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
2049 # It is most probably a Windows format PATH printed by
2050 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2051 # path with ; separators, and with drive letters. We can handle the
2052 # drive letters (cygwin fileutils understands them), so leave them,
2053 # especially as we might pass files found there to a mingw objdump,
2054 # which wouldn't understand a cygwinified path. Ahh.
2055 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2057 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2061 # pw32 DLLs use 'pw' prefix rather than 'lib'
2062 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2068 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2071 dynamic_linker='Win32 ld.exe'
2072 # FIXME: first we should search . and the directory the executable is in
2076 darwin* | rhapsody*)
2077 dynamic_linker="$host_os dyld"
2081 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2082 soname_spec='${libname}${release}${major}$shared_ext'
2083 shlibpath_overrides_runpath=yes
2084 shlibpath_var=DYLD_LIBRARY_PATH
2085 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2086 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2087 if test "$withGCC" = yes; then
2088 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | $GREP "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2090 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2092 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2099 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2100 soname_spec='${libname}${release}${shared_ext}$major'
2101 shlibpath_var=LD_LIBRARY_PATH
2112 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2113 soname_spec='${libname}${release}${shared_ext}$major'
2114 shlibpath_var=LD_LIBRARY_PATH
2115 shlibpath_overrides_runpath=no
2116 hardcode_into_libs=yes
2117 dynamic_linker='GNU ld.so'
2120 freebsd* | dragonfly*)
2121 # DragonFly does not have aout. When/if they implement a new
2122 # versioning mechanism, adjust this.
2123 if test -x /usr/bin/objformat; then
2124 objformat=`/usr/bin/objformat`
2127 freebsd[[123]]*) objformat=aout ;;
2131 version_type=freebsd-$objformat
2132 case $version_type in
2134 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2139 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2143 shlibpath_var=LD_LIBRARY_PATH
2146 shlibpath_overrides_runpath=yes
2148 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2149 shlibpath_overrides_runpath=yes
2150 hardcode_into_libs=yes
2152 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2153 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2154 shlibpath_overrides_runpath=no
2155 hardcode_into_libs=yes
2157 *) # from 4.6 on, and DragonFly
2158 shlibpath_overrides_runpath=yes
2159 hardcode_into_libs=yes
2168 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2169 soname_spec='${libname}${release}${shared_ext}$major'
2170 shlibpath_var=LD_LIBRARY_PATH
2171 hardcode_into_libs=yes
2174 hpux9* | hpux10* | hpux11*)
2175 # Give a soname corresponding to the major version so that dld.sl refuses to
2176 # link against other versions.
2183 hardcode_into_libs=yes
2184 dynamic_linker="$host_os dld.so"
2185 shlibpath_var=LD_LIBRARY_PATH
2186 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2187 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2188 soname_spec='${libname}${release}${shared_ext}$major'
2189 if test "X$HPUX_IA64_MODE" = X32; then
2190 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2192 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2194 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2198 hardcode_into_libs=yes
2199 dynamic_linker="$host_os dld.sl"
2200 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2201 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2202 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2203 soname_spec='${libname}${release}${shared_ext}$major'
2204 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2205 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2209 dynamic_linker="$host_os dld.sl"
2210 shlibpath_var=SHLIB_PATH
2211 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2212 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2213 soname_spec='${libname}${release}${shared_ext}$major'
2216 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2217 postinstall_cmds='chmod 555 $lib'
2224 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2225 soname_spec='${libname}${release}${shared_ext}$major'
2226 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2227 shlibpath_var=LD_LIBRARY_PATH
2228 shlibpath_overrides_runpath=no
2229 hardcode_into_libs=yes
2232 irix5* | irix6* | nonstopux*)
2234 nonstopux*) version_type=nonstopux ;;
2236 if test "$lt_cv_prog_gnu_ld" = yes; then
2244 soname_spec='${libname}${release}${shared_ext}$major'
2245 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2247 irix5* | nonstopux*)
2251 case $LD in # libtool.m4 will add one of these switches to LD
2252 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2253 libsuff= shlibsuff= libmagic=32-bit;;
2254 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2255 libsuff=32 shlibsuff=N32 libmagic=N32;;
2256 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2257 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2258 *) libsuff= shlibsuff= libmagic=never-match;;
2262 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2263 shlibpath_overrides_runpath=no
2264 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2265 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2266 hardcode_into_libs=yes
2269 # No shared lib support for Linux oldld, aout, or coff.
2270 linux*oldld* | linux*aout* | linux*coff*)
2274 # This must be Linux ELF.
2279 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2280 soname_spec='${libname}${release}${shared_ext}$major'
2281 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2282 shlibpath_var=LD_LIBRARY_PATH
2283 shlibpath_overrides_runpath=no
2284 # This implies no fast_install, which is unacceptable.
2285 # Some rework will be needed to allow for fast_install
2286 # before this can be enabled.
2287 hardcode_into_libs=yes
2289 # Append ld.so.conf contents to the search path
2290 if test -f /etc/ld.so.conf; then
2291 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2292 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2295 # We used to test for /lib/ld.so.1 and disable shared libraries on
2296 # powerpc, because MkLinux only supported shared libraries with the
2297 # GNU dynamic linker. Since this was broken with cross compilers,
2298 # most powerpc-linux boxes support dynamic linking these days and
2299 # people can always --disable-shared, the test was removed, and we
2300 # assume the GNU/Linux dynamic linker is in use.
2301 dynamic_linker='GNU/Linux ld.so'
2308 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2309 soname_spec='${libname}${release}${shared_ext}$major'
2310 shlibpath_var=LD_LIBRARY_PATH
2311 shlibpath_overrides_runpath=no
2312 hardcode_into_libs=yes
2313 dynamic_linker='GNU ld.so'
2320 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2321 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2322 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2323 dynamic_linker='NetBSD (a.out) ld.so'
2325 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2326 soname_spec='${libname}${release}${shared_ext}$major'
2327 dynamic_linker='NetBSD ld.elf_so'
2329 shlibpath_var=LD_LIBRARY_PATH
2330 shlibpath_overrides_runpath=yes
2331 hardcode_into_libs=yes
2336 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2337 shlibpath_var=LD_LIBRARY_PATH
2338 shlibpath_overrides_runpath=yes
2345 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2346 soname_spec='${libname}${release}${shared_ext}$major'
2347 shlibpath_var=LD_LIBRARY_PATH
2348 shlibpath_overrides_runpath=no
2349 hardcode_into_libs=yes
2350 dynamic_linker='ldqnx.so'
2355 sys_lib_dlsearch_path_spec="/usr/lib"
2357 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2359 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2360 *) need_version=no ;;
2362 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2363 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2364 shlibpath_var=LD_LIBRARY_PATH
2365 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2367 openbsd2.[[89]] | openbsd2.[[89]].*)
2368 shlibpath_overrides_runpath=no
2371 shlibpath_overrides_runpath=yes
2375 shlibpath_overrides_runpath=yes
2380 libname_spec='$name'
2383 library_names_spec='$libname${shared_ext} $libname.a'
2384 dynamic_linker='OS/2 ld.exe'
2385 shlibpath_var=LIBPATH
2388 osf3* | osf4* | osf5*)
2392 soname_spec='${libname}${release}${shared_ext}$major'
2393 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2394 shlibpath_var=LD_LIBRARY_PATH
2395 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2396 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2407 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2408 soname_spec='${libname}${release}${shared_ext}$major'
2409 shlibpath_var=LD_LIBRARY_PATH
2410 shlibpath_overrides_runpath=yes
2411 hardcode_into_libs=yes
2412 # ldd complains unless libraries are executable
2413 postinstall_cmds='chmod +x $lib'
2418 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2419 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2420 shlibpath_var=LD_LIBRARY_PATH
2421 shlibpath_overrides_runpath=yes
2422 if test "$with_gnu_ld" = yes; then
2430 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2431 soname_spec='${libname}${release}${shared_ext}$major'
2432 shlibpath_var=LD_LIBRARY_PATH
2433 case $host_vendor in
2435 shlibpath_overrides_runpath=no
2437 runpath_var=LD_RUN_PATH
2445 shlibpath_overrides_runpath=no
2446 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2452 if test -d /usr/nec ;then
2454 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2455 soname_spec='$libname${shared_ext}.$major'
2456 shlibpath_var=LD_LIBRARY_PATH
2460 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2461 version_type=freebsd-elf
2464 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2465 soname_spec='${libname}${release}${shared_ext}$major'
2466 shlibpath_var=LD_LIBRARY_PATH
2467 shlibpath_overrides_runpath=yes
2468 hardcode_into_libs=yes
2469 if test "$with_gnu_ld" = yes; then
2470 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2472 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2475 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2479 sys_lib_dlsearch_path_spec='/usr/lib'
2483 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
2487 library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2488 shlibpath_var=LD_LIBRARY_PATH
2489 shlibpath_overrides_runpath=no
2490 hardcode_into_libs=yes
2495 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2496 soname_spec='${libname}${release}${shared_ext}$major'
2497 shlibpath_var=LD_LIBRARY_PATH
2504 AC_MSG_RESULT([$dynamic_linker])
2505 test "$dynamic_linker" = no && can_build_shared=no
2507 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2508 if test "$GCC" = yes; then
2509 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2512 _LT_DECL([], [variables_saved_for_relink], [1],
2513 [Variables whose values should be saved in libtool wrapper scripts and
2514 restored at link time])
2515 _LT_DECL([], [need_lib_prefix], [0],
2516 [Do we need the "lib" prefix for modules?])
2517 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2518 _LT_DECL([], [version_type], [0], [Library versioning type])
2519 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2520 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2521 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2522 [Is shlibpath searched before the hard-coded library search path?])
2523 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2524 _LT_DECL([], [library_names_spec], [1],
2525 [[List of archive names. First name is the real one, the rest are links.
2526 The last name is the one that the linker finds with -lNAME]])
2527 _LT_DECL([], [soname_spec], [1],
2528 [[The coded name of the library, if different from the real name]])
2529 _LT_DECL([], [postinstall_cmds], [2],
2530 [Command to use after installation of a shared archive])
2531 _LT_DECL([], [postuninstall_cmds], [2],
2532 [Command to use after uninstallation of a shared archive])
2533 _LT_DECL([], [finish_cmds], [2],
2534 [Commands used to finish a libtool library installation in a directory])
2535 _LT_DECL([], [finish_eval], [1],
2536 [[As "finish_cmds", except a single script fragment to be evaled but
2538 _LT_DECL([], [hardcode_into_libs], [0],
2539 [Whether we should hardcode library paths into libraries])
2540 _LT_DECL([], [sys_lib_search_path_spec], [2],
2541 [Compile-time system search path for libraries])
2542 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2543 [Run-time system search path for libraries])
2544 ])# _LT_SYS_DYNAMIC_LINKER
2547 # _LT_PATH_TOOL_PREFIX(TOOL)
2548 # --------------------------
2549 # find a file program which can recognize shared library
2550 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
2551 [m4_require([_LT_DECL_EGREP])dnl
2552 AC_MSG_CHECKING([for $1])
2553 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2555 [[\\/*] | ?:[\\/]*])
2556 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2559 lt_save_MAGIC_CMD="$MAGIC_CMD"
2560 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2561 dnl $ac_dummy forces splitting on constant user-supplied paths.
2562 dnl POSIX.2 word splitting is done only on the output of word expansions,
2563 dnl not every word. This closes a longstanding sh security hole.
2564 ac_dummy="m4_if([$2], , $PATH, [$2])"
2565 for ac_dir in $ac_dummy; do
2567 test -z "$ac_dir" && ac_dir=.
2568 if test -f $ac_dir/$1; then
2569 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2570 if test -n "$file_magic_test_file"; then
2571 case $deplibs_check_method in
2573 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2574 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2575 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2576 $EGREP "$file_magic_regex" > /dev/null; then
2581 *** Warning: the command libtool uses to detect shared libraries,
2582 *** $file_magic_cmd, produces output that libtool cannot recognize.
2583 *** The result is that libtool may fail to recognize shared libraries
2584 *** as such. This will affect the creation of libtool libraries that
2585 *** depend on shared libraries, but programs linked with such libtool
2586 *** libraries will work regardless of this problem. Nevertheless, you
2587 *** may want to report the problem to your system manager and/or to
2588 *** bug-libtool@gnu.org
2598 MAGIC_CMD="$lt_save_MAGIC_CMD"
2601 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2602 if test -n "$MAGIC_CMD"; then
2603 AC_MSG_RESULT($MAGIC_CMD)
2607 _LT_DECL([], [MAGIC_CMD], [0],
2608 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
2609 ])# _LT_PATH_TOOL_PREFIX
2612 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
2613 dnl aclocal-1.4 backwards compatibility:
2614 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
2619 # find a file program which can recognize a shared library
2620 m4_defun([_LT_PATH_MAGIC],
2621 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2622 if test -z "$lt_cv_path_MAGIC_CMD"; then
2623 if test -n "$ac_tool_prefix"; then
2624 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2634 # find the pathname to the GNU or non-GNU linker
2635 AC_DEFUN([LT_PATH_LD],
2636 [AC_REQUIRE([AC_PROG_CC])dnl
2637 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2638 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2639 m4_require([_LT_DECL_SED])dnl
2640 m4_require([_LT_DECL_EGREP])dnl
2642 AC_ARG_WITH([gnu-ld],
2643 [AS_HELP_STRING([--with-gnu-ld],
2644 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2645 [test "$withval" = no || with_gnu_ld=yes],
2646 [with_gnu_ld=no])dnl
2649 if test "$GCC" = yes; then
2650 # Check if gcc -print-prog-name=ld gives a path.
2651 AC_MSG_CHECKING([for ld used by $CC])
2654 # gcc leaves a trailing carriage return which upsets mingw
2655 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2657 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2660 # Accept absolute paths.
2661 [[\\/]]* | ?:[[\\/]]*)
2662 re_direlt='/[[^/]][[^/]]*/\.\./'
2663 # Canonicalize the pathname of ld
2664 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
2665 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
2666 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
2668 test -z "$LD" && LD="$ac_prog"
2671 # If it fails, then pretend we aren't using GCC.
2675 # If it is relative, then search for the first ld in PATH.
2679 elif test "$with_gnu_ld" = yes; then
2680 AC_MSG_CHECKING([for GNU ld])
2682 AC_MSG_CHECKING([for non-GNU ld])
2684 AC_CACHE_VAL(lt_cv_path_LD,
2685 [if test -z "$LD"; then
2686 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2687 for ac_dir in $PATH; do
2689 test -z "$ac_dir" && ac_dir=.
2690 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2691 lt_cv_path_LD="$ac_dir/$ac_prog"
2692 # Check to see if the program is GNU ld. I'd rather use --version,
2693 # but apparently some variants of GNU ld only accept -v.
2694 # Break only if it was the GNU/non-GNU ld that we prefer.
2695 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2696 *GNU* | *'with BFD'*)
2697 test "$with_gnu_ld" != no && break
2700 test "$with_gnu_ld" != yes && break
2707 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2710 if test -n "$LD"; then
2715 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2719 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2723 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
2724 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
2725 dnl aclocal-1.4 backwards compatibility:
2726 dnl AC_DEFUN([AM_PROG_LD], [])
2727 dnl AC_DEFUN([AC_PROG_LD], [])
2732 m4_defun([_LT_PATH_LD_GNU],
2733 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2734 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2735 case `$LD -v 2>&1 </dev/null` in
2736 *GNU* | *'with BFD'*)
2737 lt_cv_prog_gnu_ld=yes
2740 lt_cv_prog_gnu_ld=no
2743 with_gnu_ld=$lt_cv_prog_gnu_ld
2749 # find reload flag for linker
2750 # -- PORTME Some linkers may need a different reload flag.
2751 m4_defun([_LT_CMD_RELOAD],
2752 [AC_CACHE_CHECK([for $LD option to reload object files],
2753 lt_cv_ld_reload_flag,
2754 [lt_cv_ld_reload_flag='-r'])
2755 reload_flag=$lt_cv_ld_reload_flag
2756 case $reload_flag in
2758 *) reload_flag=" $reload_flag" ;;
2760 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2763 if test "$GCC" = yes; then
2764 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2766 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2770 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2771 _LT_DECL([], [reload_cmds], [2])dnl
2775 # _LT_CHECK_MAGIC_METHOD
2776 # ----------------------
2777 # how to check for library dependencies
2778 # -- PORTME fill in with the dynamic library characteristics
2779 m4_defun([_LT_CHECK_MAGIC_METHOD],
2780 [m4_require([_LT_DECL_EGREP])
2781 AC_CACHE_CHECK([how to recognize dependent libraries],
2782 lt_cv_deplibs_check_method,
2783 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2784 lt_cv_file_magic_test_file=
2785 lt_cv_deplibs_check_method='unknown'
2786 # Need to set the preceding variable on all platforms that support
2787 # interlibrary dependencies.
2788 # 'none' -- dependencies not supported.
2789 # `unknown' -- same as none, but documents that we really don't know.
2790 # 'pass_all' -- all dependencies passed with no checks.
2791 # 'test_compile' -- check by making test program.
2792 # 'file_magic [[regex]]' -- check by looking for files in library path
2793 # which responds to the $file_magic_cmd with a given extended regex.
2794 # If you have `file' or equivalent on your system and you're not sure
2795 # whether `pass_all' will *always* work, you probably want this one.
2799 lt_cv_deplibs_check_method=pass_all
2803 lt_cv_deplibs_check_method=pass_all
2807 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2808 lt_cv_file_magic_cmd='/usr/bin/file -L'
2809 lt_cv_file_magic_test_file=/shlib/libc.so
2813 # func_win32_libid is a shell function defined in ltmain.sh
2814 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL|^x86 archive static'
2815 lt_cv_file_magic_cmd='func_win32_libid'
2818 # Base MSYS/MinGW do not provide the 'file' command needed by
2819 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2823 lt_cv_deplibs_check_method='file_magic PE executable for MS Windows \(DLL\).*'
2824 lt_cv_file_magic_cmd='file'
2827 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2828 lt_cv_file_magic_cmd='$OBJDUMP -f'
2833 darwin* | rhapsody*)
2834 lt_cv_deplibs_check_method=pass_all
2837 freebsd* | kfreebsd*-gnu | dragonfly*)
2838 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
2841 # Not sure whether the presence of OpenBSD here was a mistake.
2842 # Let's accept both of them until this is cleared up.
2843 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2844 lt_cv_file_magic_cmd=/usr/bin/file
2845 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2849 lt_cv_deplibs_check_method=pass_all
2854 lt_cv_deplibs_check_method=pass_all
2857 hpux10.20* | hpux11*)
2858 lt_cv_file_magic_cmd=/usr/bin/file
2861 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2862 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2865 [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]']
2866 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2869 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2870 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2876 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2877 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2880 irix5* | irix6* | nonstopux*)
2882 *-32|*"-32 ") libmagic=32-bit;;
2883 *-n32|*"-n32 ") libmagic=N32;;
2884 *-64|*"-64 ") libmagic=64-bit;;
2885 *) libmagic=never-match;;
2887 lt_cv_deplibs_check_method=pass_all
2890 # This must be Linux ELF.
2892 lt_cv_deplibs_check_method=pass_all
2895 netbsd* | knetbsd*-gnu)
2896 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
2897 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2899 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2904 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2905 lt_cv_file_magic_cmd=/usr/bin/file
2906 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2910 lt_cv_deplibs_check_method=pass_all
2914 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2915 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2917 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2921 osf3* | osf4* | osf5*)
2922 lt_cv_deplibs_check_method=pass_all
2926 lt_cv_deplibs_check_method=pass_all
2930 lt_cv_deplibs_check_method=pass_all
2933 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2934 lt_cv_deplibs_check_method=pass_all
2938 case $host_vendor in
2940 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]]'
2941 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2944 lt_cv_deplibs_check_method=pass_all
2947 lt_cv_file_magic_cmd='/bin/file'
2948 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2951 lt_cv_file_magic_cmd='/bin/file'
2952 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2953 lt_cv_file_magic_test_file=/lib/libc.so
2956 lt_cv_deplibs_check_method=pass_all
2959 lt_cv_deplibs_check_method=pass_all
2965 lt_cv_deplibs_check_method=pass_all
2969 file_magic_cmd=$lt_cv_file_magic_cmd
2970 deplibs_check_method=$lt_cv_deplibs_check_method
2971 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2973 _LT_DECL([], [deplibs_check_method], [1],
2974 [Method to check whether dependent libraries are shared objects])
2975 _LT_DECL([], [file_magic_cmd], [1],
2976 [Command to use when deplibs_check_method == "file_magic"])
2977 ])# _LT_CHECK_MAGIC_METHOD
2982 # find the pathname to a BSD- or MS-compatible name lister
2983 AC_DEFUN([LT_PATH_NM],
2984 [AC_REQUIRE([AC_PROG_CC])dnl
2985 AC_REQUIRE([AC_OBJEXT])dnl
2986 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
2987 [if test -n "$NM"; then
2988 # Let the user override the test.
2991 lt_nm_to_check="${ac_tool_prefix}nm"
2992 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2993 lt_nm_to_check="$lt_nm_to_check nm"
2995 for lt_tmp_nm in $lt_nm_to_check; do
2996 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2997 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2999 test -z "$ac_dir" && ac_dir=.
3000 tmp_nm="$ac_dir/$lt_tmp_nm"
3001 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3002 # Check to see if the nm accepts a BSD-compat flag.
3003 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3004 # nm: unknown option "B" ignored
3005 # Tru64's nm complains that /dev/null is an invalid object file
3006 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3007 */dev/null* | *'Invalid file or object type'*)
3008 lt_cv_path_NM="$tmp_nm -B"
3012 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3014 lt_cv_path_NM="$tmp_nm -p"
3018 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3019 continue # so that we can try to find one that supports BSD flags
3028 : ${lt_cv_path_NM=no}
3030 if test "$lt_cv_path_NM" != "no"; then
3033 # Didn't find any BSD compatible name lister, look for dumpbin.
3034 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
3036 if test "$DUMPBIN" != ":"; then
3040 test -z "$NM" && NM=nm
3042 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
3044 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
3045 [lt_cv_nm_interface="BSD nm"
3046 echo "int some_variable = 0;" > conftest.$ac_ext
3047 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
3048 (eval "$ac_compile" 2>conftest.err)
3049 cat conftest.err >&AS_MESSAGE_LOG_FD
3050 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
3051 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
3052 cat conftest.err >&AS_MESSAGE_LOG_FD
3053 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
3054 cat conftest.out >&AS_MESSAGE_LOG_FD
3055 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
3056 lt_cv_nm_interface="MS dumpbin"
3062 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
3063 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
3064 dnl aclocal-1.4 backwards compatibility:
3065 dnl AC_DEFUN([AM_PROG_NM], [])
3066 dnl AC_DEFUN([AC_PROG_NM], [])
3071 # check for math library
3072 AC_DEFUN([LT_LIB_M],
3073 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3076 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3077 # These system don't have libm, or don't need it
3080 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3081 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3084 AC_CHECK_LIB(m, cos, LIBM="-lm")
3091 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
3092 dnl aclocal-1.4 backwards compatibility:
3093 dnl AC_DEFUN([AC_CHECK_LIBM], [])
3096 # _LT_COMPILER_NO_RTTI([TAGNAME])
3097 # -------------------------------
3098 m4_defun([_LT_COMPILER_NO_RTTI],
3099 [m4_require([_LT_TAG_COMPILER])dnl
3101 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3103 if test "$GCC" = yes; then
3104 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3106 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
3107 lt_cv_prog_compiler_rtti_exceptions,
3108 [-fno-rtti -fno-exceptions], [],
3109 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
3111 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
3112 [Compiler flag to turn off builtin functions])
3113 ])# _LT_COMPILER_NO_RTTI
3116 # _LT_CMD_GLOBAL_SYMBOLS
3117 # ----------------------
3118 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
3119 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3120 AC_REQUIRE([AC_PROG_CC])dnl
3121 AC_REQUIRE([AC_OBJEXT])dnl
3122 AC_REQUIRE([LT_PATH_NM])dnl
3123 AC_REQUIRE([LT_PATH_LD])dnl
3124 m4_require([_LT_DECL_SED])dnl
3125 m4_require([_LT_DECL_EGREP])dnl
3126 m4_require([_LT_TAG_COMPILER])dnl
3128 # Check for command to grab the raw symbol name followed by C symbol from nm.
3129 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
3130 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
3132 # These are sane defaults that work on at least a few old systems.
3133 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
3135 # Character class describing NM global symbol codes.
3136 symcode='[[BCDEGRST]]'
3138 # Regexp to match symbols that can be accessed directly from C.
3139 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
3141 # Define system-specific variables.
3146 cygwin* | mingw* | pw32*)
3147 symcode='[[ABCDGISTW]]'
3150 if test "$host_cpu" = ia64; then
3151 symcode='[[ABCDEGRST]]'
3155 symcode='[[BCDEGRST]]'
3158 symcode='[[BCDEGQRST]]'
3169 sysv5* | sco5v6* | unixware* | OpenUNIX*)
3173 symcode='[[DFNSTU]]'
3177 # If we're using GNU nm, then use its standard symbol codes.
3178 case `$NM -V 2>&1` in
3179 *GNU* | *'with BFD'*)
3180 symcode='[[ABCDGIRSTW]]' ;;
3183 # Transform an extracted symbol line into a proper C declaration.
3184 # Some systems (esp. on ia64) link data and code symbols differently,
3185 # so use this general approach.
3186 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3188 # Transform an extracted symbol line into symbol name and symbol address
3189 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3191 # Handle CRLF in mingw tool chain
3195 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3199 # Try without a prefix underscore, then with it.
3200 for ac_symprfx in "" "_"; do
3202 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
3203 symxfrm="\\1 $ac_symprfx\\2 \\2"
3205 # Write the raw and C identifiers.
3206 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3207 # Fake it for dumpbin and say T for any non-static function
3208 # and D for any global variable.
3209 # Also find C++ and __fastcall symbols from MSVC++,
3210 # which start with @ or ?.
3211 lt_cv_sys_global_symbol_pipe="$AWK ['"\
3212 " {last_section=section; section=\$ 3};"\
3213 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
3214 " \$ 0!~/External *\|/{next};"\
3215 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
3216 " {if(hide[section]) next};"\
3217 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3218 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3219 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3220 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
3221 " ' prfx=^$ac_symprfx]"
3223 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
3226 # Check to see that the pipe works correctly.
3230 cat > conftest.$ac_ext <<_LT_EOF
3235 void nm_test_func(){}
3239 int main(){nm_test_var='a';nm_test_func();return(0);}
3242 if AC_TRY_EVAL(ac_compile); then
3243 # Now try to grab the symbols.
3245 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
3246 # Try sorting and uniquifying the output.
3247 if sort "$nlist" | uniq > "$nlist"T; then
3248 mv -f "$nlist"T "$nlist"
3253 # Make sure that we snagged all the symbols we need.
3254 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
3255 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
3256 cat <<_LT_EOF > conftest.$ac_ext
3262 # Now generate the symbol file.
3263 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
3265 cat <<_LT_EOF >> conftest.$ac_ext
3267 /* The mapping between symbol names and symbols. */
3272 lt__PROGRAM__LTX_preloaded_symbols[[]] =
3274 { "@PROGRAM@", (void *) 0 },
3276 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
3277 cat <<\_LT_EOF >> conftest.$ac_ext
3281 /* This works around a problem in FreeBSD linker */
3282 #ifdef FREEBSD_WORKAROUND
3283 static const void *lt_preloaded_setup() {
3284 return lt__PROGRAM__LTX_preloaded_symbols;
3292 # Now try linking the two files.
3293 mv conftest.$ac_objext conftstm.$ac_objext
3294 lt_save_LIBS="$LIBS"
3295 lt_save_CFLAGS="$CFLAGS"
3296 LIBS="conftstm.$ac_objext"
3297 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3298 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3301 LIBS="$lt_save_LIBS"
3302 CFLAGS="$lt_save_CFLAGS"
3304 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3307 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3310 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3313 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3314 cat conftest.$ac_ext >&5
3316 rm -f conftest* conftst*
3318 # Do not use the global_symbol_pipe unless it works.
3319 if test "$pipe_works" = yes; then
3322 lt_cv_sys_global_symbol_pipe=
3326 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3327 lt_cv_sys_global_symbol_to_cdecl=
3329 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3330 AC_MSG_RESULT(failed)
3335 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3336 [Take the output of nm and produce a listing of raw symbols and C names])
3337 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3338 [Transform the output of nm in a proper C declaration])
3339 _LT_DECL([global_symbol_to_c_name_address],
3340 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3341 [Transform the output of nm in a C name address pair])
3342 ]) # _LT_CMD_GLOBAL_SYMBOLS
3345 # _LT_COMPILER_PIC([TAGNAME])
3346 # ---------------------------
3347 m4_defun([_LT_COMPILER_PIC],
3348 [m4_require([_LT_TAG_COMPILER])dnl
3349 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
3350 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3351 _LT_TAGVAR(lt_prog_compiler_static, $1)=
3353 AC_MSG_CHECKING([for $compiler option to produce PIC])
3354 m4_if([$1], [CXX], [
3355 # C++ specific cases for pic, static, wl, etc.
3356 if test "$GXX" = yes; then
3357 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3358 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3362 # All AIX code is PIC.
3363 if test "$host_cpu" = ia64; then
3364 # AIX 5 now supports IA64 processor
3365 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3369 if test "$host_cpu" = m68k; then
3370 # FIXME: we need at least 68020 code to build shared libraries, but
3371 # adding the `-m68020' flag to GCC prevents building anything better,
3373 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3376 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3377 # PIC is the default for these OSes.
3379 mingw* | cygwin* | os2* | pw32*)
3380 # This hack is so that the source file can tell whether it is being
3381 # built for inclusion in a dll (and should export symbols for example).
3382 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3383 # (--disable-auto-import) libraries
3384 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3386 darwin* | rhapsody*)
3387 # PIC is the default on this platform
3388 # Common symbols not allowed in MH_DYLIB files
3389 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3392 # DJGPP does not support shared libraries at all
3393 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3396 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3397 # Instead, we relocate shared libraries at runtime.
3400 if test -d /usr/nec; then
3401 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3405 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3411 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3416 # QNX uses GNU C++, but need to define -shared option too, otherwise
3418 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3421 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3427 # All AIX code is PIC.
3428 if test "$host_cpu" = ia64; then
3429 # AIX 5 now supports IA64 processor
3430 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3432 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3436 case $cc_basename in
3438 # Green Hills C++ Compiler
3439 # _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"
3444 # PIC is the default on this platform
3445 # Common symbols not allowed in MH_DYLIB files
3446 case $cc_basename in
3448 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
3449 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3454 case $cc_basename in
3456 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3459 # Green Hills C++ Compiler
3460 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3466 freebsd* | kfreebsd*-gnu | dragonfly*)
3467 # FreeBSD uses GNU C++
3469 hpux9* | hpux10* | hpux11*)
3470 case $cc_basename in
3472 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3473 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3474 if test "$host_cpu" != ia64; then
3475 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3479 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3480 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3486 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3495 # This is c89, which is MS Visual C++ (no shared libs)
3496 # Anyone wants to do a port?
3498 irix5* | irix6* | nonstopux*)
3499 case $cc_basename in
3501 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3502 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3503 # CC pic flag -KPIC is the default.
3510 case $cc_basename in
3513 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3514 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3518 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3519 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3520 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3523 # Portland Group C++ compiler
3524 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3525 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3526 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3530 # Make sure the PIC flag is empty. It appears that all Alpha
3531 # Linux and Compaq Tru64 Unix objects are PIC.
3532 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3533 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3536 case `$CC -V 2>&1 | sed 5q` in
3539 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3540 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3541 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3552 case $cc_basename in
3554 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3563 # QNX uses GNU C++, but need to define -shared option too, otherwise
3565 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3567 osf3* | osf4* | osf5*)
3568 case $cc_basename in
3570 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3573 # Rational C++ 2.4.1
3574 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3577 # Digital/Compaq C++
3578 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3579 # Make sure the PIC flag is empty. It appears that all Alpha
3580 # Linux and Compaq Tru64 Unix objects are PIC.
3581 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3582 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3591 case $cc_basename in
3593 # Sun C++ 4.2, 5.x and Centerline C++
3594 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3595 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3596 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3599 # Green Hills C++ Compiler
3600 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3607 case $cc_basename in
3610 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3611 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3615 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3621 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3622 case $cc_basename in
3624 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3625 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3626 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3631 case $cc_basename in
3633 # NonStop-UX NCC 3.20
3634 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3643 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3649 if test "$GCC" = yes; then
3650 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3651 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3655 # All AIX code is PIC.
3656 if test "$host_cpu" = ia64; then
3657 # AIX 5 now supports IA64 processor
3658 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3663 if test "$host_cpu" = m68k; then
3664 # FIXME: we need at least 68020 code to build shared libraries, but
3665 # adding the `-m68020' flag to GCC prevents building anything better,
3667 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3671 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3672 # PIC is the default for these OSes.
3675 mingw* | cygwin* | pw32* | os2*)
3676 # This hack is so that the source file can tell whether it is being
3677 # built for inclusion in a dll (and should export symbols for example).
3678 # Although the cygwin gcc ignores -fPIC, still need this for old-style
3679 # (--disable-auto-import) libraries
3680 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3683 darwin* | rhapsody*)
3684 # PIC is the default on this platform
3685 # Common symbols not allowed in MH_DYLIB files
3686 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3690 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3697 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3703 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
3704 # Instead, we relocate shared libraries at runtime.
3708 # Just because we use GCC doesn't mean we suddenly get shared libraries
3709 # on systems that don't support them.
3710 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3715 # QNX uses GNU C++, but need to define -shared option too, otherwise
3717 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3721 if test -d /usr/nec; then
3722 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3727 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3731 # PORTME Check for flag to pass linker flags through the system compiler.
3734 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3735 if test "$host_cpu" = ia64; then
3736 # AIX 5 now supports IA64 processor
3737 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3739 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3743 # PIC is the default on this platform
3744 # Common symbols not allowed in MH_DYLIB files
3745 case $cc_basename in
3747 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
3748 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3753 mingw* | cygwin* | pw32* | os2*)
3754 # This hack is so that the source file can tell whether it is being
3755 # built for inclusion in a dll (and should export symbols for example).
3756 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3759 hpux9* | hpux10* | hpux11*)
3760 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3761 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3768 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3771 # Is there a better lt_prog_compiler_static that works with the bundled CC?
3772 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3775 irix5* | irix6* | nonstopux*)
3776 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3777 # PIC (with -KPIC) is the default.
3778 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3782 case $cc_basename in
3784 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3785 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3786 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
3788 pgcc* | pgf77* | pgf90* | pgf95*)
3789 # Portland Group compilers (*not* the Pentium gcc compiler,
3790 # which looks to be a dead project)
3791 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3792 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
3793 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3796 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3797 # All Alpha code is PIC.
3798 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3801 case `$CC -V 2>&1 | sed 5q` in
3804 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3805 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3806 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3809 # Sun Fortran 8.3 passes all unrecognized flags to the linker
3810 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3811 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3812 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
3820 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3821 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3825 # QNX uses GNU C++, but need to define -shared option too, otherwise
3827 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
3830 osf3* | osf4* | osf5*)
3831 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3832 # All OSF/1 code is PIC.
3833 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3837 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3841 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3842 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3843 case $cc_basename in
3845 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
3847 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
3852 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3853 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3854 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3857 sysv4 | sysv4.2uw2* | sysv4.3*)
3858 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3859 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3860 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3864 if test -d /usr/nec ;then
3865 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
3866 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3870 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
3871 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3872 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3873 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3877 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3878 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3882 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3883 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3887 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3893 # For platforms which do not support PIC, -DPIC is meaningless:
3895 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
3898 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
3901 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
3902 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
3903 [How to pass a linker flag through the compiler])
3906 # Check to make sure the PIC flag actually works.
3908 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
3909 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
3910 [_LT_TAGVAR(lt_prog_compiler_pic_works, $1)],
3911 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
3912 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
3914 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
3916 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
3917 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
3919 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
3920 [Additional compiler flags for building library objects])
3923 # Check to make sure the static flag actually works.
3925 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
3926 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
3927 _LT_TAGVAR(lt_prog_compiler_static_works, $1),
3928 $lt_tmp_static_flag,
3930 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
3931 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
3932 [Compiler flag to prevent dynamic linking])
3933 ])# _LT_COMPILER_PIC
3936 # _LT_LINKER_SHLIBS([TAGNAME])
3937 # ----------------------------
3938 # See if the linker supports building shared libraries.
3939 m4_defun([_LT_LINKER_SHLIBS],
3940 [AC_REQUIRE([LT_PATH_LD])dnl
3941 AC_REQUIRE([LT_PATH_NM])dnl
3942 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3943 m4_require([_LT_DECL_EGREP])dnl
3944 m4_require([_LT_DECL_SED])dnl
3945 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
3946 m4_require([_LT_TAG_COMPILER])dnl
3947 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3948 m4_if([$1], [CXX], [
3949 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3952 # If we're using GNU nm, then we don't want the "-C" option.
3953 # -C means demangle to AIX nm, but means don't demangle with GNU nm
3954 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
3955 _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'
3957 _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'
3961 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
3964 _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'
3967 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3972 _LT_TAGVAR(allow_undefined_flag, $1)=
3973 _LT_TAGVAR(always_export_symbols, $1)=no
3974 _LT_TAGVAR(archive_cmds, $1)=
3975 _LT_TAGVAR(archive_expsym_cmds, $1)=
3976 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3977 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
3978 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3979 _LT_TAGVAR(hardcode_automatic, $1)=no
3980 _LT_TAGVAR(hardcode_direct, $1)=no
3981 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
3982 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
3983 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3984 _LT_TAGVAR(hardcode_libdir_separator, $1)=
3985 _LT_TAGVAR(hardcode_minus_L, $1)=no
3986 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3987 _LT_TAGVAR(inherit_rpath, $1)=no
3988 _LT_TAGVAR(link_all_deplibs, $1)=unknown
3989 _LT_TAGVAR(module_cmds, $1)=
3990 _LT_TAGVAR(module_expsym_cmds, $1)=
3991 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
3992 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
3993 _LT_TAGVAR(thread_safe_flag_spec, $1)=
3994 _LT_TAGVAR(whole_archive_flag_spec, $1)=
3995 # include_expsyms should be a list of space-separated symbols to be *always*
3996 # included in the symbol list
3997 _LT_TAGVAR(include_expsyms, $1)=
3998 # exclude_expsyms can be an extended regexp of symbols to exclude
3999 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4000 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4001 # as well as any symbol that contains `d'.
4002 _LT_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
4003 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
4004 # platforms (ab)use it in PIC code, but their linkers get confused if
4005 # the symbol is explicitly referenced. Since portable code cannot
4006 # rely on this symbol name, it's probably fine to never include it in
4007 # preloaded symbol tables.
4008 extract_expsyms_cmds=
4011 cygwin* | mingw* | pw32*)
4012 # FIXME: the MSVC++ port hasn't been tested in a loooong time
4013 # When not using gcc, we currently assume that we are using
4014 # Microsoft Visual C++.
4015 if test "$GCC" != yes; then
4020 # we just hope/assume this is gcc and not c89 (= MSVC++)
4028 _LT_TAGVAR(ld_shlibs, $1)=yes
4029 if test "$with_gnu_ld" = yes; then
4030 # If archive_cmds runs LD, not CC, wlarc should be empty
4033 # Set some defaults for GNU ld with shared library support. These
4034 # are reset later if shared libraries are not supported. Putting them
4035 # here allows them to be overridden if necessary.
4036 runpath_var=LD_RUN_PATH
4037 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4038 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4039 # ancient GNU ld didn't support --whole-archive et. al.
4040 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4041 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4043 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4045 supports_anon_versioning=no
4046 case `$LD -v 2>&1` in
4047 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
4048 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
4049 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
4050 *\ 2.11.*) ;; # other 2.11 versions
4051 *) supports_anon_versioning=yes ;;
4054 # See if GNU ld supports shared libraries.
4056 aix3* | aix4* | aix5*)
4057 # On AIX/PPC, the GNU linker is very broken
4058 if test "$host_cpu" != ia64; then
4059 _LT_TAGVAR(ld_shlibs, $1)=no
4062 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
4063 *** to be unable to reliably create shared libraries on AIX.
4064 *** Therefore, libtool is disabling shared libraries support. If you
4065 *** really care for shared libraries, you may want to modify your PATH
4066 *** so that a non-GNU linker is found, and then restart.
4073 if test "$host_cpu" = m68k; then
4074 _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)'
4075 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4076 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4079 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
4080 # that the semantics of dynamic libraries on AmigaOS, at least up
4081 # to version 4, is to share data among multiple programs linked
4082 # with the same dynamic library. Since this doesn't match the
4083 # behavior of shared libraries on other platforms, we can't use
4085 _LT_TAGVAR(ld_shlibs, $1)=no
4089 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4090 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4091 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4092 # support --undefined. This deserves some investigation. FIXME
4093 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4095 _LT_TAGVAR(ld_shlibs, $1)=no
4099 cygwin* | mingw* | pw32*)
4100 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4101 # as there is no search path for DLLs.
4102 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4103 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4104 _LT_TAGVAR(always_export_symbols, $1)=no
4105 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4106 _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'
4108 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4109 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base'
4110 # If the export-symbols file already is a .def file (1st line
4111 # is EXPORTS), use it as is; otherwise, prepend...
4112 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4113 cp $export_symbols $output_objdir/$soname.def;
4115 echo EXPORTS > $output_objdir/$soname.def;
4116 cat $export_symbols >> $output_objdir/$soname.def;
4118 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base'
4120 _LT_TAGVAR(ld_shlibs, $1)=no
4125 _LT_TAGVAR(hardcode_direct, $1)=no
4126 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4127 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4128 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4129 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4130 # Instead, shared libraries are loaded at an image base (0x10000000 by
4131 # default) and relocated if they conflict, which is a slow very memory
4132 # consuming and fragmenting process. To avoid this, we pick a random,
4133 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4134 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4135 _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'
4136 _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'
4141 if test "$host_os" = linux-dietlibc; then
4142 case $cc_basename in
4143 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
4146 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4147 && test "$tmp_diet" = no
4150 case $cc_basename,$host_cpu in
4151 pgcc*) # Portland Group C compiler
4152 _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'
4153 tmp_addflag=' $pic_flag'
4155 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
4156 _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'
4157 tmp_addflag=' $pic_flag -Mnomain' ;;
4158 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
4159 tmp_addflag=' -i_dynamic' ;;
4160 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
4161 tmp_addflag=' -i_dynamic -nofor_main' ;;
4162 ifc* | ifort*) # Intel Fortran compiler
4163 tmp_addflag=' -nofor_main' ;;
4165 case `$CC -V 2>&1 | sed 5q` in
4166 *Sun\ C*) # Sun C 5.9
4167 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive /dev/null'
4168 tmp_sharedflag='-G' ;;
4169 *Sun\ F*) # Sun Fortran 8.3
4170 tmp_sharedflag='-G' ;;
4172 tmp_sharedflag='-shared' ;;
4174 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4176 if test "x$supports_anon_versioning" = xyes; then
4177 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4178 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4179 echo "local: *; };" >> $output_objdir/$libname.ver~
4180 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
4183 _LT_TAGVAR(ld_shlibs, $1)=no
4188 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4189 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
4192 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4193 _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'
4198 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
4199 _LT_TAGVAR(ld_shlibs, $1)=no
4202 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
4203 *** create shared libraries on Solaris systems. Therefore, libtool
4204 *** is disabling shared libraries support. We urge you to upgrade GNU
4205 *** binutils to release 2.9.1 or newer. Another option is to modify
4206 *** your PATH or compiler configuration so that the native linker is
4207 *** used, and then restart.
4210 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4211 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4212 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4214 _LT_TAGVAR(ld_shlibs, $1)=no
4218 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
4219 case `$LD -v 2>&1` in
4220 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
4221 _LT_TAGVAR(ld_shlibs, $1)=no
4224 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
4225 *** reliably create shared libraries on SCO systems. Therefore, libtool
4226 *** is disabling shared libraries support. We urge you to upgrade GNU
4227 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
4228 *** your PATH or compiler configuration so that the native linker is
4229 *** used, and then restart.
4234 # For security reasons, it is highly recommended that you always
4235 # use absolute paths for naming shared libraries, and exclude the
4236 # DT_RUNPATH tag from executables and libraries. But doing so
4237 # requires that you compile everything twice, which is a pain.
4238 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4239 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4240 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4241 _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'
4243 _LT_TAGVAR(ld_shlibs, $1)=no
4250 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4252 _LT_TAGVAR(hardcode_direct, $1)=yes
4253 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4257 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4258 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4259 _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'
4261 _LT_TAGVAR(ld_shlibs, $1)=no
4266 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
4268 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
4269 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
4270 _LT_TAGVAR(whole_archive_flag_spec, $1)=
4273 # PORTME fill in a description of your system's linker (not GNU ld)
4276 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4277 _LT_TAGVAR(always_export_symbols, $1)=yes
4278 _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'
4279 # Note: this linker hardcodes the directories in LIBPATH if there
4280 # are no directories specified by -L.
4281 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4282 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
4283 # Neither direct hardcoding nor static linking is supported with a
4285 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4290 if test "$host_cpu" = ia64; then
4291 # On IA64, the linker does run time linking by default, so we don't
4292 # have to do anything special.
4293 aix_use_runtimelinking=no
4294 exp_sym_flag='-Bexport'
4297 # If we're using GNU nm, then we don't want the "-C" option.
4298 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4299 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4300 _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'
4302 _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'
4304 aix_use_runtimelinking=no
4306 # Test if we are trying to use run time linking or normal
4307 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4308 # need to do runtime linking.
4309 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4310 for ld_flag in $LDFLAGS; do
4311 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
4312 aix_use_runtimelinking=yes
4319 exp_sym_flag='-bexport'
4320 no_entry_flag='-bnoentry'
4323 # When large executables or shared objects are built, AIX ld can
4324 # have problems creating the table of contents. If linking a library
4325 # or program results in "error TOC overflow" add -mminimal-toc to
4326 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4327 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4329 _LT_TAGVAR(archive_cmds, $1)=''
4330 _LT_TAGVAR(hardcode_direct, $1)=yes
4331 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4332 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4333 _LT_TAGVAR(link_all_deplibs, $1)=yes
4334 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
4336 if test "$GCC" = yes; then
4337 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4338 # We only want to do this on AIX 4.2 and lower, the check
4339 # below for broken collect2 doesn't work under 4.3+
4340 collect2name=`${CC} -print-prog-name=collect2`
4341 if test -f "$collect2name" &&
4342 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4344 # We have reworked collect2
4347 # We have old collect2
4348 _LT_TAGVAR(hardcode_direct, $1)=unsupported
4349 # It fails to find uninstalled libraries when the uninstalled
4350 # path is not listed in the libpath. Setting hardcode_minus_L
4351 # to unsupported forces relinking
4352 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4353 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4354 _LT_TAGVAR(hardcode_libdir_separator, $1)=
4358 shared_flag='-shared'
4359 if test "$aix_use_runtimelinking" = yes; then
4360 shared_flag="$shared_flag "'${wl}-G'
4364 if test "$host_cpu" = ia64; then
4365 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4366 # chokes on -Wl,-G. The following line is correct:
4369 if test "$aix_use_runtimelinking" = yes; then
4370 shared_flag='${wl}-G'
4372 shared_flag='${wl}-bM:SRE'
4377 # It seems that -bexpall does not export symbols beginning with
4378 # underscore (_), so it is better to generate a list of symbols to export.
4379 _LT_TAGVAR(always_export_symbols, $1)=yes
4380 if test "$aix_use_runtimelinking" = yes; then
4381 # Warning - without using the other runtime loading flags (-brtl),
4382 # -berok will link without error, but may produce a broken library.
4383 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
4384 # Determine the default libpath from the value encoded in an
4386 _LT_SYS_MODULE_PATH_AIX
4387 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4388 _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"
4390 if test "$host_cpu" = ia64; then
4391 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4392 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4393 _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"
4395 # Determine the default libpath from the value encoded in an
4397 _LT_SYS_MODULE_PATH_AIX
4398 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4399 # Warning - without using the other run time loading flags,
4400 # -berok will link without error, but may produce a broken library.
4401 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4402 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4403 # Exported symbols can be pulled into shared objects from archives
4404 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4405 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4406 # This is similar to how AIX traditionally builds its shared libraries.
4407 _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'
4413 if test "$host_cpu" = m68k; then
4414 _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)'
4415 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4416 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4418 # see comment about different semantics on the GNU ld section
4419 _LT_TAGVAR(ld_shlibs, $1)=no
4423 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
4426 cygwin* | mingw* | pw32*)
4427 # When not using gcc, we currently assume that we are using
4428 # Microsoft Visual C++.
4429 # hardcode_libdir_flag_spec is actually meaningless, as there is
4430 # no search path for DLLs.
4431 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
4432 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4433 # Tell ltmain to make .lib files, not .a files.
4435 # Tell ltmain to make .dll files, not .so files.
4437 # FIXME: Setting linknames here is a bad hack.
4438 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
4439 # The linker will automatically build a .lib file if we build a DLL.
4440 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
4441 # FIXME: Should let the user specify the lib program.
4444 ac_top_srcdir=`dirname $CXX`
4445 _LT_TAGVAR(old_archive_cmds, $1)="$ac_top_srcdir/tlib-wrapper /OUT:\$oldlib\$oldobjs\$old_deplibs"
4446 AR="$ac_top_srcdir/tlib-wrapper"
4449 _LT_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs && ranlib $oldlib'
4452 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
4453 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4456 darwin* | rhapsody*)
4458 rhapsody* | darwin1.[[012]])
4459 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4462 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
4464 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4467 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4472 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4473 _LT_TAGVAR(hardcode_direct, $1)=no
4474 _LT_TAGVAR(hardcode_automatic, $1)=yes
4475 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4476 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
4477 _LT_TAGVAR(link_all_deplibs, $1)=yes
4478 if test "$GCC" = yes ; then
4479 AC_CACHE_VAL([lt_cv_apple_cc_single_mod],
4480 [lt_cv_apple_cc_single_mod=no
4481 if test -z "${LT_MULTI_MODULE}"; then
4482 # By default we will add the -single_module flag. You can override
4483 # by either setting the environment variable LT_MULTI_MODULE
4484 # non-empty at configure time, or by adding -multi-module to the
4486 echo "int foo(void){return 1;}" > conftest.c
4487 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
4488 -dynamiclib ${wl}-single_module conftest.c
4489 if test -f libconftest.dylib; then
4490 lt_cv_apple_cc_single_mod=yes
4491 rm libconftest.dylib
4495 output_verbose_link_cmd=echo
4496 if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
4497 _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4498 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $single_module -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4500 _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4501 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4503 _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4504 _LT_TAGVAR(module_expsym_cmds, $1)='sed -e "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4506 case $cc_basename in
4508 output_verbose_link_cmd=echo
4509 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
4510 _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4511 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4512 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4513 _LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4516 _LT_TAGVAR(ld_shlibs, $1)=no
4523 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4524 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4525 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4529 _LT_TAGVAR(ld_shlibs, $1)=no
4532 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
4533 # support. Future versions do this automatically, but an explicit c++rt0.o
4534 # does not break anything, and helps significantly (at the cost of a little
4537 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4538 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4539 _LT_TAGVAR(hardcode_direct, $1)=yes
4540 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4543 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4545 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4546 _LT_TAGVAR(hardcode_direct, $1)=yes
4547 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4548 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4551 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4552 freebsd* | kfreebsd*-gnu | dragonfly*)
4553 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4554 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4555 _LT_TAGVAR(hardcode_direct, $1)=yes
4556 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4560 if test "$GCC" = yes; then
4561 _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'
4563 _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'
4565 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4566 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4567 _LT_TAGVAR(hardcode_direct, $1)=yes
4569 # hardcode_minus_L: Not really in the search PATH,
4570 # but as the default location of the library.
4571 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4572 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4576 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4577 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4579 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4581 if test "$with_gnu_ld" = no; then
4582 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4583 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4584 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4585 _LT_TAGVAR(hardcode_direct, $1)=yes
4586 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4587 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4588 # hardcode_minus_L: Not really in the search PATH,
4589 # but as the default location of the library.
4590 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4595 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4598 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4601 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4604 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4610 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4613 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
4616 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4620 if test "$with_gnu_ld" = no; then
4621 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4622 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4626 _LT_TAGVAR(hardcode_direct, $1)=no
4627 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4630 _LT_TAGVAR(hardcode_direct, $1)=yes
4631 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
4632 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4634 # hardcode_minus_L: Not really in the search PATH,
4635 # but as the default location of the library.
4636 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4642 irix5* | irix6* | nonstopux*)
4643 if test "$GCC" = yes; then
4644 _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'
4645 # Try to use the -exported_symbol ld option, if it does not
4646 # work, assume that -exports_file does not work either and
4647 # implicitly export all symbols.
4648 save_LDFLAGS="$LDFLAGS"
4649 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
4650 AC_LINK_IFELSE(int foo(void) {},
4651 _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'
4653 LDFLAGS="$save_LDFLAGS"
4655 _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'
4656 _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'
4658 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4659 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4660 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4661 _LT_TAGVAR(inherit_rpath, $1)=yes
4662 _LT_TAGVAR(link_all_deplibs, $1)=yes
4666 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4667 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
4669 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
4671 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4672 _LT_TAGVAR(hardcode_direct, $1)=yes
4673 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4677 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4678 _LT_TAGVAR(hardcode_direct, $1)=yes
4679 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4680 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4681 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4688 _LT_TAGVAR(hardcode_direct, $1)=yes
4689 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4690 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4691 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4692 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
4693 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4694 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4697 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4698 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4699 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4702 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4703 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4710 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4711 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4712 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
4713 _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'
4714 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4718 if test "$GCC" = yes; then
4719 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4720 _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'
4722 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4723 _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'
4725 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4726 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4727 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4730 osf4* | osf5*) # as osf3* with the addition of -msym flag
4731 if test "$GCC" = yes; then
4732 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4733 _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'
4734 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4736 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4737 _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'
4738 _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~
4739 $CC -shared${allow_undefined_flag} -input $lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
4741 # Both c and cxx compiler support -rpath directly
4742 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4744 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
4745 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
4749 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
4750 if test "$GCC" = yes; then
4752 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4753 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4754 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4756 case `$CC -V 2>&1` in
4759 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4760 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4761 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
4765 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
4766 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
4767 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
4771 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4772 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4774 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4776 # The compiler driver will combine and reorder linker options,
4777 # but understands `-z linker_flag'. GCC discards it without `$wl',
4778 # but is careful enough not to reorder.
4779 # Supported since Solaris 2.6 (maybe 2.5.1?)
4780 if test "$GCC" = yes; then
4781 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4783 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4787 _LT_TAGVAR(link_all_deplibs, $1)=yes
4791 if test "x$host_vendor" = xsequent; then
4792 # Use $CC to link under sequent, because it throws in some extra .o
4793 # files that make .init and .fini sections work.
4794 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4796 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4798 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4799 _LT_TAGVAR(hardcode_direct, $1)=yes
4800 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4801 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4805 case $host_vendor in
4807 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4808 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
4811 ## LD is ld it makes a PLAMLIB
4812 ## CC just makes a GrossModule.
4813 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
4814 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
4815 _LT_TAGVAR(hardcode_direct, $1)=no
4818 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4819 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
4822 runpath_var='LD_RUN_PATH'
4823 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4827 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4828 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4829 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
4833 if test -d /usr/nec; then
4834 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4835 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4836 runpath_var=LD_RUN_PATH
4837 hardcode_runpath_var=yes
4838 _LT_TAGVAR(ld_shlibs, $1)=yes
4842 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4843 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4844 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4845 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4846 runpath_var='LD_RUN_PATH'
4848 if test "$GCC" = yes; then
4849 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4850 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4852 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4853 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4857 sysv5* | sco3.2v5* | sco5v6*)
4858 # Note: We can NOT use -z defs as we might desire, because we do not
4859 # link with -lc, and that would cause any symbols used from libc to
4860 # always be unresolved, which means just about no library would
4861 # ever link correctly. If we're not using GNU ld we use -z text
4862 # though, which does catch some bad symbols but isn't as heavy-handed
4864 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4865 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4866 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4867 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4868 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
4869 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
4870 _LT_TAGVAR(link_all_deplibs, $1)=yes
4871 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4872 runpath_var='LD_RUN_PATH'
4874 if test "$GCC" = yes; then
4875 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4876 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4878 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4879 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4884 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4885 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4886 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4890 _LT_TAGVAR(ld_shlibs, $1)=no
4894 if test x$host_vendor = xsni; then
4896 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4897 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
4903 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
4904 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4906 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
4908 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
4909 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
4910 _LT_DECL([], [extract_expsyms_cmds], [2],
4911 [The commands to extract the exported symbol list from a shared archive])
4914 # Do we need to explicitly link libc?
4916 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
4918 # Assume -lc should be added
4919 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4921 if test "$enable_shared" = yes && test "$GCC" = yes; then
4922 case $_LT_TAGVAR(archive_cmds, $1) in
4924 # FIXME: we may have to deal with multi-command sequences.
4927 # Test whether the compiler implicitly links with -lc since on some
4928 # systems, -lgcc has to come before -lc. If gcc already passes -lc
4929 # to ld, don't add -lc before -lgcc.
4930 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
4932 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4934 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
4937 libobjs=conftest.$ac_objext
4939 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
4940 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
4946 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
4947 _LT_TAGVAR(allow_undefined_flag, $1)=
4948 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
4950 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
4952 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
4954 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
4956 cat conftest.err 1>&5
4959 AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
4966 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
4967 [Whether or not to add -lc for building shared libraries])
4968 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
4969 [enable_shared_with_static_runtimes], [0],
4970 [Whether or not to disallow shared libs when runtime libs are static])
4971 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
4972 [Compiler flag to allow reflexive dlopens])
4973 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
4974 [Compiler flag to generate shared objects directly from archives])
4975 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
4976 [Create an old-style archive from a shared archive])
4977 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
4978 [Create a temporary old-style archive to link instead of a shared archive])
4979 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
4980 _LT_TAGDECL([], [archive_expsym_cmds], [2])
4981 _LT_TAGDECL([], [module_cmds], [2],
4982 [Commands used to build a loadable module if different from building
4984 _LT_TAGDECL([], [module_expsym_cmds], [2])
4985 _LT_TAGDECL([], [with_gnu_ld], [1],
4986 [Whether we are building with GNU ld or not])
4987 _LT_TAGDECL([], [allow_undefined_flag], [1],
4988 [Flag that allows shared libraries with undefined symbols to be built])
4989 _LT_TAGDECL([], [no_undefined_flag], [1],
4990 [Flag that enforces no undefined symbols])
4991 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
4992 [Flag to hardcode $libdir into a binary during linking.
4993 This must work even if $libdir does not exist])
4994 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
4995 [[If ld is used when linking, flag to hardcode $libdir into a binary
4996 during linking. This must work even if $libdir does not exist]])
4997 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
4998 [Whether we need a single "-rpath" flag with a separated argument])
4999 _LT_TAGDECL([], [hardcode_direct], [0],
5000 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5001 DIR into the resulting binary])
5002 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5003 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
5004 DIR into the resulting binary and the resulting library dependency is
5005 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
5006 library is relocated])
5007 _LT_TAGDECL([], [hardcode_minus_L], [0],
5008 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
5009 into the resulting binary])
5010 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
5011 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
5012 into the resulting binary])
5013 _LT_TAGDECL([], [hardcode_automatic], [0],
5014 [Set to "yes" if building a shared library automatically hardcodes DIR
5015 into the library and all subsequent libraries and executables linked
5017 _LT_TAGDECL([], [inherit_rpath], [0],
5018 [Set to yes if linker adds runtime paths of dependent libraries
5019 to runtime path list])
5020 _LT_TAGDECL([], [link_all_deplibs], [0],
5021 [Whether libtool must link a program against all its dependency libraries])
5022 _LT_TAGDECL([], [fix_srcfile_path], [1],
5023 [Fix the shell variable $srcfile for the compiler])
5024 _LT_TAGDECL([], [always_export_symbols], [0],
5025 [Set to "yes" if exported symbols are required])
5026 _LT_TAGDECL([], [export_symbols_cmds], [2],
5027 [The commands to list exported symbols])
5028 _LT_TAGDECL([], [exclude_expsyms], [1],
5029 [Symbols that should not be listed in the preloaded symbols])
5030 _LT_TAGDECL([], [include_expsyms], [1],
5031 [Symbols that must always be exported])
5032 _LT_TAGDECL([], [prelink_cmds], [2],
5033 [Commands necessary for linking programs (against libraries) with templates])
5034 _LT_TAGDECL([], [file_list_spec], [1],
5035 [Specify filename containing input files])
5036 dnl FIXME: Not yet implemented
5037 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
5038 dnl [Compiler flag to generate thread safe objects])
5039 ])# _LT_LINKER_SHLIBS
5042 # _LT_LANG_C_CONFIG([TAG])
5043 # ------------------------
5044 # Ensure that the configuration variables for a C compiler are suitably
5045 # defined. These variables are subsequently used by _LT_CONFIG to write
5046 # the compiler configuration to `libtool'.
5047 m4_defun([_LT_LANG_C_CONFIG],
5048 [m4_require([_LT_DECL_EGREP])dnl
5052 # Source file extension for C test sources.
5055 # Object file extension for compiled C test sources.
5057 _LT_TAGVAR(objext, $1)=$objext
5059 # Code to be used in simple compile tests
5060 lt_simple_compile_test_code="int some_variable = 0;"
5062 # Code to be used in simple link tests
5063 lt_simple_link_test_code='int main(){return(0);}'
5066 # Save the default compiler, since it gets overwritten when the other
5067 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
5068 compiler_DEFAULT=$CC
5070 # save warnings/boilerplate of simple test code
5071 _LT_COMPILER_BOILERPLATE
5072 _LT_LINKER_BOILERPLATE
5075 ## There is no encapsulation within the following macros, do not change
5076 ## the running order or otherwise move them around unless you know exactly
5077 ## what you are doing...
5078 if test -n "$compiler"; then
5079 _LT_COMPILER_NO_RTTI($1)
5080 _LT_COMPILER_PIC($1)
5081 _LT_COMPILER_C_O($1)
5082 _LT_COMPILER_FILE_LOCKS($1)
5083 _LT_LINKER_SHLIBS($1)
5084 _LT_SYS_DYNAMIC_LINKER($1)
5085 _LT_LINKER_HARDCODE_LIBPATH($1)
5089 # Report which library types will actually be built
5090 AC_MSG_CHECKING([if libtool supports shared libraries])
5091 AC_MSG_RESULT([$can_build_shared])
5093 AC_MSG_CHECKING([whether to build shared libraries])
5094 test "$can_build_shared" = "no" && enable_shared=no
5096 # On AIX, shared libraries and static libraries use the same namespace, and
5097 # are all built from PIC.
5100 test "$enable_shared" = yes && enable_static=no
5101 if test -n "$RANLIB"; then
5102 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5103 postinstall_cmds='$RANLIB $lib'
5108 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5109 test "$enable_shared" = yes && enable_static=no
5113 AC_MSG_RESULT([$enable_shared])
5115 AC_MSG_CHECKING([whether to build static libraries])
5116 # Make sure either enable_shared or enable_static is yes.
5117 test "$enable_shared" = yes || enable_static=yes
5118 AC_MSG_RESULT([$enable_static])
5124 ])# _LT_LANG_C_CONFIG
5129 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
5130 # compiler, we have our own version here.
5131 m4_defun([_LT_PROG_CXX],
5133 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
5135 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5136 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5137 (test "X$CXX" != "Xg++"))) ; then
5140 _lt_caught_CXX_error=yes
5142 popdef([AC_MSG_ERROR])
5145 dnl aclocal-1.4 backwards compatibility:
5146 dnl AC_DEFUN([_LT_PROG_CXX], [])
5149 # _LT_LANG_CXX_CONFIG([TAG])
5150 # --------------------------
5151 # Ensure that the configuration variables for a C++ compiler are suitably
5152 # defined. These variables are subsequently used by _LT_CONFIG to write
5153 # the compiler configuration to `libtool'.
5154 m4_defun([_LT_LANG_CXX_CONFIG],
5155 [AC_REQUIRE([_LT_PROG_CXX])dnl
5156 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5157 m4_require([_LT_DECL_EGREP])dnl
5160 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5161 _LT_TAGVAR(allow_undefined_flag, $1)=
5162 _LT_TAGVAR(always_export_symbols, $1)=no
5163 _LT_TAGVAR(archive_expsym_cmds, $1)=
5164 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5165 _LT_TAGVAR(hardcode_direct, $1)=no
5166 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5167 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5168 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5169 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5170 _LT_TAGVAR(hardcode_minus_L, $1)=no
5171 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5172 _LT_TAGVAR(hardcode_automatic, $1)=no
5173 _LT_TAGVAR(inherit_rpath, $1)=no
5174 _LT_TAGVAR(module_cmds, $1)=
5175 _LT_TAGVAR(module_expsym_cmds, $1)=
5176 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5177 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5178 _LT_TAGVAR(no_undefined_flag, $1)=
5179 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5180 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5182 # Source file extension for C++ test sources.
5185 # Object file extension for compiled C++ test sources.
5187 _LT_TAGVAR(objext, $1)=$objext
5189 # No sense in running all these tests if we already determined that
5190 # the CXX compiler isn't working. Some variables (like enable_shared)
5191 # are currently assumed to apply to all compilers on this platform,
5192 # and will be corrupted by setting them based on a non-working compiler.
5193 if test "$_lt_caught_CXX_error" != yes; then
5194 # Code to be used in simple compile tests
5195 lt_simple_compile_test_code="int some_variable = 0;"
5197 # Code to be used in simple link tests
5198 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
5200 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5203 # save warnings/boilerplate of simple test code
5204 _LT_COMPILER_BOILERPLATE
5205 _LT_LINKER_BOILERPLATE
5207 # Allow CC to be a program name with arguments.
5212 lt_save_with_gnu_ld=$with_gnu_ld
5213 lt_save_path_LD=$lt_cv_path_LD
5214 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
5215 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
5217 $as_unset lt_cv_prog_gnu_ld
5219 if test -n "${lt_cv_path_LDCXX+set}"; then
5220 lt_cv_path_LD=$lt_cv_path_LDCXX
5222 $as_unset lt_cv_path_LD
5224 test -z "${LDCXX+set}" || LD=$LDCXX
5227 _LT_TAGVAR(compiler, $1)=$CC
5228 _LT_CC_BASENAME([$compiler])
5230 if test -n "$compiler"; then
5231 # We don't want -fno-exception when compiling C++ code, so set the
5232 # no_builtin_flag separately
5233 if test "$GXX" = yes; then
5234 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5236 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5239 if test "$GXX" = yes; then
5240 # Set up default GNU C++ configuration
5244 # Check if GNU C++ uses GNU ld as the underlying linker, since the
5245 # archiving commands below assume that GNU ld is being used.
5246 if test "$with_gnu_ld" = yes; then
5247 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5248 _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'
5250 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5251 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5253 # If archive_cmds runs LD, not CC, wlarc should be empty
5254 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
5255 # investigate it a little bit more. (MM)
5258 # ancient GNU ld didn't support --whole-archive et. al.
5259 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
5260 $GREP 'no-whole-archive' > /dev/null; then
5261 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5263 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5269 # A generic and very simple default shared library creation
5270 # command for GNU C++ for the case where it uses the native
5271 # linker, instead of GNU ld. If possible, this setting should
5272 # overridden to take advantage of the native linker features on
5273 # the platform it is being used on.
5274 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5277 # Commands to make compiler produce verbose output that lists
5278 # what "hidden" libraries, object files and flags are used when
5279 # linking a shared library.
5280 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5288 # PORTME: fill in a description of your system's C++ link characteristics
5289 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5290 _LT_TAGVAR(ld_shlibs, $1)=yes
5293 # FIXME: insert proper C++ library support
5294 _LT_TAGVAR(ld_shlibs, $1)=no
5297 if test "$host_cpu" = ia64; then
5298 # On IA64, the linker does run time linking by default, so we don't
5299 # have to do anything special.
5300 aix_use_runtimelinking=no
5301 exp_sym_flag='-Bexport'
5304 aix_use_runtimelinking=no
5306 # Test if we are trying to use run time linking or normal
5307 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5308 # need to do runtime linking.
5309 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5310 for ld_flag in $LDFLAGS; do
5313 aix_use_runtimelinking=yes
5321 exp_sym_flag='-bexport'
5322 no_entry_flag='-bnoentry'
5325 # When large executables or shared objects are built, AIX ld can
5326 # have problems creating the table of contents. If linking a library
5327 # or program results in "error TOC overflow" add -mminimal-toc to
5328 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5329 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5331 _LT_TAGVAR(archive_cmds, $1)=''
5332 _LT_TAGVAR(hardcode_direct, $1)=yes
5333 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5334 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5335 _LT_TAGVAR(link_all_deplibs, $1)=yes
5336 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5338 if test "$GXX" = yes; then
5339 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5340 # We only want to do this on AIX 4.2 and lower, the check
5341 # below for broken collect2 doesn't work under 4.3+
5342 collect2name=`${CC} -print-prog-name=collect2`
5343 if test -f "$collect2name" &&
5344 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5346 # We have reworked collect2
5349 # We have old collect2
5350 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5351 # It fails to find uninstalled libraries when the uninstalled
5352 # path is not listed in the libpath. Setting hardcode_minus_L
5353 # to unsupported forces relinking
5354 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5355 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5356 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5359 shared_flag='-shared'
5360 if test "$aix_use_runtimelinking" = yes; then
5361 shared_flag="$shared_flag "'${wl}-G'
5365 if test "$host_cpu" = ia64; then
5366 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5367 # chokes on -Wl,-G. The following line is correct:
5370 if test "$aix_use_runtimelinking" = yes; then
5371 shared_flag='${wl}-G'
5373 shared_flag='${wl}-bM:SRE'
5378 # It seems that -bexpall does not export symbols beginning with
5379 # underscore (_), so it is better to generate a list of symbols to
5381 _LT_TAGVAR(always_export_symbols, $1)=yes
5382 if test "$aix_use_runtimelinking" = yes; then
5383 # Warning - without using the other runtime loading flags (-brtl),
5384 # -berok will link without error, but may produce a broken library.
5385 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5386 # Determine the default libpath from the value encoded in an empty
5388 _LT_SYS_MODULE_PATH_AIX
5389 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5391 _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"
5393 if test "$host_cpu" = ia64; then
5394 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5395 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5396 _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"
5398 # Determine the default libpath from the value encoded in an
5400 _LT_SYS_MODULE_PATH_AIX
5401 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5402 # Warning - without using the other run time loading flags,
5403 # -berok will link without error, but may produce a broken library.
5404 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5405 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5406 # Exported symbols can be pulled into shared objects from archives
5407 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5408 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5409 # This is similar to how AIX traditionally builds its shared
5411 _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'
5417 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5418 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5419 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5420 # support --undefined. This deserves some investigation. FIXME
5421 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5423 _LT_TAGVAR(ld_shlibs, $1)=no
5428 case $cc_basename in
5430 # FIXME: insert proper C++ library support
5431 _LT_TAGVAR(ld_shlibs, $1)=no
5436 cygwin* | mingw* | pw32*)
5437 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5438 # as there is no search path for DLLs.
5439 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5440 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5441 _LT_TAGVAR(always_export_symbols, $1)=no
5442 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5444 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5445 _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'
5446 # If the export-symbols file already is a .def file (1st line
5447 # is EXPORTS), use it as is; otherwise, prepend...
5448 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5449 cp $export_symbols $output_objdir/$soname.def;
5451 echo EXPORTS > $output_objdir/$soname.def;
5452 cat $export_symbols >> $output_objdir/$soname.def;
5454 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base'
5456 _LT_TAGVAR(ld_shlibs, $1)=no
5459 darwin* | rhapsody*)
5461 rhapsody* | darwin1.[[012]])
5462 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5465 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
5467 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5470 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5475 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5476 _LT_TAGVAR(hardcode_direct, $1)=no
5477 _LT_TAGVAR(hardcode_automatic, $1)=yes
5478 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5479 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
5480 _LT_TAGVAR(link_all_deplibs, $1)=yes
5482 if test "$GXX" = yes ; then
5483 AC_CACHE_VAL([lt_cv_apple_cc_single_mod],
5484 [lt_cv_apple_cc_single_mod=no
5485 if test -z "${LT_MULTI_MODULE}"; then
5486 # By default we will add the -single_module flag. You can override
5487 # by either setting the environment variable LT_MULTI_MODULE
5488 # non-empty at configure time, or by adding -multi-module to the
5490 echo "int foo(void){return 1;}" > conftest.c
5491 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
5492 -dynamiclib ${wl}-single_module conftest.c
5493 if test -f libconftest.dylib; then
5494 lt_cv_apple_cc_single_mod=yes
5495 rm libconftest.dylib
5499 output_verbose_link_cmd=echo
5500 if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
5501 _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5502 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5504 _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'
5505 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5507 _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5508 _LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5510 case $cc_basename in
5512 output_verbose_link_cmd=echo
5513 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO "$rpath/$soname"` $verstring'
5514 _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5515 # Don't fix this by using the ld -exported_symbols_list flag,
5516 # it doesn't exist in older darwin lds
5517 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5518 _LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5521 _LT_TAGVAR(ld_shlibs, $1)=no
5528 case $cc_basename in
5530 # FIXME: insert proper C++ library support
5531 _LT_TAGVAR(ld_shlibs, $1)=no
5534 # Green Hills C++ Compiler
5535 # FIXME: insert proper C++ library support
5536 _LT_TAGVAR(ld_shlibs, $1)=no
5539 # FIXME: insert proper C++ library support
5540 _LT_TAGVAR(ld_shlibs, $1)=no
5546 # C++ shared libraries reported to be fairly broken before
5548 _LT_TAGVAR(ld_shlibs, $1)=no
5552 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5555 freebsd* | kfreebsd*-gnu | dragonfly*)
5556 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
5558 _LT_TAGVAR(ld_shlibs, $1)=yes
5565 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5566 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5567 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5568 _LT_TAGVAR(hardcode_direct, $1)=yes
5569 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5570 # but as the default
5571 # location of the library.
5573 case $cc_basename in
5575 # FIXME: insert proper C++ library support
5576 _LT_TAGVAR(ld_shlibs, $1)=no
5579 _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'
5580 # Commands to make compiler produce verbose output that lists
5581 # what "hidden" libraries, object files and flags are used when
5582 # linking a shared library.
5584 # There doesn't appear to be a way to prevent this compiler from
5585 # explicitly linking system object files so we need to strip them
5586 # from the output so that they don't get included in the library
5588 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'
5591 if test "$GXX" = yes; then
5592 _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'
5594 # FIXME: insert proper C++ library support
5595 _LT_TAGVAR(ld_shlibs, $1)=no
5602 if test $with_gnu_ld = no; then
5603 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5604 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5610 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5616 _LT_TAGVAR(hardcode_direct, $1)=no
5617 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5620 _LT_TAGVAR(hardcode_direct, $1)=yes
5621 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5622 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5623 # but as the default
5624 # location of the library.
5628 case $cc_basename in
5630 # FIXME: insert proper C++ library support
5631 _LT_TAGVAR(ld_shlibs, $1)=no
5636 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5639 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5642 _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'
5645 # Commands to make compiler produce verbose output that lists
5646 # what "hidden" libraries, object files and flags are used when
5647 # linking a shared library.
5649 # There doesn't appear to be a way to prevent this compiler from
5650 # explicitly linking system object files so we need to strip them
5651 # from the output so that they don't get included in the library
5653 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'
5656 if test "$GXX" = yes; then
5657 if test $with_gnu_ld = no; then
5660 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5663 _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'
5666 _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'
5671 # FIXME: insert proper C++ library support
5672 _LT_TAGVAR(ld_shlibs, $1)=no
5679 _LT_TAGVAR(hardcode_direct, $1)=no
5680 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5681 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5682 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5683 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5684 # Instead, shared libraries are loaded at an image base (0x10000000 by
5685 # default) and relocated if they conflict, which is a slow very memory
5686 # consuming and fragmenting process. To avoid this, we pick a random,
5687 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5688 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5689 _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'
5690 _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'
5693 case $cc_basename in
5696 _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'
5698 # Archives containing C++ object files must be created using
5699 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
5700 # necessary to make sure instantiated templates are included
5702 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5705 if test "$GXX" = yes; then
5706 if test "$with_gnu_ld" = no; then
5707 _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'
5709 _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'
5712 _LT_TAGVAR(link_all_deplibs, $1)=yes
5715 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5716 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5717 _LT_TAGVAR(inherit_rpath, $1)=yes
5721 case $cc_basename in
5723 # Kuck and Associates, Inc. (KAI) C++ Compiler
5725 # KCC will only create a shared library if the output file
5726 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5727 # to its proper name (with version) after linking.
5728 _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'
5729 _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'
5730 # Commands to make compiler produce verbose output that lists
5731 # what "hidden" libraries, object files and flags are used when
5732 # linking a shared library.
5734 # There doesn't appear to be a way to prevent this compiler from
5735 # explicitly linking system object files so we need to strip them
5736 # from the output so that they don't get included in the library
5738 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'
5740 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5741 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5743 # Archives containing C++ object files must be created using
5744 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5745 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5750 # version 8.0 and above of icpc choke on multiply defined symbols
5751 # if we add $predep_objects and $postdep_objects, however 7.1 and
5752 # earlier do not add the objects themselves.
5753 case `$CC -V 2>&1` in
5755 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5756 _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'
5758 *) # Version 8.0 or newer
5761 ia64*) tmp_idyn=' -i_dynamic';;
5763 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5764 _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'
5767 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
5768 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5769 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5770 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5773 # Portland Group C++ compiler
5776 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
5778 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
5779 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
5780 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
5782 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
5783 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
5785 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
5787 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5788 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5789 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
5791 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
5792 $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'
5794 *) # Version 6 will use weak symbols
5795 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5796 _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'
5800 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5801 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5802 _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'
5806 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5807 _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'
5809 runpath_var=LD_RUN_PATH
5810 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5811 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5813 # Commands to make compiler produce verbose output that lists
5814 # what "hidden" libraries, object files and flags are used when
5815 # linking a shared library.
5817 # There doesn't appear to be a way to prevent this compiler from
5818 # explicitly linking system object files so we need to strip them
5819 # from the output so that they don't get included in the library
5821 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'
5824 case `$CC -V 2>&1 | sed 5q` in
5827 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5828 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5829 _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'
5830 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5831 _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'
5833 # Not sure whether something based on
5834 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5836 output_verbose_link_cmd='echo'
5838 # Archives containing C++ object files must be created using
5839 # "CC -xar", where "CC" is the Sun C++ compiler. This is
5840 # necessary to make sure instantiated templates are included
5842 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5850 # FIXME: insert proper C++ library support
5851 _LT_TAGVAR(ld_shlibs, $1)=no
5855 # FIXME: insert proper C++ library support
5856 _LT_TAGVAR(ld_shlibs, $1)=no
5860 case $cc_basename in
5862 # FIXME: insert proper C++ library support
5863 _LT_TAGVAR(ld_shlibs, $1)=no
5866 # FIXME: insert proper C++ library support
5867 _LT_TAGVAR(ld_shlibs, $1)=no
5873 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5874 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
5876 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5877 _LT_TAGVAR(hardcode_direct, $1)=yes
5878 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5880 # Workaround some broken pre-1.5 toolchains
5881 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
5885 _LT_TAGVAR(ld_shlibs, $1)=yes
5889 # C++ shared libraries are fairly broken
5890 _LT_TAGVAR(ld_shlibs, $1)=no
5894 _LT_TAGVAR(hardcode_direct, $1)=yes
5895 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5896 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5897 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5898 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5899 _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'
5900 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5901 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5903 output_verbose_link_cmd=echo
5906 osf3* | osf4* | osf5*)
5907 case $cc_basename in
5909 # Kuck and Associates, Inc. (KAI) C++ Compiler
5911 # KCC will only create a shared library if the output file
5912 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5913 # to its proper name (with version) after linking.
5914 _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'
5916 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5917 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5919 # Archives containing C++ object files must be created using
5920 # the KAI C++ compiler.
5922 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
5923 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
5927 # Rational C++ 2.4.1
5928 # FIXME: insert proper C++ library support
5929 _LT_TAGVAR(ld_shlibs, $1)=no
5934 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5935 _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'
5936 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5939 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5940 _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'
5941 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5942 echo "-hidden">> $lib.exp~
5943 $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~
5945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5949 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5951 # Commands to make compiler produce verbose output that lists
5952 # what "hidden" libraries, object files and flags are used when
5953 # linking a shared library.
5955 # There doesn't appear to be a way to prevent this compiler from
5956 # explicitly linking system object files so we need to strip them
5957 # from the output so that they don't get included in the library
5959 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'
5962 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5963 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5966 _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'
5969 _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'
5973 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5974 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
5976 # Commands to make compiler produce verbose output that lists
5977 # what "hidden" libraries, object files and flags are used when
5978 # linking a shared library.
5979 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5982 # FIXME: insert proper C++ library support
5983 _LT_TAGVAR(ld_shlibs, $1)=no
5990 # FIXME: insert proper C++ library support
5991 _LT_TAGVAR(ld_shlibs, $1)=no
5995 case $cc_basename in
5998 # FIXME: insert proper C++ library support
5999 _LT_TAGVAR(ld_shlibs, $1)=no
6003 # FIXME: insert proper C++ library support
6004 _LT_TAGVAR(ld_shlibs, $1)=no
6007 # FIXME: insert proper C++ library support
6008 _LT_TAGVAR(ld_shlibs, $1)=no
6014 case $cc_basename in
6016 # Sun C++ 4.2, 5.x and Centerline C++
6017 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
6018 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6019 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6020 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6021 $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'
6023 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6024 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6026 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6028 # The compiler driver will combine and reorder linker options,
6029 # but understands `-z linker_flag'.
6030 # Supported since Solaris 2.6 (maybe 2.5.1?)
6031 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6034 _LT_TAGVAR(link_all_deplibs, $1)=yes
6036 output_verbose_link_cmd='echo'
6038 # Archives containing C++ object files must be created using
6039 # "CC -xar", where "CC" is the Sun C++ compiler. This is
6040 # necessary to make sure instantiated templates are included
6042 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
6045 # Green Hills C++ Compiler
6046 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6048 # The C++ compiler must be used to create the archive.
6049 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
6052 # GNU C++ compiler with Solaris linker
6053 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6054 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
6055 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6056 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6057 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6058 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6060 # Commands to make compiler produce verbose output that lists
6061 # what "hidden" libraries, object files and flags are used when
6062 # linking a shared library.
6063 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6065 # g++ 2.7 appears to require `-G' NOT `-shared' on this
6067 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
6068 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6069 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
6071 # Commands to make compiler produce verbose output that lists
6072 # what "hidden" libraries, object files and flags are used when
6073 # linking a shared library.
6074 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6077 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
6079 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6081 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6089 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6090 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6091 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6092 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6093 runpath_var='LD_RUN_PATH'
6095 case $cc_basename in
6097 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6098 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6101 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6102 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6107 sysv5* | sco3.2v5* | sco5v6*)
6108 # Note: We can NOT use -z defs as we might desire, because we do not
6109 # link with -lc, and that would cause any symbols used from libc to
6110 # always be unresolved, which means just about no library would
6111 # ever link correctly. If we're not using GNU ld we use -z text
6112 # though, which does catch some bad symbols but isn't as heavy-handed
6114 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6115 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6116 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6117 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6118 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6119 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6120 _LT_TAGVAR(link_all_deplibs, $1)=yes
6121 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6122 runpath_var='LD_RUN_PATH'
6124 case $cc_basename in
6126 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6127 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6130 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6131 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6137 case $cc_basename in
6139 # NonStop-UX NCC 3.20
6140 # FIXME: insert proper C++ library support
6141 _LT_TAGVAR(ld_shlibs, $1)=no
6144 # FIXME: insert proper C++ library support
6145 _LT_TAGVAR(ld_shlibs, $1)=no
6151 # FIXME: insert proper C++ library support
6152 _LT_TAGVAR(ld_shlibs, $1)=no
6156 # FIXME: insert proper C++ library support
6157 _LT_TAGVAR(ld_shlibs, $1)=no
6161 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6162 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6164 _LT_TAGVAR(GCC, $1)="$GXX"
6165 _LT_TAGVAR(LD, $1)="$LD"
6168 ## There is no encapsulation within the following macros, do not change
6169 ## the running order or otherwise move them around unless you know exactly
6170 ## what you are doing...
6171 _LT_SYS_HIDDEN_LIBDEPS($1)
6172 _LT_COMPILER_PIC($1)
6173 _LT_COMPILER_C_O($1)
6174 _LT_COMPILER_FILE_LOCKS($1)
6175 _LT_LINKER_SHLIBS($1)
6176 _LT_SYS_DYNAMIC_LINKER($1)
6177 _LT_LINKER_HARDCODE_LIBPATH($1)
6180 fi # test -n "$compiler"
6186 with_gnu_ld=$lt_save_with_gnu_ld
6187 lt_cv_path_LDCXX=$lt_cv_path_LD
6188 lt_cv_path_LD=$lt_save_path_LD
6189 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
6190 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6191 fi # test "$_lt_caught_CXX_error" != yes
6194 ])# _LT_LANG_CXX_CONFIG
6197 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
6198 # ---------------------------------
6199 # Figure out "hidden" library dependencies from verbose
6200 # compiler output when linking a shared library.
6201 # Parse the compiler output and extract the necessary
6202 # objects, libraries and library flags.
6203 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
6204 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6205 # Dependencies to place before and after the object being linked:
6206 _LT_TAGVAR(predep_objects, $1)=
6207 _LT_TAGVAR(postdep_objects, $1)=
6208 _LT_TAGVAR(predeps, $1)=
6209 _LT_TAGVAR(postdeps, $1)=
6210 _LT_TAGVAR(compiler_lib_search_path, $1)=
6212 dnl we can't use the lt_simple_compile_test_code here,
6213 dnl because it contains code intended for an executable,
6214 dnl not a library. It's possible we should let each
6215 dnl tag define a new lt_????_link_test_code variable,
6216 dnl but it's only used here...
6217 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
6219 void foo (void) { a = 0; }
6221 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
6225 Foo (void) { a = 0; }
6230 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
6238 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
6246 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
6249 public void bar (void) {
6255 dnl Parse the compiler output and extract the necessary
6256 dnl objects, libraries and library flags.
6257 if AC_TRY_EVAL(ac_compile); then
6258 # Parse the compiler output and extract the necessary
6259 # objects, libraries and library flags.
6261 # Sentinel used to keep track of whether or not we are before
6262 # the conftest object file.
6263 pre_test_object_deps_done=no
6265 # The `*' in the case matches for architectures that use `case' in
6266 # $output_verbose_cmd can trigger glob expansion during the loop
6267 # eval without this substitution.
6268 output_verbose_link_cmd=`$ECHO "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
6270 for p in `eval $output_verbose_link_cmd`; do
6274 # Some compilers place space between "-{L,R}" and the path.
6276 if test $p = "-L" ||
6277 test $p = "-R"; then
6284 if test "$pre_test_object_deps_done" = no; then
6287 # Internal compiler library paths should come after those
6288 # provided the user. The postdeps already come after the
6289 # user supplied libs so there is no need to process them.
6290 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
6291 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
6293 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
6296 # The "-l" case would never come before the object being
6297 # linked, so don't bother handling this case.
6300 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
6301 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
6303 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
6309 # This assumes that the test object file only shows up
6310 # once in the compiler output.
6311 if test "$p" = "conftest.$objext"; then
6312 pre_test_object_deps_done=yes
6316 if test "$pre_test_object_deps_done" = no; then
6317 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
6318 _LT_TAGVAR(predep_objects, $1)="$p"
6320 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
6323 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
6324 _LT_TAGVAR(postdep_objects, $1)="$p"
6326 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
6331 *) ;; # Ignore the rest.
6339 echo "libtool.m4: error: problem compiling $1 test program"
6342 $RM -f confest.$objext
6344 # PORTME: override above test on systems where it is broken
6348 # Interix 3.5 installs completely hosed .la files for C++, so rather than
6349 # hack all around it, let's just trust "g++" to DTRT.
6350 _LT_TAGVAR(predep_objects,$1)=
6351 _LT_TAGVAR(postdep_objects,$1)=
6352 _LT_TAGVAR(postdeps,$1)=
6356 case `$CC -V 2>&1 | sed 5q` in
6360 # The more standards-conforming stlport4 library is
6361 # incompatible with the Cstd library. Avoid specifying
6362 # it if it's in CXXFLAGS. Ignore libCrun as
6363 # -library=stlport4 depends on it.
6364 case " $CXX $CXXFLAGS " in
6365 *" -library=stlport4 "*)
6366 solaris_use_stlport4=yes
6370 if test "$solaris_use_stlport4" != yes; then
6371 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6378 case $cc_basename in
6380 # The more standards-conforming stlport4 library is
6381 # incompatible with the Cstd library. Avoid specifying
6382 # it if it's in CXXFLAGS. Ignore libCrun as
6383 # -library=stlport4 depends on it.
6384 case " $CXX $CXXFLAGS " in
6385 *" -library=stlport4 "*)
6386 solaris_use_stlport4=yes
6390 # Adding this requires a known-good setup of shared libraries for
6391 # Sun compiler versions before 5.6, else PIC objects from an old
6392 # archive will be linked into the output, leading to subtle bugs.
6393 if test "$solaris_use_stlport4" != yes; then
6394 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
6402 case " $_LT_TAGVAR(postdeps, $1) " in
6403 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
6405 _LT_TAGDECL([], [predep_objects], [1],
6406 [Dependencies to place before and after the objects being linked to
6407 create a shared library])
6408 _LT_TAGDECL([], [postdep_objects], [1])
6409 _LT_TAGDECL([], [predeps], [1])
6410 _LT_TAGDECL([], [postdeps], [1])
6411 _LT_TAGDECL([], [compiler_lib_search_path], [1],
6412 [The library search path used internally by the compiler when linking
6414 ])# _LT_SYS_HIDDEN_LIBDEPS
6419 # Since AC_PROG_F77 is broken, in that it returns the empty string
6420 # if there is no fortran compiler, we have our own version here.
6421 m4_defun([_LT_PROG_F77],
6423 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
6425 if test -z "$F77" || test "X$F77" = "Xno"; then
6428 popdef([AC_MSG_ERROR])
6431 dnl aclocal-1.4 backwards compatibility:
6432 dnl AC_DEFUN([_LT_PROG_F77], [])
6435 # _LT_LANG_F77_CONFIG([TAG])
6436 # --------------------------
6437 # Ensure that the configuration variables for a Fortran 77 compiler are
6438 # suitably defined. These variables are subsequently used by _LT_CONFIG
6439 # to write the compiler configuration to `libtool'.
6440 m4_defun([_LT_LANG_F77_CONFIG],
6441 [AC_REQUIRE([_LT_PROG_F77])dnl
6442 AC_LANG_PUSH(Fortran 77)
6444 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6445 _LT_TAGVAR(allow_undefined_flag, $1)=
6446 _LT_TAGVAR(always_export_symbols, $1)=no
6447 _LT_TAGVAR(archive_expsym_cmds, $1)=
6448 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6449 _LT_TAGVAR(hardcode_direct, $1)=no
6450 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6451 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6452 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6453 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6454 _LT_TAGVAR(hardcode_minus_L, $1)=no
6455 _LT_TAGVAR(hardcode_automatic, $1)=no
6456 _LT_TAGVAR(inherit_rpath, $1)=no
6457 _LT_TAGVAR(module_cmds, $1)=
6458 _LT_TAGVAR(module_expsym_cmds, $1)=
6459 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6460 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6461 _LT_TAGVAR(no_undefined_flag, $1)=
6462 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6463 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6465 # Source file extension for f77 test sources.
6468 # Object file extension for compiled f77 test sources.
6470 _LT_TAGVAR(objext, $1)=$objext
6472 # No sense in running all these tests if we already determined that
6473 # the F77 compiler isn't working. Some variables (like enable_shared)
6474 # are currently assumed to apply to all compilers on this platform,
6475 # and will be corrupted by setting them based on a non-working compiler.
6476 if test "$_lt_disable_F77" != yes; then
6477 # Code to be used in simple compile tests
6478 lt_simple_compile_test_code="\
6484 # Code to be used in simple link tests
6485 lt_simple_link_test_code="\
6490 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6493 # save warnings/boilerplate of simple test code
6494 _LT_COMPILER_BOILERPLATE
6495 _LT_LINKER_BOILERPLATE
6497 # Allow CC to be a program name with arguments.
6501 _LT_TAGVAR(compiler, $1)=$CC
6502 _LT_CC_BASENAME([$compiler])
6504 if test -n "$compiler"; then
6505 AC_MSG_CHECKING([if libtool supports shared libraries])
6506 AC_MSG_RESULT([$can_build_shared])
6508 AC_MSG_CHECKING([whether to build shared libraries])
6509 test "$can_build_shared" = "no" && enable_shared=no
6511 # On AIX, shared libraries and static libraries use the same namespace, and
6512 # are all built from PIC.
6515 test "$enable_shared" = yes && enable_static=no
6516 if test -n "$RANLIB"; then
6517 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6518 postinstall_cmds='$RANLIB $lib'
6522 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6523 test "$enable_shared" = yes && enable_static=no
6527 AC_MSG_RESULT([$enable_shared])
6529 AC_MSG_CHECKING([whether to build static libraries])
6530 # Make sure either enable_shared or enable_static is yes.
6531 test "$enable_shared" = yes || enable_static=yes
6532 AC_MSG_RESULT([$enable_static])
6534 _LT_TAGVAR(GCC, $1)="$G77"
6535 _LT_TAGVAR(LD, $1)="$LD"
6538 ## There is no encapsulation within the following macros, do not change
6539 ## the running order or otherwise move them around unless you know exactly
6540 ## what you are doing...
6541 _LT_COMPILER_PIC($1)
6542 _LT_COMPILER_C_O($1)
6543 _LT_COMPILER_FILE_LOCKS($1)
6544 _LT_LINKER_SHLIBS($1)
6545 _LT_SYS_DYNAMIC_LINKER($1)
6546 _LT_LINKER_HARDCODE_LIBPATH($1)
6549 fi # test -n "$compiler"
6552 fi # test "$_lt_disable_F77" != yes
6555 ])# _LT_LANG_F77_CONFIG
6560 # Since AC_PROG_FC is broken, in that it returns the empty string
6561 # if there is no fortran compiler, we have our own version here.
6562 m4_defun([_LT_PROG_FC],
6564 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
6566 if test -z "$FC" || test "X$FC" = "Xno"; then
6569 popdef([AC_MSG_ERROR])
6572 dnl aclocal-1.4 backwards compatibility:
6573 dnl AC_DEFUN([_LT_PROG_FC], [])
6576 # _LT_LANG_FC_CONFIG([TAG])
6577 # -------------------------
6578 # Ensure that the configuration variables for a Fortran compiler are
6579 # suitably defined. These variables are subsequently used by _LT_CONFIG
6580 # to write the compiler configuration to `libtool'.
6581 m4_defun([_LT_LANG_FC_CONFIG],
6582 [AC_REQUIRE([_LT_PROG_FC])dnl
6583 AC_LANG_PUSH(Fortran)
6585 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6586 _LT_TAGVAR(allow_undefined_flag, $1)=
6587 _LT_TAGVAR(always_export_symbols, $1)=no
6588 _LT_TAGVAR(archive_expsym_cmds, $1)=
6589 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6590 _LT_TAGVAR(hardcode_direct, $1)=no
6591 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6592 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6593 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6594 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6595 _LT_TAGVAR(hardcode_minus_L, $1)=no
6596 _LT_TAGVAR(hardcode_automatic, $1)=no
6597 _LT_TAGVAR(inherit_rpath, $1)=no
6598 _LT_TAGVAR(module_cmds, $1)=
6599 _LT_TAGVAR(module_expsym_cmds, $1)=
6600 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6601 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6602 _LT_TAGVAR(no_undefined_flag, $1)=
6603 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6604 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6606 # Source file extension for fc test sources.
6607 ac_ext=${ac_fc_srcext-f}
6609 # Object file extension for compiled fc test sources.
6611 _LT_TAGVAR(objext, $1)=$objext
6613 # No sense in running all these tests if we already determined that
6614 # the FC compiler isn't working. Some variables (like enable_shared)
6615 # are currently assumed to apply to all compilers on this platform,
6616 # and will be corrupted by setting them based on a non-working compiler.
6617 if test "$_lt_disable_FC" != yes; then
6618 # Code to be used in simple compile tests
6619 lt_simple_compile_test_code="\
6625 # Code to be used in simple link tests
6626 lt_simple_link_test_code="\
6631 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6634 # save warnings/boilerplate of simple test code
6635 _LT_COMPILER_BOILERPLATE
6636 _LT_LINKER_BOILERPLATE
6638 # Allow CC to be a program name with arguments.
6642 _LT_TAGVAR(compiler, $1)=$CC
6643 _LT_CC_BASENAME([$compiler])
6645 if test -n "$compiler"; then
6646 AC_MSG_CHECKING([if libtool supports shared libraries])
6647 AC_MSG_RESULT([$can_build_shared])
6649 AC_MSG_CHECKING([whether to build shared libraries])
6650 test "$can_build_shared" = "no" && enable_shared=no
6652 # On AIX, shared libraries and static libraries use the same namespace, and
6653 # are all built from PIC.
6656 test "$enable_shared" = yes && enable_static=no
6657 if test -n "$RANLIB"; then
6658 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6659 postinstall_cmds='$RANLIB $lib'
6663 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6664 test "$enable_shared" = yes && enable_static=no
6668 AC_MSG_RESULT([$enable_shared])
6670 AC_MSG_CHECKING([whether to build static libraries])
6671 # Make sure either enable_shared or enable_static is yes.
6672 test "$enable_shared" = yes || enable_static=yes
6673 AC_MSG_RESULT([$enable_static])
6675 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
6676 _LT_TAGVAR(LD, $1)="$LD"
6679 ## There is no encapsulation within the following macros, do not change
6680 ## the running order or otherwise move them around unless you know exactly
6681 ## what you are doing...
6682 _LT_SYS_HIDDEN_LIBDEPS($1)
6683 _LT_COMPILER_PIC($1)
6684 _LT_COMPILER_C_O($1)
6685 _LT_COMPILER_FILE_LOCKS($1)
6686 _LT_LINKER_SHLIBS($1)
6687 _LT_SYS_DYNAMIC_LINKER($1)
6688 _LT_LINKER_HARDCODE_LIBPATH($1)
6691 fi # test -n "$compiler"
6694 fi # test "$_lt_disable_FC" != yes
6697 ])# _LT_LANG_FC_CONFIG
6700 # _LT_LANG_GCJ_CONFIG([TAG])
6701 # --------------------------
6702 # Ensure that the configuration variables for the GNU Java Compiler compiler
6703 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6704 # to write the compiler configuration to `libtool'.
6705 m4_defun([_LT_LANG_GCJ_CONFIG],
6706 [AC_REQUIRE([LT_PROG_GCJ])dnl
6709 # Source file extension for Java test sources.
6712 # Object file extension for compiled Java test sources.
6714 _LT_TAGVAR(objext, $1)=$objext
6716 # Code to be used in simple compile tests
6717 lt_simple_compile_test_code="class foo {}"
6719 # Code to be used in simple link tests
6720 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
6722 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6725 # save warnings/boilerplate of simple test code
6726 _LT_COMPILER_BOILERPLATE
6727 _LT_LINKER_BOILERPLATE
6729 # Allow CC to be a program name with arguments.
6733 _LT_TAGVAR(compiler, $1)=$CC
6734 _LT_CC_BASENAME([$compiler])
6736 # GCJ did not exist at the time GCC didn't implicitly link libc in.
6737 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6739 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6742 ## There is no encapsulation within the following macros, do not change
6743 ## the running order or otherwise move them around unless you know exactly
6744 ## what you are doing...
6745 if test -n "$compiler"; then
6746 _LT_COMPILER_NO_RTTI($1)
6747 _LT_COMPILER_PIC($1)
6748 _LT_COMPILER_C_O($1)
6749 _LT_COMPILER_FILE_LOCKS($1)
6750 _LT_LINKER_SHLIBS($1)
6751 _LT_SYS_DYNAMIC_LINKER($1)
6752 _LT_LINKER_HARDCODE_LIBPATH($1)
6759 ])# _LT_LANG_GCJ_CONFIG
6762 # _LT_LANG_RC_CONFIG([TAG])
6763 # -------------------------
6764 # Ensure that the configuration variables for the Windows resource compiler
6765 # are suitably defined. These variables are subsequently used by _LT_CONFIG
6766 # to write the compiler configuration to `libtool'.
6767 m4_defun([_LT_LANG_RC_CONFIG],
6768 [AC_REQUIRE([LT_PROG_RC])dnl
6771 # Source file extension for RC test sources.
6774 # Object file extension for compiled RC test sources.
6776 _LT_TAGVAR(objext, $1)=$objext
6778 # Code to be used in simple compile tests
6779 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
6781 # Code to be used in simple link tests
6782 lt_simple_link_test_code="$lt_simple_compile_test_code"
6784 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6787 # save warnings/boilerplate of simple test code
6788 _LT_COMPILER_BOILERPLATE
6789 _LT_LINKER_BOILERPLATE
6791 # Allow CC to be a program name with arguments.
6795 _LT_TAGVAR(compiler, $1)=$CC
6796 _LT_CC_BASENAME([$compiler])
6797 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
6799 if test -n "$compiler"; then
6806 ])# _LT_LANG_RC_CONFIG
6811 AC_DEFUN([LT_PROG_GCJ],
6812 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
6813 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
6814 [AC_CHECK_TOOL(GCJ, gcj,)
6815 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6816 AC_SUBST(GCJFLAGS)])])dnl
6820 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
6821 dnl aclocal-1.4 backwards compatibility:
6822 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
6827 AC_DEFUN([LT_PROG_RC],
6828 [AC_CHECK_TOOL(RC, windres,)
6832 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
6833 dnl aclocal-1.4 backwards compatibility:
6834 dnl AC_DEFUN([LT_AC_PROG_RC], [])
6839 # If we don't have a new enough Autoconf to choose the best grep
6840 # available, choose the one first in the user's PATH.
6841 m4_defun([_LT_DECL_EGREP],
6842 [AC_REQUIRE([AC_PROG_EGREP])dnl
6843 AC_REQUIRE([AC_PROG_FGREP])dnl
6844 test -z "$GREP" && GREP=grep
6845 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
6846 _LT_DECL([], [EGREP], [1], [An ERE matcher])
6847 _LT_DECL([], [FGREP], [1], [A literal string matcher])
6848 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
6855 # Check for a fully-functional sed program, that truncates
6856 # as few characters as possible. Prefer GNU sed if found.
6857 m4_defun([_LT_DECL_SED],
6859 test -z "$SED" && SED=sed
6860 Xsed="$SED -e 1s/^X//"
6861 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
6862 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
6863 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
6866 m4_ifndef([AC_PROG_SED], [
6867 ############################################################
6868 # NOTE: This macro has been submitted for inclusion into #
6869 # GNU Autoconf as AC_PROG_SED. When it is available in #
6870 # a released version of Autoconf we should remove this #
6871 # macro and use it instead. #
6872 ############################################################
6874 m4_defun([AC_PROG_SED],
6875 [AC_MSG_CHECKING([for a sed that does not truncate output])
6876 AC_CACHE_VAL(lt_cv_path_SED,
6877 [# Loop through the user's path and test for sed and gsed.
6878 # Then use that list of sed's as ones to test for truncation.
6879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6883 test -z "$as_dir" && as_dir=.
6884 for lt_ac_prog in sed gsed; do
6885 for ac_exec_ext in '' $ac_executable_extensions; do
6886 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6887 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6895 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6896 # along with /bin/sed that truncates output.
6897 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6898 test ! -f $lt_ac_sed && continue
6899 cat /dev/null > conftest.in
6901 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6902 # Check for GNU sed and select it if it is found.
6903 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6904 lt_cv_path_SED=$lt_ac_sed
6908 cat conftest.in conftest.in >conftest.tmp
6909 mv conftest.tmp conftest.in
6910 cp conftest.in conftest.nl
6912 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6913 cmp -s conftest.out conftest.nl || break
6914 # 10000 chars as input seems more than enough
6915 test $lt_ac_count -gt 10 && break
6916 lt_ac_count=`expr $lt_ac_count + 1`
6917 if test $lt_ac_count -gt $lt_ac_max; then
6918 lt_ac_max=$lt_ac_count
6919 lt_cv_path_SED=$lt_ac_sed
6926 AC_MSG_RESULT([$SED])
6931 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
6932 dnl aclocal-1.4 backwards compatibility:
6933 dnl AC_DEFUN([LT_AC_PROG_SED], [])
6936 # _LT_CHECK_SHELL_FEATURES
6937 # ------------------------
6938 # Find out whether the shell is Bourne or XSI compatible,
6939 # or has some other useful features.
6940 m4_defun([_LT_CHECK_SHELL_FEATURES],
6941 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
6942 # Try some XSI features
6945 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
6946 = c,a/b,, ) >/dev/null 2>&1 \
6948 AC_MSG_RESULT([$xsi_shell])
6949 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
6951 AC_MSG_CHECKING([whether the shell understands "+="])
6953 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
6955 && lt_shell_append=yes
6956 AC_MSG_RESULT([$lt_shell_append])
6957 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
6959 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
6964 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
6966 # test EBCDIC or ASCII
6967 case `echo X|tr X '\101'` in
6968 A) # ASCII based system
6969 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
6970 lt_SP2NL='tr \040 \012'
6971 lt_NL2SP='tr \015\012 \040\040'
6973 *) # EBCDIC based system
6974 lt_SP2NL='tr \100 \n'
6975 lt_NL2SP='tr \r\n \100\100'
6978 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
6979 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
6980 ])# _LT_CHECK_SHELL_FEATURES
6983 # _LT_PROG_XSI_SHELLFNS
6984 # ---------------------
6985 # Bourne and XSI compatible variants of some useful shell functions.
6986 m4_defun([_LT_PROG_XSI_SHELLFNS],
6989 cat << \_LT_EOF >> "$cfgfile"
6990 # func_dirname file append nondir_replacement
6991 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
6992 # otherwise set result to NONDIR_REPLACEMENT.
6996 */*) func_dirname_result="${1%/*}${2}" ;;
6997 * ) func_dirname_result="${3}" ;;
7001 # func_basename file
7004 func_basename_result="${1##*/}"
7007 # func_stripname prefix suffix name
7008 # strip PREFIX and SUFFIX off of NAME.
7009 # PREFIX and SUFFIX must not contain globbing or regex special
7010 # characters, hashes, percent signs, but SUFFIX may contain a leading
7011 # dot (in which case that matches only a dot).
7014 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7015 # positional parameters, so assign one to ordinary parameter first.
7016 func_stripname_result=${3}
7017 func_stripname_result=${func_stripname_result#"${1}"}
7018 func_stripname_result=${func_stripname_result%"${2}"}
7022 *) # Bourne compatible functions.
7023 cat << \_LT_EOF >> "$cfgfile"
7024 # func_dirname file append nondir_replacement
7025 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
7026 # otherwise set result to NONDIR_REPLACEMENT.
7029 # Extract subdirectory from the argument.
7030 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
7031 if test "X$func_dirname_result" = "X${1}"; then
7032 func_dirname_result="${3}"
7034 func_dirname_result="$func_dirname_result${2}"
7038 # func_basename file
7041 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
7044 # func_stripname prefix suffix name
7045 # strip PREFIX and SUFFIX off of NAME.
7046 # PREFIX and SUFFIX must not contain globbing or regex special
7047 # characters, hashes, percent signs, but SUFFIX may contain a leading
7048 # dot (in which case that matches only a dot).
7049 # func_strip_suffix prefix name
7053 .*) func_stripname_result=`$ECHO "X${3}" \
7054 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
7055 *) func_stripname_result=`$ECHO "X${3}" \
7056 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
7062 case $lt_shell_append in
7064 cat << \_LT_EOF >> "$cfgfile"
7066 # func_append var value
7067 # Append VALUE to the end of shell variable VAR.
7075 cat << \_LT_EOF >> "$cfgfile"
7077 # func_append var value
7078 # Append VALUE to the end of shell variable VAR.
7081 eval "$[1]=\$$[1]\$[2]"
7087 # Helper functions for option handling. -*- Autoconf -*-
7089 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
7090 # Written by Gary V. Vaughan <gary@gnu.org>
7092 # This file is free software; the Free Software Foundation gives
7093 # unlimited permission to copy and/or distribute it, with or without
7094 # modifications, as long as this notice is preserved.
7096 # serial-old 3 ltoptions.m4
7098 # This is to help aclocal find these macros, as it can't see m4_define.
7099 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
7102 # _LT_MANGLE_OPTION(NAME)
7103 # -----------------------
7104 m4_define([_LT_MANGLE_OPTION],
7105 [[_LT_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7108 # _LT_SET_OPTION(NAME)
7109 # --------------------
7110 # Set option NAME, and if there is a matching handler defined,
7111 # dispatch to it. Other NAMEs are saved as a flag.
7112 m4_define([_LT_SET_OPTION],
7113 [m4_define(_LT_MANGLE_OPTION([$1]))dnl
7114 m4_ifdef(_LT_MANGLE_DEFUN([$1]),
7115 _LT_MANGLE_DEFUN([$1]),
7116 [m4_warning([Unknown Libtool option `$1'])])[]dnl
7120 # _LT_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7121 # -------------------------------------------
7122 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7123 m4_define([_LT_IF_OPTION],
7124 [m4_ifdef(_LT_MANGLE_OPTION([$1]), [$2], [$3])])
7127 # _LT_UNLESS_OPTIONS(OPTIONS, IF-NOT-SET)
7128 # ---------------------------------------
7129 # Execute IF-NOT-SET if all OPTIONS are not set.
7130 m4_define([_LT_UNLESS_OPTIONS],
7131 [m4_foreach([_LT_Option], m4_split(m4_normalize([$1])),
7132 [m4_ifdef(_LT_MANGLE_OPTION(_LT_Option),
7133 [m4_define([$0_found])])])[]dnl
7134 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$2
7139 # _LT_SET_OPTIONS(OPTIONS)
7140 # ------------------------
7141 # OPTIONS is a space-separated list of Libtool options.
7142 # If any OPTION has a handler macro declared with LT_OPTION_DEFINE,
7143 # dispatch to that macro; otherwise complain about the unknown option
7145 m4_defun([_LT_SET_OPTIONS],
7147 m4_foreach([_LT_Option], m4_split(m4_normalize([$1])),
7148 [_LT_SET_OPTION(_LT_Option)])
7150 dnl Simply set some default values (i.e off) if boolean options were not
7152 _LT_UNLESS_OPTIONS([dlopen], [enable_dlopen=no
7154 _LT_UNLESS_OPTIONS([win32-dll], [enable_win32_dll=no
7157 dnl If no reference was made to various pairs of opposing options, then
7158 dnl we run the default mode handler for the pair. For example, if neither
7159 dnl `shared' nor `disable-shared' was passed, we enable building of shared
7160 dnl archives by default:
7161 _LT_UNLESS_OPTIONS([shared disable-shared], [_LT_ENABLE_SHARED])
7162 _LT_UNLESS_OPTIONS([static disable-static], [_LT_ENABLE_STATIC])
7163 _LT_UNLESS_OPTIONS([pic-only no-pic], [_LT_WITH_PIC])
7164 _LT_UNLESS_OPTIONS([fast-install disable-fast-install],
7165 [_LT_ENABLE_FAST_INSTALL])
7169 ## --------------------------------- ##
7170 ## Macros to handle LT_INIT options. ##
7171 ## --------------------------------- ##
7173 m4_define([_LT_MANGLE_DEFUN],
7174 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1]), [[^A-Z0-9_]], [_])])
7177 # LT_OPTION_DEFINE(NAME, CODE)
7178 # ----------------------------
7179 m4_define([LT_OPTION_DEFINE],
7180 [m4_define(_LT_MANGLE_DEFUN([$1]), [$2])[]dnl
7181 ])# LT_OPTION_DEFINE
7186 LT_OPTION_DEFINE([dlopen], [enable_dlopen=yes
7189 AU_DEFUN([AC_LIBTOOL_DLOPEN],
7190 [_LT_SET_OPTION([dlopen])
7191 AC_DIAGNOSE([obsolete],
7192 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7193 put the `dlopen' option into LT_INIT's first parameter.])
7196 dnl aclocal-1.4 backwards compatibility:
7197 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
7202 # Declare package support for building win32 dll's.
7203 LT_OPTION_DEFINE([win32-dll],
7204 [enable_win32_dll=yes
7207 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
7208 AC_CHECK_TOOL(AS, as, false)
7209 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
7210 AC_CHECK_TOOL(OBJDUMP, objdump, false)
7214 test -z "$AS" && AS=as
7215 _LT_DECL([], [AS], [0], [Assembler program])dnl
7217 test -z "$DLLTOOL" && DLLTOOL=dlltool
7218 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
7220 test -z "$OBJDUMP" && OBJDUMP=objdump
7221 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
7224 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
7225 [_LT_SET_OPTION([win32-dll])
7226 AC_DIAGNOSE([obsolete],
7227 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7228 put the `win32-dll' option into LT_INIT's first parameter.])
7231 dnl aclocal-1.4 backwards compatibility:
7232 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
7235 # _LT_ENABLE_SHARED([DEFAULT])
7236 # ----------------------------
7237 # implement the --enable-shared flag, and supports the `shared' and
7238 # `disable-shared' LT_INIT options.
7239 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7240 m4_define([_LT_ENABLE_SHARED],
7241 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
7242 AC_ARG_ENABLE([shared],
7243 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
7244 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
7245 [p=${PACKAGE-default}
7247 yes) enable_shared=yes ;;
7248 no) enable_shared=no ;;
7251 # Look at the argument we got. We use all the common list separators.
7252 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7253 for pkg in $enableval; do
7255 if test "X$pkg" = "X$p"; then
7262 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
7264 _LT_DECL([build_libtool_libs], [enable_shared], [0],
7265 [Whether or not to build shared libraries])
7266 ])# _LT_ENABLE_SHARED
7268 LT_OPTION_DEFINE([shared], [_LT_ENABLE_SHARED([yes])])
7269 LT_OPTION_DEFINE([disable-shared], [_LT_ENABLE_SHARED([no])])
7272 AU_DEFUN([AC_ENABLE_SHARED],
7273 [_LT_SET_OPTION([shared])
7274 AC_DIAGNOSE([obsolete],
7275 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7276 put the `shared' option into LT_INIT's first parameter.])
7279 AU_DEFUN([AM_ENABLE_SHARED],
7280 [_LT_SET_OPTION([shared])
7281 AC_DIAGNOSE([obsolete],
7282 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7283 put the `shared' option into LT_INIT's first parameter.])
7286 AU_DEFUN([AC_DISABLE_SHARED],
7287 [_LT_SET_OPTION([disable-shared])
7288 AC_DIAGNOSE([obsolete],
7289 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
7290 the `disable-shared' option into LT_INIT's first parameter.])
7293 AU_DEFUN([AM_DISABLE_SHARED],
7294 [_LT_SET_OPTION([disable-shared])
7295 AC_DIAGNOSE([obsolete],
7296 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
7297 the `disable-shared' option into LT_INIT's first parameter.])
7300 dnl aclocal-1.4 backwards compatibility:
7301 dnl AC_DEFUN([AC_ENABLE_SHARED], [])
7302 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
7303 dnl AC_DEFUN([AC_DISABLE_SHARED], [])
7304 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
7308 # _LT_ENABLE_STATIC([DEFAULT])
7309 # ----------------------------
7310 # implement the --enable-static flag, and support the `static' and
7311 # `disable-static' LT_INIT options.
7312 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7313 m4_define([_LT_ENABLE_STATIC],
7314 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
7315 AC_ARG_ENABLE([static],
7316 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
7317 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
7318 [p=${PACKAGE-default}
7320 yes) enable_static=yes ;;
7321 no) enable_static=no ;;
7324 # Look at the argument we got. We use all the common list separators.
7325 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7326 for pkg in $enableval; do
7328 if test "X$pkg" = "X$p"; then
7335 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
7337 _LT_DECL([build_old_libs], [enable_static], [0],
7338 [Whether or not to build static libraries])
7339 ])# _LT_ENABLE_STATIC
7341 LT_OPTION_DEFINE([static], [_LT_ENABLE_STATIC([yes])])
7342 LT_OPTION_DEFINE([disable-static], [_LT_ENABLE_STATIC([no])])
7345 AU_DEFUN([AC_ENABLE_STATIC],
7346 [_LT_SET_OPTION([static])
7347 AC_DIAGNOSE([obsolete],
7348 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7349 put the `static' option into LT_INIT's first parameter.])
7352 AU_DEFUN([AM_ENABLE_STATIC],
7353 [_LT_SET_OPTION([static])
7354 AC_DIAGNOSE([obsolete],
7355 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7356 put the `static' option into LT_INIT's first parameter.])
7359 AU_DEFUN([AC_DISABLE_STATIC],
7360 [_LT_SET_OPTION([disable-static])
7361 AC_DIAGNOSE([obsolete],
7362 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
7363 the `disable-static' option into LT_INIT's first parameter.])
7366 AU_DEFUN([AM_DISABLE_STATIC],
7367 [_LT_SET_OPTION([disable-static])
7368 AC_DIAGNOSE([obsolete],
7369 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
7370 the `disable-static' option into LT_INIT's first parameter.])
7373 dnl aclocal-1.4 backwards compatibility:
7374 dnl AC_DEFUN([AC_ENABLE_STATIC], [])
7375 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
7376 dnl AC_DEFUN([AC_DISABLE_STATIC], [])
7377 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
7381 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
7382 # ----------------------------------
7383 # implement the --enable-fast-install flag, and support the `fast-install'
7384 # and `disable-fast-install' LT_INIT options.
7385 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
7386 m4_define([_LT_ENABLE_FAST_INSTALL],
7387 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
7388 AC_ARG_ENABLE([fast-install],
7389 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
7390 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
7391 [p=${PACKAGE-default}
7393 yes) enable_fast_install=yes ;;
7394 no) enable_fast_install=no ;;
7396 enable_fast_install=no
7397 # Look at the argument we got. We use all the common list separators.
7398 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
7399 for pkg in $enableval; do
7401 if test "X$pkg" = "X$p"; then
7402 enable_fast_install=yes
7408 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
7410 _LT_DECL([fast_install], [enable_fast_install], [0],
7411 [Whether or not to optimize for fast installation])dnl
7412 ])# _LT_ENABLE_FAST_INSTALL
7414 LT_OPTION_DEFINE([fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
7415 LT_OPTION_DEFINE([disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
7418 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
7419 [_LT_SET_OPTION([fast-install])
7420 AC_DIAGNOSE([obsolete],
7421 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
7422 the `fast-install' option into LT_INIT's first parameter.])
7425 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
7426 [_LT_SET_OPTION([disable-fast-install])
7427 AC_DIAGNOSE([obsolete],
7428 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
7429 the `disable-fast-install' option into LT_INIT's first parameter.])
7432 dnl aclocal-1.4 backwards compatibility:
7433 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
7434 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
7437 # _LT_WITH_PIC([MODE])
7438 # --------------------
7439 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
7441 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
7442 m4_define([_LT_WITH_PIC],
7444 [AS_HELP_STRING([--with-pic],
7445 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
7446 [pic_mode="$withval"],
7449 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
7451 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
7454 LT_OPTION_DEFINE([pic-only], [_LT_WITH_PIC([yes])])
7455 LT_OPTION_DEFINE([no-pic], [_LT_WITH_PIC([no])])
7458 AU_DEFUN([AC_LIBTOOL_PICMODE],
7459 [_LT_SET_OPTION([pic-only])
7460 AC_DIAGNOSE([obsolete],
7461 [$0: Remove this warning and the call to _LT_SET_OPTION when you
7462 put the `pic-only' option into LT_INIT's first parameter.])
7465 dnl aclocal-1.4 backwards compatibility:
7466 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
7467 # ltversion.m4 -- version numbers -*- Autoconf -*-
7469 # Copyright (C) 2004 Free Software Foundation, Inc.
7470 # Written by Scott James Remnant.
7472 ## This file is free software; the Free Software Foundation gives
7473 # unlimited permission to copy and/or distribute it, with or without
7474 # modifications, as long as this notice is preserved.
7476 # Generated from ltversion.in; do not edit by hand
7478 # serial-old 2317 ltversion.m4
7479 # This file is part of GNU Libtool
7481 m4_define([LT_PACKAGE_VERSION], [2.1a])
7482 m4_define([LT_PACKAGE_REVISION], [1.2317])
7484 AC_DEFUN([LTVERSION_VERSION],
7485 [macro_version='2.1a'
7486 macro_revision='1.2317'
7487 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
7488 _LT_DECL(, macro_revision, 0)
7490 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
7492 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
7493 # Written by Gary V. Vaughan.
7495 # This file is free software; the Free Software Foundation gives
7496 # unlimited permission to copy and/or distribute it, with or without
7497 # modifications, as long as this notice is preserved.
7499 # serial-old 3 ltsugar.m4
7501 # This is to help aclocal find these macros, as it can't see m4_define.
7502 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
7505 # lt_join(SEP, ARG1, [ARG2...])
7506 # -----------------------------
7507 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
7508 # associated separator.
7509 m4_define([lt_join],
7511 [0], [m4_fatal([$0: too few arguments: $#])],
7515 [[$2][]m4_foreach(_lt_Arg, lt_car([m4_shiftn(2, $@)]),
7516 [_$0([$1], _lt_Arg)])],
7517 [$0([$1], m4_shiftn(2, $@))])])[]dnl
7519 m4_define([_lt_join],
7520 [m4_ifval([$2],[$1][$2])[]dnl
7527 # Manipulate m4 lists.
7528 # These macros are necessary as long as will still need to support
7529 # Autoconf-2.59 which quotes differently.
7530 m4_define([lt_car], [[$1]])
7532 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
7534 [m4_dquote(m4_shift($@))])])
7535 m4_define([lt_unquote], $1)
7538 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
7539 # ----------------------------------------------------------
7540 # Produce a SEP delimited list of all paired combinations of elements of
7541 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
7542 # has the form PREFIXmINFIXSUFFIXn.
7543 m4_define([lt_combine],
7544 [m4_if([$2], [], [],
7545 [m4_if([$4], [], [],
7546 [lt_join(m4_quote(m4_default([$1], [[, ]])),
7547 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_prefix, [$2],
7548 [m4_foreach(_Lt_suffix, lt_car([m4_shiftn(3, $@)]),
7549 [_Lt_prefix[]$3[]_Lt_suffix ])])))))])])dnl
7553 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
7554 # -----------------------------------------------------------------------
7555 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
7556 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
7557 m4_define([lt_if_append_uniq],
7559 [m4_bmatch($3[]m4_defn([$1])$3, $3[]m4_re_escape([$2])$3,
7561 [m4_append([$1], [$2], [$3])$4])],
7562 [m4_append([$1], [$2], [$3])$4])])
7565 # lt_dict_add(DICT, KEY, VALUE)
7566 # -----------------------------
7567 m4_define([lt_dict_add],
7568 [m4_define([$1($2)], [$4])])
7571 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
7572 # --------------------------------------------
7573 m4_define([lt_dict_add_subkey],
7574 [m4_define([$1($2:$3)], [$4])])
7577 # lt_dict_fetch(DICT, KEY, [SUBKEY])
7578 # ----------------------------------
7579 m4_define([lt_dict_fetch],
7581 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
7582 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
7585 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
7586 # -----------------------------------------------------------------
7587 m4_define([lt_if_dict_fetch],
7588 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
7593 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
7594 # --------------------------------------------------------------
7595 m4_define([lt_dict_filter],
7596 [m4_if([$5], [], [],
7597 [lt_join(m4_quote(m4_default([$4], [[, ]])),
7598 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
7599 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
7601 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
7603 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
7604 # Written by Scott James Remnant.
7606 # This file is free software; the Free Software Foundation gives
7607 # unlimited permission to copy and/or distribute it, with or without
7608 # modifications, as long as this notice is preserved.
7612 # These exist entirely to fool aclocal when bootstrapping libtool.
7614 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
7615 # which have later been changed to m4_define as they aren't part of the
7616 # exported API, or moved to Autoconf or Automake where they belong.
7618 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
7619 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
7620 # using a macro with the same name in our local m4/libtool.m4 it'll
7621 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
7622 # and doesn't know about Autoconf macros at all.)
7624 # So we provide this file, which has a silly filename so it's always
7625 # included after everything else. This provides aclocal with the
7626 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
7627 # because those macros already exist, or will be overwritten later.
7628 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
7630 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
7631 # Yes, that means every name once taken will need to remain here until
7632 # we give up compatibility with versions before 1.7, at which point
7633 # we need to keep only those names which we still refer to.
7635 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
7636 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
7637 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
7638 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
7639 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
7640 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
7641 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
7642 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
7643 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
7644 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
7645 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
7646 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
7647 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
7648 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
7649 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
7650 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
7651 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
7652 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
7653 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
7654 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
7655 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
7656 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
7657 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
7658 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
7659 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
7660 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
7661 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
7662 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
7663 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
7664 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
7665 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
7666 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
7667 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
7668 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
7669 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
7670 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
7671 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
7672 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
7673 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
7674 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
7675 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
7676 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
7677 m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
7678 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
7679 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
7680 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
7681 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
7682 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
7683 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
7684 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
7685 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
7686 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
7687 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
7688 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
7689 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
7691 # ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
7692 # Copyright (C) 1999-2006 Free Software Foundation, Inc.
7694 # This file is free software; the Free Software Foundation gives
7695 # unlimited permission to copy and/or distribute it, with or without
7696 # modifications, as long as this notice is preserved.
7698 # serial-old 10 LTDL_INIT
7700 # LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
7701 # ------------------------------------------
7702 # DIRECTORY contains the libltdl sources. It is okay to call this
7703 # function multiple times, as long as the same DIRECTORY is always given.
7704 AC_DEFUN([LT_CONFIG_LTDL_DIR],
7705 [AC_BEFORE([$0], [LT_WITH_LTDL])
7707 ])# LT_CONFIG_LTDL_DIR
7709 # We break this out into a separate macro, so that we can call it safely
7710 # internally without being caught accidentally by the sed scan in libtoolize.
7711 m4_defun([_LT_CONFIG_LTDL_DIR],
7712 [dnl remove trailing slashes
7713 m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
7715 [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
7716 m4_if(_ARG_DIR, [.],
7718 [m4_define([_LTDL_DIR], _ARG_DIR)
7719 _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
7720 [m4_if(_ARG_DIR, _LTDL_DIR,
7722 [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
7723 m4_popdef([_ARG_DIR])
7724 dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
7725 m4_if(_LTDL_MODE, [],
7726 [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
7727 m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
7728 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
7729 ])# LT_CONFIG_LTDL_DIR
7732 m4_define([_LTDL_DIR], [])
7733 m4_define([_LTDL_MODE], [])
7738 # sets LIBLTDL to the link flags for the libltdl convenience library and
7739 # LTDLINCL to the include flags for the libltdl header and adds
7740 # --enable-ltdl-convenience to the configure arguments. Note that
7741 # AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with
7742 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
7743 # (note the single quotes!). If your package is not flat and you're not
7744 # using automake, define top_builddir and top_srcdir appropriately in
7746 AC_DEFUN([LTDL_CONVENIENCE],
7747 [AC_BEFORE([$0], [LT_WITH_LTDL])dnl
7748 dnl Although the argument is deprecated and no longer documented,
7749 dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
7750 dnl here make sure it is the same as any other declaration of libltdl's
7751 dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
7752 dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
7753 m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
7755 case $enable_ltdl_convenience in
7756 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
7757 "") enable_ltdl_convenience=yes
7758 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
7760 LIBLTDL='${top_builddir}'"${lt_ltdl_dir+/$lt_ltdl_dir}/libltdlc.la"
7761 LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
7764 AC_SUBST([LTDLINCL])
7766 # For backwards non-gettext consistent compatibility...
7769 ])# LTDL_CONVENIENCE
7771 # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
7772 # now we have LT_CONFIG_LTDL_DIR:
7773 AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
7774 [_LT_CONFIG_LTDL_DIR([$1])
7777 dnl aclocal-1.4 backwards compatibility:
7778 dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
7783 # sets LIBLTDL to the link flags for the libltdl installable library
7784 # and LTDLINCL to the include flags for the libltdl header and adds
7785 # --enable-ltdl-install to the configure arguments. Note that
7786 # AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl
7787 # is not found, LIBLTDL will be prefixed with '${top_builddir}/'
7788 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
7789 # quotes!). If your package is not flat and you're not using automake,
7790 # define top_builddir and top_srcdir appropriately in your Makefiles.
7791 # In the future, this macro may have to be called after LT_INIT.
7792 AC_DEFUN([LTDL_INSTALLABLE],
7793 [AC_BEFORE([$0], [LT_WITH_LTDL])dnl
7794 dnl Although the argument is deprecated and no longer documented,
7795 dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
7796 dnl here make sure it is the same as any other declaration of libltdl's
7797 dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
7798 dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
7799 m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
7801 AC_CHECK_LIB([ltdl], [lt_dlinit],
7802 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
7803 [if test x"$enable_ltdl_install" = xno; then
7804 AC_MSG_WARN([libltdl not installed, but installation disabled])
7806 enable_ltdl_install=yes
7809 if test x"$enable_ltdl_install" = x"yes"; then
7810 ac_configure_args="$ac_configure_args --enable-ltdl-install"
7811 LIBLTDL='${top_builddir}'"${lt_ltdl_dir+/$lt_ltdl_dir}/libltdl.la"
7812 LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
7814 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
7820 AC_SUBST([LTDLINCL])
7822 # For backwards non-gettext consistent compatibility...
7825 ])# LTDL_INSTALLABLE
7827 # AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
7828 # now we have LT_CONFIG_LTDL_DIR:
7829 AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
7830 [_LT_CONFIG_LTDL_DIR([$1])
7833 dnl aclocal-1.4 backwards compatibility:
7834 dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
7837 # _LTDL_MODE_DISPATCH
7838 # -------------------
7839 m4_define([_LTDL_MODE_DISPATCH],
7840 [dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
7841 m4_if(_LTDL_DIR, [],
7843 dnl if _LTDL_MODE was not set already, the default value is `subproject':
7844 [m4_case(m4_default(_LTDL_MODE, [subproject]),
7845 [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
7846 _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
7847 [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
7849 [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
7850 dnl Be careful not to expand twice:
7852 ])# _LTDL_MODE_DISPATCH
7857 # Clients of libltdl can use this macro to allow the installer to
7858 # choose between a shipped copy of the ltdl sources or a preinstalled
7859 # version of the library. If the shipped ltdl sources are not in a
7860 # subdirectory named libltdl, the directory name must be given by
7861 # LT_CONFIG_LTDL_DIR.
7862 AC_DEFUN([LT_WITH_LTDL],
7863 [dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
7864 dnl was called yet, then for old times' sake, we assume libltdl is in an
7865 dnl eponymous directory:
7866 AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
7868 AC_ARG_WITH([included_ltdl],
7869 [AS_HELP_STRING([--with-included-ltdl],
7870 [use the GNU ltdl sources included here])])
7872 if test "x$with_included_ltdl" != xyes; then
7873 # We are not being forced to use the included libltdl sources, so
7874 # decide whether there is a useful installed version we can use.
7875 lt_dlinterface_register_found=no
7876 AC_CHECK_HEADER([ltdl.h],
7877 [AC_CHECK_LIB([ltdl], [lt_dlinterface_register],
7878 [with_included_ltdl=no],
7879 [with_included_ltdl=yes])],
7882 [AC_INCLUDES_DEFAULT]
7884 AC_MSG_CHECKING([for lt_dlinterface_register in ltdl.h])
7885 test "x$with_included_ltdl" = xno && lt_dlinterface_register_found=yes
7886 AC_MSG_RESULT([$lt_dlinterface_register_found])
7889 if test "x$enable_ltdl_install" != xyes; then
7890 # If the user did not specify an installable libltdl, then default
7891 # to a convenience lib.
7895 if test "x$with_included_ltdl" = xno; then
7896 # If the included ltdl is not to be used, then use the
7897 # preinstalled libltdl we found.
7898 AC_DEFINE([HAVE_LTDL], [1],
7899 [Define this if a modern libltdl is already installed])
7905 # Report our decision...
7906 AC_MSG_CHECKING([whether to use included libltdl])
7907 AC_MSG_RESULT([$with_included_ltdl])
7909 dnl Be certain that LTDL_INIT is invoked if we are configuring libltdl
7911 m4_if(_LTDL_MODE, [subproject],
7912 [_LTDL_MODE_DISPATCH],
7913 [AC_PROVIDE_IFELSE([LTDL_INIT],
7916 AC_DEFUN([LTDL_INIT], [])])])
7920 AU_ALIAS([AC_WITH_LTDL], [LT_WITH_LTDL])
7921 dnl aclocal-1.4 backwards compatibility:
7922 dnl AC_DEFUN([AC_WITH_LTDL], [])
7927 # Perform all the checks necessary for compilation of the ltdl objects
7928 # -- including compiler checks and header checks. This is a public
7929 # interface mainly for the benefit of libltdl's own configure.ac, most
7930 # other users should call LT_WITH_LTDL instead.
7931 AC_DEFUN([LTDL_INIT],
7932 [AC_REQUIRE([AC_PROG_CC])dnl
7933 AC_REQUIRE([AC_C_CONST])dnl
7934 AC_REQUIRE([AC_HEADER_STDC])dnl
7935 AC_REQUIRE([AC_HEADER_DIRENT])dnl
7936 AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
7937 AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
7938 AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
7939 AC_REQUIRE([LT_LIB_DLLOAD])dnl
7940 AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
7941 AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
7942 AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
7944 m4_require([_LT_CHECK_OBJDIR])dnl
7945 m4_require([_LT_HEADER_DLFCN])dnl
7946 m4_require([_LT_CHECK_DLPREOPEN])dnl
7947 m4_require([_LT_DECL_SED])dnl
7949 dnl Don't require this, or it will be expanded earlier than the code
7950 dnl that sets the variables it relies on:
7953 dnl Although deprecated and no longer documented, alpha releases of
7954 dnl libtool used to define an LTDL_INIT to take a DIRECTORY orgument.
7955 dnl If LT_CONFIG_LTDL_DIR was called already, but LTDL_INIT was given a
7956 dnl DIRECTORY argument, check it is the same as previous invocations. If
7957 dnl it still hasn't been called, then do it now, defaulting to `libltdl'
7958 dnl if no DIRECTORY argument was passed.
7959 m4_provide_if([_LT_CONFIG_LTDL_DIR],
7960 [m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])],
7961 [_LT_CONFIG_LTDL_DIR(m4_default([$1], [libltdl]))])dnl
7963 dnl _LTDL_MODE specific code must be evaluated at least once:
7966 # In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
7967 # the user used. This is so that ltdl.h can pick up the parent projects
7968 # config.h file, The first file in AC_CONFIG_HEADERS must contain the
7969 # definitions required by ltdl.c.
7970 # FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
7971 AC_CONFIG_COMMANDS_PRE([dnl
7972 m4_pattern_allow([^LT_CONFIG_H$])dnl
7973 m4_ifset([AH_HEADER],
7974 [LT_CONFIG_H=AH_HEADER],
7975 [m4_ifset([AC_LIST_HEADERS],
7976 [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`],
7978 AC_SUBST([LT_CONFIG_H])
7980 AC_CHECK_HEADERS([memory.h unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h],
7981 [], [], [AC_INCLUDES_DEFAULT])
7982 AC_CHECK_HEADERS([string.h strings.h], [break], [], [AC_INCLUDES_DEFAULT])
7984 AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
7985 AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
7988 LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""`
7989 AC_SUBST([LTDLOPEN])
7993 AU_ALIAS([AC_LIB_LTDL], [LTDL_INIT])
7994 dnl aclocal-1.4 backwards compatibility:
7995 dnl AC_DEFUN([AC_LIB_LTDL], [])
7998 # _LT_ENABLE_INSTALL
7999 # ------------------
8000 m4_define([_LT_ENABLE_INSTALL],
8001 [AC_ARG_ENABLE([ltdl-install],
8002 [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
8004 AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
8005 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
8006 ])# _LT_ENABLE_INSTALL
8009 # LT_SYS_DLOPEN_DEPLIBS
8010 # ---------------------
8011 AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
8012 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8013 AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
8014 [lt_cv_sys_dlopen_deplibs],
8015 [# PORTME does your system automatically load deplibs for dlopen?
8016 # or its logical equivalent (e.g. shl_load for HP-UX < 11)
8017 # For now, we just catch OSes we know something about -- in the
8018 # future, we'll try test this programmatically.
8019 lt_cv_sys_dlopen_deplibs=unknown
8021 aix3*|aix4.1.*|aix4.2.*)
8022 # Unknown whether this is true for these versions of AIX, but
8023 # we want this `case' here to explicitly catch those versions.
8024 lt_cv_sys_dlopen_deplibs=unknown
8027 lt_cv_sys_dlopen_deplibs=yes
8030 # Assuming the user has installed a libdl from somewhere, this is true
8031 # If you are looking for one http://www.opendarwin.org/projects/dlcompat
8032 lt_cv_sys_dlopen_deplibs=yes
8034 freebsd* | dragonfly*)
8035 lt_cv_sys_dlopen_deplibs=yes
8037 gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
8038 # GNU and its variants, using gnu ld.so (Glibc)
8039 lt_cv_sys_dlopen_deplibs=yes
8042 lt_cv_sys_dlopen_deplibs=yes
8045 lt_cv_sys_dlopen_deplibs=yes
8047 irix[[12345]]*|irix6.[[01]]*)
8048 # Catch all versions of IRIX before 6.2, and indicate that we don't
8049 # know how it worked for any of those versions.
8050 lt_cv_sys_dlopen_deplibs=unknown
8053 # The case above catches anything before 6.2, and it's known that
8054 # at 6.2 and later dlopen does load deplibs.
8055 lt_cv_sys_dlopen_deplibs=yes
8058 lt_cv_sys_dlopen_deplibs=yes
8061 lt_cv_sys_dlopen_deplibs=yes
8064 # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
8065 # it did *not* use an RPATH in a shared library to find objects the
8066 # library depends on, so we explicitly say `no'.
8067 lt_cv_sys_dlopen_deplibs=no
8069 osf5.0|osf5.0a|osf5.1)
8070 # dlopen *does* load deplibs and with the right loader patch applied
8071 # it even uses RPATH in a shared library to search for shared objects
8072 # that the library depends on, but there's no easy way to know if that
8073 # patch is installed. Since this is the case, all we can really
8074 # say is unknown -- it depends on the patch being installed. If
8075 # it is, this changes to `yes'. Without it, it would be `no'.
8076 lt_cv_sys_dlopen_deplibs=unknown
8079 # the two cases above should catch all versions of osf <= 5.1. Read
8080 # the comments above for what we know about them.
8081 # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
8082 # is used to find them so we can finally say `yes'.
8083 lt_cv_sys_dlopen_deplibs=yes
8086 lt_cv_sys_dlopen_deplibs=yes
8089 lt_cv_sys_dlopen_deplibs=yes
8091 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8092 libltdl_cv_sys_dlopen_deplibs=yes
8096 if test "$lt_cv_sys_dlopen_deplibs" != yes; then
8097 AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
8098 [Define if the OS needs help to load dependent libraries for dlopen().])
8100 ])# LT_SYS_DLOPEN_DEPLIBS
8103 AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
8104 dnl aclocal-1.4 backwards compatibility:
8105 dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
8110 AC_DEFUN([LT_SYS_MODULE_EXT],
8111 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8112 AC_CACHE_CHECK([which extension is used for runtime loadable modules],
8113 [libltdl_cv_shlibext],
8116 eval libltdl_cv_shlibext=$shrext_cmds
8118 if test -n "$libltdl_cv_shlibext"; then
8119 m4_pattern_allow([LT_MODULE_EXT])dnl
8120 AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
8121 [Define to the extension used for runtime loadable modules, say, ".so".])
8123 ])# LT_SYS_MODULE_EXT
8126 AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
8127 dnl aclocal-1.4 backwards compatibility:
8128 dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
8131 # LT_SYS_MODULE_PATH
8132 # ------------------
8133 AC_DEFUN([LT_SYS_MODULE_PATH],
8134 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8135 AC_CACHE_CHECK([which variable specifies run-time module search path],
8136 [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
8137 if test -n "$lt_cv_module_path_var"; then
8138 m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
8139 AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
8140 [Define to the name of the environment variable that determines the run-time module search path.])
8142 ])# LT_SYS_MODULE_PATH
8145 AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
8146 dnl aclocal-1.4 backwards compatibility:
8147 dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
8150 # LT_SYS_DLSEARCH_PATH
8151 # --------------------
8152 AC_DEFUN([LT_SYS_DLSEARCH_PATH],
8153 [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
8154 AC_CACHE_CHECK([for the default library search path],
8155 [lt_cv_sys_dlsearch_path],
8156 [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
8157 if test -n "$lt_cv_sys_dlsearch_path"; then
8159 for dir in $lt_cv_sys_dlsearch_path; do
8160 if test -z "$sys_dlsearch_path"; then
8161 sys_dlsearch_path="$dir"
8163 sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
8166 m4_pattern_allow([LT_DLSEARCH_PATH])dnl
8167 AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
8168 [Define to the system default library search path.])
8170 ])# LT_SYS_DLSEARCH_PATH
8173 AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
8174 dnl aclocal-1.4 backwards compatibility:
8175 dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
8178 # _LT_CHECK_DLPREOPEN
8179 # -------------------
8180 m4_defun([_LT_CHECK_DLPREOPEN],
8181 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8182 AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
8183 [libltdl_cv_preloaded_symbols],
8184 [if test -n "$lt_cv_sys_global_symbol_pipe"; then
8185 libltdl_cv_preloaded_symbols=yes
8187 libltdl_cv_preloaded_symbols=no
8190 if test x"$libltdl_cv_preloaded_symbols" = xyes; then
8191 AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
8192 [Define if libtool can extract symbol lists from object files.])
8194 ])# _LT_CHECK_DLPREOPEN
8199 AC_DEFUN([LT_LIB_DLLOAD],
8200 [m4_pattern_allow([^LT_DLLOADERS$])
8202 AC_SUBST([LT_DLLOADERS])
8207 AC_SEARCH_LIBS([dlopen], [dl],
8208 [AC_DEFINE([HAVE_LIBDL], [1],
8209 [Define if you have the libdl library or equivalent.])
8210 if test "$ac_cv_search_dlopen" != "none required" ; then
8211 LIBADD_DLOPEN="-ldl"
8213 libltdl_cv_lib_dl_dlopen="yes"
8214 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
8215 [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
8218 ]], [[dlopen(0, 0);]])],
8219 [AC_DEFINE([HAVE_LIBDL], [1],
8220 [Define if you have the libdl library or equivalent.])
8221 libltdl_cv_func_dlopen="yes"
8222 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
8223 [AC_CHECK_LIB([svld], [dlopen],
8224 [AC_DEFINE([HAVE_LIBDL], [1],
8225 [Define if you have the libdl library or equivalent.])
8226 LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
8227 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
8228 if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
8230 lt_save_LIBS="$LIBS"
8231 LIBS="$LIBS $LIBADD_DLOPEN"
8232 AC_CHECK_FUNCS([dlerror])
8233 LIBS="$lt_save_LIBS"
8235 AC_SUBST([LIBADD_DLOPEN])
8238 AC_CHECK_FUNC([shl_load],
8239 [AC_DEFINE([HAVE_SHL_LOAD], [1],
8240 [Define if you have the shl_load function.])
8241 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
8242 [AC_CHECK_LIB([dld], [shl_load],
8243 [AC_DEFINE([HAVE_SHL_LOAD], [1],
8244 [Define if you have the shl_load function.])
8245 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
8246 LIBADD_SHL_LOAD="-ldld"])])
8247 AC_SUBST([LIBADD_SHL_LOAD])
8251 # We only want this for pre-Mac OS X 10.4.
8252 AC_CHECK_FUNC([_dyld_func_lookup],
8253 [AC_DEFINE([HAVE_DYLD], [1],
8254 [Define if you have the _dyld_func_lookup function.])
8255 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
8258 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
8260 cygwin* | mingw* | os2* | pw32*)
8261 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
8265 AC_CHECK_LIB([dld], [dld_link],
8266 [AC_DEFINE([HAVE_DLD], [1],
8267 [Define if you have the GNU dld library.])
8268 LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
8269 AC_SUBST([LIBADD_DLD_LINK])
8271 m4_pattern_allow([^LT_DLPREOPEN$])
8273 if test -n "$LT_DLLOADERS"
8275 for lt_loader in $LT_DLLOADERS; do
8276 LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
8278 AC_DEFINE([HAVE_LIBDLLOADER], [1],
8279 [Define if libdlloader will be built on this platform])
8281 AC_SUBST([LT_DLPREOPEN])
8283 dnl This isn't used anymore, but set it for backwards compatibility
8284 LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
8285 AC_SUBST([LIBADD_DL])
8291 AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
8292 dnl aclocal-1.4 backwards compatibility:
8293 dnl AC_DEFUN([AC_LTDL_DLLIB], [])
8296 # LT_SYS_SYMBOL_USCORE
8297 # --------------------
8298 # does the compiler prefix global symbols with an underscore?
8299 AC_DEFUN([LT_SYS_SYMBOL_USCORE],
8300 [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
8301 AC_CACHE_CHECK([for _ prefix in compiled symbols],
8302 [lt_cv_sys_symbol_underscore],
8303 [lt_cv_sys_symbol_underscore=no
8304 cat > conftest.$ac_ext <<_LT_EOF
8305 void nm_test_func(){}
8306 int main(){nm_test_func;return 0;}
8308 if AC_TRY_EVAL(ac_compile); then
8309 # Now try to grab the symbols.
8310 ac_nlist=conftest.nm
8311 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
8312 # See whether the symbols have a leading underscore.
8313 if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
8314 lt_cv_sys_symbol_underscore=yes
8316 if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
8319 echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
8323 echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
8326 echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
8327 cat conftest.c >&AS_MESSAGE_LOG_FD
8331 sys_symbol_underscore=$lt_cv_sys_symbol_underscore
8332 AC_SUBST([sys_symbol_underscore])
8333 ])# LT_SYS_SYMBOL_USCORE
8336 AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
8337 dnl aclocal-1.4 backwards compatibility:
8338 dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
8341 # LT_FUNC_DLSYM_USCORE
8342 # --------------------
8343 AC_DEFUN([LT_FUNC_DLSYM_USCORE],
8344 [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
8345 if test x"$lt_cv_sys_symbol_underscore" = xyes; then
8346 if test x"$libltdl_cv_func_dlopen" = xyes ||
8347 test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
8348 AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
8349 [libltdl_cv_need_uscore],
8350 [libltdl_cv_need_uscore=unknown
8352 LIBS="$LIBS $LIBADD_DLOPEN"
8353 _LT_TRY_DLOPEN_SELF(
8354 [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
8355 [], [libltdl_cv_need_uscore=cross])
8361 if test x"$libltdl_cv_need_uscore" = xyes; then
8362 AC_DEFINE([NEED_USCORE], [1],
8363 [Define if dlsym() requires a leading underscore in symbol names.])
8365 ])# LT_FUNC_DLSYM_USCORE
8368 AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
8369 dnl aclocal-1.4 backwards compatibility:
8370 dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])