1 dnl aclocal.m4 generated automatically by aclocal 1.4-p6
3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 # lib-prefix.m4 serial 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 9 (gettext-0.16)
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" \
400 && { test -f "$additional_libdir/lib$name.$shlibext" \
401 || { test "$shlibext" = dll \
402 && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
403 found_dir="$additional_libdir"
404 if test -f "$additional_libdir/lib$name.$shlibext"; then
405 found_so="$additional_libdir/lib$name.$shlibext"
407 found_so="$additional_libdir/lib$name.dll.a"
409 if test -f "$additional_libdir/lib$name.la"; then
410 found_la="$additional_libdir/lib$name.la"
413 if test -f "$additional_libdir/lib$name.$libext"; then
414 found_dir="$additional_libdir"
415 found_a="$additional_libdir/lib$name.$libext"
416 if test -f "$additional_libdir/lib$name.la"; then
417 found_la="$additional_libdir/lib$name.la"
422 if test "X$found_dir" = "X"; then
423 for x in $LDFLAGS $LTLIB[]NAME; do
424 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
427 dir=`echo "X$x" | sed -e 's/^X-L//'`
428 if test -n "$shlibext" \
429 && { test -f "$dir/lib$name.$shlibext" \
430 || { test "$shlibext" = dll \
431 && test -f "$dir/lib$name.dll.a"; }; }; then
433 if test -f "$dir/lib$name.$shlibext"; then
434 found_so="$dir/lib$name.$shlibext"
436 found_so="$dir/lib$name.dll.a"
438 if test -f "$dir/lib$name.la"; then
439 found_la="$dir/lib$name.la"
442 if test -f "$dir/lib$name.$libext"; then
444 found_a="$dir/lib$name.$libext"
445 if test -f "$dir/lib$name.la"; then
446 found_la="$dir/lib$name.la"
452 if test "X$found_dir" != "X"; then
457 if test "X$found_dir" != "X"; then
458 dnl Found the library.
459 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
460 if test "X$found_so" != "X"; then
461 dnl Linking with a shared library. We attempt to hardcode its
462 dnl directory into the executable's runpath, unless it's the
463 dnl standard /usr/lib.
464 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
465 dnl No hardcoding is needed.
466 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
468 dnl Use an explicit option to hardcode DIR into the resulting
470 dnl Potentially add DIR to ltrpathdirs.
471 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
473 for x in $ltrpathdirs; do
474 if test "X$x" = "X$found_dir"; then
479 if test -z "$haveit"; then
480 ltrpathdirs="$ltrpathdirs $found_dir"
482 dnl The hardcoding into $LIBNAME is system dependent.
483 if test "$hardcode_direct" = yes; then
484 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
485 dnl resulting binary.
486 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
488 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
489 dnl Use an explicit option to hardcode DIR into the resulting
491 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
492 dnl Potentially add DIR to rpathdirs.
493 dnl The rpathdirs will be appended to $LIBNAME at the end.
495 for x in $rpathdirs; do
496 if test "X$x" = "X$found_dir"; then
501 if test -z "$haveit"; then
502 rpathdirs="$rpathdirs $found_dir"
505 dnl Rely on "-L$found_dir".
506 dnl But don't add it if it's already contained in the LDFLAGS
507 dnl or the already constructed $LIBNAME
509 for x in $LDFLAGS $LIB[]NAME; do
510 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
511 if test "X$x" = "X-L$found_dir"; then
516 if test -z "$haveit"; then
517 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
519 if test "$hardcode_minus_L" != no; then
520 dnl FIXME: Not sure whether we should use
521 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
523 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
525 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
526 dnl here, because this doesn't fit in flags passed to the
527 dnl compiler. So give up. No hardcoding. This affects only
528 dnl very old systems.
529 dnl FIXME: Not sure whether we should use
530 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
532 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
538 if test "X$found_a" != "X"; then
539 dnl Linking with a static library.
540 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
542 dnl We shouldn't come here, but anyway it's good to have a
544 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
547 dnl Assume the include files are nearby.
548 additional_includedir=
550 */$acl_libdirstem | */$acl_libdirstem/)
551 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
552 additional_includedir="$basedir/include"
555 if test "X$additional_includedir" != "X"; then
556 dnl Potentially add $additional_includedir to $INCNAME.
558 dnl 1. if it's the standard /usr/include,
559 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
560 dnl 3. if it's already present in $CPPFLAGS or the already
561 dnl constructed $INCNAME,
562 dnl 4. if it doesn't exist as a directory.
563 if test "X$additional_includedir" != "X/usr/include"; then
565 if test "X$additional_includedir" = "X/usr/local/include"; then
566 if test -n "$GCC"; then
568 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
572 if test -z "$haveit"; then
573 for x in $CPPFLAGS $INC[]NAME; do
574 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
575 if test "X$x" = "X-I$additional_includedir"; then
580 if test -z "$haveit"; then
581 if test -d "$additional_includedir"; then
582 dnl Really add $additional_includedir to $INCNAME.
583 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
589 dnl Look for dependencies.
590 if test -n "$found_la"; then
591 dnl Read the .la file. It defines the variables
592 dnl dlname, library_names, old_library, dependency_libs, current,
593 dnl age, revision, installed, dlopen, dlpreopen, libdir.
594 save_libdir="$libdir"
596 */* | *\\*) . "$found_la" ;;
597 *) . "./$found_la" ;;
599 libdir="$save_libdir"
600 dnl We use only dependency_libs.
601 for dep in $dependency_libs; do
604 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
605 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
607 dnl 1. if it's the standard /usr/lib,
608 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
609 dnl 3. if it's already present in $LDFLAGS or the already
610 dnl constructed $LIBNAME,
611 dnl 4. if it doesn't exist as a directory.
612 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
614 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
615 if test -n "$GCC"; then
617 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
621 if test -z "$haveit"; then
623 for x in $LDFLAGS $LIB[]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 $LIBNAME.
633 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
637 for x in $LDFLAGS $LTLIB[]NAME; do
638 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
639 if test "X$x" = "X-L$additional_libdir"; then
644 if test -z "$haveit"; then
645 if test -d "$additional_libdir"; then
646 dnl Really add $additional_libdir to $LTLIBNAME.
647 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
654 dir=`echo "X$dep" | sed -e 's/^X-R//'`
655 if test "$enable_rpath" != no; then
656 dnl Potentially add DIR to rpathdirs.
657 dnl The rpathdirs will be appended to $LIBNAME at the end.
659 for x in $rpathdirs; do
660 if test "X$x" = "X$dir"; then
665 if test -z "$haveit"; then
666 rpathdirs="$rpathdirs $dir"
668 dnl Potentially add DIR to ltrpathdirs.
669 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
671 for x in $ltrpathdirs; do
672 if test "X$x" = "X$dir"; then
677 if test -z "$haveit"; then
678 ltrpathdirs="$ltrpathdirs $dir"
683 dnl Handle this in the next round.
684 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
687 dnl Handle this in the next round. Throw away the .la's
688 dnl directory; it is already contained in a preceding -L
690 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
693 dnl Most likely an immediate library name.
694 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
695 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
701 dnl Didn't find the library; assume it is in the system directories
702 dnl known to the linker and runtime loader. (All the system
703 dnl directories known to the linker should also be known to the
704 dnl runtime loader, otherwise the system is severely misconfigured.)
705 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
706 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
712 if test "X$rpathdirs" != "X"; then
713 if test -n "$hardcode_libdir_separator"; then
714 dnl Weird platform: only the last -rpath option counts, the user must
715 dnl pass all path elements in one option. We can arrange that for a
716 dnl single library, but not when more than one $LIBNAMEs are used.
718 for found_dir in $rpathdirs; do
719 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
721 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
722 acl_save_libdir="$libdir"
724 eval flag=\"$hardcode_libdir_flag_spec\"
725 libdir="$acl_save_libdir"
726 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
728 dnl The -rpath options are cumulative.
729 for found_dir in $rpathdirs; do
730 acl_save_libdir="$libdir"
732 eval flag=\"$hardcode_libdir_flag_spec\"
733 libdir="$acl_save_libdir"
734 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
738 if test "X$ltrpathdirs" != "X"; then
739 dnl When using libtool, the option that works for both libraries and
740 dnl executables is -R. The -R options are cumulative.
741 for found_dir in $ltrpathdirs; do
742 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
747 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
748 dnl unless already present in VAR.
749 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
750 dnl contains two or three consecutive elements that belong together.
751 AC_DEFUN([AC_LIB_APPENDTOVAR],
753 for element in [$2]; do
756 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
757 if test "X$x" = "X$element"; then
762 if test -z "$haveit"; then
763 [$1]="${[$1]}${[$1]:+ }$element"
768 dnl For those cases where a variable contains several -L and -l options
769 dnl referring to unknown libraries and directories, this macro determines the
770 dnl necessary additional linker options for the runtime path.
771 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
772 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
773 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
774 dnl otherwise linking without libtool is assumed.
775 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
777 AC_REQUIRE([AC_LIB_RPATH])
778 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
780 if test "$enable_rpath" != no; then
781 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
782 dnl Use an explicit option to hardcode directories into the resulting
787 if test -n "$next"; then
789 dnl No need to hardcode the standard /usr/lib.
790 if test "X$dir" != "X/usr/$acl_libdirstem"; then
791 rpathdirs="$rpathdirs $dir"
797 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
798 dnl No need to hardcode the standard /usr/lib.
799 if test "X$dir" != "X/usr/$acl_libdirstem"; then
800 rpathdirs="$rpathdirs $dir"
807 if test "X$rpathdirs" != "X"; then
808 if test -n ""$3""; then
809 dnl libtool is used for linking. Use -R options.
810 for dir in $rpathdirs; do
811 $1="${$1}${$1:+ }-R$dir"
814 dnl The linker is used for linking directly.
815 if test -n "$hardcode_libdir_separator"; then
816 dnl Weird platform: only the last -rpath option counts, the user
817 dnl must pass all path elements in one option.
819 for dir in $rpathdirs; do
820 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir"
822 acl_save_libdir="$libdir"
824 eval flag=\"$hardcode_libdir_flag_spec\"
825 libdir="$acl_save_libdir"
828 dnl The -rpath options are cumulative.
829 for dir in $rpathdirs; do
830 acl_save_libdir="$libdir"
832 eval flag=\"$hardcode_libdir_flag_spec\"
833 libdir="$acl_save_libdir"
834 $1="${$1}${$1:+ }$flag"
844 # lib-ld.m4 serial 3 (gettext-0.13)
845 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
846 dnl This file is free software; the Free Software Foundation
847 dnl gives unlimited permission to copy and/or distribute it,
848 dnl with or without modifications, as long as this notice is preserved.
850 dnl Subroutines of libtool.m4,
851 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
854 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
855 AC_DEFUN([AC_LIB_PROG_LD_GNU],
856 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
857 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
858 case `$LD -v 2>&1 </dev/null` in
859 *GNU* | *'with BFD'*)
860 acl_cv_prog_gnu_ld=yes ;;
862 acl_cv_prog_gnu_ld=no ;;
864 with_gnu_ld=$acl_cv_prog_gnu_ld
867 dnl From libtool-1.4. Sets the variable LD.
868 AC_DEFUN([AC_LIB_PROG_LD],
870 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
871 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
872 AC_REQUIRE([AC_PROG_CC])dnl
873 AC_REQUIRE([AC_CANONICAL_HOST])dnl
874 # Prepare PATH_SEPARATOR.
875 # The user is always right.
876 if test "${PATH_SEPARATOR+set}" != set; then
877 echo "#! /bin/sh" >conf$$.sh
878 echo "exit 0" >>conf$$.sh
880 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
888 if test "$GCC" = yes; then
889 # Check if gcc -print-prog-name=ld gives a path.
890 AC_MSG_CHECKING([for ld used by GCC])
893 # gcc leaves a trailing carriage return which upsets mingw
894 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
896 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
899 # Accept absolute paths.
900 [[\\/]* | [A-Za-z]:[\\/]*)]
901 [re_direlt='/[^/][^/]*/\.\./']
902 # Canonicalize the path of ld
903 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
904 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
905 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
907 test -z "$LD" && LD="$ac_prog"
910 # If it fails, then pretend we aren't using GCC.
914 # If it is relative, then search for the first ld in PATH.
918 elif test "$with_gnu_ld" = yes; then
919 AC_MSG_CHECKING([for GNU ld])
921 AC_MSG_CHECKING([for non-GNU ld])
923 AC_CACHE_VAL(acl_cv_path_LD,
924 [if test -z "$LD"; then
925 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
926 for ac_dir in $PATH; do
927 test -z "$ac_dir" && ac_dir=.
928 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
929 acl_cv_path_LD="$ac_dir/$ac_prog"
930 # Check to see if the program is GNU ld. I'd rather use --version,
931 # but apparently some GNU ld's only accept -v.
932 # Break only if it was the GNU/non-GNU ld that we prefer.
933 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
934 *GNU* | *'with BFD'*)
935 test "$with_gnu_ld" != no && break ;;
937 test "$with_gnu_ld" != yes && break ;;
943 acl_cv_path_LD="$LD" # Let the user override the test with a path.
946 if test -n "$LD"; then
951 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
955 # Do all the work for Automake. This macro actually does too much --
956 # some checks are only needed if your package does certain things.
957 # But this isn't really a big deal.
962 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
964 AC_DEFUN([AM_INIT_AUTOMAKE],
965 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
966 AC_REQUIRE([AC_PROG_INSTALL])
971 dnl test to see if srcdir already configured
972 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
973 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
976 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
977 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
978 AC_REQUIRE([AM_SANITY_CHECK])
979 AC_REQUIRE([AC_ARG_PROGRAM])
980 dnl FIXME This is truly gross.
981 missing_dir=`cd $ac_aux_dir && pwd`
982 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
983 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
984 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
985 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
986 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
987 AC_REQUIRE([AC_PROG_MAKE_SET])])
989 # Copyright 2002 Free Software Foundation, Inc.
991 # This program is free software; you can redistribute it and/or modify
992 # it under the terms of the GNU General Public License as published by
993 # the Free Software Foundation; either version 2, or (at your option)
996 # This program is distributed in the hope that it will be useful,
997 # but WITHOUT ANY WARRANTY; without even the implied warranty of
998 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
999 # GNU General Public License for more details.
1001 # You should have received a copy of the GNU General Public License
1002 # along with this program; if not, write to the Free Software
1003 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1005 # AM_AUTOMAKE_VERSION(VERSION)
1006 # ----------------------------
1007 # Automake X.Y traces this macro to ensure aclocal.m4 has been
1008 # generated from the m4 files accompanying Automake X.Y.
1009 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
1011 # AM_SET_CURRENT_AUTOMAKE_VERSION
1012 # -------------------------------
1013 # Call AM_AUTOMAKE_VERSION so it can be traced.
1014 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
1015 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1016 [AM_AUTOMAKE_VERSION([1.4-p6])])
1019 # Check to make sure that the build environment is sane.
1022 AC_DEFUN([AM_SANITY_CHECK],
1023 [AC_MSG_CHECKING([whether build environment is sane])
1026 echo timestamp > conftestfile
1027 # Do `set' in a subshell so we don't clobber the current shell's
1028 # arguments. Must try -L first in case configure is actually a
1029 # symlink; some systems play weird games with the mod time of symlinks
1030 # (eg FreeBSD returns the mod time of the symlink's containing
1033 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1034 if test "[$]*" = "X"; then
1036 set X `ls -t $srcdir/configure conftestfile`
1038 if test "[$]*" != "X $srcdir/configure conftestfile" \
1039 && test "[$]*" != "X conftestfile $srcdir/configure"; then
1041 # If neither matched, then we have a broken ls. This can happen
1042 # if, for instance, CONFIG_SHELL is bash and it inherits a
1043 # broken ls alias from the environment. This has actually
1044 # happened. Such a system could not be considered "sane".
1045 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1046 alias in your environment])
1049 test "[$]2" = conftestfile
1055 AC_MSG_ERROR([newly created file is older than distributed files!
1056 Check your system clock])
1059 AC_MSG_RESULT(yes)])
1061 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
1062 dnl The program must properly implement --version.
1063 AC_DEFUN([AM_MISSING_PROG],
1064 [AC_MSG_CHECKING(for working $2)
1065 # Run test in a subshell; some versions of sh will print an error if
1066 # an executable is not found, even if stderr is redirected.
1067 # Redirect stdin to placate older versions of autoconf. Sigh.
1068 if ($2 --version) < /dev/null > /dev/null 2>&1; then
1070 AC_MSG_RESULT(found)
1073 AC_MSG_RESULT(missing)
1077 # Like AC_CONFIG_HEADER, but automatically create stamp file.
1079 AC_DEFUN([AM_CONFIG_HEADER],
1081 AC_CONFIG_HEADER([$1])
1082 dnl When config.status generates a header, we must update the stamp-h file.
1083 dnl This file resides in the same directory as the config header
1084 dnl that is generated. We must strip everything past the first ":",
1085 dnl and everything past the last "/".
1086 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
1087 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
1088 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
1090 for am_file in <<$1>>; do
1091 case " <<$>>CONFIG_HEADERS " in
1092 *" <<$>>am_file "*<<)>>
1093 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
1096 am_indx=`expr "<<$>>am_indx" + 1`
1100 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1102 # serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
1105 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1106 # -----------------------------------------------------------
1107 # If this macro is not defined by Autoconf, define it here.
1108 m4_ifdef([AC_PROVIDE_IFELSE],
1110 [m4_define([AC_PROVIDE_IFELSE],
1111 [m4_ifdef([AC_PROVIDE_$1],
1117 AC_DEFUN([AC_PROG_LIBTOOL],
1118 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1119 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1120 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1121 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1123 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1125 dnl And a similar setup for Fortran 77 support
1126 AC_PROVIDE_IFELSE([AC_PROG_F77],
1128 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1131 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1132 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1133 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1134 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1136 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1138 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1140 [ifdef([AC_PROG_GCJ],
1141 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1142 ifdef([A][M_PROG_GCJ],
1143 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1144 ifdef([LT_AC_PROG_GCJ],
1145 [define([LT_AC_PROG_GCJ],
1146 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1147 ])])# AC_PROG_LIBTOOL
1152 AC_DEFUN([_AC_PROG_LIBTOOL],
1153 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1154 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1155 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1156 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1158 # This can be used to rebuild libtool when needed
1159 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1161 # Always use our own libtool.
1162 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1163 AC_SUBST(LIBTOOL)dnl
1165 # Prevent multiple expansion
1166 define([AC_PROG_LIBTOOL], [])
1167 ])# _AC_PROG_LIBTOOL
1172 AC_DEFUN([AC_LIBTOOL_SETUP],
1174 AC_REQUIRE([AC_ENABLE_SHARED])dnl
1175 AC_REQUIRE([AC_ENABLE_STATIC])dnl
1176 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1177 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1178 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1179 AC_REQUIRE([AC_PROG_CC])dnl
1180 AC_REQUIRE([AC_PROG_LD])dnl
1181 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1182 AC_REQUIRE([AC_PROG_NM])dnl
1184 AC_REQUIRE([AC_PROG_LN_S])dnl
1185 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1186 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1187 AC_REQUIRE([AC_OBJEXT])dnl
1188 AC_REQUIRE([AC_EXEEXT])dnl
1191 AC_LIBTOOL_SYS_MAX_CMD_LEN
1192 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1195 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1196 _LT_AC_PROG_ECHO_BACKSLASH
1200 # AIX sometimes has problems with the GCC collect2 program. For some
1201 # reason, if we set the COLLECT_NAMES environment variable, the problems
1202 # vanish in a puff of smoke.
1203 if test "X${COLLECT_NAMES+set}" != Xset; then
1205 export COLLECT_NAMES
1210 # Sed substitution that helps us do robust quoting. It backslashifies
1211 # metacharacters that are still active within double-quoted strings.
1212 Xsed='sed -e 1s/^X//'
1213 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1215 # Same as above, but do not quote variable references.
1216 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1218 # Sed substitution to delay expansion of an escaped shell variable in a
1219 # double_quote_subst'ed string.
1220 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1222 # Sed substitution to avoid accidental globbing in evaled expressions
1223 no_glob_subst='s/\*/\\\*/g'
1229 default_ofile=libtool
1230 can_build_shared=yes
1232 # All known linkers require a `.a' archive for static linking (except MSVC,
1233 # which needs '.lib').
1235 ltmain="$ac_aux_dir/ltmain.sh"
1236 ofile="$default_ofile"
1237 with_gnu_ld="$lt_cv_prog_gnu_ld"
1239 AC_CHECK_TOOL(AR, ar, false)
1240 AC_CHECK_TOOL(RANLIB, ranlib, :)
1241 AC_CHECK_TOOL(STRIP, strip, :)
1244 old_CFLAGS="$CFLAGS"
1246 # Set sane defaults for various variables
1247 test -z "$AR" && AR=ar
1248 test -z "$AR_FLAGS" && AR_FLAGS=cru
1249 test -z "$AS" && AS=as
1250 test -z "$CC" && CC=cc
1251 test -z "$LTCC" && LTCC=$CC
1252 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1253 test -z "$DLLTOOL" && DLLTOOL=dlltool
1254 test -z "$LD" && LD=ld
1255 test -z "$LN_S" && LN_S="ln -s"
1256 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1257 test -z "$NM" && NM=nm
1258 test -z "$SED" && SED=sed
1259 test -z "$OBJDUMP" && OBJDUMP=objdump
1260 test -z "$RANLIB" && RANLIB=:
1261 test -z "$STRIP" && STRIP=:
1262 test -z "$ac_objext" && ac_objext=o
1264 # Determine commands to create old-style static archives.
1265 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1266 old_postinstall_cmds='chmod 644 $oldlib'
1267 old_postuninstall_cmds=
1269 if test -n "$RANLIB"; then
1272 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1275 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1278 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1281 _LT_CC_BASENAME([$compiler])
1283 # Only perform the check for file, if the check method requires it
1284 case $deplibs_check_method in
1286 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1292 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1293 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1294 enable_win32_dll=yes, enable_win32_dll=no)
1296 AC_ARG_ENABLE([libtool-lock],
1297 [AC_HELP_STRING([--disable-libtool-lock],
1298 [avoid locking (might break parallel builds)])])
1299 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1302 [AC_HELP_STRING([--with-pic],
1303 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1304 [pic_mode="$withval"],
1306 test -z "$pic_mode" && pic_mode=default
1308 # Use C for the default configuration in the libtool script
1310 AC_LIBTOOL_LANG_C_CONFIG
1312 ])# AC_LIBTOOL_SETUP
1315 # _LT_AC_SYS_COMPILER
1316 # -------------------
1317 AC_DEFUN([_LT_AC_SYS_COMPILER],
1318 [AC_REQUIRE([AC_PROG_CC])dnl
1320 # If no C compiler was specified, use CC.
1323 # If no C compiler flags were specified, use CFLAGS.
1324 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1326 # Allow CC to be a program name with arguments.
1328 ])# _LT_AC_SYS_COMPILER
1331 # _LT_CC_BASENAME(CC)
1332 # -------------------
1333 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1334 AC_DEFUN([_LT_CC_BASENAME],
1335 [for cc_temp in $1""; do
1337 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1338 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1343 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1347 # _LT_COMPILER_BOILERPLATE
1348 # ------------------------
1349 # Check for compiler boilerplate output or warnings with
1350 # the simple compiler test code.
1351 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1352 [ac_outfile=conftest.$ac_objext
1353 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
1354 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1355 _lt_compiler_boilerplate=`cat conftest.err`
1357 ])# _LT_COMPILER_BOILERPLATE
1360 # _LT_LINKER_BOILERPLATE
1361 # ----------------------
1362 # Check for linker boilerplate output or warnings with
1363 # the simple link test code.
1364 AC_DEFUN([_LT_LINKER_BOILERPLATE],
1365 [ac_outfile=conftest.$ac_objext
1366 printf "$lt_simple_link_test_code" >conftest.$ac_ext
1367 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1368 _lt_linker_boilerplate=`cat conftest.err`
1370 ])# _LT_LINKER_BOILERPLATE
1373 # _LT_AC_SYS_LIBPATH_AIX
1374 # ----------------------
1375 # Links a minimal program and checks the executable
1376 # for the system default hardcoded library path. In most cases,
1377 # this is /usr/lib:/lib, but when the MPI compilers are used
1378 # the location of the communication and MPI libs are included too.
1379 # If we don't find anything, use the default library path according
1380 # to the aix ld manual.
1381 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1382 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1383 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1385 # Check for a 64-bit object if we didn't find anything.
1386 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1388 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1389 ])# _LT_AC_SYS_LIBPATH_AIX
1392 # _LT_AC_SHELL_INIT(ARG)
1393 # ----------------------
1394 AC_DEFUN([_LT_AC_SHELL_INIT],
1395 [ifdef([AC_DIVERSION_NOTICE],
1396 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1397 [AC_DIVERT_PUSH(NOTICE)])
1400 ])# _LT_AC_SHELL_INIT
1403 # _LT_AC_PROG_ECHO_BACKSLASH
1404 # --------------------------
1405 # Add some code to the start of the generated configure script which
1406 # will find an echo command which doesn't interpret backslashes.
1407 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1408 [_LT_AC_SHELL_INIT([
1409 # Check that we are running under the correct shell.
1410 SHELL=${CONFIG_SHELL-/bin/sh}
1414 # Remove one level of quotation (which was required for Make).
1415 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1420 if test "X[$]1" = X--no-reexec; then
1421 # Discard the --no-reexec flag, and continue.
1423 elif test "X[$]1" = X--fallback-echo; then
1424 # Avoid inline document here, it may be left over
1426 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1427 # Yippee, $echo works!
1430 # Restart under the correct shell.
1431 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1434 if test "X[$]1" = X--fallback-echo; then
1435 # used as fallback echo
1443 # The HP-UX ksh and POSIX shell print the target directory to stdout
1445 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1447 if test -z "$ECHO"; then
1448 if test "X${echo_test_string+set}" != Xset; then
1449 # find a string as large as possible, as long as the shell can cope with it
1450 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1451 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1452 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1453 echo_test_string=`eval $cmd` &&
1454 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1461 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1462 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1463 test "X$echo_testing_string" = "X$echo_test_string"; then
1466 # The Solaris, AIX, and Digital Unix default echo programs unquote
1467 # backslashes. This makes it impossible to quote backslashes using
1468 # echo "$something" | sed 's/\\/\\\\/g'
1470 # So, first we look for a working echo in the user's PATH.
1472 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1473 for dir in $PATH /usr/ucb; do
1475 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1476 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1477 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1478 test "X$echo_testing_string" = "X$echo_test_string"; then
1485 if test "X$echo" = Xecho; then
1486 # We didn't find a better echo, so look for alternatives.
1487 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1488 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1489 test "X$echo_testing_string" = "X$echo_test_string"; then
1490 # This shell has a builtin print -r that does the trick.
1492 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1493 test "X$CONFIG_SHELL" != X/bin/ksh; then
1494 # If we have ksh, try running configure again with it.
1495 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1496 export ORIGINAL_CONFIG_SHELL
1497 CONFIG_SHELL=/bin/ksh
1499 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1503 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1504 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1505 test "X$echo_testing_string" = "X$echo_test_string"; then
1506 # Cool, printf works
1508 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1509 test "X$echo_testing_string" = 'X\t' &&
1510 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1511 test "X$echo_testing_string" = "X$echo_test_string"; then
1512 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1514 SHELL="$CONFIG_SHELL"
1516 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1517 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1518 test "X$echo_testing_string" = 'X\t' &&
1519 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1520 test "X$echo_testing_string" = "X$echo_test_string"; then
1521 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1523 # maybe with a smaller string...
1526 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1527 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1534 if test "$prev" != 'sed 50q "[$]0"'; then
1535 echo_test_string=`eval $prev`
1536 export echo_test_string
1537 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1539 # Oops. We lost completely, so just stick with echo.
1548 # Copy echo and quote the copy suitably for passing to libtool from
1549 # the Makefile, instead of quoting the original, which is used later.
1551 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1552 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1556 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1561 AC_DEFUN([_LT_AC_LOCK],
1562 [AC_ARG_ENABLE([libtool-lock],
1563 [AC_HELP_STRING([--disable-libtool-lock],
1564 [avoid locking (might break parallel builds)])])
1565 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1567 # Some flags need to be propagated to the compiler or linker for good
1571 # Find out which ABI we are using.
1572 echo 'int i;' > conftest.$ac_ext
1573 if AC_TRY_EVAL(ac_compile); then
1574 case `/usr/bin/file conftest.$ac_objext` in
1586 # Find out which ABI we are using.
1587 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1588 if AC_TRY_EVAL(ac_compile); then
1589 if test "$lt_cv_prog_gnu_ld" = yes; then
1590 case `/usr/bin/file conftest.$ac_objext` in
1592 LD="${LD-ld} -melf32bsmip"
1595 LD="${LD-ld} -melf32bmipn32"
1598 LD="${LD-ld} -melf64bmip"
1602 case `/usr/bin/file conftest.$ac_objext` in
1618 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1619 # Find out which ABI we are using.
1620 echo 'int i;' > conftest.$ac_ext
1621 if AC_TRY_EVAL(ac_compile); then
1622 case `/usr/bin/file conftest.o` in
1626 LD="${LD-ld} -m elf_i386"
1628 ppc64-*linux*|powerpc64-*linux*)
1629 LD="${LD-ld} -m elf32ppclinux"
1632 LD="${LD-ld} -m elf_s390"
1635 LD="${LD-ld} -m elf32_sparc"
1642 LD="${LD-ld} -m elf_x86_64"
1644 ppc*-*linux*|powerpc*-*linux*)
1645 LD="${LD-ld} -m elf64ppc"
1648 LD="${LD-ld} -m elf64_s390"
1651 LD="${LD-ld} -m elf64_sparc"
1661 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1662 SAVE_CFLAGS="$CFLAGS"
1663 CFLAGS="$CFLAGS -belf"
1664 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1666 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1668 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1669 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1670 CFLAGS="$SAVE_CFLAGS"
1674 # Find out which ABI we are using.
1675 echo 'int i;' > conftest.$ac_ext
1676 if AC_TRY_EVAL(ac_compile); then
1677 case `/usr/bin/file conftest.o` in
1679 case $lt_cv_prog_gnu_ld in
1680 yes*) LD="${LD-ld} -m elf64_sparc" ;;
1681 *) LD="${LD-ld} -64" ;;
1689 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1690 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1691 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1692 AC_CHECK_TOOL(AS, as, false)
1693 AC_CHECK_TOOL(OBJDUMP, objdump, false)
1698 need_locks="$enable_libtool_lock"
1703 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1704 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1705 # ----------------------------------------------------------------
1706 # Check whether the given compiler option works
1707 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1708 [AC_REQUIRE([LT_AC_PROG_SED])
1709 AC_CACHE_CHECK([$1], [$2],
1711 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1712 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1713 lt_compiler_flag="$3"
1714 # Insert the option either (1) after the last *FLAGS variable, or
1715 # (2) before a word containing "conftest.", or (3) at the end.
1716 # Note that $ac_compile itself does not contain backslashes and begins
1717 # with a dollar sign (not a hyphen), so the echo should work correctly.
1718 # The option is referenced via a variable to avoid confusing sed.
1719 lt_compile=`echo "$ac_compile" | $SED \
1720 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1721 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1722 -e 's:$: $lt_compiler_flag:'`
1723 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1724 (eval "$lt_compile" 2>conftest.err)
1726 cat conftest.err >&AS_MESSAGE_LOG_FD
1727 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1728 if (exit $ac_status) && test -s "$ac_outfile"; then
1729 # The compiler can only warn and ignore the option if not recognized
1730 # So say no if there are warnings other than the usual output.
1731 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1732 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1733 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1740 if test x"[$]$2" = xyes; then
1741 ifelse([$5], , :, [$5])
1743 ifelse([$6], , :, [$6])
1745 ])# AC_LIBTOOL_COMPILER_OPTION
1748 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1749 # [ACTION-SUCCESS], [ACTION-FAILURE])
1750 # ------------------------------------------------------------
1751 # Check whether the given compiler option works
1752 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1753 [AC_CACHE_CHECK([$1], [$2],
1755 save_LDFLAGS="$LDFLAGS"
1756 LDFLAGS="$LDFLAGS $3"
1757 printf "$lt_simple_link_test_code" > conftest.$ac_ext
1758 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1759 # The linker can only warn and ignore the option if not recognized
1760 # So say no if there are warnings
1761 if test -s conftest.err; then
1762 # Append any errors to the config.log.
1763 cat conftest.err 1>&AS_MESSAGE_LOG_FD
1764 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1765 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1766 if diff conftest.exp conftest.er2 >/dev/null; then
1774 LDFLAGS="$save_LDFLAGS"
1777 if test x"[$]$2" = xyes; then
1778 ifelse([$4], , :, [$4])
1780 ifelse([$5], , :, [$5])
1782 ])# AC_LIBTOOL_LINKER_OPTION
1785 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1786 # --------------------------
1787 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1788 [# find the maximum length of command line arguments
1789 AC_MSG_CHECKING([the maximum length of command line arguments])
1790 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1796 # On DJGPP, this test can blow up pretty badly due to problems in libc
1797 # (any single argument exceeding 2000 bytes causes a buffer overrun
1798 # during glob expansion). Even if it were fixed, the result of this
1799 # check would be larger than it should be.
1800 lt_cv_sys_max_cmd_len=12288; # 12K is about right
1804 # Under GNU Hurd, this test is not required because there is
1805 # no limit to the length of command line arguments.
1806 # Libtool will interpret -1 as no limit whatsoever
1807 lt_cv_sys_max_cmd_len=-1;
1811 # On Win9x/ME, this test blows up -- it succeeds, but takes
1812 # about 5 minutes as the teststring grows exponentially.
1813 # Worse, since 9x/ME are not pre-emptively multitasking,
1814 # you end up with a "frozen" computer, even though with patience
1815 # the test eventually succeeds (with a max line length of 256k).
1816 # Instead, let's just punt: use the minimum linelength reported by
1817 # all of the supported platforms: 8192 (on NT/2K/XP).
1818 lt_cv_sys_max_cmd_len=8192;
1822 # On AmigaOS with pdksh, this test takes hours, literally.
1823 # So we just punt and use a minimum line length of 8192.
1824 lt_cv_sys_max_cmd_len=8192;
1827 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1828 # This has been around since 386BSD, at least. Likely further.
1829 if test -x /sbin/sysctl; then
1830 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1831 elif test -x /usr/sbin/sysctl; then
1832 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1834 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
1836 # And add a safety zone
1837 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1838 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1842 # We know the value 262144 and hardcode it with a safety zone (like BSD)
1843 lt_cv_sys_max_cmd_len=196608
1847 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1848 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1849 # nice to cause kernel panics so lets avoid the loop below.
1850 # First set a reasonable default.
1851 lt_cv_sys_max_cmd_len=16384
1853 if test -x /sbin/sysconfig; then
1854 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1855 *1*) lt_cv_sys_max_cmd_len=-1 ;;
1860 lt_cv_sys_max_cmd_len=102400
1862 sysv5* | sco5v6* | sysv4.2uw2*)
1863 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1864 if test -n "$kargmax"; then
1865 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
1867 lt_cv_sys_max_cmd_len=32768
1871 # If test is not a shell built-in, we'll probably end up computing a
1872 # maximum length that is only half of the actual maximum length, but
1874 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1875 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1876 = "XX$teststring") >/dev/null 2>&1 &&
1877 new_result=`expr "X$teststring" : ".*" 2>&1` &&
1878 lt_cv_sys_max_cmd_len=$new_result &&
1879 test $i != 17 # 1/2 MB should be enough
1882 teststring=$teststring$teststring
1885 # Add a significant safety factor because C++ compilers can tack on massive
1886 # amounts of additional arguments before passing them to the linker.
1887 # It appears as though 1/2 is a usable value.
1888 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1892 if test -n $lt_cv_sys_max_cmd_len ; then
1893 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1897 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1900 # _LT_AC_CHECK_DLFCN
1901 # ------------------
1902 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1903 [AC_CHECK_HEADERS(dlfcn.h)dnl
1904 ])# _LT_AC_CHECK_DLFCN
1907 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1908 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1909 # ---------------------------------------------------------------------
1910 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1911 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1912 if test "$cross_compiling" = yes; then :
1915 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1916 lt_status=$lt_dlunknown
1917 cat > conftest.$ac_ext <<EOF
1918 [#line __oline__ "configure"
1919 #include "confdefs.h"
1928 # define LT_DLGLOBAL RTLD_GLOBAL
1931 # define LT_DLGLOBAL DL_GLOBAL
1933 # define LT_DLGLOBAL 0
1937 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1938 find out it does not work in some platform. */
1939 #ifndef LT_DLLAZY_OR_NOW
1941 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1944 # define LT_DLLAZY_OR_NOW DL_LAZY
1947 # define LT_DLLAZY_OR_NOW RTLD_NOW
1950 # define LT_DLLAZY_OR_NOW DL_NOW
1952 # define LT_DLLAZY_OR_NOW 0
1960 extern "C" void exit (int);
1963 void fnord() { int i=42;}
1966 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1967 int status = $lt_dlunknown;
1971 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1972 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1973 /* dlclose (self); */
1981 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1982 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1985 x$lt_dlno_uscore) $1 ;;
1986 x$lt_dlneed_uscore) $2 ;;
1987 x$lt_dlunknown|x*) $3 ;;
1990 # compilation failed
1995 ])# _LT_AC_TRY_DLOPEN_SELF
1998 # AC_LIBTOOL_DLOPEN_SELF
1999 # ----------------------
2000 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
2001 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2002 if test "x$enable_dlopen" != xyes; then
2003 enable_dlopen=unknown
2004 enable_dlopen_self=unknown
2005 enable_dlopen_self_static=unknown
2012 lt_cv_dlopen="load_add_on"
2014 lt_cv_dlopen_self=yes
2018 lt_cv_dlopen="LoadLibrary"
2023 lt_cv_dlopen="dlopen"
2028 # if libdl is installed we need to link against it
2029 AC_CHECK_LIB([dl], [dlopen],
2030 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2033 lt_cv_dlopen_self=yes
2038 AC_CHECK_FUNC([shl_load],
2039 [lt_cv_dlopen="shl_load"],
2040 [AC_CHECK_LIB([dld], [shl_load],
2041 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
2042 [AC_CHECK_FUNC([dlopen],
2043 [lt_cv_dlopen="dlopen"],
2044 [AC_CHECK_LIB([dl], [dlopen],
2045 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2046 [AC_CHECK_LIB([svld], [dlopen],
2047 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2048 [AC_CHECK_LIB([dld], [dld_link],
2049 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
2058 if test "x$lt_cv_dlopen" != xno; then
2064 case $lt_cv_dlopen in
2066 save_CPPFLAGS="$CPPFLAGS"
2067 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2069 save_LDFLAGS="$LDFLAGS"
2070 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2073 LIBS="$lt_cv_dlopen_libs $LIBS"
2075 AC_CACHE_CHECK([whether a program can dlopen itself],
2076 lt_cv_dlopen_self, [dnl
2077 _LT_AC_TRY_DLOPEN_SELF(
2078 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2079 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2082 if test "x$lt_cv_dlopen_self" = xyes; then
2083 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2084 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2085 lt_cv_dlopen_self_static, [dnl
2086 _LT_AC_TRY_DLOPEN_SELF(
2087 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2088 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2092 CPPFLAGS="$save_CPPFLAGS"
2093 LDFLAGS="$save_LDFLAGS"
2098 case $lt_cv_dlopen_self in
2099 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2100 *) enable_dlopen_self=unknown ;;
2103 case $lt_cv_dlopen_self_static in
2104 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2105 *) enable_dlopen_self_static=unknown ;;
2108 ])# AC_LIBTOOL_DLOPEN_SELF
2111 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2112 # ---------------------------------
2113 # Check to see if options -c and -o are simultaneously supported by compiler
2114 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2115 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2116 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2117 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2118 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2119 $rm -r conftest 2>/dev/null
2123 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2125 lt_compiler_flag="-o out/conftest2.$ac_objext"
2126 # Insert the option either (1) after the last *FLAGS variable, or
2127 # (2) before a word containing "conftest.", or (3) at the end.
2128 # Note that $ac_compile itself does not contain backslashes and begins
2129 # with a dollar sign (not a hyphen), so the echo should work correctly.
2130 lt_compile=`echo "$ac_compile" | $SED \
2131 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2132 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2133 -e 's:$: $lt_compiler_flag:'`
2134 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2135 (eval "$lt_compile" 2>out/conftest.err)
2137 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2138 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2139 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2141 # The compiler can only warn and ignore the option if not recognized
2142 # So say no if there are warnings
2143 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2144 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2145 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2146 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2149 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2151 # SGI C++ compiler will create directory out/ii_files/ for
2152 # template instantiation
2153 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2154 $rm out/* && rmdir out
2159 ])# AC_LIBTOOL_PROG_CC_C_O
2162 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2163 # -----------------------------------------
2164 # Check to see if we can do hard links to lock some files if needed
2165 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2166 [AC_REQUIRE([_LT_AC_LOCK])dnl
2168 hard_links="nottested"
2169 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2170 # do not overwrite the value of need_locks provided by the user
2171 AC_MSG_CHECKING([if we can lock with hard links])
2174 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2176 ln conftest.a conftest.b 2>&5 || hard_links=no
2177 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2178 AC_MSG_RESULT([$hard_links])
2179 if test "$hard_links" = no; then
2180 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2186 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2191 AC_DEFUN([AC_LIBTOOL_OBJDIR],
2192 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2193 [rm -f .libs 2>/dev/null
2194 mkdir .libs 2>/dev/null
2195 if test -d .libs; then
2198 # MS-DOS does not allow filenames that begin with a dot.
2201 rmdir .libs 2>/dev/null])
2202 objdir=$lt_cv_objdir
2203 ])# AC_LIBTOOL_OBJDIR
2206 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2207 # ----------------------------------------------
2208 # Check hardcoding attributes.
2209 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2210 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2211 _LT_AC_TAGVAR(hardcode_action, $1)=
2212 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2213 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2214 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2216 # We can hardcode non-existant directories.
2217 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2218 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2219 # have to relink, otherwise we might link with an installed library
2220 # when we should be linking with a yet-to-be-installed one
2221 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2222 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2223 # Linking always hardcodes the temporary library directory.
2224 _LT_AC_TAGVAR(hardcode_action, $1)=relink
2226 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2227 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2230 # We cannot hardcode anything, or else we can only hardcode existing
2232 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2234 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2236 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2237 # Fast installation is not supported
2238 enable_fast_install=no
2239 elif test "$shlibpath_overrides_runpath" = yes ||
2240 test "$enable_shared" = no; then
2241 # Fast installation is not necessary
2242 enable_fast_install=needless
2244 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2247 # AC_LIBTOOL_SYS_LIB_STRIP
2248 # ------------------------
2249 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2252 AC_MSG_CHECKING([whether stripping libraries is possible])
2253 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2254 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2255 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2256 AC_MSG_RESULT([yes])
2258 # FIXME - insert some real tests, host_os isn't really good enough
2261 if test -n "$STRIP" ; then
2262 striplib="$STRIP -x"
2263 AC_MSG_RESULT([yes])
2273 ])# AC_LIBTOOL_SYS_LIB_STRIP
2276 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2277 # -----------------------------
2278 # PORTME Fill in your ld.so characteristics
2279 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2280 [AC_MSG_CHECKING([dynamic linker characteristics])
2282 libname_spec='lib$name'
2290 shlibpath_overrides_runpath=unknown
2292 dynamic_linker="$host_os ld.so"
2293 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2294 if test "$GCC" = yes; then
2295 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2296 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2297 # if the path contains ";" then we assume it to be the separator
2298 # otherwise default to the standard path separator (i.e. ":") - it is
2299 # assumed that no part of a normal pathname contains ";" but that should
2300 # okay in the real world where ";" in dirpaths is itself problematic.
2301 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2303 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2306 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2308 need_lib_prefix=unknown
2309 hardcode_into_libs=no
2311 # when you set need_version to no, make sure it does not cause -set_version
2312 # flags to be left without arguments
2313 need_version=unknown
2318 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2319 shlibpath_var=LIBPATH
2321 # AIX 3 has no versioning support, so we append a major version to the name.
2322 soname_spec='${libname}${release}${shared_ext}$major'
2329 hardcode_into_libs=yes
2330 if test "$host_cpu" = ia64; then
2331 # AIX 5 supports IA64
2332 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2333 shlibpath_var=LD_LIBRARY_PATH
2335 # With GCC up to 2.95.x, collect2 would create an import file
2336 # for dependence libraries. The import file would start with
2337 # the line `#! .'. This would cause the generated library to
2338 # depend on `.', always an invalid library. This was fixed in
2339 # development snapshots of GCC prior to 3.0.
2341 aix4 | aix4.[[01]] | aix4.[[01]].*)
2342 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2344 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2351 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2352 # soname into executable. Probably we can add versioning support to
2353 # collect2, so additional links can be useful in future.
2354 if test "$aix_use_runtimelinking" = yes; then
2355 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2356 # instead of lib<name>.a to let people know that these are not
2357 # typical AIX shared libraries.
2358 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2360 # We preserve .a as extension for shared libraries through AIX4.2
2361 # and later when we are not doing run time linking.
2362 library_names_spec='${libname}${release}.a $libname.a'
2363 soname_spec='${libname}${release}${shared_ext}$major'
2365 shlibpath_var=LIBPATH
2370 library_names_spec='$libname.ixlibrary $libname.a'
2371 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2372 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'
2376 library_names_spec='${libname}${shared_ext}'
2377 dynamic_linker="$host_os ld.so"
2378 shlibpath_var=LIBRARY_PATH
2384 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2385 soname_spec='${libname}${release}${shared_ext}$major'
2386 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2387 shlibpath_var=LD_LIBRARY_PATH
2388 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2389 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2390 # the default ld.so.conf also contains /usr/contrib/lib and
2391 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2392 # libtool to hard-code these into programs
2395 cygwin* | mingw* | pw32*)
2396 version_type=windows
2401 case $GCC,$host_os in
2402 yes,cygwin* | yes,mingw* | yes,pw32*)
2403 library_names_spec='$libname.dll.a'
2404 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2405 postinstall_cmds='base_file=`basename \${file}`~
2406 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2407 dldir=$destdir/`dirname \$dlpath`~
2408 test -d \$dldir || mkdir -p \$dldir~
2409 $install_prog $dir/$dlname \$dldir/$dlname~
2410 chmod a+x \$dldir/$dlname'
2411 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2412 dlpath=$dir/\$dldll~
2414 shlibpath_overrides_runpath=yes
2418 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2419 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2420 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2423 # MinGW DLLs use traditional 'lib' prefix
2424 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2425 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2426 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2427 # It is most probably a Windows format PATH printed by
2428 # mingw gcc, but we are running on Cygwin. Gcc prints its search
2429 # path with ; separators, and with drive letters. We can handle the
2430 # drive letters (cygwin fileutils understands them), so leave them,
2431 # especially as we might pass files found there to a mingw objdump,
2432 # which wouldn't understand a cygwinified path. Ahh.
2433 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2435 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2439 # pw32 DLLs use 'pw' prefix rather than 'lib'
2440 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2446 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2449 dynamic_linker='Win32 ld.exe'
2450 # FIXME: first we should search . and the directory the executable is in
2454 darwin* | rhapsody*)
2455 dynamic_linker="$host_os dyld"
2459 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2460 soname_spec='${libname}${release}${major}$shared_ext'
2461 shlibpath_overrides_runpath=yes
2462 shlibpath_var=DYLD_LIBRARY_PATH
2463 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2464 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2465 if test "$GCC" = yes; then
2466 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2468 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2470 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2477 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2478 soname_spec='${libname}${release}${shared_ext}$major'
2479 shlibpath_var=LD_LIBRARY_PATH
2486 freebsd* | dragonfly*)
2487 # DragonFly does not have aout. When/if they implement a new
2488 # versioning mechanism, adjust this.
2489 if test -x /usr/bin/objformat; then
2490 objformat=`/usr/bin/objformat`
2493 freebsd[[123]]*) objformat=aout ;;
2497 version_type=freebsd-$objformat
2498 case $version_type in
2500 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2505 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2509 shlibpath_var=LD_LIBRARY_PATH
2512 shlibpath_overrides_runpath=yes
2514 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2515 shlibpath_overrides_runpath=yes
2516 hardcode_into_libs=yes
2518 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2519 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2520 shlibpath_overrides_runpath=no
2521 hardcode_into_libs=yes
2523 freebsd*) # from 4.6 on
2524 shlibpath_overrides_runpath=yes
2525 hardcode_into_libs=yes
2534 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2535 soname_spec='${libname}${release}${shared_ext}$major'
2536 shlibpath_var=LD_LIBRARY_PATH
2537 hardcode_into_libs=yes
2540 hpux9* | hpux10* | hpux11*)
2541 # Give a soname corresponding to the major version so that dld.sl refuses to
2542 # link against other versions.
2549 hardcode_into_libs=yes
2550 dynamic_linker="$host_os dld.so"
2551 shlibpath_var=LD_LIBRARY_PATH
2552 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2553 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2554 soname_spec='${libname}${release}${shared_ext}$major'
2555 if test "X$HPUX_IA64_MODE" = X32; then
2556 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2558 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2560 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2564 hardcode_into_libs=yes
2565 dynamic_linker="$host_os dld.sl"
2566 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2567 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2568 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2569 soname_spec='${libname}${release}${shared_ext}$major'
2570 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2571 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2575 dynamic_linker="$host_os dld.sl"
2576 shlibpath_var=SHLIB_PATH
2577 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2578 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2579 soname_spec='${libname}${release}${shared_ext}$major'
2582 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2583 postinstall_cmds='chmod 555 $lib'
2590 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2591 soname_spec='${libname}${release}${shared_ext}$major'
2592 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2593 shlibpath_var=LD_LIBRARY_PATH
2594 shlibpath_overrides_runpath=no
2595 hardcode_into_libs=yes
2598 irix5* | irix6* | nonstopux*)
2600 nonstopux*) version_type=nonstopux ;;
2602 if test "$lt_cv_prog_gnu_ld" = yes; then
2610 soname_spec='${libname}${release}${shared_ext}$major'
2611 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2613 irix5* | nonstopux*)
2617 case $LD in # libtool.m4 will add one of these switches to LD
2618 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2619 libsuff= shlibsuff= libmagic=32-bit;;
2620 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2621 libsuff=32 shlibsuff=N32 libmagic=N32;;
2622 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2623 libsuff=64 shlibsuff=64 libmagic=64-bit;;
2624 *) libsuff= shlibsuff= libmagic=never-match;;
2628 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2629 shlibpath_overrides_runpath=no
2630 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2631 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2632 hardcode_into_libs=yes
2635 # No shared lib support for Linux oldld, aout, or coff.
2636 linux*oldld* | linux*aout* | linux*coff*)
2640 # This must be Linux ELF.
2641 linux* | k*bsd*-gnu)
2645 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2646 soname_spec='${libname}${release}${shared_ext}$major'
2647 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2648 shlibpath_var=LD_LIBRARY_PATH
2649 shlibpath_overrides_runpath=no
2650 # This implies no fast_install, which is unacceptable.
2651 # Some rework will be needed to allow for fast_install
2652 # before this can be enabled.
2653 hardcode_into_libs=yes
2655 # Append ld.so.conf contents to the search path
2656 if test -f /etc/ld.so.conf; then
2657 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2658 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2661 # We used to test for /lib/ld.so.1 and disable shared libraries on
2662 # powerpc, because MkLinux only supported shared libraries with the
2663 # GNU dynamic linker. Since this was broken with cross compilers,
2664 # most powerpc-linux boxes support dynamic linking these days and
2665 # people can always --disable-shared, the test was removed, and we
2666 # assume the GNU/Linux dynamic linker is in use.
2667 dynamic_linker='GNU/Linux ld.so'
2674 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2675 soname_spec='${libname}${release}${shared_ext}$major'
2676 shlibpath_var=LD_LIBRARY_PATH
2677 shlibpath_overrides_runpath=no
2678 hardcode_into_libs=yes
2679 dynamic_linker='NetBSD ld.elf_so'
2686 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2687 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2688 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2689 dynamic_linker='NetBSD (a.out) ld.so'
2691 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2692 soname_spec='${libname}${release}${shared_ext}$major'
2693 dynamic_linker='NetBSD ld.elf_so'
2695 shlibpath_var=LD_LIBRARY_PATH
2696 shlibpath_overrides_runpath=yes
2697 hardcode_into_libs=yes
2702 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2703 shlibpath_var=LD_LIBRARY_PATH
2704 shlibpath_overrides_runpath=yes
2711 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2712 soname_spec='${libname}${release}${shared_ext}$major'
2713 shlibpath_var=LD_LIBRARY_PATH
2714 shlibpath_overrides_runpath=yes
2719 sys_lib_dlsearch_path_spec="/usr/lib"
2721 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2723 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2724 *) need_version=no ;;
2726 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2727 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2728 shlibpath_var=LD_LIBRARY_PATH
2729 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2731 openbsd2.[[89]] | openbsd2.[[89]].*)
2732 shlibpath_overrides_runpath=no
2735 shlibpath_overrides_runpath=yes
2739 shlibpath_overrides_runpath=yes
2744 libname_spec='$name'
2747 library_names_spec='$libname${shared_ext} $libname.a'
2748 dynamic_linker='OS/2 ld.exe'
2749 shlibpath_var=LIBPATH
2752 osf3* | osf4* | osf5*)
2756 soname_spec='${libname}${release}${shared_ext}$major'
2757 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2758 shlibpath_var=LD_LIBRARY_PATH
2759 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2760 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2767 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2768 soname_spec='${libname}${release}${shared_ext}$major'
2769 shlibpath_var=LD_LIBRARY_PATH
2770 shlibpath_overrides_runpath=yes
2771 hardcode_into_libs=yes
2772 # ldd complains unless libraries are executable
2773 postinstall_cmds='chmod +x $lib'
2778 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2779 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2780 shlibpath_var=LD_LIBRARY_PATH
2781 shlibpath_overrides_runpath=yes
2782 if test "$with_gnu_ld" = yes; then
2790 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2791 soname_spec='${libname}${release}${shared_ext}$major'
2792 shlibpath_var=LD_LIBRARY_PATH
2793 case $host_vendor in
2795 shlibpath_overrides_runpath=no
2797 export_dynamic_flag_spec='${wl}-Blargedynsym'
2798 runpath_var=LD_RUN_PATH
2806 shlibpath_overrides_runpath=no
2807 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2813 if test -d /usr/nec ;then
2815 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2816 soname_spec='$libname${shared_ext}.$major'
2817 shlibpath_var=LD_LIBRARY_PATH
2821 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2822 version_type=freebsd-elf
2825 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2826 soname_spec='${libname}${release}${shared_ext}$major'
2827 shlibpath_var=LD_LIBRARY_PATH
2828 hardcode_into_libs=yes
2829 if test "$with_gnu_ld" = yes; then
2830 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2831 shlibpath_overrides_runpath=no
2833 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2834 shlibpath_overrides_runpath=yes
2837 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2841 sys_lib_dlsearch_path_spec='/usr/lib'
2846 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2847 soname_spec='${libname}${release}${shared_ext}$major'
2848 shlibpath_var=LD_LIBRARY_PATH
2855 AC_MSG_RESULT([$dynamic_linker])
2856 test "$dynamic_linker" = no && can_build_shared=no
2858 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2859 if test "$GCC" = yes; then
2860 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2862 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2867 AC_DEFUN([_LT_AC_TAGCONFIG],
2868 [AC_ARG_WITH([tags],
2869 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2870 [include additional configurations @<:@automatic@:>@])],
2871 [tagnames="$withval"])
2873 if test -f "$ltmain" && test -n "$tagnames"; then
2874 if test ! -f "${ofile}"; then
2875 AC_MSG_WARN([output file `$ofile' does not exist])
2878 if test -z "$LTCC"; then
2879 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2880 if test -z "$LTCC"; then
2881 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2883 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2886 if test -z "$LTCFLAGS"; then
2887 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2890 # Extract list of available tagged configurations in $ofile.
2891 # Note that this assumes the entire list is on one line.
2892 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2894 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2895 for tagname in $tagnames; do
2897 # Check whether tagname contains only valid characters
2898 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2900 *) AC_MSG_ERROR([invalid tag name: $tagname])
2904 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2906 AC_MSG_ERROR([tag name \"$tagname\" already exists])
2909 # Update the list of available tags.
2910 if test -n "$tagname"; then
2911 echo appending configuration tag \"$tagname\" to $ofile
2915 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2916 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2917 (test "X$CXX" != "Xg++"))) ; then
2918 AC_LIBTOOL_LANG_CXX_CONFIG
2925 if test -n "$F77" && test "X$F77" != "Xno"; then
2926 AC_LIBTOOL_LANG_F77_CONFIG
2933 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2934 AC_LIBTOOL_LANG_GCJ_CONFIG
2941 AC_LIBTOOL_LANG_RC_CONFIG
2945 AC_MSG_ERROR([Unsupported tag name: $tagname])
2949 # Append the new tag name to the list of available tags.
2950 if test -n "$tagname" ; then
2951 available_tags="$available_tags $tagname"
2957 # Now substitute the updated list of available tags.
2958 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2959 mv "${ofile}T" "$ofile"
2963 AC_MSG_ERROR([unable to update list of available tagged configurations.])
2966 ])# _LT_AC_TAGCONFIG
2971 # enable checks for dlopen support
2972 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2973 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2974 ])# AC_LIBTOOL_DLOPEN
2977 # AC_LIBTOOL_WIN32_DLL
2978 # --------------------
2979 # declare package support for building win32 DLLs
2980 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2981 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2982 ])# AC_LIBTOOL_WIN32_DLL
2985 # AC_ENABLE_SHARED([DEFAULT])
2986 # ---------------------------
2987 # implement the --enable-shared flag
2988 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2989 AC_DEFUN([AC_ENABLE_SHARED],
2990 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2991 AC_ARG_ENABLE([shared],
2992 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2993 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2994 [p=${PACKAGE-default}
2996 yes) enable_shared=yes ;;
2997 no) enable_shared=no ;;
3000 # Look at the argument we got. We use all the common list separators.
3001 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3002 for pkg in $enableval; do
3004 if test "X$pkg" = "X$p"; then
3011 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3012 ])# AC_ENABLE_SHARED
3017 # set the default shared flag to --disable-shared
3018 AC_DEFUN([AC_DISABLE_SHARED],
3019 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3020 AC_ENABLE_SHARED(no)
3021 ])# AC_DISABLE_SHARED
3024 # AC_ENABLE_STATIC([DEFAULT])
3025 # ---------------------------
3026 # implement the --enable-static flag
3027 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3028 AC_DEFUN([AC_ENABLE_STATIC],
3029 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3030 AC_ARG_ENABLE([static],
3031 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3032 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3033 [p=${PACKAGE-default}
3035 yes) enable_static=yes ;;
3036 no) enable_static=no ;;
3039 # Look at the argument we got. We use all the common list separators.
3040 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3041 for pkg in $enableval; do
3043 if test "X$pkg" = "X$p"; then
3050 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
3051 ])# AC_ENABLE_STATIC
3056 # set the default static flag to --disable-static
3057 AC_DEFUN([AC_DISABLE_STATIC],
3058 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3059 AC_ENABLE_STATIC(no)
3060 ])# AC_DISABLE_STATIC
3063 # AC_ENABLE_FAST_INSTALL([DEFAULT])
3064 # ---------------------------------
3065 # implement the --enable-fast-install flag
3066 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3067 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3068 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3069 AC_ARG_ENABLE([fast-install],
3070 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3071 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3072 [p=${PACKAGE-default}
3074 yes) enable_fast_install=yes ;;
3075 no) enable_fast_install=no ;;
3077 enable_fast_install=no
3078 # Look at the argument we got. We use all the common list separators.
3079 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3080 for pkg in $enableval; do
3082 if test "X$pkg" = "X$p"; then
3083 enable_fast_install=yes
3089 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3090 ])# AC_ENABLE_FAST_INSTALL
3093 # AC_DISABLE_FAST_INSTALL
3094 # -----------------------
3095 # set the default to --disable-fast-install
3096 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3097 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3098 AC_ENABLE_FAST_INSTALL(no)
3099 ])# AC_DISABLE_FAST_INSTALL
3102 # AC_LIBTOOL_PICMODE([MODE])
3103 # --------------------------
3104 # implement the --with-pic flag
3105 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
3106 AC_DEFUN([AC_LIBTOOL_PICMODE],
3107 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3108 pic_mode=ifelse($#,1,$1,default)
3109 ])# AC_LIBTOOL_PICMODE
3114 # This is predefined starting with Autoconf 2.54, so this conditional
3115 # definition can be removed once we require Autoconf 2.54 or later.
3116 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3117 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3118 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3119 then ac_cv_prog_egrep='grep -E'
3120 else ac_cv_prog_egrep='egrep'
3122 EGREP=$ac_cv_prog_egrep
3127 # AC_PATH_TOOL_PREFIX
3128 # -------------------
3129 # find a file program which can recognise shared library
3130 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3131 [AC_REQUIRE([AC_PROG_EGREP])dnl
3132 AC_MSG_CHECKING([for $1])
3133 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3135 [[\\/*] | ?:[\\/]*])
3136 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3139 lt_save_MAGIC_CMD="$MAGIC_CMD"
3140 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3141 dnl $ac_dummy forces splitting on constant user-supplied paths.
3142 dnl POSIX.2 word splitting is done only on the output of word expansions,
3143 dnl not every word. This closes a longstanding sh security hole.
3144 ac_dummy="ifelse([$2], , $PATH, [$2])"
3145 for ac_dir in $ac_dummy; do
3147 test -z "$ac_dir" && ac_dir=.
3148 if test -f $ac_dir/$1; then
3149 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3150 if test -n "$file_magic_test_file"; then
3151 case $deplibs_check_method in
3153 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3154 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3155 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3156 $EGREP "$file_magic_regex" > /dev/null; then
3161 *** Warning: the command libtool uses to detect shared libraries,
3162 *** $file_magic_cmd, produces output that libtool cannot recognize.
3163 *** The result is that libtool may fail to recognize shared libraries
3164 *** as such. This will affect the creation of libtool libraries that
3165 *** depend on shared libraries, but programs linked with such libtool
3166 *** libraries will work regardless of this problem. Nevertheless, you
3167 *** may want to report the problem to your system manager and/or to
3168 *** bug-libtool@gnu.org
3178 MAGIC_CMD="$lt_save_MAGIC_CMD"
3181 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3182 if test -n "$MAGIC_CMD"; then
3183 AC_MSG_RESULT($MAGIC_CMD)
3187 ])# AC_PATH_TOOL_PREFIX
3192 # find a file program which can recognise a shared library
3193 AC_DEFUN([AC_PATH_MAGIC],
3194 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3195 if test -z "$lt_cv_path_MAGIC_CMD"; then
3196 if test -n "$ac_tool_prefix"; then
3197 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3207 # find the pathname to the GNU or non-GNU linker
3208 AC_DEFUN([AC_PROG_LD],
3209 [AC_ARG_WITH([gnu-ld],
3210 [AC_HELP_STRING([--with-gnu-ld],
3211 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3212 [test "$withval" = no || with_gnu_ld=yes],
3214 AC_REQUIRE([LT_AC_PROG_SED])dnl
3215 AC_REQUIRE([AC_PROG_CC])dnl
3216 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3217 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3219 if test "$GCC" = yes; then
3220 # Check if gcc -print-prog-name=ld gives a path.
3221 AC_MSG_CHECKING([for ld used by $CC])
3224 # gcc leaves a trailing carriage return which upsets mingw
3225 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3227 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3230 # Accept absolute paths.
3231 [[\\/]]* | ?:[[\\/]]*)
3232 re_direlt='/[[^/]][[^/]]*/\.\./'
3233 # Canonicalize the pathname of ld
3234 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3235 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3236 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3238 test -z "$LD" && LD="$ac_prog"
3241 # If it fails, then pretend we aren't using GCC.
3245 # If it is relative, then search for the first ld in PATH.
3249 elif test "$with_gnu_ld" = yes; then
3250 AC_MSG_CHECKING([for GNU ld])
3252 AC_MSG_CHECKING([for non-GNU ld])
3254 AC_CACHE_VAL(lt_cv_path_LD,
3255 [if test -z "$LD"; then
3256 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3257 for ac_dir in $PATH; do
3259 test -z "$ac_dir" && ac_dir=.
3260 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3261 lt_cv_path_LD="$ac_dir/$ac_prog"
3262 # Check to see if the program is GNU ld. I'd rather use --version,
3263 # but apparently some variants of GNU ld only accept -v.
3264 # Break only if it was the GNU/non-GNU ld that we prefer.
3265 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3266 *GNU* | *'with BFD'*)
3267 test "$with_gnu_ld" != no && break
3270 test "$with_gnu_ld" != yes && break
3277 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3280 if test -n "$LD"; then
3285 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3292 AC_DEFUN([AC_PROG_LD_GNU],
3293 [AC_REQUIRE([AC_PROG_EGREP])dnl
3294 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3295 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3296 case `$LD -v 2>&1 </dev/null` in
3297 *GNU* | *'with BFD'*)
3298 lt_cv_prog_gnu_ld=yes
3301 lt_cv_prog_gnu_ld=no
3304 with_gnu_ld=$lt_cv_prog_gnu_ld
3308 # AC_PROG_LD_RELOAD_FLAG
3309 # ----------------------
3310 # find reload flag for linker
3311 # -- PORTME Some linkers may need a different reload flag.
3312 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3313 [AC_CACHE_CHECK([for $LD option to reload object files],
3314 lt_cv_ld_reload_flag,
3315 [lt_cv_ld_reload_flag='-r'])
3316 reload_flag=$lt_cv_ld_reload_flag
3317 case $reload_flag in
3319 *) reload_flag=" $reload_flag" ;;
3321 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3324 if test "$GCC" = yes; then
3325 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3327 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3331 ])# AC_PROG_LD_RELOAD_FLAG
3334 # AC_DEPLIBS_CHECK_METHOD
3335 # -----------------------
3336 # how to check for library dependencies
3337 # -- PORTME fill in with the dynamic library characteristics
3338 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3339 [AC_CACHE_CHECK([how to recognise dependent libraries],
3340 lt_cv_deplibs_check_method,
3341 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3342 lt_cv_file_magic_test_file=
3343 lt_cv_deplibs_check_method='unknown'
3344 # Need to set the preceding variable on all platforms that support
3345 # interlibrary dependencies.
3346 # 'none' -- dependencies not supported.
3347 # `unknown' -- same as none, but documents that we really don't know.
3348 # 'pass_all' -- all dependencies passed with no checks.
3349 # 'test_compile' -- check by making test program.
3350 # 'file_magic [[regex]]' -- check by looking for files in library path
3351 # which responds to the $file_magic_cmd with a given extended regex.
3352 # If you have `file' or equivalent on your system and you're not sure
3353 # whether `pass_all' will *always* work, you probably want this one.
3357 lt_cv_deplibs_check_method=pass_all
3361 lt_cv_deplibs_check_method=pass_all
3365 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3366 lt_cv_file_magic_cmd='/usr/bin/file -L'
3367 lt_cv_file_magic_test_file=/shlib/libc.so
3371 # func_win32_libid is a shell function defined in ltmain.sh
3372 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3373 lt_cv_file_magic_cmd='func_win32_libid'
3377 # Base MSYS/MinGW do not provide the 'file' command needed by
3378 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3379 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3380 lt_cv_file_magic_cmd='$OBJDUMP -f'
3383 darwin* | rhapsody*)
3384 lt_cv_deplibs_check_method=pass_all
3387 freebsd* | dragonfly*)
3388 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3391 # Not sure whether the presence of OpenBSD here was a mistake.
3392 # Let's accept both of them until this is cleared up.
3393 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3394 lt_cv_file_magic_cmd=/usr/bin/file
3395 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3399 lt_cv_deplibs_check_method=pass_all
3404 lt_cv_deplibs_check_method=pass_all
3407 hpux10.20* | hpux11*)
3408 lt_cv_file_magic_cmd=/usr/bin/file
3411 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3412 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3415 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3416 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3419 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3420 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3426 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3427 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3430 irix5* | irix6* | nonstopux*)
3432 *-32|*"-32 ") libmagic=32-bit;;
3433 *-n32|*"-n32 ") libmagic=N32;;
3434 *-64|*"-64 ") libmagic=64-bit;;
3435 *) libmagic=never-match;;
3437 lt_cv_deplibs_check_method=pass_all
3440 # This must be Linux ELF.
3441 linux* | k*bsd*-gnu)
3442 lt_cv_deplibs_check_method=pass_all
3445 netbsd* | netbsdelf*-gnu)
3446 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3447 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3449 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3454 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3455 lt_cv_file_magic_cmd=/usr/bin/file
3456 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3460 lt_cv_deplibs_check_method=unknown
3464 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3465 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3467 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3471 osf3* | osf4* | osf5*)
3472 lt_cv_deplibs_check_method=pass_all
3476 lt_cv_deplibs_check_method=pass_all
3480 case $host_vendor in
3482 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]]'
3483 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3486 lt_cv_deplibs_check_method=pass_all
3489 lt_cv_file_magic_cmd='/bin/file'
3490 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3493 lt_cv_file_magic_cmd='/bin/file'
3494 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3495 lt_cv_file_magic_test_file=/lib/libc.so
3498 lt_cv_deplibs_check_method=pass_all
3501 lt_cv_deplibs_check_method=pass_all
3506 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3507 lt_cv_deplibs_check_method=pass_all
3511 file_magic_cmd=$lt_cv_file_magic_cmd
3512 deplibs_check_method=$lt_cv_deplibs_check_method
3513 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3514 ])# AC_DEPLIBS_CHECK_METHOD
3519 # find the pathname to a BSD-compatible name lister
3520 AC_DEFUN([AC_PROG_NM],
3521 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3522 [if test -n "$NM"; then
3523 # Let the user override the test.
3526 lt_nm_to_check="${ac_tool_prefix}nm"
3527 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3528 lt_nm_to_check="$lt_nm_to_check nm"
3530 for lt_tmp_nm in $lt_nm_to_check; do
3531 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3532 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3534 test -z "$ac_dir" && ac_dir=.
3535 tmp_nm="$ac_dir/$lt_tmp_nm"
3536 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3537 # Check to see if the nm accepts a BSD-compat flag.
3538 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3539 # nm: unknown option "B" ignored
3540 # Tru64's nm complains that /dev/null is an invalid object file
3541 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3542 */dev/null* | *'Invalid file or object type'*)
3543 lt_cv_path_NM="$tmp_nm -B"
3547 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3549 lt_cv_path_NM="$tmp_nm -p"
3553 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3554 continue # so that we can try to find one that supports BSD flags
3563 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3571 # check for math library
3572 AC_DEFUN([AC_CHECK_LIBM],
3573 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3576 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3577 # These system don't have libm, or don't need it
3580 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3581 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3584 AC_CHECK_LIB(m, cos, LIBM="-lm")
3590 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3591 # -----------------------------------
3592 # sets LIBLTDL to the link flags for the libltdl convenience library and
3593 # LTDLINCL to the include flags for the libltdl header and adds
3594 # --enable-ltdl-convenience to the configure arguments. Note that
3595 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3596 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
3597 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3598 # (note the single quotes!). If your package is not flat and you're not
3599 # using automake, define top_builddir and top_srcdir appropriately in
3601 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3602 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3603 case $enable_ltdl_convenience in
3604 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3605 "") enable_ltdl_convenience=yes
3606 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3608 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3609 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3610 # For backwards non-gettext consistent compatibility...
3612 ])# AC_LIBLTDL_CONVENIENCE
3615 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3616 # -----------------------------------
3617 # sets LIBLTDL to the link flags for the libltdl installable library and
3618 # LTDLINCL to the include flags for the libltdl header and adds
3619 # --enable-ltdl-install to the configure arguments. Note that
3620 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
3621 # and an installed libltdl is not found, it is assumed to be `libltdl'.
3622 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3623 # '${top_srcdir}/' (note the single quotes!). If your package is not
3624 # flat and you're not using automake, define top_builddir and top_srcdir
3625 # appropriately in the Makefiles.
3626 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3627 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3628 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3629 AC_CHECK_LIB(ltdl, lt_dlinit,
3630 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3631 [if test x"$enable_ltdl_install" = xno; then
3632 AC_MSG_WARN([libltdl not installed, but installation disabled])
3634 enable_ltdl_install=yes
3637 if test x"$enable_ltdl_install" = x"yes"; then
3638 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3639 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3640 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3642 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3646 # For backwards non-gettext consistent compatibility...
3648 ])# AC_LIBLTDL_INSTALLABLE
3653 # enable support for C++ libraries
3654 AC_DEFUN([AC_LIBTOOL_CXX],
3655 [AC_REQUIRE([_LT_AC_LANG_CXX])
3661 AC_DEFUN([_LT_AC_LANG_CXX],
3662 [AC_REQUIRE([AC_PROG_CXX])
3663 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3664 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3667 # _LT_AC_PROG_CXXCPP
3668 # ------------------
3669 AC_DEFUN([_LT_AC_PROG_CXXCPP],
3671 AC_REQUIRE([AC_PROG_CXX])
3672 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3673 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3674 (test "X$CXX" != "Xg++"))) ; then
3677 ])# _LT_AC_PROG_CXXCPP
3681 # enable support for Fortran 77 libraries
3682 AC_DEFUN([AC_LIBTOOL_F77],
3683 [AC_REQUIRE([_LT_AC_LANG_F77])
3689 AC_DEFUN([_LT_AC_LANG_F77],
3690 [AC_REQUIRE([AC_PROG_F77])
3691 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3697 # enable support for GCJ libraries
3698 AC_DEFUN([AC_LIBTOOL_GCJ],
3699 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3705 AC_DEFUN([_LT_AC_LANG_GCJ],
3706 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3707 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3708 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3709 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3710 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3711 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3712 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3718 # enable support for Windows resource files
3719 AC_DEFUN([AC_LIBTOOL_RC],
3720 [AC_REQUIRE([LT_AC_PROG_RC])
3721 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3725 # AC_LIBTOOL_LANG_C_CONFIG
3726 # ------------------------
3727 # Ensure that the configuration vars for the C compiler are
3728 # suitably defined. Those variables are subsequently used by
3729 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3730 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3731 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3735 # Source file extension for C test sources.
3738 # Object file extension for compiled C test sources.
3740 _LT_AC_TAGVAR(objext, $1)=$objext
3742 # Code to be used in simple compile tests
3743 lt_simple_compile_test_code="int some_variable = 0;\n"
3745 # Code to be used in simple link tests
3746 lt_simple_link_test_code='int main(){return(0);}\n'
3750 # save warnings/boilerplate of simple test code
3751 _LT_COMPILER_BOILERPLATE
3752 _LT_LINKER_BOILERPLATE
3754 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3755 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3756 AC_LIBTOOL_PROG_CC_C_O($1)
3757 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3758 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3759 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3760 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3761 AC_LIBTOOL_SYS_LIB_STRIP
3762 AC_LIBTOOL_DLOPEN_SELF
3764 # Report which library types will actually be built
3765 AC_MSG_CHECKING([if libtool supports shared libraries])
3766 AC_MSG_RESULT([$can_build_shared])
3768 AC_MSG_CHECKING([whether to build shared libraries])
3769 test "$can_build_shared" = "no" && enable_shared=no
3771 # On AIX, shared libraries and static libraries use the same namespace, and
3772 # are all built from PIC.
3775 test "$enable_shared" = yes && enable_static=no
3776 if test -n "$RANLIB"; then
3777 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3778 postinstall_cmds='$RANLIB $lib'
3783 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3784 test "$enable_shared" = yes && enable_static=no
3788 AC_MSG_RESULT([$enable_shared])
3790 AC_MSG_CHECKING([whether to build static libraries])
3791 # Make sure either enable_shared or enable_static is yes.
3792 test "$enable_shared" = yes || enable_static=yes
3793 AC_MSG_RESULT([$enable_static])
3795 AC_LIBTOOL_CONFIG($1)
3799 ])# AC_LIBTOOL_LANG_C_CONFIG
3802 # AC_LIBTOOL_LANG_CXX_CONFIG
3803 # --------------------------
3804 # Ensure that the configuration vars for the C compiler are
3805 # suitably defined. Those variables are subsequently used by
3806 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3807 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3808 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3810 AC_REQUIRE([AC_PROG_CXX])
3811 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3813 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3814 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3815 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3816 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3817 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3818 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3819 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3820 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3821 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3822 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3823 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3824 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3825 _LT_AC_TAGVAR(module_cmds, $1)=
3826 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3827 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3828 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3829 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3830 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3831 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3833 # Dependencies to place before and after the object being linked:
3834 _LT_AC_TAGVAR(predep_objects, $1)=
3835 _LT_AC_TAGVAR(postdep_objects, $1)=
3836 _LT_AC_TAGVAR(predeps, $1)=
3837 _LT_AC_TAGVAR(postdeps, $1)=
3838 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3840 # Source file extension for C++ test sources.
3843 # Object file extension for compiled C++ test sources.
3845 _LT_AC_TAGVAR(objext, $1)=$objext
3847 # Code to be used in simple compile tests
3848 lt_simple_compile_test_code="int some_variable = 0;\n"
3850 # Code to be used in simple link tests
3851 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
3853 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3856 # save warnings/boilerplate of simple test code
3857 _LT_COMPILER_BOILERPLATE
3858 _LT_LINKER_BOILERPLATE
3860 # Allow CC to be a program name with arguments.
3865 lt_save_with_gnu_ld=$with_gnu_ld
3866 lt_save_path_LD=$lt_cv_path_LD
3867 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3868 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3870 $as_unset lt_cv_prog_gnu_ld
3872 if test -n "${lt_cv_path_LDCXX+set}"; then
3873 lt_cv_path_LD=$lt_cv_path_LDCXX
3875 $as_unset lt_cv_path_LD
3877 test -z "${LDCXX+set}" || LD=$LDCXX
3880 _LT_AC_TAGVAR(compiler, $1)=$CC
3881 _LT_CC_BASENAME([$compiler])
3883 # We don't want -fno-exception wen compiling C++ code, so set the
3884 # no_builtin_flag separately
3885 if test "$GXX" = yes; then
3886 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3888 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3891 if test "$GXX" = yes; then
3892 # Set up default GNU C++ configuration
3896 # Check if GNU C++ uses GNU ld as the underlying linker, since the
3897 # archiving commands below assume that GNU ld is being used.
3898 if test "$with_gnu_ld" = yes; then
3899 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3900 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3902 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3903 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3905 # If archive_cmds runs LD, not CC, wlarc should be empty
3906 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3907 # investigate it a little bit more. (MM)
3910 # ancient GNU ld didn't support --whole-archive et. al.
3911 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3912 grep 'no-whole-archive' > /dev/null; then
3913 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3915 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3921 # A generic and very simple default shared library creation
3922 # command for GNU C++ for the case where it uses the native
3923 # linker, instead of GNU ld. If possible, this setting should
3924 # overridden to take advantage of the native linker features on
3925 # the platform it is being used on.
3926 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3929 # Commands to make compiler produce verbose output that lists
3930 # what "hidden" libraries, object files and flags are used when
3931 # linking a shared library.
3932 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3940 # PORTME: fill in a description of your system's C++ link characteristics
3941 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3942 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3945 # FIXME: insert proper C++ library support
3946 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3949 if test "$host_cpu" = ia64; then
3950 # On IA64, the linker does run time linking by default, so we don't
3951 # have to do anything special.
3952 aix_use_runtimelinking=no
3953 exp_sym_flag='-Bexport'
3956 aix_use_runtimelinking=no
3958 # Test if we are trying to use run time linking or normal
3959 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3960 # need to do runtime linking.
3961 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3962 for ld_flag in $LDFLAGS; do
3965 aix_use_runtimelinking=yes
3973 exp_sym_flag='-bexport'
3974 no_entry_flag='-bnoentry'
3977 # When large executables or shared objects are built, AIX ld can
3978 # have problems creating the table of contents. If linking a library
3979 # or program results in "error TOC overflow" add -mminimal-toc to
3980 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
3981 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3983 _LT_AC_TAGVAR(archive_cmds, $1)=''
3984 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3985 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3986 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3988 if test "$GXX" = yes; then
3989 case $host_os in aix4.[[012]]|aix4.[[012]].*)
3990 # We only want to do this on AIX 4.2 and lower, the check
3991 # below for broken collect2 doesn't work under 4.3+
3992 collect2name=`${CC} -print-prog-name=collect2`
3993 if test -f "$collect2name" && \
3994 strings "$collect2name" | grep resolve_lib_name >/dev/null
3996 # We have reworked collect2
3997 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3999 # We have old collect2
4000 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4001 # It fails to find uninstalled libraries when the uninstalled
4002 # path is not listed in the libpath. Setting hardcode_minus_L
4003 # to unsupported forces relinking
4004 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4005 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4006 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4010 shared_flag='-shared'
4011 if test "$aix_use_runtimelinking" = yes; then
4012 shared_flag="$shared_flag "'${wl}-G'
4016 if test "$host_cpu" = ia64; then
4017 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4018 # chokes on -Wl,-G. The following line is correct:
4021 if test "$aix_use_runtimelinking" = yes; then
4022 shared_flag='${wl}-G'
4024 shared_flag='${wl}-bM:SRE'
4029 # It seems that -bexpall does not export symbols beginning with
4030 # underscore (_), so it is better to generate a list of symbols to export.
4031 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4032 if test "$aix_use_runtimelinking" = yes; then
4033 # Warning - without using the other runtime loading flags (-brtl),
4034 # -berok will link without error, but may produce a broken library.
4035 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4036 # Determine the default libpath from the value encoded in an empty executable.
4037 _LT_AC_SYS_LIBPATH_AIX
4038 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4040 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4042 if test "$host_cpu" = ia64; then
4043 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4044 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4045 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
4047 # Determine the default libpath from the value encoded in an empty executable.
4048 _LT_AC_SYS_LIBPATH_AIX
4049 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4050 # Warning - without using the other run time loading flags,
4051 # -berok will link without error, but may produce a broken library.
4052 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4053 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4054 # Exported symbols can be pulled into shared objects from archives
4055 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4056 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4057 # This is similar to how AIX traditionally builds its shared libraries.
4058 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4064 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4065 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4066 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4067 # support --undefined. This deserves some investigation. FIXME
4068 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4070 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4075 case $cc_basename in
4077 # FIXME: insert proper C++ library support
4078 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4083 cygwin* | mingw* | pw32*)
4084 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4085 # as there is no search path for DLLs.
4086 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4087 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4088 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4089 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4091 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4092 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4093 # If the export-symbols file already is a .def file (1st line
4094 # is EXPORTS), use it as is; otherwise, prepend...
4095 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4096 cp $export_symbols $output_objdir/$soname.def;
4098 echo EXPORTS > $output_objdir/$soname.def;
4099 cat $export_symbols >> $output_objdir/$soname.def;
4101 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4103 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4106 darwin* | rhapsody*)
4108 rhapsody* | darwin1.[[012]])
4109 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4112 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4113 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4115 case ${MACOSX_DEPLOYMENT_TARGET} in
4117 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4120 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4126 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4127 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4128 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4129 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4130 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4131 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4133 if test "$GXX" = yes ; then
4134 lt_int_apple_cc_single_mod=no
4135 output_verbose_link_cmd='echo'
4136 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
4137 lt_int_apple_cc_single_mod=yes
4139 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4140 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4142 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4144 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4145 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4146 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4147 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4149 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4151 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4153 case $cc_basename in
4155 output_verbose_link_cmd='echo'
4156 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
4157 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4158 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4159 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4160 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4163 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4170 case $cc_basename in
4172 # FIXME: insert proper C++ library support
4173 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4176 # Green Hills C++ Compiler
4177 # FIXME: insert proper C++ library support
4178 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4181 # FIXME: insert proper C++ library support
4182 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4187 # C++ shared libraries reported to be fairly broken before switch to ELF
4188 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4191 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4193 freebsd* | dragonfly*)
4194 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4196 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4201 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4202 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4203 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4204 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4205 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4206 # but as the default
4207 # location of the library.
4209 case $cc_basename in
4211 # FIXME: insert proper C++ library support
4212 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4215 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4216 # Commands to make compiler produce verbose output that lists
4217 # what "hidden" libraries, object files and flags are used when
4218 # linking a shared library.
4220 # There doesn't appear to be a way to prevent this compiler from
4221 # explicitly linking system object files so we need to strip them
4222 # from the output so that they don't get included in the library
4224 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4227 if test "$GXX" = yes; then
4228 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4230 # FIXME: insert proper C++ library support
4231 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4237 if test $with_gnu_ld = no; then
4238 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4239 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4243 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4246 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4252 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4253 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4256 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4257 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4258 # but as the default
4259 # location of the library.
4263 case $cc_basename in
4265 # FIXME: insert proper C++ library support
4266 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4271 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4274 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4277 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4280 # Commands to make compiler produce verbose output that lists
4281 # what "hidden" libraries, object files and flags are used when
4282 # linking a shared library.
4284 # There doesn't appear to be a way to prevent this compiler from
4285 # explicitly linking system object files so we need to strip them
4286 # from the output so that they don't get included in the library
4288 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4291 if test "$GXX" = yes; then
4292 if test $with_gnu_ld = no; then
4295 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4298 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4301 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4306 # FIXME: insert proper C++ library support
4307 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4313 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4314 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4315 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4316 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4317 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4318 # Instead, shared libraries are loaded at an image base (0x10000000 by
4319 # default) and relocated if they conflict, which is a slow very memory
4320 # consuming and fragmenting process. To avoid this, we pick a random,
4321 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4322 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4323 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4324 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4327 case $cc_basename in
4330 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4332 # Archives containing C++ object files must be created using
4333 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
4334 # necessary to make sure instantiated templates are included
4336 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4339 if test "$GXX" = yes; then
4340 if test "$with_gnu_ld" = no; then
4341 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4343 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4346 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4349 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4350 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4352 linux* | k*bsd*-gnu)
4353 case $cc_basename in
4355 # Kuck and Associates, Inc. (KAI) C++ Compiler
4357 # KCC will only create a shared library if the output file
4358 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4359 # to its proper name (with version) after linking.
4360 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4361 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
4362 # Commands to make compiler produce verbose output that lists
4363 # what "hidden" libraries, object files and flags are used when
4364 # linking a shared library.
4366 # There doesn't appear to be a way to prevent this compiler from
4367 # explicitly linking system object files so we need to strip them
4368 # from the output so that they don't get included in the library
4370 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4372 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4373 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4375 # Archives containing C++ object files must be created using
4376 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4377 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4382 # version 8.0 and above of icpc choke on multiply defined symbols
4383 # if we add $predep_objects and $postdep_objects, however 7.1 and
4384 # earlier do not add the objects themselves.
4385 case `$CC -V 2>&1` in
4387 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4388 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4390 *) # Version 8.0 or newer
4393 ia64*) tmp_idyn=' -i_dynamic';;
4395 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4396 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4399 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4400 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4401 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4402 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4405 # Portland Group C++ compiler
4406 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4407 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
4409 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4410 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4411 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4415 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4416 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
4418 runpath_var=LD_RUN_PATH
4419 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4420 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4422 # Commands to make compiler produce verbose output that lists
4423 # what "hidden" libraries, object files and flags are used when
4424 # linking a shared library.
4426 # There doesn't appear to be a way to prevent this compiler from
4427 # explicitly linking system object files so we need to strip them
4428 # from the output so that they don't get included in the library
4430 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4435 # FIXME: insert proper C++ library support
4436 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4439 # FIXME: insert proper C++ library support
4440 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4443 case $cc_basename in
4445 # FIXME: insert proper C++ library support
4446 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4449 # FIXME: insert proper C++ library support
4450 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4454 netbsd* | netbsdelf*-gnu)
4455 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4456 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4458 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4459 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4460 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4462 # Workaround some broken pre-1.5 toolchains
4463 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4466 # C++ shared libraries are fairly broken
4467 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4470 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4471 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4472 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4473 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4474 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4475 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
4476 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4477 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4479 output_verbose_link_cmd='echo'
4482 case $cc_basename in
4484 # Kuck and Associates, Inc. (KAI) C++ Compiler
4486 # KCC will only create a shared library if the output file
4487 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4488 # to its proper name (with version) after linking.
4489 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4491 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4492 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4494 # Archives containing C++ object files must be created using
4495 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4496 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4500 # Rational C++ 2.4.1
4501 # FIXME: insert proper C++ library support
4502 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4505 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4506 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4508 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4509 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4511 # Commands to make compiler produce verbose output that lists
4512 # what "hidden" libraries, object files and flags are used when
4513 # linking a shared library.
4515 # There doesn't appear to be a way to prevent this compiler from
4516 # explicitly linking system object files so we need to strip them
4517 # from the output so that they don't get included in the library
4519 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4522 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4523 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4524 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4526 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4527 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4529 # Commands to make compiler produce verbose output that lists
4530 # what "hidden" libraries, object files and flags are used when
4531 # linking a shared library.
4532 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4535 # FIXME: insert proper C++ library support
4536 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4542 case $cc_basename in
4544 # Kuck and Associates, Inc. (KAI) C++ Compiler
4546 # KCC will only create a shared library if the output file
4547 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4548 # to its proper name (with version) after linking.
4549 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4551 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4552 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4554 # Archives containing C++ object files must be created using
4555 # the KAI C++ compiler.
4556 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4559 # Rational C++ 2.4.1
4560 # FIXME: insert proper C++ library support
4561 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4564 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4565 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4566 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4567 echo "-hidden">> $lib.exp~
4568 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
4571 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4572 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4574 # Commands to make compiler produce verbose output that lists
4575 # what "hidden" libraries, object files and flags are used when
4576 # linking a shared library.
4578 # There doesn't appear to be a way to prevent this compiler from
4579 # explicitly linking system object files so we need to strip them
4580 # from the output so that they don't get included in the library
4582 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4585 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4586 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4587 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4589 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4590 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4592 # Commands to make compiler produce verbose output that lists
4593 # what "hidden" libraries, object files and flags are used when
4594 # linking a shared library.
4595 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4598 # FIXME: insert proper C++ library support
4599 _LT_AC_TAGVAR(ld_shlibs, $1)=no