1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17 [m4_warning([this file was generated for autoconf 2.65.
18 You have another version of autoconf. It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
22 # iconv.m4 serial 11 (gettext-0.18.1)
23 dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
24 dnl This file is free software; the Free Software Foundation
25 dnl gives unlimited permission to copy and/or distribute it,
26 dnl with or without modifications, as long as this notice is preserved.
28 dnl From Bruno Haible.
30 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
32 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
33 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
34 AC_REQUIRE([AC_LIB_RPATH])
36 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
38 AC_LIB_LINKFLAGS_BODY([iconv])
41 AC_DEFUN([AM_ICONV_LINK],
43 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
44 dnl those with the standalone portable GNU libiconv installed).
45 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
47 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
49 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
51 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
52 dnl because if the user has installed libiconv and not disabled its use
53 dnl via --without-libiconv-prefix, he wants to use it. The first
54 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
55 am_save_CPPFLAGS="$CPPFLAGS"
56 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
58 AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
59 am_cv_func_iconv="no, consider installing GNU libiconv"
61 AC_TRY_LINK([#include <stdlib.h>
63 [iconv_t cd = iconv_open("","");
64 iconv(cd,NULL,NULL,NULL,NULL);
66 [am_cv_func_iconv=yes])
67 if test "$am_cv_func_iconv" != yes; then
69 LIBS="$LIBS $LIBICONV"
70 AC_TRY_LINK([#include <stdlib.h>
72 [iconv_t cd = iconv_open("","");
73 iconv(cd,NULL,NULL,NULL,NULL);
76 [am_cv_func_iconv=yes])
80 if test "$am_cv_func_iconv" = yes; then
81 AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
82 dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
84 if test $am_cv_lib_iconv = yes; then
85 LIBS="$LIBS $LIBICONV"
92 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
95 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
96 if (cd_utf8_to_88591 != (iconv_t)(-1))
98 static const char input[] = "\342\202\254"; /* EURO SIGN */
100 const char *inptr = input;
101 size_t inbytesleft = strlen (input);
103 size_t outbytesleft = sizeof (buf);
104 size_t res = iconv (cd_utf8_to_88591,
105 (char **) &inptr, &inbytesleft,
106 &outptr, &outbytesleft);
111 /* Test against Solaris 10 bug: Failures are not distinguishable from
112 successful returns. */
114 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
115 if (cd_ascii_to_88591 != (iconv_t)(-1))
117 static const char input[] = "\263";
119 const char *inptr = input;
120 size_t inbytesleft = strlen (input);
122 size_t outbytesleft = sizeof (buf);
123 size_t res = iconv (cd_ascii_to_88591,
124 (char **) &inptr, &inbytesleft,
125 &outptr, &outbytesleft);
130 #if 0 /* This bug could be worked around by the caller. */
131 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
133 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
134 if (cd_88591_to_utf8 != (iconv_t)(-1))
136 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
138 const char *inptr = input;
139 size_t inbytesleft = strlen (input);
141 size_t outbytesleft = sizeof (buf);
142 size_t res = iconv (cd_88591_to_utf8,
143 (char **) &inptr, &inbytesleft,
144 &outptr, &outbytesleft);
150 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
152 if (/* Try standardized names. */
153 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
154 /* Try IRIX, OSF/1 names. */
155 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
157 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
158 /* Try HP-UX names. */
159 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
162 }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
164 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
165 *) am_cv_func_iconv_works="guessing yes" ;;
169 case "$am_cv_func_iconv_works" in
170 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
171 *) am_func_iconv=yes ;;
174 am_func_iconv=no am_cv_lib_iconv=no
176 if test "$am_func_iconv" = yes; then
177 AC_DEFINE([HAVE_ICONV], [1],
178 [Define if you have the iconv() function and it works.])
180 if test "$am_cv_lib_iconv" = yes; then
181 AC_MSG_CHECKING([how to link with libiconv])
182 AC_MSG_RESULT([$LIBICONV])
184 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
186 CPPFLAGS="$am_save_CPPFLAGS"
191 AC_SUBST([LTLIBICONV])
194 dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
195 dnl avoid warnings like
196 dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
197 dnl This is tricky because of the way 'aclocal' is implemented:
198 dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
199 dnl Otherwise aclocal's initial scan pass would miss the macro definition.
200 dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
201 dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
203 m4_define([gl_iconv_AC_DEFUN],
204 m4_version_prereq([2.64],
209 gl_iconv_AC_DEFUN([AM_ICONV],
212 if test "$am_cv_func_iconv" = yes; then
213 AC_MSG_CHECKING([for iconv declaration])
214 AC_CACHE_VAL([am_cv_proto_iconv], [
222 #if defined(__STDC__) || defined(__cplusplus)
223 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
227 ], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
228 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
229 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
232 AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
233 [Define as const if the declaration of iconv() needs const.])
237 # lib-ld.m4 serial 4 (gettext-0.18)
238 dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
239 dnl This file is free software; the Free Software Foundation
240 dnl gives unlimited permission to copy and/or distribute it,
241 dnl with or without modifications, as long as this notice is preserved.
243 dnl Subroutines of libtool.m4,
244 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
247 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
248 AC_DEFUN([AC_LIB_PROG_LD_GNU],
249 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
250 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
251 case `$LD -v 2>&1 </dev/null` in
252 *GNU* | *'with BFD'*)
253 acl_cv_prog_gnu_ld=yes ;;
255 acl_cv_prog_gnu_ld=no ;;
257 with_gnu_ld=$acl_cv_prog_gnu_ld
260 dnl From libtool-1.4. Sets the variable LD.
261 AC_DEFUN([AC_LIB_PROG_LD],
262 [AC_ARG_WITH([gnu-ld],
263 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
264 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
265 AC_REQUIRE([AC_PROG_CC])dnl
266 AC_REQUIRE([AC_CANONICAL_HOST])dnl
267 # Prepare PATH_SEPARATOR.
268 # The user is always right.
269 if test "${PATH_SEPARATOR+set}" != set; then
270 echo "#! /bin/sh" >conf$$.sh
271 echo "exit 0" >>conf$$.sh
273 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
281 if test "$GCC" = yes; then
282 # Check if gcc -print-prog-name=ld gives a path.
283 AC_MSG_CHECKING([for ld used by GCC])
286 # gcc leaves a trailing carriage return which upsets mingw
287 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
289 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
292 # Accept absolute paths.
293 [[\\/]* | [A-Za-z]:[\\/]*)]
294 [re_direlt='/[^/][^/]*/\.\./']
295 # Canonicalize the path of ld
296 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
297 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
298 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
300 test -z "$LD" && LD="$ac_prog"
303 # If it fails, then pretend we aren't using GCC.
307 # If it is relative, then search for the first ld in PATH.
311 elif test "$with_gnu_ld" = yes; then
312 AC_MSG_CHECKING([for GNU ld])
314 AC_MSG_CHECKING([for non-GNU ld])
316 AC_CACHE_VAL([acl_cv_path_LD],
317 [if test -z "$LD"; then
318 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
319 for ac_dir in $PATH; do
320 test -z "$ac_dir" && ac_dir=.
321 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
322 acl_cv_path_LD="$ac_dir/$ac_prog"
323 # Check to see if the program is GNU ld. I'd rather use --version,
324 # but apparently some GNU ld's only accept -v.
325 # Break only if it was the GNU/non-GNU ld that we prefer.
326 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
327 *GNU* | *'with BFD'*)
328 test "$with_gnu_ld" != no && break ;;
330 test "$with_gnu_ld" != yes && break ;;
336 acl_cv_path_LD="$LD" # Let the user override the test with a path.
339 if test -n "$LD"; then
344 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
348 # lib-link.m4 serial 21 (gettext-0.18)
349 dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
350 dnl This file is free software; the Free Software Foundation
351 dnl gives unlimited permission to copy and/or distribute it,
352 dnl with or without modifications, as long as this notice is preserved.
354 dnl From Bruno Haible.
358 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
359 dnl the libraries corresponding to explicit and implicit dependencies.
360 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
361 dnl augments the CPPFLAGS variable.
362 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
363 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
364 AC_DEFUN([AC_LIB_LINKFLAGS],
366 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
367 AC_REQUIRE([AC_LIB_RPATH])
368 pushdef([Name],[translit([$1],[./-], [___])])
369 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
370 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
371 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
372 AC_LIB_LINKFLAGS_BODY([$1], [$2])
373 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
374 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
375 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
376 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
378 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
379 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
380 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
381 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
382 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
384 AC_SUBST([LTLIB]NAME)
385 AC_SUBST([LIB]NAME[_PREFIX])
386 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
387 dnl results of this search when this library appears as a dependency.
393 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
394 dnl searches for libname and the libraries corresponding to explicit and
395 dnl implicit dependencies, together with the specified include files and
396 dnl the ability to compile and link the specified testcode. The missing-message
397 dnl defaults to 'no' and may contain additional hints for the user.
398 dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
399 dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
400 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
401 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
402 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
403 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
404 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
406 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
407 AC_REQUIRE([AC_LIB_RPATH])
408 pushdef([Name],[translit([$1],[./-], [___])])
409 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
410 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
412 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
414 AC_LIB_LINKFLAGS_BODY([$1], [$2])
416 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
417 dnl because if the user has installed lib[]Name and not disabled its use
418 dnl via --without-lib[]Name-prefix, he wants to use it.
419 ac_save_CPPFLAGS="$CPPFLAGS"
420 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
422 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
424 dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
425 dnl because these -l options might require -L options that are present in
426 dnl LIBS. -l options benefit only from the -L options listed before it.
427 dnl Otherwise, add it to the front of LIBS, because it may be a static
428 dnl library that depends on another static library that is present in LIBS.
429 dnl Static libraries benefit only from the static libraries listed after
431 case " $LIB[]NAME" in
432 *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
433 *) LIBS="$LIB[]NAME $LIBS" ;;
435 AC_TRY_LINK([$3], [$4],
436 [ac_cv_lib[]Name=yes],
437 [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
440 if test "$ac_cv_lib[]Name" = yes; then
442 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
443 AC_MSG_CHECKING([how to link with lib[]$1])
444 AC_MSG_RESULT([$LIB[]NAME])
447 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
448 dnl $INC[]NAME either.
449 CPPFLAGS="$ac_save_CPPFLAGS"
454 AC_SUBST([HAVE_LIB]NAME)
456 AC_SUBST([LTLIB]NAME)
457 AC_SUBST([LIB]NAME[_PREFIX])
462 dnl Determine the platform dependent parameters needed to use rpath:
465 dnl acl_hardcode_libdir_flag_spec,
466 dnl acl_hardcode_libdir_separator,
467 dnl acl_hardcode_direct,
468 dnl acl_hardcode_minus_L.
469 AC_DEFUN([AC_LIB_RPATH],
471 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
472 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
473 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
474 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
475 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
476 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
477 AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
478 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
479 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
485 acl_libext="$acl_cv_libext"
486 acl_shlibext="$acl_cv_shlibext"
487 acl_libname_spec="$acl_cv_libname_spec"
488 acl_library_names_spec="$acl_cv_library_names_spec"
489 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
490 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
491 acl_hardcode_direct="$acl_cv_hardcode_direct"
492 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
493 dnl Determine whether the user wants rpath handling at all.
494 AC_ARG_ENABLE([rpath],
495 [ --disable-rpath do not hardcode runtime library paths],
499 dnl AC_LIB_FROMPACKAGE(name, package)
500 dnl declares that libname comes from the given package. The configure file
501 dnl will then not have a --with-libname-prefix option but a
502 dnl --with-package-prefix option. Several libraries can come from the same
503 dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
504 dnl macro call that searches for libname.
505 AC_DEFUN([AC_LIB_FROMPACKAGE],
507 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
508 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
509 define([acl_frompackage_]NAME, [$2])
512 pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
513 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
514 define([acl_libsinpackage_]PACKUP,
515 m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
520 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
521 dnl the libraries corresponding to explicit and implicit dependencies.
522 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
523 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
524 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
525 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
527 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
528 pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
529 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
530 pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
531 pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
532 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
533 pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
534 dnl Autoconf >= 2.61 supports dots in --with options.
535 pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
536 dnl By default, look in $includedir and $libdir.
538 AC_LIB_WITH_FINAL_PREFIX([
539 eval additional_includedir=\"$includedir\"
540 eval additional_libdir=\"$libdir\"
542 AC_ARG_WITH(P_A_C_K[-prefix],
543 [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
544 --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
546 if test "X$withval" = "Xno"; then
549 if test "X$withval" = "X"; then
550 AC_LIB_WITH_FINAL_PREFIX([
551 eval additional_includedir=\"$includedir\"
552 eval additional_libdir=\"$libdir\"
555 additional_includedir="$withval/include"
556 additional_libdir="$withval/$acl_libdirstem"
557 if test "$acl_libdirstem2" != "$acl_libdirstem" \
558 && ! test -d "$withval/$acl_libdirstem"; then
559 additional_libdir="$withval/$acl_libdirstem2"
564 dnl Search the library and its dependencies in $additional_libdir and
565 dnl $LDFLAGS. Using breadth-first-seach.
570 dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
571 dnl computed. So it has to be reset here.
575 names_already_handled=
576 names_next_round='$1 $2'
577 while test -n "$names_next_round"; do
578 names_this_round="$names_next_round"
580 for name in $names_this_round; do
582 for n in $names_already_handled; do
583 if test "$n" = "$name"; then
588 if test -z "$already_handled"; then
589 names_already_handled="$names_already_handled $name"
590 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
591 dnl or AC_LIB_HAVE_LINKFLAGS call.
592 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
593 eval value=\"\$HAVE_LIB$uppername\"
594 if test -n "$value"; then
595 if test "$value" = yes; then
596 eval value=\"\$LIB$uppername\"
597 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
598 eval value=\"\$LTLIB$uppername\"
599 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
601 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
602 dnl that this library doesn't exist. So just drop it.
606 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
607 dnl and the already constructed $LIBNAME/$LTLIBNAME.
612 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
613 if test -n "$acl_shlibext"; then
614 shrext=".$acl_shlibext" # typically: shrext=.so
618 if test $use_additional = yes; then
619 dir="$additional_libdir"
620 dnl The same code as in the loop below:
621 dnl First look for a shared library.
622 if test -n "$acl_shlibext"; then
623 if test -f "$dir/$libname$shrext"; then
625 found_so="$dir/$libname$shrext"
627 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
629 for f in "$libname$shrext".*; do echo "$f"; done \
630 | sed -e "s,^$libname$shrext\\\\.,," \
631 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
632 | sed 1q ) 2>/dev/null`
633 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
635 found_so="$dir/$libname$shrext.$ver"
638 eval library_names=\"$acl_library_names_spec\"
639 for f in $library_names; do
640 if test -f "$dir/$f"; then
649 dnl Then look for a static library.
650 if test "X$found_dir" = "X"; then
651 if test -f "$dir/$libname.$acl_libext"; then
653 found_a="$dir/$libname.$acl_libext"
656 if test "X$found_dir" != "X"; then
657 if test -f "$dir/$libname.la"; then
658 found_la="$dir/$libname.la"
662 if test "X$found_dir" = "X"; then
663 for x in $LDFLAGS $LTLIB[]NAME; do
664 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
667 dir=`echo "X$x" | sed -e 's/^X-L//'`
668 dnl First look for a shared library.
669 if test -n "$acl_shlibext"; then
670 if test -f "$dir/$libname$shrext"; then
672 found_so="$dir/$libname$shrext"
674 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
676 for f in "$libname$shrext".*; do echo "$f"; done \
677 | sed -e "s,^$libname$shrext\\\\.,," \
678 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
679 | sed 1q ) 2>/dev/null`
680 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
682 found_so="$dir/$libname$shrext.$ver"
685 eval library_names=\"$acl_library_names_spec\"
686 for f in $library_names; do
687 if test -f "$dir/$f"; then
696 dnl Then look for a static library.
697 if test "X$found_dir" = "X"; then
698 if test -f "$dir/$libname.$acl_libext"; then
700 found_a="$dir/$libname.$acl_libext"
703 if test "X$found_dir" != "X"; then
704 if test -f "$dir/$libname.la"; then
705 found_la="$dir/$libname.la"
710 if test "X$found_dir" != "X"; then
715 if test "X$found_dir" != "X"; then
716 dnl Found the library.
717 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
718 if test "X$found_so" != "X"; then
719 dnl Linking with a shared library. We attempt to hardcode its
720 dnl directory into the executable's runpath, unless it's the
721 dnl standard /usr/lib.
722 if test "$enable_rpath" = no \
723 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
724 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
725 dnl No hardcoding is needed.
726 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
728 dnl Use an explicit option to hardcode DIR into the resulting
730 dnl Potentially add DIR to ltrpathdirs.
731 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
733 for x in $ltrpathdirs; do
734 if test "X$x" = "X$found_dir"; then
739 if test -z "$haveit"; then
740 ltrpathdirs="$ltrpathdirs $found_dir"
742 dnl The hardcoding into $LIBNAME is system dependent.
743 if test "$acl_hardcode_direct" = yes; then
744 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
745 dnl resulting binary.
746 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
748 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
749 dnl Use an explicit option to hardcode DIR into the resulting
751 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
752 dnl Potentially add DIR to rpathdirs.
753 dnl The rpathdirs will be appended to $LIBNAME at the end.
755 for x in $rpathdirs; do
756 if test "X$x" = "X$found_dir"; then
761 if test -z "$haveit"; then
762 rpathdirs="$rpathdirs $found_dir"
765 dnl Rely on "-L$found_dir".
766 dnl But don't add it if it's already contained in the LDFLAGS
767 dnl or the already constructed $LIBNAME
769 for x in $LDFLAGS $LIB[]NAME; do
770 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
771 if test "X$x" = "X-L$found_dir"; then
776 if test -z "$haveit"; then
777 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
779 if test "$acl_hardcode_minus_L" != no; then
780 dnl FIXME: Not sure whether we should use
781 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
783 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
785 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
786 dnl here, because this doesn't fit in flags passed to the
787 dnl compiler. So give up. No hardcoding. This affects only
788 dnl very old systems.
789 dnl FIXME: Not sure whether we should use
790 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
792 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
798 if test "X$found_a" != "X"; then
799 dnl Linking with a static library.
800 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
802 dnl We shouldn't come here, but anyway it's good to have a
804 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
807 dnl Assume the include files are nearby.
808 additional_includedir=
810 */$acl_libdirstem | */$acl_libdirstem/)
811 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
812 if test "$name" = '$1'; then
813 LIB[]NAME[]_PREFIX="$basedir"
815 additional_includedir="$basedir/include"
817 */$acl_libdirstem2 | */$acl_libdirstem2/)
818 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
819 if test "$name" = '$1'; then
820 LIB[]NAME[]_PREFIX="$basedir"
822 additional_includedir="$basedir/include"
825 if test "X$additional_includedir" != "X"; then
826 dnl Potentially add $additional_includedir to $INCNAME.
828 dnl 1. if it's the standard /usr/include,
829 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
830 dnl 3. if it's already present in $CPPFLAGS or the already
831 dnl constructed $INCNAME,
832 dnl 4. if it doesn't exist as a directory.
833 if test "X$additional_includedir" != "X/usr/include"; then
835 if test "X$additional_includedir" = "X/usr/local/include"; then
836 if test -n "$GCC"; then
838 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
842 if test -z "$haveit"; then
843 for x in $CPPFLAGS $INC[]NAME; do
844 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
845 if test "X$x" = "X-I$additional_includedir"; then
850 if test -z "$haveit"; then
851 if test -d "$additional_includedir"; then
852 dnl Really add $additional_includedir to $INCNAME.
853 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
859 dnl Look for dependencies.
860 if test -n "$found_la"; then
861 dnl Read the .la file. It defines the variables
862 dnl dlname, library_names, old_library, dependency_libs, current,
863 dnl age, revision, installed, dlopen, dlpreopen, libdir.
864 save_libdir="$libdir"
866 */* | *\\*) . "$found_la" ;;
867 *) . "./$found_la" ;;
869 libdir="$save_libdir"
870 dnl We use only dependency_libs.
871 for dep in $dependency_libs; do
874 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
875 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
877 dnl 1. if it's the standard /usr/lib,
878 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
879 dnl 3. if it's already present in $LDFLAGS or the already
880 dnl constructed $LIBNAME,
881 dnl 4. if it doesn't exist as a directory.
882 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
883 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
885 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
886 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
887 if test -n "$GCC"; then
889 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
893 if test -z "$haveit"; then
895 for x in $LDFLAGS $LIB[]NAME; do
896 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
897 if test "X$x" = "X-L$additional_libdir"; then
902 if test -z "$haveit"; then
903 if test -d "$additional_libdir"; then
904 dnl Really add $additional_libdir to $LIBNAME.
905 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
909 for x in $LDFLAGS $LTLIB[]NAME; do
910 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
911 if test "X$x" = "X-L$additional_libdir"; then
916 if test -z "$haveit"; then
917 if test -d "$additional_libdir"; then
918 dnl Really add $additional_libdir to $LTLIBNAME.
919 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
926 dir=`echo "X$dep" | sed -e 's/^X-R//'`
927 if test "$enable_rpath" != no; then
928 dnl Potentially add DIR to rpathdirs.
929 dnl The rpathdirs will be appended to $LIBNAME at the end.
931 for x in $rpathdirs; do
932 if test "X$x" = "X$dir"; then
937 if test -z "$haveit"; then
938 rpathdirs="$rpathdirs $dir"
940 dnl Potentially add DIR to ltrpathdirs.
941 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
943 for x in $ltrpathdirs; do
944 if test "X$x" = "X$dir"; then
949 if test -z "$haveit"; then
950 ltrpathdirs="$ltrpathdirs $dir"
955 dnl Handle this in the next round.
956 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
959 dnl Handle this in the next round. Throw away the .la's
960 dnl directory; it is already contained in a preceding -L
962 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
965 dnl Most likely an immediate library name.
966 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
967 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
973 dnl Didn't find the library; assume it is in the system directories
974 dnl known to the linker and runtime loader. (All the system
975 dnl directories known to the linker should also be known to the
976 dnl runtime loader, otherwise the system is severely misconfigured.)
977 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
978 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
984 if test "X$rpathdirs" != "X"; then
985 if test -n "$acl_hardcode_libdir_separator"; then
986 dnl Weird platform: only the last -rpath option counts, the user must
987 dnl pass all path elements in one option. We can arrange that for a
988 dnl single library, but not when more than one $LIBNAMEs are used.
990 for found_dir in $rpathdirs; do
991 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
993 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
994 acl_save_libdir="$libdir"
996 eval flag=\"$acl_hardcode_libdir_flag_spec\"
997 libdir="$acl_save_libdir"
998 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1000 dnl The -rpath options are cumulative.
1001 for found_dir in $rpathdirs; do
1002 acl_save_libdir="$libdir"
1004 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1005 libdir="$acl_save_libdir"
1006 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1010 if test "X$ltrpathdirs" != "X"; then
1011 dnl When using libtool, the option that works for both libraries and
1012 dnl executables is -R. The -R options are cumulative.
1013 for found_dir in $ltrpathdirs; do
1014 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1024 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1025 dnl unless already present in VAR.
1026 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1027 dnl contains two or three consecutive elements that belong together.
1028 AC_DEFUN([AC_LIB_APPENDTOVAR],
1030 for element in [$2]; do
1033 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1034 if test "X$x" = "X$element"; then
1039 if test -z "$haveit"; then
1040 [$1]="${[$1]}${[$1]:+ }$element"
1045 dnl For those cases where a variable contains several -L and -l options
1046 dnl referring to unknown libraries and directories, this macro determines the
1047 dnl necessary additional linker options for the runtime path.
1048 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1049 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1050 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1051 dnl otherwise linking without libtool is assumed.
1052 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1054 AC_REQUIRE([AC_LIB_RPATH])
1055 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1057 if test "$enable_rpath" != no; then
1058 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1059 dnl Use an explicit option to hardcode directories into the resulting
1064 if test -n "$next"; then
1066 dnl No need to hardcode the standard /usr/lib.
1067 if test "X$dir" != "X/usr/$acl_libdirstem" \
1068 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1069 rpathdirs="$rpathdirs $dir"
1075 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1076 dnl No need to hardcode the standard /usr/lib.
1077 if test "X$dir" != "X/usr/$acl_libdirstem" \
1078 && test "X$dir" != "X/usr/$acl_libdirstem2"; then
1079 rpathdirs="$rpathdirs $dir"
1086 if test "X$rpathdirs" != "X"; then
1087 if test -n ""$3""; then
1088 dnl libtool is used for linking. Use -R options.
1089 for dir in $rpathdirs; do
1090 $1="${$1}${$1:+ }-R$dir"
1093 dnl The linker is used for linking directly.
1094 if test -n "$acl_hardcode_libdir_separator"; then
1095 dnl Weird platform: only the last -rpath option counts, the user
1096 dnl must pass all path elements in one option.
1098 for dir in $rpathdirs; do
1099 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1101 acl_save_libdir="$libdir"
1103 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1104 libdir="$acl_save_libdir"
1107 dnl The -rpath options are cumulative.
1108 for dir in $rpathdirs; do
1109 acl_save_libdir="$libdir"
1111 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1112 libdir="$acl_save_libdir"
1113 $1="${$1}${$1:+ }$flag"
1123 # lib-prefix.m4 serial 7 (gettext-0.18)
1124 dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
1125 dnl This file is free software; the Free Software Foundation
1126 dnl gives unlimited permission to copy and/or distribute it,
1127 dnl with or without modifications, as long as this notice is preserved.
1129 dnl From Bruno Haible.
1131 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1132 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1133 dnl require excessive bracketing.
1134 ifdef([AC_HELP_STRING],
1135 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1136 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1138 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1139 dnl to access previously installed libraries. The basic assumption is that
1140 dnl a user will want packages to use other packages he previously installed
1141 dnl with the same --prefix option.
1142 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1143 dnl libraries, but is otherwise very convenient.
1144 AC_DEFUN([AC_LIB_PREFIX],
1146 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1147 AC_REQUIRE([AC_PROG_CC])
1148 AC_REQUIRE([AC_CANONICAL_HOST])
1149 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1150 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1151 dnl By default, look in $includedir and $libdir.
1153 AC_LIB_WITH_FINAL_PREFIX([
1154 eval additional_includedir=\"$includedir\"
1155 eval additional_libdir=\"$libdir\"
1157 AC_LIB_ARG_WITH([lib-prefix],
1158 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1159 --without-lib-prefix don't search for libraries in includedir and libdir],
1161 if test "X$withval" = "Xno"; then
1164 if test "X$withval" = "X"; then
1165 AC_LIB_WITH_FINAL_PREFIX([
1166 eval additional_includedir=\"$includedir\"
1167 eval additional_libdir=\"$libdir\"
1170 additional_includedir="$withval/include"
1171 additional_libdir="$withval/$acl_libdirstem"
1175 if test $use_additional = yes; then
1176 dnl Potentially add $additional_includedir to $CPPFLAGS.
1177 dnl But don't add it
1178 dnl 1. if it's the standard /usr/include,
1179 dnl 2. if it's already present in $CPPFLAGS,
1180 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1181 dnl 4. if it doesn't exist as a directory.
1182 if test "X$additional_includedir" != "X/usr/include"; then
1184 for x in $CPPFLAGS; do
1185 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1186 if test "X$x" = "X-I$additional_includedir"; then
1191 if test -z "$haveit"; then
1192 if test "X$additional_includedir" = "X/usr/local/include"; then
1193 if test -n "$GCC"; then
1195 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1199 if test -z "$haveit"; then
1200 if test -d "$additional_includedir"; then
1201 dnl Really add $additional_includedir to $CPPFLAGS.
1202 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1207 dnl Potentially add $additional_libdir to $LDFLAGS.
1208 dnl But don't add it
1209 dnl 1. if it's the standard /usr/lib,
1210 dnl 2. if it's already present in $LDFLAGS,
1211 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1212 dnl 4. if it doesn't exist as a directory.
1213 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1215 for x in $LDFLAGS; do
1216 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1217 if test "X$x" = "X-L$additional_libdir"; then
1222 if test -z "$haveit"; then
1223 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1224 if test -n "$GCC"; then
1226 linux*) haveit=yes;;
1230 if test -z "$haveit"; then
1231 if test -d "$additional_libdir"; then
1232 dnl Really add $additional_libdir to $LDFLAGS.
1233 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1241 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1242 dnl acl_final_exec_prefix, containing the values to which $prefix and
1243 dnl $exec_prefix will expand at the end of the configure script.
1244 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1246 dnl Unfortunately, prefix and exec_prefix get only finally determined
1247 dnl at the end of configure.
1248 if test "X$prefix" = "XNONE"; then
1249 acl_final_prefix="$ac_default_prefix"
1251 acl_final_prefix="$prefix"
1253 if test "X$exec_prefix" = "XNONE"; then
1254 acl_final_exec_prefix='${prefix}'
1256 acl_final_exec_prefix="$exec_prefix"
1258 acl_save_prefix="$prefix"
1259 prefix="$acl_final_prefix"
1260 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1261 prefix="$acl_save_prefix"
1264 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1265 dnl variables prefix and exec_prefix bound to the values they will have
1266 dnl at the end of the configure script.
1267 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1269 acl_save_prefix="$prefix"
1270 prefix="$acl_final_prefix"
1271 acl_save_exec_prefix="$exec_prefix"
1272 exec_prefix="$acl_final_exec_prefix"
1274 exec_prefix="$acl_save_exec_prefix"
1275 prefix="$acl_save_prefix"
1278 dnl AC_LIB_PREPARE_MULTILIB creates
1279 dnl - a variable acl_libdirstem, containing the basename of the libdir, either
1280 dnl "lib" or "lib64" or "lib/64",
1281 dnl - a variable acl_libdirstem2, as a secondary possible value for
1282 dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
1284 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1286 dnl There is no formal standard regarding lib and lib64.
1287 dnl On glibc systems, the current practice is that on a system supporting
1288 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1289 dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
1290 dnl the compiler's default mode by looking at the compiler's library search
1291 dnl path. If at least one of its elements ends in /lib64 or points to a
1292 dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
1293 dnl Otherwise we use the default, namely "lib".
1294 dnl On Solaris systems, the current practice is that on a system supporting
1295 dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
1296 dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
1297 dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
1298 AC_REQUIRE([AC_CANONICAL_HOST])
1303 dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
1304 dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
1305 dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
1306 dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
1307 dnl symlink is missing, so we set acl_libdirstem2 too.
1308 AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
1309 [AC_EGREP_CPP([sixtyfour bits], [
1313 ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
1315 if test $gl_cv_solaris_64bit = yes; then
1316 acl_libdirstem=lib/64
1318 sparc*) acl_libdirstem2=lib/sparcv9 ;;
1319 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
1324 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1325 if test -n "$searchpath"; then
1326 acl_save_IFS="${IFS= }"; IFS=":"
1327 for searchdir in $searchpath; do
1328 if test -d "$searchdir"; then
1329 case "$searchdir" in
1330 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1332 # Better ignore directories of this form. They are misleading.
1334 *) searchdir=`cd "$searchdir" && pwd`
1335 case "$searchdir" in
1336 */lib64 ) acl_libdirstem=lib64 ;;
1345 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
1348 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1350 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1351 # 2006, 2007, 2008 Free Software Foundation, Inc.
1352 # Written by Gordon Matzigkeit, 1996
1354 # This file is free software; the Free Software Foundation gives
1355 # unlimited permission to copy and/or distribute it, with or without
1356 # modifications, as long as this notice is preserved.
1358 m4_define([_LT_COPYING], [dnl
1359 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1360 # 2006, 2007, 2008 Free Software Foundation, Inc.
1361 # Written by Gordon Matzigkeit, 1996
1363 # This file is part of GNU Libtool.
1365 # GNU Libtool is free software; you can redistribute it and/or
1366 # modify it under the terms of the GNU General Public License as
1367 # published by the Free Software Foundation; either version 2 of
1368 # the License, or (at your option) any later version.
1370 # As a special exception to the GNU General Public License,
1371 # if you distribute this file as part of a program or library that
1372 # is built using GNU Libtool, you may include this file under the
1373 # same distribution terms that you use for the rest of that program.
1375 # GNU Libtool is distributed in the hope that it will be useful,
1376 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1377 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1378 # GNU General Public License for more details.
1380 # You should have received a copy of the GNU General Public License
1381 # along with GNU Libtool; see the file COPYING. If not, a copy
1382 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1383 # obtained by writing to the Free Software Foundation, Inc.,
1384 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1390 # LT_PREREQ(VERSION)
1391 # ------------------
1392 # Complain and exit if this libtool version is less that VERSION.
1393 m4_defun([LT_PREREQ],
1394 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1396 [m4_fatal([Libtool version $1 or higher is required],
1401 # _LT_CHECK_BUILDDIR
1402 # ------------------
1403 # Complain if the absolute build directory name contains unusual characters
1404 m4_defun([_LT_CHECK_BUILDDIR],
1407 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1412 # LT_INIT([OPTIONS])
1413 # ------------------
1415 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1416 AC_BEFORE([$0], [LT_LANG])dnl
1417 AC_BEFORE([$0], [LT_OUTPUT])dnl
1418 AC_BEFORE([$0], [LTDL_INIT])dnl
1419 m4_require([_LT_CHECK_BUILDDIR])dnl
1421 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1422 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1423 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1424 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1425 dnl unless we require an AC_DEFUNed macro:
1426 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1427 AC_REQUIRE([LTSUGAR_VERSION])dnl
1428 AC_REQUIRE([LTVERSION_VERSION])dnl
1429 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1430 m4_require([_LT_PROG_LTMAIN])dnl
1433 _LT_SET_OPTIONS([$0], [$1])
1435 # This can be used to rebuild libtool when needed
1436 LIBTOOL_DEPS="$ltmain"
1438 # Always use our own libtool.
1439 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1440 AC_SUBST(LIBTOOL)dnl
1445 m4_define([LT_INIT])
1449 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1450 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1451 dnl aclocal-1.4 backwards compatibility:
1452 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1453 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1456 # _LT_CC_BASENAME(CC)
1457 # -------------------
1458 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1459 m4_defun([_LT_CC_BASENAME],
1460 [for cc_temp in $1""; do
1462 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1463 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1468 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1472 # _LT_FILEUTILS_DEFAULTS
1473 # ----------------------
1474 # It is okay to use these file commands and assume they have been set
1475 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1476 m4_defun([_LT_FILEUTILS_DEFAULTS],
1480 ])# _LT_FILEUTILS_DEFAULTS
1485 m4_defun([_LT_SETUP],
1486 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1487 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1488 _LT_DECL([], [host_alias], [0], [The host system])dnl
1489 _LT_DECL([], [host], [0])dnl
1490 _LT_DECL([], [host_os], [0])dnl
1492 _LT_DECL([], [build_alias], [0], [The build system])dnl
1493 _LT_DECL([], [build], [0])dnl
1494 _LT_DECL([], [build_os], [0])dnl
1496 AC_REQUIRE([AC_PROG_CC])dnl
1497 AC_REQUIRE([LT_PATH_LD])dnl
1498 AC_REQUIRE([LT_PATH_NM])dnl
1500 AC_REQUIRE([AC_PROG_LN_S])dnl
1501 test -z "$LN_S" && LN_S="ln -s"
1502 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1504 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1505 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1506 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1508 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1509 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1510 m4_require([_LT_CMD_RELOAD])dnl
1511 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1512 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1513 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1515 _LT_CONFIG_LIBTOOL_INIT([
1516 # See if we are running on zsh, and set the options which allow our
1517 # commands through without removal of \ escapes INIT.
1518 if test -n "\${ZSH_VERSION+set}" ; then
1519 setopt NO_GLOB_SUBST
1522 if test -n "${ZSH_VERSION+set}" ; then
1523 setopt NO_GLOB_SUBST
1528 m4_require([_LT_TAG_COMPILER])dnl
1529 _LT_PROG_ECHO_BACKSLASH
1533 # AIX sometimes has problems with the GCC collect2 program. For some
1534 # reason, if we set the COLLECT_NAMES environment variable, the problems
1535 # vanish in a puff of smoke.
1536 if test "X${COLLECT_NAMES+set}" != Xset; then
1538 export COLLECT_NAMES
1543 # Sed substitution that helps us do robust quoting. It backslashifies
1544 # metacharacters that are still active within double-quoted strings.
1545 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1547 # Same as above, but do not quote variable references.
1548 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1550 # Sed substitution to delay expansion of an escaped shell variable in a
1551 # double_quote_subst'ed string.
1552 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1554 # Sed substitution to delay expansion of an escaped single quote.
1555 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1557 # Sed substitution to avoid accidental globbing in evaled expressions
1558 no_glob_subst='s/\*/\\\*/g'
1562 can_build_shared=yes
1564 # All known linkers require a `.a' archive for static linking (except MSVC,
1565 # which needs '.lib').
1568 with_gnu_ld="$lt_cv_prog_gnu_ld"
1571 old_CFLAGS="$CFLAGS"
1573 # Set sane defaults for various variables
1574 test -z "$CC" && CC=cc
1575 test -z "$LTCC" && LTCC=$CC
1576 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1577 test -z "$LD" && LD=ld
1578 test -z "$ac_objext" && ac_objext=o
1580 _LT_CC_BASENAME([$compiler])
1582 # Only perform the check for file, if the check method requires it
1583 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1584 case $deplibs_check_method in
1586 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1592 # Use C for the default configuration in the libtool script
1593 LT_SUPPORTED_TAG([CC])
1595 _LT_LANG_DEFAULT_CONFIG
1602 # Note that this code is called both from `configure', and `config.status'
1603 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
1604 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1605 # so we pass a copy along to make sure it has a sensible value anyway.
1606 m4_defun([_LT_PROG_LTMAIN],
1607 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1608 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1609 ltmain="$ac_aux_dir/ltmain.sh"
1614 # So that we can recreate a full libtool script including additional
1615 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1616 # in macros and then make a single call at the end using the `libtool'
1620 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1621 # ----------------------------------------
1622 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1623 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1625 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1630 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1633 # _LT_CONFIG_LIBTOOL([COMMANDS])
1634 # ------------------------------
1635 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1636 m4_define([_LT_CONFIG_LIBTOOL],
1638 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1643 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1646 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1647 # -----------------------------------------------------
1648 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1649 [_LT_CONFIG_LIBTOOL([$1])
1650 _LT_CONFIG_LIBTOOL_INIT([$2])
1654 # _LT_FORMAT_COMMENT([COMMENT])
1655 # -----------------------------
1656 # Add leading comment marks to the start of each line, and a trailing
1657 # full-stop to the whole comment if one is not present already.
1658 m4_define([_LT_FORMAT_COMMENT],
1660 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1661 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1668 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1669 # -------------------------------------------------------------------
1670 # CONFIGNAME is the name given to the value in the libtool script.
1671 # VARNAME is the (base) name used in the configure script.
1672 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1673 # VARNAME. Any other value will be used directly.
1674 m4_define([_LT_DECL],
1675 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1676 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1677 [m4_ifval([$1], [$1], [$2])])
1678 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1680 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1681 lt_dict_add_subkey([lt_decl_dict], [$2],
1682 [tagged?], [m4_ifval([$5], [yes], [no])])])
1686 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1687 # --------------------------------------------------------
1688 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1691 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1692 # ------------------------------------------------
1693 m4_define([lt_decl_tag_varnames],
1694 [_lt_decl_filter([tagged?], [yes], $@)])
1697 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1698 # ---------------------------------------------------------
1699 m4_define([_lt_decl_filter],
1701 [0], [m4_fatal([$0: too few arguments: $#])],
1702 [1], [m4_fatal([$0: too few arguments: $#: $1])],
1703 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1704 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1705 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1709 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1710 # --------------------------------------------------
1711 m4_define([lt_decl_quote_varnames],
1712 [_lt_decl_filter([value], [1], $@)])
1715 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1716 # ---------------------------------------------------
1717 m4_define([lt_decl_dquote_varnames],
1718 [_lt_decl_filter([value], [2], $@)])
1721 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1722 # ---------------------------------------------------
1723 m4_define([lt_decl_varnames_tagged],
1724 [m4_assert([$# <= 2])dnl
1725 _$0(m4_quote(m4_default([$1], [[, ]])),
1726 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1727 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1728 m4_define([_lt_decl_varnames_tagged],
1729 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1732 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1733 # ------------------------------------------------
1734 m4_define([lt_decl_all_varnames],
1735 [_$0(m4_quote(m4_default([$1], [[, ]])),
1737 m4_quote(lt_decl_varnames),
1738 m4_quote(m4_shift($@))))[]dnl
1740 m4_define([_lt_decl_all_varnames],
1741 [lt_join($@, lt_decl_varnames_tagged([$1],
1742 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1746 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
1747 # ------------------------------------
1748 # Quote a variable value, and forward it to `config.status' so that its
1749 # declaration there will have the same value as in `configure'. VARNAME
1750 # must have a single quote delimited value for this to work.
1751 m4_define([_LT_CONFIG_STATUS_DECLARE],
1752 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1755 # _LT_CONFIG_STATUS_DECLARATIONS
1756 # ------------------------------
1757 # We delimit libtool config variables with single quotes, so when
1758 # we write them to config.status, we have to be sure to quote all
1759 # embedded single quotes properly. In configure, this macro expands
1760 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1762 # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
1763 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1764 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1765 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1770 # Output comment and list of tags supported by the script
1771 m4_defun([_LT_LIBTOOL_TAGS],
1772 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1773 available_tags="_LT_TAGS"dnl
1777 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1778 # -----------------------------------
1779 # Extract the dictionary values for VARNAME (optionally with TAG) and
1780 # expand to a commented shell variable setting:
1782 # # Some comment about what VAR is for.
1783 # visible_name=$lt_internal_name
1784 m4_define([_LT_LIBTOOL_DECLARE],
1785 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1786 [description])))[]dnl
1787 m4_pushdef([_libtool_name],
1788 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1789 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1790 [0], [_libtool_name=[$]$1],
1791 [1], [_libtool_name=$lt_[]$1],
1792 [2], [_libtool_name=$lt_[]$1],
1793 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1794 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1798 # _LT_LIBTOOL_CONFIG_VARS
1799 # -----------------------
1800 # Produce commented declarations of non-tagged libtool config variables
1801 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1802 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
1803 # section) are produced by _LT_LIBTOOL_TAG_VARS.
1804 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1805 [m4_foreach([_lt_var],
1806 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1807 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1810 # _LT_LIBTOOL_TAG_VARS(TAG)
1811 # -------------------------
1812 m4_define([_LT_LIBTOOL_TAG_VARS],
1813 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1814 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1817 # _LT_TAGVAR(VARNAME, [TAGNAME])
1818 # ------------------------------
1819 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1822 # _LT_CONFIG_COMMANDS
1823 # -------------------
1824 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
1825 # variables for single and double quote escaping we saved from calls
1826 # to _LT_DECL, we can put quote escaped variables declarations
1827 # into `config.status', and then the shell code to quote escape them in
1828 # for loops in `config.status'. Finally, any additional code accumulated
1829 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1830 m4_defun([_LT_CONFIG_COMMANDS],
1831 [AC_PROVIDE_IFELSE([LT_OUTPUT],
1832 dnl If the libtool generation code has been placed in $CONFIG_LT,
1833 dnl instead of duplicating it all over again into config.status,
1834 dnl then we will have config.status run $CONFIG_LT later, so it
1835 dnl needs to know what name is stored there:
1836 [AC_CONFIG_COMMANDS([libtool],
1837 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1838 dnl If the libtool generation code is destined for config.status,
1839 dnl expand the accumulated commands and init code now:
1840 [AC_CONFIG_COMMANDS([libtool],
1841 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1842 ])#_LT_CONFIG_COMMANDS
1846 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1849 # The HP-UX ksh and POSIX shell print the target directory to stdout
1851 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1853 sed_quote_subst='$sed_quote_subst'
1854 double_quote_subst='$double_quote_subst'
1855 delay_variable_subst='$delay_variable_subst'
1856 _LT_CONFIG_STATUS_DECLARATIONS
1858 LTCFLAGS='$LTCFLAGS'
1859 compiler='$compiler_DEFAULT'
1861 # Quote evaled strings.
1862 for var in lt_decl_all_varnames([[ \
1863 ]], lt_decl_quote_varnames); do
1864 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1865 *[[\\\\\\\`\\"\\\$]]*)
1866 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1869 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1874 # Double-quote double-evaled strings.
1875 for var in lt_decl_all_varnames([[ \
1876 ]], lt_decl_dquote_varnames); do
1877 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
1878 *[[\\\\\\\`\\"\\\$]]*)
1879 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1882 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1887 # Fix-up fallback echo if it was mangled by the above quoting rules.
1889 *'\\\[$]0 --fallback-echo"')dnl "
1890 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
1894 _LT_OUTPUT_LIBTOOL_INIT
1900 # This macro allows early generation of the libtool script (before
1901 # AC_OUTPUT is called), incase it is used in configure for compilation
1903 AC_DEFUN([LT_OUTPUT],
1904 [: ${CONFIG_LT=./config.lt}
1905 AC_MSG_NOTICE([creating $CONFIG_LT])
1906 cat >"$CONFIG_LT" <<_LTEOF
1908 # Generated by $as_me.
1909 # Run this file to recreate a libtool stub with the current configuration.
1912 SHELL=\${CONFIG_SHELL-$SHELL}
1915 cat >>"$CONFIG_LT" <<\_LTEOF
1919 exec AS_MESSAGE_FD>&1
1920 exec AS_MESSAGE_LOG_FD>>config.log
1923 AS_BOX([Running $as_me.])
1924 } >&AS_MESSAGE_LOG_FD
1927 \`$as_me' creates a local libtool stub from the current configuration,
1928 for use in further configure time tests before the real libtool is
1931 Usage: $[0] [[OPTIONS]]
1933 -h, --help print this help, then exit
1934 -V, --version print version number, then exit
1935 -q, --quiet do not print progress messages
1936 -d, --debug don't remove temporary files
1938 Report bugs to <bug-libtool@gnu.org>."
1941 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1942 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1943 configured by $[0], generated by m4_PACKAGE_STRING.
1945 Copyright (C) 2008 Free Software Foundation, Inc.
1946 This config.lt script is free software; the Free Software Foundation
1947 gives unlimited permision to copy, distribute and modify it."
1949 while test $[#] != 0
1952 --version | --v* | -V )
1953 echo "$lt_cl_version"; exit 0 ;;
1954 --help | --h* | -h )
1955 echo "$lt_cl_help"; exit 0 ;;
1956 --debug | --d* | -d )
1958 --quiet | --q* | --silent | --s* | -q )
1961 -*) AC_MSG_ERROR([unrecognized option: $[1]
1962 Try \`$[0] --help' for more information.]) ;;
1964 *) AC_MSG_ERROR([unrecognized argument: $[1]
1965 Try \`$[0] --help' for more information.]) ;;
1970 if $lt_cl_silent; then
1971 exec AS_MESSAGE_FD>/dev/null
1975 cat >>"$CONFIG_LT" <<_LTEOF
1976 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1979 cat >>"$CONFIG_LT" <<\_LTEOF
1980 AC_MSG_NOTICE([creating $ofile])
1981 _LT_OUTPUT_LIBTOOL_COMMANDS
1984 chmod +x "$CONFIG_LT"
1986 # configure is writing to config.log, but config.lt does its own redirection,
1987 # appending to config.log, which fails on DOS, as config.log is still kept
1988 # open by configure. Here we exec the FD to /dev/null, effectively closing
1989 # config.log, so it can be properly (re)opened and appended to by config.lt.
1990 if test "$no_create" != yes; then
1992 test "$silent" = yes &&
1993 lt_config_lt_args="$lt_config_lt_args --quiet"
1994 exec AS_MESSAGE_LOG_FD>/dev/null
1995 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1996 exec AS_MESSAGE_LOG_FD>>config.log
1997 $lt_cl_success || AS_EXIT(1)
2004 # If TAG is the built-in tag, create an initial libtool script with a
2005 # default configuration from the untagged config vars. Otherwise add code
2006 # to config.status for appending the configuration named by TAG from the
2007 # matching tagged config vars.
2008 m4_defun([_LT_CONFIG],
2009 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2010 _LT_CONFIG_SAVE_COMMANDS([
2011 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2012 m4_if(_LT_TAG, [C], [
2013 # See if we are running on zsh, and set the options which allow our
2014 # commands through without removal of \ escapes.
2015 if test -n "${ZSH_VERSION+set}" ; then
2016 setopt NO_GLOB_SUBST
2020 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2023 cat <<_LT_EOF >> "$cfgfile"
2026 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2027 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2028 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2029 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2034 # ### BEGIN LIBTOOL CONFIG
2035 _LT_LIBTOOL_CONFIG_VARS
2036 _LT_LIBTOOL_TAG_VARS
2037 # ### END LIBTOOL CONFIG
2043 cat <<\_LT_EOF >> "$cfgfile"
2044 # AIX sometimes has problems with the GCC collect2 program. For some
2045 # reason, if we set the COLLECT_NAMES environment variable, the problems
2046 # vanish in a puff of smoke.
2047 if test "X${COLLECT_NAMES+set}" != Xset; then
2049 export COLLECT_NAMES
2057 # We use sed instead of cat because bash on DJGPP gets confused if
2058 # if finds mixed CR/LF and LF-only lines. Since sed operates in
2059 # text mode, it properly converts lines to CR/LF. This bash problem
2060 # is reportedly fixed, but why not run on old versions too?
2061 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
2062 || (rm -f "$cfgfile"; exit 1)
2064 _LT_PROG_XSI_SHELLFNS
2066 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
2067 || (rm -f "$cfgfile"; exit 1)
2069 mv -f "$cfgfile" "$ofile" ||
2070 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2073 [cat <<_LT_EOF >> "$ofile"
2075 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2076 dnl in a comment (ie after a #).
2077 # ### BEGIN LIBTOOL TAG CONFIG: $1
2078 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
2079 # ### END LIBTOOL TAG CONFIG: $1
2086 TIMESTAMP='$TIMESTAMP'
2088 ofile='$ofile'], [])
2089 ])dnl /_LT_CONFIG_SAVE_COMMANDS
2093 # LT_SUPPORTED_TAG(TAG)
2094 # ---------------------
2095 # Trace this macro to discover what tags are supported by the libtool
2096 # --tag option, using:
2097 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
2098 AC_DEFUN([LT_SUPPORTED_TAG], [])
2101 # C support is built-in for now
2102 m4_define([_LT_LANG_C_enabled], [])
2103 m4_define([_LT_TAGS], [])
2108 # Enable libtool support for the given language if not already enabled.
2110 [AC_BEFORE([$0], [LT_OUTPUT])dnl
2113 [C++], [_LT_LANG(CXX)],
2114 [Java], [_LT_LANG(GCJ)],
2115 [Fortran 77], [_LT_LANG(F77)],
2116 [Fortran], [_LT_LANG(FC)],
2117 [Windows Resource], [_LT_LANG(RC)],
2118 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2120 [m4_fatal([$0: unsupported language: "$1"])])])dnl
2124 # _LT_LANG(LANGNAME)
2125 # ------------------
2126 m4_defun([_LT_LANG],
2127 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
2128 [LT_SUPPORTED_TAG([$1])dnl
2129 m4_append([_LT_TAGS], [$1 ])dnl
2130 m4_define([_LT_LANG_]$1[_enabled], [])dnl
2131 _LT_LANG_$1_CONFIG($1)])dnl
2135 # _LT_LANG_DEFAULT_CONFIG
2136 # -----------------------
2137 m4_defun([_LT_LANG_DEFAULT_CONFIG],
2138 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
2140 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2142 AC_PROVIDE_IFELSE([AC_PROG_F77],
2144 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2146 AC_PROVIDE_IFELSE([AC_PROG_FC],
2148 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2150 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2151 dnl pulling things in needlessly.
2152 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2154 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2156 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2158 [m4_ifdef([AC_PROG_GCJ],
2159 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2160 m4_ifdef([A][M_PROG_GCJ],
2161 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2162 m4_ifdef([LT_PROG_GCJ],
2163 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2165 AC_PROVIDE_IFELSE([LT_PROG_RC],
2167 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2168 ])# _LT_LANG_DEFAULT_CONFIG
2171 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2172 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2173 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2174 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2175 dnl aclocal-1.4 backwards compatibility:
2176 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2177 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2178 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2179 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2184 m4_defun([_LT_TAG_COMPILER],
2185 [AC_REQUIRE([AC_PROG_CC])dnl
2187 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2188 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2189 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2190 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2192 # If no C compiler was specified, use CC.
2195 # If no C compiler flags were specified, use CFLAGS.
2196 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2198 # Allow CC to be a program name with arguments.
2200 ])# _LT_TAG_COMPILER
2203 # _LT_COMPILER_BOILERPLATE
2204 # ------------------------
2205 # Check for compiler boilerplate output or warnings with
2206 # the simple compiler test code.
2207 m4_defun([_LT_COMPILER_BOILERPLATE],
2208 [m4_require([_LT_DECL_SED])dnl
2209 ac_outfile=conftest.$ac_objext
2210 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2211 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2212 _lt_compiler_boilerplate=`cat conftest.err`
2214 ])# _LT_COMPILER_BOILERPLATE
2217 # _LT_LINKER_BOILERPLATE
2218 # ----------------------
2219 # Check for linker boilerplate output or warnings with
2220 # the simple link test code.
2221 m4_defun([_LT_LINKER_BOILERPLATE],
2222 [m4_require([_LT_DECL_SED])dnl
2223 ac_outfile=conftest.$ac_objext
2224 echo "$lt_simple_link_test_code" >conftest.$ac_ext
2225 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2226 _lt_linker_boilerplate=`cat conftest.err`
2228 ])# _LT_LINKER_BOILERPLATE
2230 # _LT_REQUIRED_DARWIN_CHECKS
2231 # -------------------------
2232 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2234 rhapsody* | darwin*)
2235 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2236 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2237 AC_CHECK_TOOL([LIPO], [lipo], [:])
2238 AC_CHECK_TOOL([OTOOL], [otool], [:])
2239 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2240 _LT_DECL([], [DSYMUTIL], [1],
2241 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2242 _LT_DECL([], [NMEDIT], [1],
2243 [Tool to change global to local symbols on Mac OS X])
2244 _LT_DECL([], [LIPO], [1],
2245 [Tool to manipulate fat objects and archives on Mac OS X])
2246 _LT_DECL([], [OTOOL], [1],
2247 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2248 _LT_DECL([], [OTOOL64], [1],
2249 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2251 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2252 [lt_cv_apple_cc_single_mod=no
2253 if test -z "${LT_MULTI_MODULE}"; then
2254 # By default we will add the -single_module flag. You can override
2255 # by either setting the environment variable LT_MULTI_MODULE
2256 # non-empty at configure time, or by adding -multi_module to the
2258 rm -rf libconftest.dylib*
2259 echo "int foo(void){return 1;}" > conftest.c
2260 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2261 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2262 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2263 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2265 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
2266 lt_cv_apple_cc_single_mod=yes
2268 cat conftest.err >&AS_MESSAGE_LOG_FD
2270 rm -rf libconftest.dylib*
2273 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2274 [lt_cv_ld_exported_symbols_list],
2275 [lt_cv_ld_exported_symbols_list=no
2276 save_LDFLAGS=$LDFLAGS
2277 echo "_main" > conftest.sym
2278 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2279 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2280 [lt_cv_ld_exported_symbols_list=yes],
2281 [lt_cv_ld_exported_symbols_list=no])
2282 LDFLAGS="$save_LDFLAGS"
2285 rhapsody* | darwin1.[[012]])
2286 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2288 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2289 darwin*) # darwin 5.x on
2290 # if running on 10.5 or later, the deployment target defaults
2291 # to the OS version, if on x86, and 10.4, the deployment
2292 # target defaults to 10.4. Don't you love it?
2293 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2294 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2295 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2297 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2299 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2303 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2304 _lt_dar_single_mod='$single_module'
2306 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2307 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2309 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2311 if test "$DSYMUTIL" != ":"; then
2312 _lt_dsymutil='~$DSYMUTIL $lib || :'
2321 # _LT_DARWIN_LINKER_FEATURES
2322 # --------------------------
2323 # Checks for linker and compiler features on darwin
2324 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2326 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2327 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2328 _LT_TAGVAR(hardcode_direct, $1)=no
2329 _LT_TAGVAR(hardcode_automatic, $1)=yes
2330 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2331 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2332 _LT_TAGVAR(link_all_deplibs, $1)=yes
2333 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2334 case $cc_basename in
2335 ifort*) _lt_dar_can_shared=yes ;;
2336 *) _lt_dar_can_shared=$GCC ;;
2338 if test "$_lt_dar_can_shared" = "yes"; then
2339 output_verbose_link_cmd=echo
2340 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
2341 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2342 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
2343 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
2345 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2346 _LT_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${_lt_dsymutil}"
2347 _LT_TAGVAR(archive_expsym_cmds, $1)="sed '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${_lt_dar_export_syms}${_lt_dsymutil}"
2351 _LT_TAGVAR(ld_shlibs, $1)=no
2355 # _LT_SYS_MODULE_PATH_AIX
2356 # -----------------------
2357 # Links a minimal program and checks the executable
2358 # for the system default hardcoded library path. In most cases,
2359 # this is /usr/lib:/lib, but when the MPI compilers are used
2360 # the location of the communication and MPI libs are included too.
2361 # If we don't find anything, use the default library path according
2362 # to the aix ld manual.
2363 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2364 [m4_require([_LT_DECL_SED])dnl
2365 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2366 lt_aix_libpath_sed='
2367 /Import File Strings/,/^$/ {
2373 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2374 # Check for a 64-bit object if we didn't find anything.
2375 if test -z "$aix_libpath"; then
2376 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2378 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2379 ])# _LT_SYS_MODULE_PATH_AIX
2382 # _LT_SHELL_INIT(ARG)
2383 # -------------------
2384 m4_define([_LT_SHELL_INIT],
2385 [ifdef([AC_DIVERSION_NOTICE],
2386 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
2387 [AC_DIVERT_PUSH(NOTICE)])
2393 # _LT_PROG_ECHO_BACKSLASH
2394 # -----------------------
2395 # Add some code to the start of the generated configure script which
2396 # will find an echo command which doesn't interpret backslashes.
2397 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2399 # Check that we are running under the correct shell.
2400 SHELL=${CONFIG_SHELL-/bin/sh}
2404 # Remove one level of quotation (which was required for Make).
2405 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2409 ECHO=${lt_ECHO-echo}
2410 if test "X[$]1" = X--no-reexec; then
2411 # Discard the --no-reexec flag, and continue.
2413 elif test "X[$]1" = X--fallback-echo; then
2414 # Avoid inline document here, it may be left over
2416 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
2417 # Yippee, $ECHO works!
2420 # Restart under the correct shell.
2421 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2424 if test "X[$]1" = X--fallback-echo; then
2425 # used as fallback echo
2433 # The HP-UX ksh and POSIX shell print the target directory to stdout
2435 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2437 if test -z "$lt_ECHO"; then
2438 if test "X${echo_test_string+set}" != Xset; then
2439 # find a string as large as possible, as long as the shell can cope with it
2440 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
2441 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
2442 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
2443 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
2450 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2451 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2452 test "X$echo_testing_string" = "X$echo_test_string"; then
2455 # The Solaris, AIX, and Digital Unix default echo programs unquote
2456 # backslashes. This makes it impossible to quote backslashes using
2457 # echo "$something" | sed 's/\\/\\\\/g'
2459 # So, first we look for a working echo in the user's PATH.
2461 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2462 for dir in $PATH /usr/ucb; do
2464 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
2465 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
2466 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
2467 test "X$echo_testing_string" = "X$echo_test_string"; then
2474 if test "X$ECHO" = Xecho; then
2475 # We didn't find a better echo, so look for alternatives.
2476 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
2477 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
2478 test "X$echo_testing_string" = "X$echo_test_string"; then
2479 # This shell has a builtin print -r that does the trick.
2481 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
2482 test "X$CONFIG_SHELL" != X/bin/ksh; then
2483 # If we have ksh, try running configure again with it.
2484 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2485 export ORIGINAL_CONFIG_SHELL
2486 CONFIG_SHELL=/bin/ksh
2488 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2492 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2493 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2494 test "X$echo_testing_string" = "X$echo_test_string"; then
2495 # Cool, printf works
2497 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2498 test "X$echo_testing_string" = 'X\t' &&
2499 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2500 test "X$echo_testing_string" = "X$echo_test_string"; then
2501 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2503 SHELL="$CONFIG_SHELL"
2505 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2506 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2507 test "X$echo_testing_string" = 'X\t' &&
2508 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2509 test "X$echo_testing_string" = "X$echo_test_string"; then
2510 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2512 # maybe with a smaller string...
2515 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2516 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
2523 if test "$prev" != 'sed 50q "[$]0"'; then
2524 echo_test_string=`eval $prev`
2525 export echo_test_string
2526 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2528 # Oops. We lost completely, so just stick with echo.
2537 # Copy echo and quote the copy suitably for passing to libtool from
2538 # the Makefile, instead of quoting the original, which is used later.
2540 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2541 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2546 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2547 _LT_DECL([], [ECHO], [1],
2548 [An echo program that does not interpret backslashes])
2549 ])# _LT_PROG_ECHO_BACKSLASH
2554 m4_defun([_LT_ENABLE_LOCK],
2555 [AC_ARG_ENABLE([libtool-lock],
2556 [AS_HELP_STRING([--disable-libtool-lock],
2557 [avoid locking (might break parallel builds)])])
2558 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2560 # Some flags need to be propagated to the compiler or linker for good
2564 # Find out which ABI we are using.
2565 echo 'int i;' > conftest.$ac_ext
2566 if AC_TRY_EVAL(ac_compile); then
2567 case `/usr/bin/file conftest.$ac_objext` in
2579 # Find out which ABI we are using.
2580 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2581 if AC_TRY_EVAL(ac_compile); then
2582 if test "$lt_cv_prog_gnu_ld" = yes; then
2583 case `/usr/bin/file conftest.$ac_objext` in
2585 LD="${LD-ld} -melf32bsmip"
2588 LD="${LD-ld} -melf32bmipn32"
2591 LD="${LD-ld} -melf64bmip"
2595 case `/usr/bin/file conftest.$ac_objext` in
2611 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2612 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2613 # Find out which ABI we are using.
2614 echo 'int i;' > conftest.$ac_ext
2615 if AC_TRY_EVAL(ac_compile); then
2616 case `/usr/bin/file conftest.o` in
2619 x86_64-*kfreebsd*-gnu)
2620 LD="${LD-ld} -m elf_i386_fbsd"
2623 LD="${LD-ld} -m elf_i386"
2625 ppc64-*linux*|powerpc64-*linux*)
2626 LD="${LD-ld} -m elf32ppclinux"
2629 LD="${LD-ld} -m elf_s390"
2632 LD="${LD-ld} -m elf32_sparc"
2638 x86_64-*kfreebsd*-gnu)
2639 LD="${LD-ld} -m elf_x86_64_fbsd"
2642 LD="${LD-ld} -m elf_x86_64"
2644 ppc*-*linux*|powerpc*-*linux*)
2645 LD="${LD-ld} -m elf64ppc"
2647 s390*-*linux*|s390*-*tpf*)
2648 LD="${LD-ld} -m elf64_s390"
2651 LD="${LD-ld} -m elf64_sparc"
2661 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2662 SAVE_CFLAGS="$CFLAGS"
2663 CFLAGS="$CFLAGS -belf"
2664 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2666 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2668 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2669 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2670 CFLAGS="$SAVE_CFLAGS"
2674 # Find out which ABI we are using.
2675 echo 'int i;' > conftest.$ac_ext
2676 if AC_TRY_EVAL(ac_compile); then
2677 case `/usr/bin/file conftest.o` in
2679 case $lt_cv_prog_gnu_ld in
2680 yes*) LD="${LD-ld} -m elf64_sparc" ;;
2682 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2694 need_locks="$enable_libtool_lock"
2698 # _LT_CMD_OLD_ARCHIVE
2699 # -------------------
2700 m4_defun([_LT_CMD_OLD_ARCHIVE],
2701 [AC_CHECK_TOOL(AR, ar, false)
2702 test -z "$AR" && AR=ar
2703 test -z "$AR_FLAGS" && AR_FLAGS=cru
2704 _LT_DECL([], [AR], [1], [The archiver])
2705 _LT_DECL([], [AR_FLAGS], [1])
2707 AC_CHECK_TOOL(STRIP, strip, :)
2708 test -z "$STRIP" && STRIP=:
2709 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
2711 AC_CHECK_TOOL(RANLIB, ranlib, :)
2712 test -z "$RANLIB" && RANLIB=:
2713 _LT_DECL([], [RANLIB], [1],
2714 [Commands used to install an old-style archive])
2716 # Determine commands to create old-style static archives.
2717 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2718 old_postinstall_cmds='chmod 644 $oldlib'
2719 old_postuninstall_cmds=
2721 if test -n "$RANLIB"; then
2724 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2727 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2730 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2732 _LT_DECL([], [old_postinstall_cmds], [2])
2733 _LT_DECL([], [old_postuninstall_cmds], [2])
2734 _LT_TAGDECL([], [old_archive_cmds], [2],
2735 [Commands used to build an old-style archive])
2736 ])# _LT_CMD_OLD_ARCHIVE
2739 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2740 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2741 # ----------------------------------------------------------------
2742 # Check whether the given compiler option works
2743 AC_DEFUN([_LT_COMPILER_OPTION],
2744 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2745 m4_require([_LT_DECL_SED])dnl
2746 AC_CACHE_CHECK([$1], [$2],
2748 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2749 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2750 lt_compiler_flag="$3"
2751 # Insert the option either (1) after the last *FLAGS variable, or
2752 # (2) before a word containing "conftest.", or (3) at the end.
2753 # Note that $ac_compile itself does not contain backslashes and begins
2754 # with a dollar sign (not a hyphen), so the echo should work correctly.
2755 # The option is referenced via a variable to avoid confusing sed.
2756 lt_compile=`echo "$ac_compile" | $SED \
2757 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2758 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2759 -e 's:$: $lt_compiler_flag:'`
2760 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2761 (eval "$lt_compile" 2>conftest.err)
2763 cat conftest.err >&AS_MESSAGE_LOG_FD
2764 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2765 if (exit $ac_status) && test -s "$ac_outfile"; then
2766 # The compiler can only warn and ignore the option if not recognized
2767 # So say no if there are warnings other than the usual output.
2768 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2769 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2770 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2777 if test x"[$]$2" = xyes; then
2778 m4_if([$5], , :, [$5])
2780 m4_if([$6], , :, [$6])
2782 ])# _LT_COMPILER_OPTION
2785 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2786 dnl aclocal-1.4 backwards compatibility:
2787 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2790 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2791 # [ACTION-SUCCESS], [ACTION-FAILURE])
2792 # ----------------------------------------------------
2793 # Check whether the given linker option works
2794 AC_DEFUN([_LT_LINKER_OPTION],
2795 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2796 m4_require([_LT_DECL_SED])dnl
2797 AC_CACHE_CHECK([$1], [$2],
2799 save_LDFLAGS="$LDFLAGS"
2800 LDFLAGS="$LDFLAGS $3"
2801 echo "$lt_simple_link_test_code" > conftest.$ac_ext
2802 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2803 # The linker can only warn and ignore the option if not recognized
2804 # So say no if there are warnings
2805 if test -s conftest.err; then
2806 # Append any errors to the config.log.
2807 cat conftest.err 1>&AS_MESSAGE_LOG_FD
2808 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2809 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2810 if diff conftest.exp conftest.er2 >/dev/null; then
2818 LDFLAGS="$save_LDFLAGS"
2821 if test x"[$]$2" = xyes; then
2822 m4_if([$4], , :, [$4])
2824 m4_if([$5], , :, [$5])
2826 ])# _LT_LINKER_OPTION
2829 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2830 dnl aclocal-1.4 backwards compatibility:
2831 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2836 AC_DEFUN([LT_CMD_MAX_LEN],
2837 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2838 # find the maximum length of command line arguments
2839 AC_MSG_CHECKING([the maximum length of command line arguments])
2840 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2846 # On DJGPP, this test can blow up pretty badly due to problems in libc
2847 # (any single argument exceeding 2000 bytes causes a buffer overrun
2848 # during glob expansion). Even if it were fixed, the result of this
2849 # check would be larger than it should be.
2850 lt_cv_sys_max_cmd_len=12288; # 12K is about right
2854 # Under GNU Hurd, this test is not required because there is
2855 # no limit to the length of command line arguments.
2856 # Libtool will interpret -1 as no limit whatsoever
2857 lt_cv_sys_max_cmd_len=-1;
2860 cygwin* | mingw* | cegcc*)
2861 # On Win9x/ME, this test blows up -- it succeeds, but takes
2862 # about 5 minutes as the teststring grows exponentially.
2863 # Worse, since 9x/ME are not pre-emptively multitasking,
2864 # you end up with a "frozen" computer, even though with patience
2865 # the test eventually succeeds (with a max line length of 256k).
2866 # Instead, let's just punt: use the minimum linelength reported by
2867 # all of the supported platforms: 8192 (on NT/2K/XP).
2868 lt_cv_sys_max_cmd_len=8192;
2872 # On AmigaOS with pdksh, this test takes hours, literally.
2873 # So we just punt and use a minimum line length of 8192.
2874 lt_cv_sys_max_cmd_len=8192;
2877 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2878 # This has been around since 386BSD, at least. Likely further.
2879 if test -x /sbin/sysctl; then
2880 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2881 elif test -x /usr/sbin/sysctl; then
2882 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2884 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
2886 # And add a safety zone
2887 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2888 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2892 # We know the value 262144 and hardcode it with a safety zone (like BSD)
2893 lt_cv_sys_max_cmd_len=196608
2897 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2898 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2899 # nice to cause kernel panics so lets avoid the loop below.
2900 # First set a reasonable default.
2901 lt_cv_sys_max_cmd_len=16384
2903 if test -x /sbin/sysconfig; then
2904 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2905 *1*) lt_cv_sys_max_cmd_len=-1 ;;
2910 lt_cv_sys_max_cmd_len=102400
2912 sysv5* | sco5v6* | sysv4.2uw2*)
2913 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2914 if test -n "$kargmax"; then
2915 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
2917 lt_cv_sys_max_cmd_len=32768
2921 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2922 if test -n "$lt_cv_sys_max_cmd_len"; then
2923 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2924 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2926 # Make teststring a little bigger before we do anything with it.
2927 # a 1K string should be a reasonable start.
2928 for i in 1 2 3 4 5 6 7 8 ; do
2929 teststring=$teststring$teststring
2931 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2932 # If test is not a shell built-in, we'll probably end up computing a
2933 # maximum length that is only half of the actual maximum length, but
2935 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
2936 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
2937 test $i != 17 # 1/2 MB should be enough
2940 teststring=$teststring$teststring
2942 # Only check the string length outside the loop.
2943 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2945 # Add a significant safety factor because C++ compilers can tack on
2946 # massive amounts of additional arguments before passing them to the
2947 # linker. It appears as though 1/2 is a usable value.
2948 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2953 if test -n $lt_cv_sys_max_cmd_len ; then
2954 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2958 max_cmd_len=$lt_cv_sys_max_cmd_len
2959 _LT_DECL([], [max_cmd_len], [0],
2960 [What is the maximum length of a command?])
2964 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2965 dnl aclocal-1.4 backwards compatibility:
2966 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2971 m4_defun([_LT_HEADER_DLFCN],
2972 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2973 ])# _LT_HEADER_DLFCN
2976 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2977 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2978 # ----------------------------------------------------------------
2979 m4_defun([_LT_TRY_DLOPEN_SELF],
2980 [m4_require([_LT_HEADER_DLFCN])dnl
2981 if test "$cross_compiling" = yes; then :
2984 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2985 lt_status=$lt_dlunknown
2986 cat > conftest.$ac_ext <<_LT_EOF
2987 [#line __oline__ "configure"
2988 #include "confdefs.h"
2997 # define LT_DLGLOBAL RTLD_GLOBAL
3000 # define LT_DLGLOBAL DL_GLOBAL
3002 # define LT_DLGLOBAL 0
3006 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3007 find out it does not work in some platform. */
3008 #ifndef LT_DLLAZY_OR_NOW
3010 # define LT_DLLAZY_OR_NOW RTLD_LAZY
3013 # define LT_DLLAZY_OR_NOW DL_LAZY
3016 # define LT_DLLAZY_OR_NOW RTLD_NOW
3019 # define LT_DLLAZY_OR_NOW DL_NOW
3021 # define LT_DLLAZY_OR_NOW 0
3028 void fnord() { int i=42;}
3031 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3032 int status = $lt_dlunknown;
3036 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
3037 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3038 /* dlclose (self); */
3046 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3047 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3050 x$lt_dlno_uscore) $1 ;;
3051 x$lt_dlneed_uscore) $2 ;;
3052 x$lt_dlunknown|x*) $3 ;;
3055 # compilation failed
3060 ])# _LT_TRY_DLOPEN_SELF
3063 # LT_SYS_DLOPEN_SELF
3064 # ------------------
3065 AC_DEFUN([LT_SYS_DLOPEN_SELF],
3066 [m4_require([_LT_HEADER_DLFCN])dnl
3067 if test "x$enable_dlopen" != xyes; then
3068 enable_dlopen=unknown
3069 enable_dlopen_self=unknown
3070 enable_dlopen_self_static=unknown
3077 lt_cv_dlopen="load_add_on"
3079 lt_cv_dlopen_self=yes
3082 mingw* | pw32* | cegcc*)
3083 lt_cv_dlopen="LoadLibrary"
3088 lt_cv_dlopen="dlopen"
3093 # if libdl is installed we need to link against it
3094 AC_CHECK_LIB([dl], [dlopen],
3095 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3098 lt_cv_dlopen_self=yes
3103 AC_CHECK_FUNC([shl_load],
3104 [lt_cv_dlopen="shl_load"],
3105 [AC_CHECK_LIB([dld], [shl_load],
3106 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3107 [AC_CHECK_FUNC([dlopen],
3108 [lt_cv_dlopen="dlopen"],
3109 [AC_CHECK_LIB([dl], [dlopen],
3110 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3111 [AC_CHECK_LIB([svld], [dlopen],
3112 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3113 [AC_CHECK_LIB([dld], [dld_link],
3114 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3123 if test "x$lt_cv_dlopen" != xno; then
3129 case $lt_cv_dlopen in
3131 save_CPPFLAGS="$CPPFLAGS"
3132 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3134 save_LDFLAGS="$LDFLAGS"
3135 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3138 LIBS="$lt_cv_dlopen_libs $LIBS"
3140 AC_CACHE_CHECK([whether a program can dlopen itself],
3141 lt_cv_dlopen_self, [dnl
3142 _LT_TRY_DLOPEN_SELF(
3143 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3144 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3147 if test "x$lt_cv_dlopen_self" = xyes; then
3148 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3149 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3150 lt_cv_dlopen_self_static, [dnl
3151 _LT_TRY_DLOPEN_SELF(
3152 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3153 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
3157 CPPFLAGS="$save_CPPFLAGS"
3158 LDFLAGS="$save_LDFLAGS"
3163 case $lt_cv_dlopen_self in
3164 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3165 *) enable_dlopen_self=unknown ;;
3168 case $lt_cv_dlopen_self_static in
3169 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3170 *) enable_dlopen_self_static=unknown ;;
3173 _LT_DECL([dlopen_support], [enable_dlopen], [0],
3174 [Whether dlopen is supported])
3175 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3176 [Whether dlopen of programs is supported])
3177 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3178 [Whether dlopen of statically linked programs is supported])
3179 ])# LT_SYS_DLOPEN_SELF
3182 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3183 dnl aclocal-1.4 backwards compatibility:
3184 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3187 # _LT_COMPILER_C_O([TAGNAME])
3188 # ---------------------------
3189 # Check to see if options -c and -o are simultaneously supported by compiler.
3190 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
3191 m4_defun([_LT_COMPILER_C_O],
3192 [m4_require([_LT_DECL_SED])dnl
3193 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3194 m4_require([_LT_TAG_COMPILER])dnl
3195 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3196 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3197 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3198 $RM -r conftest 2>/dev/null
3202 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3204 lt_compiler_flag="-o out/conftest2.$ac_objext"
3205 # Insert the option either (1) after the last *FLAGS variable, or
3206 # (2) before a word containing "conftest.", or (3) at the end.
3207 # Note that $ac_compile itself does not contain backslashes and begins
3208 # with a dollar sign (not a hyphen), so the echo should work correctly.
3209 lt_compile=`echo "$ac_compile" | $SED \
3210 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3211 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3212 -e 's:$: $lt_compiler_flag:'`
3213 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3214 (eval "$lt_compile" 2>out/conftest.err)
3216 cat out/conftest.err >&AS_MESSAGE_LOG_FD
3217 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3218 if (exit $ac_status) && test -s out/conftest2.$ac_objext
3220 # The compiler can only warn and ignore the option if not recognized
3221 # So say no if there are warnings
3222 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
3223 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3224 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3225 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3228 chmod u+w . 2>&AS_MESSAGE_LOG_FD
3230 # SGI C++ compiler will create directory out/ii_files/ for
3231 # template instantiation
3232 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3233 $RM out/* && rmdir out
3238 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3239 [Does compiler simultaneously support -c and -o options?])
3240 ])# _LT_COMPILER_C_O
3243 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3244 # ----------------------------------
3245 # Check to see if we can do hard links to lock some files if needed
3246 m4_defun([_LT_COMPILER_FILE_LOCKS],
3247 [m4_require([_LT_ENABLE_LOCK])dnl
3248 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3249 _LT_COMPILER_C_O([$1])
3251 hard_links="nottested"
3252 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3253 # do not overwrite the value of need_locks provided by the user
3254 AC_MSG_CHECKING([if we can lock with hard links])
3257 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3259 ln conftest.a conftest.b 2>&5 || hard_links=no
3260 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3261 AC_MSG_RESULT([$hard_links])
3262 if test "$hard_links" = no; then
3263 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3269 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3270 ])# _LT_COMPILER_FILE_LOCKS
3275 m4_defun([_LT_CHECK_OBJDIR],
3276 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3277 [rm -f .libs 2>/dev/null
3278 mkdir .libs 2>/dev/null
3279 if test -d .libs; then
3282 # MS-DOS does not allow filenames that begin with a dot.
3285 rmdir .libs 2>/dev/null])
3286 objdir=$lt_cv_objdir
3287 _LT_DECL([], [objdir], [0],
3288 [The name of the directory that contains temporary libtool files])dnl
3289 m4_pattern_allow([LT_OBJDIR])dnl
3290 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3291 [Define to the sub-directory in which libtool stores uninstalled libraries.])
3292 ])# _LT_CHECK_OBJDIR
3295 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3296 # --------------------------------------
3297 # Check hardcoding attributes.
3298 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3299 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3300 _LT_TAGVAR(hardcode_action, $1)=
3301 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3302 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3303 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3305 # We can hardcode non-existent directories.
3306 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3307 # If the only mechanism to avoid hardcoding is shlibpath_var, we
3308 # have to relink, otherwise we might link with an installed library
3309 # when we should be linking with a yet-to-be-installed one
3310 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3311 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3312 # Linking always hardcodes the temporary library directory.
3313 _LT_TAGVAR(hardcode_action, $1)=relink
3315 # We can link without hardcoding, and we can hardcode nonexisting dirs.
3316 _LT_TAGVAR(hardcode_action, $1)=immediate
3319 # We cannot hardcode anything, or else we can only hardcode existing
3321 _LT_TAGVAR(hardcode_action, $1)=unsupported
3323 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3325 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3326 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3327 # Fast installation is not supported
3328 enable_fast_install=no
3329 elif test "$shlibpath_overrides_runpath" = yes ||
3330 test "$enable_shared" = no; then
3331 # Fast installation is not necessary
3332 enable_fast_install=needless
3334 _LT_TAGDECL([], [hardcode_action], [0],
3335 [How to hardcode a shared library path into an executable])
3336 ])# _LT_LINKER_HARDCODE_LIBPATH
3341 m4_defun([_LT_CMD_STRIPLIB],
3342 [m4_require([_LT_DECL_EGREP])
3345 AC_MSG_CHECKING([whether stripping libraries is possible])
3346 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3347 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3348 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3349 AC_MSG_RESULT([yes])
3351 # FIXME - insert some real tests, host_os isn't really good enough
3354 if test -n "$STRIP" ; then
3355 striplib="$STRIP -x"
3356 old_striplib="$STRIP -S"
3357 AC_MSG_RESULT([yes])
3367 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3368 _LT_DECL([], [striplib], [1])
3369 ])# _LT_CMD_STRIPLIB
3372 # _LT_SYS_DYNAMIC_LINKER([TAG])
3373 # -----------------------------
3374 # PORTME Fill in your ld.so characteristics
3375 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3376 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3377 m4_require([_LT_DECL_EGREP])dnl
3378 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3379 m4_require([_LT_DECL_OBJDUMP])dnl
3380 m4_require([_LT_DECL_SED])dnl
3381 AC_MSG_CHECKING([dynamic linker characteristics])
3384 if test "$GCC" = yes; then
3386 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3387 *) lt_awk_arg="/^libraries:/" ;;
3389 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3390 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
3391 # if the path contains ";" then we assume it to be the separator
3392 # otherwise default to the standard path separator (i.e. ":") - it is
3393 # assumed that no part of a normal pathname contains ";" but that should
3394 # okay in the real world where ";" in dirpaths is itself problematic.
3395 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
3397 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3399 # Ok, now we have the path, separated by spaces, we can step through it
3400 # and add multilib dir if necessary.
3401 lt_tmp_lt_search_path_spec=
3402 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3403 for lt_sys_path in $lt_search_path_spec; do
3404 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3405 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3407 test -d "$lt_sys_path" && \
3408 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3411 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
3412 BEGIN {RS=" "; FS="/|\n";} {
3415 for (lt_i = NF; lt_i > 0; lt_i--) {
3416 if ($lt_i != "" && $lt_i != ".") {
3417 if ($lt_i == "..") {
3420 if (lt_count == 0) {
3421 lt_foo="/" $lt_i lt_foo;
3428 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3429 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3431 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
3433 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3436 libname_spec='lib$name'
3444 shlibpath_overrides_runpath=unknown
3446 dynamic_linker="$host_os ld.so"
3447 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3448 need_lib_prefix=unknown
3449 hardcode_into_libs=no
3451 # when you set need_version to no, make sure it does not cause -set_version
3452 # flags to be left without arguments
3453 need_version=unknown
3458 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3459 shlibpath_var=LIBPATH
3461 # AIX 3 has no versioning support, so we append a major version to the name.
3462 soname_spec='${libname}${release}${shared_ext}$major'
3469 hardcode_into_libs=yes
3470 if test "$host_cpu" = ia64; then
3471 # AIX 5 supports IA64
3472 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3473 shlibpath_var=LD_LIBRARY_PATH
3475 # With GCC up to 2.95.x, collect2 would create an import file
3476 # for dependence libraries. The import file would start with
3477 # the line `#! .'. This would cause the generated library to
3478 # depend on `.', always an invalid library. This was fixed in
3479 # development snapshots of GCC prior to 3.0.
3481 aix4 | aix4.[[01]] | aix4.[[01]].*)
3482 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3484 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3491 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3492 # soname into executable. Probably we can add versioning support to
3493 # collect2, so additional links can be useful in future.
3494 if test "$aix_use_runtimelinking" = yes; then
3495 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3496 # instead of lib<name>.a to let people know that these are not
3497 # typical AIX shared libraries.
3498 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3500 # We preserve .a as extension for shared libraries through AIX4.2
3501 # and later when we are not doing run time linking.
3502 library_names_spec='${libname}${release}.a $libname.a'
3503 soname_spec='${libname}${release}${shared_ext}$major'
3505 shlibpath_var=LIBPATH
3512 # Since July 2007 AmigaOS4 officially supports .so libraries.
3513 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3514 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3517 library_names_spec='$libname.ixlibrary $libname.a'
3518 # Create ${libname}_ixlibrary.a entries in /sys/libs.
3519 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'
3525 library_names_spec='${libname}${shared_ext}'
3526 dynamic_linker="$host_os ld.so"
3527 shlibpath_var=LIBRARY_PATH
3533 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3534 soname_spec='${libname}${release}${shared_ext}$major'
3535 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3536 shlibpath_var=LD_LIBRARY_PATH
3537 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3538 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3539 # the default ld.so.conf also contains /usr/contrib/lib and
3540 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3541 # libtool to hard-code these into programs
3544 cygwin* | mingw* | pw32* | cegcc*)
3545 version_type=windows
3550 case $GCC,$host_os in
3551 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
3552 library_names_spec='$libname.dll.a'
3553 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3554 postinstall_cmds='base_file=`basename \${file}`~
3555 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3556 dldir=$destdir/`dirname \$dlpath`~
3557 test -d \$dldir || mkdir -p \$dldir~
3558 $install_prog $dir/$dlname \$dldir/$dlname~
3559 chmod a+x \$dldir/$dlname~
3560 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3561 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3563 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3564 dlpath=$dir/\$dldll~
3566 shlibpath_overrides_runpath=yes
3570 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3571 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3572 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3575 # MinGW DLLs use traditional 'lib' prefix
3576 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3577 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3578 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3579 # It is most probably a Windows format PATH printed by
3580 # mingw gcc, but we are running on Cygwin. Gcc prints its search
3581 # path with ; separators, and with drive letters. We can handle the
3582 # drive letters (cygwin fileutils understands them), so leave them,
3583 # especially as we might pass files found there to a mingw objdump,
3584 # which wouldn't understand a cygwinified path. Ahh.
3585 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3587 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3591 # pw32 DLLs use 'pw' prefix rather than 'lib'
3592 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3598 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3601 dynamic_linker='Win32 ld.exe'
3602 # FIXME: first we should search . and the directory the executable is in
3606 darwin* | rhapsody*)
3607 dynamic_linker="$host_os dyld"
3611 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3612 soname_spec='${libname}${release}${major}$shared_ext'
3613 shlibpath_overrides_runpath=yes
3614 shlibpath_var=DYLD_LIBRARY_PATH
3615 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3617 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3618 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3625 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3626 soname_spec='${libname}${release}${shared_ext}$major'
3627 shlibpath_var=LD_LIBRARY_PATH
3634 freebsd* | dragonfly*)
3635 # DragonFly does not have aout. When/if they implement a new
3636 # versioning mechanism, adjust this.
3637 if test -x /usr/bin/objformat; then
3638 objformat=`/usr/bin/objformat`
3641 freebsd[[123]]*) objformat=aout ;;
3645 version_type=freebsd-$objformat
3646 case $version_type in
3648 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3653 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3657 shlibpath_var=LD_LIBRARY_PATH
3660 shlibpath_overrides_runpath=yes
3662 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3663 shlibpath_overrides_runpath=yes
3664 hardcode_into_libs=yes
3666 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3667 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3668 shlibpath_overrides_runpath=no
3669 hardcode_into_libs=yes
3671 *) # from 4.6 on, and DragonFly
3672 shlibpath_overrides_runpath=yes
3673 hardcode_into_libs=yes
3682 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3683 soname_spec='${libname}${release}${shared_ext}$major'
3684 shlibpath_var=LD_LIBRARY_PATH
3685 hardcode_into_libs=yes
3688 hpux9* | hpux10* | hpux11*)
3689 # Give a soname corresponding to the major version so that dld.sl refuses to
3690 # link against other versions.
3697 hardcode_into_libs=yes
3698 dynamic_linker="$host_os dld.so"
3699 shlibpath_var=LD_LIBRARY_PATH
3700 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3701 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3702 soname_spec='${libname}${release}${shared_ext}$major'
3703 if test "X$HPUX_IA64_MODE" = X32; then
3704 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3706 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3708 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3712 hardcode_into_libs=yes
3713 dynamic_linker="$host_os dld.sl"
3714 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3715 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3716 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3717 soname_spec='${libname}${release}${shared_ext}$major'
3718 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3719 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3723 dynamic_linker="$host_os dld.sl"
3724 shlibpath_var=SHLIB_PATH
3725 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3726 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3727 soname_spec='${libname}${release}${shared_ext}$major'
3730 # HP-UX runs *really* slowly unless shared libraries are mode 555.
3731 postinstall_cmds='chmod 555 $lib'
3738 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3739 soname_spec='${libname}${release}${shared_ext}$major'
3740 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3741 shlibpath_var=LD_LIBRARY_PATH
3742 shlibpath_overrides_runpath=no
3743 hardcode_into_libs=yes
3746 irix5* | irix6* | nonstopux*)
3748 nonstopux*) version_type=nonstopux ;;
3750 if test "$lt_cv_prog_gnu_ld" = yes; then
3758 soname_spec='${libname}${release}${shared_ext}$major'
3759 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3761 irix5* | nonstopux*)
3765 case $LD in # libtool.m4 will add one of these switches to LD
3766 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3767 libsuff= shlibsuff= libmagic=32-bit;;
3768 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3769 libsuff=32 shlibsuff=N32 libmagic=N32;;
3770 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3771 libsuff=64 shlibsuff=64 libmagic=64-bit;;
3772 *) libsuff= shlibsuff= libmagic=never-match;;
3776 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3777 shlibpath_overrides_runpath=no
3778 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3779 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3780 hardcode_into_libs=yes
3783 # No shared lib support for Linux oldld, aout, or coff.
3784 linux*oldld* | linux*aout* | linux*coff*)
3788 # This must be Linux ELF.
3789 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3793 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3794 soname_spec='${libname}${release}${shared_ext}$major'
3795 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3796 shlibpath_var=LD_LIBRARY_PATH
3797 shlibpath_overrides_runpath=no
3798 # Some binutils ld are patched to set DT_RUNPATH
3799 save_LDFLAGS=$LDFLAGS
3801 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3802 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3803 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3804 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3805 [shlibpath_overrides_runpath=yes])])
3806 LDFLAGS=$save_LDFLAGS
3809 # This implies no fast_install, which is unacceptable.
3810 # Some rework will be needed to allow for fast_install
3811 # before this can be enabled.
3812 hardcode_into_libs=yes
3814 # Append ld.so.conf contents to the search path
3815 if test -f /etc/ld.so.conf; then
3816 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
3817 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3820 # We used to test for /lib/ld.so.1 and disable shared libraries on
3821 # powerpc, because MkLinux only supported shared libraries with the
3822 # GNU dynamic linker. Since this was broken with cross compilers,
3823 # most powerpc-linux boxes support dynamic linking these days and
3824 # people can always --disable-shared, the test was removed, and we
3825 # assume the GNU/Linux dynamic linker is in use.
3826 dynamic_linker='GNU/Linux ld.so'
3833 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3834 soname_spec='${libname}${release}${shared_ext}$major'
3835 shlibpath_var=LD_LIBRARY_PATH
3836 shlibpath_overrides_runpath=no
3837 hardcode_into_libs=yes
3838 dynamic_linker='NetBSD ld.elf_so'
3845 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3846 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3847 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3848 dynamic_linker='NetBSD (a.out) ld.so'
3850 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3851 soname_spec='${libname}${release}${shared_ext}$major'
3852 dynamic_linker='NetBSD ld.elf_so'
3854 shlibpath_var=LD_LIBRARY_PATH
3855 shlibpath_overrides_runpath=yes
3856 hardcode_into_libs=yes
3861 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3862 shlibpath_var=LD_LIBRARY_PATH
3863 shlibpath_overrides_runpath=yes
3870 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3871 soname_spec='${libname}${release}${shared_ext}$major'
3872 shlibpath_var=LD_LIBRARY_PATH
3873 shlibpath_overrides_runpath=no
3874 hardcode_into_libs=yes
3875 dynamic_linker='ldqnx.so'
3880 sys_lib_dlsearch_path_spec="/usr/lib"
3882 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3884 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3885 *) need_version=no ;;
3887 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3888 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3889 shlibpath_var=LD_LIBRARY_PATH
3890 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3892 openbsd2.[[89]] | openbsd2.[[89]].*)
3893 shlibpath_overrides_runpath=no
3896 shlibpath_overrides_runpath=yes
3900 shlibpath_overrides_runpath=yes
3905 libname_spec='$name'
3908 library_names_spec='$libname${shared_ext} $libname.a'
3909 dynamic_linker='OS/2 ld.exe'
3910 shlibpath_var=LIBPATH
3913 osf3* | osf4* | osf5*)
3917 soname_spec='${libname}${release}${shared_ext}$major'
3918 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3919 shlibpath_var=LD_LIBRARY_PATH
3920 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3921 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3932 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3933 soname_spec='${libname}${release}${shared_ext}$major'
3934 shlibpath_var=LD_LIBRARY_PATH
3935 shlibpath_overrides_runpath=yes
3936 hardcode_into_libs=yes
3937 # ldd complains unless libraries are executable
3938 postinstall_cmds='chmod +x $lib'
3943 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3944 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3945 shlibpath_var=LD_LIBRARY_PATH
3946 shlibpath_overrides_runpath=yes
3947 if test "$with_gnu_ld" = yes; then
3955 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3956 soname_spec='${libname}${release}${shared_ext}$major'
3957 shlibpath_var=LD_LIBRARY_PATH
3958 case $host_vendor in
3960 shlibpath_overrides_runpath=no
3962 runpath_var=LD_RUN_PATH
3970 shlibpath_overrides_runpath=no
3971 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3977 if test -d /usr/nec ;then
3979 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3980 soname_spec='$libname${shared_ext}.$major'
3981 shlibpath_var=LD_LIBRARY_PATH
3985 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3986 version_type=freebsd-elf
3989 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3990 soname_spec='${libname}${release}${shared_ext}$major'
3991 shlibpath_var=LD_LIBRARY_PATH
3992 shlibpath_overrides_runpath=yes
3993 hardcode_into_libs=yes
3994 if test "$with_gnu_ld" = yes; then
3995 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3997 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4000 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4004 sys_lib_dlsearch_path_spec='/usr/lib'
4008 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
4012 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4013 shlibpath_var=LD_LIBRARY_PATH
4014 shlibpath_overrides_runpath=no
4015 hardcode_into_libs=yes
4020 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4021 soname_spec='${libname}${release}${shared_ext}$major'
4022 shlibpath_var=LD_LIBRARY_PATH
4029 AC_MSG_RESULT([$dynamic_linker])
4030 test "$dynamic_linker" = no && can_build_shared=no
4032 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4033 if test "$GCC" = yes; then
4034 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4037 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4038 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4040 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4041 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4044 _LT_DECL([], [variables_saved_for_relink], [1],
4045 [Variables whose values should be saved in libtool wrapper scripts and
4046 restored at link time])
4047 _LT_DECL([], [need_lib_prefix], [0],
4048 [Do we need the "lib" prefix for modules?])
4049 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4050 _LT_DECL([], [version_type], [0], [Library versioning type])
4051 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
4052 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4053 _LT_DECL([], [shlibpath_overrides_runpath], [0],
4054 [Is shlibpath searched before the hard-coded library search path?])
4055 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4056 _LT_DECL([], [library_names_spec], [1],
4057 [[List of archive names. First name is the real one, the rest are links.
4058 The last name is the one that the linker finds with -lNAME]])
4059 _LT_DECL([], [soname_spec], [1],
4060 [[The coded name of the library, if different from the real name]])
4061 _LT_DECL([], [postinstall_cmds], [2],
4062 [Command to use after installation of a shared archive])
4063 _LT_DECL([], [postuninstall_cmds], [2],
4064 [Command to use after uninstallation of a shared archive])
4065 _LT_DECL([], [finish_cmds], [2],
4066 [Commands used to finish a libtool library installation in a directory])
4067 _LT_DECL([], [finish_eval], [1],
4068 [[As "finish_cmds", except a single script fragment to be evaled but
4070 _LT_DECL([], [hardcode_into_libs], [0],
4071 [Whether we should hardcode library paths into libraries])
4072 _LT_DECL([], [sys_lib_search_path_spec], [2],
4073 [Compile-time system search path for libraries])
4074 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4075 [Run-time system search path for libraries])
4076 ])# _LT_SYS_DYNAMIC_LINKER
4079 # _LT_PATH_TOOL_PREFIX(TOOL)
4080 # --------------------------
4081 # find a file program which can recognize shared library
4082 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4083 [m4_require([_LT_DECL_EGREP])dnl
4084 AC_MSG_CHECKING([for $1])
4085 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4087 [[\\/*] | ?:[\\/]*])
4088 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4091 lt_save_MAGIC_CMD="$MAGIC_CMD"
4092 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4093 dnl $ac_dummy forces splitting on constant user-supplied paths.
4094 dnl POSIX.2 word splitting is done only on the output of word expansions,
4095 dnl not every word. This closes a longstanding sh security hole.
4096 ac_dummy="m4_if([$2], , $PATH, [$2])"
4097 for ac_dir in $ac_dummy; do
4099 test -z "$ac_dir" && ac_dir=.
4100 if test -f $ac_dir/$1; then
4101 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4102 if test -n "$file_magic_test_file"; then
4103 case $deplibs_check_method in
4105 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4106 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4107 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4108 $EGREP "$file_magic_regex" > /dev/null; then
4113 *** Warning: the command libtool uses to detect shared libraries,
4114 *** $file_magic_cmd, produces output that libtool cannot recognize.
4115 *** The result is that libtool may fail to recognize shared libraries
4116 *** as such. This will affect the creation of libtool libraries that
4117 *** depend on shared libraries, but programs linked with such libtool
4118 *** libraries will work regardless of this problem. Nevertheless, you
4119 *** may want to report the problem to your system manager and/or to
4120 *** bug-libtool@gnu.org
4130 MAGIC_CMD="$lt_save_MAGIC_CMD"
4133 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4134 if test -n "$MAGIC_CMD"; then
4135 AC_MSG_RESULT($MAGIC_CMD)
4139 _LT_DECL([], [MAGIC_CMD], [0],
4140 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4141 ])# _LT_PATH_TOOL_PREFIX
4144 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4145 dnl aclocal-1.4 backwards compatibility:
4146 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4151 # find a file program which can recognize a shared library
4152 m4_defun([_LT_PATH_MAGIC],
4153 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4154 if test -z "$lt_cv_path_MAGIC_CMD"; then
4155 if test -n "$ac_tool_prefix"; then
4156 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4166 # find the pathname to the GNU or non-GNU linker
4167 AC_DEFUN([LT_PATH_LD],
4168 [AC_REQUIRE([AC_PROG_CC])dnl
4169 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4170 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4171 m4_require([_LT_DECL_SED])dnl
4172 m4_require([_LT_DECL_EGREP])dnl
4174 AC_ARG_WITH([gnu-ld],
4175 [AS_HELP_STRING([--with-gnu-ld],
4176 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4177 [test "$withval" = no || with_gnu_ld=yes],
4178 [with_gnu_ld=no])dnl
4181 if test "$GCC" = yes; then
4182 # Check if gcc -print-prog-name=ld gives a path.
4183 AC_MSG_CHECKING([for ld used by $CC])
4186 # gcc leaves a trailing carriage return which upsets mingw
4187 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4189 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4192 # Accept absolute paths.
4193 [[\\/]]* | ?:[[\\/]]*)
4194 re_direlt='/[[^/]][[^/]]*/\.\./'
4195 # Canonicalize the pathname of ld
4196 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4197 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4198 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4200 test -z "$LD" && LD="$ac_prog"
4203 # If it fails, then pretend we aren't using GCC.
4207 # If it is relative, then search for the first ld in PATH.
4211 elif test "$with_gnu_ld" = yes; then
4212 AC_MSG_CHECKING([for GNU ld])
4214 AC_MSG_CHECKING([for non-GNU ld])
4216 AC_CACHE_VAL(lt_cv_path_LD,
4217 [if test -z "$LD"; then
4218 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4219 for ac_dir in $PATH; do
4221 test -z "$ac_dir" && ac_dir=.
4222 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4223 lt_cv_path_LD="$ac_dir/$ac_prog"
4224 # Check to see if the program is GNU ld. I'd rather use --version,
4225 # but apparently some variants of GNU ld only accept -v.
4226 # Break only if it was the GNU/non-GNU ld that we prefer.
4227 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4228 *GNU* | *'with BFD'*)
4229 test "$with_gnu_ld" != no && break
4232 test "$with_gnu_ld" != yes && break
4239 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4242 if test -n "$LD"; then
4247 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4251 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4255 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4256 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4257 dnl aclocal-1.4 backwards compatibility:
4258 dnl AC_DEFUN([AM_PROG_LD], [])
4259 dnl AC_DEFUN([AC_PROG_LD], [])
4264 m4_defun([_LT_PATH_LD_GNU],
4265 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4266 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4267 case `$LD -v 2>&1 </dev/null` in
4268 *GNU* | *'with BFD'*)
4269 lt_cv_prog_gnu_ld=yes
4272 lt_cv_prog_gnu_ld=no
4275 with_gnu_ld=$lt_cv_prog_gnu_ld
4281 # find reload flag for linker
4282 # -- PORTME Some linkers may need a different reload flag.
4283 m4_defun([_LT_CMD_RELOAD],
4284 [AC_CACHE_CHECK([for $LD option to reload object files],
4285 lt_cv_ld_reload_flag,
4286 [lt_cv_ld_reload_flag='-r'])
4287 reload_flag=$lt_cv_ld_reload_flag
4288 case $reload_flag in
4290 *) reload_flag=" $reload_flag" ;;
4292 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4295 if test "$GCC" = yes; then
4296 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4298 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4302 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4303 _LT_DECL([], [reload_cmds], [2])dnl
4307 # _LT_CHECK_MAGIC_METHOD
4308 # ----------------------
4309 # how to check for library dependencies
4310 # -- PORTME fill in with the dynamic library characteristics
4311 m4_defun([_LT_CHECK_MAGIC_METHOD],
4312 [m4_require([_LT_DECL_EGREP])
4313 m4_require([_LT_DECL_OBJDUMP])
4314 AC_CACHE_CHECK([how to recognize dependent libraries],
4315 lt_cv_deplibs_check_method,
4316 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4317 lt_cv_file_magic_test_file=
4318 lt_cv_deplibs_check_method='unknown'
4319 # Need to set the preceding variable on all platforms that support
4320 # interlibrary dependencies.
4321 # 'none' -- dependencies not supported.
4322 # `unknown' -- same as none, but documents that we really don't know.
4323 # 'pass_all' -- all dependencies passed with no checks.
4324 # 'test_compile' -- check by making test program.
4325 # 'file_magic [[regex]]' -- check by looking for files in library path
4326 # which responds to the $file_magic_cmd with a given extended regex.
4327 # If you have `file' or equivalent on your system and you're not sure
4328 # whether `pass_all' will *always* work, you probably want this one.
4332 lt_cv_deplibs_check_method=pass_all
4336 lt_cv_deplibs_check_method=pass_all
4340 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4341 lt_cv_file_magic_cmd='/usr/bin/file -L'
4342 lt_cv_file_magic_test_file=/shlib/libc.so
4346 # func_win32_libid is a shell function defined in ltmain.sh
4347 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4348 lt_cv_file_magic_cmd='func_win32_libid'
4352 # Base MSYS/MinGW do not provide the 'file' command needed by
4353 # func_win32_libid shell function, so use a weaker test based on 'objdump',
4354 # unless we find 'file', for example because we are cross-compiling.
4355 if ( file / ) >/dev/null 2>&1; then
4356 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4357 lt_cv_file_magic_cmd='func_win32_libid'
4359 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4360 lt_cv_file_magic_cmd='$OBJDUMP -f'
4365 # use the weaker test based on 'objdump'. See mingw*.
4366 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4367 lt_cv_file_magic_cmd='$OBJDUMP -f'
4370 darwin* | rhapsody*)
4371 lt_cv_deplibs_check_method=pass_all
4374 freebsd* | dragonfly*)
4375 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4378 # Not sure whether the presence of OpenBSD here was a mistake.
4379 # Let's accept both of them until this is cleared up.
4380 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4381 lt_cv_file_magic_cmd=/usr/bin/file
4382 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4386 lt_cv_deplibs_check_method=pass_all
4391 lt_cv_deplibs_check_method=pass_all
4394 hpux10.20* | hpux11*)
4395 lt_cv_file_magic_cmd=/usr/bin/file
4398 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4399 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4402 [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]']
4403 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4406 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4407 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4413 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4414 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4417 irix5* | irix6* | nonstopux*)
4419 *-32|*"-32 ") libmagic=32-bit;;
4420 *-n32|*"-n32 ") libmagic=N32;;
4421 *-64|*"-64 ") libmagic=64-bit;;
4422 *) libmagic=never-match;;
4424 lt_cv_deplibs_check_method=pass_all
4427 # This must be Linux ELF.
4428 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4429 lt_cv_deplibs_check_method=pass_all
4432 netbsd* | netbsdelf*-gnu)
4433 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4434 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4436 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4441 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4442 lt_cv_file_magic_cmd=/usr/bin/file
4443 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4447 lt_cv_deplibs_check_method=pass_all
4451 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4452 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4454 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4458 osf3* | osf4* | osf5*)
4459 lt_cv_deplibs_check_method=pass_all
4463 lt_cv_deplibs_check_method=pass_all
4467 lt_cv_deplibs_check_method=pass_all
4470 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4471 lt_cv_deplibs_check_method=pass_all
4475 case $host_vendor in
4477 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]]'
4478 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4481 lt_cv_deplibs_check_method=pass_all
4484 lt_cv_file_magic_cmd='/bin/file'
4485 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4488 lt_cv_file_magic_cmd='/bin/file'
4489 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4490 lt_cv_file_magic_test_file=/lib/libc.so
4493 lt_cv_deplibs_check_method=pass_all
4496 lt_cv_deplibs_check_method=pass_all
4502 lt_cv_deplibs_check_method=pass_all
4506 file_magic_cmd=$lt_cv_file_magic_cmd
4507 deplibs_check_method=$lt_cv_deplibs_check_method
4508 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4510 _LT_DECL([], [deplibs_check_method], [1],
4511 [Method to check whether dependent libraries are shared objects])
4512 _LT_DECL([], [file_magic_cmd], [1],
4513 [Command to use when deplibs_check_method == "file_magic"])
4514 ])# _LT_CHECK_MAGIC_METHOD
4519 # find the pathname to a BSD- or MS-compatible name lister
4520 AC_DEFUN([LT_PATH_NM],
4521 [AC_REQUIRE([AC_PROG_CC])dnl
4522 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4523 [if test -n "$NM"; then
4524 # Let the user override the test.
4527 lt_nm_to_check="${ac_tool_prefix}nm"
4528 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4529 lt_nm_to_check="$lt_nm_to_check nm"
4531 for lt_tmp_nm in $lt_nm_to_check; do
4532 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4533 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4535 test -z "$ac_dir" && ac_dir=.
4536 tmp_nm="$ac_dir/$lt_tmp_nm"
4537 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4538 # Check to see if the nm accepts a BSD-compat flag.
4539 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4540 # nm: unknown option "B" ignored
4541 # Tru64's nm complains that /dev/null is an invalid object file
4542 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4543 */dev/null* | *'Invalid file or object type'*)
4544 lt_cv_path_NM="$tmp_nm -B"
4548 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4550 lt_cv_path_NM="$tmp_nm -p"
4554 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4555 continue # so that we can try to find one that supports BSD flags
4564 : ${lt_cv_path_NM=no}
4566 if test "$lt_cv_path_NM" != "no"; then
4569 # Didn't find any BSD compatible name lister, look for dumpbin.
4570 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
4572 if test "$DUMPBIN" != ":"; then
4576 test -z "$NM" && NM=nm
4578 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4580 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4581 [lt_cv_nm_interface="BSD nm"
4582 echo "int some_variable = 0;" > conftest.$ac_ext
4583 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4584 (eval "$ac_compile" 2>conftest.err)
4585 cat conftest.err >&AS_MESSAGE_LOG_FD
4586 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4587 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4588 cat conftest.err >&AS_MESSAGE_LOG_FD
4589 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
4590 cat conftest.out >&AS_MESSAGE_LOG_FD
4591 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4592 lt_cv_nm_interface="MS dumpbin"
4598 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4599 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4600 dnl aclocal-1.4 backwards compatibility:
4601 dnl AC_DEFUN([AM_PROG_NM], [])
4602 dnl AC_DEFUN([AC_PROG_NM], [])
4607 # check for math library
4608 AC_DEFUN([LT_LIB_M],
4609 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4612 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4613 # These system don't have libm, or don't need it
4616 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4617 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4620 AC_CHECK_LIB(m, cos, LIBM="-lm")
4627 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4628 dnl aclocal-1.4 backwards compatibility:
4629 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4632 # _LT_COMPILER_NO_RTTI([TAGNAME])
4633 # -------------------------------
4634 m4_defun([_LT_COMPILER_NO_RTTI],
4635 [m4_require([_LT_TAG_COMPILER])dnl
4637 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4639 if test "$GCC" = yes; then
4640 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4642 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4643 lt_cv_prog_compiler_rtti_exceptions,
4644 [-fno-rtti -fno-exceptions], [],
4645 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4647 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4648 [Compiler flag to turn off builtin functions])
4649 ])# _LT_COMPILER_NO_RTTI
4652 # _LT_CMD_GLOBAL_SYMBOLS
4653 # ----------------------
4654 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4655 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4656 AC_REQUIRE([AC_PROG_CC])dnl
4657 AC_REQUIRE([LT_PATH_NM])dnl
4658 AC_REQUIRE([LT_PATH_LD])dnl
4659 m4_require([_LT_DECL_SED])dnl
4660 m4_require([_LT_DECL_EGREP])dnl
4661 m4_require([_LT_TAG_COMPILER])dnl
4663 # Check for command to grab the raw symbol name followed by C symbol from nm.
4664 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4665 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4667 # These are sane defaults that work on at least a few old systems.
4668 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4670 # Character class describing NM global symbol codes.
4671 symcode='[[BCDEGRST]]'
4673 # Regexp to match symbols that can be accessed directly from C.
4674 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4676 # Define system-specific variables.
4681 cygwin* | mingw* | pw32* | cegcc*)
4682 symcode='[[ABCDGISTW]]'
4685 if test "$host_cpu" = ia64; then
4686 symcode='[[ABCDEGRST]]'
4690 symcode='[[BCDEGRST]]'
4693 symcode='[[BCDEGQRST]]'
4704 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4708 symcode='[[DFNSTU]]'
4712 # If we're using GNU nm, then use its standard symbol codes.
4713 case `$NM -V 2>&1` in
4714 *GNU* | *'with BFD'*)
4715 symcode='[[ABCDGIRSTW]]' ;;
4718 # Transform an extracted symbol line into a proper C declaration.
4719 # Some systems (esp. on ia64) link data and code symbols differently,
4720 # so use this general approach.
4721 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4723 # Transform an extracted symbol line into symbol name and symbol address
4724 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
4725 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
4727 # Handle CRLF in mingw tool chain
4731 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4735 # Try without a prefix underscore, then with it.
4736 for ac_symprfx in "" "_"; do
4738 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4739 symxfrm="\\1 $ac_symprfx\\2 \\2"
4741 # Write the raw and C identifiers.
4742 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4743 # Fake it for dumpbin and say T for any non-static function
4744 # and D for any global variable.
4745 # Also find C++ and __fastcall symbols from MSVC++,
4746 # which start with @ or ?.
4747 lt_cv_sys_global_symbol_pipe="$AWK ['"\
4748 " {last_section=section; section=\$ 3};"\
4749 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4750 " \$ 0!~/External *\|/{next};"\
4751 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4752 " {if(hide[section]) next};"\
4753 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4754 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4755 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
4756 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4757 " ' prfx=^$ac_symprfx]"
4759 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4762 # Check to see that the pipe works correctly.
4766 cat > conftest.$ac_ext <<_LT_EOF
4771 void nm_test_func(void);
4772 void nm_test_func(void){}
4776 int main(){nm_test_var='a';nm_test_func();return(0);}
4779 if AC_TRY_EVAL(ac_compile); then
4780 # Now try to grab the symbols.
4782 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4783 # Try sorting and uniquifying the output.
4784 if sort "$nlist" | uniq > "$nlist"T; then
4785 mv -f "$nlist"T "$nlist"
4790 # Make sure that we snagged all the symbols we need.
4791 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4792 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4793 cat <<_LT_EOF > conftest.$ac_ext
4799 # Now generate the symbol file.
4800 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4802 cat <<_LT_EOF >> conftest.$ac_ext
4804 /* The mapping between symbol names and symbols. */
4809 lt__PROGRAM__LTX_preloaded_symbols[[]] =
4811 { "@PROGRAM@", (void *) 0 },
4813 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4814 cat <<\_LT_EOF >> conftest.$ac_ext
4818 /* This works around a problem in FreeBSD linker */
4819 #ifdef FREEBSD_WORKAROUND
4820 static const void *lt_preloaded_setup() {
4821 return lt__PROGRAM__LTX_preloaded_symbols;
4829 # Now try linking the two files.
4830 mv conftest.$ac_objext conftstm.$ac_objext
4831 lt_save_LIBS="$LIBS"
4832 lt_save_CFLAGS="$CFLAGS"
4833 LIBS="conftstm.$ac_objext"
4834 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4835 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4838 LIBS="$lt_save_LIBS"
4839 CFLAGS="$lt_save_CFLAGS"
4841 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4844 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4847 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4850 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4851 cat conftest.$ac_ext >&5
4853 rm -rf conftest* conftst*
4855 # Do not use the global_symbol_pipe unless it works.
4856 if test "$pipe_works" = yes; then
4859 lt_cv_sys_global_symbol_pipe=
4863 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4864 lt_cv_sys_global_symbol_to_cdecl=
4866 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4867 AC_MSG_RESULT(failed)
4872 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4873 [Take the output of nm and produce a listing of raw symbols and C names])
4874 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4875 [Transform the output of nm in a proper C declaration])
4876 _LT_DECL([global_symbol_to_c_name_address],
4877 [lt_cv_sys_global_symbol_to_c_name_address], [1],
4878 [Transform the output of nm in a C name address pair])
4879 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4880 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4881 [Transform the output of nm in a C name address pair when lib prefix is needed])
4882 ]) # _LT_CMD_GLOBAL_SYMBOLS
4885 # _LT_COMPILER_PIC([TAGNAME])
4886 # ---------------------------
4887 m4_defun([_LT_COMPILER_PIC],
4888 [m4_require([_LT_TAG_COMPILER])dnl
4889 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
4890 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4891 _LT_TAGVAR(lt_prog_compiler_static, $1)=
4893 AC_MSG_CHECKING([for $compiler option to produce PIC])
4894 m4_if([$1], [CXX], [
4895 # C++ specific cases for pic, static, wl, etc.
4896 if test "$GXX" = yes; then
4897 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4898 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4902 # All AIX code is PIC.
4903 if test "$host_cpu" = ia64; then
4904 # AIX 5 now supports IA64 processor
4905 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4912 # see comment about AmigaOS4 .so support
4913 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4916 # FIXME: we need at least 68020 code to build shared libraries, but
4917 # adding the `-m68020' flag to GCC prevents building anything better,
4919 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4924 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4925 # PIC is the default for these OSes.
4927 mingw* | cygwin* | os2* | pw32* | cegcc*)
4928 # This hack is so that the source file can tell whether it is being
4929 # built for inclusion in a dll (and should export symbols for example).
4930 # Although the cygwin gcc ignores -fPIC, still need this for old-style
4931 # (--disable-auto-import) libraries
4932 m4_if([$1], [GCJ], [],
4933 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4935 darwin* | rhapsody*)
4936 # PIC is the default on this platform
4937 # Common symbols not allowed in MH_DYLIB files
4938 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4941 # DJGPP does not support shared libraries at all
4942 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4945 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4946 # Instead, we relocate shared libraries at runtime.
4949 if test -d /usr/nec; then
4950 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4954 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4955 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
4956 # sets the default TLS model and affects inlining.
4961 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4966 # QNX uses GNU C++, but need to define -shared option too, otherwise
4968 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4971 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4977 # All AIX code is PIC.
4978 if test "$host_cpu" = ia64; then
4979 # AIX 5 now supports IA64 processor
4980 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4982 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4986 case $cc_basename in
4988 # Green Hills C++ Compiler
4989 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4994 case $cc_basename in
4996 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4999 # Green Hills C++ Compiler
5000 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5006 freebsd* | dragonfly*)
5007 # FreeBSD uses GNU C++
5009 hpux9* | hpux10* | hpux11*)
5010 case $cc_basename in
5012 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5013 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5014 if test "$host_cpu" != ia64; then
5015 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5019 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5020 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5026 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5035 # This is c89, which is MS Visual C++ (no shared libs)
5036 # Anyone wants to do a port?
5038 irix5* | irix6* | nonstopux*)
5039 case $cc_basename in
5041 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5042 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5043 # CC pic flag -KPIC is the default.
5049 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5050 case $cc_basename in
5053 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5054 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5057 # old Intel C++ for x86_64 which still supported -KPIC.
5058 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5059 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5060 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5063 # Intel C++, used to be incompatible with GCC.
5064 # ICC 10 doesn't accept -KPIC any more.
5065 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5066 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5067 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5070 # Portland Group C++ compiler
5071 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5072 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5073 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5077 # Make sure the PIC flag is empty. It appears that all Alpha
5078 # Linux and Compaq Tru64 Unix objects are PIC.
5079 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5080 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5084 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5085 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5086 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5089 case `$CC -V 2>&1 | sed 5q` in
5092 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5093 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5094 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5105 case $cc_basename in
5107 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5113 netbsd* | netbsdelf*-gnu)
5116 # QNX uses GNU C++, but need to define -shared option too, otherwise
5118 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5120 osf3* | osf4* | osf5*)
5121 case $cc_basename in
5123 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5126 # Rational C++ 2.4.1
5127 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5130 # Digital/Compaq C++
5131 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5132 # Make sure the PIC flag is empty. It appears that all Alpha
5133 # Linux and Compaq Tru64 Unix objects are PIC.
5134 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5135 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5144 case $cc_basename in
5146 # Sun C++ 4.2, 5.x and Centerline C++
5147 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5148 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5149 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5152 # Green Hills C++ Compiler
5153 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5160 case $cc_basename in
5163 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5164 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5168 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5174 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5175 case $cc_basename in
5177 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5178 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5179 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5184 case $cc_basename in
5186 # NonStop-UX NCC 3.20
5187 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5196 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5202 if test "$GCC" = yes; then
5203 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5204 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5208 # All AIX code is PIC.
5209 if test "$host_cpu" = ia64; then
5210 # AIX 5 now supports IA64 processor
5211 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5218 # see comment about AmigaOS4 .so support
5219 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5222 # FIXME: we need at least 68020 code to build shared libraries, but
5223 # adding the `-m68020' flag to GCC prevents building anything better,
5225 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5230 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5231 # PIC is the default for these OSes.
5234 mingw* | cygwin* | pw32* | os2* | cegcc*)
5235 # This hack is so that the source file can tell whether it is being
5236 # built for inclusion in a dll (and should export symbols for example).
5237 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5238 # (--disable-auto-import) libraries
5239 m4_if([$1], [GCJ], [],
5240 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5243 darwin* | rhapsody*)
5244 # PIC is the default on this platform
5245 # Common symbols not allowed in MH_DYLIB files
5246 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5250 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5251 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5252 # sets the default TLS model and affects inlining.
5258 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5264 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5265 # Instead, we relocate shared libraries at runtime.
5269 # Just because we use GCC doesn't mean we suddenly get shared libraries
5270 # on systems that don't support them.
5271 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5276 # QNX uses GNU C++, but need to define -shared option too, otherwise
5278 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5282 if test -d /usr/nec; then
5283 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5288 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5292 # PORTME Check for flag to pass linker flags through the system compiler.
5295 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5296 if test "$host_cpu" = ia64; then
5297 # AIX 5 now supports IA64 processor
5298 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5300 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5304 mingw* | cygwin* | pw32* | os2* | cegcc*)
5305 # This hack is so that the source file can tell whether it is being
5306 # built for inclusion in a dll (and should export symbols for example).
5307 m4_if([$1], [GCJ], [],
5308 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5311 hpux9* | hpux10* | hpux11*)
5312 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5313 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5320 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5323 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5324 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5327 irix5* | irix6* | nonstopux*)
5328 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5329 # PIC (with -KPIC) is the default.
5330 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5333 linux* | k*bsd*-gnu | kopensolaris*-gnu)
5334 case $cc_basename in
5335 # old Intel for x86_64 which still supported -KPIC.
5337 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5338 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5339 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5341 # icc used to be incompatible with GCC.
5342 # ICC 10 doesn't accept -KPIC any more.
5344 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5345 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5346 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5348 # Lahey Fortran 8.1.
5350 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5351 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5352 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5354 pgcc* | pgf77* | pgf90* | pgf95*)
5355 # Portland Group compilers (*not* the Pentium gcc compiler,
5356 # which looks to be a dead project)
5357 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5358 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5359 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5362 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5363 # All Alpha code is PIC.
5364 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5367 # IBM XL C 8.0/Fortran 10.1 on PPC
5368 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5369 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5370 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5373 case `$CC -V 2>&1 | sed 5q` in
5376 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5377 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5378 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5381 # Sun Fortran 8.3 passes all unrecognized flags to the linker
5382 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5383 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5384 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5392 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5393 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5397 # QNX uses GNU C++, but need to define -shared option too, otherwise
5399 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5402 osf3* | osf4* | osf5*)
5403 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5404 # All OSF/1 code is PIC.
5405 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5409 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5413 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5414 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5415 case $cc_basename in
5417 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5419 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5424 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5425 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5426 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5429 sysv4 | sysv4.2uw2* | sysv4.3*)
5430 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5431 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5432 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5436 if test -d /usr/nec ;then
5437 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5438 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5442 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5443 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5444 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5445 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5449 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5450 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5454 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5455 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5459 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5465 # For platforms which do not support PIC, -DPIC is meaningless:
5467 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5470 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5473 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5474 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5475 [How to pass a linker flag through the compiler])
5478 # Check to make sure the PIC flag actually works.
5480 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5481 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5482 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5483 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5484 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5486 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5488 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5489 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5491 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5492 [Additional compiler flags for building library objects])
5495 # Check to make sure the static flag actually works.
5497 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5498 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5499 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5500 $lt_tmp_static_flag,
5502 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5503 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5504 [Compiler flag to prevent dynamic linking])
5505 ])# _LT_COMPILER_PIC
5508 # _LT_LINKER_SHLIBS([TAGNAME])
5509 # ----------------------------
5510 # See if the linker supports building shared libraries.
5511 m4_defun([_LT_LINKER_SHLIBS],
5512 [AC_REQUIRE([LT_PATH_LD])dnl
5513 AC_REQUIRE([LT_PATH_NM])dnl
5514 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5515 m4_require([_LT_DECL_EGREP])dnl
5516 m4_require([_LT_DECL_SED])dnl
5517 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5518 m4_require([_LT_TAG_COMPILER])dnl
5519 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5520 m4_if([$1], [CXX], [
5521 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5524 # If we're using GNU nm, then we don't want the "-C" option.
5525 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5526 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5527 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5529 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5533 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5535 cygwin* | mingw* | cegcc*)
5536 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5538 linux* | k*bsd*-gnu)
5539 _LT_TAGVAR(link_all_deplibs, $1)=no
5542 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5545 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5548 _LT_TAGVAR(allow_undefined_flag, $1)=
5549 _LT_TAGVAR(always_export_symbols, $1)=no
5550 _LT_TAGVAR(archive_cmds, $1)=
5551 _LT_TAGVAR(archive_expsym_cmds, $1)=
5552 _LT_TAGVAR(compiler_needs_object, $1)=no
5553 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5554 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5555 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5556 _LT_TAGVAR(hardcode_automatic, $1)=no
5557 _LT_TAGVAR(hardcode_direct, $1)=no
5558 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5559 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5560 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5561 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5562 _LT_TAGVAR(hardcode_minus_L, $1)=no
5563 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5564 _LT_TAGVAR(inherit_rpath, $1)=no
5565 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5566 _LT_TAGVAR(module_cmds, $1)=
5567 _LT_TAGVAR(module_expsym_cmds, $1)=
5568 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5569 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5570 _LT_TAGVAR(thread_safe_flag_spec, $1)=
5571 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5572 # include_expsyms should be a list of space-separated symbols to be *always*
5573 # included in the symbol list
5574 _LT_TAGVAR(include_expsyms, $1)=
5575 # exclude_expsyms can be an extended regexp of symbols to exclude
5576 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5577 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5578 # as well as any symbol that contains `d'.
5579 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5580 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5581 # platforms (ab)use it in PIC code, but their linkers get confused if
5582 # the symbol is explicitly referenced. Since portable code cannot
5583 # rely on this symbol name, it's probably fine to never include it in
5584 # preloaded symbol tables.
5585 # Exclude shared library initialization/finalization symbols.
5586 dnl Note also adjust exclude_expsyms for C++ above.
5587 extract_expsyms_cmds=
5590 cygwin* | mingw* | pw32* | cegcc*)
5591 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5592 # When not using gcc, we currently assume that we are using
5593 # Microsoft Visual C++.
5594 if test "$GCC" != yes; then
5599 # we just hope/assume this is gcc and not c89 (= MSVC++)
5605 linux* | k*bsd*-gnu)
5606 _LT_TAGVAR(link_all_deplibs, $1)=no
5610 _LT_TAGVAR(ld_shlibs, $1)=yes
5611 if test "$with_gnu_ld" = yes; then
5612 # If archive_cmds runs LD, not CC, wlarc should be empty
5615 # Set some defaults for GNU ld with shared library support. These
5616 # are reset later if shared libraries are not supported. Putting them
5617 # here allows them to be overridden if necessary.
5618 runpath_var=LD_RUN_PATH
5619 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5620 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5621 # ancient GNU ld didn't support --whole-archive et. al.
5622 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5623 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5625 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5627 supports_anon_versioning=no
5628 case `$LD -v 2>&1` in
5629 *GNU\ gold*) supports_anon_versioning=yes ;;
5630 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5631 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5632 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5633 *\ 2.11.*) ;; # other 2.11 versions
5634 *) supports_anon_versioning=yes ;;
5637 # See if GNU ld supports shared libraries.
5640 # On AIX/PPC, the GNU linker is very broken
5641 if test "$host_cpu" != ia64; then
5642 _LT_TAGVAR(ld_shlibs, $1)=no
5645 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5646 *** to be unable to reliably create shared libraries on AIX.
5647 *** Therefore, libtool is disabling shared libraries support. If you
5648 *** really care for shared libraries, you may want to modify your PATH
5649 *** so that a non-GNU linker is found, and then restart.
5658 # see comment about AmigaOS4 .so support
5659 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5660 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5663 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5664 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5665 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5671 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5672 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5673 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5674 # support --undefined. This deserves some investigation. FIXME
5675 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5677 _LT_TAGVAR(ld_shlibs, $1)=no
5681 cygwin* | mingw* | pw32* | cegcc*)
5682 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5683 # as there is no search path for DLLs.
5684 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5685 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5686 _LT_TAGVAR(always_export_symbols, $1)=no
5687 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5688 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5690 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5691 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5692 # If the export-symbols file already is a .def file (1st line
5693 # is EXPORTS), use it as is; otherwise, prepend...
5694 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5695 cp $export_symbols $output_objdir/$soname.def;
5697 echo EXPORTS > $output_objdir/$soname.def;
5698 cat $export_symbols >> $output_objdir/$soname.def;
5700 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5702 _LT_TAGVAR(ld_shlibs, $1)=no
5707 _LT_TAGVAR(hardcode_direct, $1)=no
5708 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5709 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5710 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5711 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5712 # Instead, shared libraries are loaded at an image base (0x10000000 by
5713 # default) and relocated if they conflict, which is a slow very memory
5714 # consuming and fragmenting process. To avoid this, we pick a random,
5715 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5716 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5717 _LT_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'
5718 _LT_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'
5721 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5723 if test "$host_os" = linux-dietlibc; then
5724 case $cc_basename in
5725 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
5728 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5729 && test "$tmp_diet" = no
5732 tmp_sharedflag='-shared'
5733 case $cc_basename,$host_cpu in
5734 pgcc*) # Portland Group C compiler
5735 _LT_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'
5736 tmp_addflag=' $pic_flag'
5738 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5739 _LT_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'
5740 tmp_addflag=' $pic_flag -Mnomain' ;;
5741 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5742 tmp_addflag=' -i_dynamic' ;;
5743 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5744 tmp_addflag=' -i_dynamic -nofor_main' ;;
5745 ifc* | ifort*) # Intel Fortran compiler
5746 tmp_addflag=' -nofor_main' ;;
5747 lf95*) # Lahey Fortran 8.1
5748 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5749 tmp_sharedflag='--shared' ;;
5750 xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5751 tmp_sharedflag='-qmkshrobj'
5754 case `$CC -V 2>&1 | sed 5q` in
5755 *Sun\ C*) # Sun C 5.9
5756 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
5757 _LT_TAGVAR(compiler_needs_object, $1)=yes
5758 tmp_sharedflag='-G' ;;
5759 *Sun\ F*) # Sun Fortran 8.3
5760 tmp_sharedflag='-G' ;;
5762 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5764 if test "x$supports_anon_versioning" = xyes; then
5765 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5766 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5767 echo "local: *; };" >> $output_objdir/$libname.ver~
5768 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5771 case $cc_basename in
5773 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5774 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5775 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5776 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5777 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
5778 if test "x$supports_anon_versioning" = xyes; then
5779 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5780 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5781 echo "local: *; };" >> $output_objdir/$libname.ver~
5782 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5787 _LT_TAGVAR(ld_shlibs, $1)=no
5791 netbsd* | netbsdelf*-gnu)
5792 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5793 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5796 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5797 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5802 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5803 _LT_TAGVAR(ld_shlibs, $1)=no
5806 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5807 *** create shared libraries on Solaris systems. Therefore, libtool
5808 *** is disabling shared libraries support. We urge you to upgrade GNU
5809 *** binutils to release 2.9.1 or newer. Another option is to modify
5810 *** your PATH or compiler configuration so that the native linker is
5811 *** used, and then restart.
5814 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5815 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5816 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5818 _LT_TAGVAR(ld_shlibs, $1)=no
5822 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5823 case `$LD -v 2>&1` in
5824 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5825 _LT_TAGVAR(ld_shlibs, $1)=no
5828 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5829 *** reliably create shared libraries on SCO systems. Therefore, libtool
5830 *** is disabling shared libraries support. We urge you to upgrade GNU
5831 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5832 *** your PATH or compiler configuration so that the native linker is
5833 *** used, and then restart.
5838 # For security reasons, it is highly recommended that you always
5839 # use absolute paths for naming shared libraries, and exclude the
5840 # DT_RUNPATH tag from executables and libraries. But doing so
5841 # requires that you compile everything twice, which is a pain.
5842 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5843 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5844 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5845 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5847 _LT_TAGVAR(ld_shlibs, $1)=no
5854 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5856 _LT_TAGVAR(hardcode_direct, $1)=yes
5857 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5861 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5862 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5863 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5865 _LT_TAGVAR(ld_shlibs, $1)=no
5870 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5872 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5873 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5874 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5877 # PORTME fill in a description of your system's linker (not GNU ld)
5880 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5881 _LT_TAGVAR(always_export_symbols, $1)=yes
5882 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5883 # Note: this linker hardcodes the directories in LIBPATH if there
5884 # are no directories specified by -L.
5885 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5886 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5887 # Neither direct hardcoding nor static linking is supported with a
5889 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5894 if test "$host_cpu" = ia64; then
5895 # On IA64, the linker does run time linking by default, so we don't
5896 # have to do anything special.
5897 aix_use_runtimelinking=no
5898 exp_sym_flag='-Bexport'
5901 # If we're using GNU nm, then we don't want the "-C" option.
5902 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5903 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5904 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5906 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5908 aix_use_runtimelinking=no
5910 # Test if we are trying to use run time linking or normal
5911 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5912 # need to do runtime linking.
5913 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5914 for ld_flag in $LDFLAGS; do
5915 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5916 aix_use_runtimelinking=yes
5923 exp_sym_flag='-bexport'
5924 no_entry_flag='-bnoentry'
5927 # When large executables or shared objects are built, AIX ld can
5928 # have problems creating the table of contents. If linking a library
5929 # or program results in "error TOC overflow" add -mminimal-toc to
5930 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5931 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5933 _LT_TAGVAR(archive_cmds, $1)=''
5934 _LT_TAGVAR(hardcode_direct, $1)=yes
5935 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5936 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5937 _LT_TAGVAR(link_all_deplibs, $1)=yes
5938 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5940 if test "$GCC" = yes; then
5941 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5942 # We only want to do this on AIX 4.2 and lower, the check
5943 # below for broken collect2 doesn't work under 4.3+
5944 collect2name=`${CC} -print-prog-name=collect2`
5945 if test -f "$collect2name" &&
5946 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5948 # We have reworked collect2
5951 # We have old collect2
5952 _LT_TAGVAR(hardcode_direct, $1)=unsupported
5953 # It fails to find uninstalled libraries when the uninstalled
5954 # path is not listed in the libpath. Setting hardcode_minus_L
5955 # to unsupported forces relinking
5956 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5957 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5958 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5962 shared_flag='-shared'
5963 if test "$aix_use_runtimelinking" = yes; then
5964 shared_flag="$shared_flag "'${wl}-G'
5966 _LT_TAGVAR(link_all_deplibs, $1)=no
5969 if test "$host_cpu" = ia64; then
5970 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5971 # chokes on -Wl,-G. The following line is correct:
5974 if test "$aix_use_runtimelinking" = yes; then
5975 shared_flag='${wl}-G'
5977 shared_flag='${wl}-bM:SRE'
5982 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5983 # It seems that -bexpall does not export symbols beginning with
5984 # underscore (_), so it is better to generate a list of symbols to export.
5985 _LT_TAGVAR(always_export_symbols, $1)=yes
5986 if test "$aix_use_runtimelinking" = yes; then
5987 # Warning - without using the other runtime loading flags (-brtl),
5988 # -berok will link without error, but may produce a broken library.
5989 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
5990 # Determine the default libpath from the value encoded in an
5992 _LT_SYS_MODULE_PATH_AIX
5993 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5994 _LT_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 "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5996 if test "$host_cpu" = ia64; then
5997 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5998 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5999 _LT_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"
6001 # Determine the default libpath from the value encoded in an
6003 _LT_SYS_MODULE_PATH_AIX
6004 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6005 # Warning - without using the other run time loading flags,
6006 # -berok will link without error, but may produce a broken library.
6007 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6008 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6009 # Exported symbols can be pulled into shared objects from archives
6010 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6011 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6012 # This is similar to how AIX traditionally builds its shared libraries.
6013 _LT_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'
6021 # see comment about AmigaOS4 .so support
6022 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6023 _LT_TAGVAR(archive_expsym_cmds, $1)=''
6026 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6027 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6028 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6034 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6037 cygwin* | mingw* | pw32* | cegcc*)
6038 # When not using gcc, we currently assume that we are using
6039 # Microsoft Visual C++.
6040 # hardcode_libdir_flag_spec is actually meaningless, as there is
6041 # no search path for DLLs.
6042 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6043 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6044 # Tell ltmain to make .lib files, not .a files.
6046 # Tell ltmain to make .dll files, not .so files.
6048 # FIXME: Setting linknames here is a bad hack.
6049 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
6050 # The linker will automatically build a .lib file if we build a DLL.
6051 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6052 # FIXME: Should let the user specify the lib program.
6053 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6054 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6055 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6058 darwin* | rhapsody*)
6059 _LT_DARWIN_LINKER_FEATURES($1)
6063 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6064 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6065 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6069 _LT_TAGVAR(ld_shlibs, $1)=no
6072 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6073 # support. Future versions do this automatically, but an explicit c++rt0.o
6074 # does not break anything, and helps significantly (at the cost of a little
6077 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6078 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6079 _LT_TAGVAR(hardcode_direct, $1)=yes
6080 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6083 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6085 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6086 _LT_TAGVAR(hardcode_direct, $1)=yes
6087 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6088 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6091 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6092 freebsd* | dragonfly*)
6093 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6094 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6095 _LT_TAGVAR(hardcode_direct, $1)=yes
6096 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6100 if test "$GCC" = yes; then
6101 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6103 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6105 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6106 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6107 _LT_TAGVAR(hardcode_direct, $1)=yes
6109 # hardcode_minus_L: Not really in the search PATH,
6110 # but as the default location of the library.
6111 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6112 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6116 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6117 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6119 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6121 if test "$with_gnu_ld" = no; then
6122 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6123 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6124 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6125 _LT_TAGVAR(hardcode_direct, $1)=yes
6126 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6127 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6128 # hardcode_minus_L: Not really in the search PATH,
6129 # but as the default location of the library.
6130 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6135 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6138 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6141 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6144 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6150 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6153 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6156 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6160 if test "$with_gnu_ld" = no; then
6161 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6162 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6166 _LT_TAGVAR(hardcode_direct, $1)=no
6167 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6170 _LT_TAGVAR(hardcode_direct, $1)=yes
6171 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6172 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6174 # hardcode_minus_L: Not really in the search PATH,
6175 # but as the default location of the library.
6176 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6182 irix5* | irix6* | nonstopux*)
6183 if test "$GCC" = yes; then
6184 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6185 # Try to use the -exported_symbol ld option, if it does not
6186 # work, assume that -exports_file does not work either and
6187 # implicitly export all symbols.
6188 save_LDFLAGS="$LDFLAGS"
6189 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6190 AC_LINK_IFELSE(int foo(void) {},
6191 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6193 LDFLAGS="$save_LDFLAGS"
6195 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6196 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
6198 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6199 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6200 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6201 _LT_TAGVAR(inherit_rpath, $1)=yes
6202 _LT_TAGVAR(link_all_deplibs, $1)=yes
6205 netbsd* | netbsdelf*-gnu)
6206 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6207 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6209 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6211 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6212 _LT_TAGVAR(hardcode_direct, $1)=yes
6213 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6217 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6218 _LT_TAGVAR(hardcode_direct, $1)=yes
6219 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6220 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6221 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6228 if test -f /usr/libexec/ld.so; then
6229 _LT_TAGVAR(hardcode_direct, $1)=yes
6230 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6231 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6232 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6233 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6234 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6235 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6236 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6239 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6240 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6241 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6244 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6245 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6250 _LT_TAGVAR(ld_shlibs, $1)=no
6255 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6256 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6257 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6258 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6259 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6263 if test "$GCC" = yes; then
6264 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6265 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6267 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6268 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6270 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6271 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6272 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6275 osf4* | osf5*) # as osf3* with the addition of -msym flag
6276 if test "$GCC" = yes; then
6277 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6278 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6279 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6281 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6282 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6283 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
6284 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6286 # Both c and cxx compiler support -rpath directly
6287 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6289 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6290 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6294 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6295 if test "$GCC" = yes; then
6297 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6298 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6299 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6301 case `$CC -V 2>&1` in
6304 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6305 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6306 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6310 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6311 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6312 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6316 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6317 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6319 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6321 # The compiler driver will combine and reorder linker options,
6322 # but understands `-z linker_flag'. GCC discards it without `$wl',
6323 # but is careful enough not to reorder.
6324 # Supported since Solaris 2.6 (maybe 2.5.1?)
6325 if test "$GCC" = yes; then
6326 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6328 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6332 _LT_TAGVAR(link_all_deplibs, $1)=yes
6336 if test "x$host_vendor" = xsequent; then
6337 # Use $CC to link under sequent, because it throws in some extra .o
6338 # files that make .init and .fini sections work.
6339 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6341 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6343 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6344 _LT_TAGVAR(hardcode_direct, $1)=yes
6345 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6346 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6350 case $host_vendor in
6352 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6353 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6356 ## LD is ld it makes a PLAMLIB
6357 ## CC just makes a GrossModule.
6358 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6359 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6360 _LT_TAGVAR(hardcode_direct, $1)=no
6363 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6364 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6367 runpath_var='LD_RUN_PATH'
6368 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6372 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6373 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6374 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6378 if test -d /usr/nec; then
6379 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6380 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6381 runpath_var=LD_RUN_PATH
6382 hardcode_runpath_var=yes
6383 _LT_TAGVAR(ld_shlibs, $1)=yes
6387 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6388 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6389 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6390 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6391 runpath_var='LD_RUN_PATH'
6393 if test "$GCC" = yes; then
6394 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6395 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6397 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6398 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6402 sysv5* | sco3.2v5* | sco5v6*)
6403 # Note: We can NOT use -z defs as we might desire, because we do not
6404 # link with -lc, and that would cause any symbols used from libc to
6405 # always be unresolved, which means just about no library would
6406 # ever link correctly. If we're not using GNU ld we use -z text
6407 # though, which does catch some bad symbols but isn't as heavy-handed
6409 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6410 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6411 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6412 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6413 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6414 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6415 _LT_TAGVAR(link_all_deplibs, $1)=yes
6416 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6417 runpath_var='LD_RUN_PATH'
6419 if test "$GCC" = yes; then
6420 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6421 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6423 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6424 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6429 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6430 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6431 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6435 _LT_TAGVAR(ld_shlibs, $1)=no
6439 if test x$host_vendor = xsni; then
6441 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6442 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6448 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6449 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6451 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6453 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6454 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6455 _LT_DECL([], [extract_expsyms_cmds], [2],
6456 [The commands to extract the exported symbol list from a shared archive])
6459 # Do we need to explicitly link libc?
6461 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6463 # Assume -lc should be added
6464 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6466 if test "$enable_shared" = yes && test "$GCC" = yes; then
6467 case $_LT_TAGVAR(archive_cmds, $1) in
6469 # FIXME: we may have to deal with multi-command sequences.
6472 # Test whether the compiler implicitly links with -lc since on some
6473 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6474 # to ld, don't add -lc before -lgcc.
6475 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6477 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6479 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6482 libobjs=conftest.$ac_objext
6484 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6485 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6491 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6492 _LT_TAGVAR(allow_undefined_flag, $1)=
6493 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6495 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6497 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6499 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6501 cat conftest.err 1>&5
6504 AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
6511 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6512 [Whether or not to add -lc for building shared libraries])
6513 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6514 [enable_shared_with_static_runtimes], [0],
6515 [Whether or not to disallow shared libs when runtime libs are static])
6516 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6517 [Compiler flag to allow reflexive dlopens])
6518 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6519 [Compiler flag to generate shared objects directly from archives])
6520 _LT_TAGDECL([], [compiler_needs_object], [1],
6521 [Whether the compiler copes with passing no objects directly])
6522 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6523 [Create an old-style archive from a shared archive])
6524 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6525 [Create a temporary old-style archive to link instead of a shared archive])
6526 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6527 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6528 _LT_TAGDECL([], [module_cmds], [2],
6529 [Commands used to build a loadable module if different from building
6531 _LT_TAGDECL([], [module_expsym_cmds], [2])
6532 _LT_TAGDECL([], [with_gnu_ld], [1],
6533 [Whether we are building with GNU ld or not])
6534 _LT_TAGDECL([], [allow_undefined_flag], [1],
6535 [Flag that allows shared libraries with undefined symbols to be built])
6536 _LT_TAGDECL([], [no_undefined_flag], [1],
6537 [Flag that enforces no undefined symbols])
6538 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6539 [Flag to hardcode $libdir into a binary during linking.
6540 This must work even if $libdir does not exist])
6541 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6542 [[If ld is used when linking, flag to hardcode $libdir into a binary
6543 during linking. This must work even if $libdir does not exist]])
6544 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6545 [Whether we need a single "-rpath" flag with a separated argument])
6546 _LT_TAGDECL([], [hardcode_direct], [0],
6547 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6548 DIR into the resulting binary])
6549 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6550 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6551 DIR into the resulting binary and the resulting library dependency is
6552 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6553 library is relocated])
6554 _LT_TAGDECL([], [hardcode_minus_L], [0],
6555 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6556 into the resulting binary])
6557 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6558 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6559 into the resulting binary])
6560 _LT_TAGDECL([], [hardcode_automatic], [0],
6561 [Set to "yes" if building a shared library automatically hardcodes DIR
6562 into the library and all subsequent libraries and executables linked
6564 _LT_TAGDECL([], [inherit_rpath], [0],
6565 [Set to yes if linker adds runtime paths of dependent libraries
6566 to runtime path list])
6567 _LT_TAGDECL([], [link_all_deplibs], [0],
6568 [Whether libtool must link a program against all its dependency libraries])
6569 _LT_TAGDECL([], [fix_srcfile_path], [1],
6570 [Fix the shell variable $srcfile for the compiler])
6571 _LT_TAGDECL([], [always_export_symbols], [0],
6572 [Set to "yes" if exported symbols are required])
6573 _LT_TAGDECL([], [export_symbols_cmds], [2],
6574 [The commands to list exported symbols])
6575 _LT_TAGDECL([], [exclude_expsyms], [1],
6576 [Symbols that should not be listed in the preloaded symbols])
6577 _LT_TAGDECL([], [include_expsyms], [1],
6578 [Symbols that must always be exported])
6579 _LT_TAGDECL([], [prelink_cmds], [2],
6580 [Commands necessary for linking programs (against libraries) with templates])
6581 _LT_TAGDECL([], [file_list_spec], [1],
6582 [Specify filename containing input files])
6583 dnl FIXME: Not yet implemented
6584 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6585 dnl [Compiler flag to generate thread safe objects])
6586 ])# _LT_LINKER_SHLIBS
6589 # _LT_LANG_C_CONFIG([TAG])
6590 # ------------------------
6591 # Ensure that the configuration variables for a C compiler are suitably
6592 # defined. These variables are subsequently used by _LT_CONFIG to write
6593 # the compiler configuration to `libtool'.
6594 m4_defun([_LT_LANG_C_CONFIG],
6595 [m4_require([_LT_DECL_EGREP])dnl
6599 # Source file extension for C test sources.
6602 # Object file extension for compiled C test sources.
6604 _LT_TAGVAR(objext, $1)=$objext
6606 # Code to be used in simple compile tests
6607 lt_simple_compile_test_code="int some_variable = 0;"
6609 # Code to be used in simple link tests
6610 lt_simple_link_test_code='int main(){return(0);}'
6613 # Save the default compiler, since it gets overwritten when the other
6614 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6615 compiler_DEFAULT=$CC
6617 # save warnings/boilerplate of simple test code
6618 _LT_COMPILER_BOILERPLATE
6619 _LT_LINKER_BOILERPLATE
6621 if test -n "$compiler"; then
6622 _LT_COMPILER_NO_RTTI($1)
6623 _LT_COMPILER_PIC($1)
6624 _LT_COMPILER_C_O($1)
6625 _LT_COMPILER_FILE_LOCKS($1)
6626 _LT_LINKER_SHLIBS($1)
6627 _LT_SYS_DYNAMIC_LINKER($1)
6628 _LT_LINKER_HARDCODE_LIBPATH($1)
6632 # Report which library types will actually be built
6633 AC_MSG_CHECKING([if libtool supports shared libraries])
6634 AC_MSG_RESULT([$can_build_shared])
6636 AC_MSG_CHECKING([whether to build shared libraries])
6637 test "$can_build_shared" = "no" && enable_shared=no
6639 # On AIX, shared libraries and static libraries use the same namespace, and
6640 # are all built from PIC.
6643 test "$enable_shared" = yes && enable_static=no
6644 if test -n "$RANLIB"; then
6645 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6646 postinstall_cmds='$RANLIB $lib'
6651 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6652 test "$enable_shared" = yes && enable_static=no
6656 AC_MSG_RESULT([$enable_shared])
6658 AC_MSG_CHECKING([whether to build static libraries])
6659 # Make sure either enable_shared or enable_static is yes.
6660 test "$enable_shared" = yes || enable_static=yes
6661 AC_MSG_RESULT([$enable_static])
6667 ])# _LT_LANG_C_CONFIG
6672 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
6673 # compiler, we have our own version here.
6674 m4_defun([_LT_PROG_CXX],
6676 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
6678 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6679 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6680 (test "X$CXX" != "Xg++"))) ; then
6683 _lt_caught_CXX_error=yes
6685 popdef([AC_MSG_ERROR])
6688 dnl aclocal-1.4 backwards compatibility:
6689 dnl AC_DEFUN([_LT_PROG_CXX], [])
6692 # _LT_LANG_CXX_CONFIG([TAG])
6693 # --------------------------
6694 # Ensure that the configuration variables for a C++ compiler are suitably
6695 # defined. These variables are subsequently used by _LT_CONFIG to write
6696 # the compiler configuration to `libtool'.
6697 m4_defun([_LT_LANG_CXX_CONFIG],
6698 [AC_REQUIRE([_LT_PROG_CXX])dnl
6699 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6700 m4_require([_LT_DECL_EGREP])dnl
6703 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6704 _LT_TAGVAR(allow_undefined_flag, $1)=
6705 _LT_TAGVAR(always_export_symbols, $1)=no
6706 _LT_TAGVAR(archive_expsym_cmds, $1)=
6707 _LT_TAGVAR(compiler_needs_object, $1)=no
6708 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6709 _LT_TAGVAR(hardcode_direct, $1)=no
6710 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6711 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6712 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6713 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6714 _LT_TAGVAR(hardcode_minus_L, $1)=no
6715 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6716 _LT_TAGVAR(hardcode_automatic, $1)=no
6717 _LT_TAGVAR(inherit_rpath, $1)=no
6718 _LT_TAGVAR(module_cmds, $1)=
6719 _LT_TAGVAR(module_expsym_cmds, $1)=
6720 _LT_TAGVAR(link_all_deplibs, $1)=unknown
6721 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6722 _LT_TAGVAR(no_undefined_flag, $1)=
6723 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6724 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6726 # Source file extension for C++ test sources.
6729 # Object file extension for compiled C++ test sources.
6731 _LT_TAGVAR(objext, $1)=$objext
6733 # No sense in running all these tests if we already determined that
6734 # the CXX compiler isn't working. Some variables (like enable_shared)
6735 # are currently assumed to apply to all compilers on this platform,
6736 # and will be corrupted by setting them based on a non-working compiler.
6737 if test "$_lt_caught_CXX_error" != yes; then
6738 # Code to be used in simple compile tests
6739 lt_simple_compile_test_code="int some_variable = 0;"
6741 # Code to be used in simple link tests
6742 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6744 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6747 # save warnings/boilerplate of simple test code
6748 _LT_COMPILER_BOILERPLATE
6749 _LT_LINKER_BOILERPLATE
6751 # Allow CC to be a program name with arguments.
6756 lt_save_with_gnu_ld=$with_gnu_ld
6757 lt_save_path_LD=$lt_cv_path_LD
6758 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6759 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6761 $as_unset lt_cv_prog_gnu_ld
6763 if test -n "${lt_cv_path_LDCXX+set}"; then
6764 lt_cv_path_LD=$lt_cv_path_LDCXX
6766 $as_unset lt_cv_path_LD
6768 test -z "${LDCXX+set}" || LD=$LDCXX
6771 _LT_TAGVAR(compiler, $1)=$CC
6772 _LT_CC_BASENAME([$compiler])
6774 if test -n "$compiler"; then
6775 # We don't want -fno-exception when compiling C++ code, so set the
6776 # no_builtin_flag separately
6777 if test "$GXX" = yes; then
6778 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6780 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6783 if test "$GXX" = yes; then
6784 # Set up default GNU C++ configuration
6788 # Check if GNU C++ uses GNU ld as the underlying linker, since the
6789 # archiving commands below assume that GNU ld is being used.
6790 if test "$with_gnu_ld" = yes; then
6791 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6792 _LT_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'
6794 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6795 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6797 # If archive_cmds runs LD, not CC, wlarc should be empty
6798 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6799 # investigate it a little bit more. (MM)
6802 # ancient GNU ld didn't support --whole-archive et. al.
6803 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6804 $GREP 'no-whole-archive' > /dev/null; then
6805 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6807 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6813 # A generic and very simple default shared library creation
6814 # command for GNU C++ for the case where it uses the native
6815 # linker, instead of GNU ld. If possible, this setting should
6816 # overridden to take advantage of the native linker features on
6817 # the platform it is being used on.
6818 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6821 # Commands to make compiler produce verbose output that lists
6822 # what "hidden" libraries, object files and flags are used when
6823 # linking a shared library.
6824 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
6832 # PORTME: fill in a description of your system's C++ link characteristics
6833 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6834 _LT_TAGVAR(ld_shlibs, $1)=yes
6837 # FIXME: insert proper C++ library support
6838 _LT_TAGVAR(ld_shlibs, $1)=no
6841 if test "$host_cpu" = ia64; then
6842 # On IA64, the linker does run time linking by default, so we don't
6843 # have to do anything special.
6844 aix_use_runtimelinking=no
6845 exp_sym_flag='-Bexport'
6848 aix_use_runtimelinking=no
6850 # Test if we are trying to use run time linking or normal
6851 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6852 # need to do runtime linking.
6853 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6854 for ld_flag in $LDFLAGS; do
6857 aix_use_runtimelinking=yes
6865 exp_sym_flag='-bexport'
6866 no_entry_flag='-bnoentry'
6869 # When large executables or shared objects are built, AIX ld can
6870 # have problems creating the table of contents. If linking a library
6871 # or program results in "error TOC overflow" add -mminimal-toc to
6872 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6873 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6875 _LT_TAGVAR(archive_cmds, $1)=''
6876 _LT_TAGVAR(hardcode_direct, $1)=yes
6877 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6878 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6879 _LT_TAGVAR(link_all_deplibs, $1)=yes
6880 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6882 if test "$GXX" = yes; then
6883 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6884 # We only want to do this on AIX 4.2 and lower, the check
6885 # below for broken collect2 doesn't work under 4.3+
6886 collect2name=`${CC} -print-prog-name=collect2`
6887 if test -f "$collect2name" &&
6888 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6890 # We have reworked collect2
6893 # We have old collect2
6894 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6895 # It fails to find uninstalled libraries when the uninstalled
6896 # path is not listed in the libpath. Setting hardcode_minus_L
6897 # to unsupported forces relinking
6898 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6899 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6900 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6903 shared_flag='-shared'
6904 if test "$aix_use_runtimelinking" = yes; then
6905 shared_flag="$shared_flag "'${wl}-G'
6909 if test "$host_cpu" = ia64; then
6910 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6911 # chokes on -Wl,-G. The following line is correct:
6914 if test "$aix_use_runtimelinking" = yes; then
6915 shared_flag='${wl}-G'
6917 shared_flag='${wl}-bM:SRE'
6922 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6923 # It seems that -bexpall does not export symbols beginning with
6924 # underscore (_), so it is better to generate a list of symbols to
6926 _LT_TAGVAR(always_export_symbols, $1)=yes
6927 if test "$aix_use_runtimelinking" = yes; then
6928 # Warning - without using the other runtime loading flags (-brtl),
6929 # -berok will link without error, but may produce a broken library.
6930 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6931 # Determine the default libpath from the value encoded in an empty
6933 _LT_SYS_MODULE_PATH_AIX
6934 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6936 _LT_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 "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6938 if test "$host_cpu" = ia64; then
6939 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6940 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6941 _LT_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"
6943 # Determine the default libpath from the value encoded in an
6945 _LT_SYS_MODULE_PATH_AIX
6946 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6947 # Warning - without using the other run time loading flags,
6948 # -berok will link without error, but may produce a broken library.
6949 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6950 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6951 # Exported symbols can be pulled into shared objects from archives
6952 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6953 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6954 # This is similar to how AIX traditionally builds its shared
6956 _LT_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'
6962 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6963 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6964 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6965 # support --undefined. This deserves some investigation. FIXME
6966 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6968 _LT_TAGVAR(ld_shlibs, $1)=no
6973 case $cc_basename in
6975 # FIXME: insert proper C++ library support
6976 _LT_TAGVAR(ld_shlibs, $1)=no
6981 cygwin* | mingw* | pw32* | cegcc*)
6982 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6983 # as there is no search path for DLLs.
6984 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6985 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6986 _LT_TAGVAR(always_export_symbols, $1)=no
6987 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6989 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6990 _LT_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'
6991 # If the export-symbols file already is a .def file (1st line
6992 # is EXPORTS), use it as is; otherwise, prepend...
6993 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6994 cp $export_symbols $output_objdir/$soname.def;
6996 echo EXPORTS > $output_objdir/$soname.def;
6997 cat $export_symbols >> $output_objdir/$soname.def;
6999 $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'
7001 _LT_TAGVAR(ld_shlibs, $1)=no
7004 darwin* | rhapsody*)
7005 _LT_DARWIN_LINKER_FEATURES($1)
7009 case $cc_basename in
7011 # FIXME: insert proper C++ library support
7012 _LT_TAGVAR(ld_shlibs, $1)=no
7015 # Green Hills C++ Compiler
7016 # FIXME: insert proper C++ library support
7017 _LT_TAGVAR(ld_shlibs, $1)=no
7020 # FIXME: insert proper C++ library support
7021 _LT_TAGVAR(ld_shlibs, $1)=no
7027 # C++ shared libraries reported to be fairly broken before
7029 _LT_TAGVAR(ld_shlibs, $1)=no
7033 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7036 freebsd* | dragonfly*)
7037 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7039 _LT_TAGVAR(ld_shlibs, $1)=yes
7046 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7047 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7048 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7049 _LT_TAGVAR(hardcode_direct, $1)=yes
7050 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7051 # but as the default
7052 # location of the library.
7054 case $cc_basename in
7056 # FIXME: insert proper C++ library support
7057 _LT_TAGVAR(ld_shlibs, $1)=no
7060 _LT_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'
7061 # Commands to make compiler produce verbose output that lists
7062 # what "hidden" libraries, object files and flags are used when
7063 # linking a shared library.
7065 # There doesn't appear to be a way to prevent this compiler from
7066 # explicitly linking system object files so we need to strip them
7067 # from the output so that they don't get included in the library
7069 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
7072 if test "$GXX" = yes; then
7073 _LT_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'
7075 # FIXME: insert proper C++ library support
7076 _LT_TAGVAR(ld_shlibs, $1)=no
7083 if test $with_gnu_ld = no; then
7084 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7085 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7091 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7097 _LT_TAGVAR(hardcode_direct, $1)=no
7098 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7101 _LT_TAGVAR(hardcode_direct, $1)=yes
7102 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7103 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7104 # but as the default
7105 # location of the library.
7109 case $cc_basename in
7111 # FIXME: insert proper C++ library support
7112 _LT_TAGVAR(ld_shlibs, $1)=no
7117 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7120 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7123 _LT_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'
7126 # Commands to make compiler produce verbose output that lists
7127 # what "hidden" libraries, object files and flags are used when
7128 # linking a shared library.
7130 # There doesn't appear to be a way to prevent this compiler from
7131 # explicitly linking system object files so we need to strip them
7132 # from the output so that they don't get included in the library
7134 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 "X$list" | $Xsed'
7137 if test "$GXX" = yes; then
7138 if test $with_gnu_ld = no; then
7141 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7144 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7147 _LT_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'
7152 # FIXME: insert proper C++ library support
7153 _LT_TAGVAR(ld_shlibs, $1)=no
7160 _LT_TAGVAR(hardcode_direct, $1)=no
7161 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7162 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7163 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7164 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7165 # Instead, shared libraries are loaded at an image base (0x10000000 by
7166 # default) and relocated if they conflict, which is a slow very memory
7167 # consuming and fragmenting process. To avoid this, we pick a random,
7168 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7169 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
7170 _LT_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'
7171 _LT_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'
7174 case $cc_basename in
7177 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7179 # Archives containing C++ object files must be created using
7180 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
7181 # necessary to make sure instantiated templates are included
7183 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7186 if test "$GXX" = yes; then
7187 if test "$with_gnu_ld" = no; then
7188 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7190 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
7193 _LT_TAGVAR(link_all_deplibs, $1)=yes
7196 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7197 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7198 _LT_TAGVAR(inherit_rpath, $1)=yes
7201 linux* | k*bsd*-gnu | kopensolaris*-gnu)
7202 case $cc_basename in
7204 # Kuck and Associates, Inc. (KAI) C++ Compiler
7206 # KCC will only create a shared library if the output file
7207 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7208 # to its proper name (with version) after linking.
7209 _LT_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'
7210 _LT_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'
7211 # Commands to make compiler produce verbose output that lists
7212 # what "hidden" libraries, object files and flags are used when
7213 # linking a shared library.
7215 # There doesn't appear to be a way to prevent this compiler from
7216 # explicitly linking system object files so we need to strip them
7217 # from the output so that they don't get included in the library
7219 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 "X$list" | $Xsed'
7221 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7222 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7224 # Archives containing C++ object files must be created using
7225 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7226 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7231 # version 8.0 and above of icpc choke on multiply defined symbols
7232 # if we add $predep_objects and $postdep_objects, however 7.1 and
7233 # earlier do not add the objects themselves.
7234 case `$CC -V 2>&1` in
7236 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7237 _LT_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'
7239 *) # Version 8.0 or newer
7242 ia64*) tmp_idyn=' -i_dynamic';;
7244 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7245 _LT_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'
7248 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7249 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7250 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7251 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7254 # Portland Group C++ compiler
7256 *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
7257 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7259 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7260 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
7261 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7263 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7264 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
7266 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7268 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7269 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7270 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7272 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7273 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7275 *) # Version 6 will use weak symbols
7276 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7277 _LT_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'
7281 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7282 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7283 _LT_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'
7287 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7288 _LT_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'
7290 runpath_var=LD_RUN_PATH
7291 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7292 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7294 # Commands to make compiler produce verbose output that lists
7295 # what "hidden" libraries, object files and flags are used when
7296 # linking a shared library.
7298 # There doesn't appear to be a way to prevent this compiler from
7299 # explicitly linking system object files so we need to strip them
7300 # from the output so that they don't get included in the library
7302 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
7305 # IBM XL 8.0 on PPC, with GNU ld
7306 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7307 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7308 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7309 if test "x$supports_anon_versioning" = xyes; then
7310 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7311 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7312 echo "local: *; };" >> $output_objdir/$libname.ver~
7313 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7317 case `$CC -V 2>&1 | sed 5q` in
7320 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7321 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7322 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
7323 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7324 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
7325 _LT_TAGVAR(compiler_needs_object, $1)=yes
7327 # Not sure whether something based on
7328 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7330 output_verbose_link_cmd='echo'
7332 # Archives containing C++ object files must be created using
7333 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7334 # necessary to make sure instantiated templates are included
7336 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7344 # FIXME: insert proper C++ library support
7345 _LT_TAGVAR(ld_shlibs, $1)=no
7349 # FIXME: insert proper C++ library support
7350 _LT_TAGVAR(ld_shlibs, $1)=no
7354 case $cc_basename in
7356 # FIXME: insert proper C++ library support
7357 _LT_TAGVAR(ld_shlibs, $1)=no
7360 # FIXME: insert proper C++ library support
7361 _LT_TAGVAR(ld_shlibs, $1)=no
7367 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7368 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7370 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7371 _LT_TAGVAR(hardcode_direct, $1)=yes
7372 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7374 # Workaround some broken pre-1.5 toolchains
7375 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7379 _LT_TAGVAR(ld_shlibs, $1)=yes
7383 # C++ shared libraries are fairly broken
7384 _LT_TAGVAR(ld_shlibs, $1)=no
7388 if test -f /usr/libexec/ld.so; then
7389 _LT_TAGVAR(hardcode_direct, $1)=yes
7390 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7391 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7392 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7393 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7394 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7395 _LT_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'
7396 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7397 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7399 output_verbose_link_cmd=echo
7401 _LT_TAGVAR(ld_shlibs, $1)=no
7405 osf3* | osf4* | osf5*)
7406 case $cc_basename in
7408 # Kuck and Associates, Inc. (KAI) C++ Compiler
7410 # KCC will only create a shared library if the output file
7411 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7412 # to its proper name (with version) after linking.
7413 _LT_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'
7415 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7416 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7418 # Archives containing C++ object files must be created using
7419 # the KAI C++ compiler.
7421 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7422 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7426 # Rational C++ 2.4.1
7427 # FIXME: insert proper C++ library support
7428 _LT_TAGVAR(ld_shlibs, $1)=no
7433 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7434 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7435 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7438 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7439 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7440 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7441 echo "-hidden">> $lib.exp~
7442 $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
7444 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7448 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7450 # Commands to make compiler produce verbose output that lists
7451 # what "hidden" libraries, object files and flags are used when
7452 # linking a shared library.
7454 # There doesn't appear to be a way to prevent this compiler from
7455 # explicitly linking system object files so we need to strip them
7456 # from the output so that they don't get included in the library
7458 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
7461 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7462 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7465 _LT_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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7468 _LT_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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7472 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7473 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7475 # Commands to make compiler produce verbose output that lists
7476 # what "hidden" libraries, object files and flags are used when
7477 # linking a shared library.
7478 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7481 # FIXME: insert proper C++ library support
7482 _LT_TAGVAR(ld_shlibs, $1)=no
7489 # FIXME: insert proper C++ library support
7490 _LT_TAGVAR(ld_shlibs, $1)=no
7494 case $cc_basename in
7497 # FIXME: insert proper C++ library support
7498 _LT_TAGVAR(ld_shlibs, $1)=no
7502 # FIXME: insert proper C++ library support
7503 _LT_TAGVAR(ld_shlibs, $1)=no
7506 # FIXME: insert proper C++ library support
7507 _LT_TAGVAR(ld_shlibs, $1)=no
7513 case $cc_basename in
7515 # Sun C++ 4.2, 5.x and Centerline C++
7516 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7517 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7518 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7519 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7520 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7522 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7523 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7525 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7527 # The compiler driver will combine and reorder linker options,
7528 # but understands `-z linker_flag'.
7529 # Supported since Solaris 2.6 (maybe 2.5.1?)
7530 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7533 _LT_TAGVAR(link_all_deplibs, $1)=yes
7535 output_verbose_link_cmd='echo'
7537 # Archives containing C++ object files must be created using
7538 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7539 # necessary to make sure instantiated templates are included
7541 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7544 # Green Hills C++ Compiler
7545 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7547 # The C++ compiler must be used to create the archive.
7548 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7551 # GNU C++ compiler with Solaris linker
7552 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7553 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7554 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7555 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7556 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7557 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7559 # Commands to make compiler produce verbose output that lists
7560 # what "hidden" libraries, object files and flags are used when
7561 # linking a shared library.
7562 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7564 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7566 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7567 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7568 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7570 # Commands to make compiler produce verbose output that lists
7571 # what "hidden" libraries, object files and flags are used when
7572 # linking a shared library.
7573 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7576 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7578 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7580 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7588 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7589 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7590 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7591 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7592 runpath_var='LD_RUN_PATH'
7594 case $cc_basename in
7596 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7597 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7600 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7601 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7606 sysv5* | sco3.2v5* | sco5v6*)
7607 # Note: We can NOT use -z defs as we might desire, because we do not
7608 # link with -lc, and that would cause any symbols used from libc to
7609 # always be unresolved, which means just about no library would
7610 # ever link correctly. If we're not using GNU ld we use -z text
7611 # though, which does catch some bad symbols but isn't as heavy-handed
7613 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7614 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7615 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7616 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7617 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7618 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7619 _LT_TAGVAR(link_all_deplibs, $1)=yes
7620 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7621 runpath_var='LD_RUN_PATH'
7623 case $cc_basename in
7625 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7626 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7629 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7630 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7636 case $cc_basename in
7638 # NonStop-UX NCC 3.20
7639 # FIXME: insert proper C++ library support
7640 _LT_TAGVAR(ld_shlibs, $1)=no
7643 # FIXME: insert proper C++ library support
7644 _LT_TAGVAR(ld_shlibs, $1)=no
7650 # FIXME: insert proper C++ library support
7651 _LT_TAGVAR(ld_shlibs, $1)=no
7655 # FIXME: insert proper C++ library support
7656 _LT_TAGVAR(ld_shlibs, $1)=no
7660 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7661 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7663 _LT_TAGVAR(GCC, $1)="$GXX"
7664 _LT_TAGVAR(LD, $1)="$LD"
7667 ## There is no encapsulation within the following macros, do not change
7668 ## the running order or otherwise move them around unless you know exactly
7669 ## what you are doing...
7670 _LT_SYS_HIDDEN_LIBDEPS($1)
7671 _LT_COMPILER_PIC($1)
7672 _LT_COMPILER_C_O($1)
7673 _LT_COMPILER_FILE_LOCKS($1)
7674 _LT_LINKER_SHLIBS($1)
7675 _LT_SYS_DYNAMIC_LINKER($1)
7676 _LT_LINKER_HARDCODE_LIBPATH($1)
7679 fi # test -n "$compiler"
7685 with_gnu_ld=$lt_save_with_gnu_ld
7686 lt_cv_path_LDCXX=$lt_cv_path_LD
7687 lt_cv_path_LD=$lt_save_path_LD
7688 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7689 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7690 fi # test "$_lt_caught_CXX_error" != yes
7693 ])# _LT_LANG_CXX_CONFIG
7696 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7697 # ---------------------------------
7698 # Figure out "hidden" library dependencies from verbose
7699 # compiler output when linking a shared library.
7700 # Parse the compiler output and extract the necessary
7701 # objects, libraries and library flags.
7702 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7703 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7704 # Dependencies to place before and after the object being linked:
7705 _LT_TAGVAR(predep_objects, $1)=
7706 _LT_TAGVAR(postdep_objects, $1)=
7707 _LT_TAGVAR(predeps, $1)=
7708 _LT_TAGVAR(postdeps, $1)=
7709 _LT_TAGVAR(compiler_lib_search_path, $1)=
7711 dnl we can't use the lt_simple_compile_test_code here,
7712 dnl because it contains code intended for an executable,
7713 dnl not a library. It's possible we should let each
7714 dnl tag define a new lt_????_link_test_code variable,
7715 dnl but it's only used here...
7716 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7718 void foo (void) { a = 0; }
7720 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7724 Foo (void) { a = 0; }
7729 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7737 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7745 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7748 public void bar (void) {
7754 dnl Parse the compiler output and extract the necessary
7755 dnl objects, libraries and library flags.
7756 if AC_TRY_EVAL(ac_compile); then
7757 # Parse the compiler output and extract the necessary
7758 # objects, libraries and library flags.
7760 # Sentinel used to keep track of whether or not we are before
7761 # the conftest object file.
7762 pre_test_object_deps_done=no
7764 for p in `eval "$output_verbose_link_cmd"`; do
7768 # Some compilers place space between "-{L,R}" and the path.
7770 if test $p = "-L" ||
7771 test $p = "-R"; then
7778 if test "$pre_test_object_deps_done" = no; then
7781 # Internal compiler library paths should come after those
7782 # provided the user. The postdeps already come after the
7783 # user supplied libs so there is no need to process them.
7784 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7785 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7787 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7790 # The "-l" case would never come before the object being
7791 # linked, so don't bother handling this case.
7794 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7795 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7797 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7803 # This assumes that the test object file only shows up
7804 # once in the compiler output.
7805 if test "$p" = "conftest.$objext"; then
7806 pre_test_object_deps_done=yes
7810 if test "$pre_test_object_deps_done" = no; then
7811 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7812 _LT_TAGVAR(predep_objects, $1)="$p"
7814 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7817 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7818 _LT_TAGVAR(postdep_objects, $1)="$p"
7820 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7825 *) ;; # Ignore the rest.
7833 echo "libtool.m4: error: problem compiling $1 test program"
7836 $RM -f confest.$objext
7838 # PORTME: override above test on systems where it is broken
7842 # Interix 3.5 installs completely hosed .la files for C++, so rather than
7843 # hack all around it, let's just trust "g++" to DTRT.
7844 _LT_TAGVAR(predep_objects,$1)=
7845 _LT_TAGVAR(postdep_objects,$1)=
7846 _LT_TAGVAR(postdeps,$1)=
7850 case `$CC -V 2>&1 | sed 5q` in
7854 # The more standards-conforming stlport4 library is
7855 # incompatible with the Cstd library. Avoid specifying
7856 # it if it's in CXXFLAGS. Ignore libCrun as
7857 # -library=stlport4 depends on it.
7858 case " $CXX $CXXFLAGS " in
7859 *" -library=stlport4 "*)
7860 solaris_use_stlport4=yes
7864 if test "$solaris_use_stlport4" != yes; then
7865 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7872 case $cc_basename in
7874 # The more standards-conforming stlport4 library is
7875 # incompatible with the Cstd library. Avoid specifying
7876 # it if it's in CXXFLAGS. Ignore libCrun as
7877 # -library=stlport4 depends on it.
7878 case " $CXX $CXXFLAGS " in
7879 *" -library=stlport4 "*)
7880 solaris_use_stlport4=yes
7884 # Adding this requires a known-good setup of shared libraries for
7885 # Sun compiler versions before 5.6, else PIC objects from an old
7886 # archive will be linked into the output, leading to subtle bugs.
7887 if test "$solaris_use_stlport4" != yes; then
7888 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7896 case " $_LT_TAGVAR(postdeps, $1) " in
7897 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
7899 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
7900 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7901 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7903 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
7904 [The directories searched by this compiler when creating a shared library])
7905 _LT_TAGDECL([], [predep_objects], [1],
7906 [Dependencies to place before and after the objects being linked to
7907 create a shared library])
7908 _LT_TAGDECL([], [postdep_objects], [1])
7909 _LT_TAGDECL([], [predeps], [1])
7910 _LT_TAGDECL([], [postdeps], [1])
7911 _LT_TAGDECL([], [compiler_lib_search_path], [1],
7912 [The library search path used internally by the compiler when linking
7914 ])# _LT_SYS_HIDDEN_LIBDEPS
7919 # Since AC_PROG_F77 is broken, in that it returns the empty string
7920 # if there is no fortran compiler, we have our own version here.
7921 m4_defun([_LT_PROG_F77],
7923 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
7925 if test -z "$F77" || test "X$F77" = "Xno"; then
7928 popdef([AC_MSG_ERROR])
7931 dnl aclocal-1.4 backwards compatibility:
7932 dnl AC_DEFUN([_LT_PROG_F77], [])
7935 # _LT_LANG_F77_CONFIG([TAG])
7936 # --------------------------
7937 # Ensure that the configuration variables for a Fortran 77 compiler are
7938 # suitably defined. These variables are subsequently used by _LT_CONFIG
7939 # to write the compiler configuration to `libtool'.
7940 m4_defun([_LT_LANG_F77_CONFIG],
7941 [AC_REQUIRE([_LT_PROG_F77])dnl
7942 AC_LANG_PUSH(Fortran 77)
7944 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7945 _LT_TAGVAR(allow_undefined_flag, $1)=
7946 _LT_TAGVAR(always_export_symbols, $1)=no
7947 _LT_TAGVAR(archive_expsym_cmds, $1)=
7948 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7949 _LT_TAGVAR(hardcode_direct, $1)=no
7950 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7951 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7952 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7953 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7954 _LT_TAGVAR(hardcode_minus_L, $1)=no
7955 _LT_TAGVAR(hardcode_automatic, $1)=no
7956 _LT_TAGVAR(inherit_rpath, $1)=no
7957 _LT_TAGVAR(module_cmds, $1)=
7958 _LT_TAGVAR(module_expsym_cmds, $1)=
7959 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7960 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7961 _LT_TAGVAR(no_undefined_flag, $1)=
7962 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7963 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7965 # Source file extension for f77 test sources.
7968 # Object file extension for compiled f77 test sources.
7970 _LT_TAGVAR(objext, $1)=$objext
7972 # No sense in running all these tests if we already determined that
7973 # the F77 compiler isn't working. Some variables (like enable_shared)
7974 # are currently assumed to apply to all compilers on this platform,
7975 # and will be corrupted by setting them based on a non-working compiler.
7976 if test "$_lt_disable_F77" != yes; then
7977 # Code to be used in simple compile tests
7978 lt_simple_compile_test_code="\
7984 # Code to be used in simple link tests
7985 lt_simple_link_test_code="\
7990 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7993 # save warnings/boilerplate of simple test code
7994 _LT_COMPILER_BOILERPLATE
7995 _LT_LINKER_BOILERPLATE
7997 # Allow CC to be a program name with arguments.
8002 _LT_TAGVAR(compiler, $1)=$CC
8003 _LT_CC_BASENAME([$compiler])
8005 if test -n "$compiler"; then
8006 AC_MSG_CHECKING([if libtool supports shared libraries])
8007 AC_MSG_RESULT([$can_build_shared])
8009 AC_MSG_CHECKING([whether to build shared libraries])
8010 test "$can_build_shared" = "no" && enable_shared=no
8012 # On AIX, shared libraries and static libraries use the same namespace, and
8013 # are all built from PIC.
8016 test "$enable_shared" = yes && enable_static=no
8017 if test -n "$RANLIB"; then
8018 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8019 postinstall_cmds='$RANLIB $lib'
8023 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8024 test "$enable_shared" = yes && enable_static=no
8028 AC_MSG_RESULT([$enable_shared])
8030 AC_MSG_CHECKING([whether to build static libraries])
8031 # Make sure either enable_shared or enable_static is yes.
8032 test "$enable_shared" = yes || enable_static=yes
8033 AC_MSG_RESULT([$enable_static])
8035 _LT_TAGVAR(GCC, $1)="$G77"
8036 _LT_TAGVAR(LD, $1)="$LD"
8039 ## There is no encapsulation within the following macros, do not change
8040 ## the running order or otherwise move them around unless you know exactly
8041 ## what you are doing...
8042 _LT_COMPILER_PIC($1)
8043 _LT_COMPILER_C_O($1)
8044 _LT_COMPILER_FILE_LOCKS($1)
8045 _LT_LINKER_SHLIBS($1)
8046 _LT_SYS_DYNAMIC_LINKER($1)
8047 _LT_LINKER_HARDCODE_LIBPATH($1)
8050 fi # test -n "$compiler"
8054 fi # test "$_lt_disable_F77" != yes
8057 ])# _LT_LANG_F77_CONFIG
8062 # Since AC_PROG_FC is broken, in that it returns the empty string
8063 # if there is no fortran compiler, we have our own version here.
8064 m4_defun([_LT_PROG_FC],
8066 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
8068 if test -z "$FC" || test "X$FC" = "Xno"; then
8071 popdef([AC_MSG_ERROR])
8074 dnl aclocal-1.4 backwards compatibility:
8075 dnl AC_DEFUN([_LT_PROG_FC], [])
8078 # _LT_LANG_FC_CONFIG([TAG])
8079 # -------------------------
8080 # Ensure that the configuration variables for a Fortran compiler are
8081 # suitably defined. These variables are subsequently used by _LT_CONFIG
8082 # to write the compiler configuration to `libtool'.
8083 m4_defun([_LT_LANG_FC_CONFIG],
8084 [AC_REQUIRE([_LT_PROG_FC])dnl
8085 AC_LANG_PUSH(Fortran)
8087 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8088 _LT_TAGVAR(allow_undefined_flag, $1)=
8089 _LT_TAGVAR(always_export_symbols, $1)=no
8090 _LT_TAGVAR(archive_expsym_cmds, $1)=
8091 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8092 _LT_TAGVAR(hardcode_direct, $1)=no
8093 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8094 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8095 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8096 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8097 _LT_TAGVAR(hardcode_minus_L, $1)=no
8098 _LT_TAGVAR(hardcode_automatic, $1)=no
8099 _LT_TAGVAR(inherit_rpath, $1)=no
8100 _LT_TAGVAR(module_cmds, $1)=
8101 _LT_TAGVAR(module_expsym_cmds, $1)=
8102 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8103 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8104 _LT_TAGVAR(no_undefined_flag, $1)=
8105 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8106 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8108 # Source file extension for fc test sources.
8109 ac_ext=${ac_fc_srcext-f}
8111 # Object file extension for compiled fc test sources.
8113 _LT_TAGVAR(objext, $1)=$objext
8115 # No sense in running all these tests if we already determined that
8116 # the FC compiler isn't working. Some variables (like enable_shared)
8117 # are currently assumed to apply to all compilers on this platform,
8118 # and will be corrupted by setting them based on a non-working compiler.
8119 if test "$_lt_disable_FC" != yes; then
8120 # Code to be used in simple compile tests
8121 lt_simple_compile_test_code="\
8127 # Code to be used in simple link tests
8128 lt_simple_link_test_code="\
8133 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8136 # save warnings/boilerplate of simple test code
8137 _LT_COMPILER_BOILERPLATE
8138 _LT_LINKER_BOILERPLATE
8140 # Allow CC to be a program name with arguments.
8145 GCC=$ac_cv_fc_compiler_gnu
8147 _LT_TAGVAR(compiler, $1)=$CC
8148 _LT_CC_BASENAME([$compiler])
8150 if test -n "$compiler"; then
8151 AC_MSG_CHECKING([if libtool supports shared libraries])
8152 AC_MSG_RESULT([$can_build_shared])
8154 AC_MSG_CHECKING([whether to build shared libraries])
8155 test "$can_build_shared" = "no" && enable_shared=no
8157 # On AIX, shared libraries and static libraries use the same namespace, and
8158 # are all built from PIC.
8161 test "$enable_shared" = yes && enable_static=no
8162 if test -n "$RANLIB"; then
8163 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8164 postinstall_cmds='$RANLIB $lib'
8168 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8169 test "$enable_shared" = yes && enable_static=no
8173 AC_MSG_RESULT([$enable_shared])
8175 AC_MSG_CHECKING([whether to build static libraries])
8176 # Make sure either enable_shared or enable_static is yes.
8177 test "$enable_shared" = yes || enable_static=yes
8178 AC_MSG_RESULT([$enable_static])
8180 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8181 _LT_TAGVAR(LD, $1)="$LD"
8184 ## There is no encapsulation within the following macros, do not change
8185 ## the running order or otherwise move them around unless you know exactly
8186 ## what you are doing...
8187 _LT_SYS_HIDDEN_LIBDEPS($1)
8188 _LT_COMPILER_PIC($1)
8189 _LT_COMPILER_C_O($1)
8190 _LT_COMPILER_FILE_LOCKS($1)
8191 _LT_LINKER_SHLIBS($1)
8192 _LT_SYS_DYNAMIC_LINKER($1)
8193 _LT_LINKER_HARDCODE_LIBPATH($1)
8196 fi # test -n "$compiler"
8200 fi # test "$_lt_disable_FC" != yes
8203 ])# _LT_LANG_FC_CONFIG
8206 # _LT_LANG_GCJ_CONFIG([TAG])
8207 # --------------------------
8208 # Ensure that the configuration variables for the GNU Java Compiler compiler
8209 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8210 # to write the compiler configuration to `libtool'.
8211 m4_defun([_LT_LANG_GCJ_CONFIG],
8212 [AC_REQUIRE([LT_PROG_GCJ])dnl
8215 # Source file extension for Java test sources.
8218 # Object file extension for compiled Java test sources.
8220 _LT_TAGVAR(objext, $1)=$objext
8222 # Code to be used in simple compile tests
8223 lt_simple_compile_test_code="class foo {}"
8225 # Code to be used in simple link tests
8226 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8228 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8231 # save warnings/boilerplate of simple test code
8232 _LT_COMPILER_BOILERPLATE
8233 _LT_LINKER_BOILERPLATE
8235 # Allow CC to be a program name with arguments.
8241 _LT_TAGVAR(compiler, $1)=$CC
8242 _LT_TAGVAR(LD, $1)="$LD"
8243 _LT_CC_BASENAME([$compiler])
8245 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8246 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8248 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8250 if test -n "$compiler"; then
8251 _LT_COMPILER_NO_RTTI($1)
8252 _LT_COMPILER_PIC($1)
8253 _LT_COMPILER_C_O($1)
8254 _LT_COMPILER_FILE_LOCKS($1)
8255 _LT_LINKER_SHLIBS($1)
8256 _LT_LINKER_HARDCODE_LIBPATH($1)
8265 ])# _LT_LANG_GCJ_CONFIG
8268 # _LT_LANG_RC_CONFIG([TAG])
8269 # -------------------------
8270 # Ensure that the configuration variables for the Windows resource compiler
8271 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8272 # to write the compiler configuration to `libtool'.
8273 m4_defun([_LT_LANG_RC_CONFIG],
8274 [AC_REQUIRE([LT_PROG_RC])dnl
8277 # Source file extension for RC test sources.
8280 # Object file extension for compiled RC test sources.
8282 _LT_TAGVAR(objext, $1)=$objext
8284 # Code to be used in simple compile tests
8285 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8287 # Code to be used in simple link tests
8288 lt_simple_link_test_code="$lt_simple_compile_test_code"
8290 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8293 # save warnings/boilerplate of simple test code
8294 _LT_COMPILER_BOILERPLATE
8295 _LT_LINKER_BOILERPLATE
8297 # Allow CC to be a program name with arguments.
8303 _LT_TAGVAR(compiler, $1)=$CC
8304 _LT_CC_BASENAME([$compiler])
8305 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8307 if test -n "$compiler"; then
8315 ])# _LT_LANG_RC_CONFIG
8320 AC_DEFUN([LT_PROG_GCJ],
8321 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8322 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8323 [AC_CHECK_TOOL(GCJ, gcj,)
8324 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8325 AC_SUBST(GCJFLAGS)])])[]dnl
8329 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8330 dnl aclocal-1.4 backwards compatibility:
8331 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8336 AC_DEFUN([LT_PROG_RC],
8337 [AC_CHECK_TOOL(RC, windres,)
8341 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8342 dnl aclocal-1.4 backwards compatibility:
8343 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8348 # If we don't have a new enough Autoconf to choose the best grep
8349 # available, choose the one first in the user's PATH.
8350 m4_defun([_LT_DECL_EGREP],
8351 [AC_REQUIRE([AC_PROG_EGREP])dnl
8352 AC_REQUIRE([AC_PROG_FGREP])dnl
8353 test -z "$GREP" && GREP=grep
8354 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8355 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8356 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8357 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8364 # If we don't have a new enough Autoconf to choose the best objdump
8365 # available, choose the one first in the user's PATH.
8366 m4_defun([_LT_DECL_OBJDUMP],
8367 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8368 test -z "$OBJDUMP" && OBJDUMP=objdump
8369 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8376 # Check for a fully-functional sed program, that truncates
8377 # as few characters as possible. Prefer GNU sed if found.
8378 m4_defun([_LT_DECL_SED],
8380 test -z "$SED" && SED=sed
8381 Xsed="$SED -e 1s/^X//"
8382 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8383 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8384 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8387 m4_ifndef([AC_PROG_SED], [
8388 # NOTE: This macro has been submitted for inclusion into #
8389 # GNU Autoconf as AC_PROG_SED. When it is available in #
8390 # a released version of Autoconf we should remove this #
8391 # macro and use it instead. #
8393 m4_defun([AC_PROG_SED],
8394 [AC_MSG_CHECKING([for a sed that does not truncate output])
8395 AC_CACHE_VAL(lt_cv_path_SED,
8396 [# Loop through the user's path and test for sed and gsed.
8397 # Then use that list of sed's as ones to test for truncation.
8398 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8402 test -z "$as_dir" && as_dir=.
8403 for lt_ac_prog in sed gsed; do
8404 for ac_exec_ext in '' $ac_executable_extensions; do
8405 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8406 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8414 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8415 # along with /bin/sed that truncates output.
8416 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8417 test ! -f $lt_ac_sed && continue
8418 cat /dev/null > conftest.in
8420 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8421 # Check for GNU sed and select it if it is found.
8422 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8423 lt_cv_path_SED=$lt_ac_sed
8427 cat conftest.in conftest.in >conftest.tmp
8428 mv conftest.tmp conftest.in
8429 cp conftest.in conftest.nl
8431 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8432 cmp -s conftest.out conftest.nl || break
8433 # 10000 chars as input seems more than enough
8434 test $lt_ac_count -gt 10 && break
8435 lt_ac_count=`expr $lt_ac_count + 1`
8436 if test $lt_ac_count -gt $lt_ac_max; then
8437 lt_ac_max=$lt_ac_count
8438 lt_cv_path_SED=$lt_ac_sed
8445 AC_MSG_RESULT([$SED])
8450 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8451 dnl aclocal-1.4 backwards compatibility:
8452 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8455 # _LT_CHECK_SHELL_FEATURES
8456 # ------------------------
8457 # Find out whether the shell is Bourne or XSI compatible,
8458 # or has some other useful features.
8459 m4_defun([_LT_CHECK_SHELL_FEATURES],
8460 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8461 # Try some XSI features
8464 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
8466 && eval 'test $(( 1 + 1 )) -eq 2 \
8467 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8469 AC_MSG_RESULT([$xsi_shell])
8470 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8472 AC_MSG_CHECKING([whether the shell understands "+="])
8474 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8476 && lt_shell_append=yes
8477 AC_MSG_RESULT([$lt_shell_append])
8478 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8480 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8485 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8487 # test EBCDIC or ASCII
8488 case `echo X|tr X '\101'` in
8489 A) # ASCII based system
8490 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8491 lt_SP2NL='tr \040 \012'
8492 lt_NL2SP='tr \015\012 \040\040'
8494 *) # EBCDIC based system
8495 lt_SP2NL='tr \100 \n'
8496 lt_NL2SP='tr \r\n \100\100'
8499 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8500 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8501 ])# _LT_CHECK_SHELL_FEATURES
8504 # _LT_PROG_XSI_SHELLFNS
8505 # ---------------------
8506 # Bourne and XSI compatible variants of some useful shell functions.
8507 m4_defun([_LT_PROG_XSI_SHELLFNS],
8510 cat << \_LT_EOF >> "$cfgfile"
8512 # func_dirname file append nondir_replacement
8513 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
8514 # otherwise set result to NONDIR_REPLACEMENT.
8518 */*) func_dirname_result="${1%/*}${2}" ;;
8519 * ) func_dirname_result="${3}" ;;
8523 # func_basename file
8526 func_basename_result="${1##*/}"
8529 # func_dirname_and_basename file append nondir_replacement
8530 # perform func_basename and func_dirname in a single function
8532 # dirname: Compute the dirname of FILE. If nonempty,
8533 # add APPEND to the result, otherwise set result
8534 # to NONDIR_REPLACEMENT.
8535 # value returned in "$func_dirname_result"
8536 # basename: Compute filename of FILE.
8537 # value retuned in "$func_basename_result"
8538 # Implementation must be kept synchronized with func_dirname
8539 # and func_basename. For efficiency, we do not delegate to
8540 # those functions but instead duplicate the functionality here.
8541 func_dirname_and_basename ()
8544 */*) func_dirname_result="${1%/*}${2}" ;;
8545 * ) func_dirname_result="${3}" ;;
8547 func_basename_result="${1##*/}"
8550 # func_stripname prefix suffix name
8551 # strip PREFIX and SUFFIX off of NAME.
8552 # PREFIX and SUFFIX must not contain globbing or regex special
8553 # characters, hashes, percent signs, but SUFFIX may contain a leading
8554 # dot (in which case that matches only a dot).
8557 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8558 # positional parameters, so assign one to ordinary parameter first.
8559 func_stripname_result=${3}
8560 func_stripname_result=${func_stripname_result#"${1}"}
8561 func_stripname_result=${func_stripname_result%"${2}"}
8567 func_opt_split_opt=${1%%=*}
8568 func_opt_split_arg=${1#*=}
8575 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8576 *) func_lo2o_result=${1} ;;
8580 # func_xform libobj-or-source
8583 func_xform_result=${1%.*}.lo
8586 # func_arith arithmetic-term...
8589 func_arith_result=$(( $[*] ))
8593 # STRING may not start with a hyphen.
8596 func_len_result=${#1}
8601 *) # Bourne compatible functions.
8602 cat << \_LT_EOF >> "$cfgfile"
8604 # func_dirname file append nondir_replacement
8605 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
8606 # otherwise set result to NONDIR_REPLACEMENT.
8609 # Extract subdirectory from the argument.
8610 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
8611 if test "X$func_dirname_result" = "X${1}"; then
8612 func_dirname_result="${3}"
8614 func_dirname_result="$func_dirname_result${2}"
8618 # func_basename file
8621 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
8624 dnl func_dirname_and_basename
8625 dnl A portable version of this function is already defined in general.m4sh
8626 dnl so there is no need for it here.
8628 # func_stripname prefix suffix name
8629 # strip PREFIX and SUFFIX off of NAME.
8630 # PREFIX and SUFFIX must not contain globbing or regex special
8631 # characters, hashes, percent signs, but SUFFIX may contain a leading
8632 # dot (in which case that matches only a dot).
8633 # func_strip_suffix prefix name
8637 .*) func_stripname_result=`$ECHO "X${3}" \
8638 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
8639 *) func_stripname_result=`$ECHO "X${3}" \
8640 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
8645 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8646 my_sed_long_arg='1s/^-[[^=]]*=//'
8651 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
8652 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
8658 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
8661 # func_xform libobj-or-source
8664 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
8667 # func_arith arithmetic-term...
8670 func_arith_result=`expr "$[@]"`
8674 # STRING may not start with a hyphen.
8677 func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8683 case $lt_shell_append in
8685 cat << \_LT_EOF >> "$cfgfile"
8687 # func_append var value
8688 # Append VALUE to the end of shell variable VAR.
8696 cat << \_LT_EOF >> "$cfgfile"
8698 # func_append var value
8699 # Append VALUE to the end of shell variable VAR.
8702 eval "$[1]=\$$[1]\$[2]"
8710 # Helper functions for option handling. -*- Autoconf -*-
8712 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8713 # Written by Gary V. Vaughan, 2004
8715 # This file is free software; the Free Software Foundation gives
8716 # unlimited permission to copy and/or distribute it, with or without
8717 # modifications, as long as this notice is preserved.
8719 # serial 6 ltoptions.m4
8721 # This is to help aclocal find these macros, as it can't see m4_define.
8722 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8725 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8726 # ------------------------------------------
8727 m4_define([_LT_MANGLE_OPTION],
8728 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8731 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8732 # ---------------------------------------
8733 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8734 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
8736 m4_define([_LT_SET_OPTION],
8737 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8738 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8739 _LT_MANGLE_DEFUN([$1], [$2]),
8740 [m4_warning([Unknown $1 option `$2'])])[]dnl
8744 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8745 # ------------------------------------------------------------
8746 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8747 m4_define([_LT_IF_OPTION],
8748 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8751 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8752 # -------------------------------------------------------
8753 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8755 m4_define([_LT_UNLESS_OPTIONS],
8756 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8757 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8758 [m4_define([$0_found])])])[]dnl
8759 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8764 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8765 # ----------------------------------------
8766 # OPTION-LIST is a space-separated list of Libtool options associated
8767 # with MACRO-NAME. If any OPTION has a matching handler declared with
8768 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8769 # the unknown option and exit.
8770 m4_defun([_LT_SET_OPTIONS],
8772 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8773 [_LT_SET_OPTION([$1], _LT_Option)])
8775 m4_if([$1],[LT_INIT],[
8777 dnl Simply set some default values (i.e off) if boolean options were not
8779 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8781 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8784 dnl If no reference was made to various pairs of opposing options, then
8785 dnl we run the default mode handler for the pair. For example, if neither
8786 dnl `shared' nor `disable-shared' was passed, we enable building of shared
8787 dnl archives by default:
8788 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8789 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8790 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8791 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8792 [_LT_ENABLE_FAST_INSTALL])
8798 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8799 # -----------------------------------------
8800 m4_define([_LT_MANGLE_DEFUN],
8801 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8804 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8805 # -----------------------------------------------
8806 m4_define([LT_OPTION_DEFINE],
8807 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8808 ])# LT_OPTION_DEFINE
8813 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8816 AU_DEFUN([AC_LIBTOOL_DLOPEN],
8817 [_LT_SET_OPTION([LT_INIT], [dlopen])
8818 AC_DIAGNOSE([obsolete],
8819 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8820 put the `dlopen' option into LT_INIT's first parameter.])
8823 dnl aclocal-1.4 backwards compatibility:
8824 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8829 # Declare package support for building win32 dll's.
8830 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8831 [enable_win32_dll=yes
8834 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
8835 AC_CHECK_TOOL(AS, as, false)
8836 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8837 AC_CHECK_TOOL(OBJDUMP, objdump, false)
8841 test -z "$AS" && AS=as
8842 _LT_DECL([], [AS], [0], [Assembler program])dnl
8844 test -z "$DLLTOOL" && DLLTOOL=dlltool
8845 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
8847 test -z "$OBJDUMP" && OBJDUMP=objdump
8848 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
8851 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8852 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
8853 _LT_SET_OPTION([LT_INIT], [win32-dll])
8854 AC_DIAGNOSE([obsolete],
8855 [$0: Remove this warning and the call to _LT_SET_OPTION when you
8856 put the `win32-dll' option into LT_INIT's first parameter.])
8859 dnl aclocal-1.4 backwards compatibility:
8860 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8863 # _LT_ENABLE_SHARED([DEFAULT])
8864 # ----------------------------
8865 # implement the --enable-shared flag, and supports the `shared' and
8866 # `disable-shared' LT_INIT options.
8867 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8868 m4_define([_LT_ENABLE_SHARED],
8869 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8870 AC_ARG_ENABLE([shared],
8871 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8872 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
8873 [p=${PACKAGE-default}
8875 yes) enable_shared=yes ;;
8876 no) enable_shared=no ;;
8879 # Look at the argument we got. We use all the common list separators.
8880 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8881 for pkg in $enableval; do
8883 if test "X$pkg" = "X$p"; then
8890 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
8892 _LT_DECL([build_libtool_libs], [enable_shared], [0],
8893 [Whether or not to build shared libraries])
8894 ])# _LT_ENABLE_SHARED
8896 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
8897 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
8900 AC_DEFUN([AC_ENABLE_SHARED],
8901 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
8904 AC_DEFUN([AC_DISABLE_SHARED],
8905 [_LT_SET_OPTION([LT_INIT], [disable-shared])
8908 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
8909 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8911 dnl aclocal-1.4 backwards compatibility:
8912 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
8913 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
8917 # _LT_ENABLE_STATIC([DEFAULT])
8918 # ----------------------------
8919 # implement the --enable-static flag, and support the `static' and
8920 # `disable-static' LT_INIT options.
8921 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8922 m4_define([_LT_ENABLE_STATIC],
8923 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
8924 AC_ARG_ENABLE([static],
8925 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
8926 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
8927 [p=${PACKAGE-default}
8929 yes) enable_static=yes ;;
8930 no) enable_static=no ;;
8933 # Look at the argument we got. We use all the common list separators.
8934 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8935 for pkg in $enableval; do
8937 if test "X$pkg" = "X$p"; then
8944 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
8946 _LT_DECL([build_old_libs], [enable_static], [0],
8947 [Whether or not to build static libraries])
8948 ])# _LT_ENABLE_STATIC
8950 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
8951 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
8954 AC_DEFUN([AC_ENABLE_STATIC],
8955 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
8958 AC_DEFUN([AC_DISABLE_STATIC],
8959 [_LT_SET_OPTION([LT_INIT], [disable-static])
8962 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
8963 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8965 dnl aclocal-1.4 backwards compatibility:
8966 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
8967 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
8971 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
8972 # ----------------------------------
8973 # implement the --enable-fast-install flag, and support the `fast-install'
8974 # and `disable-fast-install' LT_INIT options.
8975 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
8976 m4_define([_LT_ENABLE_FAST_INSTALL],
8977 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
8978 AC_ARG_ENABLE([fast-install],
8979 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
8980 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
8981 [p=${PACKAGE-default}
8983 yes) enable_fast_install=yes ;;
8984 no) enable_fast_install=no ;;
8986 enable_fast_install=no
8987 # Look at the argument we got. We use all the common list separators.
8988 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
8989 for pkg in $enableval; do
8991 if test "X$pkg" = "X$p"; then
8992 enable_fast_install=yes
8998 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9000 _LT_DECL([fast_install], [enable_fast_install], [0],
9001 [Whether or not to optimize for fast installation])dnl
9002 ])# _LT_ENABLE_FAST_INSTALL
9004 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9005 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9008 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9009 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9010 AC_DIAGNOSE([obsolete],
9011 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9012 the `fast-install' option into LT_INIT's first parameter.])
9015 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9016 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9017 AC_DIAGNOSE([obsolete],
9018 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9019 the `disable-fast-install' option into LT_INIT's first parameter.])
9022 dnl aclocal-1.4 backwards compatibility:
9023 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9024 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9027 # _LT_WITH_PIC([MODE])
9028 # --------------------
9029 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9031 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
9032 m4_define([_LT_WITH_PIC],
9034 [AS_HELP_STRING([--with-pic],
9035 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9036 [pic_mode="$withval"],
9039 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9041 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9044 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9045 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9048 AU_DEFUN([AC_LIBTOOL_PICMODE],
9049 [_LT_SET_OPTION([LT_INIT], [pic-only])
9050 AC_DIAGNOSE([obsolete],
9051 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9052 put the `pic-only' option into LT_INIT's first parameter.])
9055 dnl aclocal-1.4 backwards compatibility:
9056 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9059 m4_define([_LTDL_MODE], [])
9060 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9061 [m4_define([_LTDL_MODE], [nonrecursive])])
9062 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9063 [m4_define([_LTDL_MODE], [recursive])])
9064 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9065 [m4_define([_LTDL_MODE], [subproject])])
9067 m4_define([_LTDL_TYPE], [])
9068 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9069 [m4_define([_LTDL_TYPE], [installable])])
9070 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9071 [m4_define([_LTDL_TYPE], [convenience])])
9073 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
9075 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9076 # Written by Gary V. Vaughan, 2004
9078 # This file is free software; the Free Software Foundation gives
9079 # unlimited permission to copy and/or distribute it, with or without
9080 # modifications, as long as this notice is preserved.
9082 # serial 6 ltsugar.m4
9084 # This is to help aclocal find these macros, as it can't see m4_define.
9085 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9088 # lt_join(SEP, ARG1, [ARG2...])
9089 # -----------------------------
9090 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9091 # associated separator.
9092 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9093 # versions in m4sugar had bugs.
9094 m4_define([lt_join],
9095 [m4_if([$#], [1], [],
9097 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9098 m4_define([_lt_join],
9099 [m4_if([$#$2], [2], [],
9100 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9106 # Manipulate m4 lists.
9107 # These macros are necessary as long as will still need to support
9108 # Autoconf-2.59 which quotes differently.
9109 m4_define([lt_car], [[$1]])
9111 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9113 [m4_dquote(m4_shift($@))])])
9114 m4_define([lt_unquote], $1)
9117 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9118 # ------------------------------------------
9119 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9120 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9121 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9122 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9123 # than defined and empty).
9125 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9126 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9127 m4_define([lt_append],
9129 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9133 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9134 # ----------------------------------------------------------
9135 # Produce a SEP delimited list of all paired combinations of elements of
9136 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
9137 # has the form PREFIXmINFIXSUFFIXn.
9138 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9139 m4_define([lt_combine],
9140 [m4_if(m4_eval([$# > 3]), [1],
9141 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9142 [[m4_foreach([_Lt_prefix], [$2],
9143 [m4_foreach([_Lt_suffix],
9144 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9145 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9148 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9149 # -----------------------------------------------------------------------
9150 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9151 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9152 m4_define([lt_if_append_uniq],
9154 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9155 [lt_append([$1], [$2], [$3])$4],
9157 [lt_append([$1], [$2], [$3])$4])])
9160 # lt_dict_add(DICT, KEY, VALUE)
9161 # -----------------------------
9162 m4_define([lt_dict_add],
9163 [m4_define([$1($2)], [$3])])
9166 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9167 # --------------------------------------------
9168 m4_define([lt_dict_add_subkey],
9169 [m4_define([$1($2:$3)], [$4])])
9172 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9173 # ----------------------------------
9174 m4_define([lt_dict_fetch],
9176 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9177 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9180 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9181 # -----------------------------------------------------------------
9182 m4_define([lt_if_dict_fetch],
9183 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9188 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9189 # --------------------------------------------------------------
9190 m4_define([lt_dict_filter],
9191 [m4_if([$5], [], [],
9192 [lt_join(m4_quote(m4_default([$4], [[, ]])),
9193 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9194 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9197 # ltversion.m4 -- version numbers -*- Autoconf -*-
9199 # Copyright (C) 2004 Free Software Foundation, Inc.
9200 # Written by Scott James Remnant, 2004
9202 # This file is free software; the Free Software Foundation gives
9203 # unlimited permission to copy and/or distribute it, with or without
9204 # modifications, as long as this notice is preserved.
9206 # Generated from ltversion.in.
9208 # serial 3017 ltversion.m4
9209 # This file is part of GNU Libtool
9211 m4_define([LT_PACKAGE_VERSION], [2.2.6b])
9212 m4_define([LT_PACKAGE_REVISION], [1.3017])
9214 AC_DEFUN([LTVERSION_VERSION],
9215 [macro_version='2.2.6b'
9216 macro_revision='1.3017'
9217 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9218 _LT_DECL(, macro_revision, 0)
9221 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
9223 # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
9224 # Written by Scott James Remnant, 2004.
9226 # This file is free software; the Free Software Foundation gives
9227 # unlimited permission to copy and/or distribute it, with or without
9228 # modifications, as long as this notice is preserved.
9230 # serial 4 lt~obsolete.m4
9232 # These exist entirely to fool aclocal when bootstrapping libtool.
9234 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9235 # which have later been changed to m4_define as they aren't part of the
9236 # exported API, or moved to Autoconf or Automake where they belong.
9238 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
9239 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9240 # using a macro with the same name in our local m4/libtool.m4 it'll
9241 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9242 # and doesn't know about Autoconf macros at all.)
9244 # So we provide this file, which has a silly filename so it's always
9245 # included after everything else. This provides aclocal with the
9246 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9247 # because those macros already exist, or will be overwritten later.
9248 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9250 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9251 # Yes, that means every name once taken will need to remain here until
9252 # we give up compatibility with versions before 1.7, at which point
9253 # we need to keep only those names which we still refer to.
9255 # This is to help aclocal find these macros, as it can't see m4_define.
9256 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9258 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9259 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9260 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9261 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9262 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9263 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9264 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9265 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9266 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9267 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9268 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9269 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9270 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9271 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9272 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9273 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9274 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9275 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9276 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9277 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9278 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9279 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9280 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9281 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9282 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9283 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9284 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9285 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9286 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9287 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9288 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9289 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9290 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9291 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9292 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9293 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9294 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9295 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9296 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9297 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9298 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9299 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9300 m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
9301 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9302 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9303 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9304 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9305 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9306 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9307 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9308 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9309 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9310 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9311 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9312 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9314 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
9316 # This file is free software; the Free Software Foundation
9317 # gives unlimited permission to copy and/or distribute it,
9318 # with or without modifications, as long as this notice is preserved.
9320 # AM_AUTOMAKE_VERSION(VERSION)
9321 # ----------------------------
9322 # Automake X.Y traces this macro to ensure aclocal.m4 has been
9323 # generated from the m4 files accompanying Automake X.Y.
9324 # (This private macro should not be called outside this file.)
9325 AC_DEFUN([AM_AUTOMAKE_VERSION],
9326 [am__api_version='1.11'
9327 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9328 dnl require some minimum version. Point them to the right macro.
9329 m4_if([$1], [1.11.1], [],
9330 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9333 # _AM_AUTOCONF_VERSION(VERSION)
9334 # -----------------------------
9335 # aclocal traces this macro to find the Autoconf version.
9336 # This is a private macro too. Using m4_define simplifies
9337 # the logic in aclocal, which can simply ignore this definition.
9338 m4_define([_AM_AUTOCONF_VERSION], [])
9340 # AM_SET_CURRENT_AUTOMAKE_VERSION
9341 # -------------------------------
9342 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9343 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9344 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9345 [AM_AUTOMAKE_VERSION([1.11.1])dnl
9346 m4_ifndef([AC_AUTOCONF_VERSION],
9347 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9348 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9350 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
9352 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9354 # This file is free software; the Free Software Foundation
9355 # gives unlimited permission to copy and/or distribute it,
9356 # with or without modifications, as long as this notice is preserved.
9358 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9359 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
9360 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9362 # Of course, Automake must honor this variable whenever it calls a
9363 # tool from the auxiliary directory. The problem is that $srcdir (and
9364 # therefore $ac_aux_dir as well) can be either absolute or relative,
9365 # depending on how configure is run. This is pretty annoying, since
9366 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
9367 # source directory, any form will work fine, but in subdirectories a
9368 # relative path needs to be adjusted first.
9370 # $ac_aux_dir/missing
9371 # fails when called from a subdirectory if $ac_aux_dir is relative
9372 # $top_srcdir/$ac_aux_dir/missing
9373 # fails if $ac_aux_dir is absolute,
9374 # fails when called from a subdirectory in a VPATH build with
9375 # a relative $ac_aux_dir
9377 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9378 # are both prefixed by $srcdir. In an in-source build this is usually
9379 # harmless because $srcdir is `.', but things will broke when you
9380 # start a VPATH build or use an absolute $srcdir.
9382 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9383 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
9384 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9385 # and then we would define $MISSING as
9386 # MISSING="\${SHELL} $am_aux_dir/missing"
9387 # This will work as long as MISSING is not called from configure, because
9388 # unfortunately $(top_srcdir) has no meaning in configure.
9389 # However there are other variables, like CC, which are often used in
9390 # configure, and could therefore not use this "fixed" $ac_aux_dir.
9392 # Another solution, used here, is to always expand $ac_aux_dir to an
9393 # absolute PATH. The drawback is that using absolute paths prevent a
9394 # configured tree to be moved without reconfiguration.
9396 AC_DEFUN([AM_AUX_DIR_EXPAND],
9397 [dnl Rely on autoconf to set up CDPATH properly.
9398 AC_PREREQ([2.50])dnl
9399 # expand $ac_aux_dir to an absolute path
9400 am_aux_dir=`cd $ac_aux_dir && pwd`
9403 # AM_CONDITIONAL -*- Autoconf -*-
9405 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
9406 # Free Software Foundation, Inc.
9408 # This file is free software; the Free Software Foundation
9409 # gives unlimited permission to copy and/or distribute it,
9410 # with or without modifications, as long as this notice is preserved.
9414 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
9415 # -------------------------------------
9416 # Define a conditional.
9417 AC_DEFUN([AM_CONDITIONAL],
9419 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
9420 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9421 AC_SUBST([$1_TRUE])dnl
9422 AC_SUBST([$1_FALSE])dnl
9423 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
9424 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
9425 m4_define([_AM_COND_VALUE_$1], [$2])dnl
9433 AC_CONFIG_COMMANDS_PRE(
9434 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9435 AC_MSG_ERROR([[conditional "$1" was never defined.
9436 Usually this means the macro was only invoked conditionally.]])
9439 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
9440 # Free Software Foundation, Inc.
9442 # This file is free software; the Free Software Foundation
9443 # gives unlimited permission to copy and/or distribute it,
9444 # with or without modifications, as long as this notice is preserved.
9448 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9449 # written in clear, in which case automake, when reading aclocal.m4,
9450 # will think it sees a *use*, and therefore will trigger all it's
9451 # C support machinery. Also note that it means that autoscan, seeing
9452 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9455 # _AM_DEPENDENCIES(NAME)
9456 # ----------------------
9457 # See how the compiler implements dependency checking.
9458 # NAME is "CC", "CXX", "GCJ", or "OBJC".
9459 # We try a few techniques and use that to set a single cache variable.
9461 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9462 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9463 # dependency, and given that the user is not expected to run this macro,
9464 # just rely on AC_PROG_CC.
9465 AC_DEFUN([_AM_DEPENDENCIES],
9466 [AC_REQUIRE([AM_SET_DEPDIR])dnl
9467 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9468 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9469 AC_REQUIRE([AM_DEP_TRACK])dnl
9471 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
9472 [$1], CXX, [depcc="$CXX" am_compiler_list=],
9473 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9474 [$1], UPC, [depcc="$UPC" am_compiler_list=],
9475 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
9476 [depcc="$$1" am_compiler_list=])
9478 AC_CACHE_CHECK([dependency style of $depcc],
9479 [am_cv_$1_dependencies_compiler_type],
9480 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9481 # We make a subdir and do the tests there. Otherwise we can end up
9482 # making bogus files that we don't know about and never remove. For
9483 # instance it was reported that on HP-UX the gcc test will end up
9484 # making a dummy file named `D' -- because `-MD' means `put the output
9487 # Copy depcomp to subdir because otherwise we won't find it if we're
9488 # using a relative directory.
9489 cp "$am_depcomp" conftest.dir
9491 # We will build objects and dependencies in a subdirectory because
9492 # it helps to detect inapplicable dependency modes. For instance
9493 # both Tru64's cc and ICC support -MD to output dependencies as a
9494 # side effect of compilation, but ICC will put the dependencies in
9495 # the current directory while Tru64 will put them in the object
9499 am_cv_$1_dependencies_compiler_type=none
9500 if test "$am_compiler_list" = ""; then
9501 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9505 [case " $depcc " in #(
9506 *\ -arch\ *\ -arch\ *) am__universal=true ;;
9509 [case " $depcc " in #(
9510 *\ -arch\ *\ -arch\ *) am__universal=true ;;
9513 for depmode in $am_compiler_list; do
9514 # Setup a source with many dependencies, because some compilers
9515 # like to wrap large dependency lists on column 80 (with \), and
9516 # we should not choose a depcomp mode which is confused by this.
9518 # We need to recreate these files for each test, as the compiler may
9519 # overwrite some of them when testing with obscure command lines.
9520 # This happens at least with the AIX C compiler.
9522 for i in 1 2 3 4 5 6; do
9523 echo '#include "conftst'$i'.h"' >> sub/conftest.c
9524 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9525 # Solaris 8's {/usr,}/bin/sh.
9526 touch sub/conftst$i.h
9528 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9530 # We check with `-c' and `-o' for the sake of the "dashmstdout"
9531 # mode. It turns out that the SunPro C++ compiler does not properly
9532 # handle `-M -o', and we need to detect this. Also, some Intel
9533 # versions had trouble with output in subdirs
9534 am__obj=sub/conftest.${OBJEXT-o}
9535 am__minus_obj="-o $am__obj"
9538 # This depmode causes a compiler race in universal mode.
9539 test "$am__universal" = false || continue
9542 # after this tag, mechanisms are not by side-effect, so they'll
9543 # only be used when explicitly requested
9544 if test "x$enable_dependency_tracking" = xyes; then
9550 msvisualcpp | msvcmsys)
9551 # This compiler won't grok `-c -o', but also, the minuso test has
9552 # not run yet. These depmodes are late enough in the game, and
9553 # so weak that their functioning should not be impacted.
9554 am__obj=conftest.${OBJEXT-o}
9559 if depmode=$depmode \
9560 source=sub/conftest.c object=$am__obj \
9561 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9562 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
9563 >/dev/null 2>conftest.err &&
9564 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9565 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9566 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
9567 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9568 # icc doesn't choke on unknown options, it will just issue warnings
9569 # or remarks (even with -Werror). So we grep stderr for any message
9570 # that says an option was ignored or not supported.
9571 # When given -MP, icc 7.0 and 7.1 complain thusly:
9572 # icc: Command line warning: ignoring option '-M'; no argument required
9573 # The diagnosis changed in icc 8.0:
9574 # icc: Command line remark: option '-MP' not supported
9575 if (grep 'ignoring option' conftest.err ||
9576 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9577 am_cv_$1_dependencies_compiler_type=$depmode
9586 am_cv_$1_dependencies_compiler_type=none
9589 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9590 AM_CONDITIONAL([am__fastdep$1], [
9591 test "x$enable_dependency_tracking" != xno \
9592 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9598 # Choose a directory name for dependency files.
9599 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
9600 AC_DEFUN([AM_SET_DEPDIR],
9601 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9602 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9608 AC_DEFUN([AM_DEP_TRACK],
9609 [AC_ARG_ENABLE(dependency-tracking,
9610 [ --disable-dependency-tracking speeds up one-time build
9611 --enable-dependency-tracking do not reject slow dependency extractors])
9612 if test "x$enable_dependency_tracking" != xno; then
9613 am_depcomp="$ac_aux_dir/depcomp"
9616 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9617 AC_SUBST([AMDEPBACKSLASH])dnl
9618 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9621 # Generate code to set up dependency tracking. -*- Autoconf -*-
9623 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9624 # Free Software Foundation, Inc.
9626 # This file is free software; the Free Software Foundation
9627 # gives unlimited permission to copy and/or distribute it,
9628 # with or without modifications, as long as this notice is preserved.
9632 # _AM_OUTPUT_DEPENDENCY_COMMANDS
9633 # ------------------------------
9634 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9636 # Autoconf 2.62 quotes --file arguments for eval, but not when files
9637 # are listed without --file. Let's play safe and only enable the eval
9638 # if we detect the quoting.
9639 case $CONFIG_FILES in
9640 *\'*) eval set x "$CONFIG_FILES" ;;
9641 *) set x $CONFIG_FILES ;;
9646 # Strip MF so we end up with the name of the file.
9647 mf=`echo "$mf" | sed -e 's/:.*$//'`
9648 # Check whether this is an Automake generated Makefile or not.
9649 # We used to match only the files named `Makefile.in', but
9650 # some people rename them; so instead we look at the file content.
9651 # Grep'ing the first line is not enough: some people post-process
9652 # each Makefile.in and add a new line on top of each file to say so.
9653 # Grep'ing the whole file is not good either: AIX grep has a line
9654 # limit of 2048, but all sed's we know have understand at least 4000.
9655 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
9656 dirpart=`AS_DIRNAME("$mf")`
9660 # Extract the definition of DEPDIR, am__include, and am__quote
9661 # from the Makefile without running `make'.
9662 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9663 test -z "$DEPDIR" && continue
9664 am__include=`sed -n 's/^am__include = //p' < "$mf"`
9665 test -z "am__include" && continue
9666 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9667 # When using ansi2knr, U may be empty or an underscore; expand it
9668 U=`sed -n 's/^U = //p' < "$mf"`
9669 # Find all dependency output files, they are included files with
9670 # $(DEPDIR) in their names. We invoke sed twice because it is the
9671 # simplest approach to changing $(DEPDIR) to its actual value in the
9673 for file in `sed -n "
9674 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9675 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9676 # Make sure the directory exists.
9677 test -f "$dirpart/$file" && continue
9678 fdir=`AS_DIRNAME(["$file"])`
9679 AS_MKDIR_P([$dirpart/$fdir])
9680 # echo "creating $dirpart/$file"
9681 echo '# dummy' > "$dirpart/$file"
9685 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9688 # AM_OUTPUT_DEPENDENCY_COMMANDS
9689 # -----------------------------
9690 # This macro should only be invoked once -- use via AC_REQUIRE.
9692 # This code is only required when automatic dependency tracking
9693 # is enabled. FIXME. This creates each `.P' file that we will
9694 # need in order to bootstrap the dependency handling code.
9695 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9696 [AC_CONFIG_COMMANDS([depfiles],
9697 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9698 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9701 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9702 # Free Software Foundation, Inc.
9704 # This file is free software; the Free Software Foundation
9705 # gives unlimited permission to copy and/or distribute it,
9706 # with or without modifications, as long as this notice is preserved.
9710 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
9711 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9713 # Do all the work for Automake. -*- Autoconf -*-
9715 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
9716 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
9718 # This file is free software; the Free Software Foundation
9719 # gives unlimited permission to copy and/or distribute it,
9720 # with or without modifications, as long as this notice is preserved.
9724 # This macro actually does too much. Some checks are only needed if
9725 # your package does certain things. But this isn't really a big deal.
9727 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9728 # AM_INIT_AUTOMAKE([OPTIONS])
9729 # -----------------------------------------------
9730 # The call with PACKAGE and VERSION arguments is the old style
9731 # call (pre autoconf-2.50), which is being phased out. PACKAGE
9732 # and VERSION should now be passed to AC_INIT and removed from
9733 # the call to AM_INIT_AUTOMAKE.
9734 # We support both call styles for the transition. After
9735 # the next Automake release, Autoconf can make the AC_INIT
9736 # arguments mandatory, and then we can depend on a new Autoconf
9737 # release and drop the old call support.
9738 AC_DEFUN([AM_INIT_AUTOMAKE],
9739 [AC_PREREQ([2.62])dnl
9740 dnl Autoconf wants to disallow AM_ names. We explicitly allow
9741 dnl the ones we care about.
9742 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9743 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9744 AC_REQUIRE([AC_PROG_INSTALL])dnl
9745 if test "`cd $srcdir && pwd`" != "`pwd`"; then
9746 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
9747 # is not polluted with repeated "-I."
9748 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
9749 # test to see if srcdir already configured
9750 if test -f $srcdir/config.status; then
9751 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9755 # test whether we have cygpath
9756 if test -z "$CYGPATH_W"; then
9757 if (cygpath --version) >/dev/null 2>/dev/null; then
9758 CYGPATH_W='cygpath -w'
9763 AC_SUBST([CYGPATH_W])
9765 # Define the identity of the package.
9766 dnl Distinguish between old-style and new-style calls.
9768 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9769 AC_SUBST([PACKAGE], [$1])dnl
9770 AC_SUBST([VERSION], [$2])],
9771 [_AM_SET_OPTIONS([$1])dnl
9772 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
9773 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
9774 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
9775 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9776 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9778 _AM_IF_OPTION([no-define],,
9779 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9780 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9782 # Some tools Automake needs.
9783 AC_REQUIRE([AM_SANITY_CHECK])dnl
9784 AC_REQUIRE([AC_ARG_PROGRAM])dnl
9785 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9786 AM_MISSING_PROG(AUTOCONF, autoconf)
9787 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9788 AM_MISSING_PROG(AUTOHEADER, autoheader)
9789 AM_MISSING_PROG(MAKEINFO, makeinfo)
9790 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9791 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
9792 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9793 # We need awk for the "check" target. The system "awk" is bad on
9795 AC_REQUIRE([AC_PROG_AWK])dnl
9796 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9797 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9798 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9799 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9800 [_AM_PROG_TAR([v7])])])
9801 _AM_IF_OPTION([no-dependencies],,
9802 [AC_PROVIDE_IFELSE([AC_PROG_CC],
9803 [_AM_DEPENDENCIES(CC)],
9804 [define([AC_PROG_CC],
9805 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9806 AC_PROVIDE_IFELSE([AC_PROG_CXX],
9807 [_AM_DEPENDENCIES(CXX)],
9808 [define([AC_PROG_CXX],
9809 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9810 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
9811 [_AM_DEPENDENCIES(OBJC)],
9812 [define([AC_PROG_OBJC],
9813 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
9815 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
9816 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
9817 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
9818 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
9819 AC_CONFIG_COMMANDS_PRE(dnl
9820 [m4_provide_if([_AM_COMPILER_EXEEXT],
9821 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
9824 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
9825 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
9826 dnl mangled by Autoconf and run in a shell conditional statement.
9827 m4_define([_AC_COMPILER_EXEEXT],
9828 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
9831 # When config.status generates a header, we must update the stamp-h file.
9832 # This file resides in the same directory as the config header
9833 # that is generated. The stamp files are numbered to have different names.
9835 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9836 # loop where config.status creates the headers, so we can generate
9837 # our stamp files there.
9838 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9839 [# Compute $1's index in $config_headers.
9842 for _am_header in $config_headers :; do
9844 $_am_arg | $_am_arg:* )
9847 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9850 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
9852 # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
9854 # This file is free software; the Free Software Foundation
9855 # gives unlimited permission to copy and/or distribute it,
9856 # with or without modifications, as long as this notice is preserved.
9858 # AM_PROG_INSTALL_SH
9859 # ------------------
9860 # Define $install_sh.
9861 AC_DEFUN([AM_PROG_INSTALL_SH],
9862 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9863 if test x"${install_sh}" != xset; then
9866 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
9868 install_sh="\${SHELL} $am_aux_dir/install-sh"
9871 AC_SUBST(install_sh)])
9873 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
9875 # This file is free software; the Free Software Foundation
9876 # gives unlimited permission to copy and/or distribute it,
9877 # with or without modifications, as long as this notice is preserved.
9881 # Check whether the underlying file-system supports filenames
9882 # with a leading dot. For instance MS-DOS doesn't.
9883 AC_DEFUN([AM_SET_LEADING_DOT],
9884 [rm -rf .tst 2>/dev/null
9885 mkdir .tst 2>/dev/null
9886 if test -d .tst; then
9891 rmdir .tst 2>/dev/null
9892 AC_SUBST([am__leading_dot])])
9894 # Check to see how 'make' treats includes. -*- Autoconf -*-
9896 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
9898 # This file is free software; the Free Software Foundation
9899 # gives unlimited permission to copy and/or distribute it,
9900 # with or without modifications, as long as this notice is preserved.
9906 # Check to see how make treats includes.
9907 AC_DEFUN([AM_MAKE_INCLUDE],
9908 [am_make=${MAKE-make}
9909 cat > confinc << 'END'
9911 @echo this is the am__doit target
9914 # If we don't find an include directive, just comment out the code.
9915 AC_MSG_CHECKING([for style of include used by $am_make])
9919 # First try GNU make style include.
9920 echo "include confinc" > confmf
9921 # Ignore all kinds of additional output from `make'.
9922 case `$am_make -s -f confmf 2> /dev/null` in #(
9923 *the\ am__doit\ target*)
9929 # Now try BSD make style include.
9930 if test "$am__include" = "#"; then
9931 echo '.include "confinc"' > confmf
9932 case `$am_make -s -f confmf 2> /dev/null` in #(
9933 *the\ am__doit\ target*)
9934 am__include=.include
9940 AC_SUBST([am__include])
9941 AC_SUBST([am__quote])
9942 AC_MSG_RESULT([$_am_result])
9943 rm -f confinc confmf
9946 # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
9947 # Free Software Foundation, Inc.
9949 # This file is free software; the Free Software Foundation
9950 # gives unlimited permission to copy and/or distribute it,
9951 # with or without modifications, as long as this notice is preserved.
9957 # Like AC_PROG_CC_C_O, but changed for automake.
9958 AC_DEFUN([AM_PROG_CC_C_O],
9959 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
9960 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9961 AC_REQUIRE_AUX_FILE([compile])dnl
9962 # FIXME: we rely on the cache variable name because
9963 # there is no other way.
9965 am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
9966 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
9967 if test "$am_t" != yes; then
9968 # Losing compiler, so override with the script.
9969 # FIXME: It is wrong to rewrite CC.
9970 # But if we don't then we get into trouble of one sort or another.
9971 # A longer-term fix would be to have automake use am__CC in this case,
9972 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
9973 CC="$am_aux_dir/compile $CC"
9975 dnl Make sure AC_PROG_CC is never called again, or it will override our
9977 m4_define([AC_PROG_CC],
9978 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
9981 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
9983 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
9984 # Free Software Foundation, Inc.
9986 # This file is free software; the Free Software Foundation
9987 # gives unlimited permission to copy and/or distribute it,
9988 # with or without modifications, as long as this notice is preserved.
9992 # AM_MISSING_PROG(NAME, PROGRAM)
9993 # ------------------------------
9994 AC_DEFUN([AM_MISSING_PROG],
9995 [AC_REQUIRE([AM_MISSING_HAS_RUN])
9996 $1=${$1-"${am_missing_run}$2"}
10000 # AM_MISSING_HAS_RUN
10001 # ------------------
10002 # Define MISSING if not defined so far and test if it supports --run.
10003 # If it does, set am_missing_run to use it, otherwise, to nothing.
10004 AC_DEFUN([AM_MISSING_HAS_RUN],
10005 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10006 AC_REQUIRE_AUX_FILE([missing])dnl
10007 if test x"${MISSING+set}" != xset; then
10008 case $am_aux_dir in
10010 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
10012 MISSING="\${SHELL} $am_aux_dir/missing" ;;
10015 # Use eval to expand $SHELL
10016 if eval "$MISSING --run true"; then
10017 am_missing_run="$MISSING --run "
10020 AC_MSG_WARN([`missing' script is too old or missing])
10024 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
10026 # This file is free software; the Free Software Foundation
10027 # gives unlimited permission to copy and/or distribute it,
10028 # with or without modifications, as long as this notice is preserved.
10032 # Check for `mkdir -p'.
10033 AC_DEFUN([AM_PROG_MKDIR_P],
10034 [AC_PREREQ([2.60])dnl
10035 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10036 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
10037 dnl while keeping a definition of mkdir_p for backward compatibility.
10038 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
10039 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
10040 dnl Makefile.ins that do not define MKDIR_P, so we do our own
10041 dnl adjustment using top_builddir (which is defined more often than
10043 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
10045 [[\\/$]]* | ?:[[\\/]]*) ;;
10046 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
10050 # Helper functions for option handling. -*- Autoconf -*-
10052 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
10054 # This file is free software; the Free Software Foundation
10055 # gives unlimited permission to copy and/or distribute it,
10056 # with or without modifications, as long as this notice is preserved.
10060 # _AM_MANGLE_OPTION(NAME)
10061 # -----------------------
10062 AC_DEFUN([_AM_MANGLE_OPTION],
10063 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10065 # _AM_SET_OPTION(NAME)
10066 # ------------------------------
10067 # Set option NAME. Presently that only means defining a flag for this option.
10068 AC_DEFUN([_AM_SET_OPTION],
10069 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10071 # _AM_SET_OPTIONS(OPTIONS)
10072 # ----------------------------------
10073 # OPTIONS is a space-separated list of Automake options.
10074 AC_DEFUN([_AM_SET_OPTIONS],
10075 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10077 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10078 # -------------------------------------------
10079 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10080 AC_DEFUN([_AM_IF_OPTION],
10081 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10083 # Check to make sure that the build environment is sane. -*- Autoconf -*-
10085 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
10086 # Free Software Foundation, Inc.
10088 # This file is free software; the Free Software Foundation
10089 # gives unlimited permission to copy and/or distribute it,
10090 # with or without modifications, as long as this notice is preserved.
10096 AC_DEFUN([AM_SANITY_CHECK],
10097 [AC_MSG_CHECKING([whether build environment is sane])
10100 echo timestamp > conftest.file
10101 # Reject unsafe characters in $srcdir or the absolute working directory
10102 # name. Accept space and tab only in the latter.
10106 *[[\\\"\#\$\&\'\`$am_lf]]*)
10107 AC_MSG_ERROR([unsafe absolute working directory name]);;
10110 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
10111 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
10114 # Do `set' in a subshell so we don't clobber the current shell's
10115 # arguments. Must try -L first in case configure is actually a
10116 # symlink; some systems play weird games with the mod time of symlinks
10117 # (eg FreeBSD returns the mod time of the symlink's containing
10120 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
10121 if test "$[*]" = "X"; then
10123 set X `ls -t "$srcdir/configure" conftest.file`
10125 rm -f conftest.file
10126 if test "$[*]" != "X $srcdir/configure conftest.file" \
10127 && test "$[*]" != "X conftest.file $srcdir/configure"; then
10129 # If neither matched, then we have a broken ls. This can happen
10130 # if, for instance, CONFIG_SHELL is bash and it inherits a
10131 # broken ls alias from the environment. This has actually
10132 # happened. Such a system could not be considered "sane".
10133 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
10134 alias in your environment])
10137 test "$[2]" = conftest.file
10143 AC_MSG_ERROR([newly created file is older than distributed files!
10144 Check your system clock])
10146 AC_MSG_RESULT(yes)])
10148 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
10150 # This file is free software; the Free Software Foundation
10151 # gives unlimited permission to copy and/or distribute it,
10152 # with or without modifications, as long as this notice is preserved.
10154 # AM_PROG_INSTALL_STRIP
10155 # ---------------------
10156 # One issue with vendor `install' (even GNU) is that you can't
10157 # specify the program used to strip binaries. This is especially
10158 # annoying in cross-compiling environments, where the build's strip
10159 # is unlikely to handle the host's binaries.
10160 # Fortunately install-sh will honor a STRIPPROG variable, so we
10161 # always use install-sh in `make install-strip', and initialize
10162 # STRIPPROG with the value of the STRIP variable (set by the user).
10163 AC_DEFUN([AM_PROG_INSTALL_STRIP],
10164 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10165 # Installed binaries are usually stripped using `strip' when the user
10166 # run `make install-strip'. However `strip' might not be the right
10167 # tool to use in cross-compilation environments, therefore Automake
10168 # will honor the `STRIP' environment variable to overrule this program.
10169 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10170 if test "$cross_compiling" != no; then
10171 AC_CHECK_TOOL([STRIP], [strip], :)
10173 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10174 AC_SUBST([INSTALL_STRIP_PROGRAM])])
10176 # Copyright (C) 2006, 2008 Free Software Foundation, Inc.
10178 # This file is free software; the Free Software Foundation
10179 # gives unlimited permission to copy and/or distribute it,
10180 # with or without modifications, as long as this notice is preserved.
10184 # _AM_SUBST_NOTMAKE(VARIABLE)
10185 # ---------------------------
10186 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10187 # This macro is traced by Automake.
10188 AC_DEFUN([_AM_SUBST_NOTMAKE])
10190 # AM_SUBST_NOTMAKE(VARIABLE)
10191 # ---------------------------
10192 # Public sister of _AM_SUBST_NOTMAKE.
10193 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
10195 # Check how to create a tarball. -*- Autoconf -*-
10197 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
10199 # This file is free software; the Free Software Foundation
10200 # gives unlimited permission to copy and/or distribute it,
10201 # with or without modifications, as long as this notice is preserved.
10205 # _AM_PROG_TAR(FORMAT)
10206 # --------------------
10207 # Check how to create a tarball in format FORMAT.
10208 # FORMAT should be one of `v7', `ustar', or `pax'.
10210 # Substitute a variable $(am__tar) that is a command
10211 # writing to stdout a FORMAT-tarball containing the directory
10213 # tardir=directory && $(am__tar) > result.tar
10215 # Substitute a variable $(am__untar) that extract such
10216 # a tarball read from stdin.
10217 # $(am__untar) < result.tar
10218 AC_DEFUN([_AM_PROG_TAR],
10219 [# Always define AMTAR for backward compatibility.
10220 AM_MISSING_PROG([AMTAR], [tar])
10222 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
10223 [m4_case([$1], [ustar],, [pax],,
10224 [m4_fatal([Unknown tar format])])
10225 AC_MSG_CHECKING([how to create a $1 tar archive])
10226 # Loop over all known methods to create a tar archive until one works.
10227 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10228 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
10229 # Do not fold the above two line into one, because Tru64 sh and
10230 # Solaris sh will not grok spaces in the rhs of `-'.
10231 for _am_tool in $_am_tools
10235 for _am_tar in tar gnutar gtar;
10237 AM_RUN_LOG([$_am_tar --version]) && break
10239 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10240 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10241 am__untar="$_am_tar -xf -"
10244 # Must skip GNU tar: if it does not support --format= it doesn't create
10245 # ustar tarball either.
10246 (tar --version) >/dev/null 2>&1 && continue
10247 am__tar='tar chf - "$$tardir"'
10248 am__tar_='tar chf - "$tardir"'
10249 am__untar='tar xf -'
10252 am__tar='pax -L -x $1 -w "$$tardir"'
10253 am__tar_='pax -L -x $1 -w "$tardir"'
10257 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10258 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10259 am__untar='cpio -i -H $1 -d'
10268 # If the value was cached, stop now. We just wanted to have am__tar
10269 # and am__untar set.
10270 test -n "${am_cv_prog_tar_$1}" && break
10272 # tar/untar a dummy directory, and stop if the command works
10273 rm -rf conftest.dir
10275 echo GrepMe > conftest.dir/file
10276 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10277 rm -rf conftest.dir
10278 if test -s conftest.tar; then
10279 AM_RUN_LOG([$am__untar <conftest.tar])
10280 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10283 rm -rf conftest.dir
10285 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10286 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10287 AC_SUBST([am__tar])
10288 AC_SUBST([am__untar])
10291 m4_include([m4/pkg.m4])