pcsxr-1.9.92
[pcsx_rearmed.git] / aclocal.m4
CommitLineData
ef79bbde
P
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