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 # Do all the work for Automake. This macro actually does too much --
942 # some checks are only needed if your package does certain things.
943 # But this isn't really a big deal.
948 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
950 AC_DEFUN([AM_INIT_AUTOMAKE],
951 [AC_REQUIRE([AC_PROG_INSTALL])
956 dnl test to see if srcdir already configured
957 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
958 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
961 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
962 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
963 AC_REQUIRE([AM_SANITY_CHECK])
964 AC_REQUIRE([AC_ARG_PROGRAM])
965 dnl FIXME This is truly gross.
966 missing_dir=`cd $ac_aux_dir && pwd`
967 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
968 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
969 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
970 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
971 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
972 AC_REQUIRE([AC_PROG_MAKE_SET])])
975 # Check to make sure that the build environment is sane.
978 AC_DEFUN([AM_SANITY_CHECK],
979 [AC_MSG_CHECKING([whether build environment is sane])
982 echo timestamp > conftestfile
983 # Do `set' in a subshell so we don't clobber the current shell's
984 # arguments. Must try -L first in case configure is actually a
985 # symlink; some systems play weird games with the mod time of symlinks
986 # (eg FreeBSD returns the mod time of the symlink's containing
989 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
990 if test "[$]*" = "X"; then
992 set X `ls -t $srcdir/configure conftestfile`
994 if test "[$]*" != "X $srcdir/configure conftestfile" \
995 && test "[$]*" != "X conftestfile $srcdir/configure"; then
997 # If neither matched, then we have a broken ls. This can happen
998 # if, for instance, CONFIG_SHELL is bash and it inherits a
999 # broken ls alias from the environment. This has actually
1000 # happened. Such a system could not be considered "sane".
1001 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1002 alias in your environment])
1005 test "[$]2" = conftestfile
1011 AC_MSG_ERROR([newly created file is older than distributed files!
1012 Check your system clock])
1015 AC_MSG_RESULT(yes)])
1017 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
1018 dnl The program must properly implement --version.
1019 AC_DEFUN([AM_MISSING_PROG],
1020 [AC_MSG_CHECKING(for working $2)
1021 # Run test in a subshell; some versions of sh will print an error if
1022 # an executable is not found, even if stderr is redirected.
1023 # Redirect stdin to placate older versions of autoconf. Sigh.
1024 if ($2 --version) < /dev/null > /dev/null 2>&1; then
1026 AC_MSG_RESULT(found)
1029 AC_MSG_RESULT(missing)
1033 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
1035 # serial 46 AC_PROG_LIBTOOL
1037 AC_DEFUN([AC_PROG_LIBTOOL],
1038 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1040 # This can be used to rebuild libtool when needed
1041 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1043 # Always use our own libtool.
1044 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1045 AC_SUBST(LIBTOOL)dnl
1047 # Prevent multiple expansion
1048 define([AC_PROG_LIBTOOL], [])
1051 AC_DEFUN([AC_LIBTOOL_SETUP],
1053 AC_REQUIRE([AC_ENABLE_SHARED])dnl
1054 AC_REQUIRE([AC_ENABLE_STATIC])dnl
1055 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1056 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1057 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1058 AC_REQUIRE([AC_PROG_CC])dnl
1059 AC_REQUIRE([AC_PROG_LD])dnl
1060 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1061 AC_REQUIRE([AC_PROG_NM])dnl
1062 AC_REQUIRE([AC_PROG_LN_S])dnl
1063 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1064 AC_REQUIRE([AC_OBJEXT])dnl
1065 AC_REQUIRE([AC_EXEEXT])dnl
1068 _LT_AC_PROG_ECHO_BACKSLASH
1069 # Only perform the check for file, if the check method requires it
1070 case $deplibs_check_method in
1072 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1078 AC_CHECK_TOOL(RANLIB, ranlib, :)
1079 AC_CHECK_TOOL(STRIP, strip, :)
1081 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1082 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1083 enable_win32_dll=yes, enable_win32_dll=no)
1085 AC_ARG_ENABLE(libtool-lock,
1086 [ --disable-libtool-lock avoid locking (might break parallel builds)])
1087 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1089 # Some flags need to be propagated to the compiler or linker for good
1093 # Find out which ABI we are using.
1094 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1095 if AC_TRY_EVAL(ac_compile); then
1096 case `/usr/bin/file conftest.$ac_objext` in
1112 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1113 SAVE_CFLAGS="$CFLAGS"
1114 CFLAGS="$CFLAGS -belf"
1115 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1118 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1120 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1121 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1122 CFLAGS="$SAVE_CFLAGS"
1126 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
1127 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1128 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1129 AC_CHECK_TOOL(AS, as, false)
1130 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1132 # recent cygwin and mingw systems supply a stub DllMain which the user
1133 # can override, but on older systems we have to supply one
1134 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
1136 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
1137 DllMain (0, 0, 0);],
1138 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
1141 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1142 # old mingw systems require "-dll" to link a DLL, while more recent ones
1144 SAVE_CFLAGS="$CFLAGS"
1145 CFLAGS="$CFLAGS -mdll"
1146 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
1147 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
1148 CFLAGS="$SAVE_CFLAGS" ;;
1149 *-*-cygwin* | *-*-pw32*)
1150 # cygwin systems need to pass --dll to the linker, and not link
1151 # crt.o which will require a WinMain@16 definition.
1152 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
1158 _LT_AC_LTCONFIG_HACK
1162 # AC_LIBTOOL_HEADER_ASSERT
1163 # ------------------------
1164 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
1165 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
1166 [lt_cv_func_assert_works],
1169 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
1170 case `$CC --version 2>/dev/null` in
1171 [[12]].*) lt_cv_func_assert_works=no ;;
1172 *) lt_cv_func_assert_works=yes ;;
1178 if test "x$lt_cv_func_assert_works" = xyes; then
1179 AC_CHECK_HEADERS(assert.h)
1181 ])# AC_LIBTOOL_HEADER_ASSERT
1183 # _LT_AC_CHECK_DLFCN
1184 # --------------------
1185 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1186 [AC_CHECK_HEADERS(dlfcn.h)
1187 ])# _LT_AC_CHECK_DLFCN
1189 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1190 # ---------------------------------
1191 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
1192 [AC_REQUIRE([AC_CANONICAL_HOST])
1193 AC_REQUIRE([AC_PROG_NM])
1194 AC_REQUIRE([AC_OBJEXT])
1195 # Check for command to grab the raw symbol name followed by C symbol from nm.
1196 AC_MSG_CHECKING([command to parse $NM output])
1197 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
1199 # These are sane defaults that work on at least a few old systems.
1200 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
1202 # Character class describing NM global symbol codes.
1203 symcode='[[BCDEGRST]]'
1205 # Regexp to match symbols that can be accessed directly from C.
1206 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
1208 # Transform the above into a raw symbol and a C symbol.
1209 symxfrm='\1 \2\3 \3'
1211 # Transform an extracted symbol line into a proper C declaration
1212 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1214 # Transform an extracted symbol line into symbol name and symbol address
1215 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'"
1217 # Define system-specific variables.
1222 cygwin* | mingw* | pw32*)
1223 symcode='[[ABCDGISTW]]'
1225 hpux*) # Its linker distinguishes data from code symbols
1226 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1227 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'"
1230 symcode='[[BCDEGRST]]'
1236 symcode='[[DFNSTU]]'
1240 # Handle CRLF in mingw tool chain
1244 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1248 # If we're using GNU nm, then use its standard symbol codes.
1249 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1250 symcode='[[ABCDGISTW]]'
1253 # Try without a prefix undercore, then with it.
1254 for ac_symprfx in "" "_"; do
1256 # Write the raw and C identifiers.
1257 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1259 # Check to see that the pipe works correctly.
1262 cat > conftest.$ac_ext <<EOF
1267 void nm_test_func(){}
1271 int main(){nm_test_var='a';nm_test_func();return(0);}
1274 if AC_TRY_EVAL(ac_compile); then
1275 # Now try to grab the symbols.
1277 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
1278 # Try sorting and uniquifying the output.
1279 if sort "$nlist" | uniq > "$nlist"T; then
1280 mv -f "$nlist"T "$nlist"
1285 # Make sure that we snagged all the symbols we need.
1286 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1287 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1288 cat <<EOF > conftest.$ac_ext
1294 # Now generate the symbol file.
1295 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1297 cat <<EOF >> conftest.$ac_ext
1298 #if defined (__STDC__) && __STDC__
1299 # define lt_ptr void *
1301 # define lt_ptr char *
1305 /* The mapping between symbol names and symbols. */
1310 lt_preloaded_symbols[[]] =
1313 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
1314 cat <<\EOF >> conftest.$ac_ext
1322 # Now try linking the two files.
1323 mv conftest.$ac_objext conftstm.$ac_objext
1325 save_CFLAGS="$CFLAGS"
1326 LIBS="conftstm.$ac_objext"
1327 CFLAGS="$CFLAGS$no_builtin_flag"
1328 if AC_TRY_EVAL(ac_link) && test -s conftest; then
1332 CFLAGS="$save_CFLAGS"
1334 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1337 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1340 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1343 echo "$progname: failed program was:" >&AC_FD_CC
1344 cat conftest.$ac_ext >&5
1346 rm -f conftest* conftst*
1348 # Do not use the global_symbol_pipe unless it works.
1349 if test "$pipe_works" = yes; then
1352 lt_cv_sys_global_symbol_pipe=
1356 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1357 if test -z "$lt_cv_sys_global_symbol_pipe"; then
1358 global_symbol_to_cdecl=
1359 global_symbol_to_c_name_address=
1361 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1362 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1364 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1366 AC_MSG_RESULT(failed)
1370 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1372 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1373 # ---------------------------------
1374 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1375 [# Find the correct PATH separator. Usually this is `:', but
1376 # DJGPP uses `;' like DOS.
1377 if test "X${PATH_SEPARATOR+set}" != Xset; then
1378 UNAME=${UNAME-`uname 2>/dev/null`}
1380 *-DOS) lt_cv_sys_path_separator=';' ;;
1381 *) lt_cv_sys_path_separator=':' ;;
1383 PATH_SEPARATOR=$lt_cv_sys_path_separator
1385 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1387 # _LT_AC_PROG_ECHO_BACKSLASH
1388 # --------------------------
1389 # Add some code to the start of the generated configure script which
1390 # will find an echo command which doesn't interpret backslashes.
1391 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1392 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1393 [AC_DIVERT_PUSH(NOTICE)])
1394 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1396 # Check that we are running under the correct shell.
1397 SHELL=${CONFIG_SHELL-/bin/sh}
1401 # Remove one level of quotation (which was required for Make).
1402 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1407 if test "X[$]1" = X--no-reexec; then
1408 # Discard the --no-reexec flag, and continue.
1410 elif test "X[$]1" = X--fallback-echo; then
1411 # Avoid inline document here, it may be left over
1413 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1414 # Yippee, $echo works!
1417 # Restart under the correct shell.
1418 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1421 if test "X[$]1" = X--fallback-echo; then
1422 # used as fallback echo
1430 # The HP-UX ksh and POSIX shell print the target directory to stdout
1432 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1434 if test -z "$ECHO"; then
1435 if test "X${echo_test_string+set}" != Xset; then
1436 # find a string as large as possible, as long as the shell can cope with it
1437 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1438 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1439 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1440 echo_test_string="`eval $cmd`" &&
1441 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1448 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1449 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1450 test "X$echo_testing_string" = "X$echo_test_string"; then
1453 # The Solaris, AIX, and Digital Unix default echo programs unquote
1454 # backslashes. This makes it impossible to quote backslashes using
1455 # echo "$something" | sed 's/\\/\\\\/g'
1457 # So, first we look for a working echo in the user's PATH.
1459 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1460 for dir in $PATH /usr/ucb; do
1461 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1462 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1463 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1464 test "X$echo_testing_string" = "X$echo_test_string"; then
1471 if test "X$echo" = Xecho; then
1472 # We didn't find a better echo, so look for alternatives.
1473 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1474 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1475 test "X$echo_testing_string" = "X$echo_test_string"; then
1476 # This shell has a builtin print -r that does the trick.
1478 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1479 test "X$CONFIG_SHELL" != X/bin/ksh; then
1480 # If we have ksh, try running configure again with it.
1481 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1482 export ORIGINAL_CONFIG_SHELL
1483 CONFIG_SHELL=/bin/ksh
1485 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1489 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1490 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1491 test "X$echo_testing_string" = "X$echo_test_string"; then
1492 # Cool, printf works
1494 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1495 test "X$echo_testing_string" = 'X\t' &&
1496 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1497 test "X$echo_testing_string" = "X$echo_test_string"; then
1498 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1500 SHELL="$CONFIG_SHELL"
1502 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1503 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1504 test "X$echo_testing_string" = 'X\t' &&
1505 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1506 test "X$echo_testing_string" = "X$echo_test_string"; then
1507 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1509 # maybe with a smaller string...
1512 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1513 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1520 if test "$prev" != 'sed 50q "[$]0"'; then
1521 echo_test_string=`eval $prev`
1522 export echo_test_string
1523 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1525 # Oops. We lost completely, so just stick with echo.
1534 # Copy echo and quote the copy suitably for passing to libtool from
1535 # the Makefile, instead of quoting the original, which is used later.
1537 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1538 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1543 ])# _LT_AC_PROG_ECHO_BACKSLASH
1545 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1546 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1547 # ------------------------------------------------------------------
1548 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1549 [if test "$cross_compiling" = yes; then :
1552 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1553 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1554 lt_status=$lt_dlunknown
1555 cat > conftest.$ac_ext <<EOF
1556 [#line __oline__ "configure"
1557 #include "confdefs.h"
1566 # define LT_DLGLOBAL RTLD_GLOBAL
1569 # define LT_DLGLOBAL DL_GLOBAL
1571 # define LT_DLGLOBAL 0
1575 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1576 find out it does not work in some platform. */
1577 #ifndef LT_DLLAZY_OR_NOW
1579 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1582 # define LT_DLLAZY_OR_NOW DL_LAZY
1585 # define LT_DLLAZY_OR_NOW RTLD_NOW
1588 # define LT_DLLAZY_OR_NOW DL_NOW
1590 # define LT_DLLAZY_OR_NOW 0
1598 extern "C" void exit (int);
1601 void fnord() { int i=42;}
1604 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1605 int status = $lt_dlunknown;
1609 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1610 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1611 /* dlclose (self); */
1617 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1618 (./conftest; exit; ) 2>/dev/null
1621 x$lt_dlno_uscore) $1 ;;
1622 x$lt_dlneed_uscore) $2 ;;
1623 x$lt_unknown|x*) $3 ;;
1626 # compilation failed
1631 ])# _LT_AC_TRY_DLOPEN_SELF
1633 # AC_LIBTOOL_DLOPEN_SELF
1634 # -------------------
1635 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1636 [if test "x$enable_dlopen" != xyes; then
1637 enable_dlopen=unknown
1638 enable_dlopen_self=unknown
1639 enable_dlopen_self_static=unknown
1646 lt_cv_dlopen="load_add_on"
1648 lt_cv_dlopen_self=yes
1651 cygwin* | mingw* | pw32*)
1652 lt_cv_dlopen="LoadLibrary"
1657 AC_CHECK_FUNC([shl_load],
1658 [lt_cv_dlopen="shl_load"],
1659 [AC_CHECK_LIB([dld], [shl_load],
1660 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1661 [AC_CHECK_FUNC([dlopen],
1662 [lt_cv_dlopen="dlopen"],
1663 [AC_CHECK_LIB([dl], [dlopen],
1664 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1665 [AC_CHECK_LIB([svld], [dlopen],
1666 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1667 [AC_CHECK_LIB([dld], [dld_link],
1668 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1677 if test "x$lt_cv_dlopen" != xno; then
1683 case $lt_cv_dlopen in
1685 save_CPPFLAGS="$CPPFLAGS"
1686 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1687 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1689 save_LDFLAGS="$LDFLAGS"
1690 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1693 LIBS="$lt_cv_dlopen_libs $LIBS"
1695 AC_CACHE_CHECK([whether a program can dlopen itself],
1696 lt_cv_dlopen_self, [dnl
1697 _LT_AC_TRY_DLOPEN_SELF(
1698 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1699 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1702 if test "x$lt_cv_dlopen_self" = xyes; then
1703 LDFLAGS="$LDFLAGS $link_static_flag"
1704 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1705 lt_cv_dlopen_self_static, [dnl
1706 _LT_AC_TRY_DLOPEN_SELF(
1707 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1708 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1712 CPPFLAGS="$save_CPPFLAGS"
1713 LDFLAGS="$save_LDFLAGS"
1718 case $lt_cv_dlopen_self in
1719 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1720 *) enable_dlopen_self=unknown ;;
1723 case $lt_cv_dlopen_self_static in
1724 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1725 *) enable_dlopen_self_static=unknown ;;
1728 ])# AC_LIBTOOL_DLOPEN_SELF
1730 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1731 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1732 # Sed substitution that helps us do robust quoting. It backslashifies
1733 # metacharacters that are still active within double-quoted strings.
1734 Xsed='sed -e s/^X//'
1735 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1737 # Same as above, but do not quote variable references.
1738 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1740 # Sed substitution to delay expansion of an escaped shell variable in a
1741 # double_quote_subst'ed string.
1742 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1748 default_ofile=libtool
1749 can_build_shared=yes
1751 # All known linkers require a `.a' archive for static linking (except M$VC,
1752 # which needs '.lib').
1754 ltmain="$ac_aux_dir/ltmain.sh"
1755 ofile="$default_ofile"
1756 with_gnu_ld="$lt_cv_prog_gnu_ld"
1757 need_locks="$enable_libtool_lock"
1760 old_CFLAGS="$CFLAGS"
1762 # Set sane defaults for various variables
1763 test -z "$AR" && AR=ar
1764 test -z "$AR_FLAGS" && AR_FLAGS=cru
1765 test -z "$AS" && AS=as
1766 test -z "$CC" && CC=cc
1767 test -z "$DLLTOOL" && DLLTOOL=dlltool
1768 test -z "$LD" && LD=ld
1769 test -z "$LN_S" && LN_S="ln -s"
1770 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1771 test -z "$NM" && NM=nm
1772 test -z "$OBJDUMP" && OBJDUMP=objdump
1773 test -z "$RANLIB" && RANLIB=:
1774 test -z "$STRIP" && STRIP=:
1775 test -z "$ac_objext" && ac_objext=o
1777 if test x"$host" != x"$build"; then
1778 ac_tool_prefix=${host_alias}-
1783 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1786 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1791 # AIX sometimes has problems with the GCC collect2 program. For some
1792 # reason, if we set the COLLECT_NAMES environment variable, the problems
1793 # vanish in a puff of smoke.
1794 if test "X${COLLECT_NAMES+set}" != Xset; then
1796 export COLLECT_NAMES
1801 # Determine commands to create old-style static archives.
1802 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1803 old_postinstall_cmds='chmod 644 $oldlib'
1804 old_postuninstall_cmds=
1806 if test -n "$RANLIB"; then
1809 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1812 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1815 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1818 # Allow CC to be a program name with arguments.
1822 AC_MSG_CHECKING([for objdir])
1823 rm -f .libs 2>/dev/null
1824 mkdir .libs 2>/dev/null
1825 if test -d .libs; then
1828 # MS-DOS does not allow filenames that begin with a dot.
1831 rmdir .libs 2>/dev/null
1832 AC_MSG_RESULT($objdir)
1836 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1837 pic_mode="$withval", pic_mode=default)
1838 test -z "$pic_mode" && pic_mode=default
1840 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1841 # in isolation, and that seeing it set (from the cache) indicates that
1842 # the associated values are set (in the cache) correctly too.
1843 AC_MSG_CHECKING([for $compiler option to produce PIC])
1844 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1845 [ lt_cv_prog_cc_pic=
1846 lt_cv_prog_cc_shlib=
1848 lt_cv_prog_cc_static=
1849 lt_cv_prog_cc_no_builtin=
1850 lt_cv_prog_cc_can_build_shared=$can_build_shared
1852 if test "$GCC" = yes; then
1853 lt_cv_prog_cc_wl='-Wl,'
1854 lt_cv_prog_cc_static='-static'
1858 # Below there is a dirty hack to force normal static linking with -ldl
1859 # The problem is because libdl dynamically linked with both libc and
1860 # libC (AIX C++ library), which obviously doesn't included in libraries
1861 # list by gcc. This cause undefined symbols with -static flags.
1862 # This hack allows C programs to be linked with "-static -ldl", but
1863 # not sure about C++ programs.
1864 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1867 # FIXME: we need at least 68020 code to build shared libraries, but
1868 # adding the `-m68020' flag to GCC prevents building anything better,
1870 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1872 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
1873 # PIC is the default for these OSes.
1875 darwin* | rhapsody*)
1876 # PIC is the default on this platform
1877 # Common symbols not allowed in MH_DYLIB files
1878 lt_cv_prog_cc_pic='-fno-common'
1880 cygwin* | mingw* | pw32* | os2*)
1881 # This hack is so that the source file can tell whether it is being
1882 # built for inclusion in a dll (and should export symbols for example).
1883 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1886 if test -d /usr/nec; then
1887 lt_cv_prog_cc_pic=-Kconform_pic
1891 lt_cv_prog_cc_pic='-fPIC'
1895 # PORTME Check for PIC flags for the system compiler.
1897 aix3* | aix4* | aix5*)
1898 lt_cv_prog_cc_wl='-Wl,'
1899 # All AIX code is PIC.
1900 if test "$host_cpu" = ia64; then
1901 # AIX 5 now supports IA64 processor
1902 lt_cv_prog_cc_static='-Bstatic'
1904 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1908 hpux9* | hpux10* | hpux11*)
1909 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1910 lt_cv_prog_cc_wl='-Wl,'
1911 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1912 lt_cv_prog_cc_pic='+Z'
1916 lt_cv_prog_cc_wl='-Wl,'
1917 lt_cv_prog_cc_static='-non_shared'
1918 # PIC (with -KPIC) is the default.
1921 cygwin* | mingw* | pw32* | os2*)
1922 # This hack is so that the source file can tell whether it is being
1923 # built for inclusion in a dll (and should export symbols for example).
1924 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1928 lt_cv_prog_cc_pic='-KPIC'
1929 lt_cv_prog_cc_static='-Bstatic'
1932 osf3* | osf4* | osf5*)
1933 # All OSF/1 code is PIC.
1934 lt_cv_prog_cc_wl='-Wl,'
1935 lt_cv_prog_cc_static='-non_shared'
1939 lt_cv_prog_cc_pic='-Kpic'
1940 lt_cv_prog_cc_static='-dn'
1941 lt_cv_prog_cc_shlib='-belf'
1945 lt_cv_prog_cc_pic='-KPIC'
1946 lt_cv_prog_cc_static='-Bstatic'
1947 lt_cv_prog_cc_wl='-Wl,'
1951 lt_cv_prog_cc_pic='-PIC'
1952 lt_cv_prog_cc_static='-Bstatic'
1953 lt_cv_prog_cc_wl='-Qoption ld '
1956 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1957 lt_cv_prog_cc_pic='-KPIC'
1958 lt_cv_prog_cc_static='-Bstatic'
1959 if test "x$host_vendor" = xsni; then
1960 lt_cv_prog_cc_wl='-LD'
1962 lt_cv_prog_cc_wl='-Wl,'
1967 lt_cv_prog_cc_pic='-pic'
1968 lt_cv_prog_cc_static='-Bstatic'
1972 if test -d /usr/nec ;then
1973 lt_cv_prog_cc_pic='-Kconform_pic'
1974 lt_cv_prog_cc_static='-Bstatic'
1979 lt_cv_prog_cc_can_build_shared=no
1984 if test -z "$lt_cv_prog_cc_pic"; then
1985 AC_MSG_RESULT([none])
1987 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1989 # Check to make sure the pic_flag actually works.
1990 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1991 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1992 save_CFLAGS="$CFLAGS"
1993 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1994 AC_TRY_COMPILE([], [], [dnl
1996 hpux9* | hpux10* | hpux11*)
1997 # On HP-UX, both CC and GCC only warn that PIC is supported... then
1998 # they create non-PIC objects. So, if there were any warnings, we
1999 # assume that PIC is not supported.
2000 if test -s conftest.err; then
2001 lt_cv_prog_cc_pic_works=no
2003 lt_cv_prog_cc_pic_works=yes
2007 lt_cv_prog_cc_pic_works=yes
2011 lt_cv_prog_cc_pic_works=no
2013 CFLAGS="$save_CFLAGS"
2016 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
2018 lt_cv_prog_cc_can_build_shared=no
2020 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
2023 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
2026 # Check for any special shared library compilation flags.
2027 if test -n "$lt_cv_prog_cc_shlib"; then
2028 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
2029 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
2031 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
2032 lt_cv_prog_cc_can_build_shared=no
2036 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
2037 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
2038 lt_cv_prog_cc_static_works=no
2039 save_LDFLAGS="$LDFLAGS"
2040 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
2041 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
2042 LDFLAGS="$save_LDFLAGS"
2045 # Belt *and* braces to stop my trousers falling down:
2046 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
2047 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
2049 pic_flag="$lt_cv_prog_cc_pic"
2050 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
2051 wl="$lt_cv_prog_cc_wl"
2052 link_static_flag="$lt_cv_prog_cc_static"
2053 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
2054 can_build_shared="$lt_cv_prog_cc_can_build_shared"
2057 # Check to see if options -o and -c are simultaneously supported by compiler
2058 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
2059 AC_CACHE_VAL([lt_cv_compiler_c_o], [
2060 $rm -r conftest 2>/dev/null
2063 echo "int some_variable = 0;" > conftest.$ac_ext
2065 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
2066 # that will create temporary files in the current directory regardless of
2067 # the output directory. Thus, making CWD read-only will cause this test
2068 # to fail, enabling locking or at least warning the user not to do parallel
2071 save_CFLAGS="$CFLAGS"
2072 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
2074 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
2075 # The compiler can only warn and ignore the option if not recognized
2076 # So say no if there are warnings
2077 if test -s out/conftest.err; then
2078 lt_cv_compiler_c_o=no
2080 lt_cv_compiler_c_o=yes
2083 # Append any errors to the config.log.
2084 cat out/conftest.err 1>&AC_FD_CC
2085 lt_cv_compiler_c_o=no
2087 CFLAGS="$save_CFLAGS"
2093 $rm -r conftest 2>/dev/null
2095 compiler_c_o=$lt_cv_compiler_c_o
2096 AC_MSG_RESULT([$compiler_c_o])
2098 if test x"$compiler_c_o" = x"yes"; then
2099 # Check to see if we can write to a .lo
2100 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
2101 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
2102 lt_cv_compiler_o_lo=no
2103 save_CFLAGS="$CFLAGS"
2104 CFLAGS="$CFLAGS -c -o conftest.lo"
2105 save_objext="$ac_objext"
2107 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2108 # The compiler can only warn and ignore the option if not recognized
2109 # So say no if there are warnings
2110 if test -s conftest.err; then
2111 lt_cv_compiler_o_lo=no
2113 lt_cv_compiler_o_lo=yes
2116 ac_objext="$save_objext"
2117 CFLAGS="$save_CFLAGS"
2119 compiler_o_lo=$lt_cv_compiler_o_lo
2120 AC_MSG_RESULT([$compiler_o_lo])
2125 # Check to see if we can do hard links to lock some files if needed
2126 hard_links="nottested"
2127 if test "$compiler_c_o" = no && test "$need_locks" != no; then
2128 # do not overwrite the value of need_locks provided by the user
2129 AC_MSG_CHECKING([if we can lock with hard links])
2132 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2134 ln conftest.a conftest.b 2>&5 || hard_links=no
2135 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2136 AC_MSG_RESULT([$hard_links])
2137 if test "$hard_links" = no; then
2138 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
2145 if test "$GCC" = yes; then
2146 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
2147 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
2148 echo "int some_variable = 0;" > conftest.$ac_ext
2149 save_CFLAGS="$CFLAGS"
2150 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
2151 compiler_rtti_exceptions=no
2152 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
2153 # The compiler can only warn and ignore the option if not recognized
2154 # So say no if there are warnings
2155 if test -s conftest.err; then
2156 compiler_rtti_exceptions=no
2158 compiler_rtti_exceptions=yes
2161 CFLAGS="$save_CFLAGS"
2162 AC_MSG_RESULT([$compiler_rtti_exceptions])
2164 if test "$compiler_rtti_exceptions" = "yes"; then
2165 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
2167 no_builtin_flag=' -fno-builtin'
2171 # See if the linker supports building shared libraries.
2172 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2174 allow_undefined_flag=
2176 need_lib_prefix=unknown
2177 need_version=unknown
2178 # when you set need_version to no, make sure it does not cause -set_version
2179 # flags to be left without arguments
2181 archive_expsym_cmds=
2182 old_archive_from_new_cmds=
2183 old_archive_from_expsyms_cmds=
2184 export_dynamic_flag_spec=
2185 whole_archive_flag_spec=
2186 thread_safe_flag_spec=
2187 hardcode_into_libs=no
2188 hardcode_libdir_flag_spec=
2189 hardcode_libdir_separator=
2192 hardcode_shlibpath_var=unsupported
2194 link_all_deplibs=unknown
2195 always_export_symbols=no
2196 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2197 # include_expsyms should be a list of space-separated symbols to be *always*
2198 # included in the symbol list
2200 # exclude_expsyms can be an egrep regular expression of symbols to exclude
2201 # it will be wrapped by ` (' and `)$', so one must not match beginning or
2202 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2203 # as well as any symbol that contains `d'.
2204 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2205 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2206 # platforms (ab)use it in PIC code, but their linkers get confused if
2207 # the symbol is explicitly referenced. Since portable code cannot
2208 # rely on this symbol name, it's probably fine to never include it in
2209 # preloaded symbol tables.
2210 extract_expsyms_cmds=
2213 cygwin* | mingw* | pw32*)
2214 # FIXME: the MSVC++ port hasn't been tested in a loooong time
2215 # When not using gcc, we currently assume that we are using
2216 # Microsoft Visual C++.
2217 if test "$GCC" != yes; then
2227 if test "$with_gnu_ld" = yes; then
2228 # If archive_cmds runs LD, not CC, wlarc should be empty
2231 # See if GNU ld supports shared libraries.
2233 aix3* | aix4* | aix5*)
2234 # On AIX, the GNU linker is very broken
2235 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2239 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
2240 *** to be unable to reliably create shared libraries on AIX.
2241 *** Therefore, libtool is disabling shared libraries support. If you
2242 *** really care for shared libraries, you may want to modify your PATH
2243 *** so that a non-GNU linker is found, and then restart.
2249 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)'
2250 hardcode_libdir_flag_spec='-L$libdir'
2251 hardcode_minus_L=yes
2253 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2254 # that the semantics of dynamic libraries on AmigaOS, at least up
2255 # to version 4, is to share data among multiple programs linked
2256 # with the same dynamic library. Since this doesn't match the
2257 # behavior of shared libraries on other platforms, we can use
2263 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2264 allow_undefined_flag=unsupported
2265 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2266 # support --undefined. This deserves some investigation. FIXME
2267 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2273 cygwin* | mingw* | pw32*)
2274 # hardcode_libdir_flag_spec is actually meaningless, as there is
2275 # no search path for DLLs.
2276 hardcode_libdir_flag_spec='-L$libdir'
2277 allow_undefined_flag=unsupported
2278 always_export_symbols=yes
2280 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2281 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2282 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2283 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2284 else $CC -o impgen impgen.c ; fi)~
2285 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2287 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2289 # cygwin and mingw dlls have different entry points and sets of symbols
2291 # FIXME: what about values for MSVC?
2292 dll_entry=__cygwin_dll_entry@12
2293 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2297 dll_entry=_DllMainCRTStartup@12
2298 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2302 # mingw and cygwin differ, and it's simplest to just exclude the union
2303 # of the two symbol sets.
2304 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2306 # recent cygwin and mingw systems supply a stub DllMain which the user
2307 # can override, but on older systems we have to supply one (in ltdll.c)
2308 if test "x$lt_cv_need_dllmain" = "xyes"; then
2309 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2310 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~
2311 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2317 # Extract the symbol export list from an `--export-all' def file,
2318 # then regenerate the def file from the symbol export list, so that
2319 # the compiled dll only exports the symbol export list.
2320 # Be careful not to strip the DATA tag left be newer dlltools.
2321 export_symbols_cmds="$ltdll_cmds"'
2322 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2323 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2325 # If the export-symbols file already is a .def file (1st line
2326 # is EXPORTS), use it as is.
2327 # If DATA tags from a recent dlltool are present, honour them!
2328 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
2329 cp $export_symbols $output_objdir/$soname-def;
2331 echo EXPORTS > $output_objdir/$soname-def;
2333 cat $export_symbols | while read symbol; do
2336 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2337 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2339 _lt_hint=`expr 1 + \$_lt_hint`;
2343 $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~
2344 $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~
2345 $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~
2346 $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~
2347 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2351 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2352 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2355 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2356 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2361 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2365 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
2366 *** create shared libraries on Solaris systems. Therefore, libtool
2367 *** is disabling shared libraries support. We urge you to upgrade GNU
2368 *** binutils to release 2.9.1 or newer. Another option is to modify
2369 *** your PATH or compiler configuration so that the native linker is
2370 *** used, and then restart.
2373 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2374 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2375 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2382 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2385 hardcode_shlibpath_var=no
2389 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2390 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2391 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2398 if test "$ld_shlibs" = yes; then
2399 runpath_var=LD_RUN_PATH
2400 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2401 export_dynamic_flag_spec='${wl}--export-dynamic'
2403 cygwin* | mingw* | pw32*)
2404 # dlltool doesn't understand --whole-archive et. al.
2405 whole_archive_flag_spec=
2408 # ancient GNU ld didn't support --whole-archive et. al.
2409 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2410 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2412 whole_archive_flag_spec=
2418 # PORTME fill in a description of your system's linker (not GNU ld)
2421 allow_undefined_flag=unsupported
2422 always_export_symbols=yes
2423 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'
2424 # Note: this linker hardcodes the directories in LIBPATH if there
2425 # are no directories specified by -L.
2426 hardcode_minus_L=yes
2427 if test "$GCC" = yes && test -z "$link_static_flag"; then
2428 # Neither direct hardcoding nor static linking is supported with a
2430 hardcode_direct=unsupported
2435 if test "$host_cpu" = ia64; then
2436 # On IA64, the linker does run time linking by default, so we don't
2437 # have to do anything special.
2438 aix_use_runtimelinking=no
2439 exp_sym_flag='-Bexport'
2442 aix_use_runtimelinking=no
2444 # Test if we are trying to use run time linking or normal
2445 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2446 # need to do runtime linking.
2447 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2448 for ld_flag in $LDFLAGS; do
2449 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
2450 aix_use_runtimelinking=yes
2456 exp_sym_flag='-bexport'
2457 no_entry_flag='-bnoentry'
2460 # When large executables or shared objects are built, AIX ld can
2461 # have problems creating the table of contents. If linking a library
2462 # or program results in "error TOC overflow" add -mminimal-toc to
2463 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2464 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2468 hardcode_libdir_separator=':'
2469 if test "$GCC" = yes; then
2470 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2471 collect2name=`${CC} -print-prog-name=collect2`
2472 if test -f "$collect2name" && \
2473 strings "$collect2name" | grep resolve_lib_name >/dev/null
2475 # We have reworked collect2
2478 # We have old collect2
2479 hardcode_direct=unsupported
2480 # It fails to find uninstalled libraries when the uninstalled
2481 # path is not listed in the libpath. Setting hardcode_minus_L
2482 # to unsupported forces relinking
2483 hardcode_minus_L=yes
2484 hardcode_libdir_flag_spec='-L$libdir'
2485 hardcode_libdir_separator=
2489 shared_flag='-shared'
2492 if test "$host_cpu" = ia64; then
2493 shared_flag='${wl}-G'
2495 if test "$aix_use_runtimelinking" = yes; then
2496 shared_flag='${wl}-G'
2498 shared_flag='${wl}-bM:SRE'
2503 # It seems that -bexpall can do strange things, so it is better to
2504 # generate a list of symbols to export.
2505 always_export_symbols=yes
2506 if test "$aix_use_runtimelinking" = yes; then
2507 # Warning - without using the other runtime loading flags (-brtl),
2508 # -berok will link without error, but may produce a broken library.
2509 allow_undefined_flag='-berok'
2510 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2511 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"
2513 if test "$host_cpu" = ia64; then
2514 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2515 allow_undefined_flag="-z nodefs"
2516 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"
2518 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2519 # Warning - without using the other run time loading flags,
2520 # -berok will link without error, but may produce a broken library.
2521 allow_undefined_flag='${wl}-berok'
2522 # This is a bit strange, but is similar to how AIX traditionally builds
2523 # it's shared libraries.
2524 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'
2530 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)'
2531 hardcode_libdir_flag_spec='-L$libdir'
2532 hardcode_minus_L=yes
2533 # see comment about different semantics on the GNU ld section
2537 cygwin* | mingw* | pw32*)
2538 # When not using gcc, we currently assume that we are using
2539 # Microsoft Visual C++.
2540 # hardcode_libdir_flag_spec is actually meaningless, as there is
2541 # no search path for DLLs.
2542 hardcode_libdir_flag_spec=' '
2543 allow_undefined_flag=unsupported
2544 # Tell ltmain to make .lib files, not .a files.
2546 # FIXME: Setting linknames here is a bad hack.
2547 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2548 # The linker will automatically build a .lib file if we build a DLL.
2549 old_archive_from_new_cmds='true'
2550 # FIXME: Should let the user specify the lib program.
2551 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2552 fix_srcfile_path='`cygpath -w "$srcfile"`'
2555 darwin* | rhapsody*)
2557 rhapsody* | darwin1.[[012]])
2558 allow_undefined_flag='-undefined suppress'
2561 allow_undefined_flag='-flat_namespace -undefined suppress'
2564 # FIXME: Relying on posixy $() will cause problems for
2565 # cross-compilation, but unfortunately the echo tests do not
2566 # yet detect zsh echo's removal of \ escapes.
2567 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'
2568 # We need to add '_' to the symbols in $export_symbols first
2569 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2571 hardcode_shlibpath_var=no
2572 whole_archive_flag_spec='-all_load $convenience'
2579 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2580 # support. Future versions do this automatically, but an explicit c++rt0.o
2581 # does not break anything, and helps significantly (at the cost of a little
2584 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2585 hardcode_libdir_flag_spec='-R$libdir'
2587 hardcode_shlibpath_var=no
2590 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2592 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2594 hardcode_minus_L=yes
2595 hardcode_shlibpath_var=no
2598 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2600 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2601 hardcode_libdir_flag_spec='-R$libdir'
2603 hardcode_shlibpath_var=no
2606 hpux9* | hpux10* | hpux11*)
2608 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' ;;
2609 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2611 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2612 hardcode_libdir_separator=:
2614 hardcode_minus_L=yes # Not in the search PATH, but as the default
2615 # location of the library.
2616 export_dynamic_flag_spec='${wl}-E'
2620 if test "$GCC" = yes; then
2621 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'
2623 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'
2625 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2626 hardcode_libdir_separator=:
2627 link_all_deplibs=yes
2631 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2632 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2634 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2636 hardcode_libdir_flag_spec='-R$libdir'
2638 hardcode_shlibpath_var=no
2642 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2644 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2645 hardcode_libdir_separator=:
2646 hardcode_shlibpath_var=no
2651 hardcode_shlibpath_var=no
2652 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2653 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2654 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2655 export_dynamic_flag_spec='${wl}-E'
2658 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2659 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2660 hardcode_libdir_flag_spec='-R$libdir'
2663 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2664 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2671 hardcode_libdir_flag_spec='-L$libdir'
2672 hardcode_minus_L=yes
2673 allow_undefined_flag=unsupported
2674 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'
2675 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2679 if test "$GCC" = yes; then
2680 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2681 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'
2683 allow_undefined_flag=' -expect_unresolved \*'
2684 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'
2686 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2687 hardcode_libdir_separator=:
2690 osf4* | osf5*) # as osf3* with the addition of -msym flag
2691 if test "$GCC" = yes; then
2692 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2693 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'
2694 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2696 allow_undefined_flag=' -expect_unresolved \*'
2697 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'
2698 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2699 $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'
2701 #Both c and cxx compiler support -rpath directly
2702 hardcode_libdir_flag_spec='-rpath $libdir'
2704 hardcode_libdir_separator=:
2708 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2709 hardcode_shlibpath_var=no
2710 runpath_var=LD_RUN_PATH
2711 hardcode_runpath_var=yes
2712 export_dynamic_flag_spec='${wl}-Bexport'
2716 # gcc --version < 3.0 without binutils cannot create self contained
2717 # shared libraries reliably, requiring libgcc.a to resolve some of
2718 # the object symbols generated in some cases. Libraries that use
2719 # assert need libgcc.a to resolve __eprintf, for example. Linking
2720 # a copy of libgcc.a into every shared library to guarantee resolving
2721 # such symbols causes other problems: According to Tim Van Holder
2722 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2723 # (to the application) exception stack for one thing.
2724 no_undefined_flag=' -z defs'
2725 if test "$GCC" = yes; then
2726 case `$CC --version 2>/dev/null` in
2730 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2731 *** create self contained shared libraries on Solaris systems, without
2732 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2733 *** -no-undefined support, which will at least allow you to build shared
2734 *** libraries. However, you may find that when you link such libraries
2735 *** into an application without using GCC, you have to manually add
2736 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2737 *** upgrade to a newer version of GCC. Another option is to rebuild your
2738 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2745 # $CC -shared without GNU ld will not create a library from C++
2746 # object files and a static libstdc++, better avoid it by now
2747 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2748 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2749 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2750 hardcode_libdir_flag_spec='-R$libdir'
2751 hardcode_shlibpath_var=no
2753 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2754 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2755 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2757 link_all_deplibs=yes
2761 if test "x$host_vendor" = xsequent; then
2762 # Use $CC to link under sequent, because it throws in some extra .o
2763 # files that make .init and .fini sections work.
2764 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2766 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2768 hardcode_libdir_flag_spec='-L$libdir'
2770 hardcode_minus_L=yes
2771 hardcode_shlibpath_var=no
2775 if test "x$host_vendor" = xsno; then
2776 archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2777 hardcode_direct=yes # is this really true???
2779 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2780 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2782 runpath_var='LD_RUN_PATH'
2783 hardcode_shlibpath_var=no
2787 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2788 hardcode_shlibpath_var=no
2789 export_dynamic_flag_spec='-Bexport'
2793 no_undefined_flag=' -z text'
2794 # $CC -shared without GNU ld will not create a library from C++
2795 # object files and a static libstdc++, better avoid it by now
2796 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2797 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2798 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2799 hardcode_libdir_flag_spec=
2800 hardcode_shlibpath_var=no
2801 runpath_var='LD_RUN_PATH'
2805 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2806 hardcode_libdir_flag_spec='-L$libdir'
2807 hardcode_shlibpath_var=no
2811 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2812 hardcode_libdir_flag_spec='-L$libdir'
2813 hardcode_shlibpath_var=no
2817 if test -d /usr/nec; then
2818 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2819 hardcode_shlibpath_var=no
2820 runpath_var=LD_RUN_PATH
2821 hardcode_runpath_var=yes
2827 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2830 hardcode_shlibpath_var=no
2831 hardcode_runpath_var=yes
2832 runpath_var=LD_RUN_PATH
2835 sysv5uw7* | unixware7*)
2836 no_undefined_flag='${wl}-z ${wl}text'
2837 if test "$GCC" = yes; then
2838 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2840 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2842 runpath_var='LD_RUN_PATH'
2843 hardcode_shlibpath_var=no
2851 AC_MSG_RESULT([$ld_shlibs])
2852 test "$ld_shlibs" = no && can_build_shared=no
2854 # Check hardcoding attributes.
2855 AC_MSG_CHECKING([how to hardcode library paths into programs])
2857 if test -n "$hardcode_libdir_flag_spec" || \
2858 test -n "$runpath_var"; then
2860 # We can hardcode non-existant directories.
2861 if test "$hardcode_direct" != no &&
2862 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2863 # have to relink, otherwise we might link with an installed library
2864 # when we should be linking with a yet-to-be-installed one
2865 ## test "$hardcode_shlibpath_var" != no &&
2866 test "$hardcode_minus_L" != no; then
2867 # Linking always hardcodes the temporary library directory.
2868 hardcode_action=relink
2870 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2871 hardcode_action=immediate
2874 # We cannot hardcode anything, or else we can only hardcode existing
2876 hardcode_action=unsupported
2878 AC_MSG_RESULT([$hardcode_action])
2882 AC_MSG_CHECKING([whether stripping libraries is possible])
2883 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2884 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2885 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2886 AC_MSG_RESULT([yes])
2891 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2892 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2894 # PORTME Fill in your ld.so characteristics
2895 AC_MSG_CHECKING([dynamic linker characteristics])
2897 libname_spec='lib$name'
2904 shlibpath_overrides_runpath=unknown
2906 dynamic_linker="$host_os ld.so"
2907 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2908 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2913 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2914 shlibpath_var=LIBPATH
2916 # AIX has no versioning support, so we append a major version to the name.
2917 soname_spec='${libname}${release}.so$major'
2922 if test "$host_cpu" = ia64; then
2923 # AIX 5 supports IA64
2924 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2925 shlibpath_var=LD_LIBRARY_PATH
2927 # With GCC up to 2.95.x, collect2 would create an import file
2928 # for dependence libraries. The import file would start with
2929 # the line `#! .'. This would cause the generated library to
2930 # depend on `.', always an invalid library. This was fixed in
2931 # development snapshots of GCC prior to 3.0.
2933 aix4 | aix4.[[01]] | aix4.[[01]].*)
2934 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2936 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2943 # AIX (on Power*) has no versioning support, so currently we can
2944 # not hardcode correct soname into executable. Probably we can
2945 # add versioning support to collect2, so additional links can
2946 # be useful in future.
2947 if test "$aix_use_runtimelinking" = yes; then
2948 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2949 # instead of lib<name>.a to let people know that these are not
2950 # typical AIX shared libraries.
2951 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2953 # We preserve .a as extension for shared libraries through AIX4.2
2954 # and later when we are not doing run time linking.
2955 library_names_spec='${libname}${release}.a $libname.a'
2956 soname_spec='${libname}${release}.so$major'
2958 shlibpath_var=LIBPATH
2963 library_names_spec='$libname.ixlibrary $libname.a'
2964 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2965 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'
2969 library_names_spec='${libname}.so'
2970 dynamic_linker="$host_os ld.so"
2971 shlibpath_var=LIBRARY_PATH
2977 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2978 soname_spec='${libname}${release}.so$major'
2979 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2980 shlibpath_var=LD_LIBRARY_PATH
2981 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2982 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2983 export_dynamic_flag_spec=-rdynamic
2984 # the default ld.so.conf also contains /usr/contrib/lib and
2985 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2986 # libtool to hard-code these into programs
2989 cygwin* | mingw* | pw32*)
2990 version_type=windows
2993 case $GCC,$host_os in
2995 library_names_spec='$libname.dll.a'
2996 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2997 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2998 dldir=$destdir/`dirname \$dlpath`~
2999 test -d \$dldir || mkdir -p \$dldir~
3000 $install_prog .libs/$dlname \$dldir/$dlname'
3001 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
3002 dlpath=$dir/\$dldll~
3006 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
3007 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
3010 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
3013 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
3016 dynamic_linker='Win32 ld.exe'
3017 # FIXME: first we should search . and the directory the executable is in
3021 darwin* | rhapsody*)
3022 dynamic_linker="$host_os dyld"
3026 # FIXME: Relying on posixy $() will cause problems for
3027 # cross-compilation, but unfortunately the echo tests do not
3028 # yet detect zsh echo's removal of \ escapes.
3029 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)'
3030 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
3031 shlibpath_overrides_runpath=yes
3032 shlibpath_var=DYLD_LIBRARY_PATH
3040 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
3041 version_type=freebsd-$objformat
3042 case $version_type in
3044 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
3049 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
3053 shlibpath_var=LD_LIBRARY_PATH
3056 shlibpath_overrides_runpath=yes
3059 shlibpath_overrides_runpath=no
3060 hardcode_into_libs=yes
3069 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
3070 soname_spec='${libname}${release}.so$major'
3071 shlibpath_var=LD_LIBRARY_PATH
3072 hardcode_into_libs=yes
3075 hpux9* | hpux10* | hpux11*)
3076 # Give a soname corresponding to the major version so that dld.sl refuses to
3077 # link against other versions.
3078 dynamic_linker="$host_os dld.sl"
3082 shlibpath_var=SHLIB_PATH
3083 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3084 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
3085 soname_spec='${libname}${release}.sl$major'
3086 # HP-UX runs *really* slowly unless shared libraries are mode 555.
3087 postinstall_cmds='chmod 555 $lib'
3094 soname_spec='${libname}${release}.so$major'
3095 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
3101 case $LD in # libtool.m4 will add one of these switches to LD
3102 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
3103 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
3104 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
3105 *) libsuff= shlibsuff= libmagic=never-match;;
3109 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3110 shlibpath_overrides_runpath=no
3111 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3112 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3115 # No shared lib support for Linux oldld, aout, or coff.
3116 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
3120 # This must be Linux ELF.
3125 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3126 soname_spec='${libname}${release}.so$major'
3127 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3128 shlibpath_var=LD_LIBRARY_PATH
3129 shlibpath_overrides_runpath=no
3130 # This implies no fast_install, which is unacceptable.
3131 # Some rework will be needed to allow for fast_install
3132 # before this can be enabled.
3133 hardcode_into_libs=yes
3135 # We used to test for /lib/ld.so.1 and disable shared libraries on
3136 # powerpc, because MkLinux only supported shared libraries with the
3137 # GNU dynamic linker. Since this was broken with cross compilers,
3138 # most powerpc-linux boxes support dynamic linking these days and
3139 # people can always --disable-shared, the test was removed, and we
3140 # assume the GNU/Linux dynamic linker is in use.
3141 dynamic_linker='GNU/Linux ld.so'
3148 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3149 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3150 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3151 dynamic_linker='NetBSD (a.out) ld.so'
3153 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
3154 soname_spec='${libname}${release}.so$major'
3155 dynamic_linker='NetBSD ld.elf_so'
3157 shlibpath_var=LD_LIBRARY_PATH
3158 shlibpath_overrides_runpath=yes
3159 hardcode_into_libs=yes
3164 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3165 shlibpath_var=LD_LIBRARY_PATH
3166 shlibpath_overrides_runpath=yes
3173 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3175 openbsd2.[[89]] | openbsd2.[[89]].*)
3176 shlibpath_overrides_runpath=no
3179 shlibpath_overrides_runpath=yes
3183 shlibpath_overrides_runpath=yes
3185 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3186 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3187 shlibpath_var=LD_LIBRARY_PATH
3191 libname_spec='$name'
3193 library_names_spec='$libname.dll $libname.a'
3194 dynamic_linker='OS/2 ld.exe'
3195 shlibpath_var=LIBPATH
3198 osf3* | osf4* | osf5*)
3201 soname_spec='${libname}${release}.so'
3202 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
3203 shlibpath_var=LD_LIBRARY_PATH
3204 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3205 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3210 soname_spec='${libname}${release}.so$major'
3211 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3212 shlibpath_var=LD_LIBRARY_PATH
3219 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3220 soname_spec='${libname}${release}.so$major'
3221 shlibpath_var=LD_LIBRARY_PATH
3222 shlibpath_overrides_runpath=yes
3223 hardcode_into_libs=yes
3224 # ldd complains unless libraries are executable
3225 postinstall_cmds='chmod +x $lib'
3230 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3231 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3232 shlibpath_var=LD_LIBRARY_PATH
3233 shlibpath_overrides_runpath=yes
3234 if test "$with_gnu_ld" = yes; then
3240 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
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 case $host_vendor in
3247 shlibpath_overrides_runpath=no
3252 shlibpath_overrides_runpath=no
3253 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3260 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3261 soname_spec='${libname}${release}.so$major'
3262 shlibpath_var=LD_LIBRARY_PATH
3269 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3270 soname_spec='${libname}${release}.so$major'
3271 shlibpath_var=LD_LIBRARY_PATH
3275 if test -d /usr/nec ;then
3277 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3278 soname_spec='$libname.so.$major'
3279 shlibpath_var=LD_LIBRARY_PATH
3287 AC_MSG_RESULT([$dynamic_linker])
3288 test "$dynamic_linker" = no && can_build_shared=no
3290 # Report the final consequences.
3291 AC_MSG_CHECKING([if libtool supports shared libraries])
3292 AC_MSG_RESULT([$can_build_shared])
3294 AC_MSG_CHECKING([whether to build shared libraries])
3295 test "$can_build_shared" = "no" && enable_shared=no
3297 # On AIX, shared libraries and static libraries use the same namespace, and
3298 # are all built from PIC.
3301 test "$enable_shared" = yes && enable_static=no
3302 if test -n "$RANLIB"; then
3303 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3304 postinstall_cmds='$RANLIB $lib'
3309 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3310 test "$enable_shared" = yes && enable_static=no
3314 AC_MSG_RESULT([$enable_shared])
3316 AC_MSG_CHECKING([whether to build static libraries])
3317 # Make sure either enable_shared or enable_static is yes.
3318 test "$enable_shared" = yes || enable_static=yes
3319 AC_MSG_RESULT([$enable_static])
3321 if test "$hardcode_action" = relink; then
3322 # Fast installation is not supported
3323 enable_fast_install=no
3324 elif test "$shlibpath_overrides_runpath" = yes ||
3325 test "$enable_shared" = no; then
3326 # Fast installation is not necessary
3327 enable_fast_install=needless
3330 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3331 if test "$GCC" = yes; then
3332 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3335 AC_LIBTOOL_DLOPEN_SELF
3337 if test "$enable_shared" = yes && test "$GCC" = yes; then
3338 case $archive_cmds in
3340 # FIXME: we may have to deal with multi-command sequences.
3343 # Test whether the compiler implicitly links with -lc since on some
3344 # systems, -lgcc has to come before -lc. If gcc already passes -lc
3345 # to ld, don't add -lc before -lgcc.
3346 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3347 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3349 echo 'static int dummy;' > conftest.$ac_ext
3351 if AC_TRY_EVAL(ac_compile); then
3354 libobjs=conftest.$ac_objext
3356 wl=$lt_cv_prog_cc_wl
3362 save_allow_undefined_flag=$allow_undefined_flag
3363 allow_undefined_flag=
3364 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3366 lt_cv_archive_cmds_need_lc=no
3368 lt_cv_archive_cmds_need_lc=yes
3370 allow_undefined_flag=$save_allow_undefined_flag
3372 cat conftest.err 1>&5
3374 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3378 need_lc=${lt_cv_archive_cmds_need_lc-yes}
3380 # The second clause should only fire when bootstrapping the
3381 # libtool distribution, otherwise you forgot to ship ltmain.sh
3382 # with your package, and you will get complaints that there are
3383 # no rules to generate ltmain.sh.
3384 if test -f "$ltmain"; then
3387 # If there is no Makefile yet, we rely on a make rule to execute
3388 # `config.status --recheck' to rerun these tests and create the
3389 # libtool script then.
3390 test -f Makefile && make "$ltmain"
3393 if test -f "$ltmain"; then
3394 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3397 echo creating $ofile
3399 # Now quote all the things that may contain metacharacters while being
3400 # careful not to overquote the AC_SUBSTed values. We take copies of the
3401 # variables and quote the copies for generation of the libtool script.
3402 for var in echo old_CC old_CFLAGS \
3403 AR AR_FLAGS CC LD LN_S NM SHELL \
3404 reload_flag reload_cmds wl \
3405 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3406 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3407 library_names_spec soname_spec \
3408 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3409 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3410 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3411 old_striplib striplib file_magic_cmd export_symbols_cmds \
3412 deplibs_check_method allow_undefined_flag no_undefined_flag \
3413 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3414 global_symbol_to_c_name_address \
3415 hardcode_libdir_flag_spec hardcode_libdir_separator \
3416 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3417 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3420 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3421 old_postinstall_cmds | old_postuninstall_cmds | \
3422 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3423 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3424 postinstall_cmds | postuninstall_cmds | \
3425 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3426 # Double-quote double-evaled strings.
3427 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3430 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3435 cat <<__EOF__ > "${ofile}T"
3438 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3439 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3440 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3442 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
3443 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3445 # This program is free software; you can redistribute it and/or modify
3446 # it under the terms of the GNU General Public License as published by
3447 # the Free Software Foundation; either version 2 of the License, or
3448 # (at your option) any later version.
3450 # This program is distributed in the hope that it will be useful, but
3451 # WITHOUT ANY WARRANTY; without even the implied warranty of
3452 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3453 # General Public License for more details.
3455 # You should have received a copy of the GNU General Public License
3456 # along with this program; if not, write to the Free Software
3457 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3459 # As a special exception to the GNU General Public License, if you
3460 # distribute this file as part of a program that contains a
3461 # configuration script generated by Autoconf, you may include it under
3462 # the same distribution terms that you use for the rest of that program.
3464 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
3465 Xsed="sed -e s/^X//"
3467 # The HP-UX ksh and POSIX shell print the target directory to stdout
3469 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3471 # ### BEGIN LIBTOOL CONFIG
3473 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3475 # Shell to use when invoking shell scripts.
3478 # Whether or not to build shared libraries.
3479 build_libtool_libs=$enable_shared
3481 # Whether or not to build static libraries.
3482 build_old_libs=$enable_static
3484 # Whether or not to add -lc for building shared libraries.
3485 build_libtool_need_lc=$need_lc
3487 # Whether or not to optimize for fast installation.
3488 fast_install=$enable_fast_install
3491 host_alias=$host_alias
3494 # An echo program that does not interpret backslashes.
3499 AR_FLAGS=$lt_AR_FLAGS
3501 # The default C compiler.
3504 # Is the compiler the GNU C compiler?
3507 # The linker used to build libraries.
3510 # Whether we need hard or soft links.
3513 # A BSD-compatible nm program.
3516 # A symbol stripping program
3519 # Used to examine libraries when file_magic_cmd begins "file"
3520 MAGIC_CMD=$MAGIC_CMD
3522 # Used on cygwin: DLL creation program.
3525 # Used on cygwin: object dumper.
3528 # Used on cygwin: assembler.
3531 # The name of the directory that contains temporary libtool files.
3534 # How to create reloadable object files.
3535 reload_flag=$lt_reload_flag
3536 reload_cmds=$lt_reload_cmds
3538 # How to pass a linker flag through the compiler.
3541 # Object file suffix (normally "o").
3544 # Old archive suffix (normally "a").
3547 # Executable file suffix (normally "").
3550 # Additional compiler flags for building library objects.
3551 pic_flag=$lt_pic_flag
3554 # Does compiler simultaneously support -c and -o options?
3555 compiler_c_o=$lt_compiler_c_o
3557 # Can we write directly to a .lo ?
3558 compiler_o_lo=$lt_compiler_o_lo
3560 # Must we lock files when doing compilation ?
3561 need_locks=$lt_need_locks
3563 # Do we need the lib prefix for modules?
3564 need_lib_prefix=$need_lib_prefix
3566 # Do we need a version for libraries?
3567 need_version=$need_version
3569 # Whether dlopen is supported.
3570 dlopen_support=$enable_dlopen
3572 # Whether dlopen of programs is supported.
3573 dlopen_self=$enable_dlopen_self
3575 # Whether dlopen of statically linked programs is supported.
3576 dlopen_self_static=$enable_dlopen_self_static
3578 # Compiler flag to prevent dynamic linking.
3579 link_static_flag=$lt_link_static_flag
3581 # Compiler flag to turn off builtin functions.
3582 no_builtin_flag=$lt_no_builtin_flag
3584 # Compiler flag to allow reflexive dlopens.
3585 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3587 # Compiler flag to generate shared objects directly from archives.
3588 whole_archive_flag_spec=$lt_whole_archive_flag_spec
3590 # Compiler flag to generate thread-safe objects.
3591 thread_safe_flag_spec=$lt_thread_safe_flag_spec
3593 # Library versioning type.
3594 version_type=$version_type
3596 # Format of library name prefix.
3597 libname_spec=$lt_libname_spec
3599 # List of archive names. First name is the real one, the rest are links.
3600 # The last name is the one that the linker finds with -lNAME.
3601 library_names_spec=$lt_library_names_spec
3603 # The coded name of the library, if different from the real name.
3604 soname_spec=$lt_soname_spec
3606 # Commands used to build and install an old-style archive.
3608 old_archive_cmds=$lt_old_archive_cmds
3609 old_postinstall_cmds=$lt_old_postinstall_cmds
3610 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3612 # Create an old-style archive from a shared archive.
3613 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3615 # Create a temporary old-style archive to link instead of a shared archive.
3616 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3618 # Commands used to build and install a shared archive.
3619 archive_cmds=$lt_archive_cmds
3620 archive_expsym_cmds=$lt_archive_expsym_cmds
3621 postinstall_cmds=$lt_postinstall_cmds
3622 postuninstall_cmds=$lt_postuninstall_cmds
3624 # Commands to strip libraries.
3625 old_striplib=$lt_old_striplib
3626 striplib=$lt_striplib
3628 # Method to check whether dependent libraries are shared objects.
3629 deplibs_check_method=$lt_deplibs_check_method
3631 # Command to use when deplibs_check_method == file_magic.
3632 file_magic_cmd=$lt_file_magic_cmd
3634 # Flag that allows shared libraries with undefined symbols to be built.
3635 allow_undefined_flag=$lt_allow_undefined_flag
3637 # Flag that forces no undefined symbols.
3638 no_undefined_flag=$lt_no_undefined_flag
3640 # Commands used to finish a libtool library installation in a directory.
3641 finish_cmds=$lt_finish_cmds
3643 # Same as above, but a single script fragment to be evaled but not shown.
3644 finish_eval=$lt_finish_eval
3646 # Take the output of nm and produce a listing of raw symbols and C names.
3647 global_symbol_pipe=$lt_global_symbol_pipe
3649 # Transform the output of nm in a proper C declaration
3650 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3652 # Transform the output of nm in a C name address pair
3653 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3655 # This is the shared library runtime path variable.
3656 runpath_var=$runpath_var
3658 # This is the shared library path variable.
3659 shlibpath_var=$shlibpath_var
3661 # Is shlibpath searched before the hard-coded library search path?
3662 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3664 # How to hardcode a shared library path into an executable.
3665 hardcode_action=$hardcode_action
3667 # Whether we should hardcode library paths into libraries.
3668 hardcode_into_libs=$hardcode_into_libs
3670 # Flag to hardcode \$libdir into a binary during linking.
3671 # This must work even if \$libdir does not exist.
3672 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3674 # Whether we need a single -rpath flag with a separated argument.
3675 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3677 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3679 hardcode_direct=$hardcode_direct
3681 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3683 hardcode_minus_L=$hardcode_minus_L
3685 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3686 # the resulting binary.
3687 hardcode_shlibpath_var=$hardcode_shlibpath_var
3689 # Variables whose values should be saved in libtool wrapper scripts and
3690 # restored at relink time.
3691 variables_saved_for_relink="$variables_saved_for_relink"
3693 # Whether libtool must link a program against all its dependency libraries.
3694 link_all_deplibs=$link_all_deplibs
3696 # Compile-time system search path for libraries
3697 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3699 # Run-time system search path for libraries
3700 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3702 # Fix the shell variable \$srcfile for the compiler.
3703 fix_srcfile_path="$fix_srcfile_path"
3705 # Set to yes if exported symbols are required.
3706 always_export_symbols=$always_export_symbols
3708 # The commands to list exported symbols.
3709 export_symbols_cmds=$lt_export_symbols_cmds
3711 # The commands to extract the exported symbol list from a shared archive.
3712 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3714 # Symbols that should not be listed in the preloaded symbols.
3715 exclude_expsyms=$lt_exclude_expsyms
3717 # Symbols that must always be exported.
3718 include_expsyms=$lt_include_expsyms
3720 # ### END LIBTOOL CONFIG
3726 cat <<\EOF >> "${ofile}T"
3728 # AIX sometimes has problems with the GCC collect2 program. For some
3729 # reason, if we set the COLLECT_NAMES environment variable, the problems
3730 # vanish in a puff of smoke.
3731 if test "X${COLLECT_NAMES+set}" != Xset; then
3733 export COLLECT_NAMES
3740 cygwin* | mingw* | pw32* | os2*)
3741 cat <<'EOF' >> "${ofile}T"
3742 # This is a source program that is used to create dlls on Windows
3743 # Don't remove nor modify the starting and closing comments
3744 # /* ltdll.c starts here */
3745 # #define WIN32_LEAN_AND_MEAN
3746 # #include <windows.h>
3747 # #undef WIN32_LEAN_AND_MEAN
3748 # #include <stdio.h>
3750 # #ifndef __CYGWIN__
3751 # # ifdef __CYGWIN32__
3752 # # define __CYGWIN__ __CYGWIN32__
3756 # #ifdef __cplusplus
3759 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3760 # #ifdef __cplusplus
3765 # #include <cygwin/cygwin_dll.h>
3766 # DECLARE_CYGWIN_DLL( DllMain );
3768 # HINSTANCE __hDllInstance_base;
3771 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3773 # __hDllInstance_base = hInst;
3776 # /* ltdll.c ends here */
3777 # This is a source program that is used to create import libraries
3778 # on Windows for dlls which lack them. Don't remove nor modify the
3779 # starting and closing comments
3780 # /* impgen.c starts here */
3781 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3783 # This file is part of GNU libtool.
3785 # This program is free software; you can redistribute it and/or modify
3786 # it under the terms of the GNU General Public License as published by
3787 # the Free Software Foundation; either version 2 of the License, or
3788 # (at your option) any later version.
3790 # This program is distributed in the hope that it will be useful,
3791 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3792 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3793 # GNU General Public License for more details.
3795 # You should have received a copy of the GNU General Public License
3796 # along with this program; if not, write to the Free Software
3797 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3800 # #include <stdio.h> /* for printf() */
3801 # #include <unistd.h> /* for open(), lseek(), read() */
3802 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3803 # #include <string.h> /* for strdup() */
3805 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3807 # #define O_BINARY 0
3810 # static unsigned int
3811 # pe_get16 (fd, offset)
3815 # unsigned char b[2];
3816 # lseek (fd, offset, SEEK_SET);
3818 # return b[0] + (b[1]<<8);
3821 # static unsigned int
3822 # pe_get32 (fd, offset)
3826 # unsigned char b[4];
3827 # lseek (fd, offset, SEEK_SET);
3829 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3832 # static unsigned int
3836 # unsigned char *b = ptr;
3837 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3846 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3847 # unsigned long export_rva, export_size, nsections, secptr, expptr;
3848 # unsigned long name_rvas, nexp;
3849 # unsigned char *expdata, *erva;
3850 # char *filename, *dll_name;
3852 # filename = argv[1];
3854 # dll = open(filename, O_RDONLY|O_BINARY);
3858 # dll_name = filename;
3860 # for (i=0; filename[i]; i++)
3861 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3862 # dll_name = filename + i +1;
3864 # pe_header_offset = pe_get32 (dll, 0x3c);
3865 # opthdr_ofs = pe_header_offset + 4 + 20;
3866 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3868 # if (num_entries < 1) /* no exports */
3871 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3872 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3873 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3874 # secptr = (pe_header_offset + 4 + 20 +
3875 # pe_get16 (dll, pe_header_offset + 4 + 16));
3878 # for (i = 0; i < nsections; i++)
3881 # unsigned long secptr1 = secptr + 40 * i;
3882 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3883 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3884 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3885 # lseek(dll, secptr1, SEEK_SET);
3886 # read(dll, sname, 8);
3887 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3889 # expptr = fptr + (export_rva - vaddr);
3890 # if (export_rva + export_size > vaddr + vsize)
3891 # export_size = vsize - (export_rva - vaddr);
3896 # expdata = (unsigned char*)malloc(export_size);
3897 # lseek (dll, expptr, SEEK_SET);
3898 # read (dll, expdata, export_size);
3899 # erva = expdata - export_rva;
3901 # nexp = pe_as32 (expdata+24);
3902 # name_rvas = pe_as32 (expdata+32);
3904 # printf ("EXPORTS\n");
3905 # for (i = 0; i<nexp; i++)
3907 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3908 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3913 # /* impgen.c ends here */
3919 # We use sed instead of cat because bash on DJGPP gets confused if
3920 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3921 # text mode, it properly converts lines to CR/LF. This bash problem
3922 # is reportedly fixed, but why not run on old versions too?
3923 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3925 mv -f "${ofile}T" "$ofile" || \
3926 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3930 ])# _LT_AC_LTCONFIG_HACK
3932 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3933 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3935 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3936 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3938 # AC_ENABLE_SHARED - implement the --enable-shared flag
3939 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3940 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3942 AC_DEFUN([AC_ENABLE_SHARED],
3943 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3944 AC_ARG_ENABLE(shared,
3945 changequote(<<, >>)dnl
3946 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3947 changequote([, ])dnl
3948 [p=${PACKAGE-default}
3950 yes) enable_shared=yes ;;
3951 no) enable_shared=no ;;
3954 # Look at the argument we got. We use all the common list separators.
3955 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3956 for pkg in $enableval; do
3957 if test "X$pkg" = "X$p"; then
3964 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3967 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3968 AC_DEFUN([AC_DISABLE_SHARED],
3969 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3970 AC_ENABLE_SHARED(no)])
3972 # AC_ENABLE_STATIC - implement the --enable-static flag
3973 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3974 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3976 AC_DEFUN([AC_ENABLE_STATIC],
3977 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3978 AC_ARG_ENABLE(static,
3979 changequote(<<, >>)dnl
3980 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3981 changequote([, ])dnl
3982 [p=${PACKAGE-default}
3984 yes) enable_static=yes ;;
3985 no) enable_static=no ;;
3988 # Look at the argument we got. We use all the common list separators.
3989 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3990 for pkg in $enableval; do
3991 if test "X$pkg" = "X$p"; then
3998 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
4001 # AC_DISABLE_STATIC - set the default static flag to --disable-static
4002 AC_DEFUN([AC_DISABLE_STATIC],
4003 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4004 AC_ENABLE_STATIC(no)])
4007 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
4008 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
4009 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
4011 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
4012 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
4013 AC_ARG_ENABLE(fast-install,
4014 changequote(<<, >>)dnl
4015 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
4016 changequote([, ])dnl
4017 [p=${PACKAGE-default}
4019 yes) enable_fast_install=yes ;;
4020 no) enable_fast_install=no ;;
4022 enable_fast_install=no
4023 # Look at the argument we got. We use all the common list separators.
4024 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
4025 for pkg in $enableval; do
4026 if test "X$pkg" = "X$p"; then
4027 enable_fast_install=yes
4033 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
4036 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
4037 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
4038 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4039 AC_ENABLE_FAST_INSTALL(no)])
4041 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
4042 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
4043 # Where MODE is either `yes' or `no'. If omitted, it defaults to
4045 AC_DEFUN([AC_LIBTOOL_PICMODE],
4046 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4047 pic_mode=ifelse($#,1,$1,default)])
4050 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
4051 AC_DEFUN([AC_PATH_TOOL_PREFIX],
4052 [AC_MSG_CHECKING([for $1])
4053 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4056 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4059 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4062 ac_save_MAGIC_CMD="$MAGIC_CMD"
4063 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4064 dnl $ac_dummy forces splitting on constant user-supplied paths.
4065 dnl POSIX.2 word splitting is done only on the output of word expansions,
4066 dnl not every word. This closes a longstanding sh security hole.
4067 ac_dummy="ifelse([$2], , $PATH, [$2])"
4068 for ac_dir in $ac_dummy; do
4069 test -z "$ac_dir" && ac_dir=.
4070 if test -f $ac_dir/$1; then
4071 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4072 if test -n "$file_magic_test_file"; then
4073 case $deplibs_check_method in
4075 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4076 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4077 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4078 egrep "$file_magic_regex" > /dev/null; then
4083 *** Warning: the command libtool uses to detect shared libraries,
4084 *** $file_magic_cmd, produces output that libtool cannot recognize.
4085 *** The result is that libtool may fail to recognize shared libraries
4086 *** as such. This will affect the creation of libtool libraries that
4087 *** depend on shared libraries, but programs linked with such libtool
4088 *** libraries will work regardless of this problem. Nevertheless, you
4089 *** may want to report the problem to your system manager and/or to
4090 *** bug-libtool@gnu.org
4100 MAGIC_CMD="$ac_save_MAGIC_CMD"
4103 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4104 if test -n "$MAGIC_CMD"; then
4105 AC_MSG_RESULT($MAGIC_CMD)
4112 # AC_PATH_MAGIC - find a file program which can recognise a shared library
4113 AC_DEFUN([AC_PATH_MAGIC],
4114 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
4115 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
4116 if test -z "$lt_cv_path_MAGIC_CMD"; then
4117 if test -n "$ac_tool_prefix"; then
4118 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
4126 # AC_PROG_LD - find the path to the GNU or non-GNU linker
4127 AC_DEFUN([AC_PROG_LD],
4128 [AC_ARG_WITH(gnu-ld,
4129 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
4130 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
4131 AC_REQUIRE([AC_PROG_CC])dnl
4132 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4133 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4134 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4136 if test "$GCC" = yes; then
4137 # Check if gcc -print-prog-name=ld gives a path.
4138 AC_MSG_CHECKING([for ld used by GCC])
4141 # gcc leaves a trailing carriage return which upsets mingw
4142 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4144 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4147 # Accept absolute paths.
4148 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
4149 re_direlt='/[[^/]][[^/]]*/\.\./'
4150 # Canonicalize the path of ld
4151 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4152 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4153 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4155 test -z "$LD" && LD="$ac_prog"
4158 # If it fails, then pretend we aren't using GCC.
4162 # If it is relative, then search for the first ld in PATH.
4166 elif test "$with_gnu_ld" = yes; then
4167 AC_MSG_CHECKING([for GNU ld])
4169 AC_MSG_CHECKING([for non-GNU ld])
4171 AC_CACHE_VAL(lt_cv_path_LD,
4172 [if test -z "$LD"; then
4173 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4174 for ac_dir in $PATH; do
4175 test -z "$ac_dir" && ac_dir=.
4176 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4177 lt_cv_path_LD="$ac_dir/$ac_prog"
4178 # Check to see if the program is GNU ld. I'd rather use --version,
4179 # but apparently some GNU ld's only accept -v.
4180 # Break only if it was the GNU/non-GNU ld that we prefer.
4181 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4182 test "$with_gnu_ld" != no && break
4184 test "$with_gnu_ld" != yes && break
4190 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4193 if test -n "$LD"; then
4198 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4203 AC_DEFUN([AC_PROG_LD_GNU],
4204 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4205 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4206 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4207 lt_cv_prog_gnu_ld=yes
4209 lt_cv_prog_gnu_ld=no
4211 with_gnu_ld=$lt_cv_prog_gnu_ld
4214 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4215 # -- PORTME Some linkers may need a different reload flag.
4216 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4217 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4218 [lt_cv_ld_reload_flag='-r'])
4219 reload_flag=$lt_cv_ld_reload_flag
4220 test -n "$reload_flag" && reload_flag=" $reload_flag"
4223 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4224 # -- PORTME fill in with the dynamic library characteristics
4225 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4226 [AC_CACHE_CHECK([how to recognise dependant libraries],
4227 lt_cv_deplibs_check_method,
4228 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4229 lt_cv_file_magic_test_file=
4230 lt_cv_deplibs_check_method='unknown'
4231 # Need to set the preceding variable on all platforms that support
4232 # interlibrary dependencies.
4233 # 'none' -- dependencies not supported.
4234 # `unknown' -- same as none, but documents that we really don't know.
4235 # 'pass_all' -- all dependencies passed with no checks.
4236 # 'test_compile' -- check by making test program.
4237 # 'file_magic [[regex]]' -- check by looking for files in library path
4238 # which responds to the $file_magic_cmd with a given egrep regex.
4239 # If you have `file' or equivalent on your system and you're not sure
4240 # whether `pass_all' will *always* work, you probably want this one.
4244 lt_cv_deplibs_check_method=pass_all
4248 lt_cv_deplibs_check_method=pass_all
4252 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4253 lt_cv_file_magic_cmd='/usr/bin/file -L'
4254 lt_cv_file_magic_test_file=/shlib/libc.so
4257 cygwin* | mingw* | pw32*)
4258 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4259 lt_cv_file_magic_cmd='$OBJDUMP -f'
4262 darwin* | rhapsody*)
4263 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4264 lt_cv_file_magic_cmd='/usr/bin/file -L'
4266 rhapsody* | darwin1.[[012]])
4267 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4270 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4276 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4279 # Not sure whether the presence of OpenBSD here was a mistake.
4280 # Let's accept both of them until this is cleared up.
4281 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4282 lt_cv_file_magic_cmd=/usr/bin/file
4283 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4287 lt_cv_deplibs_check_method=pass_all
4292 lt_cv_deplibs_check_method=pass_all
4296 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4297 lt_cv_file_magic_cmd=/usr/bin/file
4298 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4304 # this will be overridden with pass_all, but let us keep it just in case
4305 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4309 *-32|*"-32 ") libmagic=32-bit;;
4310 *-n32|*"-n32 ") libmagic=N32;;
4311 *-64|*"-64 ") libmagic=64-bit;;
4312 *) libmagic=never-match;;
4314 # this will be overridden with pass_all, but let us keep it just in case
4315 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4318 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4319 lt_cv_deplibs_check_method=pass_all
4322 # This must be Linux ELF.
4325 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
4326 lt_cv_deplibs_check_method=pass_all ;;
4328 # glibc up to 2.1.1 does not perform some relocations on ARM
4329 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4331 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4335 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4336 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4338 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4343 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4344 lt_cv_file_magic_cmd=/usr/bin/file
4345 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4349 lt_cv_file_magic_cmd=/usr/bin/file
4350 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4351 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4352 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4354 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4358 osf3* | osf4* | osf5*)
4359 # this will be overridden with pass_all, but let us keep it just in case
4360 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4361 lt_cv_file_magic_test_file=/shlib/libc.so
4362 lt_cv_deplibs_check_method=pass_all
4366 lt_cv_deplibs_check_method=pass_all
4370 lt_cv_deplibs_check_method=pass_all
4371 lt_cv_file_magic_test_file=/lib/libc.so
4374 sysv5uw[[78]]* | sysv4*uw2*)
4375 lt_cv_deplibs_check_method=pass_all
4378 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4379 case $host_vendor in
4381 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]]'
4382 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4385 lt_cv_deplibs_check_method=pass_all
4388 lt_cv_file_magic_cmd='/bin/file'
4389 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4392 lt_cv_file_magic_cmd='/bin/file'
4393 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4394 lt_cv_file_magic_test_file=/lib/libc.so
4400 file_magic_cmd=$lt_cv_file_magic_cmd
4401 deplibs_check_method=$lt_cv_deplibs_check_method
4405 # AC_PROG_NM - find the path to a BSD-compatible name lister
4406 AC_DEFUN([AC_PROG_NM],
4407 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4408 AC_MSG_CHECKING([for BSD-compatible nm])
4409 AC_CACHE_VAL(lt_cv_path_NM,
4410 [if test -n "$NM"; then
4411 # Let the user override the test.
4414 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4415 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4416 test -z "$ac_dir" && ac_dir=.
4417 tmp_nm=$ac_dir/${ac_tool_prefix}nm
4418 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4419 # Check to see if the nm accepts a BSD-compat flag.
4420 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4421 # nm: unknown option "B" ignored
4422 # Tru64's nm complains that /dev/null is an invalid object file
4423 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4424 lt_cv_path_NM="$tmp_nm -B"
4426 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4427 lt_cv_path_NM="$tmp_nm -p"
4430 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4431 continue # so that we can try to find one that supports BSD flags
4436 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4439 AC_MSG_RESULT([$NM])
4442 # AC_CHECK_LIBM - check for math library
4443 AC_DEFUN([AC_CHECK_LIBM],
4444 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4447 *-*-beos* | *-*-cygwin* | *-*-pw32*)
4448 # These system don't have libm
4451 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4452 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4455 AC_CHECK_LIB(m, main, LIBM="-lm")
4460 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4461 # the libltdl convenience library and INCLTDL to the include flags for
4462 # the libltdl header and adds --enable-ltdl-convenience to the
4463 # configure arguments. Note that LIBLTDL and INCLTDL are not
4464 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4465 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4466 # with '${top_builddir}/' and INCLTDL will be prefixed with
4467 # '${top_srcdir}/' (note the single quotes!). If your package is not
4468 # flat and you're not using automake, define top_builddir and
4469 # top_srcdir appropriately in the Makefiles.
4470 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4471 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4472 case $enable_ltdl_convenience in
4473 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4474 "") enable_ltdl_convenience=yes
4475 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4477 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4478 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4481 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4482 # the libltdl installable library and INCLTDL to the include flags for
4483 # the libltdl header and adds --enable-ltdl-install to the configure
4484 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
4485 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4486 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4487 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
4488 # with '${top_srcdir}/' (note the single quotes!). If your package is
4489 # not flat and you're not using automake, define top_builddir and
4490 # top_srcdir appropriately in the Makefiles.
4491 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4492 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4493 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4494 AC_CHECK_LIB(ltdl, main,
4495 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4496 [if test x"$enable_ltdl_install" = xno; then
4497 AC_MSG_WARN([libltdl not installed, but installation disabled])
4499 enable_ltdl_install=yes
4502 if test x"$enable_ltdl_install" = x"yes"; then
4503 ac_configure_args="$ac_configure_args --enable-ltdl-install"
4504 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4505 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4507 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4514 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4515 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4516 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4517 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4518 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4519 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4520 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4522 # This is just to silence aclocal about the macro not being used
4523 ifelse([AC_DISABLE_FAST_INSTALL])
4525 dnl test for libt2n and libt2n-codegen
4526 dnl LIBT2N(VERSION, action-if, action-not)
4527 AC_DEFUN([LIBT2N_CHECK],
4529 PKG_CHECK_MODULES(LIBT2N, [$1], [$2], [$3])
4530 LIBT2N_CODEGEN=`$PKG_CONFIG --variable libt2n_codegen libt2n`
4531 LIBT2N_DATADIR=`$PKG_CONFIG --variable libt2n_datadir libt2n`
4532 LIBT2N_CLIENT_PCTEMPLATE="$LIBT2N_DATADIR/clientlib.pc.in"
4533 AC_SUBST(LIBT2N_CODEGEN)
4534 AC_SUBST(LIBT2N_CLIENT_PCTEMPLATE)
4538 dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
4539 dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
4540 dnl also defines GSTUFF_PKG_ERRORS on error
4541 AC_DEFUN(PKG_CHECK_MODULES, [
4544 if test -z "$PKG_CONFIG"; then
4545 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
4548 if test "$PKG_CONFIG" = "no" ; then
4549 echo "*** The pkg-config script could not be found. Make sure it is"
4550 echo "*** in your path, or set the PKG_CONFIG environment variable"
4551 echo "*** to the full path to pkg-config."
4552 echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
4554 PKG_CONFIG_MIN_VERSION=0.9.0
4555 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
4556 AC_MSG_CHECKING(for $2)
4558 if $PKG_CONFIG --exists "$2" ; then
4562 AC_MSG_CHECKING($1_CFLAGS)
4563 $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
4564 AC_MSG_RESULT($$1_CFLAGS)
4566 AC_MSG_CHECKING($1_LIBS)
4567 $1_LIBS=`$PKG_CONFIG --libs "$2"`
4568 AC_MSG_RESULT($$1_LIBS)
4572 ## If we have a custom action on failure, don't print errors, but
4573 ## do set a variable so people can do so.
4574 $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
4575 ifelse([$4], ,echo $$1_PKG_ERRORS,)
4581 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
4582 echo "*** See http://www.freedesktop.org/software/pkgconfig"
4586 if test $succeeded = yes; then
4587 ifelse([$3], , :, [$3])
4589 ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])