1 # generated automatically by aclocal 1.10.2 -*- Autoconf -*-
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008 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.63],,
17 [m4_warning([this file was generated for autoconf 2.63.
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 # gettext.m4 serial 60 (gettext-0.17)
23 dnl Copyright (C) 1995-2007 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 This file can can be used in projects which are not available under
29 dnl the GNU General Public License or the GNU Library General Public
30 dnl License but which still want to provide support for the GNU gettext
32 dnl Please note that the actual code of the GNU gettext library is covered
33 dnl by the GNU Library General Public License, and the rest of the GNU
34 dnl gettext package package is covered by the GNU General Public License.
35 dnl They are *not* in the public domain.
38 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
39 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
41 dnl Macro to add for using GNU gettext.
43 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
44 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
45 dnl default (if it is not specified or empty) is 'no-libtool'.
46 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
47 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
48 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
49 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
50 dnl depending on --{enable,disable}-{shared,static} and on the presence of
51 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
52 dnl $(top_builddir)/intl/libintl.a will be created.
53 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
54 dnl implementations (in libc or libintl) without the ngettext() function
55 dnl will be ignored. If NEEDSYMBOL is specified and is
56 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
57 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
58 dnl INTLDIR is used to find the intl libraries. If empty,
59 dnl the value `$(top_builddir)/intl/' is used.
61 dnl The result of the configuration is one of three cases:
62 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
64 dnl Catalog format: GNU --> install in $(datadir)
65 dnl Catalog extension: .mo after installation, .gmo in source tree
66 dnl 2) GNU gettext has been found in the system's C library.
67 dnl Catalog format: GNU --> install in $(datadir)
68 dnl Catalog extension: .mo after installation, .gmo in source tree
69 dnl 3) No internationalization, always use English msgid.
70 dnl Catalog format: none
71 dnl Catalog extension: none
72 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
73 dnl The use of .gmo is historical (it was needed to avoid overwriting the
74 dnl GNU format catalogs when building on a platform with an X/Open gettext),
75 dnl but we keep it in order not to force irrelevant filename changes on the
78 AC_DEFUN([AM_GNU_GETTEXT],
80 dnl Argument checking.
81 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
82 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
84 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
85 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
87 define([gt_included_intl],
88 ifelse([$1], [external],
89 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
91 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
93 AM_GNU_GETTEXT_NEED([$2])
95 AC_REQUIRE([AM_PO_SUBDIRS])dnl
96 ifelse(gt_included_intl, yes, [
97 AC_REQUIRE([AM_INTL_SUBDIR])dnl
100 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
101 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
102 AC_REQUIRE([AC_LIB_RPATH])
104 dnl Sometimes libintl requires libiconv, so first search for libiconv.
105 dnl Ideally we would do this search only after the
106 dnl if test "$USE_NLS" = "yes"; then
107 dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
108 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
109 dnl the configure script would need to contain the same shell code
110 dnl again, outside any 'if'. There are two solutions:
111 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
112 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
113 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
114 dnl documented, we avoid it.
115 ifelse(gt_included_intl, yes, , [
116 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
119 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
125 ifelse(gt_included_intl, yes, [
126 BUILD_INCLUDED_LIBINTL=no
127 USE_INCLUDED_LIBINTL=no
133 dnl Add a version number to the cache macros.
134 case " $gt_needs " in
135 *" need-formatstring-macros "*) gt_api_version=3 ;;
136 *" need-ngettext "*) gt_api_version=2 ;;
137 *) gt_api_version=1 ;;
139 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
140 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
142 dnl If we use NLS figure out what method
143 if test "$USE_NLS" = "yes"; then
144 gt_use_preinstalled_gnugettext=no
145 ifelse(gt_included_intl, yes, [
146 AC_MSG_CHECKING([whether included gettext is requested])
147 AC_ARG_WITH(included-gettext,
148 [ --with-included-gettext use the GNU gettext library included here],
149 nls_cv_force_use_gnu_gettext=$withval,
150 nls_cv_force_use_gnu_gettext=no)
151 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
153 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
154 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
156 dnl User does not insist on using GNU NLS library. Figure out what
157 dnl to use. If GNU gettext is available we use this. Else we have
158 dnl to fall back to GNU NLS library.
160 if test $gt_api_version -ge 3; then
161 gt_revision_test_code='
162 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
163 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
166 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
170 gt_revision_test_code=
172 if test $gt_api_version -ge 2; then
173 gt_expression_test_code=' + * ngettext ("", "", 0)'
175 gt_expression_test_code=
178 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
179 [AC_TRY_LINK([#include <libintl.h>
180 $gt_revision_test_code
181 extern int _nl_msg_cat_cntr;
182 extern int *_nl_domain_bindings;],
183 [bindtextdomain ("", "");
184 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
185 [eval "$gt_func_gnugettext_libc=yes"],
186 [eval "$gt_func_gnugettext_libc=no"])])
188 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
189 dnl Sometimes libintl requires libiconv, so first search for libiconv.
190 ifelse(gt_included_intl, yes, , [
193 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
194 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
195 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
196 dnl even if libiconv doesn't exist.
197 AC_LIB_LINKFLAGS_BODY([intl])
198 AC_CACHE_CHECK([for GNU gettext in libintl],
199 [$gt_func_gnugettext_libintl],
200 [gt_save_CPPFLAGS="$CPPFLAGS"
201 CPPFLAGS="$CPPFLAGS $INCINTL"
203 LIBS="$LIBS $LIBINTL"
204 dnl Now see whether libintl exists and does not depend on libiconv.
205 AC_TRY_LINK([#include <libintl.h>
206 $gt_revision_test_code
207 extern int _nl_msg_cat_cntr;
212 const char *_nl_expand_alias (const char *);],
213 [bindtextdomain ("", "");
214 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
215 [eval "$gt_func_gnugettext_libintl=yes"],
216 [eval "$gt_func_gnugettext_libintl=no"])
217 dnl Now see whether libintl exists and depends on libiconv.
218 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
219 LIBS="$LIBS $LIBICONV"
220 AC_TRY_LINK([#include <libintl.h>
221 $gt_revision_test_code
222 extern int _nl_msg_cat_cntr;
227 const char *_nl_expand_alias (const char *);],
228 [bindtextdomain ("", "");
229 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
230 [LIBINTL="$LIBINTL $LIBICONV"
231 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
232 eval "$gt_func_gnugettext_libintl=yes"
235 CPPFLAGS="$gt_save_CPPFLAGS"
236 LIBS="$gt_save_LIBS"])
239 dnl If an already present or preinstalled GNU gettext() is found,
240 dnl use it. But if this macro is used in GNU gettext, and GNU
241 dnl gettext is already preinstalled in libintl, we update this
242 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
243 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
244 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
245 && test "$PACKAGE" != gettext-runtime \
246 && test "$PACKAGE" != gettext-tools; }; then
247 gt_use_preinstalled_gnugettext=yes
249 dnl Reset the values set by searching for libintl.
255 ifelse(gt_included_intl, yes, [
256 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
257 dnl GNU gettext is not found in the C library.
258 dnl Fall back on included GNU gettext library.
259 nls_cv_use_gnu_gettext=yes
263 if test "$nls_cv_use_gnu_gettext" = "yes"; then
264 dnl Mark actions used to generate GNU NLS library.
265 BUILD_INCLUDED_LIBINTL=yes
266 USE_INCLUDED_LIBINTL=yes
267 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
268 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
269 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
273 if test "$gt_use_preinstalled_gnugettext" = "yes" \
274 || test "$nls_cv_use_gnu_gettext" = "yes"; then
275 dnl Mark actions to use GNU gettext tools.
280 if test -n "$INTL_MACOSX_LIBS"; then
281 if test "$gt_use_preinstalled_gnugettext" = "yes" \
282 || test "$nls_cv_use_gnu_gettext" = "yes"; then
283 dnl Some extra flags are needed during linking.
284 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
285 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
289 if test "$gt_use_preinstalled_gnugettext" = "yes" \
290 || test "$nls_cv_use_gnu_gettext" = "yes"; then
291 AC_DEFINE(ENABLE_NLS, 1,
292 [Define to 1 if translation of program messages to the user's native language
299 AC_MSG_CHECKING([whether to use NLS])
300 AC_MSG_RESULT([$USE_NLS])
301 if test "$USE_NLS" = "yes"; then
302 AC_MSG_CHECKING([where the gettext function comes from])
303 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
304 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
305 gt_source="external libintl"
310 gt_source="included intl directory"
312 AC_MSG_RESULT([$gt_source])
315 if test "$USE_NLS" = "yes"; then
317 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
318 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
319 AC_MSG_CHECKING([how to link with libintl])
320 AC_MSG_RESULT([$LIBINTL])
321 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
324 dnl For backward compatibility. Some packages may be using this.
325 AC_DEFINE(HAVE_GETTEXT, 1,
326 [Define if the GNU gettext() function is already present or preinstalled.])
327 AC_DEFINE(HAVE_DCGETTEXT, 1,
328 [Define if the GNU dcgettext() function is already present or preinstalled.])
331 dnl We need to process the po/ directory.
335 ifelse(gt_included_intl, yes, [
336 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
337 dnl to 'yes' because some of the testsuite requires it.
338 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
339 BUILD_INCLUDED_LIBINTL=yes
342 dnl Make all variables we use known to autoconf.
343 AC_SUBST(BUILD_INCLUDED_LIBINTL)
344 AC_SUBST(USE_INCLUDED_LIBINTL)
347 dnl For backward compatibility. Some configure.ins may be using this.
351 dnl For backward compatibility. Some Makefiles may be using this.
353 AC_SUBST(DATADIRNAME)
355 dnl For backward compatibility. Some Makefiles may be using this.
359 dnl For backward compatibility. Some Makefiles may be using this.
363 dnl For backward compatibility. Some Makefiles may be using this.
365 if test "$USE_INCLUDED_LIBINTL" = yes; then
366 INTLOBJS="\$(GETTOBJS)"
370 dnl Enable libtool support if the surrounding package wishes it.
371 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
372 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
375 dnl For backward compatibility. Some Makefiles may be using this.
379 dnl Make all documented variables known to autoconf.
386 dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
387 m4_define([gt_NEEDS_INIT],
389 m4_divert_text([DEFAULTS], [gt_needs=])
390 m4_define([gt_NEEDS_INIT], [])
394 dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
395 AC_DEFUN([AM_GNU_GETTEXT_NEED],
397 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
401 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
402 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
404 # iconv.m4 serial AM6 (gettext-0.17)
405 dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
406 dnl This file is free software; the Free Software Foundation
407 dnl gives unlimited permission to copy and/or distribute it,
408 dnl with or without modifications, as long as this notice is preserved.
410 dnl From Bruno Haible.
412 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
414 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
415 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
416 AC_REQUIRE([AC_LIB_RPATH])
418 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
420 AC_LIB_LINKFLAGS_BODY([iconv])
423 AC_DEFUN([AM_ICONV_LINK],
425 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
426 dnl those with the standalone portable GNU libiconv installed).
427 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
429 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
431 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
433 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
434 dnl because if the user has installed libiconv and not disabled its use
435 dnl via --without-libiconv-prefix, he wants to use it. The first
436 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
437 am_save_CPPFLAGS="$CPPFLAGS"
438 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
440 AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
441 am_cv_func_iconv="no, consider installing GNU libiconv"
443 AC_TRY_LINK([#include <stdlib.h>
445 [iconv_t cd = iconv_open("","");
446 iconv(cd,NULL,NULL,NULL,NULL);
448 am_cv_func_iconv=yes)
449 if test "$am_cv_func_iconv" != yes; then
451 LIBS="$LIBS $LIBICONV"
452 AC_TRY_LINK([#include <stdlib.h>
454 [iconv_t cd = iconv_open("","");
455 iconv(cd,NULL,NULL,NULL,NULL);
458 am_cv_func_iconv=yes)
462 if test "$am_cv_func_iconv" = yes; then
463 AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
464 dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
466 if test $am_cv_lib_iconv = yes; then
467 LIBS="$LIBS $LIBICONV"
474 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
477 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
478 if (cd_utf8_to_88591 != (iconv_t)(-1))
480 static const char input[] = "\342\202\254"; /* EURO SIGN */
482 const char *inptr = input;
483 size_t inbytesleft = strlen (input);
485 size_t outbytesleft = sizeof (buf);
486 size_t res = iconv (cd_utf8_to_88591,
487 (char **) &inptr, &inbytesleft,
488 &outptr, &outbytesleft);
493 #if 0 /* This bug could be worked around by the caller. */
494 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
496 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
497 if (cd_88591_to_utf8 != (iconv_t)(-1))
499 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
501 const char *inptr = input;
502 size_t inbytesleft = strlen (input);
504 size_t outbytesleft = sizeof (buf);
505 size_t res = iconv (cd_88591_to_utf8,
506 (char **) &inptr, &inbytesleft,
507 &outptr, &outbytesleft);
513 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
515 if (/* Try standardized names. */
516 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
517 /* Try IRIX, OSF/1 names. */
518 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
520 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
521 /* Try HP-UX names. */
522 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
525 }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
527 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
528 *) am_cv_func_iconv_works="guessing yes" ;;
532 case "$am_cv_func_iconv_works" in
533 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
534 *) am_func_iconv=yes ;;
537 am_func_iconv=no am_cv_lib_iconv=no
539 if test "$am_func_iconv" = yes; then
540 AC_DEFINE(HAVE_ICONV, 1,
541 [Define if you have the iconv() function and it works.])
543 if test "$am_cv_lib_iconv" = yes; then
544 AC_MSG_CHECKING([how to link with libiconv])
545 AC_MSG_RESULT([$LIBICONV])
547 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
549 CPPFLAGS="$am_save_CPPFLAGS"
560 if test "$am_cv_func_iconv" = yes; then
561 AC_MSG_CHECKING([for iconv declaration])
562 AC_CACHE_VAL(am_cv_proto_iconv, [
570 #if defined(__STDC__) || defined(__cplusplus)
571 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
575 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
576 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);"])
577 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
578 AC_MSG_RESULT([$]{ac_t:-
579 }[$]am_cv_proto_iconv)
580 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
581 [Define as const if the declaration of iconv() needs const.])
585 # intlmacosx.m4 serial 1 (gettext-0.17)
586 dnl Copyright (C) 2004-2007 Free Software Foundation, Inc.
587 dnl This file is free software; the Free Software Foundation
588 dnl gives unlimited permission to copy and/or distribute it,
589 dnl with or without modifications, as long as this notice is preserved.
591 dnl This file can can be used in projects which are not available under
592 dnl the GNU General Public License or the GNU Library General Public
593 dnl License but which still want to provide support for the GNU gettext
595 dnl Please note that the actual code of the GNU gettext library is covered
596 dnl by the GNU Library General Public License, and the rest of the GNU
597 dnl gettext package package is covered by the GNU General Public License.
598 dnl They are *not* in the public domain.
600 dnl Checks for special options needed on MacOS X.
601 dnl Defines INTL_MACOSX_LIBS.
602 AC_DEFUN([gt_INTL_MACOSX],
604 dnl Check for API introduced in MacOS X 10.2.
605 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
606 gt_cv_func_CFPreferencesCopyAppValue,
607 [gt_save_LIBS="$LIBS"
608 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
609 AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
610 [CFPreferencesCopyAppValue(NULL, NULL)],
611 [gt_cv_func_CFPreferencesCopyAppValue=yes],
612 [gt_cv_func_CFPreferencesCopyAppValue=no])
613 LIBS="$gt_save_LIBS"])
614 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
615 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
616 [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
618 dnl Check for API introduced in MacOS X 10.3.
619 AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
620 [gt_save_LIBS="$LIBS"
621 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
622 AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
623 [gt_cv_func_CFLocaleCopyCurrent=yes],
624 [gt_cv_func_CFLocaleCopyCurrent=no])
625 LIBS="$gt_save_LIBS"])
626 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
627 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
628 [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
631 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
632 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
634 AC_SUBST([INTL_MACOSX_LIBS])
637 # lib-ld.m4 serial 3 (gettext-0.13)
638 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
639 dnl This file is free software; the Free Software Foundation
640 dnl gives unlimited permission to copy and/or distribute it,
641 dnl with or without modifications, as long as this notice is preserved.
643 dnl Subroutines of libtool.m4,
644 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
647 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
648 AC_DEFUN([AC_LIB_PROG_LD_GNU],
649 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
650 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
651 case `$LD -v 2>&1 </dev/null` in
652 *GNU* | *'with BFD'*)
653 acl_cv_prog_gnu_ld=yes ;;
655 acl_cv_prog_gnu_ld=no ;;
657 with_gnu_ld=$acl_cv_prog_gnu_ld
660 dnl From libtool-1.4. Sets the variable LD.
661 AC_DEFUN([AC_LIB_PROG_LD],
663 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
664 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
665 AC_REQUIRE([AC_PROG_CC])dnl
666 AC_REQUIRE([AC_CANONICAL_HOST])dnl
667 # Prepare PATH_SEPARATOR.
668 # The user is always right.
669 if test "${PATH_SEPARATOR+set}" != set; then
670 echo "#! /bin/sh" >conf$$.sh
671 echo "exit 0" >>conf$$.sh
673 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
681 if test "$GCC" = yes; then
682 # Check if gcc -print-prog-name=ld gives a path.
683 AC_MSG_CHECKING([for ld used by GCC])
686 # gcc leaves a trailing carriage return which upsets mingw
687 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
689 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
692 # Accept absolute paths.
693 [[\\/]* | [A-Za-z]:[\\/]*)]
694 [re_direlt='/[^/][^/]*/\.\./']
695 # Canonicalize the path of ld
696 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
697 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
698 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
700 test -z "$LD" && LD="$ac_prog"
703 # If it fails, then pretend we aren't using GCC.
707 # If it is relative, then search for the first ld in PATH.
711 elif test "$with_gnu_ld" = yes; then
712 AC_MSG_CHECKING([for GNU ld])
714 AC_MSG_CHECKING([for non-GNU ld])
716 AC_CACHE_VAL(acl_cv_path_LD,
717 [if test -z "$LD"; then
718 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
719 for ac_dir in $PATH; do
720 test -z "$ac_dir" && ac_dir=.
721 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
722 acl_cv_path_LD="$ac_dir/$ac_prog"
723 # Check to see if the program is GNU ld. I'd rather use --version,
724 # but apparently some GNU ld's only accept -v.
725 # Break only if it was the GNU/non-GNU ld that we prefer.
726 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
727 *GNU* | *'with BFD'*)
728 test "$with_gnu_ld" != no && break ;;
730 test "$with_gnu_ld" != yes && break ;;
736 acl_cv_path_LD="$LD" # Let the user override the test with a path.
739 if test -n "$LD"; then
744 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
748 # lib-link.m4 serial 13 (gettext-0.17)
749 dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
750 dnl This file is free software; the Free Software Foundation
751 dnl gives unlimited permission to copy and/or distribute it,
752 dnl with or without modifications, as long as this notice is preserved.
754 dnl From Bruno Haible.
758 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
759 dnl the libraries corresponding to explicit and implicit dependencies.
760 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
761 dnl augments the CPPFLAGS variable.
762 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
763 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
764 AC_DEFUN([AC_LIB_LINKFLAGS],
766 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
767 AC_REQUIRE([AC_LIB_RPATH])
768 define([Name],[translit([$1],[./-], [___])])
769 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
770 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
771 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
772 AC_LIB_LINKFLAGS_BODY([$1], [$2])
773 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
774 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
775 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
776 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
778 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
779 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
780 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
781 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
782 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
784 AC_SUBST([LTLIB]NAME)
785 AC_SUBST([LIB]NAME[_PREFIX])
786 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
787 dnl results of this search when this library appears as a dependency.
793 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
794 dnl searches for libname and the libraries corresponding to explicit and
795 dnl implicit dependencies, together with the specified include files and
796 dnl the ability to compile and link the specified testcode. If found, it
797 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
798 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
799 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
800 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
801 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
802 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
803 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
805 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
806 AC_REQUIRE([AC_LIB_RPATH])
807 define([Name],[translit([$1],[./-], [___])])
808 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
809 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
811 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
813 AC_LIB_LINKFLAGS_BODY([$1], [$2])
815 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
816 dnl because if the user has installed lib[]Name and not disabled its use
817 dnl via --without-lib[]Name-prefix, he wants to use it.
818 ac_save_CPPFLAGS="$CPPFLAGS"
819 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
821 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
823 LIBS="$LIBS $LIB[]NAME"
824 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
827 if test "$ac_cv_lib[]Name" = yes; then
829 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
830 AC_MSG_CHECKING([how to link with lib[]$1])
831 AC_MSG_RESULT([$LIB[]NAME])
834 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
835 dnl $INC[]NAME either.
836 CPPFLAGS="$ac_save_CPPFLAGS"
841 AC_SUBST([HAVE_LIB]NAME)
843 AC_SUBST([LTLIB]NAME)
844 AC_SUBST([LIB]NAME[_PREFIX])
849 dnl Determine the platform dependent parameters needed to use rpath:
852 dnl acl_hardcode_libdir_flag_spec,
853 dnl acl_hardcode_libdir_separator,
854 dnl acl_hardcode_direct,
855 dnl acl_hardcode_minus_L.
856 AC_DEFUN([AC_LIB_RPATH],
858 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
859 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
860 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
861 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
862 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
863 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
864 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
865 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
866 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
872 acl_libext="$acl_cv_libext"
873 acl_shlibext="$acl_cv_shlibext"
874 acl_libname_spec="$acl_cv_libname_spec"
875 acl_library_names_spec="$acl_cv_library_names_spec"
876 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
877 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
878 acl_hardcode_direct="$acl_cv_hardcode_direct"
879 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
880 dnl Determine whether the user wants rpath handling at all.
882 [ --disable-rpath do not hardcode runtime library paths],
886 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
887 dnl the libraries corresponding to explicit and implicit dependencies.
888 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
889 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
890 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
891 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
893 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
894 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
895 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
896 dnl Autoconf >= 2.61 supports dots in --with options.
897 define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
898 dnl By default, look in $includedir and $libdir.
900 AC_LIB_WITH_FINAL_PREFIX([
901 eval additional_includedir=\"$includedir\"
902 eval additional_libdir=\"$libdir\"
904 AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
905 [ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
906 --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
908 if test "X$withval" = "Xno"; then
911 if test "X$withval" = "X"; then
912 AC_LIB_WITH_FINAL_PREFIX([
913 eval additional_includedir=\"$includedir\"
914 eval additional_libdir=\"$libdir\"
917 additional_includedir="$withval/include"
918 additional_libdir="$withval/$acl_libdirstem"
922 dnl Search the library and its dependencies in $additional_libdir and
923 dnl $LDFLAGS. Using breadth-first-seach.
930 names_already_handled=
931 names_next_round='$1 $2'
932 while test -n "$names_next_round"; do
933 names_this_round="$names_next_round"
935 for name in $names_this_round; do
937 for n in $names_already_handled; do
938 if test "$n" = "$name"; then
943 if test -z "$already_handled"; then
944 names_already_handled="$names_already_handled $name"
945 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
946 dnl or AC_LIB_HAVE_LINKFLAGS call.
947 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
948 eval value=\"\$HAVE_LIB$uppername\"
949 if test -n "$value"; then
950 if test "$value" = yes; then
951 eval value=\"\$LIB$uppername\"
952 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
953 eval value=\"\$LTLIB$uppername\"
954 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
956 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
957 dnl that this library doesn't exist. So just drop it.
961 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
962 dnl and the already constructed $LIBNAME/$LTLIBNAME.
967 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
968 if test -n "$acl_shlibext"; then
969 shrext=".$acl_shlibext" # typically: shrext=.so
973 if test $use_additional = yes; then
974 dir="$additional_libdir"
975 dnl The same code as in the loop below:
976 dnl First look for a shared library.
977 if test -n "$acl_shlibext"; then
978 if test -f "$dir/$libname$shrext"; then
980 found_so="$dir/$libname$shrext"
982 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
984 for f in "$libname$shrext".*; do echo "$f"; done \
985 | sed -e "s,^$libname$shrext\\\\.,," \
986 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
987 | sed 1q ) 2>/dev/null`
988 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
990 found_so="$dir/$libname$shrext.$ver"
993 eval library_names=\"$acl_library_names_spec\"
994 for f in $library_names; do
995 if test -f "$dir/$f"; then
1004 dnl Then look for a static library.
1005 if test "X$found_dir" = "X"; then
1006 if test -f "$dir/$libname.$acl_libext"; then
1008 found_a="$dir/$libname.$acl_libext"
1011 if test "X$found_dir" != "X"; then
1012 if test -f "$dir/$libname.la"; then
1013 found_la="$dir/$libname.la"
1017 if test "X$found_dir" = "X"; then
1018 for x in $LDFLAGS $LTLIB[]NAME; do
1019 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1022 dir=`echo "X$x" | sed -e 's/^X-L//'`
1023 dnl First look for a shared library.
1024 if test -n "$acl_shlibext"; then
1025 if test -f "$dir/$libname$shrext"; then
1027 found_so="$dir/$libname$shrext"
1029 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1030 ver=`(cd "$dir" && \
1031 for f in "$libname$shrext".*; do echo "$f"; done \
1032 | sed -e "s,^$libname$shrext\\\\.,," \
1033 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1034 | sed 1q ) 2>/dev/null`
1035 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1037 found_so="$dir/$libname$shrext.$ver"
1040 eval library_names=\"$acl_library_names_spec\"
1041 for f in $library_names; do
1042 if test -f "$dir/$f"; then
1051 dnl Then look for a static library.
1052 if test "X$found_dir" = "X"; then
1053 if test -f "$dir/$libname.$acl_libext"; then
1055 found_a="$dir/$libname.$acl_libext"
1058 if test "X$found_dir" != "X"; then
1059 if test -f "$dir/$libname.la"; then
1060 found_la="$dir/$libname.la"
1065 if test "X$found_dir" != "X"; then
1070 if test "X$found_dir" != "X"; then
1071 dnl Found the library.
1072 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1073 if test "X$found_so" != "X"; then
1074 dnl Linking with a shared library. We attempt to hardcode its
1075 dnl directory into the executable's runpath, unless it's the
1076 dnl standard /usr/lib.
1077 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
1078 dnl No hardcoding is needed.
1079 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1081 dnl Use an explicit option to hardcode DIR into the resulting
1083 dnl Potentially add DIR to ltrpathdirs.
1084 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1086 for x in $ltrpathdirs; do
1087 if test "X$x" = "X$found_dir"; then
1092 if test -z "$haveit"; then
1093 ltrpathdirs="$ltrpathdirs $found_dir"
1095 dnl The hardcoding into $LIBNAME is system dependent.
1096 if test "$acl_hardcode_direct" = yes; then
1097 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1098 dnl resulting binary.
1099 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1101 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1102 dnl Use an explicit option to hardcode DIR into the resulting
1104 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1105 dnl Potentially add DIR to rpathdirs.
1106 dnl The rpathdirs will be appended to $LIBNAME at the end.
1108 for x in $rpathdirs; do
1109 if test "X$x" = "X$found_dir"; then
1114 if test -z "$haveit"; then
1115 rpathdirs="$rpathdirs $found_dir"
1118 dnl Rely on "-L$found_dir".
1119 dnl But don't add it if it's already contained in the LDFLAGS
1120 dnl or the already constructed $LIBNAME
1122 for x in $LDFLAGS $LIB[]NAME; do
1123 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1124 if test "X$x" = "X-L$found_dir"; then
1129 if test -z "$haveit"; then
1130 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1132 if test "$acl_hardcode_minus_L" != no; then
1133 dnl FIXME: Not sure whether we should use
1134 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1136 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1138 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1139 dnl here, because this doesn't fit in flags passed to the
1140 dnl compiler. So give up. No hardcoding. This affects only
1141 dnl very old systems.
1142 dnl FIXME: Not sure whether we should use
1143 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1145 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1151 if test "X$found_a" != "X"; then
1152 dnl Linking with a static library.
1153 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1155 dnl We shouldn't come here, but anyway it's good to have a
1157 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1160 dnl Assume the include files are nearby.
1161 additional_includedir=
1162 case "$found_dir" in
1163 */$acl_libdirstem | */$acl_libdirstem/)
1164 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1165 LIB[]NAME[]_PREFIX="$basedir"
1166 additional_includedir="$basedir/include"
1169 if test "X$additional_includedir" != "X"; then
1170 dnl Potentially add $additional_includedir to $INCNAME.
1171 dnl But don't add it
1172 dnl 1. if it's the standard /usr/include,
1173 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1174 dnl 3. if it's already present in $CPPFLAGS or the already
1175 dnl constructed $INCNAME,
1176 dnl 4. if it doesn't exist as a directory.
1177 if test "X$additional_includedir" != "X/usr/include"; then
1179 if test "X$additional_includedir" = "X/usr/local/include"; then
1180 if test -n "$GCC"; then
1182 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1186 if test -z "$haveit"; then
1187 for x in $CPPFLAGS $INC[]NAME; do
1188 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1189 if test "X$x" = "X-I$additional_includedir"; then
1194 if test -z "$haveit"; then
1195 if test -d "$additional_includedir"; then
1196 dnl Really add $additional_includedir to $INCNAME.
1197 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1203 dnl Look for dependencies.
1204 if test -n "$found_la"; then
1205 dnl Read the .la file. It defines the variables
1206 dnl dlname, library_names, old_library, dependency_libs, current,
1207 dnl age, revision, installed, dlopen, dlpreopen, libdir.
1208 save_libdir="$libdir"
1210 */* | *\\*) . "$found_la" ;;
1211 *) . "./$found_la" ;;
1213 libdir="$save_libdir"
1214 dnl We use only dependency_libs.
1215 for dep in $dependency_libs; do
1218 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1219 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1220 dnl But don't add it
1221 dnl 1. if it's the standard /usr/lib,
1222 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1223 dnl 3. if it's already present in $LDFLAGS or the already
1224 dnl constructed $LIBNAME,
1225 dnl 4. if it doesn't exist as a directory.
1226 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1228 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1229 if test -n "$GCC"; then
1231 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1235 if test -z "$haveit"; then
1237 for x in $LDFLAGS $LIB[]NAME; do
1238 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1239 if test "X$x" = "X-L$additional_libdir"; then
1244 if test -z "$haveit"; then
1245 if test -d "$additional_libdir"; then
1246 dnl Really add $additional_libdir to $LIBNAME.
1247 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1251 for x in $LDFLAGS $LTLIB[]NAME; do
1252 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1253 if test "X$x" = "X-L$additional_libdir"; then
1258 if test -z "$haveit"; then
1259 if test -d "$additional_libdir"; then
1260 dnl Really add $additional_libdir to $LTLIBNAME.
1261 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1268 dir=`echo "X$dep" | sed -e 's/^X-R//'`
1269 if test "$enable_rpath" != no; then
1270 dnl Potentially add DIR to rpathdirs.
1271 dnl The rpathdirs will be appended to $LIBNAME at the end.
1273 for x in $rpathdirs; do
1274 if test "X$x" = "X$dir"; then
1279 if test -z "$haveit"; then
1280 rpathdirs="$rpathdirs $dir"
1282 dnl Potentially add DIR to ltrpathdirs.
1283 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1285 for x in $ltrpathdirs; do
1286 if test "X$x" = "X$dir"; then
1291 if test -z "$haveit"; then
1292 ltrpathdirs="$ltrpathdirs $dir"
1297 dnl Handle this in the next round.
1298 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1301 dnl Handle this in the next round. Throw away the .la's
1302 dnl directory; it is already contained in a preceding -L
1304 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1307 dnl Most likely an immediate library name.
1308 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1309 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1315 dnl Didn't find the library; assume it is in the system directories
1316 dnl known to the linker and runtime loader. (All the system
1317 dnl directories known to the linker should also be known to the
1318 dnl runtime loader, otherwise the system is severely misconfigured.)
1319 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1320 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1326 if test "X$rpathdirs" != "X"; then
1327 if test -n "$acl_hardcode_libdir_separator"; then
1328 dnl Weird platform: only the last -rpath option counts, the user must
1329 dnl pass all path elements in one option. We can arrange that for a
1330 dnl single library, but not when more than one $LIBNAMEs are used.
1332 for found_dir in $rpathdirs; do
1333 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1335 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1336 acl_save_libdir="$libdir"
1338 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1339 libdir="$acl_save_libdir"
1340 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1342 dnl The -rpath options are cumulative.
1343 for found_dir in $rpathdirs; do
1344 acl_save_libdir="$libdir"
1346 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1347 libdir="$acl_save_libdir"
1348 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1352 if test "X$ltrpathdirs" != "X"; then
1353 dnl When using libtool, the option that works for both libraries and
1354 dnl executables is -R. The -R options are cumulative.
1355 for found_dir in $ltrpathdirs; do
1356 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1361 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1362 dnl unless already present in VAR.
1363 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1364 dnl contains two or three consecutive elements that belong together.
1365 AC_DEFUN([AC_LIB_APPENDTOVAR],
1367 for element in [$2]; do
1370 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1371 if test "X$x" = "X$element"; then
1376 if test -z "$haveit"; then
1377 [$1]="${[$1]}${[$1]:+ }$element"
1382 dnl For those cases where a variable contains several -L and -l options
1383 dnl referring to unknown libraries and directories, this macro determines the
1384 dnl necessary additional linker options for the runtime path.
1385 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1386 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1387 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1388 dnl otherwise linking without libtool is assumed.
1389 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1391 AC_REQUIRE([AC_LIB_RPATH])
1392 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1394 if test "$enable_rpath" != no; then
1395 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1396 dnl Use an explicit option to hardcode directories into the resulting
1401 if test -n "$next"; then
1403 dnl No need to hardcode the standard /usr/lib.
1404 if test "X$dir" != "X/usr/$acl_libdirstem"; then
1405 rpathdirs="$rpathdirs $dir"
1411 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1412 dnl No need to hardcode the standard /usr/lib.
1413 if test "X$dir" != "X/usr/$acl_libdirstem"; then
1414 rpathdirs="$rpathdirs $dir"
1421 if test "X$rpathdirs" != "X"; then
1422 if test -n ""$3""; then
1423 dnl libtool is used for linking. Use -R options.
1424 for dir in $rpathdirs; do
1425 $1="${$1}${$1:+ }-R$dir"
1428 dnl The linker is used for linking directly.
1429 if test -n "$acl_hardcode_libdir_separator"; then
1430 dnl Weird platform: only the last -rpath option counts, the user
1431 dnl must pass all path elements in one option.
1433 for dir in $rpathdirs; do
1434 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1436 acl_save_libdir="$libdir"
1438 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1439 libdir="$acl_save_libdir"
1442 dnl The -rpath options are cumulative.
1443 for dir in $rpathdirs; do
1444 acl_save_libdir="$libdir"
1446 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1447 libdir="$acl_save_libdir"
1448 $1="${$1}${$1:+ }$flag"
1458 # lib-prefix.m4 serial 5 (gettext-0.15)
1459 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
1460 dnl This file is free software; the Free Software Foundation
1461 dnl gives unlimited permission to copy and/or distribute it,
1462 dnl with or without modifications, as long as this notice is preserved.
1464 dnl From Bruno Haible.
1466 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1467 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1468 dnl require excessive bracketing.
1469 ifdef([AC_HELP_STRING],
1470 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1471 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1473 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1474 dnl to access previously installed libraries. The basic assumption is that
1475 dnl a user will want packages to use other packages he previously installed
1476 dnl with the same --prefix option.
1477 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1478 dnl libraries, but is otherwise very convenient.
1479 AC_DEFUN([AC_LIB_PREFIX],
1481 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1482 AC_REQUIRE([AC_PROG_CC])
1483 AC_REQUIRE([AC_CANONICAL_HOST])
1484 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1485 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1486 dnl By default, look in $includedir and $libdir.
1488 AC_LIB_WITH_FINAL_PREFIX([
1489 eval additional_includedir=\"$includedir\"
1490 eval additional_libdir=\"$libdir\"
1492 AC_LIB_ARG_WITH([lib-prefix],
1493 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1494 --without-lib-prefix don't search for libraries in includedir and libdir],
1496 if test "X$withval" = "Xno"; then
1499 if test "X$withval" = "X"; then
1500 AC_LIB_WITH_FINAL_PREFIX([
1501 eval additional_includedir=\"$includedir\"
1502 eval additional_libdir=\"$libdir\"
1505 additional_includedir="$withval/include"
1506 additional_libdir="$withval/$acl_libdirstem"
1510 if test $use_additional = yes; then
1511 dnl Potentially add $additional_includedir to $CPPFLAGS.
1512 dnl But don't add it
1513 dnl 1. if it's the standard /usr/include,
1514 dnl 2. if it's already present in $CPPFLAGS,
1515 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1516 dnl 4. if it doesn't exist as a directory.
1517 if test "X$additional_includedir" != "X/usr/include"; then
1519 for x in $CPPFLAGS; do
1520 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1521 if test "X$x" = "X-I$additional_includedir"; then
1526 if test -z "$haveit"; then
1527 if test "X$additional_includedir" = "X/usr/local/include"; then
1528 if test -n "$GCC"; then
1530 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1534 if test -z "$haveit"; then
1535 if test -d "$additional_includedir"; then
1536 dnl Really add $additional_includedir to $CPPFLAGS.
1537 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1542 dnl Potentially add $additional_libdir to $LDFLAGS.
1543 dnl But don't add it
1544 dnl 1. if it's the standard /usr/lib,
1545 dnl 2. if it's already present in $LDFLAGS,
1546 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1547 dnl 4. if it doesn't exist as a directory.
1548 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1550 for x in $LDFLAGS; do
1551 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1552 if test "X$x" = "X-L$additional_libdir"; then
1557 if test -z "$haveit"; then
1558 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1559 if test -n "$GCC"; then
1561 linux*) haveit=yes;;
1565 if test -z "$haveit"; then
1566 if test -d "$additional_libdir"; then
1567 dnl Really add $additional_libdir to $LDFLAGS.
1568 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1576 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1577 dnl acl_final_exec_prefix, containing the values to which $prefix and
1578 dnl $exec_prefix will expand at the end of the configure script.
1579 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1581 dnl Unfortunately, prefix and exec_prefix get only finally determined
1582 dnl at the end of configure.
1583 if test "X$prefix" = "XNONE"; then
1584 acl_final_prefix="$ac_default_prefix"
1586 acl_final_prefix="$prefix"
1588 if test "X$exec_prefix" = "XNONE"; then
1589 acl_final_exec_prefix='${prefix}'
1591 acl_final_exec_prefix="$exec_prefix"
1593 acl_save_prefix="$prefix"
1594 prefix="$acl_final_prefix"
1595 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1596 prefix="$acl_save_prefix"
1599 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1600 dnl variables prefix and exec_prefix bound to the values they will have
1601 dnl at the end of the configure script.
1602 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1604 acl_save_prefix="$prefix"
1605 prefix="$acl_final_prefix"
1606 acl_save_exec_prefix="$exec_prefix"
1607 exec_prefix="$acl_final_exec_prefix"
1609 exec_prefix="$acl_save_exec_prefix"
1610 prefix="$acl_save_prefix"
1613 dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
1614 dnl the basename of the libdir, either "lib" or "lib64".
1615 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1617 dnl There is no formal standard regarding lib and lib64. The current
1618 dnl practice is that on a system supporting 32-bit and 64-bit instruction
1619 dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
1620 dnl libraries go under $prefix/lib. We determine the compiler's default
1621 dnl mode by looking at the compiler's library search path. If at least
1622 dnl of its elements ends in /lib64 or points to a directory whose absolute
1623 dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
1624 dnl default, namely "lib".
1626 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1627 if test -n "$searchpath"; then
1628 acl_save_IFS="${IFS= }"; IFS=":"
1629 for searchdir in $searchpath; do
1630 if test -d "$searchdir"; then
1631 case "$searchdir" in
1632 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1633 *) searchdir=`cd "$searchdir" && pwd`
1634 case "$searchdir" in
1635 */lib64 ) acl_libdirstem=lib64 ;;
1644 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1646 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1647 # 2006, 2007, 2008 Free Software Foundation, Inc.
1648 # Written by Gordon Matzigkeit, 1996
1650 # This file is free software; the Free Software Foundation gives
1651 # unlimited permission to copy and/or distribute it, with or without
1652 # modifications, as long as this notice is preserved.
1654 m4_define([_LT_COPYING], [dnl
1655 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1656 # 2006, 2007, 2008 Free Software Foundation, Inc.
1657 # Written by Gordon Matzigkeit, 1996
1659 # This file is part of GNU Libtool.
1661 # GNU Libtool is free software; you can redistribute it and/or
1662 # modify it under the terms of the GNU General Public License as
1663 # published by the Free Software Foundation; either version 2 of
1664 # the License, or (at your option) any later version.
1666 # As a special exception to the GNU General Public License,
1667 # if you distribute this file as part of a program or library that
1668 # is built using GNU Libtool, you may include this file under the
1669 # same distribution terms that you use for the rest of that program.
1671 # GNU Libtool is distributed in the hope that it will be useful,
1672 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1673 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1674 # GNU General Public License for more details.
1676 # You should have received a copy of the GNU General Public License
1677 # along with GNU Libtool; see the file COPYING. If not, a copy
1678 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1679 # obtained by writing to the Free Software Foundation, Inc.,
1680 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1686 # LT_PREREQ(VERSION)
1687 # ------------------
1688 # Complain and exit if this libtool version is less that VERSION.
1689 m4_defun([LT_PREREQ],
1690 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1692 [m4_fatal([Libtool version $1 or higher is required],
1697 # _LT_CHECK_BUILDDIR
1698 # ------------------
1699 # Complain if the absolute build directory name contains unusual characters
1700 m4_defun([_LT_CHECK_BUILDDIR],
1703 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1708 # LT_INIT([OPTIONS])
1709 # ------------------
1711 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1712 AC_BEFORE([$0], [LT_LANG])dnl
1713 AC_BEFORE([$0], [LT_OUTPUT])dnl
1714 AC_BEFORE([$0], [LTDL_INIT])dnl
1715 m4_require([_LT_CHECK_BUILDDIR])dnl
1717 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1718 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1719 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1720 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1721 dnl unless we require an AC_DEFUNed macro:
1722 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1723 AC_REQUIRE([LTSUGAR_VERSION])dnl
1724 AC_REQUIRE([LTVERSION_VERSION])dnl
1725 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1726 m4_require([_LT_PROG_LTMAIN])dnl
1729 _LT_SET_OPTIONS([$0], [$1])
1731 # This can be used to rebuild libtool when needed
1732 LIBTOOL_DEPS="$ltmain"
1734 # Always use our own libtool.
1735 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1736 AC_SUBST(LIBTOOL)dnl
1741 m4_define([LT_INIT])
1745 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1746 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1747 dnl aclocal-1.4 backwards compatibility:
1748 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1749 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1752 # _LT_CC_BASENAME(CC)
1753 # -------------------
1754 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1755 m4_defun([_LT_CC_BASENAME],
1756 [for cc_temp in $1""; do
1758 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1759 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1764 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1768 # _LT_FILEUTILS_DEFAULTS
1769 # ----------------------
1770 # It is okay to use these file commands and assume they have been set
1771 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1772 m4_defun([_LT_FILEUTILS_DEFAULTS],
1776 ])# _LT_FILEUTILS_DEFAULTS
1781 m4_defun([_LT_SETUP],
1782 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1783 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1784 _LT_DECL([], [host_alias], [0], [The host system])dnl
1785 _LT_DECL([], [host], [0])dnl
1786 _LT_DECL([], [host_os], [0])dnl
1788 _LT_DECL([], [build_alias], [0], [The build system])dnl
1789 _LT_DECL([], [build], [0])dnl
1790 _LT_DECL([], [build_os], [0])dnl
1792 AC_REQUIRE([AC_PROG_CC])dnl
1793 AC_REQUIRE([LT_PATH_LD])dnl
1794 AC_REQUIRE([LT_PATH_NM])dnl
1796 AC_REQUIRE([AC_PROG_LN_S])dnl
1797 test -z "$LN_S" && LN_S="ln -s"
1798 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1800 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1801 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1802 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1804 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1805 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1806 m4_require([_LT_CMD_RELOAD])dnl
1807 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1808 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1809 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1811 _LT_CONFIG_LIBTOOL_INIT([
1812 # See if we are running on zsh, and set the options which allow our
1813 # commands through without removal of \ escapes INIT.
1814 if test -n "\${ZSH_VERSION+set}" ; then
1815 setopt NO_GLOB_SUBST
1818 if test -n "${ZSH_VERSION+set}" ; then
1819 setopt NO_GLOB_SUBST
1824 m4_require([_LT_TAG_COMPILER])dnl
1825 _LT_PROG_ECHO_BACKSLASH
1829 # AIX sometimes has problems with the GCC collect2 program. For some
1830 # reason, if we set the COLLECT_NAMES environment variable, the problems
1831 # vanish in a puff of smoke.
1832 if test "X${COLLECT_NAMES+set}" != Xset; then
1834 export COLLECT_NAMES
1839 # Sed substitution that helps us do robust quoting. It backslashifies
1840 # metacharacters that are still active within double-quoted strings.
1841 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1843 # Same as above, but do not quote variable references.
1844 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1846 # Sed substitution to delay expansion of an escaped shell variable in a
1847 # double_quote_subst'ed string.
1848 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1850 # Sed substitution to delay expansion of an escaped single quote.
1851 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1853 # Sed substitution to avoid accidental globbing in evaled expressions
1854 no_glob_subst='s/\*/\\\*/g'
1858 can_build_shared=yes
1860 # All known linkers require a `.a' archive for static linking (except MSVC,
1861 # which needs '.lib').
1864 with_gnu_ld="$lt_cv_prog_gnu_ld"
1867 old_CFLAGS="$CFLAGS"
1869 # Set sane defaults for various variables
1870 test -z "$CC" && CC=cc
1871 test -z "$LTCC" && LTCC=$CC
1872 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1873 test -z "$LD" && LD=ld
1874 test -z "$ac_objext" && ac_objext=o
1876 _LT_CC_BASENAME([$compiler])
1878 # Only perform the check for file, if the check method requires it
1879 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1880 case $deplibs_check_method in
1882 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1888 # Use C for the default configuration in the libtool script
1889 LT_SUPPORTED_TAG([CC])
1891 _LT_LANG_DEFAULT_CONFIG
1898 # Note that this code is called both from `configure', and `config.status'
1899 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
1900 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1901 # so we pass a copy along to make sure it has a sensible value anyway.
1902 m4_defun([_LT_PROG_LTMAIN],
1903 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1904 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1905 ltmain="$ac_aux_dir/ltmain.sh"
1910 # So that we can recreate a full libtool script including additional
1911 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1912 # in macros and then make a single call at the end using the `libtool'
1916 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1917 # ----------------------------------------
1918 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1919 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1921 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1926 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1929 # _LT_CONFIG_LIBTOOL([COMMANDS])
1930 # ------------------------------
1931 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1932 m4_define([_LT_CONFIG_LIBTOOL],
1934 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1939 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1942 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1943 # -----------------------------------------------------
1944 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1945 [_LT_CONFIG_LIBTOOL([$1])
1946 _LT_CONFIG_LIBTOOL_INIT([$2])
1950 # _LT_FORMAT_COMMENT([COMMENT])
1951 # -----------------------------
1952 # Add leading comment marks to the start of each line, and a trailing
1953 # full-stop to the whole comment if one is not present already.
1954 m4_define([_LT_FORMAT_COMMENT],
1956 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1957 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1964 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1965 # -------------------------------------------------------------------
1966 # CONFIGNAME is the name given to the value in the libtool script.
1967 # VARNAME is the (base) name used in the configure script.
1968 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1969 # VARNAME. Any other value will be used directly.
1970 m4_define([_LT_DECL],
1971 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1972 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1973 [m4_ifval([$1], [$1], [$2])])
1974 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1976 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1977 lt_dict_add_subkey([lt_decl_dict], [$2],
1978 [tagged?], [m4_ifval([$5], [yes], [no])])])
1982 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1983 # --------------------------------------------------------
1984 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1987 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1988 # ------------------------------------------------
1989 m4_define([lt_decl_tag_varnames],
1990 [_lt_decl_filter([tagged?], [yes], $@)])
1993 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1994 # ---------------------------------------------------------
1995 m4_define([_lt_decl_filter],
1997 [0], [m4_fatal([$0: too few arguments: $#])],
1998 [1], [m4_fatal([$0: too few arguments: $#: $1])],
1999 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2000 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2001 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2005 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2006 # --------------------------------------------------
2007 m4_define([lt_decl_quote_varnames],
2008 [_lt_decl_filter([value], [1], $@)])
2011 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2012 # ---------------------------------------------------
2013 m4_define([lt_decl_dquote_varnames],
2014 [_lt_decl_filter([value], [2], $@)])
2017 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2018 # ---------------------------------------------------
2019 m4_define([lt_decl_varnames_tagged],
2020 [m4_assert([$# <= 2])dnl
2021 _$0(m4_quote(m4_default([$1], [[, ]])),
2022 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2023 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2024 m4_define([_lt_decl_varnames_tagged],
2025 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2028 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2029 # ------------------------------------------------
2030 m4_define([lt_decl_all_varnames],
2031 [_$0(m4_quote(m4_default([$1], [[, ]])),
2033 m4_quote(lt_decl_varnames),
2034 m4_quote(m4_shift($@))))[]dnl
2036 m4_define([_lt_decl_all_varnames],
2037 [lt_join($@, lt_decl_varnames_tagged([$1],
2038 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2042 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
2043 # ------------------------------------
2044 # Quote a variable value, and forward it to `config.status' so that its
2045 # declaration there will have the same value as in `configure'. VARNAME
2046 # must have a single quote delimited value for this to work.
2047 m4_define([_LT_CONFIG_STATUS_DECLARE],
2048 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
2051 # _LT_CONFIG_STATUS_DECLARATIONS
2052 # ------------------------------
2053 # We delimit libtool config variables with single quotes, so when
2054 # we write them to config.status, we have to be sure to quote all
2055 # embedded single quotes properly. In configure, this macro expands
2056 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2058 # <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
2059 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2060 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2061 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2066 # Output comment and list of tags supported by the script
2067 m4_defun([_LT_LIBTOOL_TAGS],
2068 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2069 available_tags="_LT_TAGS"dnl
2073 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2074 # -----------------------------------
2075 # Extract the dictionary values for VARNAME (optionally with TAG) and
2076 # expand to a commented shell variable setting:
2078 # # Some comment about what VAR is for.
2079 # visible_name=$lt_internal_name
2080 m4_define([_LT_LIBTOOL_DECLARE],
2081 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2082 [description])))[]dnl
2083 m4_pushdef([_libtool_name],
2084 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2085 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2086 [0], [_libtool_name=[$]$1],
2087 [1], [_libtool_name=$lt_[]$1],
2088 [2], [_libtool_name=$lt_[]$1],
2089 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2090 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2094 # _LT_LIBTOOL_CONFIG_VARS
2095 # -----------------------
2096 # Produce commented declarations of non-tagged libtool config variables
2097 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2098 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
2099 # section) are produced by _LT_LIBTOOL_TAG_VARS.
2100 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2101 [m4_foreach([_lt_var],
2102 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2103 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2106 # _LT_LIBTOOL_TAG_VARS(TAG)
2107 # -------------------------
2108 m4_define([_LT_LIBTOOL_TAG_VARS],
2109 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2110 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2113 # _LT_TAGVAR(VARNAME, [TAGNAME])
2114 # ------------------------------
2115 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2118 # _LT_CONFIG_COMMANDS
2119 # -------------------
2120 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
2121 # variables for single and double quote escaping we saved from calls
2122 # to _LT_DECL, we can put quote escaped variables declarations
2123 # into `config.status', and then the shell code to quote escape them in
2124 # for loops in `config.status'. Finally, any additional code accumulated
2125 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2126 m4_defun([_LT_CONFIG_COMMANDS],
2127 [AC_PROVIDE_IFELSE([LT_OUTPUT],
2128 dnl If the libtool generation code has been placed in $CONFIG_LT,
2129 dnl instead of duplicating it all over again into config.status,
2130 dnl then we will have config.status run $CONFIG_LT later, so it
2131 dnl needs to know what name is stored there:
2132 [AC_CONFIG_COMMANDS([libtool],
2133 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2134 dnl If the libtool generation code is destined for config.status,
2135 dnl expand the accumulated commands and init code now:
2136 [AC_CONFIG_COMMANDS([libtool],
2137 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2138 ])#_LT_CONFIG_COMMANDS
2142 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2145 # The HP-UX ksh and POSIX shell print the target directory to stdout
2147 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2149 sed_quote_subst='$sed_quote_subst'
2150 double_quote_subst='$double_quote_subst'
2151 delay_variable_subst='$delay_variable_subst'
2152 _LT_CONFIG_STATUS_DECLARATIONS
2154 LTCFLAGS='$LTCFLAGS'
2155 compiler='$compiler_DEFAULT'
2157 # Quote evaled strings.
2158 for var in lt_decl_all_varnames([[ \
2159 ]], lt_decl_quote_varnames); do
2160 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2161 *[[\\\\\\\`\\"\\\$]]*)
2162 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2165 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2170 # Double-quote double-evaled strings.
2171 for var in lt_decl_all_varnames([[ \
2172 ]], lt_decl_dquote_varnames); do
2173 case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2174 *[[\\\\\\\`\\"\\\$]]*)
2175 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2178 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2183 # Fix-up fallback echo if it was mangled by the above quoting rules.
2185 *'\\\[$]0 --fallback-echo"')dnl "
2186 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
2190 _LT_OUTPUT_LIBTOOL_INIT
2196 # This macro allows early generation of the libtool script (before
2197 # AC_OUTPUT is called), incase it is used in configure for compilation
2199 AC_DEFUN([LT_OUTPUT],
2200 [: ${CONFIG_LT=./config.lt}
2201 AC_MSG_NOTICE([creating $CONFIG_LT])
2202 cat >"$CONFIG_LT" <<_LTEOF
2204 # Generated by $as_me.
2205 # Run this file to recreate a libtool stub with the current configuration.
2208 SHELL=\${CONFIG_SHELL-$SHELL}
2211 cat >>"$CONFIG_LT" <<\_LTEOF
2215 exec AS_MESSAGE_FD>&1
2216 exec AS_MESSAGE_LOG_FD>>config.log
2219 AS_BOX([Running $as_me.])
2220 } >&AS_MESSAGE_LOG_FD
2223 \`$as_me' creates a local libtool stub from the current configuration,
2224 for use in further configure time tests before the real libtool is
2227 Usage: $[0] [[OPTIONS]]
2229 -h, --help print this help, then exit
2230 -V, --version print version number, then exit
2231 -q, --quiet do not print progress messages
2232 -d, --debug don't remove temporary files
2234 Report bugs to <bug-libtool@gnu.org>."
2237 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2238 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2239 configured by $[0], generated by m4_PACKAGE_STRING.
2241 Copyright (C) 2008 Free Software Foundation, Inc.
2242 This config.lt script is free software; the Free Software Foundation
2243 gives unlimited permision to copy, distribute and modify it."
2245 while test $[#] != 0
2248 --version | --v* | -V )
2249 echo "$lt_cl_version"; exit 0 ;;
2250 --help | --h* | -h )
2251 echo "$lt_cl_help"; exit 0 ;;
2252 --debug | --d* | -d )
2254 --quiet | --q* | --silent | --s* | -q )
2257 -*) AC_MSG_ERROR([unrecognized option: $[1]
2258 Try \`$[0] --help' for more information.]) ;;
2260 *) AC_MSG_ERROR([unrecognized argument: $[1]
2261 Try \`$[0] --help' for more information.]) ;;
2266 if $lt_cl_silent; then
2267 exec AS_MESSAGE_FD>/dev/null
2271 cat >>"$CONFIG_LT" <<_LTEOF
2272 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2275 cat >>"$CONFIG_LT" <<\_LTEOF
2276 AC_MSG_NOTICE([creating $ofile])
2277 _LT_OUTPUT_LIBTOOL_COMMANDS
2280 chmod +x "$CONFIG_LT"
2282 # configure is writing to config.log, but config.lt does its own redirection,
2283 # appending to config.log, which fails on DOS, as config.log is still kept
2284 # open by configure. Here we exec the FD to /dev/null, effectively closing
2285 # config.log, so it can be properly (re)opened and appended to by config.lt.
2286 if test "$no_create" != yes; then
2288 test "$silent" = yes &&
2289 lt_config_lt_args="$lt_config_lt_args --quiet"
2290 exec AS_MESSAGE_LOG_FD>/dev/null
2291 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2292 exec AS_MESSAGE_LOG_FD>>config.log
2293 $lt_cl_success || AS_EXIT(1)
2300 # If TAG is the built-in tag, create an initial libtool script with a
2301 # default configuration from the untagged config vars. Otherwise add code
2302 # to config.status for appending the configuration named by TAG from the
2303 # matching tagged config vars.
2304 m4_defun([_LT_CONFIG],
2305 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2306 _LT_CONFIG_SAVE_COMMANDS([
2307 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2308 m4_if(_LT_TAG, [C], [
2309 # See if we are running on zsh, and set the options which allow our
2310 # commands through without removal of \ escapes.
2311 if test -n "${ZSH_VERSION+set}" ; then
2312 setopt NO_GLOB_SUBST
2316 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2319 cat <<_LT_EOF >> "$cfgfile"
2322 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2323 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2324 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2325 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2330 # ### BEGIN LIBTOOL CONFIG
2331 _LT_LIBTOOL_CONFIG_VARS
2332 _LT_LIBTOOL_TAG_VARS
2333 # ### END LIBTOOL CONFIG
2339 cat <<\_LT_EOF >> "$cfgfile"
2340 # AIX sometimes has problems with the GCC collect2 program. For some
2341 # reason, if we set the COLLECT_NAMES environment variable, the problems
2342 # vanish in a puff of smoke.
2343 if test "X${COLLECT_NAMES+set}" != Xset; then
2345 export COLLECT_NAMES
2353 # We use sed instead of cat because bash on DJGPP gets confused if
2354 # if finds mixed CR/LF and LF-only lines. Since sed operates in
2355 # text mode, it properly converts lines to CR/LF. This bash problem
2356 # is reportedly fixed, but why not run on old versions too?
2357 sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
2358 || (rm -f "$cfgfile"; exit 1)
2360 _LT_PROG_XSI_SHELLFNS
2362 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
2363 || (rm -f "$cfgfile"; exit 1)
2365 mv -f "$cfgfile" "$ofile" ||
2366 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2369 [cat <<_LT_EOF >> "$ofile"
2371 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2372 dnl in a comment (ie after a #).
2373 # ### BEGIN LIBTOOL TAG CONFIG: $1
2374 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
2375 # ### END LIBTOOL TAG CONFIG: $1
2382 TIMESTAMP='$TIMESTAMP'
2384 ofile='$ofile'], [])
2385 ])dnl /_LT_CONFIG_SAVE_COMMANDS
2389 # LT_SUPPORTED_TAG(TAG)
2390 # ---------------------
2391 # Trace this macro to discover what tags are supported by the libtool
2392 # --tag option, using:
2393 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
2394 AC_DEFUN([LT_SUPPORTED_TAG], [])
2397 # C support is built-in for now
2398 m4_define([_LT_LANG_C_enabled], [])
2399 m4_define([_LT_TAGS], [])
2404 # Enable libtool support for the given language if not already enabled.
2406 [AC_BEFORE([$0], [LT_OUTPUT])dnl
2409 [C++], [_LT_LANG(CXX)],
2410 [Java], [_LT_LANG(GCJ)],
2411 [Fortran 77], [_LT_LANG(F77)],
2412 [Fortran], [_LT_LANG(FC)],
2413 [Windows Resource], [_LT_LANG(RC)],
2414 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2416 [m4_fatal([$0: unsupported language: "$1"])])])dnl
2420 # _LT_LANG(LANGNAME)
2421 # ------------------
2422 m4_defun([_LT_LANG],
2423 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
2424 [LT_SUPPORTED_TAG([$1])dnl
2425 m4_append([_LT_TAGS], [$1 ])dnl
2426 m4_define([_LT_LANG_]$1[_enabled], [])dnl
2427 _LT_LANG_$1_CONFIG($1)])dnl
2431 # _LT_LANG_DEFAULT_CONFIG
2432 # -----------------------
2433 m4_defun([_LT_LANG_DEFAULT_CONFIG],
2434 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
2436 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2438 AC_PROVIDE_IFELSE([AC_PROG_F77],
2440 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2442 AC_PROVIDE_IFELSE([AC_PROG_FC],
2444 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2446 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2447 dnl pulling things in needlessly.
2448 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2450 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2452 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2454 [m4_ifdef([AC_PROG_GCJ],
2455 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2456 m4_ifdef([A][M_PROG_GCJ],
2457 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2458 m4_ifdef([LT_PROG_GCJ],
2459 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2461 AC_PROVIDE_IFELSE([LT_PROG_RC],
2463 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2464 ])# _LT_LANG_DEFAULT_CONFIG
2467 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2468 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2469 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2470 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2471 dnl aclocal-1.4 backwards compatibility:
2472 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2473 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2474 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2475 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2480 m4_defun([_LT_TAG_COMPILER],
2481 [AC_REQUIRE([AC_PROG_CC])dnl
2483 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2484 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2485 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2486 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2488 # If no C compiler was specified, use CC.
2491 # If no C compiler flags were specified, use CFLAGS.
2492 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2494 # Allow CC to be a program name with arguments.
2496 ])# _LT_TAG_COMPILER
2499 # _LT_COMPILER_BOILERPLATE
2500 # ------------------------
2501 # Check for compiler boilerplate output or warnings with
2502 # the simple compiler test code.
2503 m4_defun([_LT_COMPILER_BOILERPLATE],
2504 [m4_require([_LT_DECL_SED])dnl
2505 ac_outfile=conftest.$ac_objext
2506 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2507 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2508 _lt_compiler_boilerplate=`cat conftest.err`
2510 ])# _LT_COMPILER_BOILERPLATE
2513 # _LT_LINKER_BOILERPLATE
2514 # ----------------------
2515 # Check for linker boilerplate output or warnings with
2516 # the simple link test code.
2517 m4_defun([_LT_LINKER_BOILERPLATE],
2518 [m4_require([_LT_DECL_SED])dnl
2519 ac_outfile=conftest.$ac_objext
2520 echo "$lt_simple_link_test_code" >conftest.$ac_ext
2521 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2522 _lt_linker_boilerplate=`cat conftest.err`
2524 ])# _LT_LINKER_BOILERPLATE
2526 # _LT_REQUIRED_DARWIN_CHECKS
2527 # -------------------------
2528 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2530 rhapsody* | darwin*)
2531 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2532 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2533 AC_CHECK_TOOL([LIPO], [lipo], [:])
2534 AC_CHECK_TOOL([OTOOL], [otool], [:])
2535 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2536 _LT_DECL([], [DSYMUTIL], [1],
2537 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2538 _LT_DECL([], [NMEDIT], [1],
2539 [Tool to change global to local symbols on Mac OS X])
2540 _LT_DECL([], [LIPO], [1],
2541 [Tool to manipulate fat objects and archives on Mac OS X])
2542 _LT_DECL([], [OTOOL], [1],
2543 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2544 _LT_DECL([], [OTOOL64], [1],
2545 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2547 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2548 [lt_cv_apple_cc_single_mod=no
2549 if test -z "${LT_MULTI_MODULE}"; then
2550 # By default we will add the -single_module flag. You can override
2551 # by either setting the environment variable LT_MULTI_MODULE
2552 # non-empty at configure time, or by adding -multi_module to the
2554 rm -rf libconftest.dylib*
2555 echo "int foo(void){return 1;}" > conftest.c
2556 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2557 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2558 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2559 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2561 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
2562 lt_cv_apple_cc_single_mod=yes
2564 cat conftest.err >&AS_MESSAGE_LOG_FD
2566 rm -rf libconftest.dylib*
2569 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2570 [lt_cv_ld_exported_symbols_list],
2571 [lt_cv_ld_exported_symbols_list=no
2572 save_LDFLAGS=$LDFLAGS
2573 echo "_main" > conftest.sym
2574 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2575 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2576 [lt_cv_ld_exported_symbols_list=yes],
2577 [lt_cv_ld_exported_symbols_list=no])
2578 LDFLAGS="$save_LDFLAGS"
2581 rhapsody* | darwin1.[[012]])
2582 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2584 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2585 darwin*) # darwin 5.x on
2586 # if running on 10.5 or later, the deployment target defaults
2587 # to the OS version, if on x86, and 10.4, the deployment
2588 # target defaults to 10.4. Don't you love it?
2589 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2590 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2591 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2593 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2595 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2599 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2600 _lt_dar_single_mod='$single_module'
2602 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2603 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2605 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2607 if test "$DSYMUTIL" != ":"; then
2608 _lt_dsymutil='~$DSYMUTIL $lib || :'
2617 # _LT_DARWIN_LINKER_FEATURES
2618 # --------------------------
2619 # Checks for linker and compiler features on darwin
2620 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2622 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2623 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2624 _LT_TAGVAR(hardcode_direct, $1)=no
2625 _LT_TAGVAR(hardcode_automatic, $1)=yes
2626 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2627 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2628 _LT_TAGVAR(link_all_deplibs, $1)=yes
2629 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2630 case $cc_basename in
2631 ifort*) _lt_dar_can_shared=yes ;;
2632 *) _lt_dar_can_shared=$GCC ;;
2634 if test "$_lt_dar_can_shared" = "yes"; then
2635 output_verbose_link_cmd=echo
2636 _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}"
2637 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2638 _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}"
2639 _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}"
2641 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2642 _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}"
2643 _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}"
2647 _LT_TAGVAR(ld_shlibs, $1)=no
2651 # _LT_SYS_MODULE_PATH_AIX
2652 # -----------------------
2653 # Links a minimal program and checks the executable
2654 # for the system default hardcoded library path. In most cases,
2655 # this is /usr/lib:/lib, but when the MPI compilers are used
2656 # the location of the communication and MPI libs are included too.
2657 # If we don't find anything, use the default library path according
2658 # to the aix ld manual.
2659 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2660 [m4_require([_LT_DECL_SED])dnl
2661 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2662 lt_aix_libpath_sed='
2663 /Import File Strings/,/^$/ {
2669 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2670 # Check for a 64-bit object if we didn't find anything.
2671 if test -z "$aix_libpath"; then
2672 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2674 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2675 ])# _LT_SYS_MODULE_PATH_AIX
2678 # _LT_SHELL_INIT(ARG)
2679 # -------------------
2680 m4_define([_LT_SHELL_INIT],
2681 [ifdef([AC_DIVERSION_NOTICE],
2682 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
2683 [AC_DIVERT_PUSH(NOTICE)])
2689 # _LT_PROG_ECHO_BACKSLASH
2690 # -----------------------
2691 # Add some code to the start of the generated configure script which
2692 # will find an echo command which doesn't interpret backslashes.
2693 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2695 # Check that we are running under the correct shell.
2696 SHELL=${CONFIG_SHELL-/bin/sh}
2700 # Remove one level of quotation (which was required for Make).
2701 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2705 ECHO=${lt_ECHO-echo}
2706 if test "X[$]1" = X--no-reexec; then
2707 # Discard the --no-reexec flag, and continue.
2709 elif test "X[$]1" = X--fallback-echo; then
2710 # Avoid inline document here, it may be left over
2712 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
2713 # Yippee, $ECHO works!
2716 # Restart under the correct shell.
2717 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2720 if test "X[$]1" = X--fallback-echo; then
2721 # used as fallback echo
2729 # The HP-UX ksh and POSIX shell print the target directory to stdout
2731 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2733 if test -z "$lt_ECHO"; then
2734 if test "X${echo_test_string+set}" != Xset; then
2735 # find a string as large as possible, as long as the shell can cope with it
2736 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
2737 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
2738 if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
2739 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
2746 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2747 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2748 test "X$echo_testing_string" = "X$echo_test_string"; then
2751 # The Solaris, AIX, and Digital Unix default echo programs unquote
2752 # backslashes. This makes it impossible to quote backslashes using
2753 # echo "$something" | sed 's/\\/\\\\/g'
2755 # So, first we look for a working echo in the user's PATH.
2757 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2758 for dir in $PATH /usr/ucb; do
2760 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
2761 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
2762 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
2763 test "X$echo_testing_string" = "X$echo_test_string"; then
2770 if test "X$ECHO" = Xecho; then
2771 # We didn't find a better echo, so look for alternatives.
2772 if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
2773 echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
2774 test "X$echo_testing_string" = "X$echo_test_string"; then
2775 # This shell has a builtin print -r that does the trick.
2777 elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
2778 test "X$CONFIG_SHELL" != X/bin/ksh; then
2779 # If we have ksh, try running configure again with it.
2780 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2781 export ORIGINAL_CONFIG_SHELL
2782 CONFIG_SHELL=/bin/ksh
2784 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2788 if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2789 echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2790 test "X$echo_testing_string" = "X$echo_test_string"; then
2791 # Cool, printf works
2793 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2794 test "X$echo_testing_string" = 'X\t' &&
2795 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2796 test "X$echo_testing_string" = "X$echo_test_string"; then
2797 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2799 SHELL="$CONFIG_SHELL"
2801 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2802 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2803 test "X$echo_testing_string" = 'X\t' &&
2804 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2805 test "X$echo_testing_string" = "X$echo_test_string"; then
2806 ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2808 # maybe with a smaller string...
2811 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2812 if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
2819 if test "$prev" != 'sed 50q "[$]0"'; then
2820 echo_test_string=`eval $prev`
2821 export echo_test_string
2822 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2824 # Oops. We lost completely, so just stick with echo.
2833 # Copy echo and quote the copy suitably for passing to libtool from
2834 # the Makefile, instead of quoting the original, which is used later.
2836 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2837 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2842 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2843 _LT_DECL([], [ECHO], [1],
2844 [An echo program that does not interpret backslashes])
2845 ])# _LT_PROG_ECHO_BACKSLASH
2850 m4_defun([_LT_ENABLE_LOCK],
2851 [AC_ARG_ENABLE([libtool-lock],
2852 [AS_HELP_STRING([--disable-libtool-lock],
2853 [avoid locking (might break parallel builds)])])
2854 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2856 # Some flags need to be propagated to the compiler or linker for good
2860 # Find out which ABI we are using.
2861 echo 'int i;' > conftest.$ac_ext
2862 if AC_TRY_EVAL(ac_compile); then
2863 case `/usr/bin/file conftest.$ac_objext` in
2875 # Find out which ABI we are using.
2876 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2877 if AC_TRY_EVAL(ac_compile); then
2878 if test "$lt_cv_prog_gnu_ld" = yes; then
2879 case `/usr/bin/file conftest.$ac_objext` in
2881 LD="${LD-ld} -melf32bsmip"
2884 LD="${LD-ld} -melf32bmipn32"
2887 LD="${LD-ld} -melf64bmip"
2891 case `/usr/bin/file conftest.$ac_objext` in
2907 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2908 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2909 # Find out which ABI we are using.
2910 echo 'int i;' > conftest.$ac_ext
2911 if AC_TRY_EVAL(ac_compile); then
2912 case `/usr/bin/file conftest.o` in
2915 x86_64-*kfreebsd*-gnu)
2916 LD="${LD-ld} -m elf_i386_fbsd"
2919 LD="${LD-ld} -m elf_i386"
2921 ppc64-*linux*|powerpc64-*linux*)
2922 LD="${LD-ld} -m elf32ppclinux"
2925 LD="${LD-ld} -m elf_s390"
2928 LD="${LD-ld} -m elf32_sparc"
2934 x86_64-*kfreebsd*-gnu)
2935 LD="${LD-ld} -m elf_x86_64_fbsd"
2938 LD="${LD-ld} -m elf_x86_64"
2940 ppc*-*linux*|powerpc*-*linux*)
2941 LD="${LD-ld} -m elf64ppc"
2943 s390*-*linux*|s390*-*tpf*)
2944 LD="${LD-ld} -m elf64_s390"
2947 LD="${LD-ld} -m elf64_sparc"
2957 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2958 SAVE_CFLAGS="$CFLAGS"
2959 CFLAGS="$CFLAGS -belf"
2960 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2962 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2964 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2965 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2966 CFLAGS="$SAVE_CFLAGS"
2970 # Find out which ABI we are using.
2971 echo 'int i;' > conftest.$ac_ext
2972 if AC_TRY_EVAL(ac_compile); then
2973 case `/usr/bin/file conftest.o` in
2975 case $lt_cv_prog_gnu_ld in
2976 yes*) LD="${LD-ld} -m elf64_sparc" ;;
2978 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2990 need_locks="$enable_libtool_lock"
2994 # _LT_CMD_OLD_ARCHIVE
2995 # -------------------
2996 m4_defun([_LT_CMD_OLD_ARCHIVE],
2997 [AC_CHECK_TOOL(AR, ar, false)
2998 test -z "$AR" && AR=ar
2999 test -z "$AR_FLAGS" && AR_FLAGS=cru
3000 _LT_DECL([], [AR], [1], [The archiver])
3001 _LT_DECL([], [AR_FLAGS], [1])
3003 AC_CHECK_TOOL(STRIP, strip, :)
3004 test -z "$STRIP" && STRIP=:
3005 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
3007 AC_CHECK_TOOL(RANLIB, ranlib, :)
3008 test -z "$RANLIB" && RANLIB=:
3009 _LT_DECL([], [RANLIB], [1],
3010 [Commands used to install an old-style archive])
3012 # Determine commands to create old-style static archives.
3013 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3014 old_postinstall_cmds='chmod 644 $oldlib'
3015 old_postuninstall_cmds=
3017 if test -n "$RANLIB"; then
3020 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3023 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3026 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3028 _LT_DECL([], [old_postinstall_cmds], [2])
3029 _LT_DECL([], [old_postuninstall_cmds], [2])
3030 _LT_TAGDECL([], [old_archive_cmds], [2],
3031 [Commands used to build an old-style archive])
3032 ])# _LT_CMD_OLD_ARCHIVE
3035 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3036 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3037 # ----------------------------------------------------------------
3038 # Check whether the given compiler option works
3039 AC_DEFUN([_LT_COMPILER_OPTION],
3040 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3041 m4_require([_LT_DECL_SED])dnl
3042 AC_CACHE_CHECK([$1], [$2],
3044 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3045 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3046 lt_compiler_flag="$3"
3047 # Insert the option either (1) after the last *FLAGS variable, or
3048 # (2) before a word containing "conftest.", or (3) at the end.
3049 # Note that $ac_compile itself does not contain backslashes and begins
3050 # with a dollar sign (not a hyphen), so the echo should work correctly.
3051 # The option is referenced via a variable to avoid confusing sed.
3052 lt_compile=`echo "$ac_compile" | $SED \
3053 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3054 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3055 -e 's:$: $lt_compiler_flag:'`
3056 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3057 (eval "$lt_compile" 2>conftest.err)
3059 cat conftest.err >&AS_MESSAGE_LOG_FD
3060 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3061 if (exit $ac_status) && test -s "$ac_outfile"; then
3062 # The compiler can only warn and ignore the option if not recognized
3063 # So say no if there are warnings other than the usual output.
3064 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
3065 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3066 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3073 if test x"[$]$2" = xyes; then
3074 m4_if([$5], , :, [$5])
3076 m4_if([$6], , :, [$6])
3078 ])# _LT_COMPILER_OPTION
3081 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3082 dnl aclocal-1.4 backwards compatibility:
3083 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3086 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3087 # [ACTION-SUCCESS], [ACTION-FAILURE])
3088 # ----------------------------------------------------
3089 # Check whether the given linker option works
3090 AC_DEFUN([_LT_LINKER_OPTION],
3091 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3092 m4_require([_LT_DECL_SED])dnl
3093 AC_CACHE_CHECK([$1], [$2],
3095 save_LDFLAGS="$LDFLAGS"
3096 LDFLAGS="$LDFLAGS $3"
3097 echo "$lt_simple_link_test_code" > conftest.$ac_ext
3098 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3099 # The linker can only warn and ignore the option if not recognized
3100 # So say no if there are warnings
3101 if test -s conftest.err; then
3102 # Append any errors to the config.log.
3103 cat conftest.err 1>&AS_MESSAGE_LOG_FD
3104 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
3105 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3106 if diff conftest.exp conftest.er2 >/dev/null; then
3114 LDFLAGS="$save_LDFLAGS"
3117 if test x"[$]$2" = xyes; then
3118 m4_if([$4], , :, [$4])
3120 m4_if([$5], , :, [$5])
3122 ])# _LT_LINKER_OPTION
3125 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3126 dnl aclocal-1.4 backwards compatibility:
3127 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3132 AC_DEFUN([LT_CMD_MAX_LEN],
3133 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3134 # find the maximum length of command line arguments
3135 AC_MSG_CHECKING([the maximum length of command line arguments])
3136 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3142 # On DJGPP, this test can blow up pretty badly due to problems in libc
3143 # (any single argument exceeding 2000 bytes causes a buffer overrun
3144 # during glob expansion). Even if it were fixed, the result of this
3145 # check would be larger than it should be.
3146 lt_cv_sys_max_cmd_len=12288; # 12K is about right
3150 # Under GNU Hurd, this test is not required because there is
3151 # no limit to the length of command line arguments.
3152 # Libtool will interpret -1 as no limit whatsoever
3153 lt_cv_sys_max_cmd_len=-1;
3156 cygwin* | mingw* | cegcc*)
3157 # On Win9x/ME, this test blows up -- it succeeds, but takes
3158 # about 5 minutes as the teststring grows exponentially.
3159 # Worse, since 9x/ME are not pre-emptively multitasking,
3160 # you end up with a "frozen" computer, even though with patience
3161 # the test eventually succeeds (with a max line length of 256k).
3162 # Instead, let's just punt: use the minimum linelength reported by
3163 # all of the supported platforms: 8192 (on NT/2K/XP).
3164 lt_cv_sys_max_cmd_len=8192;
3168 # On AmigaOS with pdksh, this test takes hours, literally.
3169 # So we just punt and use a minimum line length of 8192.
3170 lt_cv_sys_max_cmd_len=8192;
3173 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3174 # This has been around since 386BSD, at least. Likely further.
3175 if test -x /sbin/sysctl; then
3176 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3177 elif test -x /usr/sbin/sysctl; then
3178 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3180 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
3182 # And add a safety zone
3183 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3184 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3188 # We know the value 262144 and hardcode it with a safety zone (like BSD)
3189 lt_cv_sys_max_cmd_len=196608
3193 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3194 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3195 # nice to cause kernel panics so lets avoid the loop below.
3196 # First set a reasonable default.
3197 lt_cv_sys_max_cmd_len=16384
3199 if test -x /sbin/sysconfig; then
3200 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3201 *1*) lt_cv_sys_max_cmd_len=-1 ;;
3206 lt_cv_sys_max_cmd_len=102400
3208 sysv5* | sco5v6* | sysv4.2uw2*)
3209 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3210 if test -n "$kargmax"; then
3211 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
3213 lt_cv_sys_max_cmd_len=32768
3217 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3218 if test -n "$lt_cv_sys_max_cmd_len"; then
3219 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3220 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3222 # Make teststring a little bigger before we do anything with it.
3223 # a 1K string should be a reasonable start.
3224 for i in 1 2 3 4 5 6 7 8 ; do
3225 teststring=$teststring$teststring
3227 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3228 # If test is not a shell built-in, we'll probably end up computing a
3229 # maximum length that is only half of the actual maximum length, but
3231 while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
3232 = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
3233 test $i != 17 # 1/2 MB should be enough
3236 teststring=$teststring$teststring
3238 # Only check the string length outside the loop.
3239 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3241 # Add a significant safety factor because C++ compilers can tack on
3242 # massive amounts of additional arguments before passing them to the
3243 # linker. It appears as though 1/2 is a usable value.
3244 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3249 if test -n $lt_cv_sys_max_cmd_len ; then
3250 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3254 max_cmd_len=$lt_cv_sys_max_cmd_len
3255 _LT_DECL([], [max_cmd_len], [0],
3256 [What is the maximum length of a command?])
3260 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3261 dnl aclocal-1.4 backwards compatibility:
3262 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3267 m4_defun([_LT_HEADER_DLFCN],
3268 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3269 ])# _LT_HEADER_DLFCN
3272 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3273 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3274 # ----------------------------------------------------------------
3275 m4_defun([_LT_TRY_DLOPEN_SELF],
3276 [m4_require([_LT_HEADER_DLFCN])dnl
3277 if test "$cross_compiling" = yes; then :
3280 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3281 lt_status=$lt_dlunknown
3282 cat > conftest.$ac_ext <<_LT_EOF
3283 [#line __oline__ "configure"
3284 #include "confdefs.h"
3293 # define LT_DLGLOBAL RTLD_GLOBAL
3296 # define LT_DLGLOBAL DL_GLOBAL
3298 # define LT_DLGLOBAL 0
3302 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3303 find out it does not work in some platform. */
3304 #ifndef LT_DLLAZY_OR_NOW
3306 # define LT_DLLAZY_OR_NOW RTLD_LAZY
3309 # define LT_DLLAZY_OR_NOW DL_LAZY
3312 # define LT_DLLAZY_OR_NOW RTLD_NOW
3315 # define LT_DLLAZY_OR_NOW DL_NOW
3317 # define LT_DLLAZY_OR_NOW 0
3324 void fnord() { int i=42;}
3327 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3328 int status = $lt_dlunknown;
3332 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
3333 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3334 /* dlclose (self); */
3342 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3343 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3346 x$lt_dlno_uscore) $1 ;;
3347 x$lt_dlneed_uscore) $2 ;;
3348 x$lt_dlunknown|x*) $3 ;;
3351 # compilation failed
3356 ])# _LT_TRY_DLOPEN_SELF
3359 # LT_SYS_DLOPEN_SELF
3360 # ------------------
3361 AC_DEFUN([LT_SYS_DLOPEN_SELF],
3362 [m4_require([_LT_HEADER_DLFCN])dnl
3363 if test "x$enable_dlopen" != xyes; then
3364 enable_dlopen=unknown
3365 enable_dlopen_self=unknown
3366 enable_dlopen_self_static=unknown
3373 lt_cv_dlopen="load_add_on"
3375 lt_cv_dlopen_self=yes
3378 mingw* | pw32* | cegcc*)
3379 lt_cv_dlopen="LoadLibrary"
3384 lt_cv_dlopen="dlopen"
3389 # if libdl is installed we need to link against it
3390 AC_CHECK_LIB([dl], [dlopen],
3391 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3394 lt_cv_dlopen_self=yes
3399 AC_CHECK_FUNC([shl_load],
3400 [lt_cv_dlopen="shl_load"],
3401 [AC_CHECK_LIB([dld], [shl_load],
3402 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3403 [AC_CHECK_FUNC([dlopen],
3404 [lt_cv_dlopen="dlopen"],
3405 [AC_CHECK_LIB([dl], [dlopen],
3406 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3407 [AC_CHECK_LIB([svld], [dlopen],
3408 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3409 [AC_CHECK_LIB([dld], [dld_link],
3410 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3419 if test "x$lt_cv_dlopen" != xno; then
3425 case $lt_cv_dlopen in
3427 save_CPPFLAGS="$CPPFLAGS"
3428 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3430 save_LDFLAGS="$LDFLAGS"
3431 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3434 LIBS="$lt_cv_dlopen_libs $LIBS"
3436 AC_CACHE_CHECK([whether a program can dlopen itself],
3437 lt_cv_dlopen_self, [dnl
3438 _LT_TRY_DLOPEN_SELF(
3439 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3440 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3443 if test "x$lt_cv_dlopen_self" = xyes; then
3444 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3445 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3446 lt_cv_dlopen_self_static, [dnl
3447 _LT_TRY_DLOPEN_SELF(
3448 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3449 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
3453 CPPFLAGS="$save_CPPFLAGS"
3454 LDFLAGS="$save_LDFLAGS"
3459 case $lt_cv_dlopen_self in
3460 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3461 *) enable_dlopen_self=unknown ;;
3464 case $lt_cv_dlopen_self_static in
3465 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3466 *) enable_dlopen_self_static=unknown ;;
3469 _LT_DECL([dlopen_support], [enable_dlopen], [0],
3470 [Whether dlopen is supported])
3471 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3472 [Whether dlopen of programs is supported])
3473 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3474 [Whether dlopen of statically linked programs is supported])
3475 ])# LT_SYS_DLOPEN_SELF
3478 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3479 dnl aclocal-1.4 backwards compatibility:
3480 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3483 # _LT_COMPILER_C_O([TAGNAME])
3484 # ---------------------------
3485 # Check to see if options -c and -o are simultaneously supported by compiler.
3486 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
3487 m4_defun([_LT_COMPILER_C_O],
3488 [m4_require([_LT_DECL_SED])dnl
3489 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3490 m4_require([_LT_TAG_COMPILER])dnl
3491 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3492 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3493 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3494 $RM -r conftest 2>/dev/null
3498 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3500 lt_compiler_flag="-o out/conftest2.$ac_objext"
3501 # Insert the option either (1) after the last *FLAGS variable, or
3502 # (2) before a word containing "conftest.", or (3) at the end.
3503 # Note that $ac_compile itself does not contain backslashes and begins
3504 # with a dollar sign (not a hyphen), so the echo should work correctly.
3505 lt_compile=`echo "$ac_compile" | $SED \
3506 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3507 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3508 -e 's:$: $lt_compiler_flag:'`
3509 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3510 (eval "$lt_compile" 2>out/conftest.err)
3512 cat out/conftest.err >&AS_MESSAGE_LOG_FD
3513 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3514 if (exit $ac_status) && test -s out/conftest2.$ac_objext
3516 # The compiler can only warn and ignore the option if not recognized
3517 # So say no if there are warnings
3518 $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
3519 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3520 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3521 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3524 chmod u+w . 2>&AS_MESSAGE_LOG_FD
3526 # SGI C++ compiler will create directory out/ii_files/ for
3527 # template instantiation
3528 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3529 $RM out/* && rmdir out
3534 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3535 [Does compiler simultaneously support -c and -o options?])
3536 ])# _LT_COMPILER_C_O
3539 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3540 # ----------------------------------
3541 # Check to see if we can do hard links to lock some files if needed
3542 m4_defun([_LT_COMPILER_FILE_LOCKS],
3543 [m4_require([_LT_ENABLE_LOCK])dnl
3544 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3545 _LT_COMPILER_C_O([$1])
3547 hard_links="nottested"
3548 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3549 # do not overwrite the value of need_locks provided by the user
3550 AC_MSG_CHECKING([if we can lock with hard links])
3553 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3555 ln conftest.a conftest.b 2>&5 || hard_links=no
3556 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3557 AC_MSG_RESULT([$hard_links])
3558 if test "$hard_links" = no; then
3559 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3565 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3566 ])# _LT_COMPILER_FILE_LOCKS
3571 m4_defun([_LT_CHECK_OBJDIR],
3572 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3573 [rm -f .libs 2>/dev/null
3574 mkdir .libs 2>/dev/null
3575 if test -d .libs; then
3578 # MS-DOS does not allow filenames that begin with a dot.
3581 rmdir .libs 2>/dev/null])
3582 objdir=$lt_cv_objdir
3583 _LT_DECL([], [objdir], [0],
3584 [The name of the directory that contains temporary libtool files])dnl
3585 m4_pattern_allow([LT_OBJDIR])dnl
3586 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3587 [Define to the sub-directory in which libtool stores uninstalled libraries.])
3588 ])# _LT_CHECK_OBJDIR
3591 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3592 # --------------------------------------
3593 # Check hardcoding attributes.
3594 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3595 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3596 _LT_TAGVAR(hardcode_action, $1)=
3597 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3598 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3599 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3601 # We can hardcode non-existent directories.
3602 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3603 # If the only mechanism to avoid hardcoding is shlibpath_var, we
3604 # have to relink, otherwise we might link with an installed library
3605 # when we should be linking with a yet-to-be-installed one
3606 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3607 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3608 # Linking always hardcodes the temporary library directory.
3609 _LT_TAGVAR(hardcode_action, $1)=relink
3611 # We can link without hardcoding, and we can hardcode nonexisting dirs.
3612 _LT_TAGVAR(hardcode_action, $1)=immediate
3615 # We cannot hardcode anything, or else we can only hardcode existing
3617 _LT_TAGVAR(hardcode_action, $1)=unsupported
3619 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3621 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3622 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3623 # Fast installation is not supported
3624 enable_fast_install=no
3625 elif test "$shlibpath_overrides_runpath" = yes ||
3626 test "$enable_shared" = no; then
3627 # Fast installation is not necessary
3628 enable_fast_install=needless
3630 _LT_TAGDECL([], [hardcode_action], [0],
3631 [How to hardcode a shared library path into an executable])
3632 ])# _LT_LINKER_HARDCODE_LIBPATH
3637 m4_defun([_LT_CMD_STRIPLIB],
3638 [m4_require([_LT_DECL_EGREP])
3641 AC_MSG_CHECKING([whether stripping libraries is possible])
3642 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3643 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3644 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3645 AC_MSG_RESULT([yes])
3647 # FIXME - insert some real tests, host_os isn't really good enough
3650 if test -n "$STRIP" ; then
3651 striplib="$STRIP -x"
3652 old_striplib="$STRIP -S"
3653 AC_MSG_RESULT([yes])
3663 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3664 _LT_DECL([], [striplib], [1])
3665 ])# _LT_CMD_STRIPLIB
3668 # _LT_SYS_DYNAMIC_LINKER([TAG])
3669 # -----------------------------
3670 # PORTME Fill in your ld.so characteristics
3671 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3672 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3673 m4_require([_LT_DECL_EGREP])dnl
3674 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3675 m4_require([_LT_DECL_OBJDUMP])dnl
3676 m4_require([_LT_DECL_SED])dnl
3677 AC_MSG_CHECKING([dynamic linker characteristics])
3680 if test "$GCC" = yes; then
3682 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3683 *) lt_awk_arg="/^libraries:/" ;;
3685 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3686 if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
3687 # if the path contains ";" then we assume it to be the separator
3688 # otherwise default to the standard path separator (i.e. ":") - it is
3689 # assumed that no part of a normal pathname contains ";" but that should
3690 # okay in the real world where ";" in dirpaths is itself problematic.
3691 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
3693 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3695 # Ok, now we have the path, separated by spaces, we can step through it
3696 # and add multilib dir if necessary.
3697 lt_tmp_lt_search_path_spec=
3698 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3699 for lt_sys_path in $lt_search_path_spec; do
3700 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3701 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3703 test -d "$lt_sys_path" && \
3704 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3707 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
3708 BEGIN {RS=" "; FS="/|\n";} {
3711 for (lt_i = NF; lt_i > 0; lt_i--) {
3712 if ($lt_i != "" && $lt_i != ".") {
3713 if ($lt_i == "..") {
3716 if (lt_count == 0) {
3717 lt_foo="/" $lt_i lt_foo;
3724 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3725 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3727 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
3729 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3732 libname_spec='lib$name'
3740 shlibpath_overrides_runpath=unknown
3742 dynamic_linker="$host_os ld.so"
3743 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3744 need_lib_prefix=unknown
3745 hardcode_into_libs=no
3747 # when you set need_version to no, make sure it does not cause -set_version
3748 # flags to be left without arguments
3749 need_version=unknown
3754 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3755 shlibpath_var=LIBPATH
3757 # AIX 3 has no versioning support, so we append a major version to the name.
3758 soname_spec='${libname}${release}${shared_ext}$major'
3765 hardcode_into_libs=yes
3766 if test "$host_cpu" = ia64; then
3767 # AIX 5 supports IA64
3768 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3769 shlibpath_var=LD_LIBRARY_PATH
3771 # With GCC up to 2.95.x, collect2 would create an import file
3772 # for dependence libraries. The import file would start with
3773 # the line `#! .'. This would cause the generated library to
3774 # depend on `.', always an invalid library. This was fixed in
3775 # development snapshots of GCC prior to 3.0.
3777 aix4 | aix4.[[01]] | aix4.[[01]].*)
3778 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3780 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3787 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3788 # soname into executable. Probably we can add versioning support to
3789 # collect2, so additional links can be useful in future.
3790 if test "$aix_use_runtimelinking" = yes; then
3791 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3792 # instead of lib<name>.a to let people know that these are not
3793 # typical AIX shared libraries.
3794 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3796 # We preserve .a as extension for shared libraries through AIX4.2
3797 # and later when we are not doing run time linking.
3798 library_names_spec='${libname}${release}.a $libname.a'
3799 soname_spec='${libname}${release}${shared_ext}$major'
3801 shlibpath_var=LIBPATH
3808 # Since July 2007 AmigaOS4 officially supports .so libraries.
3809 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3810 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3813 library_names_spec='$libname.ixlibrary $libname.a'
3814 # Create ${libname}_ixlibrary.a entries in /sys/libs.
3815 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'
3821 library_names_spec='${libname}${shared_ext}'
3822 dynamic_linker="$host_os ld.so"
3823 shlibpath_var=LIBRARY_PATH
3829 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3830 soname_spec='${libname}${release}${shared_ext}$major'
3831 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3832 shlibpath_var=LD_LIBRARY_PATH
3833 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3834 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3835 # the default ld.so.conf also contains /usr/contrib/lib and
3836 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3837 # libtool to hard-code these into programs
3840 cygwin* | mingw* | pw32* | cegcc*)
3841 version_type=windows
3846 case $GCC,$host_os in
3847 yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
3848 library_names_spec='$libname.dll.a'
3849 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3850 postinstall_cmds='base_file=`basename \${file}`~
3851 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3852 dldir=$destdir/`dirname \$dlpath`~
3853 test -d \$dldir || mkdir -p \$dldir~
3854 $install_prog $dir/$dlname \$dldir/$dlname~
3855 chmod a+x \$dldir/$dlname~
3856 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3857 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3859 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3860 dlpath=$dir/\$dldll~
3862 shlibpath_overrides_runpath=yes
3866 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3867 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3868 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3871 # MinGW DLLs use traditional 'lib' prefix
3872 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3873 sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3874 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3875 # It is most probably a Windows format PATH printed by
3876 # mingw gcc, but we are running on Cygwin. Gcc prints its search
3877 # path with ; separators, and with drive letters. We can handle the
3878 # drive letters (cygwin fileutils understands them), so leave them,
3879 # especially as we might pass files found there to a mingw objdump,
3880 # which wouldn't understand a cygwinified path. Ahh.
3881 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3883 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3887 # pw32 DLLs use 'pw' prefix rather than 'lib'
3888 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3894 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3897 dynamic_linker='Win32 ld.exe'
3898 # FIXME: first we should search . and the directory the executable is in
3902 darwin* | rhapsody*)
3903 dynamic_linker="$host_os dyld"
3907 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3908 soname_spec='${libname}${release}${major}$shared_ext'
3909 shlibpath_overrides_runpath=yes
3910 shlibpath_var=DYLD_LIBRARY_PATH
3911 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3913 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3914 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3921 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3922 soname_spec='${libname}${release}${shared_ext}$major'
3923 shlibpath_var=LD_LIBRARY_PATH
3930 freebsd* | dragonfly*)
3931 # DragonFly does not have aout. When/if they implement a new
3932 # versioning mechanism, adjust this.
3933 if test -x /usr/bin/objformat; then
3934 objformat=`/usr/bin/objformat`
3937 freebsd[[123]]*) objformat=aout ;;
3941 version_type=freebsd-$objformat
3942 case $version_type in
3944 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3949 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3953 shlibpath_var=LD_LIBRARY_PATH
3956 shlibpath_overrides_runpath=yes
3958 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3959 shlibpath_overrides_runpath=yes
3960 hardcode_into_libs=yes
3962 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3963 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3964 shlibpath_overrides_runpath=no
3965 hardcode_into_libs=yes
3967 *) # from 4.6 on, and DragonFly
3968 shlibpath_overrides_runpath=yes
3969 hardcode_into_libs=yes
3978 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3979 soname_spec='${libname}${release}${shared_ext}$major'
3980 shlibpath_var=LD_LIBRARY_PATH
3981 hardcode_into_libs=yes
3984 hpux9* | hpux10* | hpux11*)
3985 # Give a soname corresponding to the major version so that dld.sl refuses to
3986 # link against other versions.
3993 hardcode_into_libs=yes
3994 dynamic_linker="$host_os dld.so"
3995 shlibpath_var=LD_LIBRARY_PATH
3996 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3997 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3998 soname_spec='${libname}${release}${shared_ext}$major'
3999 if test "X$HPUX_IA64_MODE" = X32; then
4000 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4002 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4004 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4008 hardcode_into_libs=yes
4009 dynamic_linker="$host_os dld.sl"
4010 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4011 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4012 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4013 soname_spec='${libname}${release}${shared_ext}$major'
4014 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4015 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4019 dynamic_linker="$host_os dld.sl"
4020 shlibpath_var=SHLIB_PATH
4021 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4022 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4023 soname_spec='${libname}${release}${shared_ext}$major'
4026 # HP-UX runs *really* slowly unless shared libraries are mode 555.
4027 postinstall_cmds='chmod 555 $lib'
4034 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4035 soname_spec='${libname}${release}${shared_ext}$major'
4036 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4037 shlibpath_var=LD_LIBRARY_PATH
4038 shlibpath_overrides_runpath=no
4039 hardcode_into_libs=yes
4042 irix5* | irix6* | nonstopux*)
4044 nonstopux*) version_type=nonstopux ;;
4046 if test "$lt_cv_prog_gnu_ld" = yes; then
4054 soname_spec='${libname}${release}${shared_ext}$major'
4055 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4057 irix5* | nonstopux*)
4061 case $LD in # libtool.m4 will add one of these switches to LD
4062 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4063 libsuff= shlibsuff= libmagic=32-bit;;
4064 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4065 libsuff=32 shlibsuff=N32 libmagic=N32;;
4066 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4067 libsuff=64 shlibsuff=64 libmagic=64-bit;;
4068 *) libsuff= shlibsuff= libmagic=never-match;;
4072 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4073 shlibpath_overrides_runpath=no
4074 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4075 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4076 hardcode_into_libs=yes
4079 # No shared lib support for Linux oldld, aout, or coff.
4080 linux*oldld* | linux*aout* | linux*coff*)
4084 # This must be Linux ELF.
4085 linux* | k*bsd*-gnu)
4089 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4090 soname_spec='${libname}${release}${shared_ext}$major'
4091 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4092 shlibpath_var=LD_LIBRARY_PATH
4093 shlibpath_overrides_runpath=no
4094 # Some binutils ld are patched to set DT_RUNPATH
4095 save_LDFLAGS=$LDFLAGS
4097 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4098 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4099 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4100 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4101 [shlibpath_overrides_runpath=yes])])
4102 LDFLAGS=$save_LDFLAGS
4105 # This implies no fast_install, which is unacceptable.
4106 # Some rework will be needed to allow for fast_install
4107 # before this can be enabled.
4108 hardcode_into_libs=yes
4110 # Append ld.so.conf contents to the search path
4111 if test -f /etc/ld.so.conf; then
4112 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' ' '`
4113 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4116 # We used to test for /lib/ld.so.1 and disable shared libraries on
4117 # powerpc, because MkLinux only supported shared libraries with the
4118 # GNU dynamic linker. Since this was broken with cross compilers,
4119 # most powerpc-linux boxes support dynamic linking these days and
4120 # people can always --disable-shared, the test was removed, and we
4121 # assume the GNU/Linux dynamic linker is in use.
4122 dynamic_linker='GNU/Linux ld.so'
4129 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4130 soname_spec='${libname}${release}${shared_ext}$major'
4131 shlibpath_var=LD_LIBRARY_PATH
4132 shlibpath_overrides_runpath=no
4133 hardcode_into_libs=yes
4134 dynamic_linker='NetBSD ld.elf_so'
4141 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4142 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4143 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4144 dynamic_linker='NetBSD (a.out) ld.so'
4146 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4147 soname_spec='${libname}${release}${shared_ext}$major'
4148 dynamic_linker='NetBSD ld.elf_so'
4150 shlibpath_var=LD_LIBRARY_PATH
4151 shlibpath_overrides_runpath=yes
4152 hardcode_into_libs=yes
4157 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4158 shlibpath_var=LD_LIBRARY_PATH
4159 shlibpath_overrides_runpath=yes
4166 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4167 soname_spec='${libname}${release}${shared_ext}$major'
4168 shlibpath_var=LD_LIBRARY_PATH
4169 shlibpath_overrides_runpath=no
4170 hardcode_into_libs=yes
4171 dynamic_linker='ldqnx.so'
4176 sys_lib_dlsearch_path_spec="/usr/lib"
4178 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4180 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
4181 *) need_version=no ;;
4183 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4184 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4185 shlibpath_var=LD_LIBRARY_PATH
4186 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4188 openbsd2.[[89]] | openbsd2.[[89]].*)
4189 shlibpath_overrides_runpath=no
4192 shlibpath_overrides_runpath=yes
4196 shlibpath_overrides_runpath=yes
4201 libname_spec='$name'
4204 library_names_spec='$libname${shared_ext} $libname.a'
4205 dynamic_linker='OS/2 ld.exe'
4206 shlibpath_var=LIBPATH
4209 osf3* | osf4* | osf5*)
4213 soname_spec='${libname}${release}${shared_ext}$major'
4214 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4215 shlibpath_var=LD_LIBRARY_PATH
4216 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4217 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4228 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4229 soname_spec='${libname}${release}${shared_ext}$major'
4230 shlibpath_var=LD_LIBRARY_PATH
4231 shlibpath_overrides_runpath=yes
4232 hardcode_into_libs=yes
4233 # ldd complains unless libraries are executable
4234 postinstall_cmds='chmod +x $lib'
4239 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4240 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4241 shlibpath_var=LD_LIBRARY_PATH
4242 shlibpath_overrides_runpath=yes
4243 if test "$with_gnu_ld" = yes; then
4251 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4252 soname_spec='${libname}${release}${shared_ext}$major'
4253 shlibpath_var=LD_LIBRARY_PATH
4254 case $host_vendor in
4256 shlibpath_overrides_runpath=no
4258 runpath_var=LD_RUN_PATH
4266 shlibpath_overrides_runpath=no
4267 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4273 if test -d /usr/nec ;then
4275 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4276 soname_spec='$libname${shared_ext}.$major'
4277 shlibpath_var=LD_LIBRARY_PATH
4281 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4282 version_type=freebsd-elf
4285 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4286 soname_spec='${libname}${release}${shared_ext}$major'
4287 shlibpath_var=LD_LIBRARY_PATH
4288 shlibpath_overrides_runpath=yes
4289 hardcode_into_libs=yes
4290 if test "$with_gnu_ld" = yes; then
4291 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4293 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4296 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4300 sys_lib_dlsearch_path_spec='/usr/lib'
4304 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
4308 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4309 shlibpath_var=LD_LIBRARY_PATH
4310 shlibpath_overrides_runpath=no
4311 hardcode_into_libs=yes
4316 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4317 soname_spec='${libname}${release}${shared_ext}$major'
4318 shlibpath_var=LD_LIBRARY_PATH
4325 AC_MSG_RESULT([$dynamic_linker])
4326 test "$dynamic_linker" = no && can_build_shared=no
4328 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4329 if test "$GCC" = yes; then
4330 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4333 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4334 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4336 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4337 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4340 _LT_DECL([], [variables_saved_for_relink], [1],
4341 [Variables whose values should be saved in libtool wrapper scripts and
4342 restored at link time])
4343 _LT_DECL([], [need_lib_prefix], [0],
4344 [Do we need the "lib" prefix for modules?])
4345 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4346 _LT_DECL([], [version_type], [0], [Library versioning type])
4347 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
4348 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4349 _LT_DECL([], [shlibpath_overrides_runpath], [0],
4350 [Is shlibpath searched before the hard-coded library search path?])
4351 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4352 _LT_DECL([], [library_names_spec], [1],
4353 [[List of archive names. First name is the real one, the rest are links.
4354 The last name is the one that the linker finds with -lNAME]])
4355 _LT_DECL([], [soname_spec], [1],
4356 [[The coded name of the library, if different from the real name]])
4357 _LT_DECL([], [postinstall_cmds], [2],
4358 [Command to use after installation of a shared archive])
4359 _LT_DECL([], [postuninstall_cmds], [2],
4360 [Command to use after uninstallation of a shared archive])
4361 _LT_DECL([], [finish_cmds], [2],
4362 [Commands used to finish a libtool library installation in a directory])
4363 _LT_DECL([], [finish_eval], [1],
4364 [[As "finish_cmds", except a single script fragment to be evaled but
4366 _LT_DECL([], [hardcode_into_libs], [0],
4367 [Whether we should hardcode library paths into libraries])
4368 _LT_DECL([], [sys_lib_search_path_spec], [2],
4369 [Compile-time system search path for libraries])
4370 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4371 [Run-time system search path for libraries])
4372 ])# _LT_SYS_DYNAMIC_LINKER
4375 # _LT_PATH_TOOL_PREFIX(TOOL)
4376 # --------------------------
4377 # find a file program which can recognize shared library
4378 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4379 [m4_require([_LT_DECL_EGREP])dnl
4380 AC_MSG_CHECKING([for $1])
4381 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4383 [[\\/*] | ?:[\\/]*])
4384 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4387 lt_save_MAGIC_CMD="$MAGIC_CMD"
4388 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4389 dnl $ac_dummy forces splitting on constant user-supplied paths.
4390 dnl POSIX.2 word splitting is done only on the output of word expansions,
4391 dnl not every word. This closes a longstanding sh security hole.
4392 ac_dummy="m4_if([$2], , $PATH, [$2])"
4393 for ac_dir in $ac_dummy; do
4395 test -z "$ac_dir" && ac_dir=.
4396 if test -f $ac_dir/$1; then
4397 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4398 if test -n "$file_magic_test_file"; then
4399 case $deplibs_check_method in
4401 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4402 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4403 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4404 $EGREP "$file_magic_regex" > /dev/null; then
4409 *** Warning: the command libtool uses to detect shared libraries,
4410 *** $file_magic_cmd, produces output that libtool cannot recognize.
4411 *** The result is that libtool may fail to recognize shared libraries
4412 *** as such. This will affect the creation of libtool libraries that
4413 *** depend on shared libraries, but programs linked with such libtool
4414 *** libraries will work regardless of this problem. Nevertheless, you
4415 *** may want to report the problem to your system manager and/or to
4416 *** bug-libtool@gnu.org
4426 MAGIC_CMD="$lt_save_MAGIC_CMD"
4429 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4430 if test -n "$MAGIC_CMD"; then
4431 AC_MSG_RESULT($MAGIC_CMD)
4435 _LT_DECL([], [MAGIC_CMD], [0],
4436 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4437 ])# _LT_PATH_TOOL_PREFIX
4440 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4441 dnl aclocal-1.4 backwards compatibility:
4442 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4447 # find a file program which can recognize a shared library
4448 m4_defun([_LT_PATH_MAGIC],
4449 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4450 if test -z "$lt_cv_path_MAGIC_CMD"; then
4451 if test -n "$ac_tool_prefix"; then
4452 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4462 # find the pathname to the GNU or non-GNU linker
4463 AC_DEFUN([LT_PATH_LD],
4464 [AC_REQUIRE([AC_PROG_CC])dnl
4465 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4466 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4467 m4_require([_LT_DECL_SED])dnl
4468 m4_require([_LT_DECL_EGREP])dnl
4470 AC_ARG_WITH([gnu-ld],
4471 [AS_HELP_STRING([--with-gnu-ld],
4472 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4473 [test "$withval" = no || with_gnu_ld=yes],
4474 [with_gnu_ld=no])dnl
4477 if test "$GCC" = yes; then
4478 # Check if gcc -print-prog-name=ld gives a path.
4479 AC_MSG_CHECKING([for ld used by $CC])
4482 # gcc leaves a trailing carriage return which upsets mingw
4483 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4485 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4488 # Accept absolute paths.
4489 [[\\/]]* | ?:[[\\/]]*)
4490 re_direlt='/[[^/]][[^/]]*/\.\./'
4491 # Canonicalize the pathname of ld
4492 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4493 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4494 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4496 test -z "$LD" && LD="$ac_prog"
4499 # If it fails, then pretend we aren't using GCC.
4503 # If it is relative, then search for the first ld in PATH.
4507 elif test "$with_gnu_ld" = yes; then
4508 AC_MSG_CHECKING([for GNU ld])
4510 AC_MSG_CHECKING([for non-GNU ld])
4512 AC_CACHE_VAL(lt_cv_path_LD,
4513 [if test -z "$LD"; then
4514 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4515 for ac_dir in $PATH; do
4517 test -z "$ac_dir" && ac_dir=.
4518 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4519 lt_cv_path_LD="$ac_dir/$ac_prog"
4520 # Check to see if the program is GNU ld. I'd rather use --version,
4521 # but apparently some variants of GNU ld only accept -v.
4522 # Break only if it was the GNU/non-GNU ld that we prefer.
4523 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4524 *GNU* | *'with BFD'*)
4525 test "$with_gnu_ld" != no && break
4528 test "$with_gnu_ld" != yes && break
4535 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4538 if test -n "$LD"; then
4543 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4547 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4551 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4552 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4553 dnl aclocal-1.4 backwards compatibility:
4554 dnl AC_DEFUN([AM_PROG_LD], [])
4555 dnl AC_DEFUN([AC_PROG_LD], [])
4560 m4_defun([_LT_PATH_LD_GNU],
4561 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4562 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4563 case `$LD -v 2>&1 </dev/null` in
4564 *GNU* | *'with BFD'*)
4565 lt_cv_prog_gnu_ld=yes
4568 lt_cv_prog_gnu_ld=no
4571 with_gnu_ld=$lt_cv_prog_gnu_ld
4577 # find reload flag for linker
4578 # -- PORTME Some linkers may need a different reload flag.
4579 m4_defun([_LT_CMD_RELOAD],
4580 [AC_CACHE_CHECK([for $LD option to reload object files],
4581 lt_cv_ld_reload_flag,
4582 [lt_cv_ld_reload_flag='-r'])
4583 reload_flag=$lt_cv_ld_reload_flag
4584 case $reload_flag in
4586 *) reload_flag=" $reload_flag" ;;
4588 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4591 if test "$GCC" = yes; then
4592 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4594 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4598 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4599 _LT_DECL([], [reload_cmds], [2])dnl
4603 # _LT_CHECK_MAGIC_METHOD
4604 # ----------------------
4605 # how to check for library dependencies
4606 # -- PORTME fill in with the dynamic library characteristics
4607 m4_defun([_LT_CHECK_MAGIC_METHOD],
4608 [m4_require([_LT_DECL_EGREP])
4609 m4_require([_LT_DECL_OBJDUMP])
4610 AC_CACHE_CHECK([how to recognize dependent libraries],
4611 lt_cv_deplibs_check_method,
4612 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4613 lt_cv_file_magic_test_file=
4614 lt_cv_deplibs_check_method='unknown'
4615 # Need to set the preceding variable on all platforms that support
4616 # interlibrary dependencies.
4617 # 'none' -- dependencies not supported.
4618 # `unknown' -- same as none, but documents that we really don't know.
4619 # 'pass_all' -- all dependencies passed with no checks.
4620 # 'test_compile' -- check by making test program.
4621 # 'file_magic [[regex]]' -- check by looking for files in library path
4622 # which responds to the $file_magic_cmd with a given extended regex.
4623 # If you have `file' or equivalent on your system and you're not sure
4624 # whether `pass_all' will *always* work, you probably want this one.
4628 lt_cv_deplibs_check_method=pass_all
4632 lt_cv_deplibs_check_method=pass_all
4636 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4637 lt_cv_file_magic_cmd='/usr/bin/file -L'
4638 lt_cv_file_magic_test_file=/shlib/libc.so
4642 # func_win32_libid is a shell function defined in ltmain.sh
4643 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4644 lt_cv_file_magic_cmd='func_win32_libid'
4648 # Base MSYS/MinGW do not provide the 'file' command needed by
4649 # func_win32_libid shell function, so use a weaker test based on 'objdump',
4650 # unless we find 'file', for example because we are cross-compiling.
4651 if ( file / ) >/dev/null 2>&1; then
4652 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4653 lt_cv_file_magic_cmd='func_win32_libid'
4655 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4656 lt_cv_file_magic_cmd='$OBJDUMP -f'
4661 # use the weaker test based on 'objdump'. See mingw*.
4662 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4663 lt_cv_file_magic_cmd='$OBJDUMP -f'
4666 darwin* | rhapsody*)
4667 lt_cv_deplibs_check_method=pass_all
4670 freebsd* | dragonfly*)
4671 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4674 # Not sure whether the presence of OpenBSD here was a mistake.
4675 # Let's accept both of them until this is cleared up.
4676 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4677 lt_cv_file_magic_cmd=/usr/bin/file
4678 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4682 lt_cv_deplibs_check_method=pass_all
4687 lt_cv_deplibs_check_method=pass_all
4690 hpux10.20* | hpux11*)
4691 lt_cv_file_magic_cmd=/usr/bin/file
4694 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4695 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4698 [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]']
4699 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4702 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4703 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4709 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4710 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4713 irix5* | irix6* | nonstopux*)
4715 *-32|*"-32 ") libmagic=32-bit;;
4716 *-n32|*"-n32 ") libmagic=N32;;
4717 *-64|*"-64 ") libmagic=64-bit;;
4718 *) libmagic=never-match;;
4720 lt_cv_deplibs_check_method=pass_all
4723 # This must be Linux ELF.
4724 linux* | k*bsd*-gnu)
4725 lt_cv_deplibs_check_method=pass_all
4728 netbsd* | netbsdelf*-gnu)
4729 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4730 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4732 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4737 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4738 lt_cv_file_magic_cmd=/usr/bin/file
4739 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4743 lt_cv_deplibs_check_method=pass_all
4747 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4748 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4750 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4754 osf3* | osf4* | osf5*)
4755 lt_cv_deplibs_check_method=pass_all
4759 lt_cv_deplibs_check_method=pass_all
4763 lt_cv_deplibs_check_method=pass_all
4766 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4767 lt_cv_deplibs_check_method=pass_all
4771 case $host_vendor in
4773 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]]'
4774 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4777 lt_cv_deplibs_check_method=pass_all
4780 lt_cv_file_magic_cmd='/bin/file'
4781 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4784 lt_cv_file_magic_cmd='/bin/file'
4785 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4786 lt_cv_file_magic_test_file=/lib/libc.so
4789 lt_cv_deplibs_check_method=pass_all
4792 lt_cv_deplibs_check_method=pass_all
4798 lt_cv_deplibs_check_method=pass_all
4802 file_magic_cmd=$lt_cv_file_magic_cmd
4803 deplibs_check_method=$lt_cv_deplibs_check_method
4804 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4806 _LT_DECL([], [deplibs_check_method], [1],
4807 [Method to check whether dependent libraries are shared objects])
4808 _LT_DECL([], [file_magic_cmd], [1],
4809 [Command to use when deplibs_check_method == "file_magic"])
4810 ])# _LT_CHECK_MAGIC_METHOD
4815 # find the pathname to a BSD- or MS-compatible name lister
4816 AC_DEFUN([LT_PATH_NM],
4817 [AC_REQUIRE([AC_PROG_CC])dnl
4818 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4819 [if test -n "$NM"; then
4820 # Let the user override the test.
4823 lt_nm_to_check="${ac_tool_prefix}nm"
4824 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4825 lt_nm_to_check="$lt_nm_to_check nm"
4827 for lt_tmp_nm in $lt_nm_to_check; do
4828 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4829 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4831 test -z "$ac_dir" && ac_dir=.
4832 tmp_nm="$ac_dir/$lt_tmp_nm"
4833 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4834 # Check to see if the nm accepts a BSD-compat flag.
4835 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4836 # nm: unknown option "B" ignored
4837 # Tru64's nm complains that /dev/null is an invalid object file
4838 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4839 */dev/null* | *'Invalid file or object type'*)
4840 lt_cv_path_NM="$tmp_nm -B"
4844 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4846 lt_cv_path_NM="$tmp_nm -p"
4850 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4851 continue # so that we can try to find one that supports BSD flags
4860 : ${lt_cv_path_NM=no}
4862 if test "$lt_cv_path_NM" != "no"; then
4865 # Didn't find any BSD compatible name lister, look for dumpbin.
4866 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
4868 if test "$DUMPBIN" != ":"; then
4872 test -z "$NM" && NM=nm
4874 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4876 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4877 [lt_cv_nm_interface="BSD nm"
4878 echo "int some_variable = 0;" > conftest.$ac_ext
4879 (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4880 (eval "$ac_compile" 2>conftest.err)
4881 cat conftest.err >&AS_MESSAGE_LOG_FD
4882 (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4883 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4884 cat conftest.err >&AS_MESSAGE_LOG_FD
4885 (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
4886 cat conftest.out >&AS_MESSAGE_LOG_FD
4887 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4888 lt_cv_nm_interface="MS dumpbin"
4894 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4895 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4896 dnl aclocal-1.4 backwards compatibility:
4897 dnl AC_DEFUN([AM_PROG_NM], [])
4898 dnl AC_DEFUN([AC_PROG_NM], [])
4903 # check for math library
4904 AC_DEFUN([LT_LIB_M],
4905 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4908 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4909 # These system don't have libm, or don't need it
4912 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4913 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4916 AC_CHECK_LIB(m, cos, LIBM="-lm")
4923 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4924 dnl aclocal-1.4 backwards compatibility:
4925 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4928 # _LT_COMPILER_NO_RTTI([TAGNAME])
4929 # -------------------------------
4930 m4_defun([_LT_COMPILER_NO_RTTI],
4931 [m4_require([_LT_TAG_COMPILER])dnl
4933 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4935 if test "$GCC" = yes; then
4936 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4938 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4939 lt_cv_prog_compiler_rtti_exceptions,
4940 [-fno-rtti -fno-exceptions], [],
4941 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4943 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4944 [Compiler flag to turn off builtin functions])
4945 ])# _LT_COMPILER_NO_RTTI
4948 # _LT_CMD_GLOBAL_SYMBOLS
4949 # ----------------------
4950 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4951 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4952 AC_REQUIRE([AC_PROG_CC])dnl
4953 AC_REQUIRE([LT_PATH_NM])dnl
4954 AC_REQUIRE([LT_PATH_LD])dnl
4955 m4_require([_LT_DECL_SED])dnl
4956 m4_require([_LT_DECL_EGREP])dnl
4957 m4_require([_LT_TAG_COMPILER])dnl
4959 # Check for command to grab the raw symbol name followed by C symbol from nm.
4960 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4961 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4963 # These are sane defaults that work on at least a few old systems.
4964 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4966 # Character class describing NM global symbol codes.
4967 symcode='[[BCDEGRST]]'
4969 # Regexp to match symbols that can be accessed directly from C.
4970 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4972 # Define system-specific variables.
4977 cygwin* | mingw* | pw32* | cegcc*)
4978 symcode='[[ABCDGISTW]]'
4981 if test "$host_cpu" = ia64; then
4982 symcode='[[ABCDEGRST]]'
4986 symcode='[[BCDEGRST]]'
4989 symcode='[[BCDEGQRST]]'
5000 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5004 symcode='[[DFNSTU]]'
5008 # If we're using GNU nm, then use its standard symbol codes.
5009 case `$NM -V 2>&1` in
5010 *GNU* | *'with BFD'*)
5011 symcode='[[ABCDGIRSTW]]' ;;
5014 # Transform an extracted symbol line into a proper C declaration.
5015 # Some systems (esp. on ia64) link data and code symbols differently,
5016 # so use this general approach.
5017 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5019 # Transform an extracted symbol line into symbol name and symbol address
5020 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
5021 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'"
5023 # Handle CRLF in mingw tool chain
5027 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5031 # Try without a prefix underscore, then with it.
5032 for ac_symprfx in "" "_"; do
5034 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5035 symxfrm="\\1 $ac_symprfx\\2 \\2"
5037 # Write the raw and C identifiers.
5038 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5039 # Fake it for dumpbin and say T for any non-static function
5040 # and D for any global variable.
5041 # Also find C++ and __fastcall symbols from MSVC++,
5042 # which start with @ or ?.
5043 lt_cv_sys_global_symbol_pipe="$AWK ['"\
5044 " {last_section=section; section=\$ 3};"\
5045 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5046 " \$ 0!~/External *\|/{next};"\
5047 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5048 " {if(hide[section]) next};"\
5049 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5050 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5051 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
5052 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5053 " ' prfx=^$ac_symprfx]"
5055 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5058 # Check to see that the pipe works correctly.
5062 cat > conftest.$ac_ext <<_LT_EOF
5067 void nm_test_func(void);
5068 void nm_test_func(void){}
5072 int main(){nm_test_var='a';nm_test_func();return(0);}
5075 if AC_TRY_EVAL(ac_compile); then
5076 # Now try to grab the symbols.
5078 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5079 # Try sorting and uniquifying the output.
5080 if sort "$nlist" | uniq > "$nlist"T; then
5081 mv -f "$nlist"T "$nlist"
5086 # Make sure that we snagged all the symbols we need.
5087 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5088 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5089 cat <<_LT_EOF > conftest.$ac_ext
5095 # Now generate the symbol file.
5096 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5098 cat <<_LT_EOF >> conftest.$ac_ext
5100 /* The mapping between symbol names and symbols. */
5105 lt__PROGRAM__LTX_preloaded_symbols[[]] =
5107 { "@PROGRAM@", (void *) 0 },
5109 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5110 cat <<\_LT_EOF >> conftest.$ac_ext
5114 /* This works around a problem in FreeBSD linker */
5115 #ifdef FREEBSD_WORKAROUND
5116 static const void *lt_preloaded_setup() {
5117 return lt__PROGRAM__LTX_preloaded_symbols;
5125 # Now try linking the two files.
5126 mv conftest.$ac_objext conftstm.$ac_objext
5127 lt_save_LIBS="$LIBS"
5128 lt_save_CFLAGS="$CFLAGS"
5129 LIBS="conftstm.$ac_objext"
5130 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5131 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5134 LIBS="$lt_save_LIBS"
5135 CFLAGS="$lt_save_CFLAGS"
5137 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5140 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5143 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5146 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5147 cat conftest.$ac_ext >&5
5149 rm -rf conftest* conftst*
5151 # Do not use the global_symbol_pipe unless it works.
5152 if test "$pipe_works" = yes; then
5155 lt_cv_sys_global_symbol_pipe=
5159 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5160 lt_cv_sys_global_symbol_to_cdecl=
5162 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5163 AC_MSG_RESULT(failed)
5168 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5169 [Take the output of nm and produce a listing of raw symbols and C names])
5170 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5171 [Transform the output of nm in a proper C declaration])
5172 _LT_DECL([global_symbol_to_c_name_address],
5173 [lt_cv_sys_global_symbol_to_c_name_address], [1],
5174 [Transform the output of nm in a C name address pair])
5175 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5176 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5177 [Transform the output of nm in a C name address pair when lib prefix is needed])
5178 ]) # _LT_CMD_GLOBAL_SYMBOLS
5181 # _LT_COMPILER_PIC([TAGNAME])
5182 # ---------------------------
5183 m4_defun([_LT_COMPILER_PIC],
5184 [m4_require([_LT_TAG_COMPILER])dnl
5185 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
5186 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5187 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5189 AC_MSG_CHECKING([for $compiler option to produce PIC])
5190 m4_if([$1], [CXX], [
5191 # C++ specific cases for pic, static, wl, etc.
5192 if test "$GXX" = yes; then
5193 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5194 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5198 # All AIX code is PIC.
5199 if test "$host_cpu" = ia64; then
5200 # AIX 5 now supports IA64 processor
5201 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5208 # see comment about AmigaOS4 .so support
5209 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5212 # FIXME: we need at least 68020 code to build shared libraries, but
5213 # adding the `-m68020' flag to GCC prevents building anything better,
5215 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5220 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5221 # PIC is the default for these OSes.
5223 mingw* | cygwin* | os2* | pw32* | cegcc*)
5224 # This hack is so that the source file can tell whether it is being
5225 # built for inclusion in a dll (and should export symbols for example).
5226 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5227 # (--disable-auto-import) libraries
5228 m4_if([$1], [GCJ], [],
5229 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5231 darwin* | rhapsody*)
5232 # PIC is the default on this platform
5233 # Common symbols not allowed in MH_DYLIB files
5234 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5237 # DJGPP does not support shared libraries at all
5238 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5241 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5242 # Instead, we relocate shared libraries at runtime.
5245 if test -d /usr/nec; then
5246 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
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.
5257 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5262 # QNX uses GNU C++, but need to define -shared option too, otherwise
5264 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5267 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5273 # All AIX code is PIC.
5274 if test "$host_cpu" = ia64; then
5275 # AIX 5 now supports IA64 processor
5276 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5278 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5282 case $cc_basename in
5284 # Green Hills C++ Compiler
5285 # _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"
5290 case $cc_basename in
5292 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5295 # Green Hills C++ Compiler
5296 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5302 freebsd* | dragonfly*)
5303 # FreeBSD uses GNU C++
5305 hpux9* | hpux10* | hpux11*)
5306 case $cc_basename in
5308 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5309 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5310 if test "$host_cpu" != ia64; then
5311 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5315 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5316 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5322 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5331 # This is c89, which is MS Visual C++ (no shared libs)
5332 # Anyone wants to do a port?
5334 irix5* | irix6* | nonstopux*)
5335 case $cc_basename in
5337 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5338 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5339 # CC pic flag -KPIC is the default.
5345 linux* | k*bsd*-gnu)
5346 case $cc_basename in
5349 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5350 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5353 # old Intel C++ for x86_64 which still supported -KPIC.
5354 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5355 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5356 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5359 # Intel C++, used to be incompatible with GCC.
5360 # ICC 10 doesn't accept -KPIC any more.
5361 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5362 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5363 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5366 # Portland Group C++ compiler
5367 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5368 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5369 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5373 # Make sure the PIC flag is empty. It appears that all Alpha
5374 # Linux and Compaq Tru64 Unix objects are PIC.
5375 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5376 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5380 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5381 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5382 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5385 case `$CC -V 2>&1 | sed 5q` in
5388 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5389 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5390 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5401 case $cc_basename in
5403 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5409 netbsd* | netbsdelf*-gnu)
5412 # QNX uses GNU C++, but need to define -shared option too, otherwise
5414 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5416 osf3* | osf4* | osf5*)
5417 case $cc_basename in
5419 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5422 # Rational C++ 2.4.1
5423 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5426 # Digital/Compaq C++
5427 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5428 # Make sure the PIC flag is empty. It appears that all Alpha
5429 # Linux and Compaq Tru64 Unix objects are PIC.
5430 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5431 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5440 case $cc_basename in
5442 # Sun C++ 4.2, 5.x and Centerline C++
5443 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5444 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5445 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5448 # Green Hills C++ Compiler
5449 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5456 case $cc_basename in
5459 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5460 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5464 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5470 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5471 case $cc_basename in
5473 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5474 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5475 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5480 case $cc_basename in
5482 # NonStop-UX NCC 3.20
5483 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5492 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5498 if test "$GCC" = yes; then
5499 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5500 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5504 # All AIX code is PIC.
5505 if test "$host_cpu" = ia64; then
5506 # AIX 5 now supports IA64 processor
5507 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5514 # see comment about AmigaOS4 .so support
5515 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5518 # FIXME: we need at least 68020 code to build shared libraries, but
5519 # adding the `-m68020' flag to GCC prevents building anything better,
5521 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5526 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5527 # PIC is the default for these OSes.
5530 mingw* | cygwin* | pw32* | os2* | cegcc*)
5531 # This hack is so that the source file can tell whether it is being
5532 # built for inclusion in a dll (and should export symbols for example).
5533 # Although the cygwin gcc ignores -fPIC, still need this for old-style
5534 # (--disable-auto-import) libraries
5535 m4_if([$1], [GCJ], [],
5536 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5539 darwin* | rhapsody*)
5540 # PIC is the default on this platform
5541 # Common symbols not allowed in MH_DYLIB files
5542 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5546 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5547 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
5548 # sets the default TLS model and affects inlining.
5554 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5560 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5561 # Instead, we relocate shared libraries at runtime.
5565 # Just because we use GCC doesn't mean we suddenly get shared libraries
5566 # on systems that don't support them.
5567 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5572 # QNX uses GNU C++, but need to define -shared option too, otherwise
5574 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5578 if test -d /usr/nec; then
5579 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5584 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5588 # PORTME Check for flag to pass linker flags through the system compiler.
5591 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5592 if test "$host_cpu" = ia64; then
5593 # AIX 5 now supports IA64 processor
5594 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5596 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5600 mingw* | cygwin* | pw32* | os2* | cegcc*)
5601 # This hack is so that the source file can tell whether it is being
5602 # built for inclusion in a dll (and should export symbols for example).
5603 m4_if([$1], [GCJ], [],
5604 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5607 hpux9* | hpux10* | hpux11*)
5608 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5609 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5616 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5619 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5620 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5623 irix5* | irix6* | nonstopux*)
5624 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5625 # PIC (with -KPIC) is the default.
5626 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5629 linux* | k*bsd*-gnu)
5630 case $cc_basename in
5631 # old Intel for x86_64 which still supported -KPIC.
5633 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5634 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5635 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5637 # icc used to be incompatible with GCC.
5638 # ICC 10 doesn't accept -KPIC any more.
5640 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5641 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5642 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5644 # Lahey Fortran 8.1.
5646 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5647 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5648 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5650 pgcc* | pgf77* | pgf90* | pgf95*)
5651 # Portland Group compilers (*not* the Pentium gcc compiler,
5652 # which looks to be a dead project)
5653 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5654 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5655 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5658 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5659 # All Alpha code is PIC.
5660 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5663 # IBM XL C 8.0/Fortran 10.1 on PPC
5664 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5665 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5666 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5669 case `$CC -V 2>&1 | sed 5q` in
5672 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5673 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5674 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5677 # Sun Fortran 8.3 passes all unrecognized flags to the linker
5678 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5679 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5680 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5688 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5689 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5693 # QNX uses GNU C++, but need to define -shared option too, otherwise
5695 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5698 osf3* | osf4* | osf5*)
5699 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5700 # All OSF/1 code is PIC.
5701 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5705 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5709 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5710 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5711 case $cc_basename in
5713 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5715 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5720 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5721 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5722 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5725 sysv4 | sysv4.2uw2* | sysv4.3*)
5726 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5727 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5728 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5732 if test -d /usr/nec ;then
5733 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5734 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5738 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5739 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5740 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5741 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5745 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5746 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5750 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5751 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5755 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5761 # For platforms which do not support PIC, -DPIC is meaningless:
5763 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5766 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5769 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5770 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5771 [How to pass a linker flag through the compiler])
5774 # Check to make sure the PIC flag actually works.
5776 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5777 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5778 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5779 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5780 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5782 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5784 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5785 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5787 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5788 [Additional compiler flags for building library objects])
5791 # Check to make sure the static flag actually works.
5793 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5794 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5795 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5796 $lt_tmp_static_flag,
5798 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5799 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5800 [Compiler flag to prevent dynamic linking])
5801 ])# _LT_COMPILER_PIC
5804 # _LT_LINKER_SHLIBS([TAGNAME])
5805 # ----------------------------
5806 # See if the linker supports building shared libraries.
5807 m4_defun([_LT_LINKER_SHLIBS],
5808 [AC_REQUIRE([LT_PATH_LD])dnl
5809 AC_REQUIRE([LT_PATH_NM])dnl
5810 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5811 m4_require([_LT_DECL_EGREP])dnl
5812 m4_require([_LT_DECL_SED])dnl
5813 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5814 m4_require([_LT_TAG_COMPILER])dnl
5815 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5816 m4_if([$1], [CXX], [
5817 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5820 # If we're using GNU nm, then we don't want the "-C" option.
5821 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5822 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5823 _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'
5825 _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'
5829 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5831 cygwin* | mingw* | cegcc*)
5832 _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'
5834 linux* | k*bsd*-gnu)
5835 _LT_TAGVAR(link_all_deplibs, $1)=no
5838 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5841 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5844 _LT_TAGVAR(allow_undefined_flag, $1)=
5845 _LT_TAGVAR(always_export_symbols, $1)=no
5846 _LT_TAGVAR(archive_cmds, $1)=
5847 _LT_TAGVAR(archive_expsym_cmds, $1)=
5848 _LT_TAGVAR(compiler_needs_object, $1)=no
5849 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5850 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5851 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5852 _LT_TAGVAR(hardcode_automatic, $1)=no
5853 _LT_TAGVAR(hardcode_direct, $1)=no
5854 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5855 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5856 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5857 _LT_TAGVAR(hardcode_libdir_separator, $1)=
5858 _LT_TAGVAR(hardcode_minus_L, $1)=no
5859 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5860 _LT_TAGVAR(inherit_rpath, $1)=no
5861 _LT_TAGVAR(link_all_deplibs, $1)=unknown
5862 _LT_TAGVAR(module_cmds, $1)=
5863 _LT_TAGVAR(module_expsym_cmds, $1)=
5864 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5865 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5866 _LT_TAGVAR(thread_safe_flag_spec, $1)=
5867 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5868 # include_expsyms should be a list of space-separated symbols to be *always*
5869 # included in the symbol list
5870 _LT_TAGVAR(include_expsyms, $1)=
5871 # exclude_expsyms can be an extended regexp of symbols to exclude
5872 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5873 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5874 # as well as any symbol that contains `d'.
5875 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5876 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5877 # platforms (ab)use it in PIC code, but their linkers get confused if
5878 # the symbol is explicitly referenced. Since portable code cannot
5879 # rely on this symbol name, it's probably fine to never include it in
5880 # preloaded symbol tables.
5881 # Exclude shared library initialization/finalization symbols.
5882 dnl Note also adjust exclude_expsyms for C++ above.
5883 extract_expsyms_cmds=
5886 cygwin* | mingw* | pw32* | cegcc*)
5887 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5888 # When not using gcc, we currently assume that we are using
5889 # Microsoft Visual C++.
5890 if test "$GCC" != yes; then
5895 # we just hope/assume this is gcc and not c89 (= MSVC++)
5903 _LT_TAGVAR(ld_shlibs, $1)=yes
5904 if test "$with_gnu_ld" = yes; then
5905 # If archive_cmds runs LD, not CC, wlarc should be empty
5908 # Set some defaults for GNU ld with shared library support. These
5909 # are reset later if shared libraries are not supported. Putting them
5910 # here allows them to be overridden if necessary.
5911 runpath_var=LD_RUN_PATH
5912 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5913 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5914 # ancient GNU ld didn't support --whole-archive et. al.
5915 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5916 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5918 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5920 supports_anon_versioning=no
5921 case `$LD -v 2>&1` in
5922 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5923 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5924 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5925 *\ 2.11.*) ;; # other 2.11 versions
5926 *) supports_anon_versioning=yes ;;
5929 # See if GNU ld supports shared libraries.
5932 # On AIX/PPC, the GNU linker is very broken
5933 if test "$host_cpu" != ia64; then
5934 _LT_TAGVAR(ld_shlibs, $1)=no
5937 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5938 *** to be unable to reliably create shared libraries on AIX.
5939 *** Therefore, libtool is disabling shared libraries support. If you
5940 *** really care for shared libraries, you may want to modify your PATH
5941 *** so that a non-GNU linker is found, and then restart.
5950 # see comment about AmigaOS4 .so support
5951 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5952 _LT_TAGVAR(archive_expsym_cmds, $1)=''
5955 _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)'
5956 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5957 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5963 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5964 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5965 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5966 # support --undefined. This deserves some investigation. FIXME
5967 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5969 _LT_TAGVAR(ld_shlibs, $1)=no
5973 cygwin* | mingw* | pw32* | cegcc*)
5974 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5975 # as there is no search path for DLLs.
5976 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5977 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5978 _LT_TAGVAR(always_export_symbols, $1)=no
5979 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5980 _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'
5982 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5983 _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'
5984 # If the export-symbols file already is a .def file (1st line
5985 # is EXPORTS), use it as is; otherwise, prepend...
5986 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5987 cp $export_symbols $output_objdir/$soname.def;
5989 echo EXPORTS > $output_objdir/$soname.def;
5990 cat $export_symbols >> $output_objdir/$soname.def;
5992 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5994 _LT_TAGVAR(ld_shlibs, $1)=no
5999 _LT_TAGVAR(hardcode_direct, $1)=no
6000 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6001 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6002 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6003 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6004 # Instead, shared libraries are loaded at an image base (0x10000000 by
6005 # default) and relocated if they conflict, which is a slow very memory
6006 # consuming and fragmenting process. To avoid this, we pick a random,
6007 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6008 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6009 _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'
6010 _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'
6013 gnu* | linux* | tpf* | k*bsd*-gnu)
6015 if test "$host_os" = linux-dietlibc; then
6016 case $cc_basename in
6017 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
6020 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6021 && test "$tmp_diet" = no
6024 tmp_sharedflag='-shared'
6025 case $cc_basename,$host_cpu in
6026 pgcc*) # Portland Group C compiler
6027 _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'
6028 tmp_addflag=' $pic_flag'
6030 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
6031 _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'
6032 tmp_addflag=' $pic_flag -Mnomain' ;;
6033 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
6034 tmp_addflag=' -i_dynamic' ;;
6035 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
6036 tmp_addflag=' -i_dynamic -nofor_main' ;;
6037 ifc* | ifort*) # Intel Fortran compiler
6038 tmp_addflag=' -nofor_main' ;;
6039 lf95*) # Lahey Fortran 8.1
6040 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6041 tmp_sharedflag='--shared' ;;
6042 xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6043 tmp_sharedflag='-qmkshrobj'
6046 case `$CC -V 2>&1 | sed 5q` in
6047 *Sun\ C*) # Sun C 5.9
6048 _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'
6049 _LT_TAGVAR(compiler_needs_object, $1)=yes
6050 tmp_sharedflag='-G' ;;
6051 *Sun\ F*) # Sun Fortran 8.3
6052 tmp_sharedflag='-G' ;;
6054 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6056 if test "x$supports_anon_versioning" = xyes; then
6057 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6058 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6059 echo "local: *; };" >> $output_objdir/$libname.ver~
6060 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6063 case $cc_basename in
6065 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6066 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6067 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6068 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6069 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
6070 if test "x$supports_anon_versioning" = xyes; then
6071 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6072 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6073 echo "local: *; };" >> $output_objdir/$libname.ver~
6074 $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6079 _LT_TAGVAR(ld_shlibs, $1)=no
6083 netbsd* | netbsdelf*-gnu)
6084 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6085 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6088 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6089 _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'
6094 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6095 _LT_TAGVAR(ld_shlibs, $1)=no
6098 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6099 *** create shared libraries on Solaris systems. Therefore, libtool
6100 *** is disabling shared libraries support. We urge you to upgrade GNU
6101 *** binutils to release 2.9.1 or newer. Another option is to modify
6102 *** your PATH or compiler configuration so that the native linker is
6103 *** used, and then restart.
6106 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6107 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6108 _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'
6110 _LT_TAGVAR(ld_shlibs, $1)=no
6114 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6115 case `$LD -v 2>&1` in
6116 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6117 _LT_TAGVAR(ld_shlibs, $1)=no
6120 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6121 *** reliably create shared libraries on SCO systems. Therefore, libtool
6122 *** is disabling shared libraries support. We urge you to upgrade GNU
6123 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
6124 *** your PATH or compiler configuration so that the native linker is
6125 *** used, and then restart.
6130 # For security reasons, it is highly recommended that you always
6131 # use absolute paths for naming shared libraries, and exclude the
6132 # DT_RUNPATH tag from executables and libraries. But doing so
6133 # requires that you compile everything twice, which is a pain.
6134 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6135 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6136 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6137 _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'
6139 _LT_TAGVAR(ld_shlibs, $1)=no
6146 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6148 _LT_TAGVAR(hardcode_direct, $1)=yes
6149 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6153 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6154 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6155 _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'
6157 _LT_TAGVAR(ld_shlibs, $1)=no
6162 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6164 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6165 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6166 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6169 # PORTME fill in a description of your system's linker (not GNU ld)
6172 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6173 _LT_TAGVAR(always_export_symbols, $1)=yes
6174 _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'
6175 # Note: this linker hardcodes the directories in LIBPATH if there
6176 # are no directories specified by -L.
6177 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6178 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6179 # Neither direct hardcoding nor static linking is supported with a
6181 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6186 if test "$host_cpu" = ia64; then
6187 # On IA64, the linker does run time linking by default, so we don't
6188 # have to do anything special.
6189 aix_use_runtimelinking=no
6190 exp_sym_flag='-Bexport'
6193 # If we're using GNU nm, then we don't want the "-C" option.
6194 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6195 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6196 _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'
6198 _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'
6200 aix_use_runtimelinking=no
6202 # Test if we are trying to use run time linking or normal
6203 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6204 # need to do runtime linking.
6205 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6206 for ld_flag in $LDFLAGS; do
6207 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6208 aix_use_runtimelinking=yes
6215 exp_sym_flag='-bexport'
6216 no_entry_flag='-bnoentry'
6219 # When large executables or shared objects are built, AIX ld can
6220 # have problems creating the table of contents. If linking a library
6221 # or program results in "error TOC overflow" add -mminimal-toc to
6222 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
6223 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6225 _LT_TAGVAR(archive_cmds, $1)=''
6226 _LT_TAGVAR(hardcode_direct, $1)=yes
6227 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6228 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6229 _LT_TAGVAR(link_all_deplibs, $1)=yes
6230 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6232 if test "$GCC" = yes; then
6233 case $host_os in aix4.[[012]]|aix4.[[012]].*)
6234 # We only want to do this on AIX 4.2 and lower, the check
6235 # below for broken collect2 doesn't work under 4.3+
6236 collect2name=`${CC} -print-prog-name=collect2`
6237 if test -f "$collect2name" &&
6238 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6240 # We have reworked collect2
6243 # We have old collect2
6244 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6245 # It fails to find uninstalled libraries when the uninstalled
6246 # path is not listed in the libpath. Setting hardcode_minus_L
6247 # to unsupported forces relinking
6248 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6249 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6250 _LT_TAGVAR(hardcode_libdir_separator, $1)=
6254 shared_flag='-shared'
6255 if test "$aix_use_runtimelinking" = yes; then
6256 shared_flag="$shared_flag "'${wl}-G'
6258 _LT_TAGVAR(link_all_deplibs, $1)=no
6261 if test "$host_cpu" = ia64; then
6262 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6263 # chokes on -Wl,-G. The following line is correct:
6266 if test "$aix_use_runtimelinking" = yes; then
6267 shared_flag='${wl}-G'
6269 shared_flag='${wl}-bM:SRE'
6274 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6275 # It seems that -bexpall does not export symbols beginning with
6276 # underscore (_), so it is better to generate a list of symbols to export.
6277 _LT_TAGVAR(always_export_symbols, $1)=yes
6278 if test "$aix_use_runtimelinking" = yes; then
6279 # Warning - without using the other runtime loading flags (-brtl),
6280 # -berok will link without error, but may produce a broken library.
6281 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6282 # Determine the default libpath from the value encoded in an
6284 _LT_SYS_MODULE_PATH_AIX
6285 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6286 _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"
6288 if test "$host_cpu" = ia64; then
6289 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6290 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6291 _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"
6293 # Determine the default libpath from the value encoded in an
6295 _LT_SYS_MODULE_PATH_AIX
6296 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6297 # Warning - without using the other run time loading flags,
6298 # -berok will link without error, but may produce a broken library.
6299 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6300 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6301 # Exported symbols can be pulled into shared objects from archives
6302 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6303 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6304 # This is similar to how AIX traditionally builds its shared libraries.
6305 _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'
6313 # see comment about AmigaOS4 .so support
6314 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6315 _LT_TAGVAR(archive_expsym_cmds, $1)=''
6318 _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)'
6319 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6320 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6326 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6329 cygwin* | mingw* | pw32* | cegcc*)
6330 # When not using gcc, we currently assume that we are using
6331 # Microsoft Visual C++.
6332 # hardcode_libdir_flag_spec is actually meaningless, as there is
6333 # no search path for DLLs.
6334 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6335 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6336 # Tell ltmain to make .lib files, not .a files.
6338 # Tell ltmain to make .dll files, not .so files.
6340 # FIXME: Setting linknames here is a bad hack.
6341 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
6342 # The linker will automatically build a .lib file if we build a DLL.
6343 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6344 # FIXME: Should let the user specify the lib program.
6345 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6346 _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6347 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6350 darwin* | rhapsody*)
6351 _LT_DARWIN_LINKER_FEATURES($1)
6355 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6356 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6357 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6361 _LT_TAGVAR(ld_shlibs, $1)=no
6364 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6365 # support. Future versions do this automatically, but an explicit c++rt0.o
6366 # does not break anything, and helps significantly (at the cost of a little
6369 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6370 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6371 _LT_TAGVAR(hardcode_direct, $1)=yes
6372 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6375 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6377 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6378 _LT_TAGVAR(hardcode_direct, $1)=yes
6379 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6380 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6383 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6384 freebsd* | dragonfly*)
6385 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6386 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6387 _LT_TAGVAR(hardcode_direct, $1)=yes
6388 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6392 if test "$GCC" = yes; then
6393 _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'
6395 _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'
6397 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6398 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6399 _LT_TAGVAR(hardcode_direct, $1)=yes
6401 # hardcode_minus_L: Not really in the search PATH,
6402 # but as the default location of the library.
6403 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6404 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6408 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6409 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6411 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6413 if test "$with_gnu_ld" = no; then
6414 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6415 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6416 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6417 _LT_TAGVAR(hardcode_direct, $1)=yes
6418 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6419 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6420 # hardcode_minus_L: Not really in the search PATH,
6421 # but as the default location of the library.
6422 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6427 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6430 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6433 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6436 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6442 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6445 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6448 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6452 if test "$with_gnu_ld" = no; then
6453 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6454 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6458 _LT_TAGVAR(hardcode_direct, $1)=no
6459 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6462 _LT_TAGVAR(hardcode_direct, $1)=yes
6463 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6464 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6466 # hardcode_minus_L: Not really in the search PATH,
6467 # but as the default location of the library.
6468 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6474 irix5* | irix6* | nonstopux*)
6475 if test "$GCC" = yes; then
6476 _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'
6477 # Try to use the -exported_symbol ld option, if it does not
6478 # work, assume that -exports_file does not work either and
6479 # implicitly export all symbols.
6480 save_LDFLAGS="$LDFLAGS"
6481 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6482 AC_LINK_IFELSE(int foo(void) {},
6483 _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'
6485 LDFLAGS="$save_LDFLAGS"
6487 _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'
6488 _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'
6490 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6491 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6492 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6493 _LT_TAGVAR(inherit_rpath, $1)=yes
6494 _LT_TAGVAR(link_all_deplibs, $1)=yes
6497 netbsd* | netbsdelf*-gnu)
6498 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6499 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6501 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6503 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6504 _LT_TAGVAR(hardcode_direct, $1)=yes
6505 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6509 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6510 _LT_TAGVAR(hardcode_direct, $1)=yes
6511 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6512 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6513 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6520 if test -f /usr/libexec/ld.so; then
6521 _LT_TAGVAR(hardcode_direct, $1)=yes
6522 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6523 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6524 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6525 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6526 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6527 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6528 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6531 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6532 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6533 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6536 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6537 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6542 _LT_TAGVAR(ld_shlibs, $1)=no
6547 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6548 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6549 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6550 _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'
6551 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6555 if test "$GCC" = yes; then
6556 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6557 _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'
6559 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6560 _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'
6562 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6563 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6564 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6567 osf4* | osf5*) # as osf3* with the addition of -msym flag
6568 if test "$GCC" = yes; then
6569 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6570 _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'
6571 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6573 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6574 _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'
6575 _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~
6576 $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'
6578 # Both c and cxx compiler support -rpath directly
6579 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6581 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6582 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6586 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6587 if test "$GCC" = yes; then
6589 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6590 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6591 $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6593 case `$CC -V 2>&1` in
6596 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6597 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6598 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6602 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6603 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6604 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6608 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6609 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6611 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6613 # The compiler driver will combine and reorder linker options,
6614 # but understands `-z linker_flag'. GCC discards it without `$wl',
6615 # but is careful enough not to reorder.
6616 # Supported since Solaris 2.6 (maybe 2.5.1?)
6617 if test "$GCC" = yes; then
6618 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6620 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6624 _LT_TAGVAR(link_all_deplibs, $1)=yes
6628 if test "x$host_vendor" = xsequent; then
6629 # Use $CC to link under sequent, because it throws in some extra .o
6630 # files that make .init and .fini sections work.
6631 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6633 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6635 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6636 _LT_TAGVAR(hardcode_direct, $1)=yes
6637 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6638 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6642 case $host_vendor in
6644 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6645 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6648 ## LD is ld it makes a PLAMLIB
6649 ## CC just makes a GrossModule.
6650 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6651 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6652 _LT_TAGVAR(hardcode_direct, $1)=no
6655 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6656 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6659 runpath_var='LD_RUN_PATH'
6660 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6664 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6665 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6666 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6670 if test -d /usr/nec; then
6671 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6672 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6673 runpath_var=LD_RUN_PATH
6674 hardcode_runpath_var=yes
6675 _LT_TAGVAR(ld_shlibs, $1)=yes
6679 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6680 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6681 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6682 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6683 runpath_var='LD_RUN_PATH'
6685 if test "$GCC" = yes; then
6686 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6687 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6689 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6690 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6694 sysv5* | sco3.2v5* | sco5v6*)
6695 # Note: We can NOT use -z defs as we might desire, because we do not
6696 # link with -lc, and that would cause any symbols used from libc to
6697 # always be unresolved, which means just about no library would
6698 # ever link correctly. If we're not using GNU ld we use -z text
6699 # though, which does catch some bad symbols but isn't as heavy-handed
6701 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6702 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6703 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6704 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6705 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6706 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6707 _LT_TAGVAR(link_all_deplibs, $1)=yes
6708 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6709 runpath_var='LD_RUN_PATH'
6711 if test "$GCC" = yes; then
6712 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6713 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6715 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6716 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6721 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6722 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6723 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6727 _LT_TAGVAR(ld_shlibs, $1)=no
6731 if test x$host_vendor = xsni; then
6733 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6734 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6740 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6741 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6743 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6745 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6746 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6747 _LT_DECL([], [extract_expsyms_cmds], [2],
6748 [The commands to extract the exported symbol list from a shared archive])
6751 # Do we need to explicitly link libc?
6753 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6755 # Assume -lc should be added
6756 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6758 if test "$enable_shared" = yes && test "$GCC" = yes; then
6759 case $_LT_TAGVAR(archive_cmds, $1) in
6761 # FIXME: we may have to deal with multi-command sequences.
6764 # Test whether the compiler implicitly links with -lc since on some
6765 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6766 # to ld, don't add -lc before -lgcc.
6767 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6769 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6771 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6774 libobjs=conftest.$ac_objext
6776 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6777 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6783 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6784 _LT_TAGVAR(allow_undefined_flag, $1)=
6785 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6787 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6789 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6791 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6793 cat conftest.err 1>&5
6796 AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
6803 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6804 [Whether or not to add -lc for building shared libraries])
6805 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6806 [enable_shared_with_static_runtimes], [0],
6807 [Whether or not to disallow shared libs when runtime libs are static])
6808 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6809 [Compiler flag to allow reflexive dlopens])
6810 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6811 [Compiler flag to generate shared objects directly from archives])
6812 _LT_TAGDECL([], [compiler_needs_object], [1],
6813 [Whether the compiler copes with passing no objects directly])
6814 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6815 [Create an old-style archive from a shared archive])
6816 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6817 [Create a temporary old-style archive to link instead of a shared archive])
6818 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6819 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6820 _LT_TAGDECL([], [module_cmds], [2],
6821 [Commands used to build a loadable module if different from building
6823 _LT_TAGDECL([], [module_expsym_cmds], [2])
6824 _LT_TAGDECL([], [with_gnu_ld], [1],
6825 [Whether we are building with GNU ld or not])
6826 _LT_TAGDECL([], [allow_undefined_flag], [1],
6827 [Flag that allows shared libraries with undefined symbols to be built])
6828 _LT_TAGDECL([], [no_undefined_flag], [1],
6829 [Flag that enforces no undefined symbols])
6830 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6831 [Flag to hardcode $libdir into a binary during linking.
6832 This must work even if $libdir does not exist])
6833 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6834 [[If ld is used when linking, flag to hardcode $libdir into a binary
6835 during linking. This must work even if $libdir does not exist]])
6836 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6837 [Whether we need a single "-rpath" flag with a separated argument])
6838 _LT_TAGDECL([], [hardcode_direct], [0],
6839 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6840 DIR into the resulting binary])
6841 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6842 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6843 DIR into the resulting binary and the resulting library dependency is
6844 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6845 library is relocated])
6846 _LT_TAGDECL([], [hardcode_minus_L], [0],
6847 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6848 into the resulting binary])
6849 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6850 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6851 into the resulting binary])
6852 _LT_TAGDECL([], [hardcode_automatic], [0],
6853 [Set to "yes" if building a shared library automatically hardcodes DIR
6854 into the library and all subsequent libraries and executables linked
6856 _LT_TAGDECL([], [inherit_rpath], [0],
6857 [Set to yes if linker adds runtime paths of dependent libraries
6858 to runtime path list])
6859 _LT_TAGDECL([], [link_all_deplibs], [0],
6860 [Whether libtool must link a program against all its dependency libraries])
6861 _LT_TAGDECL([], [fix_srcfile_path], [1],
6862 [Fix the shell variable $srcfile for the compiler])
6863 _LT_TAGDECL([], [always_export_symbols], [0],
6864 [Set to "yes" if exported symbols are required])
6865 _LT_TAGDECL([], [export_symbols_cmds], [2],
6866 [The commands to list exported symbols])
6867 _LT_TAGDECL([], [exclude_expsyms], [1],
6868 [Symbols that should not be listed in the preloaded symbols])
6869 _LT_TAGDECL([], [include_expsyms], [1],
6870 [Symbols that must always be exported])
6871 _LT_TAGDECL([], [prelink_cmds], [2],
6872 [Commands necessary for linking programs (against libraries) with templates])
6873 _LT_TAGDECL([], [file_list_spec], [1],
6874 [Specify filename containing input files])
6875 dnl FIXME: Not yet implemented
6876 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6877 dnl [Compiler flag to generate thread safe objects])
6878 ])# _LT_LINKER_SHLIBS
6881 # _LT_LANG_C_CONFIG([TAG])
6882 # ------------------------
6883 # Ensure that the configuration variables for a C compiler are suitably
6884 # defined. These variables are subsequently used by _LT_CONFIG to write
6885 # the compiler configuration to `libtool'.
6886 m4_defun([_LT_LANG_C_CONFIG],
6887 [m4_require([_LT_DECL_EGREP])dnl
6891 # Source file extension for C test sources.
6894 # Object file extension for compiled C test sources.
6896 _LT_TAGVAR(objext, $1)=$objext
6898 # Code to be used in simple compile tests
6899 lt_simple_compile_test_code="int some_variable = 0;"
6901 # Code to be used in simple link tests
6902 lt_simple_link_test_code='int main(){return(0);}'
6905 # Save the default compiler, since it gets overwritten when the other
6906 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6907 compiler_DEFAULT=$CC
6909 # save warnings/boilerplate of simple test code
6910 _LT_COMPILER_BOILERPLATE
6911 _LT_LINKER_BOILERPLATE
6913 if test -n "$compiler"; then
6914 _LT_COMPILER_NO_RTTI($1)
6915 _LT_COMPILER_PIC($1)
6916 _LT_COMPILER_C_O($1)
6917 _LT_COMPILER_FILE_LOCKS($1)
6918 _LT_LINKER_SHLIBS($1)
6919 _LT_SYS_DYNAMIC_LINKER($1)
6920 _LT_LINKER_HARDCODE_LIBPATH($1)
6924 # Report which library types will actually be built
6925 AC_MSG_CHECKING([if libtool supports shared libraries])
6926 AC_MSG_RESULT([$can_build_shared])
6928 AC_MSG_CHECKING([whether to build shared libraries])
6929 test "$can_build_shared" = "no" && enable_shared=no
6931 # On AIX, shared libraries and static libraries use the same namespace, and
6932 # are all built from PIC.
6935 test "$enable_shared" = yes && enable_static=no
6936 if test -n "$RANLIB"; then
6937 archive_cmds="$archive_cmds~\$RANLIB \$lib"
6938 postinstall_cmds='$RANLIB $lib'
6943 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6944 test "$enable_shared" = yes && enable_static=no
6948 AC_MSG_RESULT([$enable_shared])
6950 AC_MSG_CHECKING([whether to build static libraries])
6951 # Make sure either enable_shared or enable_static is yes.
6952 test "$enable_shared" = yes || enable_static=yes
6953 AC_MSG_RESULT([$enable_static])
6959 ])# _LT_LANG_C_CONFIG
6964 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
6965 # compiler, we have our own version here.
6966 m4_defun([_LT_PROG_CXX],
6968 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
6970 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6971 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6972 (test "X$CXX" != "Xg++"))) ; then
6975 _lt_caught_CXX_error=yes
6977 popdef([AC_MSG_ERROR])
6980 dnl aclocal-1.4 backwards compatibility:
6981 dnl AC_DEFUN([_LT_PROG_CXX], [])
6984 # _LT_LANG_CXX_CONFIG([TAG])
6985 # --------------------------
6986 # Ensure that the configuration variables for a C++ compiler are suitably
6987 # defined. These variables are subsequently used by _LT_CONFIG to write
6988 # the compiler configuration to `libtool'.
6989 m4_defun([_LT_LANG_CXX_CONFIG],
6990 [AC_REQUIRE([_LT_PROG_CXX])dnl
6991 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6992 m4_require([_LT_DECL_EGREP])dnl
6995 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6996 _LT_TAGVAR(allow_undefined_flag, $1)=
6997 _LT_TAGVAR(always_export_symbols, $1)=no
6998 _LT_TAGVAR(archive_expsym_cmds, $1)=
6999 _LT_TAGVAR(compiler_needs_object, $1)=no
7000 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7001 _LT_TAGVAR(hardcode_direct, $1)=no
7002 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7003 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7004 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7005 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7006 _LT_TAGVAR(hardcode_minus_L, $1)=no
7007 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7008 _LT_TAGVAR(hardcode_automatic, $1)=no
7009 _LT_TAGVAR(inherit_rpath, $1)=no
7010 _LT_TAGVAR(module_cmds, $1)=
7011 _LT_TAGVAR(module_expsym_cmds, $1)=
7012 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7013 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7014 _LT_TAGVAR(no_undefined_flag, $1)=
7015 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7016 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7018 # Source file extension for C++ test sources.
7021 # Object file extension for compiled C++ test sources.
7023 _LT_TAGVAR(objext, $1)=$objext
7025 # No sense in running all these tests if we already determined that
7026 # the CXX compiler isn't working. Some variables (like enable_shared)
7027 # are currently assumed to apply to all compilers on this platform,
7028 # and will be corrupted by setting them based on a non-working compiler.
7029 if test "$_lt_caught_CXX_error" != yes; then
7030 # Code to be used in simple compile tests
7031 lt_simple_compile_test_code="int some_variable = 0;"
7033 # Code to be used in simple link tests
7034 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7036 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7039 # save warnings/boilerplate of simple test code
7040 _LT_COMPILER_BOILERPLATE
7041 _LT_LINKER_BOILERPLATE
7043 # Allow CC to be a program name with arguments.
7048 lt_save_with_gnu_ld=$with_gnu_ld
7049 lt_save_path_LD=$lt_cv_path_LD
7050 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7051 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7053 $as_unset lt_cv_prog_gnu_ld
7055 if test -n "${lt_cv_path_LDCXX+set}"; then
7056 lt_cv_path_LD=$lt_cv_path_LDCXX
7058 $as_unset lt_cv_path_LD
7060 test -z "${LDCXX+set}" || LD=$LDCXX
7063 _LT_TAGVAR(compiler, $1)=$CC
7064 _LT_CC_BASENAME([$compiler])
7066 if test -n "$compiler"; then
7067 # We don't want -fno-exception when compiling C++ code, so set the
7068 # no_builtin_flag separately
7069 if test "$GXX" = yes; then
7070 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7072 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7075 if test "$GXX" = yes; then
7076 # Set up default GNU C++ configuration
7080 # Check if GNU C++ uses GNU ld as the underlying linker, since the
7081 # archiving commands below assume that GNU ld is being used.
7082 if test "$with_gnu_ld" = yes; then
7083 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7084 _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'
7086 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7087 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7089 # If archive_cmds runs LD, not CC, wlarc should be empty
7090 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7091 # investigate it a little bit more. (MM)
7094 # ancient GNU ld didn't support --whole-archive et. al.
7095 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7096 $GREP 'no-whole-archive' > /dev/null; then
7097 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7099 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7105 # A generic and very simple default shared library creation
7106 # command for GNU C++ for the case where it uses the native
7107 # linker, instead of GNU ld. If possible, this setting should
7108 # overridden to take advantage of the native linker features on
7109 # the platform it is being used on.
7110 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7113 # Commands to make compiler produce verbose output that lists
7114 # what "hidden" libraries, object files and flags are used when
7115 # linking a shared library.
7116 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7124 # PORTME: fill in a description of your system's C++ link characteristics
7125 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7126 _LT_TAGVAR(ld_shlibs, $1)=yes
7129 # FIXME: insert proper C++ library support
7130 _LT_TAGVAR(ld_shlibs, $1)=no
7133 if test "$host_cpu" = ia64; then
7134 # On IA64, the linker does run time linking by default, so we don't
7135 # have to do anything special.
7136 aix_use_runtimelinking=no
7137 exp_sym_flag='-Bexport'
7140 aix_use_runtimelinking=no
7142 # Test if we are trying to use run time linking or normal
7143 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7144 # need to do runtime linking.
7145 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7146 for ld_flag in $LDFLAGS; do
7149 aix_use_runtimelinking=yes
7157 exp_sym_flag='-bexport'
7158 no_entry_flag='-bnoentry'
7161 # When large executables or shared objects are built, AIX ld can
7162 # have problems creating the table of contents. If linking a library
7163 # or program results in "error TOC overflow" add -mminimal-toc to
7164 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7165 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7167 _LT_TAGVAR(archive_cmds, $1)=''
7168 _LT_TAGVAR(hardcode_direct, $1)=yes
7169 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7170 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7171 _LT_TAGVAR(link_all_deplibs, $1)=yes
7172 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7174 if test "$GXX" = yes; then
7175 case $host_os in aix4.[[012]]|aix4.[[012]].*)
7176 # We only want to do this on AIX 4.2 and lower, the check
7177 # below for broken collect2 doesn't work under 4.3+
7178 collect2name=`${CC} -print-prog-name=collect2`
7179 if test -f "$collect2name" &&
7180 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7182 # We have reworked collect2
7185 # We have old collect2
7186 _LT_TAGVAR(hardcode_direct, $1)=unsupported
7187 # It fails to find uninstalled libraries when the uninstalled
7188 # path is not listed in the libpath. Setting hardcode_minus_L
7189 # to unsupported forces relinking
7190 _LT_TAGVAR(hardcode_minus_L, $1)=yes
7191 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7192 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7195 shared_flag='-shared'
7196 if test "$aix_use_runtimelinking" = yes; then
7197 shared_flag="$shared_flag "'${wl}-G'
7201 if test "$host_cpu" = ia64; then
7202 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7203 # chokes on -Wl,-G. The following line is correct:
7206 if test "$aix_use_runtimelinking" = yes; then
7207 shared_flag='${wl}-G'
7209 shared_flag='${wl}-bM:SRE'
7214 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7215 # It seems that -bexpall does not export symbols beginning with
7216 # underscore (_), so it is better to generate a list of symbols to
7218 _LT_TAGVAR(always_export_symbols, $1)=yes
7219 if test "$aix_use_runtimelinking" = yes; then
7220 # Warning - without using the other runtime loading flags (-brtl),
7221 # -berok will link without error, but may produce a broken library.
7222 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7223 # Determine the default libpath from the value encoded in an empty
7225 _LT_SYS_MODULE_PATH_AIX
7226 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7228 _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"
7230 if test "$host_cpu" = ia64; then
7231 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7232 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7233 _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"
7235 # Determine the default libpath from the value encoded in an
7237 _LT_SYS_MODULE_PATH_AIX
7238 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7239 # Warning - without using the other run time loading flags,
7240 # -berok will link without error, but may produce a broken library.
7241 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7242 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7243 # Exported symbols can be pulled into shared objects from archives
7244 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7245 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7246 # This is similar to how AIX traditionally builds its shared
7248 _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'
7254 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7255 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7256 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7257 # support --undefined. This deserves some investigation. FIXME
7258 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7260 _LT_TAGVAR(ld_shlibs, $1)=no
7265 case $cc_basename in
7267 # FIXME: insert proper C++ library support
7268 _LT_TAGVAR(ld_shlibs, $1)=no
7273 cygwin* | mingw* | pw32* | cegcc*)
7274 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7275 # as there is no search path for DLLs.
7276 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7277 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7278 _LT_TAGVAR(always_export_symbols, $1)=no
7279 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7281 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7282 _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'
7283 # If the export-symbols file already is a .def file (1st line
7284 # is EXPORTS), use it as is; otherwise, prepend...
7285 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7286 cp $export_symbols $output_objdir/$soname.def;
7288 echo EXPORTS > $output_objdir/$soname.def;
7289 cat $export_symbols >> $output_objdir/$soname.def;
7291 $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'
7293 _LT_TAGVAR(ld_shlibs, $1)=no
7296 darwin* | rhapsody*)
7297 _LT_DARWIN_LINKER_FEATURES($1)
7301 case $cc_basename in
7303 # FIXME: insert proper C++ library support
7304 _LT_TAGVAR(ld_shlibs, $1)=no
7307 # Green Hills C++ Compiler
7308 # FIXME: insert proper C++ library support
7309 _LT_TAGVAR(ld_shlibs, $1)=no
7312 # FIXME: insert proper C++ library support
7313 _LT_TAGVAR(ld_shlibs, $1)=no
7319 # C++ shared libraries reported to be fairly broken before
7321 _LT_TAGVAR(ld_shlibs, $1)=no
7325 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7328 freebsd* | dragonfly*)
7329 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7331 _LT_TAGVAR(ld_shlibs, $1)=yes
7338 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7339 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7340 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7341 _LT_TAGVAR(hardcode_direct, $1)=yes
7342 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7343 # but as the default
7344 # location of the library.
7346 case $cc_basename in
7348 # FIXME: insert proper C++ library support
7349 _LT_TAGVAR(ld_shlibs, $1)=no
7352 _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'
7353 # Commands to make compiler produce verbose output that lists
7354 # what "hidden" libraries, object files and flags are used when
7355 # linking a shared library.
7357 # There doesn't appear to be a way to prevent this compiler from
7358 # explicitly linking system object files so we need to strip them
7359 # from the output so that they don't get included in the library
7361 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'
7364 if test "$GXX" = yes; then
7365 _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'
7367 # FIXME: insert proper C++ library support
7368 _LT_TAGVAR(ld_shlibs, $1)=no
7375 if test $with_gnu_ld = no; then
7376 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7377 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7383 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7389 _LT_TAGVAR(hardcode_direct, $1)=no
7390 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7393 _LT_TAGVAR(hardcode_direct, $1)=yes
7394 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7395 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7396 # but as the default
7397 # location of the library.
7401 case $cc_basename in
7403 # FIXME: insert proper C++ library support
7404 _LT_TAGVAR(ld_shlibs, $1)=no
7409 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7412 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7415 _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'
7418 # Commands to make compiler produce verbose output that lists
7419 # what "hidden" libraries, object files and flags are used when
7420 # linking a shared library.
7422 # There doesn't appear to be a way to prevent this compiler from
7423 # explicitly linking system object files so we need to strip them
7424 # from the output so that they don't get included in the library
7426 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'
7429 if test "$GXX" = yes; then
7430 if test $with_gnu_ld = no; then
7433 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7436 _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'
7439 _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'
7444 # FIXME: insert proper C++ library support
7445 _LT_TAGVAR(ld_shlibs, $1)=no
7452 _LT_TAGVAR(hardcode_direct, $1)=no
7453 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7454 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7455 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7456 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7457 # Instead, shared libraries are loaded at an image base (0x10000000 by
7458 # default) and relocated if they conflict, which is a slow very memory
7459 # consuming and fragmenting process. To avoid this, we pick a random,
7460 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7461 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
7462 _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'
7463 _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'
7466 case $cc_basename in
7469 _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'
7471 # Archives containing C++ object files must be created using
7472 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
7473 # necessary to make sure instantiated templates are included
7475 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7478 if test "$GXX" = yes; then
7479 if test "$with_gnu_ld" = no; then
7480 _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'
7482 _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'
7485 _LT_TAGVAR(link_all_deplibs, $1)=yes
7488 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7489 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7490 _LT_TAGVAR(inherit_rpath, $1)=yes
7493 linux* | k*bsd*-gnu)
7494 case $cc_basename in
7496 # Kuck and Associates, Inc. (KAI) C++ Compiler
7498 # KCC will only create a shared library if the output file
7499 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7500 # to its proper name (with version) after linking.
7501 _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'
7502 _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'
7503 # Commands to make compiler produce verbose output that lists
7504 # what "hidden" libraries, object files and flags are used when
7505 # linking a shared library.
7507 # There doesn't appear to be a way to prevent this compiler from
7508 # explicitly linking system object files so we need to strip them
7509 # from the output so that they don't get included in the library
7511 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'
7513 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7514 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7516 # Archives containing C++ object files must be created using
7517 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7518 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7523 # version 8.0 and above of icpc choke on multiply defined symbols
7524 # if we add $predep_objects and $postdep_objects, however 7.1 and
7525 # earlier do not add the objects themselves.
7526 case `$CC -V 2>&1` in
7528 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7529 _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'
7531 *) # Version 8.0 or newer
7534 ia64*) tmp_idyn=' -i_dynamic';;
7536 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7537 _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'
7540 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7541 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7542 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7543 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7546 # Portland Group C++ compiler
7548 *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
7549 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7551 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7552 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
7553 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7555 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7556 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
7558 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7560 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7561 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7562 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7564 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7565 $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'
7567 *) # Version 6 will use weak symbols
7568 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7569 _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'
7573 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7574 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7575 _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'
7579 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7580 _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'
7582 runpath_var=LD_RUN_PATH
7583 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7584 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7586 # Commands to make compiler produce verbose output that lists
7587 # what "hidden" libraries, object files and flags are used when
7588 # linking a shared library.
7590 # There doesn't appear to be a way to prevent this compiler from
7591 # explicitly linking system object files so we need to strip them
7592 # from the output so that they don't get included in the library
7594 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'
7597 # IBM XL 8.0 on PPC, with GNU ld
7598 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7599 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7600 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7601 if test "x$supports_anon_versioning" = xyes; then
7602 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7603 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7604 echo "local: *; };" >> $output_objdir/$libname.ver~
7605 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7609 case `$CC -V 2>&1 | sed 5q` in
7612 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7613 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7614 _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'
7615 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7616 _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'
7617 _LT_TAGVAR(compiler_needs_object, $1)=yes
7619 # Not sure whether something based on
7620 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7622 output_verbose_link_cmd='echo'
7624 # Archives containing C++ object files must be created using
7625 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7626 # necessary to make sure instantiated templates are included
7628 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7636 # FIXME: insert proper C++ library support
7637 _LT_TAGVAR(ld_shlibs, $1)=no
7641 # FIXME: insert proper C++ library support
7642 _LT_TAGVAR(ld_shlibs, $1)=no
7646 case $cc_basename in
7648 # FIXME: insert proper C++ library support
7649 _LT_TAGVAR(ld_shlibs, $1)=no
7652 # FIXME: insert proper C++ library support
7653 _LT_TAGVAR(ld_shlibs, $1)=no
7659 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7660 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7662 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7663 _LT_TAGVAR(hardcode_direct, $1)=yes
7664 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7666 # Workaround some broken pre-1.5 toolchains
7667 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7671 _LT_TAGVAR(ld_shlibs, $1)=yes
7675 # C++ shared libraries are fairly broken
7676 _LT_TAGVAR(ld_shlibs, $1)=no
7680 if test -f /usr/libexec/ld.so; then
7681 _LT_TAGVAR(hardcode_direct, $1)=yes
7682 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7683 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7684 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7685 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7686 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7687 _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'
7688 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7689 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7691 output_verbose_link_cmd=echo
7693 _LT_TAGVAR(ld_shlibs, $1)=no
7697 osf3* | osf4* | osf5*)
7698 case $cc_basename in
7700 # Kuck and Associates, Inc. (KAI) C++ Compiler
7702 # KCC will only create a shared library if the output file
7703 # ends with ".so" (or ".sl" for HP-UX), so rename the library
7704 # to its proper name (with version) after linking.
7705 _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'
7707 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7708 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7710 # Archives containing C++ object files must be created using
7711 # the KAI C++ compiler.
7713 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7714 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7718 # Rational C++ 2.4.1
7719 # FIXME: insert proper C++ library support
7720 _LT_TAGVAR(ld_shlibs, $1)=no
7725 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7726 _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'
7727 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7730 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7731 _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'
7732 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7733 echo "-hidden">> $lib.exp~
7734 $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~
7736 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7740 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7742 # Commands to make compiler produce verbose output that lists
7743 # what "hidden" libraries, object files and flags are used when
7744 # linking a shared library.
7746 # There doesn't appear to be a way to prevent this compiler from
7747 # explicitly linking system object files so we need to strip them
7748 # from the output so that they don't get included in the library
7750 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'
7753 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7754 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7757 _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'
7760 _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'
7764 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7765 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7767 # Commands to make compiler produce verbose output that lists
7768 # what "hidden" libraries, object files and flags are used when
7769 # linking a shared library.
7770 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7773 # FIXME: insert proper C++ library support
7774 _LT_TAGVAR(ld_shlibs, $1)=no
7781 # FIXME: insert proper C++ library support
7782 _LT_TAGVAR(ld_shlibs, $1)=no
7786 case $cc_basename in
7789 # FIXME: insert proper C++ library support
7790 _LT_TAGVAR(ld_shlibs, $1)=no
7794 # FIXME: insert proper C++ library support
7795 _LT_TAGVAR(ld_shlibs, $1)=no
7798 # FIXME: insert proper C++ library support
7799 _LT_TAGVAR(ld_shlibs, $1)=no
7805 case $cc_basename in
7807 # Sun C++ 4.2, 5.x and Centerline C++
7808 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7809 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7810 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7811 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7812 $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'
7814 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7815 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7817 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7819 # The compiler driver will combine and reorder linker options,
7820 # but understands `-z linker_flag'.
7821 # Supported since Solaris 2.6 (maybe 2.5.1?)
7822 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7825 _LT_TAGVAR(link_all_deplibs, $1)=yes
7827 output_verbose_link_cmd='echo'
7829 # Archives containing C++ object files must be created using
7830 # "CC -xar", where "CC" is the Sun C++ compiler. This is
7831 # necessary to make sure instantiated templates are included
7833 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7836 # Green Hills C++ Compiler
7837 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7839 # The C++ compiler must be used to create the archive.
7840 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7843 # GNU C++ compiler with Solaris linker
7844 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7845 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7846 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7847 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7848 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7849 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7851 # Commands to make compiler produce verbose output that lists
7852 # what "hidden" libraries, object files and flags are used when
7853 # linking a shared library.
7854 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7856 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7858 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7859 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7860 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7862 # Commands to make compiler produce verbose output that lists
7863 # what "hidden" libraries, object files and flags are used when
7864 # linking a shared library.
7865 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7868 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7870 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7872 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7880 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7881 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7882 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7883 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7884 runpath_var='LD_RUN_PATH'
7886 case $cc_basename in
7888 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7889 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7892 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7893 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7898 sysv5* | sco3.2v5* | sco5v6*)
7899 # Note: We can NOT use -z defs as we might desire, because we do not
7900 # link with -lc, and that would cause any symbols used from libc to
7901 # always be unresolved, which means just about no library would
7902 # ever link correctly. If we're not using GNU ld we use -z text
7903 # though, which does catch some bad symbols but isn't as heavy-handed
7905 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7906 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7907 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7908 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7909 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7910 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7911 _LT_TAGVAR(link_all_deplibs, $1)=yes
7912 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7913 runpath_var='LD_RUN_PATH'
7915 case $cc_basename in
7917 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7918 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7921 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7922 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7928 case $cc_basename in
7930 # NonStop-UX NCC 3.20
7931 # FIXME: insert proper C++ library support
7932 _LT_TAGVAR(ld_shlibs, $1)=no
7935 # FIXME: insert proper C++ library support
7936 _LT_TAGVAR(ld_shlibs, $1)=no
7942 # FIXME: insert proper C++ library support
7943 _LT_TAGVAR(ld_shlibs, $1)=no
7947 # FIXME: insert proper C++ library support
7948 _LT_TAGVAR(ld_shlibs, $1)=no
7952 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7953 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7955 _LT_TAGVAR(GCC, $1)="$GXX"
7956 _LT_TAGVAR(LD, $1)="$LD"
7959 ## There is no encapsulation within the following macros, do not change
7960 ## the running order or otherwise move them around unless you know exactly
7961 ## what you are doing...
7962 _LT_SYS_HIDDEN_LIBDEPS($1)
7963 _LT_COMPILER_PIC($1)
7964 _LT_COMPILER_C_O($1)
7965 _LT_COMPILER_FILE_LOCKS($1)
7966 _LT_LINKER_SHLIBS($1)
7967 _LT_SYS_DYNAMIC_LINKER($1)
7968 _LT_LINKER_HARDCODE_LIBPATH($1)
7971 fi # test -n "$compiler"
7977 with_gnu_ld=$lt_save_with_gnu_ld
7978 lt_cv_path_LDCXX=$lt_cv_path_LD
7979 lt_cv_path_LD=$lt_save_path_LD
7980 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7981 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7982 fi # test "$_lt_caught_CXX_error" != yes
7985 ])# _LT_LANG_CXX_CONFIG
7988 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7989 # ---------------------------------
7990 # Figure out "hidden" library dependencies from verbose
7991 # compiler output when linking a shared library.
7992 # Parse the compiler output and extract the necessary
7993 # objects, libraries and library flags.
7994 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7995 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7996 # Dependencies to place before and after the object being linked:
7997 _LT_TAGVAR(predep_objects, $1)=
7998 _LT_TAGVAR(postdep_objects, $1)=
7999 _LT_TAGVAR(predeps, $1)=
8000 _LT_TAGVAR(postdeps, $1)=
8001 _LT_TAGVAR(compiler_lib_search_path, $1)=
8003 dnl we can't use the lt_simple_compile_test_code here,
8004 dnl because it contains code intended for an executable,
8005 dnl not a library. It's possible we should let each
8006 dnl tag define a new lt_????_link_test_code variable,
8007 dnl but it's only used here...
8008 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8010 void foo (void) { a = 0; }
8012 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8016 Foo (void) { a = 0; }
8021 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8029 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8037 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8040 public void bar (void) {
8046 dnl Parse the compiler output and extract the necessary
8047 dnl objects, libraries and library flags.
8048 if AC_TRY_EVAL(ac_compile); then
8049 # Parse the compiler output and extract the necessary
8050 # objects, libraries and library flags.
8052 # Sentinel used to keep track of whether or not we are before
8053 # the conftest object file.
8054 pre_test_object_deps_done=no
8056 for p in `eval "$output_verbose_link_cmd"`; do
8060 # Some compilers place space between "-{L,R}" and the path.
8062 if test $p = "-L" ||
8063 test $p = "-R"; then
8070 if test "$pre_test_object_deps_done" = no; then
8073 # Internal compiler library paths should come after those
8074 # provided the user. The postdeps already come after the
8075 # user supplied libs so there is no need to process them.
8076 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8077 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8079 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8082 # The "-l" case would never come before the object being
8083 # linked, so don't bother handling this case.
8086 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8087 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8089 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8095 # This assumes that the test object file only shows up
8096 # once in the compiler output.
8097 if test "$p" = "conftest.$objext"; then
8098 pre_test_object_deps_done=yes
8102 if test "$pre_test_object_deps_done" = no; then
8103 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8104 _LT_TAGVAR(predep_objects, $1)="$p"
8106 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8109 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8110 _LT_TAGVAR(postdep_objects, $1)="$p"
8112 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8117 *) ;; # Ignore the rest.
8125 echo "libtool.m4: error: problem compiling $1 test program"
8128 $RM -f confest.$objext
8130 # PORTME: override above test on systems where it is broken
8134 # Interix 3.5 installs completely hosed .la files for C++, so rather than
8135 # hack all around it, let's just trust "g++" to DTRT.
8136 _LT_TAGVAR(predep_objects,$1)=
8137 _LT_TAGVAR(postdep_objects,$1)=
8138 _LT_TAGVAR(postdeps,$1)=
8142 case `$CC -V 2>&1 | sed 5q` in
8146 # The more standards-conforming stlport4 library is
8147 # incompatible with the Cstd library. Avoid specifying
8148 # it if it's in CXXFLAGS. Ignore libCrun as
8149 # -library=stlport4 depends on it.
8150 case " $CXX $CXXFLAGS " in
8151 *" -library=stlport4 "*)
8152 solaris_use_stlport4=yes
8156 if test "$solaris_use_stlport4" != yes; then
8157 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8164 case $cc_basename in
8166 # The more standards-conforming stlport4 library is
8167 # incompatible with the Cstd library. Avoid specifying
8168 # it if it's in CXXFLAGS. Ignore libCrun as
8169 # -library=stlport4 depends on it.
8170 case " $CXX $CXXFLAGS " in
8171 *" -library=stlport4 "*)
8172 solaris_use_stlport4=yes
8176 # Adding this requires a known-good setup of shared libraries for
8177 # Sun compiler versions before 5.6, else PIC objects from an old
8178 # archive will be linked into the output, leading to subtle bugs.
8179 if test "$solaris_use_stlport4" != yes; then
8180 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8188 case " $_LT_TAGVAR(postdeps, $1) " in
8189 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8191 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8192 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8193 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8195 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8196 [The directories searched by this compiler when creating a shared library])
8197 _LT_TAGDECL([], [predep_objects], [1],
8198 [Dependencies to place before and after the objects being linked to
8199 create a shared library])
8200 _LT_TAGDECL([], [postdep_objects], [1])
8201 _LT_TAGDECL([], [predeps], [1])
8202 _LT_TAGDECL([], [postdeps], [1])
8203 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8204 [The library search path used internally by the compiler when linking
8206 ])# _LT_SYS_HIDDEN_LIBDEPS
8211 # Since AC_PROG_F77 is broken, in that it returns the empty string
8212 # if there is no fortran compiler, we have our own version here.
8213 m4_defun([_LT_PROG_F77],
8215 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
8217 if test -z "$F77" || test "X$F77" = "Xno"; then
8220 popdef([AC_MSG_ERROR])
8223 dnl aclocal-1.4 backwards compatibility:
8224 dnl AC_DEFUN([_LT_PROG_F77], [])
8227 # _LT_LANG_F77_CONFIG([TAG])
8228 # --------------------------
8229 # Ensure that the configuration variables for a Fortran 77 compiler are
8230 # suitably defined. These variables are subsequently used by _LT_CONFIG
8231 # to write the compiler configuration to `libtool'.
8232 m4_defun([_LT_LANG_F77_CONFIG],
8233 [AC_REQUIRE([_LT_PROG_F77])dnl
8234 AC_LANG_PUSH(Fortran 77)
8236 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8237 _LT_TAGVAR(allow_undefined_flag, $1)=
8238 _LT_TAGVAR(always_export_symbols, $1)=no
8239 _LT_TAGVAR(archive_expsym_cmds, $1)=
8240 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8241 _LT_TAGVAR(hardcode_direct, $1)=no
8242 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8243 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8244 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8245 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8246 _LT_TAGVAR(hardcode_minus_L, $1)=no
8247 _LT_TAGVAR(hardcode_automatic, $1)=no
8248 _LT_TAGVAR(inherit_rpath, $1)=no
8249 _LT_TAGVAR(module_cmds, $1)=
8250 _LT_TAGVAR(module_expsym_cmds, $1)=
8251 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8252 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8253 _LT_TAGVAR(no_undefined_flag, $1)=
8254 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8255 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8257 # Source file extension for f77 test sources.
8260 # Object file extension for compiled f77 test sources.
8262 _LT_TAGVAR(objext, $1)=$objext
8264 # No sense in running all these tests if we already determined that
8265 # the F77 compiler isn't working. Some variables (like enable_shared)
8266 # are currently assumed to apply to all compilers on this platform,
8267 # and will be corrupted by setting them based on a non-working compiler.
8268 if test "$_lt_disable_F77" != yes; then
8269 # Code to be used in simple compile tests
8270 lt_simple_compile_test_code="\
8276 # Code to be used in simple link tests
8277 lt_simple_link_test_code="\
8282 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8285 # save warnings/boilerplate of simple test code
8286 _LT_COMPILER_BOILERPLATE
8287 _LT_LINKER_BOILERPLATE
8289 # Allow CC to be a program name with arguments.
8294 _LT_TAGVAR(compiler, $1)=$CC
8295 _LT_CC_BASENAME([$compiler])
8297 if test -n "$compiler"; then
8298 AC_MSG_CHECKING([if libtool supports shared libraries])
8299 AC_MSG_RESULT([$can_build_shared])
8301 AC_MSG_CHECKING([whether to build shared libraries])
8302 test "$can_build_shared" = "no" && enable_shared=no
8304 # On AIX, shared libraries and static libraries use the same namespace, and
8305 # are all built from PIC.
8308 test "$enable_shared" = yes && enable_static=no
8309 if test -n "$RANLIB"; then
8310 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8311 postinstall_cmds='$RANLIB $lib'
8315 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8316 test "$enable_shared" = yes && enable_static=no
8320 AC_MSG_RESULT([$enable_shared])
8322 AC_MSG_CHECKING([whether to build static libraries])
8323 # Make sure either enable_shared or enable_static is yes.
8324 test "$enable_shared" = yes || enable_static=yes
8325 AC_MSG_RESULT([$enable_static])
8327 _LT_TAGVAR(GCC, $1)="$G77"
8328 _LT_TAGVAR(LD, $1)="$LD"
8331 ## There is no encapsulation within the following macros, do not change
8332 ## the running order or otherwise move them around unless you know exactly
8333 ## what you are doing...
8334 _LT_COMPILER_PIC($1)
8335 _LT_COMPILER_C_O($1)
8336 _LT_COMPILER_FILE_LOCKS($1)
8337 _LT_LINKER_SHLIBS($1)
8338 _LT_SYS_DYNAMIC_LINKER($1)
8339 _LT_LINKER_HARDCODE_LIBPATH($1)
8342 fi # test -n "$compiler"
8346 fi # test "$_lt_disable_F77" != yes
8349 ])# _LT_LANG_F77_CONFIG
8354 # Since AC_PROG_FC is broken, in that it returns the empty string
8355 # if there is no fortran compiler, we have our own version here.
8356 m4_defun([_LT_PROG_FC],
8358 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
8360 if test -z "$FC" || test "X$FC" = "Xno"; then
8363 popdef([AC_MSG_ERROR])
8366 dnl aclocal-1.4 backwards compatibility:
8367 dnl AC_DEFUN([_LT_PROG_FC], [])
8370 # _LT_LANG_FC_CONFIG([TAG])
8371 # -------------------------
8372 # Ensure that the configuration variables for a Fortran compiler are
8373 # suitably defined. These variables are subsequently used by _LT_CONFIG
8374 # to write the compiler configuration to `libtool'.
8375 m4_defun([_LT_LANG_FC_CONFIG],
8376 [AC_REQUIRE([_LT_PROG_FC])dnl
8377 AC_LANG_PUSH(Fortran)
8379 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8380 _LT_TAGVAR(allow_undefined_flag, $1)=
8381 _LT_TAGVAR(always_export_symbols, $1)=no
8382 _LT_TAGVAR(archive_expsym_cmds, $1)=
8383 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8384 _LT_TAGVAR(hardcode_direct, $1)=no
8385 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8386 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8387 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8388 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8389 _LT_TAGVAR(hardcode_minus_L, $1)=no
8390 _LT_TAGVAR(hardcode_automatic, $1)=no
8391 _LT_TAGVAR(inherit_rpath, $1)=no
8392 _LT_TAGVAR(module_cmds, $1)=
8393 _LT_TAGVAR(module_expsym_cmds, $1)=
8394 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8395 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8396 _LT_TAGVAR(no_undefined_flag, $1)=
8397 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8398 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8400 # Source file extension for fc test sources.
8401 ac_ext=${ac_fc_srcext-f}
8403 # Object file extension for compiled fc test sources.
8405 _LT_TAGVAR(objext, $1)=$objext
8407 # No sense in running all these tests if we already determined that
8408 # the FC compiler isn't working. Some variables (like enable_shared)
8409 # are currently assumed to apply to all compilers on this platform,
8410 # and will be corrupted by setting them based on a non-working compiler.
8411 if test "$_lt_disable_FC" != yes; then
8412 # Code to be used in simple compile tests
8413 lt_simple_compile_test_code="\
8419 # Code to be used in simple link tests
8420 lt_simple_link_test_code="\
8425 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8428 # save warnings/boilerplate of simple test code
8429 _LT_COMPILER_BOILERPLATE
8430 _LT_LINKER_BOILERPLATE
8432 # Allow CC to be a program name with arguments.
8437 GCC=$ac_cv_fc_compiler_gnu
8439 _LT_TAGVAR(compiler, $1)=$CC
8440 _LT_CC_BASENAME([$compiler])
8442 if test -n "$compiler"; then
8443 AC_MSG_CHECKING([if libtool supports shared libraries])
8444 AC_MSG_RESULT([$can_build_shared])
8446 AC_MSG_CHECKING([whether to build shared libraries])
8447 test "$can_build_shared" = "no" && enable_shared=no
8449 # On AIX, shared libraries and static libraries use the same namespace, and
8450 # are all built from PIC.
8453 test "$enable_shared" = yes && enable_static=no
8454 if test -n "$RANLIB"; then
8455 archive_cmds="$archive_cmds~\$RANLIB \$lib"
8456 postinstall_cmds='$RANLIB $lib'
8460 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8461 test "$enable_shared" = yes && enable_static=no
8465 AC_MSG_RESULT([$enable_shared])
8467 AC_MSG_CHECKING([whether to build static libraries])
8468 # Make sure either enable_shared or enable_static is yes.
8469 test "$enable_shared" = yes || enable_static=yes
8470 AC_MSG_RESULT([$enable_static])
8472 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8473 _LT_TAGVAR(LD, $1)="$LD"
8476 ## There is no encapsulation within the following macros, do not change
8477 ## the running order or otherwise move them around unless you know exactly
8478 ## what you are doing...
8479 _LT_SYS_HIDDEN_LIBDEPS($1)
8480 _LT_COMPILER_PIC($1)
8481 _LT_COMPILER_C_O($1)
8482 _LT_COMPILER_FILE_LOCKS($1)
8483 _LT_LINKER_SHLIBS($1)
8484 _LT_SYS_DYNAMIC_LINKER($1)
8485 _LT_LINKER_HARDCODE_LIBPATH($1)
8488 fi # test -n "$compiler"
8492 fi # test "$_lt_disable_FC" != yes
8495 ])# _LT_LANG_FC_CONFIG
8498 # _LT_LANG_GCJ_CONFIG([TAG])
8499 # --------------------------
8500 # Ensure that the configuration variables for the GNU Java Compiler compiler
8501 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8502 # to write the compiler configuration to `libtool'.
8503 m4_defun([_LT_LANG_GCJ_CONFIG],
8504 [AC_REQUIRE([LT_PROG_GCJ])dnl
8507 # Source file extension for Java test sources.
8510 # Object file extension for compiled Java test sources.
8512 _LT_TAGVAR(objext, $1)=$objext
8514 # Code to be used in simple compile tests
8515 lt_simple_compile_test_code="class foo {}"
8517 # Code to be used in simple link tests
8518 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8520 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8523 # save warnings/boilerplate of simple test code
8524 _LT_COMPILER_BOILERPLATE
8525 _LT_LINKER_BOILERPLATE
8527 # Allow CC to be a program name with arguments.
8533 _LT_TAGVAR(compiler, $1)=$CC
8534 _LT_TAGVAR(LD, $1)="$LD"
8535 _LT_CC_BASENAME([$compiler])
8537 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8538 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8540 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8542 if test -n "$compiler"; then
8543 _LT_COMPILER_NO_RTTI($1)
8544 _LT_COMPILER_PIC($1)
8545 _LT_COMPILER_C_O($1)
8546 _LT_COMPILER_FILE_LOCKS($1)
8547 _LT_LINKER_SHLIBS($1)
8548 _LT_LINKER_HARDCODE_LIBPATH($1)
8557 ])# _LT_LANG_GCJ_CONFIG
8560 # _LT_LANG_RC_CONFIG([TAG])
8561 # -------------------------
8562 # Ensure that the configuration variables for the Windows resource compiler
8563 # are suitably defined. These variables are subsequently used by _LT_CONFIG
8564 # to write the compiler configuration to `libtool'.
8565 m4_defun([_LT_LANG_RC_CONFIG],
8566 [AC_REQUIRE([LT_PROG_RC])dnl
8569 # Source file extension for RC test sources.
8572 # Object file extension for compiled RC test sources.
8574 _LT_TAGVAR(objext, $1)=$objext
8576 # Code to be used in simple compile tests
8577 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8579 # Code to be used in simple link tests
8580 lt_simple_link_test_code="$lt_simple_compile_test_code"
8582 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8585 # save warnings/boilerplate of simple test code
8586 _LT_COMPILER_BOILERPLATE
8587 _LT_LINKER_BOILERPLATE
8589 # Allow CC to be a program name with arguments.
8595 _LT_TAGVAR(compiler, $1)=$CC
8596 _LT_CC_BASENAME([$compiler])
8597 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8599 if test -n "$compiler"; then
8607 ])# _LT_LANG_RC_CONFIG
8612 AC_DEFUN([LT_PROG_GCJ],
8613 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8614 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8615 [AC_CHECK_TOOL(GCJ, gcj,)
8616 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8617 AC_SUBST(GCJFLAGS)])])[]dnl
8621 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8622 dnl aclocal-1.4 backwards compatibility:
8623 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8628 AC_DEFUN([LT_PROG_RC],
8629 [AC_CHECK_TOOL(RC, windres,)
8633 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8634 dnl aclocal-1.4 backwards compatibility:
8635 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8640 # If we don't have a new enough Autoconf to choose the best grep
8641 # available, choose the one first in the user's PATH.
8642 m4_defun([_LT_DECL_EGREP],
8643 [AC_REQUIRE([AC_PROG_EGREP])dnl
8644 AC_REQUIRE([AC_PROG_FGREP])dnl
8645 test -z "$GREP" && GREP=grep
8646 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8647 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8648 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8649 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8656 # If we don't have a new enough Autoconf to choose the best objdump
8657 # available, choose the one first in the user's PATH.
8658 m4_defun([_LT_DECL_OBJDUMP],
8659 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8660 test -z "$OBJDUMP" && OBJDUMP=objdump
8661 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8668 # Check for a fully-functional sed program, that truncates
8669 # as few characters as possible. Prefer GNU sed if found.
8670 m4_defun([_LT_DECL_SED],
8672 test -z "$SED" && SED=sed
8673 Xsed="$SED -e 1s/^X//"
8674 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8675 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8676 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8679 m4_ifndef([AC_PROG_SED], [
8680 # NOTE: This macro has been submitted for inclusion into #
8681 # GNU Autoconf as AC_PROG_SED. When it is available in #
8682 # a released version of Autoconf we should remove this #
8683 # macro and use it instead. #
8685 m4_defun([AC_PROG_SED],
8686 [AC_MSG_CHECKING([for a sed that does not truncate output])
8687 AC_CACHE_VAL(lt_cv_path_SED,
8688 [# Loop through the user's path and test for sed and gsed.
8689 # Then use that list of sed's as ones to test for truncation.
8690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8694 test -z "$as_dir" && as_dir=.
8695 for lt_ac_prog in sed gsed; do
8696 for ac_exec_ext in '' $ac_executable_extensions; do
8697 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8698 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8706 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8707 # along with /bin/sed that truncates output.
8708 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8709 test ! -f $lt_ac_sed && continue
8710 cat /dev/null > conftest.in
8712 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8713 # Check for GNU sed and select it if it is found.
8714 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8715 lt_cv_path_SED=$lt_ac_sed
8719 cat conftest.in conftest.in >conftest.tmp
8720 mv conftest.tmp conftest.in
8721 cp conftest.in conftest.nl
8723 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8724 cmp -s conftest.out conftest.nl || break
8725 # 10000 chars as input seems more than enough
8726 test $lt_ac_count -gt 10 && break
8727 lt_ac_count=`expr $lt_ac_count + 1`
8728 if test $lt_ac_count -gt $lt_ac_max; then
8729 lt_ac_max=$lt_ac_count
8730 lt_cv_path_SED=$lt_ac_sed
8737 AC_MSG_RESULT([$SED])
8742 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8743 dnl aclocal-1.4 backwards compatibility:
8744 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8747 # _LT_CHECK_SHELL_FEATURES
8748 # ------------------------
8749 # Find out whether the shell is Bourne or XSI compatible,
8750 # or has some other useful features.
8751 m4_defun([_LT_CHECK_SHELL_FEATURES],
8752 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8753 # Try some XSI features
8756 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
8758 && eval 'test $(( 1 + 1 )) -eq 2 \
8759 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8761 AC_MSG_RESULT([$xsi_shell])
8762 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8764 AC_MSG_CHECKING([whether the shell understands "+="])
8766 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8768 && lt_shell_append=yes
8769 AC_MSG_RESULT([$lt_shell_append])
8770 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8772 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8777 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8779 # test EBCDIC or ASCII
8780 case `echo X|tr X '\101'` in
8781 A) # ASCII based system
8782 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8783 lt_SP2NL='tr \040 \012'
8784 lt_NL2SP='tr \015\012 \040\040'
8786 *) # EBCDIC based system
8787 lt_SP2NL='tr \100 \n'
8788 lt_NL2SP='tr \r\n \100\100'
8791 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8792 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8793 ])# _LT_CHECK_SHELL_FEATURES
8796 # _LT_PROG_XSI_SHELLFNS
8797 # ---------------------
8798 # Bourne and XSI compatible variants of some useful shell functions.
8799 m4_defun([_LT_PROG_XSI_SHELLFNS],
8802 cat << \_LT_EOF >> "$cfgfile"
8804 # func_dirname file append nondir_replacement
8805 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
8806 # otherwise set result to NONDIR_REPLACEMENT.
8810 */*) func_dirname_result="${1%/*}${2}" ;;
8811 * ) func_dirname_result="${3}" ;;
8815 # func_basename file
8818 func_basename_result="${1##*/}"
8821 # func_dirname_and_basename file append nondir_replacement
8822 # perform func_basename and func_dirname in a single function
8824 # dirname: Compute the dirname of FILE. If nonempty,
8825 # add APPEND to the result, otherwise set result
8826 # to NONDIR_REPLACEMENT.
8827 # value returned in "$func_dirname_result"
8828 # basename: Compute filename of FILE.
8829 # value retuned in "$func_basename_result"
8830 # Implementation must be kept synchronized with func_dirname
8831 # and func_basename. For efficiency, we do not delegate to
8832 # those functions but instead duplicate the functionality here.
8833 func_dirname_and_basename ()
8836 */*) func_dirname_result="${1%/*}${2}" ;;
8837 * ) func_dirname_result="${3}" ;;
8839 func_basename_result="${1##*/}"
8842 # func_stripname prefix suffix name
8843 # strip PREFIX and SUFFIX off of NAME.
8844 # PREFIX and SUFFIX must not contain globbing or regex special
8845 # characters, hashes, percent signs, but SUFFIX may contain a leading
8846 # dot (in which case that matches only a dot).
8849 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8850 # positional parameters, so assign one to ordinary parameter first.
8851 func_stripname_result=${3}
8852 func_stripname_result=${func_stripname_result#"${1}"}
8853 func_stripname_result=${func_stripname_result%"${2}"}
8859 func_opt_split_opt=${1%%=*}
8860 func_opt_split_arg=${1#*=}
8867 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8868 *) func_lo2o_result=${1} ;;
8872 # func_xform libobj-or-source
8875 func_xform_result=${1%.*}.lo
8878 # func_arith arithmetic-term...
8881 func_arith_result=$(( $[*] ))
8885 # STRING may not start with a hyphen.
8888 func_len_result=${#1}
8893 *) # Bourne compatible functions.
8894 cat << \_LT_EOF >> "$cfgfile"
8896 # func_dirname file append nondir_replacement
8897 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
8898 # otherwise set result to NONDIR_REPLACEMENT.
8901 # Extract subdirectory from the argument.
8902 func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
8903 if test "X$func_dirname_result" = "X${1}"; then
8904 func_dirname_result="${3}"
8906 func_dirname_result="$func_dirname_result${2}"
8910 # func_basename file
8913 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
8916 dnl func_dirname_and_basename
8917 dnl A portable version of this function is already defined in general.m4sh
8918 dnl so there is no need for it here.
8920 # func_stripname prefix suffix name
8921 # strip PREFIX and SUFFIX off of NAME.
8922 # PREFIX and SUFFIX must not contain globbing or regex special
8923 # characters, hashes, percent signs, but SUFFIX may contain a leading
8924 # dot (in which case that matches only a dot).
8925 # func_strip_suffix prefix name
8929 .*) func_stripname_result=`$ECHO "X${3}" \
8930 | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
8931 *) func_stripname_result=`$ECHO "X${3}" \
8932 | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
8937 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8938 my_sed_long_arg='1s/^-[[^=]]*=//'
8943 func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
8944 func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
8950 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
8953 # func_xform libobj-or-source
8956 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
8959 # func_arith arithmetic-term...
8962 func_arith_result=`expr "$[@]"`
8966 # STRING may not start with a hyphen.
8969 func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8975 case $lt_shell_append in
8977 cat << \_LT_EOF >> "$cfgfile"
8979 # func_append var value
8980 # Append VALUE to the end of shell variable VAR.
8988 cat << \_LT_EOF >> "$cfgfile"
8990 # func_append var value
8991 # Append VALUE to the end of shell variable VAR.
8994 eval "$[1]=\$$[1]\$[2]"
9002 # Helper functions for option handling. -*- Autoconf -*-
9004 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9005 # Written by Gary V. Vaughan, 2004
9007 # This file is free software; the Free Software Foundation gives
9008 # unlimited permission to copy and/or distribute it, with or without
9009 # modifications, as long as this notice is preserved.
9011 # serial 6 ltoptions.m4
9013 # This is to help aclocal find these macros, as it can't see m4_define.
9014 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9017 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9018 # ------------------------------------------
9019 m4_define([_LT_MANGLE_OPTION],
9020 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9023 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9024 # ---------------------------------------
9025 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9026 # matching handler defined, dispatch to it. Other OPTION-NAMEs are
9028 m4_define([_LT_SET_OPTION],
9029 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9030 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9031 _LT_MANGLE_DEFUN([$1], [$2]),
9032 [m4_warning([Unknown $1 option `$2'])])[]dnl
9036 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9037 # ------------------------------------------------------------
9038 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9039 m4_define([_LT_IF_OPTION],
9040 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9043 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9044 # -------------------------------------------------------
9045 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9047 m4_define([_LT_UNLESS_OPTIONS],
9048 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9049 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9050 [m4_define([$0_found])])])[]dnl
9051 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9056 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9057 # ----------------------------------------
9058 # OPTION-LIST is a space-separated list of Libtool options associated
9059 # with MACRO-NAME. If any OPTION has a matching handler declared with
9060 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9061 # the unknown option and exit.
9062 m4_defun([_LT_SET_OPTIONS],
9064 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9065 [_LT_SET_OPTION([$1], _LT_Option)])
9067 m4_if([$1],[LT_INIT],[
9069 dnl Simply set some default values (i.e off) if boolean options were not
9071 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9073 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9076 dnl If no reference was made to various pairs of opposing options, then
9077 dnl we run the default mode handler for the pair. For example, if neither
9078 dnl `shared' nor `disable-shared' was passed, we enable building of shared
9079 dnl archives by default:
9080 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9081 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9082 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9083 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9084 [_LT_ENABLE_FAST_INSTALL])
9090 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9091 # -----------------------------------------
9092 m4_define([_LT_MANGLE_DEFUN],
9093 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9096 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9097 # -----------------------------------------------
9098 m4_define([LT_OPTION_DEFINE],
9099 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9100 ])# LT_OPTION_DEFINE
9105 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9108 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9109 [_LT_SET_OPTION([LT_INIT], [dlopen])
9110 AC_DIAGNOSE([obsolete],
9111 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9112 put the `dlopen' option into LT_INIT's first parameter.])
9115 dnl aclocal-1.4 backwards compatibility:
9116 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9121 # Declare package support for building win32 dll's.
9122 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9123 [enable_win32_dll=yes
9126 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
9127 AC_CHECK_TOOL(AS, as, false)
9128 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9129 AC_CHECK_TOOL(OBJDUMP, objdump, false)
9133 test -z "$AS" && AS=as
9134 _LT_DECL([], [AS], [0], [Assembler program])dnl
9136 test -z "$DLLTOOL" && DLLTOOL=dlltool
9137 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
9139 test -z "$OBJDUMP" && OBJDUMP=objdump
9140 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
9143 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9144 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9145 _LT_SET_OPTION([LT_INIT], [win32-dll])
9146 AC_DIAGNOSE([obsolete],
9147 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9148 put the `win32-dll' option into LT_INIT's first parameter.])
9151 dnl aclocal-1.4 backwards compatibility:
9152 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9155 # _LT_ENABLE_SHARED([DEFAULT])
9156 # ----------------------------
9157 # implement the --enable-shared flag, and supports the `shared' and
9158 # `disable-shared' LT_INIT options.
9159 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9160 m4_define([_LT_ENABLE_SHARED],
9161 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9162 AC_ARG_ENABLE([shared],
9163 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9164 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9165 [p=${PACKAGE-default}
9167 yes) enable_shared=yes ;;
9168 no) enable_shared=no ;;
9171 # Look at the argument we got. We use all the common list separators.
9172 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9173 for pkg in $enableval; do
9175 if test "X$pkg" = "X$p"; then
9182 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9184 _LT_DECL([build_libtool_libs], [enable_shared], [0],
9185 [Whether or not to build shared libraries])
9186 ])# _LT_ENABLE_SHARED
9188 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9189 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9192 AC_DEFUN([AC_ENABLE_SHARED],
9193 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9196 AC_DEFUN([AC_DISABLE_SHARED],
9197 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9200 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9201 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9203 dnl aclocal-1.4 backwards compatibility:
9204 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9205 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9209 # _LT_ENABLE_STATIC([DEFAULT])
9210 # ----------------------------
9211 # implement the --enable-static flag, and support the `static' and
9212 # `disable-static' LT_INIT options.
9213 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9214 m4_define([_LT_ENABLE_STATIC],
9215 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9216 AC_ARG_ENABLE([static],
9217 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9218 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9219 [p=${PACKAGE-default}
9221 yes) enable_static=yes ;;
9222 no) enable_static=no ;;
9225 # Look at the argument we got. We use all the common list separators.
9226 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9227 for pkg in $enableval; do
9229 if test "X$pkg" = "X$p"; then
9236 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9238 _LT_DECL([build_old_libs], [enable_static], [0],
9239 [Whether or not to build static libraries])
9240 ])# _LT_ENABLE_STATIC
9242 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9243 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9246 AC_DEFUN([AC_ENABLE_STATIC],
9247 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9250 AC_DEFUN([AC_DISABLE_STATIC],
9251 [_LT_SET_OPTION([LT_INIT], [disable-static])
9254 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9255 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9257 dnl aclocal-1.4 backwards compatibility:
9258 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9259 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9263 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9264 # ----------------------------------
9265 # implement the --enable-fast-install flag, and support the `fast-install'
9266 # and `disable-fast-install' LT_INIT options.
9267 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
9268 m4_define([_LT_ENABLE_FAST_INSTALL],
9269 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9270 AC_ARG_ENABLE([fast-install],
9271 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9272 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9273 [p=${PACKAGE-default}
9275 yes) enable_fast_install=yes ;;
9276 no) enable_fast_install=no ;;
9278 enable_fast_install=no
9279 # Look at the argument we got. We use all the common list separators.
9280 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9281 for pkg in $enableval; do
9283 if test "X$pkg" = "X$p"; then
9284 enable_fast_install=yes
9290 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9292 _LT_DECL([fast_install], [enable_fast_install], [0],
9293 [Whether or not to optimize for fast installation])dnl
9294 ])# _LT_ENABLE_FAST_INSTALL
9296 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9297 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9300 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9301 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9302 AC_DIAGNOSE([obsolete],
9303 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9304 the `fast-install' option into LT_INIT's first parameter.])
9307 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9308 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9309 AC_DIAGNOSE([obsolete],
9310 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9311 the `disable-fast-install' option into LT_INIT's first parameter.])
9314 dnl aclocal-1.4 backwards compatibility:
9315 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9316 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9319 # _LT_WITH_PIC([MODE])
9320 # --------------------
9321 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9323 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
9324 m4_define([_LT_WITH_PIC],
9326 [AS_HELP_STRING([--with-pic],
9327 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9328 [pic_mode="$withval"],
9331 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9333 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9336 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9337 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9340 AU_DEFUN([AC_LIBTOOL_PICMODE],
9341 [_LT_SET_OPTION([LT_INIT], [pic-only])
9342 AC_DIAGNOSE([obsolete],
9343 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9344 put the `pic-only' option into LT_INIT's first parameter.])
9347 dnl aclocal-1.4 backwards compatibility:
9348 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9351 m4_define([_LTDL_MODE], [])
9352 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9353 [m4_define([_LTDL_MODE], [nonrecursive])])
9354 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9355 [m4_define([_LTDL_MODE], [recursive])])
9356 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9357 [m4_define([_LTDL_MODE], [subproject])])
9359 m4_define([_LTDL_TYPE], [])
9360 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9361 [m4_define([_LTDL_TYPE], [installable])])
9362 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9363 [m4_define([_LTDL_TYPE], [convenience])])
9365 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
9367 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9368 # Written by Gary V. Vaughan, 2004
9370 # This file is free software; the Free Software Foundation gives
9371 # unlimited permission to copy and/or distribute it, with or without
9372 # modifications, as long as this notice is preserved.
9374 # serial 6 ltsugar.m4
9376 # This is to help aclocal find these macros, as it can't see m4_define.
9377 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9380 # lt_join(SEP, ARG1, [ARG2...])
9381 # -----------------------------
9382 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9383 # associated separator.
9384 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9385 # versions in m4sugar had bugs.
9386 m4_define([lt_join],
9387 [m4_if([$#], [1], [],
9389 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9390 m4_define([_lt_join],
9391 [m4_if([$#$2], [2], [],
9392 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9398 # Manipulate m4 lists.
9399 # These macros are necessary as long as will still need to support
9400 # Autoconf-2.59 which quotes differently.
9401 m4_define([lt_car], [[$1]])
9403 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9405 [m4_dquote(m4_shift($@))])])
9406 m4_define([lt_unquote], $1)
9409 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9410 # ------------------------------------------
9411 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9412 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9413 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9414 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9415 # than defined and empty).
9417 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9418 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9419 m4_define([lt_append],
9421 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9425 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9426 # ----------------------------------------------------------
9427 # Produce a SEP delimited list of all paired combinations of elements of
9428 # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
9429 # has the form PREFIXmINFIXSUFFIXn.
9430 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9431 m4_define([lt_combine],
9432 [m4_if(m4_eval([$# > 3]), [1],
9433 [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9434 [[m4_foreach([_Lt_prefix], [$2],
9435 [m4_foreach([_Lt_suffix],
9436 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9437 [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9440 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9441 # -----------------------------------------------------------------------
9442 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9443 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9444 m4_define([lt_if_append_uniq],
9446 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9447 [lt_append([$1], [$2], [$3])$4],
9449 [lt_append([$1], [$2], [$3])$4])])
9452 # lt_dict_add(DICT, KEY, VALUE)
9453 # -----------------------------
9454 m4_define([lt_dict_add],
9455 [m4_define([$1($2)], [$3])])
9458 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9459 # --------------------------------------------
9460 m4_define([lt_dict_add_subkey],
9461 [m4_define([$1($2:$3)], [$4])])
9464 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9465 # ----------------------------------
9466 m4_define([lt_dict_fetch],
9468 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9469 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9472 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9473 # -----------------------------------------------------------------
9474 m4_define([lt_if_dict_fetch],
9475 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9480 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9481 # --------------------------------------------------------------
9482 m4_define([lt_dict_filter],
9483 [m4_if([$5], [], [],
9484 [lt_join(m4_quote(m4_default([$4], [[, ]])),
9485 lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9486 [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9489 # ltversion.m4 -- version numbers -*- Autoconf -*-
9491 # Copyright (C) 2004 Free Software Foundation, Inc.
9492 # Written by Scott James Remnant, 2004
9494 # This file is free software; the Free Software Foundation gives
9495 # unlimited permission to copy and/or distribute it, with or without
9496 # modifications, as long as this notice is preserved.
9498 # Generated from ltversion.in.
9500 # serial 3012 ltversion.m4
9501 # This file is part of GNU Libtool
9503 m4_define([LT_PACKAGE_VERSION], [2.2.6])
9504 m4_define([LT_PACKAGE_REVISION], [1.3012])
9506 AC_DEFUN([LTVERSION_VERSION],
9507 [macro_version='2.2.6'
9508 macro_revision='1.3012'
9509 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9510 _LT_DECL(, macro_revision, 0)
9513 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
9515 # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
9516 # Written by Scott James Remnant, 2004.
9518 # This file is free software; the Free Software Foundation gives
9519 # unlimited permission to copy and/or distribute it, with or without
9520 # modifications, as long as this notice is preserved.
9522 # serial 4 lt~obsolete.m4
9524 # These exist entirely to fool aclocal when bootstrapping libtool.
9526 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9527 # which have later been changed to m4_define as they aren't part of the
9528 # exported API, or moved to Autoconf or Automake where they belong.
9530 # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
9531 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9532 # using a macro with the same name in our local m4/libtool.m4 it'll
9533 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9534 # and doesn't know about Autoconf macros at all.)
9536 # So we provide this file, which has a silly filename so it's always
9537 # included after everything else. This provides aclocal with the
9538 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9539 # because those macros already exist, or will be overwritten later.
9540 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9542 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9543 # Yes, that means every name once taken will need to remain here until
9544 # we give up compatibility with versions before 1.7, at which point
9545 # we need to keep only those names which we still refer to.
9547 # This is to help aclocal find these macros, as it can't see m4_define.
9548 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9550 m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9551 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9552 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9553 m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9554 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9555 m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9556 m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9557 m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9558 m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9559 m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9560 m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9561 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9562 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9563 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9564 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9565 m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9566 m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9567 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9568 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9569 m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9570 m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9571 m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9572 m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9573 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9574 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9575 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9576 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9577 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9578 m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9579 m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9580 m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9581 m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9582 m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9583 m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9584 m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9585 m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9586 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9587 m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9588 m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9589 m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9590 m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9591 m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9592 m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
9593 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9594 m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9595 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9596 m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9597 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9598 m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9599 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9600 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9601 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9602 m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9603 m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9604 m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9606 # nls.m4 serial 3 (gettext-0.15)
9607 dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
9608 dnl This file is free software; the Free Software Foundation
9609 dnl gives unlimited permission to copy and/or distribute it,
9610 dnl with or without modifications, as long as this notice is preserved.
9612 dnl This file can can be used in projects which are not available under
9613 dnl the GNU General Public License or the GNU Library General Public
9614 dnl License but which still want to provide support for the GNU gettext
9616 dnl Please note that the actual code of the GNU gettext library is covered
9617 dnl by the GNU Library General Public License, and the rest of the GNU
9618 dnl gettext package package is covered by the GNU General Public License.
9619 dnl They are *not* in the public domain.
9622 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9623 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9629 AC_MSG_CHECKING([whether NLS is requested])
9630 dnl Default is enabled NLS
9632 [ --disable-nls do not use Native Language Support],
9633 USE_NLS=$enableval, USE_NLS=yes)
9634 AC_MSG_RESULT($USE_NLS)
9638 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
9640 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9642 # This program is free software; you can redistribute it and/or modify
9643 # it under the terms of the GNU General Public License as published by
9644 # the Free Software Foundation; either version 2 of the License, or
9645 # (at your option) any later version.
9647 # This program is distributed in the hope that it will be useful, but
9648 # WITHOUT ANY WARRANTY; without even the implied warranty of
9649 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9650 # General Public License for more details.
9652 # You should have received a copy of the GNU General Public License
9653 # along with this program; if not, write to the Free Software
9654 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9656 # As a special exception to the GNU General Public License, if you
9657 # distribute this file as part of a program that contains a
9658 # configuration script generated by Autoconf, you may include it under
9659 # the same distribution terms that you use for the rest of that program.
9661 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
9662 # ----------------------------------
9663 AC_DEFUN([PKG_PROG_PKG_CONFIG],
9664 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9665 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9666 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
9667 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9668 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9670 if test -n "$PKG_CONFIG"; then
9671 _pkg_min_version=m4_default([$1], [0.9.0])
9672 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9673 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9674 AC_MSG_RESULT([yes])
9681 ])# PKG_PROG_PKG_CONFIG
9683 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9685 # Check to see whether a particular set of modules exists. Similar
9686 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
9689 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
9690 # this or PKG_CHECK_MODULES is called, or make sure to call
9691 # PKG_CHECK_EXISTS manually
9692 # --------------------------------------------------------------
9693 AC_DEFUN([PKG_CHECK_EXISTS],
9694 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9695 if test -n "$PKG_CONFIG" && \
9696 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9697 m4_ifval([$2], [$2], [:])
9698 m4_ifvaln([$3], [else
9703 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9704 # ---------------------------------------------
9705 m4_define([_PKG_CONFIG],
9706 [if test -n "$PKG_CONFIG"; then
9707 if test -n "$$1"; then
9710 PKG_CHECK_EXISTS([$3],
9711 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9719 # _PKG_SHORT_ERRORS_SUPPORTED
9720 # -----------------------------
9721 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9722 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9723 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9724 _pkg_short_errors_supported=yes
9726 _pkg_short_errors_supported=no
9728 ])# _PKG_SHORT_ERRORS_SUPPORTED
9731 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9732 # [ACTION-IF-NOT-FOUND])
9735 # Note that if there is a possibility the first call to
9736 # PKG_CHECK_MODULES might not happen, you should be sure to include an
9737 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9740 # --------------------------------------------------------------
9741 AC_DEFUN([PKG_CHECK_MODULES],
9742 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9743 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9744 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9747 AC_MSG_CHECKING([for $1])
9749 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9750 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
9752 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9753 and $1[]_LIBS to avoid the need to call pkg-config.
9754 See the pkg-config man page for more details.])
9756 if test $pkg_failed = yes; then
9757 _PKG_SHORT_ERRORS_SUPPORTED
9758 if test $_pkg_short_errors_supported = yes; then
9759 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
9761 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
9763 # Put the nasty error message in config.log where it belongs
9764 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9766 ifelse([$4], , [AC_MSG_ERROR(dnl
9767 [Package requirements ($2) were not met:
9771 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9772 installed software in a non-standard prefix.
9776 [AC_MSG_RESULT([no])
9778 elif test $pkg_failed = untried; then
9779 ifelse([$4], , [AC_MSG_FAILURE(dnl
9780 [The pkg-config script could not be found or is too old. Make sure it
9781 is in your PATH or set the PKG_CONFIG environment variable to the full
9786 To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
9789 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9790 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9791 AC_MSG_RESULT([yes])
9792 ifelse([$3], , :, [$3])
9794 ])# PKG_CHECK_MODULES
9796 # po.m4 serial 15 (gettext-0.17)
9797 dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
9798 dnl This file is free software; the Free Software Foundation
9799 dnl gives unlimited permission to copy and/or distribute it,
9800 dnl with or without modifications, as long as this notice is preserved.
9802 dnl This file can can be used in projects which are not available under
9803 dnl the GNU General Public License or the GNU Library General Public
9804 dnl License but which still want to provide support for the GNU gettext
9806 dnl Please note that the actual code of the GNU gettext library is covered
9807 dnl by the GNU Library General Public License, and the rest of the GNU
9808 dnl gettext package package is covered by the GNU General Public License.
9809 dnl They are *not* in the public domain.
9812 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9813 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9817 dnl Checks for all prerequisites of the po subdirectory.
9818 AC_DEFUN([AM_PO_SUBDIRS],
9820 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9821 AC_REQUIRE([AC_PROG_INSTALL])dnl
9822 AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
9823 AC_REQUIRE([AM_NLS])dnl
9825 dnl Release version of the gettext macros. This is used to ensure that
9826 dnl the gettext macros and po/Makefile.in.in are in sync.
9827 AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
9829 dnl Perform the following tests also if --disable-nls has been given,
9830 dnl because they are needed for "make dist" to work.
9832 dnl Search for GNU msgfmt in the PATH.
9833 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
9834 dnl The second test excludes FreeBSD msgfmt.
9835 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
9836 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
9837 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
9839 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
9841 dnl Test whether it is GNU msgfmt >= 0.15.
9843 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
9844 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
9845 *) MSGFMT_015=$MSGFMT ;;
9848 AC_SUBST([MSGFMT_015])
9850 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
9851 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
9852 *) GMSGFMT_015=$GMSGFMT ;;
9855 AC_SUBST([GMSGFMT_015])
9857 dnl Search for GNU xgettext 0.12 or newer in the PATH.
9858 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
9859 dnl The second test excludes FreeBSD xgettext.
9860 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
9861 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
9862 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
9864 dnl Remove leftover from FreeBSD xgettext call.
9867 dnl Test whether it is GNU xgettext >= 0.15.
9869 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
9870 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
9871 *) XGETTEXT_015=$XGETTEXT ;;
9874 AC_SUBST([XGETTEXT_015])
9876 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
9877 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
9878 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
9880 dnl Installation directories.
9881 dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
9882 dnl have to define it here, so that it can be used in po/Makefile.
9883 test -n "$localedir" || localedir='${datadir}/locale'
9884 AC_SUBST([localedir])
9886 dnl Support for AM_XGETTEXT_OPTION.
9887 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
9888 AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
9890 AC_CONFIG_COMMANDS([po-directories], [[
9891 for ac_file in $CONFIG_FILES; do
9892 # Support "outfile[:infile[:infile...]]"
9894 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9896 # PO directories have a Makefile.in generated from Makefile.in.in.
9897 case "$ac_file" in */Makefile.in)
9898 # Adjust a relative srcdir.
9899 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9900 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9901 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9902 # In autoconf-2.13 it is called $ac_given_srcdir.
9903 # In autoconf-2.50 it is called $srcdir.
9904 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9905 case "$ac_given_srcdir" in
9906 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9907 /*) top_srcdir="$ac_given_srcdir" ;;
9908 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
9910 # Treat a directory as a PO directory if and only if it has a
9911 # POTFILES.in file. This allows packages to have multiple PO
9912 # directories under different names or in different locations.
9913 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9914 rm -f "$ac_dir/POTFILES"
9915 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9916 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
9917 POMAKEFILEDEPS="POTFILES.in"
9918 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
9919 # on $ac_dir but don't depend on user-specified configuration
9921 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
9922 # The LINGUAS file contains the set of available languages.
9923 if test -n "$OBSOLETE_ALL_LINGUAS"; then
9924 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
9926 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
9927 # Hide the ALL_LINGUAS assigment from automake < 1.5.
9928 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
9929 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
9931 # The set of available languages was given in configure.in.
9932 # Hide the ALL_LINGUAS assigment from automake < 1.5.
9933 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
9936 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
9937 # Compute UPDATEPOFILES
9938 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
9939 # Compute DUMMYPOFILES
9940 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
9942 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
9943 case "$ac_given_srcdir" in
9945 *) srcdirpre='$(srcdir)/' ;;
9951 for lang in $ALL_LINGUAS; do
9952 POFILES="$POFILES $srcdirpre$lang.po"
9953 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
9954 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
9955 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
9957 # CATALOGS depends on both $ac_dir and the user's LINGUAS
9958 # environment variable.
9960 if test -n "$ALL_LINGUAS"; then
9961 for presentlang in $ALL_LINGUAS; do
9963 if test "%UNSET%" != "$LINGUAS"; then
9964 desiredlanguages="$LINGUAS"
9966 desiredlanguages="$ALL_LINGUAS"
9968 for desiredlang in $desiredlanguages; do
9969 # Use the presentlang catalog if desiredlang is
9970 # a. equal to presentlang, or
9971 # b. a variant of presentlang (because in this case,
9972 # presentlang can be used as a fallback for messages
9973 # which are not translated in the desiredlang catalog).
9974 case "$desiredlang" in
9975 "$presentlang"*) useit=yes;;
9978 if test $useit = yes; then
9979 INST_LINGUAS="$INST_LINGUAS $presentlang"
9984 if test -n "$INST_LINGUAS"; then
9985 for lang in $INST_LINGUAS; do
9986 CATALOGS="$CATALOGS $lang.gmo"
9989 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9990 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
9991 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
9992 if test -f "$f"; then
9994 *.orig | *.bak | *~) ;;
9995 *) cat "$f" >> "$ac_dir/Makefile" ;;
10003 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
10004 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
10005 # from automake < 1.5.
10006 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
10007 # Capture the value of LINGUAS because we need it to compute CATALOGS.
10008 LINGUAS="${LINGUAS-%UNSET%}"
10012 dnl Postprocesses a Makefile in a directory containing PO files.
10013 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
10015 # When this code is run, in config.status, two variables have already been
10017 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
10018 # - LINGUAS is the value of the environment variable LINGUAS at configure
10022 # Adjust a relative srcdir.
10023 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
10024 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
10025 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
10026 # In autoconf-2.13 it is called $ac_given_srcdir.
10027 # In autoconf-2.50 it is called $srcdir.
10028 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
10029 case "$ac_given_srcdir" in
10030 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
10031 /*) top_srcdir="$ac_given_srcdir" ;;
10032 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
10035 # Find a way to echo strings without interpreting backslash.
10036 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
10039 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
10040 gt_echo='printf %s\n'
10047 gt_echo='echo_func'
10051 # A sed script that extracts the value of VARIABLE from a Makefile.
10053 # Test if the hold space is empty.
10058 # Yes it was empty. Look if we have the expected variable definition.
10059 /^[ ]*VARIABLE[ ]*=/{
10060 # Seen the first line of the variable definition.
10061 s/^[ ]*VARIABLE[ ]*=//
10066 # Here we are processing a line from the variable definition.
10067 # Remove comment, more precisely replace it with a space.
10069 # See if the line ends in a backslash.
10073 # Print the line, without the trailing backslash.
10076 # There was no trailing backslash. The end of the variable definition is
10077 # reached. Clear the hold space.
10082 # A trailing backslash means that the variable definition continues in the
10083 # next line. Put a nonempty string into the hold space to indicate this.
10088 changequote([,])dnl
10090 # Set POTFILES to the value of the Makefile variable POTFILES.
10091 sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
10092 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
10093 # Compute POTFILES_DEPS as
10094 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
10096 for file in $POTFILES; do
10097 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
10101 if test -n "$OBSOLETE_ALL_LINGUAS"; then
10102 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
10104 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
10105 # The LINGUAS file contains the set of available languages.
10106 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
10107 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
10109 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
10110 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
10111 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
10113 # Hide the ALL_LINGUAS assigment from automake < 1.5.
10114 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
10116 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
10117 # Compute UPDATEPOFILES
10118 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
10119 # Compute DUMMYPOFILES
10120 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
10122 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
10123 # Compute PROPERTIESFILES
10124 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
10125 # Compute CLASSFILES
10126 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
10128 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
10130 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
10131 # Compute RESOURCESDLLFILES
10132 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
10133 case "$ac_given_srcdir" in
10135 *) srcdirpre='$(srcdir)/' ;;
10146 for lang in $ALL_LINGUAS; do
10147 POFILES="$POFILES $srcdirpre$lang.po"
10148 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
10149 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
10150 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
10151 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
10152 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
10153 QMFILES="$QMFILES $srcdirpre$lang.qm"
10154 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
10155 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
10156 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
10157 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
10159 # CATALOGS depends on both $ac_dir and the user's LINGUAS
10160 # environment variable.
10162 if test -n "$ALL_LINGUAS"; then
10163 for presentlang in $ALL_LINGUAS; do
10165 if test "%UNSET%" != "$LINGUAS"; then
10166 desiredlanguages="$LINGUAS"
10168 desiredlanguages="$ALL_LINGUAS"
10170 for desiredlang in $desiredlanguages; do
10171 # Use the presentlang catalog if desiredlang is
10172 # a. equal to presentlang, or
10173 # b. a variant of presentlang (because in this case,
10174 # presentlang can be used as a fallback for messages
10175 # which are not translated in the desiredlang catalog).
10176 case "$desiredlang" in
10177 "$presentlang"*) useit=yes;;
10180 if test $useit = yes; then
10181 INST_LINGUAS="$INST_LINGUAS $presentlang"
10190 if test -n "$INST_LINGUAS"; then
10191 for lang in $INST_LINGUAS; do
10192 CATALOGS="$CATALOGS $lang.gmo"
10193 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
10194 QTCATALOGS="$QTCATALOGS $lang.qm"
10195 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
10196 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
10197 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
10198 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
10202 sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
10203 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
10204 # Add dependencies that cannot be formulated as a simple suffix rule.
10205 for lang in $ALL_LINGUAS; do
10206 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
10207 cat >> "$ac_file.tmp" <<EOF
10208 $frobbedlang.msg: $lang.po
10209 @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
10210 \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
10214 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
10215 # Add dependencies that cannot be formulated as a simple suffix rule.
10216 for lang in $ALL_LINGUAS; do
10217 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
10218 cat >> "$ac_file.tmp" <<EOF
10219 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
10220 @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
10221 \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
10225 if test -n "$POMAKEFILEDEPS"; then
10226 cat >> "$ac_file.tmp" <<EOF
10227 Makefile: $POMAKEFILEDEPS
10230 mv "$ac_file.tmp" "$ac_file"
10233 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
10234 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
10236 XGETTEXT_EXTRA_OPTIONS=
10239 dnl Registers an option to be passed to xgettext in the po subdirectory.
10240 AC_DEFUN([AM_XGETTEXT_OPTION],
10242 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
10243 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
10246 # progtest.m4 serial 4 (gettext-0.14.2)
10247 dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
10248 dnl This file is free software; the Free Software Foundation
10249 dnl gives unlimited permission to copy and/or distribute it,
10250 dnl with or without modifications, as long as this notice is preserved.
10252 dnl This file can can be used in projects which are not available under
10253 dnl the GNU General Public License or the GNU Library General Public
10254 dnl License but which still want to provide support for the GNU gettext
10256 dnl Please note that the actual code of the GNU gettext library is covered
10257 dnl by the GNU Library General Public License, and the rest of the GNU
10258 dnl gettext package package is covered by the GNU General Public License.
10259 dnl They are *not* in the public domain.
10262 dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
10266 # Search path for a program which passes the given test.
10268 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
10269 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
10270 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
10272 # Prepare PATH_SEPARATOR.
10273 # The user is always right.
10274 if test "${PATH_SEPARATOR+set}" != set; then
10275 echo "#! /bin/sh" >conf$$.sh
10276 echo "exit 0" >>conf$$.sh
10278 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10286 # Find out how to test for executable files. Don't use a zero-byte file,
10287 # as systems may use methods other than mode bits to determine executability.
10288 cat >conf$$.file <<_ASEOF
10292 chmod +x conf$$.file
10293 if test -x conf$$.file >/dev/null 2>&1; then
10294 ac_executable_p="test -x"
10296 ac_executable_p="test -f"
10300 # Extract the first word of "$2", so it can be a program name with args.
10301 set dummy $2; ac_word=[$]2
10302 AC_MSG_CHECKING([for $ac_word])
10303 AC_CACHE_VAL(ac_cv_path_$1,
10305 [[\\/]]* | ?:[[\\/]]*)
10306 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
10309 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
10310 for ac_dir in ifelse([$5], , $PATH, [$5]); do
10312 test -z "$ac_dir" && ac_dir=.
10313 for ac_exec_ext in '' $ac_executable_extensions; do
10314 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
10315 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
10317 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
10324 dnl If no 4th arg is given, leave the cache variable unset,
10325 dnl so AC_PATH_PROGS will keep looking.
10326 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
10330 $1="$ac_cv_path_$1"
10331 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
10332 AC_MSG_RESULT([$]$1)
10339 # Configure paths for SDL
10340 # Sam Lantinga 9/21/99
10341 # stolen from Manish Singh
10342 # stolen back from Frank Belew
10343 # stolen from Manish Singh
10344 # Shamelessly stolen from Owen Taylor
10346 dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
10347 dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
10349 AC_DEFUN([AM_PATH_SDL],
10351 dnl Get the cflags and libraries from the sdl-config script
10353 AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
10354 sdl_prefix="$withval", sdl_prefix="")
10355 AC_ARG_WITH(sdl-exec-prefix,[ --with-sdl-exec-prefix=PFX Exec prefix where SDL is installed (optional)],
10356 sdl_exec_prefix="$withval", sdl_exec_prefix="")
10357 AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
10358 , enable_sdltest=yes)
10360 if test x$sdl_exec_prefix != x ; then
10361 sdl_config_args="$sdl_config_args --exec-prefix=$sdl_exec_prefix"
10362 if test x${SDL_CONFIG+set} != xset ; then
10363 SDL_CONFIG=$sdl_exec_prefix/bin/sdl-config
10366 if test x$sdl_prefix != x ; then
10367 sdl_config_args="$sdl_config_args --prefix=$sdl_prefix"
10368 if test x${SDL_CONFIG+set} != xset ; then
10369 SDL_CONFIG=$sdl_prefix/bin/sdl-config
10373 if test "x$prefix" != xNONE; then
10374 PATH="$prefix/bin:$prefix/usr/bin:$PATH"
10376 AC_PATH_PROG(SDL_CONFIG, sdl-config, no, [$PATH])
10377 min_sdl_version=ifelse([$1], ,0.11.0,$1)
10378 AC_MSG_CHECKING(for SDL - version >= $min_sdl_version)
10380 if test "$SDL_CONFIG" = "no" ; then
10383 SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
10384 SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
10386 sdl_major_version=`$SDL_CONFIG $sdl_config_args --version | \
10387 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
10388 sdl_minor_version=`$SDL_CONFIG $sdl_config_args --version | \
10389 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
10390 sdl_micro_version=`$SDL_CONFIG $sdl_config_args --version | \
10391 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
10392 if test "x$enable_sdltest" = "xyes" ; then
10393 ac_save_CFLAGS="$CFLAGS"
10394 ac_save_CXXFLAGS="$CXXFLAGS"
10395 ac_save_LIBS="$LIBS"
10396 CFLAGS="$CFLAGS $SDL_CFLAGS"
10397 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
10398 LIBS="$LIBS $SDL_LIBS"
10400 dnl Now check if the installed SDL is sufficiently new. (Also sanity
10401 dnl checks the results of sdl-config to some extent
10406 #include <stdlib.h>
10407 #include <string.h>
10411 my_strdup (char *str)
10417 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
10418 strcpy (new_str, str);
10426 int main (int argc, char *argv[])
10428 int major, minor, micro;
10431 /* This hangs on some systems (?)
10432 system ("touch conf.sdltest");
10434 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
10436 /* HP/UX 9 (%@#!) writes to sscanf strings */
10437 tmp_version = my_strdup("$min_sdl_version");
10438 if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
10439 printf("%s, bad version string\n", "$min_sdl_version");
10443 if (($sdl_major_version > major) ||
10444 (($sdl_major_version == major) && ($sdl_minor_version > minor)) ||
10445 (($sdl_major_version == major) && ($sdl_minor_version == minor) && ($sdl_micro_version >= micro)))
10451 printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", $sdl_major_version, $sdl_minor_version, $sdl_micro_version);
10452 printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
10453 printf("*** best to upgrade to the required version.\n");
10454 printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
10455 printf("*** to point to the correct copy of sdl-config, and remove the file\n");
10456 printf("*** config.cache before re-running configure\n");
10461 ],, no_sdl=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
10462 CFLAGS="$ac_save_CFLAGS"
10463 CXXFLAGS="$ac_save_CXXFLAGS"
10464 LIBS="$ac_save_LIBS"
10467 if test "x$no_sdl" = x ; then
10469 ifelse([$2], , :, [$2])
10472 if test "$SDL_CONFIG" = "no" ; then
10473 echo "*** The sdl-config script installed by SDL could not be found"
10474 echo "*** If SDL was installed in PREFIX, make sure PREFIX/bin is in"
10475 echo "*** your path, or set the SDL_CONFIG environment variable to the"
10476 echo "*** full path to sdl-config."
10478 if test -f conf.sdltest ; then
10481 echo "*** Could not run SDL test program, checking why..."
10482 CFLAGS="$CFLAGS $SDL_CFLAGS"
10483 CXXFLAGS="$CXXFLAGS $SDL_CFLAGS"
10484 LIBS="$LIBS $SDL_LIBS"
10489 int main(int argc, char *argv[])
10492 #define main K_and_R_C_main
10494 [ echo "*** The test program compiled, but did not run. This usually means"
10495 echo "*** that the run-time linker is not finding SDL or finding the wrong"
10496 echo "*** version of SDL. If it is not finding SDL, you'll need to set your"
10497 echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
10498 echo "*** to the installed location Also, make sure you have run ldconfig if that"
10499 echo "*** is required on your system"
10501 echo "*** If you have an old version installed, it is best to remove it, although"
10502 echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
10503 [ echo "*** The test program failed to compile or link. See the file config.log for the"
10504 echo "*** exact error that occured. This usually means SDL was incorrectly installed"
10505 echo "*** or that you have moved SDL since it was installed. In the latter case, you"
10506 echo "*** may want to edit the sdl-config script: $SDL_CONFIG" ])
10507 CFLAGS="$ac_save_CFLAGS"
10508 CXXFLAGS="$ac_save_CXXFLAGS"
10509 LIBS="$ac_save_LIBS"
10514 ifelse([$3], , :, [$3])
10516 AC_SUBST(SDL_CFLAGS)
10521 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
10523 # This file is free software; the Free Software Foundation
10524 # gives unlimited permission to copy and/or distribute it,
10525 # with or without modifications, as long as this notice is preserved.
10527 # AM_AUTOMAKE_VERSION(VERSION)
10528 # ----------------------------
10529 # Automake X.Y traces this macro to ensure aclocal.m4 has been
10530 # generated from the m4 files accompanying Automake X.Y.
10531 # (This private macro should not be called outside this file.)
10532 AC_DEFUN([AM_AUTOMAKE_VERSION],
10533 [am__api_version='1.10'
10534 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
10535 dnl require some minimum version. Point them to the right macro.
10536 m4_if([$1], [1.10.2], [],
10537 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
10540 # _AM_AUTOCONF_VERSION(VERSION)
10541 # -----------------------------
10542 # aclocal traces this macro to find the Autoconf version.
10543 # This is a private macro too. Using m4_define simplifies
10544 # the logic in aclocal, which can simply ignore this definition.
10545 m4_define([_AM_AUTOCONF_VERSION], [])
10547 # AM_SET_CURRENT_AUTOMAKE_VERSION
10548 # -------------------------------
10549 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
10550 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
10551 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
10552 [AM_AUTOMAKE_VERSION([1.10.2])dnl
10553 m4_ifndef([AC_AUTOCONF_VERSION],
10554 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
10555 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
10557 # Figure out how to run the assembler. -*- Autoconf -*-
10559 # Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
10561 # This file is free software; the Free Software Foundation
10562 # gives unlimited permission to copy and/or distribute it,
10563 # with or without modifications, as long as this notice is preserved.
10569 AC_DEFUN([AM_PROG_AS],
10570 [# By default we simply use the C compiler to build assembly code.
10571 AC_REQUIRE([AC_PROG_CC])
10572 test "${CCAS+set}" = set || CCAS=$CC
10573 test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
10574 AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
10575 AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
10576 _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
10579 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
10581 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
10583 # This file is free software; the Free Software Foundation
10584 # gives unlimited permission to copy and/or distribute it,
10585 # with or without modifications, as long as this notice is preserved.
10587 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
10588 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
10589 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
10591 # Of course, Automake must honor this variable whenever it calls a
10592 # tool from the auxiliary directory. The problem is that $srcdir (and
10593 # therefore $ac_aux_dir as well) can be either absolute or relative,
10594 # depending on how configure is run. This is pretty annoying, since
10595 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
10596 # source directory, any form will work fine, but in subdirectories a
10597 # relative path needs to be adjusted first.
10599 # $ac_aux_dir/missing
10600 # fails when called from a subdirectory if $ac_aux_dir is relative
10601 # $top_srcdir/$ac_aux_dir/missing
10602 # fails if $ac_aux_dir is absolute,
10603 # fails when called from a subdirectory in a VPATH build with
10604 # a relative $ac_aux_dir
10606 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
10607 # are both prefixed by $srcdir. In an in-source build this is usually
10608 # harmless because $srcdir is `.', but things will broke when you
10609 # start a VPATH build or use an absolute $srcdir.
10611 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
10612 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
10613 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
10614 # and then we would define $MISSING as
10615 # MISSING="\${SHELL} $am_aux_dir/missing"
10616 # This will work as long as MISSING is not called from configure, because
10617 # unfortunately $(top_srcdir) has no meaning in configure.
10618 # However there are other variables, like CC, which are often used in
10619 # configure, and could therefore not use this "fixed" $ac_aux_dir.
10621 # Another solution, used here, is to always expand $ac_aux_dir to an
10622 # absolute PATH. The drawback is that using absolute paths prevent a
10623 # configured tree to be moved without reconfiguration.
10625 AC_DEFUN([AM_AUX_DIR_EXPAND],
10626 [dnl Rely on autoconf to set up CDPATH properly.
10627 AC_PREREQ([2.50])dnl
10628 # expand $ac_aux_dir to an absolute path
10629 am_aux_dir=`cd $ac_aux_dir && pwd`
10632 # AM_CONDITIONAL -*- Autoconf -*-
10634 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
10635 # Free Software Foundation, Inc.
10637 # This file is free software; the Free Software Foundation
10638 # gives unlimited permission to copy and/or distribute it,
10639 # with or without modifications, as long as this notice is preserved.
10643 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
10644 # -------------------------------------
10645 # Define a conditional.
10646 AC_DEFUN([AM_CONDITIONAL],
10647 [AC_PREREQ(2.52)dnl
10648 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
10649 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
10650 AC_SUBST([$1_TRUE])dnl
10651 AC_SUBST([$1_FALSE])dnl
10652 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
10653 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
10661 AC_CONFIG_COMMANDS_PRE(
10662 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
10663 AC_MSG_ERROR([[conditional "$1" was never defined.
10664 Usually this means the macro was only invoked conditionally.]])
10667 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
10668 # Free Software Foundation, Inc.
10670 # This file is free software; the Free Software Foundation
10671 # gives unlimited permission to copy and/or distribute it,
10672 # with or without modifications, as long as this notice is preserved.
10676 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
10677 # written in clear, in which case automake, when reading aclocal.m4,
10678 # will think it sees a *use*, and therefore will trigger all it's
10679 # C support machinery. Also note that it means that autoscan, seeing
10680 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
10683 # _AM_DEPENDENCIES(NAME)
10684 # ----------------------
10685 # See how the compiler implements dependency checking.
10686 # NAME is "CC", "CXX", "GCJ", or "OBJC".
10687 # We try a few techniques and use that to set a single cache variable.
10689 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
10690 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
10691 # dependency, and given that the user is not expected to run this macro,
10692 # just rely on AC_PROG_CC.
10693 AC_DEFUN([_AM_DEPENDENCIES],
10694 [AC_REQUIRE([AM_SET_DEPDIR])dnl
10695 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
10696 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
10697 AC_REQUIRE([AM_DEP_TRACK])dnl
10699 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
10700 [$1], CXX, [depcc="$CXX" am_compiler_list=],
10701 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
10702 [$1], UPC, [depcc="$UPC" am_compiler_list=],
10703 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
10704 [depcc="$$1" am_compiler_list=])
10706 AC_CACHE_CHECK([dependency style of $depcc],
10707 [am_cv_$1_dependencies_compiler_type],
10708 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10709 # We make a subdir and do the tests there. Otherwise we can end up
10710 # making bogus files that we don't know about and never remove. For
10711 # instance it was reported that on HP-UX the gcc test will end up
10712 # making a dummy file named `D' -- because `-MD' means `put the output
10715 # Copy depcomp to subdir because otherwise we won't find it if we're
10716 # using a relative directory.
10717 cp "$am_depcomp" conftest.dir
10719 # We will build objects and dependencies in a subdirectory because
10720 # it helps to detect inapplicable dependency modes. For instance
10721 # both Tru64's cc and ICC support -MD to output dependencies as a
10722 # side effect of compilation, but ICC will put the dependencies in
10723 # the current directory while Tru64 will put them in the object
10727 am_cv_$1_dependencies_compiler_type=none
10728 if test "$am_compiler_list" = ""; then
10729 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
10731 for depmode in $am_compiler_list; do
10732 # Setup a source with many dependencies, because some compilers
10733 # like to wrap large dependency lists on column 80 (with \), and
10734 # we should not choose a depcomp mode which is confused by this.
10736 # We need to recreate these files for each test, as the compiler may
10737 # overwrite some of them when testing with obscure command lines.
10738 # This happens at least with the AIX C compiler.
10740 for i in 1 2 3 4 5 6; do
10741 echo '#include "conftst'$i'.h"' >> sub/conftest.c
10742 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
10743 # Solaris 8's {/usr,}/bin/sh.
10744 touch sub/conftst$i.h
10746 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10750 # after this tag, mechanisms are not by side-effect, so they'll
10751 # only be used when explicitly requested
10752 if test "x$enable_dependency_tracking" = xyes; then
10760 # We check with `-c' and `-o' for the sake of the "dashmstdout"
10761 # mode. It turns out that the SunPro C++ compiler does not properly
10762 # handle `-M -o', and we need to detect this.
10763 if depmode=$depmode \
10764 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
10765 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
10766 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
10767 >/dev/null 2>conftest.err &&
10768 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
10769 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
10770 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
10771 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10772 # icc doesn't choke on unknown options, it will just issue warnings
10773 # or remarks (even with -Werror). So we grep stderr for any message
10774 # that says an option was ignored or not supported.
10775 # When given -MP, icc 7.0 and 7.1 complain thusly:
10776 # icc: Command line warning: ignoring option '-M'; no argument required
10777 # The diagnosis changed in icc 8.0:
10778 # icc: Command line remark: option '-MP' not supported
10779 if (grep 'ignoring option' conftest.err ||
10780 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
10781 am_cv_$1_dependencies_compiler_type=$depmode
10788 rm -rf conftest.dir
10790 am_cv_$1_dependencies_compiler_type=none
10793 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
10794 AM_CONDITIONAL([am__fastdep$1], [
10795 test "x$enable_dependency_tracking" != xno \
10796 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
10802 # Choose a directory name for dependency files.
10803 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
10804 AC_DEFUN([AM_SET_DEPDIR],
10805 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10806 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
10812 AC_DEFUN([AM_DEP_TRACK],
10813 [AC_ARG_ENABLE(dependency-tracking,
10814 [ --disable-dependency-tracking speeds up one-time build
10815 --enable-dependency-tracking do not reject slow dependency extractors])
10816 if test "x$enable_dependency_tracking" != xno; then
10817 am_depcomp="$ac_aux_dir/depcomp"
10820 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
10821 AC_SUBST([AMDEPBACKSLASH])dnl
10822 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
10825 # Generate code to set up dependency tracking. -*- Autoconf -*-
10827 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
10828 # Free Software Foundation, Inc.
10830 # This file is free software; the Free Software Foundation
10831 # gives unlimited permission to copy and/or distribute it,
10832 # with or without modifications, as long as this notice is preserved.
10836 # _AM_OUTPUT_DEPENDENCY_COMMANDS
10837 # ------------------------------
10838 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
10839 [# Autoconf 2.62 quotes --file arguments for eval, but not when files
10840 # are listed without --file. Let's play safe and only enable the eval
10841 # if we detect the quoting.
10842 case $CONFIG_FILES in
10843 *\'*) eval set x "$CONFIG_FILES" ;;
10844 *) set x $CONFIG_FILES ;;
10849 # Strip MF so we end up with the name of the file.
10850 mf=`echo "$mf" | sed -e 's/:.*$//'`
10851 # Check whether this is an Automake generated Makefile or not.
10852 # We used to match only the files named `Makefile.in', but
10853 # some people rename them; so instead we look at the file content.
10854 # Grep'ing the first line is not enough: some people post-process
10855 # each Makefile.in and add a new line on top of each file to say so.
10856 # Grep'ing the whole file is not good either: AIX grep has a line
10857 # limit of 2048, but all sed's we know have understand at least 4000.
10858 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
10859 dirpart=`AS_DIRNAME("$mf")`
10863 # Extract the definition of DEPDIR, am__include, and am__quote
10864 # from the Makefile without running `make'.
10865 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
10866 test -z "$DEPDIR" && continue
10867 am__include=`sed -n 's/^am__include = //p' < "$mf"`
10868 test -z "am__include" && continue
10869 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
10870 # When using ansi2knr, U may be empty or an underscore; expand it
10871 U=`sed -n 's/^U = //p' < "$mf"`
10872 # Find all dependency output files, they are included files with
10873 # $(DEPDIR) in their names. We invoke sed twice because it is the
10874 # simplest approach to changing $(DEPDIR) to its actual value in the
10876 for file in `sed -n "
10877 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
10878 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
10879 # Make sure the directory exists.
10880 test -f "$dirpart/$file" && continue
10881 fdir=`AS_DIRNAME(["$file"])`
10882 AS_MKDIR_P([$dirpart/$fdir])
10883 # echo "creating $dirpart/$file"
10884 echo '# dummy' > "$dirpart/$file"
10887 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10890 # AM_OUTPUT_DEPENDENCY_COMMANDS
10891 # -----------------------------
10892 # This macro should only be invoked once -- use via AC_REQUIRE.
10894 # This code is only required when automatic dependency tracking
10895 # is enabled. FIXME. This creates each `.P' file that we will
10896 # need in order to bootstrap the dependency handling code.
10897 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10898 [AC_CONFIG_COMMANDS([depfiles],
10899 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10900 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10903 # Do all the work for Automake. -*- Autoconf -*-
10905 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
10906 # 2005, 2006, 2008 Free Software Foundation, Inc.
10908 # This file is free software; the Free Software Foundation
10909 # gives unlimited permission to copy and/or distribute it,
10910 # with or without modifications, as long as this notice is preserved.
10914 # This macro actually does too much. Some checks are only needed if
10915 # your package does certain things. But this isn't really a big deal.
10917 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10918 # AM_INIT_AUTOMAKE([OPTIONS])
10919 # -----------------------------------------------
10920 # The call with PACKAGE and VERSION arguments is the old style
10921 # call (pre autoconf-2.50), which is being phased out. PACKAGE
10922 # and VERSION should now be passed to AC_INIT and removed from
10923 # the call to AM_INIT_AUTOMAKE.
10924 # We support both call styles for the transition. After
10925 # the next Automake release, Autoconf can make the AC_INIT
10926 # arguments mandatory, and then we can depend on a new Autoconf
10927 # release and drop the old call support.
10928 AC_DEFUN([AM_INIT_AUTOMAKE],
10929 [AC_PREREQ([2.60])dnl
10930 dnl Autoconf wants to disallow AM_ names. We explicitly allow
10931 dnl the ones we care about.
10932 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10933 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10934 AC_REQUIRE([AC_PROG_INSTALL])dnl
10935 if test "`cd $srcdir && pwd`" != "`pwd`"; then
10936 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
10937 # is not polluted with repeated "-I."
10938 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
10939 # test to see if srcdir already configured
10940 if test -f $srcdir/config.status; then
10941 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10945 # test whether we have cygpath
10946 if test -z "$CYGPATH_W"; then
10947 if (cygpath --version) >/dev/null 2>/dev/null; then
10948 CYGPATH_W='cygpath -w'
10953 AC_SUBST([CYGPATH_W])
10955 # Define the identity of the package.
10956 dnl Distinguish between old-style and new-style calls.
10958 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10959 AC_SUBST([PACKAGE], [$1])dnl
10960 AC_SUBST([VERSION], [$2])],
10961 [_AM_SET_OPTIONS([$1])dnl
10962 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10963 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
10964 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
10965 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10966 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10968 _AM_IF_OPTION([no-define],,
10969 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
10970 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
10972 # Some tools Automake needs.
10973 AC_REQUIRE([AM_SANITY_CHECK])dnl
10974 AC_REQUIRE([AC_ARG_PROGRAM])dnl
10975 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
10976 AM_MISSING_PROG(AUTOCONF, autoconf)
10977 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
10978 AM_MISSING_PROG(AUTOHEADER, autoheader)
10979 AM_MISSING_PROG(MAKEINFO, makeinfo)
10981 AM_PROG_INSTALL_STRIP
10982 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
10983 # We need awk for the "check" target. The system "awk" is bad on
10985 AC_REQUIRE([AC_PROG_AWK])dnl
10986 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10987 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10988 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
10989 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10990 [_AM_PROG_TAR([v7])])])
10991 _AM_IF_OPTION([no-dependencies],,
10992 [AC_PROVIDE_IFELSE([AC_PROG_CC],
10993 [_AM_DEPENDENCIES(CC)],
10994 [define([AC_PROG_CC],
10995 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
10996 AC_PROVIDE_IFELSE([AC_PROG_CXX],
10997 [_AM_DEPENDENCIES(CXX)],
10998 [define([AC_PROG_CXX],
10999 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
11000 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
11001 [_AM_DEPENDENCIES(OBJC)],
11002 [define([AC_PROG_OBJC],
11003 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
11008 # When config.status generates a header, we must update the stamp-h file.
11009 # This file resides in the same directory as the config header
11010 # that is generated. The stamp files are numbered to have different names.
11012 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
11013 # loop where config.status creates the headers, so we can generate
11014 # our stamp files there.
11015 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
11016 [# Compute $1's index in $config_headers.
11019 for _am_header in $config_headers :; do
11020 case $_am_header in
11021 $_am_arg | $_am_arg:* )
11024 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
11027 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
11029 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
11031 # This file is free software; the Free Software Foundation
11032 # gives unlimited permission to copy and/or distribute it,
11033 # with or without modifications, as long as this notice is preserved.
11035 # AM_PROG_INSTALL_SH
11036 # ------------------
11037 # Define $install_sh.
11038 AC_DEFUN([AM_PROG_INSTALL_SH],
11039 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11040 install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
11041 AC_SUBST(install_sh)])
11043 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
11045 # This file is free software; the Free Software Foundation
11046 # gives unlimited permission to copy and/or distribute it,
11047 # with or without modifications, as long as this notice is preserved.
11051 # Check whether the underlying file-system supports filenames
11052 # with a leading dot. For instance MS-DOS doesn't.
11053 AC_DEFUN([AM_SET_LEADING_DOT],
11054 [rm -rf .tst 2>/dev/null
11055 mkdir .tst 2>/dev/null
11056 if test -d .tst; then
11061 rmdir .tst 2>/dev/null
11062 AC_SUBST([am__leading_dot])])
11064 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
11065 # From Jim Meyering
11067 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
11068 # Free Software Foundation, Inc.
11070 # This file is free software; the Free Software Foundation
11071 # gives unlimited permission to copy and/or distribute it,
11072 # with or without modifications, as long as this notice is preserved.
11076 AC_DEFUN([AM_MAINTAINER_MODE],
11077 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
11078 dnl maintainer-mode is disabled by default
11079 AC_ARG_ENABLE(maintainer-mode,
11080 [ --enable-maintainer-mode enable make rules and dependencies not useful
11081 (and sometimes confusing) to the casual installer],
11082 USE_MAINTAINER_MODE=$enableval,
11083 USE_MAINTAINER_MODE=no)
11084 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
11085 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
11086 MAINT=$MAINTAINER_MODE_TRUE
11091 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
11093 # Check to see how 'make' treats includes. -*- Autoconf -*-
11095 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
11097 # This file is free software; the Free Software Foundation
11098 # gives unlimited permission to copy and/or distribute it,
11099 # with or without modifications, as long as this notice is preserved.
11103 # AM_MAKE_INCLUDE()
11104 # -----------------
11105 # Check to see how make treats includes.
11106 AC_DEFUN([AM_MAKE_INCLUDE],
11107 [am_make=${MAKE-make}
11108 cat > confinc << 'END'
11113 # If we don't find an include directive, just comment out the code.
11114 AC_MSG_CHECKING([for style of include used by $am_make])
11118 # First try GNU make style include.
11119 echo "include confinc" > confmf
11120 # We grep out `Entering directory' and `Leaving directory'
11121 # messages which can occur if `w' ends up in MAKEFLAGS.
11122 # In particular we don't look at `^make:' because GNU make might
11123 # be invoked under some other name (usually "gmake"), in which
11124 # case it prints its new name instead of `make'.
11125 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
11126 am__include=include
11130 # Now try BSD make style include.
11131 if test "$am__include" = "#"; then
11132 echo '.include "confinc"' > confmf
11133 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
11134 am__include=.include
11139 AC_SUBST([am__include])
11140 AC_SUBST([am__quote])
11141 AC_MSG_RESULT([$_am_result])
11142 rm -f confinc confmf
11145 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
11147 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
11148 # Free Software Foundation, Inc.
11150 # This file is free software; the Free Software Foundation
11151 # gives unlimited permission to copy and/or distribute it,
11152 # with or without modifications, as long as this notice is preserved.
11156 # AM_MISSING_PROG(NAME, PROGRAM)
11157 # ------------------------------
11158 AC_DEFUN([AM_MISSING_PROG],
11159 [AC_REQUIRE([AM_MISSING_HAS_RUN])
11160 $1=${$1-"${am_missing_run}$2"}
11164 # AM_MISSING_HAS_RUN
11165 # ------------------
11166 # Define MISSING if not defined so far and test if it supports --run.
11167 # If it does, set am_missing_run to use it, otherwise, to nothing.
11168 AC_DEFUN([AM_MISSING_HAS_RUN],
11169 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11170 AC_REQUIRE_AUX_FILE([missing])dnl
11171 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
11172 # Use eval to expand $SHELL
11173 if eval "$MISSING --run true"; then
11174 am_missing_run="$MISSING --run "
11177 AC_MSG_WARN([`missing' script is too old or missing])
11181 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
11183 # This file is free software; the Free Software Foundation
11184 # gives unlimited permission to copy and/or distribute it,
11185 # with or without modifications, as long as this notice is preserved.
11189 # Check for `mkdir -p'.
11190 AC_DEFUN([AM_PROG_MKDIR_P],
11191 [AC_PREREQ([2.60])dnl
11192 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
11193 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
11194 dnl while keeping a definition of mkdir_p for backward compatibility.
11195 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
11196 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
11197 dnl Makefile.ins that do not define MKDIR_P, so we do our own
11198 dnl adjustment using top_builddir (which is defined more often than
11200 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
11202 [[\\/$]]* | ?:[[\\/]]*) ;;
11203 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
11207 # Helper functions for option handling. -*- Autoconf -*-
11209 # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
11211 # This file is free software; the Free Software Foundation
11212 # gives unlimited permission to copy and/or distribute it,
11213 # with or without modifications, as long as this notice is preserved.
11217 # _AM_MANGLE_OPTION(NAME)
11218 # -----------------------
11219 AC_DEFUN([_AM_MANGLE_OPTION],
11220 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
11222 # _AM_SET_OPTION(NAME)
11223 # ------------------------------
11224 # Set option NAME. Presently that only means defining a flag for this option.
11225 AC_DEFUN([_AM_SET_OPTION],
11226 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
11228 # _AM_SET_OPTIONS(OPTIONS)
11229 # ----------------------------------
11230 # OPTIONS is a space-separated list of Automake options.
11231 AC_DEFUN([_AM_SET_OPTIONS],
11232 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
11234 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
11235 # -------------------------------------------
11236 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
11237 AC_DEFUN([_AM_IF_OPTION],
11238 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
11240 # Check to make sure that the build environment is sane. -*- Autoconf -*-
11242 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
11243 # Free Software Foundation, Inc.
11245 # This file is free software; the Free Software Foundation
11246 # gives unlimited permission to copy and/or distribute it,
11247 # with or without modifications, as long as this notice is preserved.
11253 AC_DEFUN([AM_SANITY_CHECK],
11254 [AC_MSG_CHECKING([whether build environment is sane])
11257 echo timestamp > conftest.file
11258 # Do `set' in a subshell so we don't clobber the current shell's
11259 # arguments. Must try -L first in case configure is actually a
11260 # symlink; some systems play weird games with the mod time of symlinks
11261 # (eg FreeBSD returns the mod time of the symlink's containing
11264 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
11265 if test "$[*]" = "X"; then
11267 set X `ls -t $srcdir/configure conftest.file`
11269 rm -f conftest.file
11270 if test "$[*]" != "X $srcdir/configure conftest.file" \
11271 && test "$[*]" != "X conftest.file $srcdir/configure"; then
11273 # If neither matched, then we have a broken ls. This can happen
11274 # if, for instance, CONFIG_SHELL is bash and it inherits a
11275 # broken ls alias from the environment. This has actually
11276 # happened. Such a system could not be considered "sane".
11277 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
11278 alias in your environment])
11281 test "$[2]" = conftest.file
11287 AC_MSG_ERROR([newly created file is older than distributed files!
11288 Check your system clock])
11290 AC_MSG_RESULT(yes)])
11292 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
11294 # This file is free software; the Free Software Foundation
11295 # gives unlimited permission to copy and/or distribute it,
11296 # with or without modifications, as long as this notice is preserved.
11298 # AM_PROG_INSTALL_STRIP
11299 # ---------------------
11300 # One issue with vendor `install' (even GNU) is that you can't
11301 # specify the program used to strip binaries. This is especially
11302 # annoying in cross-compiling environments, where the build's strip
11303 # is unlikely to handle the host's binaries.
11304 # Fortunately install-sh will honor a STRIPPROG variable, so we
11305 # always use install-sh in `make install-strip', and initialize
11306 # STRIPPROG with the value of the STRIP variable (set by the user).
11307 AC_DEFUN([AM_PROG_INSTALL_STRIP],
11308 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
11309 # Installed binaries are usually stripped using `strip' when the user
11310 # run `make install-strip'. However `strip' might not be the right
11311 # tool to use in cross-compilation environments, therefore Automake
11312 # will honor the `STRIP' environment variable to overrule this program.
11313 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
11314 if test "$cross_compiling" != no; then
11315 AC_CHECK_TOOL([STRIP], [strip], :)
11317 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
11318 AC_SUBST([INSTALL_STRIP_PROGRAM])])
11320 # Copyright (C) 2006 Free Software Foundation, Inc.
11322 # This file is free software; the Free Software Foundation
11323 # gives unlimited permission to copy and/or distribute it,
11324 # with or without modifications, as long as this notice is preserved.
11326 # _AM_SUBST_NOTMAKE(VARIABLE)
11327 # ---------------------------
11328 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
11329 # This macro is traced by Automake.
11330 AC_DEFUN([_AM_SUBST_NOTMAKE])
11332 # Check how to create a tarball. -*- Autoconf -*-
11334 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
11336 # This file is free software; the Free Software Foundation
11337 # gives unlimited permission to copy and/or distribute it,
11338 # with or without modifications, as long as this notice is preserved.
11342 # _AM_PROG_TAR(FORMAT)
11343 # --------------------
11344 # Check how to create a tarball in format FORMAT.
11345 # FORMAT should be one of `v7', `ustar', or `pax'.
11347 # Substitute a variable $(am__tar) that is a command
11348 # writing to stdout a FORMAT-tarball containing the directory
11350 # tardir=directory && $(am__tar) > result.tar
11352 # Substitute a variable $(am__untar) that extract such
11353 # a tarball read from stdin.
11354 # $(am__untar) < result.tar
11355 AC_DEFUN([_AM_PROG_TAR],
11356 [# Always define AMTAR for backward compatibility.
11357 AM_MISSING_PROG([AMTAR], [tar])
11359 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
11360 [m4_case([$1], [ustar],, [pax],,
11361 [m4_fatal([Unknown tar format])])
11362 AC_MSG_CHECKING([how to create a $1 tar archive])
11363 # Loop over all known methods to create a tar archive until one works.
11364 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
11365 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
11366 # Do not fold the above two line into one, because Tru64 sh and
11367 # Solaris sh will not grok spaces in the rhs of `-'.
11368 for _am_tool in $_am_tools
11372 for _am_tar in tar gnutar gtar;
11374 AM_RUN_LOG([$_am_tar --version]) && break
11376 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
11377 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
11378 am__untar="$_am_tar -xf -"
11381 # Must skip GNU tar: if it does not support --format= it doesn't create
11382 # ustar tarball either.
11383 (tar --version) >/dev/null 2>&1 && continue
11384 am__tar='tar chf - "$$tardir"'
11385 am__tar_='tar chf - "$tardir"'
11386 am__untar='tar xf -'
11389 am__tar='pax -L -x $1 -w "$$tardir"'
11390 am__tar_='pax -L -x $1 -w "$tardir"'
11394 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
11395 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
11396 am__untar='cpio -i -H $1 -d'
11405 # If the value was cached, stop now. We just wanted to have am__tar
11406 # and am__untar set.
11407 test -n "${am_cv_prog_tar_$1}" && break
11409 # tar/untar a dummy directory, and stop if the command works
11410 rm -rf conftest.dir
11412 echo GrepMe > conftest.dir/file
11413 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
11414 rm -rf conftest.dir
11415 if test -s conftest.tar; then
11416 AM_RUN_LOG([$am__untar <conftest.tar])
11417 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
11420 rm -rf conftest.dir
11422 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
11423 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
11424 AC_SUBST([am__tar])
11425 AC_SUBST([am__untar])