1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
3 m4_define([_LT_COPYING], [dnl
4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
5 # Free Software Foundation, Inc.
7 # This file is part of GNU Libtool:
8 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 2 of the License, or
13 # (at your option) any later version.
15 # This program is distributed in the hope that it will be useful, but
16 # WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 # General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 # As a special exception to the GNU General Public License, if you
25 # distribute this file as part of a program that contains a
26 # configuration script generated by Autoconf, you may include it under
27 # the same distribution terms that you use for the rest of that program.
30 # serial 49 AC_PROG_LIBTOOL
35 # Complain and exit if this libtool version is less that VERSION.
36 m4_define([LT_PREREQ],
37 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
39 [m4_fatal([Libtool version $1 or higher is required],
46 AC_DEFUN([AC_PROG_LIBTOOL],
47 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
53 AC_DEFUN([_AC_PROG_LIBTOOL],
54 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
55 AC_REQUIRE([_LT_PROG_LTMAIN])dnl
56 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
57 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
58 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
60 # This can be used to rebuild libtool when needed
61 LIBTOOL_DEPS="$ltmain"
63 # Always use our own libtool.
64 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
67 # Prevent multiple expansion
68 define([AC_PROG_LIBTOOL], [])
74 # In libtool itself `ltmain.sh' is in the build tree, but everything else
75 # ships it in the source tree, for completeness, if we find a copy in the
76 # build tree use that before falling back to auxdir.
78 # Note that this code is called both from `configure', and `config.status'
79 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
80 # `config.status' has no value for ac_aux_dir unless we are using Automake,
81 # so we pass a copy along to make sure it has a sensible value anyway.
82 AC_DEFUN([_LT_PROG_LTMAIN],
83 [_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
85 $srcdir) ltmain=./ltmain.sh ;;
86 $srcdir/*) ltmain=`expr "$ac_aux_dir" : "$srcdir/\(.*\)"`/ltmain.sh ;;
88 test -f "$ltmain" || ltmain="$ac_aux_dir/ltmain.sh"
94 AC_DEFUN([AC_LIBTOOL_SETUP],
95 [AC_PREREQ(2.58)dnl We use AC_INCLUDES_DEFAULT
96 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
97 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
98 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW)$])dnl
99 AC_REQUIRE([LTSUGAR_VERSION])dnl
100 AC_REQUIRE([LTVERSION_VERSION])dnl
101 AC_REQUIRE([AC_CANONICAL_HOST])dnl
102 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
103 _LT_DECL([], [host_alias], [0], [The host system])dnl
104 _LT_DECL([], [host], [0])dnl
106 AC_REQUIRE([AC_PROG_CC])dnl
107 AC_REQUIRE([AC_PROG_LD])dnl
108 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
109 AC_REQUIRE([AC_PROG_NM])dnl
111 AC_REQUIRE([AC_PROG_LN_S])dnl
112 test -z "$LN_S" && LN_S="ln -s"
113 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
115 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
116 AC_REQUIRE([AC_LIBTOOL_SYS_OLD_ARCHIVE])dnl
117 AC_REQUIRE([AC_LIBTOOL_SYS_MAX_CMD_LEN])dnl
118 AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
119 AC_REQUIRE([AC_OBJEXT])dnl
121 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
122 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
123 AC_REQUIRE([AC_EXEEXT])dnl
124 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
127 _LT_CONFIG_LIBTOOL_INIT([
128 # See if we are running on zsh, and set the options which allow our
129 # commands through without removal of \ escapes INIT.
130 if test -n "\${ZSH_VERSION+set}" ; then
134 if test -n "${ZSH_VERSION+set}" ; then
140 AC_ENABLE_FAST_INSTALL
143 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
144 _LT_AC_PROG_ECHO_BACKSLASH
148 # AIX sometimes has problems with the GCC collect2 program. For some
149 # reason, if we set the COLLECT_NAMES environment variable, the problems
150 # vanish in a puff of smoke.
151 if test "X${COLLECT_NAMES+set}" != Xset; then
158 # Sed substitution that helps us do robust quoting. It backslashifies
159 # metacharacters that are still active within double-quoted strings.
161 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
163 # Same as above, but do not quote variable references.
164 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
166 # Sed substitution to delay expansion of an escaped shell variable in a
167 # double_quote_subst'ed string.
168 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
170 # Sed substitution to delay expansion of an escaped single quote.
171 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
173 # Sed substitution to avoid accidental globbing in evaled expressions
174 no_glob_subst='s/\*/\\\*/g'
180 default_ofile=libtool
181 ofile="$default_ofile"
184 # All known linkers require a `.a' archive for static linking (except M$VC,
185 # which needs '.lib').
188 with_gnu_ld="$lt_cv_prog_gnu_ld"
193 # Set sane defaults for various variables
194 test -z "$CC" && CC=cc
195 test -z "$LTCC" && LTCC=$CC
196 test -z "$LD" && LD=ld
197 test -z "$ac_objext" && ac_objext=o
199 # Only perform the check for file, if the check method requires it
200 test -z "$MAGIC_CMD" && MAGIC_CMD=file
201 case $deplibs_check_method in
203 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
209 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
210 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
211 enable_win32_dll=yes, enable_win32_dll=no)
213 AC_ARG_ENABLE([libtool-lock],
214 [AC_HELP_STRING([--disable-libtool-lock],
215 [avoid locking (might break parallel builds)])])
216 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
219 [AC_HELP_STRING([--with-pic],
220 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
221 [pic_mode="$withval"],
223 test -z "$pic_mode" && pic_mode=default
224 _LT_DECL([], [pic_mode], [0], [What type of objects to build])
226 # Use C for the default configuration in the libtool script
227 AC_LIBTOOL_LANG_C_CONFIG
235 ## ------------------------------------- ##
236 ## Accumulate code for creating libtool. ##
237 ## ------------------------------------- ##
239 # So that we can recreate a full libtool script including additional
240 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
241 # in macros and then make a single call at the end using the `libtool'
244 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
245 # ----------------------------------------
246 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
247 m4_define([_LT_CONFIG_LIBTOOL_INIT],
249 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
254 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
256 # _LT_CONFIG_LIBTOOL([COMMANDS])
257 # ------------------------------
258 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
259 m4_define([_LT_CONFIG_LIBTOOL],
261 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
266 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
269 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
270 # ---------------------------------------------------
271 m4_define([_LT_CONFIG_SAVE_COMMANDS],
272 [_LT_CONFIG_LIBTOOL([$1])
273 _LT_CONFIG_LIBTOOL_INIT([$2])
277 # _LT_FORMAT_COMMENT([COMMENT])
278 # -----------------------------
279 # Add leading comment marks to the start of each line, and a trailing
280 # full-stop to the whole comment if one is not present already.
281 m4_define([_LT_FORMAT_COMMENT],
283 m4_bpatsubst([$1], [^ *], [# ])]m4_bmatch([$1], [[!?.]$], [], [.])
288 ## ------------------------ ##
289 ## FIXME: Eliminate VARNAME ##
290 ## ------------------------ ##
292 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
293 # -------------------------------------------------------------------
294 # CONFIGNAME is the name given to the value in the libtool script.
295 # VARNAME is the (base) name used in the configure script.
296 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
297 # VARNAME. Any other value will be used directly.
298 m4_define([_LT_DECL],
299 [lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]],
300 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
301 [m4_ifval([$1], [$1], [$2])])
302 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
304 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
305 lt_dict_add_subkey([lt_decl_dict], [$2],
306 [tagged?], [m4_ifval([$5], [yes], [no])])])
310 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
311 # --------------------------------------------------------
312 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
315 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
316 # -------------------------------------------------
317 m4_define([lt_decl_tag_varnames],
318 [_lt_decl_filter([tagged?], [yes], $@)])
319 m4_define([_lt_decl_filter],
321 [0], [m4_fatal([$0: too few arguments: $#])],
322 [1], [m4_fatal([$0: too few arguments: $#: $1])],
323 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
324 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
325 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
329 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
330 # ---------------------------------------------------
331 m4_define([lt_decl_quote_varnames],
332 [_lt_decl_filter([value], [1], $@)])
334 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
335 # ----------------------------------------------------
336 m4_define([lt_decl_dquote_varnames],
337 [_lt_decl_filter([value], [2], $@)])
340 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
341 # ----------------------------------------------------
342 m4_define([lt_decl_varnames_tagged],
343 [_$0(m4_quote(m4_default([$1], [[, ]])),
344 m4_quote(m4_if([$2], [],
345 m4_quote(lt_decl_tag_varnames),
346 m4_quote(m4_shift($@)))),
347 m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
348 m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
351 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
352 # ------------------------------------------------
353 m4_define([lt_decl_all_varnames],
354 [_$0(m4_quote(m4_default([$1], [[, ]])),
356 m4_quote(lt_decl_varnames),
357 m4_quote(m4_shift($@))))[]dnl
359 m4_define([_lt_decl_all_varnames],
360 [lt_join($@, lt_decl_varnames_tagged([$1],
361 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
365 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
366 # ------------------------------------
367 # Quote a variable value, and forward it to `config.status' so that its
368 # declaration there will have the same value as in `configure'. VARNAME
369 # must have a single quote delimited value for this to work.
370 m4_define([_LT_CONFIG_STATUS_DECLARE],
371 [$1='`$echo "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
374 # _LT_CONFIG_STATUS_DECLARATIONS
375 # ------------------------------
376 # We delimit libtool config variables with single quotes, so when
377 # we write them to config.status, we have to be sure to quote all
378 # embedded single quotes properly. In configure, this macro expands
379 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
381 # <var>='`$echo "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
382 m4_define([_LT_CONFIG_STATUS_DECLARATIONS],
383 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
384 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
387 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
388 # -----------------------------------
389 # Extract the dictionary values for VARNAME (optionally with TAG) and
390 # expand to a commented shell variable setting:
392 # # Some comment about what VAR is for.
393 # visible_name=$lt_internal_name
394 m4_define([_LT_LIBTOOL_DECLARE],
395 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
396 [description])))[]dnl
397 m4_pushdef([_libtool_name],
398 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
399 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
400 [0], [_libtool_name=[$]$1],
401 [1], [_libtool_name=$lt_[]$1],
402 [2], [_libtool_name=$lt_[]$1],
403 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
404 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
407 # _LT_LIBTOOL_CONFIG_VARS
408 # -----------------------
409 # Produce commented declarations of non-tagged libtool config variables
410 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
411 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
412 # section) are produced by _LT_LIBTOOL_TAG_VARS.
413 m4_define([_LT_LIBTOOL_CONFIG_VARS],
414 [m4_foreach([_lt_var],
415 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
416 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
418 # _LT_LIBTOOL_TAG_VARS(TAG)
419 # -------------------------
420 m4_define([_LT_LIBTOOL_TAG_VARS],
421 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
422 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
425 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
426 # ---------------------------------
427 m4_define([_LT_AC_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
430 # _LT_CONFIG_COMMANDS
431 # -------------------
432 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
433 # variables for single and double quote escaping we saved from calls
434 # to _LT_DECL, we can put quote escaped variables declarations
435 # into `config.status', and then the shell code to quote escape them in
436 # for loops in `config.status'. Finally, any additional code accumulated
437 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
438 m4_define([_LT_CONFIG_COMMANDS],
439 [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [
441 # The HP-UX ksh and POSIX shell print the target directory to stdout
443 if test "X${CDPATH+set}" = Xset; then CDPATH=${ZSH_VERSION+.}:; export CDPATH; fi
445 sed_quote_subst='$sed_quote_subst'
446 double_quote_subst='$double_quote_subst'
447 delay_variable_subst='$delay_variable_subst'
448 _LT_CONFIG_STATUS_DECLARATIONS
450 compiler='$compiler_DEFAULT'
452 # Quote evaled strings.
453 for var in lt_decl_all_varnames([[ ]], lt_decl_quote_varnames); do
454 eval "lt_\$var=\\\\\\"\\\`\\\$echo \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
457 # Double-quote double-evaled strings.
458 for var in lt_decl_all_varnames([[ ]], lt_decl_dquote_varnames); do
459 eval "lt_\$var=\\\\\\"\\\`\\\$echo \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
462 # Fix-up fallback echo if it was mangled by the above quoting rules.
464 *'\\\[$]0 --fallback-echo"')dnl "
465 lt_echo=\`\$echo "X\$lt_echo" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
469 _LT_OUTPUT_LIBTOOL_INIT
471 ])#_LT_CONFIG_COMMANDS
474 # AC_LIBTOOL_CONFIG([TAGNAME])
475 # ----------------------------
476 # If TAGNAME is not passed, then create an initial libtool script
477 # with a default configuration from the untagged config vars. Otherwise
478 # add code to config.status for appending the configuration named by
479 # TAGNAME from the matching tagged config vars.
480 m4_define([AC_LIBTOOL_CONFIG],
481 [_LT_CONFIG_SAVE_COMMANDS([
482 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
483 m4_if(_LT_TAG, [C], [
484 # See if we are running on zsh, and set the options which allow our
485 # commands through without removal of \ escapes.
486 if test -n "${ZSH_VERSION+set}" ; then
491 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
494 cat <<_LT_EOF >> "$cfgfile"
497 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
498 # Generated automatically by config.status (GNU $PACKAGE$TIMESTAMP) $VERSION
499 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
500 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
504 # The names of the tagged configurations supported by this script.
507 # ### BEGIN LIBTOOL CONFIG
508 _LT_LIBTOOL_CONFIG_VARS
510 # ### END LIBTOOL CONFIG
512 # The HP-UX ksh and POSIX shell print the target directory to stdout
514 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
520 cat <<\_LT_EOF >> "$cfgfile"
521 # AIX sometimes has problems with the GCC collect2 program. For some
522 # reason, if we set the COLLECT_NAMES environment variable, the problems
523 # vanish in a puff of smoke.
524 if test "X${COLLECT_NAMES+set}" != Xset; then
534 # We use sed instead of cat because bash on DJGPP gets confused if
535 # if finds mixed CR/LF and LF-only lines. Since sed operates in
536 # text mode, it properly converts lines to CR/LF. This bash problem
537 # is reportedly fixed, but why not run on old versions too?
538 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
540 mv -f "$cfgfile" "$ofile" ||
541 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
544 [if test -n "[$]_LT_TAG" && test "X[$]_LT_TAG" != "Xno"; then
545 cat <<_LT_EOF >> "$ofile"
547 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
548 dnl in a comment (ie after a #).
549 # ### BEGIN LIBTOOL TAG CONFIG: $1
550 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
551 # ### END LIBTOOL TAG CONFIG: $1
559 TIMESTAMP='$TIMESTAMP'
561 ofile='$ofile'], [$1='[$]$1'])
562 ])dnl /_LT_CONFIG_SAVE_COMMANDS
563 ])# AC_LIBTOOL_CONFIG
566 # _LT_AC_SYS_COMPILER
567 # -------------------
568 AC_DEFUN([_LT_AC_SYS_COMPILER],
569 [AC_REQUIRE([AC_PROG_CC])dnl
571 _LT_DECL([LTCC], [CC], [1], [A C compiler])
572 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
573 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU C compiler?])
575 # If no C compiler was specified, use CC.
578 # Allow CC to be a program name with arguments.
580 ])# _LT_AC_SYS_COMPILER
583 # _LT_AC_SYS_LIBPATH_AIX
584 # ----------------------
585 # Links a minimal program and checks the executable
586 # for the system default hardcoded library path. In most cases,
587 # this is /usr/lib:/lib, but when the MPI compilers are used
588 # the location of the communication and MPI libs are included too.
589 # If we don't find anything, use the default library path according
590 # to the aix ld manual.
591 m4_define([_LT_AC_SYS_LIBPATH_AIX],
592 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
593 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
595 # Check for a 64-bit object if we didn't find anything.
596 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
598 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
599 ])# _LT_AC_SYS_LIBPATH_AIX
602 # _LT_AC_SHELL_INIT(ARG)
603 # ----------------------
604 m4_define([_LT_AC_SHELL_INIT],
605 [ifdef([AC_DIVERSION_NOTICE],
606 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
607 [AC_DIVERT_PUSH(NOTICE)])
610 ])# _LT_AC_SHELL_INIT
613 # _LT_AC_PROG_ECHO_BACKSLASH
614 # --------------------------
615 # Add some code to the start of the generated configure script which
616 # will find an echo command which doesn't interpret backslashes.
617 m4_define([_LT_AC_PROG_ECHO_BACKSLASH],
619 # Check that we are running under the correct shell.
620 SHELL=${CONFIG_SHELL-/bin/sh}
624 # Remove one level of quotation (which was required for Make).
625 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
630 if test "X[$]1" = X--no-reexec; then
631 # Discard the --no-reexec flag, and continue.
633 elif test "X[$]1" = X--fallback-echo; then
634 # Avoid inline document here, it may be left over
636 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
637 # Yippee, $echo works!
640 # Restart under the correct shell.
641 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
644 if test "X[$]1" = X--fallback-echo; then
645 # used as fallback echo
653 # The HP-UX ksh and POSIX shell print the target directory to stdout
655 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
657 if test -z "$ECHO"; then
658 if test "X${echo_test_string+set}" != Xset; then
659 # find a string as large as possible, as long as the shell can cope with it
660 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
661 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
662 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
663 echo_test_string="`eval $cmd`" &&
664 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
671 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
672 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
673 test "X$echo_testing_string" = "X$echo_test_string"; then
676 # The Solaris, AIX, and Digital Unix default echo programs unquote
677 # backslashes. This makes it impossible to quote backslashes using
678 # echo "$something" | sed 's/\\/\\\\/g'
680 # So, first we look for a working echo in the user's PATH.
682 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
683 for dir in $PATH /usr/ucb; do
685 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
686 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
687 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
688 test "X$echo_testing_string" = "X$echo_test_string"; then
695 if test "X$echo" = Xecho; then
696 # We didn't find a better echo, so look for alternatives.
697 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
698 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
699 test "X$echo_testing_string" = "X$echo_test_string"; then
700 # This shell has a builtin print -r that does the trick.
702 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
703 test "X$CONFIG_SHELL" != X/bin/ksh; then
704 # If we have ksh, try running configure again with it.
705 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
706 export ORIGINAL_CONFIG_SHELL
707 CONFIG_SHELL=/bin/ksh
709 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
713 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
714 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
715 test "X$echo_testing_string" = "X$echo_test_string"; then
718 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
719 test "X$echo_testing_string" = 'X\t' &&
720 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
721 test "X$echo_testing_string" = "X$echo_test_string"; then
722 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
724 SHELL="$CONFIG_SHELL"
726 echo="$CONFIG_SHELL [$]0 --fallback-echo"
727 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
728 test "X$echo_testing_string" = 'X\t' &&
729 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
730 test "X$echo_testing_string" = "X$echo_test_string"; then
731 echo="$CONFIG_SHELL [$]0 --fallback-echo"
733 # maybe with a smaller string...
736 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
737 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
744 if test "$prev" != 'sed 50q "[$]0"'; then
745 echo_test_string=`eval $prev`
746 export echo_test_string
747 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
749 # Oops. We lost completely, so just stick with echo.
758 # Copy echo and quote the copy suitably for passing to libtool from
759 # the Makefile, instead of quoting the original, which is used later.
761 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
762 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
767 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
768 _LT_DECL([], [echo], [1],
769 [An echo program that does not interpret backslashes])
770 ])# _LT_AC_PROG_ECHO_BACKSLASH
775 AC_DEFUN([_LT_AC_LOCK],
776 [AC_REQUIRE([AC_OBJEXT])dnl
777 AC_ARG_ENABLE([libtool-lock],
778 [AC_HELP_STRING([--disable-libtool-lock],
779 [avoid locking (might break parallel builds)])])
780 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
782 # Some flags need to be propagated to the compiler or linker for good
786 # Find out which ABI we are using.
787 echo 'int i;' > conftest.$ac_ext
788 if AC_TRY_EVAL(ac_compile); then
789 case `/usr/bin/file conftest.$ac_objext` in
801 # Find out which ABI we are using.
802 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
803 if AC_TRY_EVAL(ac_compile); then
804 if test "$lt_cv_prog_gnu_ld" = yes; then
805 case `/usr/bin/file conftest.$ac_objext` in
807 LD="${LD-ld} -melf32bsmip"
810 LD="${LD-ld} -melf32bmipn32"
813 LD="${LD-ld} -melf64bmip"
817 case `/usr/bin/file conftest.$ac_objext` in
833 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
834 # Find out which ABI we are using.
835 echo 'int i;' > conftest.$ac_ext
836 if AC_TRY_EVAL(ac_compile); then
837 case "`/usr/bin/file conftest.o`" in
841 LD="${LD-ld} -m elf_i386"
843 ppc64-*linux*|powerpc64-*linux*)
844 LD="${LD-ld} -m elf32ppclinux"
847 LD="${LD-ld} -m elf_s390"
850 LD="${LD-ld} -m elf32_sparc"
857 LD="${LD-ld} -m elf_x86_64"
859 ppc*-*linux*|powerpc*-*linux*)
860 LD="${LD-ld} -m elf64ppc"
863 LD="${LD-ld} -m elf64_s390"
866 LD="${LD-ld} -m elf64_sparc"
876 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
877 SAVE_CFLAGS="$CFLAGS"
878 CFLAGS="$CFLAGS -belf"
879 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
881 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
883 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
884 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
885 CFLAGS="$SAVE_CFLAGS"
890 need_locks="$enable_libtool_lock"
894 # AC_LIBTOOL_SYS_OLD_ARCHIVE
895 # --------------------------
896 AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE],
897 [AC_CHECK_TOOL(AR, ar, false)
898 test -z "$AR" && AR=ar
899 test -z "$AR_FLAGS" && AR_FLAGS=cru
900 _LT_DECL([], [AR], [1], [The archiver])
901 _LT_DECL([], [AR_FLAGS], [1])
903 AC_CHECK_TOOL(STRIP, strip, :)
904 test -z "$STRIP" && STRIP=:
905 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
907 AC_CHECK_TOOL(RANLIB, ranlib, :)
908 test -z "$RANLIB" && RANLIB=:
909 _LT_DECL([], [RANLIB], [1],
910 [Commands used to install an old-style archive])
912 # Determine commands to create old-style static archives.
913 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
914 old_postinstall_cmds='chmod 644 $oldlib'
915 old_postuninstall_cmds=
917 if test -n "$RANLIB"; then
920 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
923 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
926 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
928 _LT_DECL([], [old_postinstall_cmds], [2])
929 _LT_DECL([], [old_postuninstall_cmds], [2])
930 _LT_TAGDECL([], [old_archive_cmds], [2],
931 [Commands used to build an old-style archive])
932 ])# AC_LIBTOOL_SYS_OLD_ARCHIVE
935 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
936 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
937 # ----------------------------------------------------------------
938 # Check whether the given compiler option works
939 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
940 [AC_REQUIRE([AC_OBJEXT])dnl
941 AC_REQUIRE([LT_AC_PROG_SED])dnl
942 AC_CACHE_CHECK([$1], [$2],
944 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
945 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
946 lt_compiler_flag="$3"
947 # Insert the option either (1) after the last *FLAGS variable, or
948 # (2) before a word containing "conftest.", or (3) at the end.
949 # Note that $ac_compile itself does not contain backslashes and begins
950 # with a dollar sign (not a hyphen), so the echo should work correctly.
951 # The option is referenced via a variable to avoid confusing sed.
952 lt_compile=`echo "$ac_compile" | $SED \
953 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
954 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
955 -e 's:$: $lt_compiler_flag:'`
956 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
957 (eval "$lt_compile" 2>conftest.err)
959 cat conftest.err >&AS_MESSAGE_LOG_FD
960 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
961 if (exit $ac_status) && test -s "$ac_outfile"; then
962 # The compiler can only warn and ignore the option if not recognized
963 # So say no if there are warnings
964 if test ! -s conftest.err; then
971 if test x"[$]$2" = xyes; then
972 m4_if([$5], , :, [$5])
974 m4_if([$6], , :, [$6])
976 ])# AC_LIBTOOL_COMPILER_OPTION
979 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
980 # [ACTION-SUCCESS], [ACTION-FAILURE])
981 # ------------------------------------------------------------
982 # Check whether the given compiler option works
983 m4_define([AC_LIBTOOL_LINKER_OPTION],
984 [AC_CACHE_CHECK([$1], [$2],
986 save_LDFLAGS="$LDFLAGS"
987 LDFLAGS="$LDFLAGS $3"
988 printf "$lt_simple_link_test_code" > conftest.$ac_ext
989 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
990 # The compiler can only warn and ignore the option if not recognized
991 # So say no if there are warnings
992 if test -s conftest.err; then
993 # Append any errors to the config.log.
994 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1000 LDFLAGS="$save_LDFLAGS"
1003 if test x"[$]$2" = xyes; then
1004 m4_if([$4], , :, [$4])
1006 m4_if([$5], , :, [$5])
1008 ])# AC_LIBTOOL_LINKER_OPTION
1011 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1012 # --------------------------
1013 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1014 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1015 # find the maximum length of command line arguments
1016 AC_MSG_CHECKING([the maximum length of command line arguments])
1017 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1023 # On DJGPP, this test can blow up pretty badly due to problems in libc
1024 # (any single argument exceeding 2000 bytes causes a buffer overrun
1025 # during glob expansion). Even if it were fixed, the result of this
1026 # check would be larger than it should be.
1027 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1031 # Under GNU Hurd, this test is not required because there is
1032 # no limit to the length of command line arguments.
1033 # Libtool will interpret -1 as no limit whatsoever
1034 lt_cv_sys_max_cmd_len=-1;
1038 # On Win9x/ME, this test blows up -- it succeeds, but takes
1039 # about 5 minutes as the teststring grows exponentially.
1040 # Worse, since 9x/ME are not pre-emptively multitasking,
1041 # you end up with a "frozen" computer, even though with patience
1042 # the test eventually succeeds (with a max line length of 256k).
1043 # Instead, let's just punt: use the minimum linelength reported by
1044 # all of the supported platforms: 8192 (on NT/2K/XP).
1045 lt_cv_sys_max_cmd_len=8192;
1049 # On AmigaOS with pdksh, this test takes hours, literally.
1050 # So we just punt and use a minimum line length of 8192.
1051 lt_cv_sys_max_cmd_len=8192;
1055 # Make teststring a little bigger before we do anything with it.
1056 # a 1K string should be a reasonable start.
1057 for i in 1 2 3 4 5 6 7 8 ; do
1058 teststring=$teststring$teststring
1060 # If test is not a shell built-in, we'll probably end up computing a
1061 # maximum length that is only half of the actual maximum length, but
1063 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
1064 = "XX$teststring$teststring") >/dev/null 2>&1 &&
1065 test $i != 17 # 1/2 MB should be enough
1068 teststring=$teststring$teststring
1070 # Only check the string length outside the loop.
1071 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
1073 # Add a significant safety factor because C++ compilers can tack on massive
1074 # amounts of additional arguments before passing them to the linker.
1075 # It appears as though 1/2 is a usable value.
1076 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1080 if test -n $lt_cv_sys_max_cmd_len ; then
1081 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1085 _LT_DECL([max_cmd_len], [lt_cv_sys_max_cmd_len], [0],
1086 [What is the maximum length of a command?])
1087 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1090 # _LT_AC_CHECK_DLFCN
1091 # --------------------
1092 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1093 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
1094 ])# _LT_AC_CHECK_DLFCN
1097 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1098 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1099 # ------------------------------------------------------------------
1100 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1101 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1102 if test "$cross_compiling" = yes; then :
1105 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1106 lt_status=$lt_dlunknown
1107 cat > conftest.$ac_ext <<_LT_EOF
1108 [#line __oline__ "configure"
1109 #include "confdefs.h"
1118 # define LT_DLGLOBAL RTLD_GLOBAL
1121 # define LT_DLGLOBAL DL_GLOBAL
1123 # define LT_DLGLOBAL 0
1127 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1128 find out it does not work in some platform. */
1129 #ifndef LT_DLLAZY_OR_NOW
1131 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1134 # define LT_DLLAZY_OR_NOW DL_LAZY
1137 # define LT_DLLAZY_OR_NOW RTLD_NOW
1140 # define LT_DLLAZY_OR_NOW DL_NOW
1142 # define LT_DLLAZY_OR_NOW 0
1150 extern "C" void exit (int);
1153 void fnord() { int i=42;}
1156 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1157 int status = $lt_dlunknown;
1161 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1162 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1163 /* dlclose (self); */
1169 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1170 (./conftest; exit; ) 2>/dev/null
1173 x$lt_dlno_uscore) $1 ;;
1174 x$lt_dlneed_uscore) $2 ;;
1175 x$lt_unknown|x*) $3 ;;
1178 # compilation failed
1183 ])# _LT_AC_TRY_DLOPEN_SELF
1186 # AC_LIBTOOL_DLOPEN_SELF
1187 # -------------------
1188 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1189 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1190 if test "x$enable_dlopen" != xyes; then
1191 enable_dlopen=unknown
1192 enable_dlopen_self=unknown
1193 enable_dlopen_self_static=unknown
1200 lt_cv_dlopen="load_add_on"
1202 lt_cv_dlopen_self=yes
1206 lt_cv_dlopen="LoadLibrary"
1211 lt_cv_dlopen="dlopen"
1216 # if libdl is installed we need to link against it
1217 AC_CHECK_LIB([dl], [dlopen],
1218 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1221 lt_cv_dlopen_self=yes
1226 AC_CHECK_FUNC([shl_load],
1227 [lt_cv_dlopen="shl_load"],
1228 [AC_CHECK_LIB([dld], [shl_load],
1229 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1230 [AC_CHECK_FUNC([dlopen],
1231 [lt_cv_dlopen="dlopen"],
1232 [AC_CHECK_LIB([dl], [dlopen],
1233 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1234 [AC_CHECK_LIB([svld], [dlopen],
1235 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1236 [AC_CHECK_LIB([dld], [dld_link],
1237 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1246 if test "x$lt_cv_dlopen" != xno; then
1252 case $lt_cv_dlopen in
1254 save_CPPFLAGS="$CPPFLAGS"
1255 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1257 save_LDFLAGS="$LDFLAGS"
1258 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1261 LIBS="$lt_cv_dlopen_libs $LIBS"
1263 AC_CACHE_CHECK([whether a program can dlopen itself],
1264 lt_cv_dlopen_self, [dnl
1265 _LT_AC_TRY_DLOPEN_SELF(
1266 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1267 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1270 if test "x$lt_cv_dlopen_self" = xyes; then
1271 LDFLAGS="$LDFLAGS $link_static_flag"
1272 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1273 lt_cv_dlopen_self_static, [dnl
1274 _LT_AC_TRY_DLOPEN_SELF(
1275 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1276 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1280 CPPFLAGS="$save_CPPFLAGS"
1281 LDFLAGS="$save_LDFLAGS"
1286 case $lt_cv_dlopen_self in
1287 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1288 *) enable_dlopen_self=unknown ;;
1291 case $lt_cv_dlopen_self_static in
1292 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1293 *) enable_dlopen_self_static=unknown ;;
1296 _LT_DECL([dlopen_support], [enable_dlopen], [0],
1297 [Whether dlopen is supported])
1298 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
1299 [Whether dlopen of programs is supported])
1300 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
1301 [Whether dlopen of statically linked programs is supported])
1302 ])# AC_LIBTOOL_DLOPEN_SELF
1305 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1306 # ---------------------------------
1307 # Check to see if options -c and -o are simultaneously supported by compiler
1308 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1309 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1310 AC_REQUIRE([AC_OBJEXT])dnl
1311 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1312 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1313 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1314 $rm -r conftest 2>/dev/null
1318 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1320 lt_compiler_flag="-o out/conftest2.$ac_objext"
1321 # Insert the option either (1) after the last *FLAGS variable, or
1322 # (2) before a word containing "conftest.", or (3) at the end.
1323 # Note that $ac_compile itself does not contain backslashes and begins
1324 # with a dollar sign (not a hyphen), so the echo should work correctly.
1325 lt_compile=`echo "$ac_compile" | $SED \
1326 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1327 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1328 -e 's:$: $lt_compiler_flag:'`
1329 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1330 (eval "$lt_compile" 2>out/conftest.err)
1332 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1333 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1334 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1336 # The compiler can only warn and ignore the option if not recognized
1337 # So say no if there are warnings
1338 if test ! -s out/conftest.err; then
1339 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1344 # SGI C++ compiler will create directory out/ii_files/ for
1345 # template instantiation
1346 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1347 $rm out/* && rmdir out
1352 _LT_DECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
1353 [Does compiler simultaneously support -c and -o options?])
1354 ])# AC_LIBTOOL_PROG_CC_C_O
1357 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1358 # -----------------------------------------
1359 # Check to see if we can do hard links to lock some files if needed
1360 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1361 [AC_REQUIRE([AC_LIBTOOL_PROG_CC_C_O])dnl
1362 AC_REQUIRE([_LT_AC_LOCK])dnl
1364 hard_links="nottested"
1365 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1366 # do not overwrite the value of need_locks provided by the user
1367 AC_MSG_CHECKING([if we can lock with hard links])
1370 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1372 ln conftest.a conftest.b 2>&5 || hard_links=no
1373 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1374 AC_MSG_RESULT([$hard_links])
1375 if test "$hard_links" = no; then
1376 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1382 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
1383 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1388 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1389 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1390 [rm -f .libs 2>/dev/null
1391 mkdir .libs 2>/dev/null
1392 if test -d .libs; then
1395 # MS-DOS does not allow filenames that begin with a dot.
1398 rmdir .libs 2>/dev/null])
1399 objdir=$lt_cv_objdir
1400 _LT_DECL([], [objdir], [0],
1401 [The name of the directory that contains temporary libtool files])dnl
1402 ])# AC_LIBTOOL_OBJDIR
1405 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1406 # ----------------------------------------------
1407 # Check hardcoding attributes.
1408 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1409 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1410 _LT_AC_TAGVAR(hardcode_action, $1)=
1411 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
1412 test -n "$_LT_AC_TAGVAR(runpath_var $1)" ||
1413 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
1415 # We can hardcode non-existant directories.
1416 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1417 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1418 # have to relink, otherwise we might link with an installed library
1419 # when we should be linking with a yet-to-be-installed one
1420 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1421 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1422 # Linking always hardcodes the temporary library directory.
1423 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1425 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1426 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1429 # We cannot hardcode anything, or else we can only hardcode existing
1431 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1433 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1435 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1436 # Fast installation is not supported
1437 enable_fast_install=no
1438 elif test "$shlibpath_overrides_runpath" = yes ||
1439 test "$enable_shared" = no; then
1440 # Fast installation is not necessary
1441 enable_fast_install=needless
1443 _LT_TAGDECL([], [hardcode_action], [0],
1444 [How to hardcode a shared library path into an executable])
1445 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1448 # AC_LIBTOOL_SYS_LIB_STRIP
1449 # ------------------------
1450 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1451 [AC_REQUIRE([LT_AC_PROG_EGREP])
1454 AC_MSG_CHECKING([whether stripping libraries is possible])
1455 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
1456 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1457 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1458 AC_MSG_RESULT([yes])
1460 # FIXME - insert some real tests, host_os isn't really good enough
1463 if test -n "$STRIP" ; then
1464 striplib="$STRIP -x"
1465 AC_MSG_RESULT([yes])
1475 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
1476 _LT_DECL([], [striplib], [1])
1477 ])# AC_LIBTOOL_SYS_LIB_STRIP
1480 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1481 # -----------------------------
1482 # PORTME Fill in your ld.so characteristics
1483 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1484 [AC_REQUIRE([LT_AC_PROG_EGREP])
1485 AC_MSG_CHECKING([dynamic linker characteristics])
1487 libname_spec='lib$name'
1495 shlibpath_overrides_runpath=unknown
1497 dynamic_linker="$host_os ld.so"
1498 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1499 if test "$GCC" = yes; then
1500 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1501 if echo "$sys_lib_search_path_spec" | $GREP ';' >/dev/null ; then
1502 # if the path contains ";" then we assume it to be the separator
1503 # otherwise default to the standard path separator (i.e. ":") - it is
1504 # assumed that no part of a normal pathname contains ";" but that should
1505 # okay in the real world where ";" in dirpaths is itself problematic.
1506 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1508 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1511 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1513 need_lib_prefix=unknown
1514 hardcode_into_libs=no
1516 # when you set need_version to no, make sure it does not cause -set_version
1517 # flags to be left without arguments
1518 need_version=unknown
1523 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1524 shlibpath_var=LIBPATH
1526 # AIX 3 has no versioning support, so we append a major version to the name.
1527 soname_spec='${libname}${release}${shared_ext}$major'
1534 hardcode_into_libs=yes
1535 if test "$host_cpu" = ia64; then
1536 # AIX 5 supports IA64
1537 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1538 shlibpath_var=LD_LIBRARY_PATH
1540 # With GCC up to 2.95.x, collect2 would create an import file
1541 # for dependence libraries. The import file would start with
1542 # the line `#! .'. This would cause the generated library to
1543 # depend on `.', always an invalid library. This was fixed in
1544 # development snapshots of GCC prior to 3.0.
1546 aix4 | aix4.[[01]] | aix4.[[01]].*)
1547 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1549 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
1556 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1557 # soname into executable. Probably we can add versioning support to
1558 # collect2, so additional links can be useful in future.
1559 if test "$aix_use_runtimelinking" = yes; then
1560 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1561 # instead of lib<name>.a to let people know that these are not
1562 # typical AIX shared libraries.
1563 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1565 # We preserve .a as extension for shared libraries through AIX4.2
1566 # and later when we are not doing run time linking.
1567 library_names_spec='${libname}${release}.a $libname.a'
1568 soname_spec='${libname}${release}${shared_ext}$major'
1570 shlibpath_var=LIBPATH
1575 if test "$host_cpu" = m68k; then
1576 library_names_spec='$libname.ixlibrary $libname.a'
1577 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1578 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'
1585 library_names_spec='${libname}${shared_ext}'
1586 dynamic_linker="$host_os ld.so"
1587 shlibpath_var=LIBRARY_PATH
1593 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1594 soname_spec='${libname}${release}${shared_ext}$major'
1595 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1596 shlibpath_var=LD_LIBRARY_PATH
1597 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1598 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1599 # the default ld.so.conf also contains /usr/contrib/lib and
1600 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1601 # libtool to hard-code these into programs
1604 cygwin* | mingw* | pw32*)
1605 version_type=windows
1610 case $GCC,$host_os in
1611 yes,cygwin* | yes,mingw* | yes,pw32*)
1612 library_names_spec='$libname.dll.a'
1613 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1614 postinstall_cmds='base_file=`basename \${file}`~
1615 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1616 dldir=$destdir/`dirname \$dlpath`~
1617 test -d \$dldir || mkdir -p \$dldir~
1618 $install_prog $dir/$dlname \$dldir/$dlname'
1619 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1620 dlpath=$dir/\$dldll~
1622 shlibpath_overrides_runpath=yes
1626 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1627 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1628 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1631 # MinGW DLLs use traditional 'lib' prefix
1632 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1633 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1634 if echo "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
1635 # It is most probably a Windows format PATH printed by
1636 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1637 # path with ; separators, and with drive letters. We can handle the
1638 # drive letters (cygwin fileutils understands them), so leave them,
1639 # especially as we might pass files found there to a mingw objdump,
1640 # which wouldn't understand a cygwinified path. Ahh.
1641 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1643 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1647 # pw32 DLLs use 'pw' prefix rather than 'lib'
1648 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
1654 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1657 dynamic_linker='Win32 ld.exe'
1658 # FIXME: first we should search . and the directory the executable is in
1662 darwin* | rhapsody*)
1663 dynamic_linker="$host_os dyld"
1667 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1668 soname_spec='${libname}${release}${major}$shared_ext'
1669 shlibpath_overrides_runpath=yes
1670 shlibpath_var=DYLD_LIBRARY_PATH
1671 shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
1672 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1673 if test "$GCC" = yes; then
1674 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"`
1676 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1678 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1685 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1686 soname_spec='${libname}${release}${shared_ext}$major'
1687 shlibpath_var=LD_LIBRARY_PATH
1698 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1699 soname_spec='${libname}${release}${shared_ext}$major'
1700 shlibpath_var=LD_LIBRARY_PATH
1701 shlibpath_overrides_runpath=no
1702 hardcode_into_libs=yes
1703 dynamic_linker='GNU ld.so'
1707 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1708 version_type=freebsd-$objformat
1709 case $version_type in
1711 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1716 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1720 shlibpath_var=LD_LIBRARY_PATH
1723 shlibpath_overrides_runpath=yes
1725 freebsd3.[01]* | freebsdelf3.[01]*)
1726 shlibpath_overrides_runpath=yes
1727 hardcode_into_libs=yes
1730 shlibpath_overrides_runpath=no
1731 hardcode_into_libs=yes
1740 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1741 soname_spec='${libname}${release}${shared_ext}$major'
1742 shlibpath_var=LD_LIBRARY_PATH
1743 hardcode_into_libs=yes
1746 hpux9* | hpux10* | hpux11*)
1747 # Give a soname corresponding to the major version so that dld.sl refuses to
1748 # link against other versions.
1755 hardcode_into_libs=yes
1756 dynamic_linker="$host_os dld.so"
1757 shlibpath_var=LD_LIBRARY_PATH
1758 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1759 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1760 soname_spec='${libname}${release}${shared_ext}$major'
1761 if test "X$HPUX_IA64_MODE" = X32; then
1762 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1764 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1766 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1770 hardcode_into_libs=yes
1771 dynamic_linker="$host_os dld.sl"
1772 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1773 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1774 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1775 soname_spec='${libname}${release}${shared_ext}$major'
1776 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1777 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1781 dynamic_linker="$host_os dld.sl"
1782 shlibpath_var=SHLIB_PATH
1783 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1784 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1785 soname_spec='${libname}${release}${shared_ext}$major'
1788 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1789 postinstall_cmds='chmod 555 $lib'
1792 irix5* | irix6* | nonstopux*)
1794 nonstopux*) version_type=nonstopux ;;
1796 if test "$lt_cv_prog_gnu_ld" = yes; then
1804 soname_spec='${libname}${release}${shared_ext}$major'
1805 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1807 irix5* | nonstopux*)
1811 case $LD in # libtool.m4 will add one of these switches to LD
1812 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1813 libsuff= shlibsuff= libmagic=32-bit;;
1814 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1815 libsuff=32 shlibsuff=N32 libmagic=N32;;
1816 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1817 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1818 *) libsuff= shlibsuff= libmagic=never-match;;
1822 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1823 shlibpath_overrides_runpath=no
1824 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1825 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1826 hardcode_into_libs=yes
1829 # No shared lib support for Linux oldld, aout, or coff.
1830 linux*oldld* | linux*aout* | linux*coff*)
1834 # This must be Linux ELF.
1839 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1840 soname_spec='${libname}${release}${shared_ext}$major'
1841 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1842 shlibpath_var=LD_LIBRARY_PATH
1843 shlibpath_overrides_runpath=no
1844 # This implies no fast_install, which is unacceptable.
1845 # Some rework will be needed to allow for fast_install
1846 # before this can be enabled.
1847 hardcode_into_libs=yes
1849 # Append ld.so.conf contents to the search path
1850 if test -f /etc/ld.so.conf; then
1851 lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf`
1852 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1855 # We used to test for /lib/ld.so.1 and disable shared libraries on
1856 # powerpc, because MkLinux only supported shared libraries with the
1857 # GNU dynamic linker. Since this was broken with cross compilers,
1858 # most powerpc-linux boxes support dynamic linking these days and
1859 # people can always --disable-shared, the test was removed, and we
1860 # assume the GNU/Linux dynamic linker is in use.
1861 dynamic_linker='GNU/Linux ld.so'
1868 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1869 soname_spec='${libname}${release}${shared_ext}$major'
1870 shlibpath_var=LD_LIBRARY_PATH
1871 shlibpath_overrides_runpath=no
1872 hardcode_into_libs=yes
1873 dynamic_linker='GNU ld.so'
1880 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
1881 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1882 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1883 dynamic_linker='NetBSD (a.out) ld.so'
1885 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1886 soname_spec='${libname}${release}${shared_ext}$major'
1887 dynamic_linker='NetBSD ld.elf_so'
1889 shlibpath_var=LD_LIBRARY_PATH
1890 shlibpath_overrides_runpath=yes
1891 hardcode_into_libs=yes
1896 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1897 shlibpath_var=LD_LIBRARY_PATH
1898 shlibpath_overrides_runpath=yes
1905 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1906 soname_spec='${libname}${release}${shared_ext}$major'
1907 shlibpath_var=LD_LIBRARY_PATH
1908 shlibpath_overrides_runpath=yes
1915 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1916 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1917 shlibpath_var=LD_LIBRARY_PATH
1918 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1920 openbsd2.[[89]] | openbsd2.[[89]].*)
1921 shlibpath_overrides_runpath=no
1924 shlibpath_overrides_runpath=yes
1928 shlibpath_overrides_runpath=yes
1933 libname_spec='$name'
1936 library_names_spec='$libname${shared_ext} $libname.a'
1937 dynamic_linker='OS/2 ld.exe'
1938 shlibpath_var=LIBPATH
1941 osf3* | osf4* | osf5*)
1945 soname_spec='${libname}${release}${shared_ext}$major'
1946 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1947 shlibpath_var=LD_LIBRARY_PATH
1948 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1949 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1954 soname_spec='${libname}${release}${shared_ext}$major'
1955 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1956 shlibpath_var=LD_LIBRARY_PATH
1963 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1964 soname_spec='${libname}${release}${shared_ext}$major'
1965 shlibpath_var=LD_LIBRARY_PATH
1966 shlibpath_overrides_runpath=yes
1967 hardcode_into_libs=yes
1968 # ldd complains unless libraries are executable
1969 postinstall_cmds='chmod +x $lib'
1974 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1975 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1976 shlibpath_var=LD_LIBRARY_PATH
1977 shlibpath_overrides_runpath=yes
1978 if test "$with_gnu_ld" = yes; then
1984 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1986 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1987 soname_spec='${libname}${release}${shared_ext}$major'
1988 shlibpath_var=LD_LIBRARY_PATH
1989 case $host_vendor in
1991 shlibpath_overrides_runpath=no
1993 runpath_var=LD_RUN_PATH
2001 shlibpath_overrides_runpath=no
2002 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2008 if test -d /usr/nec ;then
2010 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2011 soname_spec='$libname${shared_ext}.$major'
2012 shlibpath_var=LD_LIBRARY_PATH
2018 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2019 soname_spec='${libname}${release}${shared_ext}$major'
2020 shlibpath_var=LD_LIBRARY_PATH
2027 AC_MSG_RESULT([$dynamic_linker])
2028 test "$dynamic_linker" = no && can_build_shared=no
2029 _LT_DECL([], [need_lib_prefix], [0],
2030 [Do we need the "lib" prefix for modules?])
2031 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
2032 _LT_DECL([], [version_type], [0], [Library versioning type])
2033 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
2034 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
2035 _LT_DECL([], [shlibpath_overrides_runpath], [0],
2036 [Is shibpath searched before the hard-coded library search path?])
2037 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
2038 _LT_DECL([], [library_names_spec], [1],
2039 [List of archive names. First name is the real one, the rest are links.
2040 The last name is the one that the linker finds with -lNAME])
2041 _LT_DECL([], [soname_spec], [1],
2042 [The coded name of the library, if different from the real name])
2043 _LT_DECL([], [postinstall_cmds], [2],
2044 [Command to use after installation of a shared archive])
2045 _LT_DECL([], [postuninstall_cmds], [2],
2046 [Command to use after uninstallation of a shared archive])
2047 _LT_DECL([], [finish_cmds], [2],
2048 [Commands used to finish a libtool library installation in a directory])
2049 _LT_DECL([], [finish_eval], [1],
2050 [As "finish_cmds", except a single script fragment to be evaled but
2052 _LT_DECL([], [hardcode_into_libs], [0],
2053 [Whether we should hardcode library paths into libraries])
2054 _LT_DECL([], [sys_lib_search_path_spec], [2],
2055 [Compile-time system search path for libraries])
2056 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2057 [Run-time system search path for libraries])
2058 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2064 AC_DEFUN([AC_LIBTOOL_TAGS],
2065 [m4_define([_LT_TAGS],[$1])
2066 ]) # AC_LIBTOOL_TAGS
2070 m4_define([_LT_AC_TAG_CHECK],
2071 [m4_ifdef([_LT_TAG_]$1,
2072 [m4_errprintn(m4_location[: error: duplicate tag: ]"$1")
2074 [m4_define([_LT_TAG_]$1, [])])
2075 ]) # _LT_AC_TAG_CHECK
2079 m4_define([_LT_AC_TAG_CONFIG],
2080 [AC_PROVIDE_IFELSE([AC_LIBTOOL_TAGS], [], [
2081 AC_LIBTOOL_TAGS([CXX F77 GCJ RC])])dnl
2083 AC_FOREACH([_LT_TAG], _LT_TAGS,
2085 [CXX], [_LT_AC_TAG_CHECK([CXX])
2086 if test -n "$CXX" && test "X$CXX" != "Xno"; then
2087 AC_LIBTOOL_LANG_CXX_CONFIG
2088 available_tags="$available_tags _LT_TAG"
2090 [F77], [_LT_AC_TAG_CHECK(_LT_TAG)
2091 if test -n "$F77" && test "X$F77" != "Xno"; then
2092 AC_LIBTOOL_LANG_F77_CONFIG
2093 available_tags="$available_tags _LT_TAG"
2095 [GCJ], [_LT_AC_TAG_CHECK(_LT_TAG)
2096 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2097 AC_LIBTOOL_LANG_GCJ_CONFIG
2098 available_tags="$available_tags _LT_TAG"
2100 [RC], [_LT_AC_TAG_CHECK(_LT_TAG)
2101 if test -n "$RC" && test "X$RC" != "Xno"; then
2102 AC_LIBTOOL_LANG_RC_CONFIG
2103 available_tags="$available_tags _LT_TAG"
2105 [m4_errprintn(m4_location[: error: invalid tag name: ]"_LT_TAG")
2109 _LT_CONFIG_SAVE_COMMANDS([
2111 if test -f "$ltmain"; then
2112 if test ! -f "${ofile}"; then
2113 AC_MSG_ERROR([output file `$ofile' does not exist])
2115 if test -z "$LTCC"; then
2116 eval "`$SHELL ${ofile} --config | $GREP '^LTCC='`"
2117 if test -z "$LTCC"; then
2118 AC_MSG_ERROR([output file `$ofile' does not look like a libtool script])
2120 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2124 # Now substitute the updated list of available tags.
2125 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2126 mv "${ofile}T" "$ofile"
2130 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2135 available_tags='$available_tags'
2137 ])# _LT_AC_TAG_CONFIG
2142 # enable checks for dlopen support
2143 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2144 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2145 ])# AC_LIBTOOL_DLOPEN
2148 # AC_LIBTOOL_WIN32_DLL
2149 # --------------------
2150 # declare package support for building win32 dll's
2151 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2152 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2153 test -z "$AS" && AS=as
2154 test -z "$DLLTOOL" && DLLTOOL=dlltool
2155 test -z "$OBJDUMP" && OBJDUMP=objdump
2158 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
2159 AC_CHECK_TOOL(AS, as, false)
2160 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
2161 AC_CHECK_TOOL(OBJDUMP, objdump, false)
2165 _LT_DECL([], [AS], [0], [Assembler program])dnl
2166 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
2167 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
2168 ])# AC_LIBTOOL_WIN32_DLL
2171 # AC_ENABLE_SHARED([DEFAULT])
2172 # ---------------------------
2173 # implement the --enable-shared flag
2174 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2175 AC_DEFUN([AC_ENABLE_SHARED],
2176 [m4_define([AC_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
2177 AC_ARG_ENABLE([shared],
2178 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2179 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2180 [p=${PACKAGE-default}
2182 yes) enable_shared=yes ;;
2183 no) enable_shared=no ;;
2186 # Look at the argument we got. We use all the common list separators.
2187 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2188 for pkg in $enableval; do
2190 if test "X$pkg" = "X$p"; then
2197 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2199 _LT_DECL([build_libtool_libs], [enable_shared], [0],
2200 [Whether or not to build shared libraries])
2201 ])# AC_ENABLE_SHARED
2206 #- set the default shared flag to --disable-shared
2207 AC_DEFUN([AC_DISABLE_SHARED],
2208 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2209 AC_ENABLE_SHARED(no)
2210 ])# AC_DISABLE_SHARED
2213 # AC_ENABLE_STATIC([DEFAULT])
2214 # ---------------------------
2215 # implement the --enable-static flag
2216 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2217 AC_DEFUN([AC_ENABLE_STATIC],
2218 [m4_define([AC_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
2219 AC_ARG_ENABLE([static],
2220 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2221 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2222 [p=${PACKAGE-default}
2224 yes) enable_static=yes ;;
2225 no) enable_static=no ;;
2228 # Look at the argument we got. We use all the common list separators.
2229 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2230 for pkg in $enableval; do
2232 if test "X$pkg" = "X$p"; then
2239 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2241 _LT_DECL([build_old_libs], [enable_static], [0],
2242 [Whether or not to build static libraries])
2243 ])# AC_ENABLE_STATIC
2248 # set the default static flag to --disable-static
2249 AC_DEFUN([AC_DISABLE_STATIC],
2250 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2251 AC_ENABLE_STATIC(no)
2252 ])# AC_DISABLE_STATIC
2255 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2256 # ---------------------------------
2257 # implement the --enable-fast-install flag
2258 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2259 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2260 [m4_define([AC_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
2261 AC_ARG_ENABLE([fast-install],
2262 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2263 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2264 [p=${PACKAGE-default}
2266 yes) enable_fast_install=yes ;;
2267 no) enable_fast_install=no ;;
2269 enable_fast_install=no
2270 # Look at the argument we got. We use all the common list separators.
2271 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2272 for pkg in $enableval; do
2274 if test "X$pkg" = "X$p"; then
2275 enable_fast_install=yes
2281 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2283 _LT_DECL([fast_install], [enable_fast_install], [0],
2284 [Whether or not to optimize for fast installation])
2285 ])# AC_ENABLE_FAST_INSTALL
2288 # AC_DISABLE_FAST_INSTALL
2289 # -----------------------
2290 # set the default to --disable-fast-install
2291 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2292 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2293 AC_ENABLE_FAST_INSTALL(no)
2294 ])# AC_DISABLE_FAST_INSTALL
2297 # AC_LIBTOOL_PICMODE([MODE])
2298 # --------------------------
2299 # implement the --with-pic flag
2300 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2301 AC_DEFUN([AC_LIBTOOL_PICMODE],
2302 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2303 pic_mode=m4_if($#, 1, $1, default)
2304 ])# AC_LIBTOOL_PICMODE
2307 # AC_PATH_TOOL_PREFIX
2308 # -------------------
2309 # find a file program which can recognise shared library
2310 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2311 [AC_REQUIRE([LT_AC_PROG_EGREP])dnl
2312 AC_MSG_CHECKING([for $1])
2313 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2315 [[\\/*] | ?:[\\/]*])
2316 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2319 lt_save_MAGIC_CMD="$MAGIC_CMD"
2320 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2321 dnl $ac_dummy forces splitting on constant user-supplied paths.
2322 dnl POSIX.2 word splitting is done only on the output of word expansions,
2323 dnl not every word. This closes a longstanding sh security hole.
2324 ac_dummy="m4_if([$2], , $PATH, [$2])"
2325 for ac_dir in $ac_dummy; do
2327 test -z "$ac_dir" && ac_dir=.
2328 if test -f $ac_dir/$1; then
2329 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2330 if test -n "$file_magic_test_file"; then
2331 case $deplibs_check_method in
2333 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2334 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2335 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2336 $EGREP "$file_magic_regex" > /dev/null; then
2341 *** Warning: the command libtool uses to detect shared libraries,
2342 *** $file_magic_cmd, produces output that libtool cannot recognize.
2343 *** The result is that libtool may fail to recognize shared libraries
2344 *** as such. This will affect the creation of libtool libraries that
2345 *** depend on shared libraries, but programs linked with such libtool
2346 *** libraries will work regardless of this problem. Nevertheless, you
2347 *** may want to report the problem to your system manager and/or to
2348 *** bug-libtool@gnu.org
2358 MAGIC_CMD="$lt_save_MAGIC_CMD"
2361 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2362 if test -n "$MAGIC_CMD"; then
2363 AC_MSG_RESULT($MAGIC_CMD)
2367 _LT_DECL([], [MAGIC_CMD], [0],
2368 [Used to examine libraries when file_magic_cmd begins "file"])dnl
2369 ])# AC_PATH_TOOL_PREFIX
2374 # find a file program which can recognise a shared library
2375 AC_DEFUN([AC_PATH_MAGIC],
2376 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2377 if test -z "$lt_cv_path_MAGIC_CMD"; then
2378 if test -n "$ac_tool_prefix"; then
2379 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2389 # find the pathname to the GNU or non-GNU linker
2390 AC_DEFUN([AC_PROG_LD],
2391 [AC_ARG_WITH([gnu-ld],
2392 [AC_HELP_STRING([--with-gnu-ld],
2393 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2394 [test "$withval" = no || with_gnu_ld=yes],
2396 AC_REQUIRE([LT_AC_PROG_SED])dnl
2397 AC_REQUIRE([LT_AC_PROG_EGREP])dnl
2398 AC_REQUIRE([AC_PROG_CC])dnl
2399 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2400 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2403 if test "$GCC" = yes; then
2404 # Check if gcc -print-prog-name=ld gives a path.
2405 AC_MSG_CHECKING([for ld used by $CC])
2408 # gcc leaves a trailing carriage return which upsets mingw
2409 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2411 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2414 # Accept absolute paths.
2415 [[\\/]]* | ?:[[\\/]]*)
2416 re_direlt='/[[^/]][[^/]]*/\.\./'
2417 # Canonicalize the pathname of ld
2418 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2419 while echo $ac_prog | $GREP "$re_direlt" > /dev/null 2>&1; do
2420 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2422 test -z "$LD" && LD="$ac_prog"
2425 # If it fails, then pretend we aren't using GCC.
2429 # If it is relative, then search for the first ld in PATH.
2433 elif test "$with_gnu_ld" = yes; then
2434 AC_MSG_CHECKING([for GNU ld])
2436 AC_MSG_CHECKING([for non-GNU ld])
2438 AC_CACHE_VAL(lt_cv_path_LD,
2439 [if test -z "$LD"; then
2440 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2441 for ac_dir in $PATH; do
2443 test -z "$ac_dir" && ac_dir=.
2444 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2445 lt_cv_path_LD="$ac_dir/$ac_prog"
2446 # Check to see if the program is GNU ld. I'd rather use --version,
2447 # but apparently some GNU ld's only accept -v.
2448 # Break only if it was the GNU/non-GNU ld that we prefer.
2449 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2450 *GNU* | *'with BFD'*)
2451 test "$with_gnu_ld" != no && break
2454 test "$with_gnu_ld" != yes && break
2461 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2464 if test -n "$LD"; then
2469 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2473 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
2479 AC_DEFUN([AC_PROG_LD_GNU],
2480 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2481 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2482 case `$LD -v 2>&1 </dev/null` in
2483 *GNU* | *'with BFD'*)
2484 lt_cv_prog_gnu_ld=yes
2487 lt_cv_prog_gnu_ld=no
2490 with_gnu_ld=$lt_cv_prog_gnu_ld
2494 # AC_PROG_LD_RELOAD_FLAG
2495 # ----------------------
2496 # find reload flag for linker
2497 # -- PORTME Some linkers may need a different reload flag.
2498 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2499 [AC_CACHE_CHECK([for $LD option to reload object files],
2500 lt_cv_ld_reload_flag,
2501 [lt_cv_ld_reload_flag='-r'])
2502 reload_flag=$lt_cv_ld_reload_flag
2503 case $reload_flag in
2505 *) reload_flag=" $reload_flag" ;;
2507 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2510 reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
2512 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
2513 _LT_DECL([], [reload_cmds], [2])dnl
2514 ])# AC_PROG_LD_RELOAD_FLAG
2517 # AC_DEPLIBS_CHECK_METHOD
2518 # -----------------------
2519 # how to check for library dependencies
2520 # -- PORTME fill in with the dynamic library characteristics
2521 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2522 [AC_REQUIRE([LT_AC_PROG_EGREP])
2523 AC_CACHE_CHECK([how to recognise dependent libraries],
2524 lt_cv_deplibs_check_method,
2525 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2526 lt_cv_file_magic_test_file=
2527 lt_cv_deplibs_check_method='unknown'
2528 # Need to set the preceding variable on all platforms that support
2529 # interlibrary dependencies.
2530 # 'none' -- dependencies not supported.
2531 # `unknown' -- same as none, but documents that we really don't know.
2532 # 'pass_all' -- all dependencies passed with no checks.
2533 # 'test_compile' -- check by making test program.
2534 # 'file_magic [[regex]]' -- check by looking for files in library path
2535 # which responds to the $file_magic_cmd with a given extended regex.
2536 # If you have `file' or equivalent on your system and you're not sure
2537 # whether `pass_all' will *always* work, you probably want this one.
2541 lt_cv_deplibs_check_method=pass_all
2545 lt_cv_deplibs_check_method=pass_all
2549 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2550 lt_cv_file_magic_cmd='/usr/bin/file -L'
2551 lt_cv_file_magic_test_file=/shlib/libc.so
2555 # func_win32_libid is a shell function defined in ltmain.sh
2556 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2557 lt_cv_file_magic_cmd='func_win32_libid'
2560 # Base MSYS/MinGW do not provide the 'file' command needed by
2561 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2563 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2564 lt_cv_file_magic_cmd='$OBJDUMP -f'
2567 darwin* | rhapsody*)
2568 lt_cv_deplibs_check_method=pass_all
2571 freebsd* | kfreebsd*-gnu)
2572 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
2575 # Not sure whether the presence of OpenBSD here was a mistake.
2576 # Let's accept both of them until this is cleared up.
2577 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2578 lt_cv_file_magic_cmd=/usr/bin/file
2579 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2583 lt_cv_deplibs_check_method=pass_all
2588 lt_cv_deplibs_check_method=pass_all
2591 hpux10.20* | hpux11*)
2592 lt_cv_file_magic_cmd=/usr/bin/file
2595 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2596 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2599 [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]']
2600 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2603 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2604 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2609 irix5* | irix6* | nonstopux*)
2611 *-32|*"-32 ") libmagic=32-bit;;
2612 *-n32|*"-n32 ") libmagic=N32;;
2613 *-64|*"-64 ") libmagic=64-bit;;
2614 *) libmagic=never-match;;
2616 lt_cv_deplibs_check_method=pass_all
2619 # This must be Linux ELF.
2622 alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*)
2623 lt_cv_deplibs_check_method=pass_all ;;
2625 # glibc up to 2.1.1 does not perform some relocations on ARM
2626 # this will be overridden with pass_all, but let us keep it just in case
2627 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
2629 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2630 lt_cv_deplibs_check_method=pass_all
2633 netbsd* | knetbsd*-gnu)
2634 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
2635 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2637 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2642 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2643 lt_cv_file_magic_cmd=/usr/bin/file
2644 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2648 lt_cv_deplibs_check_method=unknown
2652 lt_cv_file_magic_cmd=/usr/bin/file
2653 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2654 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2655 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
2657 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
2661 osf3* | osf4* | osf5*)
2662 lt_cv_deplibs_check_method=pass_all
2666 lt_cv_deplibs_check_method=pass_all
2670 lt_cv_deplibs_check_method=pass_all
2673 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2674 case $host_vendor in
2676 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]]'
2677 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2680 lt_cv_deplibs_check_method=pass_all
2683 lt_cv_file_magic_cmd='/bin/file'
2684 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2687 lt_cv_file_magic_cmd='/bin/file'
2688 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2689 lt_cv_file_magic_test_file=/lib/libc.so
2692 lt_cv_deplibs_check_method=pass_all
2697 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2698 lt_cv_deplibs_check_method=pass_all
2702 file_magic_cmd=$lt_cv_file_magic_cmd
2703 deplibs_check_method=$lt_cv_deplibs_check_method
2704 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2706 _LT_DECL([], [deplibs_check_method], [1],
2707 [Method to check whether dependent libraries are shared objects])
2708 _LT_DECL([], [file_magic_cmd], [1],
2709 [Command to use when deplibs_check_method == "file_magic"])
2710 ])# AC_DEPLIBS_CHECK_METHOD
2715 # find the pathname to a BSD-compatible name lister
2716 AC_DEFUN([AC_PROG_NM],
2717 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2718 [if test -n "$NM"; then
2719 # Let the user override the test.
2722 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2723 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2725 test -z "$ac_dir" && ac_dir=.
2726 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2727 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2728 # Check to see if the nm accepts a BSD-compat flag.
2729 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2730 # nm: unknown option "B" ignored
2731 # Tru64's nm complains that /dev/null is an invalid object file
2732 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2733 */dev/null* | *'Invalid file or object type'*)
2734 lt_cv_path_NM="$tmp_nm -B"
2738 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2740 lt_cv_path_NM="$tmp_nm -p"
2744 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2745 continue # so that we can try to find one that supports BSD flags
2752 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2755 test -z "$NM" && NM=nm
2757 _LT_DECL([], [NM], [1], [A BSD-compatible nm program])dnl
2763 # check for math library
2764 AC_DEFUN([AC_CHECK_LIBM],
2765 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2768 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2769 # These system don't have libm, or don't need it
2772 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2773 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2776 AC_CHECK_LIB(m, cos, LIBM="-lm")
2782 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2783 # -----------------------------------
2784 # sets LIBLTDL to the link flags for the libltdl convenience library and
2785 # LTDLINCL to the include flags for the libltdl header and adds
2786 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
2787 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2788 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2789 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2790 # '${top_srcdir}/' (note the single quotes!). If your package is not
2791 # flat and you're not using automake, define top_builddir and
2792 # top_srcdir appropriately in the Makefiles.
2793 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2794 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2795 case $enable_ltdl_convenience in
2796 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2797 "") enable_ltdl_convenience=yes
2798 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2800 LIBLTDL='${top_builddir}/'m4_if($#, 1,[$1], ['libltdl'])/libltdlc.la
2801 LTDLINCL='-I${top_srcdir}/'m4_if($#, 1, [$1], ['libltdl'])
2802 # For backwards non-gettext consistent compatibility...
2804 ])# AC_LIBLTDL_CONVENIENCE
2807 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2808 # -----------------------------------
2809 # sets LIBLTDL to the link flags for the libltdl installable library and
2810 # LTDLINCL to the include flags for the libltdl header and adds
2811 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
2812 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2813 # DIRECTORY is not provided and an installed libltdl is not found, it is
2814 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2815 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2816 # quotes!). If your package is not flat and you're not using automake,
2817 # define top_builddir and top_srcdir appropriately in the Makefiles.
2818 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2819 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2820 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2821 AC_CHECK_LIB(ltdl, lt_dlinit,
2822 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2823 [if test x"$enable_ltdl_install" = xno; then
2824 AC_MSG_WARN([libltdl not installed, but installation disabled])
2826 enable_ltdl_install=yes
2829 if test x"$enable_ltdl_install" = x"yes"; then
2830 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2831 LIBLTDL='${top_builddir}/'m4_if($#, 1, [$1], ['libltdl'])/libltdl.la
2832 LTDLINCL='-I${top_srcdir}/'m4_if($#, 1, [$1], ['libltdl'])
2834 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2838 # For backwards non-gettext consistent compatibility...
2840 ])# AC_LIBLTDL_INSTALLABLE
2843 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
2844 # -------------------------------------------
2845 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
2846 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2848 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2850 if test "$GCC" = yes; then
2851 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2853 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
2854 lt_cv_prog_compiler_rtti_exceptions,
2855 [-fno-rtti -fno-exceptions], [],
2856 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
2858 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
2859 [Compiler flag to turn off builtin functions])
2860 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
2863 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
2864 # ---------------------------------
2865 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
2866 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2867 AC_REQUIRE([LT_AC_PROG_EGREP])dnl
2868 AC_REQUIRE([AC_PROG_CC])dnl
2869 AC_REQUIRE([AC_PROG_LD])dnl
2870 AC_REQUIRE([AC_PROG_NM])dnl
2871 AC_REQUIRE([AC_OBJEXT])dnl
2872 # Check for command to grab the raw symbol name followed by C symbol from nm.
2873 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
2874 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
2876 # These are sane defaults that work on at least a few old systems.
2877 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
2879 # Character class describing NM global symbol codes.
2880 symcode='[[BCDEGRST]]'
2882 # Regexp to match symbols that can be accessed directly from C.
2883 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
2885 # Transform the above into a raw symbol and a C symbol.
2886 symxfrm='\1 \2\3 \3'
2888 # Transform an extracted symbol line into a proper C declaration
2889 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
2891 # Transform an extracted symbol line into symbol name and symbol address
2892 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
2894 # Define system-specific variables.
2899 cygwin* | mingw* | pw32*)
2900 symcode='[[ABCDGISTW]]'
2902 hpux*) # Its linker distinguishes data from code symbols
2903 if test "$host_cpu" = ia64; then
2904 symcode='[[ABCDEGRST]]'
2906 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
2907 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
2910 symcode='[[BCDEGRST]]'
2913 symcode='[[BCDEGQRST]]'
2919 symcode='[[DFNSTU]]'
2923 # Handle CRLF in mingw tool chain
2927 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
2931 # If we're using GNU nm, then use its standard symbol codes.
2932 case `$NM -V 2>&1` in
2933 *GNU* | *'with BFD'*)
2934 symcode='[[ABCDGIRSTW]]' ;;
2937 # Try without a prefix undercore, then with it.
2938 for ac_symprfx in "" "_"; do
2940 # Write the raw and C identifiers.
2941 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
2943 # Check to see that the pipe works correctly.
2947 cat > conftest.$ac_ext <<_LT_EOF
2952 void nm_test_func(){}
2956 int main(){nm_test_var='a';nm_test_func();return(0);}
2959 if AC_TRY_EVAL(ac_compile); then
2960 # Now try to grab the symbols.
2962 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
2963 # Try sorting and uniquifying the output.
2964 if sort "$nlist" | uniq > "$nlist"T; then
2965 mv -f "$nlist"T "$nlist"
2970 # Make sure that we snagged all the symbols we need.
2971 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
2972 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
2973 cat <<_LT_EOF > conftest.$ac_ext
2979 # Now generate the symbol file.
2980 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
2982 cat <<_LT_EOF >> conftest.$ac_ext
2983 #if defined (__STDC__) && __STDC__
2984 # define lt_ptr_t void *
2986 # define lt_ptr_t char *
2990 /* The mapping between symbol names and symbols. */
2995 lt_preloaded_symbols[[]] =
2998 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
2999 cat <<\_LT_EOF >> conftest.$ac_ext
3007 # Now try linking the two files.
3008 mv conftest.$ac_objext conftstm.$ac_objext
3009 lt_save_LIBS="$LIBS"
3010 lt_save_CFLAGS="$CFLAGS"
3011 LIBS="conftstm.$ac_objext"
3012 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3013 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
3016 LIBS="$lt_save_LIBS"
3017 CFLAGS="$lt_save_CFLAGS"
3019 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
3022 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
3025 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
3028 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
3029 cat conftest.$ac_ext >&5
3031 rm -f conftest* conftst*
3033 # Do not use the global_symbol_pipe unless it works.
3034 if test "$pipe_works" = yes; then
3037 lt_cv_sys_global_symbol_pipe=
3041 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3042 lt_cv_sys_global_symbol_to_cdecl=
3044 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
3045 AC_MSG_RESULT(failed)
3050 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
3051 [Take the output of nm and produce a listing of raw symbols and C names])
3052 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
3053 [Transform the output of nm in a proper C declaration])
3054 _LT_DECL([global_symbol_to_c_name_address],
3055 [lt_cv_sys_global_symbol_to_c_name_address], [1],
3056 [Transform the output of nm in a C name address pair])
3057 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
3060 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
3061 # ---------------------------------------
3062 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
3063 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
3064 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3065 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
3067 AC_MSG_CHECKING([for $compiler option to produce PIC])
3068 m4_if([$1], [CXX], [
3069 # C++ specific cases for pic, static, wl, etc.
3070 if test "$GXX" = yes; then
3071 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3072 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3076 # All AIX code is PIC.
3077 if test "$host_cpu" = ia64; then
3078 # AIX 5 now supports IA64 processor
3079 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3083 if test "$host_cpu" = m68k; then
3084 # FIXME: we need at least 68020 code to build shared libraries, but
3085 # adding the `-m68020' flag to GCC prevents building anything better,
3087 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3090 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3091 # PIC is the default for these OSes.
3093 mingw* | os2* | pw32*)
3094 # This hack is so that the source file can tell whether it is being
3095 # built for inclusion in a dll (and should export symbols for example).
3096 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3098 darwin* | rhapsody*)
3099 # PIC is the default on this platform
3100 # Common symbols not allowed in MH_DYLIB files
3101 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3104 # DJGPP does not support shared libraries at all
3105 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3108 if test -d /usr/nec; then
3109 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3113 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3119 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3124 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3130 # All AIX code is PIC.
3131 if test "$host_cpu" = ia64; then
3132 # AIX 5 now supports IA64 processor
3133 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3135 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3139 case $cc_basename in
3141 # Green Hills C++ Compiler
3142 # _LT_AC_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"
3147 case $cc_basename in
3149 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3152 # Green Hills C++ Compiler
3153 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3159 freebsd* | kfreebsd*-gnu)
3160 # FreeBSD uses GNU C++
3162 hpux9* | hpux10* | hpux11*)
3163 case $cc_basename in
3165 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3166 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
3167 if test "$host_cpu" != ia64; then
3168 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3172 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3173 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
3179 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3187 irix5* | irix6* | nonstopux*)
3188 case $cc_basename in
3190 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3191 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3192 # CC pic flag -KPIC is the default.
3199 case $cc_basename in
3202 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3203 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3207 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3208 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3209 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3213 # Make sure the PIC flag is empty. It appears that all Alpha
3214 # Linux and Compaq Tru64 Unix objects are PIC.
3215 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3216 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3227 case $cc_basename in
3229 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
3237 osf3* | osf4* | osf5*)
3238 case $cc_basename in
3240 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
3243 # Rational C++ 2.4.1
3244 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3247 # Digital/Compaq C++
3248 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3249 # Make sure the PIC flag is empty. It appears that all Alpha
3250 # Linux and Compaq Tru64 Unix objects are PIC.
3251 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3252 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3261 case $cc_basename in
3263 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3270 case $cc_basename in
3272 # Sun C++ 4.2, 5.x and Centerline C++
3273 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3274 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3275 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3278 # Green Hills C++ Compiler
3279 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3286 case $cc_basename in
3289 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3290 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3294 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3301 case $cc_basename in
3303 # NonStop-UX NCC 3.20
3304 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3315 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3321 if test "$GCC" = yes; then
3322 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3323 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3327 # All AIX code is PIC.
3328 if test "$host_cpu" = ia64; then
3329 # AIX 5 now supports IA64 processor
3330 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3335 if test "$host_cpu" = m68k; then
3336 # FIXME: we need at least 68020 code to build shared libraries, but
3337 # adding the `-m68020' flag to GCC prevents building anything better,
3339 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
3343 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
3344 # PIC is the default for these OSes.
3347 mingw* | pw32* | os2*)
3348 # This hack is so that the source file can tell whether it is being
3349 # built for inclusion in a dll (and should export symbols for example).
3350 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3353 darwin* | rhapsody*)
3354 # PIC is the default on this platform
3355 # Common symbols not allowed in MH_DYLIB files
3356 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
3360 # Just because we use GCC doesn't mean we suddenly get shared libraries
3361 # on systems that don't support them.
3362 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3367 if test -d /usr/nec; then
3368 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
3373 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3380 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3386 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
3390 # PORTME Check for flag to pass linker flags through the system compiler.
3393 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3394 if test "$host_cpu" = ia64; then
3395 # AIX 5 now supports IA64 processor
3396 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3398 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
3402 mingw* | pw32* | os2*)
3403 # This hack is so that the source file can tell whether it is being
3404 # built for inclusion in a dll (and should export symbols for example).
3405 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
3408 hpux9* | hpux10* | hpux11*)
3409 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3410 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
3417 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
3420 # Is there a better lt_prog_compiler_static that works with the bundled CC?
3421 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
3424 irix5* | irix6* | nonstopux*)
3425 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3426 # PIC (with -KPIC) is the default.
3427 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3431 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3432 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3438 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3439 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3440 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
3443 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3444 # All Alpha code is PIC.
3445 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3450 osf3* | osf4* | osf5*)
3451 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3452 # All OSF/1 code is PIC.
3453 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
3457 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
3458 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
3462 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3463 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3464 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3468 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
3469 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
3470 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3473 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3474 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
3475 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
3476 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3480 if test -d /usr/nec ;then
3481 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
3482 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3487 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
3488 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
3492 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
3498 # For platforms which do not support PIC, -DPIC is meaningless:
3500 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3503 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
3506 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
3507 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
3508 [How to pass a linker flag through the compiler])
3511 # Check to make sure the PIC flag actually works.
3513 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
3514 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
3515 [_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1)],
3516 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
3517 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
3519 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
3521 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
3522 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
3524 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
3525 [Additional compiler flags for building library objects])
3528 # Check to make sure the static flag actually works.
3530 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3531 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3532 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3534 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3535 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
3536 [Compiler flag to prevent dynamic linking])
3537 ])# AC_LIBTOOL_PROG_COMPILER_PIC
3540 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
3541 # ------------------------------------
3542 # See if the linker supports building shared libraries.
3543 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
3544 [AC_REQUIRE([LT_AC_PROG_EGREP])dnl
3545 AC_REQUIRE([AC_PROG_LD])dnl
3546 AC_REQUIRE([AC_PROG_NM])dnl
3547 AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
3548 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3549 m4_if([$1], [CXX], [
3550 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3553 # If we're using GNU nm, then we don't want the "-C" option.
3554 # -C means demangle to AIX nm, but means don't demangle with GNU nm
3555 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
3556 _LT_AC_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'
3558 _LT_AC_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'
3562 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
3565 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
3568 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3573 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3574 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3575 _LT_AC_TAGVAR(archive_cmds, $1)=
3576 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3577 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3578 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3579 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
3580 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3581 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3582 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3583 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3584 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3585 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3586 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3587 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3588 _LT_AC_TAGVAR(module_cmds, $1)=
3589 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3590 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1)=
3591 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
3592 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
3593 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3594 # include_expsyms should be a list of space-separated symbols to be *always*
3595 # included in the symbol list
3596 _LT_AC_TAGVAR(include_expsyms, $1)=
3597 # exclude_expsyms can be an extended regexp of symbols to exclude
3598 # it will be wrapped by ` (' and `)$', so one must not match beginning or
3599 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
3600 # as well as any symbol that contains `d'.
3601 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
3602 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
3603 # platforms (ab)use it in PIC code, but their linkers get confused if
3604 # the symbol is explicitly referenced. Since portable code cannot
3605 # rely on this symbol name, it's probably fine to never include it in
3606 # preloaded symbol tables.
3607 extract_expsyms_cmds=
3610 cygwin* | mingw* | pw32*)
3611 # FIXME: the MSVC++ port hasn't been tested in a loooong time
3612 # When not using gcc, we currently assume that we are using
3613 # Microsoft Visual C++.
3614 if test "$GCC" != yes; then
3623 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3624 if test "$with_gnu_ld" = yes; then
3625 # If archive_cmds runs LD, not CC, wlarc should be empty
3628 # See if GNU ld supports shared libraries.
3630 aix3* | aix4* | aix5*)
3631 # On AIX/PPC, the GNU linker is very broken
3632 if test "$host_cpu" != ia64; then
3633 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3636 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
3637 *** to be unable to reliably create shared libraries on AIX.
3638 *** Therefore, libtool is disabling shared libraries support. If you
3639 *** really care for shared libraries, you may want to modify your PATH
3640 *** so that a non-GNU linker is found, and then restart.
3647 if test "$host_cpu" = m68k; then
3648 _LT_AC_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)'
3649 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3650 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3653 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
3654 # that the semantics of dynamic libraries on AmigaOS, at least up
3655 # to version 4, is to share data among multiple programs linked
3656 # with the same dynamic library. Since this doesn't match the
3657 # behavior of shared libraries on other platforms, we can't use
3659 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3663 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
3664 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3665 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3666 # support --undefined. This deserves some investigation. FIXME
3667 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3669 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3673 cygwin* | mingw* | pw32*)
3674 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3675 # as there is no search path for DLLs.
3676 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3677 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3678 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3679 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3680 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
3682 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
3683 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3684 # If the export-symbols file already is a .def file (1st line
3685 # is EXPORTS), use it as is; otherwise, prepend...
3686 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3687 cp $export_symbols $output_objdir/$soname.def;
3689 echo EXPORTS > $output_objdir/$soname.def;
3690 cat $export_symbols >> $output_objdir/$soname.def;
3692 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3699 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3700 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
3703 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3704 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3709 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
3710 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3713 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
3714 *** create shared libraries on Solaris systems. Therefore, libtool
3715 *** is disabling shared libraries support. We urge you to upgrade GNU
3716 *** binutils to release 2.9.1 or newer. Another option is to modify
3717 *** your PATH or compiler configuration so that the native linker is
3718 *** used, and then restart.
3721 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
3722 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3723 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3725 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3730 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
3732 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3733 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3737 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null; then
3738 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3739 case `$LD -v 2>&1` in
3740 *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
3741 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
3742 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
3743 *\ 2.11.*) ;; # other 2.11 versions
3744 *) supports_anon_versioning=yes ;;
3746 if test "x$supports_anon_versioning" = xyes; then
3747 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~$echo "local: *; };" >> $output_objdir/$libname.ver~$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
3749 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=$_LT_AC_TAGVAR(archive_cmds, $1)
3752 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3757 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
3758 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3759 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3761 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3766 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
3767 runpath_var=LD_RUN_PATH
3768 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3769 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3770 # ancient GNU ld didn't support --whole-archive et. al.
3771 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
3772 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3774 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3778 # PORTME fill in a description of your system's linker (not GNU ld)
3781 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3782 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3783 _LT_AC_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'
3784 # Note: this linker hardcodes the directories in LIBPATH if there
3785 # are no directories specified by -L.
3786 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3787 if test "$GCC" = yes && test -z "$link_static_flag"; then
3788 # Neither direct hardcoding nor static linking is supported with a
3790 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3795 if test "$host_cpu" = ia64; then
3796 # On IA64, the linker does run time linking by default, so we don't
3797 # have to do anything special.
3798 aix_use_runtimelinking=no
3799 exp_sym_flag='-Bexport'
3802 # If we're using GNU nm, then we don't want the "-C" option.
3803 # -C means demangle to AIX nm, but means don't demangle with GNU nm
3804 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
3805 _LT_AC_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'
3807 _LT_AC_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'
3809 aix_use_runtimelinking=no
3811 # Test if we are trying to use run time linking or normal
3812 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3813 # need to do runtime linking.
3814 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3815 for ld_flag in $LDFLAGS; do
3816 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
3817 aix_use_runtimelinking=yes
3823 exp_sym_flag='-bexport'
3824 no_entry_flag='-bnoentry'
3827 # When large executables or shared objects are built, AIX ld can
3828 # have problems creating the table of contents. If linking a library
3829 # or program results in "error TOC overflow" add -mminimal-toc to
3830 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3831 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3833 _LT_AC_TAGVAR(archive_cmds, $1)=''
3834 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3835 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3836 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3838 if test "$GCC" = yes; then
3839 case $host_os in aix4.[012]|aix4.[012].*)
3840 # We only want to do this on AIX 4.2 and lower, the check
3841 # below for broken collect2 doesn't work under 4.3+
3842 collect2name=`${CC} -print-prog-name=collect2`
3843 if test -f "$collect2name" &&
3844 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
3846 # We have reworked collect2
3847 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3849 # We have old collect2
3850 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3851 # It fails to find uninstalled libraries when the uninstalled
3852 # path is not listed in the libpath. Setting hardcode_minus_L
3853 # to unsupported forces relinking
3854 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3855 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3856 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3859 shared_flag='-shared'
3862 if test "$host_cpu" = ia64; then
3863 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3864 # chokes on -Wl,-G. The following line is correct:
3867 if test "$aix_use_runtimelinking" = yes; then
3868 shared_flag='${wl}-G'
3870 shared_flag='${wl}-bM:SRE'
3875 # It seems that -bexpall does not export symbols beginning with
3876 # underscore (_), so it is better to generate a list of symbols to export.
3877 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3878 if test "$aix_use_runtimelinking" = yes; then
3879 # Warning - without using the other runtime loading flags (-brtl),
3880 # -berok will link without error, but may produce a broken library.
3881 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3882 # Determine the default libpath from the value encoded in an
3884 _LT_AC_SYS_LIBPATH_AIX
3885 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3886 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3888 if test "$host_cpu" = ia64; then
3889 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3890 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3891 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3893 # Determine the default libpath from the value encoded in an
3895 _LT_AC_SYS_LIBPATH_AIX
3896 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3897 # Warning - without using the other run time loading flags,
3898 # -berok will link without error, but may produce a broken library.
3899 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3900 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3901 # -bexpall does not export symbols beginning with underscore (_)
3902 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3903 # Exported symbols can be pulled into shared objects from archives
3904 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3905 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3906 # This is similar to how AIX traditionally builds it's shared libraries.
3907 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3913 if test "$host_cpu" = m68k; then
3914 _LT_AC_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)'
3915 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3916 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3918 # see comment about different semantics on the GNU ld section
3919 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3923 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
3926 cygwin* | mingw* | pw32*)
3927 # When not using gcc, we currently assume that we are using
3928 # Microsoft Visual C++.
3929 # hardcode_libdir_flag_spec is actually meaningless, as there is
3930 # no search path for DLLs.
3931 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
3932 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3933 # Tell ltmain to make .lib files, not .a files.
3935 # Tell ltmain to make .dll files, not .so files.
3937 # FIXME: Setting linknames here is a bad hack.
3938 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
3939 # The linker will automatically build a .lib file if we build a DLL.
3940 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1)='true'
3941 # FIXME: Should let the user specify the lib program.
3942 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
3943 fix_srcfile_path='`cygpath -w "$srcfile"`'
3944 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3947 darwin* | rhapsody*)
3948 if test "$GCC" = yes ; then
3949 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3951 rhapsody* | darwin1.[[012]])
3952 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3955 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3956 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3958 case ${MACOSX_DEPLOYMENT_TARGET} in
3960 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3963 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3969 output_verbose_link_cmd='echo'
3970 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3971 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3972 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3973 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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}'
3974 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -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}'
3975 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3976 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3977 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3978 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3979 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3981 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3985 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
3986 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3987 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3991 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3994 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
3995 # support. Future versions do this automatically, but an explicit c++rt0.o
3996 # does not break anything, and helps significantly (at the cost of a little
3999 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
4000 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4001 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4002 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4005 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
4007 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4008 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4009 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4010 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4013 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
4014 freebsd* | kfreebsd*-gnu)
4015 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
4016 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4017 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4018 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4022 if test "$GCC" = yes; then
4023 _LT_AC_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'
4025 _LT_AC_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'
4027 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4028 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4029 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4031 # hardcode_minus_L: Not really in the search PATH,
4032 # but as the default location of the library.
4033 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4034 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4038 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
4041 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4044 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
4050 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
4053 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
4057 if test "$with_gnu_ld" = no; then
4060 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4061 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4062 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4063 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4064 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4067 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4068 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4069 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4071 # hardcode_minus_L: Not really in the search PATH,
4072 # but as the default location of the library.
4073 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4076 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4077 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4078 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4079 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4081 # hardcode_minus_L: Not really in the search PATH,
4082 # but as the default location of the library.
4083 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4089 irix5* | irix6* | nonstopux*)
4090 if test "$GCC" = yes; then
4091 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4093 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4094 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
4096 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4097 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4098 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4102 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4103 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
4105 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
4107 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4108 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4109 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4113 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4114 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4115 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4116 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4117 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4121 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4122 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4123 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4124 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4125 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4126 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4129 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
4130 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
4131 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4134 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
4135 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4142 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4143 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4144 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4145 _LT_AC_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'
4146 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
4150 if test "$GCC" = yes; then
4151 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4152 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4154 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4155 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4157 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4158 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4161 osf4* | osf5*) # as osf3* with the addition of -msym flag
4162 if test "$GCC" = yes; then
4163 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4164 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4165 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4167 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4168 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4169 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
4170 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
4172 # Both c and cxx compiler support -rpath directly
4173 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4175 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4179 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4180 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4181 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4182 runpath_var=LD_RUN_PATH
4183 hardcode_runpath_var=yes
4187 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
4188 if test "$GCC" = yes; then
4189 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4190 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4191 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
4193 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4194 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4195 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4197 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4198 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4200 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4201 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
4202 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
4204 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4208 if test "x$host_vendor" = xsequent; then
4209 # Use $CC to link under sequent, because it throws in some extra .o
4210 # files that make .init and .fini sections work.
4211 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
4213 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
4215 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4216 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4217 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4218 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4222 case $host_vendor in
4224 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4225 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
4228 ## LD is ld it makes a PLAMLIB
4229 ## CC just makes a GrossModule.
4230 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
4231 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
4232 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4235 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4236 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
4239 runpath_var='LD_RUN_PATH'
4240 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4244 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4245 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4246 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
4250 if test -d /usr/nec; then
4251 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4252 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4253 runpath_var=LD_RUN_PATH
4254 hardcode_runpath_var=yes
4255 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4260 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
4261 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4262 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4263 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4264 hardcode_runpath_var=yes
4265 runpath_var=LD_RUN_PATH
4268 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4269 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
4270 if test "$GCC" = yes; then
4271 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4273 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
4275 runpath_var='LD_RUN_PATH'
4276 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4280 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
4281 # $CC -shared without GNU ld will not create a library from C++
4282 # object files and a static libstdc++, better avoid it by now
4283 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
4284 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4285 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
4286 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4287 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4288 runpath_var='LD_RUN_PATH'
4292 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
4293 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4294 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4298 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4302 if test x$host_vendor = xsni; then
4304 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4305 export_dynamic_flag_spec='${wl}-Blargedynsym'
4311 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4312 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4314 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
4315 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
4316 _LT_DECL([], [extract_expsyms_cmds], [2],
4317 [The commands to extract the exported symbol list from a shared archive])
4319 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4320 if test "$GCC" = yes; then
4321 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4323 _LT_DECL([], [variables_saved_for_relink], [1],
4324 [Variables whose values should be saved in libtool wrapper scripts and
4325 restored at link time])
4328 # Do we need to explicitly link libc?
4330 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
4332 # Assume -lc should be added
4333 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4335 if test "$enable_shared" = yes && test "$GCC" = yes; then
4336 case $_LT_AC_TAGVAR(archive_cmds, $1) in
4338 # FIXME: we may have to deal with multi-command sequences.
4341 # Test whether the compiler implicitly links with -lc since on some
4342 # systems, -lgcc has to come before -lc. If gcc already passes -lc
4343 # to ld, don't add -lc before -lgcc.
4344 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
4346 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
4348 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
4351 libobjs=conftest.$ac_objext
4353 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4359 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
4360 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4361 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
4363 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4365 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4367 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
4369 cat conftest.err 1>&5
4372 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
4379 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
4380 [Whether or not to add -lc for building shared libraries])
4381 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
4382 [enable_shared_with_static_runtimes], [0],
4383 [Whether or not to disallow shared libs when runtime libs are static])
4384 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
4385 [Compiler flag to allow reflexive dlopens])
4386 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
4387 [Compiler flag to generate shared objects directly from archives])
4388 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
4389 [Create an old-style archive from a shared archive])
4390 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
4391 [Create a temporary old-style archive to link instead of a shared archive])
4392 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
4393 _LT_TAGDECL([], [archive_expsym_cmds], [2])
4394 _LT_TAGDECL([], [module_cmds], [2],
4395 [Commands used to build a loadable module if different from building
4397 _LT_TAGDECL([], [module_expsym_cmds], [2])
4398 _LT_TAGDECL([], [allow_undefined_flag], [1],
4399 [Flag that allows shared libraries with undefined symbols to be built])
4400 _LT_TAGDECL([], [no_undefined_flag], [1],
4401 [Flag that enforces no undefined symbols])
4402 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
4403 [Flag to hardcode $libdir into a binary during linking.
4404 This must work even if $libdir does not exist])
4405 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
4406 [If ld is used when linking, flag to hardcode $libdir into a binary
4407 during linking. This must work even if $libdir does not exist])
4408 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
4409 [Whether we need a single "-rpath" flag with a separated argument])
4410 _LT_TAGDECL([], [hardcode_direct], [0],
4411 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
4412 DIR into the resulting binary])
4413 _LT_TAGDECL([], [hardcode_minus_L], [0],
4414 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
4415 into the resulting binary])
4416 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
4417 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
4418 into the resulting binary])
4419 _LT_TAGDECL([], [hardcode_automatic], [0],
4420 [Set to "yes" if building a shared library automatically hardcodes DIR
4421 into the library and all subsequent libraries and executables linked
4423 _LT_TAGDECL([], [link_all_deplibs], [0],
4424 [Whether libtool must link a program against all its dependency libraries])
4425 _LT_TAGDECL([], [fix_srcfile_path], [1],
4426 [Fix the shell variable $srcfile for the compiler])
4427 _LT_TAGDECL([], [always_export_symbols], [0],
4428 [Set to "yes" if exported symbols are required])
4429 _LT_TAGDECL([], [export_symbols_cmds], [2],
4430 [The commands to list exported symbols])
4431 _LT_TAGDECL([], [exclude_expsyms], [1],
4432 [Symbols that should not be listed in the preloaded symbols])
4433 _LT_TAGDECL([], [include_expsyms], [1],
4434 [Symbols that must always be exported])
4435 dnl FIXME: Not yet implemented
4436 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
4437 dnl [Compiler flag to generate thread safe objects])
4438 ])# AC_LIBTOOL_PROG_LD_SHLIBS
4443 # enable support for C++ libraries
4444 AC_DEFUN([AC_LIBTOOL_CXX],
4445 [AC_REQUIRE([_LT_AC_LANG_CXX])
4451 AC_DEFUN([_LT_AC_LANG_CXX],
4452 [AC_REQUIRE([AC_PROG_CXX])
4453 AC_REQUIRE([AC_PROG_CXXCPP])
4454 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
4460 # enable support for Fortran 77 libraries
4461 AC_DEFUN([AC_LIBTOOL_F77],
4462 [AC_REQUIRE([_LT_AC_LANG_F77])
4468 AC_DEFUN([_LT_AC_LANG_F77],
4469 [AC_REQUIRE([AC_PROG_F77])
4470 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
4476 # enable support for GCJ libraries
4477 AC_DEFUN([AC_LIBTOOL_GCJ],
4478 [AC_REQUIRE([_LT_AC_LANG_GCJ])
4484 AC_DEFUN([_LT_AC_LANG_GCJ],
4485 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
4486 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
4487 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
4488 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
4489 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
4490 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
4491 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
4497 # enable support for Windows resource files
4498 AC_DEFUN([AC_LIBTOOL_RC],
4499 [AC_REQUIRE([LT_AC_PROG_RC])
4500 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
4504 # AC_LIBTOOL_LANG_C_CONFIG
4505 # ------------------------
4506 # Ensure that the configuration vars for the C compiler are
4507 # suitably defined. Those variables are subsequently used by
4508 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4509 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
4510 m4_define([_LT_AC_LANG_C_CONFIG],
4511 [AC_REQUIRE([LT_AC_PROG_EGREP])
4515 # Source file extension for C test sources.
4518 # Object file extension for compiled C test sources.
4520 _LT_AC_TAGVAR(objext, $1)=$objext
4522 # Code to be used in simple compile tests
4523 lt_simple_compile_test_code="int some_variable = 0;\n"
4525 # Code to be used in simple link tests
4526 lt_simple_link_test_code='int main(){return(0);}\n'
4529 # Save the default compiler, since it gets overwritten when the other
4530 # tags are being tested, and _LT_AC_TAGVAR(compiler, []) is a NOP.
4531 compiler_DEFAULT=$CC
4534 # Check for any special shared library compilation flags.
4536 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
4537 if test "$GCC" = no; then
4540 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
4544 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
4545 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
4546 if echo "$old_CC $old_CFLAGS " | $GREP "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
4548 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
4549 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
4555 ## There is no encapsulation within the following macros, do not change
4556 ## the running order or otherwise move them around unless you know exactly
4557 ## what you are doing...
4558 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4559 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4560 AC_LIBTOOL_PROG_CC_C_O($1)
4561 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4562 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4563 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4564 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4565 AC_LIBTOOL_SYS_LIB_STRIP
4566 AC_LIBTOOL_DLOPEN_SELF($1)
4568 # Report which library types wil actually be built
4569 AC_MSG_CHECKING([if libtool supports shared libraries])
4570 AC_MSG_RESULT([$can_build_shared])
4572 AC_MSG_CHECKING([whether to build shared libraries])
4573 test "$can_build_shared" = "no" && enable_shared=no
4575 # On AIX, shared libraries and static libraries use the same namespace, and
4576 # are all built from PIC.
4579 test "$enable_shared" = yes && enable_static=no
4580 if test -n "$RANLIB"; then
4581 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4582 postinstall_cmds='$RANLIB $lib'
4587 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4588 test "$enable_shared" = yes && enable_static=no
4592 AC_MSG_RESULT([$enable_shared])
4594 AC_MSG_CHECKING([whether to build static libraries])
4595 # Make sure either enable_shared or enable_static is yes.
4596 test "$enable_shared" = yes || enable_static=yes
4597 AC_MSG_RESULT([$enable_static])
4599 AC_LIBTOOL_CONFIG($1)
4603 ])# AC_LIBTOOL_LANG_C_CONFIG
4606 # AC_LIBTOOL_LANG_CXX_CONFIG
4607 # --------------------------
4608 # Ensure that the configuration vars for the C compiler are
4609 # suitably defined. Those variables are subsequently used by
4610 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4611 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
4612 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
4614 AC_REQUIRE([LT_AC_PROG_EGREP])
4615 AC_REQUIRE([AC_PROG_CXX])
4616 AC_REQUIRE([AC_PROG_CXXCPP])
4618 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4619 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4620 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4621 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4622 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4623 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4624 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4625 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4626 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4627 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4628 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4629 _LT_AC_TAGVAR(module_cmds, $1)=
4630 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4631 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4632 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4633 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4634 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4635 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4637 # Source file extension for C++ test sources.
4640 # Object file extension for compiled C++ test sources.
4642 _LT_AC_TAGVAR(objext, $1)=$objext
4644 # Code to be used in simple compile tests
4645 lt_simple_compile_test_code="int some_variable = 0;\n"
4647 # Code to be used in simple link tests
4648 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
4650 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4653 # Allow CC to be a program name with arguments.
4658 lt_save_with_gnu_ld=$with_gnu_ld
4659 lt_save_path_LD=$lt_cv_path_LD
4660 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
4661 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
4663 unset lt_cv_prog_gnu_ld
4665 if test -n "${lt_cv_path_LDCXX+set}"; then
4666 lt_cv_path_LD=$lt_cv_path_LDCXX
4670 test -z "${LDCXX+set}" || LD=$LDCXX
4673 _LT_AC_TAGVAR(compiler, $1)=$CC
4674 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4676 # We don't want -fno-exception when compiling C++ code, so set the
4677 # no_builtin_flag separately
4678 if test "$GXX" = yes; then
4679 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4681 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4684 if test "$GXX" = yes; then
4685 # Set up default GNU C++ configuration
4689 # Check if GNU C++ uses GNU ld as the underlying linker, since the
4690 # archiving commands below assume that GNU ld is being used.
4691 if test "$with_gnu_ld" = yes; then
4692 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4693 _LT_AC_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'
4695 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4696 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4698 # If archive_cmds runs LD, not CC, wlarc should be empty
4699 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
4700 # investigate it a little bit more. (MM)
4703 # ancient GNU ld didn't support --whole-archive et. al.
4704 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
4705 $GREP 'no-whole-archive' > /dev/null; then
4706 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4708 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4714 # A generic and very simple default shared library creation
4715 # command for GNU C++ for the case where it uses the native
4716 # linker, instead of GNU ld. If possible, this setting should
4717 # overridden to take advantage of the native linker features on
4718 # the platform it is being used on.
4719 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4722 # Commands to make compiler produce verbose output that lists
4723 # what "hidden" libraries, object files and flags are used when
4724 # linking a shared library.
4725 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
4733 # PORTME: fill in a description of your system's C++ link characteristics
4734 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4735 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4738 # FIXME: insert proper C++ library support
4739 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4742 if test "$host_cpu" = ia64; then
4743 # On IA64, the linker does run time linking by default, so we don't
4744 # have to do anything special.
4745 aix_use_runtimelinking=no
4746 exp_sym_flag='-Bexport'
4749 aix_use_runtimelinking=no
4751 # Test if we are trying to use run time linking or normal
4752 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4753 # need to do runtime linking.
4754 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4755 for ld_flag in $LDFLAGS; do
4758 aix_use_runtimelinking=yes
4765 exp_sym_flag='-bexport'
4766 no_entry_flag='-bnoentry'
4769 # When large executables or shared objects are built, AIX ld can
4770 # have problems creating the table of contents. If linking a library
4771 # or program results in "error TOC overflow" add -mminimal-toc to
4772 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4773 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4775 _LT_AC_TAGVAR(archive_cmds, $1)=''
4776 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4777 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4778 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4780 if test "$GXX" = yes; then
4781 case $host_os in aix4.[012]|aix4.[012].*)
4782 # We only want to do this on AIX 4.2 and lower, the check
4783 # below for broken collect2 doesn't work under 4.3+
4784 collect2name=`${CC} -print-prog-name=collect2`
4785 if test -f "$collect2name" &&
4786 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
4788 # We have reworked collect2
4789 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4791 # We have old collect2
4792 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4793 # It fails to find uninstalled libraries when the uninstalled
4794 # path is not listed in the libpath. Setting hardcode_minus_L
4795 # to unsupported forces relinking
4796 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4797 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4798 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4801 shared_flag='-shared'
4804 if test "$host_cpu" = ia64; then
4805 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4806 # chokes on -Wl,-G. The following line is correct:
4809 if test "$aix_use_runtimelinking" = yes; then
4810 shared_flag='${wl}-G'
4812 shared_flag='${wl}-bM:SRE'
4817 # It seems that -bexpall does not export symbols beginning with
4818 # underscore (_), so it is better to generate a list of symbols to export.
4819 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4820 if test "$aix_use_runtimelinking" = yes; then
4821 # Warning - without using the other runtime loading flags (-brtl),
4822 # -berok will link without error, but may produce a broken library.
4823 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4824 # Determine the default libpath from the value encoded in an empty
4826 _LT_AC_SYS_LIBPATH_AIX
4827 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4829 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4831 if test "$host_cpu" = ia64; then
4832 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4833 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4834 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
4836 # Determine the default libpath from the value encoded in an
4838 _LT_AC_SYS_LIBPATH_AIX
4839 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4840 # Warning - without using the other run time loading flags,
4841 # -berok will link without error, but may produce a broken library.
4842 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4843 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4844 # -bexpall does not export symbols beginning with underscore (_)
4845 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4846 # Exported symbols can be pulled into shared objects from archives
4847 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
4848 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4849 # This is similar to how AIX traditionally builds it's shared libraries.
4850 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4855 case $cc_basename in
4857 # FIXME: insert proper C++ library support
4858 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4863 cygwin* | mingw* | pw32*)
4864 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4865 # as there is no search path for DLLs.
4866 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4867 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4868 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4869 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4871 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4872 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
4873 # If the export-symbols file already is a .def file (1st line
4874 # is EXPORTS), use it as is; otherwise, prepend...
4875 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4876 cp $export_symbols $output_objdir/$soname.def;
4878 echo EXPORTS > $output_objdir/$soname.def;
4879 cat $export_symbols >> $output_objdir/$soname.def;
4881 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
4883 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4886 darwin* | rhapsody*)
4887 if test "$GXX" = yes ; then
4888 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4890 rhapsody* | darwin1.[[012]])
4891 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
4894 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4895 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
4897 case ${MACOSX_DEPLOYMENT_TARGET} in
4899 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
4902 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
4908 lt_int_apple_cc_single_mod=no
4909 output_verbose_link_cmd='echo'
4910 if $CC -dumpspecs 2>&1 | $GREP 'single_module' >/dev/null ; then
4911 lt_int_apple_cc_single_mod=yes
4913 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4914 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4916 _LT_AC_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'
4918 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4919 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
4920 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4921 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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}'
4923 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "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}'
4925 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -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}'
4926 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4927 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4928 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4929 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
4930 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4932 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4937 case $cc_basename in
4939 # FIXME: insert proper C++ library support
4940 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4943 # Green Hills C++ Compiler
4944 # FIXME: insert proper C++ library support
4945 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4948 # FIXME: insert proper C++ library support
4949 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4954 # C++ shared libraries reported to be fairly broken before switch to ELF
4955 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4958 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4960 freebsd* | kfreebsd*-gnu)
4961 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4963 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4968 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4969 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4970 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4971 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4972 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4973 # but as the default
4974 # location of the library.
4976 case $cc_basename in
4978 # FIXME: insert proper C++ library support
4979 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4982 _LT_AC_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'
4983 # Commands to make compiler produce verbose output that lists
4984 # what "hidden" libraries, object files and flags are used when
4985 # linking a shared library.
4987 # There doesn't appear to be a way to prevent this compiler from
4988 # explicitly linking system object files so we need to strip them
4989 # from the output so that they don't get included in the library
4991 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 $list'
4994 if test "$GXX" = yes; then
4995 _LT_AC_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'
4997 # FIXME: insert proper C++ library support
4998 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5004 if test $with_gnu_ld = no; then
5007 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5008 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5009 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5012 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5015 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5016 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5017 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5023 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5024 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5027 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5028 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5029 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5030 # but as the default
5031 # location of the library.
5034 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5035 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
5036 # but as the default
5037 # location of the library.
5041 case $cc_basename in
5043 # FIXME: insert proper C++ library support
5044 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5049 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
5052 _LT_AC_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'
5055 # Commands to make compiler produce verbose output that lists
5056 # what "hidden" libraries, object files and flags are used when
5057 # linking a shared library.
5059 # There doesn't appear to be a way to prevent this compiler from
5060 # explicitly linking system object files so we need to strip them
5061 # from the output so that they don't get included in the library
5063 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 $list'
5066 if test "$GXX" = yes; then
5067 if test $with_gnu_ld = no; then
5070 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
5073 _LT_AC_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'
5078 # FIXME: insert proper C++ library support
5079 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5085 case $cc_basename in
5088 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
5090 # Archives containing C++ object files must be created using
5091 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
5092 # necessary to make sure instantiated templates are included
5094 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
5097 if test "$GXX" = yes; then
5098 if test "$with_gnu_ld" = no; then
5099 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
5101 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
5104 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5107 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5108 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5111 case $cc_basename in
5113 # Kuck and Associates, Inc. (KAI) C++ Compiler
5115 # KCC will only create a shared library if the output file
5116 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5117 # to its proper name (with version) after linking.
5118 _LT_AC_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'
5119 _LT_AC_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'
5120 # Commands to make compiler produce verbose output that lists
5121 # what "hidden" libraries, object files and flags are used when
5122 # linking a shared library.
5124 # There doesn't appear to be a way to prevent this compiler from
5125 # explicitly linking system object files so we need to strip them
5126 # from the output so that they don't get included in the library
5128 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 $list'
5130 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
5131 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5133 # Archives containing C++ object files must be created using
5134 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5135 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5140 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5141 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5142 _LT_AC_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'
5143 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5144 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5145 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5149 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5150 _LT_AC_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'
5152 runpath_var=LD_RUN_PATH
5153 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5154 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5156 # Commands to make compiler produce verbose output that lists
5157 # what "hidden" libraries, object files and flags are used when
5158 # linking a shared library.
5160 # There doesn't appear to be a way to prevent this compiler from
5161 # explicitly linking system object files so we need to strip them
5162 # from the output so that they don't get included in the library
5164 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5169 # FIXME: insert proper C++ library support
5170 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5173 # FIXME: insert proper C++ library support
5174 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5177 case $cc_basename in
5179 # FIXME: insert proper C++ library support
5180 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5183 # FIXME: insert proper C++ library support
5184 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5189 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5190 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
5192 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5193 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5194 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5196 # Workaround some broken pre-1.5 toolchains
5197 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
5200 case $cc_basename in
5202 # Kuck and Associates, Inc. (KAI) C++ Compiler
5204 # KCC will only create a shared library if the output file
5205 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5206 # to its proper name (with version) after linking.
5207 _LT_AC_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'
5209 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5210 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5212 # Archives containing C++ object files must be created using
5213 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5214 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5218 # Rational C++ 2.4.1
5219 # FIXME: insert proper C++ library support
5220 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5223 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5224 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
5226 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5227 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5229 # Commands to make compiler produce verbose output that lists
5230 # what "hidden" libraries, object files and flags are used when
5231 # linking a shared library.
5233 # There doesn't appear to be a way to prevent this compiler from
5234 # explicitly linking system object files so we need to strip them
5235 # from the output so that they don't get included in the library
5237 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5240 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5241 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5242 _LT_AC_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 ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
5244 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5245 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5247 # Commands to make compiler produce verbose output that lists
5248 # what "hidden" libraries, object files and flags are used when
5249 # linking a shared library.
5250 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5253 # FIXME: insert proper C++ library support
5254 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5260 case $cc_basename in
5262 # Kuck and Associates, Inc. (KAI) C++ Compiler
5264 # KCC will only create a shared library if the output file
5265 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5266 # to its proper name (with version) after linking.
5267 _LT_AC_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'
5269 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5270 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5272 # Archives containing C++ object files must be created using
5273 # the KAI C++ compiler.
5274 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
5277 # Rational C++ 2.4.1
5278 # FIXME: insert proper C++ library support
5279 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5282 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5283 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
5284 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5285 echo "-hidden">> $lib.exp~
5286 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
5289 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5290 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5292 # Commands to make compiler produce verbose output that lists
5293 # what "hidden" libraries, object files and flags are used when
5294 # linking a shared library.
5296 # There doesn't appear to be a way to prevent this compiler from
5297 # explicitly linking system object files so we need to strip them
5298 # from the output so that they don't get included in the library
5300 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5303 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5304 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5305 _LT_AC_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` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
5307 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5308 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5310 # Commands to make compiler produce verbose output that lists
5311 # what "hidden" libraries, object files and flags are used when
5312 # linking a shared library.
5313 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
5316 # FIXME: insert proper C++ library support
5317 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5323 # FIXME: insert proper C++ library support
5324 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5327 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5328 case $cc_basename in
5330 # FIXME: insert proper C++ library support
5331 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5334 # FIXME: insert proper C++ library support
5335 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5340 case $cc_basename in
5343 # FIXME: insert proper C++ library support
5344 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5348 # FIXME: insert proper C++ library support
5349 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5352 # FIXME: insert proper C++ library support
5353 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5358 case $cc_basename in
5360 # Sun C++ 4.2, 5.x and Centerline C++
5361 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5362 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5363 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5364 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5366 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5367 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5369 solaris2.[0-5] | solaris2.[0-5].*) ;;
5371 # The C++ compiler is used as linker so we must use $wl
5372 # flag to pass the commands to the underlying system
5374 # Supported since Solaris 2.6 (maybe 2.5.1?)
5375 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5378 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5380 # Commands to make compiler produce verbose output that lists
5381 # what "hidden" libraries, object files and flags are used when
5382 # linking a shared library.
5384 # There doesn't appear to be a way to prevent this compiler from
5385 # explicitly linking system object files so we need to strip them
5386 # from the output so that they don't get included in the library
5388 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5390 # Archives containing C++ object files must be created using
5391 # "CC -xar", where "CC" is the Sun C++ compiler. This is
5392 # necessary to make sure instantiated templates are included
5394 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5397 # Green Hills C++ Compiler
5398 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5400 # The C++ compiler must be used to create the archive.
5401 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
5404 # GNU C++ compiler with Solaris linker
5405 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5406 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
5407 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
5408 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5409 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5410 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5412 # Commands to make compiler produce verbose output that lists
5413 # what "hidden" libraries, object files and flags are used when
5414 # linking a shared library.
5415 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP \"\-L\""
5417 # g++ 2.7 appears to require `-G' NOT `-shared' on this
5419 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5420 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5421 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5423 # Commands to make compiler produce verbose output that lists
5424 # what "hidden" libraries, object files and flags are used when
5425 # linking a shared library.
5426 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP \"\-L\""
5429 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
5434 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
5435 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5438 case $cc_basename in
5440 # NonStop-UX NCC 3.20
5441 # FIXME: insert proper C++ library support
5442 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5445 # FIXME: insert proper C++ library support
5446 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5451 # FIXME: insert proper C++ library support
5452 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5455 # FIXME: insert proper C++ library support
5456 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5459 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5460 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5462 _LT_AC_TAGVAR(GCC, $1)="$GXX"
5463 _LT_AC_TAGVAR(LD, $1)="$LD"
5466 ## There is no encapsulation within the following macros, do not change
5467 ## the running order or otherwise move them around unless you know exactly
5468 ## what you are doing...
5469 AC_LIBTOOL_POSTDEP_PREDEP($1)
5470 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5471 AC_LIBTOOL_PROG_CC_C_O($1)
5472 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5473 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5474 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5475 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5476 AC_LIBTOOL_SYS_LIB_STRIP
5477 AC_LIBTOOL_DLOPEN_SELF($1)
5479 AC_LIBTOOL_CONFIG($1)
5486 with_gnu_ldcxx=$with_gnu_ld
5487 with_gnu_ld=$lt_save_with_gnu_ld
5488 lt_cv_path_LDCXX=$lt_cv_path_LD
5489 lt_cv_path_LD=$lt_save_path_LD
5490 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
5491 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
5492 ])# AC_LIBTOOL_LANG_CXX_CONFIG
5495 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
5496 # ------------------------------------
5497 # Figure out "hidden" library dependencies from verbose
5498 # compiler output when linking a shared library.
5499 # Parse the compiler output and extract the necessary
5500 # objects, libraries and library flags.
5501 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
5502 # Dependencies to place before and after the object being linked:
5503 _LT_AC_TAGVAR(predep_objects, $1)=
5504 _LT_AC_TAGVAR(postdep_objects, $1)=
5505 _LT_AC_TAGVAR(predeps, $1)=
5506 _LT_AC_TAGVAR(postdeps, $1)=
5507 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
5509 dnl we can't use the lt_simple_compile_test_code here,
5510 dnl because it contains code intended for an executable,
5511 dnl not a library. It's possible we should let each
5512 dnl tag define a new lt_????_link_test_code variable,
5513 dnl but it's only used here...
5514 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
5516 void foo (void) { a = 0; }
5518 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
5522 Foo (void) { a = 0; }
5527 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
5535 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
5538 public void bar (void) {
5544 dnl Parse the compiler output and extract the necessary
5545 dnl objects, libraries and library flags.
5546 if AC_TRY_EVAL(ac_compile); then
5547 # Parse the compiler output and extract the necessary
5548 # objects, libraries and library flags.
5550 # Sentinel used to keep track of whether or not we are before
5551 # the conftest object file.
5552 pre_test_object_deps_done=no
5554 # The `*' in the case matches for architectures that use `case' in
5555 # $output_verbose_cmd can trigger glob expansion during the loop
5556 # eval without this substitution.
5557 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
5559 for p in `eval $output_verbose_link_cmd`; do
5563 # Some compilers place space between "-{L,R}" and the path.
5565 if test $p = "-L" ||
5566 test $p = "-R"; then
5573 if test "$pre_test_object_deps_done" = no; then
5576 # Internal compiler library paths should come after those
5577 # provided the user. The postdeps already come after the
5578 # user supplied libs so there is no need to process them.
5579 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
5580 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
5582 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
5585 # The "-l" case would never come before the object being
5586 # linked, so don't bother handling this case.
5589 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
5590 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
5592 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
5598 # This assumes that the test object file only shows up
5599 # once in the compiler output.
5600 if test "$p" = "conftest.$objext"; then
5601 pre_test_object_deps_done=yes
5605 if test "$pre_test_object_deps_done" = no; then
5606 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
5607 _LT_AC_TAGVAR(predep_objects, $1)="$p"
5609 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
5612 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
5613 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
5615 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
5620 *) ;; # Ignore the rest.
5628 echo "libtool.m4: error: problem compiling $1 test program"
5631 $rm -f confest.$objext
5633 case " $_LT_AC_TAGVAR(postdeps, $1) " in
5634 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
5636 _LT_TAGDECL([], [predep_objects], [1],
5637 [Dependencies to place before and after the objects being linked to
5638 create a shared library])
5639 _LT_TAGDECL([], [postdep_objects], [1])
5640 _LT_TAGDECL([], [predeps], [1])
5641 _LT_TAGDECL([], [postdeps], [1])
5642 _LT_TAGDECL([], [compiler_lib_search_path], [1],
5643 [The library search path used internally by the compiler when linking
5645 ])# AC_LIBTOOL_POSTDEP_PREDEP
5647 # AC_LIBTOOL_LANG_F77_CONFIG
5648 # ------------------------
5649 # Ensure that the configuration vars for the C compiler are
5650 # suitably defined. Those variables are subsequently used by
5651 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5652 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
5653 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
5654 [AC_REQUIRE([AC_PROG_F77])
5655 AC_LANG_PUSH(Fortran 77)
5657 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5658 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5659 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5660 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5661 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5662 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5663 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5664 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5665 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5666 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5667 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5668 _LT_AC_TAGVAR(module_cmds, $1)=
5669 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5670 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5671 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5672 _LT_AC_TAGVAR(no_undefined_flag, $1)=
5673 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5674 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5676 # Source file extension for f77 test sources.
5679 # Object file extension for compiled f77 test sources.
5681 _LT_AC_TAGVAR(objext, $1)=$objext
5683 # Code to be used in simple compile tests
5684 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
5686 # Code to be used in simple link tests
5687 lt_simple_link_test_code=" program t\n end\n"
5689 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5692 # Allow CC to be a program name with arguments.
5696 _LT_AC_TAGVAR(compiler, $1)=$CC
5697 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
5699 AC_MSG_CHECKING([if libtool supports shared libraries])
5700 AC_MSG_RESULT([$can_build_shared])
5702 AC_MSG_CHECKING([whether to build shared libraries])
5703 test "$can_build_shared" = "no" && enable_shared=no
5705 # On AIX, shared libraries and static libraries use the same namespace, and
5706 # are all built from PIC.
5709 test "$enable_shared" = yes && enable_static=no
5710 if test -n "$RANLIB"; then
5711 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5712 postinstall_cmds='$RANLIB $lib'
5716 test "$enable_shared" = yes && enable_static=no
5719 AC_MSG_RESULT([$enable_shared])
5721 AC_MSG_CHECKING([whether to build static libraries])
5722 # Make sure either enable_shared or enable_static is yes.
5723 test "$enable_shared" = yes || enable_static=yes
5724 AC_MSG_RESULT([$enable_static])
5726 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5728 _LT_AC_TAGVAR(GCC, $1)="$G77"
5729 _LT_AC_TAGVAR(LD, $1)="$LD"
5731 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5732 AC_LIBTOOL_PROG_CC_C_O($1)
5733 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5734 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5735 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5736 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5737 AC_LIBTOOL_SYS_LIB_STRIP
5740 AC_LIBTOOL_CONFIG($1)
5744 ])# AC_LIBTOOL_LANG_F77_CONFIG
5747 # AC_LIBTOOL_LANG_GCJ_CONFIG
5748 # --------------------------
5749 # Ensure that the configuration vars for the C compiler are
5750 # suitably defined. Those variables are subsequently used by
5751 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5752 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5753 m4_define([_LT_AC_LANG_GCJ_CONFIG],
5756 # Source file extension for Java test sources.
5759 # Object file extension for compiled Java test sources.
5761 _LT_AC_TAGVAR(objext, $1)=$objext
5763 # Code to be used in simple compile tests
5764 lt_simple_compile_test_code="class foo {}\n"
5766 # Code to be used in simple link tests
5767 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
5769 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5772 # Allow CC to be a program name with arguments.
5776 _LT_AC_TAGVAR(compiler, $1)=$CC
5778 # GCJ did not exist at the time GCC didn't implicitly link libc in.
5779 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5782 ## There is no encapsulation within the following macros, do not change
5783 ## the running order or otherwise move them around unless you know exactly
5784 ## what you are doing...
5785 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5786 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5787 AC_LIBTOOL_PROG_CC_C_O($1)
5788 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5789 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5790 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5791 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5792 AC_LIBTOOL_SYS_LIB_STRIP
5793 AC_LIBTOOL_DLOPEN_SELF($1)
5795 AC_LIBTOOL_CONFIG($1)
5799 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
5802 # AC_LIBTOOL_LANG_RC_CONFIG
5803 # --------------------------
5804 # Ensure that the configuration vars for the Windows resource compiler are
5805 # suitably defined. Those variables are subsequently used by
5806 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5807 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5808 m4_define([_LT_AC_LANG_RC_CONFIG],
5811 # Source file extension for RC test sources.
5814 # Object file extension for compiled RC test sources.
5816 _LT_AC_TAGVAR(objext, $1)=$objext
5818 # Code to be used in simple compile tests
5819 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
5821 # Code to be used in simple link tests
5822 lt_simple_link_test_code="$lt_simple_compile_test_code"
5824 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5827 # Allow CC to be a program name with arguments.
5831 _LT_AC_TAGVAR(compiler, $1)=$CC
5832 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5834 AC_LIBTOOL_CONFIG($1)
5838 ])# AC_LIBTOOL_LANG_RC_CONFIG
5841 AC_DEFUN([LT_AC_PROG_GCJ],
5842 [AC_CHECK_TOOL(GCJ, gcj, no)
5843 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5847 AC_DEFUN([LT_AC_PROG_RC],
5848 [AC_CHECK_TOOL(RC, windres, no)
5852 AU_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
5853 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
5854 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
5855 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
5856 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
5857 AU_DEFUN([AM_PROG_LD], [AC_PROG_LD])
5858 AU_DEFUN([AM_PROG_NM], [AC_PROG_NM])
5860 # This is just to silence aclocal about the macro not being used
5861 m4_if([AC_DISABLE_FAST_INSTALL])
5866 # If we don't have a new enough Autoconf to choose the best grep
5867 # available, choose the one first in the user's PATH.
5868 AC_DEFUN([LT_AC_PROG_EGREP],
5869 [AC_REQUIRE([AC_PROG_EGREP])
5870 test -z "$GREP" && GREP=grep
5871 _LT_DECL([], [GREP], [1], [A grep program that handles long line])
5872 _LT_DECL([], [EGREP], [1], [An ERE matcher])
5878 # Check for a fully-functional sed program, that truncates
5879 # as few characters as possible. Prefer GNU sed if found.
5880 AC_DEFUN([LT_AC_PROG_SED],
5882 test -z "$SED" && SED=sed
5883 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
5884 _LT_DECL([], [Xsed], ["\$SED -e s/^X//"],
5885 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
5888 m4_ifndef([AC_PROG_SED], [
5889 ############################################################
5890 # NOTE: This macro has been submitted for inclusion into #
5891 # GNU Autoconf as AC_PROG_SED. When it is available in #
5892 # a released version of Autoconf we should remove this #
5893 # macro and use it instead. #
5894 ############################################################
5896 m4_define([AC_PROG_SED],
5897 [AC_MSG_CHECKING([for a sed that does not truncate output])
5898 AC_CACHE_VAL(lt_cv_path_SED,
5899 [# Loop through the user's path and test for sed and gsed.
5900 # Then use that list of sed's as ones to test for truncation.
5901 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5905 test -z "$as_dir" && as_dir=.
5906 for lt_ac_prog in sed gsed; do
5907 for ac_exec_ext in '' $ac_executable_extensions; do
5908 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
5909 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
5916 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
5917 # along with /bin/sed that truncates output.
5918 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5919 test ! -f $lt_ac_sed && break
5920 cat /dev/null > conftest.in
5922 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
5923 # Check for GNU sed and select it if it is found.
5924 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
5925 lt_cv_path_SED=$lt_ac_sed
5929 cat conftest.in conftest.in >conftest.tmp
5930 mv conftest.tmp conftest.in
5931 cp conftest.in conftest.nl
5933 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
5934 cmp -s conftest.out conftest.nl || break
5935 # 10000 chars as input seems more than enough
5936 test $lt_ac_count -gt 10 && break
5937 lt_ac_count=`expr $lt_ac_count + 1`
5938 if test $lt_ac_count -gt $lt_ac_max; then
5939 lt_ac_max=$lt_ac_count
5940 lt_cv_path_SED=$lt_ac_sed
5947 AC_MSG_RESULT([$SED])