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 3 (gettext-0.13)
14 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
15 dnl This file is free software, distributed under the terms of the GNU
16 dnl General Public License. As a special exception to the GNU General
17 dnl Public License, this file may be distributed as part of a program
18 dnl that contains a configuration script generated by Autoconf, under
19 dnl the same distribution terms as the rest of that program.
21 dnl From Bruno Haible.
23 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
24 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
25 dnl require excessive bracketing.
26 ifdef([AC_HELP_STRING],
27 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
28 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
30 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
31 dnl to access previously installed libraries. The basic assumption is that
32 dnl a user will want packages to use other packages he previously installed
33 dnl with the same --prefix option.
34 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
35 dnl libraries, but is otherwise very convenient.
36 AC_DEFUN([AC_LIB_PREFIX],
38 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
39 AC_REQUIRE([AC_PROG_CC])
40 AC_REQUIRE([AC_CANONICAL_HOST])
41 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
42 dnl By default, look in $includedir and $libdir.
44 AC_LIB_WITH_FINAL_PREFIX([
45 eval additional_includedir=\"$includedir\"
46 eval additional_libdir=\"$libdir\"
48 AC_LIB_ARG_WITH([lib-prefix],
49 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
50 --without-lib-prefix don't search for libraries in includedir and libdir],
52 if test "X$withval" = "Xno"; then
55 if test "X$withval" = "X"; then
56 AC_LIB_WITH_FINAL_PREFIX([
57 eval additional_includedir=\"$includedir\"
58 eval additional_libdir=\"$libdir\"
61 additional_includedir="$withval/include"
62 additional_libdir="$withval/lib"
66 if test $use_additional = yes; then
67 dnl Potentially add $additional_includedir to $CPPFLAGS.
69 dnl 1. if it's the standard /usr/include,
70 dnl 2. if it's already present in $CPPFLAGS,
71 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
72 dnl 4. if it doesn't exist as a directory.
73 if test "X$additional_includedir" != "X/usr/include"; then
75 for x in $CPPFLAGS; do
76 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
77 if test "X$x" = "X-I$additional_includedir"; then
82 if test -z "$haveit"; then
83 if test "X$additional_includedir" = "X/usr/local/include"; then
84 if test -n "$GCC"; then
90 if test -z "$haveit"; then
91 if test -d "$additional_includedir"; then
92 dnl Really add $additional_includedir to $CPPFLAGS.
93 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
98 dnl Potentially add $additional_libdir to $LDFLAGS.
100 dnl 1. if it's the standard /usr/lib,
101 dnl 2. if it's already present in $LDFLAGS,
102 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
103 dnl 4. if it doesn't exist as a directory.
104 if test "X$additional_libdir" != "X/usr/lib"; then
106 for x in $LDFLAGS; do
107 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
108 if test "X$x" = "X-L$additional_libdir"; then
113 if test -z "$haveit"; then
114 if test "X$additional_libdir" = "X/usr/local/lib"; then
115 if test -n "$GCC"; then
121 if test -z "$haveit"; then
122 if test -d "$additional_libdir"; then
123 dnl Really add $additional_libdir to $LDFLAGS.
124 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
132 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
133 dnl acl_final_exec_prefix, containing the values to which $prefix and
134 dnl $exec_prefix will expand at the end of the configure script.
135 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
137 dnl Unfortunately, prefix and exec_prefix get only finally determined
138 dnl at the end of configure.
139 if test "X$prefix" = "XNONE"; then
140 acl_final_prefix="$ac_default_prefix"
142 acl_final_prefix="$prefix"
144 if test "X$exec_prefix" = "XNONE"; then
145 acl_final_exec_prefix='${prefix}'
147 acl_final_exec_prefix="$exec_prefix"
149 acl_save_prefix="$prefix"
150 prefix="$acl_final_prefix"
151 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
152 prefix="$acl_save_prefix"
155 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
156 dnl variables prefix and exec_prefix bound to the values they will have
157 dnl at the end of the configure script.
158 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
160 acl_save_prefix="$prefix"
161 prefix="$acl_final_prefix"
162 acl_save_exec_prefix="$exec_prefix"
163 exec_prefix="$acl_final_exec_prefix"
165 exec_prefix="$acl_save_exec_prefix"
166 prefix="$acl_save_prefix"
169 # lib-link.m4 serial 4 (gettext-0.12)
170 dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
171 dnl This file is free software, distributed under the terms of the GNU
172 dnl General Public License. As a special exception to the GNU General
173 dnl Public License, this file may be distributed as part of a program
174 dnl that contains a configuration script generated by Autoconf, under
175 dnl the same distribution terms as the rest of that program.
177 dnl From Bruno Haible.
179 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
180 dnl the libraries corresponding to explicit and implicit dependencies.
181 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
182 dnl augments the CPPFLAGS variable.
183 AC_DEFUN([AC_LIB_LINKFLAGS],
185 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
186 AC_REQUIRE([AC_LIB_RPATH])
187 define([Name],[translit([$1],[./-], [___])])
188 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
189 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
190 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
191 AC_LIB_LINKFLAGS_BODY([$1], [$2])
192 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
193 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
194 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
196 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
197 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
198 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
199 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
201 AC_SUBST([LTLIB]NAME)
202 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
203 dnl results of this search when this library appears as a dependency.
209 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
210 dnl searches for libname and the libraries corresponding to explicit and
211 dnl implicit dependencies, together with the specified include files and
212 dnl the ability to compile and link the specified testcode. If found, it
213 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
214 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
215 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
216 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
217 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
219 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
220 AC_REQUIRE([AC_LIB_RPATH])
221 define([Name],[translit([$1],[./-], [___])])
222 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
223 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
225 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
227 AC_LIB_LINKFLAGS_BODY([$1], [$2])
229 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
230 dnl because if the user has installed lib[]Name and not disabled its use
231 dnl via --without-lib[]Name-prefix, he wants to use it.
232 ac_save_CPPFLAGS="$CPPFLAGS"
233 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
235 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
237 LIBS="$LIBS $LIB[]NAME"
238 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
241 if test "$ac_cv_lib[]Name" = yes; then
243 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
244 AC_MSG_CHECKING([how to link with lib[]$1])
245 AC_MSG_RESULT([$LIB[]NAME])
248 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
249 dnl $INC[]NAME either.
250 CPPFLAGS="$ac_save_CPPFLAGS"
254 AC_SUBST([HAVE_LIB]NAME)
256 AC_SUBST([LTLIB]NAME)
261 dnl Determine the platform dependent parameters needed to use rpath:
262 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
263 dnl hardcode_direct, hardcode_minus_L.
264 AC_DEFUN([AC_LIB_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
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
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, distributed under the terms of the GNU
724 dnl General Public License. As a special exception to the GNU General
725 dnl Public License, this file may be distributed as part of a program
726 dnl that contains a configuration script generated by Autoconf, under
727 dnl the same distribution terms as the rest of that program.
729 dnl Subroutines of libtool.m4,
730 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
733 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
734 AC_DEFUN([AC_LIB_PROG_LD_GNU],
735 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
736 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
737 case `$LD -v 2>&1 </dev/null` in
738 *GNU* | *'with BFD'*)
739 acl_cv_prog_gnu_ld=yes ;;
741 acl_cv_prog_gnu_ld=no ;;
743 with_gnu_ld=$acl_cv_prog_gnu_ld
746 dnl From libtool-1.4. Sets the variable LD.
747 AC_DEFUN([AC_LIB_PROG_LD],
749 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
750 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
751 AC_REQUIRE([AC_PROG_CC])dnl
752 AC_REQUIRE([AC_CANONICAL_HOST])dnl
753 # Prepare PATH_SEPARATOR.
754 # The user is always right.
755 if test "${PATH_SEPARATOR+set}" != set; then
756 echo "#! /bin/sh" >conf$$.sh
757 echo "exit 0" >>conf$$.sh
759 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
767 if test "$GCC" = yes; then
768 # Check if gcc -print-prog-name=ld gives a path.
769 AC_MSG_CHECKING([for ld used by GCC])
772 # gcc leaves a trailing carriage return which upsets mingw
773 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
775 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
778 # Accept absolute paths.
779 [[\\/]* | [A-Za-z]:[\\/]*)]
780 [re_direlt='/[^/][^/]*/\.\./']
781 # Canonicalize the path of ld
782 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
783 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
784 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
786 test -z "$LD" && LD="$ac_prog"
789 # If it fails, then pretend we aren't using GCC.
793 # If it is relative, then search for the first ld in PATH.
797 elif test "$with_gnu_ld" = yes; then
798 AC_MSG_CHECKING([for GNU ld])
800 AC_MSG_CHECKING([for non-GNU ld])
802 AC_CACHE_VAL(acl_cv_path_LD,
803 [if test -z "$LD"; then
804 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
805 for ac_dir in $PATH; do
806 test -z "$ac_dir" && ac_dir=.
807 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
808 acl_cv_path_LD="$ac_dir/$ac_prog"
809 # Check to see if the program is GNU ld. I'd rather use --version,
810 # but apparently some GNU ld's only accept -v.
811 # Break only if it was the GNU/non-GNU ld that we prefer.
812 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
813 *GNU* | *'with BFD'*)
814 test "$with_gnu_ld" != no && break ;;
816 test "$with_gnu_ld" != yes && break ;;
822 acl_cv_path_LD="$LD" # Let the user override the test with a path.
825 if test -n "$LD"; then
830 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
834 # Do all the work for Automake. This macro actually does too much --
835 # some checks are only needed if your package does certain things.
836 # But this isn't really a big deal.
841 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
843 AC_DEFUN([AM_INIT_AUTOMAKE],
844 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
845 AC_REQUIRE([AC_PROG_INSTALL])
850 dnl test to see if srcdir already configured
851 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
852 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
855 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
856 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
857 AC_REQUIRE([AM_SANITY_CHECK])
858 AC_REQUIRE([AC_ARG_PROGRAM])
859 dnl FIXME This is truly gross.
860 missing_dir=`cd $ac_aux_dir && pwd`
861 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
862 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
863 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
864 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
865 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
866 AC_REQUIRE([AC_PROG_MAKE_SET])])
868 # Copyright 2002 Free Software Foundation, Inc.
870 # This program is free software; you can redistribute it and/or modify
871 # it under the terms of the GNU General Public License as published by
872 # the Free Software Foundation; either version 2, or (at your option)
875 # This program is distributed in the hope that it will be useful,
876 # but WITHOUT ANY WARRANTY; without even the implied warranty of
877 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
878 # GNU General Public License for more details.
880 # You should have received a copy of the GNU General Public License
881 # along with this program; if not, write to the Free Software
882 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
884 # AM_AUTOMAKE_VERSION(VERSION)
885 # ----------------------------
886 # Automake X.Y traces this macro to ensure aclocal.m4 has been
887 # generated from the m4 files accompanying Automake X.Y.
888 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
890 # AM_SET_CURRENT_AUTOMAKE_VERSION
891 # -------------------------------
892 # Call AM_AUTOMAKE_VERSION so it can be traced.
893 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
894 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
895 [AM_AUTOMAKE_VERSION([1.4-p6])])
898 # Check to make sure that the build environment is sane.
901 AC_DEFUN([AM_SANITY_CHECK],
902 [AC_MSG_CHECKING([whether build environment is sane])
905 echo timestamp > conftestfile
906 # Do `set' in a subshell so we don't clobber the current shell's
907 # arguments. Must try -L first in case configure is actually a
908 # symlink; some systems play weird games with the mod time of symlinks
909 # (eg FreeBSD returns the mod time of the symlink's containing
912 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
913 if test "[$]*" = "X"; then
915 set X `ls -t $srcdir/configure conftestfile`
917 if test "[$]*" != "X $srcdir/configure conftestfile" \
918 && test "[$]*" != "X conftestfile $srcdir/configure"; then
920 # If neither matched, then we have a broken ls. This can happen
921 # if, for instance, CONFIG_SHELL is bash and it inherits a
922 # broken ls alias from the environment. This has actually
923 # happened. Such a system could not be considered "sane".
924 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
925 alias in your environment])
928 test "[$]2" = conftestfile
934 AC_MSG_ERROR([newly created file is older than distributed files!
935 Check your system clock])
940 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
941 dnl The program must properly implement --version.
942 AC_DEFUN([AM_MISSING_PROG],
943 [AC_MSG_CHECKING(for working $2)
944 # Run test in a subshell; some versions of sh will print an error if
945 # an executable is not found, even if stderr is redirected.
946 # Redirect stdin to placate older versions of autoconf. Sigh.
947 if ($2 --version) < /dev/null > /dev/null 2>&1; then
952 AC_MSG_RESULT(missing)
956 # Like AC_CONFIG_HEADER, but automatically create stamp file.
958 AC_DEFUN([AM_CONFIG_HEADER],
960 AC_CONFIG_HEADER([$1])
961 dnl When config.status generates a header, we must update the stamp-h file.
962 dnl This file resides in the same directory as the config header
963 dnl that is generated. We must strip everything past the first ":",
964 dnl and everything past the last "/".
965 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
966 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
967 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
969 for am_file in <<$1>>; do
970 case " <<$>>CONFIG_HEADERS " in
971 *" <<$>>am_file "*<<)>>
972 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
975 am_indx=`expr "<<$>>am_indx" + 1`
979 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
981 # serial 47 AC_PROG_LIBTOOL
985 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
986 # -----------------------------------------------------------
987 # If this macro is not defined by Autoconf, define it here.
988 m4_ifdef([AC_PROVIDE_IFELSE],
990 [m4_define([AC_PROVIDE_IFELSE],
991 [m4_ifdef([AC_PROVIDE_$1],
997 AC_DEFUN([AC_PROG_LIBTOOL],
998 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
999 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1000 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1001 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1003 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1005 dnl And a similar setup for Fortran 77 support
1006 AC_PROVIDE_IFELSE([AC_PROG_F77],
1008 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1011 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1012 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1013 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1014 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1016 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1018 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1020 [ifdef([AC_PROG_GCJ],
1021 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1022 ifdef([A][M_PROG_GCJ],
1023 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1024 ifdef([LT_AC_PROG_GCJ],
1025 [define([LT_AC_PROG_GCJ],
1026 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1027 ])])# AC_PROG_LIBTOOL
1032 AC_DEFUN([_AC_PROG_LIBTOOL],
1033 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1034 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1035 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1036 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1038 # This can be used to rebuild libtool when needed
1039 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1041 # Always use our own libtool.
1042 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1043 AC_SUBST(LIBTOOL)dnl
1045 # Prevent multiple expansion
1046 define([AC_PROG_LIBTOOL], [])
1047 ])# _AC_PROG_LIBTOOL
1052 AC_DEFUN([AC_LIBTOOL_SETUP],
1054 AC_REQUIRE([AC_ENABLE_SHARED])dnl
1055 AC_REQUIRE([AC_ENABLE_STATIC])dnl
1056 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1057 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1058 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1059 AC_REQUIRE([AC_PROG_CC])dnl
1060 AC_REQUIRE([AC_PROG_LD])dnl
1061 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1062 AC_REQUIRE([AC_PROG_NM])dnl
1064 AC_REQUIRE([AC_PROG_LN_S])dnl
1065 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1066 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1067 AC_REQUIRE([AC_OBJEXT])dnl
1068 AC_REQUIRE([AC_EXEEXT])dnl
1071 AC_LIBTOOL_SYS_MAX_CMD_LEN
1072 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1075 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1076 _LT_AC_PROG_ECHO_BACKSLASH
1080 # AIX sometimes has problems with the GCC collect2 program. For some
1081 # reason, if we set the COLLECT_NAMES environment variable, the problems
1082 # vanish in a puff of smoke.
1083 if test "X${COLLECT_NAMES+set}" != Xset; then
1085 export COLLECT_NAMES
1090 # Sed substitution that helps us do robust quoting. It backslashifies
1091 # metacharacters that are still active within double-quoted strings.
1092 Xsed='sed -e s/^X//'
1093 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1095 # Same as above, but do not quote variable references.
1096 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1098 # Sed substitution to delay expansion of an escaped shell variable in a
1099 # double_quote_subst'ed string.
1100 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1102 # Sed substitution to avoid accidental globbing in evaled expressions
1103 no_glob_subst='s/\*/\\\*/g'
1109 default_ofile=libtool
1110 can_build_shared=yes
1112 # All known linkers require a `.a' archive for static linking (except M$VC,
1113 # which needs '.lib').
1115 ltmain="$ac_aux_dir/ltmain.sh"
1116 ofile="$default_ofile"
1117 with_gnu_ld="$lt_cv_prog_gnu_ld"
1119 AC_CHECK_TOOL(AR, ar, false)
1120 AC_CHECK_TOOL(RANLIB, ranlib, :)
1121 AC_CHECK_TOOL(STRIP, strip, :)
1124 old_CFLAGS="$CFLAGS"
1126 # Set sane defaults for various variables
1127 test -z "$AR" && AR=ar
1128 test -z "$AR_FLAGS" && AR_FLAGS=cru
1129 test -z "$AS" && AS=as
1130 test -z "$CC" && CC=cc
1131 test -z "$LTCC" && LTCC=$CC
1132 test -z "$DLLTOOL" && DLLTOOL=dlltool
1133 test -z "$LD" && LD=ld
1134 test -z "$LN_S" && LN_S="ln -s"
1135 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1136 test -z "$NM" && NM=nm
1137 test -z "$SED" && SED=sed
1138 test -z "$OBJDUMP" && OBJDUMP=objdump
1139 test -z "$RANLIB" && RANLIB=:
1140 test -z "$STRIP" && STRIP=:
1141 test -z "$ac_objext" && ac_objext=o
1143 # Determine commands to create old-style static archives.
1144 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1145 old_postinstall_cmds='chmod 644 $oldlib'
1146 old_postuninstall_cmds=
1148 if test -n "$RANLIB"; then
1151 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1154 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1157 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1160 # Only perform the check for file, if the check method requires it
1161 case $deplibs_check_method in
1163 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1169 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1170 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1171 enable_win32_dll=yes, enable_win32_dll=no)
1173 AC_ARG_ENABLE([libtool-lock],
1174 [AC_HELP_STRING([--disable-libtool-lock],
1175 [avoid locking (might break parallel builds)])])
1176 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1179 [AC_HELP_STRING([--with-pic],
1180 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1181 [pic_mode="$withval"],
1183 test -z "$pic_mode" && pic_mode=default
1185 # Use C for the default configuration in the libtool script
1187 AC_LIBTOOL_LANG_C_CONFIG
1189 ])# AC_LIBTOOL_SETUP
1192 # _LT_AC_SYS_COMPILER
1193 # -------------------
1194 AC_DEFUN([_LT_AC_SYS_COMPILER],
1195 [AC_REQUIRE([AC_PROG_CC])dnl
1197 # If no C compiler was specified, use CC.
1200 # Allow CC to be a program name with arguments.
1202 ])# _LT_AC_SYS_COMPILER
1205 # _LT_AC_SYS_LIBPATH_AIX
1206 # ----------------------
1207 # Links a minimal program and checks the executable
1208 # for the system default hardcoded library path. In most cases,
1209 # this is /usr/lib:/lib, but when the MPI compilers are used
1210 # the location of the communication and MPI libs are included too.
1211 # If we don't find anything, use the default library path according
1212 # to the aix ld manual.
1213 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1214 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1215 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1217 # Check for a 64-bit object if we didn't find anything.
1218 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; }
1220 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1221 ])# _LT_AC_SYS_LIBPATH_AIX
1224 # _LT_AC_SHELL_INIT(ARG)
1225 # ----------------------
1226 AC_DEFUN([_LT_AC_SHELL_INIT],
1227 [ifdef([AC_DIVERSION_NOTICE],
1228 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1229 [AC_DIVERT_PUSH(NOTICE)])
1232 ])# _LT_AC_SHELL_INIT
1235 # _LT_AC_PROG_ECHO_BACKSLASH
1236 # --------------------------
1237 # Add some code to the start of the generated configure script which
1238 # will find an echo command which doesn't interpret backslashes.
1239 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1240 [_LT_AC_SHELL_INIT([
1241 # Check that we are running under the correct shell.
1242 SHELL=${CONFIG_SHELL-/bin/sh}
1246 # Remove one level of quotation (which was required for Make).
1247 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1252 if test "X[$]1" = X--no-reexec; then
1253 # Discard the --no-reexec flag, and continue.
1255 elif test "X[$]1" = X--fallback-echo; then
1256 # Avoid inline document here, it may be left over
1258 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1259 # Yippee, $echo works!
1262 # Restart under the correct shell.
1263 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1266 if test "X[$]1" = X--fallback-echo; then
1267 # used as fallback echo
1275 # The HP-UX ksh and POSIX shell print the target directory to stdout
1277 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1279 if test -z "$ECHO"; then
1280 if test "X${echo_test_string+set}" != Xset; then
1281 # find a string as large as possible, as long as the shell can cope with it
1282 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1283 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1284 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1285 echo_test_string="`eval $cmd`" &&
1286 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1293 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1294 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1295 test "X$echo_testing_string" = "X$echo_test_string"; then
1298 # The Solaris, AIX, and Digital Unix default echo programs unquote
1299 # backslashes. This makes it impossible to quote backslashes using
1300 # echo "$something" | sed 's/\\/\\\\/g'
1302 # So, first we look for a working echo in the user's PATH.
1304 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1305 for dir in $PATH /usr/ucb; do
1307 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1308 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1309 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1310 test "X$echo_testing_string" = "X$echo_test_string"; then
1317 if test "X$echo" = Xecho; then
1318 # We didn't find a better echo, so look for alternatives.
1319 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1320 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1321 test "X$echo_testing_string" = "X$echo_test_string"; then
1322 # This shell has a builtin print -r that does the trick.
1324 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1325 test "X$CONFIG_SHELL" != X/bin/ksh; then
1326 # If we have ksh, try running configure again with it.
1327 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1328 export ORIGINAL_CONFIG_SHELL
1329 CONFIG_SHELL=/bin/ksh
1331 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1335 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1336 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1337 test "X$echo_testing_string" = "X$echo_test_string"; then
1338 # Cool, printf works
1340 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1341 test "X$echo_testing_string" = 'X\t' &&
1342 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1343 test "X$echo_testing_string" = "X$echo_test_string"; then
1344 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1346 SHELL="$CONFIG_SHELL"
1348 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1349 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1350 test "X$echo_testing_string" = 'X\t' &&
1351 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1352 test "X$echo_testing_string" = "X$echo_test_string"; then
1353 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1355 # maybe with a smaller string...
1358 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1359 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1366 if test "$prev" != 'sed 50q "[$]0"'; then
1367 echo_test_string=`eval $prev`
1368 export echo_test_string
1369 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1371 # Oops. We lost completely, so just stick with echo.
1380 # Copy echo and quote the copy suitably for passing to libtool from
1381 # the Makefile, instead of quoting the original, which is used later.
1383 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1384 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1388 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1393 AC_DEFUN([_LT_AC_LOCK],
1394 [AC_ARG_ENABLE([libtool-lock],
1395 [AC_HELP_STRING([--disable-libtool-lock],
1396 [avoid locking (might break parallel builds)])])
1397 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1399 # Some flags need to be propagated to the compiler or linker for good
1403 # Find out which ABI we are using.
1404 echo 'int i;' > conftest.$ac_ext
1405 if AC_TRY_EVAL(ac_compile); then
1406 case `/usr/bin/file conftest.$ac_objext` in
1418 # Find out which ABI we are using.
1419 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1420 if AC_TRY_EVAL(ac_compile); then
1421 if test "$lt_cv_prog_gnu_ld" = yes; then
1422 case `/usr/bin/file conftest.$ac_objext` in
1424 LD="${LD-ld} -melf32bsmip"
1427 LD="${LD-ld} -melf32bmipn32"
1430 LD="${LD-ld} -melf64bmip"
1434 case `/usr/bin/file conftest.$ac_objext` in
1450 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1451 # Find out which ABI we are using.
1452 echo 'int i;' > conftest.$ac_ext
1453 if AC_TRY_EVAL(ac_compile); then
1454 case "`/usr/bin/file conftest.o`" in
1458 LD="${LD-ld} -m elf_i386"
1460 ppc64-*linux*|powerpc64-*linux*)
1461 LD="${LD-ld} -m elf32ppclinux"
1464 LD="${LD-ld} -m elf_s390"
1467 LD="${LD-ld} -m elf32_sparc"
1474 LD="${LD-ld} -m elf_x86_64"
1476 ppc*-*linux*|powerpc*-*linux*)
1477 LD="${LD-ld} -m elf64ppc"
1480 LD="${LD-ld} -m elf64_s390"
1483 LD="${LD-ld} -m elf64_sparc"
1493 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1494 SAVE_CFLAGS="$CFLAGS"
1495 CFLAGS="$CFLAGS -belf"
1496 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1498 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1500 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1501 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1502 CFLAGS="$SAVE_CFLAGS"
1505 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1506 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1507 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1508 AC_CHECK_TOOL(AS, as, false)
1509 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1514 need_locks="$enable_libtool_lock"
1519 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1520 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1521 # ----------------------------------------------------------------
1522 # Check whether the given compiler option works
1523 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1524 [AC_REQUIRE([LT_AC_PROG_SED])
1525 AC_CACHE_CHECK([$1], [$2],
1527 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1528 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1529 lt_compiler_flag="$3"
1530 # Insert the option either (1) after the last *FLAGS variable, or
1531 # (2) before a word containing "conftest.", or (3) at the end.
1532 # Note that $ac_compile itself does not contain backslashes and begins
1533 # with a dollar sign (not a hyphen), so the echo should work correctly.
1534 # The option is referenced via a variable to avoid confusing sed.
1535 lt_compile=`echo "$ac_compile" | $SED \
1536 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1537 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1538 -e 's:$: $lt_compiler_flag:'`
1539 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1540 (eval "$lt_compile" 2>conftest.err)
1542 cat conftest.err >&AS_MESSAGE_LOG_FD
1543 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1544 if (exit $ac_status) && test -s "$ac_outfile"; then
1545 # The compiler can only warn and ignore the option if not recognized
1546 # So say no if there are warnings
1547 if test ! -s conftest.err; then
1554 if test x"[$]$2" = xyes; then
1555 ifelse([$5], , :, [$5])
1557 ifelse([$6], , :, [$6])
1559 ])# AC_LIBTOOL_COMPILER_OPTION
1562 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1563 # [ACTION-SUCCESS], [ACTION-FAILURE])
1564 # ------------------------------------------------------------
1565 # Check whether the given compiler option works
1566 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1567 [AC_CACHE_CHECK([$1], [$2],
1569 save_LDFLAGS="$LDFLAGS"
1570 LDFLAGS="$LDFLAGS $3"
1571 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1572 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1573 # The compiler can only warn and ignore the option if not recognized
1574 # So say no if there are warnings
1575 if test -s conftest.err; then
1576 # Append any errors to the config.log.
1577 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1583 LDFLAGS="$save_LDFLAGS"
1586 if test x"[$]$2" = xyes; then
1587 ifelse([$4], , :, [$4])
1589 ifelse([$5], , :, [$5])
1591 ])# AC_LIBTOOL_LINKER_OPTION
1594 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1595 # --------------------------
1596 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1597 [# find the maximum length of command line arguments
1598 AC_MSG_CHECKING([the maximum length of command line arguments])
1599 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1605 # On DJGPP, this test can blow up pretty badly due to problems in libc
1606 # (any single argument exceeding 2000 bytes causes a buffer overrun
1607 # during glob expansion). Even if it were fixed, the result of this
1608 # check would be larger than it should be.
1609 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1613 # Under GNU Hurd, this test is not required because there is
1614 # no limit to the length of command line arguments.
1615 # Libtool will interpret -1 as no limit whatsoever
1616 lt_cv_sys_max_cmd_len=-1;
1620 # On Win9x/ME, this test blows up -- it succeeds, but takes
1621 # about 5 minutes as the teststring grows exponentially.
1622 # Worse, since 9x/ME are not pre-emptively multitasking,
1623 # you end up with a "frozen" computer, even though with patience
1624 # the test eventually succeeds (with a max line length of 256k).
1625 # Instead, let's just punt: use the minimum linelength reported by
1626 # all of the supported platforms: 8192 (on NT/2K/XP).
1627 lt_cv_sys_max_cmd_len=8192;
1631 # On AmigaOS with pdksh, this test takes hours, literally.
1632 # So we just punt and use a minimum line length of 8192.
1633 lt_cv_sys_max_cmd_len=8192;
1637 # If test is not a shell built-in, we'll probably end up computing a
1638 # maximum length that is only half of the actual maximum length, but
1640 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1641 = "XX$teststring") >/dev/null 2>&1 &&
1642 new_result=`expr "X$teststring" : ".*" 2>&1` &&
1643 lt_cv_sys_max_cmd_len=$new_result &&
1644 test $i != 17 # 1/2 MB should be enough
1647 teststring=$teststring$teststring
1650 # Add a significant safety factor because C++ compilers can tack on massive
1651 # amounts of additional arguments before passing them to the linker.
1652 # It appears as though 1/2 is a usable value.
1653 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1657 if test -n $lt_cv_sys_max_cmd_len ; then
1658 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1662 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1665 # _LT_AC_CHECK_DLFCN
1666 # --------------------
1667 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1668 [AC_CHECK_HEADERS(dlfcn.h)dnl
1669 ])# _LT_AC_CHECK_DLFCN
1672 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1673 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1674 # ------------------------------------------------------------------
1675 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1676 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1677 if test "$cross_compiling" = yes; then :
1680 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1681 lt_status=$lt_dlunknown
1682 cat > conftest.$ac_ext <<EOF
1683 [#line __oline__ "configure"
1684 #include "confdefs.h"
1693 # define LT_DLGLOBAL RTLD_GLOBAL
1696 # define LT_DLGLOBAL DL_GLOBAL
1698 # define LT_DLGLOBAL 0
1702 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1703 find out it does not work in some platform. */
1704 #ifndef LT_DLLAZY_OR_NOW
1706 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1709 # define LT_DLLAZY_OR_NOW DL_LAZY
1712 # define LT_DLLAZY_OR_NOW RTLD_NOW
1715 # define LT_DLLAZY_OR_NOW DL_NOW
1717 # define LT_DLLAZY_OR_NOW 0
1725 extern "C" void exit (int);
1728 void fnord() { int i=42;}
1731 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1732 int status = $lt_dlunknown;
1736 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1737 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1738 /* dlclose (self); */
1744 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1745 (./conftest; exit; ) 2>/dev/null
1748 x$lt_dlno_uscore) $1 ;;
1749 x$lt_dlneed_uscore) $2 ;;
1750 x$lt_unknown|x*) $3 ;;
1753 # compilation failed
1758 ])# _LT_AC_TRY_DLOPEN_SELF
1761 # AC_LIBTOOL_DLOPEN_SELF
1762 # -------------------
1763 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1764 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1765 if test "x$enable_dlopen" != xyes; then
1766 enable_dlopen=unknown
1767 enable_dlopen_self=unknown
1768 enable_dlopen_self_static=unknown
1775 lt_cv_dlopen="load_add_on"
1777 lt_cv_dlopen_self=yes
1781 lt_cv_dlopen="LoadLibrary"
1786 lt_cv_dlopen="dlopen"
1791 # if libdl is installed we need to link against it
1792 AC_CHECK_LIB([dl], [dlopen],
1793 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1796 lt_cv_dlopen_self=yes
1801 AC_CHECK_FUNC([shl_load],
1802 [lt_cv_dlopen="shl_load"],
1803 [AC_CHECK_LIB([dld], [shl_load],
1804 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1805 [AC_CHECK_FUNC([dlopen],
1806 [lt_cv_dlopen="dlopen"],
1807 [AC_CHECK_LIB([dl], [dlopen],
1808 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1809 [AC_CHECK_LIB([svld], [dlopen],
1810 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1811 [AC_CHECK_LIB([dld], [dld_link],
1812 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1821 if test "x$lt_cv_dlopen" != xno; then
1827 case $lt_cv_dlopen in
1829 save_CPPFLAGS="$CPPFLAGS"
1830 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1832 save_LDFLAGS="$LDFLAGS"
1833 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1836 LIBS="$lt_cv_dlopen_libs $LIBS"
1838 AC_CACHE_CHECK([whether a program can dlopen itself],
1839 lt_cv_dlopen_self, [dnl
1840 _LT_AC_TRY_DLOPEN_SELF(
1841 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1842 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1845 if test "x$lt_cv_dlopen_self" = xyes; then
1846 LDFLAGS="$LDFLAGS $link_static_flag"
1847 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1848 lt_cv_dlopen_self_static, [dnl
1849 _LT_AC_TRY_DLOPEN_SELF(
1850 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1851 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1855 CPPFLAGS="$save_CPPFLAGS"
1856 LDFLAGS="$save_LDFLAGS"
1861 case $lt_cv_dlopen_self in
1862 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1863 *) enable_dlopen_self=unknown ;;
1866 case $lt_cv_dlopen_self_static in
1867 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1868 *) enable_dlopen_self_static=unknown ;;
1871 ])# AC_LIBTOOL_DLOPEN_SELF
1874 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1875 # ---------------------------------
1876 # Check to see if options -c and -o are simultaneously supported by compiler
1877 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1878 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1879 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1880 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1881 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1882 $rm -r conftest 2>/dev/null
1886 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1888 lt_compiler_flag="-o out/conftest2.$ac_objext"
1889 # Insert the option either (1) after the last *FLAGS variable, or
1890 # (2) before a word containing "conftest.", or (3) at the end.
1891 # Note that $ac_compile itself does not contain backslashes and begins
1892 # with a dollar sign (not a hyphen), so the echo should work correctly.
1893 lt_compile=`echo "$ac_compile" | $SED \
1894 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1895 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1896 -e 's:$: $lt_compiler_flag:'`
1897 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1898 (eval "$lt_compile" 2>out/conftest.err)
1900 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1901 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1902 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1904 # The compiler can only warn and ignore the option if not recognized
1905 # So say no if there are warnings
1906 if test ! -s out/conftest.err; then
1907 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1912 # SGI C++ compiler will create directory out/ii_files/ for
1913 # template instantiation
1914 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1915 $rm out/* && rmdir out
1920 ])# AC_LIBTOOL_PROG_CC_C_O
1923 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1924 # -----------------------------------------
1925 # Check to see if we can do hard links to lock some files if needed
1926 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1927 [AC_REQUIRE([_LT_AC_LOCK])dnl
1929 hard_links="nottested"
1930 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1931 # do not overwrite the value of need_locks provided by the user
1932 AC_MSG_CHECKING([if we can lock with hard links])
1935 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1937 ln conftest.a conftest.b 2>&5 || hard_links=no
1938 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1939 AC_MSG_RESULT([$hard_links])
1940 if test "$hard_links" = no; then
1941 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1947 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1952 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1953 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1954 [rm -f .libs 2>/dev/null
1955 mkdir .libs 2>/dev/null
1956 if test -d .libs; then
1959 # MS-DOS does not allow filenames that begin with a dot.
1962 rmdir .libs 2>/dev/null])
1963 objdir=$lt_cv_objdir
1964 ])# AC_LIBTOOL_OBJDIR
1967 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1968 # ----------------------------------------------
1969 # Check hardcoding attributes.
1970 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1971 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1972 _LT_AC_TAGVAR(hardcode_action, $1)=
1973 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1974 test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1975 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
1977 # We can hardcode non-existant directories.
1978 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1979 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1980 # have to relink, otherwise we might link with an installed library
1981 # when we should be linking with a yet-to-be-installed one
1982 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1983 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1984 # Linking always hardcodes the temporary library directory.
1985 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1987 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1988 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1991 # We cannot hardcode anything, or else we can only hardcode existing
1993 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1995 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1997 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1998 # Fast installation is not supported
1999 enable_fast_install=no
2000 elif test "$shlibpath_overrides_runpath" = yes ||
2001 test "$enable_shared" = no; then
2002 # Fast installation is not necessary
2003 enable_fast_install=needless
2005 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2008 # AC_LIBTOOL_SYS_LIB_STRIP
2009 # ------------------------
2010 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2013 AC_MSG_CHECKING([whether stripping libraries is possible])
2014 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2015 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2016 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2017 AC_MSG_RESULT([yes])
2019 # FIXME - insert some real tests, host_os isn't really good enough
2022 if test -n "$STRIP" ; then
2023 striplib="$STRIP -x"
2024 AC_MSG_RESULT([yes])
2034 ])# AC_LIBTOOL_SYS_LIB_STRIP
2037 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2038 # -----------------------------
2039 # PORTME Fill in your ld.so characteristics
2040 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2041 [AC_MSG_CHECKING([dynamic linker characteristics])
2043 libname_spec='lib$name'
2051 shlibpath_overrides_runpath=unknown
2053 dynamic_linker="$host_os ld.so"
2054 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2055 if test "$GCC" = yes; then
2056 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2057 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2058 # if the path contains ";" then we assume it to be the separator
2059 # otherwise default to the standard path separator (i.e. ":") - it is
2060 # assumed that no part of a normal pathname contains ";" but that should
2061 # okay in the real world where ";" in dirpaths is itself problematic.
2062 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2064 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2067 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2069 need_lib_prefix=unknown
2070 hardcode_into_libs=no
2072 # when you set need_version to no, make sure it does not cause -set_version
2073 # flags to be left without arguments
2074 need_version=unknown
2079 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2080 shlibpath_var=LIBPATH
2082 # AIX 3 has no versioning support, so we append a major version to the name.
2083 soname_spec='${libname}${release}${shared_ext}$major'
2090 hardcode_into_libs=yes
2091 if test "$host_cpu" = ia64; then
2092 # AIX 5 supports IA64
2093 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2094 shlibpath_var=LD_LIBRARY_PATH
2096 # With GCC up to 2.95.x, collect2 would create an import file
2097 # for dependence libraries. The import file would start with
2098 # the line `#! .'. This would cause the generated library to
2099 # depend on `.', always an invalid library. This was fixed in
2100 # development snapshots of GCC prior to 3.0.
2102 aix4 | aix4.[[01]] | aix4.[[01]].*)
2103 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2105 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2112 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2113 # soname into executable. Probably we can add versioning support to
2114 # collect2, so additional links can be useful in future.
2115 if test "$aix_use_runtimelinking" = yes; then
2116 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2117 # instead of lib<name>.a to let people know that these are not
2118 # typical AIX shared libraries.
2119 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2121 # We preserve .a as extension for shared libraries through AIX4.2
2122 # and later when we are not doing run time linking.
2123 library_names_spec='${libname}${release}.a $libname.a'
2124 soname_spec='${libname}${release}${shared_ext}$major'
2126 shlibpath_var=LIBPATH
2131 library_names_spec='$libname.ixlibrary $libname.a'
2132 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2133 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'
2137 library_names_spec='${libname}${shared_ext}'
2138 dynamic_linker="$host_os ld.so"
2139 shlibpath_var=LIBRARY_PATH
2145 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2146 soname_spec='${libname}${release}${shared_ext}$major'
2147 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2148 shlibpath_var=LD_LIBRARY_PATH
2149 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2150 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2151 # the default ld.so.conf also contains /usr/contrib/lib and
2152 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2153 # libtool to hard-code these into programs
2156 cygwin* | mingw* | pw32*)
2157 version_type=windows
2162 case $GCC,$host_os in
2163 yes,cygwin* | yes,mingw* | yes,pw32*)
2164 library_names_spec='$libname.dll.a'
2165 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2166 postinstall_cmds='base_file=`basename \${file}`~
2167 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2168 dldir=$destdir/`dirname \$dlpath`~
2169 test -d \$dldir || mkdir -p \$dldir~
2170 $install_prog $dir/$dlname \$dldir/$dlname'
2171 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2172 dlpath=$dir/\$dldll~
2174 shlibpath_overrides_runpath=yes
2178 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2179 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2180 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2183 # MinGW DLLs use traditional 'lib' prefix
2184 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2185 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2186 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2187 # It is most probably a Windows format PATH printed by
2188 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2189 # path with ; separators, and with drive letters. We can handle the
2190 # drive letters (cygwin fileutils understands them), so leave them,
2191 # especially as we might pass files found there to a mingw objdump,
2192 # which wouldn't understand a cygwinified path. Ahh.
2193 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2195 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2199 # pw32 DLLs use 'pw' prefix rather than 'lib'
2200 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
2206 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2209 dynamic_linker='Win32 ld.exe'
2210 # FIXME: first we should search . and the directory the executable is in
2214 darwin* | rhapsody*)
2215 dynamic_linker="$host_os dyld"
2219 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2220 soname_spec='${libname}${release}${major}$shared_ext'
2221 shlibpath_overrides_runpath=yes
2222 shlibpath_var=DYLD_LIBRARY_PATH
2223 shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
2224 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2225 if test "$GCC" = yes; then
2226 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"`
2228 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2230 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2237 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2238 soname_spec='${libname}${release}${shared_ext}$major'
2239 shlibpath_var=LD_LIBRARY_PATH
2250 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2251 soname_spec='${libname}${release}${shared_ext}$major'
2252 shlibpath_var=LD_LIBRARY_PATH
2253 shlibpath_overrides_runpath=no
2254 hardcode_into_libs=yes
2255 dynamic_linker='GNU ld.so'
2259 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2260 version_type=freebsd-$objformat
2261 case $version_type in
2263 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2268 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2272 shlibpath_var=LD_LIBRARY_PATH
2275 shlibpath_overrides_runpath=yes
2277 freebsd3.[01]* | freebsdelf3.[01]*)
2278 shlibpath_overrides_runpath=yes
2279 hardcode_into_libs=yes
2282 shlibpath_overrides_runpath=no
2283 hardcode_into_libs=yes
2292 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2293 soname_spec='${libname}${release}${shared_ext}$major'
2294 shlibpath_var=LD_LIBRARY_PATH
2295 hardcode_into_libs=yes
2298 hpux9* | hpux10* | hpux11*)
2299 # Give a soname corresponding to the major version so that dld.sl refuses to
2300 # link against other versions.
2307 hardcode_into_libs=yes
2308 dynamic_linker="$host_os dld.so"
2309 shlibpath_var=LD_LIBRARY_PATH
2310 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2311 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2312 soname_spec='${libname}${release}${shared_ext}$major'
2313 if test "X$HPUX_IA64_MODE" = X32; then
2314 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2316 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2318 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2322 hardcode_into_libs=yes
2323 dynamic_linker="$host_os dld.sl"
2324 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2325 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2326 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2327 soname_spec='${libname}${release}${shared_ext}$major'
2328 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2329 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2333 dynamic_linker="$host_os dld.sl"
2334 shlibpath_var=SHLIB_PATH
2335 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2336 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2337 soname_spec='${libname}${release}${shared_ext}$major'
2340 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2341 postinstall_cmds='chmod 555 $lib'
2344 irix5* | irix6* | nonstopux*)
2346 nonstopux*) version_type=nonstopux ;;
2348 if test "$lt_cv_prog_gnu_ld" = yes; then
2356 soname_spec='${libname}${release}${shared_ext}$major'
2357 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2359 irix5* | nonstopux*)
2363 case $LD in # libtool.m4 will add one of these switches to LD
2364 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2365 libsuff= shlibsuff= libmagic=32-bit;;
2366 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2367 libsuff=32 shlibsuff=N32 libmagic=N32;;
2368 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2369 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2370 *) libsuff= shlibsuff= libmagic=never-match;;
2374 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2375 shlibpath_overrides_runpath=no
2376 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2377 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2378 hardcode_into_libs=yes
2381 # No shared lib support for Linux oldld, aout, or coff.
2382 linux*oldld* | linux*aout* | linux*coff*)
2386 # This must be Linux ELF.
2391 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2392 soname_spec='${libname}${release}${shared_ext}$major'
2393 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2394 shlibpath_var=LD_LIBRARY_PATH
2395 shlibpath_overrides_runpath=no
2396 # This implies no fast_install, which is unacceptable.
2397 # Some rework will be needed to allow for fast_install
2398 # before this can be enabled.
2399 hardcode_into_libs=yes
2401 # Append ld.so.conf contents to the search path
2402 if test -f /etc/ld.so.conf; then
2403 lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
2404 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2407 # We used to test for /lib/ld.so.1 and disable shared libraries on
2408 # powerpc, because MkLinux only supported shared libraries with the
2409 # GNU dynamic linker. Since this was broken with cross compilers,
2410 # most powerpc-linux boxes support dynamic linking these days and
2411 # people can always --disable-shared, the test was removed, and we
2412 # assume the GNU/Linux dynamic linker is in use.
2413 dynamic_linker='GNU/Linux ld.so'
2420 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2421 soname_spec='${libname}${release}${shared_ext}$major'
2422 shlibpath_var=LD_LIBRARY_PATH
2423 shlibpath_overrides_runpath=no
2424 hardcode_into_libs=yes
2425 dynamic_linker='NetBSD ld.elf_so'
2432 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2433 soname_spec='${libname}${release}${shared_ext}$major'
2434 shlibpath_var=LD_LIBRARY_PATH
2435 shlibpath_overrides_runpath=no
2436 hardcode_into_libs=yes
2437 dynamic_linker='GNU ld.so'
2444 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2445 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2446 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2447 dynamic_linker='NetBSD (a.out) ld.so'
2449 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2450 soname_spec='${libname}${release}${shared_ext}$major'
2451 dynamic_linker='NetBSD ld.elf_so'
2453 shlibpath_var=LD_LIBRARY_PATH
2454 shlibpath_overrides_runpath=yes
2455 hardcode_into_libs=yes
2460 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2461 shlibpath_var=LD_LIBRARY_PATH
2462 shlibpath_overrides_runpath=yes
2469 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2470 soname_spec='${libname}${release}${shared_ext}$major'
2471 shlibpath_var=LD_LIBRARY_PATH
2472 shlibpath_overrides_runpath=yes
2479 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2480 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2481 shlibpath_var=LD_LIBRARY_PATH
2482 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2484 openbsd2.[[89]] | openbsd2.[[89]].*)
2485 shlibpath_overrides_runpath=no
2488 shlibpath_overrides_runpath=yes
2492 shlibpath_overrides_runpath=yes
2497 libname_spec='$name'
2500 library_names_spec='$libname${shared_ext} $libname.a'
2501 dynamic_linker='OS/2 ld.exe'
2502 shlibpath_var=LIBPATH
2505 osf3* | osf4* | osf5*)
2509 soname_spec='${libname}${release}${shared_ext}$major'
2510 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2511 shlibpath_var=LD_LIBRARY_PATH
2512 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2513 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2518 soname_spec='${libname}${release}${shared_ext}$major'
2519 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2520 shlibpath_var=LD_LIBRARY_PATH
2527 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2528 soname_spec='${libname}${release}${shared_ext}$major'
2529 shlibpath_var=LD_LIBRARY_PATH
2530 shlibpath_overrides_runpath=yes
2531 hardcode_into_libs=yes
2532 # ldd complains unless libraries are executable
2533 postinstall_cmds='chmod +x $lib'
2538 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2539 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2540 shlibpath_var=LD_LIBRARY_PATH
2541 shlibpath_overrides_runpath=yes
2542 if test "$with_gnu_ld" = yes; then
2548 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2550 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2551 soname_spec='${libname}${release}${shared_ext}$major'
2552 shlibpath_var=LD_LIBRARY_PATH
2553 case $host_vendor in
2555 shlibpath_overrides_runpath=no
2557 export_dynamic_flag_spec='${wl}-Blargedynsym'
2558 runpath_var=LD_RUN_PATH
2566 shlibpath_overrides_runpath=no
2567 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2573 if test -d /usr/nec ;then
2575 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2576 soname_spec='$libname${shared_ext}.$major'
2577 shlibpath_var=LD_LIBRARY_PATH
2583 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2584 soname_spec='${libname}${release}${shared_ext}$major'
2585 shlibpath_var=LD_LIBRARY_PATH
2592 AC_MSG_RESULT([$dynamic_linker])
2593 test "$dynamic_linker" = no && can_build_shared=no
2594 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2599 AC_DEFUN([_LT_AC_TAGCONFIG],
2600 [AC_ARG_WITH([tags],
2601 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2602 [include additional configurations @<:@automatic@:>@])],
2603 [tagnames="$withval"])
2605 if test -f "$ltmain" && test -n "$tagnames"; then
2606 if test ! -f "${ofile}"; then
2607 AC_MSG_WARN([output file `$ofile' does not exist])
2610 if test -z "$LTCC"; then
2611 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2612 if test -z "$LTCC"; then
2613 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2615 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2619 # Extract list of available tagged configurations in $ofile.
2620 # Note that this assumes the entire list is on one line.
2621 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2623 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2624 for tagname in $tagnames; do
2626 # Check whether tagname contains only valid characters
2627 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2629 *) AC_MSG_ERROR([invalid tag name: $tagname])
2633 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2635 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2638 # Update the list of available tags.
2639 if test -n "$tagname"; then
2640 echo appending configuration tag \"$tagname\" to $ofile
2644 if test -n "$CXX" && test "X$CXX" != "Xno"; then
2645 AC_LIBTOOL_LANG_CXX_CONFIG
2652 if test -n "$F77" && test "X$F77" != "Xno"; then
2653 AC_LIBTOOL_LANG_F77_CONFIG
2660 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2661 AC_LIBTOOL_LANG_GCJ_CONFIG
2668 AC_LIBTOOL_LANG_RC_CONFIG
2672 AC_MSG_ERROR([Unsupported tag name: $tagname])
2676 # Append the new tag name to the list of available tags.
2677 if test -n "$tagname" ; then
2678 available_tags="$available_tags $tagname"
2684 # Now substitute the updated list of available tags.
2685 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2686 mv "${ofile}T" "$ofile"
2690 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2693 ])# _LT_AC_TAGCONFIG
2698 # enable checks for dlopen support
2699 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2700 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2701 ])# AC_LIBTOOL_DLOPEN
2704 # AC_LIBTOOL_WIN32_DLL
2705 # --------------------
2706 # declare package support for building win32 dll's
2707 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2708 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2709 ])# AC_LIBTOOL_WIN32_DLL
2712 # AC_ENABLE_SHARED([DEFAULT])
2713 # ---------------------------
2714 # implement the --enable-shared flag
2715 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2716 AC_DEFUN([AC_ENABLE_SHARED],
2717 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2718 AC_ARG_ENABLE([shared],
2719 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2720 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2721 [p=${PACKAGE-default}
2723 yes) enable_shared=yes ;;
2724 no) enable_shared=no ;;
2727 # Look at the argument we got. We use all the common list separators.
2728 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2729 for pkg in $enableval; do
2731 if test "X$pkg" = "X$p"; then
2738 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2739 ])# AC_ENABLE_SHARED
2744 #- set the default shared flag to --disable-shared
2745 AC_DEFUN([AC_DISABLE_SHARED],
2746 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2747 AC_ENABLE_SHARED(no)
2748 ])# AC_DISABLE_SHARED
2751 # AC_ENABLE_STATIC([DEFAULT])
2752 # ---------------------------
2753 # implement the --enable-static flag
2754 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2755 AC_DEFUN([AC_ENABLE_STATIC],
2756 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2757 AC_ARG_ENABLE([static],
2758 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2759 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2760 [p=${PACKAGE-default}
2762 yes) enable_static=yes ;;
2763 no) enable_static=no ;;
2766 # Look at the argument we got. We use all the common list separators.
2767 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2768 for pkg in $enableval; do
2770 if test "X$pkg" = "X$p"; then
2777 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2778 ])# AC_ENABLE_STATIC
2783 # set the default static flag to --disable-static
2784 AC_DEFUN([AC_DISABLE_STATIC],
2785 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2786 AC_ENABLE_STATIC(no)
2787 ])# AC_DISABLE_STATIC
2790 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2791 # ---------------------------------
2792 # implement the --enable-fast-install flag
2793 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2794 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2795 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2796 AC_ARG_ENABLE([fast-install],
2797 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2798 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2799 [p=${PACKAGE-default}
2801 yes) enable_fast_install=yes ;;
2802 no) enable_fast_install=no ;;
2804 enable_fast_install=no
2805 # Look at the argument we got. We use all the common list separators.
2806 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2807 for pkg in $enableval; do
2809 if test "X$pkg" = "X$p"; then
2810 enable_fast_install=yes
2816 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2817 ])# AC_ENABLE_FAST_INSTALL
2820 # AC_DISABLE_FAST_INSTALL
2821 # -----------------------
2822 # set the default to --disable-fast-install
2823 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2824 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2825 AC_ENABLE_FAST_INSTALL(no)
2826 ])# AC_DISABLE_FAST_INSTALL
2829 # AC_LIBTOOL_PICMODE([MODE])
2830 # --------------------------
2831 # implement the --with-pic flag
2832 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2833 AC_DEFUN([AC_LIBTOOL_PICMODE],
2834 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2835 pic_mode=ifelse($#,1,$1,default)
2836 ])# AC_LIBTOOL_PICMODE
2841 # This is predefined starting with Autoconf 2.54, so this conditional
2842 # definition can be removed once we require Autoconf 2.54 or later.
2843 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2844 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2845 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2846 then ac_cv_prog_egrep='grep -E'
2847 else ac_cv_prog_egrep='egrep'
2849 EGREP=$ac_cv_prog_egrep
2854 # AC_PATH_TOOL_PREFIX
2855 # -------------------
2856 # find a file program which can recognise shared library
2857 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2858 [AC_REQUIRE([AC_PROG_EGREP])dnl
2859 AC_MSG_CHECKING([for $1])
2860 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2862 [[\\/*] | ?:[\\/]*])
2863 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2866 lt_save_MAGIC_CMD="$MAGIC_CMD"
2867 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2868 dnl $ac_dummy forces splitting on constant user-supplied paths.
2869 dnl POSIX.2 word splitting is done only on the output of word expansions,
2870 dnl not every word. This closes a longstanding sh security hole.
2871 ac_dummy="ifelse([$2], , $PATH, [$2])"
2872 for ac_dir in $ac_dummy; do
2874 test -z "$ac_dir" && ac_dir=.
2875 if test -f $ac_dir/$1; then
2876 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2877 if test -n "$file_magic_test_file"; then
2878 case $deplibs_check_method in
2880 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2881 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2882 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2883 $EGREP "$file_magic_regex" > /dev/null; then
2888 *** Warning: the command libtool uses to detect shared libraries,
2889 *** $file_magic_cmd, produces output that libtool cannot recognize.
2890 *** The result is that libtool may fail to recognize shared libraries
2891 *** as such. This will affect the creation of libtool libraries that
2892 *** depend on shared libraries, but programs linked with such libtool
2893 *** libraries will work regardless of this problem. Nevertheless, you
2894 *** may want to report the problem to your system manager and/or to
2895 *** bug-libtool@gnu.org
2905 MAGIC_CMD="$lt_save_MAGIC_CMD"
2908 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2909 if test -n "$MAGIC_CMD"; then
2910 AC_MSG_RESULT($MAGIC_CMD)
2914 ])# AC_PATH_TOOL_PREFIX
2919 # find a file program which can recognise a shared library
2920 AC_DEFUN([AC_PATH_MAGIC],
2921 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2922 if test -z "$lt_cv_path_MAGIC_CMD"; then
2923 if test -n "$ac_tool_prefix"; then
2924 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2934 # find the pathname to the GNU or non-GNU linker
2935 AC_DEFUN([AC_PROG_LD],
2936 [AC_ARG_WITH([gnu-ld],
2937 [AC_HELP_STRING([--with-gnu-ld],
2938 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2939 [test "$withval" = no || with_gnu_ld=yes],
2941 AC_REQUIRE([LT_AC_PROG_SED])dnl
2942 AC_REQUIRE([AC_PROG_CC])dnl
2943 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2944 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2946 if test "$GCC" = yes; then
2947 # Check if gcc -print-prog-name=ld gives a path.
2948 AC_MSG_CHECKING([for ld used by $CC])
2951 # gcc leaves a trailing carriage return which upsets mingw
2952 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2954 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2957 # Accept absolute paths.
2958 [[\\/]]* | ?:[[\\/]]*)
2959 re_direlt='/[[^/]][[^/]]*/\.\./'
2960 # Canonicalize the pathname of ld
2961 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2962 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2963 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2965 test -z "$LD" && LD="$ac_prog"
2968 # If it fails, then pretend we aren't using GCC.
2972 # If it is relative, then search for the first ld in PATH.
2976 elif test "$with_gnu_ld" = yes; then
2977 AC_MSG_CHECKING([for GNU ld])
2979 AC_MSG_CHECKING([for non-GNU ld])
2981 AC_CACHE_VAL(lt_cv_path_LD,
2982 [if test -z "$LD"; then
2983 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2984 for ac_dir in $PATH; do
2986 test -z "$ac_dir" && ac_dir=.
2987 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2988 lt_cv_path_LD="$ac_dir/$ac_prog"
2989 # Check to see if the program is GNU ld. I'd rather use --version,
2990 # but apparently some GNU ld's only accept -v.
2991 # Break only if it was the GNU/non-GNU ld that we prefer.
2992 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2993 *GNU* | *'with BFD'*)
2994 test "$with_gnu_ld" != no && break
2997 test "$with_gnu_ld" != yes && break
3004 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3007 if test -n "$LD"; then
3012 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3019 AC_DEFUN([AC_PROG_LD_GNU],
3020 [AC_REQUIRE([AC_PROG_EGREP])dnl
3021 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3022 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3023 case `$LD -v 2>&1 </dev/null` in
3024 *GNU* | *'with BFD'*)
3025 lt_cv_prog_gnu_ld=yes
3028 lt_cv_prog_gnu_ld=no
3031 with_gnu_ld=$lt_cv_prog_gnu_ld
3035 # AC_PROG_LD_RELOAD_FLAG
3036 # ----------------------
3037 # find reload flag for linker
3038 # -- PORTME Some linkers may need a different reload flag.
3039 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3040 [AC_CACHE_CHECK([for $LD option to reload object files],
3041 lt_cv_ld_reload_flag,
3042 [lt_cv_ld_reload_flag='-r'])
3043 reload_flag=$lt_cv_ld_reload_flag
3044 case $reload_flag in
3046 *) reload_flag=" $reload_flag" ;;
3048 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3049 ])# AC_PROG_LD_RELOAD_FLAG
3052 # AC_DEPLIBS_CHECK_METHOD
3053 # -----------------------
3054 # how to check for library dependencies
3055 # -- PORTME fill in with the dynamic library characteristics
3056 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3057 [AC_CACHE_CHECK([how to recognise dependent libraries],
3058 lt_cv_deplibs_check_method,
3059 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3060 lt_cv_file_magic_test_file=
3061 lt_cv_deplibs_check_method='unknown'
3062 # Need to set the preceding variable on all platforms that support
3063 # interlibrary dependencies.
3064 # 'none' -- dependencies not supported.
3065 # `unknown' -- same as none, but documents that we really don't know.
3066 # 'pass_all' -- all dependencies passed with no checks.
3067 # 'test_compile' -- check by making test program.
3068 # 'file_magic [[regex]]' -- check by looking for files in library path
3069 # which responds to the $file_magic_cmd with a given extended regex.
3070 # If you have `file' or equivalent on your system and you're not sure
3071 # whether `pass_all' will *always* work, you probably want this one.
3075 lt_cv_deplibs_check_method=pass_all
3079 lt_cv_deplibs_check_method=pass_all
3083 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3084 lt_cv_file_magic_cmd='/usr/bin/file -L'
3085 lt_cv_file_magic_test_file=/shlib/libc.so
3089 # func_win32_libid is a shell function defined in ltmain.sh
3090 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3091 lt_cv_file_magic_cmd='func_win32_libid'
3095 # Base MSYS/MinGW do not provide the 'file' command needed by
3096 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3097 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3098 lt_cv_file_magic_cmd='$OBJDUMP -f'
3101 darwin* | rhapsody*)
3102 lt_cv_deplibs_check_method=pass_all
3105 freebsd* | kfreebsd*-gnu)
3106 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3109 # Not sure whether the presence of OpenBSD here was a mistake.
3110 # Let's accept both of them until this is cleared up.
3111 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3112 lt_cv_file_magic_cmd=/usr/bin/file
3113 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3117 lt_cv_deplibs_check_method=pass_all
3122 lt_cv_deplibs_check_method=pass_all
3125 hpux10.20* | hpux11*)
3126 lt_cv_file_magic_cmd=/usr/bin/file
3129 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3130 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3133 [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]']
3134 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3137 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3138 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3143 irix5* | irix6* | nonstopux*)
3145 *-32|*"-32 ") libmagic=32-bit;;
3146 *-n32|*"-n32 ") libmagic=N32;;
3147 *-64|*"-64 ") libmagic=64-bit;;
3148 *) libmagic=never-match;;
3150 lt_cv_deplibs_check_method=pass_all
3153 # This must be Linux ELF.
3155 lt_cv_deplibs_check_method=pass_all
3158 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
3159 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3160 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3162 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3167 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3168 lt_cv_file_magic_cmd=/usr/bin/file
3169 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3173 lt_cv_deplibs_check_method=unknown
3177 lt_cv_file_magic_cmd=/usr/bin/file
3178 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3179 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3180 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3182 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3186 osf3* | osf4* | osf5*)
3187 lt_cv_deplibs_check_method=pass_all
3191 lt_cv_deplibs_check_method=pass_all
3195 lt_cv_deplibs_check_method=pass_all
3198 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3199 case $host_vendor in
3201 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]]'
3202 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3205 lt_cv_deplibs_check_method=pass_all
3208 lt_cv_file_magic_cmd='/bin/file'
3209 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3212 lt_cv_file_magic_cmd='/bin/file'
3213 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3214 lt_cv_file_magic_test_file=/lib/libc.so
3217 lt_cv_deplibs_check_method=pass_all
3222 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3223 lt_cv_deplibs_check_method=pass_all
3227 file_magic_cmd=$lt_cv_file_magic_cmd
3228 deplibs_check_method=$lt_cv_deplibs_check_method
3229 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3230 ])# AC_DEPLIBS_CHECK_METHOD
3235 # find the pathname to a BSD-compatible name lister
3236 AC_DEFUN([AC_PROG_NM],
3237 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3238 [if test -n "$NM"; then
3239 # Let the user override the test.
3242 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3243 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3245 test -z "$ac_dir" && ac_dir=.
3246 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3247 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3248 # Check to see if the nm accepts a BSD-compat flag.
3249 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3250 # nm: unknown option "B" ignored
3251 # Tru64's nm complains that /dev/null is an invalid object file
3252 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3253 */dev/null* | *'Invalid file or object type'*)
3254 lt_cv_path_NM="$tmp_nm -B"
3258 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3260 lt_cv_path_NM="$tmp_nm -p"
3264 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3265 continue # so that we can try to find one that supports BSD flags
3272 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3280 # check for math library
3281 AC_DEFUN([AC_CHECK_LIBM],
3282 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3285 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3286 # These system don't have libm, or don't need it
3289 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3290 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3293 AC_CHECK_LIB(m, cos, LIBM="-lm")
3299 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3300 # -----------------------------------
3301 # sets LIBLTDL to the link flags for the libltdl convenience library and
3302 # LTDLINCL to the include flags for the libltdl header and adds
3303 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
3304 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3305 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
3306 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3307 # '${top_srcdir}/' (note the single quotes!). If your package is not
3308 # flat and you're not using automake, define top_builddir and
3309 # top_srcdir appropriately in the Makefiles.
3310 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3311 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3312 case $enable_ltdl_convenience in
3313 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3314 "") enable_ltdl_convenience=yes
3315 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3317 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3318 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3319 # For backwards non-gettext consistent compatibility...
3321 ])# AC_LIBLTDL_CONVENIENCE
3324 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3325 # -----------------------------------
3326 # sets LIBLTDL to the link flags for the libltdl installable library and
3327 # LTDLINCL to the include flags for the libltdl header and adds
3328 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
3329 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
3330 # DIRECTORY is not provided and an installed libltdl is not found, it is
3331 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
3332 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3333 # quotes!). If your package is not flat and you're not using automake,
3334 # define top_builddir and top_srcdir appropriately in the Makefiles.
3335 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3336 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3337 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3338 AC_CHECK_LIB(ltdl, lt_dlinit,
3339 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3340 [if test x"$enable_ltdl_install" = xno; then
3341 AC_MSG_WARN([libltdl not installed, but installation disabled])
3343 enable_ltdl_install=yes
3346 if test x"$enable_ltdl_install" = x"yes"; then
3347 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3348 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3349 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3351 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3355 # For backwards non-gettext consistent compatibility...
3357 ])# AC_LIBLTDL_INSTALLABLE
3362 # enable support for C++ libraries
3363 AC_DEFUN([AC_LIBTOOL_CXX],
3364 [AC_REQUIRE([_LT_AC_LANG_CXX])
3370 AC_DEFUN([_LT_AC_LANG_CXX],
3371 [AC_REQUIRE([AC_PROG_CXX])
3372 AC_REQUIRE([AC_PROG_CXXCPP])
3373 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3379 # enable support for Fortran 77 libraries
3380 AC_DEFUN([AC_LIBTOOL_F77],
3381 [AC_REQUIRE([_LT_AC_LANG_F77])
3387 AC_DEFUN([_LT_AC_LANG_F77],
3388 [AC_REQUIRE([AC_PROG_F77])
3389 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3395 # enable support for GCJ libraries
3396 AC_DEFUN([AC_LIBTOOL_GCJ],
3397 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3403 AC_DEFUN([_LT_AC_LANG_GCJ],
3404 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3405 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3406 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3407 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3408 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3409 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3410 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3416 # enable support for Windows resource files
3417 AC_DEFUN([AC_LIBTOOL_RC],
3418 [AC_REQUIRE([LT_AC_PROG_RC])
3419 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3423 # AC_LIBTOOL_LANG_C_CONFIG
3424 # ------------------------
3425 # Ensure that the configuration vars for the C compiler are
3426 # suitably defined. Those variables are subsequently used by
3427 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3428 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3429 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3433 # Source file extension for C test sources.
3436 # Object file extension for compiled C test sources.
3438 _LT_AC_TAGVAR(objext, $1)=$objext
3440 # Code to be used in simple compile tests
3441 lt_simple_compile_test_code="int some_variable = 0;\n"
3443 # Code to be used in simple link tests
3444 lt_simple_link_test_code='int main(){return(0);}\n'
3449 # Check for any special shared library compilation flags.
3451 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3452 if test "$GCC" = no; then
3455 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3459 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3460 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3461 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
3463 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3464 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3470 # Check to make sure the static flag actually works.
3472 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3473 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3474 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3476 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3479 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3480 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3481 AC_LIBTOOL_PROG_CC_C_O($1)
3482 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3483 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3484 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3485 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3486 AC_LIBTOOL_SYS_LIB_STRIP
3487 AC_LIBTOOL_DLOPEN_SELF($1)
3489 # Report which librarie types wil actually be built
3490 AC_MSG_CHECKING([if libtool supports shared libraries])
3491 AC_MSG_RESULT([$can_build_shared])
3493 AC_MSG_CHECKING([whether to build shared libraries])
3494 test "$can_build_shared" = "no" && enable_shared=no
3496 # On AIX, shared libraries and static libraries use the same namespace, and
3497 # are all built from PIC.
3500 test "$enable_shared" = yes && enable_static=no
3501 if test -n "$RANLIB"; then
3502 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3503 postinstall_cmds='$RANLIB $lib'
3508 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3509 test "$enable_shared" = yes && enable_static=no
3512 darwin* | rhapsody*)
3513 if test "$GCC" = yes; then
3514 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3516 rhapsody* | darwin1.[[012]])
3517 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3520 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3521 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3523 case ${MACOSX_DEPLOYMENT_TARGET} in
3525 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3528 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3534 output_verbose_link_cmd='echo'
3535 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
3536 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3537 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3538 _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}'
3539 _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}'
3540 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3541 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3542 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3543 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3544 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3546 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3550 AC_MSG_RESULT([$enable_shared])
3552 AC_MSG_CHECKING([whether to build static libraries])
3553 # Make sure either enable_shared or enable_static is yes.
3554 test "$enable_shared" = yes || enable_static=yes
3555 AC_MSG_RESULT([$enable_static])
3557 AC_LIBTOOL_CONFIG($1)
3561 ])# AC_LIBTOOL_LANG_C_CONFIG
3564 # AC_LIBTOOL_LANG_CXX_CONFIG
3565 # --------------------------
3566 # Ensure that the configuration vars for the C compiler are
3567 # suitably defined. Those variables are subsequently used by
3568 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3569 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3570 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3572 AC_REQUIRE([AC_PROG_CXX])
3573 AC_REQUIRE([AC_PROG_CXXCPP])
3575 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3576 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3577 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3578 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3579 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3580 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3581 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3582 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3583 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3584 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3585 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3586 _LT_AC_TAGVAR(module_cmds, $1)=
3587 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3588 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3589 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3590 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3591 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3592 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3594 # Dependencies to place before and after the object being linked:
3595 _LT_AC_TAGVAR(predep_objects, $1)=
3596 _LT_AC_TAGVAR(postdep_objects, $1)=
3597 _LT_AC_TAGVAR(predeps, $1)=
3598 _LT_AC_TAGVAR(postdeps, $1)=
3599 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3601 # Source file extension for C++ test sources.
3604 # Object file extension for compiled C++ test sources.
3606 _LT_AC_TAGVAR(objext, $1)=$objext
3608 # Code to be used in simple compile tests
3609 lt_simple_compile_test_code="int some_variable = 0;\n"
3611 # Code to be used in simple link tests
3612 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3614 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3617 # Allow CC to be a program name with arguments.
3622 lt_save_with_gnu_ld=$with_gnu_ld
3623 lt_save_path_LD=$lt_cv_path_LD
3624 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3625 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3627 unset lt_cv_prog_gnu_ld
3629 if test -n "${lt_cv_path_LDCXX+set}"; then
3630 lt_cv_path_LD=$lt_cv_path_LDCXX
3634 test -z "${LDCXX+set}" || LD=$LDCXX
3637 _LT_AC_TAGVAR(compiler, $1)=$CC
3638 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3640 # We don't want -fno-exception wen compiling C++ code, so set the
3641 # no_builtin_flag separately
3642 if test "$GXX" = yes; then
3643 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3645 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3648 if test "$GXX" = yes; then
3649 # Set up default GNU C++ configuration
3653 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3654 # archiving commands below assume that GNU ld is being used.
3655 if test "$with_gnu_ld" = yes; then
3656 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3657 _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'
3659 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3660 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3662 # If archive_cmds runs LD, not CC, wlarc should be empty
3663 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3664 # investigate it a little bit more. (MM)
3667 # ancient GNU ld didn't support --whole-archive et. al.
3668 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3669 grep 'no-whole-archive' > /dev/null; then
3670 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3672 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3678 # A generic and very simple default shared library creation
3679 # command for GNU C++ for the case where it uses the native
3680 # linker, instead of GNU ld. If possible, this setting should
3681 # overridden to take advantage of the native linker features on
3682 # the platform it is being used on.
3683 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3686 # Commands to make compiler produce verbose output that lists
3687 # what "hidden" libraries, object files and flags are used when
3688 # linking a shared library.
3689 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3697 # PORTME: fill in a description of your system's C++ link characteristics
3698 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3699 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3702 # FIXME: insert proper C++ library support
3703 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3706 if test "$host_cpu" = ia64; then
3707 # On IA64, the linker does run time linking by default, so we don't
3708 # have to do anything special.
3709 aix_use_runtimelinking=no
3710 exp_sym_flag='-Bexport'
3713 aix_use_runtimelinking=no
3715 # Test if we are trying to use run time linking or normal
3716 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3717 # need to do runtime linking.
3718 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3719 for ld_flag in $LDFLAGS; do
3722 aix_use_runtimelinking=yes
3729 exp_sym_flag='-bexport'
3730 no_entry_flag='-bnoentry'
3733 # When large executables or shared objects are built, AIX ld can
3734 # have problems creating the table of contents. If linking a library
3735 # or program results in "error TOC overflow" add -mminimal-toc to
3736 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3737 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3739 _LT_AC_TAGVAR(archive_cmds, $1)=''
3740 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3741 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3742 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3744 if test "$GXX" = yes; then
3745 case $host_os in aix4.[012]|aix4.[012].*)
3746 # We only want to do this on AIX 4.2 and lower, the check
3747 # below for broken collect2 doesn't work under 4.3+
3748 collect2name=`${CC} -print-prog-name=collect2`
3749 if test -f "$collect2name" && \
3750 strings "$collect2name" | grep resolve_lib_name >/dev/null
3752 # We have reworked collect2
3753 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3755 # We have old collect2
3756 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3757 # It fails to find uninstalled libraries when the uninstalled
3758 # path is not listed in the libpath. Setting hardcode_minus_L
3759 # to unsupported forces relinking
3760 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3761 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3762 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3765 shared_flag='-shared'
3768 if test "$host_cpu" = ia64; then
3769 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3770 # chokes on -Wl,-G. The following line is correct:
3773 if test "$aix_use_runtimelinking" = yes; then
3774 shared_flag='${wl}-G'
3776 shared_flag='${wl}-bM:SRE'
3781 # It seems that -bexpall does not export symbols beginning with
3782 # underscore (_), so it is better to generate a list of symbols to export.
3783 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3784 if test "$aix_use_runtimelinking" = yes; then
3785 # Warning - without using the other runtime loading flags (-brtl),
3786 # -berok will link without error, but may produce a broken library.
3787 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3788 # Determine the default libpath from the value encoded in an empty executable.
3789 _LT_AC_SYS_LIBPATH_AIX
3790 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3792 _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"
3794 if test "$host_cpu" = ia64; then
3795 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3796 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3797 _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"
3799 # Determine the default libpath from the value encoded in an empty executable.
3800 _LT_AC_SYS_LIBPATH_AIX
3801 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3802 # Warning - without using the other run time loading flags,
3803 # -berok will link without error, but may produce a broken library.
3804 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3805 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3806 # -bexpall does not export symbols beginning with underscore (_)
3807 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3808 # Exported symbols can be pulled into shared objects from archives
3809 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3810 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3811 # This is similar to how AIX traditionally builds it's shared libraries.
3812 _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'
3817 case $cc_basename in
3819 # FIXME: insert proper C++ library support
3820 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3825 cygwin* | mingw* | pw32*)
3826 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3827 # as there is no search path for DLLs.
3828 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3829 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3830 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3831 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3833 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3834 _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'
3835 # If the export-symbols file already is a .def file (1st line
3836 # is EXPORTS), use it as is; otherwise, prepend...
3837 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3838 cp $export_symbols $output_objdir/$soname.def;
3840 echo EXPORTS > $output_objdir/$soname.def;
3841 cat $export_symbols >> $output_objdir/$soname.def;
3843 $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'
3845 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3849 darwin* | rhapsody*)
3850 if test "$GXX" = yes; then
3851 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3853 rhapsody* | darwin1.[[012]])
3854 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3857 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3858 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3860 case ${MACOSX_DEPLOYMENT_TARGET} in
3862 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3865 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
3871 lt_int_apple_cc_single_mod=no
3872 output_verbose_link_cmd='echo'
3873 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3874 lt_int_apple_cc_single_mod=yes
3876 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3877 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3879 _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'
3881 _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3883 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3884 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3885 _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}'
3887 _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}'
3889 _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}'
3890 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3891 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3892 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3893 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3894 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3896 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3901 case $cc_basename in
3903 # FIXME: insert proper C++ library support
3904 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3907 # Green Hills C++ Compiler
3908 # FIXME: insert proper C++ library support
3909 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3912 # FIXME: insert proper C++ library support
3913 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3918 # C++ shared libraries reported to be fairly broken before switch to ELF
3919 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3922 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3924 freebsd* | kfreebsd*-gnu)
3925 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3927 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3932 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3933 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3934 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3935 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3936 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3937 # but as the default
3938 # location of the library.
3940 case $cc_basename in
3942 # FIXME: insert proper C++ library support
3943 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3946 _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'
3947 # Commands to make compiler produce verbose output that lists
3948 # what "hidden" libraries, object files and flags are used when
3949 # linking a shared library.
3951 # There doesn't appear to be a way to prevent this compiler from
3952 # explicitly linking system object files so we need to strip them
3953 # from the output so that they don't get included in the library
3955 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'
3958 if test "$GXX" = yes; then
3959 _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'
3961 # FIXME: insert proper C++ library support
3962 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3968 if test $with_gnu_ld = no; then
3971 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3972 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3973 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3976 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3979 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3980 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3981 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3987 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3988 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3991 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3992 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3993 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3994 # but as the default
3995 # location of the library.
3998 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3999 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4000 # but as the default
4001 # location of the library.
4005 case $cc_basename in
4007 # FIXME: insert proper C++ library support
4008 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4013 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4016 _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'
4019 # Commands to make compiler produce verbose output that lists
4020 # what "hidden" libraries, object files and flags are used when
4021 # linking a shared library.
4023 # There doesn't appear to be a way to prevent this compiler from
4024 # explicitly linking system object files so we need to strip them
4025 # from the output so that they don't get included in the library
4027 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'
4030 if test "$GXX" = yes; then
4031 if test $with_gnu_ld = no; then
4034 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4037 _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'
4042 # FIXME: insert proper C++ library support
4043 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4049 case $cc_basename in
4052 _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'
4054 # Archives containing C++ object files must be created using
4055 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
4056 # necessary to make sure instantiated templates are included
4058 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4061 if test "$GXX" = yes; then
4062 if test "$with_gnu_ld" = no; then
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` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
4065 _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'
4068 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4071 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4072 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4075 case $cc_basename in
4077 # Kuck and Associates, Inc. (KAI) C++ Compiler
4079 # KCC will only create a shared library if the output file
4080 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4081 # to its proper name (with version) after linking.
4082 _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'
4083 _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'
4084 # Commands to make compiler produce verbose output that lists
4085 # what "hidden" libraries, object files and flags are used when
4086 # linking a shared library.
4088 # There doesn't appear to be a way to prevent this compiler from
4089 # explicitly linking system object files so we need to strip them
4090 # from the output so that they don't get included in the library
4092 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'
4094 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4095 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4097 # Archives containing C++ object files must be created using
4098 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4099 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4104 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4105 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4106 _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'
4107 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4108 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4109 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4113 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4114 _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'
4116 runpath_var=LD_RUN_PATH
4117 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4118 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4120 # Commands to make compiler produce verbose output that lists
4121 # what "hidden" libraries, object files and flags are used when
4122 # linking a shared library.
4124 # There doesn't appear to be a way to prevent this compiler from
4125 # explicitly linking system object files so we need to strip them
4126 # from the output so that they don't get included in the library
4128 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'
4133 # FIXME: insert proper C++ library support
4134 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4137 # FIXME: insert proper C++ library support
4138 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4141 case $cc_basename in
4143 # FIXME: insert proper C++ library support
4144 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4147 # FIXME: insert proper C++ library support
4148 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4152 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
4153 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4154 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4156 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4157 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4158 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4160 # Workaround some broken pre-1.5 toolchains
4161 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4164 case $cc_basename in
4166 # Kuck and Associates, Inc. (KAI) C++ Compiler
4168 # KCC will only create a shared library if the output file
4169 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4170 # to its proper name (with version) after linking.
4171 _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'
4173 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4174 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4176 # Archives containing C++ object files must be created using
4177 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4178 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4182 # Rational C++ 2.4.1
4183 # FIXME: insert proper C++ library support
4184 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4187 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4188 _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'
4190 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4191 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4193 # Commands to make compiler produce verbose output that lists
4194 # what "hidden" libraries, object files and flags are used when
4195 # linking a shared library.
4197 # There doesn't appear to be a way to prevent this compiler from
4198 # explicitly linking system object files so we need to strip them
4199 # from the output so that they don't get included in the library
4201 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'
4204 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4205 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4206 _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'
4208 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4209 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4211 # Commands to make compiler produce verbose output that lists
4212 # what "hidden" libraries, object files and flags are used when
4213 # linking a shared library.
4214 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4217 # FIXME: insert proper C++ library support
4218 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4224 case $cc_basename in
4226 # Kuck and Associates, Inc. (KAI) C++ Compiler
4228 # KCC will only create a shared library if the output file
4229 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4230 # to its proper name (with version) after linking.
4231 _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'
4233 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4234 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4236 # Archives containing C++ object files must be created using
4237 # the KAI C++ compiler.
4238 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4241 # Rational C++ 2.4.1
4242 # FIXME: insert proper C++ library support
4243 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4246 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4247 _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'
4248 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4249 echo "-hidden">> $lib.exp~
4250 $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~
4253 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4254 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4256 # Commands to make compiler produce verbose output that lists
4257 # what "hidden" libraries, object files and flags are used when
4258 # linking a shared library.
4260 # There doesn't appear to be a way to prevent this compiler from
4261 # explicitly linking system object files so we need to strip them
4262 # from the output so that they don't get included in the library
4264 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'
4267 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4268 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4269 _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'
4271 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4272 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4274 # Commands to make compiler produce verbose output that lists
4275 # what "hidden" libraries, object files and flags are used when
4276 # linking a shared library.
4277 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4280 # FIXME: insert proper C++ library support
4281 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4287 # FIXME: insert proper C++ library support
4288 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4291 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4292 case $cc_basename in
4294 # FIXME: insert proper C++ library support
4295 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4298 # FIXME: insert proper C++ library support
4299 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4304 case $cc_basename in
4307 # FIXME: insert proper C++ library support
4308 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4312 # FIXME: insert proper C++ library support
4313 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4316 # FIXME: insert proper C++ library support
4317 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4322 case $cc_basename in
4324 # Sun C++ 4.2, 5.x and Centerline C++
4325 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4326 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4327 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4328 $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'
4330 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4331 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4333 solaris2.[0-5] | solaris2.[0-5].*) ;;
4335 # The C++ compiler is used as linker so we must use $wl
4336 # flag to pass the commands to the underlying system
4338 # Supported since Solaris 2.6 (maybe 2.5.1?)
4339 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4342 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4344 # Commands to make compiler produce verbose output that lists
4345 # what "hidden" libraries, object files and flags are used when
4346 # linking a shared library.
4348 # There doesn't appear to be a way to prevent this compiler from
4349 # explicitly linking system object files so we need to strip them
4350 # from the output so that they don't get included in the library
4352 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'
4354 # Archives containing C++ object files must be created using
4355 # "CC -xar", where "CC" is the Sun C++ compiler. This is
4356 # necessary to make sure instantiated templates are included
4358 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4361 # Green Hills C++ Compiler
4362 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4364 # The C++ compiler must be used to create the archive.
4365 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4368 # GNU C++ compiler with Solaris linker
4369 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4370 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4371 if $CC --version | grep -v '^2\.7' > /dev/null; then
4372 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4373 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4374 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4376 # Commands to make compiler produce verbose output that lists
4377 # what "hidden" libraries, object files and flags are used when
4378 # linking a shared library.
4379 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4381 # g++ 2.7 appears to require `-G' NOT `-shared' on this
4383 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4384 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4385 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4387 # Commands to make compiler produce verbose output that lists
4388 # what "hidden" libraries, object files and flags are used when
4389 # linking a shared library.
4390 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4393 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4398 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4399 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4402 case $cc_basename in
4404 # NonStop-UX NCC 3.20
4405 # FIXME: insert proper C++ library support
4406 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4409 # FIXME: insert proper C++ library support
4410 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4415 # FIXME: insert proper C++ library support
4416 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4419 # FIXME: insert proper C++ library support
4420 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4423 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4424 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4426 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4427 _LT_AC_TAGVAR(LD, $1)="$LD"
4429 AC_LIBTOOL_POSTDEP_PREDEP($1)
4430 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4431 AC_LIBTOOL_PROG_CC_C_O($1)
4432 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4433 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4434 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4435 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4436 AC_LIBTOOL_SYS_LIB_STRIP
4437 AC_LIBTOOL_DLOPEN_SELF($1)
4439 AC_LIBTOOL_CONFIG($1)
4446 with_gnu_ldcxx=$with_gnu_ld
4447 with_gnu_ld=$lt_save_with_gnu_ld
4448 lt_cv_path_LDCXX=$lt_cv_path_LD
4449 lt_cv_path_LD=$lt_save_path_LD
4450 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4451 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4452 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4454 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4455 # ------------------------
4456 # Figure out "hidden" library dependencies from verbose
4457 # compiler output when linking a shared library.
4458 # Parse the compiler output and extract the necessary
4459 # objects, libraries and library flags.
4460 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4461 dnl we can't use the lt_simple_compile_test_code here,
4462 dnl because it contains code intended for an executable,
4463 dnl not a library. It's possible we should let each
4464 dnl tag define a new lt_????_link_test_code variable,
4465 dnl but it's only used here...
4466 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4468 void foo (void) { a = 0; }
4470 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4474 Foo (void) { a = 0; }
4479 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4487 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4490 public void bar (void) {
4496 dnl Parse the compiler output and extract the necessary
4497 dnl objects, libraries and library flags.
4498 if AC_TRY_EVAL(ac_compile); then
4499 # Parse the compiler output and extract the necessary
4500 # objects, libraries and library flags.
4502 # Sentinel used to keep track of whether or not we are before
4503 # the conftest object file.
4504 pre_test_object_deps_done=no
4506 # The `*' in the case matches for architectures that use `case' in
4507 # $output_verbose_cmd can trigger glob expansion during the loop
4508 # eval without this substitution.
4509 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4511 for p in `eval $output_verbose_link_cmd`; do
4515 # Some compilers place space between "-{L,R}" and the path.
4518 || test $p = "-R"; then
4525 if test "$pre_test_object_deps_done" = no; then
4528 # Internal compiler library paths should come after those
4529 # provided the user. The postdeps already come after the
4530 # user supplied libs so there is no need to process them.
4531 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4532 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4534 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4537 # The "-l" case would never come before the object being
4538 # linked, so don't bother handling this case.
4541 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4542 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4544 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4550 # This assumes that the test object file only shows up
4551 # once in the compiler output.
4552 if test "$p" = "conftest.$objext"; then
4553 pre_test_object_deps_done=yes
4557 if test "$pre_test_object_deps_done" = no; then
4558 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4559 _LT_AC_TAGVAR(predep_objects, $1)="$p"
4561 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4564 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4565 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4567 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4572 *) ;; # Ignore the rest.
4580 echo "libtool.m4: error: problem compiling $1 test program"
4583 $rm -f confest.$objext
4585 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4586 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4588 ])# AC_LIBTOOL_POSTDEP_PREDEP
4590 # AC_LIBTOOL_LANG_F77_CONFIG
4591 # ------------------------
4592 # Ensure that the configuration vars for the C compiler are
4593 # suitably defined. Those variables are subsequently used by
4594 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4595 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4596 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4597 [AC_REQUIRE([AC_PROG_F77])
4598 AC_LANG_PUSH(Fortran 77)
4600 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4601 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4602 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4603 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4604 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4605 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4606 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4607 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4608 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4609 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4610 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4611 _LT_AC_TAGVAR(module_cmds, $1)=
4612 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4613 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4614 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4615 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4616 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4617 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4619 # Source file extension for f77 test sources.
4622 # Object file extension for compiled f77 test sources.
4624 _LT_AC_TAGVAR(objext, $1)=$objext
4626 # Code to be used in simple compile tests
4627 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
4629 # Code to be used in simple link tests
4630 lt_simple_link_test_code=" program t\n end\n"