1 dnl aclocal.m4 generated automatically by aclocal 1.4-p6
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 # lib-prefix.m4 serial 4 (gettext-0.14.2)
14 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
15 dnl This file is free software; the Free Software Foundation
16 dnl gives unlimited permission to copy and/or distribute it,
17 dnl with or without modifications, as long as this notice is preserved.
19 dnl From Bruno Haible.
21 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
22 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
23 dnl require excessive bracketing.
24 ifdef([AC_HELP_STRING],
25 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
26 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
28 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
29 dnl to access previously installed libraries. The basic assumption is that
30 dnl a user will want packages to use other packages he previously installed
31 dnl with the same --prefix option.
32 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
33 dnl libraries, but is otherwise very convenient.
34 AC_DEFUN([AC_LIB_PREFIX],
36 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
37 AC_REQUIRE([AC_PROG_CC])
38 AC_REQUIRE([AC_CANONICAL_HOST])
39 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
40 dnl By default, look in $includedir and $libdir.
42 AC_LIB_WITH_FINAL_PREFIX([
43 eval additional_includedir=\"$includedir\"
44 eval additional_libdir=\"$libdir\"
46 AC_LIB_ARG_WITH([lib-prefix],
47 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
48 --without-lib-prefix don't search for libraries in includedir and libdir],
50 if test "X$withval" = "Xno"; then
53 if test "X$withval" = "X"; then
54 AC_LIB_WITH_FINAL_PREFIX([
55 eval additional_includedir=\"$includedir\"
56 eval additional_libdir=\"$libdir\"
59 additional_includedir="$withval/include"
60 additional_libdir="$withval/lib"
64 if test $use_additional = yes; then
65 dnl Potentially add $additional_includedir to $CPPFLAGS.
67 dnl 1. if it's the standard /usr/include,
68 dnl 2. if it's already present in $CPPFLAGS,
69 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
70 dnl 4. if it doesn't exist as a directory.
71 if test "X$additional_includedir" != "X/usr/include"; then
73 for x in $CPPFLAGS; do
74 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
75 if test "X$x" = "X-I$additional_includedir"; then
80 if test -z "$haveit"; then
81 if test "X$additional_includedir" = "X/usr/local/include"; then
82 if test -n "$GCC"; then
84 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
88 if test -z "$haveit"; then
89 if test -d "$additional_includedir"; then
90 dnl Really add $additional_includedir to $CPPFLAGS.
91 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
96 dnl Potentially add $additional_libdir to $LDFLAGS.
98 dnl 1. if it's the standard /usr/lib,
99 dnl 2. if it's already present in $LDFLAGS,
100 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
101 dnl 4. if it doesn't exist as a directory.
102 if test "X$additional_libdir" != "X/usr/lib"; then
104 for x in $LDFLAGS; do
105 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
106 if test "X$x" = "X-L$additional_libdir"; then
111 if test -z "$haveit"; then
112 if test "X$additional_libdir" = "X/usr/local/lib"; then
113 if test -n "$GCC"; then
119 if test -z "$haveit"; then
120 if test -d "$additional_libdir"; then
121 dnl Really add $additional_libdir to $LDFLAGS.
122 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
130 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
131 dnl acl_final_exec_prefix, containing the values to which $prefix and
132 dnl $exec_prefix will expand at the end of the configure script.
133 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
135 dnl Unfortunately, prefix and exec_prefix get only finally determined
136 dnl at the end of configure.
137 if test "X$prefix" = "XNONE"; then
138 acl_final_prefix="$ac_default_prefix"
140 acl_final_prefix="$prefix"
142 if test "X$exec_prefix" = "XNONE"; then
143 acl_final_exec_prefix='${prefix}'
145 acl_final_exec_prefix="$exec_prefix"
147 acl_save_prefix="$prefix"
148 prefix="$acl_final_prefix"
149 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
150 prefix="$acl_save_prefix"
153 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
154 dnl variables prefix and exec_prefix bound to the values they will have
155 dnl at the end of the configure script.
156 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
158 acl_save_prefix="$prefix"
159 prefix="$acl_final_prefix"
160 acl_save_exec_prefix="$exec_prefix"
161 exec_prefix="$acl_final_exec_prefix"
163 exec_prefix="$acl_save_exec_prefix"
164 prefix="$acl_save_prefix"
167 # lib-link.m4 serial 6 (gettext-0.14.3)
168 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
169 dnl This file is free software; the Free Software Foundation
170 dnl gives unlimited permission to copy and/or distribute it,
171 dnl with or without modifications, as long as this notice is preserved.
173 dnl From Bruno Haible.
177 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
178 dnl the libraries corresponding to explicit and implicit dependencies.
179 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
180 dnl augments the CPPFLAGS variable.
181 AC_DEFUN([AC_LIB_LINKFLAGS],
183 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
184 AC_REQUIRE([AC_LIB_RPATH])
185 define([Name],[translit([$1],[./-], [___])])
186 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
187 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
188 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
189 AC_LIB_LINKFLAGS_BODY([$1], [$2])
190 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
191 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
192 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
194 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
195 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
196 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
197 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
199 AC_SUBST([LTLIB]NAME)
200 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
201 dnl results of this search when this library appears as a dependency.
207 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
208 dnl searches for libname and the libraries corresponding to explicit and
209 dnl implicit dependencies, together with the specified include files and
210 dnl the ability to compile and link the specified testcode. If found, it
211 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
212 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
213 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
214 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
215 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
217 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
218 AC_REQUIRE([AC_LIB_RPATH])
219 define([Name],[translit([$1],[./-], [___])])
220 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
221 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
223 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
225 AC_LIB_LINKFLAGS_BODY([$1], [$2])
227 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
228 dnl because if the user has installed lib[]Name and not disabled its use
229 dnl via --without-lib[]Name-prefix, he wants to use it.
230 ac_save_CPPFLAGS="$CPPFLAGS"
231 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
233 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
235 LIBS="$LIBS $LIB[]NAME"
236 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
239 if test "$ac_cv_lib[]Name" = yes; then
241 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
242 AC_MSG_CHECKING([how to link with lib[]$1])
243 AC_MSG_RESULT([$LIB[]NAME])
246 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
247 dnl $INC[]NAME either.
248 CPPFLAGS="$ac_save_CPPFLAGS"
252 AC_SUBST([HAVE_LIB]NAME)
254 AC_SUBST([LTLIB]NAME)
259 dnl Determine the platform dependent parameters needed to use rpath:
260 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
261 dnl hardcode_direct, hardcode_minus_L.
262 AC_DEFUN([AC_LIB_RPATH],
264 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
265 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
266 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
267 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
268 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
269 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
270 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
271 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
272 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
278 libext="$acl_cv_libext"
279 shlibext="$acl_cv_shlibext"
280 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
281 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
282 hardcode_direct="$acl_cv_hardcode_direct"
283 hardcode_minus_L="$acl_cv_hardcode_minus_L"
284 dnl Determine whether the user wants rpath handling at all.
286 [ --disable-rpath do not hardcode runtime library paths],
290 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
291 dnl the libraries corresponding to explicit and implicit dependencies.
292 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
293 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
295 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
296 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
297 dnl By default, look in $includedir and $libdir.
299 AC_LIB_WITH_FINAL_PREFIX([
300 eval additional_includedir=\"$includedir\"
301 eval additional_libdir=\"$libdir\"
303 AC_LIB_ARG_WITH([lib$1-prefix],
304 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
305 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
307 if test "X$withval" = "Xno"; then
310 if test "X$withval" = "X"; then
311 AC_LIB_WITH_FINAL_PREFIX([
312 eval additional_includedir=\"$includedir\"
313 eval additional_libdir=\"$libdir\"
316 additional_includedir="$withval/include"
317 additional_libdir="$withval/lib"
321 dnl Search the library and its dependencies in $additional_libdir and
322 dnl $LDFLAGS. Using breadth-first-seach.
328 names_already_handled=
329 names_next_round='$1 $2'
330 while test -n "$names_next_round"; do
331 names_this_round="$names_next_round"
333 for name in $names_this_round; do
335 for n in $names_already_handled; do
336 if test "$n" = "$name"; then
341 if test -z "$already_handled"; then
342 names_already_handled="$names_already_handled $name"
343 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
344 dnl or AC_LIB_HAVE_LINKFLAGS call.
345 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
346 eval value=\"\$HAVE_LIB$uppername\"
347 if test -n "$value"; then
348 if test "$value" = yes; then
349 eval value=\"\$LIB$uppername\"
350 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
351 eval value=\"\$LTLIB$uppername\"
352 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
354 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
355 dnl that this library doesn't exist. So just drop it.
359 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
360 dnl and the already constructed $LIBNAME/$LTLIBNAME.
365 if test $use_additional = yes; then
366 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
367 found_dir="$additional_libdir"
368 found_so="$additional_libdir/lib$name.$shlibext"
369 if test -f "$additional_libdir/lib$name.la"; then
370 found_la="$additional_libdir/lib$name.la"
373 if test -f "$additional_libdir/lib$name.$libext"; then
374 found_dir="$additional_libdir"
375 found_a="$additional_libdir/lib$name.$libext"
376 if test -f "$additional_libdir/lib$name.la"; then
377 found_la="$additional_libdir/lib$name.la"
382 if test "X$found_dir" = "X"; then
383 for x in $LDFLAGS $LTLIB[]NAME; do
384 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
387 dir=`echo "X$x" | sed -e 's/^X-L//'`
388 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
390 found_so="$dir/lib$name.$shlibext"
391 if test -f "$dir/lib$name.la"; then
392 found_la="$dir/lib$name.la"
395 if test -f "$dir/lib$name.$libext"; then
397 found_a="$dir/lib$name.$libext"
398 if test -f "$dir/lib$name.la"; then
399 found_la="$dir/lib$name.la"
405 if test "X$found_dir" != "X"; then
410 if test "X$found_dir" != "X"; then
411 dnl Found the library.
412 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
413 if test "X$found_so" != "X"; then
414 dnl Linking with a shared library. We attempt to hardcode its
415 dnl directory into the executable's runpath, unless it's the
416 dnl standard /usr/lib.
417 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
418 dnl No hardcoding is needed.
419 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
421 dnl Use an explicit option to hardcode DIR into the resulting
423 dnl Potentially add DIR to ltrpathdirs.
424 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
426 for x in $ltrpathdirs; do
427 if test "X$x" = "X$found_dir"; then
432 if test -z "$haveit"; then
433 ltrpathdirs="$ltrpathdirs $found_dir"
435 dnl The hardcoding into $LIBNAME is system dependent.
436 if test "$hardcode_direct" = yes; then
437 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
438 dnl resulting binary.
439 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
441 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
442 dnl Use an explicit option to hardcode DIR into the resulting
444 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
445 dnl Potentially add DIR to rpathdirs.
446 dnl The rpathdirs will be appended to $LIBNAME at the end.
448 for x in $rpathdirs; do
449 if test "X$x" = "X$found_dir"; then
454 if test -z "$haveit"; then
455 rpathdirs="$rpathdirs $found_dir"
458 dnl Rely on "-L$found_dir".
459 dnl But don't add it if it's already contained in the LDFLAGS
460 dnl or the already constructed $LIBNAME
462 for x in $LDFLAGS $LIB[]NAME; do
463 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
464 if test "X$x" = "X-L$found_dir"; then
469 if test -z "$haveit"; then
470 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
472 if test "$hardcode_minus_L" != no; then
473 dnl FIXME: Not sure whether we should use
474 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
476 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
478 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
479 dnl here, because this doesn't fit in flags passed to the
480 dnl compiler. So give up. No hardcoding. This affects only
481 dnl very old systems.
482 dnl FIXME: Not sure whether we should use
483 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
485 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
491 if test "X$found_a" != "X"; then
492 dnl Linking with a static library.
493 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
495 dnl We shouldn't come here, but anyway it's good to have a
497 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
500 dnl Assume the include files are nearby.
501 additional_includedir=
504 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
505 additional_includedir="$basedir/include"
508 if test "X$additional_includedir" != "X"; then
509 dnl Potentially add $additional_includedir to $INCNAME.
511 dnl 1. if it's the standard /usr/include,
512 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
513 dnl 3. if it's already present in $CPPFLAGS or the already
514 dnl constructed $INCNAME,
515 dnl 4. if it doesn't exist as a directory.
516 if test "X$additional_includedir" != "X/usr/include"; then
518 if test "X$additional_includedir" = "X/usr/local/include"; then
519 if test -n "$GCC"; then
521 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
525 if test -z "$haveit"; then
526 for x in $CPPFLAGS $INC[]NAME; do
527 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
528 if test "X$x" = "X-I$additional_includedir"; then
533 if test -z "$haveit"; then
534 if test -d "$additional_includedir"; then
535 dnl Really add $additional_includedir to $INCNAME.
536 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
542 dnl Look for dependencies.
543 if test -n "$found_la"; then
544 dnl Read the .la file. It defines the variables
545 dnl dlname, library_names, old_library, dependency_libs, current,
546 dnl age, revision, installed, dlopen, dlpreopen, libdir.
547 save_libdir="$libdir"
549 */* | *\\*) . "$found_la" ;;
550 *) . "./$found_la" ;;
552 libdir="$save_libdir"
553 dnl We use only dependency_libs.
554 for dep in $dependency_libs; do
557 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
558 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
560 dnl 1. if it's the standard /usr/lib,
561 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
562 dnl 3. if it's already present in $LDFLAGS or the already
563 dnl constructed $LIBNAME,
564 dnl 4. if it doesn't exist as a directory.
565 if test "X$additional_libdir" != "X/usr/lib"; then
567 if test "X$additional_libdir" = "X/usr/local/lib"; then
568 if test -n "$GCC"; then
570 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
574 if test -z "$haveit"; then
576 for x in $LDFLAGS $LIB[]NAME; do
577 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
578 if test "X$x" = "X-L$additional_libdir"; then
583 if test -z "$haveit"; then
584 if test -d "$additional_libdir"; then
585 dnl Really add $additional_libdir to $LIBNAME.
586 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
590 for x in $LDFLAGS $LTLIB[]NAME; do
591 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
592 if test "X$x" = "X-L$additional_libdir"; then
597 if test -z "$haveit"; then
598 if test -d "$additional_libdir"; then
599 dnl Really add $additional_libdir to $LTLIBNAME.
600 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
607 dir=`echo "X$dep" | sed -e 's/^X-R//'`
608 if test "$enable_rpath" != no; then
609 dnl Potentially add DIR to rpathdirs.
610 dnl The rpathdirs will be appended to $LIBNAME at the end.
612 for x in $rpathdirs; do
613 if test "X$x" = "X$dir"; then
618 if test -z "$haveit"; then
619 rpathdirs="$rpathdirs $dir"
621 dnl Potentially add DIR to ltrpathdirs.
622 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
624 for x in $ltrpathdirs; do
625 if test "X$x" = "X$dir"; then
630 if test -z "$haveit"; then
631 ltrpathdirs="$ltrpathdirs $dir"
636 dnl Handle this in the next round.
637 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
640 dnl Handle this in the next round. Throw away the .la's
641 dnl directory; it is already contained in a preceding -L
643 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
646 dnl Most likely an immediate library name.
647 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
648 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
654 dnl Didn't find the library; assume it is in the system directories
655 dnl known to the linker and runtime loader. (All the system
656 dnl directories known to the linker should also be known to the
657 dnl runtime loader, otherwise the system is severely misconfigured.)
658 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
659 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
665 if test "X$rpathdirs" != "X"; then
666 if test -n "$hardcode_libdir_separator"; then
667 dnl Weird platform: only the last -rpath option counts, the user must
668 dnl pass all path elements in one option. We can arrange that for a
669 dnl single library, but not when more than one $LIBNAMEs are used.
671 for found_dir in $rpathdirs; do
672 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
674 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
675 acl_save_libdir="$libdir"
677 eval flag=\"$hardcode_libdir_flag_spec\"
678 libdir="$acl_save_libdir"
679 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
681 dnl The -rpath options are cumulative.
682 for found_dir in $rpathdirs; do
683 acl_save_libdir="$libdir"
685 eval flag=\"$hardcode_libdir_flag_spec\"
686 libdir="$acl_save_libdir"
687 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
691 if test "X$ltrpathdirs" != "X"; then
692 dnl When using libtool, the option that works for both libraries and
693 dnl executables is -R. The -R options are cumulative.
694 for found_dir in $ltrpathdirs; do
695 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
700 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
701 dnl unless already present in VAR.
702 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
703 dnl contains two or three consecutive elements that belong together.
704 AC_DEFUN([AC_LIB_APPENDTOVAR],
706 for element in [$2]; do
709 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
710 if test "X$x" = "X$element"; then
715 if test -z "$haveit"; then
716 [$1]="${[$1]}${[$1]:+ }$element"
721 # lib-ld.m4 serial 3 (gettext-0.13)
722 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
723 dnl This file is free software; the Free Software Foundation
724 dnl gives unlimited permission to copy and/or distribute it,
725 dnl with or without modifications, as long as this notice is preserved.
727 dnl Subroutines of libtool.m4,
728 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
731 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
732 AC_DEFUN([AC_LIB_PROG_LD_GNU],
733 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
734 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
735 case `$LD -v 2>&1 </dev/null` in
736 *GNU* | *'with BFD'*)
737 acl_cv_prog_gnu_ld=yes ;;
739 acl_cv_prog_gnu_ld=no ;;
741 with_gnu_ld=$acl_cv_prog_gnu_ld
744 dnl From libtool-1.4. Sets the variable LD.
745 AC_DEFUN([AC_LIB_PROG_LD],
747 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
748 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
749 AC_REQUIRE([AC_PROG_CC])dnl
750 AC_REQUIRE([AC_CANONICAL_HOST])dnl
751 # Prepare PATH_SEPARATOR.
752 # The user is always right.
753 if test "${PATH_SEPARATOR+set}" != set; then
754 echo "#! /bin/sh" >conf$$.sh
755 echo "exit 0" >>conf$$.sh
757 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
765 if test "$GCC" = yes; then
766 # Check if gcc -print-prog-name=ld gives a path.
767 AC_MSG_CHECKING([for ld used by GCC])
770 # gcc leaves a trailing carriage return which upsets mingw
771 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
773 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
776 # Accept absolute paths.
777 [[\\/]* | [A-Za-z]:[\\/]*)]
778 [re_direlt='/[^/][^/]*/\.\./']
779 # Canonicalize the path of ld
780 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
781 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
782 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
784 test -z "$LD" && LD="$ac_prog"
787 # If it fails, then pretend we aren't using GCC.
791 # If it is relative, then search for the first ld in PATH.
795 elif test "$with_gnu_ld" = yes; then
796 AC_MSG_CHECKING([for GNU ld])
798 AC_MSG_CHECKING([for non-GNU ld])
800 AC_CACHE_VAL(acl_cv_path_LD,
801 [if test -z "$LD"; then
802 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
803 for ac_dir in $PATH; do
804 test -z "$ac_dir" && ac_dir=.
805 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
806 acl_cv_path_LD="$ac_dir/$ac_prog"
807 # Check to see if the program is GNU ld. I'd rather use --version,
808 # but apparently some GNU ld's only accept -v.
809 # Break only if it was the GNU/non-GNU ld that we prefer.
810 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
811 *GNU* | *'with BFD'*)
812 test "$with_gnu_ld" != no && break ;;
814 test "$with_gnu_ld" != yes && break ;;
820 acl_cv_path_LD="$LD" # Let the user override the test with a path.
823 if test -n "$LD"; then
828 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
832 # Like AC_CONFIG_HEADER, but automatically create stamp file.
834 AC_DEFUN([AM_CONFIG_HEADER],
836 AC_CONFIG_HEADER([$1])
837 dnl When config.status generates a header, we must update the stamp-h file.
838 dnl This file resides in the same directory as the config header
839 dnl that is generated. We must strip everything past the first ":",
840 dnl and everything past the last "/".
841 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
842 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
843 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
845 for am_file in <<$1>>; do
846 case " <<$>>CONFIG_HEADERS " in
847 *" <<$>>am_file "*<<)>>
848 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
851 am_indx=`expr "<<$>>am_indx" + 1`
855 # Do all the work for Automake. This macro actually does too much --
856 # some checks are only needed if your package does certain things.
857 # But this isn't really a big deal.
862 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
864 AC_DEFUN([AM_INIT_AUTOMAKE],
865 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
866 AC_REQUIRE([AC_PROG_INSTALL])
871 dnl test to see if srcdir already configured
872 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
873 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
876 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
877 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
878 AC_REQUIRE([AM_SANITY_CHECK])
879 AC_REQUIRE([AC_ARG_PROGRAM])
880 dnl FIXME This is truly gross.
881 missing_dir=`cd $ac_aux_dir && pwd`
882 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
883 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
884 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
885 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
886 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
887 AC_REQUIRE([AC_PROG_MAKE_SET])])
889 # Copyright 2002 Free Software Foundation, Inc.
891 # This program is free software; you can redistribute it and/or modify
892 # it under the terms of the GNU General Public License as published by
893 # the Free Software Foundation; either version 2, or (at your option)
896 # This program is distributed in the hope that it will be useful,
897 # but WITHOUT ANY WARRANTY; without even the implied warranty of
898 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
899 # GNU General Public License for more details.
901 # You should have received a copy of the GNU General Public License
902 # along with this program; if not, write to the Free Software
903 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
905 # AM_AUTOMAKE_VERSION(VERSION)
906 # ----------------------------
907 # Automake X.Y traces this macro to ensure aclocal.m4 has been
908 # generated from the m4 files accompanying Automake X.Y.
909 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
911 # AM_SET_CURRENT_AUTOMAKE_VERSION
912 # -------------------------------
913 # Call AM_AUTOMAKE_VERSION so it can be traced.
914 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
915 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
916 [AM_AUTOMAKE_VERSION([1.4-p6])])
919 # Check to make sure that the build environment is sane.
922 AC_DEFUN([AM_SANITY_CHECK],
923 [AC_MSG_CHECKING([whether build environment is sane])
926 echo timestamp > conftestfile
927 # Do `set' in a subshell so we don't clobber the current shell's
928 # arguments. Must try -L first in case configure is actually a
929 # symlink; some systems play weird games with the mod time of symlinks
930 # (eg FreeBSD returns the mod time of the symlink's containing
933 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
934 if test "[$]*" = "X"; then
936 set X `ls -t $srcdir/configure conftestfile`
938 if test "[$]*" != "X $srcdir/configure conftestfile" \
939 && test "[$]*" != "X conftestfile $srcdir/configure"; then
941 # If neither matched, then we have a broken ls. This can happen
942 # if, for instance, CONFIG_SHELL is bash and it inherits a
943 # broken ls alias from the environment. This has actually
944 # happened. Such a system could not be considered "sane".
945 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
946 alias in your environment])
949 test "[$]2" = conftestfile
955 AC_MSG_ERROR([newly created file is older than distributed files!
956 Check your system clock])
961 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
962 dnl The program must properly implement --version.
963 AC_DEFUN([AM_MISSING_PROG],
964 [AC_MSG_CHECKING(for working $2)
965 # Run test in a subshell; some versions of sh will print an error if
966 # an executable is not found, even if stderr is redirected.
967 # Redirect stdin to placate older versions of autoconf. Sigh.
968 if ($2 --version) < /dev/null > /dev/null 2>&1; then
973 AC_MSG_RESULT(missing)
977 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
979 # serial 47 AC_PROG_LIBTOOL
983 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
984 # -----------------------------------------------------------
985 # If this macro is not defined by Autoconf, define it here.
986 m4_ifdef([AC_PROVIDE_IFELSE],
988 [m4_define([AC_PROVIDE_IFELSE],
989 [m4_ifdef([AC_PROVIDE_$1],
995 AC_DEFUN([AC_PROG_LIBTOOL],
996 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
997 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
998 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
999 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1001 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1003 dnl And a similar setup for Fortran 77 support
1004 AC_PROVIDE_IFELSE([AC_PROG_F77],
1006 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1009 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1010 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1011 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1012 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1014 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1016 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1018 [ifdef([AC_PROG_GCJ],
1019 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1020 ifdef([A][M_PROG_GCJ],
1021 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1022 ifdef([LT_AC_PROG_GCJ],
1023 [define([LT_AC_PROG_GCJ],
1024 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1025 ])])# AC_PROG_LIBTOOL
1030 AC_DEFUN([_AC_PROG_LIBTOOL],
1031 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1032 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1033 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1034 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1036 # This can be used to rebuild libtool when needed
1037 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1039 # Always use our own libtool.
1040 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1041 AC_SUBST(LIBTOOL)dnl
1043 # Prevent multiple expansion
1044 define([AC_PROG_LIBTOOL], [])
1045 ])# _AC_PROG_LIBTOOL
1050 AC_DEFUN([AC_LIBTOOL_SETUP],
1052 AC_REQUIRE([AC_ENABLE_SHARED])dnl
1053 AC_REQUIRE([AC_ENABLE_STATIC])dnl
1054 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1055 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1056 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1057 AC_REQUIRE([AC_PROG_CC])dnl
1058 AC_REQUIRE([AC_PROG_LD])dnl
1059 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1060 AC_REQUIRE([AC_PROG_NM])dnl
1062 AC_REQUIRE([AC_PROG_LN_S])dnl
1063 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1064 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1065 AC_REQUIRE([AC_OBJEXT])dnl
1066 AC_REQUIRE([AC_EXEEXT])dnl
1069 AC_LIBTOOL_SYS_MAX_CMD_LEN
1070 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1073 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1074 _LT_AC_PROG_ECHO_BACKSLASH
1078 # AIX sometimes has problems with the GCC collect2 program. For some
1079 # reason, if we set the COLLECT_NAMES environment variable, the problems
1080 # vanish in a puff of smoke.
1081 if test "X${COLLECT_NAMES+set}" != Xset; then
1083 export COLLECT_NAMES
1088 # Sed substitution that helps us do robust quoting. It backslashifies
1089 # metacharacters that are still active within double-quoted strings.
1090 Xsed='sed -e s/^X//'
1091 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1093 # Same as above, but do not quote variable references.
1094 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1096 # Sed substitution to delay expansion of an escaped shell variable in a
1097 # double_quote_subst'ed string.
1098 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1100 # Sed substitution to avoid accidental globbing in evaled expressions
1101 no_glob_subst='s/\*/\\\*/g'
1107 default_ofile=libtool
1108 can_build_shared=yes
1110 # All known linkers require a `.a' archive for static linking (except M$VC,
1111 # which needs '.lib').
1113 ltmain="$ac_aux_dir/ltmain.sh"
1114 ofile="$default_ofile"
1115 with_gnu_ld="$lt_cv_prog_gnu_ld"
1117 AC_CHECK_TOOL(AR, ar, false)
1118 AC_CHECK_TOOL(RANLIB, ranlib, :)
1119 AC_CHECK_TOOL(STRIP, strip, :)
1122 old_CFLAGS="$CFLAGS"
1124 # Set sane defaults for various variables
1125 test -z "$AR" && AR=ar
1126 test -z "$AR_FLAGS" && AR_FLAGS=cru
1127 test -z "$AS" && AS=as
1128 test -z "$CC" && CC=cc
1129 test -z "$LTCC" && LTCC=$CC
1130 test -z "$DLLTOOL" && DLLTOOL=dlltool
1131 test -z "$LD" && LD=ld
1132 test -z "$LN_S" && LN_S="ln -s"
1133 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1134 test -z "$NM" && NM=nm
1135 test -z "$SED" && SED=sed
1136 test -z "$OBJDUMP" && OBJDUMP=objdump
1137 test -z "$RANLIB" && RANLIB=:
1138 test -z "$STRIP" && STRIP=:
1139 test -z "$ac_objext" && ac_objext=o
1141 # Determine commands to create old-style static archives.
1142 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1143 old_postinstall_cmds='chmod 644 $oldlib'
1144 old_postuninstall_cmds=
1146 if test -n "$RANLIB"; then
1149 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1152 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1155 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1158 # Only perform the check for file, if the check method requires it
1159 case $deplibs_check_method in
1161 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1167 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1168 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1169 enable_win32_dll=yes, enable_win32_dll=no)
1171 AC_ARG_ENABLE([libtool-lock],
1172 [AC_HELP_STRING([--disable-libtool-lock],
1173 [avoid locking (might break parallel builds)])])
1174 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1177 [AC_HELP_STRING([--with-pic],
1178 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1179 [pic_mode="$withval"],
1181 test -z "$pic_mode" && pic_mode=default
1183 # Use C for the default configuration in the libtool script
1185 AC_LIBTOOL_LANG_C_CONFIG
1187 ])# AC_LIBTOOL_SETUP
1190 # _LT_AC_SYS_COMPILER
1191 # -------------------
1192 AC_DEFUN([_LT_AC_SYS_COMPILER],
1193 [AC_REQUIRE([AC_PROG_CC])dnl
1195 # If no C compiler was specified, use CC.
1198 # Allow CC to be a program name with arguments.
1200 ])# _LT_AC_SYS_COMPILER
1203 # _LT_AC_SYS_LIBPATH_AIX
1204 # ----------------------
1205 # Links a minimal program and checks the executable
1206 # for the system default hardcoded library path. In most cases,
1207 # this is /usr/lib:/lib, but when the MPI compilers are used
1208 # the location of the communication and MPI libs are included too.
1209 # If we don't find anything, use the default library path according
1210 # to the aix ld manual.
1211 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1212 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1213 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1215 # Check for a 64-bit object if we didn't find anything.
1216 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; }
1218 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1219 ])# _LT_AC_SYS_LIBPATH_AIX
1222 # _LT_AC_SHELL_INIT(ARG)
1223 # ----------------------
1224 AC_DEFUN([_LT_AC_SHELL_INIT],
1225 [ifdef([AC_DIVERSION_NOTICE],
1226 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1227 [AC_DIVERT_PUSH(NOTICE)])
1230 ])# _LT_AC_SHELL_INIT
1233 # _LT_AC_PROG_ECHO_BACKSLASH
1234 # --------------------------
1235 # Add some code to the start of the generated configure script which
1236 # will find an echo command which doesn't interpret backslashes.
1237 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1238 [_LT_AC_SHELL_INIT([
1239 # Check that we are running under the correct shell.
1240 SHELL=${CONFIG_SHELL-/bin/sh}
1244 # Remove one level of quotation (which was required for Make).
1245 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1250 if test "X[$]1" = X--no-reexec; then
1251 # Discard the --no-reexec flag, and continue.
1253 elif test "X[$]1" = X--fallback-echo; then
1254 # Avoid inline document here, it may be left over
1256 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1257 # Yippee, $echo works!
1260 # Restart under the correct shell.
1261 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1264 if test "X[$]1" = X--fallback-echo; then
1265 # used as fallback echo
1273 # The HP-UX ksh and POSIX shell print the target directory to stdout
1275 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1277 if test -z "$ECHO"; then
1278 if test "X${echo_test_string+set}" != Xset; then
1279 # find a string as large as possible, as long as the shell can cope with it
1280 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1281 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1282 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1283 echo_test_string="`eval $cmd`" &&
1284 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1291 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1292 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1293 test "X$echo_testing_string" = "X$echo_test_string"; then
1296 # The Solaris, AIX, and Digital Unix default echo programs unquote
1297 # backslashes. This makes it impossible to quote backslashes using
1298 # echo "$something" | sed 's/\\/\\\\/g'
1300 # So, first we look for a working echo in the user's PATH.
1302 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1303 for dir in $PATH /usr/ucb; do
1305 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1306 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1307 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1308 test "X$echo_testing_string" = "X$echo_test_string"; then
1315 if test "X$echo" = Xecho; then
1316 # We didn't find a better echo, so look for alternatives.
1317 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1318 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1319 test "X$echo_testing_string" = "X$echo_test_string"; then
1320 # This shell has a builtin print -r that does the trick.
1322 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1323 test "X$CONFIG_SHELL" != X/bin/ksh; then
1324 # If we have ksh, try running configure again with it.
1325 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1326 export ORIGINAL_CONFIG_SHELL
1327 CONFIG_SHELL=/bin/ksh
1329 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1333 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1334 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1335 test "X$echo_testing_string" = "X$echo_test_string"; then
1336 # Cool, printf works
1338 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1339 test "X$echo_testing_string" = 'X\t' &&
1340 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1341 test "X$echo_testing_string" = "X$echo_test_string"; then
1342 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1344 SHELL="$CONFIG_SHELL"
1346 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1347 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1348 test "X$echo_testing_string" = 'X\t' &&
1349 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1350 test "X$echo_testing_string" = "X$echo_test_string"; then
1351 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1353 # maybe with a smaller string...
1356 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1357 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1364 if test "$prev" != 'sed 50q "[$]0"'; then
1365 echo_test_string=`eval $prev`
1366 export echo_test_string
1367 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1369 # Oops. We lost completely, so just stick with echo.
1378 # Copy echo and quote the copy suitably for passing to libtool from
1379 # the Makefile, instead of quoting the original, which is used later.
1381 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1382 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1386 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1391 AC_DEFUN([_LT_AC_LOCK],
1392 [AC_ARG_ENABLE([libtool-lock],
1393 [AC_HELP_STRING([--disable-libtool-lock],
1394 [avoid locking (might break parallel builds)])])
1395 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1397 # Some flags need to be propagated to the compiler or linker for good
1401 # Find out which ABI we are using.
1402 echo 'int i;' > conftest.$ac_ext
1403 if AC_TRY_EVAL(ac_compile); then
1404 case `/usr/bin/file conftest.$ac_objext` in
1416 # Find out which ABI we are using.
1417 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1418 if AC_TRY_EVAL(ac_compile); then
1419 if test "$lt_cv_prog_gnu_ld" = yes; then
1420 case `/usr/bin/file conftest.$ac_objext` in
1422 LD="${LD-ld} -melf32bsmip"
1425 LD="${LD-ld} -melf32bmipn32"
1428 LD="${LD-ld} -melf64bmip"
1432 case `/usr/bin/file conftest.$ac_objext` in
1448 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1449 # Find out which ABI we are using.
1450 echo 'int i;' > conftest.$ac_ext
1451 if AC_TRY_EVAL(ac_compile); then
1452 case "`/usr/bin/file conftest.o`" in
1456 LD="${LD-ld} -m elf_i386"
1458 ppc64-*linux*|powerpc64-*linux*)
1459 LD="${LD-ld} -m elf32ppclinux"
1462 LD="${LD-ld} -m elf_s390"
1465 LD="${LD-ld} -m elf32_sparc"
1472 LD="${LD-ld} -m elf_x86_64"
1474 ppc*-*linux*|powerpc*-*linux*)
1475 LD="${LD-ld} -m elf64ppc"
1478 LD="${LD-ld} -m elf64_s390"
1481 LD="${LD-ld} -m elf64_sparc"
1491 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1492 SAVE_CFLAGS="$CFLAGS"
1493 CFLAGS="$CFLAGS -belf"
1494 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1496 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1498 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1499 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1500 CFLAGS="$SAVE_CFLAGS"
1503 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1504 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1505 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1506 AC_CHECK_TOOL(AS, as, false)
1507 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1512 need_locks="$enable_libtool_lock"
1517 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1518 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1519 # ----------------------------------------------------------------
1520 # Check whether the given compiler option works
1521 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1522 [AC_REQUIRE([LT_AC_PROG_SED])
1523 AC_CACHE_CHECK([$1], [$2],
1525 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1526 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1527 lt_compiler_flag="$3"
1528 # Insert the option either (1) after the last *FLAGS variable, or
1529 # (2) before a word containing "conftest.", or (3) at the end.
1530 # Note that $ac_compile itself does not contain backslashes and begins
1531 # with a dollar sign (not a hyphen), so the echo should work correctly.
1532 # The option is referenced via a variable to avoid confusing sed.
1533 lt_compile=`echo "$ac_compile" | $SED \
1534 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1535 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1536 -e 's:$: $lt_compiler_flag:'`
1537 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1538 (eval "$lt_compile" 2>conftest.err)
1540 cat conftest.err >&AS_MESSAGE_LOG_FD
1541 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1542 if (exit $ac_status) && test -s "$ac_outfile"; then
1543 # The compiler can only warn and ignore the option if not recognized
1544 # So say no if there are warnings
1545 if test ! -s conftest.err; then
1552 if test x"[$]$2" = xyes; then
1553 ifelse([$5], , :, [$5])
1555 ifelse([$6], , :, [$6])
1557 ])# AC_LIBTOOL_COMPILER_OPTION
1560 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1561 # [ACTION-SUCCESS], [ACTION-FAILURE])
1562 # ------------------------------------------------------------
1563 # Check whether the given compiler option works
1564 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1565 [AC_CACHE_CHECK([$1], [$2],
1567 save_LDFLAGS="$LDFLAGS"
1568 LDFLAGS="$LDFLAGS $3"
1569 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1570 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1571 # The compiler can only warn and ignore the option if not recognized
1572 # So say no if there are warnings
1573 if test -s conftest.err; then
1574 # Append any errors to the config.log.
1575 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1581 LDFLAGS="$save_LDFLAGS"
1584 if test x"[$]$2" = xyes; then
1585 ifelse([$4], , :, [$4])
1587 ifelse([$5], , :, [$5])
1589 ])# AC_LIBTOOL_LINKER_OPTION
1592 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1593 # --------------------------
1594 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1595 [# find the maximum length of command line arguments
1596 AC_MSG_CHECKING([the maximum length of command line arguments])
1597 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1603 # On DJGPP, this test can blow up pretty badly due to problems in libc
1604 # (any single argument exceeding 2000 bytes causes a buffer overrun
1605 # during glob expansion). Even if it were fixed, the result of this
1606 # check would be larger than it should be.
1607 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1611 # Under GNU Hurd, this test is not required because there is
1612 # no limit to the length of command line arguments.
1613 # Libtool will interpret -1 as no limit whatsoever
1614 lt_cv_sys_max_cmd_len=-1;
1618 # On Win9x/ME, this test blows up -- it succeeds, but takes
1619 # about 5 minutes as the teststring grows exponentially.
1620 # Worse, since 9x/ME are not pre-emptively multitasking,
1621 # you end up with a "frozen" computer, even though with patience
1622 # the test eventually succeeds (with a max line length of 256k).
1623 # Instead, let's just punt: use the minimum linelength reported by
1624 # all of the supported platforms: 8192 (on NT/2K/XP).
1625 lt_cv_sys_max_cmd_len=8192;
1629 # On AmigaOS with pdksh, this test takes hours, literally.
1630 # So we just punt and use a minimum line length of 8192.
1631 lt_cv_sys_max_cmd_len=8192;
1635 # If test is not a shell built-in, we'll probably end up computing a
1636 # maximum length that is only half of the actual maximum length, but
1638 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1639 = "XX$teststring") >/dev/null 2>&1 &&
1640 new_result=`expr "X$teststring" : ".*" 2>&1` &&
1641 lt_cv_sys_max_cmd_len=$new_result &&
1642 test $i != 17 # 1/2 MB should be enough
1645 teststring=$teststring$teststring
1648 # Add a significant safety factor because C++ compilers can tack on massive
1649 # amounts of additional arguments before passing them to the linker.
1650 # It appears as though 1/2 is a usable value.
1651 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1655 if test -n $lt_cv_sys_max_cmd_len ; then
1656 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1660 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1663 # _LT_AC_CHECK_DLFCN
1664 # --------------------
1665 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1666 [AC_CHECK_HEADERS(dlfcn.h)dnl
1667 ])# _LT_AC_CHECK_DLFCN
1670 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1671 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1672 # ------------------------------------------------------------------
1673 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1674 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1675 if test "$cross_compiling" = yes; then :
1678 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1679 lt_status=$lt_dlunknown
1680 cat > conftest.$ac_ext <<EOF
1681 [#line __oline__ "configure"
1682 #include "confdefs.h"
1691 # define LT_DLGLOBAL RTLD_GLOBAL
1694 # define LT_DLGLOBAL DL_GLOBAL
1696 # define LT_DLGLOBAL 0
1700 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1701 find out it does not work in some platform. */
1702 #ifndef LT_DLLAZY_OR_NOW
1704 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1707 # define LT_DLLAZY_OR_NOW DL_LAZY
1710 # define LT_DLLAZY_OR_NOW RTLD_NOW
1713 # define LT_DLLAZY_OR_NOW DL_NOW
1715 # define LT_DLLAZY_OR_NOW 0
1723 extern "C" void exit (int);
1726 void fnord() { int i=42;}
1729 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1730 int status = $lt_dlunknown;
1734 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1735 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1736 /* dlclose (self); */
1742 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1743 (./conftest; exit; ) 2>/dev/null
1746 x$lt_dlno_uscore) $1 ;;
1747 x$lt_dlneed_uscore) $2 ;;
1748 x$lt_unknown|x*) $3 ;;
1751 # compilation failed
1756 ])# _LT_AC_TRY_DLOPEN_SELF
1759 # AC_LIBTOOL_DLOPEN_SELF
1760 # -------------------
1761 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1762 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1763 if test "x$enable_dlopen" != xyes; then
1764 enable_dlopen=unknown
1765 enable_dlopen_self=unknown
1766 enable_dlopen_self_static=unknown
1773 lt_cv_dlopen="load_add_on"
1775 lt_cv_dlopen_self=yes
1779 lt_cv_dlopen="LoadLibrary"
1784 lt_cv_dlopen="dlopen"
1789 # if libdl is installed we need to link against it
1790 AC_CHECK_LIB([dl], [dlopen],
1791 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1794 lt_cv_dlopen_self=yes
1799 AC_CHECK_FUNC([shl_load],
1800 [lt_cv_dlopen="shl_load"],
1801 [AC_CHECK_LIB([dld], [shl_load],
1802 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1803 [AC_CHECK_FUNC([dlopen],
1804 [lt_cv_dlopen="dlopen"],
1805 [AC_CHECK_LIB([dl], [dlopen],
1806 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1807 [AC_CHECK_LIB([svld], [dlopen],
1808 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1809 [AC_CHECK_LIB([dld], [dld_link],
1810 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1819 if test "x$lt_cv_dlopen" != xno; then
1825 case $lt_cv_dlopen in
1827 save_CPPFLAGS="$CPPFLAGS"
1828 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1830 save_LDFLAGS="$LDFLAGS"
1831 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1834 LIBS="$lt_cv_dlopen_libs $LIBS"
1836 AC_CACHE_CHECK([whether a program can dlopen itself],
1837 lt_cv_dlopen_self, [dnl
1838 _LT_AC_TRY_DLOPEN_SELF(
1839 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1840 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1843 if test "x$lt_cv_dlopen_self" = xyes; then
1844 LDFLAGS="$LDFLAGS $link_static_flag"
1845 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1846 lt_cv_dlopen_self_static, [dnl
1847 _LT_AC_TRY_DLOPEN_SELF(
1848 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1849 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1853 CPPFLAGS="$save_CPPFLAGS"
1854 LDFLAGS="$save_LDFLAGS"
1859 case $lt_cv_dlopen_self in
1860 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1861 *) enable_dlopen_self=unknown ;;
1864 case $lt_cv_dlopen_self_static in
1865 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1866 *) enable_dlopen_self_static=unknown ;;
1869 ])# AC_LIBTOOL_DLOPEN_SELF
1872 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1873 # ---------------------------------
1874 # Check to see if options -c and -o are simultaneously supported by compiler
1875 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1876 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1877 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1878 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1879 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1880 $rm -r conftest 2>/dev/null
1884 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1886 lt_compiler_flag="-o out/conftest2.$ac_objext"
1887 # Insert the option either (1) after the last *FLAGS variable, or
1888 # (2) before a word containing "conftest.", or (3) at the end.
1889 # Note that $ac_compile itself does not contain backslashes and begins
1890 # with a dollar sign (not a hyphen), so the echo should work correctly.
1891 lt_compile=`echo "$ac_compile" | $SED \
1892 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1893 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1894 -e 's:$: $lt_compiler_flag:'`
1895 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1896 (eval "$lt_compile" 2>out/conftest.err)
1898 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1899 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1900 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1902 # The compiler can only warn and ignore the option if not recognized
1903 # So say no if there are warnings
1904 if test ! -s out/conftest.err; then
1905 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1910 # SGI C++ compiler will create directory out/ii_files/ for
1911 # template instantiation
1912 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1913 $rm out/* && rmdir out
1918 ])# AC_LIBTOOL_PROG_CC_C_O
1921 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1922 # -----------------------------------------
1923 # Check to see if we can do hard links to lock some files if needed
1924 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1925 [AC_REQUIRE([_LT_AC_LOCK])dnl
1927 hard_links="nottested"
1928 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1929 # do not overwrite the value of need_locks provided by the user
1930 AC_MSG_CHECKING([if we can lock with hard links])
1933 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1935 ln conftest.a conftest.b 2>&5 || hard_links=no
1936 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1937 AC_MSG_RESULT([$hard_links])
1938 if test "$hard_links" = no; then
1939 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1945 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1950 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1951 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1952 [rm -f .libs 2>/dev/null
1953 mkdir .libs 2>/dev/null
1954 if test -d .libs; then
1957 # MS-DOS does not allow filenames that begin with a dot.
1960 rmdir .libs 2>/dev/null])
1961 objdir=$lt_cv_objdir
1962 ])# AC_LIBTOOL_OBJDIR
1965 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1966 # ----------------------------------------------
1967 # Check hardcoding attributes.
1968 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1969 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1970 _LT_AC_TAGVAR(hardcode_action, $1)=
1971 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1972 test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1973 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
1975 # We can hardcode non-existant directories.
1976 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1977 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1978 # have to relink, otherwise we might link with an installed library
1979 # when we should be linking with a yet-to-be-installed one
1980 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1981 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1982 # Linking always hardcodes the temporary library directory.
1983 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1985 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1986 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1989 # We cannot hardcode anything, or else we can only hardcode existing
1991 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1993 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1995 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1996 # Fast installation is not supported
1997 enable_fast_install=no
1998 elif test "$shlibpath_overrides_runpath" = yes ||
1999 test "$enable_shared" = no; then
2000 # Fast installation is not necessary
2001 enable_fast_install=needless
2003 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2006 # AC_LIBTOOL_SYS_LIB_STRIP
2007 # ------------------------
2008 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2011 AC_MSG_CHECKING([whether stripping libraries is possible])
2012 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2013 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2014 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2015 AC_MSG_RESULT([yes])
2017 # FIXME - insert some real tests, host_os isn't really good enough
2020 if test -n "$STRIP" ; then
2021 striplib="$STRIP -x"
2022 AC_MSG_RESULT([yes])
2032 ])# AC_LIBTOOL_SYS_LIB_STRIP
2035 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2036 # -----------------------------
2037 # PORTME Fill in your ld.so characteristics
2038 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2039 [AC_MSG_CHECKING([dynamic linker characteristics])
2041 libname_spec='lib$name'
2049 shlibpath_overrides_runpath=unknown
2051 dynamic_linker="$host_os ld.so"
2052 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2053 if test "$GCC" = yes; then
2054 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2055 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2056 # if the path contains ";" then we assume it to be the separator
2057 # otherwise default to the standard path separator (i.e. ":") - it is
2058 # assumed that no part of a normal pathname contains ";" but that should
2059 # okay in the real world where ";" in dirpaths is itself problematic.
2060 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2062 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2065 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2067 need_lib_prefix=unknown
2068 hardcode_into_libs=no
2070 # when you set need_version to no, make sure it does not cause -set_version
2071 # flags to be left without arguments
2072 need_version=unknown
2077 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2078 shlibpath_var=LIBPATH
2080 # AIX 3 has no versioning support, so we append a major version to the name.
2081 soname_spec='${libname}${release}${shared_ext}$major'
2088 hardcode_into_libs=yes
2089 if test "$host_cpu" = ia64; then
2090 # AIX 5 supports IA64
2091 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2092 shlibpath_var=LD_LIBRARY_PATH
2094 # With GCC up to 2.95.x, collect2 would create an import file
2095 # for dependence libraries. The import file would start with
2096 # the line `#! .'. This would cause the generated library to
2097 # depend on `.', always an invalid library. This was fixed in
2098 # development snapshots of GCC prior to 3.0.
2100 aix4 | aix4.[[01]] | aix4.[[01]].*)
2101 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2103 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2110 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2111 # soname into executable. Probably we can add versioning support to
2112 # collect2, so additional links can be useful in future.
2113 if test "$aix_use_runtimelinking" = yes; then
2114 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2115 # instead of lib<name>.a to let people know that these are not
2116 # typical AIX shared libraries.
2117 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2119 # We preserve .a as extension for shared libraries through AIX4.2
2120 # and later when we are not doing run time linking.
2121 library_names_spec='${libname}${release}.a $libname.a'
2122 soname_spec='${libname}${release}${shared_ext}$major'
2124 shlibpath_var=LIBPATH
2129 library_names_spec='$libname.ixlibrary $libname.a'
2130 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2131 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'
2135 library_names_spec='${libname}${shared_ext}'
2136 dynamic_linker="$host_os ld.so"
2137 shlibpath_var=LIBRARY_PATH
2143 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2144 soname_spec='${libname}${release}${shared_ext}$major'
2145 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2146 shlibpath_var=LD_LIBRARY_PATH
2147 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2148 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2149 # the default ld.so.conf also contains /usr/contrib/lib and
2150 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2151 # libtool to hard-code these into programs
2154 cygwin* | mingw* | pw32*)
2155 version_type=windows
2160 case $GCC,$host_os in
2161 yes,cygwin* | yes,mingw* | yes,pw32*)
2162 library_names_spec='$libname.dll.a'
2163 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2164 postinstall_cmds='base_file=`basename \${file}`~
2165 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2166 dldir=$destdir/`dirname \$dlpath`~
2167 test -d \$dldir || mkdir -p \$dldir~
2168 $install_prog $dir/$dlname \$dldir/$dlname'
2169 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2170 dlpath=$dir/\$dldll~
2172 shlibpath_overrides_runpath=yes
2176 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2177 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2178 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2181 # MinGW DLLs use traditional 'lib' prefix
2182 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2183 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2184 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2185 # It is most probably a Windows format PATH printed by
2186 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2187 # path with ; separators, and with drive letters. We can handle the
2188 # drive letters (cygwin fileutils understands them), so leave them,
2189 # especially as we might pass files found there to a mingw objdump,
2190 # which wouldn't understand a cygwinified path. Ahh.
2191 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2193 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2197 # pw32 DLLs use 'pw' prefix rather than 'lib'
2198 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
2204 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2207 dynamic_linker='Win32 ld.exe'
2208 # FIXME: first we should search . and the directory the executable is in
2212 darwin* | rhapsody*)
2213 dynamic_linker="$host_os dyld"
2217 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2218 soname_spec='${libname}${release}${major}$shared_ext'
2219 shlibpath_overrides_runpath=yes
2220 shlibpath_var=DYLD_LIBRARY_PATH
2221 shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
2222 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2223 if test "$GCC" = yes; then
2224 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"`
2226 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2228 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2235 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2236 soname_spec='${libname}${release}${shared_ext}$major'
2237 shlibpath_var=LD_LIBRARY_PATH
2248 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2249 soname_spec='${libname}${release}${shared_ext}$major'
2250 shlibpath_var=LD_LIBRARY_PATH
2251 shlibpath_overrides_runpath=no
2252 hardcode_into_libs=yes
2253 dynamic_linker='GNU ld.so'
2257 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2258 version_type=freebsd-$objformat
2259 case $version_type in
2261 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2266 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2270 shlibpath_var=LD_LIBRARY_PATH
2273 shlibpath_overrides_runpath=yes
2275 freebsd3.[01]* | freebsdelf3.[01]*)
2276 shlibpath_overrides_runpath=yes
2277 hardcode_into_libs=yes
2280 shlibpath_overrides_runpath=no
2281 hardcode_into_libs=yes
2290 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2291 soname_spec='${libname}${release}${shared_ext}$major'
2292 shlibpath_var=LD_LIBRARY_PATH
2293 hardcode_into_libs=yes
2296 hpux9* | hpux10* | hpux11*)
2297 # Give a soname corresponding to the major version so that dld.sl refuses to
2298 # link against other versions.
2305 hardcode_into_libs=yes
2306 dynamic_linker="$host_os dld.so"
2307 shlibpath_var=LD_LIBRARY_PATH
2308 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2309 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2310 soname_spec='${libname}${release}${shared_ext}$major'
2311 if test "X$HPUX_IA64_MODE" = X32; then
2312 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2314 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2316 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2320 hardcode_into_libs=yes
2321 dynamic_linker="$host_os dld.sl"
2322 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2323 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2324 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2325 soname_spec='${libname}${release}${shared_ext}$major'
2326 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2327 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2331 dynamic_linker="$host_os dld.sl"
2332 shlibpath_var=SHLIB_PATH
2333 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2334 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2335 soname_spec='${libname}${release}${shared_ext}$major'
2338 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2339 postinstall_cmds='chmod 555 $lib'
2342 irix5* | irix6* | nonstopux*)
2344 nonstopux*) version_type=nonstopux ;;
2346 if test "$lt_cv_prog_gnu_ld" = yes; then
2354 soname_spec='${libname}${release}${shared_ext}$major'
2355 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2357 irix5* | nonstopux*)
2361 case $LD in # libtool.m4 will add one of these switches to LD
2362 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2363 libsuff= shlibsuff= libmagic=32-bit;;
2364 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2365 libsuff=32 shlibsuff=N32 libmagic=N32;;
2366 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2367 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2368 *) libsuff= shlibsuff= libmagic=never-match;;
2372 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2373 shlibpath_overrides_runpath=no
2374 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2375 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2376 hardcode_into_libs=yes
2379 # No shared lib support for Linux oldld, aout, or coff.
2380 linux*oldld* | linux*aout* | linux*coff*)
2384 # This must be Linux ELF.
2389 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2390 soname_spec='${libname}${release}${shared_ext}$major'
2391 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2392 shlibpath_var=LD_LIBRARY_PATH
2393 shlibpath_overrides_runpath=no
2394 # This implies no fast_install, which is unacceptable.
2395 # Some rework will be needed to allow for fast_install
2396 # before this can be enabled.
2397 hardcode_into_libs=yes
2399 # Append ld.so.conf contents to the search path
2400 if test -f /etc/ld.so.conf; then
2401 lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
2402 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2405 # We used to test for /lib/ld.so.1 and disable shared libraries on
2406 # powerpc, because MkLinux only supported shared libraries with the
2407 # GNU dynamic linker. Since this was broken with cross compilers,
2408 # most powerpc-linux boxes support dynamic linking these days and
2409 # people can always --disable-shared, the test was removed, and we
2410 # assume the GNU/Linux dynamic linker is in use.
2411 dynamic_linker='GNU/Linux ld.so'
2418 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2419 soname_spec='${libname}${release}${shared_ext}$major'
2420 shlibpath_var=LD_LIBRARY_PATH
2421 shlibpath_overrides_runpath=no
2422 hardcode_into_libs=yes
2423 dynamic_linker='NetBSD ld.elf_so'
2430 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2431 soname_spec='${libname}${release}${shared_ext}$major'
2432 shlibpath_var=LD_LIBRARY_PATH
2433 shlibpath_overrides_runpath=no
2434 hardcode_into_libs=yes
2435 dynamic_linker='GNU ld.so'
2442 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2443 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2444 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2445 dynamic_linker='NetBSD (a.out) ld.so'
2447 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2448 soname_spec='${libname}${release}${shared_ext}$major'
2449 dynamic_linker='NetBSD ld.elf_so'
2451 shlibpath_var=LD_LIBRARY_PATH
2452 shlibpath_overrides_runpath=yes
2453 hardcode_into_libs=yes
2458 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2459 shlibpath_var=LD_LIBRARY_PATH
2460 shlibpath_overrides_runpath=yes
2467 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2468 soname_spec='${libname}${release}${shared_ext}$major'
2469 shlibpath_var=LD_LIBRARY_PATH
2470 shlibpath_overrides_runpath=yes
2477 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2478 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2479 shlibpath_var=LD_LIBRARY_PATH
2480 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2482 openbsd2.[[89]] | openbsd2.[[89]].*)
2483 shlibpath_overrides_runpath=no
2486 shlibpath_overrides_runpath=yes
2490 shlibpath_overrides_runpath=yes
2495 libname_spec='$name'
2498 library_names_spec='$libname${shared_ext} $libname.a'
2499 dynamic_linker='OS/2 ld.exe'
2500 shlibpath_var=LIBPATH
2503 osf3* | osf4* | osf5*)
2507 soname_spec='${libname}${release}${shared_ext}$major'
2508 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2509 shlibpath_var=LD_LIBRARY_PATH
2510 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2511 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2516 soname_spec='${libname}${release}${shared_ext}$major'
2517 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2518 shlibpath_var=LD_LIBRARY_PATH
2525 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2526 soname_spec='${libname}${release}${shared_ext}$major'
2527 shlibpath_var=LD_LIBRARY_PATH
2528 shlibpath_overrides_runpath=yes
2529 hardcode_into_libs=yes
2530 # ldd complains unless libraries are executable
2531 postinstall_cmds='chmod +x $lib'
2536 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2537 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2538 shlibpath_var=LD_LIBRARY_PATH
2539 shlibpath_overrides_runpath=yes
2540 if test "$with_gnu_ld" = yes; then
2546 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2548 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2549 soname_spec='${libname}${release}${shared_ext}$major'
2550 shlibpath_var=LD_LIBRARY_PATH
2551 case $host_vendor in
2553 shlibpath_overrides_runpath=no
2555 export_dynamic_flag_spec='${wl}-Blargedynsym'
2556 runpath_var=LD_RUN_PATH
2564 shlibpath_overrides_runpath=no
2565 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2571 if test -d /usr/nec ;then
2573 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2574 soname_spec='$libname${shared_ext}.$major'
2575 shlibpath_var=LD_LIBRARY_PATH
2581 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2582 soname_spec='${libname}${release}${shared_ext}$major'
2583 shlibpath_var=LD_LIBRARY_PATH
2590 AC_MSG_RESULT([$dynamic_linker])
2591 test "$dynamic_linker" = no && can_build_shared=no
2592 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2597 AC_DEFUN([_LT_AC_TAGCONFIG],
2598 [AC_ARG_WITH([tags],
2599 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2600 [include additional configurations @<:@automatic@:>@])],
2601 [tagnames="$withval"])
2603 if test -f "$ltmain" && test -n "$tagnames"; then
2604 if test ! -f "${ofile}"; then
2605 AC_MSG_WARN([output file `$ofile' does not exist])
2608 if test -z "$LTCC"; then
2609 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2610 if test -z "$LTCC"; then
2611 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2613 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2617 # Extract list of available tagged configurations in $ofile.
2618 # Note that this assumes the entire list is on one line.
2619 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2621 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2622 for tagname in $tagnames; do
2624 # Check whether tagname contains only valid characters
2625 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2627 *) AC_MSG_ERROR([invalid tag name: $tagname])
2631 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2633 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2636 # Update the list of available tags.
2637 if test -n "$tagname"; then
2638 echo appending configuration tag \"$tagname\" to $ofile
2642 if test -n "$CXX" && test "X$CXX" != "Xno"; then
2643 AC_LIBTOOL_LANG_CXX_CONFIG
2650 if test -n "$F77" && test "X$F77" != "Xno"; then
2651 AC_LIBTOOL_LANG_F77_CONFIG
2658 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2659 AC_LIBTOOL_LANG_GCJ_CONFIG
2666 AC_LIBTOOL_LANG_RC_CONFIG
2670 AC_MSG_ERROR([Unsupported tag name: $tagname])
2674 # Append the new tag name to the list of available tags.
2675 if test -n "$tagname" ; then
2676 available_tags="$available_tags $tagname"
2682 # Now substitute the updated list of available tags.
2683 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2684 mv "${ofile}T" "$ofile"
2688 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2691 ])# _LT_AC_TAGCONFIG
2696 # enable checks for dlopen support
2697 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2698 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2699 ])# AC_LIBTOOL_DLOPEN
2702 # AC_LIBTOOL_WIN32_DLL
2703 # --------------------
2704 # declare package support for building win32 dll's
2705 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2706 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2707 ])# AC_LIBTOOL_WIN32_DLL
2710 # AC_ENABLE_SHARED([DEFAULT])
2711 # ---------------------------
2712 # implement the --enable-shared flag
2713 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2714 AC_DEFUN([AC_ENABLE_SHARED],
2715 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2716 AC_ARG_ENABLE([shared],
2717 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2718 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2719 [p=${PACKAGE-default}
2721 yes) enable_shared=yes ;;
2722 no) enable_shared=no ;;
2725 # Look at the argument we got. We use all the common list separators.
2726 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2727 for pkg in $enableval; do
2729 if test "X$pkg" = "X$p"; then
2736 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2737 ])# AC_ENABLE_SHARED
2742 #- set the default shared flag to --disable-shared
2743 AC_DEFUN([AC_DISABLE_SHARED],
2744 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2745 AC_ENABLE_SHARED(no)
2746 ])# AC_DISABLE_SHARED
2749 # AC_ENABLE_STATIC([DEFAULT])
2750 # ---------------------------
2751 # implement the --enable-static flag
2752 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2753 AC_DEFUN([AC_ENABLE_STATIC],
2754 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2755 AC_ARG_ENABLE([static],
2756 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2757 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2758 [p=${PACKAGE-default}
2760 yes) enable_static=yes ;;
2761 no) enable_static=no ;;
2764 # Look at the argument we got. We use all the common list separators.
2765 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2766 for pkg in $enableval; do
2768 if test "X$pkg" = "X$p"; then
2775 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2776 ])# AC_ENABLE_STATIC
2781 # set the default static flag to --disable-static
2782 AC_DEFUN([AC_DISABLE_STATIC],
2783 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2784 AC_ENABLE_STATIC(no)
2785 ])# AC_DISABLE_STATIC
2788 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2789 # ---------------------------------
2790 # implement the --enable-fast-install flag
2791 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2792 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2793 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2794 AC_ARG_ENABLE([fast-install],
2795 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2796 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2797 [p=${PACKAGE-default}
2799 yes) enable_fast_install=yes ;;
2800 no) enable_fast_install=no ;;
2802 enable_fast_install=no
2803 # Look at the argument we got. We use all the common list separators.
2804 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2805 for pkg in $enableval; do
2807 if test "X$pkg" = "X$p"; then
2808 enable_fast_install=yes
2814 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2815 ])# AC_ENABLE_FAST_INSTALL
2818 # AC_DISABLE_FAST_INSTALL
2819 # -----------------------
2820 # set the default to --disable-fast-install
2821 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2822 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2823 AC_ENABLE_FAST_INSTALL(no)
2824 ])# AC_DISABLE_FAST_INSTALL
2827 # AC_LIBTOOL_PICMODE([MODE])
2828 # --------------------------
2829 # implement the --with-pic flag
2830 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2831 AC_DEFUN([AC_LIBTOOL_PICMODE],
2832 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2833 pic_mode=ifelse($#,1,$1,default)
2834 ])# AC_LIBTOOL_PICMODE
2839 # This is predefined starting with Autoconf 2.54, so this conditional
2840 # definition can be removed once we require Autoconf 2.54 or later.
2841 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2842 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2843 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2844 then ac_cv_prog_egrep='grep -E'
2845 else ac_cv_prog_egrep='egrep'
2847 EGREP=$ac_cv_prog_egrep
2852 # AC_PATH_TOOL_PREFIX
2853 # -------------------
2854 # find a file program which can recognise shared library
2855 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2856 [AC_REQUIRE([AC_PROG_EGREP])dnl
2857 AC_MSG_CHECKING([for $1])
2858 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2860 [[\\/*] | ?:[\\/]*])
2861 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2864 lt_save_MAGIC_CMD="$MAGIC_CMD"
2865 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2866 dnl $ac_dummy forces splitting on constant user-supplied paths.
2867 dnl POSIX.2 word splitting is done only on the output of word expansions,
2868 dnl not every word. This closes a longstanding sh security hole.
2869 ac_dummy="ifelse([$2], , $PATH, [$2])"
2870 for ac_dir in $ac_dummy; do
2872 test -z "$ac_dir" && ac_dir=.
2873 if test -f $ac_dir/$1; then
2874 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2875 if test -n "$file_magic_test_file"; then
2876 case $deplibs_check_method in
2878 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2879 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2880 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2881 $EGREP "$file_magic_regex" > /dev/null; then
2886 *** Warning: the command libtool uses to detect shared libraries,
2887 *** $file_magic_cmd, produces output that libtool cannot recognize.
2888 *** The result is that libtool may fail to recognize shared libraries
2889 *** as such. This will affect the creation of libtool libraries that
2890 *** depend on shared libraries, but programs linked with such libtool
2891 *** libraries will work regardless of this problem. Nevertheless, you
2892 *** may want to report the problem to your system manager and/or to
2893 *** bug-libtool@gnu.org
2903 MAGIC_CMD="$lt_save_MAGIC_CMD"
2906 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2907 if test -n "$MAGIC_CMD"; then
2908 AC_MSG_RESULT($MAGIC_CMD)
2912 ])# AC_PATH_TOOL_PREFIX
2917 # find a file program which can recognise a shared library
2918 AC_DEFUN([AC_PATH_MAGIC],
2919 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2920 if test -z "$lt_cv_path_MAGIC_CMD"; then
2921 if test -n "$ac_tool_prefix"; then
2922 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2932 # find the pathname to the GNU or non-GNU linker
2933 AC_DEFUN([AC_PROG_LD],
2934 [AC_ARG_WITH([gnu-ld],
2935 [AC_HELP_STRING([--with-gnu-ld],
2936 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2937 [test "$withval" = no || with_gnu_ld=yes],
2939 AC_REQUIRE([LT_AC_PROG_SED])dnl
2940 AC_REQUIRE([AC_PROG_CC])dnl
2941 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2942 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2944 if test "$GCC" = yes; then
2945 # Check if gcc -print-prog-name=ld gives a path.
2946 AC_MSG_CHECKING([for ld used by $CC])
2949 # gcc leaves a trailing carriage return which upsets mingw
2950 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2952 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2955 # Accept absolute paths.
2956 [[\\/]]* | ?:[[\\/]]*)
2957 re_direlt='/[[^/]][[^/]]*/\.\./'
2958 # Canonicalize the pathname of ld
2959 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2960 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2961 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2963 test -z "$LD" && LD="$ac_prog"
2966 # If it fails, then pretend we aren't using GCC.
2970 # If it is relative, then search for the first ld in PATH.
2974 elif test "$with_gnu_ld" = yes; then
2975 AC_MSG_CHECKING([for GNU ld])
2977 AC_MSG_CHECKING([for non-GNU ld])
2979 AC_CACHE_VAL(lt_cv_path_LD,
2980 [if test -z "$LD"; then
2981 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2982 for ac_dir in $PATH; do
2984 test -z "$ac_dir" && ac_dir=.
2985 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2986 lt_cv_path_LD="$ac_dir/$ac_prog"
2987 # Check to see if the program is GNU ld. I'd rather use --version,
2988 # but apparently some GNU ld's only accept -v.
2989 # Break only if it was the GNU/non-GNU ld that we prefer.
2990 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2991 *GNU* | *'with BFD'*)
2992 test "$with_gnu_ld" != no && break
2995 test "$with_gnu_ld" != yes && break
3002 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3005 if test -n "$LD"; then
3010 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3017 AC_DEFUN([AC_PROG_LD_GNU],
3018 [AC_REQUIRE([AC_PROG_EGREP])dnl
3019 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3020 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3021 case `$LD -v 2>&1 </dev/null` in
3022 *GNU* | *'with BFD'*)
3023 lt_cv_prog_gnu_ld=yes
3026 lt_cv_prog_gnu_ld=no
3029 with_gnu_ld=$lt_cv_prog_gnu_ld
3033 # AC_PROG_LD_RELOAD_FLAG
3034 # ----------------------
3035 # find reload flag for linker
3036 # -- PORTME Some linkers may need a different reload flag.
3037 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3038 [AC_CACHE_CHECK([for $LD option to reload object files],
3039 lt_cv_ld_reload_flag,
3040 [lt_cv_ld_reload_flag='-r'])
3041 reload_flag=$lt_cv_ld_reload_flag
3042 case $reload_flag in
3044 *) reload_flag=" $reload_flag" ;;
3046 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3047 ])# AC_PROG_LD_RELOAD_FLAG
3050 # AC_DEPLIBS_CHECK_METHOD
3051 # -----------------------
3052 # how to check for library dependencies
3053 # -- PORTME fill in with the dynamic library characteristics
3054 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3055 [AC_CACHE_CHECK([how to recognise dependent libraries],
3056 lt_cv_deplibs_check_method,
3057 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3058 lt_cv_file_magic_test_file=
3059 lt_cv_deplibs_check_method='unknown'
3060 # Need to set the preceding variable on all platforms that support
3061 # interlibrary dependencies.
3062 # 'none' -- dependencies not supported.
3063 # `unknown' -- same as none, but documents that we really don't know.
3064 # 'pass_all' -- all dependencies passed with no checks.
3065 # 'test_compile' -- check by making test program.
3066 # 'file_magic [[regex]]' -- check by looking for files in library path
3067 # which responds to the $file_magic_cmd with a given extended regex.
3068 # If you have `file' or equivalent on your system and you're not sure
3069 # whether `pass_all' will *always* work, you probably want this one.
3073 lt_cv_deplibs_check_method=pass_all
3077 lt_cv_deplibs_check_method=pass_all
3081 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3082 lt_cv_file_magic_cmd='/usr/bin/file -L'
3083 lt_cv_file_magic_test_file=/shlib/libc.so
3087 # func_win32_libid is a shell function defined in ltmain.sh
3088 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3089 lt_cv_file_magic_cmd='func_win32_libid'
3093 # Base MSYS/MinGW do not provide the 'file' command needed by
3094 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3095 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3096 lt_cv_file_magic_cmd='$OBJDUMP -f'
3099 darwin* | rhapsody*)
3100 lt_cv_deplibs_check_method=pass_all
3103 freebsd* | kfreebsd*-gnu)
3104 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3107 # Not sure whether the presence of OpenBSD here was a mistake.
3108 # Let's accept both of them until this is cleared up.
3109 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3110 lt_cv_file_magic_cmd=/usr/bin/file
3111 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3115 lt_cv_deplibs_check_method=pass_all
3120 lt_cv_deplibs_check_method=pass_all
3123 hpux10.20* | hpux11*)
3124 lt_cv_file_magic_cmd=/usr/bin/file
3127 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3128 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3131 [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]']
3132 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3135 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3136 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3141 irix5* | irix6* | nonstopux*)
3143 *-32|*"-32 ") libmagic=32-bit;;
3144 *-n32|*"-n32 ") libmagic=N32;;
3145 *-64|*"-64 ") libmagic=64-bit;;
3146 *) libmagic=never-match;;
3148 lt_cv_deplibs_check_method=pass_all
3151 # This must be Linux ELF.
3153 lt_cv_deplibs_check_method=pass_all
3156 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
3157 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3158 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3160 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3165 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3166 lt_cv_file_magic_cmd=/usr/bin/file
3167 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3171 lt_cv_deplibs_check_method=unknown
3175 lt_cv_file_magic_cmd=/usr/bin/file
3176 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3177 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3178 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3180 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3184 osf3* | osf4* | osf5*)
3185 lt_cv_deplibs_check_method=pass_all
3189 lt_cv_deplibs_check_method=pass_all
3193 lt_cv_deplibs_check_method=pass_all
3196 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3197 case $host_vendor in
3199 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]]'
3200 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3203 lt_cv_deplibs_check_method=pass_all
3206 lt_cv_file_magic_cmd='/bin/file'
3207 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3210 lt_cv_file_magic_cmd='/bin/file'
3211 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3212 lt_cv_file_magic_test_file=/lib/libc.so
3215 lt_cv_deplibs_check_method=pass_all
3220 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3221 lt_cv_deplibs_check_method=pass_all
3225 file_magic_cmd=$lt_cv_file_magic_cmd
3226 deplibs_check_method=$lt_cv_deplibs_check_method
3227 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3228 ])# AC_DEPLIBS_CHECK_METHOD
3233 # find the pathname to a BSD-compatible name lister
3234 AC_DEFUN([AC_PROG_NM],
3235 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3236 [if test -n "$NM"; then
3237 # Let the user override the test.
3240 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3241 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3243 test -z "$ac_dir" && ac_dir=.
3244 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3245 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3246 # Check to see if the nm accepts a BSD-compat flag.
3247 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3248 # nm: unknown option "B" ignored
3249 # Tru64's nm complains that /dev/null is an invalid object file
3250 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3251 */dev/null* | *'Invalid file or object type'*)
3252 lt_cv_path_NM="$tmp_nm -B"
3256 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3258 lt_cv_path_NM="$tmp_nm -p"
3262 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3263 continue # so that we can try to find one that supports BSD flags
3270 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3278 # check for math library
3279 AC_DEFUN([AC_CHECK_LIBM],
3280 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3283 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3284 # These system don't have libm, or don't need it
3287 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3288 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3291 AC_CHECK_LIB(m, cos, LIBM="-lm")
3297 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3298 # -----------------------------------
3299 # sets LIBLTDL to the link flags for the libltdl convenience library and
3300 # LTDLINCL to the include flags for the libltdl header and adds
3301 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
3302 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3303 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
3304 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3305 # '${top_srcdir}/' (note the single quotes!). If your package is not
3306 # flat and you're not using automake, define top_builddir and
3307 # top_srcdir appropriately in the Makefiles.
3308 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3309 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3310 case $enable_ltdl_convenience in
3311 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3312 "") enable_ltdl_convenience=yes
3313 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3315 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3316 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3317 # For backwards non-gettext consistent compatibility...
3319 ])# AC_LIBLTDL_CONVENIENCE
3322 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3323 # -----------------------------------
3324 # sets LIBLTDL to the link flags for the libltdl installable library and
3325 # LTDLINCL to the include flags for the libltdl header and adds
3326 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
3327 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3328 # DIRECTORY is not provided and an installed libltdl is not found, it is
3329 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
3330 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3331 # quotes!). If your package is not flat and you're not using automake,
3332 # define top_builddir and top_srcdir appropriately in the Makefiles.
3333 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3334 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3335 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3336 AC_CHECK_LIB(ltdl, lt_dlinit,
3337 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3338 [if test x"$enable_ltdl_install" = xno; then
3339 AC_MSG_WARN([libltdl not installed, but installation disabled])
3341 enable_ltdl_install=yes
3344 if test x"$enable_ltdl_install" = x"yes"; then
3345 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3346 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3347 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3349 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3353 # For backwards non-gettext consistent compatibility...
3355 ])# AC_LIBLTDL_INSTALLABLE
3360 # enable support for C++ libraries
3361 AC_DEFUN([AC_LIBTOOL_CXX],
3362 [AC_REQUIRE([_LT_AC_LANG_CXX])
3368 AC_DEFUN([_LT_AC_LANG_CXX],
3369 [AC_REQUIRE([AC_PROG_CXX])
3370 AC_REQUIRE([AC_PROG_CXXCPP])
3371 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3377 # enable support for Fortran 77 libraries
3378 AC_DEFUN([AC_LIBTOOL_F77],
3379 [AC_REQUIRE([_LT_AC_LANG_F77])
3385 AC_DEFUN([_LT_AC_LANG_F77],
3386 [AC_REQUIRE([AC_PROG_F77])
3387 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3393 # enable support for GCJ libraries
3394 AC_DEFUN([AC_LIBTOOL_GCJ],
3395 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3401 AC_DEFUN([_LT_AC_LANG_GCJ],
3402 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3403 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3404 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3405 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3406 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3407 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3408 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3414 # enable support for Windows resource files
3415 AC_DEFUN([AC_LIBTOOL_RC],
3416 [AC_REQUIRE([LT_AC_PROG_RC])
3417 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3421 # AC_LIBTOOL_LANG_C_CONFIG
3422 # ------------------------
3423 # Ensure that the configuration vars for the C compiler are
3424 # suitably defined. Those variables are subsequently used by
3425 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3426 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3427 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3431 # Source file extension for C test sources.
3434 # Object file extension for compiled C test sources.
3436 _LT_AC_TAGVAR(objext, $1)=$objext
3438 # Code to be used in simple compile tests
3439 lt_simple_compile_test_code="int some_variable = 0;\n"
3441 # Code to be used in simple link tests
3442 lt_simple_link_test_code='int main(){return(0);}\n'
3447 # Check for any special shared library compilation flags.
3449 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3450 if test "$GCC" = no; then
3453 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3457 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3458 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3459 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
3461 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3462 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3468 # Check to make sure the static flag actually works.
3470 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3471 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3472 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3474 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3477 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3478 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3479 AC_LIBTOOL_PROG_CC_C_O($1)
3480 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3481 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3482 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3483 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3484 AC_LIBTOOL_SYS_LIB_STRIP
3485 AC_LIBTOOL_DLOPEN_SELF($1)
3487 # Report which librarie types wil actually be built
3488 AC_MSG_CHECKING([if libtool supports shared libraries])
3489 AC_MSG_RESULT([$can_build_shared])
3491 AC_MSG_CHECKING([whether to build shared libraries])
3492 test "$can_build_shared" = "no" && enable_shared=no
3494 # On AIX, shared libraries and static libraries use the same namespace, and
3495 # are all built from PIC.
3498 test "$enable_shared" = yes && enable_static=no
3499 if test -n "$RANLIB"; then
3500 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3501 postinstall_cmds='$RANLIB $lib'
3506 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3507 test "$enable_shared" = yes && enable_static=no
3510 darwin* | rhapsody*)
3511 if test "$GCC" = yes; then
3512 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3514 rhapsody* | darwin1.[[012]])
3515 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3518 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3519 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3521 case ${MACOSX_DEPLOYMENT_TARGET} in
3523 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3526 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3532 output_verbose_link_cmd='echo'
3533 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
3534 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3535 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3536 _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}'
3537 _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}'
3538 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3539 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3540 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3541 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3542 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3544 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3548 AC_MSG_RESULT([$enable_shared])
3550 AC_MSG_CHECKING([whether to build static libraries])
3551 # Make sure either enable_shared or enable_static is yes.
3552 test "$enable_shared" = yes || enable_static=yes
3553 AC_MSG_RESULT([$enable_static])
3555 AC_LIBTOOL_CONFIG($1)
3559 ])# AC_LIBTOOL_LANG_C_CONFIG
3562 # AC_LIBTOOL_LANG_CXX_CONFIG
3563 # --------------------------
3564 # Ensure that the configuration vars for the C compiler are
3565 # suitably defined. Those variables are subsequently used by
3566 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3567 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3568 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3570 AC_REQUIRE([AC_PROG_CXX])
3571 AC_REQUIRE([AC_PROG_CXXCPP])
3573 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3574 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3575 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3576 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3577 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3578 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3579 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3580 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3581 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3582 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3583 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3584 _LT_AC_TAGVAR(module_cmds, $1)=
3585 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3586 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3587 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3588 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3589 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3590 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3592 # Dependencies to place before and after the object being linked:
3593 _LT_AC_TAGVAR(predep_objects, $1)=
3594 _LT_AC_TAGVAR(postdep_objects, $1)=
3595 _LT_AC_TAGVAR(predeps, $1)=
3596 _LT_AC_TAGVAR(postdeps, $1)=
3597 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3599 # Source file extension for C++ test sources.
3602 # Object file extension for compiled C++ test sources.
3604 _LT_AC_TAGVAR(objext, $1)=$objext
3606 # Code to be used in simple compile tests
3607 lt_simple_compile_test_code="int some_variable = 0;\n"
3609 # Code to be used in simple link tests
3610 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3612 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3615 # Allow CC to be a program name with arguments.
3620 lt_save_with_gnu_ld=$with_gnu_ld
3621 lt_save_path_LD=$lt_cv_path_LD
3622 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3623 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3625 unset lt_cv_prog_gnu_ld
3627 if test -n "${lt_cv_path_LDCXX+set}"; then
3628 lt_cv_path_LD=$lt_cv_path_LDCXX
3632 test -z "${LDCXX+set}" || LD=$LDCXX
3635 _LT_AC_TAGVAR(compiler, $1)=$CC
3636 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3638 # We don't want -fno-exception wen compiling C++ code, so set the
3639 # no_builtin_flag separately
3640 if test "$GXX" = yes; then
3641 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3643 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3646 if test "$GXX" = yes; then
3647 # Set up default GNU C++ configuration
3651 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3652 # archiving commands below assume that GNU ld is being used.
3653 if test "$with_gnu_ld" = yes; then
3654 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3655 _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'
3657 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3658 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3660 # If archive_cmds runs LD, not CC, wlarc should be empty
3661 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3662 # investigate it a little bit more. (MM)
3665 # ancient GNU ld didn't support --whole-archive et. al.
3666 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3667 grep 'no-whole-archive' > /dev/null; then
3668 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3670 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3676 # A generic and very simple default shared library creation
3677 # command for GNU C++ for the case where it uses the native
3678 # linker, instead of GNU ld. If possible, this setting should
3679 # overridden to take advantage of the native linker features on
3680 # the platform it is being used on.
3681 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3684 # Commands to make compiler produce verbose output that lists
3685 # what "hidden" libraries, object files and flags are used when
3686 # linking a shared library.
3687 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3695 # PORTME: fill in a description of your system's C++ link characteristics
3696 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3697 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3700 # FIXME: insert proper C++ library support
3701 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3704 if test "$host_cpu" = ia64; then
3705 # On IA64, the linker does run time linking by default, so we don't
3706 # have to do anything special.
3707 aix_use_runtimelinking=no
3708 exp_sym_flag='-Bexport'
3711 aix_use_runtimelinking=no
3713 # Test if we are trying to use run time linking or normal
3714 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3715 # need to do runtime linking.
3716 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3717 for ld_flag in $LDFLAGS; do
3720 aix_use_runtimelinking=yes
3727 exp_sym_flag='-bexport'
3728 no_entry_flag='-bnoentry'
3731 # When large executables or shared objects are built, AIX ld can
3732 # have problems creating the table of contents. If linking a library
3733 # or program results in "error TOC overflow" add -mminimal-toc to
3734 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3735 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3737 _LT_AC_TAGVAR(archive_cmds, $1)=''
3738 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3739 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3740 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3742 if test "$GXX" = yes; then
3743 case $host_os in aix4.[012]|aix4.[012].*)
3744 # We only want to do this on AIX 4.2 and lower, the check
3745 # below for broken collect2 doesn't work under 4.3+
3746 collect2name=`${CC} -print-prog-name=collect2`
3747 if test -f "$collect2name" && \
3748 strings "$collect2name" | grep resolve_lib_name >/dev/null
3750 # We have reworked collect2
3751 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3753 # We have old collect2
3754 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3755 # It fails to find uninstalled libraries when the uninstalled
3756 # path is not listed in the libpath. Setting hardcode_minus_L
3757 # to unsupported forces relinking
3758 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3759 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3760 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3763 shared_flag='-shared'
3766 if test "$host_cpu" = ia64; then
3767 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3768 # chokes on -Wl,-G. The following line is correct:
3771 if test "$aix_use_runtimelinking" = yes; then
3772 shared_flag='${wl}-G'
3774 shared_flag='${wl}-bM:SRE'
3779 # It seems that -bexpall does not export symbols beginning with
3780 # underscore (_), so it is better to generate a list of symbols to export.
3781 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3782 if test "$aix_use_runtimelinking" = yes; then
3783 # Warning - without using the other runtime loading flags (-brtl),
3784 # -berok will link without error, but may produce a broken library.
3785 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3786 # Determine the default libpath from the value encoded in an empty executable.
3787 _LT_AC_SYS_LIBPATH_AIX
3788 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3790 _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"
3792 if test "$host_cpu" = ia64; then
3793 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3794 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3795 _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"
3797 # Determine the default libpath from the value encoded in an empty executable.
3798 _LT_AC_SYS_LIBPATH_AIX
3799 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3800 # Warning - without using the other run time loading flags,
3801 # -berok will link without error, but may produce a broken library.
3802 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3803 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3804 # -bexpall does not export symbols beginning with underscore (_)
3805 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3806 # Exported symbols can be pulled into shared objects from archives
3807 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3808 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3809 # This is similar to how AIX traditionally builds it's shared libraries.
3810 _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'
3815 case $cc_basename in
3817 # FIXME: insert proper C++ library support
3818 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3823 cygwin* | mingw* | pw32*)
3824 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3825 # as there is no search path for DLLs.
3826 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3827 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3828 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3829 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3831 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3832 _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'
3833 # If the export-symbols file already is a .def file (1st line
3834 # is EXPORTS), use it as is; otherwise, prepend...
3835 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3836 cp $export_symbols $output_objdir/$soname.def;
3838 echo EXPORTS > $output_objdir/$soname.def;
3839 cat $export_symbols >> $output_objdir/$soname.def;
3841 $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'
3843 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3847 darwin* | rhapsody*)
3848 if test "$GXX" = yes; then
3849 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3851 rhapsody* | darwin1.[[012]])
3852 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3855 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3856 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3858 case ${MACOSX_DEPLOYMENT_TARGET} in
3860 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3863 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3869 lt_int_apple_cc_single_mod=no
3870 output_verbose_link_cmd='echo'
3871 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3872 lt_int_apple_cc_single_mod=yes
3874 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3875 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3877 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
3879 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3881 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3882 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3883 _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}'
3885 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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}'
3887 _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}'
3888 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3889 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3890 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3891 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3892 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3894 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3899 case $cc_basename in
3901 # FIXME: insert proper C++ library support
3902 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3905 # Green Hills C++ Compiler
3906 # FIXME: insert proper C++ library support
3907 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3910 # FIXME: insert proper C++ library support
3911 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3916 # C++ shared libraries reported to be fairly broken before switch to ELF
3917 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3920 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3922 freebsd* | kfreebsd*-gnu)
3923 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3925 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3930 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3931 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3932 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3933 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3934 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3935 # but as the default
3936 # location of the library.
3938 case $cc_basename in
3940 # FIXME: insert proper C++ library support
3941 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3944 _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'
3945 # Commands to make compiler produce verbose output that lists
3946 # what "hidden" libraries, object files and flags are used when
3947 # linking a shared library.
3949 # There doesn't appear to be a way to prevent this compiler from
3950 # explicitly linking system object files so we need to strip them
3951 # from the output so that they don't get included in the library
3953 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'
3956 if test "$GXX" = yes; then
3957 _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'
3959 # FIXME: insert proper C++ library support
3960 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3966 if test $with_gnu_ld = no; then
3969 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3970 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3971 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3974 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3977 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3978 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3979 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3985 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3986 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3989 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3990 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3991 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3992 # but as the default
3993 # location of the library.
3996 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3997 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3998 # but as the default
3999 # location of the library.
4003 case $cc_basename in
4005 # FIXME: insert proper C++ library support
4006 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4011 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4014 _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'
4017 # Commands to make compiler produce verbose output that lists
4018 # what "hidden" libraries, object files and flags are used when
4019 # linking a shared library.
4021 # There doesn't appear to be a way to prevent this compiler from
4022 # explicitly linking system object files so we need to strip them
4023 # from the output so that they don't get included in the library
4025 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'
4028 if test "$GXX" = yes; then
4029 if test $with_gnu_ld = no; then
4032 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4035 _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'
4040 # FIXME: insert proper C++ library support
4041 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4047 case $cc_basename in
4050 _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'
4052 # Archives containing C++ object files must be created using
4053 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
4054 # necessary to make sure instantiated templates are included
4056 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4059 if test "$GXX" = yes; then
4060 if test "$with_gnu_ld" = no; then
4061 _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'
4063 _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'
4066 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4069 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4070 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4073 case $cc_basename in
4075 # Kuck and Associates, Inc. (KAI) C++ Compiler
4077 # KCC will only create a shared library if the output file
4078 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4079 # to its proper name (with version) after linking.
4080 _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'
4081 _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'
4082 # Commands to make compiler produce verbose output that lists
4083 # what "hidden" libraries, object files and flags are used when
4084 # linking a shared library.
4086 # There doesn't appear to be a way to prevent this compiler from
4087 # explicitly linking system object files so we need to strip them
4088 # from the output so that they don't get included in the library
4090 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'
4092 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4093 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4095 # Archives containing C++ object files must be created using
4096 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4097 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4102 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4103 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4104 _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'
4105 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4106 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4107 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4111 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4112 _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'
4114 runpath_var=LD_RUN_PATH
4115 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4116 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4118 # Commands to make compiler produce verbose output that lists
4119 # what "hidden" libraries, object files and flags are used when
4120 # linking a shared library.
4122 # There doesn't appear to be a way to prevent this compiler from
4123 # explicitly linking system object files so we need to strip them
4124 # from the output so that they don't get included in the library
4126 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'
4131 # FIXME: insert proper C++ library support
4132 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4135 # FIXME: insert proper C++ library support
4136 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4139 case $cc_basename in
4141 # FIXME: insert proper C++ library support
4142 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4145 # FIXME: insert proper C++ library support
4146 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4150 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
4151 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4152 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4154 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4155 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4156 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4158 # Workaround some broken pre-1.5 toolchains
4159 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4162 case $cc_basename in
4164 # Kuck and Associates, Inc. (KAI) C++ Compiler
4166 # KCC will only create a shared library if the output file
4167 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4168 # to its proper name (with version) after linking.
4169 _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'
4171 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4172 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4174 # Archives containing C++ object files must be created using
4175 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4176 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4180 # Rational C++ 2.4.1
4181 # FIXME: insert proper C++ library support
4182 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4185 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4186 _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'
4188 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4189 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4191 # Commands to make compiler produce verbose output that lists
4192 # what "hidden" libraries, object files and flags are used when
4193 # linking a shared library.
4195 # There doesn't appear to be a way to prevent this compiler from
4196 # explicitly linking system object files so we need to strip them
4197 # from the output so that they don't get included in the library
4199 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'
4202 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4203 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4204 _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'
4206 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4207 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4209 # Commands to make compiler produce verbose output that lists
4210 # what "hidden" libraries, object files and flags are used when
4211 # linking a shared library.
4212 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4215 # FIXME: insert proper C++ library support
4216 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4222 case $cc_basename in
4224 # Kuck and Associates, Inc. (KAI) C++ Compiler
4226 # KCC will only create a shared library if the output file
4227 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4228 # to its proper name (with version) after linking.
4229 _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'
4231 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4232 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4234 # Archives containing C++ object files must be created using
4235 # the KAI C++ compiler.
4236 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4239 # Rational C++ 2.4.1
4240 # FIXME: insert proper C++ library support
4241 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4244 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4245 _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'
4246 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4247 echo "-hidden">> $lib.exp~
4248 $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~
4251 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4252 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4254 # Commands to make compiler produce verbose output that lists
4255 # what "hidden" libraries, object files and flags are used when
4256 # linking a shared library.
4258 # There doesn't appear to be a way to prevent this compiler from
4259 # explicitly linking system object files so we need to strip them
4260 # from the output so that they don't get included in the library
4262 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'
4265 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4266 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4267 _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'
4269 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4270 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4272 # Commands to make compiler produce verbose output that lists
4273 # what "hidden" libraries, object files and flags are used when
4274 # linking a shared library.
4275 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4278 # FIXME: insert proper C++ library support
4279 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4285 # FIXME: insert proper C++ library support
4286 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4289 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4290 case $cc_basename in
4292 # FIXME: insert proper C++ library support
4293 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4296 # FIXME: insert proper C++ library support
4297 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4302 case $cc_basename in
4305 # FIXME: insert proper C++ library support
4306 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4310 # FIXME: insert proper C++ library support
4311 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4314 # FIXME: insert proper C++ library support
4315 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4320 case $cc_basename in
4322 # Sun C++ 4.2, 5.x and Centerline C++
4323 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4324 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4325 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4326 $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'
4328 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4329 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4331 solaris2.[0-5] | solaris2.[0-5].*) ;;
4333 # The C++ compiler is used as linker so we must use $wl
4334 # flag to pass the commands to the underlying system
4336 # Supported since Solaris 2.6 (maybe 2.5.1?)
4337 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4340 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4342 # Commands to make compiler produce verbose output that lists
4343 # what "hidden" libraries, object files and flags are used when
4344 # linking a shared library.
4346 # There doesn't appear to be a way to prevent this compiler from
4347 # explicitly linking system object files so we need to strip them
4348 # from the output so that they don't get included in the library
4350 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'
4352 # Archives containing C++ object files must be created using
4353 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4354 # necessary to make sure instantiated templates are included
4356 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4359 # Green Hills C++ Compiler
4360 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4362 # The C++ compiler must be used to create the archive.
4363 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4366 # GNU C++ compiler with Solaris linker
4367 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4368 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4369 if $CC --version | grep -v '^2\.7' > /dev/null; then
4370 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4371 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4372 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4374 # Commands to make compiler produce verbose output that lists
4375 # what "hidden" libraries, object files and flags are used when
4376 # linking a shared library.
4377 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4379 # g++ 2.7 appears to require `-G' NOT `-shared' on this
4381 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4382 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4383 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4385 # Commands to make compiler produce verbose output that lists
4386 # what "hidden" libraries, object files and flags are used when
4387 # linking a shared library.
4388 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4391 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4396 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4397 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4400 case $cc_basename in
4402 # NonStop-UX NCC 3.20
4403 # FIXME: insert proper C++ library support
4404 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4407 # FIXME: insert proper C++ library support
4408 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4413 # FIXME: insert proper C++ library support
4414 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4417 # FIXME: insert proper C++ library support
4418 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4421 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4422 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4424 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4425 _LT_AC_TAGVAR(LD, $1)="$LD"
4427 AC_LIBTOOL_POSTDEP_PREDEP($1)
4428 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4429 AC_LIBTOOL_PROG_CC_C_O($1)
4430 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4431 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4432 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4433 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4434 AC_LIBTOOL_SYS_LIB_STRIP
4435 AC_LIBTOOL_DLOPEN_SELF($1)
4437 AC_LIBTOOL_CONFIG($1)
4444 with_gnu_ldcxx=$with_gnu_ld
4445 with_gnu_ld=$lt_save_with_gnu_ld
4446 lt_cv_path_LDCXX=$lt_cv_path_LD
4447 lt_cv_path_LD=$lt_save_path_LD
4448 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4449 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4450 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4452 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4453 # ------------------------
4454 # Figure out "hidden" library dependencies from verbose
4455 # compiler output when linking a shared library.
4456 # Parse the compiler output and extract the necessary
4457 # objects, libraries and library flags.
4458 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4459 dnl we can't use the lt_simple_compile_test_code here,
4460 dnl because it contains code intended for an executable,
4461 dnl not a library. It's possible we should let each
4462 dnl tag define a new lt_????_link_test_code variable,
4463 dnl but it's only used here...
4464 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4466 void foo (void) { a = 0; }
4468 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4472 Foo (void) { a = 0; }
4477 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4485 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4488 public void bar (void) {
4494 dnl Parse the compiler output and extract the necessary
4495 dnl objects, libraries and library flags.
4496 if AC_TRY_EVAL(ac_compile); then
4497 # Parse the compiler output and extract the necessary
4498 # objects, libraries and library flags.
4500 # Sentinel used to keep track of whether or not we are before
4501 # the conftest object file.
4502 pre_test_object_deps_done=no
4504 # The `*' in the case matches for architectures that use `case' in
4505 # $output_verbose_cmd can trigger glob expansion during the loop
4506 # eval without this substitution.
4507 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4509 for p in `eval $output_verbose_link_cmd`; do
4513 # Some compilers place space between "-{L,R}" and the path.
4516 || test $p = "-R"; then
4523 if test "$pre_test_object_deps_done" = no; then
4526 # Internal compiler library paths should come after those
4527 # provided the user. The postdeps already come after the
4528 # user supplied libs so there is no need to process them.
4529 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4530 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4532 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4535 # The "-l" case would never come before the object being
4536 # linked, so don't bother handling this case.
4539 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4540 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4542 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4548 # This assumes that the test object file only shows up
4549 # once in the compiler output.
4550 if test "$p" = "conftest.$objext"; then
4551 pre_test_object_deps_done=yes
4555 if test "$pre_test_object_deps_done" = no; then
4556 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4557 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4559 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4562 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4563 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4565 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4570 *) ;; # Ignore the rest.
4578 echo "libtool.m4: error: problem compiling $1 test program"
4581 $rm -f confest.$objext
4583 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4584 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4586 ])# AC_LIBTOOL_POSTDEP_PREDEP
4588 # AC_LIBTOOL_LANG_F77_CONFIG
4589 # ------------------------
4590 # Ensure that the configuration vars for the C compiler are
4591 # suitably defined. Those variables are subsequently used by
4592 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4593 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4594 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4595 [AC_REQUIRE([AC_PROG_F77])
4596 AC_LANG_PUSH(Fortran 77)
4598 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4599 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4600 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4601 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4602 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4603 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4604 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4605 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4606 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4607 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4608 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4609 _LT_AC_TAGVAR(module_cmds, $1)=
4610 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4611 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4612 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4613 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4614 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4615 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4617 # Source file extension for f77 test sources.
4620 # Object file extension for compiled f77 test sources.
4622 _LT_AC_TAGVAR(objext, $1)=$objext
4624 # Code to be used in simple compile tests
4625 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4627 # Code to be used in simple link tests
4628 lt_simple_link_test_code=" program t\n end\n"
4630 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4633 # Allow CC to be a program name with arguments.
4637 _LT_AC_TAGVAR(compiler, $1)=$CC
4638 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4640 AC_MSG_CHECKING([if libtool supports shared libraries])
4641 AC_MSG_RESULT([$can_build_shared])
4643 AC_MSG_CHECKING([whether to build shared libraries])
4644 test "$can_build_shared" = "no" && enable_shared=no
4646 # On AIX, shared libraries and static libraries use the same namespace, and
4647 # are all built from PIC.
4650 test "$enable_shared" = yes && enable_static=no
4651 if test -n "$RANLIB"; then
4652 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4653 postinstall_cmds='$RANLIB $lib'
4657 test "$enable_shared" = yes && enable_static=no
4660 AC_MSG_RESULT([$enable_shared])
4662 AC_MSG_CHECKING([whether to build static libraries])
4663 # Make sure either enable_shared or enable_static is yes.
4664 test "$enable_shared" = yes || enable_static=yes
4665 AC_MSG_RESULT([$enable_static])
4667 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4669 _LT_AC_TAGVAR(GCC, $1)="$G77"
4670 _LT_AC_TAGVAR(LD, $1)="$LD"
4672 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4673 AC_LIBTOOL_PROG_CC_C_O($1)
4674 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4675 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4676 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4677 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4678 AC_LIBTOOL_SYS_LIB_STRIP
4681 AC_LIBTOOL_CONFIG($1)
4685 ])# AC_LIBTOOL_LANG_F77_CONFIG
4688 # AC_LIBTOOL_LANG_GCJ_CONFIG
4689 # --------------------------
4690 # Ensure that the configuration vars for the C compiler are
4691 # suitably defined. Those variables are subsequently used by
4692 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4693 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4694 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4697 # Source file extension for Java test sources.
4700 # Object file extension for compiled Java test sources.
4702 _LT_AC_TAGVAR(objext, $1)=$objext
4704 # Code to be used in simple compile tests
4705 lt_simple_compile_test_code="class foo {}\n"
4707 # Code to be used in simple link tests
4708 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
4710 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4713 # Allow CC to be a program name with arguments.
4717 _LT_AC_TAGVAR(compiler, $1)=$CC
4719 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4720 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4722 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4723 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4724 AC_LIBTOOL_PROG_CC_C_O($1)
4725 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4726 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4727 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4728 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4729 AC_LIBTOOL_SYS_LIB_STRIP
4730 AC_LIBTOOL_DLOPEN_SELF($1)
4732 AC_LIBTOOL_CONFIG($1)
4736 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4739 # AC_LIBTOOL_LANG_RC_CONFIG
4740 # --------------------------
4741 # Ensure that the configuration vars for the Windows resource compiler are
4742 # suitably defined. Those variables are subsequently used by
4743 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4744 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4745 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4748 # Source file extension for RC test sources.
4751 # Object file extension for compiled RC test sources.
4753 _LT_AC_TAGVAR(objext, $1)=$objext
4755 # Code to be used in simple compile tests
4756 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4758 # Code to be used in simple link tests
4759 lt_simple_link_test_code="$lt_simple_compile_test_code"
4761 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4764 # Allow CC to be a program name with arguments.
4768 _LT_AC_TAGVAR(compiler, $1)=$CC
4769 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4771 AC_LIBTOOL_CONFIG($1)
4775 ])# AC_LIBTOOL_LANG_RC_CONFIG
4778 # AC_LIBTOOL_CONFIG([TAGNAME])
4779 # ----------------------------
4780 # If TAGNAME is not passed, then create an initial libtool script
4781 # with a default configuration from the untagged config vars. Otherwise
4782 # add code to config.status for appending the configuration named by
4783 # TAGNAME from the matching tagged config vars.
4784 AC_DEFUN([AC_LIBTOOL_CONFIG],
4785 [# The else clause should only fire when bootstrapping the
4786 # libtool distribution, otherwise you forgot to ship ltmain.sh
4787 # with your package, and you will get complaints that there are
4788 # no rules to generate ltmain.sh.
4789 if test -f "$ltmain"; then
4790 # See if we are running on zsh, and set the options which allow our commands through
4791 # without removal of \ escapes.
4792 if test -n "${ZSH_VERSION+set}" ; then
4793 setopt NO_GLOB_SUBST
4795 # Now quote all the things that may contain metacharacters while being
4796 # careful not to overquote the AC_SUBSTed values. We take copies of the
4797 # variables and quote the copies for generation of the libtool script.
4798 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
4800 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4801 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4802 deplibs_check_method reload_flag reload_cmds need_locks \
4803 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4804 lt_cv_sys_global_symbol_to_c_name_address \
4805 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4806 old_postinstall_cmds old_postuninstall_cmds \
4807 _LT_AC_TAGVAR(compiler, $1) \
4808 _LT_AC_TAGVAR(CC, $1) \
4809 _LT_AC_TAGVAR(LD, $1) \
4810 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4811 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4812 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4813 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4814 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4815 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4816 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4817 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4818 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4819 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4820 _LT_AC_TAGVAR(predep_objects, $1) \
4821 _LT_AC_TAGVAR(postdep_objects, $1) \
4822 _LT_AC_TAGVAR(predeps, $1) \
4823 _LT_AC_TAGVAR(postdeps, $1) \
4824 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4825 _LT_AC_TAGVAR(archive_cmds, $1) \
4826 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4827 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4828 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4829 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4830 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4831 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4832 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4833 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4834 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4835 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4836 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4837 _LT_AC_TAGVAR(module_cmds, $1) \
4838 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4839 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4840 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4841 _LT_AC_TAGVAR(include_expsyms, $1); do
4844 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4845 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4846 _LT_AC_TAGVAR(archive_cmds, $1) | \
4847 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4848 _LT_AC_TAGVAR(module_cmds, $1) | \
4849 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4850 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4851 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4852 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4853 postinstall_cmds | postuninstall_cmds | \
4854 old_postinstall_cmds | old_postuninstall_cmds | \
4855 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4856 # Double-quote double-evaled strings.
4857 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4860 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4866 *'\[$]0 --fallback-echo"')
4867 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4872 [cfgfile="${ofile}T"
4873 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4875 AC_MSG_NOTICE([creating $ofile])],
4878 cat <<__EOF__ >> "$cfgfile"
4882 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4883 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4884 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4886 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4887 # Free Software Foundation, Inc.
4889 # This file is part of GNU Libtool:
4890 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4892 # This program is free software; you can redistribute it and/or modify
4893 # it under the terms of the GNU General Public License as published by
4894 # the Free Software Foundation; either version 2 of the License, or
4895 # (at your option) any later version.
4897 # This program is distributed in the hope that it will be useful, but
4898 # WITHOUT ANY WARRANTY; without even the implied warranty of
4899 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4900 # General Public License for more details.
4902 # You should have received a copy of the GNU General Public License
4903 # along with this program; if not, write to the Free Software
4904 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4906 # As a special exception to the GNU General Public License, if you
4907 # distribute this file as part of a program that contains a
4908 # configuration script generated by Autoconf, you may include it under
4909 # the same distribution terms that you use for the rest of that program.
4911 # A sed program that does not truncate output.
4914 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4915 Xsed="$SED -e s/^X//"
4917 # The HP-UX ksh and POSIX shell print the target directory to stdout
4919 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4921 # The names of the tagged configurations supported by this script.
4924 # ### BEGIN LIBTOOL CONFIG],
4925 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4927 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4929 # Shell to use when invoking shell scripts.
4932 # Whether or not to build shared libraries.
4933 build_libtool_libs=$enable_shared
4935 # Whether or not to build static libraries.
4936 build_old_libs=$enable_static
4938 # Whether or not to add -lc for building shared libraries.
4939 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4941 # Whether or not to disallow shared libs when runtime libs are static
4942 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4944 # Whether or not to optimize for fast installation.
4945 fast_install=$enable_fast_install
4948 host_alias=$host_alias
4951 # An echo program that does not interpret backslashes.
4956 AR_FLAGS=$lt_AR_FLAGS
4961 # A language-specific compiler.
4962 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4964 # Is the compiler the GNU C compiler?
4965 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4970 # The linker used to build libraries.
4971 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4973 # Whether we need hard or soft links.
4976 # A BSD-compatible nm program.
4979 # A symbol stripping program
4982 # Used to examine libraries when file_magic_cmd begins "file"
4983 MAGIC_CMD=$MAGIC_CMD
4985 # Used on cygwin: DLL creation program.
4988 # Used on cygwin: object dumper.
4991 # Used on cygwin: assembler.
4994 # The name of the directory that contains temporary libtool files.
4997 # How to create reloadable object files.
4998 reload_flag=$lt_reload_flag
4999 reload_cmds=$lt_reload_cmds
5001 # How to pass a linker flag through the compiler.
5002 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5004 # Object file suffix (normally "o").
5007 # Old archive suffix (normally "a").
5010 # Shared library suffix (normally ".so").
5011 shrext_cmds='$shrext_cmds'
5013 # Executable file suffix (normally "").
5016 # Additional compiler flags for building library objects.
5017 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5020 # What is the maximum length of a command?
5021 max_cmd_len=$lt_cv_sys_max_cmd_len
5023 # Does compiler simultaneously support -c and -o options?
5024 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5026 # Must we lock files when doing compilation ?
5027 need_locks=$lt_need_locks
5029 # Do we need the lib prefix for modules?
5030 need_lib_prefix=$need_lib_prefix
5032 # Do we need a version for libraries?
5033 need_version=$need_version
5035 # Whether dlopen is supported.
5036 dlopen_support=$enable_dlopen
5038 # Whether dlopen of programs is supported.
5039 dlopen_self=$enable_dlopen_self
5041 # Whether dlopen of statically linked programs is supported.
5042 dlopen_self_static=$enable_dlopen_self_static
5044 # Compiler flag to prevent dynamic linking.
5045 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5047 # Compiler flag to turn off builtin functions.
5048 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5050 # Compiler flag to allow reflexive dlopens.
5051 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5053 # Compiler flag to generate shared objects directly from archives.
5054 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5056 # Compiler flag to generate thread-safe objects.
5057 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5059 # Library versioning type.
5060 version_type=$version_type
5062 # Format of library name prefix.
5063 libname_spec=$lt_libname_spec
5065 # List of archive names. First name is the real one, the rest are links.
5066 # The last name is the one that the linker finds with -lNAME.
5067 library_names_spec=$lt_library_names_spec
5069 # The coded name of the library, if different from the real name.
5070 soname_spec=$lt_soname_spec
5072 # Commands used to build and install an old-style archive.
5074 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5075 old_postinstall_cmds=$lt_old_postinstall_cmds
5076 old_postuninstall_cmds=$lt_old_postuninstall_cmds
5078 # Create an old-style archive from a shared archive.
5079 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5081 # Create a temporary old-style archive to link instead of a shared archive.
5082 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5084 # Commands used to build and install a shared archive.
5085 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5086 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5087 postinstall_cmds=$lt_postinstall_cmds
5088 postuninstall_cmds=$lt_postuninstall_cmds
5090 # Commands used to build a loadable module (assumed same as above if empty)
5091 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5092 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5094 # Commands to strip libraries.
5095 old_striplib=$lt_old_striplib
5096 striplib=$lt_striplib
5098 # Dependencies to place before the objects being linked to create a
5100 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5102 # Dependencies to place after the objects being linked to create a
5104 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5106 # Dependencies to place before the objects being linked to create a
5108 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5110 # Dependencies to place after the objects being linked to create a
5112 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5114 # The library search path used internally by the compiler when linking
5116 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5118 # Method to check whether dependent libraries are shared objects.
5119 deplibs_check_method=$lt_deplibs_check_method
5121 # Command to use when deplibs_check_method == file_magic.
5122 file_magic_cmd=$lt_file_magic_cmd
5124 # Flag that allows shared libraries with undefined symbols to be built.
5125 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5127 # Flag that forces no undefined symbols.
5128 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5130 # Commands used to finish a libtool library installation in a directory.
5131 finish_cmds=$lt_finish_cmds
5133 # Same as above, but a single script fragment to be evaled but not shown.
5134 finish_eval=$lt_finish_eval
5136 # Take the output of nm and produce a listing of raw symbols and C names.
5137 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5139 # Transform the output of nm in a proper C declaration
5140 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5142 # Transform the output of nm in a C name address pair
5143 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5145 # This is the shared library runtime path variable.
5146 runpath_var=$runpath_var
5148 # This is the shared library path variable.
5149 shlibpath_var=$shlibpath_var
5151 # Is shlibpath searched before the hard-coded library search path?
5152 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5154 # How to hardcode a shared library path into an executable.
5155 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5157 # Whether we should hardcode library paths into libraries.
5158 hardcode_into_libs=$hardcode_into_libs
5160 # Flag to hardcode \$libdir into a binary during linking.
5161 # This must work even if \$libdir does not exist.
5162 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5164 # If ld is used when linking, flag to hardcode \$libdir into
5165 # a binary during linking. This must work even if \$libdir does
5167 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5169 # Whether we need a single -rpath flag with a separated argument.
5170 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5172 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5174 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5176 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5178 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5180 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5181 # the resulting binary.
5182 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5184 # Set to yes if building a shared library automatically hardcodes DIR into the library
5185 # and all subsequent libraries and executables linked against it.
5186 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5188 # Variables whose values should be saved in libtool wrapper scripts and
5189 # restored at relink time.
5190 variables_saved_for_relink="$variables_saved_for_relink"
5192 # Whether libtool must link a program against all its dependency libraries.
5193 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5195 # Compile-time system search path for libraries
5196 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5198 # Run-time system search path for libraries
5199 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5201 # Fix the shell variable \$srcfile for the compiler.
5202 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5204 # Set to yes if exported symbols are required.
5205 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5207 # The commands to list exported symbols.
5208 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5210 # The commands to extract the exported symbol list from a shared archive.
5211 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5213 # Symbols that should not be listed in the preloaded symbols.
5214 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5216 # Symbols that must always be exported.
5217 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5220 [# ### END LIBTOOL CONFIG],
5221 [# ### END LIBTOOL TAG CONFIG: $tagname])
5228 cat <<\EOF >> "$cfgfile"
5230 # AIX sometimes has problems with the GCC collect2 program. For some
5231 # reason, if we set the COLLECT_NAMES environment variable, the problems
5232 # vanish in a puff of smoke.
5233 if test "X${COLLECT_NAMES+set}" != Xset; then
5235 export COLLECT_NAMES
5241 # We use sed instead of cat because bash on DJGPP gets confused if
5242 # if finds mixed CR/LF and LF-only lines. Since sed operates in
5243 # text mode, it properly converts lines to CR/LF. This bash problem
5244 # is reportedly fixed, but why not run on old versions too?
5245 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5247 mv -f "$cfgfile" "$ofile" || \
5248 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5252 # If there is no Makefile yet, we rely on a make rule to execute
5253 # `config.status --recheck' to rerun these tests and create the
5254 # libtool script then.
5255 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5256 if test -f "$ltmain_in"; then
5257 test -f Makefile && make "$ltmain"
5260 ])# AC_LIBTOOL_CONFIG
5263 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5264 # -------------------------------------------
5265 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5266 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5268 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5270 if test "$GCC" = yes; then
5271 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5273 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5274 lt_cv_prog_compiler_rtti_exceptions,
5275 [-fno-rtti -fno-exceptions], [],
5276 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5278 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5281 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5282 # ---------------------------------
5283 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5284 [AC_REQUIRE([AC_CANONICAL_HOST])
5285 AC_REQUIRE([AC_PROG_NM])
5286 AC_REQUIRE([AC_OBJEXT])
5287 # Check for command to grab the raw symbol name followed by C symbol from nm.
5288 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5289 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5291 # These are sane defaults that work on at least a few old systems.
5292 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
5294 # Character class describing NM global symbol codes.
5295 symcode='[[BCDEGRST]]'
5297 # Regexp to match symbols that can be accessed directly from C.
5298 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5300 # Transform the above into a raw symbol and a C symbol.
5301 symxfrm='\1 \2\3 \3'
5303 # Transform an extracted symbol line into a proper C declaration
5304 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5306 # Transform an extracted symbol line into symbol name and symbol address
5307 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'"
5309 # Define system-specific variables.
5314 cygwin* | mingw* | pw32*)
5315 symcode='[[ABCDGISTW]]'
5317 hpux*) # Its linker distinguishes data from code symbols
5318 if test "$host_cpu" = ia64; then
5319 symcode='[[ABCDEGRST]]'
5321 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5322 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'"
5325 symcode='[[BCDEGRST]]'
5328 symcode='[[BCDEGQRST]]'
5334 symcode='[[DFNSTU]]'
5338 # Handle CRLF in mingw tool chain
5342 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5346 # If we're using GNU nm, then use its standard symbol codes.
5347 case `$NM -V 2>&1` in
5348 *GNU* | *'with BFD'*)
5349 symcode='[[ABCDGIRSTW]]' ;;
5352 # Try without a prefix undercore, then with it.
5353 for ac_symprfx in "" "_"; do
5355 # Write the raw and C identifiers.
5356 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
5358 # Check to see that the pipe works correctly.
5362 cat > conftest.$ac_ext <<EOF
5367 void nm_test_func(){}
5371 int main(){nm_test_var='a';nm_test_func();return(0);}
5374 if AC_TRY_EVAL(ac_compile); then
5375 # Now try to grab the symbols.
5377 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5378 # Try sorting and uniquifying the output.
5379 if sort "$nlist" | uniq > "$nlist"T; then
5380 mv -f "$nlist"T "$nlist"
5385 # Make sure that we snagged all the symbols we need.
5386 if grep ' nm_test_var$' "$nlist" >/dev/null; then
5387 if grep ' nm_test_func$' "$nlist" >/dev/null; then
5388 cat <<EOF > conftest.$ac_ext
5394 # Now generate the symbol file.
5395 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5397 cat <<EOF >> conftest.$ac_ext
5398 #if defined (__STDC__) && __STDC__
5399 # define lt_ptr_t void *
5401 # define lt_ptr_t char *
5405 /* The mapping between symbol names and symbols. */
5410 lt_preloaded_symbols[[]] =
5413 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5414 cat <<\EOF >> conftest.$ac_ext
5422 # Now try linking the two files.
5423 mv conftest.$ac_objext conftstm.$ac_objext
5424 lt_save_LIBS="$LIBS"
5425 lt_save_CFLAGS="$CFLAGS"
5426 LIBS="conftstm.$ac_objext"
5427 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5428 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5431 LIBS="$lt_save_LIBS"
5432 CFLAGS="$lt_save_CFLAGS"
5434 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5437 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5440 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5443 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5444 cat conftest.$ac_ext >&5
5446 rm -f conftest* conftst*
5448 # Do not use the global_symbol_pipe unless it works.
5449 if test "$pipe_works" = yes; then
5452 lt_cv_sys_global_symbol_pipe=
5456 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5457 lt_cv_sys_global_symbol_to_cdecl=
5459 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5460 AC_MSG_RESULT(failed)
5464 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5467 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5468 # ---------------------------------------
5469 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5470 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5471 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5472 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5474 AC_MSG_CHECKING([for $compiler option to produce PIC])
5476 # C++ specific cases for pic, static, wl, etc.
5477 if test "$GXX" = yes; then
5478 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5479 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5483 # All AIX code is PIC.
5484 if test "$host_cpu" = ia64; then
5485 # AIX 5 now supports IA64 processor
5486 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5490 # FIXME: we need at least 68020 code to build shared libraries, but
5491 # adding the `-m68020' flag to GCC prevents building anything better,
5493 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5495 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5496 # PIC is the default for these OSes.
5498 mingw* | os2* | pw32*)
5499 # This hack is so that the source file can tell whether it is being
5500 # built for inclusion in a dll (and should export symbols for example).
5501 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5503 darwin* | rhapsody*)
5504 # PIC is the default on this platform
5505 # Common symbols not allowed in MH_DYLIB files
5506 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5509 # DJGPP does not support shared libraries at all
5510 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5513 if test -d /usr/nec; then
5514 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5518 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5524 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5529 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5535 # All AIX code is PIC.
5536 if test "$host_cpu" = ia64; then
5537 # AIX 5 now supports IA64 processor
5538 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5540 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5544 case $cc_basename in
5546 # Green Hills C++ Compiler
5547 # _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"
5552 case $cc_basename in
5554 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5557 # Green Hills C++ Compiler
5558 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5564 freebsd* | kfreebsd*-gnu)
5565 # FreeBSD uses GNU C++
5567 hpux9* | hpux10* | hpux11*)
5568 case $cc_basename in
5570 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5571 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5572 if test "$host_cpu" != ia64; then
5573 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5577 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5578 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5584 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5592 irix5* | irix6* | nonstopux*)
5593 case $cc_basename in
5595 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5596 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5597 # CC pic flag -KPIC is the default.
5604 case $cc_basename in
5607 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5608 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5612 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5613 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5614 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5618 # Make sure the PIC flag is empty. It appears that all Alpha
5619 # Linux and Compaq Tru64 Unix objects are PIC.
5620 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5621 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5632 case $cc_basename in
5634 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5640 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
5642 osf3* | osf4* | osf5*)
5643 case $cc_basename in
5645 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5648 # Rational C++ 2.4.1
5649 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5652 # Digital/Compaq C++
5653 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5654 # Make sure the PIC flag is empty. It appears that all Alpha
5655 # Linux and Compaq Tru64 Unix objects are PIC.
5656 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5657 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5666 case $cc_basename in
5668 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5675 case $cc_basename in
5677 # Sun C++ 4.2, 5.x and Centerline C++
5678 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5679 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5680 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5683 # Green Hills C++ Compiler
5684 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5691 case $cc_basename in
5694 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5695 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5699 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5706 case $cc_basename in
5708 # NonStop-UX NCC 3.20
5709 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5720 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5726 if test "$GCC" = yes; then
5727 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5728 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5732 # All AIX code is PIC.
5733 if test "$host_cpu" = ia64; then
5734 # AIX 5 now supports IA64 processor
5735 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5740 # FIXME: we need at least 68020 code to build shared libraries, but
5741 # adding the `-m68020' flag to GCC prevents building anything better,
5743 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5746 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5747 # PIC is the default for these OSes.
5750 mingw* | pw32* | os2*)
5751 # This hack is so that the source file can tell whether it is being
5752 # built for inclusion in a dll (and should export symbols for example).
5753 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5756 darwin* | rhapsody*)
5757 # PIC is the default on this platform
5758 # Common symbols not allowed in MH_DYLIB files
5759 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5763 # Just because we use GCC doesn't mean we suddenly get shared libraries
5764 # on systems that don't support them.
5765 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5770 if test -d /usr/nec; then
5771 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5776 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5783 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5789 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5793 # PORTME Check for flag to pass linker flags through the system compiler.
5796 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5797 if test "$host_cpu" = ia64; then
5798 # AIX 5 now supports IA64 processor
5799 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5801 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5805 mingw* | pw32* | os2*)
5806 # This hack is so that the source file can tell whether it is being
5807 # built for inclusion in a dll (and should export symbols for example).
5808 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5811 hpux9* | hpux10* | hpux11*)
5812 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5813 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5820 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5823 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5824 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5827 irix5* | irix6* | nonstopux*)
5828 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5829 # PIC (with -KPIC) is the default.
5830 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5834 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5835 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5841 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5842 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5843 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5846 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5847 # All Alpha code is PIC.
5848 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5853 osf3* | osf4* | osf5*)
5854 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5855 # All OSF/1 code is PIC.
5856 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5860 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5861 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5865 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5866 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5867 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5871 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5872 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5873 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5876 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5877 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5878 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5879 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5883 if test -d /usr/nec ;then
5884 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5885 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5890 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5891 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5895 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5900 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5903 # Check to make sure the PIC flag actually works.
5905 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5906 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5907 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5908 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5909 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5911 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5913 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5914 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5917 # For platforms which do not support PIC, -DPIC is meaningless:
5919 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5922 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5928 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5929 # ------------------------------------
5930 # See if the linker supports building shared libraries.
5931 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5932 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5934 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5937 # If we're using GNU nm, then we don't want the "-C" option.
5938 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5939 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5940 _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'
5942 _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'
5946 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5949 _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'
5952 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5955 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5960 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5961 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5962 _LT_AC_TAGVAR(archive_cmds, $1)=
5963 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5964 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5965 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5966 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5967 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5968 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5969 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5970 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5971 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5972 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5973 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5974 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5975 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5976 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5977 _LT_AC_TAGVAR(module_cmds, $1)=
5978 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5979 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5980 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5981 # include_expsyms should be a list of space-separated symbols to be *always*
5982 # included in the symbol list
5983 _LT_AC_TAGVAR(include_expsyms, $1)=
5984 # exclude_expsyms can be an extended regexp of symbols to exclude
5985 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5986 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5987 # as well as any symbol that contains `d'.
5988 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5989 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5990 # platforms (ab)use it in PIC code, but their linkers get confused if
5991 # the symbol is explicitly referenced. Since portable code cannot
5992 # rely on this symbol name, it's probably fine to never include it in
5993 # preloaded symbol tables.
5994 extract_expsyms_cmds=
5997 cygwin* | mingw* | pw32*)
5998 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5999 # When not using gcc, we currently assume that we are using
6000 # Microsoft Visual C++.
6001 if test "$GCC" != yes; then
6010 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6011 if test "$with_gnu_ld" = yes; then
6012 # If archive_cmds runs LD, not CC, wlarc should be empty
6015 # See if GNU ld supports shared libraries.
6017 aix3* | aix4* | aix5*)
6018 # On AIX/PPC, the GNU linker is very broken
6019 if test "$host_cpu" != ia64; then
6020 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6023 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
6024 *** to be unable to reliably create shared libraries on AIX.
6025 *** Therefore, libtool is disabling shared libraries support. If you
6026 *** really care for shared libraries, you may want to modify your PATH
6027 *** so that a non-GNU linker is found, and then restart.
6034 _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)'
6035 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6036 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6038 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6039 # that the semantics of dynamic libraries on AmigaOS, at least up
6040 # to version 4, is to share data among multiple programs linked
6041 # with the same dynamic library. Since this doesn't match the
6042 # behavior of shared libraries on other platforms, we can't use
6044 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6048 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6049 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6050 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6051 # support --undefined. This deserves some investigation. FIXME
6052 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6054 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6058 cygwin* | mingw* | pw32*)
6059 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6060 # as there is no search path for DLLs.
6061 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6062 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6063 _LT_AC_TAGVAR(always_export_symbols, $1)=no
6064 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6065 _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'
6067 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6068 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6069 # If the export-symbols file already is a .def file (1st line
6070 # is EXPORTS), use it as is; otherwise, prepend...
6071 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6072 cp $export_symbols $output_objdir/$soname.def;
6074 echo EXPORTS > $output_objdir/$soname.def;
6075 cat $export_symbols >> $output_objdir/$soname.def;
6077 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
6083 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
6084 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6085 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6088 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6089 _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'
6094 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6095 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6098 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6099 *** create shared libraries on Solaris systems. Therefore, libtool
6100 *** is disabling shared libraries support. We urge you to upgrade GNU
6101 *** binutils to release 2.9.1 or newer. Another option is to modify
6102 *** your PATH or compiler configuration so that the native linker is
6103 *** used, and then restart.
6106 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6107 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6108 _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'
6110 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6115 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6117 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6118 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6122 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6123 tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6124 _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
6125 supports_anon_versioning=no
6126 case `$LD -v 2>/dev/null` in
6127 *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6128 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6129 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6130 *\ 2.11.*) ;; # other 2.11 versions
6131 *) supports_anon_versioning=yes ;;
6133 if test $supports_anon_versioning = yes; then
6134 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6135 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6136 $echo "local: *; };" >> $output_objdir/$libname.ver~
6137 $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6139 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
6141 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6143 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6148 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6149 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6150 _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'
6152 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6157 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
6158 runpath_var=LD_RUN_PATH
6159 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6160 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6161 # ancient GNU ld didn't support --whole-archive et. al.
6162 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6163 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6165 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6169 # PORTME fill in a description of your system's linker (not GNU ld)
6172 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6173 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6174 _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'
6175 # Note: this linker hardcodes the directories in LIBPATH if there
6176 # are no directories specified by -L.
6177 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6178 if test "$GCC" = yes && test -z "$link_static_flag"; then
6179 # Neither direct hardcoding nor static linking is supported with a
6181 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6186 if test "$host_cpu" = ia64; then
6187 # On IA64, the linker does run time linking by default, so we don't
6188 # have to do anything special.
6189 aix_use_runtimelinking=no
6190 exp_sym_flag='-Bexport'
6193 # If we're using GNU nm, then we don't want the "-C" option.
6194 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6195 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6196 _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'
6198 _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'
6200 aix_use_runtimelinking=no
6202 # Test if we are trying to use run time linking or normal
6203 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6204 # need to do runtime linking.
6205 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6206 for ld_flag in $LDFLAGS; do
6207 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6208 aix_use_runtimelinking=yes
6214 exp_sym_flag='-bexport'
6215 no_entry_flag='-bnoentry'
6218 # When large executables or shared objects are built, AIX ld can
6219 # have problems creating the table of contents. If linking a library
6220 # or program results in "error TOC overflow" add -mminimal-toc to
6221 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6222 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6224 _LT_AC_TAGVAR(archive_cmds, $1)=''
6225 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6226 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6227 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6229 if test "$GCC" = yes; then
6230 case $host_os in aix4.[012]|aix4.[012].*)
6231 # We only want to do this on AIX 4.2 and lower, the check
6232 # below for broken collect2 doesn't work under 4.3+
6233 collect2name=`${CC} -print-prog-name=collect2`
6234 if test -f "$collect2name" && \
6235 strings "$collect2name" | grep resolve_lib_name >/dev/null
6237 # We have reworked collect2
6238 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6240 # We have old collect2
6241 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6242 # It fails to find uninstalled libraries when the uninstalled
6243 # path is not listed in the libpath. Setting hardcode_minus_L
6244 # to unsupported forces relinking
6245 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6246 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6247 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6250 shared_flag='-shared'
6253 if test "$host_cpu" = ia64; then
6254 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6255 # chokes on -Wl,-G. The following line is correct:
6258 if test "$aix_use_runtimelinking" = yes; then
6259 shared_flag='${wl}-G'
6261 shared_flag='${wl}-bM:SRE'
6266 # It seems that -bexpall does not export symbols beginning with
6267 # underscore (_), so it is better to generate a list of symbols to export.
6268 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6269 if test "$aix_use_runtimelinking" = yes; then
6270 # Warning - without using the other runtime loading flags (-brtl),
6271 # -berok will link without error, but may produce a broken library.
6272 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6273 # Determine the default libpath from the value encoded in an empty executable.
6274 _LT_AC_SYS_LIBPATH_AIX
6275 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6276 _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"
6278 if test "$host_cpu" = ia64; then
6279 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6280 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6281 _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"
6283 # Determine the default libpath from the value encoded in an empty executable.
6284 _LT_AC_SYS_LIBPATH_AIX
6285 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6286 # Warning - without using the other run time loading flags,
6287 # -berok will link without error, but may produce a broken library.
6288 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6289 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6290 # -bexpall does not export symbols beginning with underscore (_)
6291 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6292 # Exported symbols can be pulled into shared objects from archives
6293 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6294 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6295 # This is similar to how AIX traditionally builds it's shared libraries.
6296 _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'
6302 _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)'
6303 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6304 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6305 # see comment about different semantics on the GNU ld section
6306 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6310 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6313 cygwin* | mingw* | pw32*)
6314 # When not using gcc, we currently assume that we are using
6315 # Microsoft Visual C++.
6316 # hardcode_libdir_flag_spec is actually meaningless, as there is
6317 # no search path for DLLs.
6318 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6319 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6320 # Tell ltmain to make .lib files, not .a files.
6322 # Tell ltmain to make .dll files, not .so files.
6324 # FIXME: Setting linknames here is a bad hack.
6325 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6326 # The linker will automatically build a .lib file if we build a DLL.
6327 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6328 # FIXME: Should let the user specify the lib program.
6329 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6330 fix_srcfile_path='`cygpath -w "$srcfile"`'
6331 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6334 darwin* | rhapsody*)
6335 if test "$GXX" = yes ; then
6336 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6338 rhapsody* | darwin1.[[012]])
6339 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6342 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6343 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6345 case ${MACOSX_DEPLOYMENT_TARGET} in
6347 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6350 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
6356 lt_int_apple_cc_single_mod=no
6357 output_verbose_link_cmd='echo'
6358 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
6359 lt_int_apple_cc_single_mod=yes
6361 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6362 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6364 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
6366 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6367 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6368 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6369 _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}'
6371 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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}'
6373 _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}'
6374 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6375 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6376 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6377 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6378 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6380 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6385 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6386 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6387 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6391 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6394 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6395 # support. Future versions do this automatically, but an explicit c++rt0.o
6396 # does not break anything, and helps significantly (at the cost of a little
6399 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6400 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6401 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6402 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6405 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6407 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6408 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6409 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6410 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6413 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6414 freebsd* | kfreebsd*-gnu)
6415 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6416 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6417 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6418 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6422 if test "$GCC" = yes; then
6423 _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'
6425 _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'
6427 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6428 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6429 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6431 # hardcode_minus_L: Not really in the search PATH,
6432 # but as the default location of the library.
6433 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6434 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6438 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6441 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6444 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6450 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6453 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6457 if test "$with_gnu_ld" = no; then
6460 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6461 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6462 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6463 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6464 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6467 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6468 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6469 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6471 # hardcode_minus_L: Not really in the search PATH,
6472 # but as the default location of the library.
6473 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6476 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6477 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6478 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6479 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6481 # hardcode_minus_L: Not really in the search PATH,
6482 # but as the default location of the library.
6483 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6489 irix5* | irix6* | nonstopux*)
6490 if test "$GCC" = yes; then
6491 _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'
6493 _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'
6494 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6496 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6497 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6498 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6501 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
6502 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6503 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6505 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6507 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6508 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6509 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6513 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6514 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6515 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6516 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6517 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6521 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6522 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6523 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6524 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6525 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6526 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6529 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6530 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6531 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6534 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6535 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6542 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6543 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6544 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6545 _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'
6546 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6550 if test "$GCC" = yes; then
6551 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6552 _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'
6554 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6555 _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'
6557 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6558 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6561 osf4* | osf5*) # as osf3* with the addition of -msym flag
6562 if test "$GCC" = yes; then
6563 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6564 _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'
6565 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6567 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6568 _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'
6569 _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~
6570 $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'
6572 # Both c and cxx compiler support -rpath directly
6573 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6575 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6579 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6580 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6581 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6582 runpath_var=LD_RUN_PATH
6583 hardcode_runpath_var=yes
6587 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6588 if test "$GCC" = yes; then
6589 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6590 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6591 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6593 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6594 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6595 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6597 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6598 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6600 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6601 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6602 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6604 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6608 if test "x$host_vendor" = xsequent; then
6609 # Use $CC to link under sequent, because it throws in some extra .o
6610 # files that make .init and .fini sections work.
6611 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6613 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6615 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6616 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6617 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6618 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6622 case $host_vendor in
6624 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6625 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6628 ## LD is ld it makes a PLAMLIB
6629 ## CC just makes a GrossModule.
6630 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6631 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6632 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6635 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6636 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6639 runpath_var='LD_RUN_PATH'
6640 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6644 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6645 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6646 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6650 if test -d /usr/nec; then
6651 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6652 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6653 runpath_var=LD_RUN_PATH
6654 hardcode_runpath_var=yes
6655 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6660 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6661 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6662 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6663 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6664 hardcode_runpath_var=yes
6665 runpath_var=LD_RUN_PATH
6668 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
6669 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6670 if test "$GCC" = yes; then
6671 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6673 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6675 runpath_var='LD_RUN_PATH'
6676 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6680 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6681 # $CC -shared without GNU ld will not create a library from C++
6682 # object files and a static libstdc++, better avoid it by now
6683 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6684 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6685 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6686 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6687 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6688 runpath_var='LD_RUN_PATH'
6692 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6693 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6694 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6698 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6703 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6704 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6706 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6707 if test "$GCC" = yes; then
6708 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6712 # Do we need to explicitly link libc?
6714 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6716 # Assume -lc should be added
6717 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6719 if test "$enable_shared" = yes && test "$GCC" = yes; then
6720 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6722 # FIXME: we may have to deal with multi-command sequences.
6725 # Test whether the compiler implicitly links with -lc since on some
6726 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6727 # to ld, don't add -lc before -lgcc.
6728 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6730 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6732 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6735 libobjs=conftest.$ac_objext
6737 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6743 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6744 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6745 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6747 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6749 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6751 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6753 cat conftest.err 1>&5
6756 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6762 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6765 # _LT_AC_FILE_LTDLL_C
6766 # -------------------
6767 # Be careful that the start marker always follows a newline.
6768 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6769 # /* ltdll.c starts here */
6770 # #define WIN32_LEAN_AND_MEAN
6771 # #include <windows.h>
6772 # #undef WIN32_LEAN_AND_MEAN
6773 # #include <stdio.h>
6775 # #ifndef __CYGWIN__
6776 # # ifdef __CYGWIN32__
6777 # # define __CYGWIN__ __CYGWIN32__
6781 # #ifdef __cplusplus
6784 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6785 # #ifdef __cplusplus
6790 # #include <cygwin/cygwin_dll.h>
6791 # DECLARE_CYGWIN_DLL( DllMain );
6793 # HINSTANCE __hDllInstance_base;
6796 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6798 # __hDllInstance_base = hInst;
6801 # /* ltdll.c ends here */
6802 ])# _LT_AC_FILE_LTDLL_C
6805 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6806 # ---------------------------------
6807 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6811 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6812 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6813 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6814 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6815 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6816 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6817 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6819 # This is just to silence aclocal about the macro not being used
6820 ifelse([AC_DISABLE_FAST_INSTALL])
6822 AC_DEFUN([LT_AC_PROG_GCJ],
6823 [AC_CHECK_TOOL(GCJ, gcj, no)
6824 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6828 AC_DEFUN([LT_AC_PROG_RC],
6829 [AC_CHECK_TOOL(RC, windres, no)
6832 # NOTE: This macro has been submitted for inclusion into #
6833 # GNU Autoconf as AC_PROG_SED. When it is available in #
6834 # a released version of Autoconf we should remove this #
6835 # macro and use it instead. #
6838 # Check for a fully-functional sed program, that truncates
6839 # as few characters as possible. Prefer GNU sed if found.
6840 AC_DEFUN([LT_AC_PROG_SED],
6841 [AC_MSG_CHECKING([for a sed that does not truncate output])
6842 AC_CACHE_VAL(lt_cv_path_SED,
6843 [# Loop through the user's path and test for sed and gsed.
6844 # Then use that list of sed's as ones to test for truncation.
6845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6849 test -z "$as_dir" && as_dir=.
6850 for lt_ac_prog in sed gsed; do
6851 for ac_exec_ext in '' $ac_executable_extensions; do
6852 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6853 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6860 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6861 # along with /bin/sed that truncates output.
6862 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6863 test ! -f $lt_ac_sed && break
6864 cat /dev/null > conftest.in
6866 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6867 # Check for GNU sed and select it if it is found.
6868 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6869 lt_cv_path_SED=$lt_ac_sed
6873 cat conftest.in conftest.in >conftest.tmp
6874 mv conftest.tmp conftest.in
6875 cp conftest.in conftest.nl
6877 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6878 cmp -s conftest.out conftest.nl || break
6879 # 10000 chars as input seems more than enough
6880 test $lt_ac_count -gt 10 && break
6881 lt_ac_count=`expr $lt_ac_count + 1`
6882 if test $lt_ac_count -gt $lt_ac_max; then
6883 lt_ac_max=$lt_ac_count
6884 lt_cv_path_SED=$lt_ac_sed
6890 AC_MSG_RESULT([$SED])