1 dnl aclocal.m4 generated automatically by aclocal 1.4-p5
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 5 (gettext-0.15)
14 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
15 dnl This file is free software; the Free Software Foundation
16 dnl gives unlimited permission to copy and/or distribute it,
17 dnl with or without modifications, as long as this notice is preserved.
19 dnl From Bruno Haible.
21 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
22 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
23 dnl require excessive bracketing.
24 ifdef([AC_HELP_STRING],
25 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
26 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
28 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
29 dnl to access previously installed libraries. The basic assumption is that
30 dnl a user will want packages to use other packages he previously installed
31 dnl with the same --prefix option.
32 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
33 dnl libraries, but is otherwise very convenient.
34 AC_DEFUN([AC_LIB_PREFIX],
36 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
37 AC_REQUIRE([AC_PROG_CC])
38 AC_REQUIRE([AC_CANONICAL_HOST])
39 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
40 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
41 dnl By default, look in $includedir and $libdir.
43 AC_LIB_WITH_FINAL_PREFIX([
44 eval additional_includedir=\"$includedir\"
45 eval additional_libdir=\"$libdir\"
47 AC_LIB_ARG_WITH([lib-prefix],
48 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
49 --without-lib-prefix don't search for libraries in includedir and libdir],
51 if test "X$withval" = "Xno"; then
54 if test "X$withval" = "X"; then
55 AC_LIB_WITH_FINAL_PREFIX([
56 eval additional_includedir=\"$includedir\"
57 eval additional_libdir=\"$libdir\"
60 additional_includedir="$withval/include"
61 additional_libdir="$withval/$acl_libdirstem"
65 if test $use_additional = yes; then
66 dnl Potentially add $additional_includedir to $CPPFLAGS.
68 dnl 1. if it's the standard /usr/include,
69 dnl 2. if it's already present in $CPPFLAGS,
70 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
71 dnl 4. if it doesn't exist as a directory.
72 if test "X$additional_includedir" != "X/usr/include"; then
74 for x in $CPPFLAGS; do
75 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
76 if test "X$x" = "X-I$additional_includedir"; then
81 if test -z "$haveit"; then
82 if test "X$additional_includedir" = "X/usr/local/include"; then
83 if test -n "$GCC"; then
85 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
89 if test -z "$haveit"; then
90 if test -d "$additional_includedir"; then
91 dnl Really add $additional_includedir to $CPPFLAGS.
92 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
97 dnl Potentially add $additional_libdir to $LDFLAGS.
99 dnl 1. if it's the standard /usr/lib,
100 dnl 2. if it's already present in $LDFLAGS,
101 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
102 dnl 4. if it doesn't exist as a directory.
103 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
105 for x in $LDFLAGS; do
106 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
107 if test "X$x" = "X-L$additional_libdir"; then
112 if test -z "$haveit"; then
113 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
114 if test -n "$GCC"; then
120 if test -z "$haveit"; then
121 if test -d "$additional_libdir"; then
122 dnl Really add $additional_libdir to $LDFLAGS.
123 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
131 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
132 dnl acl_final_exec_prefix, containing the values to which $prefix and
133 dnl $exec_prefix will expand at the end of the configure script.
134 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
136 dnl Unfortunately, prefix and exec_prefix get only finally determined
137 dnl at the end of configure.
138 if test "X$prefix" = "XNONE"; then
139 acl_final_prefix="$ac_default_prefix"
141 acl_final_prefix="$prefix"
143 if test "X$exec_prefix" = "XNONE"; then
144 acl_final_exec_prefix='${prefix}'
146 acl_final_exec_prefix="$exec_prefix"
148 acl_save_prefix="$prefix"
149 prefix="$acl_final_prefix"
150 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
151 prefix="$acl_save_prefix"
154 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
155 dnl variables prefix and exec_prefix bound to the values they will have
156 dnl at the end of the configure script.
157 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
159 acl_save_prefix="$prefix"
160 prefix="$acl_final_prefix"
161 acl_save_exec_prefix="$exec_prefix"
162 exec_prefix="$acl_final_exec_prefix"
164 exec_prefix="$acl_save_exec_prefix"
165 prefix="$acl_save_prefix"
168 dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
169 dnl the basename of the libdir, either "lib" or "lib64".
170 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
172 dnl There is no formal standard regarding lib and lib64. The current
173 dnl practice is that on a system supporting 32-bit and 64-bit instruction
174 dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
175 dnl libraries go under $prefix/lib. We determine the compiler's default
176 dnl mode by looking at the compiler's library search path. If at least
177 dnl of its elements ends in /lib64 or points to a directory whose absolute
178 dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
179 dnl default, namely "lib".
181 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
182 if test -n "$searchpath"; then
183 acl_save_IFS="${IFS= }"; IFS=":"
184 for searchdir in $searchpath; do
185 if test -d "$searchdir"; then
187 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
188 *) searchdir=`cd "$searchdir" && pwd`
190 */lib64 ) acl_libdirstem=lib64 ;;
199 # lib-link.m4 serial 8 (gettext-0.15)
200 dnl Copyright (C) 2001-2006 Free Software Foundation, Inc.
201 dnl This file is free software; the Free Software Foundation
202 dnl gives unlimited permission to copy and/or distribute it,
203 dnl with or without modifications, as long as this notice is preserved.
205 dnl From Bruno Haible.
209 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
210 dnl the libraries corresponding to explicit and implicit dependencies.
211 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
212 dnl augments the CPPFLAGS variable.
213 AC_DEFUN([AC_LIB_LINKFLAGS],
215 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
216 AC_REQUIRE([AC_LIB_RPATH])
217 define([Name],[translit([$1],[./-], [___])])
218 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
219 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
220 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
221 AC_LIB_LINKFLAGS_BODY([$1], [$2])
222 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
223 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
224 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
226 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
227 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
228 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
229 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
231 AC_SUBST([LTLIB]NAME)
232 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
233 dnl results of this search when this library appears as a dependency.
239 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
240 dnl searches for libname and the libraries corresponding to explicit and
241 dnl implicit dependencies, together with the specified include files and
242 dnl the ability to compile and link the specified testcode. If found, it
243 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
244 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
245 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
246 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
247 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
249 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
250 AC_REQUIRE([AC_LIB_RPATH])
251 define([Name],[translit([$1],[./-], [___])])
252 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
253 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
255 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
257 AC_LIB_LINKFLAGS_BODY([$1], [$2])
259 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
260 dnl because if the user has installed lib[]Name and not disabled its use
261 dnl via --without-lib[]Name-prefix, he wants to use it.
262 ac_save_CPPFLAGS="$CPPFLAGS"
263 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
265 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
267 LIBS="$LIBS $LIB[]NAME"
268 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
271 if test "$ac_cv_lib[]Name" = yes; then
273 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
274 AC_MSG_CHECKING([how to link with lib[]$1])
275 AC_MSG_RESULT([$LIB[]NAME])
278 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
279 dnl $INC[]NAME either.
280 CPPFLAGS="$ac_save_CPPFLAGS"
284 AC_SUBST([HAVE_LIB]NAME)
286 AC_SUBST([LTLIB]NAME)
291 dnl Determine the platform dependent parameters needed to use rpath:
292 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
293 dnl hardcode_direct, hardcode_minus_L.
294 AC_DEFUN([AC_LIB_RPATH],
296 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
297 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
298 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
299 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
300 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
301 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
302 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
303 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
304 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
310 libext="$acl_cv_libext"
311 shlibext="$acl_cv_shlibext"
312 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
313 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
314 hardcode_direct="$acl_cv_hardcode_direct"
315 hardcode_minus_L="$acl_cv_hardcode_minus_L"
316 dnl Determine whether the user wants rpath handling at all.
318 [ --disable-rpath do not hardcode runtime library paths],
322 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
323 dnl the libraries corresponding to explicit and implicit dependencies.
324 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
325 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
327 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
328 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
329 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
330 dnl By default, look in $includedir and $libdir.
332 AC_LIB_WITH_FINAL_PREFIX([
333 eval additional_includedir=\"$includedir\"
334 eval additional_libdir=\"$libdir\"
336 AC_LIB_ARG_WITH([lib$1-prefix],
337 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
338 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
340 if test "X$withval" = "Xno"; then
343 if test "X$withval" = "X"; then
344 AC_LIB_WITH_FINAL_PREFIX([
345 eval additional_includedir=\"$includedir\"
346 eval additional_libdir=\"$libdir\"
349 additional_includedir="$withval/include"
350 additional_libdir="$withval/$acl_libdirstem"
354 dnl Search the library and its dependencies in $additional_libdir and
355 dnl $LDFLAGS. Using breadth-first-seach.
361 names_already_handled=
362 names_next_round='$1 $2'
363 while test -n "$names_next_round"; do
364 names_this_round="$names_next_round"
366 for name in $names_this_round; do
368 for n in $names_already_handled; do
369 if test "$n" = "$name"; then
374 if test -z "$already_handled"; then
375 names_already_handled="$names_already_handled $name"
376 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
377 dnl or AC_LIB_HAVE_LINKFLAGS call.
378 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
379 eval value=\"\$HAVE_LIB$uppername\"
380 if test -n "$value"; then
381 if test "$value" = yes; then
382 eval value=\"\$LIB$uppername\"
383 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
384 eval value=\"\$LTLIB$uppername\"
385 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
387 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
388 dnl that this library doesn't exist. So just drop it.
392 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
393 dnl and the already constructed $LIBNAME/$LTLIBNAME.
398 if test $use_additional = yes; then
399 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
400 found_dir="$additional_libdir"
401 found_so="$additional_libdir/lib$name.$shlibext"
402 if test -f "$additional_libdir/lib$name.la"; then
403 found_la="$additional_libdir/lib$name.la"
406 if test -f "$additional_libdir/lib$name.$libext"; then
407 found_dir="$additional_libdir"
408 found_a="$additional_libdir/lib$name.$libext"
409 if test -f "$additional_libdir/lib$name.la"; then
410 found_la="$additional_libdir/lib$name.la"
415 if test "X$found_dir" = "X"; then
416 for x in $LDFLAGS $LTLIB[]NAME; do
417 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
420 dir=`echo "X$x" | sed -e 's/^X-L//'`
421 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
423 found_so="$dir/lib$name.$shlibext"
424 if test -f "$dir/lib$name.la"; then
425 found_la="$dir/lib$name.la"
428 if test -f "$dir/lib$name.$libext"; then
430 found_a="$dir/lib$name.$libext"
431 if test -f "$dir/lib$name.la"; then
432 found_la="$dir/lib$name.la"
438 if test "X$found_dir" != "X"; then
443 if test "X$found_dir" != "X"; then
444 dnl Found the library.
445 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
446 if test "X$found_so" != "X"; then
447 dnl Linking with a shared library. We attempt to hardcode its
448 dnl directory into the executable's runpath, unless it's the
449 dnl standard /usr/lib.
450 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
451 dnl No hardcoding is needed.
452 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
454 dnl Use an explicit option to hardcode DIR into the resulting
456 dnl Potentially add DIR to ltrpathdirs.
457 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
459 for x in $ltrpathdirs; do
460 if test "X$x" = "X$found_dir"; then
465 if test -z "$haveit"; then
466 ltrpathdirs="$ltrpathdirs $found_dir"
468 dnl The hardcoding into $LIBNAME is system dependent.
469 if test "$hardcode_direct" = yes; then
470 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
471 dnl resulting binary.
472 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
474 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
475 dnl Use an explicit option to hardcode DIR into the resulting
477 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
478 dnl Potentially add DIR to rpathdirs.
479 dnl The rpathdirs will be appended to $LIBNAME at the end.
481 for x in $rpathdirs; do
482 if test "X$x" = "X$found_dir"; then
487 if test -z "$haveit"; then
488 rpathdirs="$rpathdirs $found_dir"
491 dnl Rely on "-L$found_dir".
492 dnl But don't add it if it's already contained in the LDFLAGS
493 dnl or the already constructed $LIBNAME
495 for x in $LDFLAGS $LIB[]NAME; do
496 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
497 if test "X$x" = "X-L$found_dir"; then
502 if test -z "$haveit"; then
503 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
505 if test "$hardcode_minus_L" != no; then
506 dnl FIXME: Not sure whether we should use
507 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
509 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
511 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
512 dnl here, because this doesn't fit in flags passed to the
513 dnl compiler. So give up. No hardcoding. This affects only
514 dnl very old systems.
515 dnl FIXME: Not sure whether we should use
516 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
518 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
524 if test "X$found_a" != "X"; then
525 dnl Linking with a static library.
526 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
528 dnl We shouldn't come here, but anyway it's good to have a
530 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
533 dnl Assume the include files are nearby.
534 additional_includedir=
536 */$acl_libdirstem | */$acl_libdirstem/)
537 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
538 additional_includedir="$basedir/include"
541 if test "X$additional_includedir" != "X"; then
542 dnl Potentially add $additional_includedir to $INCNAME.
544 dnl 1. if it's the standard /usr/include,
545 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
546 dnl 3. if it's already present in $CPPFLAGS or the already
547 dnl constructed $INCNAME,
548 dnl 4. if it doesn't exist as a directory.
549 if test "X$additional_includedir" != "X/usr/include"; then
551 if test "X$additional_includedir" = "X/usr/local/include"; then
552 if test -n "$GCC"; then
554 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
558 if test -z "$haveit"; then
559 for x in $CPPFLAGS $INC[]NAME; do
560 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
561 if test "X$x" = "X-I$additional_includedir"; then
566 if test -z "$haveit"; then
567 if test -d "$additional_includedir"; then
568 dnl Really add $additional_includedir to $INCNAME.
569 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
575 dnl Look for dependencies.
576 if test -n "$found_la"; then
577 dnl Read the .la file. It defines the variables
578 dnl dlname, library_names, old_library, dependency_libs, current,
579 dnl age, revision, installed, dlopen, dlpreopen, libdir.
580 save_libdir="$libdir"
582 */* | *\\*) . "$found_la" ;;
583 *) . "./$found_la" ;;
585 libdir="$save_libdir"
586 dnl We use only dependency_libs.
587 for dep in $dependency_libs; do
590 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
591 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
593 dnl 1. if it's the standard /usr/lib,
594 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
595 dnl 3. if it's already present in $LDFLAGS or the already
596 dnl constructed $LIBNAME,
597 dnl 4. if it doesn't exist as a directory.
598 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
600 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
601 if test -n "$GCC"; then
603 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
607 if test -z "$haveit"; then
609 for x in $LDFLAGS $LIB[]NAME; do
610 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
611 if test "X$x" = "X-L$additional_libdir"; then
616 if test -z "$haveit"; then
617 if test -d "$additional_libdir"; then
618 dnl Really add $additional_libdir to $LIBNAME.
619 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
623 for x in $LDFLAGS $LTLIB[]NAME; do
624 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
625 if test "X$x" = "X-L$additional_libdir"; then
630 if test -z "$haveit"; then
631 if test -d "$additional_libdir"; then
632 dnl Really add $additional_libdir to $LTLIBNAME.
633 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
640 dir=`echo "X$dep" | sed -e 's/^X-R//'`
641 if test "$enable_rpath" != no; then
642 dnl Potentially add DIR to rpathdirs.
643 dnl The rpathdirs will be appended to $LIBNAME at the end.
645 for x in $rpathdirs; do
646 if test "X$x" = "X$dir"; then
651 if test -z "$haveit"; then
652 rpathdirs="$rpathdirs $dir"
654 dnl Potentially add DIR to ltrpathdirs.
655 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
657 for x in $ltrpathdirs; do
658 if test "X$x" = "X$dir"; then
663 if test -z "$haveit"; then
664 ltrpathdirs="$ltrpathdirs $dir"
669 dnl Handle this in the next round.
670 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
673 dnl Handle this in the next round. Throw away the .la's
674 dnl directory; it is already contained in a preceding -L
676 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
679 dnl Most likely an immediate library name.
680 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
681 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
687 dnl Didn't find the library; assume it is in the system directories
688 dnl known to the linker and runtime loader. (All the system
689 dnl directories known to the linker should also be known to the
690 dnl runtime loader, otherwise the system is severely misconfigured.)
691 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
692 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
698 if test "X$rpathdirs" != "X"; then
699 if test -n "$hardcode_libdir_separator"; then
700 dnl Weird platform: only the last -rpath option counts, the user must
701 dnl pass all path elements in one option. We can arrange that for a
702 dnl single library, but not when more than one $LIBNAMEs are used.
704 for found_dir in $rpathdirs; do
705 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
707 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
708 acl_save_libdir="$libdir"
710 eval flag=\"$hardcode_libdir_flag_spec\"
711 libdir="$acl_save_libdir"
712 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
714 dnl The -rpath options are cumulative.
715 for found_dir in $rpathdirs; do
716 acl_save_libdir="$libdir"
718 eval flag=\"$hardcode_libdir_flag_spec\"
719 libdir="$acl_save_libdir"
720 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
724 if test "X$ltrpathdirs" != "X"; then
725 dnl When using libtool, the option that works for both libraries and
726 dnl executables is -R. The -R options are cumulative.
727 for found_dir in $ltrpathdirs; do
728 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
733 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
734 dnl unless already present in VAR.
735 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
736 dnl contains two or three consecutive elements that belong together.
737 AC_DEFUN([AC_LIB_APPENDTOVAR],
739 for element in [$2]; do
742 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
743 if test "X$x" = "X$element"; then
748 if test -z "$haveit"; then
749 [$1]="${[$1]}${[$1]:+ }$element"
754 dnl For those cases where a variable contains several -L and -l options
755 dnl referring to unknown libraries and directories, this macro determines the
756 dnl necessary additional linker options for the runtime path.
757 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
758 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
759 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
760 dnl otherwise linking without libtool is assumed.
761 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
763 AC_REQUIRE([AC_LIB_RPATH])
764 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
766 if test "$enable_rpath" != no; then
767 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
768 dnl Use an explicit option to hardcode directories into the resulting
773 if test -n "$next"; then
775 dnl No need to hardcode the standard /usr/lib.
776 if test "X$dir" != "X/usr/$acl_libdirstem"; then
777 rpathdirs="$rpathdirs $dir"
783 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
784 dnl No need to hardcode the standard /usr/lib.
785 if test "X$dir" != "X/usr/$acl_libdirstem"; then
786 rpathdirs="$rpathdirs $dir"
793 if test "X$rpathdirs" != "X"; then
794 if test -n ""$3""; then
795 dnl libtool is used for linking. Use -R options.
796 for dir in $rpathdirs; do
797 $1="${$1}${$1:+ }-R$dir"
800 dnl The linker is used for linking directly.
801 if test -n "$hardcode_libdir_separator"; then
802 dnl Weird platform: only the last -rpath option counts, the user
803 dnl must pass all path elements in one option.
805 for dir in $rpathdirs; do
806 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir"
808 acl_save_libdir="$libdir"
810 eval flag=\"$hardcode_libdir_flag_spec\"
811 libdir="$acl_save_libdir"
814 dnl The -rpath options are cumulative.
815 for dir in $rpathdirs; do
816 acl_save_libdir="$libdir"
818 eval flag=\"$hardcode_libdir_flag_spec\"
819 libdir="$acl_save_libdir"
820 $1="${$1}${$1:+ }$flag"
830 # lib-ld.m4 serial 3 (gettext-0.13)
831 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
832 dnl This file is free software; the Free Software Foundation
833 dnl gives unlimited permission to copy and/or distribute it,
834 dnl with or without modifications, as long as this notice is preserved.
836 dnl Subroutines of libtool.m4,
837 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
840 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
841 AC_DEFUN([AC_LIB_PROG_LD_GNU],
842 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
843 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
844 case `$LD -v 2>&1 </dev/null` in
845 *GNU* | *'with BFD'*)
846 acl_cv_prog_gnu_ld=yes ;;
848 acl_cv_prog_gnu_ld=no ;;
850 with_gnu_ld=$acl_cv_prog_gnu_ld
853 dnl From libtool-1.4. Sets the variable LD.
854 AC_DEFUN([AC_LIB_PROG_LD],
856 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
857 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
858 AC_REQUIRE([AC_PROG_CC])dnl
859 AC_REQUIRE([AC_CANONICAL_HOST])dnl
860 # Prepare PATH_SEPARATOR.
861 # The user is always right.
862 if test "${PATH_SEPARATOR+set}" != set; then
863 echo "#! /bin/sh" >conf$$.sh
864 echo "exit 0" >>conf$$.sh
866 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
874 if test "$GCC" = yes; then
875 # Check if gcc -print-prog-name=ld gives a path.
876 AC_MSG_CHECKING([for ld used by GCC])
879 # gcc leaves a trailing carriage return which upsets mingw
880 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
882 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
885 # Accept absolute paths.
886 [[\\/]* | [A-Za-z]:[\\/]*)]
887 [re_direlt='/[^/][^/]*/\.\./']
888 # Canonicalize the path of ld
889 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
890 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
891 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
893 test -z "$LD" && LD="$ac_prog"
896 # If it fails, then pretend we aren't using GCC.
900 # If it is relative, then search for the first ld in PATH.
904 elif test "$with_gnu_ld" = yes; then
905 AC_MSG_CHECKING([for GNU ld])
907 AC_MSG_CHECKING([for non-GNU ld])
909 AC_CACHE_VAL(acl_cv_path_LD,
910 [if test -z "$LD"; then
911 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
912 for ac_dir in $PATH; do
913 test -z "$ac_dir" && ac_dir=.
914 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
915 acl_cv_path_LD="$ac_dir/$ac_prog"
916 # Check to see if the program is GNU ld. I'd rather use --version,
917 # but apparently some GNU ld's only accept -v.
918 # Break only if it was the GNU/non-GNU ld that we prefer.
919 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
920 *GNU* | *'with BFD'*)
921 test "$with_gnu_ld" != no && break ;;
923 test "$with_gnu_ld" != yes && break ;;
929 acl_cv_path_LD="$LD" # Let the user override the test with a path.
932 if test -n "$LD"; then
937 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
941 # Like AC_CONFIG_HEADER, but automatically create stamp file.
943 AC_DEFUN([AM_CONFIG_HEADER],
945 AC_CONFIG_HEADER([$1])
946 dnl When config.status generates a header, we must update the stamp-h file.
947 dnl This file resides in the same directory as the config header
948 dnl that is generated. We must strip everything past the first ":",
949 dnl and everything past the last "/".
950 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
951 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
952 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
954 for am_file in <<$1>>; do
955 case " <<$>>CONFIG_HEADERS " in
956 *" <<$>>am_file "*<<)>>
957 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
960 am_indx=`expr "<<$>>am_indx" + 1`
964 # Do all the work for Automake. This macro actually does too much --
965 # some checks are only needed if your package does certain things.
966 # But this isn't really a big deal.
971 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
973 AC_DEFUN([AM_INIT_AUTOMAKE],
974 [AC_REQUIRE([AC_PROG_INSTALL])
979 dnl test to see if srcdir already configured
980 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
981 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
984 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
985 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
986 AC_REQUIRE([AM_SANITY_CHECK])
987 AC_REQUIRE([AC_ARG_PROGRAM])
988 dnl FIXME This is truly gross.
989 missing_dir=`cd $ac_aux_dir && pwd`
990 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
991 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
992 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
993 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
994 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
995 AC_REQUIRE([AC_PROG_MAKE_SET])])
998 # Check to make sure that the build environment is sane.
1001 AC_DEFUN([AM_SANITY_CHECK],
1002 [AC_MSG_CHECKING([whether build environment is sane])
1005 echo timestamp > conftestfile
1006 # Do `set' in a subshell so we don't clobber the current shell's
1007 # arguments. Must try -L first in case configure is actually a
1008 # symlink; some systems play weird games with the mod time of symlinks
1009 # (eg FreeBSD returns the mod time of the symlink's containing
1012 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1013 if test "[$]*" = "X"; then
1015 set X `ls -t $srcdir/configure conftestfile`
1017 if test "[$]*" != "X $srcdir/configure conftestfile" \
1018 && test "[$]*" != "X conftestfile $srcdir/configure"; then
1020 # If neither matched, then we have a broken ls. This can happen
1021 # if, for instance, CONFIG_SHELL is bash and it inherits a
1022 # broken ls alias from the environment. This has actually
1023 # happened. Such a system could not be considered "sane".
1024 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1025 alias in your environment])
1028 test "[$]2" = conftestfile
1034 AC_MSG_ERROR([newly created file is older than distributed files!
1035 Check your system clock])
1038 AC_MSG_RESULT(yes)])
1040 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
1041 dnl The program must properly implement --version.
1042 AC_DEFUN([AM_MISSING_PROG],
1043 [AC_MSG_CHECKING(for working $2)
1044 # Run test in a subshell; some versions of sh will print an error if
1045 # an executable is not found, even if stderr is redirected.
1046 # Redirect stdin to placate older versions of autoconf. Sigh.
1047 if ($2 --version) < /dev/null > /dev/null 2>&1; then
1049 AC_MSG_RESULT(found)
1052 AC_MSG_RESULT(missing)
1056 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
1058 # serial 46 AC_PROG_LIBTOOL
1060 AC_DEFUN([AC_PROG_LIBTOOL],
1061 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1063 # This can be used to rebuild libtool when needed
1064 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1066 # Always use our own libtool.
1067 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1068 AC_SUBST(LIBTOOL)dnl
1070 # Prevent multiple expansion
1071 define([AC_PROG_LIBTOOL], [])
1074 AC_DEFUN([AC_LIBTOOL_SETUP],
1076 AC_REQUIRE([AC_ENABLE_SHARED])dnl
1077 AC_REQUIRE([AC_ENABLE_STATIC])dnl
1078 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1079 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1080 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1081 AC_REQUIRE([AC_PROG_CC])dnl
1082 AC_REQUIRE([AC_PROG_LD])dnl
1083 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1084 AC_REQUIRE([AC_PROG_NM])dnl
1085 AC_REQUIRE([AC_PROG_LN_S])dnl
1086 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1087 AC_REQUIRE([AC_OBJEXT])dnl
1088 AC_REQUIRE([AC_EXEEXT])dnl
1091 _LT_AC_PROG_ECHO_BACKSLASH
1092 # Only perform the check for file, if the check method requires it
1093 case $deplibs_check_method in
1095 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1101 AC_CHECK_TOOL(RANLIB, ranlib, :)
1102 AC_CHECK_TOOL(STRIP, strip, :)
1104 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1105 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1106 enable_win32_dll=yes, enable_win32_dll=no)
1108 AC_ARG_ENABLE(libtool-lock,
1109 [ --disable-libtool-lock avoid locking (might break parallel builds)])
1110 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1112 # Some flags need to be propagated to the compiler or linker for good
1116 # Find out which ABI we are using.
1117 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1118 if AC_TRY_EVAL(ac_compile); then
1119 case `/usr/bin/file conftest.$ac_objext` in
1135 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1136 SAVE_CFLAGS="$CFLAGS"
1137 CFLAGS="$CFLAGS -belf"
1138 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1141 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1143 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1144 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1145 CFLAGS="$SAVE_CFLAGS"
1149 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1150 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1151 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1152 AC_CHECK_TOOL(AS, as, false)
1153 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1155 # recent cygwin and mingw systems supply a stub DllMain which the user
1156 # can override, but on older systems we have to supply one
1157 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
1159 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
1160 DllMain (0, 0, 0);],
1161 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
1164 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1165 # old mingw systems require "-dll" to link a DLL, while more recent ones
1167 SAVE_CFLAGS="$CFLAGS"
1168 CFLAGS="$CFLAGS -mdll"
1169 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
1170 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
1171 CFLAGS="$SAVE_CFLAGS" ;;
1172 *-*-cygwin* | *-*-pw32*)
1173 # cygwin systems need to pass --dll to the linker, and not link
1174 # crt.o which will require a WinMain@16 definition.
1175 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
1181 _LT_AC_LTCONFIG_HACK
1185 # AC_LIBTOOL_HEADER_ASSERT
1186 # ------------------------
1187 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
1188 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
1189 [lt_cv_func_assert_works],
1192 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
1193 case `$CC --version 2>/dev/null` in
1194 [[12]].*) lt_cv_func_assert_works=no ;;
1195 *) lt_cv_func_assert_works=yes ;;
1201 if test "x$lt_cv_func_assert_works" = xyes; then
1202 AC_CHECK_HEADERS(assert.h)
1204 ])# AC_LIBTOOL_HEADER_ASSERT
1206 # _LT_AC_CHECK_DLFCN
1207 # --------------------
1208 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1209 [AC_CHECK_HEADERS(dlfcn.h)
1210 ])# _LT_AC_CHECK_DLFCN
1212 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1213 # ---------------------------------
1214 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
1215 [AC_REQUIRE([AC_CANONICAL_HOST])
1216 AC_REQUIRE([AC_PROG_NM])
1217 AC_REQUIRE([AC_OBJEXT])
1218 # Check for command to grab the raw symbol name followed by C symbol from nm.
1219 AC_MSG_CHECKING([command to parse $NM output])
1220 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
1222 # These are sane defaults that work on at least a few old systems.
1223 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
1225 # Character class describing NM global symbol codes.
1226 symcode='[[BCDEGRST]]'
1228 # Regexp to match symbols that can be accessed directly from C.
1229 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
1231 # Transform the above into a raw symbol and a C symbol.
1232 symxfrm='\1 \2\3 \3'
1234 # Transform an extracted symbol line into a proper C declaration
1235 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1237 # Transform an extracted symbol line into symbol name and symbol address
1238 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
1240 # Define system-specific variables.
1245 cygwin* | mingw* | pw32*)
1246 symcode='[[ABCDGISTW]]'
1248 hpux*) # Its linker distinguishes data from code symbols
1249 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1250 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
1253 symcode='[[BCDEGRST]]'
1259 symcode='[[DFNSTU]]'
1263 # Handle CRLF in mingw tool chain
1267 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1271 # If we're using GNU nm, then use its standard symbol codes.
1272 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1273 symcode='[[ABCDGISTW]]'
1276 # Try without a prefix undercore, then with it.
1277 for ac_symprfx in "" "_"; do
1279 # Write the raw and C identifiers.
1280 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1282 # Check to see that the pipe works correctly.
1285 cat > conftest.$ac_ext <<EOF
1290 void nm_test_func(){}
1294 int main(){nm_test_var='a';nm_test_func();return(0);}
1297 if AC_TRY_EVAL(ac_compile); then
1298 # Now try to grab the symbols.
1300 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
1301 # Try sorting and uniquifying the output.
1302 if sort "$nlist" | uniq > "$nlist"T; then
1303 mv -f "$nlist"T "$nlist"
1308 # Make sure that we snagged all the symbols we need.
1309 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1310 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1311 cat <<EOF > conftest.$ac_ext
1317 # Now generate the symbol file.
1318 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1320 cat <<EOF >> conftest.$ac_ext
1321 #if defined (__STDC__) && __STDC__
1322 # define lt_ptr void *
1324 # define lt_ptr char *
1328 /* The mapping between symbol names and symbols. */
1333 lt_preloaded_symbols[[]] =
1336 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
1337 cat <<\EOF >> conftest.$ac_ext
1345 # Now try linking the two files.
1346 mv conftest.$ac_objext conftstm.$ac_objext
1348 save_CFLAGS="$CFLAGS"
1349 LIBS="conftstm.$ac_objext"
1350 CFLAGS="$CFLAGS$no_builtin_flag"
1351 if AC_TRY_EVAL(ac_link) && test -s conftest; then
1355 CFLAGS="$save_CFLAGS"
1357 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1360 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1363 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1366 echo "$progname: failed program was:" >&AC_FD_CC
1367 cat conftest.$ac_ext >&5
1369 rm -f conftest* conftst*
1371 # Do not use the global_symbol_pipe unless it works.
1372 if test "$pipe_works" = yes; then
1375 lt_cv_sys_global_symbol_pipe=
1379 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1380 if test -z "$lt_cv_sys_global_symbol_pipe"; then
1381 global_symbol_to_cdecl=
1382 global_symbol_to_c_name_address=
1384 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1385 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1387 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1389 AC_MSG_RESULT(failed)
1393 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1395 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1396 # ---------------------------------
1397 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1398 [# Find the correct PATH separator. Usually this is `:', but
1399 # DJGPP uses `;' like DOS.
1400 if test "X${PATH_SEPARATOR+set}" != Xset; then
1401 UNAME=${UNAME-`uname 2>/dev/null`}
1403 *-DOS) lt_cv_sys_path_separator=';' ;;
1404 *) lt_cv_sys_path_separator=':' ;;
1406 PATH_SEPARATOR=$lt_cv_sys_path_separator
1408 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1410 # _LT_AC_PROG_ECHO_BACKSLASH
1411 # --------------------------
1412 # Add some code to the start of the generated configure script which
1413 # will find an echo command which doesn't interpret backslashes.
1414 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1415 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1416 [AC_DIVERT_PUSH(NOTICE)])
1417 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1419 # Check that we are running under the correct shell.
1420 SHELL=${CONFIG_SHELL-/bin/sh}
1424 # Remove one level of quotation (which was required for Make).
1425 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1430 if test "X[$]1" = X--no-reexec; then
1431 # Discard the --no-reexec flag, and continue.
1433 elif test "X[$]1" = X--fallback-echo; then
1434 # Avoid inline document here, it may be left over
1436 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1437 # Yippee, $echo works!
1440 # Restart under the correct shell.
1441 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1444 if test "X[$]1" = X--fallback-echo; then
1445 # used as fallback echo
1453 # The HP-UX ksh and POSIX shell print the target directory to stdout
1455 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1457 if test -z "$ECHO"; then
1458 if test "X${echo_test_string+set}" != Xset; then
1459 # find a string as large as possible, as long as the shell can cope with it
1460 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1461 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1462 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1463 echo_test_string="`eval $cmd`" &&
1464 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1471 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1472 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1473 test "X$echo_testing_string" = "X$echo_test_string"; then
1476 # The Solaris, AIX, and Digital Unix default echo programs unquote
1477 # backslashes. This makes it impossible to quote backslashes using
1478 # echo "$something" | sed 's/\\/\\\\/g'
1480 # So, first we look for a working echo in the user's PATH.
1482 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1483 for dir in $PATH /usr/ucb; do
1484 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1485 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1486 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1487 test "X$echo_testing_string" = "X$echo_test_string"; then
1494 if test "X$echo" = Xecho; then
1495 # We didn't find a better echo, so look for alternatives.
1496 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1497 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1498 test "X$echo_testing_string" = "X$echo_test_string"; then
1499 # This shell has a builtin print -r that does the trick.
1501 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1502 test "X$CONFIG_SHELL" != X/bin/ksh; then
1503 # If we have ksh, try running configure again with it.
1504 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1505 export ORIGINAL_CONFIG_SHELL
1506 CONFIG_SHELL=/bin/ksh
1508 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1512 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1513 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1514 test "X$echo_testing_string" = "X$echo_test_string"; then
1515 # Cool, printf works
1517 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1518 test "X$echo_testing_string" = 'X\t' &&
1519 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1520 test "X$echo_testing_string" = "X$echo_test_string"; then
1521 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1523 SHELL="$CONFIG_SHELL"
1525 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1526 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1527 test "X$echo_testing_string" = 'X\t' &&
1528 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1529 test "X$echo_testing_string" = "X$echo_test_string"; then
1530 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1532 # maybe with a smaller string...
1535 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1536 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1543 if test "$prev" != 'sed 50q "[$]0"'; then
1544 echo_test_string=`eval $prev`
1545 export echo_test_string
1546 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1548 # Oops. We lost completely, so just stick with echo.
1557 # Copy echo and quote the copy suitably for passing to libtool from
1558 # the Makefile, instead of quoting the original, which is used later.
1560 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1561 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1566 ])# _LT_AC_PROG_ECHO_BACKSLASH
1568 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1569 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1570 # ------------------------------------------------------------------
1571 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1572 [if test "$cross_compiling" = yes; then :
1575 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1576 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1577 lt_status=$lt_dlunknown
1578 cat > conftest.$ac_ext <<EOF
1579 [#line __oline__ "configure"
1580 #include "confdefs.h"
1589 # define LT_DLGLOBAL RTLD_GLOBAL
1592 # define LT_DLGLOBAL DL_GLOBAL
1594 # define LT_DLGLOBAL 0
1598 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1599 find out it does not work in some platform. */
1600 #ifndef LT_DLLAZY_OR_NOW
1602 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1605 # define LT_DLLAZY_OR_NOW DL_LAZY
1608 # define LT_DLLAZY_OR_NOW RTLD_NOW
1611 # define LT_DLLAZY_OR_NOW DL_NOW
1613 # define LT_DLLAZY_OR_NOW 0
1621 extern "C" void exit (int);
1624 void fnord() { int i=42;}
1627 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1628 int status = $lt_dlunknown;
1632 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1633 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1634 /* dlclose (self); */
1640 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1641 (./conftest; exit; ) 2>/dev/null
1644 x$lt_dlno_uscore) $1 ;;
1645 x$lt_dlneed_uscore) $2 ;;
1646 x$lt_unknown|x*) $3 ;;
1649 # compilation failed
1654 ])# _LT_AC_TRY_DLOPEN_SELF
1656 # AC_LIBTOOL_DLOPEN_SELF
1657 # -------------------
1658 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1659 [if test "x$enable_dlopen" != xyes; then
1660 enable_dlopen=unknown
1661 enable_dlopen_self=unknown
1662 enable_dlopen_self_static=unknown
1669 lt_cv_dlopen="load_add_on"
1671 lt_cv_dlopen_self=yes
1674 cygwin* | mingw* | pw32*)
1675 lt_cv_dlopen="LoadLibrary"
1680 AC_CHECK_FUNC([shl_load],
1681 [lt_cv_dlopen="shl_load"],
1682 [AC_CHECK_LIB([dld], [shl_load],
1683 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1684 [AC_CHECK_FUNC([dlopen],
1685 [lt_cv_dlopen="dlopen"],
1686 [AC_CHECK_LIB([dl], [dlopen],
1687 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1688 [AC_CHECK_LIB([svld], [dlopen],
1689 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1690 [AC_CHECK_LIB([dld], [dld_link],
1691 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1700 if test "x$lt_cv_dlopen" != xno; then
1706 case $lt_cv_dlopen in
1708 save_CPPFLAGS="$CPPFLAGS"
1709 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1710 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1712 save_LDFLAGS="$LDFLAGS"
1713 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1716 LIBS="$lt_cv_dlopen_libs $LIBS"
1718 AC_CACHE_CHECK([whether a program can dlopen itself],
1719 lt_cv_dlopen_self, [dnl
1720 _LT_AC_TRY_DLOPEN_SELF(
1721 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1722 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1725 if test "x$lt_cv_dlopen_self" = xyes; then
1726 LDFLAGS="$LDFLAGS $link_static_flag"
1727 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1728 lt_cv_dlopen_self_static, [dnl
1729 _LT_AC_TRY_DLOPEN_SELF(
1730 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1731 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1735 CPPFLAGS="$save_CPPFLAGS"
1736 LDFLAGS="$save_LDFLAGS"
1741 case $lt_cv_dlopen_self in
1742 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1743 *) enable_dlopen_self=unknown ;;
1746 case $lt_cv_dlopen_self_static in
1747 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1748 *) enable_dlopen_self_static=unknown ;;
1751 ])# AC_LIBTOOL_DLOPEN_SELF
1753 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1754 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1755 # Sed substitution that helps us do robust quoting. It backslashifies
1756 # metacharacters that are still active within double-quoted strings.
1757 Xsed='sed -e s/^X//'
1758 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1760 # Same as above, but do not quote variable references.
1761 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1763 # Sed substitution to delay expansion of an escaped shell variable in a
1764 # double_quote_subst'ed string.
1765 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1771 default_ofile=libtool
1772 can_build_shared=yes
1774 # All known linkers require a `.a' archive for static linking (except M$VC,
1775 # which needs '.lib').
1777 ltmain="$ac_aux_dir/ltmain.sh"
1778 ofile="$default_ofile"
1779 with_gnu_ld="$lt_cv_prog_gnu_ld"
1780 need_locks="$enable_libtool_lock"
1783 old_CFLAGS="$CFLAGS"
1785 # Set sane defaults for various variables
1786 test -z "$AR" && AR=ar
1787 test -z "$AR_FLAGS" && AR_FLAGS=cru
1788 test -z "$AS" && AS=as
1789 test -z "$CC" && CC=cc
1790 test -z "$DLLTOOL" && DLLTOOL=dlltool
1791 test -z "$LD" && LD=ld
1792 test -z "$LN_S" && LN_S="ln -s"
1793 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1794 test -z "$NM" && NM=nm
1795 test -z "$OBJDUMP" && OBJDUMP=objdump
1796 test -z "$RANLIB" && RANLIB=:
1797 test -z "$STRIP" && STRIP=:
1798 test -z "$ac_objext" && ac_objext=o
1800 if test x"$host" != x"$build"; then
1801 ac_tool_prefix=${host_alias}-
1806 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1809 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1814 # AIX sometimes has problems with the GCC collect2 program. For some
1815 # reason, if we set the COLLECT_NAMES environment variable, the problems
1816 # vanish in a puff of smoke.
1817 if test "X${COLLECT_NAMES+set}" != Xset; then
1819 export COLLECT_NAMES
1824 # Determine commands to create old-style static archives.
1825 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1826 old_postinstall_cmds='chmod 644 $oldlib'
1827 old_postuninstall_cmds=
1829 if test -n "$RANLIB"; then
1832 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1835 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1838 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1841 # Allow CC to be a program name with arguments.
1845 AC_MSG_CHECKING([for objdir])
1846 rm -f .libs 2>/dev/null
1847 mkdir .libs 2>/dev/null
1848 if test -d .libs; then
1851 # MS-DOS does not allow filenames that begin with a dot.
1854 rmdir .libs 2>/dev/null
1855 AC_MSG_RESULT($objdir)
1859 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1860 pic_mode="$withval", pic_mode=default)
1861 test -z "$pic_mode" && pic_mode=default
1863 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1864 # in isolation, and that seeing it set (from the cache) indicates that
1865 # the associated values are set (in the cache) correctly too.
1866 AC_MSG_CHECKING([for $compiler option to produce PIC])
1867 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1868 [ lt_cv_prog_cc_pic=
1869 lt_cv_prog_cc_shlib=
1871 lt_cv_prog_cc_static=
1872 lt_cv_prog_cc_no_builtin=
1873 lt_cv_prog_cc_can_build_shared=$can_build_shared
1875 if test "$GCC" = yes; then
1876 lt_cv_prog_cc_wl='-Wl,'
1877 lt_cv_prog_cc_static='-static'
1881 # Below there is a dirty hack to force normal static linking with -ldl
1882 # The problem is because libdl dynamically linked with both libc and
1883 # libC (AIX C++ library), which obviously doesn't included in libraries
1884 # list by gcc. This cause undefined symbols with -static flags.
1885 # This hack allows C programs to be linked with "-static -ldl", but
1886 # not sure about C++ programs.
1887 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1890 # FIXME: we need at least 68020 code to build shared libraries, but
1891 # adding the `-m68020' flag to GCC prevents building anything better,
1893 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1895 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
1896 # PIC is the default for these OSes.
1898 darwin* | rhapsody*)
1899 # PIC is the default on this platform
1900 # Common symbols not allowed in MH_DYLIB files
1901 lt_cv_prog_cc_pic='-fno-common'
1903 cygwin* | mingw* | pw32* | os2*)
1904 # This hack is so that the source file can tell whether it is being
1905 # built for inclusion in a dll (and should export symbols for example).
1906 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1909 if test -d /usr/nec; then
1910 lt_cv_prog_cc_pic=-Kconform_pic
1914 lt_cv_prog_cc_pic='-fPIC'
1918 # PORTME Check for PIC flags for the system compiler.
1920 aix3* | aix4* | aix5*)
1921 lt_cv_prog_cc_wl='-Wl,'
1922 # All AIX code is PIC.
1923 if test "$host_cpu" = ia64; then
1924 # AIX 5 now supports IA64 processor
1925 lt_cv_prog_cc_static='-Bstatic'
1927 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1931 hpux9* | hpux10* | hpux11*)
1932 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1933 lt_cv_prog_cc_wl='-Wl,'
1934 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1935 lt_cv_prog_cc_pic='+Z'
1939 lt_cv_prog_cc_wl='-Wl,'
1940 lt_cv_prog_cc_static='-non_shared'
1941 # PIC (with -KPIC) is the default.
1944 cygwin* | mingw* | pw32* | os2*)
1945 # This hack is so that the source file can tell whether it is being
1946 # built for inclusion in a dll (and should export symbols for example).
1947 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1951 lt_cv_prog_cc_pic='-KPIC'
1952 lt_cv_prog_cc_static='-Bstatic'
1955 osf3* | osf4* | osf5*)
1956 # All OSF/1 code is PIC.
1957 lt_cv_prog_cc_wl='-Wl,'
1958 lt_cv_prog_cc_static='-non_shared'
1962 lt_cv_prog_cc_pic='-Kpic'
1963 lt_cv_prog_cc_static='-dn'
1964 lt_cv_prog_cc_shlib='-belf'
1968 lt_cv_prog_cc_pic='-KPIC'
1969 lt_cv_prog_cc_static='-Bstatic'
1970 lt_cv_prog_cc_wl='-Wl,'
1974 lt_cv_prog_cc_pic='-PIC'
1975 lt_cv_prog_cc_static='-Bstatic'
1976 lt_cv_prog_cc_wl='-Qoption ld '
1979 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1980 lt_cv_prog_cc_pic='-KPIC'
1981 lt_cv_prog_cc_static='-Bstatic'
1982 if test "x$host_vendor" = xsni; then
1983 lt_cv_prog_cc_wl='-LD'
1985 lt_cv_prog_cc_wl='-Wl,'
1990 lt_cv_prog_cc_pic='-pic'
1991 lt_cv_prog_cc_static='-Bstatic'
1995 if test -d /usr/nec ;then
1996 lt_cv_prog_cc_pic='-Kconform_pic'
1997 lt_cv_prog_cc_static='-Bstatic'
2002 lt_cv_prog_cc_can_build_shared=no
2007 if test -z "$lt_cv_prog_cc_pic"; then
2008 AC_MSG_RESULT([none])
2010 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
2012 # Check to make sure the pic_flag actually works.
2013 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
2014 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
2015 save_CFLAGS="$CFLAGS"
2016 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
2017 AC_TRY_COMPILE([], [], [dnl
2019 hpux9* | hpux10* | hpux11*)
2020 # On HP-UX, both CC and GCC only warn that PIC is supported... then
2021 # they create non-PIC objects. So, if there were any warnings, we
2022 # assume that PIC is not supported.
2023 if test -s conftest.err; then
2024 lt_cv_prog_cc_pic_works=no
2026 lt_cv_prog_cc_pic_works=yes
2030 lt_cv_prog_cc_pic_works=yes
2034 lt_cv_prog_cc_pic_works=no
2036 CFLAGS="$save_CFLAGS"
2039 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
2041 lt_cv_prog_cc_can_build_shared=no
2043 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
2046 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
2049 # Check for any special shared library compilation flags.
2050 if test -n "$lt_cv_prog_cc_shlib"; then
2051 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
2052 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
2054 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
2055 lt_cv_prog_cc_can_build_shared=no
2059 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
2060 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
2061 lt_cv_prog_cc_static_works=no
2062 save_LDFLAGS="$LDFLAGS"
2063 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
2064 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
2065 LDFLAGS="$save_LDFLAGS"
2068 # Belt *and* braces to stop my trousers falling down:
2069 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
2070 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
2072 pic_flag="$lt_cv_prog_cc_pic"
2073 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
2074 wl="$lt_cv_prog_cc_wl"
2075 link_static_flag="$lt_cv_prog_cc_static"
2076 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
2077 can_build_shared="$lt_cv_prog_cc_can_build_shared"
2080 # Check to see if options -o and -c are simultaneously supported by compiler
2081 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
2082 AC_CACHE_VAL([lt_cv_compiler_c_o], [
2083 $rm -r conftest 2>/dev/null
2086 echo "int some_variable = 0;" > conftest.$ac_ext
2088 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
2089 # that will create temporary files in the current directory regardless of
2090 # the output directory. Thus, making CWD read-only will cause this test
2091 # to fail, enabling locking or at least warning the user not to do parallel
2094 save_CFLAGS="$CFLAGS"
2095 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
2097 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
2098 # The compiler can only warn and ignore the option if not recognized
2099 # So say no if there are warnings
2100 if test -s out/conftest.err; then
2101 lt_cv_compiler_c_o=no
2103 lt_cv_compiler_c_o=yes
2106 # Append any errors to the config.log.
2107 cat out/conftest.err 1>&AC_FD_CC
2108 lt_cv_compiler_c_o=no
2110 CFLAGS="$save_CFLAGS"
2116 $rm -r conftest 2>/dev/null
2118 compiler_c_o=$lt_cv_compiler_c_o
2119 AC_MSG_RESULT([$compiler_c_o])
2121 if test x"$compiler_c_o" = x"yes"; then
2122 # Check to see if we can write to a .lo
2123 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
2124 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
2125 lt_cv_compiler_o_lo=no
2126 save_CFLAGS="$CFLAGS"
2127 CFLAGS="$CFLAGS -c -o conftest.lo"
2128 save_objext="$ac_objext"
2130 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2131 # The compiler can only warn and ignore the option if not recognized
2132 # So say no if there are warnings
2133 if test -s conftest.err; then
2134 lt_cv_compiler_o_lo=no
2136 lt_cv_compiler_o_lo=yes
2139 ac_objext="$save_objext"
2140 CFLAGS="$save_CFLAGS"
2142 compiler_o_lo=$lt_cv_compiler_o_lo
2143 AC_MSG_RESULT([$compiler_o_lo])
2148 # Check to see if we can do hard links to lock some files if needed
2149 hard_links="nottested"
2150 if test "$compiler_c_o" = no && test "$need_locks" != no; then
2151 # do not overwrite the value of need_locks provided by the user
2152 AC_MSG_CHECKING([if we can lock with hard links])
2155 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2157 ln conftest.a conftest.b 2>&5 || hard_links=no
2158 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2159 AC_MSG_RESULT([$hard_links])
2160 if test "$hard_links" = no; then
2161 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
2168 if test "$GCC" = yes; then
2169 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
2170 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
2171 echo "int some_variable = 0;" > conftest.$ac_ext
2172 save_CFLAGS="$CFLAGS"
2173 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
2174 compiler_rtti_exceptions=no
2175 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2176 # The compiler can only warn and ignore the option if not recognized
2177 # So say no if there are warnings
2178 if test -s conftest.err; then
2179 compiler_rtti_exceptions=no
2181 compiler_rtti_exceptions=yes
2184 CFLAGS="$save_CFLAGS"
2185 AC_MSG_RESULT([$compiler_rtti_exceptions])
2187 if test "$compiler_rtti_exceptions" = "yes"; then
2188 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
2190 no_builtin_flag=' -fno-builtin'
2194 # See if the linker supports building shared libraries.
2195 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2197 allow_undefined_flag=
2199 need_lib_prefix=unknown
2200 need_version=unknown
2201 # when you set need_version to no, make sure it does not cause -set_version
2202 # flags to be left without arguments
2204 archive_expsym_cmds=
2205 old_archive_from_new_cmds=
2206 old_archive_from_expsyms_cmds=
2207 export_dynamic_flag_spec=
2208 whole_archive_flag_spec=
2209 thread_safe_flag_spec=
2210 hardcode_into_libs=no
2211 hardcode_libdir_flag_spec=
2212 hardcode_libdir_separator=
2215 hardcode_shlibpath_var=unsupported
2217 link_all_deplibs=unknown
2218 always_export_symbols=no
2219 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2220 # include_expsyms should be a list of space-separated symbols to be *always*
2221 # included in the symbol list
2223 # exclude_expsyms can be an egrep regular expression of symbols to exclude
2224 # it will be wrapped by ` (' and `)$', so one must not match beginning or
2225 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2226 # as well as any symbol that contains `d'.
2227 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2228 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2229 # platforms (ab)use it in PIC code, but their linkers get confused if
2230 # the symbol is explicitly referenced. Since portable code cannot
2231 # rely on this symbol name, it's probably fine to never include it in
2232 # preloaded symbol tables.
2233 extract_expsyms_cmds=
2236 cygwin* | mingw* | pw32*)
2237 # FIXME: the MSVC++ port hasn't been tested in a loooong time
2238 # When not using gcc, we currently assume that we are using
2239 # Microsoft Visual C++.
2240 if test "$GCC" != yes; then
2250 if test "$with_gnu_ld" = yes; then
2251 # If archive_cmds runs LD, not CC, wlarc should be empty
2254 # See if GNU ld supports shared libraries.
2256 aix3* | aix4* | aix5*)
2257 # On AIX, the GNU linker is very broken
2258 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2262 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
2263 *** to be unable to reliably create shared libraries on AIX.
2264 *** Therefore, libtool is disabling shared libraries support. If you
2265 *** really care for shared libraries, you may want to modify your PATH
2266 *** so that a non-GNU linker is found, and then restart.
2272 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
2273 hardcode_libdir_flag_spec='-L$libdir'
2274 hardcode_minus_L=yes
2276 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2277 # that the semantics of dynamic libraries on AmigaOS, at least up
2278 # to version 4, is to share data among multiple programs linked
2279 # with the same dynamic library. Since this doesn't match the
2280 # behavior of shared libraries on other platforms, we can use
2286 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2287 allow_undefined_flag=unsupported
2288 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2289 # support --undefined. This deserves some investigation. FIXME
2290 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2296 cygwin* | mingw* | pw32*)
2297 # hardcode_libdir_flag_spec is actually meaningless, as there is
2298 # no search path for DLLs.
2299 hardcode_libdir_flag_spec='-L$libdir'
2300 allow_undefined_flag=unsupported
2301 always_export_symbols=yes
2303 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2304 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2305 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2306 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2307 else $CC -o impgen impgen.c ; fi)~
2308 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2310 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2312 # cygwin and mingw dlls have different entry points and sets of symbols
2314 # FIXME: what about values for MSVC?
2315 dll_entry=__cygwin_dll_entry@12
2316 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2320 dll_entry=_DllMainCRTStartup@12
2321 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2325 # mingw and cygwin differ, and it's simplest to just exclude the union
2326 # of the two symbol sets.
2327 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2329 # recent cygwin and mingw systems supply a stub DllMain which the user
2330 # can override, but on older systems we have to supply one (in ltdll.c)
2331 if test "x$lt_cv_need_dllmain" = "xyes"; then
2332 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2333 ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
2334 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2340 # Extract the symbol export list from an `--export-all' def file,
2341 # then regenerate the def file from the symbol export list, so that
2342 # the compiled dll only exports the symbol export list.
2343 # Be careful not to strip the DATA tag left be newer dlltools.
2344 export_symbols_cmds="$ltdll_cmds"'
2345 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2346 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2348 # If the export-symbols file already is a .def file (1st line
2349 # is EXPORTS), use it as is.
2350 # If DATA tags from a recent dlltool are present, honour them!
2351 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
2352 cp $export_symbols $output_objdir/$soname-def;
2354 echo EXPORTS > $output_objdir/$soname-def;
2356 cat $export_symbols | while read symbol; do
2359 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2360 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2362 _lt_hint=`expr 1 + \$_lt_hint`;
2366 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2367 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
2368 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2369 $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
2370 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2374 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2375 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2378 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2379 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2384 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2388 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
2389 *** create shared libraries on Solaris systems. Therefore, libtool
2390 *** is disabling shared libraries support. We urge you to upgrade GNU
2391 *** binutils to release 2.9.1 or newer. Another option is to modify
2392 *** your PATH or compiler configuration so that the native linker is
2393 *** used, and then restart.
2396 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2397 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2398 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2405 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2408 hardcode_shlibpath_var=no
2412 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2413 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2414 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2421 if test "$ld_shlibs" = yes; then
2422 runpath_var=LD_RUN_PATH
2423 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2424 export_dynamic_flag_spec='${wl}--export-dynamic'
2426 cygwin* | mingw* | pw32*)
2427 # dlltool doesn't understand --whole-archive et. al.
2428 whole_archive_flag_spec=
2431 # ancient GNU ld didn't support --whole-archive et. al.
2432 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2433 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2435 whole_archive_flag_spec=
2441 # PORTME fill in a description of your system's linker (not GNU ld)
2444 allow_undefined_flag=unsupported
2445 always_export_symbols=yes
2446 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
2447 # Note: this linker hardcodes the directories in LIBPATH if there
2448 # are no directories specified by -L.
2449 hardcode_minus_L=yes
2450 if test "$GCC" = yes && test -z "$link_static_flag"; then
2451 # Neither direct hardcoding nor static linking is supported with a
2453 hardcode_direct=unsupported
2458 if test "$host_cpu" = ia64; then
2459 # On IA64, the linker does run time linking by default, so we don't
2460 # have to do anything special.
2461 aix_use_runtimelinking=no
2462 exp_sym_flag='-Bexport'
2465 aix_use_runtimelinking=no
2467 # Test if we are trying to use run time linking or normal
2468 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2469 # need to do runtime linking.
2470 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2471 for ld_flag in $LDFLAGS; do
2472 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
2473 aix_use_runtimelinking=yes
2479 exp_sym_flag='-bexport'
2480 no_entry_flag='-bnoentry'
2483 # When large executables or shared objects are built, AIX ld can
2484 # have problems creating the table of contents. If linking a library
2485 # or program results in "error TOC overflow" add -mminimal-toc to
2486 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2487 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2491 hardcode_libdir_separator=':'
2492 if test "$GCC" = yes; then
2493 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2494 collect2name=`${CC} -print-prog-name=collect2`
2495 if test -f "$collect2name" && \
2496 strings "$collect2name" | grep resolve_lib_name >/dev/null
2498 # We have reworked collect2
2501 # We have old collect2
2502 hardcode_direct=unsupported
2503 # It fails to find uninstalled libraries when the uninstalled
2504 # path is not listed in the libpath. Setting hardcode_minus_L
2505 # to unsupported forces relinking
2506 hardcode_minus_L=yes
2507 hardcode_libdir_flag_spec='-L$libdir'
2508 hardcode_libdir_separator=
2512 shared_flag='-shared'
2515 if test "$host_cpu" = ia64; then
2516 shared_flag='${wl}-G'
2518 if test "$aix_use_runtimelinking" = yes; then
2519 shared_flag='${wl}-G'
2521 shared_flag='${wl}-bM:SRE'
2526 # It seems that -bexpall can do strange things, so it is better to
2527 # generate a list of symbols to export.
2528 always_export_symbols=yes
2529 if test "$aix_use_runtimelinking" = yes; then
2530 # Warning - without using the other runtime loading flags (-brtl),
2531 # -berok will link without error, but may produce a broken library.
2532 allow_undefined_flag='-berok'
2533 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2534 archive_expsym_cmds="\$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"
2536 if test "$host_cpu" = ia64; then
2537 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2538 allow_undefined_flag="-z nodefs"
2539 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2541 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2542 # Warning - without using the other run time loading flags,
2543 # -berok will link without error, but may produce a broken library.
2544 allow_undefined_flag='${wl}-berok'
2545 # This is a bit strange, but is similar to how AIX traditionally builds
2546 # it's shared libraries.
2547 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
2553 archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
2554 hardcode_libdir_flag_spec='-L$libdir'
2555 hardcode_minus_L=yes
2556 # see comment about different semantics on the GNU ld section
2560 cygwin* | mingw* | pw32*)
2561 # When not using gcc, we currently assume that we are using
2562 # Microsoft Visual C++.
2563 # hardcode_libdir_flag_spec is actually meaningless, as there is
2564 # no search path for DLLs.
2565 hardcode_libdir_flag_spec=' '
2566 allow_undefined_flag=unsupported
2567 # Tell ltmain to make .lib files, not .a files.
2569 # FIXME: Setting linknames here is a bad hack.
2570 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2571 # The linker will automatically build a .lib file if we build a DLL.
2572 old_archive_from_new_cmds='true'
2573 # FIXME: Should let the user specify the lib program.
2574 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2575 fix_srcfile_path='`cygpath -w "$srcfile"`'
2578 darwin* | rhapsody*)
2580 rhapsody* | darwin1.[[012]])
2581 allow_undefined_flag='-undefined suppress'
2584 allow_undefined_flag='-flat_namespace -undefined suppress'
2587 # FIXME: Relying on posixy $() will cause problems for
2588 # cross-compilation, but unfortunately the echo tests do not
2589 # yet detect zsh echo's removal of \ escapes.
2590 archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
2591 # We need to add '_' to the symbols in $export_symbols first
2592 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2594 hardcode_shlibpath_var=no
2595 whole_archive_flag_spec='-all_load $convenience'
2602 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2603 # support. Future versions do this automatically, but an explicit c++rt0.o
2604 # does not break anything, and helps significantly (at the cost of a little
2607 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2608 hardcode_libdir_flag_spec='-R$libdir'
2610 hardcode_shlibpath_var=no
2613 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2615 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2617 hardcode_minus_L=yes
2618 hardcode_shlibpath_var=no
2621 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2623 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2624 hardcode_libdir_flag_spec='-R$libdir'
2626 hardcode_shlibpath_var=no
2629 hpux9* | hpux10* | hpux11*)
2631 hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
2632 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2634 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2635 hardcode_libdir_separator=:
2637 hardcode_minus_L=yes # Not in the search PATH, but as the default
2638 # location of the library.
2639 export_dynamic_flag_spec='${wl}-E'
2643 if test "$GCC" = yes; then
2644 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2646 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2648 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2649 hardcode_libdir_separator=:
2650 link_all_deplibs=yes
2654 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2655 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2657 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2659 hardcode_libdir_flag_spec='-R$libdir'
2661 hardcode_shlibpath_var=no
2665 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2667 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2668 hardcode_libdir_separator=:
2669 hardcode_shlibpath_var=no
2674 hardcode_shlibpath_var=no
2675 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2676 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2677 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2678 export_dynamic_flag_spec='${wl}-E'
2681 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2682 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2683 hardcode_libdir_flag_spec='-R$libdir'
2686 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2687 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2694 hardcode_libdir_flag_spec='-L$libdir'
2695 hardcode_minus_L=yes
2696 allow_undefined_flag=unsupported
2697 archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
2698 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2702 if test "$GCC" = yes; then
2703 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2704 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2706 allow_undefined_flag=' -expect_unresolved \*'
2707 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2709 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2710 hardcode_libdir_separator=:
2713 osf4* | osf5*) # as osf3* with the addition of -msym flag
2714 if test "$GCC" = yes; then
2715 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2716 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
2717 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2719 allow_undefined_flag=' -expect_unresolved \*'
2720 archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2721 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2722 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
2724 #Both c and cxx compiler support -rpath directly
2725 hardcode_libdir_flag_spec='-rpath $libdir'
2727 hardcode_libdir_separator=:
2731 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2732 hardcode_shlibpath_var=no
2733 runpath_var=LD_RUN_PATH
2734 hardcode_runpath_var=yes
2735 export_dynamic_flag_spec='${wl}-Bexport'
2739 # gcc --version < 3.0 without binutils cannot create self contained
2740 # shared libraries reliably, requiring libgcc.a to resolve some of
2741 # the object symbols generated in some cases. Libraries that use
2742 # assert need libgcc.a to resolve __eprintf, for example. Linking
2743 # a copy of libgcc.a into every shared library to guarantee resolving
2744 # such symbols causes other problems: According to Tim Van Holder
2745 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2746 # (to the application) exception stack for one thing.
2747 no_undefined_flag=' -z defs'
2748 if test "$GCC" = yes; then
2749 case `$CC --version 2>/dev/null` in
2753 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2754 *** create self contained shared libraries on Solaris systems, without
2755 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2756 *** -no-undefined support, which will at least allow you to build shared
2757 *** libraries. However, you may find that when you link such libraries
2758 *** into an application without using GCC, you have to manually add
2759 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2760 *** upgrade to a newer version of GCC. Another option is to rebuild your
2761 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2768 # $CC -shared without GNU ld will not create a library from C++
2769 # object files and a static libstdc++, better avoid it by now
2770 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2771 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2772 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2773 hardcode_libdir_flag_spec='-R$libdir'
2774 hardcode_shlibpath_var=no
2776 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2777 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2778 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2780 link_all_deplibs=yes
2784 if test "x$host_vendor" = xsequent; then
2785 # Use $CC to link under sequent, because it throws in some extra .o
2786 # files that make .init and .fini sections work.
2787 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2789 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2791 hardcode_libdir_flag_spec='-L$libdir'
2793 hardcode_minus_L=yes
2794 hardcode_shlibpath_var=no
2798 if test "x$host_vendor" = xsno; then
2799 archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2800 hardcode_direct=yes # is this really true???
2802 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2803 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2805 runpath_var='LD_RUN_PATH'
2806 hardcode_shlibpath_var=no
2810 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2811 hardcode_shlibpath_var=no
2812 export_dynamic_flag_spec='-Bexport'
2816 no_undefined_flag=' -z text'
2817 # $CC -shared without GNU ld will not create a library from C++
2818 # object files and a static libstdc++, better avoid it by now
2819 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2820 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2821 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2822 hardcode_libdir_flag_spec=
2823 hardcode_shlibpath_var=no
2824 runpath_var='LD_RUN_PATH'
2828 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2829 hardcode_libdir_flag_spec='-L$libdir'
2830 hardcode_shlibpath_var=no
2834 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2835 hardcode_libdir_flag_spec='-L$libdir'
2836 hardcode_shlibpath_var=no
2840 if test -d /usr/nec; then
2841 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2842 hardcode_shlibpath_var=no
2843 runpath_var=LD_RUN_PATH
2844 hardcode_runpath_var=yes
2850 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2853 hardcode_shlibpath_var=no
2854 hardcode_runpath_var=yes
2855 runpath_var=LD_RUN_PATH
2858 sysv5uw7* | unixware7*)
2859 no_undefined_flag='${wl}-z ${wl}text'
2860 if test "$GCC" = yes; then
2861 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2863 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2865 runpath_var='LD_RUN_PATH'
2866 hardcode_shlibpath_var=no
2874 AC_MSG_RESULT([$ld_shlibs])
2875 test "$ld_shlibs" = no && can_build_shared=no
2877 # Check hardcoding attributes.
2878 AC_MSG_CHECKING([how to hardcode library paths into programs])
2880 if test -n "$hardcode_libdir_flag_spec" || \
2881 test -n "$runpath_var"; then
2883 # We can hardcode non-existant directories.
2884 if test "$hardcode_direct" != no &&
2885 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2886 # have to relink, otherwise we might link with an installed library
2887 # when we should be linking with a yet-to-be-installed one
2888 ## test "$hardcode_shlibpath_var" != no &&
2889 test "$hardcode_minus_L" != no; then
2890 # Linking always hardcodes the temporary library directory.
2891 hardcode_action=relink
2893 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2894 hardcode_action=immediate
2897 # We cannot hardcode anything, or else we can only hardcode existing
2899 hardcode_action=unsupported
2901 AC_MSG_RESULT([$hardcode_action])
2905 AC_MSG_CHECKING([whether stripping libraries is possible])
2906 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2907 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2908 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2909 AC_MSG_RESULT([yes])
2914 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2915 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2917 # PORTME Fill in your ld.so characteristics
2918 AC_MSG_CHECKING([dynamic linker characteristics])
2920 libname_spec='lib$name'
2927 shlibpath_overrides_runpath=unknown
2929 dynamic_linker="$host_os ld.so"
2930 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2931 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2936 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2937 shlibpath_var=LIBPATH
2939 # AIX has no versioning support, so we append a major version to the name.
2940 soname_spec='${libname}${release}.so$major'
2945 if test "$host_cpu" = ia64; then
2946 # AIX 5 supports IA64
2947 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2948 shlibpath_var=LD_LIBRARY_PATH
2950 # With GCC up to 2.95.x, collect2 would create an import file
2951 # for dependence libraries. The import file would start with
2952 # the line `#! .'. This would cause the generated library to
2953 # depend on `.', always an invalid library. This was fixed in
2954 # development snapshots of GCC prior to 3.0.
2956 aix4 | aix4.[[01]] | aix4.[[01]].*)
2957 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2959 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2966 # AIX (on Power*) has no versioning support, so currently we can
2967 # not hardcode correct soname into executable. Probably we can
2968 # add versioning support to collect2, so additional links can
2969 # be useful in future.
2970 if test "$aix_use_runtimelinking" = yes; then
2971 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2972 # instead of lib<name>.a to let people know that these are not
2973 # typical AIX shared libraries.
2974 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2976 # We preserve .a as extension for shared libraries through AIX4.2
2977 # and later when we are not doing run time linking.
2978 library_names_spec='${libname}${release}.a $libname.a'
2979 soname_spec='${libname}${release}.so$major'
2981 shlibpath_var=LIBPATH
2986 library_names_spec='$libname.ixlibrary $libname.a'
2987 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2988 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'
2992 library_names_spec='${libname}.so'
2993 dynamic_linker="$host_os ld.so"
2994 shlibpath_var=LIBRARY_PATH
3000 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3001 soname_spec='${libname}${release}.so$major'
3002 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3003 shlibpath_var=LD_LIBRARY_PATH
3004 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3005 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3006 export_dynamic_flag_spec=-rdynamic
3007 # the default ld.so.conf also contains /usr/contrib/lib and
3008 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3009 # libtool to hard-code these into programs
3012 cygwin* | mingw* | pw32*)
3013 version_type=windows
3016 case $GCC,$host_os in
3018 library_names_spec='$libname.dll.a'
3019 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
3020 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
3021 dldir=$destdir/`dirname \$dlpath`~
3022 test -d \$dldir || mkdir -p \$dldir~
3023 $install_prog .libs/$dlname \$dldir/$dlname'
3024 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
3025 dlpath=$dir/\$dldll~
3029 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
3030 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
3033 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
3036 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
3039 dynamic_linker='Win32 ld.exe'
3040 # FIXME: first we should search . and the directory the executable is in
3044 darwin* | rhapsody*)
3045 dynamic_linker="$host_os dyld"
3049 # FIXME: Relying on posixy $() will cause problems for
3050 # cross-compilation, but unfortunately the echo tests do not
3051 # yet detect zsh echo's removal of \ escapes.
3052 library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
3053 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
3054 shlibpath_overrides_runpath=yes
3055 shlibpath_var=DYLD_LIBRARY_PATH
3063 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
3064 version_type=freebsd-$objformat
3065 case $version_type in
3067 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
3072 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
3076 shlibpath_var=LD_LIBRARY_PATH
3079 shlibpath_overrides_runpath=yes
3082 shlibpath_overrides_runpath=no
3083 hardcode_into_libs=yes
3092 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
3093 soname_spec='${libname}${release}.so$major'
3094 shlibpath_var=LD_LIBRARY_PATH
3095 hardcode_into_libs=yes
3098 hpux9* | hpux10* | hpux11*)
3099 # Give a soname corresponding to the major version so that dld.sl refuses to
3100 # link against other versions.
3101 dynamic_linker="$host_os dld.sl"
3105 shlibpath_var=SHLIB_PATH
3106 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3107 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
3108 soname_spec='${libname}${release}.sl$major'
3109 # HP-UX runs *really* slowly unless shared libraries are mode 555.
3110 postinstall_cmds='chmod 555 $lib'
3117 soname_spec='${libname}${release}.so$major'
3118 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
3124 case $LD in # libtool.m4 will add one of these switches to LD
3125 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
3126 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
3127 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
3128 *) libsuff= shlibsuff= libmagic=never-match;;
3132 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3133 shlibpath_overrides_runpath=no
3134 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3135 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3138 # No shared lib support for Linux oldld, aout, or coff.
3139 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
3143 # This must be Linux ELF.
3148 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3149 soname_spec='${libname}${release}.so$major'
3150 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3151 shlibpath_var=LD_LIBRARY_PATH
3152 shlibpath_overrides_runpath=no
3153 # This implies no fast_install, which is unacceptable.
3154 # Some rework will be needed to allow for fast_install
3155 # before this can be enabled.
3156 hardcode_into_libs=yes
3158 # We used to test for /lib/ld.so.1 and disable shared libraries on
3159 # powerpc, because MkLinux only supported shared libraries with the
3160 # GNU dynamic linker. Since this was broken with cross compilers,
3161 # most powerpc-linux boxes support dynamic linking these days and
3162 # people can always --disable-shared, the test was removed, and we
3163 # assume the GNU/Linux dynamic linker is in use.
3164 dynamic_linker='GNU/Linux ld.so'
3171 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3172 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3173 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3174 dynamic_linker='NetBSD (a.out) ld.so'
3176 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
3177 soname_spec='${libname}${release}.so$major'
3178 dynamic_linker='NetBSD ld.elf_so'
3180 shlibpath_var=LD_LIBRARY_PATH
3181 shlibpath_overrides_runpath=yes
3182 hardcode_into_libs=yes
3187 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3188 shlibpath_var=LD_LIBRARY_PATH
3189 shlibpath_overrides_runpath=yes
3196 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3198 openbsd2.[[89]] | openbsd2.[[89]].*)
3199 shlibpath_overrides_runpath=no
3202 shlibpath_overrides_runpath=yes
3206 shlibpath_overrides_runpath=yes
3208 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3209 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3210 shlibpath_var=LD_LIBRARY_PATH
3214 libname_spec='$name'
3216 library_names_spec='$libname.dll $libname.a'
3217 dynamic_linker='OS/2 ld.exe'
3218 shlibpath_var=LIBPATH
3221 osf3* | osf4* | osf5*)
3224 soname_spec='${libname}${release}.so'
3225 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
3226 shlibpath_var=LD_LIBRARY_PATH
3227 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3228 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3233 soname_spec='${libname}${release}.so$major'
3234 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3235 shlibpath_var=LD_LIBRARY_PATH
3242 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3243 soname_spec='${libname}${release}.so$major'
3244 shlibpath_var=LD_LIBRARY_PATH
3245 shlibpath_overrides_runpath=yes
3246 hardcode_into_libs=yes
3247 # ldd complains unless libraries are executable
3248 postinstall_cmds='chmod +x $lib'
3253 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3254 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3255 shlibpath_var=LD_LIBRARY_PATH
3256 shlibpath_overrides_runpath=yes
3257 if test "$with_gnu_ld" = yes; then
3263 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3265 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3266 soname_spec='${libname}${release}.so$major'
3267 shlibpath_var=LD_LIBRARY_PATH
3268 case $host_vendor in
3270 shlibpath_overrides_runpath=no
3275 shlibpath_overrides_runpath=no
3276 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3283 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3284 soname_spec='${libname}${release}.so$major'
3285 shlibpath_var=LD_LIBRARY_PATH
3292 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3293 soname_spec='${libname}${release}.so$major'
3294 shlibpath_var=LD_LIBRARY_PATH
3298 if test -d /usr/nec ;then
3300 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3301 soname_spec='$libname.so.$major'
3302 shlibpath_var=LD_LIBRARY_PATH
3310 AC_MSG_RESULT([$dynamic_linker])
3311 test "$dynamic_linker" = no && can_build_shared=no
3313 # Report the final consequences.
3314 AC_MSG_CHECKING([if libtool supports shared libraries])
3315 AC_MSG_RESULT([$can_build_shared])
3317 AC_MSG_CHECKING([whether to build shared libraries])
3318 test "$can_build_shared" = "no" && enable_shared=no
3320 # On AIX, shared libraries and static libraries use the same namespace, and
3321 # are all built from PIC.
3324 test "$enable_shared" = yes && enable_static=no
3325 if test -n "$RANLIB"; then
3326 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3327 postinstall_cmds='$RANLIB $lib'
3332 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3333 test "$enable_shared" = yes && enable_static=no
3337 AC_MSG_RESULT([$enable_shared])
3339 AC_MSG_CHECKING([whether to build static libraries])
3340 # Make sure either enable_shared or enable_static is yes.
3341 test "$enable_shared" = yes || enable_static=yes
3342 AC_MSG_RESULT([$enable_static])
3344 if test "$hardcode_action" = relink; then
3345 # Fast installation is not supported
3346 enable_fast_install=no
3347 elif test "$shlibpath_overrides_runpath" = yes ||
3348 test "$enable_shared" = no; then
3349 # Fast installation is not necessary
3350 enable_fast_install=needless
3353 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3354 if test "$GCC" = yes; then
3355 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3358 AC_LIBTOOL_DLOPEN_SELF
3360 if test "$enable_shared" = yes && test "$GCC" = yes; then
3361 case $archive_cmds in
3363 # FIXME: we may have to deal with multi-command sequences.
3366 # Test whether the compiler implicitly links with -lc since on some
3367 # systems, -lgcc has to come before -lc. If gcc already passes -lc
3368 # to ld, don't add -lc before -lgcc.
3369 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3370 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3372 echo 'static int dummy;' > conftest.$ac_ext
3374 if AC_TRY_EVAL(ac_compile); then
3377 libobjs=conftest.$ac_objext
3379 wl=$lt_cv_prog_cc_wl
3385 save_allow_undefined_flag=$allow_undefined_flag
3386 allow_undefined_flag=
3387 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3389 lt_cv_archive_cmds_need_lc=no
3391 lt_cv_archive_cmds_need_lc=yes
3393 allow_undefined_flag=$save_allow_undefined_flag
3395 cat conftest.err 1>&5
3397 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3401 need_lc=${lt_cv_archive_cmds_need_lc-yes}
3403 # The second clause should only fire when bootstrapping the
3404 # libtool distribution, otherwise you forgot to ship ltmain.sh
3405 # with your package, and you will get complaints that there are
3406 # no rules to generate ltmain.sh.
3407 if test -f "$ltmain"; then
3410 # If there is no Makefile yet, we rely on a make rule to execute
3411 # `config.status --recheck' to rerun these tests and create the
3412 # libtool script then.
3413 test -f Makefile && make "$ltmain"
3416 if test -f "$ltmain"; then
3417 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3420 echo creating $ofile
3422 # Now quote all the things that may contain metacharacters while being
3423 # careful not to overquote the AC_SUBSTed values. We take copies of the
3424 # variables and quote the copies for generation of the libtool script.
3425 for var in echo old_CC old_CFLAGS \
3426 AR AR_FLAGS CC LD LN_S NM SHELL \
3427 reload_flag reload_cmds wl \
3428 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3429 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3430 library_names_spec soname_spec \
3431 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3432 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3433 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3434 old_striplib striplib file_magic_cmd export_symbols_cmds \
3435 deplibs_check_method allow_undefined_flag no_undefined_flag \
3436 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3437 global_symbol_to_c_name_address \
3438 hardcode_libdir_flag_spec hardcode_libdir_separator \
3439 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3440 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3443 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3444 old_postinstall_cmds | old_postuninstall_cmds | \
3445 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3446 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3447 postinstall_cmds | postuninstall_cmds | \
3448 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3449 # Double-quote double-evaled strings.
3450 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3453 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3458 cat <<__EOF__ > "${ofile}T"
3461 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3462 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3463 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3465 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
3466 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3468 # This program is free software; you can redistribute it and/or modify
3469 # it under the terms of the GNU General Public License as published by
3470 # the Free Software Foundation; either version 2 of the License, or
3471 # (at your option) any later version.
3473 # This program is distributed in the hope that it will be useful, but
3474 # WITHOUT ANY WARRANTY; without even the implied warranty of
3475 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3476 # General Public License for more details.
3478 # You should have received a copy of the GNU General Public License
3479 # along with this program; if not, write to the Free Software
3480 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3482 # As a special exception to the GNU General Public License, if you
3483 # distribute this file as part of a program that contains a
3484 # configuration script generated by Autoconf, you may include it under
3485 # the same distribution terms that you use for the rest of that program.
3487 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
3488 Xsed="sed -e s/^X//"
3490 # The HP-UX ksh and POSIX shell print the target directory to stdout
3492 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3494 # ### BEGIN LIBTOOL CONFIG
3496 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3498 # Shell to use when invoking shell scripts.
3501 # Whether or not to build shared libraries.
3502 build_libtool_libs=$enable_shared
3504 # Whether or not to build static libraries.
3505 build_old_libs=$enable_static
3507 # Whether or not to add -lc for building shared libraries.
3508 build_libtool_need_lc=$need_lc
3510 # Whether or not to optimize for fast installation.
3511 fast_install=$enable_fast_install
3514 host_alias=$host_alias
3517 # An echo program that does not interpret backslashes.
3522 AR_FLAGS=$lt_AR_FLAGS
3524 # The default C compiler.
3527 # Is the compiler the GNU C compiler?
3530 # The linker used to build libraries.
3533 # Whether we need hard or soft links.
3536 # A BSD-compatible nm program.
3539 # A symbol stripping program
3542 # Used to examine libraries when file_magic_cmd begins "file"
3543 MAGIC_CMD=$MAGIC_CMD
3545 # Used on cygwin: DLL creation program.
3548 # Used on cygwin: object dumper.
3551 # Used on cygwin: assembler.
3554 # The name of the directory that contains temporary libtool files.
3557 # How to create reloadable object files.
3558 reload_flag=$lt_reload_flag
3559 reload_cmds=$lt_reload_cmds
3561 # How to pass a linker flag through the compiler.
3564 # Object file suffix (normally "o").
3567 # Old archive suffix (normally "a").
3570 # Executable file suffix (normally "").
3573 # Additional compiler flags for building library objects.
3574 pic_flag=$lt_pic_flag
3577 # Does compiler simultaneously support -c and -o options?
3578 compiler_c_o=$lt_compiler_c_o
3580 # Can we write directly to a .lo ?
3581 compiler_o_lo=$lt_compiler_o_lo
3583 # Must we lock files when doing compilation ?
3584 need_locks=$lt_need_locks
3586 # Do we need the lib prefix for modules?
3587 need_lib_prefix=$need_lib_prefix
3589 # Do we need a version for libraries?
3590 need_version=$need_version
3592 # Whether dlopen is supported.
3593 dlopen_support=$enable_dlopen
3595 # Whether dlopen of programs is supported.
3596 dlopen_self=$enable_dlopen_self
3598 # Whether dlopen of statically linked programs is supported.
3599 dlopen_self_static=$enable_dlopen_self_static
3601 # Compiler flag to prevent dynamic linking.
3602 link_static_flag=$lt_link_static_flag
3604 # Compiler flag to turn off builtin functions.
3605 no_builtin_flag=$lt_no_builtin_flag
3607 # Compiler flag to allow reflexive dlopens.
3608 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3610 # Compiler flag to generate shared objects directly from archives.
3611 whole_archive_flag_spec=$lt_whole_archive_flag_spec
3613 # Compiler flag to generate thread-safe objects.
3614 thread_safe_flag_spec=$lt_thread_safe_flag_spec
3616 # Library versioning type.
3617 version_type=$version_type
3619 # Format of library name prefix.
3620 libname_spec=$lt_libname_spec
3622 # List of archive names. First name is the real one, the rest are links.
3623 # The last name is the one that the linker finds with -lNAME.
3624 library_names_spec=$lt_library_names_spec
3626 # The coded name of the library, if different from the real name.
3627 soname_spec=$lt_soname_spec
3629 # Commands used to build and install an old-style archive.
3631 old_archive_cmds=$lt_old_archive_cmds
3632 old_postinstall_cmds=$lt_old_postinstall_cmds
3633 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3635 # Create an old-style archive from a shared archive.
3636 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3638 # Create a temporary old-style archive to link instead of a shared archive.
3639 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3641 # Commands used to build and install a shared archive.
3642 archive_cmds=$lt_archive_cmds
3643 archive_expsym_cmds=$lt_archive_expsym_cmds
3644 postinstall_cmds=$lt_postinstall_cmds
3645 postuninstall_cmds=$lt_postuninstall_cmds
3647 # Commands to strip libraries.
3648 old_striplib=$lt_old_striplib
3649 striplib=$lt_striplib
3651 # Method to check whether dependent libraries are shared objects.
3652 deplibs_check_method=$lt_deplibs_check_method
3654 # Command to use when deplibs_check_method == file_magic.
3655 file_magic_cmd=$lt_file_magic_cmd
3657 # Flag that allows shared libraries with undefined symbols to be built.
3658 allow_undefined_flag=$lt_allow_undefined_flag
3660 # Flag that forces no undefined symbols.
3661 no_undefined_flag=$lt_no_undefined_flag
3663 # Commands used to finish a libtool library installation in a directory.
3664 finish_cmds=$lt_finish_cmds
3666 # Same as above, but a single script fragment to be evaled but not shown.
3667 finish_eval=$lt_finish_eval
3669 # Take the output of nm and produce a listing of raw symbols and C names.
3670 global_symbol_pipe=$lt_global_symbol_pipe
3672 # Transform the output of nm in a proper C declaration
3673 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3675 # Transform the output of nm in a C name address pair
3676 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3678 # This is the shared library runtime path variable.
3679 runpath_var=$runpath_var
3681 # This is the shared library path variable.
3682 shlibpath_var=$shlibpath_var
3684 # Is shlibpath searched before the hard-coded library search path?
3685 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3687 # How to hardcode a shared library path into an executable.
3688 hardcode_action=$hardcode_action
3690 # Whether we should hardcode library paths into libraries.
3691 hardcode_into_libs=$hardcode_into_libs
3693 # Flag to hardcode \$libdir into a binary during linking.
3694 # This must work even if \$libdir does not exist.
3695 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3697 # Whether we need a single -rpath flag with a separated argument.
3698 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3700 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3702 hardcode_direct=$hardcode_direct
3704 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3706 hardcode_minus_L=$hardcode_minus_L
3708 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3709 # the resulting binary.
3710 hardcode_shlibpath_var=$hardcode_shlibpath_var
3712 # Variables whose values should be saved in libtool wrapper scripts and
3713 # restored at relink time.
3714 variables_saved_for_relink="$variables_saved_for_relink"
3716 # Whether libtool must link a program against all its dependency libraries.
3717 link_all_deplibs=$link_all_deplibs
3719 # Compile-time system search path for libraries
3720 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3722 # Run-time system search path for libraries
3723 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3725 # Fix the shell variable \$srcfile for the compiler.
3726 fix_srcfile_path="$fix_srcfile_path"
3728 # Set to yes if exported symbols are required.
3729 always_export_symbols=$always_export_symbols
3731 # The commands to list exported symbols.
3732 export_symbols_cmds=$lt_export_symbols_cmds
3734 # The commands to extract the exported symbol list from a shared archive.
3735 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3737 # Symbols that should not be listed in the preloaded symbols.
3738 exclude_expsyms=$lt_exclude_expsyms
3740 # Symbols that must always be exported.
3741 include_expsyms=$lt_include_expsyms
3743 # ### END LIBTOOL CONFIG
3749 cat <<\EOF >> "${ofile}T"
3751 # AIX sometimes has problems with the GCC collect2 program. For some
3752 # reason, if we set the COLLECT_NAMES environment variable, the problems
3753 # vanish in a puff of smoke.
3754 if test "X${COLLECT_NAMES+set}" != Xset; then
3756 export COLLECT_NAMES
3763 cygwin* | mingw* | pw32* | os2*)
3764 cat <<'EOF' >> "${ofile}T"
3765 # This is a source program that is used to create dlls on Windows
3766 # Don't remove nor modify the starting and closing comments
3767 # /* ltdll.c starts here */
3768 # #define WIN32_LEAN_AND_MEAN
3769 # #include <windows.h>
3770 # #undef WIN32_LEAN_AND_MEAN
3771 # #include <stdio.h>
3773 # #ifndef __CYGWIN__
3774 # # ifdef __CYGWIN32__
3775 # # define __CYGWIN__ __CYGWIN32__
3779 # #ifdef __cplusplus
3782 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3783 # #ifdef __cplusplus
3788 # #include <cygwin/cygwin_dll.h>
3789 # DECLARE_CYGWIN_DLL( DllMain );
3791 # HINSTANCE __hDllInstance_base;
3794 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3796 # __hDllInstance_base = hInst;
3799 # /* ltdll.c ends here */
3800 # This is a source program that is used to create import libraries
3801 # on Windows for dlls which lack them. Don't remove nor modify the
3802 # starting and closing comments
3803 # /* impgen.c starts here */
3804 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3806 # This file is part of GNU libtool.
3808 # This program is free software; you can redistribute it and/or modify
3809 # it under the terms of the GNU General Public License as published by
3810 # the Free Software Foundation; either version 2 of the License, or
3811 # (at your option) any later version.
3813 # This program is distributed in the hope that it will be useful,
3814 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3815 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3816 # GNU General Public License for more details.
3818 # You should have received a copy of the GNU General Public License
3819 # along with this program; if not, write to the Free Software
3820 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3823 # #include <stdio.h> /* for printf() */
3824 # #include <unistd.h> /* for open(), lseek(), read() */
3825 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3826 # #include <string.h> /* for strdup() */
3828 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3830 # #define O_BINARY 0
3833 # static unsigned int
3834 # pe_get16 (fd, offset)
3838 # unsigned char b[2];
3839 # lseek (fd, offset, SEEK_SET);
3841 # return b[0] + (b[1]<<8);
3844 # static unsigned int
3845 # pe_get32 (fd, offset)
3849 # unsigned char b[4];
3850 # lseek (fd, offset, SEEK_SET);
3852 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3855 # static unsigned int
3859 # unsigned char *b = ptr;
3860 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3869 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3870 # unsigned long export_rva, export_size, nsections, secptr, expptr;
3871 # unsigned long name_rvas, nexp;
3872 # unsigned char *expdata, *erva;
3873 # char *filename, *dll_name;
3875 # filename = argv[1];
3877 # dll = open(filename, O_RDONLY|O_BINARY);
3881 # dll_name = filename;
3883 # for (i=0; filename[i]; i++)
3884 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3885 # dll_name = filename + i +1;
3887 # pe_header_offset = pe_get32 (dll, 0x3c);
3888 # opthdr_ofs = pe_header_offset + 4 + 20;
3889 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3891 # if (num_entries < 1) /* no exports */
3894 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3895 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3896 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3897 # secptr = (pe_header_offset + 4 + 20 +
3898 # pe_get16 (dll, pe_header_offset + 4 + 16));
3901 # for (i = 0; i < nsections; i++)
3904 # unsigned long secptr1 = secptr + 40 * i;
3905 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3906 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3907 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3908 # lseek(dll, secptr1, SEEK_SET);
3909 # read(dll, sname, 8);
3910 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3912 # expptr = fptr + (export_rva - vaddr);
3913 # if (export_rva + export_size > vaddr + vsize)
3914 # export_size = vsize - (export_rva - vaddr);
3919 # expdata = (unsigned char*)malloc(export_size);
3920 # lseek (dll, expptr, SEEK_SET);
3921 # read (dll, expdata, export_size);
3922 # erva = expdata - export_rva;
3924 # nexp = pe_as32 (expdata+24);
3925 # name_rvas = pe_as32 (expdata+32);
3927 # printf ("EXPORTS\n");
3928 # for (i = 0; i<nexp; i++)
3930 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3931 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3936 # /* impgen.c ends here */
3942 # We use sed instead of cat because bash on DJGPP gets confused if
3943 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3944 # text mode, it properly converts lines to CR/LF. This bash problem
3945 # is reportedly fixed, but why not run on old versions too?
3946 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3948 mv -f "${ofile}T" "$ofile" || \
3949 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3953 ])# _LT_AC_LTCONFIG_HACK
3955 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3956 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3958 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3959 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3961 # AC_ENABLE_SHARED - implement the --enable-shared flag
3962 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3963 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3965 AC_DEFUN([AC_ENABLE_SHARED],
3966 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3967 AC_ARG_ENABLE(shared,
3968 changequote(<<, >>)dnl
3969 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3970 changequote([, ])dnl
3971 [p=${PACKAGE-default}
3973 yes) enable_shared=yes ;;
3974 no) enable_shared=no ;;
3977 # Look at the argument we got. We use all the common list separators.
3978 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3979 for pkg in $enableval; do
3980 if test "X$pkg" = "X$p"; then
3987 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3990 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3991 AC_DEFUN([AC_DISABLE_SHARED],
3992 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3993 AC_ENABLE_SHARED(no)])
3995 # AC_ENABLE_STATIC - implement the --enable-static flag
3996 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3997 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3999 AC_DEFUN([AC_ENABLE_STATIC],
4000 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
4001 AC_ARG_ENABLE(static,
4002 changequote(<<, >>)dnl
4003 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
4004 changequote([, ])dnl
4005 [p=${PACKAGE-default}
4007 yes) enable_static=yes ;;
4008 no) enable_static=no ;;
4011 # Look at the argument we got. We use all the common list separators.
4012 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4013 for pkg in $enableval; do
4014 if test "X$pkg" = "X$p"; then
4021 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
4024 # AC_DISABLE_STATIC - set the default static flag to --disable-static
4025 AC_DEFUN([AC_DISABLE_STATIC],
4026 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4027 AC_ENABLE_STATIC(no)])
4030 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
4031 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
4032 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
4034 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
4035 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
4036 AC_ARG_ENABLE(fast-install,
4037 changequote(<<, >>)dnl
4038 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
4039 changequote([, ])dnl
4040 [p=${PACKAGE-default}
4042 yes) enable_fast_install=yes ;;
4043 no) enable_fast_install=no ;;
4045 enable_fast_install=no
4046 # Look at the argument we got. We use all the common list separators.
4047 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4048 for pkg in $enableval; do
4049 if test "X$pkg" = "X$p"; then
4050 enable_fast_install=yes
4056 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
4059 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
4060 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
4061 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4062 AC_ENABLE_FAST_INSTALL(no)])
4064 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
4065 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
4066 # Where MODE is either `yes' or `no'. If omitted, it defaults to
4068 AC_DEFUN([AC_LIBTOOL_PICMODE],
4069 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4070 pic_mode=ifelse($#,1,$1,default)])
4073 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
4074 AC_DEFUN([AC_PATH_TOOL_PREFIX],
4075 [AC_MSG_CHECKING([for $1])
4076 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4079 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4082 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4085 ac_save_MAGIC_CMD="$MAGIC_CMD"
4086 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4087 dnl $ac_dummy forces splitting on constant user-supplied paths.
4088 dnl POSIX.2 word splitting is done only on the output of word expansions,
4089 dnl not every word. This closes a longstanding sh security hole.
4090 ac_dummy="ifelse([$2], , $PATH, [$2])"
4091 for ac_dir in $ac_dummy; do
4092 test -z "$ac_dir" && ac_dir=.
4093 if test -f $ac_dir/$1; then
4094 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4095 if test -n "$file_magic_test_file"; then
4096 case $deplibs_check_method in
4098 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4099 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4100 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4101 egrep "$file_magic_regex" > /dev/null; then
4106 *** Warning: the command libtool uses to detect shared libraries,
4107 *** $file_magic_cmd, produces output that libtool cannot recognize.
4108 *** The result is that libtool may fail to recognize shared libraries
4109 *** as such. This will affect the creation of libtool libraries that
4110 *** depend on shared libraries, but programs linked with such libtool
4111 *** libraries will work regardless of this problem. Nevertheless, you
4112 *** may want to report the problem to your system manager and/or to
4113 *** bug-libtool@gnu.org
4123 MAGIC_CMD="$ac_save_MAGIC_CMD"
4126 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4127 if test -n "$MAGIC_CMD"; then
4128 AC_MSG_RESULT($MAGIC_CMD)
4135 # AC_PATH_MAGIC - find a file program which can recognise a shared library
4136 AC_DEFUN([AC_PATH_MAGIC],
4137 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
4138 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
4139 if test -z "$lt_cv_path_MAGIC_CMD"; then
4140 if test -n "$ac_tool_prefix"; then
4141 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
4149 # AC_PROG_LD - find the path to the GNU or non-GNU linker
4150 AC_DEFUN([AC_PROG_LD],
4151 [AC_ARG_WITH(gnu-ld,
4152 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
4153 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
4154 AC_REQUIRE([AC_PROG_CC])dnl
4155 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4156 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4157 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4159 if test "$GCC" = yes; then
4160 # Check if gcc -print-prog-name=ld gives a path.
4161 AC_MSG_CHECKING([for ld used by GCC])
4164 # gcc leaves a trailing carriage return which upsets mingw
4165 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4167 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4170 # Accept absolute paths.
4171 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
4172 re_direlt='/[[^/]][[^/]]*/\.\./'
4173 # Canonicalize the path of ld
4174 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4175 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4176 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4178 test -z "$LD" && LD="$ac_prog"
4181 # If it fails, then pretend we aren't using GCC.
4185 # If it is relative, then search for the first ld in PATH.
4189 elif test "$with_gnu_ld" = yes; then
4190 AC_MSG_CHECKING([for GNU ld])
4192 AC_MSG_CHECKING([for non-GNU ld])
4194 AC_CACHE_VAL(lt_cv_path_LD,
4195 [if test -z "$LD"; then
4196 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4197 for ac_dir in $PATH; do
4198 test -z "$ac_dir" && ac_dir=.
4199 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4200 lt_cv_path_LD="$ac_dir/$ac_prog"
4201 # Check to see if the program is GNU ld. I'd rather use --version,
4202 # but apparently some GNU ld's only accept -v.
4203 # Break only if it was the GNU/non-GNU ld that we prefer.
4204 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4205 test "$with_gnu_ld" != no && break
4207 test "$with_gnu_ld" != yes && break
4213 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4216 if test -n "$LD"; then
4221 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4226 AC_DEFUN([AC_PROG_LD_GNU],
4227 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4228 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4229 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4230 lt_cv_prog_gnu_ld=yes
4232 lt_cv_prog_gnu_ld=no
4234 with_gnu_ld=$lt_cv_prog_gnu_ld
4237 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4238 # -- PORTME Some linkers may need a different reload flag.
4239 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4240 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4241 [lt_cv_ld_reload_flag='-r'])
4242 reload_flag=$lt_cv_ld_reload_flag
4243 test -n "$reload_flag" && reload_flag=" $reload_flag"
4246 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4247 # -- PORTME fill in with the dynamic library characteristics
4248 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4249 [AC_CACHE_CHECK([how to recognise dependant libraries],
4250 lt_cv_deplibs_check_method,
4251 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4252 lt_cv_file_magic_test_file=
4253 lt_cv_deplibs_check_method='unknown'
4254 # Need to set the preceding variable on all platforms that support
4255 # interlibrary dependencies.
4256 # 'none' -- dependencies not supported.
4257 # `unknown' -- same as none, but documents that we really don't know.
4258 # 'pass_all' -- all dependencies passed with no checks.
4259 # 'test_compile' -- check by making test program.
4260 # 'file_magic [[regex]]' -- check by looking for files in library path
4261 # which responds to the $file_magic_cmd with a given egrep regex.
4262 # If you have `file' or equivalent on your system and you're not sure
4263 # whether `pass_all' will *always* work, you probably want this one.
4267 lt_cv_deplibs_check_method=pass_all
4271 lt_cv_deplibs_check_method=pass_all
4275 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4276 lt_cv_file_magic_cmd='/usr/bin/file -L'
4277 lt_cv_file_magic_test_file=/shlib/libc.so
4280 cygwin* | mingw* | pw32*)
4281 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4282 lt_cv_file_magic_cmd='$OBJDUMP -f'
4285 darwin* | rhapsody*)
4286 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4287 lt_cv_file_magic_cmd='/usr/bin/file -L'
4289 rhapsody* | darwin1.[[012]])
4290 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4293 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4299 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4302 # Not sure whether the presence of OpenBSD here was a mistake.
4303 # Let's accept both of them until this is cleared up.
4304 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4305 lt_cv_file_magic_cmd=/usr/bin/file
4306 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4310 lt_cv_deplibs_check_method=pass_all
4315 lt_cv_deplibs_check_method=pass_all
4319 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4320 lt_cv_file_magic_cmd=/usr/bin/file
4321 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4327 # this will be overridden with pass_all, but let us keep it just in case
4328 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4332 *-32|*"-32 ") libmagic=32-bit;;
4333 *-n32|*"-n32 ") libmagic=N32;;
4334 *-64|*"-64 ") libmagic=64-bit;;
4335 *) libmagic=never-match;;
4337 # this will be overridden with pass_all, but let us keep it just in case
4338 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4341 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4342 lt_cv_deplibs_check_method=pass_all
4345 # This must be Linux ELF.
4348 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
4349 lt_cv_deplibs_check_method=pass_all ;;
4351 # glibc up to 2.1.1 does not perform some relocations on ARM
4352 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4354 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4358 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4359 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4361 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4366 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4367 lt_cv_file_magic_cmd=/usr/bin/file
4368 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4372 lt_cv_file_magic_cmd=/usr/bin/file
4373 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4374 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4375 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4377 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4381 osf3* | osf4* | osf5*)
4382 # this will be overridden with pass_all, but let us keep it just in case
4383 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4384 lt_cv_file_magic_test_file=/shlib/libc.so
4385 lt_cv_deplibs_check_method=pass_all
4389 lt_cv_deplibs_check_method=pass_all
4393 lt_cv_deplibs_check_method=pass_all
4394 lt_cv_file_magic_test_file=/lib/libc.so
4397 sysv5uw[[78]]* | sysv4*uw2*)
4398 lt_cv_deplibs_check_method=pass_all
4401 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4402 case $host_vendor in
4404 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]]'
4405 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4408 lt_cv_deplibs_check_method=pass_all
4411 lt_cv_file_magic_cmd='/bin/file'
4412 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4415 lt_cv_file_magic_cmd='/bin/file'
4416 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4417 lt_cv_file_magic_test_file=/lib/libc.so
4423 file_magic_cmd=$lt_cv_file_magic_cmd
4424 deplibs_check_method=$lt_cv_deplibs_check_method
4428 # AC_PROG_NM - find the path to a BSD-compatible name lister
4429 AC_DEFUN([AC_PROG_NM],
4430 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4431 AC_MSG_CHECKING([for BSD-compatible nm])
4432 AC_CACHE_VAL(lt_cv_path_NM,
4433 [if test -n "$NM"; then
4434 # Let the user override the test.
4437 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4438 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4439 test -z "$ac_dir" && ac_dir=.
4440 tmp_nm=$ac_dir/${ac_tool_prefix}nm
4441 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4442 # Check to see if the nm accepts a BSD-compat flag.
4443 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4444 # nm: unknown option "B" ignored
4445 # Tru64's nm complains that /dev/null is an invalid object file
4446 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4447 lt_cv_path_NM="$tmp_nm -B"
4449 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4450 lt_cv_path_NM="$tmp_nm -p"
4453 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4454 continue # so that we can try to find one that supports BSD flags
4459 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4462 AC_MSG_RESULT([$NM])
4465 # AC_CHECK_LIBM - check for math library
4466 AC_DEFUN([AC_CHECK_LIBM],
4467 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4470 *-*-beos* | *-*-cygwin* | *-*-pw32*)
4471 # These system don't have libm
4474 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4475 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4478 AC_CHECK_LIB(m, main, LIBM="-lm")
4483 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4484 # the libltdl convenience library and INCLTDL to the include flags for
4485 # the libltdl header and adds --enable-ltdl-convenience to the
4486 # configure arguments. Note that LIBLTDL and INCLTDL are not
4487 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4488 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4489 # with '${top_builddir}/' and INCLTDL will be prefixed with
4490 # '${top_srcdir}/' (note the single quotes!). If your package is not
4491 # flat and you're not using automake, define top_builddir and
4492 # top_srcdir appropriately in the Makefiles.
4493 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4494 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4495 case $enable_ltdl_convenience in
4496 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4497 "") enable_ltdl_convenience=yes
4498 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4500 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4501 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4504 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4505 # the libltdl installable library and INCLTDL to the include flags for
4506 # the libltdl header and adds --enable-ltdl-install to the configure
4507 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
4508 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4509 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4510 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
4511 # with '${top_srcdir}/' (note the single quotes!). If your package is
4512 # not flat and you're not using automake, define top_builddir and
4513 # top_srcdir appropriately in the Makefiles.
4514 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4515 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4516 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4517 AC_CHECK_LIB(ltdl, main,
4518 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4519 [if test x"$enable_ltdl_install" = xno; then
4520 AC_MSG_WARN([libltdl not installed, but installation disabled])
4522 enable_ltdl_install=yes
4525 if test x"$enable_ltdl_install" = x"yes"; then
4526 ac_configure_args="$ac_configure_args --enable-ltdl-install"
4527 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4528 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4530 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4537 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4538 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4539 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4540 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4541 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4542 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4543 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4545 # This is just to silence aclocal about the macro not being used
4546 ifelse([AC_DISABLE_FAST_INSTALL])
4548 # Define a conditional.
4550 AC_DEFUN([AM_CONDITIONAL],