pcsxr-1.9.92
[pcsx_rearmed.git] / aclocal.m4
... / ...
CommitLineData
1# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
2
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.
8
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
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17[m4_warning([this file was generated for autoconf 2.63.
18You have another version of autoconf. It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22# gettext.m4 serial 60 (gettext-0.17)
23dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
24dnl This file is free software; the Free Software Foundation
25dnl gives unlimited permission to copy and/or distribute it,
26dnl with or without modifications, as long as this notice is preserved.
27dnl
28dnl This file can can be used in projects which are not available under
29dnl the GNU General Public License or the GNU Library General Public
30dnl License but which still want to provide support for the GNU gettext
31dnl functionality.
32dnl Please note that the actual code of the GNU gettext library is covered
33dnl by the GNU Library General Public License, and the rest of the GNU
34dnl gettext package package is covered by the GNU General Public License.
35dnl They are *not* in the public domain.
36
37dnl Authors:
38dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
39dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
40
41dnl Macro to add for using GNU gettext.
42
43dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
44dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
45dnl default (if it is not specified or empty) is 'no-libtool'.
46dnl INTLSYMBOL should be 'external' for packages with no intl directory,
47dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
48dnl If INTLSYMBOL is 'use-libtool', then a libtool library
49dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
50dnl depending on --{enable,disable}-{shared,static} and on the presence of
51dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
52dnl $(top_builddir)/intl/libintl.a will be created.
53dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
54dnl implementations (in libc or libintl) without the ngettext() function
55dnl will be ignored. If NEEDSYMBOL is specified and is
56dnl 'need-formatstring-macros', then GNU gettext implementations that don't
57dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
58dnl INTLDIR is used to find the intl libraries. If empty,
59dnl the value `$(top_builddir)/intl/' is used.
60dnl
61dnl The result of the configuration is one of three cases:
62dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
63dnl and used.
64dnl Catalog format: GNU --> install in $(datadir)
65dnl Catalog extension: .mo after installation, .gmo in source tree
66dnl 2) GNU gettext has been found in the system's C library.
67dnl Catalog format: GNU --> install in $(datadir)
68dnl Catalog extension: .mo after installation, .gmo in source tree
69dnl 3) No internationalization, always use English msgid.
70dnl Catalog format: none
71dnl Catalog extension: none
72dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
73dnl The use of .gmo is historical (it was needed to avoid overwriting the
74dnl GNU format catalogs when building on a platform with an X/Open gettext),
75dnl but we keep it in order not to force irrelevant filename changes on the
76dnl maintainers.
77dnl
78AC_DEFUN([AM_GNU_GETTEXT],
79[
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
83])])])])])
84 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
85 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
86])])])])
87 define([gt_included_intl],
88 ifelse([$1], [external],
89 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
90 [yes]))
91 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
92 gt_NEEDS_INIT
93 AM_GNU_GETTEXT_NEED([$2])
94
95 AC_REQUIRE([AM_PO_SUBDIRS])dnl
96 ifelse(gt_included_intl, yes, [
97 AC_REQUIRE([AM_INTL_SUBDIR])dnl
98 ])
99
100 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
101 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
102 AC_REQUIRE([AC_LIB_RPATH])
103
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])
117 ])
118
119 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
120 gt_INTL_MACOSX
121
122 dnl Set USE_NLS.
123 AC_REQUIRE([AM_NLS])
124
125 ifelse(gt_included_intl, yes, [
126 BUILD_INCLUDED_LIBINTL=no
127 USE_INCLUDED_LIBINTL=no
128 ])
129 LIBINTL=
130 LTLIBINTL=
131 POSUB=
132
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 ;;
138 esac
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"
141
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)
152
153 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
154 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
155 ])
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.
159
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)
164#endif
165changequote(,)dnl
166typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
167changequote([,])dnl
168'
169 else
170 gt_revision_test_code=
171 fi
172 if test $gt_api_version -ge 2; then
173 gt_expression_test_code=' + * ngettext ("", "", 0)'
174 else
175 gt_expression_test_code=
176 fi
177
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
181extern int _nl_msg_cat_cntr;
182extern int *_nl_domain_bindings;],
183 [bindtextdomain ("", "");
184return * 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"])])
187
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, , [
191 AM_ICONV_LINK
192 ])
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"
202 gt_save_LIBS="$LIBS"
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
207extern int _nl_msg_cat_cntr;
208extern
209#ifdef __cplusplus
210"C"
211#endif
212const char *_nl_expand_alias (const char *);],
213 [bindtextdomain ("", "");
214return * 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
222extern int _nl_msg_cat_cntr;
223extern
224#ifdef __cplusplus
225"C"
226#endif
227const char *_nl_expand_alias (const char *);],
228 [bindtextdomain ("", "");
229return * 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"
233 ])
234 fi
235 CPPFLAGS="$gt_save_CPPFLAGS"
236 LIBS="$gt_save_LIBS"])
237 fi
238
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
248 else
249 dnl Reset the values set by searching for libintl.
250 LIBINTL=
251 LTLIBINTL=
252 INCINTL=
253 fi
254
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
260 fi
261 fi
262
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/ $//'`
270 fi
271
272 CATOBJEXT=
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.
276 CATOBJEXT=.gmo
277 fi
278 ])
279
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"
286 fi
287 fi
288
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
293 is requested.])
294 else
295 USE_NLS=no
296 fi
297 fi
298
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"
306 else
307 gt_source="libc"
308 fi
309 else
310 gt_source="included intl directory"
311 fi
312 AC_MSG_RESULT([$gt_source])
313 fi
314
315 if test "$USE_NLS" = "yes"; then
316
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])
322 fi
323
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.])
329 fi
330
331 dnl We need to process the po/ directory.
332 POSUB=po
333 fi
334
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
340 fi
341
342 dnl Make all variables we use known to autoconf.
343 AC_SUBST(BUILD_INCLUDED_LIBINTL)
344 AC_SUBST(USE_INCLUDED_LIBINTL)
345 AC_SUBST(CATOBJEXT)
346
347 dnl For backward compatibility. Some configure.ins may be using this.
348 nls_cv_header_intl=
349 nls_cv_header_libgt=
350
351 dnl For backward compatibility. Some Makefiles may be using this.
352 DATADIRNAME=share
353 AC_SUBST(DATADIRNAME)
354
355 dnl For backward compatibility. Some Makefiles may be using this.
356 INSTOBJEXT=.mo
357 AC_SUBST(INSTOBJEXT)
358
359 dnl For backward compatibility. Some Makefiles may be using this.
360 GENCAT=gencat
361 AC_SUBST(GENCAT)
362
363 dnl For backward compatibility. Some Makefiles may be using this.
364 INTLOBJS=
365 if test "$USE_INCLUDED_LIBINTL" = yes; then
366 INTLOBJS="\$(GETTOBJS)"
367 fi
368 AC_SUBST(INTLOBJS)
369
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)
373 ])
374
375 dnl For backward compatibility. Some Makefiles may be using this.
376 INTLLIBS="$LIBINTL"
377 AC_SUBST(INTLLIBS)
378
379 dnl Make all documented variables known to autoconf.
380 AC_SUBST(LIBINTL)
381 AC_SUBST(LTLIBINTL)
382 AC_SUBST(POSUB)
383])
384
385
386dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
387m4_define([gt_NEEDS_INIT],
388[
389 m4_divert_text([DEFAULTS], [gt_needs=])
390 m4_define([gt_NEEDS_INIT], [])
391])
392
393
394dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
395AC_DEFUN([AM_GNU_GETTEXT_NEED],
396[
397 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
398])
399
400
401dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
402AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
403
404# iconv.m4 serial AM6 (gettext-0.17)
405dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
406dnl This file is free software; the Free Software Foundation
407dnl gives unlimited permission to copy and/or distribute it,
408dnl with or without modifications, as long as this notice is preserved.
409
410dnl From Bruno Haible.
411
412AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
413[
414 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
415 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
416 AC_REQUIRE([AC_LIB_RPATH])
417
418 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
419 dnl accordingly.
420 AC_LIB_LINKFLAGS_BODY([iconv])
421])
422
423AC_DEFUN([AM_ICONV_LINK],
424[
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
428
429 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
430 dnl accordingly.
431 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
432
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])
439
440 AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
441 am_cv_func_iconv="no, consider installing GNU libiconv"
442 am_cv_lib_iconv=no
443 AC_TRY_LINK([#include <stdlib.h>
444#include <iconv.h>],
445 [iconv_t cd = iconv_open("","");
446 iconv(cd,NULL,NULL,NULL,NULL);
447 iconv_close(cd);],
448 am_cv_func_iconv=yes)
449 if test "$am_cv_func_iconv" != yes; then
450 am_save_LIBS="$LIBS"
451 LIBS="$LIBS $LIBICONV"
452 AC_TRY_LINK([#include <stdlib.h>
453#include <iconv.h>],
454 [iconv_t cd = iconv_open("","");
455 iconv(cd,NULL,NULL,NULL,NULL);
456 iconv_close(cd);],
457 am_cv_lib_iconv=yes
458 am_cv_func_iconv=yes)
459 LIBS="$am_save_LIBS"
460 fi
461 ])
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.
465 am_save_LIBS="$LIBS"
466 if test $am_cv_lib_iconv = yes; then
467 LIBS="$LIBS $LIBICONV"
468 fi
469 AC_TRY_RUN([
470#include <iconv.h>
471#include <string.h>
472int main ()
473{
474 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
475 returns. */
476 {
477 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
478 if (cd_utf8_to_88591 != (iconv_t)(-1))
479 {
480 static const char input[] = "\342\202\254"; /* EURO SIGN */
481 char buf[10];
482 const char *inptr = input;
483 size_t inbytesleft = strlen (input);
484 char *outptr = buf;
485 size_t outbytesleft = sizeof (buf);
486 size_t res = iconv (cd_utf8_to_88591,
487 (char **) &inptr, &inbytesleft,
488 &outptr, &outbytesleft);
489 if (res == 0)
490 return 1;
491 }
492 }
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. */
495 {
496 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
497 if (cd_88591_to_utf8 != (iconv_t)(-1))
498 {
499 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
500 char buf[50];
501 const char *inptr = input;
502 size_t inbytesleft = strlen (input);
503 char *outptr = buf;
504 size_t outbytesleft = sizeof (buf);
505 size_t res = iconv (cd_88591_to_utf8,
506 (char **) &inptr, &inbytesleft,
507 &outptr, &outbytesleft);
508 if ((int)res > 0)
509 return 1;
510 }
511 }
512#endif
513 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
514 provided. */
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)
519 /* Try AIX names. */
520 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
521 /* Try HP-UX names. */
522 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
523 return 1;
524 return 0;
525}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
526 [case "$host_os" in
527 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
528 *) am_cv_func_iconv_works="guessing yes" ;;
529 esac])
530 LIBS="$am_save_LIBS"
531 ])
532 case "$am_cv_func_iconv_works" in
533 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
534 *) am_func_iconv=yes ;;
535 esac
536 else
537 am_func_iconv=no am_cv_lib_iconv=no
538 fi
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.])
542 fi
543 if test "$am_cv_lib_iconv" = yes; then
544 AC_MSG_CHECKING([how to link with libiconv])
545 AC_MSG_RESULT([$LIBICONV])
546 else
547 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
548 dnl either.
549 CPPFLAGS="$am_save_CPPFLAGS"
550 LIBICONV=
551 LTLIBICONV=
552 fi
553 AC_SUBST(LIBICONV)
554 AC_SUBST(LTLIBICONV)
555])
556
557AC_DEFUN([AM_ICONV],
558[
559 AM_ICONV_LINK
560 if test "$am_cv_func_iconv" = yes; then
561 AC_MSG_CHECKING([for iconv declaration])
562 AC_CACHE_VAL(am_cv_proto_iconv, [
563 AC_TRY_COMPILE([
564#include <stdlib.h>
565#include <iconv.h>
566extern
567#ifdef __cplusplus
568"C"
569#endif
570#if defined(__STDC__) || defined(__cplusplus)
571size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
572#else
573size_t iconv();
574#endif
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.])
582 fi
583])
584
585# intlmacosx.m4 serial 1 (gettext-0.17)
586dnl Copyright (C) 2004-2007 Free Software Foundation, Inc.
587dnl This file is free software; the Free Software Foundation
588dnl gives unlimited permission to copy and/or distribute it,
589dnl with or without modifications, as long as this notice is preserved.
590dnl
591dnl This file can can be used in projects which are not available under
592dnl the GNU General Public License or the GNU Library General Public
593dnl License but which still want to provide support for the GNU gettext
594dnl functionality.
595dnl Please note that the actual code of the GNU gettext library is covered
596dnl by the GNU Library General Public License, and the rest of the GNU
597dnl gettext package package is covered by the GNU General Public License.
598dnl They are *not* in the public domain.
599
600dnl Checks for special options needed on MacOS X.
601dnl Defines INTL_MACOSX_LIBS.
602AC_DEFUN([gt_INTL_MACOSX],
603[
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.])
617 fi
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.])
629 fi
630 INTL_MACOSX_LIBS=
631 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
632 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
633 fi
634 AC_SUBST([INTL_MACOSX_LIBS])
635])
636
637# lib-ld.m4 serial 3 (gettext-0.13)
638dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
639dnl This file is free software; the Free Software Foundation
640dnl gives unlimited permission to copy and/or distribute it,
641dnl with or without modifications, as long as this notice is preserved.
642
643dnl Subroutines of libtool.m4,
644dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
645dnl with libtool.m4.
646
647dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
648AC_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.
651case `$LD -v 2>&1 </dev/null` in
652*GNU* | *'with BFD'*)
653 acl_cv_prog_gnu_ld=yes ;;
654*)
655 acl_cv_prog_gnu_ld=no ;;
656esac])
657with_gnu_ld=$acl_cv_prog_gnu_ld
658])
659
660dnl From libtool-1.4. Sets the variable LD.
661AC_DEFUN([AC_LIB_PROG_LD],
662[AC_ARG_WITH(gnu-ld,
663[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
664test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
665AC_REQUIRE([AC_PROG_CC])dnl
666AC_REQUIRE([AC_CANONICAL_HOST])dnl
667# Prepare PATH_SEPARATOR.
668# The user is always right.
669if test "${PATH_SEPARATOR+set}" != set; then
670 echo "#! /bin/sh" >conf$$.sh
671 echo "exit 0" >>conf$$.sh
672 chmod +x conf$$.sh
673 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
674 PATH_SEPARATOR=';'
675 else
676 PATH_SEPARATOR=:
677 fi
678 rm -f conf$$.sh
679fi
680ac_prog=ld
681if test "$GCC" = yes; then
682 # Check if gcc -print-prog-name=ld gives a path.
683 AC_MSG_CHECKING([for ld used by GCC])
684 case $host in
685 *-*-mingw*)
686 # gcc leaves a trailing carriage return which upsets mingw
687 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
688 *)
689 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
690 esac
691 case $ac_prog in
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%/%"`
699 done
700 test -z "$LD" && LD="$ac_prog"
701 ;;
702 "")
703 # If it fails, then pretend we aren't using GCC.
704 ac_prog=ld
705 ;;
706 *)
707 # If it is relative, then search for the first ld in PATH.
708 with_gnu_ld=unknown
709 ;;
710 esac
711elif test "$with_gnu_ld" = yes; then
712 AC_MSG_CHECKING([for GNU ld])
713else
714 AC_MSG_CHECKING([for non-GNU ld])
715fi
716AC_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 ;;
729 *)
730 test "$with_gnu_ld" != yes && break ;;
731 esac
732 fi
733 done
734 IFS="$ac_save_ifs"
735else
736 acl_cv_path_LD="$LD" # Let the user override the test with a path.
737fi])
738LD="$acl_cv_path_LD"
739if test -n "$LD"; then
740 AC_MSG_RESULT($LD)
741else
742 AC_MSG_RESULT(no)
743fi
744test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
745AC_LIB_PROG_LD_GNU
746])
747
748# lib-link.m4 serial 13 (gettext-0.17)
749dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
750dnl This file is free software; the Free Software Foundation
751dnl gives unlimited permission to copy and/or distribute it,
752dnl with or without modifications, as long as this notice is preserved.
753
754dnl From Bruno Haible.
755
756AC_PREREQ(2.54)
757
758dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
759dnl the libraries corresponding to explicit and implicit dependencies.
760dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
761dnl augments the CPPFLAGS variable.
762dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
763dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
764AC_DEFUN([AC_LIB_LINKFLAGS],
765[
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"
777 ])
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)
783 AC_SUBST([LIB]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.
788 HAVE_LIB[]NAME=yes
789 undefine([Name])
790 undefine([NAME])
791])
792
793dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
794dnl searches for libname and the libraries corresponding to explicit and
795dnl implicit dependencies, together with the specified include files and
796dnl the ability to compile and link the specified testcode. If found, it
797dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
798dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
799dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
800dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
801dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
802dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
803AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
804[
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___])])
810
811 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
812 dnl accordingly.
813 AC_LIB_LINKFLAGS_BODY([$1], [$2])
814
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)
820
821 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
822 ac_save_LIBS="$LIBS"
823 LIBS="$LIBS $LIB[]NAME"
824 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
825 LIBS="$ac_save_LIBS"
826 ])
827 if test "$ac_cv_lib[]Name" = yes; then
828 HAVE_LIB[]NAME=yes
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])
832 else
833 HAVE_LIB[]NAME=no
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"
837 LIB[]NAME=
838 LTLIB[]NAME=
839 LIB[]NAME[]_PREFIX=
840 fi
841 AC_SUBST([HAVE_LIB]NAME)
842 AC_SUBST([LIB]NAME)
843 AC_SUBST([LTLIB]NAME)
844 AC_SUBST([LIB]NAME[_PREFIX])
845 undefine([Name])
846 undefine([NAME])
847])
848
849dnl Determine the platform dependent parameters needed to use rpath:
850dnl acl_libext,
851dnl acl_shlibext,
852dnl acl_hardcode_libdir_flag_spec,
853dnl acl_hardcode_libdir_separator,
854dnl acl_hardcode_direct,
855dnl acl_hardcode_minus_L.
856AC_DEFUN([AC_LIB_RPATH],
857[
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
867 . ./conftest.sh
868 rm -f ./conftest.sh
869 acl_cv_rpath=done
870 ])
871 wl="$acl_cv_wl"
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.
881 AC_ARG_ENABLE(rpath,
882 [ --disable-rpath do not hardcode runtime library paths],
883 :, enable_rpath=yes)
884])
885
886dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
887dnl the libraries corresponding to explicit and implicit dependencies.
888dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
889dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
890dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
891AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
892[
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.
899 use_additional=yes
900 AC_LIB_WITH_FINAL_PREFIX([
901 eval additional_includedir=\"$includedir\"
902 eval additional_libdir=\"$libdir\"
903 ])
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],
907[
908 if test "X$withval" = "Xno"; then
909 use_additional=no
910 else
911 if test "X$withval" = "X"; then
912 AC_LIB_WITH_FINAL_PREFIX([
913 eval additional_includedir=\"$includedir\"
914 eval additional_libdir=\"$libdir\"
915 ])
916 else
917 additional_includedir="$withval/include"
918 additional_libdir="$withval/$acl_libdirstem"
919 fi
920 fi
921])
922 dnl Search the library and its dependencies in $additional_libdir and
923 dnl $LDFLAGS. Using breadth-first-seach.
924 LIB[]NAME=
925 LTLIB[]NAME=
926 INC[]NAME=
927 LIB[]NAME[]_PREFIX=
928 rpathdirs=
929 ltrpathdirs=
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"
934 names_next_round=
935 for name in $names_this_round; do
936 already_handled=
937 for n in $names_already_handled; do
938 if test "$n" = "$name"; then
939 already_handled=yes
940 break
941 fi
942 done
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"
955 else
956 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
957 dnl that this library doesn't exist. So just drop it.
958 :
959 fi
960 else
961 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
962 dnl and the already constructed $LIBNAME/$LTLIBNAME.
963 found_dir=
964 found_la=
965 found_so=
966 found_a=
967 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
968 if test -n "$acl_shlibext"; then
969 shrext=".$acl_shlibext" # typically: shrext=.so
970 else
971 shrext=
972 fi
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
979 found_dir="$dir"
980 found_so="$dir/$libname$shrext"
981 else
982 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
983 ver=`(cd "$dir" && \
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
989 found_dir="$dir"
990 found_so="$dir/$libname$shrext.$ver"
991 fi
992 else
993 eval library_names=\"$acl_library_names_spec\"
994 for f in $library_names; do
995 if test -f "$dir/$f"; then
996 found_dir="$dir"
997 found_so="$dir/$f"
998 break
999 fi
1000 done
1001 fi
1002 fi
1003 fi
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
1007 found_dir="$dir"
1008 found_a="$dir/$libname.$acl_libext"
1009 fi
1010 fi
1011 if test "X$found_dir" != "X"; then
1012 if test -f "$dir/$libname.la"; then
1013 found_la="$dir/$libname.la"
1014 fi
1015 fi
1016 fi
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\"])
1020 case "$x" in
1021 -L*)
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
1026 found_dir="$dir"
1027 found_so="$dir/$libname$shrext"
1028 else
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
1036 found_dir="$dir"
1037 found_so="$dir/$libname$shrext.$ver"
1038 fi
1039 else
1040 eval library_names=\"$acl_library_names_spec\"
1041 for f in $library_names; do
1042 if test -f "$dir/$f"; then
1043 found_dir="$dir"
1044 found_so="$dir/$f"
1045 break
1046 fi
1047 done
1048 fi
1049 fi
1050 fi
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
1054 found_dir="$dir"
1055 found_a="$dir/$libname.$acl_libext"
1056 fi
1057 fi
1058 if test "X$found_dir" != "X"; then
1059 if test -f "$dir/$libname.la"; then
1060 found_la="$dir/$libname.la"
1061 fi
1062 fi
1063 ;;
1064 esac
1065 if test "X$found_dir" != "X"; then
1066 break
1067 fi
1068 done
1069 fi
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"
1080 else
1081 dnl Use an explicit option to hardcode DIR into the resulting
1082 dnl binary.
1083 dnl Potentially add DIR to ltrpathdirs.
1084 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1085 haveit=
1086 for x in $ltrpathdirs; do
1087 if test "X$x" = "X$found_dir"; then
1088 haveit=yes
1089 break
1090 fi
1091 done
1092 if test -z "$haveit"; then
1093 ltrpathdirs="$ltrpathdirs $found_dir"
1094 fi
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"
1100 else
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
1103 dnl binary.
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.
1107 haveit=
1108 for x in $rpathdirs; do
1109 if test "X$x" = "X$found_dir"; then
1110 haveit=yes
1111 break
1112 fi
1113 done
1114 if test -z "$haveit"; then
1115 rpathdirs="$rpathdirs $found_dir"
1116 fi
1117 else
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
1121 haveit=
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
1125 haveit=yes
1126 break
1127 fi
1128 done
1129 if test -z "$haveit"; then
1130 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1131 fi
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"
1135 dnl here.
1136 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1137 else
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"
1144 dnl here.
1145 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1146 fi
1147 fi
1148 fi
1149 fi
1150 else
1151 if test "X$found_a" != "X"; then
1152 dnl Linking with a static library.
1153 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1154 else
1155 dnl We shouldn't come here, but anyway it's good to have a
1156 dnl fallback.
1157 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1158 fi
1159 fi
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"
1167 ;;
1168 esac
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
1178 haveit=
1179 if test "X$additional_includedir" = "X/usr/local/include"; then
1180 if test -n "$GCC"; then
1181 case $host_os in
1182 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1183 esac
1184 fi
1185 fi
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
1190 haveit=yes
1191 break
1192 fi
1193 done
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"
1198 fi
1199 fi
1200 fi
1201 fi
1202 fi
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"
1209 case "$found_la" in
1210 */* | *\\*) . "$found_la" ;;
1211 *) . "./$found_la" ;;
1212 esac
1213 libdir="$save_libdir"
1214 dnl We use only dependency_libs.
1215 for dep in $dependency_libs; do
1216 case "$dep" in
1217 -L*)
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
1227 haveit=
1228 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1229 if test -n "$GCC"; then
1230 case $host_os in
1231 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1232 esac
1233 fi
1234 fi
1235 if test -z "$haveit"; then
1236 haveit=
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
1240 haveit=yes
1241 break
1242 fi
1243 done
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"
1248 fi
1249 fi
1250 haveit=
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
1254 haveit=yes
1255 break
1256 fi
1257 done
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"
1262 fi
1263 fi
1264 fi
1265 fi
1266 ;;
1267 -R*)
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.
1272 haveit=
1273 for x in $rpathdirs; do
1274 if test "X$x" = "X$dir"; then
1275 haveit=yes
1276 break
1277 fi
1278 done
1279 if test -z "$haveit"; then
1280 rpathdirs="$rpathdirs $dir"
1281 fi
1282 dnl Potentially add DIR to ltrpathdirs.
1283 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1284 haveit=
1285 for x in $ltrpathdirs; do
1286 if test "X$x" = "X$dir"; then
1287 haveit=yes
1288 break
1289 fi
1290 done
1291 if test -z "$haveit"; then
1292 ltrpathdirs="$ltrpathdirs $dir"
1293 fi
1294 fi
1295 ;;
1296 -l*)
1297 dnl Handle this in the next round.
1298 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1299 ;;
1300 *.la)
1301 dnl Handle this in the next round. Throw away the .la's
1302 dnl directory; it is already contained in a preceding -L
1303 dnl option.
1304 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1305 ;;
1306 *)
1307 dnl Most likely an immediate library name.
1308 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1309 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1310 ;;
1311 esac
1312 done
1313 fi
1314 else
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"
1321 fi
1322 fi
1323 fi
1324 done
1325 done
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.
1331 alldirs=
1332 for found_dir in $rpathdirs; do
1333 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1334 done
1335 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1336 acl_save_libdir="$libdir"
1337 libdir="$alldirs"
1338 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1339 libdir="$acl_save_libdir"
1340 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1341 else
1342 dnl The -rpath options are cumulative.
1343 for found_dir in $rpathdirs; do
1344 acl_save_libdir="$libdir"
1345 libdir="$found_dir"
1346 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1347 libdir="$acl_save_libdir"
1348 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1349 done
1350 fi
1351 fi
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"
1357 done
1358 fi
1359])
1360
1361dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1362dnl unless already present in VAR.
1363dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1364dnl contains two or three consecutive elements that belong together.
1365AC_DEFUN([AC_LIB_APPENDTOVAR],
1366[
1367 for element in [$2]; do
1368 haveit=
1369 for x in $[$1]; do
1370 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1371 if test "X$x" = "X$element"; then
1372 haveit=yes
1373 break
1374 fi
1375 done
1376 if test -z "$haveit"; then
1377 [$1]="${[$1]}${[$1]:+ }$element"
1378 fi
1379 done
1380])
1381
1382dnl For those cases where a variable contains several -L and -l options
1383dnl referring to unknown libraries and directories, this macro determines the
1384dnl necessary additional linker options for the runtime path.
1385dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1386dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1387dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1388dnl otherwise linking without libtool is assumed.
1389AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1390[
1391 AC_REQUIRE([AC_LIB_RPATH])
1392 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1393 $1=
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
1397 dnl binary.
1398 rpathdirs=
1399 next=
1400 for opt in $2; do
1401 if test -n "$next"; then
1402 dir="$next"
1403 dnl No need to hardcode the standard /usr/lib.
1404 if test "X$dir" != "X/usr/$acl_libdirstem"; then
1405 rpathdirs="$rpathdirs $dir"
1406 fi
1407 next=
1408 else
1409 case $opt in
1410 -L) next=yes ;;
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"
1415 fi
1416 next= ;;
1417 *) next= ;;
1418 esac
1419 fi
1420 done
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"
1426 done
1427 else
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.
1432 alldirs=
1433 for dir in $rpathdirs; do
1434 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1435 done
1436 acl_save_libdir="$libdir"
1437 libdir="$alldirs"
1438 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1439 libdir="$acl_save_libdir"
1440 $1="$flag"
1441 else
1442 dnl The -rpath options are cumulative.
1443 for dir in $rpathdirs; do
1444 acl_save_libdir="$libdir"
1445 libdir="$dir"
1446 eval flag=\"$acl_hardcode_libdir_flag_spec\"
1447 libdir="$acl_save_libdir"
1448 $1="${$1}${$1:+ }$flag"
1449 done
1450 fi
1451 fi
1452 fi
1453 fi
1454 fi
1455 AC_SUBST([$1])
1456])
1457
1458# lib-prefix.m4 serial 5 (gettext-0.15)
1459dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
1460dnl This file is free software; the Free Software Foundation
1461dnl gives unlimited permission to copy and/or distribute it,
1462dnl with or without modifications, as long as this notice is preserved.
1463
1464dnl From Bruno Haible.
1465
1466dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1467dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1468dnl require excessive bracketing.
1469ifdef([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])])])
1472
1473dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1474dnl to access previously installed libraries. The basic assumption is that
1475dnl a user will want packages to use other packages he previously installed
1476dnl with the same --prefix option.
1477dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1478dnl libraries, but is otherwise very convenient.
1479AC_DEFUN([AC_LIB_PREFIX],
1480[
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.
1487 use_additional=yes
1488 AC_LIB_WITH_FINAL_PREFIX([
1489 eval additional_includedir=\"$includedir\"
1490 eval additional_libdir=\"$libdir\"
1491 ])
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],
1495[
1496 if test "X$withval" = "Xno"; then
1497 use_additional=no
1498 else
1499 if test "X$withval" = "X"; then
1500 AC_LIB_WITH_FINAL_PREFIX([
1501 eval additional_includedir=\"$includedir\"
1502 eval additional_libdir=\"$libdir\"
1503 ])
1504 else
1505 additional_includedir="$withval/include"
1506 additional_libdir="$withval/$acl_libdirstem"
1507 fi
1508 fi
1509])
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
1518 haveit=
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
1522 haveit=yes
1523 break
1524 fi
1525 done
1526 if test -z "$haveit"; then
1527 if test "X$additional_includedir" = "X/usr/local/include"; then
1528 if test -n "$GCC"; then
1529 case $host_os in
1530 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1531 esac
1532 fi
1533 fi
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"
1538 fi
1539 fi
1540 fi
1541 fi
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
1549 haveit=
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
1553 haveit=yes
1554 break
1555 fi
1556 done
1557 if test -z "$haveit"; then
1558 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1559 if test -n "$GCC"; then
1560 case $host_os in
1561 linux*) haveit=yes;;
1562 esac
1563 fi
1564 fi
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"
1569 fi
1570 fi
1571 fi
1572 fi
1573 fi
1574])
1575
1576dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1577dnl acl_final_exec_prefix, containing the values to which $prefix and
1578dnl $exec_prefix will expand at the end of the configure script.
1579AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1580[
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"
1585 else
1586 acl_final_prefix="$prefix"
1587 fi
1588 if test "X$exec_prefix" = "XNONE"; then
1589 acl_final_exec_prefix='${prefix}'
1590 else
1591 acl_final_exec_prefix="$exec_prefix"
1592 fi
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"
1597])
1598
1599dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1600dnl variables prefix and exec_prefix bound to the values they will have
1601dnl at the end of the configure script.
1602AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1603[
1604 acl_save_prefix="$prefix"
1605 prefix="$acl_final_prefix"
1606 acl_save_exec_prefix="$exec_prefix"
1607 exec_prefix="$acl_final_exec_prefix"
1608 $1
1609 exec_prefix="$acl_save_exec_prefix"
1610 prefix="$acl_save_prefix"
1611])
1612
1613dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
1614dnl the basename of the libdir, either "lib" or "lib64".
1615AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1616[
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".
1625 acl_libdirstem=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 ;;
1636 esac ;;
1637 esac
1638 fi
1639 done
1640 IFS="$acl_save_IFS"
1641 fi
1642])
1643
1644# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1645#
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
1649#
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.
1653
1654m4_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
1658#
1659# This file is part of GNU Libtool.
1660#
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.
1665#
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.
1670#
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.
1675#
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.
1681])
1682
1683# serial 56 LT_INIT
1684
1685
1686# LT_PREREQ(VERSION)
1687# ------------------
1688# Complain and exit if this libtool version is less that VERSION.
1689m4_defun([LT_PREREQ],
1690[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1691 [m4_default([$3],
1692 [m4_fatal([Libtool version $1 or higher is required],
1693 63)])],
1694 [$2])])
1695
1696
1697# _LT_CHECK_BUILDDIR
1698# ------------------
1699# Complain if the absolute build directory name contains unusual characters
1700m4_defun([_LT_CHECK_BUILDDIR],
1701[case `pwd` in
1702 *\ * | *\ *)
1703 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1704esac
1705])
1706
1707
1708# LT_INIT([OPTIONS])
1709# ------------------
1710AC_DEFUN([LT_INIT],
1711[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1712AC_BEFORE([$0], [LT_LANG])dnl
1713AC_BEFORE([$0], [LT_OUTPUT])dnl
1714AC_BEFORE([$0], [LTDL_INIT])dnl
1715m4_require([_LT_CHECK_BUILDDIR])dnl
1716
1717dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1718m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1719m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1720dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1721dnl unless we require an AC_DEFUNed macro:
1722AC_REQUIRE([LTOPTIONS_VERSION])dnl
1723AC_REQUIRE([LTSUGAR_VERSION])dnl
1724AC_REQUIRE([LTVERSION_VERSION])dnl
1725AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1726m4_require([_LT_PROG_LTMAIN])dnl
1727
1728dnl Parse OPTIONS
1729_LT_SET_OPTIONS([$0], [$1])
1730
1731# This can be used to rebuild libtool when needed
1732LIBTOOL_DEPS="$ltmain"
1733
1734# Always use our own libtool.
1735LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1736AC_SUBST(LIBTOOL)dnl
1737
1738_LT_SETUP
1739
1740# Only expand once:
1741m4_define([LT_INIT])
1742])# LT_INIT
1743
1744# Old names:
1745AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1746AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1747dnl aclocal-1.4 backwards compatibility:
1748dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1749dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1750
1751
1752# _LT_CC_BASENAME(CC)
1753# -------------------
1754# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
1755m4_defun([_LT_CC_BASENAME],
1756[for cc_temp in $1""; do
1757 case $cc_temp in
1758 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1759 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1760 \-*) ;;
1761 *) break;;
1762 esac
1763done
1764cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1765])
1766
1767
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])'.
1772m4_defun([_LT_FILEUTILS_DEFAULTS],
1773[: ${CP="cp -f"}
1774: ${MV="mv -f"}
1775: ${RM="rm -f"}
1776])# _LT_FILEUTILS_DEFAULTS
1777
1778
1779# _LT_SETUP
1780# ---------
1781m4_defun([_LT_SETUP],
1782[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1783AC_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
1787dnl
1788_LT_DECL([], [build_alias], [0], [The build system])dnl
1789_LT_DECL([], [build], [0])dnl
1790_LT_DECL([], [build_os], [0])dnl
1791dnl
1792AC_REQUIRE([AC_PROG_CC])dnl
1793AC_REQUIRE([LT_PATH_LD])dnl
1794AC_REQUIRE([LT_PATH_NM])dnl
1795dnl
1796AC_REQUIRE([AC_PROG_LN_S])dnl
1797test -z "$LN_S" && LN_S="ln -s"
1798_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1799dnl
1800AC_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
1803dnl
1804m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1805m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1806m4_require([_LT_CMD_RELOAD])dnl
1807m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1808m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1809m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1810
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.
1814if test -n "\${ZSH_VERSION+set}" ; then
1815 setopt NO_GLOB_SUBST
1816fi
1817])
1818if test -n "${ZSH_VERSION+set}" ; then
1819 setopt NO_GLOB_SUBST
1820fi
1821
1822_LT_CHECK_OBJDIR
1823
1824m4_require([_LT_TAG_COMPILER])dnl
1825_LT_PROG_ECHO_BACKSLASH
1826
1827case $host_os in
1828aix3*)
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
1833 COLLECT_NAMES=
1834 export COLLECT_NAMES
1835 fi
1836 ;;
1837esac
1838
1839# Sed substitution that helps us do robust quoting. It backslashifies
1840# metacharacters that are still active within double-quoted strings.
1841sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1842
1843# Same as above, but do not quote variable references.
1844double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1845
1846# Sed substitution to delay expansion of an escaped shell variable in a
1847# double_quote_subst'ed string.
1848delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1849
1850# Sed substitution to delay expansion of an escaped single quote.
1851delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1852
1853# Sed substitution to avoid accidental globbing in evaled expressions
1854no_glob_subst='s/\*/\\\*/g'
1855
1856# Global variables:
1857ofile=libtool
1858can_build_shared=yes
1859
1860# All known linkers require a `.a' archive for static linking (except MSVC,
1861# which needs '.lib').
1862libext=a
1863
1864with_gnu_ld="$lt_cv_prog_gnu_ld"
1865
1866old_CC="$CC"
1867old_CFLAGS="$CFLAGS"
1868
1869# Set sane defaults for various variables
1870test -z "$CC" && CC=cc
1871test -z "$LTCC" && LTCC=$CC
1872test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1873test -z "$LD" && LD=ld
1874test -z "$ac_objext" && ac_objext=o
1875
1876_LT_CC_BASENAME([$compiler])
1877
1878# Only perform the check for file, if the check method requires it
1879test -z "$MAGIC_CMD" && MAGIC_CMD=file
1880case $deplibs_check_method in
1881file_magic*)
1882 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1883 _LT_PATH_MAGIC
1884 fi
1885 ;;
1886esac
1887
1888# Use C for the default configuration in the libtool script
1889LT_SUPPORTED_TAG([CC])
1890_LT_LANG_C_CONFIG
1891_LT_LANG_DEFAULT_CONFIG
1892_LT_CONFIG_COMMANDS
1893])# _LT_SETUP
1894
1895
1896# _LT_PROG_LTMAIN
1897# ---------------
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.
1902m4_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'])
1905ltmain="$ac_aux_dir/ltmain.sh"
1906])# _LT_PROG_LTMAIN
1907
1908
1909
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'
1913# label.
1914
1915
1916# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1917# ----------------------------------------
1918# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1919m4_define([_LT_CONFIG_LIBTOOL_INIT],
1920[m4_ifval([$1],
1921 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1922 [$1
1923])])])
1924
1925# Initialize.
1926m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1927
1928
1929# _LT_CONFIG_LIBTOOL([COMMANDS])
1930# ------------------------------
1931# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1932m4_define([_LT_CONFIG_LIBTOOL],
1933[m4_ifval([$1],
1934 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1935 [$1
1936])])])
1937
1938# Initialize.
1939m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1940
1941
1942# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1943# -----------------------------------------------------
1944m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1945[_LT_CONFIG_LIBTOOL([$1])
1946_LT_CONFIG_LIBTOOL_INIT([$2])
1947])
1948
1949
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.
1954m4_define([_LT_FORMAT_COMMENT],
1955[m4_ifval([$1], [
1956m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1957 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1958)])
1959
1960
1961
1962
1963
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.
1970m4_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])
1975 m4_ifval([$4],
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])])])
1979])
1980
1981
1982# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1983# --------------------------------------------------------
1984m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1985
1986
1987# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1988# ------------------------------------------------
1989m4_define([lt_decl_tag_varnames],
1990[_lt_decl_filter([tagged?], [yes], $@)])
1991
1992
1993# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1994# ---------------------------------------------------------
1995m4_define([_lt_decl_filter],
1996[m4_case([$#],
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
2002])
2003
2004
2005# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2006# --------------------------------------------------
2007m4_define([lt_decl_quote_varnames],
2008[_lt_decl_filter([value], [1], $@)])
2009
2010
2011# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2012# ---------------------------------------------------
2013m4_define([lt_decl_dquote_varnames],
2014[_lt_decl_filter([value], [2], $@)])
2015
2016
2017# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2018# ---------------------------------------------------
2019m4_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)), [ ]))])
2024m4_define([_lt_decl_varnames_tagged],
2025[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2026
2027
2028# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2029# ------------------------------------------------
2030m4_define([lt_decl_all_varnames],
2031[_$0(m4_quote(m4_default([$1], [[, ]])),
2032 m4_if([$2], [],
2033 m4_quote(lt_decl_varnames),
2034 m4_quote(m4_shift($@))))[]dnl
2035])
2036m4_define([_lt_decl_all_varnames],
2037[lt_join($@, lt_decl_varnames_tagged([$1],
2038 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2039])
2040
2041
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.
2047m4_define([_LT_CONFIG_STATUS_DECLARE],
2048[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
2049
2050
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:
2057#
2058# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
2059m4_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)])])])
2062
2063
2064# _LT_LIBTOOL_TAGS
2065# ----------------
2066# Output comment and list of tags supported by the script
2067m4_defun([_LT_LIBTOOL_TAGS],
2068[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2069available_tags="_LT_TAGS"dnl
2070])
2071
2072
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:
2077#
2078# # Some comment about what VAR is for.
2079# visible_name=$lt_internal_name
2080m4_define([_LT_LIBTOOL_DECLARE],
2081[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2082 [description])))[]dnl
2083m4_pushdef([_libtool_name],
2084 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2085m4_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
2090m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2091])
2092
2093
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.
2100m4_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)])])])
2104
2105
2106# _LT_LIBTOOL_TAG_VARS(TAG)
2107# -------------------------
2108m4_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])])])])
2111
2112
2113# _LT_TAGVAR(VARNAME, [TAGNAME])
2114# ------------------------------
2115m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2116
2117
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.
2126m4_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
2139
2140
2141# Initialize.
2142m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2143[
2144
2145# The HP-UX ksh and POSIX shell print the target directory to stdout
2146# if CDPATH is set.
2147(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2148
2149sed_quote_subst='$sed_quote_subst'
2150double_quote_subst='$double_quote_subst'
2151delay_variable_subst='$delay_variable_subst'
2152_LT_CONFIG_STATUS_DECLARATIONS
2153LTCC='$LTCC'
2154LTCFLAGS='$LTCFLAGS'
2155compiler='$compiler_DEFAULT'
2156
2157# Quote evaled strings.
2158for 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\\"\\\`\\\\\\""
2163 ;;
2164 *)
2165 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2166 ;;
2167 esac
2168done
2169
2170# Double-quote double-evaled strings.
2171for 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\\"\\\`\\\\\\""
2176 ;;
2177 *)
2178 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2179 ;;
2180 esac
2181done
2182
2183# Fix-up fallback echo if it was mangled by the above quoting rules.
2184case \$lt_ECHO in
2185*'\\\[$]0 --fallback-echo"')dnl "
2186 lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
2187 ;;
2188esac
2189
2190_LT_OUTPUT_LIBTOOL_INIT
2191])
2192
2193
2194# LT_OUTPUT
2195# ---------
2196# This macro allows early generation of the libtool script (before
2197# AC_OUTPUT is called), incase it is used in configure for compilation
2198# tests.
2199AC_DEFUN([LT_OUTPUT],
2200[: ${CONFIG_LT=./config.lt}
2201AC_MSG_NOTICE([creating $CONFIG_LT])
2202cat >"$CONFIG_LT" <<_LTEOF
2203#! $SHELL
2204# Generated by $as_me.
2205# Run this file to recreate a libtool stub with the current configuration.
2206
2207lt_cl_silent=false
2208SHELL=\${CONFIG_SHELL-$SHELL}
2209_LTEOF
2210
2211cat >>"$CONFIG_LT" <<\_LTEOF
2212AS_SHELL_SANITIZE
2213_AS_PREPARE
2214
2215exec AS_MESSAGE_FD>&1
2216exec AS_MESSAGE_LOG_FD>>config.log
2217{
2218 echo
2219 AS_BOX([Running $as_me.])
2220} >&AS_MESSAGE_LOG_FD
2221
2222lt_cl_help="\
2223\`$as_me' creates a local libtool stub from the current configuration,
2224for use in further configure time tests before the real libtool is
2225generated.
2226
2227Usage: $[0] [[OPTIONS]]
2228
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
2233
2234Report bugs to <bug-libtool@gnu.org>."
2235
2236lt_cl_version="\
2237m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2238m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2239configured by $[0], generated by m4_PACKAGE_STRING.
2240
2241Copyright (C) 2008 Free Software Foundation, Inc.
2242This config.lt script is free software; the Free Software Foundation
2243gives unlimited permision to copy, distribute and modify it."
2244
2245while test $[#] != 0
2246do
2247 case $[1] in
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 )
2253 debug=: ;;
2254 --quiet | --q* | --silent | --s* | -q )
2255 lt_cl_silent=: ;;
2256
2257 -*) AC_MSG_ERROR([unrecognized option: $[1]
2258Try \`$[0] --help' for more information.]) ;;
2259
2260 *) AC_MSG_ERROR([unrecognized argument: $[1]
2261Try \`$[0] --help' for more information.]) ;;
2262 esac
2263 shift
2264done
2265
2266if $lt_cl_silent; then
2267 exec AS_MESSAGE_FD>/dev/null
2268fi
2269_LTEOF
2270
2271cat >>"$CONFIG_LT" <<_LTEOF
2272_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2273_LTEOF
2274
2275cat >>"$CONFIG_LT" <<\_LTEOF
2276AC_MSG_NOTICE([creating $ofile])
2277_LT_OUTPUT_LIBTOOL_COMMANDS
2278AS_EXIT(0)
2279_LTEOF
2280chmod +x "$CONFIG_LT"
2281
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.
2286if test "$no_create" != yes; then
2287 lt_cl_success=:
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)
2294fi
2295])# LT_OUTPUT
2296
2297
2298# _LT_CONFIG(TAG)
2299# ---------------
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.
2304m4_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
2313 fi
2314
2315 cfgfile="${ofile}T"
2316 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2317 $RM "$cfgfile"
2318
2319 cat <<_LT_EOF >> "$cfgfile"
2320#! $SHELL
2321
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.
2326#
2327_LT_COPYING
2328_LT_LIBTOOL_TAGS
2329
2330# ### BEGIN LIBTOOL CONFIG
2331_LT_LIBTOOL_CONFIG_VARS
2332_LT_LIBTOOL_TAG_VARS
2333# ### END LIBTOOL CONFIG
2334
2335_LT_EOF
2336
2337 case $host_os in
2338 aix3*)
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.
2343if test "X${COLLECT_NAMES+set}" != Xset; then
2344 COLLECT_NAMES=
2345 export COLLECT_NAMES
2346fi
2347_LT_EOF
2348 ;;
2349 esac
2350
2351 _LT_PROG_LTMAIN
2352
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)
2359
2360 _LT_PROG_XSI_SHELLFNS
2361
2362 sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
2363 || (rm -f "$cfgfile"; exit 1)
2364
2365 mv -f "$cfgfile" "$ofile" ||
2366 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2367 chmod +x "$ofile"
2368],
2369[cat <<_LT_EOF >> "$ofile"
2370
2371dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2372dnl 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
2376_LT_EOF
2377])dnl /m4_if
2378],
2379[m4_if([$1], [], [
2380 PACKAGE='$PACKAGE'
2381 VERSION='$VERSION'
2382 TIMESTAMP='$TIMESTAMP'
2383 RM='$RM'
2384 ofile='$ofile'], [])
2385])dnl /_LT_CONFIG_SAVE_COMMANDS
2386])# _LT_CONFIG
2387
2388
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'
2394AC_DEFUN([LT_SUPPORTED_TAG], [])
2395
2396
2397# C support is built-in for now
2398m4_define([_LT_LANG_C_enabled], [])
2399m4_define([_LT_TAGS], [])
2400
2401
2402# LT_LANG(LANG)
2403# -------------
2404# Enable libtool support for the given language if not already enabled.
2405AC_DEFUN([LT_LANG],
2406[AC_BEFORE([$0], [LT_OUTPUT])dnl
2407m4_case([$1],
2408 [C], [_LT_LANG(C)],
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],
2415 [_LT_LANG($1)],
2416 [m4_fatal([$0: unsupported language: "$1"])])])dnl
2417])# LT_LANG
2418
2419
2420# _LT_LANG(LANGNAME)
2421# ------------------
2422m4_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
2428])# _LT_LANG
2429
2430
2431# _LT_LANG_DEFAULT_CONFIG
2432# -----------------------
2433m4_defun([_LT_LANG_DEFAULT_CONFIG],
2434[AC_PROVIDE_IFELSE([AC_PROG_CXX],
2435 [LT_LANG(CXX)],
2436 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2437
2438AC_PROVIDE_IFELSE([AC_PROG_F77],
2439 [LT_LANG(F77)],
2440 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2441
2442AC_PROVIDE_IFELSE([AC_PROG_FC],
2443 [LT_LANG(FC)],
2444 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2445
2446dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2447dnl pulling things in needlessly.
2448AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2449 [LT_LANG(GCJ)],
2450 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2451 [LT_LANG(GCJ)],
2452 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2453 [LT_LANG(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)])])])])])
2460
2461AC_PROVIDE_IFELSE([LT_PROG_RC],
2462 [LT_LANG(RC)],
2463 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2464])# _LT_LANG_DEFAULT_CONFIG
2465
2466# Obsolete macros:
2467AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2468AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2469AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2470AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2471dnl aclocal-1.4 backwards compatibility:
2472dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2473dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2474dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2475dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2476
2477
2478# _LT_TAG_COMPILER
2479# ----------------
2480m4_defun([_LT_TAG_COMPILER],
2481[AC_REQUIRE([AC_PROG_CC])dnl
2482
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
2487
2488# If no C compiler was specified, use CC.
2489LTCC=${LTCC-"$CC"}
2490
2491# If no C compiler flags were specified, use CFLAGS.
2492LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2493
2494# Allow CC to be a program name with arguments.
2495compiler=$CC
2496])# _LT_TAG_COMPILER
2497
2498
2499# _LT_COMPILER_BOILERPLATE
2500# ------------------------
2501# Check for compiler boilerplate output or warnings with
2502# the simple compiler test code.
2503m4_defun([_LT_COMPILER_BOILERPLATE],
2504[m4_require([_LT_DECL_SED])dnl
2505ac_outfile=conftest.$ac_objext
2506echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2507eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2508_lt_compiler_boilerplate=`cat conftest.err`
2509$RM conftest*
2510])# _LT_COMPILER_BOILERPLATE
2511
2512
2513# _LT_LINKER_BOILERPLATE
2514# ----------------------
2515# Check for linker boilerplate output or warnings with
2516# the simple link test code.
2517m4_defun([_LT_LINKER_BOILERPLATE],
2518[m4_require([_LT_DECL_SED])dnl
2519ac_outfile=conftest.$ac_objext
2520echo "$lt_simple_link_test_code" >conftest.$ac_ext
2521eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2522_lt_linker_boilerplate=`cat conftest.err`
2523$RM -r conftest*
2524])# _LT_LINKER_BOILERPLATE
2525
2526# _LT_REQUIRED_DARWIN_CHECKS
2527# -------------------------
2528m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2529 case $host_os in
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])
2546
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
2553 # link flags.
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
2560 _lt_result=$?
2561 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
2562 lt_cv_apple_cc_single_mod=yes
2563 else
2564 cat conftest.err >&AS_MESSAGE_LOG_FD
2565 fi
2566 rm -rf libconftest.dylib*
2567 rm -f conftest.*
2568 fi])
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"
2579 ])
2580 case $host_os in
2581 rhapsody* | darwin1.[[012]])
2582 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2583 darwin1.*)
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' ;;
2592 10.[[012]]*)
2593 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2594 10.*)
2595 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2596 esac
2597 ;;
2598 esac
2599 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2600 _lt_dar_single_mod='$single_module'
2601 fi
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'
2604 else
2605 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2606 fi
2607 if test "$DSYMUTIL" != ":"; then
2608 _lt_dsymutil='~$DSYMUTIL $lib || :'
2609 else
2610 _lt_dsymutil=
2611 fi
2612 ;;
2613 esac
2614])
2615
2616
2617# _LT_DARWIN_LINKER_FEATURES
2618# --------------------------
2619# Checks for linker and compiler features on darwin
2620m4_defun([_LT_DARWIN_LINKER_FEATURES],
2621[
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 ;;
2633 esac
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}"
2640 m4_if([$1], [CXX],
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}"
2644 fi
2645],[])
2646 else
2647 _LT_TAGVAR(ld_shlibs, $1)=no
2648 fi
2649])
2650
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.
2659m4_defun([_LT_SYS_MODULE_PATH_AIX],
2660[m4_require([_LT_DECL_SED])dnl
2661AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2662lt_aix_libpath_sed='
2663 /Import File Strings/,/^$/ {
2664 /^0/ {
2665 s/^0 *\(.*\)$/\1/
2666 p
2667 }
2668 }'
2669aix_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.
2671if test -z "$aix_libpath"; then
2672 aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2673fi],[])
2674if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2675])# _LT_SYS_MODULE_PATH_AIX
2676
2677
2678# _LT_SHELL_INIT(ARG)
2679# -------------------
2680m4_define([_LT_SHELL_INIT],
2681[ifdef([AC_DIVERSION_NOTICE],
2682 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
2683 [AC_DIVERT_PUSH(NOTICE)])
2684$1
2685AC_DIVERT_POP
2686])# _LT_SHELL_INIT
2687
2688
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.
2693m4_defun([_LT_PROG_ECHO_BACKSLASH],
2694[_LT_SHELL_INIT([
2695# Check that we are running under the correct shell.
2696SHELL=${CONFIG_SHELL-/bin/sh}
2697
2698case X$lt_ECHO in
2699X*--fallback-echo)
2700 # Remove one level of quotation (which was required for Make).
2701 ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2702 ;;
2703esac
2704
2705ECHO=${lt_ECHO-echo}
2706if test "X[$]1" = X--no-reexec; then
2707 # Discard the --no-reexec flag, and continue.
2708 shift
2709elif test "X[$]1" = X--fallback-echo; then
2710 # Avoid inline document here, it may be left over
2711 :
2712elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
2713 # Yippee, $ECHO works!
2714 :
2715else
2716 # Restart under the correct shell.
2717 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2718fi
2719
2720if test "X[$]1" = X--fallback-echo; then
2721 # used as fallback echo
2722 shift
2723 cat <<_LT_EOF
2724[$]*
2725_LT_EOF
2726 exit 0
2727fi
2728
2729# The HP-UX ksh and POSIX shell print the target directory to stdout
2730# if CDPATH is set.
2731(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2732
2733if 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
2740 then
2741 break
2742 fi
2743 done
2744 fi
2745
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
2749 :
2750 else
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'
2754 #
2755 # So, first we look for a working echo in the user's PATH.
2756
2757 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2758 for dir in $PATH /usr/ucb; do
2759 IFS="$lt_save_ifs"
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
2764 ECHO="$dir/echo"
2765 break
2766 fi
2767 done
2768 IFS="$lt_save_ifs"
2769
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.
2776 ECHO='print -r'
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
2783 export CONFIG_SHELL
2784 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2785 else
2786 # Try using printf.
2787 ECHO='printf %s\n'
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
2792 :
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
2798 export CONFIG_SHELL
2799 SHELL="$CONFIG_SHELL"
2800 export 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"
2807 else
2808 # maybe with a smaller string...
2809 prev=:
2810
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
2813 then
2814 break
2815 fi
2816 prev="$cmd"
2817 done
2818
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+"[$]@"}
2823 else
2824 # Oops. We lost completely, so just stick with echo.
2825 ECHO=echo
2826 fi
2827 fi
2828 fi
2829 fi
2830 fi
2831fi
2832
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.
2835lt_ECHO=$ECHO
2836if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2837 lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2838fi
2839
2840AC_SUBST(lt_ECHO)
2841])
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
2846
2847
2848# _LT_ENABLE_LOCK
2849# ---------------
2850m4_defun([_LT_ENABLE_LOCK],
2851[AC_ARG_ENABLE([libtool-lock],
2852 [AS_HELP_STRING([--disable-libtool-lock],
2853 [avoid locking (might break parallel builds)])])
2854test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2855
2856# Some flags need to be propagated to the compiler or linker for good
2857# libtool support.
2858case $host in
2859ia64-*-hpux*)
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
2864 *ELF-32*)
2865 HPUX_IA64_MODE="32"
2866 ;;
2867 *ELF-64*)
2868 HPUX_IA64_MODE="64"
2869 ;;
2870 esac
2871 fi
2872 rm -rf conftest*
2873 ;;
2874*-*-irix6*)
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
2880 *32-bit*)
2881 LD="${LD-ld} -melf32bsmip"
2882 ;;
2883 *N32*)
2884 LD="${LD-ld} -melf32bmipn32"
2885 ;;
2886 *64-bit*)
2887 LD="${LD-ld} -melf64bmip"
2888 ;;
2889 esac
2890 else
2891 case `/usr/bin/file conftest.$ac_objext` in
2892 *32-bit*)
2893 LD="${LD-ld} -32"
2894 ;;
2895 *N32*)
2896 LD="${LD-ld} -n32"
2897 ;;
2898 *64-bit*)
2899 LD="${LD-ld} -64"
2900 ;;
2901 esac
2902 fi
2903 fi
2904 rm -rf conftest*
2905 ;;
2906
2907x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2908s390*-*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
2913 *32-bit*)
2914 case $host in
2915 x86_64-*kfreebsd*-gnu)
2916 LD="${LD-ld} -m elf_i386_fbsd"
2917 ;;
2918 x86_64-*linux*)
2919 LD="${LD-ld} -m elf_i386"
2920 ;;
2921 ppc64-*linux*|powerpc64-*linux*)
2922 LD="${LD-ld} -m elf32ppclinux"
2923 ;;
2924 s390x-*linux*)
2925 LD="${LD-ld} -m elf_s390"
2926 ;;
2927 sparc64-*linux*)
2928 LD="${LD-ld} -m elf32_sparc"
2929 ;;
2930 esac
2931 ;;
2932 *64-bit*)
2933 case $host in
2934 x86_64-*kfreebsd*-gnu)
2935 LD="${LD-ld} -m elf_x86_64_fbsd"
2936 ;;
2937 x86_64-*linux*)
2938 LD="${LD-ld} -m elf_x86_64"
2939 ;;
2940 ppc*-*linux*|powerpc*-*linux*)
2941 LD="${LD-ld} -m elf64ppc"
2942 ;;
2943 s390*-*linux*|s390*-*tpf*)
2944 LD="${LD-ld} -m elf64_s390"
2945 ;;
2946 sparc*-*linux*)
2947 LD="${LD-ld} -m elf64_sparc"
2948 ;;
2949 esac
2950 ;;
2951 esac
2952 fi
2953 rm -rf conftest*
2954 ;;
2955
2956*-*-sco3.2v5*)
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,
2961 [AC_LANG_PUSH(C)
2962 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2963 AC_LANG_POP])
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"
2967 fi
2968 ;;
2969sparc*-*solaris*)
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
2974 *64-bit*)
2975 case $lt_cv_prog_gnu_ld in
2976 yes*) LD="${LD-ld} -m elf64_sparc" ;;
2977 *)
2978 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2979 LD="${LD-ld} -64"
2980 fi
2981 ;;
2982 esac
2983 ;;
2984 esac
2985 fi
2986 rm -rf conftest*
2987 ;;
2988esac
2989
2990need_locks="$enable_libtool_lock"
2991])# _LT_ENABLE_LOCK
2992
2993
2994# _LT_CMD_OLD_ARCHIVE
2995# -------------------
2996m4_defun([_LT_CMD_OLD_ARCHIVE],
2997[AC_CHECK_TOOL(AR, ar, false)
2998test -z "$AR" && AR=ar
2999test -z "$AR_FLAGS" && AR_FLAGS=cru
3000_LT_DECL([], [AR], [1], [The archiver])
3001_LT_DECL([], [AR_FLAGS], [1])
3002
3003AC_CHECK_TOOL(STRIP, strip, :)
3004test -z "$STRIP" && STRIP=:
3005_LT_DECL([], [STRIP], [1], [A symbol stripping program])
3006
3007AC_CHECK_TOOL(RANLIB, ranlib, :)
3008test -z "$RANLIB" && RANLIB=:
3009_LT_DECL([], [RANLIB], [1],
3010 [Commands used to install an old-style archive])
3011
3012# Determine commands to create old-style static archives.
3013old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3014old_postinstall_cmds='chmod 644 $oldlib'
3015old_postuninstall_cmds=
3016
3017if test -n "$RANLIB"; then
3018 case $host_os in
3019 openbsd*)
3020 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3021 ;;
3022 *)
3023 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3024 ;;
3025 esac
3026 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3027fi
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
3033
3034
3035# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3036# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3037# ----------------------------------------------------------------
3038# Check whether the given compiler option works
3039AC_DEFUN([_LT_COMPILER_OPTION],
3040[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3041m4_require([_LT_DECL_SED])dnl
3042AC_CACHE_CHECK([$1], [$2],
3043 [$2=no
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)
3058 ac_status=$?
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
3067 $2=yes
3068 fi
3069 fi
3070 $RM conftest*
3071])
3072
3073if test x"[$]$2" = xyes; then
3074 m4_if([$5], , :, [$5])
3075else
3076 m4_if([$6], , :, [$6])
3077fi
3078])# _LT_COMPILER_OPTION
3079
3080# Old name:
3081AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3082dnl aclocal-1.4 backwards compatibility:
3083dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3084
3085
3086# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3087# [ACTION-SUCCESS], [ACTION-FAILURE])
3088# ----------------------------------------------------
3089# Check whether the given linker option works
3090AC_DEFUN([_LT_LINKER_OPTION],
3091[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3092m4_require([_LT_DECL_SED])dnl
3093AC_CACHE_CHECK([$1], [$2],
3094 [$2=no
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
3107 $2=yes
3108 fi
3109 else
3110 $2=yes
3111 fi
3112 fi
3113 $RM -r conftest*
3114 LDFLAGS="$save_LDFLAGS"
3115])
3116
3117if test x"[$]$2" = xyes; then
3118 m4_if([$4], , :, [$4])
3119else
3120 m4_if([$5], , :, [$5])
3121fi
3122])# _LT_LINKER_OPTION
3123
3124# Old name:
3125AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3126dnl aclocal-1.4 backwards compatibility:
3127dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3128
3129
3130# LT_CMD_MAX_LEN
3131#---------------
3132AC_DEFUN([LT_CMD_MAX_LEN],
3133[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3134# find the maximum length of command line arguments
3135AC_MSG_CHECKING([the maximum length of command line arguments])
3136AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3137 i=0
3138 teststring="ABCD"
3139
3140 case $build_os in
3141 msdosdjgpp*)
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
3147 ;;
3148
3149 gnu*)
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;
3154 ;;
3155
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;
3165 ;;
3166
3167 amigaos*)
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;
3171 ;;
3172
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`
3179 else
3180 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
3181 fi
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`
3185 ;;
3186
3187 interix*)
3188 # We know the value 262144 and hardcode it with a safety zone (like BSD)
3189 lt_cv_sys_max_cmd_len=196608
3190 ;;
3191
3192 osf*)
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
3198 #
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 ;;
3202 esac
3203 fi
3204 ;;
3205 sco3.2v5*)
3206 lt_cv_sys_max_cmd_len=102400
3207 ;;
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/.*[[ ]]//'`
3212 else
3213 lt_cv_sys_max_cmd_len=32768
3214 fi
3215 ;;
3216 *)
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`
3221 else
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
3226 done
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
3230 # we can't tell.
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
3234 do
3235 i=`expr $i + 1`
3236 teststring=$teststring$teststring
3237 done
3238 # Only check the string length outside the loop.
3239 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3240 teststring=
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`
3245 fi
3246 ;;
3247 esac
3248])
3249if test -n $lt_cv_sys_max_cmd_len ; then
3250 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3251else
3252 AC_MSG_RESULT(none)
3253fi
3254max_cmd_len=$lt_cv_sys_max_cmd_len
3255_LT_DECL([], [max_cmd_len], [0],
3256 [What is the maximum length of a command?])
3257])# LT_CMD_MAX_LEN
3258
3259# Old name:
3260AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3261dnl aclocal-1.4 backwards compatibility:
3262dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3263
3264
3265# _LT_HEADER_DLFCN
3266# ----------------
3267m4_defun([_LT_HEADER_DLFCN],
3268[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3269])# _LT_HEADER_DLFCN
3270
3271
3272# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3273# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3274# ----------------------------------------------------------------
3275m4_defun([_LT_TRY_DLOPEN_SELF],
3276[m4_require([_LT_HEADER_DLFCN])dnl
3277if test "$cross_compiling" = yes; then :
3278 [$4]
3279else
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"
3285
3286#if HAVE_DLFCN_H
3287#include <dlfcn.h>
3288#endif
3289
3290#include <stdio.h>
3291
3292#ifdef RTLD_GLOBAL
3293# define LT_DLGLOBAL RTLD_GLOBAL
3294#else
3295# ifdef DL_GLOBAL
3296# define LT_DLGLOBAL DL_GLOBAL
3297# else
3298# define LT_DLGLOBAL 0
3299# endif
3300#endif
3301
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
3305# ifdef RTLD_LAZY
3306# define LT_DLLAZY_OR_NOW RTLD_LAZY
3307# else
3308# ifdef DL_LAZY
3309# define LT_DLLAZY_OR_NOW DL_LAZY
3310# else
3311# ifdef RTLD_NOW
3312# define LT_DLLAZY_OR_NOW RTLD_NOW
3313# else
3314# ifdef DL_NOW
3315# define LT_DLLAZY_OR_NOW DL_NOW
3316# else
3317# define LT_DLLAZY_OR_NOW 0
3318# endif
3319# endif
3320# endif
3321# endif
3322#endif
3323
3324void fnord() { int i=42;}
3325int main ()
3326{
3327 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3328 int status = $lt_dlunknown;
3329
3330 if (self)
3331 {
3332 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
3333 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3334 /* dlclose (self); */
3335 }
3336 else
3337 puts (dlerror ());
3338
3339 return status;
3340}]
3341_LT_EOF
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
3344 lt_status=$?
3345 case x$lt_status in
3346 x$lt_dlno_uscore) $1 ;;
3347 x$lt_dlneed_uscore) $2 ;;
3348 x$lt_dlunknown|x*) $3 ;;
3349 esac
3350 else :
3351 # compilation failed
3352 $3
3353 fi
3354fi
3355rm -fr conftest*
3356])# _LT_TRY_DLOPEN_SELF
3357
3358
3359# LT_SYS_DLOPEN_SELF
3360# ------------------
3361AC_DEFUN([LT_SYS_DLOPEN_SELF],
3362[m4_require([_LT_HEADER_DLFCN])dnl
3363if test "x$enable_dlopen" != xyes; then
3364 enable_dlopen=unknown
3365 enable_dlopen_self=unknown
3366 enable_dlopen_self_static=unknown
3367else
3368 lt_cv_dlopen=no
3369 lt_cv_dlopen_libs=
3370
3371 case $host_os in
3372 beos*)
3373 lt_cv_dlopen="load_add_on"
3374 lt_cv_dlopen_libs=
3375 lt_cv_dlopen_self=yes
3376 ;;
3377
3378 mingw* | pw32* | cegcc*)
3379 lt_cv_dlopen="LoadLibrary"
3380 lt_cv_dlopen_libs=
3381 ;;
3382
3383 cygwin*)
3384 lt_cv_dlopen="dlopen"
3385 lt_cv_dlopen_libs=
3386 ;;
3387
3388 darwin*)
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"],[
3392 lt_cv_dlopen="dyld"
3393 lt_cv_dlopen_libs=
3394 lt_cv_dlopen_self=yes
3395 ])
3396 ;;
3397
3398 *)
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"])
3411 ])
3412 ])
3413 ])
3414 ])
3415 ])
3416 ;;
3417 esac
3418
3419 if test "x$lt_cv_dlopen" != xno; then
3420 enable_dlopen=yes
3421 else
3422 enable_dlopen=no
3423 fi
3424
3425 case $lt_cv_dlopen in
3426 dlopen)
3427 save_CPPFLAGS="$CPPFLAGS"
3428 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3429
3430 save_LDFLAGS="$LDFLAGS"
3431 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3432
3433 save_LIBS="$LIBS"
3434 LIBS="$lt_cv_dlopen_libs $LIBS"
3435
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)
3441 ])
3442
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)
3450 ])
3451 fi
3452
3453 CPPFLAGS="$save_CPPFLAGS"
3454 LDFLAGS="$save_LDFLAGS"
3455 LIBS="$save_LIBS"
3456 ;;
3457 esac
3458
3459 case $lt_cv_dlopen_self in
3460 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3461 *) enable_dlopen_self=unknown ;;
3462 esac
3463
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 ;;
3467 esac
3468fi
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
3476
3477# Old name:
3478AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3479dnl aclocal-1.4 backwards compatibility:
3480dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3481
3482
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.
3487m4_defun([_LT_COMPILER_C_O],
3488[m4_require([_LT_DECL_SED])dnl
3489m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3490m4_require([_LT_TAG_COMPILER])dnl
3491AC_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
3495 mkdir conftest
3496 cd conftest
3497 mkdir out
3498 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3499
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)
3511 ac_status=$?
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
3515 then
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
3522 fi
3523 fi
3524 chmod u+w . 2>&AS_MESSAGE_LOG_FD
3525 $RM conftest*
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
3530 cd ..
3531 $RM -r conftest
3532 $RM conftest*
3533])
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
3537
3538
3539# _LT_COMPILER_FILE_LOCKS([TAGNAME])
3540# ----------------------------------
3541# Check to see if we can do hard links to lock some files if needed
3542m4_defun([_LT_COMPILER_FILE_LOCKS],
3543[m4_require([_LT_ENABLE_LOCK])dnl
3544m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3545_LT_COMPILER_C_O([$1])
3546
3547hard_links="nottested"
3548if 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])
3551 hard_links=yes
3552 $RM conftest*
3553 ln conftest.a conftest.b 2>/dev/null && hard_links=no
3554 touch conftest.a
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])
3560 need_locks=warn
3561 fi
3562else
3563 need_locks=no
3564fi
3565_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3566])# _LT_COMPILER_FILE_LOCKS
3567
3568
3569# _LT_CHECK_OBJDIR
3570# ----------------
3571m4_defun([_LT_CHECK_OBJDIR],
3572[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3573[rm -f .libs 2>/dev/null
3574mkdir .libs 2>/dev/null
3575if test -d .libs; then
3576 lt_cv_objdir=.libs
3577else
3578 # MS-DOS does not allow filenames that begin with a dot.
3579 lt_cv_objdir=_libs
3580fi
3581rmdir .libs 2>/dev/null])
3582objdir=$lt_cv_objdir
3583_LT_DECL([], [objdir], [0],
3584 [The name of the directory that contains temporary libtool files])dnl
3585m4_pattern_allow([LT_OBJDIR])dnl
3586AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3587 [Define to the sub-directory in which libtool stores uninstalled libraries.])
3588])# _LT_CHECK_OBJDIR
3589
3590
3591# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3592# --------------------------------------
3593# Check hardcoding attributes.
3594m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3595[AC_MSG_CHECKING([how to hardcode library paths into programs])
3596_LT_TAGVAR(hardcode_action, $1)=
3597if 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
3600
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
3610 else
3611 # We can link without hardcoding, and we can hardcode nonexisting dirs.
3612 _LT_TAGVAR(hardcode_action, $1)=immediate
3613 fi
3614else
3615 # We cannot hardcode anything, or else we can only hardcode existing
3616 # directories.
3617 _LT_TAGVAR(hardcode_action, $1)=unsupported
3618fi
3619AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3620
3621if 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
3625elif test "$shlibpath_overrides_runpath" = yes ||
3626 test "$enable_shared" = no; then
3627 # Fast installation is not necessary
3628 enable_fast_install=needless
3629fi
3630_LT_TAGDECL([], [hardcode_action], [0],
3631 [How to hardcode a shared library path into an executable])
3632])# _LT_LINKER_HARDCODE_LIBPATH
3633
3634
3635# _LT_CMD_STRIPLIB
3636# ----------------
3637m4_defun([_LT_CMD_STRIPLIB],
3638[m4_require([_LT_DECL_EGREP])
3639striplib=
3640old_striplib=
3641AC_MSG_CHECKING([whether stripping libraries is possible])
3642if 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])
3646else
3647# FIXME - insert some real tests, host_os isn't really good enough
3648 case $host_os in
3649 darwin*)
3650 if test -n "$STRIP" ; then
3651 striplib="$STRIP -x"
3652 old_striplib="$STRIP -S"
3653 AC_MSG_RESULT([yes])
3654 else
3655 AC_MSG_RESULT([no])
3656 fi
3657 ;;
3658 *)
3659 AC_MSG_RESULT([no])
3660 ;;
3661 esac
3662fi
3663_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3664_LT_DECL([], [striplib], [1])
3665])# _LT_CMD_STRIPLIB
3666
3667
3668# _LT_SYS_DYNAMIC_LINKER([TAG])
3669# -----------------------------
3670# PORTME Fill in your ld.so characteristics
3671m4_defun([_LT_SYS_DYNAMIC_LINKER],
3672[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3673m4_require([_LT_DECL_EGREP])dnl
3674m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3675m4_require([_LT_DECL_OBJDUMP])dnl
3676m4_require([_LT_DECL_SED])dnl
3677AC_MSG_CHECKING([dynamic linker characteristics])
3678m4_if([$1],
3679 [], [
3680if test "$GCC" = yes; then
3681 case $host_os in
3682 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3683 *) lt_awk_arg="/^libraries:/" ;;
3684 esac
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'`
3692 else
3693 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3694 fi
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"
3702 else
3703 test -d "$lt_sys_path" && \
3704 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3705 fi
3706 done
3707 lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
3708BEGIN {RS=" "; FS="/|\n";} {
3709 lt_foo="";
3710 lt_count=0;
3711 for (lt_i = NF; lt_i > 0; lt_i--) {
3712 if ($lt_i != "" && $lt_i != ".") {
3713 if ($lt_i == "..") {
3714 lt_count++;
3715 } else {
3716 if (lt_count == 0) {
3717 lt_foo="/" $lt_i lt_foo;
3718 } else {
3719 lt_count--;
3720 }
3721 }
3722 }
3723 }
3724 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3725 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3726}'`
3727 sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
3728else
3729 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3730fi])
3731library_names_spec=
3732libname_spec='lib$name'
3733soname_spec=
3734shrext_cmds=".so"
3735postinstall_cmds=
3736postuninstall_cmds=
3737finish_cmds=
3738finish_eval=
3739shlibpath_var=
3740shlibpath_overrides_runpath=unknown
3741version_type=none
3742dynamic_linker="$host_os ld.so"
3743sys_lib_dlsearch_path_spec="/lib /usr/lib"
3744need_lib_prefix=unknown
3745hardcode_into_libs=no
3746
3747# when you set need_version to no, make sure it does not cause -set_version
3748# flags to be left without arguments
3749need_version=unknown
3750
3751case $host_os in
3752aix3*)
3753 version_type=linux
3754 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3755 shlibpath_var=LIBPATH
3756
3757 # AIX 3 has no versioning support, so we append a major version to the name.
3758 soname_spec='${libname}${release}${shared_ext}$major'
3759 ;;
3760
3761aix[[4-9]]*)
3762 version_type=linux
3763 need_lib_prefix=no
3764 need_version=no
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
3770 else
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.
3776 case $host_os in
3777 aix4 | aix4.[[01]] | aix4.[[01]].*)
3778 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3779 echo ' yes '
3780 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3781 :
3782 else
3783 can_build_shared=no
3784 fi
3785 ;;
3786 esac
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}'
3795 else
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'
3800 fi
3801 shlibpath_var=LIBPATH
3802 fi
3803 ;;
3804
3805amigaos*)
3806 case $host_cpu in
3807 powerpc)
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}'
3811 ;;
3812 m68k)
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'
3816 ;;
3817 esac
3818 ;;
3819
3820beos*)
3821 library_names_spec='${libname}${shared_ext}'
3822 dynamic_linker="$host_os ld.so"
3823 shlibpath_var=LIBRARY_PATH
3824 ;;
3825
3826bsdi[[45]]*)
3827 version_type=linux
3828 need_version=no
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
3838 ;;
3839
3840cygwin* | mingw* | pw32* | cegcc*)
3841 version_type=windows
3842 shrext_cmds=".dll"
3843 need_version=no
3844 need_lib_prefix=no
3845
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 \$?;
3858 fi'
3859 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3860 dlpath=$dir/\$dldll~
3861 $RM \$dlpath'
3862 shlibpath_overrides_runpath=yes
3863
3864 case $host_os in
3865 cygwin*)
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"
3869 ;;
3870 mingw* | cegcc*)
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'`
3882 else
3883 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3884 fi
3885 ;;
3886 pw32*)
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}'
3889 ;;
3890 esac
3891 ;;
3892
3893 *)
3894 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3895 ;;
3896 esac
3897 dynamic_linker='Win32 ld.exe'
3898 # FIXME: first we should search . and the directory the executable is in
3899 shlibpath_var=PATH
3900 ;;
3901
3902darwin* | rhapsody*)
3903 dynamic_linker="$host_os dyld"
3904 version_type=darwin
3905 need_lib_prefix=no
3906 need_version=no
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`'
3912m4_if([$1], [],[
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'
3915 ;;
3916
3917dgux*)
3918 version_type=linux
3919 need_lib_prefix=no
3920 need_version=no
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
3924 ;;
3925
3926freebsd1*)
3927 dynamic_linker=no
3928 ;;
3929
3930freebsd* | 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`
3935 else
3936 case $host_os in
3937 freebsd[[123]]*) objformat=aout ;;
3938 *) objformat=elf ;;
3939 esac
3940 fi
3941 version_type=freebsd-$objformat
3942 case $version_type in
3943 freebsd-elf*)
3944 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3945 need_version=no
3946 need_lib_prefix=no
3947 ;;
3948 freebsd-*)
3949 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3950 need_version=yes
3951 ;;
3952 esac
3953 shlibpath_var=LD_LIBRARY_PATH
3954 case $host_os in
3955 freebsd2*)
3956 shlibpath_overrides_runpath=yes
3957 ;;
3958 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3959 shlibpath_overrides_runpath=yes
3960 hardcode_into_libs=yes
3961 ;;
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
3966 ;;
3967 *) # from 4.6 on, and DragonFly
3968 shlibpath_overrides_runpath=yes
3969 hardcode_into_libs=yes
3970 ;;
3971 esac
3972 ;;
3973
3974gnu*)
3975 version_type=linux
3976 need_lib_prefix=no
3977 need_version=no
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
3982 ;;
3983
3984hpux9* | hpux10* | hpux11*)
3985 # Give a soname corresponding to the major version so that dld.sl refuses to
3986 # link against other versions.
3987 version_type=sunos
3988 need_lib_prefix=no
3989 need_version=no
3990 case $host_cpu in
3991 ia64*)
3992 shrext_cmds='.so'
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"
4001 else
4002 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4003 fi
4004 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4005 ;;
4006 hppa*64*)
4007 shrext_cmds='.sl'
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
4016 ;;
4017 *)
4018 shrext_cmds='.sl'
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'
4024 ;;
4025 esac
4026 # HP-UX runs *really* slowly unless shared libraries are mode 555.
4027 postinstall_cmds='chmod 555 $lib'
4028 ;;
4029
4030interix[[3-9]]*)
4031 version_type=linux
4032 need_lib_prefix=no
4033 need_version=no
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
4040 ;;
4041
4042irix5* | irix6* | nonstopux*)
4043 case $host_os in
4044 nonstopux*) version_type=nonstopux ;;
4045 *)
4046 if test "$lt_cv_prog_gnu_ld" = yes; then
4047 version_type=linux
4048 else
4049 version_type=irix
4050 fi ;;
4051 esac
4052 need_lib_prefix=no
4053 need_version=no
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}'
4056 case $host_os in
4057 irix5* | nonstopux*)
4058 libsuff= shlibsuff=
4059 ;;
4060 *)
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;;
4069 esac
4070 ;;
4071 esac
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
4077 ;;
4078
4079# No shared lib support for Linux oldld, aout, or coff.
4080linux*oldld* | linux*aout* | linux*coff*)
4081 dynamic_linker=no
4082 ;;
4083
4084# This must be Linux ELF.
4085linux* | k*bsd*-gnu)
4086 version_type=linux
4087 need_lib_prefix=no
4088 need_version=no
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
4096 save_libdir=$libdir
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
4103 libdir=$save_libdir
4104
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
4109
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"
4114 fi
4115
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'
4123 ;;
4124
4125netbsdelf*-gnu)
4126 version_type=linux
4127 need_lib_prefix=no
4128 need_version=no
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'
4135 ;;
4136
4137netbsd*)
4138 version_type=sunos
4139 need_lib_prefix=no
4140 need_version=no
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'
4145 else
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'
4149 fi
4150 shlibpath_var=LD_LIBRARY_PATH
4151 shlibpath_overrides_runpath=yes
4152 hardcode_into_libs=yes
4153 ;;
4154
4155newsos6)
4156 version_type=linux
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
4160 ;;
4161
4162*nto* | *qnx*)
4163 version_type=qnx
4164 need_lib_prefix=no
4165 need_version=no
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'
4172 ;;
4173
4174openbsd*)
4175 version_type=sunos
4176 sys_lib_dlsearch_path_spec="/usr/lib"
4177 need_lib_prefix=no
4178 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4179 case $host_os in
4180 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
4181 *) need_version=no ;;
4182 esac
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
4187 case $host_os in
4188 openbsd2.[[89]] | openbsd2.[[89]].*)
4189 shlibpath_overrides_runpath=no
4190 ;;
4191 *)
4192 shlibpath_overrides_runpath=yes
4193 ;;
4194 esac
4195 else
4196 shlibpath_overrides_runpath=yes
4197 fi
4198 ;;
4199
4200os2*)
4201 libname_spec='$name'
4202 shrext_cmds=".dll"
4203 need_lib_prefix=no
4204 library_names_spec='$libname${shared_ext} $libname.a'
4205 dynamic_linker='OS/2 ld.exe'
4206 shlibpath_var=LIBPATH
4207 ;;
4208
4209osf3* | osf4* | osf5*)
4210 version_type=osf
4211 need_lib_prefix=no
4212 need_version=no
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"
4218 ;;
4219
4220rdos*)
4221 dynamic_linker=no
4222 ;;
4223
4224solaris*)
4225 version_type=linux
4226 need_lib_prefix=no
4227 need_version=no
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'
4235 ;;
4236
4237sunos4*)
4238 version_type=sunos
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
4244 need_lib_prefix=no
4245 fi
4246 need_version=yes
4247 ;;
4248
4249sysv4 | sysv4.3*)
4250 version_type=linux
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
4255 sni)
4256 shlibpath_overrides_runpath=no
4257 need_lib_prefix=no
4258 runpath_var=LD_RUN_PATH
4259 ;;
4260 siemens)
4261 need_lib_prefix=no
4262 ;;
4263 motorola)
4264 need_lib_prefix=no
4265 need_version=no
4266 shlibpath_overrides_runpath=no
4267 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4268 ;;
4269 esac
4270 ;;
4271
4272sysv4*MP*)
4273 if test -d /usr/nec ;then
4274 version_type=linux
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
4278 fi
4279 ;;
4280
4281sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4282 version_type=freebsd-elf
4283 need_lib_prefix=no
4284 need_version=no
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'
4292 else
4293 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4294 case $host_os in
4295 sco3.2v5*)
4296 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4297 ;;
4298 esac
4299 fi
4300 sys_lib_dlsearch_path_spec='/usr/lib'
4301 ;;
4302
4303tpf*)
4304 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
4305 version_type=linux
4306 need_lib_prefix=no
4307 need_version=no
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
4312 ;;
4313
4314uts4*)
4315 version_type=linux
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
4319 ;;
4320
4321*)
4322 dynamic_linker=no
4323 ;;
4324esac
4325AC_MSG_RESULT([$dynamic_linker])
4326test "$dynamic_linker" = no && can_build_shared=no
4327
4328variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4329if test "$GCC" = yes; then
4330 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4331fi
4332
4333if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4334 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4335fi
4336if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4337 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4338fi
4339
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
4365 not shown]])
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
4373
4374
4375# _LT_PATH_TOOL_PREFIX(TOOL)
4376# --------------------------
4377# find a file program which can recognize shared library
4378AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4379[m4_require([_LT_DECL_EGREP])dnl
4380AC_MSG_CHECKING([for $1])
4381AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4382[case $MAGIC_CMD in
4383[[\\/*] | ?:[\\/]*])
4384 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4385 ;;
4386*)
4387 lt_save_MAGIC_CMD="$MAGIC_CMD"
4388 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4389dnl $ac_dummy forces splitting on constant user-supplied paths.
4390dnl POSIX.2 word splitting is done only on the output of word expansions,
4391dnl 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
4394 IFS="$lt_save_ifs"
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
4400 "file_magic "*)
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
4405 :
4406 else
4407 cat <<_LT_EOF 1>&2
4408
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
4417
4418_LT_EOF
4419 fi ;;
4420 esac
4421 fi
4422 break
4423 fi
4424 done
4425 IFS="$lt_save_ifs"
4426 MAGIC_CMD="$lt_save_MAGIC_CMD"
4427 ;;
4428esac])
4429MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4430if test -n "$MAGIC_CMD"; then
4431 AC_MSG_RESULT($MAGIC_CMD)
4432else
4433 AC_MSG_RESULT(no)
4434fi
4435_LT_DECL([], [MAGIC_CMD], [0],
4436 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4437])# _LT_PATH_TOOL_PREFIX
4438
4439# Old name:
4440AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4441dnl aclocal-1.4 backwards compatibility:
4442dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4443
4444
4445# _LT_PATH_MAGIC
4446# --------------
4447# find a file program which can recognize a shared library
4448m4_defun([_LT_PATH_MAGIC],
4449[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4450if 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)
4453 else
4454 MAGIC_CMD=:
4455 fi
4456fi
4457])# _LT_PATH_MAGIC
4458
4459
4460# LT_PATH_LD
4461# ----------
4462# find the pathname to the GNU or non-GNU linker
4463AC_DEFUN([LT_PATH_LD],
4464[AC_REQUIRE([AC_PROG_CC])dnl
4465AC_REQUIRE([AC_CANONICAL_HOST])dnl
4466AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4467m4_require([_LT_DECL_SED])dnl
4468m4_require([_LT_DECL_EGREP])dnl
4469
4470AC_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
4475
4476ac_prog=ld
4477if test "$GCC" = yes; then
4478 # Check if gcc -print-prog-name=ld gives a path.
4479 AC_MSG_CHECKING([for ld used by $CC])
4480 case $host in
4481 *-*-mingw*)
4482 # gcc leaves a trailing carriage return which upsets mingw
4483 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4484 *)
4485 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4486 esac
4487 case $ac_prog in
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%/%"`
4495 done
4496 test -z "$LD" && LD="$ac_prog"
4497 ;;
4498 "")
4499 # If it fails, then pretend we aren't using GCC.
4500 ac_prog=ld
4501 ;;
4502 *)
4503 # If it is relative, then search for the first ld in PATH.
4504 with_gnu_ld=unknown
4505 ;;
4506 esac
4507elif test "$with_gnu_ld" = yes; then
4508 AC_MSG_CHECKING([for GNU ld])
4509else
4510 AC_MSG_CHECKING([for non-GNU ld])
4511fi
4512AC_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
4516 IFS="$lt_save_ifs"
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
4526 ;;
4527 *)
4528 test "$with_gnu_ld" != yes && break
4529 ;;
4530 esac
4531 fi
4532 done
4533 IFS="$lt_save_ifs"
4534else
4535 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4536fi])
4537LD="$lt_cv_path_LD"
4538if test -n "$LD"; then
4539 AC_MSG_RESULT($LD)
4540else
4541 AC_MSG_RESULT(no)
4542fi
4543test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4544_LT_PATH_LD_GNU
4545AC_SUBST([LD])
4546
4547_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4548])# LT_PATH_LD
4549
4550# Old names:
4551AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4552AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4553dnl aclocal-1.4 backwards compatibility:
4554dnl AC_DEFUN([AM_PROG_LD], [])
4555dnl AC_DEFUN([AC_PROG_LD], [])
4556
4557
4558# _LT_PATH_LD_GNU
4559#- --------------
4560m4_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.
4563case `$LD -v 2>&1 </dev/null` in
4564*GNU* | *'with BFD'*)
4565 lt_cv_prog_gnu_ld=yes
4566 ;;
4567*)
4568 lt_cv_prog_gnu_ld=no
4569 ;;
4570esac])
4571with_gnu_ld=$lt_cv_prog_gnu_ld
4572])# _LT_PATH_LD_GNU
4573
4574
4575# _LT_CMD_RELOAD
4576# --------------
4577# find reload flag for linker
4578# -- PORTME Some linkers may need a different reload flag.
4579m4_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'])
4583reload_flag=$lt_cv_ld_reload_flag
4584case $reload_flag in
4585"" | " "*) ;;
4586*) reload_flag=" $reload_flag" ;;
4587esac
4588reload_cmds='$LD$reload_flag -o $output$reload_objs'
4589case $host_os in
4590 darwin*)
4591 if test "$GCC" = yes; then
4592 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4593 else
4594 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4595 fi
4596 ;;
4597esac
4598_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4599_LT_DECL([], [reload_cmds], [2])dnl
4600])# _LT_CMD_RELOAD
4601
4602
4603# _LT_CHECK_MAGIC_METHOD
4604# ----------------------
4605# how to check for library dependencies
4606# -- PORTME fill in with the dynamic library characteristics
4607m4_defun([_LT_CHECK_MAGIC_METHOD],
4608[m4_require([_LT_DECL_EGREP])
4609m4_require([_LT_DECL_OBJDUMP])
4610AC_CACHE_CHECK([how to recognize dependent libraries],
4611lt_cv_deplibs_check_method,
4612[lt_cv_file_magic_cmd='$MAGIC_CMD'
4613lt_cv_file_magic_test_file=
4614lt_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.
4625
4626case $host_os in
4627aix[[4-9]]*)
4628 lt_cv_deplibs_check_method=pass_all
4629 ;;
4630
4631beos*)
4632 lt_cv_deplibs_check_method=pass_all
4633 ;;
4634
4635bsdi[[45]]*)
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
4639 ;;
4640
4641cygwin*)
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'
4645 ;;
4646
4647mingw* | pw32*)
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'
4654 else
4655 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4656 lt_cv_file_magic_cmd='$OBJDUMP -f'
4657 fi
4658 ;;
4659
4660cegcc)
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'
4664 ;;
4665
4666darwin* | rhapsody*)
4667 lt_cv_deplibs_check_method=pass_all
4668 ;;
4669
4670freebsd* | dragonfly*)
4671 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4672 case $host_cpu in
4673 i*86 )
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.*`
4679 ;;
4680 esac
4681 else
4682 lt_cv_deplibs_check_method=pass_all
4683 fi
4684 ;;
4685
4686gnu*)
4687 lt_cv_deplibs_check_method=pass_all
4688 ;;
4689
4690hpux10.20* | hpux11*)
4691 lt_cv_file_magic_cmd=/usr/bin/file
4692 case $host_cpu in
4693 ia64*)
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
4696 ;;
4697 hppa*64*)
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
4700 ;;
4701 *)
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
4704 ;;
4705 esac
4706 ;;
4707
4708interix[[3-9]]*)
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)$'
4711 ;;
4712
4713irix5* | irix6* | nonstopux*)
4714 case $LD in
4715 *-32|*"-32 ") libmagic=32-bit;;
4716 *-n32|*"-n32 ") libmagic=N32;;
4717 *-64|*"-64 ") libmagic=64-bit;;
4718 *) libmagic=never-match;;
4719 esac
4720 lt_cv_deplibs_check_method=pass_all
4721 ;;
4722
4723# This must be Linux ELF.
4724linux* | k*bsd*-gnu)
4725 lt_cv_deplibs_check_method=pass_all
4726 ;;
4727
4728netbsd* | 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)$'
4731 else
4732 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4733 fi
4734 ;;
4735
4736newos6*)
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
4740 ;;
4741
4742*nto* | *qnx*)
4743 lt_cv_deplibs_check_method=pass_all
4744 ;;
4745
4746openbsd*)
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)$'
4749 else
4750 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4751 fi
4752 ;;
4753
4754osf3* | osf4* | osf5*)
4755 lt_cv_deplibs_check_method=pass_all
4756 ;;
4757
4758rdos*)
4759 lt_cv_deplibs_check_method=pass_all
4760 ;;
4761
4762solaris*)
4763 lt_cv_deplibs_check_method=pass_all
4764 ;;
4765
4766sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4767 lt_cv_deplibs_check_method=pass_all
4768 ;;
4769
4770sysv4 | sysv4.3*)
4771 case $host_vendor in
4772 motorola)
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*`
4775 ;;
4776 ncr)
4777 lt_cv_deplibs_check_method=pass_all
4778 ;;
4779 sequent)
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 )'
4782 ;;
4783 sni)
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
4787 ;;
4788 siemens)
4789 lt_cv_deplibs_check_method=pass_all
4790 ;;
4791 pc)
4792 lt_cv_deplibs_check_method=pass_all
4793 ;;
4794 esac
4795 ;;
4796
4797tpf*)
4798 lt_cv_deplibs_check_method=pass_all
4799 ;;
4800esac
4801])
4802file_magic_cmd=$lt_cv_file_magic_cmd
4803deplibs_check_method=$lt_cv_deplibs_check_method
4804test -z "$deplibs_check_method" && deplibs_check_method=unknown
4805
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
4811
4812
4813# LT_PATH_NM
4814# ----------
4815# find the pathname to a BSD- or MS-compatible name lister
4816AC_DEFUN([LT_PATH_NM],
4817[AC_REQUIRE([AC_PROG_CC])dnl
4818AC_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.
4821 lt_cv_path_NM="$NM"
4822else
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"
4826 fi
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
4830 IFS="$lt_save_ifs"
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"
4841 break
4842 ;;
4843 *)
4844 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4845 */dev/null*)
4846 lt_cv_path_NM="$tmp_nm -p"
4847 break
4848 ;;
4849 *)
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
4852 ;;
4853 esac
4854 ;;
4855 esac
4856 fi
4857 done
4858 IFS="$lt_save_ifs"
4859 done
4860 : ${lt_cv_path_NM=no}
4861fi])
4862if test "$lt_cv_path_NM" != "no"; then
4863 NM="$lt_cv_path_NM"
4864else
4865 # Didn't find any BSD compatible name lister, look for dumpbin.
4866 AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
4867 AC_SUBST([DUMPBIN])
4868 if test "$DUMPBIN" != ":"; then
4869 NM="$DUMPBIN"
4870 fi
4871fi
4872test -z "$NM" && NM=nm
4873AC_SUBST([NM])
4874_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4875
4876AC_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"
4889 fi
4890 rm -f conftest*])
4891])# LT_PATH_NM
4892
4893# Old names:
4894AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4895AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4896dnl aclocal-1.4 backwards compatibility:
4897dnl AC_DEFUN([AM_PROG_NM], [])
4898dnl AC_DEFUN([AC_PROG_NM], [])
4899
4900
4901# LT_LIB_M
4902# --------
4903# check for math library
4904AC_DEFUN([LT_LIB_M],
4905[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4906LIBM=
4907case $host in
4908*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4909 # These system don't have libm, or don't need it
4910 ;;
4911*-ncr-sysv4.3*)
4912 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4913 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4914 ;;
4915*)
4916 AC_CHECK_LIB(m, cos, LIBM="-lm")
4917 ;;
4918esac
4919AC_SUBST([LIBM])
4920])# LT_LIB_M
4921
4922# Old name:
4923AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4924dnl aclocal-1.4 backwards compatibility:
4925dnl AC_DEFUN([AC_CHECK_LIBM], [])
4926
4927
4928# _LT_COMPILER_NO_RTTI([TAGNAME])
4929# -------------------------------
4930m4_defun([_LT_COMPILER_NO_RTTI],
4931[m4_require([_LT_TAG_COMPILER])dnl
4932
4933_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4934
4935if test "$GCC" = yes; then
4936 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4937
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"])
4942fi
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
4946
4947
4948# _LT_CMD_GLOBAL_SYMBOLS
4949# ----------------------
4950m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4951[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4952AC_REQUIRE([AC_PROG_CC])dnl
4953AC_REQUIRE([LT_PATH_NM])dnl
4954AC_REQUIRE([LT_PATH_LD])dnl
4955m4_require([_LT_DECL_SED])dnl
4956m4_require([_LT_DECL_EGREP])dnl
4957m4_require([_LT_TAG_COMPILER])dnl
4958
4959# Check for command to grab the raw symbol name followed by C symbol from nm.
4960AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4961AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4962[
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?!! ;)]
4965
4966# Character class describing NM global symbol codes.
4967symcode='[[BCDEGRST]]'
4968
4969# Regexp to match symbols that can be accessed directly from C.
4970sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4971
4972# Define system-specific variables.
4973case $host_os in
4974aix*)
4975 symcode='[[BCDT]]'
4976 ;;
4977cygwin* | mingw* | pw32* | cegcc*)
4978 symcode='[[ABCDGISTW]]'
4979 ;;
4980hpux*)
4981 if test "$host_cpu" = ia64; then
4982 symcode='[[ABCDEGRST]]'
4983 fi
4984 ;;
4985irix* | nonstopux*)
4986 symcode='[[BCDEGRST]]'
4987 ;;
4988osf*)
4989 symcode='[[BCDEGQRST]]'
4990 ;;
4991solaris*)
4992 symcode='[[BDRT]]'
4993 ;;
4994sco3.2v5*)
4995 symcode='[[DT]]'
4996 ;;
4997sysv4.2uw2*)
4998 symcode='[[DT]]'
4999 ;;
5000sysv5* | sco5v6* | unixware* | OpenUNIX*)
5001 symcode='[[ABDT]]'
5002 ;;
5003sysv4)
5004 symcode='[[DFNSTU]]'
5005 ;;
5006esac
5007
5008# If we're using GNU nm, then use its standard symbol codes.
5009case `$NM -V 2>&1` in
5010*GNU* | *'with BFD'*)
5011 symcode='[[ABCDGIRSTW]]' ;;
5012esac
5013
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.
5017lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5018
5019# Transform an extracted symbol line into symbol name and symbol address
5020lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
5021lt_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'"
5022
5023# Handle CRLF in mingw tool chain
5024opt_cr=
5025case $build_os in
5026mingw*)
5027 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5028 ;;
5029esac
5030
5031# Try without a prefix underscore, then with it.
5032for ac_symprfx in "" "_"; do
5033
5034 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5035 symxfrm="\\1 $ac_symprfx\\2 \\2"
5036
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]"
5054 else
5055 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5056 fi
5057
5058 # Check to see that the pipe works correctly.
5059 pipe_works=no
5060
5061 rm -f conftest*
5062 cat > conftest.$ac_ext <<_LT_EOF
5063#ifdef __cplusplus
5064extern "C" {
5065#endif
5066char nm_test_var;
5067void nm_test_func(void);
5068void nm_test_func(void){}
5069#ifdef __cplusplus
5070}
5071#endif
5072int main(){nm_test_var='a';nm_test_func();return(0);}
5073_LT_EOF
5074
5075 if AC_TRY_EVAL(ac_compile); then
5076 # Now try to grab the symbols.
5077 nlist=conftest.nm
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"
5082 else
5083 rm -f "$nlist"T
5084 fi
5085
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
5090#ifdef __cplusplus
5091extern "C" {
5092#endif
5093
5094_LT_EOF
5095 # Now generate the symbol file.
5096 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5097
5098 cat <<_LT_EOF >> conftest.$ac_ext
5099
5100/* The mapping between symbol names and symbols. */
5101const struct {
5102 const char *name;
5103 void *address;
5104}
5105lt__PROGRAM__LTX_preloaded_symbols[[]] =
5106{
5107 { "@PROGRAM@", (void *) 0 },
5108_LT_EOF
5109 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5110 cat <<\_LT_EOF >> conftest.$ac_ext
5111 {0, (void *) 0}
5112};
5113
5114/* This works around a problem in FreeBSD linker */
5115#ifdef FREEBSD_WORKAROUND
5116static const void *lt_preloaded_setup() {
5117 return lt__PROGRAM__LTX_preloaded_symbols;
5118}
5119#endif
5120
5121#ifdef __cplusplus
5122}
5123#endif
5124_LT_EOF
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
5132 pipe_works=yes
5133 fi
5134 LIBS="$lt_save_LIBS"
5135 CFLAGS="$lt_save_CFLAGS"
5136 else
5137 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5138 fi
5139 else
5140 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5141 fi
5142 else
5143 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5144 fi
5145 else
5146 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5147 cat conftest.$ac_ext >&5
5148 fi
5149 rm -rf conftest* conftst*
5150
5151 # Do not use the global_symbol_pipe unless it works.
5152 if test "$pipe_works" = yes; then
5153 break
5154 else
5155 lt_cv_sys_global_symbol_pipe=
5156 fi
5157done
5158])
5159if test -z "$lt_cv_sys_global_symbol_pipe"; then
5160 lt_cv_sys_global_symbol_to_cdecl=
5161fi
5162if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5163 AC_MSG_RESULT(failed)
5164else
5165 AC_MSG_RESULT(ok)
5166fi
5167
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
5179
5180
5181# _LT_COMPILER_PIC([TAGNAME])
5182# ---------------------------
5183m4_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)=
5188
5189AC_MSG_CHECKING([for $compiler option to produce PIC])
5190m4_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'
5195
5196 case $host_os in
5197 aix*)
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'
5202 fi
5203 ;;
5204
5205 amigaos*)
5206 case $host_cpu in
5207 powerpc)
5208 # see comment about AmigaOS4 .so support
5209 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5210 ;;
5211 m68k)
5212 # FIXME: we need at least 68020 code to build shared libraries, but
5213 # adding the `-m68020' flag to GCC prevents building anything better,
5214 # like `-m68040'.
5215 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5216 ;;
5217 esac
5218 ;;
5219
5220 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5221 # PIC is the default for these OSes.
5222 ;;
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'])
5230 ;;
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'
5235 ;;
5236 *djgpp*)
5237 # DJGPP does not support shared libraries at all
5238 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5239 ;;
5240 interix[[3-9]]*)
5241 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5242 # Instead, we relocate shared libraries at runtime.
5243 ;;
5244 sysv4*MP*)
5245 if test -d /usr/nec; then
5246 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5247 fi
5248 ;;
5249 hpux*)
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.
5253 case $host_cpu in
5254 hppa*64*)
5255 ;;
5256 *)
5257 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5258 ;;
5259 esac
5260 ;;
5261 *qnx* | *nto*)
5262 # QNX uses GNU C++, but need to define -shared option too, otherwise
5263 # it will coredump.
5264 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5265 ;;
5266 *)
5267 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5268 ;;
5269 esac
5270 else
5271 case $host_os in
5272 aix[[4-9]]*)
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'
5277 else
5278 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5279 fi
5280 ;;
5281 chorus*)
5282 case $cc_basename in
5283 cxch68*)
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"
5286 ;;
5287 esac
5288 ;;
5289 dgux*)
5290 case $cc_basename in
5291 ec++*)
5292 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5293 ;;
5294 ghcx*)
5295 # Green Hills C++ Compiler
5296 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5297 ;;
5298 *)
5299 ;;
5300 esac
5301 ;;
5302 freebsd* | dragonfly*)
5303 # FreeBSD uses GNU C++
5304 ;;
5305 hpux9* | hpux10* | hpux11*)
5306 case $cc_basename in
5307 CC*)
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'
5312 fi
5313 ;;
5314 aCC*)
5315 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5316 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5317 case $host_cpu in
5318 hppa*64*|ia64*)
5319 # +Z the default
5320 ;;
5321 *)
5322 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5323 ;;
5324 esac
5325 ;;
5326 *)
5327 ;;
5328 esac
5329 ;;
5330 interix*)
5331 # This is c89, which is MS Visual C++ (no shared libs)
5332 # Anyone wants to do a port?
5333 ;;
5334 irix5* | irix6* | nonstopux*)
5335 case $cc_basename in
5336 CC*)
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.
5340 ;;
5341 *)
5342 ;;
5343 esac
5344 ;;
5345 linux* | k*bsd*-gnu)
5346 case $cc_basename in
5347 KCC*)
5348 # KAI C++ Compiler
5349 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5350 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5351 ;;
5352 ecpc* )
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'
5357 ;;
5358 icpc* )
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'
5364 ;;
5365 pgCC* | pgcpp*)
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'
5370 ;;
5371 cxx*)
5372 # Compaq C++
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'
5377 ;;
5378 xlc* | xlC*)
5379 # IBM XL 8.0 on PPC
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'
5383 ;;
5384 *)
5385 case `$CC -V 2>&1 | sed 5q` in
5386 *Sun\ C*)
5387 # Sun C++ 5.9
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 '
5391 ;;
5392 esac
5393 ;;
5394 esac
5395 ;;
5396 lynxos*)
5397 ;;
5398 m88k*)
5399 ;;
5400 mvs*)
5401 case $cc_basename in
5402 cxx*)
5403 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5404 ;;
5405 *)
5406 ;;
5407 esac
5408 ;;
5409 netbsd* | netbsdelf*-gnu)
5410 ;;
5411 *qnx* | *nto*)
5412 # QNX uses GNU C++, but need to define -shared option too, otherwise
5413 # it will coredump.
5414 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5415 ;;
5416 osf3* | osf4* | osf5*)
5417 case $cc_basename in
5418 KCC*)
5419 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5420 ;;
5421 RCC*)
5422 # Rational C++ 2.4.1
5423 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5424 ;;
5425 cxx*)
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'
5432 ;;
5433 *)
5434 ;;
5435 esac
5436 ;;
5437 psos*)
5438 ;;
5439 solaris*)
5440 case $cc_basename in
5441 CC*)
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 '
5446 ;;
5447 gcx*)
5448 # Green Hills C++ Compiler
5449 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5450 ;;
5451 *)
5452 ;;
5453 esac
5454 ;;
5455 sunos4*)
5456 case $cc_basename in
5457 CC*)
5458 # Sun C++ 4.x
5459 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5460 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5461 ;;
5462 lcc*)
5463 # Lucid
5464 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5465 ;;
5466 *)
5467 ;;
5468 esac
5469 ;;
5470 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5471 case $cc_basename in
5472 CC*)
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'
5476 ;;
5477 esac
5478 ;;
5479 tandem*)
5480 case $cc_basename in
5481 NCC*)
5482 # NonStop-UX NCC 3.20
5483 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5484 ;;
5485 *)
5486 ;;
5487 esac
5488 ;;
5489 vxworks*)
5490 ;;
5491 *)
5492 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5493 ;;
5494 esac
5495 fi
5496],
5497[
5498 if test "$GCC" = yes; then
5499 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5500 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5501
5502 case $host_os in
5503 aix*)
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'
5508 fi
5509 ;;
5510
5511 amigaos*)
5512 case $host_cpu in
5513 powerpc)
5514 # see comment about AmigaOS4 .so support
5515 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5516 ;;
5517 m68k)
5518 # FIXME: we need at least 68020 code to build shared libraries, but
5519 # adding the `-m68020' flag to GCC prevents building anything better,
5520 # like `-m68040'.
5521 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5522 ;;
5523 esac
5524 ;;
5525
5526 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5527 # PIC is the default for these OSes.
5528 ;;
5529
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'])
5537 ;;
5538
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'
5543 ;;
5544
5545 hpux*)
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.
5549 case $host_cpu in
5550 hppa*64*)
5551 # +Z the default
5552 ;;
5553 *)
5554 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5555 ;;
5556 esac
5557 ;;
5558
5559 interix[[3-9]]*)
5560 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5561 # Instead, we relocate shared libraries at runtime.
5562 ;;
5563
5564 msdosdjgpp*)
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
5568 enable_shared=no
5569 ;;
5570
5571 *nto* | *qnx*)
5572 # QNX uses GNU C++, but need to define -shared option too, otherwise
5573 # it will coredump.
5574 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5575 ;;
5576
5577 sysv4*MP*)
5578 if test -d /usr/nec; then
5579 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5580 fi
5581 ;;
5582
5583 *)
5584 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5585 ;;
5586 esac
5587 else
5588 # PORTME Check for flag to pass linker flags through the system compiler.
5589 case $host_os in
5590 aix*)
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'
5595 else
5596 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5597 fi
5598 ;;
5599
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'])
5605 ;;
5606
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
5610 # not for PA HP-UX.
5611 case $host_cpu in
5612 hppa*64*|ia64*)
5613 # +Z the default
5614 ;;
5615 *)
5616 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5617 ;;
5618 esac
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'
5621 ;;
5622
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'
5627 ;;
5628
5629 linux* | k*bsd*-gnu)
5630 case $cc_basename in
5631 # old Intel for x86_64 which still supported -KPIC.
5632 ecc*)
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'
5636 ;;
5637 # icc used to be incompatible with GCC.
5638 # ICC 10 doesn't accept -KPIC any more.
5639 icc* | ifort*)
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'
5643 ;;
5644 # Lahey Fortran 8.1.
5645 lf95*)
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'
5649 ;;
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'
5656 ;;
5657 ccc*)
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'
5661 ;;
5662 xl*)
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'
5667 ;;
5668 *)
5669 case `$CC -V 2>&1 | sed 5q` in
5670 *Sun\ C*)
5671 # Sun C 5.9
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,'
5675 ;;
5676 *Sun\ F*)
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)=''
5681 ;;
5682 esac
5683 ;;
5684 esac
5685 ;;
5686
5687 newsos6)
5688 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5689 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5690 ;;
5691
5692 *nto* | *qnx*)
5693 # QNX uses GNU C++, but need to define -shared option too, otherwise
5694 # it will coredump.
5695 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5696 ;;
5697
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'
5702 ;;
5703
5704 rdos*)
5705 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5706 ;;
5707
5708 solaris*)
5709 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5710 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5711 case $cc_basename in
5712 f77* | f90* | f95*)
5713 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5714 *)
5715 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5716 esac
5717 ;;
5718
5719 sunos4*)
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'
5723 ;;
5724
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'
5729 ;;
5730
5731 sysv4*MP*)
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'
5735 fi
5736 ;;
5737
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'
5742 ;;
5743
5744 unicos*)
5745 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5746 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5747 ;;
5748
5749 uts4*)
5750 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5751 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5752 ;;
5753
5754 *)
5755 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5756 ;;
5757 esac
5758 fi
5759])
5760case $host_os in
5761 # For platforms which do not support PIC, -DPIC is meaningless:
5762 *djgpp*)
5763 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5764 ;;
5765 *)
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],[])])"
5767 ;;
5768esac
5769AC_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])
5772
5773#
5774# Check to make sure the PIC flag actually works.
5775#
5776if 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
5781 "" | " "*) ;;
5782 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5783 esac],
5784 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5785 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5786fi
5787_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5788 [Additional compiler flags for building library objects])
5789
5790#
5791# Check to make sure the static flag actually works.
5792#
5793wl=$_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,
5797 [],
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
5802
5803
5804# _LT_LINKER_SHLIBS([TAGNAME])
5805# ----------------------------
5806# See if the linker supports building shared libraries.
5807m4_defun([_LT_LINKER_SHLIBS],
5808[AC_REQUIRE([LT_PATH_LD])dnl
5809AC_REQUIRE([LT_PATH_NM])dnl
5810m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5811m4_require([_LT_DECL_EGREP])dnl
5812m4_require([_LT_DECL_SED])dnl
5813m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5814m4_require([_LT_TAG_COMPILER])dnl
5815AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5816m4_if([$1], [CXX], [
5817 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5818 case $host_os in
5819 aix[[4-9]]*)
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'
5824 else
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'
5826 fi
5827 ;;
5828 pw32*)
5829 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5830 ;;
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'
5833 ;;
5834 linux* | k*bsd*-gnu)
5835 _LT_TAGVAR(link_all_deplibs, $1)=no
5836 ;;
5837 *)
5838 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5839 ;;
5840 esac
5841 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5842], [
5843 runpath_var=
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.
5882dnl Note also adjust exclude_expsyms for C++ above.
5883 extract_expsyms_cmds=
5884
5885 case $host_os in
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
5891 with_gnu_ld=no
5892 fi
5893 ;;
5894 interix*)
5895 # we just hope/assume this is gcc and not c89 (= MSVC++)
5896 with_gnu_ld=yes
5897 ;;
5898 openbsd*)
5899 with_gnu_ld=no
5900 ;;
5901 esac
5902
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
5906 wlarc='${wl}'
5907
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'
5917 else
5918 _LT_TAGVAR(whole_archive_flag_spec, $1)=
5919 fi
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 ;;
5927 esac
5928
5929 # See if GNU ld supports shared libraries.
5930 case $host_os in
5931 aix[[3-9]]*)
5932 # On AIX/PPC, the GNU linker is very broken
5933 if test "$host_cpu" != ia64; then
5934 _LT_TAGVAR(ld_shlibs, $1)=no
5935 cat <<_LT_EOF 1>&2
5936
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.
5942
5943_LT_EOF
5944 fi
5945 ;;
5946
5947 amigaos*)
5948 case $host_cpu in
5949 powerpc)
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)=''
5953 ;;
5954 m68k)
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
5958 ;;
5959 esac
5960 ;;
5961
5962 beos*)
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'
5968 else
5969 _LT_TAGVAR(ld_shlibs, $1)=no
5970 fi
5971 ;;
5972
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'
5981
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;
5988 else
5989 echo EXPORTS > $output_objdir/$soname.def;
5990 cat $export_symbols >> $output_objdir/$soname.def;
5991 fi~
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'
5993 else
5994 _LT_TAGVAR(ld_shlibs, $1)=no
5995 fi
5996 ;;
5997
5998 interix[[3-9]]*)
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'
6011 ;;
6012
6013 gnu* | linux* | tpf* | k*bsd*-gnu)
6014 tmp_diet=no
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)
6018 esac
6019 fi
6020 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6021 && test "$tmp_diet" = no
6022 then
6023 tmp_addflag=
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'
6029 ;;
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'
6044 tmp_addflag= ;;
6045 esac
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' ;;
6053 esac
6054 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6055
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'
6061 fi
6062
6063 case $cc_basename in
6064 xlf*)
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'
6075 fi
6076 ;;
6077 esac
6078 else
6079 _LT_TAGVAR(ld_shlibs, $1)=no
6080 fi
6081 ;;
6082
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'
6086 wlarc=
6087 else
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'
6090 fi
6091 ;;
6092
6093 solaris*)
6094 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6095 _LT_TAGVAR(ld_shlibs, $1)=no
6096 cat <<_LT_EOF 1>&2
6097
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.
6104
6105_LT_EOF
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'
6109 else
6110 _LT_TAGVAR(ld_shlibs, $1)=no
6111 fi
6112 ;;
6113
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
6118 cat <<_LT_EOF 1>&2
6119
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.
6126
6127_LT_EOF
6128 ;;
6129 *)
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'
6138 else
6139 _LT_TAGVAR(ld_shlibs, $1)=no
6140 fi
6141 ;;
6142 esac
6143 ;;
6144
6145 sunos4*)
6146 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6147 wlarc=
6148 _LT_TAGVAR(hardcode_direct, $1)=yes
6149 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6150 ;;
6151
6152 *)
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'
6156 else
6157 _LT_TAGVAR(ld_shlibs, $1)=no
6158 fi
6159 ;;
6160 esac
6161
6162 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6163 runpath_var=
6164 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6165 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6166 _LT_TAGVAR(whole_archive_flag_spec, $1)=
6167 fi
6168 else
6169 # PORTME fill in a description of your system's linker (not GNU ld)
6170 case $host_os in
6171 aix3*)
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
6180 # broken collect2.
6181 _LT_TAGVAR(hardcode_direct, $1)=unsupported
6182 fi
6183 ;;
6184
6185 aix[[4-9]]*)
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'
6191 no_entry_flag=""
6192 else
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'
6197 else
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'
6199 fi
6200 aix_use_runtimelinking=no
6201
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
6209 break
6210 fi
6211 done
6212 ;;
6213 esac
6214
6215 exp_sym_flag='-bexport'
6216 no_entry_flag='-bnoentry'
6217 fi
6218
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.
6224
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,'
6231
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
6239 then
6240 # We have reworked collect2
6241 :
6242 else
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)=
6251 fi
6252 ;;
6253 esac
6254 shared_flag='-shared'
6255 if test "$aix_use_runtimelinking" = yes; then
6256 shared_flag="$shared_flag "'${wl}-G'
6257 fi
6258 _LT_TAGVAR(link_all_deplibs, $1)=no
6259 else
6260 # not using gcc
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:
6264 shared_flag='-G'
6265 else
6266 if test "$aix_use_runtimelinking" = yes; then
6267 shared_flag='${wl}-G'
6268 else
6269 shared_flag='${wl}-bM:SRE'
6270 fi
6271 fi
6272 fi
6273
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
6283 # empty executable.
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"
6287 else
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"
6292 else
6293 # Determine the default libpath from the value encoded in an
6294 # empty executable.
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'
6306 fi
6307 fi
6308 ;;
6309
6310 amigaos*)
6311 case $host_cpu in
6312 powerpc)
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)=''
6316 ;;
6317 m68k)
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
6321 ;;
6322 esac
6323 ;;
6324
6325 bsdi[[45]]*)
6326 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6327 ;;
6328
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.
6337 libext=lib
6338 # Tell ltmain to make .dll files, not .so files.
6339 shrext_cmds=".dll"
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
6348 ;;
6349
6350 darwin* | rhapsody*)
6351 _LT_DARWIN_LINKER_FEATURES($1)
6352 ;;
6353
6354 dgux*)
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
6358 ;;
6359
6360 freebsd1*)
6361 _LT_TAGVAR(ld_shlibs, $1)=no
6362 ;;
6363
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
6367 # extra space).
6368 freebsd2.2*)
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
6373 ;;
6374
6375 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6376 freebsd2*)
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
6381 ;;
6382
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
6389 ;;
6390
6391 hpux9*)
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'
6394 else
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'
6396 fi
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
6400
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'
6405 ;;
6406
6407 hpux10*)
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'
6410 else
6411 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6412 fi
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
6423 fi
6424 ;;
6425
6426 hpux11*)
6427 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6428 case $host_cpu in
6429 hppa*64*)
6430 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6431 ;;
6432 ia64*)
6433 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6434 ;;
6435 *)
6436 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6437 ;;
6438 esac
6439 else
6440 case $host_cpu in
6441 hppa*64*)
6442 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6443 ;;
6444 ia64*)
6445 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6446 ;;
6447 *)
6448 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6449 ;;
6450 esac
6451 fi
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)=:
6455
6456 case $host_cpu in
6457 hppa*64*|ia64*)
6458 _LT_TAGVAR(hardcode_direct, $1)=no
6459 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6460 ;;
6461 *)
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'
6465
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
6469 ;;
6470 esac
6471 fi
6472 ;;
6473
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'
6484 )
6485 LDFLAGS="$save_LDFLAGS"
6486 else
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'
6489 fi
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
6495 ;;
6496
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
6500 else
6501 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6502 fi
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
6506 ;;
6507
6508 newsos6)
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
6514 ;;
6515
6516 *nto* | *qnx*)
6517 ;;
6518
6519 openbsd*)
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'
6529 else
6530 case $host_os in
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'
6534 ;;
6535 *)
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'
6538 ;;
6539 esac
6540 fi
6541 else
6542 _LT_TAGVAR(ld_shlibs, $1)=no
6543 fi
6544 ;;
6545
6546 os2*)
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'
6552 ;;
6553
6554 osf3*)
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'
6558 else
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'
6561 fi
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)=:
6565 ;;
6566
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'
6572 else
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'
6577
6578 # Both c and cxx compiler support -rpath directly
6579 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6580 fi
6581 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6582 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6583 ;;
6584
6585 solaris*)
6586 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6587 if test "$GCC" = yes; then
6588 wlarc='${wl}'
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'
6592 else
6593 case `$CC -V 2>&1` in
6594 *"Compilers 5.0"*)
6595 wlarc=''
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'
6599 ;;
6600 *)
6601 wlarc='${wl}'
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'
6605 ;;
6606 esac
6607 fi
6608 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6609 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6610 case $host_os in
6611 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6612 *)
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'
6619 else
6620 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6621 fi
6622 ;;
6623 esac
6624 _LT_TAGVAR(link_all_deplibs, $1)=yes
6625 ;;
6626
6627 sunos4*)
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'
6632 else
6633 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6634 fi
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
6639 ;;
6640
6641 sysv4)
6642 case $host_vendor in
6643 sni)
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???
6646 ;;
6647 siemens)
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
6653 ;;
6654 motorola)
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
6657 ;;
6658 esac
6659 runpath_var='LD_RUN_PATH'
6660 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6661 ;;
6662
6663 sysv4.3*)
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'
6667 ;;
6668
6669 sysv4*MP*)
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
6676 fi
6677 ;;
6678
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'
6684
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'
6688 else
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'
6691 fi
6692 ;;
6693
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
6700 # as -z defs.
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'
6710
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'
6714 else
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'
6717 fi
6718 ;;
6719
6720 uts4*)
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
6724 ;;
6725
6726 *)
6727 _LT_TAGVAR(ld_shlibs, $1)=no
6728 ;;
6729 esac
6730
6731 if test x$host_vendor = xsni; then
6732 case $host in
6733 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6734 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6735 ;;
6736 esac
6737 fi
6738 fi
6739])
6740AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6741test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6742
6743_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6744
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])
6749
6750#
6751# Do we need to explicitly link libc?
6752#
6753case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6754x|xyes)
6755 # Assume -lc should be added
6756 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6757
6758 if test "$enable_shared" = yes && test "$GCC" = yes; then
6759 case $_LT_TAGVAR(archive_cmds, $1) in
6760 *'~'*)
6761 # FIXME: we may have to deal with multi-command sequences.
6762 ;;
6763 '$CC '*)
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])
6768 $RM conftest*
6769 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6770
6771 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6772 soname=conftest
6773 lib=conftest
6774 libobjs=conftest.$ac_objext
6775 deplibs=
6776 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6777 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6778 compiler_flags=-v
6779 linker_flags=-v
6780 verstring=
6781 output_objdir=.
6782 libname=conftest
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)
6786 then
6787 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6788 else
6789 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6790 fi
6791 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6792 else
6793 cat conftest.err 1>&5
6794 fi
6795 $RM conftest*
6796 AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
6797 ;;
6798 esac
6799 fi
6800 ;;
6801esac
6802
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
6822 a shared archive.])
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
6855 against it])
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])
6875dnl FIXME: Not yet implemented
6876dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6877dnl [Compiler flag to generate thread safe objects])
6878])# _LT_LINKER_SHLIBS
6879
6880
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'.
6886m4_defun([_LT_LANG_C_CONFIG],
6887[m4_require([_LT_DECL_EGREP])dnl
6888lt_save_CC="$CC"
6889AC_LANG_PUSH(C)
6890
6891# Source file extension for C test sources.
6892ac_ext=c
6893
6894# Object file extension for compiled C test sources.
6895objext=o
6896_LT_TAGVAR(objext, $1)=$objext
6897
6898# Code to be used in simple compile tests
6899lt_simple_compile_test_code="int some_variable = 0;"
6900
6901# Code to be used in simple link tests
6902lt_simple_link_test_code='int main(){return(0);}'
6903
6904_LT_TAG_COMPILER
6905# Save the default compiler, since it gets overwritten when the other
6906# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6907compiler_DEFAULT=$CC
6908
6909# save warnings/boilerplate of simple test code
6910_LT_COMPILER_BOILERPLATE
6911_LT_LINKER_BOILERPLATE
6912
6913if 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)
6921 LT_SYS_DLOPEN_SELF
6922 _LT_CMD_STRIPLIB
6923
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])
6927
6928 AC_MSG_CHECKING([whether to build shared libraries])
6929 test "$can_build_shared" = "no" && enable_shared=no
6930
6931 # On AIX, shared libraries and static libraries use the same namespace, and
6932 # are all built from PIC.
6933 case $host_os in
6934 aix3*)
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'
6939 fi
6940 ;;
6941
6942 aix[[4-9]]*)
6943 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6944 test "$enable_shared" = yes && enable_static=no
6945 fi
6946 ;;
6947 esac
6948 AC_MSG_RESULT([$enable_shared])
6949
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])
6954
6955 _LT_CONFIG($1)
6956fi
6957AC_LANG_POP
6958CC="$lt_save_CC"
6959])# _LT_LANG_C_CONFIG
6960
6961
6962# _LT_PROG_CXX
6963# ------------
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.
6966m4_defun([_LT_PROG_CXX],
6967[
6968pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
6969AC_PROG_CXX
6970if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6971 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6972 (test "X$CXX" != "Xg++"))) ; then
6973 AC_PROG_CXXCPP
6974else
6975 _lt_caught_CXX_error=yes
6976fi
6977popdef([AC_MSG_ERROR])
6978])# _LT_PROG_CXX
6979
6980dnl aclocal-1.4 backwards compatibility:
6981dnl AC_DEFUN([_LT_PROG_CXX], [])
6982
6983
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'.
6989m4_defun([_LT_LANG_CXX_CONFIG],
6990[AC_REQUIRE([_LT_PROG_CXX])dnl
6991m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6992m4_require([_LT_DECL_EGREP])dnl
6993
6994AC_LANG_PUSH(C++)
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
7017
7018# Source file extension for C++ test sources.
7019ac_ext=cpp
7020
7021# Object file extension for compiled C++ test sources.
7022objext=o
7023_LT_TAGVAR(objext, $1)=$objext
7024
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.
7029if 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;"
7032
7033 # Code to be used in simple link tests
7034 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7035
7036 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7037 _LT_TAG_COMPILER
7038
7039 # save warnings/boilerplate of simple test code
7040 _LT_COMPILER_BOILERPLATE
7041 _LT_LINKER_BOILERPLATE
7042
7043 # Allow CC to be a program name with arguments.
7044 lt_save_CC=$CC
7045 lt_save_LD=$LD
7046 lt_save_GCC=$GCC
7047 GCC=$GXX
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
7052 else
7053 $as_unset lt_cv_prog_gnu_ld
7054 fi
7055 if test -n "${lt_cv_path_LDCXX+set}"; then
7056 lt_cv_path_LD=$lt_cv_path_LDCXX
7057 else
7058 $as_unset lt_cv_path_LD
7059 fi
7060 test -z "${LDCXX+set}" || LD=$LDCXX
7061 CC=${CXX-"c++"}
7062 compiler=$CC
7063 _LT_TAGVAR(compiler, $1)=$CC
7064 _LT_CC_BASENAME([$compiler])
7065
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'
7071 else
7072 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7073 fi
7074
7075 if test "$GXX" = yes; then
7076 # Set up default GNU C++ configuration
7077
7078 LT_PATH_LD
7079
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'
7085
7086 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7087 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7088
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)
7092 wlarc='${wl}'
7093
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'
7098 else
7099 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7100 fi
7101 else
7102 with_gnu_ld=no
7103 wlarc=
7104
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'
7111 fi
7112
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"'
7117
7118 else
7119 GXX=no
7120 with_gnu_ld=no
7121 wlarc=
7122 fi
7123
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
7127 case $host_os in
7128 aix3*)
7129 # FIXME: insert proper C++ library support
7130 _LT_TAGVAR(ld_shlibs, $1)=no
7131 ;;
7132 aix[[4-9]]*)
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'
7138 no_entry_flag=""
7139 else
7140 aix_use_runtimelinking=no
7141
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
7147 case $ld_flag in
7148 *-brtl*)
7149 aix_use_runtimelinking=yes
7150 break
7151 ;;
7152 esac
7153 done
7154 ;;
7155 esac
7156
7157 exp_sym_flag='-bexport'
7158 no_entry_flag='-bnoentry'
7159 fi
7160
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.
7166
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,'
7173
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
7181 then
7182 # We have reworked collect2
7183 :
7184 else
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)=
7193 fi
7194 esac
7195 shared_flag='-shared'
7196 if test "$aix_use_runtimelinking" = yes; then
7197 shared_flag="$shared_flag "'${wl}-G'
7198 fi
7199 else
7200 # not using gcc
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:
7204 shared_flag='-G'
7205 else
7206 if test "$aix_use_runtimelinking" = yes; then
7207 shared_flag='${wl}-G'
7208 else
7209 shared_flag='${wl}-bM:SRE'
7210 fi
7211 fi
7212 fi
7213
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
7217 # export.
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
7224 # executable.
7225 _LT_SYS_MODULE_PATH_AIX
7226 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7227
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"
7229 else
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"
7234 else
7235 # Determine the default libpath from the value encoded in an
7236 # empty executable.
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
7247 # libraries.
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'
7249 fi
7250 fi
7251 ;;
7252
7253 beos*)
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'
7259 else
7260 _LT_TAGVAR(ld_shlibs, $1)=no
7261 fi
7262 ;;
7263
7264 chorus*)
7265 case $cc_basename in
7266 *)
7267 # FIXME: insert proper C++ library support
7268 _LT_TAGVAR(ld_shlibs, $1)=no
7269 ;;
7270 esac
7271 ;;
7272
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
7280
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;
7287 else
7288 echo EXPORTS > $output_objdir/$soname.def;
7289 cat $export_symbols >> $output_objdir/$soname.def;
7290 fi~
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'
7292 else
7293 _LT_TAGVAR(ld_shlibs, $1)=no
7294 fi
7295 ;;
7296 darwin* | rhapsody*)
7297 _LT_DARWIN_LINKER_FEATURES($1)
7298 ;;
7299
7300 dgux*)
7301 case $cc_basename in
7302 ec++*)
7303 # FIXME: insert proper C++ library support
7304 _LT_TAGVAR(ld_shlibs, $1)=no
7305 ;;
7306 ghcx*)
7307 # Green Hills C++ Compiler
7308 # FIXME: insert proper C++ library support
7309 _LT_TAGVAR(ld_shlibs, $1)=no
7310 ;;
7311 *)
7312 # FIXME: insert proper C++ library support
7313 _LT_TAGVAR(ld_shlibs, $1)=no
7314 ;;
7315 esac
7316 ;;
7317
7318 freebsd[[12]]*)
7319 # C++ shared libraries reported to be fairly broken before
7320 # switch to ELF
7321 _LT_TAGVAR(ld_shlibs, $1)=no
7322 ;;
7323
7324 freebsd-elf*)
7325 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7326 ;;
7327
7328 freebsd* | dragonfly*)
7329 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7330 # conventions
7331 _LT_TAGVAR(ld_shlibs, $1)=yes
7332 ;;
7333
7334 gnu*)
7335 ;;
7336
7337 hpux9*)
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.
7345
7346 case $cc_basename in
7347 CC*)
7348 # FIXME: insert proper C++ library support
7349 _LT_TAGVAR(ld_shlibs, $1)=no
7350 ;;
7351 aCC*)
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.
7356 #
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
7360 # dependencies.
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'
7362 ;;
7363 *)
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'
7366 else
7367 # FIXME: insert proper C++ library support
7368 _LT_TAGVAR(ld_shlibs, $1)=no
7369 fi
7370 ;;
7371 esac
7372 ;;
7373
7374 hpux10*|hpux11*)
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)=:
7378
7379 case $host_cpu in
7380 hppa*64*|ia64*)
7381 ;;
7382 *)
7383 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7384 ;;
7385 esac
7386 fi
7387 case $host_cpu in
7388 hppa*64*|ia64*)
7389 _LT_TAGVAR(hardcode_direct, $1)=no
7390 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7391 ;;
7392 *)
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.
7398 ;;
7399 esac
7400
7401 case $cc_basename in
7402 CC*)
7403 # FIXME: insert proper C++ library support
7404 _LT_TAGVAR(ld_shlibs, $1)=no
7405 ;;
7406 aCC*)
7407 case $host_cpu in
7408 hppa*64*)
7409 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7410 ;;
7411 ia64*)
7412 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7413 ;;
7414 *)
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'
7416 ;;
7417 esac
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.
7421 #
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
7425 # dependencies.
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'
7427 ;;
7428 *)
7429 if test "$GXX" = yes; then
7430 if test $with_gnu_ld = no; then
7431 case $host_cpu in
7432 hppa*64*)
7433 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7434 ;;
7435 ia64*)
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'
7437 ;;
7438 *)
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'
7440 ;;
7441 esac
7442 fi
7443 else
7444 # FIXME: insert proper C++ library support
7445 _LT_TAGVAR(ld_shlibs, $1)=no
7446 fi
7447 ;;
7448 esac
7449 ;;
7450
7451 interix[[3-9]]*)
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'
7464 ;;
7465 irix5* | irix6*)
7466 case $cc_basename in
7467 CC*)
7468 # SGI C++
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'
7470
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
7474 # in the archive.
7475 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7476 ;;
7477 *)
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'
7481 else
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'
7483 fi
7484 fi
7485 _LT_TAGVAR(link_all_deplibs, $1)=yes
7486 ;;
7487 esac
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
7491 ;;
7492
7493 linux* | k*bsd*-gnu)
7494 case $cc_basename in
7495 KCC*)
7496 # Kuck and Associates, Inc. (KAI) C++ Compiler
7497
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.
7506 #
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
7510 # dependencies.
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'
7512
7513 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7514 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7515
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'
7519 ;;
7520 icpc* | ecpc* )
7521 # Intel C++
7522 with_gnu_ld=yes
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
7527 *"Version 7."*)
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'
7530 ;;
7531 *) # Version 8.0 or newer
7532 tmp_idyn=
7533 case $host_cpu in
7534 ia64*) tmp_idyn=' -i_dynamic';;
7535 esac
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'
7538 ;;
7539 esac
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'
7544 ;;
7545 pgCC* | pgcpp*)
7546 # Portland Group C++ compiler
7547 case `$CC -V` in
7548 *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
7549 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7550 rm -rf $tpldir~
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~
7554 rm -rf $tpldir~
7555 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7556 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
7557 $RANLIB $oldlib'
7558 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7559 rm -rf $tpldir~
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~
7563 rm -rf $tpldir~
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'
7566 ;;
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'
7570 ;;
7571 esac
7572
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'
7576 ;;
7577 cxx*)
7578 # Compaq C++
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'
7581
7582 runpath_var=LD_RUN_PATH
7583 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7584 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7585
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.
7589 #
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
7593 # dependencies.
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'
7595 ;;
7596 xl*)
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'
7606 fi
7607 ;;
7608 *)
7609 case `$CC -V 2>&1 | sed 5q` in
7610 *Sun\ C*)
7611 # Sun C++ 5.9
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
7618
7619 # Not sure whether something based on
7620 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7621 # would be better.
7622 output_verbose_link_cmd='echo'
7623
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
7627 # in the archive.
7628 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7629 ;;
7630 esac
7631 ;;
7632 esac
7633 ;;
7634
7635 lynxos*)
7636 # FIXME: insert proper C++ library support
7637 _LT_TAGVAR(ld_shlibs, $1)=no
7638 ;;
7639
7640 m88k*)
7641 # FIXME: insert proper C++ library support
7642 _LT_TAGVAR(ld_shlibs, $1)=no
7643 ;;
7644
7645 mvs*)
7646 case $cc_basename in
7647 cxx*)
7648 # FIXME: insert proper C++ library support
7649 _LT_TAGVAR(ld_shlibs, $1)=no
7650 ;;
7651 *)
7652 # FIXME: insert proper C++ library support
7653 _LT_TAGVAR(ld_shlibs, $1)=no
7654 ;;
7655 esac
7656 ;;
7657
7658 netbsd*)
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'
7661 wlarc=
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
7665 fi
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::"'
7668 ;;
7669
7670 *nto* | *qnx*)
7671 _LT_TAGVAR(ld_shlibs, $1)=yes
7672 ;;
7673
7674 openbsd2*)
7675 # C++ shared libraries are fairly broken
7676 _LT_TAGVAR(ld_shlibs, $1)=no
7677 ;;
7678
7679 openbsd*)
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'
7690 fi
7691 output_verbose_link_cmd=echo
7692 else
7693 _LT_TAGVAR(ld_shlibs, $1)=no
7694 fi
7695 ;;
7696
7697 osf3* | osf4* | osf5*)
7698 case $cc_basename in
7699 KCC*)
7700 # Kuck and Associates, Inc. (KAI) C++ Compiler
7701
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'
7706
7707 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7708 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7709
7710 # Archives containing C++ object files must be created using
7711 # the KAI C++ compiler.
7712 case $host in
7713 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7714 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7715 esac
7716 ;;
7717 RCC*)
7718 # Rational C++ 2.4.1
7719 # FIXME: insert proper C++ library support
7720 _LT_TAGVAR(ld_shlibs, $1)=no
7721 ;;
7722 cxx*)
7723 case $host in
7724 osf3*)
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'
7728 ;;
7729 *)
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~
7735 $RM $lib.exp'
7736 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7737 ;;
7738 esac
7739
7740 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7741
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.
7745 #
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
7749 # dependencies.
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'
7751 ;;
7752 *)
7753 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7754 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7755 case $host in
7756 osf3*)
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'
7758 ;;
7759 *)
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'
7761 ;;
7762 esac
7763
7764 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7765 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7766
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"'
7771
7772 else
7773 # FIXME: insert proper C++ library support
7774 _LT_TAGVAR(ld_shlibs, $1)=no
7775 fi
7776 ;;
7777 esac
7778 ;;
7779
7780 psos*)
7781 # FIXME: insert proper C++ library support
7782 _LT_TAGVAR(ld_shlibs, $1)=no
7783 ;;
7784
7785 sunos4*)
7786 case $cc_basename in
7787 CC*)
7788 # Sun C++ 4.x
7789 # FIXME: insert proper C++ library support
7790 _LT_TAGVAR(ld_shlibs, $1)=no
7791 ;;
7792 lcc*)
7793 # Lucid
7794 # FIXME: insert proper C++ library support
7795 _LT_TAGVAR(ld_shlibs, $1)=no
7796 ;;
7797 *)
7798 # FIXME: insert proper C++ library support
7799 _LT_TAGVAR(ld_shlibs, $1)=no
7800 ;;
7801 esac
7802 ;;
7803
7804 solaris*)
7805 case $cc_basename in
7806 CC*)
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'
7813
7814 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7815 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7816 case $host_os in
7817 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7818 *)
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'
7823 ;;
7824 esac
7825 _LT_TAGVAR(link_all_deplibs, $1)=yes
7826
7827 output_verbose_link_cmd='echo'
7828
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
7832 # in the archive.
7833 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7834 ;;
7835 gcx*)
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'
7838
7839 # The C++ compiler must be used to create the archive.
7840 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7841 ;;
7842 *)
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'
7850
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"'
7855 else
7856 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7857 # platform.
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'
7861
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"'
7866 fi
7867
7868 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7869 case $host_os in
7870 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7871 *)
7872 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7873 ;;
7874 esac
7875 fi
7876 ;;
7877 esac
7878 ;;
7879
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'
7885
7886 case $cc_basename in
7887 CC*)
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'
7890 ;;
7891 *)
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'
7894 ;;
7895 esac
7896 ;;
7897
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
7904 # as -z defs.
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'
7914
7915 case $cc_basename in
7916 CC*)
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'
7919 ;;
7920 *)
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'
7923 ;;
7924 esac
7925 ;;
7926
7927 tandem*)
7928 case $cc_basename in
7929 NCC*)
7930 # NonStop-UX NCC 3.20
7931 # FIXME: insert proper C++ library support
7932 _LT_TAGVAR(ld_shlibs, $1)=no
7933 ;;
7934 *)
7935 # FIXME: insert proper C++ library support
7936 _LT_TAGVAR(ld_shlibs, $1)=no
7937 ;;
7938 esac
7939 ;;
7940
7941 vxworks*)
7942 # FIXME: insert proper C++ library support
7943 _LT_TAGVAR(ld_shlibs, $1)=no
7944 ;;
7945
7946 *)
7947 # FIXME: insert proper C++ library support
7948 _LT_TAGVAR(ld_shlibs, $1)=no
7949 ;;
7950 esac
7951
7952 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7953 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7954
7955 _LT_TAGVAR(GCC, $1)="$GXX"
7956 _LT_TAGVAR(LD, $1)="$LD"
7957
7958 ## CAVEAT EMPTOR:
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)
7969
7970 _LT_CONFIG($1)
7971 fi # test -n "$compiler"
7972
7973 CC=$lt_save_CC
7974 LDCXX=$LD
7975 LD=$lt_save_LD
7976 GCC=$lt_save_GCC
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
7982fi # test "$_lt_caught_CXX_error" != yes
7983
7984AC_LANG_POP
7985])# _LT_LANG_CXX_CONFIG
7986
7987
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.
7994m4_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)=
8002
8003dnl we can't use the lt_simple_compile_test_code here,
8004dnl because it contains code intended for an executable,
8005dnl not a library. It's possible we should let each
8006dnl tag define a new lt_????_link_test_code variable,
8007dnl but it's only used here...
8008m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8009int a;
8010void foo (void) { a = 0; }
8011_LT_EOF
8012], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8013class Foo
8014{
8015public:
8016 Foo (void) { a = 0; }
8017private:
8018 int a;
8019};
8020_LT_EOF
8021], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8022 subroutine foo
8023 implicit none
8024 integer*4 a
8025 a=0
8026 return
8027 end
8028_LT_EOF
8029], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8030 subroutine foo
8031 implicit none
8032 integer a
8033 a=0
8034 return
8035 end
8036_LT_EOF
8037], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8038public class foo {
8039 private int a;
8040 public void bar (void) {
8041 a = 0;
8042 }
8043};
8044_LT_EOF
8045])
8046dnl Parse the compiler output and extract the necessary
8047dnl objects, libraries and library flags.
8048if AC_TRY_EVAL(ac_compile); then
8049 # Parse the compiler output and extract the necessary
8050 # objects, libraries and library flags.
8051
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
8055
8056 for p in `eval "$output_verbose_link_cmd"`; do
8057 case $p in
8058
8059 -L* | -R* | -l*)
8060 # Some compilers place space between "-{L,R}" and the path.
8061 # Remove the space.
8062 if test $p = "-L" ||
8063 test $p = "-R"; then
8064 prev=$p
8065 continue
8066 else
8067 prev=
8068 fi
8069
8070 if test "$pre_test_object_deps_done" = no; then
8071 case $p in
8072 -L* | -R*)
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}"
8078 else
8079 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8080 fi
8081 ;;
8082 # The "-l" case would never come before the object being
8083 # linked, so don't bother handling this case.
8084 esac
8085 else
8086 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8087 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8088 else
8089 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8090 fi
8091 fi
8092 ;;
8093
8094 *.$objext)
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
8099 continue
8100 fi
8101
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"
8105 else
8106 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8107 fi
8108 else
8109 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8110 _LT_TAGVAR(postdep_objects, $1)="$p"
8111 else
8112 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8113 fi
8114 fi
8115 ;;
8116
8117 *) ;; # Ignore the rest.
8118
8119 esac
8120 done
8121
8122 # Clean up.
8123 rm -f a.out a.exe
8124else
8125 echo "libtool.m4: error: problem compiling $1 test program"
8126fi
8127
8128$RM -f confest.$objext
8129
8130# PORTME: override above test on systems where it is broken
8131m4_if([$1], [CXX],
8132[case $host_os in
8133interix[[3-9]]*)
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)=
8139 ;;
8140
8141linux*)
8142 case `$CC -V 2>&1 | sed 5q` in
8143 *Sun\ C*)
8144 # Sun C++ 5.9
8145
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
8153 ;;
8154 esac
8155
8156 if test "$solaris_use_stlport4" != yes; then
8157 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8158 fi
8159 ;;
8160 esac
8161 ;;
8162
8163solaris*)
8164 case $cc_basename in
8165 CC*)
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
8173 ;;
8174 esac
8175
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'
8181 fi
8182 ;;
8183 esac
8184 ;;
8185esac
8186])
8187
8188case " $_LT_TAGVAR(postdeps, $1) " in
8189*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8190esac
8191 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8192if 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!^ !!'`
8194fi
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
8205 a shared library])
8206])# _LT_SYS_HIDDEN_LIBDEPS
8207
8208
8209# _LT_PROG_F77
8210# ------------
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.
8213m4_defun([_LT_PROG_F77],
8214[
8215pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
8216AC_PROG_F77
8217if test -z "$F77" || test "X$F77" = "Xno"; then
8218 _lt_disable_F77=yes
8219fi
8220popdef([AC_MSG_ERROR])
8221])# _LT_PROG_F77
8222
8223dnl aclocal-1.4 backwards compatibility:
8224dnl AC_DEFUN([_LT_PROG_F77], [])
8225
8226
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'.
8232m4_defun([_LT_LANG_F77_CONFIG],
8233[AC_REQUIRE([_LT_PROG_F77])dnl
8234AC_LANG_PUSH(Fortran 77)
8235
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
8256
8257# Source file extension for f77 test sources.
8258ac_ext=f
8259
8260# Object file extension for compiled f77 test sources.
8261objext=o
8262_LT_TAGVAR(objext, $1)=$objext
8263
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.
8268if test "$_lt_disable_F77" != yes; then
8269 # Code to be used in simple compile tests
8270 lt_simple_compile_test_code="\
8271 subroutine t
8272 return
8273 end
8274"
8275
8276 # Code to be used in simple link tests
8277 lt_simple_link_test_code="\
8278 program t
8279 end
8280"
8281
8282 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8283 _LT_TAG_COMPILER
8284
8285 # save warnings/boilerplate of simple test code
8286 _LT_COMPILER_BOILERPLATE
8287 _LT_LINKER_BOILERPLATE
8288
8289 # Allow CC to be a program name with arguments.
8290 lt_save_CC="$CC"
8291 lt_save_GCC=$GCC
8292 CC=${F77-"f77"}
8293 compiler=$CC
8294 _LT_TAGVAR(compiler, $1)=$CC
8295 _LT_CC_BASENAME([$compiler])
8296 GCC=$G77
8297 if test -n "$compiler"; then
8298 AC_MSG_CHECKING([if libtool supports shared libraries])
8299 AC_MSG_RESULT([$can_build_shared])
8300
8301 AC_MSG_CHECKING([whether to build shared libraries])
8302 test "$can_build_shared" = "no" && enable_shared=no
8303
8304 # On AIX, shared libraries and static libraries use the same namespace, and
8305 # are all built from PIC.
8306 case $host_os in
8307 aix3*)
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'
8312 fi
8313 ;;
8314 aix[[4-9]]*)
8315 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8316 test "$enable_shared" = yes && enable_static=no
8317 fi
8318 ;;
8319 esac
8320 AC_MSG_RESULT([$enable_shared])
8321
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])
8326
8327 _LT_TAGVAR(GCC, $1)="$G77"
8328 _LT_TAGVAR(LD, $1)="$LD"
8329
8330 ## CAVEAT EMPTOR:
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)
8340
8341 _LT_CONFIG($1)
8342 fi # test -n "$compiler"
8343
8344 GCC=$lt_save_GCC
8345 CC="$lt_save_CC"
8346fi # test "$_lt_disable_F77" != yes
8347
8348AC_LANG_POP
8349])# _LT_LANG_F77_CONFIG
8350
8351
8352# _LT_PROG_FC
8353# -----------
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.
8356m4_defun([_LT_PROG_FC],
8357[
8358pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
8359AC_PROG_FC
8360if test -z "$FC" || test "X$FC" = "Xno"; then
8361 _lt_disable_FC=yes
8362fi
8363popdef([AC_MSG_ERROR])
8364])# _LT_PROG_FC
8365
8366dnl aclocal-1.4 backwards compatibility:
8367dnl AC_DEFUN([_LT_PROG_FC], [])
8368
8369
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'.
8375m4_defun([_LT_LANG_FC_CONFIG],
8376[AC_REQUIRE([_LT_PROG_FC])dnl
8377AC_LANG_PUSH(Fortran)
8378
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
8399
8400# Source file extension for fc test sources.
8401ac_ext=${ac_fc_srcext-f}
8402
8403# Object file extension for compiled fc test sources.
8404objext=o
8405_LT_TAGVAR(objext, $1)=$objext
8406
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.
8411if test "$_lt_disable_FC" != yes; then
8412 # Code to be used in simple compile tests
8413 lt_simple_compile_test_code="\
8414 subroutine t
8415 return
8416 end
8417"
8418
8419 # Code to be used in simple link tests
8420 lt_simple_link_test_code="\
8421 program t
8422 end
8423"
8424
8425 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8426 _LT_TAG_COMPILER
8427
8428 # save warnings/boilerplate of simple test code
8429 _LT_COMPILER_BOILERPLATE
8430 _LT_LINKER_BOILERPLATE
8431
8432 # Allow CC to be a program name with arguments.
8433 lt_save_CC="$CC"
8434 lt_save_GCC=$GCC
8435 CC=${FC-"f95"}
8436 compiler=$CC
8437 GCC=$ac_cv_fc_compiler_gnu
8438
8439 _LT_TAGVAR(compiler, $1)=$CC
8440 _LT_CC_BASENAME([$compiler])
8441
8442 if test -n "$compiler"; then
8443 AC_MSG_CHECKING([if libtool supports shared libraries])
8444 AC_MSG_RESULT([$can_build_shared])
8445
8446 AC_MSG_CHECKING([whether to build shared libraries])
8447 test "$can_build_shared" = "no" && enable_shared=no
8448
8449 # On AIX, shared libraries and static libraries use the same namespace, and
8450 # are all built from PIC.
8451 case $host_os in
8452 aix3*)
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'
8457 fi
8458 ;;
8459 aix[[4-9]]*)
8460 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8461 test "$enable_shared" = yes && enable_static=no
8462 fi
8463 ;;
8464 esac
8465 AC_MSG_RESULT([$enable_shared])
8466
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])
8471
8472 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8473 _LT_TAGVAR(LD, $1)="$LD"
8474
8475 ## CAVEAT EMPTOR:
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)
8486
8487 _LT_CONFIG($1)
8488 fi # test -n "$compiler"
8489
8490 GCC=$lt_save_GCC
8491 CC="$lt_save_CC"
8492fi # test "$_lt_disable_FC" != yes
8493
8494AC_LANG_POP
8495])# _LT_LANG_FC_CONFIG
8496
8497
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'.
8503m4_defun([_LT_LANG_GCJ_CONFIG],
8504[AC_REQUIRE([LT_PROG_GCJ])dnl
8505AC_LANG_SAVE
8506
8507# Source file extension for Java test sources.
8508ac_ext=java
8509
8510# Object file extension for compiled Java test sources.
8511objext=o
8512_LT_TAGVAR(objext, $1)=$objext
8513
8514# Code to be used in simple compile tests
8515lt_simple_compile_test_code="class foo {}"
8516
8517# Code to be used in simple link tests
8518lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8519
8520# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8521_LT_TAG_COMPILER
8522
8523# save warnings/boilerplate of simple test code
8524_LT_COMPILER_BOILERPLATE
8525_LT_LINKER_BOILERPLATE
8526
8527# Allow CC to be a program name with arguments.
8528lt_save_CC="$CC"
8529lt_save_GCC=$GCC
8530GCC=yes
8531CC=${GCJ-"gcj"}
8532compiler=$CC
8533_LT_TAGVAR(compiler, $1)=$CC
8534_LT_TAGVAR(LD, $1)="$LD"
8535_LT_CC_BASENAME([$compiler])
8536
8537# GCJ did not exist at the time GCC didn't implicitly link libc in.
8538_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8539
8540_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8541
8542if 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)
8549
8550 _LT_CONFIG($1)
8551fi
8552
8553AC_LANG_RESTORE
8554
8555GCC=$lt_save_GCC
8556CC="$lt_save_CC"
8557])# _LT_LANG_GCJ_CONFIG
8558
8559
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'.
8565m4_defun([_LT_LANG_RC_CONFIG],
8566[AC_REQUIRE([LT_PROG_RC])dnl
8567AC_LANG_SAVE
8568
8569# Source file extension for RC test sources.
8570ac_ext=rc
8571
8572# Object file extension for compiled RC test sources.
8573objext=o
8574_LT_TAGVAR(objext, $1)=$objext
8575
8576# Code to be used in simple compile tests
8577lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8578
8579# Code to be used in simple link tests
8580lt_simple_link_test_code="$lt_simple_compile_test_code"
8581
8582# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8583_LT_TAG_COMPILER
8584
8585# save warnings/boilerplate of simple test code
8586_LT_COMPILER_BOILERPLATE
8587_LT_LINKER_BOILERPLATE
8588
8589# Allow CC to be a program name with arguments.
8590lt_save_CC="$CC"
8591lt_save_GCC=$GCC
8592GCC=
8593CC=${RC-"windres"}
8594compiler=$CC
8595_LT_TAGVAR(compiler, $1)=$CC
8596_LT_CC_BASENAME([$compiler])
8597_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8598
8599if test -n "$compiler"; then
8600 :
8601 _LT_CONFIG($1)
8602fi
8603
8604GCC=$lt_save_GCC
8605AC_LANG_RESTORE
8606CC="$lt_save_CC"
8607])# _LT_LANG_RC_CONFIG
8608
8609
8610# LT_PROG_GCJ
8611# -----------
8612AC_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
8618])
8619
8620# Old name:
8621AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8622dnl aclocal-1.4 backwards compatibility:
8623dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8624
8625
8626# LT_PROG_RC
8627# ----------
8628AC_DEFUN([LT_PROG_RC],
8629[AC_CHECK_TOOL(RC, windres,)
8630])
8631
8632# Old name:
8633AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8634dnl aclocal-1.4 backwards compatibility:
8635dnl AC_DEFUN([LT_AC_PROG_RC], [])
8636
8637
8638# _LT_DECL_EGREP
8639# --------------
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.
8642m4_defun([_LT_DECL_EGREP],
8643[AC_REQUIRE([AC_PROG_EGREP])dnl
8644AC_REQUIRE([AC_PROG_FGREP])dnl
8645test -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])
8649dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8650AC_SUBST([GREP])
8651])
8652
8653
8654# _LT_DECL_OBJDUMP
8655# --------------
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.
8658m4_defun([_LT_DECL_OBJDUMP],
8659[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8660test -z "$OBJDUMP" && OBJDUMP=objdump
8661_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8662AC_SUBST([OBJDUMP])
8663])
8664
8665
8666# _LT_DECL_SED
8667# ------------
8668# Check for a fully-functional sed program, that truncates
8669# as few characters as possible. Prefer GNU sed if found.
8670m4_defun([_LT_DECL_SED],
8671[AC_PROG_SED
8672test -z "$SED" && SED=sed
8673Xsed="$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])
8677])# _LT_DECL_SED
8678
8679m4_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. #
8684
8685m4_defun([AC_PROG_SED],
8686[AC_MSG_CHECKING([for a sed that does not truncate output])
8687AC_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.
8690as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8691for as_dir in $PATH
8692do
8693 IFS=$as_save_IFS
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"
8699 fi
8700 done
8701 done
8702done
8703IFS=$as_save_IFS
8704lt_ac_max=0
8705lt_ac_count=0
8706# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8707# along with /bin/sed that truncates output.
8708for 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
8711 lt_ac_count=0
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
8716 break
8717 fi
8718 while true; do
8719 cat conftest.in conftest.in >conftest.tmp
8720 mv conftest.tmp conftest.in
8721 cp conftest.in conftest.nl
8722 echo >>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
8731 fi
8732 done
8733done
8734])
8735SED=$lt_cv_path_SED
8736AC_SUBST([SED])
8737AC_MSG_RESULT([$SED])
8738])#AC_PROG_SED
8739])#m4_ifndef
8740
8741# Old name:
8742AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8743dnl aclocal-1.4 backwards compatibility:
8744dnl AC_DEFUN([LT_AC_PROG_SED], [])
8745
8746
8747# _LT_CHECK_SHELL_FEATURES
8748# ------------------------
8749# Find out whether the shell is Bourne or XSI compatible,
8750# or has some other useful features.
8751m4_defun([_LT_CHECK_SHELL_FEATURES],
8752[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8753# Try some XSI features
8754xsi_shell=no
8755( _lt_dummy="a/b/c"
8756 test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
8757 = c,a/b,, \
8758 && eval 'test $(( 1 + 1 )) -eq 2 \
8759 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8760 && xsi_shell=yes
8761AC_MSG_RESULT([$xsi_shell])
8762_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8763
8764AC_MSG_CHECKING([whether the shell understands "+="])
8765lt_shell_append=no
8766( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8767 >/dev/null 2>&1 \
8768 && lt_shell_append=yes
8769AC_MSG_RESULT([$lt_shell_append])
8770_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8771
8772if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8773 lt_unset=unset
8774else
8775 lt_unset=false
8776fi
8777_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8778
8779# test EBCDIC or ASCII
8780case `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'
8785 ;;
8786 *) # EBCDIC based system
8787 lt_SP2NL='tr \100 \n'
8788 lt_NL2SP='tr \r\n \100\100'
8789 ;;
8790esac
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
8794
8795
8796# _LT_PROG_XSI_SHELLFNS
8797# ---------------------
8798# Bourne and XSI compatible variants of some useful shell functions.
8799m4_defun([_LT_PROG_XSI_SHELLFNS],
8800[case $xsi_shell in
8801 yes)
8802 cat << \_LT_EOF >> "$cfgfile"
8803
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.
8807func_dirname ()
8808{
8809 case ${1} in
8810 */*) func_dirname_result="${1%/*}${2}" ;;
8811 * ) func_dirname_result="${3}" ;;
8812 esac
8813}
8814
8815# func_basename file
8816func_basename ()
8817{
8818 func_basename_result="${1##*/}"
8819}
8820
8821# func_dirname_and_basename file append nondir_replacement
8822# perform func_basename and func_dirname in a single function
8823# call:
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.
8833func_dirname_and_basename ()
8834{
8835 case ${1} in
8836 */*) func_dirname_result="${1%/*}${2}" ;;
8837 * ) func_dirname_result="${3}" ;;
8838 esac
8839 func_basename_result="${1##*/}"
8840}
8841
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).
8847func_stripname ()
8848{
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}"}
8854}
8855
8856# func_opt_split
8857func_opt_split ()
8858{
8859 func_opt_split_opt=${1%%=*}
8860 func_opt_split_arg=${1#*=}
8861}
8862
8863# func_lo2o object
8864func_lo2o ()
8865{
8866 case ${1} in
8867 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8868 *) func_lo2o_result=${1} ;;
8869 esac
8870}
8871
8872# func_xform libobj-or-source
8873func_xform ()
8874{
8875 func_xform_result=${1%.*}.lo
8876}
8877
8878# func_arith arithmetic-term...
8879func_arith ()
8880{
8881 func_arith_result=$(( $[*] ))
8882}
8883
8884# func_len string
8885# STRING may not start with a hyphen.
8886func_len ()
8887{
8888 func_len_result=${#1}
8889}
8890
8891_LT_EOF
8892 ;;
8893 *) # Bourne compatible functions.
8894 cat << \_LT_EOF >> "$cfgfile"
8895
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.
8899func_dirname ()
8900{
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}"
8905 else
8906 func_dirname_result="$func_dirname_result${2}"
8907 fi
8908}
8909
8910# func_basename file
8911func_basename ()
8912{
8913 func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
8914}
8915
8916dnl func_dirname_and_basename
8917dnl A portable version of this function is already defined in general.m4sh
8918dnl so there is no need for it here.
8919
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
8926func_stripname ()
8927{
8928 case ${2} in
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}\$%%"`;;
8933 esac
8934}
8935
8936# sed scripts:
8937my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8938my_sed_long_arg='1s/^-[[^=]]*=//'
8939
8940# func_opt_split
8941func_opt_split ()
8942{
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"`
8945}
8946
8947# func_lo2o object
8948func_lo2o ()
8949{
8950 func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
8951}
8952
8953# func_xform libobj-or-source
8954func_xform ()
8955{
8956 func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
8957}
8958
8959# func_arith arithmetic-term...
8960func_arith ()
8961{
8962 func_arith_result=`expr "$[@]"`
8963}
8964
8965# func_len string
8966# STRING may not start with a hyphen.
8967func_len ()
8968{
8969 func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8970}
8971
8972_LT_EOF
8973esac
8974
8975case $lt_shell_append in
8976 yes)
8977 cat << \_LT_EOF >> "$cfgfile"
8978
8979# func_append var value
8980# Append VALUE to the end of shell variable VAR.
8981func_append ()
8982{
8983 eval "$[1]+=\$[2]"
8984}
8985_LT_EOF
8986 ;;
8987 *)
8988 cat << \_LT_EOF >> "$cfgfile"
8989
8990# func_append var value
8991# Append VALUE to the end of shell variable VAR.
8992func_append ()
8993{
8994 eval "$[1]=\$$[1]\$[2]"
8995}
8996
8997_LT_EOF
8998 ;;
8999 esac
9000])
9001
9002# Helper functions for option handling. -*- Autoconf -*-
9003#
9004# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9005# Written by Gary V. Vaughan, 2004
9006#
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.
9010
9011# serial 6 ltoptions.m4
9012
9013# This is to help aclocal find these macros, as it can't see m4_define.
9014AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9015
9016
9017# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9018# ------------------------------------------
9019m4_define([_LT_MANGLE_OPTION],
9020[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9021
9022
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
9027# saved as a flag.
9028m4_define([_LT_SET_OPTION],
9029[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9030m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9031 _LT_MANGLE_DEFUN([$1], [$2]),
9032 [m4_warning([Unknown $1 option `$2'])])[]dnl
9033])
9034
9035
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.
9039m4_define([_LT_IF_OPTION],
9040[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9041
9042
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
9046# are set.
9047m4_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
9051m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9052])[]dnl
9053])
9054
9055
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.
9062m4_defun([_LT_SET_OPTIONS],
9063[# Set options
9064m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9065 [_LT_SET_OPTION([$1], _LT_Option)])
9066
9067m4_if([$1],[LT_INIT],[
9068 dnl
9069 dnl Simply set some default values (i.e off) if boolean options were not
9070 dnl specified:
9071 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9072 ])
9073 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9074 ])
9075 dnl
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])
9085 ])
9086])# _LT_SET_OPTIONS
9087
9088
9089
9090# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9091# -----------------------------------------
9092m4_define([_LT_MANGLE_DEFUN],
9093[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9094
9095
9096# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9097# -----------------------------------------------
9098m4_define([LT_OPTION_DEFINE],
9099[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9100])# LT_OPTION_DEFINE
9101
9102
9103# dlopen
9104# ------
9105LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9106])
9107
9108AU_DEFUN([AC_LIBTOOL_DLOPEN],
9109[_LT_SET_OPTION([LT_INIT], [dlopen])
9110AC_DIAGNOSE([obsolete],
9111[$0: Remove this warning and the call to _LT_SET_OPTION when you
9112put the `dlopen' option into LT_INIT's first parameter.])
9113])
9114
9115dnl aclocal-1.4 backwards compatibility:
9116dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9117
9118
9119# win32-dll
9120# ---------
9121# Declare package support for building win32 dll's.
9122LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9123[enable_win32_dll=yes
9124
9125case $host in
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)
9130 ;;
9131esac
9132
9133test -z "$AS" && AS=as
9134_LT_DECL([], [AS], [0], [Assembler program])dnl
9135
9136test -z "$DLLTOOL" && DLLTOOL=dlltool
9137_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
9138
9139test -z "$OBJDUMP" && OBJDUMP=objdump
9140_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
9141])# win32-dll
9142
9143AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9144[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9145_LT_SET_OPTION([LT_INIT], [win32-dll])
9146AC_DIAGNOSE([obsolete],
9147[$0: Remove this warning and the call to _LT_SET_OPTION when you
9148put the `win32-dll' option into LT_INIT's first parameter.])
9149])
9150
9151dnl aclocal-1.4 backwards compatibility:
9152dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9153
9154
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'.
9160m4_define([_LT_ENABLE_SHARED],
9161[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9162AC_ARG_ENABLE([shared],
9163 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9164 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9165 [p=${PACKAGE-default}
9166 case $enableval in
9167 yes) enable_shared=yes ;;
9168 no) enable_shared=no ;;
9169 *)
9170 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
9174 IFS="$lt_save_ifs"
9175 if test "X$pkg" = "X$p"; then
9176 enable_shared=yes
9177 fi
9178 done
9179 IFS="$lt_save_ifs"
9180 ;;
9181 esac],
9182 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9183
9184 _LT_DECL([build_libtool_libs], [enable_shared], [0],
9185 [Whether or not to build shared libraries])
9186])# _LT_ENABLE_SHARED
9187
9188LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9189LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9190
9191# Old names:
9192AC_DEFUN([AC_ENABLE_SHARED],
9193[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9194])
9195
9196AC_DEFUN([AC_DISABLE_SHARED],
9197[_LT_SET_OPTION([LT_INIT], [disable-shared])
9198])
9199
9200AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9201AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9202
9203dnl aclocal-1.4 backwards compatibility:
9204dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9205dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9206
9207
9208
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'.
9214m4_define([_LT_ENABLE_STATIC],
9215[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9216AC_ARG_ENABLE([static],
9217 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9218 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9219 [p=${PACKAGE-default}
9220 case $enableval in
9221 yes) enable_static=yes ;;
9222 no) enable_static=no ;;
9223 *)
9224 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
9228 IFS="$lt_save_ifs"
9229 if test "X$pkg" = "X$p"; then
9230 enable_static=yes
9231 fi
9232 done
9233 IFS="$lt_save_ifs"
9234 ;;
9235 esac],
9236 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9237
9238 _LT_DECL([build_old_libs], [enable_static], [0],
9239 [Whether or not to build static libraries])
9240])# _LT_ENABLE_STATIC
9241
9242LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9243LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9244
9245# Old names:
9246AC_DEFUN([AC_ENABLE_STATIC],
9247[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9248])
9249
9250AC_DEFUN([AC_DISABLE_STATIC],
9251[_LT_SET_OPTION([LT_INIT], [disable-static])
9252])
9253
9254AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9255AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9256
9257dnl aclocal-1.4 backwards compatibility:
9258dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9259dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9260
9261
9262
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'.
9268m4_define([_LT_ENABLE_FAST_INSTALL],
9269[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9270AC_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}
9274 case $enableval in
9275 yes) enable_fast_install=yes ;;
9276 no) enable_fast_install=no ;;
9277 *)
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
9282 IFS="$lt_save_ifs"
9283 if test "X$pkg" = "X$p"; then
9284 enable_fast_install=yes
9285 fi
9286 done
9287 IFS="$lt_save_ifs"
9288 ;;
9289 esac],
9290 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9291
9292_LT_DECL([fast_install], [enable_fast_install], [0],
9293 [Whether or not to optimize for fast installation])dnl
9294])# _LT_ENABLE_FAST_INSTALL
9295
9296LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9297LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9298
9299# Old names:
9300AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9301[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9302AC_DIAGNOSE([obsolete],
9303[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9304the `fast-install' option into LT_INIT's first parameter.])
9305])
9306
9307AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9308[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9309AC_DIAGNOSE([obsolete],
9310[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9311the `disable-fast-install' option into LT_INIT's first parameter.])
9312])
9313
9314dnl aclocal-1.4 backwards compatibility:
9315dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9316dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9317
9318
9319# _LT_WITH_PIC([MODE])
9320# --------------------
9321# implement the --with-pic flag, and support the `pic-only' and `no-pic'
9322# LT_INIT options.
9323# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
9324m4_define([_LT_WITH_PIC],
9325[AC_ARG_WITH([pic],
9326 [AS_HELP_STRING([--with-pic],
9327 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9328 [pic_mode="$withval"],
9329 [pic_mode=default])
9330
9331test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9332
9333_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9334])# _LT_WITH_PIC
9335
9336LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9337LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9338
9339# Old name:
9340AU_DEFUN([AC_LIBTOOL_PICMODE],
9341[_LT_SET_OPTION([LT_INIT], [pic-only])
9342AC_DIAGNOSE([obsolete],
9343[$0: Remove this warning and the call to _LT_SET_OPTION when you
9344put the `pic-only' option into LT_INIT's first parameter.])
9345])
9346
9347dnl aclocal-1.4 backwards compatibility:
9348dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9349
9350
9351m4_define([_LTDL_MODE], [])
9352LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9353 [m4_define([_LTDL_MODE], [nonrecursive])])
9354LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9355 [m4_define([_LTDL_MODE], [recursive])])
9356LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9357 [m4_define([_LTDL_MODE], [subproject])])
9358
9359m4_define([_LTDL_TYPE], [])
9360LT_OPTION_DEFINE([LTDL_INIT], [installable],
9361 [m4_define([_LTDL_TYPE], [installable])])
9362LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9363 [m4_define([_LTDL_TYPE], [convenience])])
9364
9365# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
9366#
9367# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9368# Written by Gary V. Vaughan, 2004
9369#
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.
9373
9374# serial 6 ltsugar.m4
9375
9376# This is to help aclocal find these macros, as it can't see m4_define.
9377AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9378
9379
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.
9386m4_define([lt_join],
9387[m4_if([$#], [1], [],
9388 [$#], [2], [[$2]],
9389 [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9390m4_define([_lt_join],
9391[m4_if([$#$2], [2], [],
9392 [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9393
9394
9395# lt_car(LIST)
9396# lt_cdr(LIST)
9397# ------------
9398# Manipulate m4 lists.
9399# These macros are necessary as long as will still need to support
9400# Autoconf-2.59 which quotes differently.
9401m4_define([lt_car], [[$1]])
9402m4_define([lt_cdr],
9403[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9404 [$#], 1, [],
9405 [m4_dquote(m4_shift($@))])])
9406m4_define([lt_unquote], $1)
9407
9408
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).
9416#
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.
9419m4_define([lt_append],
9420[m4_define([$1],
9421 m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9422
9423
9424
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.
9431m4_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])])])])])
9438
9439
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.
9444m4_define([lt_if_append_uniq],
9445[m4_ifdef([$1],
9446 [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9447 [lt_append([$1], [$2], [$3])$4],
9448 [$5])],
9449 [lt_append([$1], [$2], [$3])$4])])
9450
9451
9452# lt_dict_add(DICT, KEY, VALUE)
9453# -----------------------------
9454m4_define([lt_dict_add],
9455[m4_define([$1($2)], [$3])])
9456
9457
9458# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9459# --------------------------------------------
9460m4_define([lt_dict_add_subkey],
9461[m4_define([$1($2:$3)], [$4])])
9462
9463
9464# lt_dict_fetch(DICT, KEY, [SUBKEY])
9465# ----------------------------------
9466m4_define([lt_dict_fetch],
9467[m4_ifval([$3],
9468 m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9469 m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9470
9471
9472# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9473# -----------------------------------------------------------------
9474m4_define([lt_if_dict_fetch],
9475[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9476 [$5],
9477 [$6])])
9478
9479
9480# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9481# --------------------------------------------------------------
9482m4_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
9487])
9488
9489# ltversion.m4 -- version numbers -*- Autoconf -*-
9490#
9491# Copyright (C) 2004 Free Software Foundation, Inc.
9492# Written by Scott James Remnant, 2004
9493#
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.
9497
9498# Generated from ltversion.in.
9499
9500# serial 3012 ltversion.m4
9501# This file is part of GNU Libtool
9502
9503m4_define([LT_PACKAGE_VERSION], [2.2.6])
9504m4_define([LT_PACKAGE_REVISION], [1.3012])
9505
9506AC_DEFUN([LTVERSION_VERSION],
9507[macro_version='2.2.6'
9508macro_revision='1.3012'
9509_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9510_LT_DECL(, macro_revision, 0)
9511])
9512
9513# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
9514#
9515# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
9516# Written by Scott James Remnant, 2004.
9517#
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.
9521
9522# serial 4 lt~obsolete.m4
9523
9524# These exist entirely to fool aclocal when bootstrapping libtool.
9525#
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.
9529#
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.)
9535#
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.
9541#
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.
9546
9547# This is to help aclocal find these macros, as it can't see m4_define.
9548AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9549
9550m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9551m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
9552m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9553m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
9554m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9555m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
9556m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
9557m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9558m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
9559m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9560m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
9561m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9562m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9563m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9564m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9565m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9566m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
9567m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9568m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9569m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
9570m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
9571m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9572m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9573m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9574m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9575m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9576m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9577m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9578m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
9579m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
9580m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
9581m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9582m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9583m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
9584m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
9585m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9586m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9587m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
9588m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9589m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
9590m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
9591m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
9592m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
9593m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9594m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9595m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9596m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9597m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9598m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9599m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9600m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9601m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9602m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9603m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9604m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9605
9606# nls.m4 serial 3 (gettext-0.15)
9607dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
9608dnl This file is free software; the Free Software Foundation
9609dnl gives unlimited permission to copy and/or distribute it,
9610dnl with or without modifications, as long as this notice is preserved.
9611dnl
9612dnl This file can can be used in projects which are not available under
9613dnl the GNU General Public License or the GNU Library General Public
9614dnl License but which still want to provide support for the GNU gettext
9615dnl functionality.
9616dnl Please note that the actual code of the GNU gettext library is covered
9617dnl by the GNU Library General Public License, and the rest of the GNU
9618dnl gettext package package is covered by the GNU General Public License.
9619dnl They are *not* in the public domain.
9620
9621dnl Authors:
9622dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9623dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9624
9625AC_PREREQ(2.50)
9626
9627AC_DEFUN([AM_NLS],
9628[
9629 AC_MSG_CHECKING([whether NLS is requested])
9630 dnl Default is enabled NLS
9631 AC_ARG_ENABLE(nls,
9632 [ --disable-nls do not use Native Language Support],
9633 USE_NLS=$enableval, USE_NLS=yes)
9634 AC_MSG_RESULT($USE_NLS)
9635 AC_SUBST(USE_NLS)
9636])
9637
9638# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
9639#
9640# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9641#
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.
9646#
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.
9651#
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.
9655#
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.
9660
9661# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9662# ----------------------------------
9663AC_DEFUN([PKG_PROG_PKG_CONFIG],
9664[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9665m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9666AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
9667if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9668 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9669fi
9670if 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])
9675 else
9676 AC_MSG_RESULT([no])
9677 PKG_CONFIG=""
9678 fi
9679
9680fi[]dnl
9681])# PKG_PROG_PKG_CONFIG
9682
9683# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9684#
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.
9687#
9688#
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# --------------------------------------------------------------
9693AC_DEFUN([PKG_CHECK_EXISTS],
9694[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9695if test -n "$PKG_CONFIG" && \
9696 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9697 m4_ifval([$2], [$2], [:])
9698m4_ifvaln([$3], [else
9699 $3])dnl
9700fi])
9701
9702
9703# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9704# ---------------------------------------------
9705m4_define([_PKG_CONFIG],
9706[if test -n "$PKG_CONFIG"; then
9707 if test -n "$$1"; then
9708 pkg_cv_[]$1="$$1"
9709 else
9710 PKG_CHECK_EXISTS([$3],
9711 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9712 [pkg_failed=yes])
9713 fi
9714else
9715 pkg_failed=untried
9716fi[]dnl
9717])# _PKG_CONFIG
9718
9719# _PKG_SHORT_ERRORS_SUPPORTED
9720# -----------------------------
9721AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9722[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9723if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9724 _pkg_short_errors_supported=yes
9725else
9726 _pkg_short_errors_supported=no
9727fi[]dnl
9728])# _PKG_SHORT_ERRORS_SUPPORTED
9729
9730
9731# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9732# [ACTION-IF-NOT-FOUND])
9733#
9734#
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
9738#
9739#
9740# --------------------------------------------------------------
9741AC_DEFUN([PKG_CHECK_MODULES],
9742[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9743AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9744AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9745
9746pkg_failed=no
9747AC_MSG_CHECKING([for $1])
9748
9749_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9750_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9751
9752m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9753and $1[]_LIBS to avoid the need to call pkg-config.
9754See the pkg-config man page for more details.])
9755
9756if 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"`
9760 else
9761 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
9762 fi
9763 # Put the nasty error message in config.log where it belongs
9764 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9765
9766 ifelse([$4], , [AC_MSG_ERROR(dnl
9767[Package requirements ($2) were not met:
9768
9769$$1_PKG_ERRORS
9770
9771Consider adjusting the PKG_CONFIG_PATH environment variable if you
9772installed software in a non-standard prefix.
9773
9774_PKG_TEXT
9775])],
9776 [AC_MSG_RESULT([no])
9777 $4])
9778elif 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
9781is in your PATH or set the PKG_CONFIG environment variable to the full
9782path to pkg-config.
9783
9784_PKG_TEXT
9785
9786To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
9787 [$4])
9788else
9789 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9790 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9791 AC_MSG_RESULT([yes])
9792 ifelse([$3], , :, [$3])
9793fi[]dnl
9794])# PKG_CHECK_MODULES
9795
9796# po.m4 serial 15 (gettext-0.17)
9797dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
9798dnl This file is free software; the Free Software Foundation
9799dnl gives unlimited permission to copy and/or distribute it,
9800dnl with or without modifications, as long as this notice is preserved.
9801dnl
9802dnl This file can can be used in projects which are not available under
9803dnl the GNU General Public License or the GNU Library General Public
9804dnl License but which still want to provide support for the GNU gettext
9805dnl functionality.
9806dnl Please note that the actual code of the GNU gettext library is covered
9807dnl by the GNU Library General Public License, and the rest of the GNU
9808dnl gettext package package is covered by the GNU General Public License.
9809dnl They are *not* in the public domain.
9810
9811dnl Authors:
9812dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9813dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9814
9815AC_PREREQ(2.50)
9816
9817dnl Checks for all prerequisites of the po subdirectory.
9818AC_DEFUN([AM_PO_SUBDIRS],
9819[
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
9824
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])
9828
9829 dnl Perform the following tests also if --disable-nls has been given,
9830 dnl because they are needed for "make dist" to work.
9831
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)],
9838 :)
9839 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
9840
9841 dnl Test whether it is GNU msgfmt >= 0.15.
9842changequote(,)dnl
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 ;;
9846 esac
9847changequote([,])dnl
9848 AC_SUBST([MSGFMT_015])
9849changequote(,)dnl
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 ;;
9853 esac
9854changequote([,])dnl
9855 AC_SUBST([GMSGFMT_015])
9856
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)],
9863 :)
9864 dnl Remove leftover from FreeBSD xgettext call.
9865 rm -f messages.po
9866
9867 dnl Test whether it is GNU xgettext >= 0.15.
9868changequote(,)dnl
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 ;;
9872 esac
9873changequote([,])dnl
9874 AC_SUBST([XGETTEXT_015])
9875
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], :)
9879
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])
9885
9886 dnl Support for AM_XGETTEXT_OPTION.
9887 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
9888 AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
9889
9890 AC_CONFIG_COMMANDS([po-directories], [[
9891 for ac_file in $CONFIG_FILES; do
9892 # Support "outfile[:infile[:infile...]]"
9893 case "$ac_file" in
9894 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9895 esac
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" ;;
9909 esac
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
9920 # parameters.
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"
9925 fi
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"
9930 else
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'
9934 fi
9935 # Compute POFILES
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)
9941 # Compute GMOFILES
9942 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
9943 case "$ac_given_srcdir" in
9944 .) srcdirpre= ;;
9945 *) srcdirpre='$(srcdir)/' ;;
9946 esac
9947 POFILES=
9948 UPDATEPOFILES=
9949 DUMMYPOFILES=
9950 GMOFILES=
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"
9956 done
9957 # CATALOGS depends on both $ac_dir and the user's LINGUAS
9958 # environment variable.
9959 INST_LINGUAS=
9960 if test -n "$ALL_LINGUAS"; then
9961 for presentlang in $ALL_LINGUAS; do
9962 useit=no
9963 if test "%UNSET%" != "$LINGUAS"; then
9964 desiredlanguages="$LINGUAS"
9965 else
9966 desiredlanguages="$ALL_LINGUAS"
9967 fi
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;;
9976 esac
9977 done
9978 if test $useit = yes; then
9979 INST_LINGUAS="$INST_LINGUAS $presentlang"
9980 fi
9981 done
9982 fi
9983 CATALOGS=
9984 if test -n "$INST_LINGUAS"; then
9985 for lang in $INST_LINGUAS; do
9986 CATALOGS="$CATALOGS $lang.gmo"
9987 done
9988 fi
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
9993 case "$f" in
9994 *.orig | *.bak | *~) ;;
9995 *) cat "$f" >> "$ac_dir/Makefile" ;;
9996 esac
9997 fi
9998 done
9999 fi
10000 ;;
10001 esac
10002 done]],
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%}"
10009 ])
10010])
10011
10012dnl Postprocesses a Makefile in a directory containing PO files.
10013AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
10014[
10015 # When this code is run, in config.status, two variables have already been
10016 # set:
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
10019 # time.
10020
10021changequote(,)dnl
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" ;;
10033 esac
10034
10035 # Find a way to echo strings without interpreting backslash.
10036 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
10037 gt_echo='echo'
10038 else
10039 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
10040 gt_echo='printf %s\n'
10041 else
10042 echo_func () {
10043 cat <<EOT
10044$*
10045EOT
10046 }
10047 gt_echo='echo_func'
10048 fi
10049 fi
10050
10051 # A sed script that extracts the value of VARIABLE from a Makefile.
10052 sed_x_variable='
10053# Test if the hold space is empty.
10054x
10055s/P/P/
10056x
10057ta
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[ ]*=//
10062 ba
10063}
10064bd
10065:a
10066# Here we are processing a line from the variable definition.
10067# Remove comment, more precisely replace it with a space.
10068s/#.*$/ /
10069# See if the line ends in a backslash.
10070tb
10071:b
10072s/\\$//
10073# Print the line, without the trailing backslash.
10074p
10075tc
10076# There was no trailing backslash. The end of the variable definition is
10077# reached. Clear the hold space.
10078s/^.*$//
10079x
10080bd
10081:c
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.
10084s/^.*$/P/
10085x
10086:d
10087'
10088changequote([,])dnl
10089
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))
10095 POTFILES_DEPS=
10096 for file in $POTFILES; do
10097 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
10098 done
10099 POMAKEFILEDEPS=""
10100
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"
10103 fi
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"
10108 else
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"`
10112 fi
10113 # Hide the ALL_LINGUAS assigment from automake < 1.5.
10114 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
10115 # Compute POFILES
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)
10121 # Compute GMOFILES
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)
10127 # Compute QMFILES
10128 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
10129 # Compute MSGFILES
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
10134 .) srcdirpre= ;;
10135 *) srcdirpre='$(srcdir)/' ;;
10136 esac
10137 POFILES=
10138 UPDATEPOFILES=
10139 DUMMYPOFILES=
10140 GMOFILES=
10141 PROPERTIESFILES=
10142 CLASSFILES=
10143 QMFILES=
10144 MSGFILES=
10145 RESOURCESDLLFILES=
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"
10158 done
10159 # CATALOGS depends on both $ac_dir and the user's LINGUAS
10160 # environment variable.
10161 INST_LINGUAS=
10162 if test -n "$ALL_LINGUAS"; then
10163 for presentlang in $ALL_LINGUAS; do
10164 useit=no
10165 if test "%UNSET%" != "$LINGUAS"; then
10166 desiredlanguages="$LINGUAS"
10167 else
10168 desiredlanguages="$ALL_LINGUAS"
10169 fi
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;;
10178 esac
10179 done
10180 if test $useit = yes; then
10181 INST_LINGUAS="$INST_LINGUAS $presentlang"
10182 fi
10183 done
10184 fi
10185 CATALOGS=
10186 JAVACATALOGS=
10187 QTCATALOGS=
10188 TCLCATALOGS=
10189 CSHARPCATALOGS=
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"
10199 done
10200 fi
10201
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; }
10211EOF
10212 done
10213 fi
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; }
10222EOF
10223 done
10224 fi
10225 if test -n "$POMAKEFILEDEPS"; then
10226 cat >> "$ac_file.tmp" <<EOF
10227Makefile: $POMAKEFILEDEPS
10228EOF
10229 fi
10230 mv "$ac_file.tmp" "$ac_file"
10231])
10232
10233dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
10234AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
10235[
10236 XGETTEXT_EXTRA_OPTIONS=
10237])
10238
10239dnl Registers an option to be passed to xgettext in the po subdirectory.
10240AC_DEFUN([AM_XGETTEXT_OPTION],
10241[
10242 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
10243 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
10244])
10245
10246# progtest.m4 serial 4 (gettext-0.14.2)
10247dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
10248dnl This file is free software; the Free Software Foundation
10249dnl gives unlimited permission to copy and/or distribute it,
10250dnl with or without modifications, as long as this notice is preserved.
10251dnl
10252dnl This file can can be used in projects which are not available under
10253dnl the GNU General Public License or the GNU Library General Public
10254dnl License but which still want to provide support for the GNU gettext
10255dnl functionality.
10256dnl Please note that the actual code of the GNU gettext library is covered
10257dnl by the GNU Library General Public License, and the rest of the GNU
10258dnl gettext package package is covered by the GNU General Public License.
10259dnl They are *not* in the public domain.
10260
10261dnl Authors:
10262dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
10263
10264AC_PREREQ(2.50)
10265
10266# Search path for a program which passes the given test.
10267
10268dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
10269dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
10270AC_DEFUN([AM_PATH_PROG_WITH_TEST],
10271[
10272# Prepare PATH_SEPARATOR.
10273# The user is always right.
10274if test "${PATH_SEPARATOR+set}" != set; then
10275 echo "#! /bin/sh" >conf$$.sh
10276 echo "exit 0" >>conf$$.sh
10277 chmod +x conf$$.sh
10278 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10279 PATH_SEPARATOR=';'
10280 else
10281 PATH_SEPARATOR=:
10282 fi
10283 rm -f conf$$.sh
10284fi
10285
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.
10288cat >conf$$.file <<_ASEOF
10289#! /bin/sh
10290exit 0
10291_ASEOF
10292chmod +x conf$$.file
10293if test -x conf$$.file >/dev/null 2>&1; then
10294 ac_executable_p="test -x"
10295else
10296 ac_executable_p="test -f"
10297fi
10298rm -f conf$$.file
10299
10300# Extract the first word of "$2", so it can be a program name with args.
10301set dummy $2; ac_word=[$]2
10302AC_MSG_CHECKING([for $ac_word])
10303AC_CACHE_VAL(ac_cv_path_$1,
10304[case "[$]$1" in
10305 [[\\/]]* | ?:[[\\/]]*)
10306 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
10307 ;;
10308 *)
10309 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
10310 for ac_dir in ifelse([$5], , $PATH, [$5]); do
10311 IFS="$ac_save_IFS"
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
10316 if [$3]; then
10317 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
10318 break 2
10319 fi
10320 fi
10321 done
10322 done
10323 IFS="$ac_save_IFS"
10324dnl If no 4th arg is given, leave the cache variable unset,
10325dnl so AC_PATH_PROGS will keep looking.
10326ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
10327])dnl
10328 ;;
10329esac])dnl
10330$1="$ac_cv_path_$1"
10331if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
10332 AC_MSG_RESULT([$]$1)
10333else
10334 AC_MSG_RESULT(no)
10335fi
10336AC_SUBST($1)dnl
10337])
10338
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
10345
10346dnl AM_PATH_SDL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
10347dnl Test for SDL, and define SDL_CFLAGS and SDL_LIBS
10348dnl
10349AC_DEFUN([AM_PATH_SDL],
10350[dnl
10351dnl Get the cflags and libraries from the sdl-config script
10352dnl
10353AC_ARG_WITH(sdl-prefix,[ --with-sdl-prefix=PFX Prefix where SDL is installed (optional)],
10354 sdl_prefix="$withval", sdl_prefix="")
10355AC_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="")
10357AC_ARG_ENABLE(sdltest, [ --disable-sdltest Do not try to compile and run a test SDL program],
10358 , enable_sdltest=yes)
10359
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
10364 fi
10365 fi
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
10370 fi
10371 fi
10372
10373 if test "x$prefix" != xNONE; then
10374 PATH="$prefix/bin:$prefix/usr/bin:$PATH"
10375 fi
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)
10379 no_sdl=""
10380 if test "$SDL_CONFIG" = "no" ; then
10381 no_sdl=yes
10382 else
10383 SDL_CFLAGS=`$SDL_CONFIG $sdl_config_args --cflags`
10384 SDL_LIBS=`$SDL_CONFIG $sdl_config_args --libs`
10385
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"
10399dnl
10400dnl Now check if the installed SDL is sufficiently new. (Also sanity
10401dnl checks the results of sdl-config to some extent
10402dnl
10403 rm -f conf.sdltest
10404 AC_TRY_RUN([
10405#include <stdio.h>
10406#include <stdlib.h>
10407#include <string.h>
10408#include "SDL.h"
10409
10410char*
10411my_strdup (char *str)
10412{
10413 char *new_str;
10414
10415 if (str)
10416 {
10417 new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
10418 strcpy (new_str, str);
10419 }
10420 else
10421 new_str = NULL;
10422
10423 return new_str;
10424}
10425
10426int main (int argc, char *argv[])
10427{
10428 int major, minor, micro;
10429 char *tmp_version;
10430
10431 /* This hangs on some systems (?)
10432 system ("touch conf.sdltest");
10433 */
10434 { FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }
10435
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, &micro) != 3) {
10439 printf("%s, bad version string\n", "$min_sdl_version");
10440 exit(1);
10441 }
10442
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)))
10446 {
10447 return 0;
10448 }
10449 else
10450 {
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");
10457 return 1;
10458 }
10459}
10460
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"
10465 fi
10466 fi
10467 if test "x$no_sdl" = x ; then
10468 AC_MSG_RESULT(yes)
10469 ifelse([$2], , :, [$2])
10470 else
10471 AC_MSG_RESULT(no)
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."
10477 else
10478 if test -f conf.sdltest ; then
10479 :
10480 else
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"
10485 AC_TRY_LINK([
10486#include <stdio.h>
10487#include "SDL.h"
10488
10489int main(int argc, char *argv[])
10490{ return 0; }
10491#undef main
10492#define main K_and_R_C_main
10493], [ return 0; ],
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"
10500 echo "***"
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"
10510 fi
10511 fi
10512 SDL_CFLAGS=""
10513 SDL_LIBS=""
10514 ifelse([$3], , :, [$3])
10515 fi
10516 AC_SUBST(SDL_CFLAGS)
10517 AC_SUBST(SDL_LIBS)
10518 rm -f conf.sdltest
10519])
10520
10521# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
10522#
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.
10526
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.)
10532AC_DEFUN([AM_AUTOMAKE_VERSION],
10533[am__api_version='1.10'
10534dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
10535dnl require some minimum version. Point them to the right macro.
10536m4_if([$1], [1.10.2], [],
10537 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
10538])
10539
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.
10545m4_define([_AM_AUTOCONF_VERSION], [])
10546
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.
10551AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
10552[AM_AUTOMAKE_VERSION([1.10.2])dnl
10553m4_ifndef([AC_AUTOCONF_VERSION],
10554 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
10555_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
10556
10557# Figure out how to run the assembler. -*- Autoconf -*-
10558
10559# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
10560#
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.
10564
10565# serial 5
10566
10567# AM_PROG_AS
10568# ----------
10569AC_DEFUN([AM_PROG_AS],
10570[# By default we simply use the C compiler to build assembly code.
10571AC_REQUIRE([AC_PROG_CC])
10572test "${CCAS+set}" = set || CCAS=$CC
10573test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
10574AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
10575AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
10576_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
10577])
10578
10579# AM_AUX_DIR_EXPAND -*- Autoconf -*-
10580
10581# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
10582#
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.
10586
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/../..'.
10590#
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.
10598#
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
10605#
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.
10610#
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.
10620#
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.
10624
10625AC_DEFUN([AM_AUX_DIR_EXPAND],
10626[dnl Rely on autoconf to set up CDPATH properly.
10627AC_PREREQ([2.50])dnl
10628# expand $ac_aux_dir to an absolute path
10629am_aux_dir=`cd $ac_aux_dir && pwd`
10630])
10631
10632# AM_CONDITIONAL -*- Autoconf -*-
10633
10634# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
10635# Free Software Foundation, Inc.
10636#
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.
10640
10641# serial 8
10642
10643# AM_CONDITIONAL(NAME, SHELL-CONDITION)
10644# -------------------------------------
10645# Define a conditional.
10646AC_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
10650AC_SUBST([$1_TRUE])dnl
10651AC_SUBST([$1_FALSE])dnl
10652_AM_SUBST_NOTMAKE([$1_TRUE])dnl
10653_AM_SUBST_NOTMAKE([$1_FALSE])dnl
10654if $2; then
10655 $1_TRUE=
10656 $1_FALSE='#'
10657else
10658 $1_TRUE='#'
10659 $1_FALSE=
10660fi
10661AC_CONFIG_COMMANDS_PRE(
10662[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
10663 AC_MSG_ERROR([[conditional "$1" was never defined.
10664Usually this means the macro was only invoked conditionally.]])
10665fi])])
10666
10667# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
10668# Free Software Foundation, Inc.
10669#
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.
10673
10674# serial 9
10675
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...
10681
10682
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.
10688#
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.
10693AC_DEFUN([_AM_DEPENDENCIES],
10694[AC_REQUIRE([AM_SET_DEPDIR])dnl
10695AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
10696AC_REQUIRE([AM_MAKE_INCLUDE])dnl
10697AC_REQUIRE([AM_DEP_TRACK])dnl
10698
10699ifelse([$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=])
10705
10706AC_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
10713 # in D'.
10714 mkdir conftest.dir
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
10718 cd 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
10724 # directory.
10725 mkdir sub
10726
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`
10730 fi
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.
10735 #
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.
10739 : > sub/conftest.c
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
10745 done
10746 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10747
10748 case $depmode in
10749 nosideeffect)
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
10753 continue
10754 else
10755 break
10756 fi
10757 ;;
10758 none) break ;;
10759 esac
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
10782 break
10783 fi
10784 fi
10785 done
10786
10787 cd ..
10788 rm -rf conftest.dir
10789else
10790 am_cv_$1_dependencies_compiler_type=none
10791fi
10792])
10793AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
10794AM_CONDITIONAL([am__fastdep$1], [
10795 test "x$enable_dependency_tracking" != xno \
10796 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
10797])
10798
10799
10800# AM_SET_DEPDIR
10801# -------------
10802# Choose a directory name for dependency files.
10803# This macro is AC_REQUIREd in _AM_DEPENDENCIES
10804AC_DEFUN([AM_SET_DEPDIR],
10805[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10806AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
10807])
10808
10809
10810# AM_DEP_TRACK
10811# ------------
10812AC_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])
10816if test "x$enable_dependency_tracking" != xno; then
10817 am_depcomp="$ac_aux_dir/depcomp"
10818 AMDEPBACKSLASH='\'
10819fi
10820AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
10821AC_SUBST([AMDEPBACKSLASH])dnl
10822_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
10823])
10824
10825# Generate code to set up dependency tracking. -*- Autoconf -*-
10826
10827# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
10828# Free Software Foundation, Inc.
10829#
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.
10833
10834#serial 4
10835
10836# _AM_OUTPUT_DEPENDENCY_COMMANDS
10837# ------------------------------
10838AC_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.
10842case $CONFIG_FILES in
10843*\'*) eval set x "$CONFIG_FILES" ;;
10844*) set x $CONFIG_FILES ;;
10845esac
10846shift
10847for mf
10848do
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")`
10860 else
10861 continue
10862 fi
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
10875 # expansion.
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"
10885 done
10886done
10887])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10888
10889
10890# AM_OUTPUT_DEPENDENCY_COMMANDS
10891# -----------------------------
10892# This macro should only be invoked once -- use via AC_REQUIRE.
10893#
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.
10897AC_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"])
10901])
10902
10903# Do all the work for Automake. -*- Autoconf -*-
10904
10905# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
10906# 2005, 2006, 2008 Free Software Foundation, Inc.
10907#
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.
10911
10912# serial 13
10913
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.
10916
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.
10928AC_DEFUN([AM_INIT_AUTOMAKE],
10929[AC_PREREQ([2.60])dnl
10930dnl Autoconf wants to disallow AM_ names. We explicitly allow
10931dnl the ones we care about.
10932m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10933AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10934AC_REQUIRE([AC_PROG_INSTALL])dnl
10935if 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])
10942 fi
10943fi
10944
10945# test whether we have cygpath
10946if test -z "$CYGPATH_W"; then
10947 if (cygpath --version) >/dev/null 2>/dev/null; then
10948 CYGPATH_W='cygpath -w'
10949 else
10950 CYGPATH_W=echo
10951 fi
10952fi
10953AC_SUBST([CYGPATH_W])
10954
10955# Define the identity of the package.
10956dnl Distinguish between old-style and new-style calls.
10957m4_ifval([$2],
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
10962dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10963m4_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
10967
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
10971
10972# Some tools Automake needs.
10973AC_REQUIRE([AM_SANITY_CHECK])dnl
10974AC_REQUIRE([AC_ARG_PROGRAM])dnl
10975AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
10976AM_MISSING_PROG(AUTOCONF, autoconf)
10977AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
10978AM_MISSING_PROG(AUTOHEADER, autoheader)
10979AM_MISSING_PROG(MAKEINFO, makeinfo)
10980AM_PROG_INSTALL_SH
10981AM_PROG_INSTALL_STRIP
10982AC_REQUIRE([AM_PROG_MKDIR_P])dnl
10983# We need awk for the "check" target. The system "awk" is bad on
10984# some platforms.
10985AC_REQUIRE([AC_PROG_AWK])dnl
10986AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10987AC_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
10996AC_PROVIDE_IFELSE([AC_PROG_CXX],
10997 [_AM_DEPENDENCIES(CXX)],
10998 [define([AC_PROG_CXX],
10999 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
11000AC_PROVIDE_IFELSE([AC_PROG_OBJC],
11001 [_AM_DEPENDENCIES(OBJC)],
11002 [define([AC_PROG_OBJC],
11003 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
11004])
11005])
11006
11007
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.
11011
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.
11015AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
11016[# Compute $1's index in $config_headers.
11017_am_arg=$1
11018_am_stamp_count=1
11019for _am_header in $config_headers :; do
11020 case $_am_header in
11021 $_am_arg | $_am_arg:* )
11022 break ;;
11023 * )
11024 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
11025 esac
11026done
11027echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
11028
11029# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
11030#
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.
11034
11035# AM_PROG_INSTALL_SH
11036# ------------------
11037# Define $install_sh.
11038AC_DEFUN([AM_PROG_INSTALL_SH],
11039[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11040install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
11041AC_SUBST(install_sh)])
11042
11043# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
11044#
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.
11048
11049# serial 2
11050
11051# Check whether the underlying file-system supports filenames
11052# with a leading dot. For instance MS-DOS doesn't.
11053AC_DEFUN([AM_SET_LEADING_DOT],
11054[rm -rf .tst 2>/dev/null
11055mkdir .tst 2>/dev/null
11056if test -d .tst; then
11057 am__leading_dot=.
11058else
11059 am__leading_dot=_
11060fi
11061rmdir .tst 2>/dev/null
11062AC_SUBST([am__leading_dot])])
11063
11064# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
11065# From Jim Meyering
11066
11067# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
11068# Free Software Foundation, Inc.
11069#
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.
11073
11074# serial 4
11075
11076AC_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
11087 AC_SUBST(MAINT)dnl
11088]
11089)
11090
11091AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
11092
11093# Check to see how 'make' treats includes. -*- Autoconf -*-
11094
11095# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
11096#
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.
11100
11101# serial 3
11102
11103# AM_MAKE_INCLUDE()
11104# -----------------
11105# Check to see how make treats includes.
11106AC_DEFUN([AM_MAKE_INCLUDE],
11107[am_make=${MAKE-make}
11108cat > confinc << 'END'
11109am__doit:
11110 @echo done
11111.PHONY: am__doit
11112END
11113# If we don't find an include directive, just comment out the code.
11114AC_MSG_CHECKING([for style of include used by $am_make])
11115am__include="#"
11116am__quote=
11117_am_result=none
11118# First try GNU make style include.
11119echo "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'.
11125if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
11126 am__include=include
11127 am__quote=
11128 _am_result=GNU
11129fi
11130# Now try BSD make style include.
11131if 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
11135 am__quote="\""
11136 _am_result=BSD
11137 fi
11138fi
11139AC_SUBST([am__include])
11140AC_SUBST([am__quote])
11141AC_MSG_RESULT([$_am_result])
11142rm -f confinc confmf
11143])
11144
11145# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
11146
11147# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
11148# Free Software Foundation, Inc.
11149#
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.
11153
11154# serial 5
11155
11156# AM_MISSING_PROG(NAME, PROGRAM)
11157# ------------------------------
11158AC_DEFUN([AM_MISSING_PROG],
11159[AC_REQUIRE([AM_MISSING_HAS_RUN])
11160$1=${$1-"${am_missing_run}$2"}
11161AC_SUBST($1)])
11162
11163
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.
11168AC_DEFUN([AM_MISSING_HAS_RUN],
11169[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
11170AC_REQUIRE_AUX_FILE([missing])dnl
11171test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
11172# Use eval to expand $SHELL
11173if eval "$MISSING --run true"; then
11174 am_missing_run="$MISSING --run "
11175else
11176 am_missing_run=
11177 AC_MSG_WARN([`missing' script is too old or missing])
11178fi
11179])
11180
11181# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
11182#
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.
11186
11187# AM_PROG_MKDIR_P
11188# ---------------
11189# Check for `mkdir -p'.
11190AC_DEFUN([AM_PROG_MKDIR_P],
11191[AC_PREREQ([2.60])dnl
11192AC_REQUIRE([AC_PROG_MKDIR_P])dnl
11193dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
11194dnl while keeping a definition of mkdir_p for backward compatibility.
11195dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
11196dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
11197dnl Makefile.ins that do not define MKDIR_P, so we do our own
11198dnl adjustment using top_builddir (which is defined more often than
11199dnl MKDIR_P).
11200AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
11201case $mkdir_p in
11202 [[\\/$]]* | ?:[[\\/]]*) ;;
11203 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
11204esac
11205])
11206
11207# Helper functions for option handling. -*- Autoconf -*-
11208
11209# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
11210#
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.
11214
11215# serial 4
11216
11217# _AM_MANGLE_OPTION(NAME)
11218# -----------------------
11219AC_DEFUN([_AM_MANGLE_OPTION],
11220[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
11221
11222# _AM_SET_OPTION(NAME)
11223# ------------------------------
11224# Set option NAME. Presently that only means defining a flag for this option.
11225AC_DEFUN([_AM_SET_OPTION],
11226[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
11227
11228# _AM_SET_OPTIONS(OPTIONS)
11229# ----------------------------------
11230# OPTIONS is a space-separated list of Automake options.
11231AC_DEFUN([_AM_SET_OPTIONS],
11232[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
11233
11234# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
11235# -------------------------------------------
11236# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
11237AC_DEFUN([_AM_IF_OPTION],
11238[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
11239
11240# Check to make sure that the build environment is sane. -*- Autoconf -*-
11241
11242# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
11243# Free Software Foundation, Inc.
11244#
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.
11248
11249# serial 4
11250
11251# AM_SANITY_CHECK
11252# ---------------
11253AC_DEFUN([AM_SANITY_CHECK],
11254[AC_MSG_CHECKING([whether build environment is sane])
11255# Just in case
11256sleep 1
11257echo 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
11262# directory).
11263if (
11264 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
11265 if test "$[*]" = "X"; then
11266 # -L didn't work.
11267 set X `ls -t $srcdir/configure conftest.file`
11268 fi
11269 rm -f conftest.file
11270 if test "$[*]" != "X $srcdir/configure conftest.file" \
11271 && test "$[*]" != "X conftest.file $srcdir/configure"; then
11272
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
11278alias in your environment])
11279 fi
11280
11281 test "$[2]" = conftest.file
11282 )
11283then
11284 # Ok.
11285 :
11286else
11287 AC_MSG_ERROR([newly created file is older than distributed files!
11288Check your system clock])
11289fi
11290AC_MSG_RESULT(yes)])
11291
11292# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
11293#
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.
11297
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).
11307AC_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.
11313dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
11314if test "$cross_compiling" != no; then
11315 AC_CHECK_TOOL([STRIP], [strip], :)
11316fi
11317INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
11318AC_SUBST([INSTALL_STRIP_PROGRAM])])
11319
11320# Copyright (C) 2006 Free Software Foundation, Inc.
11321#
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.
11325
11326# _AM_SUBST_NOTMAKE(VARIABLE)
11327# ---------------------------
11328# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
11329# This macro is traced by Automake.
11330AC_DEFUN([_AM_SUBST_NOTMAKE])
11331
11332# Check how to create a tarball. -*- Autoconf -*-
11333
11334# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
11335#
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.
11339
11340# serial 2
11341
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'.
11346#
11347# Substitute a variable $(am__tar) that is a command
11348# writing to stdout a FORMAT-tarball containing the directory
11349# $tardir.
11350# tardir=directory && $(am__tar) > result.tar
11351#
11352# Substitute a variable $(am__untar) that extract such
11353# a tarball read from stdin.
11354# $(am__untar) < result.tar
11355AC_DEFUN([_AM_PROG_TAR],
11356[# Always define AMTAR for backward compatibility.
11357AM_MISSING_PROG([AMTAR], [tar])
11358m4_if([$1], [v7],
11359 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
11360 [m4_case([$1], [ustar],, [pax],,
11361 [m4_fatal([Unknown tar format])])
11362AC_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 `-'.
11368for _am_tool in $_am_tools
11369do
11370 case $_am_tool in
11371 gnutar)
11372 for _am_tar in tar gnutar gtar;
11373 do
11374 AM_RUN_LOG([$_am_tar --version]) && break
11375 done
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 -"
11379 ;;
11380 plaintar)
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 -'
11387 ;;
11388 pax)
11389 am__tar='pax -L -x $1 -w "$$tardir"'
11390 am__tar_='pax -L -x $1 -w "$tardir"'
11391 am__untar='pax -r'
11392 ;;
11393 cpio)
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'
11397 ;;
11398 none)
11399 am__tar=false
11400 am__tar_=false
11401 am__untar=false
11402 ;;
11403 esac
11404
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
11408
11409 # tar/untar a dummy directory, and stop if the command works
11410 rm -rf conftest.dir
11411 mkdir 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
11418 fi
11419done
11420rm -rf conftest.dir
11421
11422AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
11423AC_MSG_RESULT([$am_cv_prog_tar_$1])])
11424AC_SUBST([am__tar])
11425AC_SUBST([am__untar])
11426]) # _AM_PROG_TAR
11427