Debian Codegraph @

aclocal.m4

raw
1 # generated automatically by aclocal 1.9.6 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005 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
14 # codeset.m4 serial AM1 (gettext-0.10.40)
15 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
16 dnl This file is free software; the Free Software Foundation
17 dnl gives unlimited permission to copy and/or distribute it,
18 dnl with or without modifications, as long as this notice is preserved.
19
20 dnl From Bruno Haible.
21
22 AC_DEFUN([AM_LANGINFO_CODESET],
23 [
24 AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
25 [AC_TRY_LINK([#include <langinfo.h>],
26 [char* cs = nl_langinfo(CODESET);],
27 am_cv_langinfo_codeset=yes,
28 am_cv_langinfo_codeset=no)
29 ])
30 if test $am_cv_langinfo_codeset = yes; then
31 AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
32 [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
33 fi
34 ])
35
36 # gettext.m4 serial 37 (gettext-0.14.4)
37 dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
38 dnl This file is free software; the Free Software Foundation
39 dnl gives unlimited permission to copy and/or distribute it,
40 dnl with or without modifications, as long as this notice is preserved.
41 dnl
42 dnl This file can can be used in projects which are not available under
43 dnl the GNU General Public License or the GNU Library General Public
44 dnl License but which still want to provide support for the GNU gettext
45 dnl functionality.
46 dnl Please note that the actual code of the GNU gettext library is covered
47 dnl by the GNU Library General Public License, and the rest of the GNU
48 dnl gettext package package is covered by the GNU General Public License.
49 dnl They are *not* in the public domain.
50
51 dnl Authors:
52 dnl Ulrich Drepper <[email protected]>, 1995-2000.
53 dnl Bruno Haible <[email protected]>, 2000-2003.
54
55 dnl Macro to add for using GNU gettext.
56
57 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
58 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
59 dnl default (if it is not specified or empty) is 'no-libtool'.
60 dnl INTLSYMBOL should be 'external' for packages with no intl directory,
61 dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
62 dnl If INTLSYMBOL is 'use-libtool', then a libtool library
63 dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
64 dnl depending on --{enable,disable}-{shared,static} and on the presence of
65 dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
66 dnl $(top_builddir)/intl/libintl.a will be created.
67 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
68 dnl implementations (in libc or libintl) without the ngettext() function
69 dnl will be ignored. If NEEDSYMBOL is specified and is
70 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
71 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
72 dnl INTLDIR is used to find the intl libraries. If empty,
73 dnl the value `$(top_builddir)/intl/' is used.
74 dnl
75 dnl The result of the configuration is one of three cases:
76 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
77 dnl and used.
78 dnl Catalog format: GNU --> install in $(datadir)
79 dnl Catalog extension: .mo after installation, .gmo in source tree
80 dnl 2) GNU gettext has been found in the system's C library.
81 dnl Catalog format: GNU --> install in $(datadir)
82 dnl Catalog extension: .mo after installation, .gmo in source tree
83 dnl 3) No internationalization, always use English msgid.
84 dnl Catalog format: none
85 dnl Catalog extension: none
86 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
87 dnl The use of .gmo is historical (it was needed to avoid overwriting the
88 dnl GNU format catalogs when building on a platform with an X/Open gettext),
89 dnl but we keep it in order not to force irrelevant filename changes on the
90 dnl maintainers.
91 dnl
92 AC_DEFUN([AM_GNU_GETTEXT],
93 [
94 dnl Argument checking.
95 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
96 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
97 ])])])])])
98 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
99 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
100 ])])])])
101 define([gt_included_intl], ifelse([$1], [external], [no], [yes]))
102 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
103
104 AC_REQUIRE([AM_PO_SUBDIRS])dnl
105 ifelse(gt_included_intl, yes, [
106 AC_REQUIRE([AM_INTL_SUBDIR])dnl
107 ])
108
109 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
110 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
111 AC_REQUIRE([AC_LIB_RPATH])
112
113 dnl Sometimes libintl requires libiconv, so first search for libiconv.
114 dnl Ideally we would do this search only after the
115 dnl if test "$USE_NLS" = "yes"; then
116 dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
117 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
118 dnl the configure script would need to contain the same shell code
119 dnl again, outside any 'if'. There are two solutions:
120 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
121 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
122 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
123 dnl documented, we avoid it.
124 ifelse(gt_included_intl, yes, , [
125 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
126 ])
127
128 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
129 gt_INTL_MACOSX
130
131 dnl Set USE_NLS.
132 AM_NLS
133
134 ifelse(gt_included_intl, yes, [
135 BUILD_INCLUDED_LIBINTL=no
136 USE_INCLUDED_LIBINTL=no
137 ])
138 LIBINTL=
139 LTLIBINTL=
140 POSUB=
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 dnl Add a version number to the cache macros.
161 define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
162 define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
163 define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
164
165 AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
166 [AC_TRY_LINK([#include <libintl.h>
167 ]ifelse([$2], [need-formatstring-macros],
168 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
169 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
170 #endif
171 changequote(,)dnl
172 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
173 changequote([,])dnl
174 ], [])[extern int _nl_msg_cat_cntr;
175 extern int *_nl_domain_bindings;],
176 [bindtextdomain ("", "");
177 return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
178 gt_cv_func_gnugettext_libc=yes,
179 gt_cv_func_gnugettext_libc=no)])
180
181 if test "$gt_cv_func_gnugettext_libc" != "yes"; then
182 dnl Sometimes libintl requires libiconv, so first search for libiconv.
183 ifelse(gt_included_intl, yes, , [
184 AM_ICONV_LINK
185 ])
186 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
187 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
188 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
189 dnl even if libiconv doesn't exist.
190 AC_LIB_LINKFLAGS_BODY([intl])
191 AC_CACHE_CHECK([for GNU gettext in libintl],
192 gt_cv_func_gnugettext_libintl,
193 [gt_save_CPPFLAGS="$CPPFLAGS"
194 CPPFLAGS="$CPPFLAGS $INCINTL"
195 gt_save_LIBS="$LIBS"
196 LIBS="$LIBS $LIBINTL"
197 dnl Now see whether libintl exists and does not depend on libiconv.
198 AC_TRY_LINK([#include <libintl.h>
199 ]ifelse([$2], [need-formatstring-macros],
200 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
201 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
202 #endif
203 changequote(,)dnl
204 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
205 changequote([,])dnl
206 ], [])[extern int _nl_msg_cat_cntr;
207 extern
208 #ifdef __cplusplus
209 "C"
210 #endif
211 const char *_nl_expand_alias (const char *);],
212 [bindtextdomain ("", "");
213 return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
214 gt_cv_func_gnugettext_libintl=yes,
215 gt_cv_func_gnugettext_libintl=no)
216 dnl Now see whether libintl exists and depends on libiconv.
217 if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
218 LIBS="$LIBS $LIBICONV"
219 AC_TRY_LINK([#include <libintl.h>
220 ]ifelse([$2], [need-formatstring-macros],
221 [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
222 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
223 #endif
224 changequote(,)dnl
225 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
226 changequote([,])dnl
227 ], [])[extern int _nl_msg_cat_cntr;
228 extern
229 #ifdef __cplusplus
230 "C"
231 #endif
232 const char *_nl_expand_alias (const char *);],
233 [bindtextdomain ("", "");
234 return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
235 [LIBINTL="$LIBINTL $LIBICONV"
236 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
237 gt_cv_func_gnugettext_libintl=yes
238 ])
239 fi
240 CPPFLAGS="$gt_save_CPPFLAGS"
241 LIBS="$gt_save_LIBS"])
242 fi
243
244 dnl If an already present or preinstalled GNU gettext() is found,
245 dnl use it. But if this macro is used in GNU gettext, and GNU
246 dnl gettext is already preinstalled in libintl, we update this
247 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
248 if test "$gt_cv_func_gnugettext_libc" = "yes" \
249 || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
250 && test "$PACKAGE" != gettext-runtime \
251 && test "$PACKAGE" != gettext-tools; }; then
252 gt_use_preinstalled_gnugettext=yes
253 else
254 dnl Reset the values set by searching for libintl.
255 LIBINTL=
256 LTLIBINTL=
257 INCINTL=
258 fi
259
260 ifelse(gt_included_intl, yes, [
261 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
262 dnl GNU gettext is not found in the C library.
263 dnl Fall back on included GNU gettext library.
264 nls_cv_use_gnu_gettext=yes
265 fi
266 fi
267
268 if test "$nls_cv_use_gnu_gettext" = "yes"; then
269 dnl Mark actions used to generate GNU NLS library.
270 BUILD_INCLUDED_LIBINTL=yes
271 USE_INCLUDED_LIBINTL=yes
272 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
273 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
274 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
275 fi
276
277 CATOBJEXT=
278 if test "$gt_use_preinstalled_gnugettext" = "yes" \
279 || test "$nls_cv_use_gnu_gettext" = "yes"; then
280 dnl Mark actions to use GNU gettext tools.
281 CATOBJEXT=.gmo
282 fi
283 ])
284
285 if test -n "$INTL_MACOSX_LIBS"; then
286 if test "$gt_use_preinstalled_gnugettext" = "yes" \
287 || test "$nls_cv_use_gnu_gettext" = "yes"; then
288 dnl Some extra flags are needed during linking.
289 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
290 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
291 fi
292 fi
293
294 if test "$gt_use_preinstalled_gnugettext" = "yes" \
295 || test "$nls_cv_use_gnu_gettext" = "yes"; then
296 AC_DEFINE(ENABLE_NLS, 1,
297 [Define to 1 if translation of program messages to the user's native language
298 is requested.])
299 else
300 USE_NLS=no
301 fi
302 fi
303
304 AC_MSG_CHECKING([whether to use NLS])
305 AC_MSG_RESULT([$USE_NLS])
306 if test "$USE_NLS" = "yes"; then
307 AC_MSG_CHECKING([where the gettext function comes from])
308 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
309 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
310 gt_source="external libintl"
311 else
312 gt_source="libc"
313 fi
314 else
315 gt_source="included intl directory"
316 fi
317 AC_MSG_RESULT([$gt_source])
318 fi
319
320 if test "$USE_NLS" = "yes"; then
321
322 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
323 if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
324 AC_MSG_CHECKING([how to link with libintl])
325 AC_MSG_RESULT([$LIBINTL])
326 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
327 fi
328
329 dnl For backward compatibility. Some packages may be using this.
330 AC_DEFINE(HAVE_GETTEXT, 1,
331 [Define if the GNU gettext() function is already present or preinstalled.])
332 AC_DEFINE(HAVE_DCGETTEXT, 1,
333 [Define if the GNU dcgettext() function is already present or preinstalled.])
334 fi
335
336 dnl We need to process the po/ directory.
337 POSUB=po
338 fi
339
340 ifelse(gt_included_intl, yes, [
341 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
342 dnl to 'yes' because some of the testsuite requires it.
343 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
344 BUILD_INCLUDED_LIBINTL=yes
345 fi
346
347 dnl Make all variables we use known to autoconf.
348 AC_SUBST(BUILD_INCLUDED_LIBINTL)
349 AC_SUBST(USE_INCLUDED_LIBINTL)
350 AC_SUBST(CATOBJEXT)
351
352 dnl For backward compatibility. Some configure.ins may be using this.
353 nls_cv_header_intl=
354 nls_cv_header_libgt=
355
356 dnl For backward compatibility. Some Makefiles may be using this.
357 DATADIRNAME=share
358 AC_SUBST(DATADIRNAME)
359
360 dnl For backward compatibility. Some Makefiles may be using this.
361 INSTOBJEXT=.mo
362 AC_SUBST(INSTOBJEXT)
363
364 dnl For backward compatibility. Some Makefiles may be using this.
365 GENCAT=gencat
366 AC_SUBST(GENCAT)
367
368 dnl For backward compatibility. Some Makefiles may be using this.
369 INTLOBJS=
370 if test "$USE_INCLUDED_LIBINTL" = yes; then
371 INTLOBJS="\$(GETTOBJS)"
372 fi
373 AC_SUBST(INTLOBJS)
374
375 dnl Enable libtool support if the surrounding package wishes it.
376 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
377 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
378 ])
379
380 dnl For backward compatibility. Some Makefiles may be using this.
381 INTLLIBS="$LIBINTL"
382 AC_SUBST(INTLLIBS)
383
384 dnl Make all documented variables known to autoconf.
385 AC_SUBST(LIBINTL)
386 AC_SUBST(LTLIBINTL)
387 AC_SUBST(POSUB)
388 ])
389
390
391 dnl Checks for all prerequisites of the intl subdirectory,
392 dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
393 dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
394 AC_DEFUN([AM_INTL_SUBDIR],
395 [
396 AC_REQUIRE([AC_PROG_INSTALL])dnl
397 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
398 AC_REQUIRE([AC_PROG_CC])dnl
399 AC_REQUIRE([AC_CANONICAL_HOST])dnl
400 AC_REQUIRE([gt_GLIBC2])dnl
401 AC_REQUIRE([AC_PROG_RANLIB])dnl
402 AC_REQUIRE([AC_ISC_POSIX])dnl
403 AC_REQUIRE([AC_HEADER_STDC])dnl
404 AC_REQUIRE([AC_C_CONST])dnl
405 AC_REQUIRE([bh_C_SIGNED])dnl
406 AC_REQUIRE([AC_C_INLINE])dnl
407 AC_REQUIRE([AC_TYPE_OFF_T])dnl
408 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
409 AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl
410 AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
411 AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
412 AC_REQUIRE([gt_TYPE_WINT_T])dnl
413 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
414 AC_REQUIRE([gl_AC_HEADER_STDINT_H])
415 AC_REQUIRE([gt_TYPE_INTMAX_T])
416 AC_REQUIRE([gt_PRINTF_POSIX])
417 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
418 AC_REQUIRE([AC_FUNC_MMAP])dnl
419 AC_REQUIRE([gl_GLIBC21])dnl
420 AC_REQUIRE([gt_INTDIV0])dnl
421 AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
422 AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
423 AC_REQUIRE([gt_INTTYPES_PRI])dnl
424 AC_REQUIRE([gl_XSIZE])dnl
425 AC_REQUIRE([gt_INTL_MACOSX])dnl
426
427 AC_CHECK_TYPE([ptrdiff_t], ,
428 [AC_DEFINE([ptrdiff_t], [long],
429 [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
430 ])
431 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
432 stdlib.h string.h unistd.h sys/param.h])
433 AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
434 mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
435 strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
436 __fsetlocking])
437
438 dnl Use the _snprintf function only if it is declared (because on NetBSD it
439 dnl is defined as a weak alias of snprintf; we prefer to use the latter).
440 gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
441 gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
442
443 dnl Use the *_unlocked functions only if they are declared.
444 dnl (because some of them were defined without being declared in Solaris
445 dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
446 dnl on Solaris 2.5.1 to run on Solaris 2.6).
447 dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
448 gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
449 gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
450 gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
451
452 case $gt_cv_func_printf_posix in
453 *yes) HAVE_POSIX_PRINTF=1 ;;
454 *) HAVE_POSIX_PRINTF=0 ;;
455 esac
456 AC_SUBST([HAVE_POSIX_PRINTF])
457 if test "$ac_cv_func_asprintf" = yes; then
458 HAVE_ASPRINTF=1
459 else
460 HAVE_ASPRINTF=0
461 fi
462 AC_SUBST([HAVE_ASPRINTF])
463 if test "$ac_cv_func_snprintf" = yes; then
464 HAVE_SNPRINTF=1
465 else
466 HAVE_SNPRINTF=0
467 fi
468 AC_SUBST([HAVE_SNPRINTF])
469 if test "$ac_cv_func_wprintf" = yes; then
470 HAVE_WPRINTF=1
471 else
472 HAVE_WPRINTF=0
473 fi
474 AC_SUBST([HAVE_WPRINTF])
475
476 AM_ICONV
477 AM_LANGINFO_CODESET
478 if test $ac_cv_header_locale_h = yes; then
479 gt_LC_MESSAGES
480 fi
481
482 if test -n "$INTL_MACOSX_LIBS"; then
483 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
484 fi
485
486 dnl intl/plural.c is generated from intl/plural.y. It requires bison,
487 dnl because plural.y uses bison specific features. It requires at least
488 dnl bison-1.26 because earlier versions generate a plural.c that doesn't
489 dnl compile.
490 dnl bison is only needed for the maintainer (who touches plural.y). But in
491 dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
492 dnl the rule in general Makefile. Now, some people carelessly touch the
493 dnl files or have a broken "make" program, hence the plural.c rule will
494 dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
495 dnl present or too old.
496 AC_CHECK_PROGS([INTLBISON], [bison])
497 if test -z "$INTLBISON"; then
498 ac_verc_fail=yes
499 else
500 dnl Found it, now check the version.
501 AC_MSG_CHECKING([version of bison])
502 changequote(<<,>>)dnl
503 ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
504 case $ac_prog_version in
505 '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
506 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
507 changequote([,])dnl
508 ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
509 *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
510 esac
511 AC_MSG_RESULT([$ac_prog_version])
512 fi
513 if test $ac_verc_fail = yes; then
514 INTLBISON=:
515 fi
516 ])
517
518
519 dnl Checks for special options needed on MacOS X.
520 dnl Defines INTL_MACOSX_LIBS.
521 AC_DEFUN([gt_INTL_MACOSX],
522 [
523 dnl Check for API introduced in MacOS X 10.2.
524 AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
525 gt_cv_func_CFPreferencesCopyAppValue,
526 [gt_save_CPPFLAGS="$CPPFLAGS"
527 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
528 gt_save_LIBS="$LIBS"
529 LIBS="$LIBS -framework CoreFoundation"
530 AC_TRY_LINK([#include <CFPreferences.h>],
531 [CFPreferencesCopyAppValue(NULL, NULL)],
532 [gt_cv_func_CFPreferencesCopyAppValue=yes],
533 [gt_cv_func_CFPreferencesCopyAppValue=no])
534 CPPFLAGS="$gt_save_CPPFLAGS"
535 LIBS="$gt_save_LIBS"])
536 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
537 AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
538 [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
539 fi
540 dnl Check for API introduced in MacOS X 10.3.
541 AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
542 [gt_save_CPPFLAGS="$CPPFLAGS"
543 CPPFLAGS="$CPPFLAGS -I/System/Library/Frameworks/CoreFoundation.framework/Headers"
544 gt_save_LIBS="$LIBS"
545 LIBS="$LIBS -framework CoreFoundation"
546 AC_TRY_LINK([#include <CFLocale.h>], [CFLocaleCopyCurrent();],
547 [gt_cv_func_CFLocaleCopyCurrent=yes],
548 [gt_cv_func_CFLocaleCopyCurrent=no])
549 CPPFLAGS="$gt_save_CPPFLAGS"
550 LIBS="$gt_save_LIBS"])
551 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
552 AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
553 [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
554 fi
555 INTL_MACOSX_LIBS=
556 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
557 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
558 fi
559 AC_SUBST([INTL_MACOSX_LIBS])
560 ])
561
562
563 dnl gt_CHECK_DECL(FUNC, INCLUDES)
564 dnl Check whether a function is declared.
565 AC_DEFUN([gt_CHECK_DECL],
566 [
567 AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
568 [AC_TRY_COMPILE([$2], [
569 #ifndef $1
570 char *p = (char *) $1;
571 #endif
572 ], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
573 if test $ac_cv_have_decl_$1 = yes; then
574 gt_value=1
575 else
576 gt_value=0
577 fi
578 AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
579 [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
580 ])
581
582
583 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
584 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
585
586 # glibc2.m4 serial 1
587 dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
588 dnl This file is free software; the Free Software Foundation
589 dnl gives unlimited permission to copy and/or distribute it,
590 dnl with or without modifications, as long as this notice is preserved.
591
592 # Test for the GNU C Library, version 2.0 or newer.
593 # From Bruno Haible.
594
595 AC_DEFUN([gt_GLIBC2],
596 [
597 AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
598 ac_cv_gnu_library_2,
599 [AC_EGREP_CPP([Lucky GNU user],
600 [
601 #include <features.h>
602 #ifdef __GNU_LIBRARY__
603 #if (__GLIBC__ >= 2)
604 Lucky GNU user
605 #endif
606 #endif
607 ],
608 ac_cv_gnu_library_2=yes,
609 ac_cv_gnu_library_2=no)
610 ]
611 )
612 AC_SUBST(GLIBC2)
613 GLIBC2="$ac_cv_gnu_library_2"
614 ]
615 )
616
617 # glibc21.m4 serial 3
618 dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
619 dnl This file is free software; the Free Software Foundation
620 dnl gives unlimited permission to copy and/or distribute it,
621 dnl with or without modifications, as long as this notice is preserved.
622
623 # Test for the GNU C Library, version 2.1 or newer.
624 # From Bruno Haible.
625
626 AC_DEFUN([gl_GLIBC21],
627 [
628 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
629 ac_cv_gnu_library_2_1,
630 [AC_EGREP_CPP([Lucky GNU user],
631 [
632 #include <features.h>
633 #ifdef __GNU_LIBRARY__
634 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
635 Lucky GNU user
636 #endif
637 #endif
638 ],
639 ac_cv_gnu_library_2_1=yes,
640 ac_cv_gnu_library_2_1=no)
641 ]
642 )
643 AC_SUBST(GLIBC21)
644 GLIBC21="$ac_cv_gnu_library_2_1"
645 ]
646 )
647
648 # iconv.m4 serial AM4 (gettext-0.11.3)
649 dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
650 dnl This file is free software; the Free Software Foundation
651 dnl gives unlimited permission to copy and/or distribute it,
652 dnl with or without modifications, as long as this notice is preserved.
653
654 dnl From Bruno Haible.
655
656 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
657 [
658 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
659 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
660 AC_REQUIRE([AC_LIB_RPATH])
661
662 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
663 dnl accordingly.
664 AC_LIB_LINKFLAGS_BODY([iconv])
665 ])
666
667 AC_DEFUN([AM_ICONV_LINK],
668 [
669 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
670 dnl those with the standalone portable GNU libiconv installed).
671
672 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
673 dnl accordingly.
674 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
675
676 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
677 dnl because if the user has installed libiconv and not disabled its use
678 dnl via --without-libiconv-prefix, he wants to use it. The first
679 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
680 am_save_CPPFLAGS="$CPPFLAGS"
681 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
682
683 AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
684 am_cv_func_iconv="no, consider installing GNU libiconv"
685 am_cv_lib_iconv=no
686 AC_TRY_LINK([#include <stdlib.h>
687 #include <iconv.h>],
688 [iconv_t cd = iconv_open("","");
689 iconv(cd,NULL,NULL,NULL,NULL);
690 iconv_close(cd);],
691 am_cv_func_iconv=yes)
692 if test "$am_cv_func_iconv" != yes; then
693 am_save_LIBS="$LIBS"
694 LIBS="$LIBS $LIBICONV"
695 AC_TRY_LINK([#include <stdlib.h>
696 #include <iconv.h>],
697 [iconv_t cd = iconv_open("","");
698 iconv(cd,NULL,NULL,NULL,NULL);
699 iconv_close(cd);],
700 am_cv_lib_iconv=yes
701 am_cv_func_iconv=yes)
702 LIBS="$am_save_LIBS"
703 fi
704 ])
705 if test "$am_cv_func_iconv" = yes; then
706 AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
707 fi
708 if test "$am_cv_lib_iconv" = yes; then
709 AC_MSG_CHECKING([how to link with libiconv])
710 AC_MSG_RESULT([$LIBICONV])
711 else
712 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
713 dnl either.
714 CPPFLAGS="$am_save_CPPFLAGS"
715 LIBICONV=
716 LTLIBICONV=
717 fi
718 AC_SUBST(LIBICONV)
719 AC_SUBST(LTLIBICONV)
720 ])
721
722 AC_DEFUN([AM_ICONV],
723 [
724 AM_ICONV_LINK
725 if test "$am_cv_func_iconv" = yes; then
726 AC_MSG_CHECKING([for iconv declaration])
727 AC_CACHE_VAL(am_cv_proto_iconv, [
728 AC_TRY_COMPILE([
729 #include <stdlib.h>
730 #include <iconv.h>
731 extern
732 #ifdef __cplusplus
733 "C"
734 #endif
735 #if defined(__STDC__) || defined(__cplusplus)
736 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
737 #else
738 size_t iconv();
739 #endif
740 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
741 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);"])
742 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
743 AC_MSG_RESULT([$]{ac_t:-
744 }[$]am_cv_proto_iconv)
745 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
746 [Define as const if the declaration of iconv() needs const.])
747 fi
748 ])
749
750 # intdiv0.m4 serial 1 (gettext-0.11.3)
751 dnl Copyright (C) 2002 Free Software Foundation, Inc.
752 dnl This file is free software; the Free Software Foundation
753 dnl gives unlimited permission to copy and/or distribute it,
754 dnl with or without modifications, as long as this notice is preserved.
755
756 dnl From Bruno Haible.
757
758 AC_DEFUN([gt_INTDIV0],
759 [
760 AC_REQUIRE([AC_PROG_CC])dnl
761 AC_REQUIRE([AC_CANONICAL_HOST])dnl
762
763 AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
764 gt_cv_int_divbyzero_sigfpe,
765 [
766 AC_TRY_RUN([
767 #include <stdlib.h>
768 #include <signal.h>
769
770 static void
771 #ifdef __cplusplus
772 sigfpe_handler (int sig)
773 #else
774 sigfpe_handler (sig) int sig;
775 #endif
776 {
777 /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
778 exit (sig != SIGFPE);
779 }
780
781 int x = 1;
782 int y = 0;
783 int z;
784 int nan;
785
786 int main ()
787 {
788 signal (SIGFPE, sigfpe_handler);
789 /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
790 #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
791 signal (SIGTRAP, sigfpe_handler);
792 #endif
793 /* Linux/SPARC yields signal SIGILL. */
794 #if defined (__sparc__) && defined (__linux__)
795 signal (SIGILL, sigfpe_handler);
796 #endif
797
798 z = x / y;
799 nan = y / y;
800 exit (1);
801 }
802 ], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
803 [
804 # Guess based on the CPU.
805 case "$host_cpu" in
806 alpha* | i[34567]86 | m68k | s390*)
807 gt_cv_int_divbyzero_sigfpe="guessing yes";;
808 *)
809 gt_cv_int_divbyzero_sigfpe="guessing no";;
810 esac
811 ])
812 ])
813 case "$gt_cv_int_divbyzero_sigfpe" in
814 *yes) value=1;;
815 *) value=0;;
816 esac
817 AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
818 [Define if integer division by zero raises signal SIGFPE.])
819 ])
820
821 # intmax.m4 serial 2 (gettext-0.14.2)
822 dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
823 dnl This file is free software; the Free Software Foundation
824 dnl gives unlimited permission to copy and/or distribute it,
825 dnl with or without modifications, as long as this notice is preserved.
826
827 dnl From Bruno Haible.
828 dnl Test whether the system has the 'intmax_t' type, but don't attempt to
829 dnl find a replacement if it is lacking.
830
831 AC_DEFUN([gt_TYPE_INTMAX_T],
832 [
833 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
834 AC_REQUIRE([gl_AC_HEADER_STDINT_H])
835 AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
836 [AC_TRY_COMPILE([
837 #include <stddef.h>
838 #include <stdlib.h>
839 #if HAVE_STDINT_H_WITH_UINTMAX
840 #include <stdint.h>
841 #endif
842 #if HAVE_INTTYPES_H_WITH_UINTMAX
843 #include <inttypes.h>
844 #endif
845 ], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
846 if test $gt_cv_c_intmax_t = yes; then
847 AC_DEFINE(HAVE_INTMAX_T, 1,
848 [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
849 fi
850 ])
851
852 # inttypes-pri.m4 serial 1 (gettext-0.11.4)
853 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
854 dnl This file is free software; the Free Software Foundation
855 dnl gives unlimited permission to copy and/or distribute it,
856 dnl with or without modifications, as long as this notice is preserved.
857
858 dnl From Bruno Haible.
859
860 # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
861 # macros to non-string values. This is the case on AIX 4.3.3.
862
863 AC_DEFUN([gt_INTTYPES_PRI],
864 [
865 AC_REQUIRE([gt_HEADER_INTTYPES_H])
866 if test $gt_cv_header_inttypes_h = yes; then
867 AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
868 gt_cv_inttypes_pri_broken,
869 [
870 AC_TRY_COMPILE([#include <inttypes.h>
871 #ifdef PRId32
872 char *p = PRId32;
873 #endif
874 ], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
875 ])
876 fi
877 if test "$gt_cv_inttypes_pri_broken" = yes; then
878 AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
879 [Define if <inttypes.h> exists and defines unusable PRI* macros.])
880 fi
881 ])
882
883 # inttypes.m4 serial 1 (gettext-0.11.4)
884 dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
885 dnl This file is free software; the Free Software Foundation
886 dnl gives unlimited permission to copy and/or distribute it,
887 dnl with or without modifications, as long as this notice is preserved.
888
889 dnl From Paul Eggert.
890
891 # Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
892 # <sys/types.h>.
893
894 AC_DEFUN([gt_HEADER_INTTYPES_H],
895 [
896 AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
897 [
898 AC_TRY_COMPILE(
899 [#include <sys/types.h>
900 #include <inttypes.h>],
901 [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
902 ])
903 if test $gt_cv_header_inttypes_h = yes; then
904 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
905 [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
906 fi
907 ])
908
909 # inttypes_h.m4 serial 6
910 dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
911 dnl This file is free software; the Free Software Foundation
912 dnl gives unlimited permission to copy and/or distribute it,
913 dnl with or without modifications, as long as this notice is preserved.
914
915 dnl From Paul Eggert.
916
917 # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
918 # doesn't clash with <sys/types.h>, and declares uintmax_t.
919
920 AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
921 [
922 AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
923 [AC_TRY_COMPILE(
924 [#include <sys/types.h>
925 #include <inttypes.h>],
926 [uintmax_t i = (uintmax_t) -1;],
927 gl_cv_header_inttypes_h=yes,
928 gl_cv_header_inttypes_h=no)])
929 if test $gl_cv_header_inttypes_h = yes; then
930 AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
931 [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
932 and declares uintmax_t. ])
933 fi
934 ])
935
936 # lcmessage.m4 serial 4 (gettext-0.14.2)
937 dnl Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc.
938 dnl This file is free software; the Free Software Foundation
939 dnl gives unlimited permission to copy and/or distribute it,
940 dnl with or without modifications, as long as this notice is preserved.
941 dnl
942 dnl This file can can be used in projects which are not available under
943 dnl the GNU General Public License or the GNU Library General Public
944 dnl License but which still want to provide support for the GNU gettext
945 dnl functionality.
946 dnl Please note that the actual code of the GNU gettext library is covered
947 dnl by the GNU Library General Public License, and the rest of the GNU
948 dnl gettext package package is covered by the GNU General Public License.
949 dnl They are *not* in the public domain.
950
951 dnl Authors:
952 dnl Ulrich Drepper <[email protected]>, 1995.
953
954 # Check whether LC_MESSAGES is available in <locale.h>.
955
956 AC_DEFUN([gt_LC_MESSAGES],
957 [
958 AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES,
959 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
960 gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)])
961 if test $gt_cv_val_LC_MESSAGES = yes; then
962 AC_DEFINE(HAVE_LC_MESSAGES, 1,
963 [Define if your <locale.h> file defines LC_MESSAGES.])
964 fi
965 ])
966
967 # lib-ld.m4 serial 3 (gettext-0.13)
968 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
969 dnl This file is free software; the Free Software Foundation
970 dnl gives unlimited permission to copy and/or distribute it,
971 dnl with or without modifications, as long as this notice is preserved.
972
973 dnl Subroutines of libtool.m4,
974 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
975 dnl with libtool.m4.
976
977 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
978 AC_DEFUN([AC_LIB_PROG_LD_GNU],
979 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
980 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
981 case `$LD -v 2>&1 </dev/null` in
982 *GNU* | *'with BFD'*)
983 acl_cv_prog_gnu_ld=yes ;;
984 *)
985 acl_cv_prog_gnu_ld=no ;;
986 esac])
987 with_gnu_ld=$acl_cv_prog_gnu_ld
988 ])
989
990 dnl From libtool-1.4. Sets the variable LD.
991 AC_DEFUN([AC_LIB_PROG_LD],
992 [AC_ARG_WITH(gnu-ld,
993 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
994 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
995 AC_REQUIRE([AC_PROG_CC])dnl
996 AC_REQUIRE([AC_CANONICAL_HOST])dnl
997 # Prepare PATH_SEPARATOR.
998 # The user is always right.
999 if test "${PATH_SEPARATOR+set}" != set; then
1000 echo "#! /bin/sh" >conf$$.sh
1001 echo "exit 0" >>conf$$.sh
1002 chmod +x conf$$.sh
1003 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
1004 PATH_SEPARATOR=';'
1005 else
1006 PATH_SEPARATOR=:
1007 fi
1008 rm -f conf$$.sh
1009 fi
1010 ac_prog=ld
1011 if test "$GCC" = yes; then
1012 # Check if gcc -print-prog-name=ld gives a path.
1013 AC_MSG_CHECKING([for ld used by GCC])
1014 case $host in
1015 *-*-mingw*)
1016 # gcc leaves a trailing carriage return which upsets mingw
1017 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1018 *)
1019 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1020 esac
1021 case $ac_prog in
1022 # Accept absolute paths.
1023 [[\\/]* | [A-Za-z]:[\\/]*)]
1024 [re_direlt='/[^/][^/]*/\.\./']
1025 # Canonicalize the path of ld
1026 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1027 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1028 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1029 done
1030 test -z "$LD" && LD="$ac_prog"
1031 ;;
1032 "")
1033 # If it fails, then pretend we aren't using GCC.
1034 ac_prog=ld
1035 ;;
1036 *)
1037 # If it is relative, then search for the first ld in PATH.
1038 with_gnu_ld=unknown
1039 ;;
1040 esac
1041 elif test "$with_gnu_ld" = yes; then
1042 AC_MSG_CHECKING([for GNU ld])
1043 else
1044 AC_MSG_CHECKING([for non-GNU ld])
1045 fi
1046 AC_CACHE_VAL(acl_cv_path_LD,
1047 [if test -z "$LD"; then
1048 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1049 for ac_dir in $PATH; do
1050 test -z "$ac_dir" && ac_dir=.
1051 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1052 acl_cv_path_LD="$ac_dir/$ac_prog"
1053 # Check to see if the program is GNU ld. I'd rather use --version,
1054 # but apparently some GNU ld's only accept -v.
1055 # Break only if it was the GNU/non-GNU ld that we prefer.
1056 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
1057 *GNU* | *'with BFD'*)
1058 test "$with_gnu_ld" != no && break ;;
1059 *)
1060 test "$with_gnu_ld" != yes && break ;;
1061 esac
1062 fi
1063 done
1064 IFS="$ac_save_ifs"
1065 else
1066 acl_cv_path_LD="$LD" # Let the user override the test with a path.
1067 fi])
1068 LD="$acl_cv_path_LD"
1069 if test -n "$LD"; then
1070 AC_MSG_RESULT($LD)
1071 else
1072 AC_MSG_RESULT(no)
1073 fi
1074 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
1075 AC_LIB_PROG_LD_GNU
1076 ])
1077
1078 # lib-link.m4 serial 6 (gettext-0.14.3)
1079 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
1080 dnl This file is free software; the Free Software Foundation
1081 dnl gives unlimited permission to copy and/or distribute it,
1082 dnl with or without modifications, as long as this notice is preserved.
1083
1084 dnl From Bruno Haible.
1085
1086 AC_PREREQ(2.50)
1087
1088 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
1089 dnl the libraries corresponding to explicit and implicit dependencies.
1090 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
1091 dnl augments the CPPFLAGS variable.
1092 AC_DEFUN([AC_LIB_LINKFLAGS],
1093 [
1094 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1095 AC_REQUIRE([AC_LIB_RPATH])
1096 define([Name],[translit([$1],[./-], [___])])
1097 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1098 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1099 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
1100 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1101 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
1102 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
1103 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
1104 ])
1105 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
1106 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
1107 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
1108 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1109 AC_SUBST([LIB]NAME)
1110 AC_SUBST([LTLIB]NAME)
1111 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
1112 dnl results of this search when this library appears as a dependency.
1113 HAVE_LIB[]NAME=yes
1114 undefine([Name])
1115 undefine([NAME])
1116 ])
1117
1118 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
1119 dnl searches for libname and the libraries corresponding to explicit and
1120 dnl implicit dependencies, together with the specified include files and
1121 dnl the ability to compile and link the specified testcode. If found, it
1122 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
1123 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
1124 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
1125 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
1126 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
1127 [
1128 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1129 AC_REQUIRE([AC_LIB_RPATH])
1130 define([Name],[translit([$1],[./-], [___])])
1131 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1132 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1133
1134 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
1135 dnl accordingly.
1136 AC_LIB_LINKFLAGS_BODY([$1], [$2])
1137
1138 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
1139 dnl because if the user has installed lib[]Name and not disabled its use
1140 dnl via --without-lib[]Name-prefix, he wants to use it.
1141 ac_save_CPPFLAGS="$CPPFLAGS"
1142 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
1143
1144 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
1145 ac_save_LIBS="$LIBS"
1146 LIBS="$LIBS $LIB[]NAME"
1147 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
1148 LIBS="$ac_save_LIBS"
1149 ])
1150 if test "$ac_cv_lib[]Name" = yes; then
1151 HAVE_LIB[]NAME=yes
1152 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
1153 AC_MSG_CHECKING([how to link with lib[]$1])
1154 AC_MSG_RESULT([$LIB[]NAME])
1155 else
1156 HAVE_LIB[]NAME=no
1157 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
1158 dnl $INC[]NAME either.
1159 CPPFLAGS="$ac_save_CPPFLAGS"
1160 LIB[]NAME=
1161 LTLIB[]NAME=
1162 fi
1163 AC_SUBST([HAVE_LIB]NAME)
1164 AC_SUBST([LIB]NAME)
1165 AC_SUBST([LTLIB]NAME)
1166 undefine([Name])
1167 undefine([NAME])
1168 ])
1169
1170 dnl Determine the platform dependent parameters needed to use rpath:
1171 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
1172 dnl hardcode_direct, hardcode_minus_L.
1173 AC_DEFUN([AC_LIB_RPATH],
1174 [
1175 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
1176 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
1177 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
1178 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
1179 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
1180 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
1181 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
1182 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
1183 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
1184 . ./conftest.sh
1185 rm -f ./conftest.sh
1186 acl_cv_rpath=done
1187 ])
1188 wl="$acl_cv_wl"
1189 libext="$acl_cv_libext"
1190 shlibext="$acl_cv_shlibext"
1191 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
1192 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
1193 hardcode_direct="$acl_cv_hardcode_direct"
1194 hardcode_minus_L="$acl_cv_hardcode_minus_L"
1195 dnl Determine whether the user wants rpath handling at all.
1196 AC_ARG_ENABLE(rpath,
1197 [ --disable-rpath do not hardcode runtime library paths],
1198 :, enable_rpath=yes)
1199 ])
1200
1201 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
1202 dnl the libraries corresponding to explicit and implicit dependencies.
1203 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
1204 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
1205 [
1206 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
1207 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
1208 dnl By default, look in $includedir and $libdir.
1209 use_additional=yes
1210 AC_LIB_WITH_FINAL_PREFIX([
1211 eval additional_includedir=\"$includedir\"
1212 eval additional_libdir=\"$libdir\"
1213 ])
1214 AC_LIB_ARG_WITH([lib$1-prefix],
1215 [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
1216 --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
1217 [
1218 if test "X$withval" = "Xno"; then
1219 use_additional=no
1220 else
1221 if test "X$withval" = "X"; then
1222 AC_LIB_WITH_FINAL_PREFIX([
1223 eval additional_includedir=\"$includedir\"
1224 eval additional_libdir=\"$libdir\"
1225 ])
1226 else
1227 additional_includedir="$withval/include"
1228 additional_libdir="$withval/lib"
1229 fi
1230 fi
1231 ])
1232 dnl Search the library and its dependencies in $additional_libdir and
1233 dnl $LDFLAGS. Using breadth-first-seach.
1234 LIB[]NAME=
1235 LTLIB[]NAME=
1236 INC[]NAME=
1237 rpathdirs=
1238 ltrpathdirs=
1239 names_already_handled=
1240 names_next_round='$1 $2'
1241 while test -n "$names_next_round"; do
1242 names_this_round="$names_next_round"
1243 names_next_round=
1244 for name in $names_this_round; do
1245 already_handled=
1246 for n in $names_already_handled; do
1247 if test "$n" = "$name"; then
1248 already_handled=yes
1249 break
1250 fi
1251 done
1252 if test -z "$already_handled"; then
1253 names_already_handled="$names_already_handled $name"
1254 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
1255 dnl or AC_LIB_HAVE_LINKFLAGS call.
1256 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
1257 eval value=\"\$HAVE_LIB$uppername\"
1258 if test -n "$value"; then
1259 if test "$value" = yes; then
1260 eval value=\"\$LIB$uppername\"
1261 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
1262 eval value=\"\$LTLIB$uppername\"
1263 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
1264 else
1265 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
1266 dnl that this library doesn't exist. So just drop it.
1267 :
1268 fi
1269 else
1270 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
1271 dnl and the already constructed $LIBNAME/$LTLIBNAME.
1272 found_dir=
1273 found_la=
1274 found_so=
1275 found_a=
1276 if test $use_additional = yes; then
1277 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
1278 found_dir="$additional_libdir"
1279 found_so="$additional_libdir/lib$name.$shlibext"
1280 if test -f "$additional_libdir/lib$name.la"; then
1281 found_la="$additional_libdir/lib$name.la"
1282 fi
1283 else
1284 if test -f "$additional_libdir/lib$name.$libext"; then
1285 found_dir="$additional_libdir"
1286 found_a="$additional_libdir/lib$name.$libext"
1287 if test -f "$additional_libdir/lib$name.la"; then
1288 found_la="$additional_libdir/lib$name.la"
1289 fi
1290 fi
1291 fi
1292 fi
1293 if test "X$found_dir" = "X"; then
1294 for x in $LDFLAGS $LTLIB[]NAME; do
1295 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1296 case "$x" in
1297 -L*)
1298 dir=`echo "X$x" | sed -e 's/^X-L//'`
1299 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
1300 found_dir="$dir"
1301 found_so="$dir/lib$name.$shlibext"
1302 if test -f "$dir/lib$name.la"; then
1303 found_la="$dir/lib$name.la"
1304 fi
1305 else
1306 if test -f "$dir/lib$name.$libext"; then
1307 found_dir="$dir"
1308 found_a="$dir/lib$name.$libext"
1309 if test -f "$dir/lib$name.la"; then
1310 found_la="$dir/lib$name.la"
1311 fi
1312 fi
1313 fi
1314 ;;
1315 esac
1316 if test "X$found_dir" != "X"; then
1317 break
1318 fi
1319 done
1320 fi
1321 if test "X$found_dir" != "X"; then
1322 dnl Found the library.
1323 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1324 if test "X$found_so" != "X"; then
1325 dnl Linking with a shared library. We attempt to hardcode its
1326 dnl directory into the executable's runpath, unless it's the
1327 dnl standard /usr/lib.
1328 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
1329 dnl No hardcoding is needed.
1330 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1331 else
1332 dnl Use an explicit option to hardcode DIR into the resulting
1333 dnl binary.
1334 dnl Potentially add DIR to ltrpathdirs.
1335 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1336 haveit=
1337 for x in $ltrpathdirs; do
1338 if test "X$x" = "X$found_dir"; then
1339 haveit=yes
1340 break
1341 fi
1342 done
1343 if test -z "$haveit"; then
1344 ltrpathdirs="$ltrpathdirs $found_dir"
1345 fi
1346 dnl The hardcoding into $LIBNAME is system dependent.
1347 if test "$hardcode_direct" = yes; then
1348 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1349 dnl resulting binary.
1350 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1351 else
1352 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
1353 dnl Use an explicit option to hardcode DIR into the resulting
1354 dnl binary.
1355 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1356 dnl Potentially add DIR to rpathdirs.
1357 dnl The rpathdirs will be appended to $LIBNAME at the end.
1358 haveit=
1359 for x in $rpathdirs; do
1360 if test "X$x" = "X$found_dir"; then
1361 haveit=yes
1362 break
1363 fi
1364 done
1365 if test -z "$haveit"; then
1366 rpathdirs="$rpathdirs $found_dir"
1367 fi
1368 else
1369 dnl Rely on "-L$found_dir".
1370 dnl But don't add it if it's already contained in the LDFLAGS
1371 dnl or the already constructed $LIBNAME
1372 haveit=
1373 for x in $LDFLAGS $LIB[]NAME; do
1374 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1375 if test "X$x" = "X-L$found_dir"; then
1376 haveit=yes
1377 break
1378 fi
1379 done
1380 if test -z "$haveit"; then
1381 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1382 fi
1383 if test "$hardcode_minus_L" != no; then
1384 dnl FIXME: Not sure whether we should use
1385 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1386 dnl here.
1387 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1388 else
1389 dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
1390 dnl here, because this doesn't fit in flags passed to the
1391 dnl compiler. So give up. No hardcoding. This affects only
1392 dnl very old systems.
1393 dnl FIXME: Not sure whether we should use
1394 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1395 dnl here.
1396 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1397 fi
1398 fi
1399 fi
1400 fi
1401 else
1402 if test "X$found_a" != "X"; then
1403 dnl Linking with a static library.
1404 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1405 else
1406 dnl We shouldn't come here, but anyway it's good to have a
1407 dnl fallback.
1408 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1409 fi
1410 fi
1411 dnl Assume the include files are nearby.
1412 additional_includedir=
1413 case "$found_dir" in
1414 */lib | */lib/)
1415 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
1416 additional_includedir="$basedir/include"
1417 ;;
1418 esac
1419 if test "X$additional_includedir" != "X"; then
1420 dnl Potentially add $additional_includedir to $INCNAME.
1421 dnl But don't add it
1422 dnl 1. if it's the standard /usr/include,
1423 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
1424 dnl 3. if it's already present in $CPPFLAGS or the already
1425 dnl constructed $INCNAME,
1426 dnl 4. if it doesn't exist as a directory.
1427 if test "X$additional_includedir" != "X/usr/include"; then
1428 haveit=
1429 if test "X$additional_includedir" = "X/usr/local/include"; then
1430 if test -n "$GCC"; then
1431 case $host_os in
1432 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1433 esac
1434 fi
1435 fi
1436 if test -z "$haveit"; then
1437 for x in $CPPFLAGS $INC[]NAME; do
1438 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1439 if test "X$x" = "X-I$additional_includedir"; then
1440 haveit=yes
1441 break
1442 fi
1443 done
1444 if test -z "$haveit"; then
1445 if test -d "$additional_includedir"; then
1446 dnl Really add $additional_includedir to $INCNAME.
1447 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1448 fi
1449 fi
1450 fi
1451 fi
1452 fi
1453 dnl Look for dependencies.
1454 if test -n "$found_la"; then
1455 dnl Read the .la file. It defines the variables
1456 dnl dlname, library_names, old_library, dependency_libs, current,
1457 dnl age, revision, installed, dlopen, dlpreopen, libdir.
1458 save_libdir="$libdir"
1459 case "$found_la" in
1460 */* | *\\*) . "$found_la" ;;
1461 *) . "./$found_la" ;;
1462 esac
1463 libdir="$save_libdir"
1464 dnl We use only dependency_libs.
1465 for dep in $dependency_libs; do
1466 case "$dep" in
1467 -L*)
1468 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1469 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1470 dnl But don't add it
1471 dnl 1. if it's the standard /usr/lib,
1472 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
1473 dnl 3. if it's already present in $LDFLAGS or the already
1474 dnl constructed $LIBNAME,
1475 dnl 4. if it doesn't exist as a directory.
1476 if test "X$additional_libdir" != "X/usr/lib"; then
1477 haveit=
1478 if test "X$additional_libdir" = "X/usr/local/lib"; then
1479 if test -n "$GCC"; then
1480 case $host_os in
1481 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1482 esac
1483 fi
1484 fi
1485 if test -z "$haveit"; then
1486 haveit=
1487 for x in $LDFLAGS $LIB[]NAME; do
1488 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1489 if test "X$x" = "X-L$additional_libdir"; then
1490 haveit=yes
1491 break
1492 fi
1493 done
1494 if test -z "$haveit"; then
1495 if test -d "$additional_libdir"; then
1496 dnl Really add $additional_libdir to $LIBNAME.
1497 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1498 fi
1499 fi
1500 haveit=
1501 for x in $LDFLAGS $LTLIB[]NAME; do
1502 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1503 if test "X$x" = "X-L$additional_libdir"; then
1504 haveit=yes
1505 break
1506 fi
1507 done
1508 if test -z "$haveit"; then
1509 if test -d "$additional_libdir"; then
1510 dnl Really add $additional_libdir to $LTLIBNAME.
1511 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1512 fi
1513 fi
1514 fi
1515 fi
1516 ;;
1517 -R*)
1518 dir=`echo "X$dep" | sed -e 's/^X-R//'`
1519 if test "$enable_rpath" != no; then
1520 dnl Potentially add DIR to rpathdirs.
1521 dnl The rpathdirs will be appended to $LIBNAME at the end.
1522 haveit=
1523 for x in $rpathdirs; do
1524 if test "X$x" = "X$dir"; then
1525 haveit=yes
1526 break
1527 fi
1528 done
1529 if test -z "$haveit"; then
1530 rpathdirs="$rpathdirs $dir"
1531 fi
1532 dnl Potentially add DIR to ltrpathdirs.
1533 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1534 haveit=
1535 for x in $ltrpathdirs; do
1536 if test "X$x" = "X$dir"; then
1537 haveit=yes
1538 break
1539 fi
1540 done
1541 if test -z "$haveit"; then
1542 ltrpathdirs="$ltrpathdirs $dir"
1543 fi
1544 fi
1545 ;;
1546 -l*)
1547 dnl Handle this in the next round.
1548 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1549 ;;
1550 *.la)
1551 dnl Handle this in the next round. Throw away the .la's
1552 dnl directory; it is already contained in a preceding -L
1553 dnl option.
1554 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1555 ;;
1556 *)
1557 dnl Most likely an immediate library name.
1558 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1559 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1560 ;;
1561 esac
1562 done
1563 fi
1564 else
1565 dnl Didn't find the library; assume it is in the system directories
1566 dnl known to the linker and runtime loader. (All the system
1567 dnl directories known to the linker should also be known to the
1568 dnl runtime loader, otherwise the system is severely misconfigured.)
1569 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1570 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1571 fi
1572 fi
1573 fi
1574 done
1575 done
1576 if test "X$rpathdirs" != "X"; then
1577 if test -n "$hardcode_libdir_separator"; then
1578 dnl Weird platform: only the last -rpath option counts, the user must
1579 dnl pass all path elements in one option. We can arrange that for a
1580 dnl single library, but not when more than one $LIBNAMEs are used.
1581 alldirs=
1582 for found_dir in $rpathdirs; do
1583 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
1584 done
1585 dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
1586 acl_save_libdir="$libdir"
1587 libdir="$alldirs"
1588 eval flag=\"$hardcode_libdir_flag_spec\"
1589 libdir="$acl_save_libdir"
1590 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1591 else
1592 dnl The -rpath options are cumulative.
1593 for found_dir in $rpathdirs; do
1594 acl_save_libdir="$libdir"
1595 libdir="$found_dir"
1596 eval flag=\"$hardcode_libdir_flag_spec\"
1597 libdir="$acl_save_libdir"
1598 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1599 done
1600 fi
1601 fi
1602 if test "X$ltrpathdirs" != "X"; then
1603 dnl When using libtool, the option that works for both libraries and
1604 dnl executables is -R. The -R options are cumulative.
1605 for found_dir in $ltrpathdirs; do
1606 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1607 done
1608 fi
1609 ])
1610
1611 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1612 dnl unless already present in VAR.
1613 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1614 dnl contains two or three consecutive elements that belong together.
1615 AC_DEFUN([AC_LIB_APPENDTOVAR],
1616 [
1617 for element in [$2]; do
1618 haveit=
1619 for x in $[$1]; do
1620 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1621 if test "X$x" = "X$element"; then
1622 haveit=yes
1623 break
1624 fi
1625 done
1626 if test -z "$haveit"; then
1627 [$1]="${[$1]}${[$1]:+ }$element"
1628 fi
1629 done
1630 ])
1631
1632 # lib-prefix.m4 serial 4 (gettext-0.14.2)
1633 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
1634 dnl This file is free software; the Free Software Foundation
1635 dnl gives unlimited permission to copy and/or distribute it,
1636 dnl with or without modifications, as long as this notice is preserved.
1637
1638 dnl From Bruno Haible.
1639
1640 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1641 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1642 dnl require excessive bracketing.
1643 ifdef([AC_HELP_STRING],
1644 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1645 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1646
1647 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1648 dnl to access previously installed libraries. The basic assumption is that
1649 dnl a user will want packages to use other packages he previously installed
1650 dnl with the same --prefix option.
1651 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1652 dnl libraries, but is otherwise very convenient.
1653 AC_DEFUN([AC_LIB_PREFIX],
1654 [
1655 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1656 AC_REQUIRE([AC_PROG_CC])
1657 AC_REQUIRE([AC_CANONICAL_HOST])
1658 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1659 dnl By default, look in $includedir and $libdir.
1660 use_additional=yes
1661 AC_LIB_WITH_FINAL_PREFIX([
1662 eval additional_includedir=\"$includedir\"
1663 eval additional_libdir=\"$libdir\"
1664 ])
1665 AC_LIB_ARG_WITH([lib-prefix],
1666 [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1667 --without-lib-prefix don't search for libraries in includedir and libdir],
1668 [
1669 if test "X$withval" = "Xno"; then
1670 use_additional=no
1671 else
1672 if test "X$withval" = "X"; then
1673 AC_LIB_WITH_FINAL_PREFIX([
1674 eval additional_includedir=\"$includedir\"
1675 eval additional_libdir=\"$libdir\"
1676 ])
1677 else
1678 additional_includedir="$withval/include"
1679 additional_libdir="$withval/lib"
1680 fi
1681 fi
1682 ])
1683 if test $use_additional = yes; then
1684 dnl Potentially add $additional_includedir to $CPPFLAGS.
1685 dnl But don't add it
1686 dnl 1. if it's the standard /usr/include,
1687 dnl 2. if it's already present in $CPPFLAGS,
1688 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
1689 dnl 4. if it doesn't exist as a directory.
1690 if test "X$additional_includedir" != "X/usr/include"; then
1691 haveit=
1692 for x in $CPPFLAGS; do
1693 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1694 if test "X$x" = "X-I$additional_includedir"; then
1695 haveit=yes
1696 break
1697 fi
1698 done
1699 if test -z "$haveit"; then
1700 if test "X$additional_includedir" = "X/usr/local/include"; then
1701 if test -n "$GCC"; then
1702 case $host_os in
1703 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1704 esac
1705 fi
1706 fi
1707 if test -z "$haveit"; then
1708 if test -d "$additional_includedir"; then
1709 dnl Really add $additional_includedir to $CPPFLAGS.
1710 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1711 fi
1712 fi
1713 fi
1714 fi
1715 dnl Potentially add $additional_libdir to $LDFLAGS.
1716 dnl But don't add it
1717 dnl 1. if it's the standard /usr/lib,
1718 dnl 2. if it's already present in $LDFLAGS,
1719 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
1720 dnl 4. if it doesn't exist as a directory.
1721 if test "X$additional_libdir" != "X/usr/lib"; then
1722 haveit=
1723 for x in $LDFLAGS; do
1724 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1725 if test "X$x" = "X-L$additional_libdir"; then
1726 haveit=yes
1727 break
1728 fi
1729 done
1730 if test -z "$haveit"; then
1731 if test "X$additional_libdir" = "X/usr/local/lib"; then
1732 if test -n "$GCC"; then
1733 case $host_os in
1734 linux*) haveit=yes;;
1735 esac
1736 fi
1737 fi
1738 if test -z "$haveit"; then
1739 if test -d "$additional_libdir"; then
1740 dnl Really add $additional_libdir to $LDFLAGS.
1741 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1742 fi
1743 fi
1744 fi
1745 fi
1746 fi
1747 ])
1748
1749 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1750 dnl acl_final_exec_prefix, containing the values to which $prefix and
1751 dnl $exec_prefix will expand at the end of the configure script.
1752 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1753 [
1754 dnl Unfortunately, prefix and exec_prefix get only finally determined
1755 dnl at the end of configure.
1756 if test "X$prefix" = "XNONE"; then
1757 acl_final_prefix="$ac_default_prefix"
1758 else
1759 acl_final_prefix="$prefix"
1760 fi
1761 if test "X$exec_prefix" = "XNONE"; then
1762 acl_final_exec_prefix='${prefix}'
1763 else
1764 acl_final_exec_prefix="$exec_prefix"
1765 fi
1766 acl_save_prefix="$prefix"
1767 prefix="$acl_final_prefix"
1768 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1769 prefix="$acl_save_prefix"
1770 ])
1771
1772 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1773 dnl variables prefix and exec_prefix bound to the values they will have
1774 dnl at the end of the configure script.
1775 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1776 [
1777 acl_save_prefix="$prefix"
1778 prefix="$acl_final_prefix"
1779 acl_save_exec_prefix="$exec_prefix"
1780 exec_prefix="$acl_final_exec_prefix"
1781 $1
1782 exec_prefix="$acl_save_exec_prefix"
1783 prefix="$acl_save_prefix"
1784 ])
1785
1786 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1787
1788 # serial 47 Debian 1.5.20-2 AC_PROG_LIBTOOL
1789
1790
1791 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1792 # -----------------------------------------------------------
1793 # If this macro is not defined by Autoconf, define it here.
1794 m4_ifdef([AC_PROVIDE_IFELSE],
1795 [],
1796 [m4_define([AC_PROVIDE_IFELSE],
1797 [m4_ifdef([AC_PROVIDE_$1],
1798 [$2], [$3])])])
1799
1800
1801 # AC_PROG_LIBTOOL
1802 # ---------------
1803 AC_DEFUN([AC_PROG_LIBTOOL],
1804 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1805 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1806 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1807 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1808 [AC_LIBTOOL_CXX],
1809 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1810 ])])
1811 dnl And a similar setup for Fortran 77 support
1812 AC_PROVIDE_IFELSE([AC_PROG_F77],
1813 [AC_LIBTOOL_F77],
1814 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1815 ])])
1816
1817 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1818 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1819 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1820 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1821 [AC_LIBTOOL_GCJ],
1822 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1823 [AC_LIBTOOL_GCJ],
1824 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1825 [AC_LIBTOOL_GCJ],
1826 [ifdef([AC_PROG_GCJ],
1827 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1828 ifdef([A][M_PROG_GCJ],
1829 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1830 ifdef([LT_AC_PROG_GCJ],
1831 [define([LT_AC_PROG_GCJ],
1832 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1833 ])])# AC_PROG_LIBTOOL
1834
1835
1836 # _AC_PROG_LIBTOOL
1837 # ----------------
1838 AC_DEFUN([_AC_PROG_LIBTOOL],
1839 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1840 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1841 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1842 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1843
1844 # This can be used to rebuild libtool when needed
1845 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1846
1847 # Always use our own libtool.
1848 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1849 AC_SUBST(LIBTOOL)dnl
1850
1851 # Prevent multiple expansion
1852 define([AC_PROG_LIBTOOL], [])
1853 ])# _AC_PROG_LIBTOOL
1854
1855
1856 # AC_LIBTOOL_SETUP
1857 # ----------------
1858 AC_DEFUN([AC_LIBTOOL_SETUP],
1859 [AC_PREREQ(2.50)dnl
1860 AC_REQUIRE([AC_ENABLE_SHARED])dnl
1861 AC_REQUIRE([AC_ENABLE_STATIC])dnl
1862 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1863 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1864 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1865 AC_REQUIRE([AC_PROG_CC])dnl
1866 AC_REQUIRE([AC_PROG_LD])dnl
1867 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1868 AC_REQUIRE([AC_PROG_NM])dnl
1869
1870 AC_REQUIRE([AC_PROG_LN_S])dnl
1871 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1872 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1873 AC_REQUIRE([AC_OBJEXT])dnl
1874 AC_REQUIRE([AC_EXEEXT])dnl
1875 dnl
1876
1877 AC_LIBTOOL_SYS_MAX_CMD_LEN
1878 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1879 AC_LIBTOOL_OBJDIR
1880
1881 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1882 _LT_AC_PROG_ECHO_BACKSLASH
1883
1884 case $host_os in
1885 aix3*)
1886 # AIX sometimes has problems with the GCC collect2 program. For some
1887 # reason, if we set the COLLECT_NAMES environment variable, the problems
1888 # vanish in a puff of smoke.
1889 if test "X${COLLECT_NAMES+set}" != Xset; then
1890 COLLECT_NAMES=
1891 export COLLECT_NAMES
1892 fi
1893 ;;
1894 esac
1895
1896 # Sed substitution that helps us do robust quoting. It backslashifies
1897 # metacharacters that are still active within double-quoted strings.
1898 Xsed='sed -e 1s/^X//'
1899 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1900
1901 # Same as above, but do not quote variable references.
1902 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1903
1904 # Sed substitution to delay expansion of an escaped shell variable in a
1905 # double_quote_subst'ed string.
1906 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1907
1908 # Sed substitution to avoid accidental globbing in evaled expressions
1909 no_glob_subst='s/\*/\\\*/g'
1910
1911 # Constants:
1912 rm="rm -f"
1913
1914 # Global variables:
1915 default_ofile=libtool
1916 can_build_shared=yes
1917
1918 # All known linkers require a `.a' archive for static linking (except MSVC,
1919 # which needs '.lib').
1920 libext=a
1921 ltmain="$ac_aux_dir/ltmain.sh"
1922 ofile="$default_ofile"
1923 with_gnu_ld="$lt_cv_prog_gnu_ld"
1924
1925 AC_CHECK_TOOL(AR, ar, false)
1926 AC_CHECK_TOOL(RANLIB, ranlib, :)
1927 AC_CHECK_TOOL(STRIP, strip, :)
1928
1929 old_CC="$CC"
1930 old_CFLAGS="$CFLAGS"
1931
1932 # Set sane defaults for various variables
1933 test -z "$AR" && AR=ar
1934 test -z "$AR_FLAGS" && AR_FLAGS=cru
1935 test -z "$AS" && AS=as
1936 test -z "$CC" && CC=cc
1937 test -z "$LTCC" && LTCC=$CC
1938 test -z "$DLLTOOL" && DLLTOOL=dlltool
1939 test -z "$LD" && LD=ld
1940 test -z "$LN_S" && LN_S="ln -s"
1941 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1942 test -z "$NM" && NM=nm
1943 test -z "$SED" && SED=sed
1944 test -z "$OBJDUMP" && OBJDUMP=objdump
1945 test -z "$RANLIB" && RANLIB=:
1946 test -z "$STRIP" && STRIP=:
1947 test -z "$ac_objext" && ac_objext=o
1948
1949 # Determine commands to create old-style static archives.
1950 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1951 old_postinstall_cmds='chmod 644 $oldlib'
1952 old_postuninstall_cmds=
1953
1954 if test -n "$RANLIB"; then
1955 case $host_os in
1956 openbsd*)
1957 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1958 ;;
1959 *)
1960 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1961 ;;
1962 esac
1963 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1964 fi
1965
1966 _LT_CC_BASENAME([$compiler])
1967
1968 # Only perform the check for file, if the check method requires it
1969 case $deplibs_check_method in
1970 file_magic*)
1971 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1972 AC_PATH_MAGIC
1973 fi
1974 ;;
1975 esac
1976
1977 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1978 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1979 enable_win32_dll=yes, enable_win32_dll=no)
1980
1981 AC_ARG_ENABLE([libtool-lock],
1982 [AC_HELP_STRING([--disable-libtool-lock],
1983 [avoid locking (might break parallel builds)])])
1984 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1985
1986 AC_ARG_WITH([pic],
1987 [AC_HELP_STRING([--with-pic],
1988 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1989 [pic_mode="$withval"],
1990 [pic_mode=default])
1991 test -z "$pic_mode" && pic_mode=default
1992
1993 # Use C for the default configuration in the libtool script
1994 tagname=
1995 AC_LIBTOOL_LANG_C_CONFIG
1996 _LT_AC_TAGCONFIG
1997 ])# AC_LIBTOOL_SETUP
1998
1999
2000 # _LT_AC_SYS_COMPILER
2001 # -------------------
2002 AC_DEFUN([_LT_AC_SYS_COMPILER],
2003 [AC_REQUIRE([AC_PROG_CC])dnl
2004
2005 # If no C compiler was specified, use CC.
2006 LTCC=${LTCC-"$CC"}
2007
2008 # Allow CC to be a program name with arguments.
2009 compiler=$CC
2010 ])# _LT_AC_SYS_COMPILER
2011
2012
2013 # _LT_CC_BASENAME(CC)
2014 # -------------------
2015 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
2016 AC_DEFUN([_LT_CC_BASENAME],
2017 [for cc_temp in $1""; do
2018 case $cc_temp in
2019 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2020 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2021 \-*) ;;
2022 *) break;;
2023 esac
2024 done
2025 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
2026 ])
2027
2028
2029 # _LT_COMPILER_BOILERPLATE
2030 # ------------------------
2031 # Check for compiler boilerplate output or warnings with
2032 # the simple compiler test code.
2033 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
2034 [ac_outfile=conftest.$ac_objext
2035 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
2036 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
2037 _lt_compiler_boilerplate=`cat conftest.err`
2038 $rm conftest*
2039 ])# _LT_COMPILER_BOILERPLATE
2040
2041
2042 # _LT_LINKER_BOILERPLATE
2043 # ----------------------
2044 # Check for linker boilerplate output or warnings with
2045 # the simple link test code.
2046 AC_DEFUN([_LT_LINKER_BOILERPLATE],
2047 [ac_outfile=conftest.$ac_objext
2048 printf "$lt_simple_link_test_code" >conftest.$ac_ext
2049 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
2050 _lt_linker_boilerplate=`cat conftest.err`
2051 $rm conftest*
2052 ])# _LT_LINKER_BOILERPLATE
2053
2054
2055 # _LT_AC_SYS_LIBPATH_AIX
2056 # ----------------------
2057 # Links a minimal program and checks the executable
2058 # for the system default hardcoded library path. In most cases,
2059 # this is /usr/lib:/lib, but when the MPI compilers are used
2060 # the location of the communication and MPI libs are included too.
2061 # If we don't find anything, use the default library path according
2062 # to the aix ld manual.
2063 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
2064 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2065 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
2066 }'`
2067 # Check for a 64-bit object if we didn't find anything.
2068 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
2069 }'`; fi],[])
2070 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2071 ])# _LT_AC_SYS_LIBPATH_AIX
2072
2073
2074 # _LT_AC_SHELL_INIT(ARG)
2075 # ----------------------
2076 AC_DEFUN([_LT_AC_SHELL_INIT],
2077 [ifdef([AC_DIVERSION_NOTICE],
2078 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
2079 [AC_DIVERT_PUSH(NOTICE)])
2080 $1
2081 AC_DIVERT_POP
2082 ])# _LT_AC_SHELL_INIT
2083
2084
2085 # _LT_AC_PROG_ECHO_BACKSLASH
2086 # --------------------------
2087 # Add some code to the start of the generated configure script which
2088 # will find an echo command which doesn't interpret backslashes.
2089 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
2090 [_LT_AC_SHELL_INIT([
2091 # Check that we are running under the correct shell.
2092 SHELL=${CONFIG_SHELL-/bin/sh}
2093
2094 case X$ECHO in
2095 X*--fallback-echo)
2096 # Remove one level of quotation (which was required for Make).
2097 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2098 ;;
2099 esac
2100
2101 echo=${ECHO-echo}
2102 if test "X[$]1" = X--no-reexec; then
2103 # Discard the --no-reexec flag, and continue.
2104 shift
2105 elif test "X[$]1" = X--fallback-echo; then
2106 # Avoid inline document here, it may be left over
2107 :
2108 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
2109 # Yippee, $echo works!
2110 :
2111 else
2112 # Restart under the correct shell.
2113 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2114 fi
2115
2116 if test "X[$]1" = X--fallback-echo; then
2117 # used as fallback echo
2118 shift
2119 cat <<EOF
2120 [$]*
2121 EOF
2122 exit 0
2123 fi
2124
2125 # The HP-UX ksh and POSIX shell print the target directory to stdout
2126 # if CDPATH is set.
2127 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2128
2129 if test -z "$ECHO"; then
2130 if test "X${echo_test_string+set}" != Xset; then
2131 # find a string as large as possible, as long as the shell can cope with it
2132 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
2133 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
2134 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
2135 echo_test_string=`eval $cmd` &&
2136 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
2137 then
2138 break
2139 fi
2140 done
2141 fi
2142
2143 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
2144 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
2145 test "X$echo_testing_string" = "X$echo_test_string"; then
2146 :
2147 else
2148 # The Solaris, AIX, and Digital Unix default echo programs unquote
2149 # backslashes. This makes it impossible to quote backslashes using
2150 # echo "$something" | sed 's/\\/\\\\/g'
2151 #
2152 # So, first we look for a working echo in the user's PATH.
2153
2154 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2155 for dir in $PATH /usr/ucb; do
2156 IFS="$lt_save_ifs"
2157 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
2158 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
2159 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
2160 test "X$echo_testing_string" = "X$echo_test_string"; then
2161 echo="$dir/echo"
2162 break
2163 fi
2164 done
2165 IFS="$lt_save_ifs"
2166
2167 if test "X$echo" = Xecho; then
2168 # We didn't find a better echo, so look for alternatives.
2169 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
2170 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
2171 test "X$echo_testing_string" = "X$echo_test_string"; then
2172 # This shell has a builtin print -r that does the trick.
2173 echo='print -r'
2174 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
2175 test "X$CONFIG_SHELL" != X/bin/ksh; then
2176 # If we have ksh, try running configure again with it.
2177 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2178 export ORIGINAL_CONFIG_SHELL
2179 CONFIG_SHELL=/bin/ksh
2180 export CONFIG_SHELL
2181 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2182 else
2183 # Try using printf.
2184 echo='printf %s\n'
2185 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
2186 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
2187 test "X$echo_testing_string" = "X$echo_test_string"; then
2188 # Cool, printf works
2189 :
2190 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2191 test "X$echo_testing_string" = 'X\t' &&
2192 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2193 test "X$echo_testing_string" = "X$echo_test_string"; then
2194 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2195 export CONFIG_SHELL
2196 SHELL="$CONFIG_SHELL"
2197 export SHELL
2198 echo="$CONFIG_SHELL [$]0 --fallback-echo"
2199 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2200 test "X$echo_testing_string" = 'X\t' &&
2201 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2202 test "X$echo_testing_string" = "X$echo_test_string"; then
2203 echo="$CONFIG_SHELL [$]0 --fallback-echo"
2204 else
2205 # maybe with a smaller string...
2206 prev=:
2207
2208 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2209 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
2210 then
2211 break
2212 fi
2213 prev="$cmd"
2214 done
2215
2216 if test "$prev" != 'sed 50q "[$]0"'; then
2217 echo_test_string=`eval $prev`
2218 export echo_test_string
2219 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2220 else
2221 # Oops. We lost completely, so just stick with echo.
2222 echo=echo
2223 fi
2224 fi
2225 fi
2226 fi
2227 fi
2228 fi
2229
2230 # Copy echo and quote the copy suitably for passing to libtool from
2231 # the Makefile, instead of quoting the original, which is used later.
2232 ECHO=$echo
2233 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2234 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2235 fi
2236
2237 AC_SUBST(ECHO)
2238 ])])# _LT_AC_PROG_ECHO_BACKSLASH
2239
2240
2241 # _LT_AC_LOCK
2242 # -----------
2243 AC_DEFUN([_LT_AC_LOCK],
2244 [AC_ARG_ENABLE([libtool-lock],
2245 [AC_HELP_STRING([--disable-libtool-lock],
2246 [avoid locking (might break parallel builds)])])
2247 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2248
2249 # Some flags need to be propagated to the compiler or linker for good
2250 # libtool support.
2251 case $host in
2252 ia64-*-hpux*)
2253 # Find out which ABI we are using.
2254 echo 'int i;' > conftest.$ac_ext
2255 if AC_TRY_EVAL(ac_compile); then
2256 case `/usr/bin/file conftest.$ac_objext` in
2257 *ELF-32*)
2258 HPUX_IA64_MODE="32"
2259 ;;
2260 *ELF-64*)
2261 HPUX_IA64_MODE="64"
2262 ;;
2263 esac
2264 fi
2265 rm -rf conftest*
2266 ;;
2267 *-*-irix6*)
2268 # Find out which ABI we are using.
2269 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2270 if AC_TRY_EVAL(ac_compile); then
2271 if test "$lt_cv_prog_gnu_ld" = yes; then
2272 case `/usr/bin/file conftest.$ac_objext` in
2273 *32-bit*)
2274 LD="${LD-ld} -melf32bsmip"
2275 ;;
2276 *N32*)
2277 LD="${LD-ld} -melf32bmipn32"
2278 ;;
2279 *64-bit*)
2280 LD="${LD-ld} -melf64bmip"
2281 ;;
2282 esac
2283 else
2284 case `/usr/bin/file conftest.$ac_objext` in
2285 *32-bit*)
2286 LD="${LD-ld} -32"
2287 ;;
2288 *N32*)
2289 LD="${LD-ld} -n32"
2290 ;;
2291 *64-bit*)
2292 LD="${LD-ld} -64"
2293 ;;
2294 esac
2295 fi
2296 fi
2297 rm -rf conftest*
2298 ;;
2299
2300 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
2301 # Find out which ABI we are using.
2302 echo 'int i;' > conftest.$ac_ext
2303 if AC_TRY_EVAL(ac_compile); then
2304 case `/usr/bin/file conftest.o` in
2305 *32-bit*)
2306 case $host in
2307 x86_64-*linux*)
2308 LD="${LD-ld} -m elf_i386"
2309 ;;
2310 ppc64-*linux*|powerpc64-*linux*)
2311 LD="${LD-ld} -m elf32ppclinux"
2312 ;;
2313 s390x-*linux*)
2314 LD="${LD-ld} -m elf_s390"
2315 ;;
2316 sparc64-*linux*)
2317 LD="${LD-ld} -m elf32_sparc"
2318 ;;
2319 esac
2320 ;;
2321 *64-bit*)
2322 case $host in
2323 x86_64-*linux*)
2324 LD="${LD-ld} -m elf_x86_64"
2325 ;;
2326 ppc*-*linux*|powerpc*-*linux*)
2327 LD="${LD-ld} -m elf64ppc"
2328 ;;
2329 s390*-*linux*)
2330 LD="${LD-ld} -m elf64_s390"
2331 ;;
2332 sparc*-*linux*)
2333 LD="${LD-ld} -m elf64_sparc"
2334 ;;
2335 esac
2336 ;;
2337 esac
2338 fi
2339 rm -rf conftest*
2340 ;;
2341
2342 *-*-sco3.2v5*)
2343 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2344 SAVE_CFLAGS="$CFLAGS"
2345 CFLAGS="$CFLAGS -belf"
2346 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2347 [AC_LANG_PUSH(C)
2348 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2349 AC_LANG_POP])
2350 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2351 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2352 CFLAGS="$SAVE_CFLAGS"
2353 fi
2354 ;;
2355 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
2356 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
2357 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
2358 AC_CHECK_TOOL(AS, as, false)
2359 AC_CHECK_TOOL(OBJDUMP, objdump, false)
2360 ;;
2361 ])
2362 esac
2363
2364 need_locks="$enable_libtool_lock"
2365
2366 ])# _LT_AC_LOCK
2367
2368
2369 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2370 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2371 # ----------------------------------------------------------------
2372 # Check whether the given compiler option works
2373 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
2374 [AC_REQUIRE([LT_AC_PROG_SED])
2375 AC_CACHE_CHECK([$1], [$2],
2376 [$2=no
2377 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2378 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2379 lt_compiler_flag="$3"
2380 # Insert the option either (1) after the last *FLAGS variable, or
2381 # (2) before a word containing "conftest.", or (3) at the end.
2382 # Note that $ac_compile itself does not contain backslashes and begins
2383 # with a dollar sign (not a hyphen), so the echo should work correctly.
2384 # The option is referenced via a variable to avoid confusing sed.
2385 lt_compile=`echo "$ac_compile" | $SED \
2386 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2387 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2388 -e 's:$: $lt_compiler_flag:'`
2389 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2390 (eval "$lt_compile" 2>conftest.err)
2391 ac_status=$?
2392 cat conftest.err >&AS_MESSAGE_LOG_FD
2393 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2394 if (exit $ac_status) && test -s "$ac_outfile"; then
2395 # The compiler can only warn and ignore the option if not recognized
2396 # So say no if there are warnings other than the usual output.
2397 $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
2398 $SED '/^$/d' conftest.err >conftest.er2
2399 if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
2400 $2=yes
2401 fi
2402 fi
2403 $rm conftest*
2404 ])
2405
2406 if test x"[$]$2" = xyes; then
2407 ifelse([$5], , :, [$5])
2408 else
2409 ifelse([$6], , :, [$6])
2410 fi
2411 ])# AC_LIBTOOL_COMPILER_OPTION
2412
2413
2414 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2415 # [ACTION-SUCCESS], [ACTION-FAILURE])
2416 # ------------------------------------------------------------
2417 # Check whether the given compiler option works
2418 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
2419 [AC_CACHE_CHECK([$1], [$2],
2420 [$2=no
2421 save_LDFLAGS="$LDFLAGS"
2422 LDFLAGS="$LDFLAGS $3"
2423 printf "$lt_simple_link_test_code" > conftest.$ac_ext
2424 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2425 # The linker can only warn and ignore the option if not recognized
2426 # So say no if there are warnings
2427 if test -s conftest.err; then
2428 # Append any errors to the config.log.
2429 cat conftest.err 1>&AS_MESSAGE_LOG_FD
2430 $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
2431 $SED '/^$/d' conftest.err >conftest.er2
2432 if diff conftest.exp conftest.er2 >/dev/null; then
2433 $2=yes
2434 fi
2435 else
2436 $2=yes
2437 fi
2438 fi
2439 $rm conftest*
2440 LDFLAGS="$save_LDFLAGS"
2441 ])
2442
2443 if test x"[$]$2" = xyes; then
2444 ifelse([$4], , :, [$4])
2445 else
2446 ifelse([$5], , :, [$5])
2447 fi
2448 ])# AC_LIBTOOL_LINKER_OPTION
2449
2450
2451 # AC_LIBTOOL_SYS_MAX_CMD_LEN
2452 # --------------------------
2453 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
2454 [# find the maximum length of command line arguments
2455 AC_MSG_CHECKING([the maximum length of command line arguments])
2456 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2457 i=0
2458 teststring="ABCD"
2459
2460 case $build_os in
2461 msdosdjgpp*)
2462 # On DJGPP, this test can blow up pretty badly due to problems in libc
2463 # (any single argument exceeding 2000 bytes causes a buffer overrun
2464 # during glob expansion). Even if it were fixed, the result of this
2465 # check would be larger than it should be.
2466 lt_cv_sys_max_cmd_len=12288; # 12K is about right
2467 ;;
2468
2469 gnu*)
2470 # Under GNU Hurd, this test is not required because there is
2471 # no limit to the length of command line arguments.
2472 # Libtool will interpret -1 as no limit whatsoever
2473 lt_cv_sys_max_cmd_len=-1;
2474 ;;
2475
2476 cygwin* | mingw*)
2477 # On Win9x/ME, this test blows up -- it succeeds, but takes
2478 # about 5 minutes as the teststring grows exponentially.
2479 # Worse, since 9x/ME are not pre-emptively multitasking,
2480 # you end up with a "frozen" computer, even though with patience
2481 # the test eventually succeeds (with a max line length of 256k).
2482 # Instead, let's just punt: use the minimum linelength reported by
2483 # all of the supported platforms: 8192 (on NT/2K/XP).
2484 lt_cv_sys_max_cmd_len=8192;
2485 ;;
2486
2487 amigaos*)
2488 # On AmigaOS with pdksh, this test takes hours, literally.
2489 # So we just punt and use a minimum line length of 8192.
2490 lt_cv_sys_max_cmd_len=8192;
2491 ;;
2492
2493 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2494 # This has been around since 386BSD, at least. Likely further.
2495 if test -x /sbin/sysctl; then
2496 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2497 elif test -x /usr/sbin/sysctl; then
2498 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2499 else
2500 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
2501 fi
2502 # And add a safety zone
2503 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2504 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2505 ;;
2506 osf*)
2507 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2508 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2509 # nice to cause kernel panics so lets avoid the loop below.
2510 # First set a reasonable default.
2511 lt_cv_sys_max_cmd_len=16384
2512 #
2513 if test -x /sbin/sysconfig; then
2514 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2515 *1*) lt_cv_sys_max_cmd_len=-1 ;;
2516 esac
2517 fi
2518 ;;
2519 *)
2520 # If test is not a shell built-in, we'll probably end up computing a
2521 # maximum length that is only half of the actual maximum length, but
2522 # we can't tell.
2523 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2524 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
2525 = "XX$teststring") >/dev/null 2>&1 &&
2526 new_result=`expr "X$teststring" : ".*" 2>&1` &&
2527 lt_cv_sys_max_cmd_len=$new_result &&
2528 test $i != 17 # 1/2 MB should be enough
2529 do
2530 i=`expr $i + 1`
2531 teststring=$teststring$teststring
2532 done
2533 teststring=
2534 # Add a significant safety factor because C++ compilers can tack on massive
2535 # amounts of additional arguments before passing them to the linker.
2536 # It appears as though 1/2 is a usable value.
2537 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2538 ;;
2539 esac
2540 ])
2541 if test -n $lt_cv_sys_max_cmd_len ; then
2542 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2543 else
2544 AC_MSG_RESULT(none)
2545 fi
2546 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
2547
2548
2549 # _LT_AC_CHECK_DLFCN
2550 # --------------------
2551 AC_DEFUN([_LT_AC_CHECK_DLFCN],
2552 [AC_CHECK_HEADERS(dlfcn.h)dnl
2553 ])# _LT_AC_CHECK_DLFCN
2554
2555
2556 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2557 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2558 # ------------------------------------------------------------------
2559 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
2560 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2561 if test "$cross_compiling" = yes; then :
2562 [$4]
2563 else
2564 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2565 lt_status=$lt_dlunknown
2566 cat > conftest.$ac_ext <<EOF
2567 [#line __oline__ "configure"
2568 #include "confdefs.h"
2569
2570 #if HAVE_DLFCN_H
2571 #include <dlfcn.h>
2572 #endif
2573
2574 #include <stdio.h>
2575
2576 #ifdef RTLD_GLOBAL
2577 # define LT_DLGLOBAL RTLD_GLOBAL
2578 #else
2579 # ifdef DL_GLOBAL
2580 # define LT_DLGLOBAL DL_GLOBAL
2581 # else
2582 # define LT_DLGLOBAL 0
2583 # endif
2584 #endif
2585
2586 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2587 find out it does not work in some platform. */
2588 #ifndef LT_DLLAZY_OR_NOW
2589 # ifdef RTLD_LAZY
2590 # define LT_DLLAZY_OR_NOW RTLD_LAZY
2591 # else
2592 # ifdef DL_LAZY
2593 # define LT_DLLAZY_OR_NOW DL_LAZY
2594 # else
2595 # ifdef RTLD_NOW
2596 # define LT_DLLAZY_OR_NOW RTLD_NOW
2597 # else
2598 # ifdef DL_NOW
2599 # define LT_DLLAZY_OR_NOW DL_NOW
2600 # else
2601 # define LT_DLLAZY_OR_NOW 0
2602 # endif
2603 # endif
2604 # endif
2605 # endif
2606 #endif
2607
2608 #ifdef __cplusplus
2609 extern "C" void exit (int);
2610 #endif
2611
2612 void fnord() { int i=42;}
2613 int main ()
2614 {
2615 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2616 int status = $lt_dlunknown;
2617
2618 if (self)
2619 {
2620 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
2621 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2622 /* dlclose (self); */
2623 }
2624
2625 exit (status);
2626 }]
2627 EOF
2628 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2629 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2630 lt_status=$?
2631 case x$lt_status in
2632 x$lt_dlno_uscore) $1 ;;
2633 x$lt_dlneed_uscore) $2 ;;
2634 x$lt_unknown|x*) $3 ;;
2635 esac
2636 else :
2637 # compilation failed
2638 $3
2639 fi
2640 fi
2641 rm -fr conftest*
2642 ])# _LT_AC_TRY_DLOPEN_SELF
2643
2644
2645 # AC_LIBTOOL_DLOPEN_SELF
2646 # -------------------
2647 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
2648 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2649 if test "x$enable_dlopen" != xyes; then
2650 enable_dlopen=unknown
2651 enable_dlopen_self=unknown
2652 enable_dlopen_self_static=unknown
2653 else
2654 lt_cv_dlopen=no
2655 lt_cv_dlopen_libs=
2656
2657 case $host_os in
2658 beos*)
2659 lt_cv_dlopen="load_add_on"
2660 lt_cv_dlopen_libs=
2661 lt_cv_dlopen_self=yes
2662 ;;
2663
2664 mingw* | pw32*)
2665 lt_cv_dlopen="LoadLibrary"
2666 lt_cv_dlopen_libs=
2667 ;;
2668
2669 cygwin*)
2670 lt_cv_dlopen="dlopen"
2671 lt_cv_dlopen_libs=
2672 ;;
2673
2674 darwin*)
2675 # if libdl is installed we need to link against it
2676 AC_CHECK_LIB([dl], [dlopen],
2677 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2678 lt_cv_dlopen="dyld"
2679 lt_cv_dlopen_libs=
2680 lt_cv_dlopen_self=yes
2681 ])
2682 ;;
2683
2684 *)
2685 AC_CHECK_FUNC([shl_load],
2686 [lt_cv_dlopen="shl_load"],
2687 [AC_CHECK_LIB([dld], [shl_load],
2688 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
2689 [AC_CHECK_FUNC([dlopen],
2690 [lt_cv_dlopen="dlopen"],
2691 [AC_CHECK_LIB([dl], [dlopen],
2692 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2693 [AC_CHECK_LIB([svld], [dlopen],
2694 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2695 [AC_CHECK_LIB([dld], [dld_link],
2696 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
2697 ])
2698 ])
2699 ])
2700 ])
2701 ])
2702 ;;
2703 esac
2704
2705 if test "x$lt_cv_dlopen" != xno; then
2706 enable_dlopen=yes
2707 else
2708 enable_dlopen=no
2709 fi
2710
2711 case $lt_cv_dlopen in
2712 dlopen)
2713 save_CPPFLAGS="$CPPFLAGS"
2714 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2715
2716 save_LDFLAGS="$LDFLAGS"
2717 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2718
2719 save_LIBS="$LIBS"
2720 LIBS="$lt_cv_dlopen_libs $LIBS"
2721
2722 AC_CACHE_CHECK([whether a program can dlopen itself],
2723 lt_cv_dlopen_self, [dnl
2724 _LT_AC_TRY_DLOPEN_SELF(
2725 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2726 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2727 ])
2728
2729 if test "x$lt_cv_dlopen_self" = xyes; then
2730 LDFLAGS="$LDFLAGS $link_static_flag"
2731 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2732 lt_cv_dlopen_self_static, [dnl
2733 _LT_AC_TRY_DLOPEN_SELF(
2734 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2735 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
2736 ])
2737 fi
2738
2739 CPPFLAGS="$save_CPPFLAGS"
2740 LDFLAGS="$save_LDFLAGS"
2741 LIBS="$save_LIBS"
2742 ;;
2743 esac
2744
2745 case $lt_cv_dlopen_self in
2746 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2747 *) enable_dlopen_self=unknown ;;
2748 esac
2749
2750 case $lt_cv_dlopen_self_static in
2751 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2752 *) enable_dlopen_self_static=unknown ;;
2753 esac
2754 fi
2755 ])# AC_LIBTOOL_DLOPEN_SELF
2756
2757
2758 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2759 # ---------------------------------
2760 # Check to see if options -c and -o are simultaneously supported by compiler
2761 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2762 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2763 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2764 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2765 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2766 $rm -r conftest 2>/dev/null
2767 mkdir conftest
2768 cd conftest
2769 mkdir out
2770 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
2771
2772 lt_compiler_flag="-o out/conftest2.$ac_objext"
2773 # Insert the option either (1) after the last *FLAGS variable, or
2774 # (2) before a word containing "conftest.", or (3) at the end.
2775 # Note that $ac_compile itself does not contain backslashes and begins
2776 # with a dollar sign (not a hyphen), so the echo should work correctly.
2777 lt_compile=`echo "$ac_compile" | $SED \
2778 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2779 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2780 -e 's:$: $lt_compiler_flag:'`
2781 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2782 (eval "$lt_compile" 2>out/conftest.err)
2783 ac_status=$?
2784 cat out/conftest.err >&AS_MESSAGE_LOG_FD
2785 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2786 if (exit $ac_status) && test -s out/conftest2.$ac_objext
2787 then
2788 # The compiler can only warn and ignore the option if not recognized
2789 # So say no if there are warnings
2790 $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
2791 $SED '/^$/d' out/conftest.err >out/conftest.er2
2792 if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2793 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2794 fi
2795 fi
2796 chmod u+w . 2>&AS_MESSAGE_LOG_FD
2797 $rm conftest*
2798 # SGI C++ compiler will create directory out/ii_files/ for
2799 # template instantiation
2800 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2801 $rm out/* && rmdir out
2802 cd ..
2803 rmdir conftest
2804 $rm conftest*
2805 ])
2806 ])# AC_LIBTOOL_PROG_CC_C_O
2807
2808
2809 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2810 # -----------------------------------------
2811 # Check to see if we can do hard links to lock some files if needed
2812 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2813 [AC_REQUIRE([_LT_AC_LOCK])dnl
2814
2815 hard_links="nottested"
2816 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2817 # do not overwrite the value of need_locks provided by the user
2818 AC_MSG_CHECKING([if we can lock with hard links])
2819 hard_links=yes
2820 $rm conftest*
2821 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2822 touch conftest.a
2823 ln conftest.a conftest.b 2>&5 || hard_links=no
2824 ln conftest.a conftest.b 2>/dev/null && hard_links=no
2825 AC_MSG_RESULT([$hard_links])
2826 if test "$hard_links" = no; then
2827 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2828 need_locks=warn
2829 fi
2830 else
2831 need_locks=no
2832 fi
2833 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2834
2835
2836 # AC_LIBTOOL_OBJDIR
2837 # -----------------
2838 AC_DEFUN([AC_LIBTOOL_OBJDIR],
2839 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2840 [rm -f .libs 2>/dev/null
2841 mkdir .libs 2>/dev/null
2842 if test -d .libs; then
2843 lt_cv_objdir=.libs
2844 else
2845 # MS-DOS does not allow filenames that begin with a dot.
2846 lt_cv_objdir=_libs
2847 fi
2848 rmdir .libs 2>/dev/null])
2849 objdir=$lt_cv_objdir
2850 ])# AC_LIBTOOL_OBJDIR
2851
2852
2853 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2854 # ----------------------------------------------
2855 # Check hardcoding attributes.
2856 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2857 [AC_MSG_CHECKING([how to hardcode library paths into programs])
2858 _LT_AC_TAGVAR(hardcode_action, $1)=
2859 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2860 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2861 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2862
2863 # We can hardcode non-existant directories.
2864 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2865 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2866 # have to relink, otherwise we might link with an installed library
2867 # when we should be linking with a yet-to-be-installed one
2868 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2869 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2870 # Linking always hardcodes the temporary library directory.
2871 _LT_AC_TAGVAR(hardcode_action, $1)=relink
2872 else
2873 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2874 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2875 fi
2876 else
2877 # We cannot hardcode anything, or else we can only hardcode existing
2878 # directories.
2879 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2880 fi
2881 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2882
2883 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2884 # Fast installation is not supported
2885 enable_fast_install=no
2886 elif test "$shlibpath_overrides_runpath" = yes ||
2887 test "$enable_shared" = no; then
2888 # Fast installation is not necessary
2889 enable_fast_install=needless
2890 fi
2891 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2892
2893
2894 # AC_LIBTOOL_SYS_LIB_STRIP
2895 # ------------------------
2896 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2897 [striplib=
2898 old_striplib=
2899 AC_MSG_CHECKING([whether stripping libraries is possible])
2900 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2901 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2902 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2903 AC_MSG_RESULT([yes])
2904 else
2905 # FIXME - insert some real tests, host_os isn't really good enough
2906 case $host_os in
2907 darwin*)
2908 if test -n "$STRIP" ; then
2909 striplib="$STRIP -x"
2910 AC_MSG_RESULT([yes])
2911 else
2912 AC_MSG_RESULT([no])
2913 fi
2914 ;;
2915 *)
2916 AC_MSG_RESULT([no])
2917 ;;
2918 esac
2919 fi
2920 ])# AC_LIBTOOL_SYS_LIB_STRIP
2921
2922
2923 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
2924 # -----------------------------
2925 # PORTME Fill in your ld.so characteristics
2926 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2927 [AC_MSG_CHECKING([dynamic linker characteristics])
2928 library_names_spec=
2929 libname_spec='lib$name'
2930 soname_spec=
2931 shrext_cmds=".so"
2932 postinstall_cmds=
2933 postuninstall_cmds=
2934 finish_cmds=
2935 finish_eval=
2936 shlibpath_var=
2937 shlibpath_overrides_runpath=unknown
2938 version_type=none
2939 dynamic_linker="$host_os ld.so"
2940 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2941 if test "$GCC" = yes; then
2942 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2943 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2944 # if the path contains ";" then we assume it to be the separator
2945 # otherwise default to the standard path separator (i.e. ":") - it is
2946 # assumed that no part of a normal pathname contains ";" but that should
2947 # okay in the real world where ";" in dirpaths is itself problematic.
2948 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2949 else
2950 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
2951 fi
2952 else
2953 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2954 fi
2955 need_lib_prefix=unknown
2956 hardcode_into_libs=no
2957
2958 # when you set need_version to no, make sure it does not cause -set_version
2959 # flags to be left without arguments
2960 need_version=unknown
2961
2962 case $host_os in
2963 aix3*)
2964 version_type=linux
2965 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2966 shlibpath_var=LIBPATH
2967
2968 # AIX 3 has no versioning support, so we append a major version to the name.
2969 soname_spec='${libname}${release}${shared_ext}$major'
2970 ;;
2971
2972 aix4* | aix5*)
2973 version_type=linux
2974 need_lib_prefix=no
2975 need_version=no
2976 hardcode_into_libs=yes
2977 if test "$host_cpu" = ia64; then
2978 # AIX 5 supports IA64
2979 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2980 shlibpath_var=LD_LIBRARY_PATH
2981 else
2982 # With GCC up to 2.95.x, collect2 would create an import file
2983 # for dependence libraries. The import file would start with
2984 # the line `#! .'. This would cause the generated library to
2985 # depend on `.', always an invalid library. This was fixed in
2986 # development snapshots of GCC prior to 3.0.
2987 case $host_os in
2988 aix4 | aix4.[[01]] | aix4.[[01]].*)
2989 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2990 echo ' yes '
2991 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2992 :
2993 else
2994 can_build_shared=no
2995 fi
2996 ;;
2997 esac
2998 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2999 # soname into executable. Probably we can add versioning support to
3000 # collect2, so additional links can be useful in future.
3001 if test "$aix_use_runtimelinking" = yes; then
3002 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3003 # instead of lib<name>.a to let people know that these are not
3004 # typical AIX shared libraries.
3005 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3006 else
3007 # We preserve .a as extension for shared libraries through AIX4.2
3008 # and later when we are not doing run time linking.
3009 library_names_spec='${libname}${release}.a $libname.a'
3010 soname_spec='${libname}${release}${shared_ext}$major'
3011 fi
3012 shlibpath_var=LIBPATH
3013 fi
3014 ;;
3015
3016 amigaos*)
3017 library_names_spec='$libname.ixlibrary $libname.a'
3018 # Create ${libname}_ixlibrary.a entries in /sys/libs.
3019 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
3020 ;;
3021
3022 beos*)
3023 library_names_spec='${libname}${shared_ext}'
3024 dynamic_linker="$host_os ld.so"
3025 shlibpath_var=LIBRARY_PATH
3026 ;;
3027
3028 bsdi[[45]]*)
3029 version_type=linux
3030 need_version=no
3031 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3032 soname_spec='${libname}${release}${shared_ext}$major'
3033 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3034 shlibpath_var=LD_LIBRARY_PATH
3035 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3036 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3037 # the default ld.so.conf also contains /usr/contrib/lib and
3038 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3039 # libtool to hard-code these into programs
3040 ;;
3041
3042 cygwin* | mingw* | pw32*)
3043 version_type=windows
3044 shrext_cmds=".dll"
3045 need_version=no
3046 need_lib_prefix=no
3047
3048 case $GCC,$host_os in
3049 yes,cygwin* | yes,mingw* | yes,pw32*)
3050 library_names_spec='$libname.dll.a'
3051 # DLL is installed to $(libdir)/../bin by postinstall_cmds
3052 postinstall_cmds='base_file=`basename \${file}`~
3053 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
3054 dldir=$destdir/`dirname \$dlpath`~
3055 test -d \$dldir || mkdir -p \$dldir~
3056 $install_prog $dir/$dlname \$dldir/$dlname~
3057 chmod a+x \$dldir/$dlname'
3058 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3059 dlpath=$dir/\$dldll~
3060 $rm \$dlpath'
3061 shlibpath_overrides_runpath=yes
3062
3063 case $host_os in
3064 cygwin*)
3065 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3066 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3067 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3068 ;;
3069 mingw*)
3070 # MinGW DLLs use traditional 'lib' prefix
3071 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3072 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3073 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
3074 # It is most probably a Windows format PATH printed by
3075 # mingw gcc, but we are running on Cygwin. Gcc prints its search
3076 # path with ; separators, and with drive letters. We can handle the
3077 # drive letters (cygwin fileutils understands them), so leave them,
3078 # especially as we might pass files found there to a mingw objdump,
3079 # which wouldn't understand a cygwinified path. Ahh.
3080 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3081 else
3082 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3083 fi
3084 ;;
3085 pw32*)
3086 # pw32 DLLs use 'pw' prefix rather than 'lib'
3087 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3088 ;;
3089 esac
3090 ;;
3091
3092 *)
3093 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3094 ;;
3095 esac
3096 dynamic_linker='Win32 ld.exe'
3097 # FIXME: first we should search . and the directory the executable is in
3098 shlibpath_var=PATH
3099 ;;
3100
3101 darwin* | rhapsody*)
3102 dynamic_linker="$host_os dyld"
3103 version_type=darwin
3104 need_lib_prefix=no
3105 need_version=no
3106 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3107 soname_spec='${libname}${release}${major}$shared_ext'
3108 shlibpath_overrides_runpath=yes
3109 shlibpath_var=DYLD_LIBRARY_PATH
3110 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3111 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
3112 if test "$GCC" = yes; then
3113 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
3114 else
3115 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
3116 fi
3117 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3118 ;;
3119
3120 dgux*)
3121 version_type=linux
3122 need_lib_prefix=no
3123 need_version=no
3124 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3125 soname_spec='${libname}${release}${shared_ext}$major'
3126 shlibpath_var=LD_LIBRARY_PATH
3127 ;;
3128
3129 freebsd1*)
3130 dynamic_linker=no
3131 ;;
3132
3133 kfreebsd*-gnu)
3134 version_type=linux
3135 need_lib_prefix=no
3136 need_version=no
3137 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3138 soname_spec='${libname}${release}${shared_ext}$major'
3139 shlibpath_var=LD_LIBRARY_PATH
3140 shlibpath_overrides_runpath=no
3141 hardcode_into_libs=yes
3142 dynamic_linker='GNU ld.so'
3143 ;;
3144
3145 freebsd* | dragonfly*)
3146 # DragonFly does not have aout. When/if they implement a new
3147 # versioning mechanism, adjust this.
3148 if test -x /usr/bin/objformat; then
3149 objformat=`/usr/bin/objformat`
3150 else
3151 case $host_os in
3152 freebsd[[123]]*) objformat=aout ;;
3153 *) objformat=elf ;;
3154 esac
3155 fi
3156 version_type=freebsd-$objformat
3157 case $version_type in
3158 freebsd-elf*)
3159 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3160 need_version=no
3161 need_lib_prefix=no
3162 ;;
3163 freebsd-*)
3164 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3165 need_version=yes
3166 ;;
3167 esac
3168 shlibpath_var=LD_LIBRARY_PATH
3169 case $host_os in
3170 freebsd2*)
3171 shlibpath_overrides_runpath=yes
3172 ;;
3173 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3174 shlibpath_overrides_runpath=yes
3175 hardcode_into_libs=yes
3176 ;;
3177 *) # from 3.2 on
3178 shlibpath_overrides_runpath=no
3179 hardcode_into_libs=yes
3180 ;;
3181 esac
3182 ;;
3183
3184 gnu*)
3185 version_type=linux
3186 need_lib_prefix=no
3187 need_version=no
3188 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3189 soname_spec='${libname}${release}${shared_ext}$major'
3190 shlibpath_var=LD_LIBRARY_PATH
3191 hardcode_into_libs=yes
3192 ;;
3193
3194 hpux9* | hpux10* | hpux11*)
3195 # Give a soname corresponding to the major version so that dld.sl refuses to
3196 # link against other versions.
3197 version_type=sunos
3198 need_lib_prefix=no
3199 need_version=no
3200 case $host_cpu in
3201 ia64*)
3202 shrext_cmds='.so'
3203 hardcode_into_libs=yes
3204 dynamic_linker="$host_os dld.so"
3205 shlibpath_var=LD_LIBRARY_PATH
3206 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3207 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3208 soname_spec='${libname}${release}${shared_ext}$major'
3209 if test "X$HPUX_IA64_MODE" = X32; then
3210 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3211 else
3212 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3213 fi
3214 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3215 ;;
3216 hppa*64*)
3217 shrext_cmds='.sl'
3218 hardcode_into_libs=yes
3219 dynamic_linker="$host_os dld.sl"
3220 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3221 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3222 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3223 soname_spec='${libname}${release}${shared_ext}$major'
3224 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3225 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3226 ;;
3227 *)
3228 shrext_cmds='.sl'
3229 dynamic_linker="$host_os dld.sl"
3230 shlibpath_var=SHLIB_PATH
3231 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3232 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3233 soname_spec='${libname}${release}${shared_ext}$major'
3234 ;;
3235 esac
3236 # HP-UX runs *really* slowly unless shared libraries are mode 555.
3237 postinstall_cmds='chmod 555 $lib'
3238 ;;
3239
3240 irix5* | irix6* | nonstopux*)
3241 case $host_os in
3242 nonstopux*) version_type=nonstopux ;;
3243 *)
3244 if test "$lt_cv_prog_gnu_ld" = yes; then
3245 version_type=linux
3246 else
3247 version_type=irix
3248 fi ;;
3249 esac
3250 need_lib_prefix=no
3251 need_version=no
3252 soname_spec='${libname}${release}${shared_ext}$major'
3253 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3254 case $host_os in
3255 irix5* | nonstopux*)
3256 libsuff= shlibsuff=
3257 ;;
3258 *)
3259 case $LD in # libtool.m4 will add one of these switches to LD
3260 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3261 libsuff= shlibsuff= libmagic=32-bit;;
3262 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3263 libsuff=32 shlibsuff=N32 libmagic=N32;;
3264 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3265 libsuff=64 shlibsuff=64 libmagic=64-bit;;
3266 *) libsuff= shlibsuff= libmagic=never-match;;
3267 esac
3268 ;;
3269 esac
3270 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3271 shlibpath_overrides_runpath=no
3272 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3273 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3274 hardcode_into_libs=yes
3275 ;;
3276
3277 # No shared lib support for Linux oldld, aout, or coff.
3278 linux*oldld* | linux*aout* | linux*coff*)
3279 dynamic_linker=no
3280 ;;
3281
3282 # This must be Linux ELF.
3283 linux*)
3284 version_type=linux
3285 need_lib_prefix=no
3286 need_version=no
3287 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3288 soname_spec='${libname}${release}${shared_ext}$major'
3289 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3290 shlibpath_var=LD_LIBRARY_PATH
3291 shlibpath_overrides_runpath=no
3292 # This implies no fast_install, which is unacceptable.
3293 # Some rework will be needed to allow for fast_install
3294 # before this can be enabled.
3295 hardcode_into_libs=yes
3296
3297 # Append ld.so.conf contents to the search path
3298 if test -f /etc/ld.so.conf; then
3299 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
3300 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3301 fi
3302
3303 # We used to test for /lib/ld.so.1 and disable shared libraries on
3304 # powerpc, because MkLinux only supported shared libraries with the
3305 # GNU dynamic linker. Since this was broken with cross compilers,
3306 # most powerpc-linux boxes support dynamic linking these days and
3307 # people can always --disable-shared, the test was removed, and we
3308 # assume the GNU/Linux dynamic linker is in use.
3309 dynamic_linker='GNU/Linux ld.so'
3310 ;;
3311
3312 netbsdelf*-gnu)
3313 version_type=linux
3314 need_lib_prefix=no
3315 need_version=no
3316 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3317 soname_spec='${libname}${release}${shared_ext}$major'
3318 shlibpath_var=LD_LIBRARY_PATH
3319 shlibpath_overrides_runpath=no
3320 hardcode_into_libs=yes
3321 dynamic_linker='NetBSD ld.elf_so'
3322 ;;
3323
3324 knetbsd*-gnu)
3325 version_type=linux
3326 need_lib_prefix=no
3327 need_version=no
3328 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3329 soname_spec='${libname}${release}${shared_ext}$major'
3330 shlibpath_var=LD_LIBRARY_PATH
3331 shlibpath_overrides_runpath=no
3332 hardcode_into_libs=yes
3333 dynamic_linker='GNU ld.so'
3334 ;;
3335
3336 netbsd*)
3337 version_type=sunos
3338 need_lib_prefix=no
3339 need_version=no
3340 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3341 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3342 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3343 dynamic_linker='NetBSD (a.out) ld.so'
3344 else
3345 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3346 soname_spec='${libname}${release}${shared_ext}$major'
3347 dynamic_linker='NetBSD ld.elf_so'
3348 fi
3349 shlibpath_var=LD_LIBRARY_PATH
3350 shlibpath_overrides_runpath=yes
3351 hardcode_into_libs=yes
3352 ;;
3353
3354 newsos6)
3355 version_type=linux
3356 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3357 shlibpath_var=LD_LIBRARY_PATH
3358 shlibpath_overrides_runpath=yes
3359 ;;
3360
3361 nto-qnx*)
3362 version_type=linux
3363 need_lib_prefix=no
3364 need_version=no
3365 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3366 soname_spec='${libname}${release}${shared_ext}$major'
3367 shlibpath_var=LD_LIBRARY_PATH
3368 shlibpath_overrides_runpath=yes
3369 ;;
3370
3371 openbsd*)
3372 version_type=sunos
3373 need_lib_prefix=no
3374 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3375 case $host_os in
3376 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3377 *) need_version=no ;;
3378 esac
3379 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3380 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3381 shlibpath_var=LD_LIBRARY_PATH
3382 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3383 case $host_os in
3384 openbsd2.[[89]] | openbsd2.[[89]].*)
3385 shlibpath_overrides_runpath=no
3386 ;;
3387 *)
3388 shlibpath_overrides_runpath=yes
3389 ;;
3390 esac
3391 else
3392 shlibpath_overrides_runpath=yes
3393 fi
3394 ;;
3395
3396 os2*)
3397 libname_spec='$name'
3398 shrext_cmds=".dll"
3399 need_lib_prefix=no
3400 library_names_spec='$libname${shared_ext} $libname.a'
3401 dynamic_linker='OS/2 ld.exe'
3402 shlibpath_var=LIBPATH
3403 ;;
3404
3405 osf3* | osf4* | osf5*)
3406 version_type=osf
3407 need_lib_prefix=no
3408 need_version=no
3409 soname_spec='${libname}${release}${shared_ext}$major'
3410 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3411 shlibpath_var=LD_LIBRARY_PATH
3412 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3413 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3414 ;;
3415
3416 sco3.2v5*)
3417 version_type=osf
3418 soname_spec='${libname}${release}${shared_ext}$major'
3419 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3420 shlibpath_var=LD_LIBRARY_PATH
3421 ;;
3422
3423 solaris*)
3424 version_type=linux
3425 need_lib_prefix=no
3426 need_version=no
3427 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3428 soname_spec='${libname}${release}${shared_ext}$major'
3429 shlibpath_var=LD_LIBRARY_PATH
3430 shlibpath_overrides_runpath=yes
3431 hardcode_into_libs=yes
3432 # ldd complains unless libraries are executable
3433 postinstall_cmds='chmod +x $lib'
3434 ;;
3435
3436 sunos4*)
3437 version_type=sunos
3438 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3439 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3440 shlibpath_var=LD_LIBRARY_PATH
3441 shlibpath_overrides_runpath=yes
3442 if test "$with_gnu_ld" = yes; then
3443 need_lib_prefix=no
3444 fi
3445 need_version=yes
3446 ;;
3447
3448 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3449 version_type=linux
3450 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3451 soname_spec='${libname}${release}${shared_ext}$major'
3452 shlibpath_var=LD_LIBRARY_PATH
3453 case $host_vendor in
3454 sni)
3455 shlibpath_overrides_runpath=no
3456 need_lib_prefix=no
3457 export_dynamic_flag_spec='${wl}-Blargedynsym'
3458 runpath_var=LD_RUN_PATH
3459 ;;
3460 siemens)
3461 need_lib_prefix=no
3462 ;;
3463 motorola)
3464 need_lib_prefix=no
3465 need_version=no
3466 shlibpath_overrides_runpath=no
3467 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3468 ;;
3469 esac
3470 ;;
3471
3472 sysv4*MP*)
3473 if test -d /usr/nec ;then
3474 version_type=linux
3475 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3476 soname_spec='$libname${shared_ext}.$major'
3477 shlibpath_var=LD_LIBRARY_PATH
3478 fi
3479 ;;
3480
3481 uts4*)
3482 version_type=linux
3483 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3484 soname_spec='${libname}${release}${shared_ext}$major'
3485 shlibpath_var=LD_LIBRARY_PATH
3486 ;;
3487
3488 *)
3489 dynamic_linker=no
3490 ;;
3491 esac
3492 AC_MSG_RESULT([$dynamic_linker])
3493 test "$dynamic_linker" = no && can_build_shared=no
3494 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
3495
3496
3497 # _LT_AC_TAGCONFIG
3498 # ----------------
3499 AC_DEFUN([_LT_AC_TAGCONFIG],
3500 [AC_ARG_WITH([tags],
3501 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
3502 [include additional configurations @<:@automatic@:>@])],
3503 [tagnames="$withval"])
3504
3505 if test -f "$ltmain" && test -n "$tagnames"; then
3506 if test ! -f "${ofile}"; then
3507 AC_MSG_WARN([output file `$ofile' does not exist])
3508 fi
3509
3510 if test -z "$LTCC"; then
3511 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
3512 if test -z "$LTCC"; then
3513 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
3514 else
3515 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
3516 fi
3517 fi
3518
3519 # Extract list of available tagged configurations in $ofile.
3520 # Note that this assumes the entire list is on one line.
3521 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
3522
3523 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3524 for tagname in $tagnames; do
3525 IFS="$lt_save_ifs"
3526 # Check whether tagname contains only valid characters
3527 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
3528 "") ;;
3529 *) AC_MSG_ERROR([invalid tag name: $tagname])
3530 ;;
3531 esac
3532
3533 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
3534 then
3535 AC_MSG_ERROR([tag name \"$tagname\" already exists])
3536 fi
3537
3538 # Update the list of available tags.
3539 if test -n "$tagname"; then
3540 echo appending configuration tag \"$tagname\" to $ofile
3541
3542 case $tagname in
3543 CXX)
3544 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3545 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3546 (test "X$CXX" != "Xg++"))) ; then
3547 AC_LIBTOOL_LANG_CXX_CONFIG
3548 else
3549 tagname=""
3550 fi
3551 ;;
3552
3553 F77)
3554 if test -n "$F77" && test "X$F77" != "Xno"; then
3555 AC_LIBTOOL_LANG_F77_CONFIG
3556 else
3557 tagname=""
3558 fi
3559 ;;
3560
3561 GCJ)
3562 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
3563 AC_LIBTOOL_LANG_GCJ_CONFIG
3564 else
3565 tagname=""
3566 fi
3567 ;;
3568
3569 RC)
3570 AC_LIBTOOL_LANG_RC_CONFIG
3571 ;;
3572
3573 *)
3574 AC_MSG_ERROR([Unsupported tag name: $tagname])
3575 ;;
3576 esac
3577
3578 # Append the new tag name to the list of available tags.
3579 if test -n "$tagname" ; then
3580 available_tags="$available_tags $tagname"
3581 fi
3582 fi
3583 done
3584 IFS="$lt_save_ifs"
3585
3586 # Now substitute the updated list of available tags.
3587 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
3588 mv "${ofile}T" "$ofile"
3589 chmod +x "$ofile"
3590 else
3591 rm -f "${ofile}T"
3592 AC_MSG_ERROR([unable to update list of available tagged configurations.])
3593 fi
3594 fi
3595 ])# _LT_AC_TAGCONFIG
3596
3597
3598 # AC_LIBTOOL_DLOPEN
3599 # -----------------
3600 # enable checks for dlopen support
3601 AC_DEFUN([AC_LIBTOOL_DLOPEN],
3602 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
3603 ])# AC_LIBTOOL_DLOPEN
3604
3605
3606 # AC_LIBTOOL_WIN32_DLL
3607 # --------------------
3608 # declare package support for building win32 DLLs
3609 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
3610 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
3611 ])# AC_LIBTOOL_WIN32_DLL
3612
3613
3614 # AC_ENABLE_SHARED([DEFAULT])
3615 # ---------------------------
3616 # implement the --enable-shared flag
3617 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3618 AC_DEFUN([AC_ENABLE_SHARED],
3619 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3620 AC_ARG_ENABLE([shared],
3621 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
3622 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
3623 [p=${PACKAGE-default}
3624 case $enableval in
3625 yes) enable_shared=yes ;;
3626 no) enable_shared=no ;;
3627 *)
3628 enable_shared=no
3629 # Look at the argument we got. We use all the common list separators.
3630 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3631 for pkg in $enableval; do
3632 IFS="$lt_save_ifs"
3633 if test "X$pkg" = "X$p"; then
3634 enable_shared=yes
3635 fi
3636 done
3637 IFS="$lt_save_ifs"
3638 ;;
3639 esac],
3640 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3641 ])# AC_ENABLE_SHARED
3642
3643
3644 # AC_DISABLE_SHARED
3645 # -----------------
3646 #- set the default shared flag to --disable-shared
3647 AC_DEFUN([AC_DISABLE_SHARED],
3648 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3649 AC_ENABLE_SHARED(no)
3650 ])# AC_DISABLE_SHARED
3651
3652
3653 # AC_ENABLE_STATIC([DEFAULT])
3654 # ---------------------------
3655 # implement the --enable-static flag
3656 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3657 AC_DEFUN([AC_ENABLE_STATIC],
3658 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3659 AC_ARG_ENABLE([static],
3660 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3661 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3662 [p=${PACKAGE-default}
3663 case $enableval in
3664 yes) enable_static=yes ;;
3665 no) enable_static=no ;;
3666 *)
3667 enable_static=no
3668 # Look at the argument we got. We use all the common list separators.
3669 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3670 for pkg in $enableval; do
3671 IFS="$lt_save_ifs"
3672 if test "X$pkg" = "X$p"; then
3673 enable_static=yes
3674 fi
3675 done
3676 IFS="$lt_save_ifs"
3677 ;;
3678 esac],
3679 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
3680 ])# AC_ENABLE_STATIC
3681
3682
3683 # AC_DISABLE_STATIC
3684 # -----------------
3685 # set the default static flag to --disable-static
3686 AC_DEFUN([AC_DISABLE_STATIC],
3687 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3688 AC_ENABLE_STATIC(no)
3689 ])# AC_DISABLE_STATIC
3690
3691
3692 # AC_ENABLE_FAST_INSTALL([DEFAULT])
3693 # ---------------------------------
3694 # implement the --enable-fast-install flag
3695 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
3696 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3697 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3698 AC_ARG_ENABLE([fast-install],
3699 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3700 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3701 [p=${PACKAGE-default}
3702 case $enableval in
3703 yes) enable_fast_install=yes ;;
3704 no) enable_fast_install=no ;;
3705 *)
3706 enable_fast_install=no
3707 # Look at the argument we got. We use all the common list separators.
3708 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3709 for pkg in $enableval; do
3710 IFS="$lt_save_ifs"
3711 if test "X$pkg" = "X$p"; then
3712 enable_fast_install=yes
3713 fi
3714 done
3715 IFS="$lt_save_ifs"
3716 ;;
3717 esac],
3718 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3719 ])# AC_ENABLE_FAST_INSTALL
3720
3721
3722 # AC_DISABLE_FAST_INSTALL
3723 # -----------------------
3724 # set the default to --disable-fast-install
3725 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3726 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3727 AC_ENABLE_FAST_INSTALL(no)
3728 ])# AC_DISABLE_FAST_INSTALL
3729
3730
3731 # AC_LIBTOOL_PICMODE([MODE])
3732 # --------------------------
3733 # implement the --with-pic flag
3734 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
3735 AC_DEFUN([AC_LIBTOOL_PICMODE],
3736 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3737 pic_mode=ifelse($#,1,$1,default)
3738 ])# AC_LIBTOOL_PICMODE
3739
3740
3741 # AC_PROG_EGREP
3742 # -------------
3743 # This is predefined starting with Autoconf 2.54, so this conditional
3744 # definition can be removed once we require Autoconf 2.54 or later.
3745 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3746 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3747 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3748 then ac_cv_prog_egrep='grep -E'
3749 else ac_cv_prog_egrep='egrep'
3750 fi])
3751 EGREP=$ac_cv_prog_egrep
3752 AC_SUBST([EGREP])
3753 ])])
3754
3755
3756 # AC_PATH_TOOL_PREFIX
3757 # -------------------
3758 # find a file program which can recognise shared library
3759 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3760 [AC_REQUIRE([AC_PROG_EGREP])dnl
3761 AC_MSG_CHECKING([for $1])
3762 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3763 [case $MAGIC_CMD in
3764 [[\\/*] | ?:[\\/]*])
3765 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3766 ;;
3767 *)
3768 lt_save_MAGIC_CMD="$MAGIC_CMD"
3769 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3770 dnl $ac_dummy forces splitting on constant user-supplied paths.
3771 dnl POSIX.2 word splitting is done only on the output of word expansions,
3772 dnl not every word. This closes a longstanding sh security hole.
3773 ac_dummy="ifelse([$2], , $PATH, [$2])"
3774 for ac_dir in $ac_dummy; do
3775 IFS="$lt_save_ifs"
3776 test -z "$ac_dir" && ac_dir=.
3777 if test -f $ac_dir/$1; then
3778 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3779 if test -n "$file_magic_test_file"; then
3780 case $deplibs_check_method in
3781 "file_magic "*)
3782 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3783 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3784 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3785 $EGREP "$file_magic_regex" > /dev/null; then
3786 :
3787 else
3788 cat <<EOF 1>&2
3789
3790 *** Warning: the command libtool uses to detect shared libraries,
3791 *** $file_magic_cmd, produces output that libtool cannot recognize.
3792 *** The result is that libtool may fail to recognize shared libraries
3793 *** as such. This will affect the creation of libtool libraries that
3794 *** depend on shared libraries, but programs linked with such libtool
3795 *** libraries will work regardless of this problem. Nevertheless, you
3796 *** may want to report the problem to your system manager and/or to
3797 *** [email protected]
3798
3799 EOF
3800 fi ;;
3801 esac
3802 fi
3803 break
3804 fi
3805 done
3806 IFS="$lt_save_ifs"
3807 MAGIC_CMD="$lt_save_MAGIC_CMD"
3808 ;;
3809 esac])
3810 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3811 if test -n "$MAGIC_CMD"; then
3812 AC_MSG_RESULT($MAGIC_CMD)
3813 else
3814 AC_MSG_RESULT(no)
3815 fi
3816 ])# AC_PATH_TOOL_PREFIX
3817
3818
3819 # AC_PATH_MAGIC
3820 # -------------
3821 # find a file program which can recognise a shared library
3822 AC_DEFUN([AC_PATH_MAGIC],
3823 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3824 if test -z "$lt_cv_path_MAGIC_CMD"; then
3825 if test -n "$ac_tool_prefix"; then
3826 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3827 else
3828 MAGIC_CMD=:
3829 fi
3830 fi
3831 ])# AC_PATH_MAGIC
3832
3833
3834 # AC_PROG_LD
3835 # ----------
3836 # find the pathname to the GNU or non-GNU linker
3837 AC_DEFUN([AC_PROG_LD],
3838 [AC_ARG_WITH([gnu-ld],
3839 [AC_HELP_STRING([--with-gnu-ld],
3840 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3841 [test "$withval" = no || with_gnu_ld=yes],
3842 [with_gnu_ld=no])
3843 AC_REQUIRE([LT_AC_PROG_SED])dnl
3844 AC_REQUIRE([AC_PROG_CC])dnl
3845 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3846 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3847 ac_prog=ld
3848 if test "$GCC" = yes; then
3849 # Check if gcc -print-prog-name=ld gives a path.
3850 AC_MSG_CHECKING([for ld used by $CC])
3851 case $host in
3852 *-*-mingw*)
3853 # gcc leaves a trailing carriage return which upsets mingw
3854 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3855 *)
3856 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3857 esac
3858 case $ac_prog in
3859 # Accept absolute paths.
3860 [[\\/]]* | ?:[[\\/]]*)
3861 re_direlt='/[[^/]][[^/]]*/\.\./'
3862 # Canonicalize the pathname of ld
3863 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3864 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3865 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3866 done
3867 test -z "$LD" && LD="$ac_prog"
3868 ;;
3869 "")
3870 # If it fails, then pretend we aren't using GCC.
3871 ac_prog=ld
3872 ;;
3873 *)
3874 # If it is relative, then search for the first ld in PATH.
3875 with_gnu_ld=unknown
3876 ;;
3877 esac
3878 elif test "$with_gnu_ld" = yes; then
3879 AC_MSG_CHECKING([for GNU ld])
3880 else
3881 AC_MSG_CHECKING([for non-GNU ld])
3882 fi
3883 AC_CACHE_VAL(lt_cv_path_LD,
3884 [if test -z "$LD"; then
3885 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3886 for ac_dir in $PATH; do
3887 IFS="$lt_save_ifs"
3888 test -z "$ac_dir" && ac_dir=.
3889 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3890 lt_cv_path_LD="$ac_dir/$ac_prog"
3891 # Check to see if the program is GNU ld. I'd rather use --version,
3892 # but apparently some variants of GNU ld only accept -v.
3893 # Break only if it was the GNU/non-GNU ld that we prefer.
3894 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3895 *GNU* | *'with BFD'*)
3896 test "$with_gnu_ld" != no && break
3897 ;;
3898 *)
3899 test "$with_gnu_ld" != yes && break
3900 ;;
3901 esac
3902 fi
3903 done
3904 IFS="$lt_save_ifs"
3905 else
3906 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3907 fi])
3908 LD="$lt_cv_path_LD"
3909 if test -n "$LD"; then
3910 AC_MSG_RESULT($LD)
3911 else
3912 AC_MSG_RESULT(no)
3913 fi
3914 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3915 AC_PROG_LD_GNU
3916 ])# AC_PROG_LD
3917
3918
3919 # AC_PROG_LD_GNU
3920 # --------------
3921 AC_DEFUN([AC_PROG_LD_GNU],
3922 [AC_REQUIRE([AC_PROG_EGREP])dnl
3923 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3924 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
3925 case `$LD -v 2>&1 </dev/null` in
3926 *GNU* | *'with BFD'*)
3927 lt_cv_prog_gnu_ld=yes
3928 ;;
3929 *)
3930 lt_cv_prog_gnu_ld=no
3931 ;;
3932 esac])
3933 with_gnu_ld=$lt_cv_prog_gnu_ld
3934 ])# AC_PROG_LD_GNU
3935
3936
3937 # AC_PROG_LD_RELOAD_FLAG
3938 # ----------------------
3939 # find reload flag for linker
3940 # -- PORTME Some linkers may need a different reload flag.
3941 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3942 [AC_CACHE_CHECK([for $LD option to reload object files],
3943 lt_cv_ld_reload_flag,
3944 [lt_cv_ld_reload_flag='-r'])
3945 reload_flag=$lt_cv_ld_reload_flag
3946 case $reload_flag in
3947 "" | " "*) ;;
3948 *) reload_flag=" $reload_flag" ;;
3949 esac
3950 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3951 case $host_os in
3952 darwin*)
3953 if test "$GCC" = yes; then
3954 reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
3955 else
3956 reload_cmds='$LD$reload_flag -o $output$reload_objs'
3957 fi
3958 ;;
3959 esac
3960 ])# AC_PROG_LD_RELOAD_FLAG
3961
3962
3963 # AC_DEPLIBS_CHECK_METHOD
3964 # -----------------------
3965 # how to check for library dependencies
3966 # -- PORTME fill in with the dynamic library characteristics
3967 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3968 [AC_CACHE_CHECK([how to recognise dependent libraries],
3969 lt_cv_deplibs_check_method,
3970 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3971 lt_cv_file_magic_test_file=
3972 lt_cv_deplibs_check_method='unknown'
3973 # Need to set the preceding variable on all platforms that support
3974 # interlibrary dependencies.
3975 # 'none' -- dependencies not supported.
3976 # `unknown' -- same as none, but documents that we really don't know.
3977 # 'pass_all' -- all dependencies passed with no checks.
3978 # 'test_compile' -- check by making test program.
3979 # 'file_magic [[regex]]' -- check by looking for files in library path
3980 # which responds to the $file_magic_cmd with a given extended regex.
3981 # If you have `file' or equivalent on your system and you're not sure
3982 # whether `pass_all' will *always* work, you probably want this one.
3983
3984 case $host_os in
3985 aix4* | aix5*)
3986 lt_cv_deplibs_check_method=pass_all
3987 ;;
3988
3989 beos*)
3990 lt_cv_deplibs_check_method=pass_all
3991 ;;
3992
3993 bsdi[[45]]*)
3994 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3995 lt_cv_file_magic_cmd='/usr/bin/file -L'
3996 lt_cv_file_magic_test_file=/shlib/libc.so
3997 ;;
3998
3999 cygwin*)
4000 # func_win32_libid is a shell function defined in ltmain.sh
4001 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4002 lt_cv_file_magic_cmd='func_win32_libid'
4003 ;;
4004
4005 mingw* | pw32*)
4006 # Base MSYS/MinGW do not provide the 'file' command needed by
4007 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
4008 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4009 lt_cv_file_magic_cmd='$OBJDUMP -f'
4010 ;;
4011
4012 darwin* | rhapsody*)
4013 lt_cv_deplibs_check_method=pass_all
4014 ;;
4015
4016 freebsd* | kfreebsd*-gnu | dragonfly*)
4017 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4018 case $host_cpu in
4019 i*86 )
4020 # Not sure whether the presence of OpenBSD here was a mistake.
4021 # Let's accept both of them until this is cleared up.
4022 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4023 lt_cv_file_magic_cmd=/usr/bin/file
4024 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4025 ;;
4026 esac
4027 else
4028 lt_cv_deplibs_check_method=pass_all
4029 fi
4030 ;;
4031
4032 gnu*)
4033 lt_cv_deplibs_check_method=pass_all
4034 ;;
4035
4036 hpux10.20* | hpux11*)
4037 lt_cv_file_magic_cmd=/usr/bin/file
4038 case $host_cpu in
4039 ia64*)
4040 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4041 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4042 ;;
4043 hppa*64*)
4044 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
4045 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4046 ;;
4047 *)
4048 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4049 lt_cv_file_magic_test_file=/usr/lib/libc.sl
4050 ;;
4051 esac
4052 ;;
4053
4054 irix5* | irix6* | nonstopux*)
4055 case $LD in
4056 *-32|*"-32 ") libmagic=32-bit;;
4057 *-n32|*"-n32 ") libmagic=N32;;
4058 *-64|*"-64 ") libmagic=64-bit;;
4059 *) libmagic=never-match;;
4060 esac
4061 lt_cv_deplibs_check_method=pass_all
4062 ;;
4063
4064 # This must be Linux ELF.
4065 linux*)
4066 lt_cv_deplibs_check_method=pass_all
4067 ;;
4068
4069 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
4070 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4071 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4072 else
4073 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4074 fi
4075 ;;
4076
4077 newos6*)
4078 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4079 lt_cv_file_magic_cmd=/usr/bin/file
4080 lt_cv_file_magic_test_file=/usr/lib/libnls.so
4081 ;;
4082
4083 nto-qnx*)
4084 lt_cv_deplibs_check_method=unknown
4085 ;;
4086
4087 openbsd*)
4088 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4089 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4090 else
4091 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4092 fi
4093 ;;
4094
4095 osf3* | osf4* | osf5*)
4096 lt_cv_deplibs_check_method=pass_all
4097 ;;
4098
4099 sco3.2v5*)
4100 lt_cv_deplibs_check_method=pass_all
4101 ;;
4102
4103 solaris*)
4104 lt_cv_deplibs_check_method=pass_all
4105 ;;
4106
4107 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4108 case $host_vendor in
4109 motorola)
4110 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
4111 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4112 ;;
4113 ncr)
4114 lt_cv_deplibs_check_method=pass_all
4115 ;;
4116 sequent)
4117 lt_cv_file_magic_cmd='/bin/file'
4118 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4119 ;;
4120 sni)
4121 lt_cv_file_magic_cmd='/bin/file'
4122 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4123 lt_cv_file_magic_test_file=/lib/libc.so
4124 ;;
4125 siemens)
4126 lt_cv_deplibs_check_method=pass_all
4127 ;;
4128 esac
4129 ;;
4130
4131 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
4132 lt_cv_deplibs_check_method=pass_all
4133 ;;
4134 esac
4135 ])
4136 file_magic_cmd=$lt_cv_file_magic_cmd
4137 deplibs_check_method=$lt_cv_deplibs_check_method
4138 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4139 ])# AC_DEPLIBS_CHECK_METHOD
4140
4141
4142 # AC_PROG_NM
4143 # ----------
4144 # find the pathname to a BSD-compatible name lister
4145 AC_DEFUN([AC_PROG_NM],
4146 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
4147 [if test -n "$NM"; then
4148 # Let the user override the test.
4149 lt_cv_path_NM="$NM"
4150 else
4151 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4152 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4153 IFS="$lt_save_ifs"
4154 test -z "$ac_dir" && ac_dir=.
4155 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
4156 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4157 # Check to see if the nm accepts a BSD-compat flag.
4158 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4159 # nm: unknown option "B" ignored
4160 # Tru64's nm complains that /dev/null is an invalid object file
4161 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4162 */dev/null* | *'Invalid file or object type'*)
4163 lt_cv_path_NM="$tmp_nm -B"
4164 break
4165 ;;
4166 *)
4167 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4168 */dev/null*)
4169 lt_cv_path_NM="$tmp_nm -p"
4170 break
4171 ;;
4172 *)
4173 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4174 continue # so that we can try to find one that supports BSD flags
4175 ;;
4176 esac
4177 esac
4178 fi
4179 done
4180 IFS="$lt_save_ifs"
4181 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4182 fi])
4183 NM="$lt_cv_path_NM"
4184 ])# AC_PROG_NM
4185
4186
4187 # AC_CHECK_LIBM
4188 # -------------
4189 # check for math library
4190 AC_DEFUN([AC_CHECK_LIBM],
4191 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4192 LIBM=
4193 case $host in
4194 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4195 # These system don't have libm, or don't need it
4196 ;;
4197 *-ncr-sysv4.3*)
4198 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4199 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4200 ;;
4201 *)
4202 AC_CHECK_LIB(m, cos, LIBM="-lm")
4203 ;;
4204 esac
4205 ])# AC_CHECK_LIBM
4206
4207
4208 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
4209 # -----------------------------------
4210 # sets LIBLTDL to the link flags for the libltdl convenience library and
4211 # LTDLINCL to the include flags for the libltdl header and adds
4212 # --enable-ltdl-convenience to the configure arguments. Note that
4213 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
4214 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
4215 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
4216 # (note the single quotes!). If your package is not flat and you're not
4217 # using automake, define top_builddir and top_srcdir appropriately in
4218 # the Makefiles.
4219 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4220 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4221 case $enable_ltdl_convenience in
4222 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4223 "") enable_ltdl_convenience=yes
4224 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4225 esac
4226 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4227 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4228 # For backwards non-gettext consistent compatibility...
4229 INCLTDL="$LTDLINCL"
4230 ])# AC_LIBLTDL_CONVENIENCE
4231
4232
4233 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
4234 # -----------------------------------
4235 # sets LIBLTDL to the link flags for the libltdl installable library and
4236 # LTDLINCL to the include flags for the libltdl header and adds
4237 # --enable-ltdl-install to the configure arguments. Note that
4238 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
4239 # and an installed libltdl is not found, it is assumed to be `libltdl'.
4240 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
4241 # '${top_srcdir}/' (note the single quotes!). If your package is not
4242 # flat and you're not using automake, define top_builddir and top_srcdir
4243 # appropriately in the Makefiles.
4244 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4245 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4246 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4247 AC_CHECK_LIB(ltdl, lt_dlinit,
4248 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4249 [if test x"$enable_ltdl_install" = xno; then
4250 AC_MSG_WARN([libltdl not installed, but installation disabled])
4251 else
4252 enable_ltdl_install=yes
4253 fi
4254 ])
4255 if test x"$enable_ltdl_install" = x"yes"; then
4256 ac_configure_args="$ac_configure_args --enable-ltdl-install"
4257 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4258 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4259 else
4260 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4261 LIBLTDL="-lltdl"
4262 LTDLINCL=
4263 fi
4264 # For backwards non-gettext consistent compatibility...
4265 INCLTDL="$LTDLINCL"
4266 ])# AC_LIBLTDL_INSTALLABLE
4267
4268
4269 # AC_LIBTOOL_CXX
4270 # --------------
4271 # enable support for C++ libraries
4272 AC_DEFUN([AC_LIBTOOL_CXX],
4273 [AC_REQUIRE([_LT_AC_LANG_CXX])
4274 ])# AC_LIBTOOL_CXX
4275
4276
4277 # _LT_AC_LANG_CXX
4278 # ---------------
4279 AC_DEFUN([_LT_AC_LANG_CXX],
4280 [AC_REQUIRE([AC_PROG_CXX])
4281 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
4282 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
4283 ])# _LT_AC_LANG_CXX
4284
4285 # _LT_AC_PROG_CXXCPP
4286 # ---------------
4287 AC_DEFUN([_LT_AC_PROG_CXXCPP],
4288 [
4289 AC_REQUIRE([AC_PROG_CXX])
4290 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
4291 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
4292 (test "X$CXX" != "Xg++"))) ; then
4293 AC_PROG_CXXCPP
4294 fi
4295 ])# _LT_AC_PROG_CXXCPP
4296
4297 # AC_LIBTOOL_F77
4298 # --------------
4299 # enable support for Fortran 77 libraries
4300 AC_DEFUN([AC_LIBTOOL_F77],
4301 [AC_REQUIRE([_LT_AC_LANG_F77])
4302 ])# AC_LIBTOOL_F77
4303
4304
4305 # _LT_AC_LANG_F77
4306 # ---------------
4307 AC_DEFUN([_LT_AC_LANG_F77],
4308 [AC_REQUIRE([AC_PROG_F77])
4309 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
4310 ])# _LT_AC_LANG_F77
4311
4312
4313 # AC_LIBTOOL_GCJ
4314 # --------------
4315 # enable support for GCJ libraries
4316 AC_DEFUN([AC_LIBTOOL_GCJ],
4317 [AC_REQUIRE([_LT_AC_LANG_GCJ])
4318 ])# AC_LIBTOOL_GCJ
4319
4320
4321 # _LT_AC_LANG_GCJ
4322 # ---------------
4323 AC_DEFUN([_LT_AC_LANG_GCJ],
4324 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
4325 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
4326 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
4327 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
4328 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
4329 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
4330 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
4331 ])# _LT_AC_LANG_GCJ
4332
4333
4334 # AC_LIBTOOL_RC
4335 # --------------
4336 # enable support for Windows resource files
4337 AC_DEFUN([AC_LIBTOOL_RC],
4338 [AC_REQUIRE([LT_AC_PROG_RC])
4339 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
4340 ])# AC_LIBTOOL_RC
4341
4342
4343 # AC_LIBTOOL_LANG_C_CONFIG
4344 # ------------------------
4345 # Ensure that the configuration vars for the C compiler are
4346 # suitably defined. Those variables are subsequently used by
4347 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4348 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
4349 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
4350 [lt_save_CC="$CC"
4351 AC_LANG_PUSH(C)
4352
4353 # Source file extension for C test sources.
4354 ac_ext=c
4355
4356 # Object file extension for compiled C test sources.
4357 objext=o
4358 _LT_AC_TAGVAR(objext, $1)=$objext
4359
4360 # Code to be used in simple compile tests
4361 lt_simple_compile_test_code="int some_variable = 0;\n"
4362
4363 # Code to be used in simple link tests
4364 lt_simple_link_test_code='int main(){return(0);}\n'
4365
4366 _LT_AC_SYS_COMPILER
4367
4368 # save warnings/boilerplate of simple test code
4369 _LT_COMPILER_BOILERPLATE
4370 _LT_LINKER_BOILERPLATE
4371
4372 #
4373 # Check for any special shared library compilation flags.
4374 #
4375 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
4376 if test "$GCC" = no; then
4377 case $host_os in
4378 sco3.2v5*)
4379 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
4380 ;;
4381 esac
4382 fi
4383 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
4384 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
4385 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
4386 else
4387 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
4388 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
4389 fi
4390 fi
4391
4392
4393 #
4394 # Check to make sure the static flag actually works.
4395 #
4396 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
4397 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
4398 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
4399 [],
4400 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
4401
4402
4403 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4404 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4405 AC_LIBTOOL_PROG_CC_C_O($1)
4406 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4407 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4408 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4409 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4410 AC_LIBTOOL_SYS_LIB_STRIP
4411 AC_LIBTOOL_DLOPEN_SELF($1)
4412
4413 # Report which librarie types wil actually be built
4414 AC_MSG_CHECKING([if libtool supports shared libraries])
4415 AC_MSG_RESULT([$can_build_shared])
4416
4417 AC_MSG_CHECKING([whether to build shared libraries])
4418 test "$can_build_shared" = "no" && enable_shared=no
4419
4420 # On AIX, shared libraries and static libraries use the same namespace, and
4421 # are all built from PIC.
4422 case $host_os in
4423 aix3*)
4424 test "$enable_shared" = yes && enable_static=no
4425 if test -n "$RANLIB"; then
4426 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4427 postinstall_cmds='$RANLIB $lib'
4428 fi
4429 ;;
4430
4431 aix4* | aix5*)
4432 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4433 test "$enable_shared" = yes && enable_static=no
4434 fi
4435 ;;
4436 esac
4437 AC_MSG_RESULT([$enable_shared])
4438
4439 AC_MSG_CHECKING([whether to build static libraries])
4440 # Make sure either enable_shared or enable_static is yes.
4441 test "$enable_shared" = yes || enable_static=yes
4442 AC_MSG_RESULT([$enable_static])
4443
4444 AC_LIBTOOL_CONFIG($1)
4445
4446 AC_LANG_POP
4447 CC="$lt_save_CC"
4448 ])# AC_LIBTOOL_LANG_C_CONFIG
4449
4450
4451 # AC_LIBTOOL_LANG_CXX_CONFIG
4452 # --------------------------
4453 # Ensure that the configuration vars for the C compiler are
4454 # suitably defined. Those variables are subsequently used by
4455 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4456 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
4457 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
4458 [AC_LANG_PUSH(C++)
4459 AC_REQUIRE([AC_PROG_CXX])
4460 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
4461
4462 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4463 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4464 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4465 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4466 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4467 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4468 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4469 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4470 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4471 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4472 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4473 _LT_AC_TAGVAR(module_cmds, $1)=
4474 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4475 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4476 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4477 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4478 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4479 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4480
4481 # Dependencies to place before and after the object being linked:
4482 _LT_AC_TAGVAR(predep_objects, $1)=
4483 _LT_AC_TAGVAR(postdep_objects, $1)=
4484 _LT_AC_TAGVAR(predeps, $1)=
4485 _LT_AC_TAGVAR(postdeps, $1)=
4486 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
4487
4488 # Source file extension for C++ test sources.
4489 ac_ext=cpp
4490
4491 # Object file extension for compiled C++ test sources.
4492 objext=o
4493 _LT_AC_TAGVAR(objext, $1)=$objext
4494
4495 # Code to be used in simple compile tests
4496 lt_simple_compile_test_code="int some_variable = 0;\n"
4497
4498 # Code to be used in simple link tests
4499 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
4500
4501 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4502 _LT_AC_SYS_COMPILER
4503
4504 # save warnings/boilerplate of simple test code
4505 _LT_COMPILER_BOILERPLATE
4506 _LT_LINKER_BOILERPLATE
4507
4508 # Allow CC to be a program name with arguments.
4509 lt_save_CC=$CC
4510 lt_save_LD=$LD
4511 lt_save_GCC=$GCC
4512 GCC=$GXX
4513 lt_save_with_gnu_ld=$with_gnu_ld
4514 lt_save_path_LD=$lt_cv_path_LD
4515 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
4516 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
4517 else
4518 unset lt_cv_prog_gnu_ld
4519 fi
4520 if test -n "${lt_cv_path_LDCXX+set}"; then
4521 lt_cv_path_LD=$lt_cv_path_LDCXX
4522 else
4523 unset lt_cv_path_LD
4524 fi
4525 test -z "${LDCXX+set}" || LD=$LDCXX
4526 CC=${CXX-"c++"}
4527 compiler=$CC
4528 _LT_AC_TAGVAR(compiler, $1)=$CC
4529 _LT_CC_BASENAME([$compiler])
4530
4531 # We don't want -fno-exception wen compiling C++ code, so set the
4532 # no_builtin_flag separately
4533 if test "$GXX" = yes; then
4534 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4535 else
4536 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4537 fi
4538
4539 if test "$GXX" = yes; then
4540 # Set up default GNU C++ configuration
4541
4542 AC_PROG_LD
4543
4544 # Check if GNU C++ uses GNU ld as the underlying linker, since the
4545 # archiving commands below assume that GNU ld is being used.
4546 if test "$with_gnu_ld" = yes; then
4547 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4548 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4549
4550 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4551 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4552
4553 # If archive_cmds runs LD, not CC, wlarc should be empty
4554 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
4555 # investigate it a little bit more. (MM)
4556 wlarc='${wl}'
4557
4558 # ancient GNU ld didn't support --whole-archive et. al.
4559 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
4560 grep 'no-whole-archive' > /dev/null; then
4561 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4562 else
4563 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4564 fi
4565 else
4566 with_gnu_ld=no
4567 wlarc=
4568
4569 # A generic and very simple default shared library creation
4570 # command for GNU C++ for the case where it uses the native
4571 # linker, instead of GNU ld. If possible, this setting should
4572 # overridden to take advantage of the native linker features on
4573 # the platform it is being used on.
4574 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4575 fi
4576
4577 # Commands to make compiler produce verbose output that lists
4578 # what "hidden" libraries, object files and flags are used when
4579 # linking a shared library.
4580 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4581
4582 else
4583 GXX=no
4584 with_gnu_ld=no
4585 wlarc=
4586 fi
4587
4588 # PORTME: fill in a description of your system's C++ link characteristics
4589 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4590 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4591 case $host_os in
4592 aix3*)
4593 # FIXME: insert proper C++ library support
4594 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4595 ;;
4596 aix4* | aix5*)
4597 if test "$host_cpu" = ia64; then
4598 # On IA64, the linker does run time linking by default, so we don't
4599 # have to do anything special.
4600 aix_use_runtimelinking=no
4601 exp_sym_flag='-Bexport'
4602 no_entry_flag=""
4603 else
4604 aix_use_runtimelinking=no
4605
4606 # Test if we are trying to use run time linking or normal
4607 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4608 # need to do runtime linking.
4609 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
4610 for ld_flag in $LDFLAGS; do
4611 case $ld_flag in
4612 *-brtl*)
4613 aix_use_runtimelinking=yes
4614 break
4615 ;;
4616 esac
4617 done
4618 esac
4619
4620 exp_sym_flag='-bexport'
4621 no_entry_flag='-bnoentry'
4622 fi
4623
4624 # When large executables or shared objects are built, AIX ld can
4625 # have problems creating the table of contents. If linking a library
4626 # or program results in "error TOC overflow" add -mminimal-toc to
4627 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
4628 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4629
4630 _LT_AC_TAGVAR(archive_cmds, $1)=''
4631 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4632 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4633 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4634
4635 if test "$GXX" = yes; then
4636 case $host_os in aix4.[[012]]|aix4.[[012]].*)
4637 # We only want to do this on AIX 4.2 and lower, the check
4638 # below for broken collect2 doesn't work under 4.3+
4639 collect2name=`${CC} -print-prog-name=collect2`
4640 if test -f "$collect2name" && \
4641 strings "$collect2name" | grep resolve_lib_name >/dev/null
4642 then
4643 # We have reworked collect2
4644 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4645 else
4646 # We have old collect2
4647 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4648 # It fails to find uninstalled libraries when the uninstalled
4649 # path is not listed in the libpath. Setting hardcode_minus_L
4650 # to unsupported forces relinking
4651 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4652 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4653 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4654 fi
4655 esac
4656 shared_flag='-shared'
4657 if test "$aix_use_runtimelinking" = yes; then
4658 shared_flag="$shared_flag "'${wl}-G'
4659 fi
4660 else
4661 # not using gcc
4662 if test "$host_cpu" = ia64; then
4663 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4664 # chokes on -Wl,-G. The following line is correct:
4665 shared_flag='-G'
4666 else
4667 if test "$aix_use_runtimelinking" = yes; then
4668 shared_flag='${wl}-G'
4669 else
4670 shared_flag='${wl}-bM:SRE'
4671 fi
4672 fi
4673 fi
4674
4675 # It seems that -bexpall does not export symbols beginning with
4676 # underscore (_), so it is better to generate a list of symbols to export.
4677 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4678 if test "$aix_use_runtimelinking" = yes; then
4679 # Warning - without using the other runtime loading flags (-brtl),
4680 # -berok will link without error, but may produce a broken library.
4681 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4682 # Determine the default libpath from the value encoded in an empty executable.
4683 _LT_AC_SYS_LIBPATH_AIX
4684 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4685
4686 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4687 else
4688 if test "$host_cpu" = ia64; then
4689 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4690 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4691 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
4692 else
4693 # Determine the default libpath from the value encoded in an empty executable.
4694 _LT_AC_SYS_LIBPATH_AIX
4695 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4696 # Warning - without using the other run time loading flags,
4697 # -berok will link without error, but may produce a broken library.
4698 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4699 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4700 # -bexpall does not export symbols beginning with underscore (_)
4701 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4702 # Exported symbols can be pulled into shared objects from archives
4703 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
4704 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4705 # This is similar to how AIX traditionally builds its shared libraries.
4706 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
4707 fi
4708 fi
4709 ;;
4710 chorus*)
4711 case $cc_basename in
4712 *)
4713 # FIXME: insert proper C++ library support
4714 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4715 ;;
4716 esac
4717 ;;
4718
4719
4720 cygwin* | mingw* | pw32*)
4721 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4722 # as there is no search path for DLLs.
4723 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4724 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4725 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4726 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4727
4728 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4729 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
4730 # If the export-symbols file already is a .def file (1st line
4731 # is EXPORTS), use it as is; otherwise, prepend...
4732 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4733 cp $export_symbols $output_objdir/$soname.def;
4734 else
4735 echo EXPORTS > $output_objdir/$soname.def;
4736 cat $export_symbols >> $output_objdir/$soname.def;
4737 fi~
4738 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
4739 else
4740 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4741 fi
4742 ;;
4743 darwin* | rhapsody*)
4744 case $host_os in
4745 rhapsody* | darwin1.[[012]])
4746 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
4747 ;;
4748 *) # Darwin 1.3 on
4749 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
4750 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4751 else
4752 case ${MACOSX_DEPLOYMENT_TARGET} in
4753 10.[[012]])
4754 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
4755 ;;
4756 10.*)
4757 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
4758 ;;
4759 esac
4760 fi
4761 ;;
4762 esac
4763 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4764 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4765 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4766 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4767 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4768 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4769
4770 if test "$GXX" = yes ; then
4771 lt_int_apple_cc_single_mod=no
4772 output_verbose_link_cmd='echo'
4773 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
4774 lt_int_apple_cc_single_mod=yes
4775 fi
4776 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4777 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4778 else
4779 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
4780 fi
4781 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4782 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4783 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
4784 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4785 else
4786 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4787 fi
4788 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4789 else
4790 case $cc_basename in
4791 xlc*)
4792 output_verbose_link_cmd='echo'
4793 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
4794 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4795 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4796 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4797 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4798 ;;
4799 *)
4800 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4801 ;;
4802 esac
4803 fi
4804 ;;
4805
4806 dgux*)
4807 case $cc_basename in
4808 ec++*)
4809 # FIXME: insert proper C++ library support
4810 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4811 ;;
4812 ghcx*)
4813 # Green Hills C++ Compiler
4814 # FIXME: insert proper C++ library support
4815 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4816 ;;
4817 *)
4818 # FIXME: insert proper C++ library support
4819 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4820 ;;
4821 esac
4822 ;;
4823 freebsd[[12]]*)
4824 # C++ shared libraries reported to be fairly broken before switch to ELF
4825 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4826 ;;
4827 freebsd-elf*)
4828 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4829 ;;
4830 freebsd* | kfreebsd*-gnu | dragonfly*)
4831 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4832 # conventions
4833 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4834 ;;
4835 gnu*)
4836 ;;
4837 hpux9*)
4838 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4839 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4840 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4841 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4842 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4843 # but as the default
4844 # location of the library.
4845
4846 case $cc_basename in
4847 CC*)
4848 # FIXME: insert proper C++ library support
4849 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4850 ;;
4851 aCC*)
4852 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4853 # Commands to make compiler produce verbose output that lists
4854 # what "hidden" libraries, object files and flags are used when
4855 # linking a shared library.
4856 #
4857 # There doesn't appear to be a way to prevent this compiler from
4858 # explicitly linking system object files so we need to strip them
4859 # from the output so that they don't get included in the library
4860 # dependencies.
4861 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4862 ;;
4863 *)
4864 if test "$GXX" = yes; then
4865 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
4866 else
4867 # FIXME: insert proper C++ library support
4868 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4869 fi
4870 ;;
4871 esac
4872 ;;
4873 hpux10*|hpux11*)
4874 if test $with_gnu_ld = no; then
4875 case $host_cpu in
4876 hppa*64*)
4877 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4878 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4879 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4880 ;;
4881 ia64*)
4882 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4883 ;;
4884 *)
4885 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4886 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4887 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4888 ;;
4889 esac
4890 fi
4891 case $host_cpu in
4892 hppa*64*)
4893 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4894 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4895 ;;
4896 ia64*)
4897 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4898 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4899 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4900 # but as the default
4901 # location of the library.
4902 ;;
4903 *)
4904 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4905 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4906 # but as the default
4907 # location of the library.
4908 ;;
4909 esac
4910
4911 case $cc_basename in
4912 CC*)
4913 # FIXME: insert proper C++ library support
4914 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4915 ;;
4916 aCC*)
4917 case $host_cpu in
4918 hppa*64*|ia64*)
4919 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4920 ;;
4921 *)
4922 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4923 ;;
4924 esac
4925 # Commands to make compiler produce verbose output that lists
4926 # what "hidden" libraries, object files and flags are used when
4927 # linking a shared library.
4928 #
4929 # There doesn't appear to be a way to prevent this compiler from
4930 # explicitly linking system object files so we need to strip them
4931 # from the output so that they don't get included in the library
4932 # dependencies.
4933 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4934 ;;
4935 *)
4936 if test "$GXX" = yes; then
4937 if test $with_gnu_ld = no; then
4938 case $host_cpu in
4939 ia64*|hppa*64*)
4940 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
4941 ;;
4942 *)
4943 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4944 ;;
4945 esac
4946 fi
4947 else
4948 # FIXME: insert proper C++ library support
4949 _LT_AC_TAGVAR(ld_shlibs, $1)=no
4950 fi
4951 ;;
4952 esac
4953 ;;
4954 irix5* | irix6*)
4955 case $cc_basename in
4956 CC*)
4957 # SGI C++
4958 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4959
4960 # Archives containing C++ object files must be created using
4961 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
4962 # necessary to make sure instantiated templates are included
4963 # in the archive.
4964 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4965 ;;
4966 *)
4967 if test "$GXX" = yes; then
4968 if test "$with_gnu_ld" = no; then
4969 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4970 else
4971 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
4972 fi
4973 fi
4974 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4975 ;;
4976 esac
4977 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4978 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4979 ;;
4980 linux*)
4981 case $cc_basename in
4982 KCC*)
4983 # Kuck and Associates, Inc. (KAI) C++ Compiler
4984
4985 # KCC will only create a shared library if the output file
4986 # ends with ".so" (or ".sl" for HP-UX), so rename the library
4987 # to its proper name (with version) after linking.
4988 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
4989 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
4990 # Commands to make compiler produce verbose output that lists
4991 # what "hidden" libraries, object files and flags are used when
4992 # linking a shared library.
4993 #
4994 # There doesn't appear to be a way to prevent this compiler from
4995 # explicitly linking system object files so we need to strip them
4996 # from the output so that they don't get included in the library
4997 # dependencies.
4998 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4999
5000 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
5001 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5002
5003 # Archives containing C++ object files must be created using
5004 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5005 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5006 ;;
5007 icpc*)
5008 # Intel C++
5009 with_gnu_ld=yes
5010 # version 8.0 and above of icpc choke on multiply defined symbols
5011 # if we add $predep_objects and $postdep_objects, however 7.1 and
5012 # earlier do not add the objects themselves.
5013 case `$CC -V 2>&1` in
5014 *"Version 7."*)
5015 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5016 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5017 ;;
5018 *) # Version 8.0 or newer
5019 tmp_idyn=
5020 case $host_cpu in
5021 ia64*) tmp_idyn=' -i_dynamic';;
5022 esac
5023 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5024 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5025 ;;
5026 esac
5027 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5028 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5029 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5030 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5031 ;;
5032 pgCC*)
5033 # Portland Group C++ compiler
5034 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5035 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
5036
5037 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5038 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5039 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5040 ;;
5041 cxx*)
5042 # Compaq C++
5043 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5044 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
5045
5046 runpath_var=LD_RUN_PATH
5047 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5048 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5049
5050 # Commands to make compiler produce verbose output that lists
5051 # what "hidden" libraries, object files and flags are used when
5052 # linking a shared library.
5053 #
5054 # There doesn't appear to be a way to prevent this compiler from
5055 # explicitly linking system object files so we need to strip them
5056 # from the output so that they don't get included in the library
5057 # dependencies.
5058 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5059 ;;
5060 esac
5061 ;;
5062 lynxos*)
5063 # FIXME: insert proper C++ library support
5064 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5065 ;;
5066 m88k*)
5067 # FIXME: insert proper C++ library support
5068 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5069 ;;
5070 mvs*)
5071 case $cc_basename in
5072 cxx*)
5073 # FIXME: insert proper C++ library support
5074 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5075 ;;
5076 *)
5077 # FIXME: insert proper C++ library support
5078 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5079 ;;
5080 esac
5081 ;;
5082 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
5083 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5084 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
5085 wlarc=
5086 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5087 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5088 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5089 fi
5090 # Workaround some broken pre-1.5 toolchains
5091 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
5092 ;;
5093 openbsd2*)
5094 # C++ shared libraries are fairly broken
5095 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5096 ;;
5097 openbsd*)
5098 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5099 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5100 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5101 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5102 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5103 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
5104 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5105 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5106 fi
5107 output_verbose_link_cmd='echo'
5108 ;;
5109 osf3*)
5110 case $cc_basename in
5111 KCC*)
5112 # Kuck and Associates, Inc. (KAI) C++ Compiler
5113
5114 # KCC will only create a shared library if the output file
5115 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5116 # to its proper name (with version) after linking.
5117 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
5118
5119 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5120 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5121
5122 # Archives containing C++ object files must be created using
5123 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
5124 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5125
5126 ;;
5127 RCC*)
5128 # Rational C++ 2.4.1
5129 # FIXME: insert proper C++ library support
5130 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5131 ;;
5132 cxx*)
5133 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5134 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5135
5136 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5137 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5138
5139 # Commands to make compiler produce verbose output that lists
5140 # what "hidden" libraries, object files and flags are used when
5141 # linking a shared library.
5142 #
5143 # There doesn't appear to be a way to prevent this compiler from
5144 # explicitly linking system object files so we need to strip them
5145 # from the output so that they don't get included in the library
5146 # dependencies.
5147 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5148 ;;
5149 *)
5150 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5151 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5152 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5153
5154 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5155 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5156
5157 # Commands to make compiler produce verbose output that lists
5158 # what "hidden" libraries, object files and flags are used when
5159 # linking a shared library.
5160 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5161
5162 else
5163 # FIXME: insert proper C++ library support
5164 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5165 fi
5166 ;;
5167 esac
5168 ;;
5169 osf4* | osf5*)
5170 case $cc_basename in
5171 KCC*)
5172 # Kuck and Associates, Inc. (KAI) C++ Compiler
5173
5174 # KCC will only create a shared library if the output file
5175 # ends with ".so" (or ".sl" for HP-UX), so rename the library
5176 # to its proper name (with version) after linking.
5177 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
5178
5179 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5180 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5181
5182 # Archives containing C++ object files must be created using
5183 # the KAI C++ compiler.
5184 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
5185 ;;
5186 RCC*)
5187 # Rational C++ 2.4.1
5188 # FIXME: insert proper C++ library support
5189 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5190 ;;
5191 cxx*)
5192 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5193 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5194 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5195 echo "-hidden">> $lib.exp~
5196 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
5197 $rm $lib.exp'
5198
5199 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5200 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5201
5202 # Commands to make compiler produce verbose output that lists
5203 # what "hidden" libraries, object files and flags are used when
5204 # linking a shared library.
5205 #
5206 # There doesn't appear to be a way to prevent this compiler from
5207 # explicitly linking system object files so we need to strip them
5208 # from the output so that they don't get included in the library
5209 # dependencies.
5210 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5211 ;;
5212 *)
5213 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5214 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5215 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5216
5217 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5218 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5219
5220 # Commands to make compiler produce verbose output that lists
5221 # what "hidden" libraries, object files and flags are used when
5222 # linking a shared library.
5223 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5224
5225 else
5226 # FIXME: insert proper C++ library support
5227 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5228 fi
5229 ;;
5230 esac
5231 ;;
5232 psos*)
5233 # FIXME: insert proper C++ library support
5234 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5235 ;;
5236 sco*)
5237 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5238 case $cc_basename in
5239 CC*)
5240 # FIXME: insert proper C++ library support
5241 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5242 ;;
5243 *)
5244 # FIXME: insert proper C++ library support
5245 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5246 ;;
5247 esac
5248 ;;
5249 sunos4*)
5250 case $cc_basename in
5251 CC*)
5252 # Sun C++ 4.x
5253 # FIXME: insert proper C++ library support
5254 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5255 ;;
5256 lcc*)
5257 # Lucid
5258 # FIXME: insert proper C++ library support
5259 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5260 ;;
5261 *)
5262 # FIXME: insert proper C++ library support
5263 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5264 ;;
5265 esac
5266 ;;
5267 solaris*)
5268 case $cc_basename in
5269 CC*)
5270 # Sun C++ 4.2, 5.x and Centerline C++
5271 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
5272 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5273 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5274 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5275 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5276
5277 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5278 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5279 case $host_os in
5280 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5281 *)
5282 # The C++ compiler is used as linker so we must use $wl
5283 # flag to pass the commands to the underlying system
5284 # linker. We must also pass each convience library through
5285 # to the system linker between allextract/defaultextract.
5286 # The C++ compiler will combine linker options so we
5287 # cannot just pass the convience library names through
5288 # without $wl.
5289 # Supported since Solaris 2.6 (maybe 2.5.1?)
5290 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
5291 ;;
5292 esac
5293 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5294
5295 output_verbose_link_cmd='echo'
5296
5297 # Archives containing C++ object files must be created using
5298 # "CC -xar", where "CC" is the Sun C++ compiler. This is
5299 # necessary to make sure instantiated templates are included
5300 # in the archive.
5301 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5302 ;;
5303 gcx*)
5304 # Green Hills C++ Compiler
5305 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5306
5307 # The C++ compiler must be used to create the archive.
5308 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
5309 ;;
5310 *)
5311 # GNU C++ compiler with Solaris linker
5312 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5313 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
5314 if $CC --version | grep -v '^2\.7' > /dev/null; then
5315 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5316 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5317 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5318
5319 # Commands to make compiler produce verbose output that lists
5320 # what "hidden" libraries, object files and flags are used when
5321 # linking a shared library.
5322 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
5323 else
5324 # g++ 2.7 appears to require `-G' NOT `-shared' on this
5325 # platform.
5326 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5327 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5328 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5329
5330 # Commands to make compiler produce verbose output that lists
5331 # what "hidden" libraries, object files and flags are used when
5332 # linking a shared library.
5333 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
5334 fi
5335
5336 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
5337 fi
5338 ;;
5339 esac
5340 ;;
5341 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
5342 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5343 ;;
5344 tandem*)
5345 case $cc_basename in
5346 NCC*)
5347 # NonStop-UX NCC 3.20
5348 # FIXME: insert proper C++ library support
5349 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5350 ;;
5351 *)
5352 # FIXME: insert proper C++ library support
5353 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5354 ;;
5355 esac
5356 ;;
5357 vxworks*)
5358 # FIXME: insert proper C++ library support
5359 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5360 ;;
5361 *)
5362 # FIXME: insert proper C++ library support
5363 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5364 ;;
5365 esac
5366 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5367 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5368
5369 _LT_AC_TAGVAR(GCC, $1)="$GXX"
5370 _LT_AC_TAGVAR(LD, $1)="$LD"
5371
5372 AC_LIBTOOL_POSTDEP_PREDEP($1)
5373 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5374 AC_LIBTOOL_PROG_CC_C_O($1)
5375 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5376 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5377 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5378 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5379 AC_LIBTOOL_SYS_LIB_STRIP
5380 AC_LIBTOOL_DLOPEN_SELF($1)
5381
5382 AC_LIBTOOL_CONFIG($1)
5383
5384 AC_LANG_POP
5385 CC=$lt_save_CC
5386 LDCXX=$LD
5387 LD=$lt_save_LD
5388 GCC=$lt_save_GCC
5389 with_gnu_ldcxx=$with_gnu_ld
5390 with_gnu_ld=$lt_save_with_gnu_ld
5391 lt_cv_path_LDCXX=$lt_cv_path_LD
5392 lt_cv_path_LD=$lt_save_path_LD
5393 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
5394 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
5395 ])# AC_LIBTOOL_LANG_CXX_CONFIG
5396
5397 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
5398 # ------------------------
5399 # Figure out "hidden" library dependencies from verbose
5400 # compiler output when linking a shared library.
5401 # Parse the compiler output and extract the necessary
5402 # objects, libraries and library flags.
5403 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
5404 dnl we can't use the lt_simple_compile_test_code here,
5405 dnl because it contains code intended for an executable,
5406 dnl not a library. It's possible we should let each
5407 dnl tag define a new lt_????_link_test_code variable,
5408 dnl but it's only used here...
5409 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
5410 int a;
5411 void foo (void) { a = 0; }
5412 EOF
5413 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
5414 class Foo
5415 {
5416 public:
5417 Foo (void) { a = 0; }
5418 private:
5419 int a;
5420 };
5421 EOF
5422 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
5423 subroutine foo
5424 implicit none
5425 integer*4 a
5426 a=0
5427 return
5428 end
5429 EOF
5430 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
5431 public class foo {
5432 private int a;
5433 public void bar (void) {
5434 a = 0;
5435 }
5436 };
5437 EOF
5438 ])
5439 dnl Parse the compiler output and extract the necessary
5440 dnl objects, libraries and library flags.
5441 if AC_TRY_EVAL(ac_compile); then
5442 # Parse the compiler output and extract the necessary
5443 # objects, libraries and library flags.
5444
5445 # Sentinel used to keep track of whether or not we are before
5446 # the conftest object file.
5447 pre_test_object_deps_done=no
5448
5449 # The `*' in the case matches for architectures that use `case' in
5450 # $output_verbose_cmd can trigger glob expansion during the loop
5451 # eval without this substitution.
5452 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
5453
5454 for p in `eval $output_verbose_link_cmd`; do
5455 case $p in
5456
5457 -L* | -R* | -l*)
5458 # Some compilers place space between "-{L,R}" and the path.
5459 # Remove the space.
5460 if test $p = "-L" \
5461 || test $p = "-R"; then
5462 prev=$p
5463 continue
5464 else
5465 prev=
5466 fi
5467
5468 if test "$pre_test_object_deps_done" = no; then
5469 case $p in
5470 -L* | -R*)
5471 # Internal compiler library paths should come after those
5472 # provided the user. The postdeps already come after the
5473 # user supplied libs so there is no need to process them.
5474 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
5475 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
5476 else
5477 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
5478 fi
5479 ;;
5480 # The "-l" case would never come before the object being
5481 # linked, so don't bother handling this case.
5482 esac
5483 else
5484 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
5485 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
5486 else
5487 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
5488 fi
5489 fi
5490 ;;
5491
5492 *.$objext)
5493 # This assumes that the test object file only shows up
5494 # once in the compiler output.
5495 if test "$p" = "conftest.$objext"; then
5496 pre_test_object_deps_done=yes
5497 continue
5498 fi
5499
5500 if test "$pre_test_object_deps_done" = no; then
5501 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
5502 _LT_AC_TAGVAR(predep_objects, $1)="$p"
5503 else
5504 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
5505 fi
5506 else
5507 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
5508 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
5509 else
5510 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
5511 fi
5512 fi
5513 ;;
5514
5515 *) ;; # Ignore the rest.
5516
5517 esac
5518 done
5519
5520 # Clean up.
5521 rm -f a.out a.exe
5522 else
5523 echo "libtool.m4: error: problem compiling $1 test program"
5524 fi
5525
5526 $rm -f confest.$objext
5527
5528 # PORTME: override above test on systems where it is broken
5529 ifelse([$1],[CXX],
5530 [case $host_os in
5531 solaris*)
5532 case $cc_basename in
5533 CC*)
5534 # Adding this requires a known-good setup of shared libraries for
5535 # Sun compiler versions before 5.6, else PIC objects from an old
5536 # archive will be linked into the output, leading to subtle bugs.
5537 _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
5538 ;;
5539 esac
5540 esac
5541 ])
5542
5543 case " $_LT_AC_TAGVAR(postdeps, $1) " in
5544 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
5545 esac
5546 ])# AC_LIBTOOL_POSTDEP_PREDEP
5547
5548 # AC_LIBTOOL_LANG_F77_CONFIG
5549 # ------------------------
5550 # Ensure that the configuration vars for the C compiler are
5551 # suitably defined. Those variables are subsequently used by
5552 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5553 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
5554 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
5555 [AC_REQUIRE([AC_PROG_F77])
5556 AC_LANG_PUSH(Fortran 77)
5557
5558 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5559 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5560 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5561 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5562 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5563 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5564 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5565 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5566 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5567 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5568 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5569 _LT_AC_TAGVAR(module_cmds, $1)=
5570 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5571 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5572 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5573 _LT_AC_TAGVAR(no_undefined_flag, $1)=
5574 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5575 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5576
5577 # Source file extension for f77 test sources.
5578 ac_ext=f
5579
5580 # Object file extension for compiled f77 test sources.
5581 objext=o
5582 _LT_AC_TAGVAR(objext, $1)=$objext
5583
5584 # Code to be used in simple compile tests
5585 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
5586
5587 # Code to be used in simple link tests
5588 lt_simple_link_test_code=" program t\n end\n"
5589
5590 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5591 _LT_AC_SYS_COMPILER
5592
5593 # save warnings/boilerplate of simple test code
5594 _LT_COMPILER_BOILERPLATE
5595 _LT_LINKER_BOILERPLATE
5596
5597 # Allow CC to be a program name with arguments.
5598 lt_save_CC="$CC"
5599 CC=${F77-"f77"}
5600 compiler=$CC
5601 _LT_AC_TAGVAR(compiler, $1)=$CC
5602 _LT_CC_BASENAME([$compiler])
5603
5604 AC_MSG_CHECKING([if libtool supports shared libraries])
5605 AC_MSG_RESULT([$can_build_shared])
5606
5607 AC_MSG_CHECKING([whether to build shared libraries])
5608 test "$can_build_shared" = "no" && enable_shared=no
5609
5610 # On AIX, shared libraries and static libraries use the same namespace, and
5611 # are all built from PIC.
5612 case $host_os in
5613 aix3*)
5614 test "$enable_shared" = yes && enable_static=no
5615 if test -n "$RANLIB"; then
5616 archive_cmds="$archive_cmds~\$RANLIB \$lib"
5617 postinstall_cmds='$RANLIB $lib'
5618 fi
5619 ;;
5620 aix4* | aix5*)
5621 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5622 test "$enable_shared" = yes && enable_static=no
5623 fi
5624 ;;
5625 esac
5626 AC_MSG_RESULT([$enable_shared])
5627
5628 AC_MSG_CHECKING([whether to build static libraries])
5629 # Make sure either enable_shared or enable_static is yes.
5630 test "$enable_shared" = yes || enable_static=yes
5631 AC_MSG_RESULT([$enable_static])
5632
5633 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5634
5635 _LT_AC_TAGVAR(GCC, $1)="$G77"
5636 _LT_AC_TAGVAR(LD, $1)="$LD"
5637
5638 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5639 AC_LIBTOOL_PROG_CC_C_O($1)
5640 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5641 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5642 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5643 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5644 AC_LIBTOOL_SYS_LIB_STRIP
5645
5646
5647 AC_LIBTOOL_CONFIG($1)
5648
5649 AC_LANG_POP
5650 CC="$lt_save_CC"
5651 ])# AC_LIBTOOL_LANG_F77_CONFIG
5652
5653
5654 # AC_LIBTOOL_LANG_GCJ_CONFIG
5655 # --------------------------
5656 # Ensure that the configuration vars for the C compiler are
5657 # suitably defined. Those variables are subsequently used by
5658 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5659 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5660 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5661 [AC_LANG_SAVE
5662
5663 # Source file extension for Java test sources.
5664 ac_ext=java
5665
5666 # Object file extension for compiled Java test sources.
5667 objext=o
5668 _LT_AC_TAGVAR(objext, $1)=$objext
5669
5670 # Code to be used in simple compile tests
5671 lt_simple_compile_test_code="class foo {}\n"
5672
5673 # Code to be used in simple link tests
5674 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
5675
5676 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5677 _LT_AC_SYS_COMPILER
5678
5679 # save warnings/boilerplate of simple test code
5680 _LT_COMPILER_BOILERPLATE
5681 _LT_LINKER_BOILERPLATE
5682
5683 # Allow CC to be a program name with arguments.
5684 lt_save_CC="$CC"
5685 CC=${GCJ-"gcj"}
5686 compiler=$CC
5687 _LT_AC_TAGVAR(compiler, $1)=$CC
5688 _LT_CC_BASENAME([$compiler])
5689
5690 # GCJ did not exist at the time GCC didn't implicitly link libc in.
5691 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5692
5693 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5694
5695 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5696 AC_LIBTOOL_PROG_COMPILER_PIC($1)
5697 AC_LIBTOOL_PROG_CC_C_O($1)
5698 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5699 AC_LIBTOOL_PROG_LD_SHLIBS($1)
5700 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5701 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5702 AC_LIBTOOL_SYS_LIB_STRIP
5703 AC_LIBTOOL_DLOPEN_SELF($1)
5704
5705 AC_LIBTOOL_CONFIG($1)
5706
5707 AC_LANG_RESTORE
5708 CC="$lt_save_CC"
5709 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
5710
5711
5712 # AC_LIBTOOL_LANG_RC_CONFIG
5713 # --------------------------
5714 # Ensure that the configuration vars for the Windows resource compiler are
5715 # suitably defined. Those variables are subsequently used by
5716 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5717 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5718 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5719 [AC_LANG_SAVE
5720
5721 # Source file extension for RC test sources.
5722 ac_ext=rc
5723
5724 # Object file extension for compiled RC test sources.
5725 objext=o
5726 _LT_AC_TAGVAR(objext, $1)=$objext
5727
5728 # Code to be used in simple compile tests
5729 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
5730
5731 # Code to be used in simple link tests
5732 lt_simple_link_test_code="$lt_simple_compile_test_code"
5733
5734 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
5735 _LT_AC_SYS_COMPILER
5736
5737 # save warnings/boilerplate of simple test code
5738 _LT_COMPILER_BOILERPLATE
5739 _LT_LINKER_BOILERPLATE
5740
5741 # Allow CC to be a program name with arguments.
5742 lt_save_CC="$CC"
5743 CC=${RC-"windres"}
5744 compiler=$CC
5745 _LT_AC_TAGVAR(compiler, $1)=$CC
5746 _LT_CC_BASENAME([$compiler])
5747 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5748
5749 AC_LIBTOOL_CONFIG($1)
5750
5751 AC_LANG_RESTORE
5752 CC="$lt_save_CC"
5753 ])# AC_LIBTOOL_LANG_RC_CONFIG
5754
5755
5756 # AC_LIBTOOL_CONFIG([TAGNAME])
5757 # ----------------------------
5758 # If TAGNAME is not passed, then create an initial libtool script
5759 # with a default configuration from the untagged config vars. Otherwise
5760 # add code to config.status for appending the configuration named by
5761 # TAGNAME from the matching tagged config vars.
5762 AC_DEFUN([AC_LIBTOOL_CONFIG],
5763 [# The else clause should only fire when bootstrapping the
5764 # libtool distribution, otherwise you forgot to ship ltmain.sh
5765 # with your package, and you will get complaints that there are
5766 # no rules to generate ltmain.sh.
5767 if test -f "$ltmain"; then
5768 # See if we are running on zsh, and set the options which allow our commands through
5769 # without removal of \ escapes.
5770 if test -n "${ZSH_VERSION+set}" ; then
5771 setopt NO_GLOB_SUBST
5772 fi
5773 # Now quote all the things that may contain metacharacters while being
5774 # careful not to overquote the AC_SUBSTed values. We take copies of the
5775 # variables and quote the copies for generation of the libtool script.
5776 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
5777 SED SHELL STRIP \
5778 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5779 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5780 deplibs_check_method reload_flag reload_cmds need_locks \
5781 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5782 lt_cv_sys_global_symbol_to_c_name_address \
5783 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5784 old_postinstall_cmds old_postuninstall_cmds \
5785 _LT_AC_TAGVAR(compiler, $1) \
5786 _LT_AC_TAGVAR(CC, $1) \
5787 _LT_AC_TAGVAR(LD, $1) \
5788 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5789 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5790 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5791 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5792 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5793 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5794 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5795 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5796 _LT_AC_TAGVAR(old_archive_cmds, $1) \
5797 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5798 _LT_AC_TAGVAR(predep_objects, $1) \
5799 _LT_AC_TAGVAR(postdep_objects, $1) \
5800 _LT_AC_TAGVAR(predeps, $1) \
5801 _LT_AC_TAGVAR(postdeps, $1) \
5802 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5803 _LT_AC_TAGVAR(archive_cmds, $1) \
5804 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5805 _LT_AC_TAGVAR(postinstall_cmds, $1) \
5806 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5807 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5808 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5809 _LT_AC_TAGVAR(no_undefined_flag, $1) \
5810 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5811 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5812 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5813 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5814 _LT_AC_TAGVAR(hardcode_automatic, $1) \
5815 _LT_AC_TAGVAR(module_cmds, $1) \
5816 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5817 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5818 _LT_AC_TAGVAR(exclude_expsyms, $1) \
5819 _LT_AC_TAGVAR(include_expsyms, $1); do
5820
5821 case $var in
5822 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5823 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5824 _LT_AC_TAGVAR(archive_cmds, $1) | \
5825 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5826 _LT_AC_TAGVAR(module_cmds, $1) | \
5827 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5828 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5829 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5830 extract_expsyms_cmds | reload_cmds | finish_cmds | \
5831 postinstall_cmds | postuninstall_cmds | \
5832 old_postinstall_cmds | old_postuninstall_cmds | \
5833 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5834 # Double-quote double-evaled strings.
5835 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5836 ;;
5837 *)
5838 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5839 ;;
5840 esac
5841 done
5842
5843 case $lt_echo in
5844 *'\[$]0 --fallback-echo"')
5845 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5846 ;;
5847 esac
5848
5849 ifelse([$1], [],
5850 [cfgfile="${ofile}T"
5851 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5852 $rm -f "$cfgfile"
5853 AC_MSG_NOTICE([creating $ofile])],
5854 [cfgfile="$ofile"])
5855
5856 cat <<__EOF__ >> "$cfgfile"
5857 ifelse([$1], [],
5858 [#! $SHELL
5859
5860 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5861 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5862 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
5863 #
5864 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5865 # Free Software Foundation, Inc.
5866 #
5867 # This file is part of GNU Libtool:
5868 # Originally by Gordon Matzigkeit <[email protected]>, 1996
5869 #
5870 # This program is free software; you can redistribute it and/or modify
5871 # it under the terms of the GNU General Public License as published by
5872 # the Free Software Foundation; either version 2 of the License, or
5873 # (at your option) any later version.
5874 #
5875 # This program is distributed in the hope that it will be useful, but
5876 # WITHOUT ANY WARRANTY; without even the implied warranty of
5877 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5878 # General Public License for more details.
5879 #
5880 # You should have received a copy of the GNU General Public License
5881 # along with this program; if not, write to the Free Software
5882 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5883 #
5884 # As a special exception to the GNU General Public License, if you
5885 # distribute this file as part of a program that contains a
5886 # configuration script generated by Autoconf, you may include it under
5887 # the same distribution terms that you use for the rest of that program.
5888
5889 # A sed program that does not truncate output.
5890 SED=$lt_SED
5891
5892 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
5893 Xsed="$SED -e 1s/^X//"
5894
5895 # The HP-UX ksh and POSIX shell print the target directory to stdout
5896 # if CDPATH is set.
5897 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5898
5899 # The names of the tagged configurations supported by this script.
5900 available_tags=
5901
5902 # ### BEGIN LIBTOOL CONFIG],
5903 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5904
5905 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5906
5907 # Shell to use when invoking shell scripts.
5908 SHELL=$lt_SHELL
5909
5910 # Whether or not to build shared libraries.
5911 build_libtool_libs=$enable_shared
5912
5913 # Whether or not to build static libraries.
5914 build_old_libs=$enable_static
5915
5916 # Whether or not to add -lc for building shared libraries.
5917 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5918
5919 # Whether or not to disallow shared libs when runtime libs are static
5920 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5921
5922 # Whether or not to optimize for fast installation.
5923 fast_install=$enable_fast_install
5924
5925 # The host system.
5926 host_alias=$host_alias
5927 host=$host
5928 host_os=$host_os
5929
5930 # The build system.
5931 build_alias=$build_alias
5932 build=$build
5933 build_os=$build_os
5934
5935 # An echo program that does not interpret backslashes.
5936 echo=$lt_echo
5937
5938 # The archiver.
5939 AR=$lt_AR
5940 AR_FLAGS=$lt_AR_FLAGS
5941
5942 # A C compiler.
5943 LTCC=$lt_LTCC
5944
5945 # A language-specific compiler.
5946 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5947
5948 # Is the compiler the GNU C compiler?
5949 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5950
5951 # An ERE matcher.
5952 EGREP=$lt_EGREP
5953
5954 # The linker used to build libraries.
5955 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5956
5957 # Whether we need hard or soft links.
5958 LN_S=$lt_LN_S
5959
5960 # A BSD-compatible nm program.
5961 NM=$lt_NM
5962
5963 # A symbol stripping program
5964 STRIP=$lt_STRIP
5965
5966 # Used to examine libraries when file_magic_cmd begins "file"
5967 MAGIC_CMD=$MAGIC_CMD
5968
5969 # Used on cygwin: DLL creation program.
5970 DLLTOOL="$DLLTOOL"
5971
5972 # Used on cygwin: object dumper.
5973 OBJDUMP="$OBJDUMP"
5974
5975 # Used on cygwin: assembler.
5976 AS="$AS"
5977
5978 # The name of the directory that contains temporary libtool files.
5979 objdir=$objdir
5980
5981 # How to create reloadable object files.
5982 reload_flag=$lt_reload_flag
5983 reload_cmds=$lt_reload_cmds
5984
5985 # How to pass a linker flag through the compiler.
5986 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5987
5988 # Object file suffix (normally "o").
5989 objext="$ac_objext"
5990
5991 # Old archive suffix (normally "a").
5992 libext="$libext"
5993
5994 # Shared library suffix (normally ".so").
5995 shrext_cmds='$shrext_cmds'
5996
5997 # Executable file suffix (normally "").
5998 exeext="$exeext"
5999
6000 # Additional compiler flags for building library objects.
6001 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6002 pic_mode=$pic_mode
6003
6004 # What is the maximum length of a command?
6005 max_cmd_len=$lt_cv_sys_max_cmd_len
6006
6007 # Does compiler simultaneously support -c and -o options?
6008 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
6009
6010 # Must we lock files when doing compilation?
6011 need_locks=$lt_need_locks
6012
6013 # Do we need the lib prefix for modules?
6014 need_lib_prefix=$need_lib_prefix
6015
6016 # Do we need a version for libraries?
6017 need_version=$need_version
6018
6019 # Whether dlopen is supported.
6020 dlopen_support=$enable_dlopen
6021
6022 # Whether dlopen of programs is supported.
6023 dlopen_self=$enable_dlopen_self
6024
6025 # Whether dlopen of statically linked programs is supported.
6026 dlopen_self_static=$enable_dlopen_self_static
6027
6028 # Compiler flag to prevent dynamic linking.
6029 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
6030
6031 # Compiler flag to turn off builtin functions.
6032 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
6033
6034 # Compiler flag to allow reflexive dlopens.
6035 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
6036
6037 # Compiler flag to generate shared objects directly from archives.
6038 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
6039
6040 # Compiler flag to generate thread-safe objects.
6041 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
6042
6043 # Library versioning type.
6044 version_type=$version_type
6045
6046 # Format of library name prefix.
6047 libname_spec=$lt_libname_spec
6048
6049 # List of archive names. First name is the real one, the rest are links.
6050 # The last name is the one that the linker finds with -lNAME.
6051 library_names_spec=$lt_library_names_spec
6052
6053 # The coded name of the library, if different from the real name.
6054 soname_spec=$lt_soname_spec
6055
6056 # Commands used to build and install an old-style archive.
6057 RANLIB=$lt_RANLIB
6058 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
6059 old_postinstall_cmds=$lt_old_postinstall_cmds
6060 old_postuninstall_cmds=$lt_old_postuninstall_cmds
6061
6062 # Create an old-style archive from a shared archive.
6063 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
6064
6065 # Create a temporary old-style archive to link instead of a shared archive.
6066 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
6067
6068 # Commands used to build and install a shared archive.
6069 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
6070 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
6071 postinstall_cmds=$lt_postinstall_cmds
6072 postuninstall_cmds=$lt_postuninstall_cmds
6073
6074 # Commands used to build a loadable module (assumed same as above if empty)
6075 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
6076 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
6077
6078 # Commands to strip libraries.
6079 old_striplib=$lt_old_striplib
6080 striplib=$lt_striplib
6081
6082 # Dependencies to place before the objects being linked to create a
6083 # shared library.
6084 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
6085
6086 # Dependencies to place after the objects being linked to create a
6087 # shared library.
6088 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
6089
6090 # Dependencies to place before the objects being linked to create a
6091 # shared library.
6092 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
6093
6094 # Dependencies to place after the objects being linked to create a
6095 # shared library.
6096 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
6097
6098 # The library search path used internally by the compiler when linking
6099 # a shared library.
6100 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
6101
6102 # Method to check whether dependent libraries are shared objects.
6103 deplibs_check_method=$lt_deplibs_check_method
6104
6105 # Command to use when deplibs_check_method == file_magic.
6106 file_magic_cmd=$lt_file_magic_cmd
6107
6108 # Flag that allows shared libraries with undefined symbols to be built.
6109 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
6110
6111 # Flag that forces no undefined symbols.
6112 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
6113
6114 # Commands used to finish a libtool library installation in a directory.
6115 finish_cmds=$lt_finish_cmds
6116
6117 # Same as above, but a single script fragment to be evaled but not shown.
6118 finish_eval=$lt_finish_eval
6119
6120 # Take the output of nm and produce a listing of raw symbols and C names.
6121 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
6122
6123 # Transform the output of nm in a proper C declaration
6124 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
6125
6126 # Transform the output of nm in a C name address pair
6127 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
6128
6129 # This is the shared library runtime path variable.
6130 runpath_var=$runpath_var
6131
6132 # This is the shared library path variable.
6133 shlibpath_var=$shlibpath_var
6134
6135 # Is shlibpath searched before the hard-coded library search path?
6136 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
6137
6138 # How to hardcode a shared library path into an executable.
6139 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
6140
6141 # Whether we should hardcode library paths into libraries.
6142 hardcode_into_libs=$hardcode_into_libs
6143
6144 # Flag to hardcode \$libdir into a binary during linking.
6145 # This must work even if \$libdir does not exist.
6146 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
6147
6148 # If ld is used when linking, flag to hardcode \$libdir into
6149 # a binary during linking. This must work even if \$libdir does
6150 # not exist.
6151 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
6152
6153 # Whether we need a single -rpath flag with a separated argument.
6154 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
6155
6156 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
6157 # resulting binary.
6158 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
6159
6160 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
6161 # resulting binary.
6162 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
6163
6164 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
6165 # the resulting binary.
6166 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
6167
6168 # Set to yes if building a shared library automatically hardcodes DIR into the library
6169 # and all subsequent libraries and executables linked against it.
6170 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
6171
6172 # Variables whose values should be saved in libtool wrapper scripts and
6173 # restored at relink time.
6174 variables_saved_for_relink="$variables_saved_for_relink"
6175
6176 # Whether libtool must link a program against all its dependency libraries.
6177 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
6178
6179 # Compile-time system search path for libraries
6180 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
6181
6182 # Run-time system search path for libraries
6183 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
6184
6185 # Fix the shell variable \$srcfile for the compiler.
6186 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
6187
6188 # Set to yes if exported symbols are required.
6189 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
6190
6191 # The commands to list exported symbols.
6192 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
6193
6194 # The commands to extract the exported symbol list from a shared archive.
6195 extract_expsyms_cmds=$lt_extract_expsyms_cmds
6196
6197 # Symbols that should not be listed in the preloaded symbols.
6198 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
6199
6200 # Symbols that must always be exported.
6201 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
6202
6203 ifelse([$1],[],
6204 [# ### END LIBTOOL CONFIG],
6205 [# ### END LIBTOOL TAG CONFIG: $tagname])
6206
6207 __EOF__
6208
6209 ifelse([$1],[], [
6210 case $host_os in
6211 aix3*)
6212 cat <<\EOF >> "$cfgfile"
6213
6214 # AIX sometimes has problems with the GCC collect2 program. For some
6215 # reason, if we set the COLLECT_NAMES environment variable, the problems
6216 # vanish in a puff of smoke.
6217 if test "X${COLLECT_NAMES+set}" != Xset; then
6218 COLLECT_NAMES=
6219 export COLLECT_NAMES
6220 fi
6221 EOF
6222 ;;
6223 esac
6224
6225 # We use sed instead of cat because bash on DJGPP gets confused if
6226 # if finds mixed CR/LF and LF-only lines. Since sed operates in
6227 # text mode, it properly converts lines to CR/LF. This bash problem
6228 # is reportedly fixed, but why not run on old versions too?
6229 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
6230
6231 mv -f "$cfgfile" "$ofile" || \
6232 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
6233 chmod +x "$ofile"
6234 ])
6235 else
6236 # If there is no Makefile yet, we rely on a make rule to execute
6237 # `config.status --recheck' to rerun these tests and create the
6238 # libtool script then.
6239 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
6240 if test -f "$ltmain_in"; then
6241 test -f Makefile && make "$ltmain"
6242 fi
6243 fi
6244 ])# AC_LIBTOOL_CONFIG
6245
6246
6247 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
6248 # -------------------------------------------
6249 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
6250 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6251
6252 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6253
6254 if test "$GCC" = yes; then
6255 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6256
6257 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
6258 lt_cv_prog_compiler_rtti_exceptions,
6259 [-fno-rtti -fno-exceptions], [],
6260 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
6261 fi
6262 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
6263
6264
6265 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6266 # ---------------------------------
6267 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
6268 [AC_REQUIRE([AC_CANONICAL_HOST])
6269 AC_REQUIRE([AC_PROG_NM])
6270 AC_REQUIRE([AC_OBJEXT])
6271 # Check for command to grab the raw symbol name followed by C symbol from nm.
6272 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
6273 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
6274 [
6275 # These are sane defaults that work on at least a few old systems.
6276 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
6277
6278 # Character class describing NM global symbol codes.
6279 symcode='[[BCDEGRST]]'
6280
6281 # Regexp to match symbols that can be accessed directly from C.
6282 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
6283
6284 # Transform an extracted symbol line into a proper C declaration
6285 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6286
6287 # Transform an extracted symbol line into symbol name and symbol address
6288 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6289
6290 # Define system-specific variables.
6291 case $host_os in
6292 aix*)
6293 symcode='[[BCDT]]'
6294 ;;
6295 cygwin* | mingw* | pw32*)
6296 symcode='[[ABCDGISTW]]'
6297 ;;
6298 hpux*) # Its linker distinguishes data from code symbols
6299 if test "$host_cpu" = ia64; then
6300 symcode='[[ABCDEGRST]]'
6301 fi
6302 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6303 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6304 ;;
6305 linux*)
6306 if test "$host_cpu" = ia64; then
6307 symcode='[[ABCDGIRSTW]]'
6308 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6309 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
6310 fi
6311 ;;
6312 irix* | nonstopux*)
6313 symcode='[[BCDEGRST]]'
6314 ;;
6315 osf*)
6316 symcode='[[BCDEGQRST]]'
6317 ;;
6318 solaris* | sysv5*)
6319 symcode='[[BDRT]]'
6320 ;;
6321 sysv4)
6322 symcode='[[DFNSTU]]'
6323 ;;
6324 esac
6325
6326 # Handle CRLF in mingw tool chain
6327 opt_cr=
6328 case $build_os in
6329 mingw*)
6330 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6331 ;;
6332 esac
6333
6334 # If we're using GNU nm, then use its standard symbol codes.
6335 case `$NM -V 2>&1` in
6336 *GNU* | *'with BFD'*)
6337 symcode='[[ABCDGIRSTW]]' ;;
6338 esac
6339
6340 # Try without a prefix undercore, then with it.
6341 for ac_symprfx in "" "_"; do
6342
6343 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6344 symxfrm="\\1 $ac_symprfx\\2 \\2"
6345
6346 # Write the raw and C identifiers.
6347 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6348
6349 # Check to see that the pipe works correctly.
6350 pipe_works=no
6351
6352 rm -f conftest*
6353 cat > conftest.$ac_ext <<EOF
6354 #ifdef __cplusplus
6355 extern "C" {
6356 #endif
6357 char nm_test_var;
6358 void nm_test_func(){}
6359 #ifdef __cplusplus
6360 }
6361 #endif
6362 int main(){nm_test_var='a';nm_test_func();return(0);}
6363 EOF
6364
6365 if AC_TRY_EVAL(ac_compile); then
6366 # Now try to grab the symbols.
6367 nlist=conftest.nm
6368 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
6369 # Try sorting and uniquifying the output.
6370 if sort "$nlist" | uniq > "$nlist"T; then
6371 mv -f "$nlist"T "$nlist"
6372 else
6373 rm -f "$nlist"T
6374 fi
6375
6376 # Make sure that we snagged all the symbols we need.
6377 if grep ' nm_test_var$' "$nlist" >/dev/null; then
6378 if grep ' nm_test_func$' "$nlist" >/dev/null; then
6379 cat <<EOF > conftest.$ac_ext
6380 #ifdef __cplusplus
6381 extern "C" {
6382 #endif
6383
6384 EOF
6385 # Now generate the symbol file.
6386 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6387
6388 cat <<EOF >> conftest.$ac_ext
6389 #if defined (__STDC__) && __STDC__
6390 # define lt_ptr_t void *
6391 #else
6392 # define lt_ptr_t char *
6393 # define const
6394 #endif
6395
6396 /* The mapping between symbol names and symbols. */
6397 const struct {
6398 const char *name;
6399 lt_ptr_t address;
6400 }
6401 lt_preloaded_symbols[[]] =
6402 {
6403 EOF
6404 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6405 cat <<\EOF >> conftest.$ac_ext
6406 {0, (lt_ptr_t) 0}
6407 };
6408
6409 #ifdef __cplusplus
6410 }
6411 #endif
6412 EOF
6413 # Now try linking the two files.
6414 mv conftest.$ac_objext conftstm.$ac_objext
6415 lt_save_LIBS="$LIBS"
6416 lt_save_CFLAGS="$CFLAGS"
6417 LIBS="conftstm.$ac_objext"
6418 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6419 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
6420 pipe_works=yes
6421 fi
6422 LIBS="$lt_save_LIBS"
6423 CFLAGS="$lt_save_CFLAGS"
6424 else
6425 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6426 fi
6427 else
6428 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6429 fi
6430 else
6431 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6432 fi
6433 else
6434 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6435 cat conftest.$ac_ext >&5
6436 fi
6437 rm -f conftest* conftst*
6438
6439 # Do not use the global_symbol_pipe unless it works.
6440 if test "$pipe_works" = yes; then
6441 break
6442 else
6443 lt_cv_sys_global_symbol_pipe=
6444 fi
6445 done
6446 ])
6447 if test -z "$lt_cv_sys_global_symbol_pipe"; then
6448 lt_cv_sys_global_symbol_to_cdecl=
6449 fi
6450 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6451 AC_MSG_RESULT(failed)
6452 else
6453 AC_MSG_RESULT(ok)
6454 fi
6455 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6456
6457
6458 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
6459 # ---------------------------------------
6460 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
6461 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
6462 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6463 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
6464
6465 AC_MSG_CHECKING([for $compiler option to produce PIC])
6466 ifelse([$1],[CXX],[
6467 # C++ specific cases for pic, static, wl, etc.
6468 if test "$GXX" = yes; then
6469 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6470 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6471
6472 case $host_os in
6473 aix*)
6474 # All AIX code is PIC.
6475 if test "$host_cpu" = ia64; then
6476 # AIX 5 now supports IA64 processor
6477 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6478 fi
6479 ;;
6480 amigaos*)
6481 # FIXME: we need at least 68020 code to build shared libraries, but
6482 # adding the `-m68020' flag to GCC prevents building anything better,
6483 # like `-m68040'.
6484 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6485 ;;
6486 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6487 # PIC is the default for these OSes.
6488 ;;
6489 mingw* | os2* | pw32*)
6490 # This hack is so that the source file can tell whether it is being
6491 # built for inclusion in a dll (and should export symbols for example).
6492 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6493 ;;
6494 darwin* | rhapsody*)
6495 # PIC is the default on this platform
6496 # Common symbols not allowed in MH_DYLIB files
6497 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6498 ;;
6499 *djgpp*)
6500 # DJGPP does not support shared libraries at all
6501 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6502 ;;
6503 sysv4*MP*)
6504 if test -d /usr/nec; then
6505 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6506 fi
6507 ;;
6508 hpux*)
6509 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6510 # not for PA HP-UX.
6511 case $host_cpu in
6512 hppa*64*|ia64*)
6513 ;;
6514 *)
6515 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6516 ;;
6517 esac
6518 ;;
6519 *)
6520 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6521 ;;
6522 esac
6523 else
6524 case $host_os in
6525 aix4* | aix5*)
6526 # All AIX code is PIC.
6527 if test "$host_cpu" = ia64; then
6528 # AIX 5 now supports IA64 processor
6529 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6530 else
6531 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6532 fi
6533 ;;
6534 chorus*)
6535 case $cc_basename in
6536 cxch68*)
6537 # Green Hills C++ Compiler
6538 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
6539 ;;
6540 esac
6541 ;;
6542 darwin*)
6543 # PIC is the default on this platform
6544 # Common symbols not allowed in MH_DYLIB files
6545 case $cc_basename in
6546 xlc*)
6547 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6548 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6549 ;;
6550 esac
6551 ;;
6552 dgux*)
6553 case $cc_basename in
6554 ec++*)
6555 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6556 ;;
6557 ghcx*)
6558 # Green Hills C++ Compiler
6559 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6560 ;;
6561 *)
6562 ;;
6563 esac
6564 ;;
6565 freebsd* | kfreebsd*-gnu | dragonfly*)
6566 # FreeBSD uses GNU C++
6567 ;;
6568 hpux9* | hpux10* | hpux11*)
6569 case $cc_basename in
6570 CC*)
6571 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6572 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
6573 if test "$host_cpu" != ia64; then
6574 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6575 fi
6576 ;;
6577 aCC*)
6578 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6579 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
6580 case $host_cpu in
6581 hppa*64*|ia64*)
6582 # +Z the default
6583 ;;
6584 *)
6585 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6586 ;;
6587 esac
6588 ;;
6589 *)
6590 ;;
6591 esac
6592 ;;
6593 irix5* | irix6* | nonstopux*)
6594 case $cc_basename in
6595 CC*)
6596 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6597 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6598 # CC pic flag -KPIC is the default.
6599 ;;
6600 *)
6601 ;;
6602 esac
6603 ;;
6604 linux*)
6605 case $cc_basename in
6606 KCC*)
6607 # KAI C++ Compiler
6608 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6609 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6610 ;;
6611 icpc* | ecpc*)
6612 # Intel C++
6613 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6614 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6615 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6616 ;;
6617 pgCC*)
6618 # Portland Group C++ compiler.
6619 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6620 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6621 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6622 ;;
6623 cxx*)
6624 # Compaq C++
6625 # Make sure the PIC flag is empty. It appears that all Alpha
6626 # Linux and Compaq Tru64 Unix objects are PIC.
6627 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6628 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6629 ;;
6630 *)
6631 ;;
6632 esac
6633 ;;
6634 lynxos*)
6635 ;;
6636 m88k*)
6637 ;;
6638 mvs*)
6639 case $cc_basename in
6640 cxx*)
6641 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6642 ;;
6643 *)
6644 ;;
6645 esac
6646 ;;
6647 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
6648 ;;
6649 osf3* | osf4* | osf5*)
6650 case $cc_basename in
6651 KCC*)
6652 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6653 ;;
6654 RCC*)
6655 # Rational C++ 2.4.1
6656 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6657 ;;
6658 cxx*)
6659 # Digital/Compaq C++
6660 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6661 # Make sure the PIC flag is empty. It appears that all Alpha
6662 # Linux and Compaq Tru64 Unix objects are PIC.
6663 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6664 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6665 ;;
6666 *)
6667 ;;
6668 esac
6669 ;;
6670 psos*)
6671 ;;
6672 sco*)
6673 case $cc_basename in
6674 CC*)
6675 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6676 ;;
6677 *)
6678 ;;
6679 esac
6680 ;;
6681 solaris*)
6682 case $cc_basename in
6683 CC*)
6684 # Sun C++ 4.2, 5.x and Centerline C++
6685 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6686 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6687 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6688 ;;
6689 gcx*)
6690 # Green Hills C++ Compiler
6691 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6692 ;;
6693 *)
6694 ;;
6695 esac
6696 ;;
6697 sunos4*)
6698 case $cc_basename in
6699 CC*)
6700 # Sun C++ 4.x
6701 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6702 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6703 ;;
6704 lcc*)
6705 # Lucid
6706 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6707 ;;
6708 *)
6709 ;;
6710 esac
6711 ;;
6712 tandem*)
6713 case $cc_basename in
6714 NCC*)
6715 # NonStop-UX NCC 3.20
6716 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6717 ;;
6718 *)
6719 ;;
6720 esac
6721 ;;
6722 unixware*)
6723 ;;
6724 vxworks*)
6725 ;;
6726 *)
6727 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6728 ;;
6729 esac
6730 fi
6731 ],
6732 [
6733 if test "$GCC" = yes; then
6734 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6735 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6736
6737 case $host_os in
6738 aix*)
6739 # All AIX code is PIC.
6740 if test "$host_cpu" = ia64; then
6741 # AIX 5 now supports IA64 processor
6742 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6743 fi
6744 ;;
6745
6746 amigaos*)
6747 # FIXME: we need at least 68020 code to build shared libraries, but
6748 # adding the `-m68020' flag to GCC prevents building anything better,
6749 # like `-m68040'.
6750 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6751 ;;
6752
6753 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6754 # PIC is the default for these OSes.
6755 ;;
6756
6757 mingw* | pw32* | os2*)
6758 # This hack is so that the source file can tell whether it is being
6759 # built for inclusion in a dll (and should export symbols for example).
6760 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6761 ;;
6762
6763 darwin* | rhapsody*)
6764 # PIC is the default on this platform
6765 # Common symbols not allowed in MH_DYLIB files
6766 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6767 ;;
6768
6769 msdosdjgpp*)
6770 # Just because we use GCC doesn't mean we suddenly get shared libraries
6771 # on systems that don't support them.
6772 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6773 enable_shared=no
6774 ;;
6775
6776 sysv4*MP*)
6777 if test -d /usr/nec; then
6778 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6779 fi
6780 ;;
6781
6782 hpux*)
6783 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6784 # not for PA HP-UX.
6785 case $host_cpu in
6786 hppa*64*|ia64*)
6787 # +Z the default
6788 ;;
6789 *)
6790 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6791 ;;
6792 esac
6793 ;;
6794
6795 *)
6796 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6797 ;;
6798 esac
6799 else
6800 # PORTME Check for flag to pass linker flags through the system compiler.
6801 case $host_os in
6802 aix*)
6803 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6804 if test "$host_cpu" = ia64; then
6805 # AIX 5 now supports IA64 processor
6806 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6807 else
6808 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6809 fi
6810 ;;
6811 darwin*)
6812 # PIC is the default on this platform
6813 # Common symbols not allowed in MH_DYLIB files
6814 case $cc_basename in
6815 xlc*)
6816 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6817 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6818 ;;
6819 esac
6820 ;;
6821
6822 mingw* | pw32* | os2*)
6823 # This hack is so that the source file can tell whether it is being
6824 # built for inclusion in a dll (and should export symbols for example).
6825 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6826 ;;
6827
6828 hpux9* | hpux10* | hpux11*)
6829 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6830 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6831 # not for PA HP-UX.
6832 case $host_cpu in
6833 hppa*64*|ia64*)
6834 # +Z the default
6835 ;;
6836 *)
6837 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6838 ;;
6839 esac
6840 # Is there a better lt_prog_compiler_static that works with the bundled CC?
6841 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6842 ;;
6843
6844 irix5* | irix6* | nonstopux*)
6845 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6846 # PIC (with -KPIC) is the default.
6847 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6848 ;;
6849
6850 newsos6)
6851 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6852 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6853 ;;
6854
6855 linux*)
6856 case $cc_basename in
6857 icc* | ecc*)
6858 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6859 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6860 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6861 ;;
6862 pgcc* | pgf77* | pgf90* | pgf95*)
6863 # Portland Group compilers (*not* the Pentium gcc compiler,
6864 # which looks to be a dead project)
6865 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6866 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6867 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6868 ;;
6869 ccc*)
6870 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6871 # All Alpha code is PIC.
6872 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6873 ;;
6874 esac
6875 ;;
6876
6877 osf3* | osf4* | osf5*)
6878 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6879 # All OSF/1 code is PIC.
6880 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6881 ;;
6882
6883 sco3.2v5*)
6884 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
6885 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
6886 ;;
6887
6888 solaris*)
6889 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6890 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6891 case $cc_basename in
6892 f77* | f90* | f95*)
6893 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6894 *)
6895 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6896 esac
6897 ;;
6898
6899 sunos4*)
6900 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6901 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6902 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6903 ;;
6904
6905 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6906 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6907 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6908 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6909 ;;
6910
6911 sysv4*MP*)
6912 if test -d /usr/nec ;then
6913 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6914 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6915 fi
6916 ;;
6917
6918 unicos*)
6919 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6920 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6921 ;;
6922
6923 uts4*)
6924 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6925 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6926 ;;
6927
6928 *)
6929 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6930 ;;
6931 esac
6932 fi
6933 ])
6934 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6935
6936 #
6937 # Check to make sure the PIC flag actually works.
6938 #
6939 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6940 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6941 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6942 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6943 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6944 "" | " "*) ;;
6945 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6946 esac],
6947 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6948 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6949 fi
6950 case $host_os in
6951 # For platforms which do not support PIC, -DPIC is meaningless:
6952 *djgpp*)
6953 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6954 ;;
6955 *)
6956 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6957 ;;
6958 esac
6959 ])
6960
6961
6962 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6963 # ------------------------------------
6964 # See if the linker supports building shared libraries.
6965 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6966 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6967 ifelse([$1],[CXX],[
6968 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6969 case $host_os in
6970 aix4* | aix5*)
6971 # If we're using GNU nm, then we don't want the "-C" option.
6972 # -C means demangle to AIX nm, but means don't demangle with GNU nm
6973 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6974 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6975 else
6976 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6977 fi
6978 ;;
6979 pw32*)
6980 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6981 ;;
6982 cygwin* | mingw*)
6983 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6984 ;;
6985 linux*)
6986 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6987 ;;
6988 *)
6989 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6990 ;;
6991 esac
6992 ],[
6993 runpath_var=
6994 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6995 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6996 _LT_AC_TAGVAR(archive_cmds, $1)=
6997 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6998 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6999 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
7000 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7001 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7002 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
7003 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7004 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7005 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7006 _LT_AC_TAGVAR(hardcode_direct, $1)=no
7007 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7008 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7009 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
7010 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
7011 _LT_AC_TAGVAR(module_cmds, $1)=
7012 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
7013 _LT_AC_TAGVAR(always_export_symbols, $1)=no
7014 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7015 # include_expsyms should be a list of space-separated symbols to be *always*
7016 # included in the symbol list
7017 _LT_AC_TAGVAR(include_expsyms, $1)=
7018 # exclude_expsyms can be an extended regexp of symbols to exclude
7019 # it will be wrapped by ` (' and `)$', so one must not match beginning or
7020 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
7021 # as well as any symbol that contains `d'.
7022 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
7023 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
7024 # platforms (ab)use it in PIC code, but their linkers get confused if
7025 # the symbol is explicitly referenced. Since portable code cannot
7026 # rely on this symbol name, it's probably fine to never include it in
7027 # preloaded symbol tables.
7028 extract_expsyms_cmds=
7029 # Just being paranoid about ensuring that cc_basename is set.
7030 _LT_CC_BASENAME([$compiler])
7031 case $host_os in
7032 cygwin* | mingw* | pw32*)
7033 # FIXME: the MSVC++ port hasn't been tested in a loooong time
7034 # When not using gcc, we currently assume that we are using
7035 # Microsoft Visual C++.
7036 if test "$GCC" != yes; then
7037 with_gnu_ld=no
7038 fi
7039 ;;
7040 openbsd*)
7041 with_gnu_ld=no
7042 ;;
7043 esac
7044
7045 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7046 if test "$with_gnu_ld" = yes; then
7047 # If archive_cmds runs LD, not CC, wlarc should be empty
7048 wlarc='${wl}'
7049
7050 # Set some defaults for GNU ld with shared library support. These
7051 # are reset later if shared libraries are not supported. Putting them
7052 # here allows them to be overridden if necessary.
7053 runpath_var=LD_RUN_PATH
7054 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7055 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7056 # ancient GNU ld didn't support --whole-archive et. al.
7057 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
7058 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7059 else
7060 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7061 fi
7062 supports_anon_versioning=no
7063 case `$LD -v 2>/dev/null` in
7064 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
7065 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
7066 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
7067 *\ 2.11.*) ;; # other 2.11 versions
7068 *) supports_anon_versioning=yes ;;
7069 esac
7070
7071 # See if GNU ld supports shared libraries.
7072 case $host_os in
7073 aix3* | aix4* | aix5*)
7074 # On AIX/PPC, the GNU linker is very broken
7075 if test "$host_cpu" != ia64; then
7076 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7077 cat <<EOF 1>&2
7078
7079 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
7080 *** to be unable to reliably create shared libraries on AIX.
7081 *** Therefore, libtool is disabling shared libraries support. If you
7082 *** really care for shared libraries, you may want to modify your PATH
7083 *** so that a non-GNU linker is found, and then restart.
7084
7085 EOF
7086 fi
7087 ;;
7088
7089 amigaos*)
7090 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
7091 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7092 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7093
7094 # Samuel A. Falvo II <[email protected]> reports
7095 # that the semantics of dynamic libraries on AmigaOS, at least up
7096 # to version 4, is to share data among multiple programs linked
7097 # with the same dynamic library. Since this doesn't match the
7098 # behavior of shared libraries on other platforms, we can't use
7099 # them.
7100 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7101 ;;
7102
7103 beos*)
7104 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7105 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7106 # Joseph Beckenbach <[email protected]> says some releases of gcc
7107 # support --undefined. This deserves some investigation. FIXME
7108 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7109 else
7110 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7111 fi
7112 ;;
7113
7114 cygwin* | mingw* | pw32*)
7115 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7116 # as there is no search path for DLLs.
7117 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7118 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7119 _LT_AC_TAGVAR(always_export_symbols, $1)=no
7120 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7121 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
7122
7123 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
7124 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
7125 # If the export-symbols file already is a .def file (1st line
7126 # is EXPORTS), use it as is; otherwise, prepend...
7127 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7128 cp $export_symbols $output_objdir/$soname.def;
7129 else
7130 echo EXPORTS > $output_objdir/$soname.def;
7131 cat $export_symbols >> $output_objdir/$soname.def;
7132 fi~
7133 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
7134 else
7135 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7136 fi
7137 ;;
7138
7139 linux*)
7140 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7141 tmp_addflag=
7142 case $cc_basename,$host_cpu in
7143 pgcc*) # Portland Group C compiler
7144 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7145 tmp_addflag=' $pic_flag'
7146 ;;
7147 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
7148 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7149 tmp_addflag=' $pic_flag -Mnomain' ;;
7150 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
7151 tmp_addflag=' -i_dynamic' ;;
7152 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
7153 tmp_addflag=' -i_dynamic -nofor_main' ;;
7154 ifc* | ifort*) # Intel Fortran compiler
7155 tmp_addflag=' -nofor_main' ;;
7156 esac
7157 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7158
7159 if test $supports_anon_versioning = yes; then
7160 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
7161 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7162 $echo "local: *; };" >> $output_objdir/$libname.ver~
7163 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7164 fi
7165 _LT_AC_TAGVAR(link_all_deplibs, $1)=no
7166 else
7167 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7168 fi
7169 ;;
7170
7171 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
7172 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7173 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7174 wlarc=
7175 else
7176 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7177 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7178 fi
7179 ;;
7180
7181 solaris* | sysv5*)
7182 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
7183 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7184 cat <<EOF 1>&2
7185
7186 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
7187 *** create shared libraries on Solaris systems. Therefore, libtool
7188 *** is disabling shared libraries support. We urge you to upgrade GNU
7189 *** binutils to release 2.9.1 or newer. Another option is to modify
7190 *** your PATH or compiler configuration so that the native linker is
7191 *** used, and then restart.
7192
7193 EOF
7194 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7195 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7196 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7197 else
7198 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7199 fi
7200 ;;
7201
7202 sunos4*)
7203 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7204 wlarc=
7205 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7206 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7207 ;;
7208
7209 *)
7210 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7211 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7212 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7213 else
7214 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7215 fi
7216 ;;
7217 esac
7218
7219 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
7220 runpath_var=
7221 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7222 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7223 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7224 fi
7225 else
7226 # PORTME fill in a description of your system's linker (not GNU ld)
7227 case $host_os in
7228 aix3*)
7229 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7230 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7231 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
7232 # Note: this linker hardcodes the directories in LIBPATH if there
7233 # are no directories specified by -L.
7234 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7235 if test "$GCC" = yes && test -z "$link_static_flag"; then
7236 # Neither direct hardcoding nor static linking is supported with a
7237 # broken collect2.
7238 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7239 fi
7240 ;;
7241
7242 aix4* | aix5*)
7243 if test "$host_cpu" = ia64; then
7244 # On IA64, the linker does run time linking by default, so we don't
7245 # have to do anything special.
7246 aix_use_runtimelinking=no
7247 exp_sym_flag='-Bexport'
7248 no_entry_flag=""
7249 else
7250 # If we're using GNU nm, then we don't want the "-C" option.
7251 # -C means demangle to AIX nm, but means don't demangle with GNU nm
7252 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7253 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
7254 else
7255 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
7256 fi
7257 aix_use_runtimelinking=no
7258
7259 # Test if we are trying to use run time linking or normal
7260 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7261 # need to do runtime linking.
7262 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
7263 for ld_flag in $LDFLAGS; do
7264 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7265 aix_use_runtimelinking=yes
7266 break
7267 fi
7268 done
7269 esac
7270
7271 exp_sym_flag='-bexport'
7272 no_entry_flag='-bnoentry'
7273 fi
7274
7275 # When large executables or shared objects are built, AIX ld can
7276 # have problems creating the table of contents. If linking a library
7277 # or program results in "error TOC overflow" add -mminimal-toc to
7278 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
7279 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7280
7281 _LT_AC_TAGVAR(archive_cmds, $1)=''
7282 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7283 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7284 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7285
7286 if test "$GCC" = yes; then
7287 case $host_os in aix4.[[012]]|aix4.[[012]].*)
7288 # We only want to do this on AIX 4.2 and lower, the check
7289 # below for broken collect2 doesn't work under 4.3+
7290 collect2name=`${CC} -print-prog-name=collect2`
7291 if test -f "$collect2name" && \
7292 strings "$collect2name" | grep resolve_lib_name >/dev/null
7293 then
7294 # We have reworked collect2
7295 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7296 else
7297 # We have old collect2
7298 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7299 # It fails to find uninstalled libraries when the uninstalled
7300 # path is not listed in the libpath. Setting hardcode_minus_L
7301 # to unsupported forces relinking
7302 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7303 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7304 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7305 fi
7306 esac
7307 shared_flag='-shared'
7308 if test "$aix_use_runtimelinking" = yes; then
7309 shared_flag="$shared_flag "'${wl}-G'
7310 fi
7311 else
7312 # not using gcc
7313 if test "$host_cpu" = ia64; then
7314 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7315 # chokes on -Wl,-G. The following line is correct:
7316 shared_flag='-G'
7317 else
7318 if test "$aix_use_runtimelinking" = yes; then
7319 shared_flag='${wl}-G'
7320 else
7321 shared_flag='${wl}-bM:SRE'
7322 fi
7323 fi
7324 fi
7325
7326 # It seems that -bexpall does not export symbols beginning with
7327 # underscore (_), so it is better to generate a list of symbols to export.
7328 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7329 if test "$aix_use_runtimelinking" = yes; then
7330 # Warning - without using the other runtime loading flags (-brtl),
7331 # -berok will link without error, but may produce a broken library.
7332 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
7333 # Determine the default libpath from the value encoded in an empty executable.
7334 _LT_AC_SYS_LIBPATH_AIX
7335 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7336 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7337 else
7338 if test "$host_cpu" = ia64; then
7339 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7340 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7341 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
7342 else
7343 # Determine the default libpath from the value encoded in an empty executable.
7344 _LT_AC_SYS_LIBPATH_AIX
7345 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7346 # Warning - without using the other run time loading flags,
7347 # -berok will link without error, but may produce a broken library.
7348 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7349 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7350 # -bexpall does not export symbols beginning with underscore (_)
7351 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7352 # Exported symbols can be pulled into shared objects from archives
7353 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
7354 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7355 # This is similar to how AIX traditionally builds its shared libraries.
7356 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7357 fi
7358 fi
7359 ;;
7360
7361 amigaos*)
7362 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
7363 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7364 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7365 # see comment about different semantics on the GNU ld section
7366 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7367 ;;
7368
7369 bsdi[[45]]*)
7370 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7371 ;;
7372
7373 cygwin* | mingw* | pw32*)
7374 # When not using gcc, we currently assume that we are using
7375 # Microsoft Visual C++.
7376 # hardcode_libdir_flag_spec is actually meaningless, as there is
7377 # no search path for DLLs.
7378 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7379 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7380 # Tell ltmain to make .lib files, not .a files.
7381 libext=lib
7382 # Tell ltmain to make .dll files, not .so files.
7383 shrext_cmds=".dll"
7384 # FIXME: Setting linknames here is a bad hack.
7385 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
7386 # The linker will automatically build a .lib file if we build a DLL.
7387 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
7388 # FIXME: Should let the user specify the lib program.
7389 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
7390 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7391 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7392 ;;
7393
7394 darwin* | rhapsody*)
7395 case $host_os in
7396 rhapsody* | darwin1.[[012]])
7397 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
7398 ;;
7399 *) # Darwin 1.3 on
7400 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
7401 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7402 else
7403 case ${MACOSX_DEPLOYMENT_TARGET} in
7404 10.[[012]])
7405 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7406 ;;
7407 10.*)
7408 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
7409 ;;
7410 esac
7411 fi
7412 ;;
7413 esac
7414 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7415 _LT_AC_TAGVAR(hardcode_direct, $1)=no
7416 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
7417 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7418 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
7419 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7420 if test "$GCC" = yes ; then
7421 output_verbose_link_cmd='echo'
7422 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
7423 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7424 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7425 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7426 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7427 else
7428 case $cc_basename in
7429 xlc*)
7430 output_verbose_link_cmd='echo'
7431 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
7432 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7433 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7434 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7435 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7436 ;;
7437 *)
7438 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7439 ;;
7440 esac
7441 fi
7442 ;;
7443
7444 dgux*)
7445 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7446 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7447 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7448 ;;
7449
7450 freebsd1*)
7451 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7452 ;;
7453
7454 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7455 # support. Future versions do this automatically, but an explicit c++rt0.o
7456 # does not break anything, and helps significantly (at the cost of a little
7457 # extra space).
7458 freebsd2.2*)
7459 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7460 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7461 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7462 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7463 ;;
7464
7465 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7466 freebsd2*)
7467 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7468 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7469 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7470 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7471 ;;
7472
7473 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7474 freebsd* | kfreebsd*-gnu | dragonfly*)
7475 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7476 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7477 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7478 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7479 ;;
7480
7481 hpux9*)
7482 if test "$GCC" = yes; then
7483 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7484 else
7485 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7486 fi
7487 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7488 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7489 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7490
7491 # hardcode_minus_L: Not really in the search PATH,
7492 # but as the default location of the library.
7493 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7494 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7495 ;;
7496
7497 hpux10* | hpux11*)
7498 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7499 case $host_cpu in
7500 hppa*64*|ia64*)
7501 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7502 ;;
7503 *)
7504 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7505 ;;
7506 esac
7507 else
7508 case $host_cpu in
7509 hppa*64*|ia64*)
7510 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
7511 ;;
7512 *)
7513 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7514 ;;
7515 esac
7516 fi
7517 if test "$with_gnu_ld" = no; then
7518 case $host_cpu in
7519 hppa*64*)
7520 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7521 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7522 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7523 _LT_AC_TAGVAR(hardcode_direct, $1)=no
7524 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7525 ;;
7526 ia64*)
7527 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7528 _LT_AC_TAGVAR(hardcode_direct, $1)=no
7529 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7530
7531 # hardcode_minus_L: Not really in the search PATH,
7532 # but as the default location of the library.
7533 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7534 ;;
7535 *)
7536 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7537 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7538 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7539 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7540
7541 # hardcode_minus_L: Not really in the search PATH,
7542 # but as the default location of the library.
7543 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7544 ;;
7545 esac
7546 fi
7547 ;;
7548
7549 irix5* | irix6* | nonstopux*)
7550 if test "$GCC" = yes; then
7551 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7552 else
7553 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7554 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7555 fi
7556 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7557 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7558 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7559 ;;
7560
7561 netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
7562 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7563 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
7564 else
7565 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
7566 fi
7567 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7568 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7569 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7570 ;;
7571
7572 newsos6)
7573 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7574 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7575 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7576 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7577 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7578 ;;
7579
7580 openbsd*)
7581 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7582 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7583 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7584 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7585 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7586 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7587 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7588 else
7589 case $host_os in
7590 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7591 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7592 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7593 ;;
7594 *)
7595 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7596 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7597 ;;
7598 esac
7599 fi
7600 ;;
7601
7602 os2*)
7603 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7604 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7605 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7606 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
7607 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7608 ;;
7609
7610 osf3*)
7611 if test "$GCC" = yes; then
7612 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7613 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7614 else
7615 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7616 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7617 fi
7618 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7619 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7620 ;;
7621
7622 osf4* | osf5*) # as osf3* with the addition of -msym flag
7623 if test "$GCC" = yes; then
7624 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7625 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7626 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7627 else
7628 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7629 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7630 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
7631 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
7632
7633 # Both c and cxx compiler support -rpath directly
7634 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7635 fi
7636 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7637 ;;
7638
7639 sco3.2v5*)
7640 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7641 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7642 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7643 runpath_var=LD_RUN_PATH
7644 hardcode_runpath_var=yes
7645 ;;
7646
7647 solaris*)
7648 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7649 if test "$GCC" = yes; then
7650 wlarc='${wl}'
7651 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7652 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7653 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
7654 else
7655 wlarc=''
7656 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7657 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7658 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7659 fi
7660 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7661 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7662 case $host_os in
7663 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7664 *)
7665 # The compiler driver will combine linker options so we
7666 # cannot just pass the convience library names through
7667 # without $wl, iff we do not link with $LD.
7668 # Luckily, gcc supports the same syntax we need for Sun Studio.
7669 # Supported since Solaris 2.6 (maybe 2.5.1?)
7670 case $wlarc in
7671 '')
7672 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
7673 *)
7674 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
7675 esac ;;
7676 esac
7677 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7678 ;;
7679
7680 sunos4*)
7681 if test "x$host_vendor" = xsequent; then
7682 # Use $CC to link under sequent, because it throws in some extra .o
7683 # files that make .init and .fini sections work.
7684 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7685 else
7686 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7687 fi
7688 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7689 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7690 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7691 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7692 ;;
7693
7694 sysv4)
7695 case $host_vendor in
7696 sni)
7697 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7698 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7699 ;;
7700 siemens)
7701 ## LD is ld it makes a PLAMLIB
7702 ## CC just makes a GrossModule.
7703 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7704 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7705 _LT_AC_TAGVAR(hardcode_direct, $1)=no
7706 ;;
7707 motorola)
7708 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7709 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7710 ;;
7711 esac
7712 runpath_var='LD_RUN_PATH'
7713 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7714 ;;
7715
7716 sysv4.3*)
7717 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7718 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7719 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7720 ;;
7721
7722 sysv4*MP*)
7723 if test -d /usr/nec; then
7724 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7725 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7726 runpath_var=LD_RUN_PATH
7727 hardcode_runpath_var=yes
7728 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7729 fi
7730 ;;
7731
7732 sysv4.2uw2*)
7733 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7734 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7735 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7736 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7737 hardcode_runpath_var=yes
7738 runpath_var=LD_RUN_PATH
7739 ;;
7740
7741 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
7742 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
7743 if test "$GCC" = yes; then
7744 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7745 else
7746 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7747 fi
7748 runpath_var='LD_RUN_PATH'
7749 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7750 ;;
7751
7752 sysv5*)
7753 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7754 # $CC -shared without GNU ld will not create a library from C++
7755 # object files and a static libstdc++, better avoid it by now
7756 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7757 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7758 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7759 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7760 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7761 runpath_var='LD_RUN_PATH'
7762 ;;
7763
7764 uts4*)
7765 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7766 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7767 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7768 ;;
7769
7770 *)
7771 _LT_AC_TAGVAR(ld_shlibs, $1)=no
7772 ;;
7773 esac
7774 fi
7775 ])
7776 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7777 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7778
7779 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
7780 if test "$GCC" = yes; then
7781 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7782 fi
7783
7784 #
7785 # Do we need to explicitly link libc?
7786 #
7787 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7788 x|xyes)
7789 # Assume -lc should be added
7790 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7791
7792 if test "$enable_shared" = yes && test "$GCC" = yes; then
7793 case $_LT_AC_TAGVAR(archive_cmds, $1) in
7794 *'~'*)
7795 # FIXME: we may have to deal with multi-command sequences.
7796 ;;
7797 '$CC '*)
7798 # Test whether the compiler implicitly links with -lc since on some
7799 # systems, -lgcc has to come before -lc. If gcc already passes -lc
7800 # to ld, don't add -lc before -lgcc.
7801 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7802 $rm conftest*
7803 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7804
7805 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7806 soname=conftest
7807 lib=conftest
7808 libobjs=conftest.$ac_objext
7809 deplibs=
7810 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7811 compiler_flags=-v
7812 linker_flags=-v
7813 verstring=
7814 output_objdir=.
7815 libname=conftest
7816 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7817 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7818 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7819 then
7820 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7821 else
7822 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7823 fi
7824 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7825 else
7826 cat conftest.err 1>&5
7827 fi
7828 $rm conftest*
7829 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7830 ;;
7831 esac
7832 fi
7833 ;;
7834 esac
7835 ])# AC_LIBTOOL_PROG_LD_SHLIBS
7836
7837
7838 # _LT_AC_FILE_LTDLL_C
7839 # -------------------
7840 # Be careful that the start marker always follows a newline.
7841 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7842 # /* ltdll.c starts here */
7843 # #define WIN32_LEAN_AND_MEAN
7844 # #include <windows.h>
7845 # #undef WIN32_LEAN_AND_MEAN
7846 # #include <stdio.h>
7847 #
7848 # #ifndef __CYGWIN__
7849 # # ifdef __CYGWIN32__
7850 # # define __CYGWIN__ __CYGWIN32__
7851 # # endif
7852 # #endif
7853 #
7854 # #ifdef __cplusplus
7855 # extern "C" {
7856 # #endif
7857 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7858 # #ifdef __cplusplus
7859 # }
7860 # #endif
7861 #
7862 # #ifdef __CYGWIN__
7863 # #include <cygwin/cygwin_dll.h>
7864 # DECLARE_CYGWIN_DLL( DllMain );
7865 # #endif
7866 # HINSTANCE __hDllInstance_base;
7867 #
7868 # BOOL APIENTRY
7869 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7870 # {
7871 # __hDllInstance_base = hInst;
7872 # return TRUE;
7873 # }
7874 # /* ltdll.c ends here */
7875 ])# _LT_AC_FILE_LTDLL_C
7876
7877
7878 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7879 # ---------------------------------
7880 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7881
7882
7883 # old names
7884 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
7885 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
7886 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
7887 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7888 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7889 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
7890 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
7891
7892 # This is just to silence aclocal about the macro not being used
7893 ifelse([AC_DISABLE_FAST_INSTALL])
7894
7895 AC_DEFUN([LT_AC_PROG_GCJ],
7896 [AC_CHECK_TOOL(GCJ, gcj, no)
7897 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7898 AC_SUBST(GCJFLAGS)
7899 ])
7900
7901 AC_DEFUN([LT_AC_PROG_RC],
7902 [AC_CHECK_TOOL(RC, windres, no)
7903 ])
7904
7905 # NOTE: This macro has been submitted for inclusion into #
7906 # GNU Autoconf as AC_PROG_SED. When it is available in #
7907 # a released version of Autoconf we should remove this #
7908 # macro and use it instead. #
7909 # LT_AC_PROG_SED
7910 # --------------
7911 # Check for a fully-functional sed program, that truncates
7912 # as few characters as possible. Prefer GNU sed if found.
7913 AC_DEFUN([LT_AC_PROG_SED],
7914 [AC_MSG_CHECKING([for a sed that does not truncate output])
7915 AC_CACHE_VAL(lt_cv_path_SED,
7916 [# Loop through the user's path and test for sed and gsed.
7917 # Then use that list of sed's as ones to test for truncation.
7918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7919 for as_dir in $PATH
7920 do
7921 IFS=$as_save_IFS
7922 test -z "$as_dir" && as_dir=.
7923 for lt_ac_prog in sed gsed; do
7924 for ac_exec_ext in '' $ac_executable_extensions; do
7925 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7926 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7927 fi
7928 done
7929 done
7930 done
7931 lt_ac_max=0
7932 lt_ac_count=0
7933 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
7934 # along with /bin/sed that truncates output.
7935 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7936 test ! -f $lt_ac_sed && continue
7937 cat /dev/null > conftest.in
7938 lt_ac_count=0
7939 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7940 # Check for GNU sed and select it if it is found.
7941 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7942 lt_cv_path_SED=$lt_ac_sed
7943 break
7944 fi
7945 while true; do
7946 cat conftest.in conftest.in >conftest.tmp
7947 mv conftest.tmp conftest.in
7948 cp conftest.in conftest.nl
7949 echo >>conftest.nl
7950 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7951 cmp -s conftest.out conftest.nl || break
7952 # 10000 chars as input seems more than enough
7953 test $lt_ac_count -gt 10 && break
7954 lt_ac_count=`expr $lt_ac_count + 1`
7955 if test $lt_ac_count -gt $lt_ac_max; then
7956 lt_ac_max=$lt_ac_count
7957 lt_cv_path_SED=$lt_ac_sed
7958 fi
7959 done
7960 done
7961 ])
7962 SED=$lt_cv_path_SED
7963 AC_MSG_RESULT([$SED])
7964 ])
7965
7966 # longdouble.m4 serial 1 (gettext-0.12)
7967 dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
7968 dnl This file is free software; the Free Software Foundation
7969 dnl gives unlimited permission to copy and/or distribute it,
7970 dnl with or without modifications, as long as this notice is preserved.
7971
7972 dnl From Bruno Haible.
7973 dnl Test whether the compiler supports the 'long double' type.
7974 dnl Prerequisite: AC_PROG_CC
7975
7976 AC_DEFUN([gt_TYPE_LONGDOUBLE],
7977 [
7978 AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
7979 [if test "$GCC" = yes; then
7980 gt_cv_c_long_double=yes
7981 else
7982 AC_TRY_COMPILE([
7983 /* The Stardent Vistra knows sizeof(long double), but does not support it. */
7984 long double foo = 0.0;
7985 /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
7986 int array [2*(sizeof(long double) >= sizeof(double)) - 1];
7987 ], ,
7988 gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
7989 fi])
7990 if test $gt_cv_c_long_double = yes; then
7991 AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
7992 fi
7993 ])
7994
7995 # longlong.m4 serial 5
7996 dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
7997 dnl This file is free software; the Free Software Foundation
7998 dnl gives unlimited permission to copy and/or distribute it,
7999 dnl with or without modifications, as long as this notice is preserved.
8000
8001 dnl From Paul Eggert.
8002
8003 # Define HAVE_LONG_LONG if 'long long' works.
8004
8005 AC_DEFUN([gl_AC_TYPE_LONG_LONG],
8006 [
8007 AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
8008 [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
8009 [long long llmax = (long long) -1;
8010 return ll << i | ll >> i | llmax / ll | llmax % ll;],
8011 ac_cv_type_long_long=yes,
8012 ac_cv_type_long_long=no)])
8013 if test $ac_cv_type_long_long = yes; then
8014 AC_DEFINE(HAVE_LONG_LONG, 1,
8015 [Define if you have the 'long long' type.])
8016 fi
8017 ])
8018
8019 # nls.m4 serial 2 (gettext-0.14.3)
8020 dnl Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc.
8021 dnl This file is free software; the Free Software Foundation
8022 dnl gives unlimited permission to copy and/or distribute it,
8023 dnl with or without modifications, as long as this notice is preserved.
8024 dnl
8025 dnl This file can can be used in projects which are not available under
8026 dnl the GNU General Public License or the GNU Library General Public
8027 dnl License but which still want to provide support for the GNU gettext
8028 dnl functionality.
8029 dnl Please note that the actual code of the GNU gettext library is covered
8030 dnl by the GNU Library General Public License, and the rest of the GNU
8031 dnl gettext package package is covered by the GNU General Public License.
8032 dnl They are *not* in the public domain.
8033
8034 dnl Authors:
8035 dnl Ulrich Drepper <[email protected]>, 1995-2000.
8036 dnl Bruno Haible <[email protected]>, 2000-2003.
8037
8038 AC_PREREQ(2.50)
8039
8040 AC_DEFUN([AM_NLS],
8041 [
8042 AC_MSG_CHECKING([whether NLS is requested])
8043 dnl Default is enabled NLS
8044 AC_ARG_ENABLE(nls,
8045 [ --disable-nls do not use Native Language Support],
8046 USE_NLS=$enableval, USE_NLS=yes)
8047 AC_MSG_RESULT($USE_NLS)
8048 AC_SUBST(USE_NLS)
8049 ])
8050
8051 AC_DEFUN([AM_MKINSTALLDIRS],
8052 [
8053 dnl Tell automake >= 1.10 to complain if mkinstalldirs is missing.
8054 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([mkinstalldirs])])
8055 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
8056 dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
8057 dnl Try to locate it.
8058 MKINSTALLDIRS=
8059 if test -n "$ac_aux_dir"; then
8060 case "$ac_aux_dir" in
8061 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
8062 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
8063 esac
8064 fi
8065 if test -z "$MKINSTALLDIRS"; then
8066 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
8067 fi
8068 AC_SUBST(MKINSTALLDIRS)
8069 ])
8070
8071 # po.m4 serial 7 (gettext-0.14.3)
8072 dnl Copyright (C) 1995-2005 Free Software Foundation, Inc.
8073 dnl This file is free software; the Free Software Foundation
8074 dnl gives unlimited permission to copy and/or distribute it,
8075 dnl with or without modifications, as long as this notice is preserved.
8076 dnl
8077 dnl This file can can be used in projects which are not available under
8078 dnl the GNU General Public License or the GNU Library General Public
8079 dnl License but which still want to provide support for the GNU gettext
8080 dnl functionality.
8081 dnl Please note that the actual code of the GNU gettext library is covered
8082 dnl by the GNU Library General Public License, and the rest of the GNU
8083 dnl gettext package package is covered by the GNU General Public License.
8084 dnl They are *not* in the public domain.
8085
8086 dnl Authors:
8087 dnl Ulrich Drepper <[email protected]>, 1995-2000.
8088 dnl Bruno Haible <[email protected]>, 2000-2003.
8089
8090 AC_PREREQ(2.50)
8091
8092 dnl Checks for all prerequisites of the po subdirectory.
8093 AC_DEFUN([AM_PO_SUBDIRS],
8094 [
8095 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
8096 AC_REQUIRE([AC_PROG_INSTALL])dnl
8097 AC_REQUIRE([AM_MKINSTALLDIRS])dnl
8098 AC_REQUIRE([AM_NLS])dnl
8099
8100 dnl Perform the following tests also if --disable-nls has been given,
8101 dnl because they are needed for "make dist" to work.
8102
8103 dnl Search for GNU msgfmt in the PATH.
8104 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
8105 dnl The second test excludes FreeBSD msgfmt.
8106 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
8107 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
8108 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
8109 :)
8110 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
8111
8112 dnl Search for GNU xgettext 0.12 or newer in the PATH.
8113 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
8114 dnl The second test excludes FreeBSD xgettext.
8115 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
8116 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
8117 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
8118 :)
8119 dnl Remove leftover from FreeBSD xgettext call.
8120 rm -f messages.po
8121
8122 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
8123 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
8124 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
8125
8126 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
8127 dnl Test whether we really found GNU msgfmt.
8128 if test "$GMSGFMT" != ":"; then
8129 dnl If it is no GNU msgfmt we define it as : so that the
8130 dnl Makefiles still can work.
8131 if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
8132 (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
8133 : ;
8134 else
8135 GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
8136 AC_MSG_RESULT(
8137 [found $GMSGFMT program is not GNU msgfmt; ignore it])
8138 GMSGFMT=":"
8139 fi
8140 fi
8141
8142 dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
8143 dnl Test whether we really found GNU xgettext.
8144 if test "$XGETTEXT" != ":"; then
8145 dnl If it is no GNU xgettext we define it as : so that the
8146 dnl Makefiles still can work.
8147 if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
8148 (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
8149 : ;
8150 else
8151 AC_MSG_RESULT(
8152 [found xgettext program is not GNU xgettext; ignore it])
8153 XGETTEXT=":"
8154 fi
8155 dnl Remove leftover from FreeBSD xgettext call.
8156 rm -f messages.po
8157 fi
8158
8159 AC_OUTPUT_COMMANDS([
8160 for ac_file in $CONFIG_FILES; do
8161 # Support "outfile[:infile[:infile...]]"
8162 case "$ac_file" in
8163 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8164 esac
8165 # PO directories have a Makefile.in generated from Makefile.in.in.
8166 case "$ac_file" in */Makefile.in)
8167 # Adjust a relative srcdir.
8168 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
8169 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
8170 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
8171 # In autoconf-2.13 it is called $ac_given_srcdir.
8172 # In autoconf-2.50 it is called $srcdir.
8173 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
8174 case "$ac_given_srcdir" in
8175 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
8176 /*) top_srcdir="$ac_given_srcdir" ;;
8177 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
8178 esac
8179 # Treat a directory as a PO directory if and only if it has a
8180 # POTFILES.in file. This allows packages to have multiple PO
8181 # directories under different names or in different locations.
8182 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
8183 rm -f "$ac_dir/POTFILES"
8184 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
8185 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
8186 POMAKEFILEDEPS="POTFILES.in"
8187 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
8188 # on $ac_dir but don't depend on user-specified configuration
8189 # parameters.
8190 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
8191 # The LINGUAS file contains the set of available languages.
8192 if test -n "$OBSOLETE_ALL_LINGUAS"; then
8193 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
8194 fi
8195 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
8196 # Hide the ALL_LINGUAS assigment from automake.
8197 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
8198 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
8199 else
8200 # The set of available languages was given in configure.in.
8201 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
8202 fi
8203 # Compute POFILES
8204 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
8205 # Compute UPDATEPOFILES
8206 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
8207 # Compute DUMMYPOFILES
8208 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
8209 # Compute GMOFILES
8210 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
8211 case "$ac_given_srcdir" in
8212 .) srcdirpre= ;;
8213 *) srcdirpre='$(srcdir)/' ;;
8214 esac
8215 POFILES=
8216 UPDATEPOFILES=
8217 DUMMYPOFILES=
8218 GMOFILES=
8219 for lang in $ALL_LINGUAS; do
8220 POFILES="$POFILES $srcdirpre$lang.po"
8221 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
8222 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
8223 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
8224 done
8225 # CATALOGS depends on both $ac_dir and the user's LINGUAS
8226 # environment variable.
8227 INST_LINGUAS=
8228 if test -n "$ALL_LINGUAS"; then
8229 for presentlang in $ALL_LINGUAS; do
8230 useit=no
8231 if test "%UNSET%" != "$LINGUAS"; then
8232 desiredlanguages="$LINGUAS"
8233 else
8234 desiredlanguages="$ALL_LINGUAS"
8235 fi
8236 for desiredlang in $desiredlanguages; do
8237 # Use the presentlang catalog if desiredlang is
8238 # a. equal to presentlang, or
8239 # b. a variant of presentlang (because in this case,
8240 # presentlang can be used as a fallback for messages
8241 # which are not translated in the desiredlang catalog).
8242 case "$desiredlang" in
8243 "$presentlang"*) useit=yes;;
8244 esac
8245 done
8246 if test $useit = yes; then
8247 INST_LINGUAS="$INST_LINGUAS $presentlang"
8248 fi
8249 done
8250 fi
8251 CATALOGS=
8252 if test -n "$INST_LINGUAS"; then
8253 for lang in $INST_LINGUAS; do
8254 CATALOGS="$CATALOGS $lang.gmo"
8255 done
8256 fi
8257 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
8258 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
8259 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
8260 if test -f "$f"; then
8261 case "$f" in
8262 *.orig | *.bak | *~) ;;
8263 *) cat "$f" >> "$ac_dir/Makefile" ;;
8264 esac
8265 fi
8266 done
8267 fi
8268 ;;
8269 esac
8270 done],
8271 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
8272 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
8273 # from automake.
8274 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
8275 # Capture the value of LINGUAS because we need it to compute CATALOGS.
8276 LINGUAS="${LINGUAS-%UNSET%}"
8277 ])
8278 ])
8279
8280 dnl Postprocesses a Makefile in a directory containing PO files.
8281 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
8282 [
8283 # When this code is run, in config.status, two variables have already been
8284 # set:
8285 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
8286 # - LINGUAS is the value of the environment variable LINGUAS at configure
8287 # time.
8288
8289 changequote(,)dnl
8290 # Adjust a relative srcdir.
8291 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
8292 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
8293 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
8294 # In autoconf-2.13 it is called $ac_given_srcdir.
8295 # In autoconf-2.50 it is called $srcdir.
8296 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
8297 case "$ac_given_srcdir" in
8298 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
8299 /*) top_srcdir="$ac_given_srcdir" ;;
8300 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
8301 esac
8302
8303 # Find a way to echo strings without interpreting backslash.
8304 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
8305 gt_echo='echo'
8306 else
8307 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
8308 gt_echo='printf %s\n'
8309 else
8310 echo_func () {
8311 cat <<EOT
8312 $*
8313 EOT
8314 }
8315 gt_echo='echo_func'
8316 fi
8317 fi
8318
8319 # A sed script that extracts the value of VARIABLE from a Makefile.
8320 sed_x_variable='
8321 # Test if the hold space is empty.
8322 x
8323 s/P/P/
8324 x
8325 ta
8326 # Yes it was empty. Look if we have the expected variable definition.
8327 /^[ ]*VARIABLE[ ]*=/{
8328 # Seen the first line of the variable definition.
8329 s/^[ ]*VARIABLE[ ]*=//
8330 ba
8331 }
8332 bd
8333 :a
8334 # Here we are processing a line from the variable definition.
8335 # Remove comment, more precisely replace it with a space.
8336 s/#.*$/ /
8337 # See if the line ends in a backslash.
8338 tb
8339 :b
8340 s/\\$//
8341 # Print the line, without the trailing backslash.
8342 p
8343 tc
8344 # There was no trailing backslash. The end of the variable definition is
8345 # reached. Clear the hold space.
8346 s/^.*$//
8347 x
8348 bd
8349 :c
8350 # A trailing backslash means that the variable definition continues in the
8351 # next line. Put a nonempty string into the hold space to indicate this.
8352 s/^.*$/P/
8353 x
8354 :d
8355 '
8356 changequote([,])dnl
8357
8358 # Set POTFILES to the value of the Makefile variable POTFILES.
8359 sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
8360 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
8361 # Compute POTFILES_DEPS as
8362 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
8363 POTFILES_DEPS=
8364 for file in $POTFILES; do
8365 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
8366 done
8367 POMAKEFILEDEPS=""
8368
8369 if test -n "$OBSOLETE_ALL_LINGUAS"; then
8370 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
8371 fi
8372 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
8373 # The LINGUAS file contains the set of available languages.
8374 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
8375 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
8376 else
8377 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
8378 sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
8379 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
8380 fi
8381 # Hide the ALL_LINGUAS assigment from automake.
8382 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
8383 # Compute POFILES
8384 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
8385 # Compute UPDATEPOFILES
8386 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
8387 # Compute DUMMYPOFILES
8388 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
8389 # Compute GMOFILES
8390 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
8391 # Compute PROPERTIESFILES
8392 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
8393 # Compute CLASSFILES
8394 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
8395 # Compute QMFILES
8396 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
8397 # Compute MSGFILES
8398 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
8399 # Compute RESOURCESDLLFILES
8400 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
8401 case "$ac_given_srcdir" in
8402 .) srcdirpre= ;;
8403 *) srcdirpre='$(srcdir)/' ;;
8404 esac
8405 POFILES=
8406 UPDATEPOFILES=
8407 DUMMYPOFILES=
8408 GMOFILES=
8409 PROPERTIESFILES=
8410 CLASSFILES=
8411 QMFILES=
8412 MSGFILES=
8413 RESOURCESDLLFILES=
8414 for lang in $ALL_LINGUAS; do
8415 POFILES="$POFILES $srcdirpre$lang.po"
8416 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
8417 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
8418 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
8419 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
8420 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
8421 QMFILES="$QMFILES $srcdirpre$lang.qm"
8422 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
8423 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
8424 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
8425 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
8426 done
8427 # CATALOGS depends on both $ac_dir and the user's LINGUAS
8428 # environment variable.
8429 INST_LINGUAS=
8430 if test -n "$ALL_LINGUAS"; then
8431 for presentlang in $ALL_LINGUAS; do
8432 useit=no
8433 if test "%UNSET%" != "$LINGUAS"; then
8434 desiredlanguages="$LINGUAS"
8435 else
8436 desiredlanguages="$ALL_LINGUAS"
8437 fi
8438 for desiredlang in $desiredlanguages; do
8439 # Use the presentlang catalog if desiredlang is
8440 # a. equal to presentlang, or
8441 # b. a variant of presentlang (because in this case,
8442 # presentlang can be used as a fallback for messages
8443 # which are not translated in the desiredlang catalog).
8444 case "$desiredlang" in
8445 "$presentlang"*) useit=yes;;
8446 esac
8447 done
8448 if test $useit = yes; then
8449 INST_LINGUAS="$INST_LINGUAS $presentlang"
8450 fi
8451 done
8452 fi
8453 CATALOGS=
8454 JAVACATALOGS=
8455 QTCATALOGS=
8456 TCLCATALOGS=
8457 CSHARPCATALOGS=
8458 if test -n "$INST_LINGUAS"; then
8459 for lang in $INST_LINGUAS; do
8460 CATALOGS="$CATALOGS $lang.gmo"
8461 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
8462 QTCATALOGS="$QTCATALOGS $lang.qm"
8463 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
8464 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
8465 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
8466 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
8467 done
8468 fi
8469
8470 sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
8471 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
8472 # Add dependencies that cannot be formulated as a simple suffix rule.
8473 for lang in $ALL_LINGUAS; do
8474 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
8475 cat >> "$ac_file.tmp" <<EOF
8476 $frobbedlang.msg: $lang.po
8477 @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
8478 \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
8479 EOF
8480 done
8481 fi
8482 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
8483 # Add dependencies that cannot be formulated as a simple suffix rule.
8484 for lang in $ALL_LINGUAS; do
8485 frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
8486 cat >> "$ac_file.tmp" <<EOF
8487 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
8488 @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
8489 \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
8490 EOF
8491 done
8492 fi
8493 if test -n "$POMAKEFILEDEPS"; then
8494 cat >> "$ac_file.tmp" <<EOF
8495 Makefile: $POMAKEFILEDEPS
8496 EOF
8497 fi
8498 mv "$ac_file.tmp" "$ac_file"
8499 ])
8500
8501 # printf-posix.m4 serial 2 (gettext-0.13.1)
8502 dnl Copyright (C) 2003 Free Software Foundation, Inc.
8503 dnl This file is free software; the Free Software Foundation
8504 dnl gives unlimited permission to copy and/or distribute it,
8505 dnl with or without modifications, as long as this notice is preserved.
8506
8507 dnl From Bruno Haible.
8508 dnl Test whether the printf() function supports POSIX/XSI format strings with
8509 dnl positions.
8510
8511 AC_DEFUN([gt_PRINTF_POSIX],
8512 [
8513 AC_REQUIRE([AC_PROG_CC])
8514 AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
8515 gt_cv_func_printf_posix,
8516 [
8517 AC_TRY_RUN([
8518 #include <stdio.h>
8519 #include <string.h>
8520 /* The string "%2$d %1$d", with dollar characters protected from the shell's
8521 dollar expansion (possibly an autoconf bug). */
8522 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
8523 static char buf[100];
8524 int main ()
8525 {
8526 sprintf (buf, format, 33, 55);
8527 return (strcmp (buf, "55 33") != 0);
8528 }], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
8529 [
8530 AC_EGREP_CPP(notposix, [
8531 #if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
8532 notposix
8533 #endif
8534 ], gt_cv_func_printf_posix="guessing no",
8535 gt_cv_func_printf_posix="guessing yes")
8536 ])
8537 ])
8538 case $gt_cv_func_printf_posix in
8539 *yes)
8540 AC_DEFINE(HAVE_POSIX_PRINTF, 1,
8541 [Define if your printf() function supports format strings with positions.])
8542 ;;
8543 esac
8544 ])
8545
8546 # progtest.m4 serial 4 (gettext-0.14.2)
8547 dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
8548 dnl This file is free software; the Free Software Foundation
8549 dnl gives unlimited permission to copy and/or distribute it,
8550 dnl with or without modifications, as long as this notice is preserved.
8551 dnl
8552 dnl This file can can be used in projects which are not available under
8553 dnl the GNU General Public License or the GNU Library General Public
8554 dnl License but which still want to provide support for the GNU gettext
8555 dnl functionality.
8556 dnl Please note that the actual code of the GNU gettext library is covered
8557 dnl by the GNU Library General Public License, and the rest of the GNU
8558 dnl gettext package package is covered by the GNU General Public License.
8559 dnl They are *not* in the public domain.
8560
8561 dnl Authors:
8562 dnl Ulrich Drepper <[email protected]>, 1996.
8563
8564 AC_PREREQ(2.50)
8565
8566 # Search path for a program which passes the given test.
8567
8568 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
8569 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
8570 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
8571 [
8572 # Prepare PATH_SEPARATOR.
8573 # The user is always right.
8574 if test "${PATH_SEPARATOR+set}" != set; then
8575 echo "#! /bin/sh" >conf$$.sh
8576 echo "exit 0" >>conf$$.sh
8577 chmod +x conf$$.sh
8578 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8579 PATH_SEPARATOR=';'
8580 else
8581 PATH_SEPARATOR=:
8582 fi
8583 rm -f conf$$.sh
8584 fi
8585
8586 # Find out how to test for executable files. Don't use a zero-byte file,
8587 # as systems may use methods other than mode bits to determine executability.
8588 cat >conf$$.file <<_ASEOF
8589 #! /bin/sh
8590 exit 0
8591 _ASEOF
8592 chmod +x conf$$.file
8593 if test -x conf$$.file >/dev/null 2>&1; then
8594 ac_executable_p="test -x"
8595 else
8596 ac_executable_p="test -f"
8597 fi
8598 rm -f conf$$.file
8599
8600 # Extract the first word of "$2", so it can be a program name with args.
8601 set dummy $2; ac_word=[$]2
8602 AC_MSG_CHECKING([for $ac_word])
8603 AC_CACHE_VAL(ac_cv_path_$1,
8604 [case "[$]$1" in
8605 [[\\/]]* | ?:[[\\/]]*)
8606 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
8607 ;;
8608 *)
8609 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
8610 for ac_dir in ifelse([$5], , $PATH, [$5]); do
8611 IFS="$ac_save_IFS"
8612 test -z "$ac_dir" && ac_dir=.
8613 for ac_exec_ext in '' $ac_executable_extensions; do
8614 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
8615 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
8616 if [$3]; then
8617 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
8618 break 2
8619 fi
8620 fi
8621 done
8622 done
8623 IFS="$ac_save_IFS"
8624 dnl If no 4th arg is given, leave the cache variable unset,
8625 dnl so AC_PATH_PROGS will keep looking.
8626 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
8627 ])dnl
8628 ;;
8629 esac])dnl
8630 $1="$ac_cv_path_$1"
8631 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
8632 AC_MSG_RESULT([$]$1)
8633 else
8634 AC_MSG_RESULT(no)
8635 fi
8636 AC_SUBST($1)dnl
8637 ])
8638
8639 # signed.m4 serial 1 (gettext-0.10.40)
8640 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
8641 dnl This file is free software; the Free Software Foundation
8642 dnl gives unlimited permission to copy and/or distribute it,
8643 dnl with or without modifications, as long as this notice is preserved.
8644
8645 dnl From Bruno Haible.
8646
8647 AC_DEFUN([bh_C_SIGNED],
8648 [
8649 AC_CACHE_CHECK([for signed], bh_cv_c_signed,
8650 [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
8651 if test $bh_cv_c_signed = no; then
8652 AC_DEFINE(signed, ,
8653 [Define to empty if the C compiler doesn't support this keyword.])
8654 fi
8655 ])
8656
8657 # size_max.m4 serial 2
8658 dnl Copyright (C) 2003 Free Software Foundation, Inc.
8659 dnl This file is free software; the Free Software Foundation
8660 dnl gives unlimited permission to copy and/or distribute it,
8661 dnl with or without modifications, as long as this notice is preserved.
8662
8663 dnl From Bruno Haible.
8664
8665 AC_DEFUN([gl_SIZE_MAX],
8666 [
8667 AC_CHECK_HEADERS(stdint.h)
8668 dnl First test whether the system already has SIZE_MAX.
8669 AC_MSG_CHECKING([for SIZE_MAX])
8670 result=
8671 AC_EGREP_CPP([Found it], [
8672 #include <limits.h>
8673 #if HAVE_STDINT_H
8674 #include <stdint.h>
8675 #endif
8676 #ifdef SIZE_MAX
8677 Found it
8678 #endif
8679 ], result=yes)
8680 if test -z "$result"; then
8681 dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
8682 dnl than the type 'unsigned long'.
8683 dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
8684 dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
8685 _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
8686 [#include <stddef.h>], result=?)
8687 _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
8688 [#include <stddef.h>], result=?)
8689 _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
8690 [#include <stddef.h>], result=?)
8691 if test "$fits_in_uint" = 1; then
8692 dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
8693 dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
8694 AC_TRY_COMPILE([#include <stddef.h>
8695 extern size_t foo;
8696 extern unsigned long foo;
8697 ], [], fits_in_uint=0)
8698 fi
8699 if test -z "$result"; then
8700 if test "$fits_in_uint" = 1; then
8701 result="$res_hi$res_lo"U
8702 else
8703 result="$res_hi$res_lo"UL
8704 fi
8705 else
8706 dnl Shouldn't happen, but who knows...
8707 result='~(size_t)0'
8708 fi
8709 fi
8710 AC_MSG_RESULT([$result])
8711 if test "$result" != yes; then
8712 AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
8713 [Define as the maximum value of type 'size_t', if the system doesn't define it.])
8714 fi
8715 ])
8716
8717 # stdint_h.m4 serial 5
8718 dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
8719 dnl This file is free software; the Free Software Foundation
8720 dnl gives unlimited permission to copy and/or distribute it,
8721 dnl with or without modifications, as long as this notice is preserved.
8722
8723 dnl From Paul Eggert.
8724
8725 # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
8726 # doesn't clash with <sys/types.h>, and declares uintmax_t.
8727
8728 AC_DEFUN([gl_AC_HEADER_STDINT_H],
8729 [
8730 AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
8731 [AC_TRY_COMPILE(
8732 [#include <sys/types.h>
8733 #include <stdint.h>],
8734 [uintmax_t i = (uintmax_t) -1;],
8735 gl_cv_header_stdint_h=yes,
8736 gl_cv_header_stdint_h=no)])
8737 if test $gl_cv_header_stdint_h = yes; then
8738 AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
8739 [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
8740 and declares uintmax_t. ])
8741 fi
8742 ])
8743
8744 # uintmax_t.m4 serial 9
8745 dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
8746 dnl This file is free software; the Free Software Foundation
8747 dnl gives unlimited permission to copy and/or distribute it,
8748 dnl with or without modifications, as long as this notice is preserved.
8749
8750 dnl From Paul Eggert.
8751
8752 AC_PREREQ(2.13)
8753
8754 # Define uintmax_t to 'unsigned long' or 'unsigned long long'
8755 # if it is not already defined in <stdint.h> or <inttypes.h>.
8756
8757 AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
8758 [
8759 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
8760 AC_REQUIRE([gl_AC_HEADER_STDINT_H])
8761 if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
8762 AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
8763 test $ac_cv_type_unsigned_long_long = yes \
8764 && ac_type='unsigned long long' \
8765 || ac_type='unsigned long'
8766 AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
8767 [Define to unsigned long or unsigned long long
8768 if <stdint.h> and <inttypes.h> don't define.])
8769 else
8770 AC_DEFINE(HAVE_UINTMAX_T, 1,
8771 [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
8772 fi
8773 ])
8774
8775 # ulonglong.m4 serial 4
8776 dnl Copyright (C) 1999-2004 Free Software Foundation, Inc.
8777 dnl This file is free software; the Free Software Foundation
8778 dnl gives unlimited permission to copy and/or distribute it,
8779 dnl with or without modifications, as long as this notice is preserved.
8780
8781 dnl From Paul Eggert.
8782
8783 # Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
8784
8785 AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
8786 [
8787 AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
8788 [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
8789 [unsigned long long ullmax = (unsigned long long) -1;
8790 return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
8791 ac_cv_type_unsigned_long_long=yes,
8792 ac_cv_type_unsigned_long_long=no)])
8793 if test $ac_cv_type_unsigned_long_long = yes; then
8794 AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
8795 [Define if you have the 'unsigned long long' type.])
8796 fi
8797 ])
8798
8799 # wchar_t.m4 serial 1 (gettext-0.12)
8800 dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
8801 dnl This file is free software; the Free Software Foundation
8802 dnl gives unlimited permission to copy and/or distribute it,
8803 dnl with or without modifications, as long as this notice is preserved.
8804
8805 dnl From Bruno Haible.
8806 dnl Test whether <stddef.h> has the 'wchar_t' type.
8807 dnl Prerequisite: AC_PROG_CC
8808
8809 AC_DEFUN([gt_TYPE_WCHAR_T],
8810 [
8811 AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
8812 [AC_TRY_COMPILE([#include <stddef.h>
8813 wchar_t foo = (wchar_t)'\0';], ,
8814 gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
8815 if test $gt_cv_c_wchar_t = yes; then
8816 AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
8817 fi
8818 ])
8819
8820 # wint_t.m4 serial 1 (gettext-0.12)
8821 dnl Copyright (C) 2003 Free Software Foundation, Inc.
8822 dnl This file is free software; the Free Software Foundation
8823 dnl gives unlimited permission to copy and/or distribute it,
8824 dnl with or without modifications, as long as this notice is preserved.
8825
8826 dnl From Bruno Haible.
8827 dnl Test whether <wchar.h> has the 'wint_t' type.
8828 dnl Prerequisite: AC_PROG_CC
8829
8830 AC_DEFUN([gt_TYPE_WINT_T],
8831 [
8832 AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
8833 [AC_TRY_COMPILE([#include <wchar.h>
8834 wint_t foo = (wchar_t)'\0';], ,
8835 gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
8836 if test $gt_cv_c_wint_t = yes; then
8837 AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
8838 fi
8839 ])
8840
8841 # xsize.m4 serial 3
8842 dnl Copyright (C) 2003-2004 Free Software Foundation, Inc.
8843 dnl This file is free software; the Free Software Foundation
8844 dnl gives unlimited permission to copy and/or distribute it,
8845 dnl with or without modifications, as long as this notice is preserved.
8846
8847 AC_DEFUN([gl_XSIZE],
8848 [
8849 dnl Prerequisites of lib/xsize.h.
8850 AC_REQUIRE([gl_SIZE_MAX])
8851 AC_REQUIRE([AC_C_INLINE])
8852 AC_CHECK_HEADERS(stdint.h)
8853 ])
8854
8855 # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
8856 #
8857 # This file is free software; the Free Software Foundation
8858 # gives unlimited permission to copy and/or distribute it,
8859 # with or without modifications, as long as this notice is preserved.
8860
8861 # AM_AUTOMAKE_VERSION(VERSION)
8862 # ----------------------------
8863 # Automake X.Y traces this macro to ensure aclocal.m4 has been
8864 # generated from the m4 files accompanying Automake X.Y.
8865 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
8866
8867 # AM_SET_CURRENT_AUTOMAKE_VERSION
8868 # -------------------------------
8869 # Call AM_AUTOMAKE_VERSION so it can be traced.
8870 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
8871 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
8872 [AM_AUTOMAKE_VERSION([1.9.6])])
8873
8874 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
8875
8876 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
8877 #
8878 # This file is free software; the Free Software Foundation
8879 # gives unlimited permission to copy and/or distribute it,
8880 # with or without modifications, as long as this notice is preserved.
8881
8882 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
8883 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
8884 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
8885 #
8886 # Of course, Automake must honor this variable whenever it calls a
8887 # tool from the auxiliary directory. The problem is that $srcdir (and
8888 # therefore $ac_aux_dir as well) can be either absolute or relative,
8889 # depending on how configure is run. This is pretty annoying, since
8890 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
8891 # source directory, any form will work fine, but in subdirectories a
8892 # relative path needs to be adjusted first.
8893 #
8894 # $ac_aux_dir/missing
8895 # fails when called from a subdirectory if $ac_aux_dir is relative
8896 # $top_srcdir/$ac_aux_dir/missing
8897 # fails if $ac_aux_dir is absolute,
8898 # fails when called from a subdirectory in a VPATH build with
8899 # a relative $ac_aux_dir
8900 #
8901 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8902 # are both prefixed by $srcdir. In an in-source build this is usually
8903 # harmless because $srcdir is `.', but things will broke when you
8904 # start a VPATH build or use an absolute $srcdir.
8905 #
8906 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
8907 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
8908 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
8909 # and then we would define $MISSING as
8910 # MISSING="\${SHELL} $am_aux_dir/missing"
8911 # This will work as long as MISSING is not called from configure, because
8912 # unfortunately $(top_srcdir) has no meaning in configure.
8913 # However there are other variables, like CC, which are often used in
8914 # configure, and could therefore not use this "fixed" $ac_aux_dir.
8915 #
8916 # Another solution, used here, is to always expand $ac_aux_dir to an
8917 # absolute PATH. The drawback is that using absolute paths prevent a
8918 # configured tree to be moved without reconfiguration.
8919
8920 AC_DEFUN([AM_AUX_DIR_EXPAND],
8921 [dnl Rely on autoconf to set up CDPATH properly.
8922 AC_PREREQ([2.50])dnl
8923 # expand $ac_aux_dir to an absolute path
8924 am_aux_dir=`cd $ac_aux_dir && pwd`
8925 ])
8926
8927 # AM_CONDITIONAL -*- Autoconf -*-
8928
8929 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
8930 # Free Software Foundation, Inc.
8931 #
8932 # This file is free software; the Free Software Foundation
8933 # gives unlimited permission to copy and/or distribute it,
8934 # with or without modifications, as long as this notice is preserved.
8935
8936 # serial 7
8937
8938 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
8939 # -------------------------------------
8940 # Define a conditional.
8941 AC_DEFUN([AM_CONDITIONAL],
8942 [AC_PREREQ(2.52)dnl
8943 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
8944 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
8945 AC_SUBST([$1_TRUE])
8946 AC_SUBST([$1_FALSE])
8947 if $2; then
8948 $1_TRUE=
8949 $1_FALSE='#'
8950 else
8951 $1_TRUE='#'
8952 $1_FALSE=
8953 fi
8954 AC_CONFIG_COMMANDS_PRE(
8955 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
8956 AC_MSG_ERROR([[conditional "$1" was never defined.
8957 Usually this means the macro was only invoked conditionally.]])
8958 fi])])
8959
8960
8961 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
8962 # Free Software Foundation, Inc.
8963 #
8964 # This file is free software; the Free Software Foundation
8965 # gives unlimited permission to copy and/or distribute it,
8966 # with or without modifications, as long as this notice is preserved.
8967
8968 # serial 8
8969
8970 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
8971 # written in clear, in which case automake, when reading aclocal.m4,
8972 # will think it sees a *use*, and therefore will trigger all it's
8973 # C support machinery. Also note that it means that autoscan, seeing
8974 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
8975
8976
8977 # _AM_DEPENDENCIES(NAME)
8978 # ----------------------
8979 # See how the compiler implements dependency checking.
8980 # NAME is "CC", "CXX", "GCJ", or "OBJC".
8981 # We try a few techniques and use that to set a single cache variable.
8982 #
8983 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
8984 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
8985 # dependency, and given that the user is not expected to run this macro,
8986 # just rely on AC_PROG_CC.
8987 AC_DEFUN([_AM_DEPENDENCIES],
8988 [AC_REQUIRE([AM_SET_DEPDIR])dnl
8989 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
8990 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
8991 AC_REQUIRE([AM_DEP_TRACK])dnl
8992
8993 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
8994 [$1], CXX, [depcc="$CXX" am_compiler_list=],
8995 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
8996 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
8997 [depcc="$$1" am_compiler_list=])
8998
8999 AC_CACHE_CHECK([dependency style of $depcc],
9000 [am_cv_$1_dependencies_compiler_type],
9001 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9002 # We make a subdir and do the tests there. Otherwise we can end up
9003 # making bogus files that we don't know about and never remove. For
9004 # instance it was reported that on HP-UX the gcc test will end up
9005 # making a dummy file named `D' -- because `-MD' means `put the output
9006 # in D'.
9007 mkdir conftest.dir
9008 # Copy depcomp to subdir because otherwise we won't find it if we're
9009 # using a relative directory.
9010 cp "$am_depcomp" conftest.dir
9011 cd conftest.dir
9012 # We will build objects and dependencies in a subdirectory because
9013 # it helps to detect inapplicable dependency modes. For instance
9014 # both Tru64's cc and ICC support -MD to output dependencies as a
9015 # side effect of compilation, but ICC will put the dependencies in
9016 # the current directory while Tru64 will put them in the object
9017 # directory.
9018 mkdir sub
9019
9020 am_cv_$1_dependencies_compiler_type=none
9021 if test "$am_compiler_list" = ""; then
9022 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9023 fi
9024 for depmode in $am_compiler_list; do
9025 # Setup a source with many dependencies, because some compilers
9026 # like to wrap large dependency lists on column 80 (with \), and
9027 # we should not choose a depcomp mode which is confused by this.
9028 #
9029 # We need to recreate these files for each test, as the compiler may
9030 # overwrite some of them when testing with obscure command lines.
9031 # This happens at least with the AIX C compiler.
9032 : > sub/conftest.c
9033 for i in 1 2 3 4 5 6; do
9034 echo '#include "conftst'$i'.h"' >> sub/conftest.c
9035 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9036 # Solaris 8's {/usr,}/bin/sh.
9037 touch sub/conftst$i.h
9038 done
9039 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9040
9041 case $depmode in
9042 nosideeffect)
9043 # after this tag, mechanisms are not by side-effect, so they'll
9044 # only be used when explicitly requested
9045 if test "x$enable_dependency_tracking" = xyes; then
9046 continue
9047 else
9048 break
9049 fi
9050 ;;
9051 none) break ;;
9052 esac
9053 # We check with `-c' and `-o' for the sake of the "dashmstdout"
9054 # mode. It turns out that the SunPro C++ compiler does not properly
9055 # handle `-M -o', and we need to detect this.
9056 if depmode=$depmode \
9057 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
9058 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9059 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
9060 >/dev/null 2>conftest.err &&
9061 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9062 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
9063 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9064 # icc doesn't choke on unknown options, it will just issue warnings
9065 # or remarks (even with -Werror). So we grep stderr for any message
9066 # that says an option was ignored or not supported.
9067 # When given -MP, icc 7.0 and 7.1 complain thusly:
9068 # icc: Command line warning: ignoring option '-M'; no argument required
9069 # The diagnosis changed in icc 8.0:
9070 # icc: Command line remark: option '-MP' not supported
9071 if (grep 'ignoring option' conftest.err ||
9072 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9073 am_cv_$1_dependencies_compiler_type=$depmode
9074 break
9075 fi
9076 fi
9077 done
9078
9079 cd ..
9080 rm -rf conftest.dir
9081 else
9082 am_cv_$1_dependencies_compiler_type=none
9083 fi
9084 ])
9085 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9086 AM_CONDITIONAL([am__fastdep$1], [
9087 test "x$enable_dependency_tracking" != xno \
9088 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9089 ])
9090
9091
9092 # AM_SET_DEPDIR
9093 # -------------
9094 # Choose a directory name for dependency files.
9095 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
9096 AC_DEFUN([AM_SET_DEPDIR],
9097 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9098 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9099 ])
9100
9101
9102 # AM_DEP_TRACK
9103 # ------------
9104 AC_DEFUN([AM_DEP_TRACK],
9105 [AC_ARG_ENABLE(dependency-tracking,
9106 [ --disable-dependency-tracking speeds up one-time build
9107 --enable-dependency-tracking do not reject slow dependency extractors])
9108 if test "x$enable_dependency_tracking" != xno; then
9109 am_depcomp="$ac_aux_dir/depcomp"
9110 AMDEPBACKSLASH='\'
9111 fi
9112 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9113 AC_SUBST([AMDEPBACKSLASH])
9114 ])
9115
9116 # Generate code to set up dependency tracking. -*- Autoconf -*-
9117
9118 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
9119 # Free Software Foundation, Inc.
9120 #
9121 # This file is free software; the Free Software Foundation
9122 # gives unlimited permission to copy and/or distribute it,
9123 # with or without modifications, as long as this notice is preserved.
9124
9125 #serial 3
9126
9127 # _AM_OUTPUT_DEPENDENCY_COMMANDS
9128 # ------------------------------
9129 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9130 [for mf in $CONFIG_FILES; do
9131 # Strip MF so we end up with the name of the file.
9132 mf=`echo "$mf" | sed -e 's/:.*$//'`
9133 # Check whether this is an Automake generated Makefile or not.
9134 # We used to match only the files named `Makefile.in', but
9135 # some people rename them; so instead we look at the file content.
9136 # Grep'ing the first line is not enough: some people post-process
9137 # each Makefile.in and add a new line on top of each file to say so.
9138 # So let's grep whole file.
9139 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
9140 dirpart=`AS_DIRNAME("$mf")`
9141 else
9142 continue
9143 fi
9144 # Extract the definition of DEPDIR, am__include, and am__quote
9145 # from the Makefile without running `make'.
9146 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
9147 test -z "$DEPDIR" && continue
9148 am__include=`sed -n 's/^am__include = //p' < "$mf"`
9149 test -z "am__include" && continue
9150 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
9151 # When using ansi2knr, U may be empty or an underscore; expand it
9152 U=`sed -n 's/^U = //p' < "$mf"`
9153 # Find all dependency output files, they are included files with
9154 # $(DEPDIR) in their names. We invoke sed twice because it is the
9155 # simplest approach to changing $(DEPDIR) to its actual value in the
9156 # expansion.
9157 for file in `sed -n "
9158 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
9159 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
9160 # Make sure the directory exists.
9161 test -f "$dirpart/$file" && continue
9162 fdir=`AS_DIRNAME(["$file"])`
9163 AS_MKDIR_P([$dirpart/$fdir])
9164 # echo "creating $dirpart/$file"
9165 echo '# dummy' > "$dirpart/$file"
9166 done
9167 done
9168 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
9169
9170
9171 # AM_OUTPUT_DEPENDENCY_COMMANDS
9172 # -----------------------------
9173 # This macro should only be invoked once -- use via AC_REQUIRE.
9174 #
9175 # This code is only required when automatic dependency tracking
9176 # is enabled. FIXME. This creates each `.P' file that we will
9177 # need in order to bootstrap the dependency handling code.
9178 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
9179 [AC_CONFIG_COMMANDS([depfiles],
9180 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
9181 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
9182 ])
9183
9184 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9185 # Free Software Foundation, Inc.
9186 #
9187 # This file is free software; the Free Software Foundation
9188 # gives unlimited permission to copy and/or distribute it,
9189 # with or without modifications, as long as this notice is preserved.
9190
9191 # serial 8
9192
9193 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
9194 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
9195
9196 # Do all the work for Automake. -*- Autoconf -*-
9197
9198 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
9199 # Free Software Foundation, Inc.
9200 #
9201 # This file is free software; the Free Software Foundation
9202 # gives unlimited permission to copy and/or distribute it,
9203 # with or without modifications, as long as this notice is preserved.
9204
9205 # serial 12
9206
9207 # This macro actually does too much. Some checks are only needed if
9208 # your package does certain things. But this isn't really a big deal.
9209
9210 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
9211 # AM_INIT_AUTOMAKE([OPTIONS])
9212 # -----------------------------------------------
9213 # The call with PACKAGE and VERSION arguments is the old style
9214 # call (pre autoconf-2.50), which is being phased out. PACKAGE
9215 # and VERSION should now be passed to AC_INIT and removed from
9216 # the call to AM_INIT_AUTOMAKE.
9217 # We support both call styles for the transition. After
9218 # the next Automake release, Autoconf can make the AC_INIT
9219 # arguments mandatory, and then we can depend on a new Autoconf
9220 # release and drop the old call support.
9221 AC_DEFUN([AM_INIT_AUTOMAKE],
9222 [AC_PREREQ([2.58])dnl
9223 dnl Autoconf wants to disallow AM_ names. We explicitly allow
9224 dnl the ones we care about.
9225 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
9226 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
9227 AC_REQUIRE([AC_PROG_INSTALL])dnl
9228 # test to see if srcdir already configured
9229 if test "`cd $srcdir && pwd`" != "`pwd`" &&
9230 test -f $srcdir/config.status; then
9231 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
9232 fi
9233
9234 # test whether we have cygpath
9235 if test -z "$CYGPATH_W"; then
9236 if (cygpath --version) >/dev/null 2>/dev/null; then
9237 CYGPATH_W='cygpath -w'
9238 else
9239 CYGPATH_W=echo
9240 fi
9241 fi
9242 AC_SUBST([CYGPATH_W])
9243
9244 # Define the identity of the package.
9245 dnl Distinguish between old-style and new-style calls.
9246 m4_ifval([$2],
9247 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
9248 AC_SUBST([PACKAGE], [$1])dnl
9249 AC_SUBST([VERSION], [$2])],
9250 [_AM_SET_OPTIONS([$1])dnl
9251 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
9252 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
9253
9254 _AM_IF_OPTION([no-define],,
9255 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
9256 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
9257
9258 # Some tools Automake needs.
9259 AC_REQUIRE([AM_SANITY_CHECK])dnl
9260 AC_REQUIRE([AC_ARG_PROGRAM])dnl
9261 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
9262 AM_MISSING_PROG(AUTOCONF, autoconf)
9263 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
9264 AM_MISSING_PROG(AUTOHEADER, autoheader)
9265 AM_MISSING_PROG(MAKEINFO, makeinfo)
9266 AM_PROG_INSTALL_SH
9267 AM_PROG_INSTALL_STRIP
9268 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
9269 # We need awk for the "check" target. The system "awk" is bad on
9270 # some platforms.
9271 AC_REQUIRE([AC_PROG_AWK])dnl
9272 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9273 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9274 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
9275 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
9276 [_AM_PROG_TAR([v7])])])
9277 _AM_IF_OPTION([no-dependencies],,
9278 [AC_PROVIDE_IFELSE([AC_PROG_CC],
9279 [_AM_DEPENDENCIES(CC)],
9280 [define([AC_PROG_CC],
9281 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
9282 AC_PROVIDE_IFELSE([AC_PROG_CXX],
9283 [_AM_DEPENDENCIES(CXX)],
9284 [define([AC_PROG_CXX],
9285 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
9286 ])
9287 ])
9288
9289
9290 # When config.status generates a header, we must update the stamp-h file.
9291 # This file resides in the same directory as the config header
9292 # that is generated. The stamp files are numbered to have different names.
9293
9294 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
9295 # loop where config.status creates the headers, so we can generate
9296 # our stamp files there.
9297 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
9298 [# Compute $1's index in $config_headers.
9299 _am_stamp_count=1
9300 for _am_header in $config_headers :; do
9301 case $_am_header in
9302 $1 | $1:* )
9303 break ;;
9304 * )
9305 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
9306 esac
9307 done
9308 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
9309
9310 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9311 #
9312 # This file is free software; the Free Software Foundation
9313 # gives unlimited permission to copy and/or distribute it,
9314 # with or without modifications, as long as this notice is preserved.
9315
9316 # AM_PROG_INSTALL_SH
9317 # ------------------
9318 # Define $install_sh.
9319 AC_DEFUN([AM_PROG_INSTALL_SH],
9320 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9321 install_sh=${install_sh-"$am_aux_dir/install-sh"}
9322 AC_SUBST(install_sh)])
9323
9324 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
9325 #
9326 # This file is free software; the Free Software Foundation
9327 # gives unlimited permission to copy and/or distribute it,
9328 # with or without modifications, as long as this notice is preserved.
9329
9330 # serial 2
9331
9332 # Check whether the underlying file-system supports filenames
9333 # with a leading dot. For instance MS-DOS doesn't.
9334 AC_DEFUN([AM_SET_LEADING_DOT],
9335 [rm -rf .tst 2>/dev/null
9336 mkdir .tst 2>/dev/null
9337 if test -d .tst; then
9338 am__leading_dot=.
9339 else
9340 am__leading_dot=_
9341 fi
9342 rmdir .tst 2>/dev/null
9343 AC_SUBST([am__leading_dot])])
9344
9345 # Check to see how 'make' treats includes. -*- Autoconf -*-
9346
9347 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
9348 #
9349 # This file is free software; the Free Software Foundation
9350 # gives unlimited permission to copy and/or distribute it,
9351 # with or without modifications, as long as this notice is preserved.
9352
9353 # serial 3
9354
9355 # AM_MAKE_INCLUDE()
9356 # -----------------
9357 # Check to see how make treats includes.
9358 AC_DEFUN([AM_MAKE_INCLUDE],
9359 [am_make=${MAKE-make}
9360 cat > confinc << 'END'
9361 am__doit:
9362 @echo done
9363 .PHONY: am__doit
9364 END
9365 # If we don't find an include directive, just comment out the code.
9366 AC_MSG_CHECKING([for style of include used by $am_make])
9367 am__include="#"
9368 am__quote=
9369 _am_result=none
9370 # First try GNU make style include.
9371 echo "include confinc" > confmf
9372 # We grep out `Entering directory' and `Leaving directory'
9373 # messages which can occur if `w' ends up in MAKEFLAGS.
9374 # In particular we don't look at `^make:' because GNU make might
9375 # be invoked under some other name (usually "gmake"), in which
9376 # case it prints its new name instead of `make'.
9377 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
9378 am__include=include
9379 am__quote=
9380 _am_result=GNU
9381 fi
9382 # Now try BSD make style include.
9383 if test "$am__include" = "#"; then
9384 echo '.include "confinc"' > confmf
9385 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
9386 am__include=.include
9387 am__quote="\""
9388 _am_result=BSD
9389 fi
9390 fi
9391 AC_SUBST([am__include])
9392 AC_SUBST([am__quote])
9393 AC_MSG_RESULT([$_am_result])
9394 rm -f confinc confmf
9395 ])
9396
9397 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
9398
9399 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
9400 # Free Software Foundation, Inc.
9401 #
9402 # This file is free software; the Free Software Foundation
9403 # gives unlimited permission to copy and/or distribute it,
9404 # with or without modifications, as long as this notice is preserved.
9405
9406 # serial 4
9407
9408 # AM_MISSING_PROG(NAME, PROGRAM)
9409 # ------------------------------
9410 AC_DEFUN([AM_MISSING_PROG],
9411 [AC_REQUIRE([AM_MISSING_HAS_RUN])
9412 $1=${$1-"${am_missing_run}$2"}
9413 AC_SUBST($1)])
9414
9415
9416 # AM_MISSING_HAS_RUN
9417 # ------------------
9418 # Define MISSING if not defined so far and test if it supports --run.
9419 # If it does, set am_missing_run to use it, otherwise, to nothing.
9420 AC_DEFUN([AM_MISSING_HAS_RUN],
9421 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
9422 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
9423 # Use eval to expand $SHELL
9424 if eval "$MISSING --run true"; then
9425 am_missing_run="$MISSING --run "
9426 else
9427 am_missing_run=
9428 AC_MSG_WARN([`missing' script is too old or missing])
9429 fi
9430 ])
9431
9432 # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
9433 #
9434 # This file is free software; the Free Software Foundation
9435 # gives unlimited permission to copy and/or distribute it,
9436 # with or without modifications, as long as this notice is preserved.
9437
9438 # AM_PROG_MKDIR_P
9439 # ---------------
9440 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
9441 #
9442 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
9443 # created by `make install' are always world readable, even if the
9444 # installer happens to have an overly restrictive umask (e.g. 077).
9445 # This was a mistake. There are at least two reasons why we must not
9446 # use `-m 0755':
9447 # - it causes special bits like SGID to be ignored,
9448 # - it may be too restrictive (some setups expect 775 directories).
9449 #
9450 # Do not use -m 0755 and let people choose whatever they expect by
9451 # setting umask.
9452 #
9453 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
9454 # Some implementations (such as Solaris 8's) are not thread-safe: if a
9455 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
9456 # concurrently, both version can detect that a/ is missing, but only
9457 # one can create it and the other will error out. Consequently we
9458 # restrict ourselves to GNU make (using the --version option ensures
9459 # this.)
9460 AC_DEFUN([AM_PROG_MKDIR_P],
9461 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
9462 # We used to keeping the `.' as first argument, in order to
9463 # allow $(mkdir_p) to be used without argument. As in
9464 # $(mkdir_p) $(somedir)
9465 # where $(somedir) is conditionally defined. However this is wrong
9466 # for two reasons:
9467 # 1. if the package is installed by a user who cannot write `.'
9468 # make install will fail,
9469 # 2. the above comment should most certainly read
9470 # $(mkdir_p) $(DESTDIR)$(somedir)
9471 # so it does not work when $(somedir) is undefined and
9472 # $(DESTDIR) is not.
9473 # To support the latter case, we have to write
9474 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
9475 # so the `.' trick is pointless.
9476 mkdir_p='mkdir -p --'
9477 else
9478 # On NextStep and OpenStep, the `mkdir' command does not
9479 # recognize any option. It will interpret all options as
9480 # directories to create, and then abort because `.' already
9481 # exists.
9482 for d in ./-p ./--version;
9483 do
9484 test -d $d && rmdir $d
9485 done
9486 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
9487 if test -f "$ac_aux_dir/mkinstalldirs"; then
9488 mkdir_p='$(mkinstalldirs)'
9489 else
9490 mkdir_p='$(install_sh) -d'
9491 fi
9492 fi
9493 AC_SUBST([mkdir_p])])
9494
9495 # Helper functions for option handling. -*- Autoconf -*-
9496
9497 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
9498 #
9499 # This file is free software; the Free Software Foundation
9500 # gives unlimited permission to copy and/or distribute it,
9501 # with or without modifications, as long as this notice is preserved.
9502
9503 # serial 3
9504
9505 # _AM_MANGLE_OPTION(NAME)
9506 # -----------------------
9507 AC_DEFUN([_AM_MANGLE_OPTION],
9508 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
9509
9510 # _AM_SET_OPTION(NAME)
9511 # ------------------------------
9512 # Set option NAME. Presently that only means defining a flag for this option.
9513 AC_DEFUN([_AM_SET_OPTION],
9514 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
9515
9516 # _AM_SET_OPTIONS(OPTIONS)
9517 # ----------------------------------
9518 # OPTIONS is a space-separated list of Automake options.
9519 AC_DEFUN([_AM_SET_OPTIONS],
9520 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
9521
9522 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
9523 # -------------------------------------------
9524 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9525 AC_DEFUN([_AM_IF_OPTION],
9526 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
9527
9528 # Check to make sure that the build environment is sane. -*- Autoconf -*-
9529
9530 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
9531 # Free Software Foundation, Inc.
9532 #
9533 # This file is free software; the Free Software Foundation
9534 # gives unlimited permission to copy and/or distribute it,
9535 # with or without modifications, as long as this notice is preserved.
9536
9537 # serial 4
9538
9539 # AM_SANITY_CHECK
9540 # ---------------
9541 AC_DEFUN([AM_SANITY_CHECK],
9542 [AC_MSG_CHECKING([whether build environment is sane])
9543 # Just in case
9544 sleep 1
9545 echo timestamp > conftest.file
9546 # Do `set' in a subshell so we don't clobber the current shell's
9547 # arguments. Must try -L first in case configure is actually a
9548 # symlink; some systems play weird games with the mod time of symlinks
9549 # (eg FreeBSD returns the mod time of the symlink's containing
9550 # directory).
9551 if (
9552 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
9553 if test "$[*]" = "X"; then
9554 # -L didn't work.
9555 set X `ls -t $srcdir/configure conftest.file`
9556 fi
9557 rm -f conftest.file
9558 if test "$[*]" != "X $srcdir/configure conftest.file" \
9559 && test "$[*]" != "X conftest.file $srcdir/configure"; then
9560
9561 # If neither matched, then we have a broken ls. This can happen
9562 # if, for instance, CONFIG_SHELL is bash and it inherits a
9563 # broken ls alias from the environment. This has actually
9564 # happened. Such a system could not be considered "sane".
9565 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
9566 alias in your environment])
9567 fi
9568
9569 test "$[2]" = conftest.file
9570 )
9571 then
9572 # Ok.
9573 :
9574 else
9575 AC_MSG_ERROR([newly created file is older than distributed files!
9576 Check your system clock])
9577 fi
9578 AC_MSG_RESULT(yes)])
9579
9580 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
9581 #
9582 # This file is free software; the Free Software Foundation
9583 # gives unlimited permission to copy and/or distribute it,
9584 # with or without modifications, as long as this notice is preserved.
9585
9586 # AM_PROG_INSTALL_STRIP
9587 # ---------------------
9588 # One issue with vendor `install' (even GNU) is that you can't
9589 # specify the program used to strip binaries. This is especially
9590 # annoying in cross-compiling environments, where the build's strip
9591 # is unlikely to handle the host's binaries.
9592 # Fortunately install-sh will honor a STRIPPROG variable, so we
9593 # always use install-sh in `make install-strip', and initialize
9594 # STRIPPROG with the value of the STRIP variable (set by the user).
9595 AC_DEFUN([AM_PROG_INSTALL_STRIP],
9596 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9597 # Installed binaries are usually stripped using `strip' when the user
9598 # run `make install-strip'. However `strip' might not be the right
9599 # tool to use in cross-compilation environments, therefore Automake
9600 # will honor the `STRIP' environment variable to overrule this program.
9601 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9602 if test "$cross_compiling" != no; then
9603 AC_CHECK_TOOL([STRIP], [strip], :)
9604 fi
9605 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
9606 AC_SUBST([INSTALL_STRIP_PROGRAM])])
9607
9608 # Check how to create a tarball. -*- Autoconf -*-
9609
9610 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
9611 #
9612 # This file is free software; the Free Software Foundation
9613 # gives unlimited permission to copy and/or distribute it,
9614 # with or without modifications, as long as this notice is preserved.
9615
9616 # serial 2
9617
9618 # _AM_PROG_TAR(FORMAT)
9619 # --------------------
9620 # Check how to create a tarball in format FORMAT.
9621 # FORMAT should be one of `v7', `ustar', or `pax'.
9622 #
9623 # Substitute a variable $(am__tar) that is a command
9624 # writing to stdout a FORMAT-tarball containing the directory
9625 # $tardir.
9626 # tardir=directory && $(am__tar) > result.tar
9627 #
9628 # Substitute a variable $(am__untar) that extract such
9629 # a tarball read from stdin.
9630 # $(am__untar) < result.tar
9631 AC_DEFUN([_AM_PROG_TAR],
9632 [# Always define AMTAR for backward compatibility.
9633 AM_MISSING_PROG([AMTAR], [tar])
9634 m4_if([$1], [v7],
9635 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9636 [m4_case([$1], [ustar],, [pax],,
9637 [m4_fatal([Unknown tar format])])
9638 AC_MSG_CHECKING([how to create a $1 tar archive])
9639 # Loop over all known methods to create a tar archive until one works.
9640 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9641 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
9642 # Do not fold the above two line into one, because Tru64 sh and
9643 # Solaris sh will not grok spaces in the rhs of `-'.
9644 for _am_tool in $_am_tools
9645 do
9646 case $_am_tool in
9647 gnutar)
9648 for _am_tar in tar gnutar gtar;
9649 do
9650 AM_RUN_LOG([$_am_tar --version]) && break
9651 done
9652 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9653 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9654 am__untar="$_am_tar -xf -"
9655 ;;
9656 plaintar)
9657 # Must skip GNU tar: if it does not support --format= it doesn't create
9658 # ustar tarball either.
9659 (tar --version) >/dev/null 2>&1 && continue
9660 am__tar='tar chf - "$$tardir"'
9661 am__tar_='tar chf - "$tardir"'
9662 am__untar='tar xf -'
9663 ;;
9664 pax)
9665 am__tar='pax -L -x $1 -w "$$tardir"'
9666 am__tar_='pax -L -x $1 -w "$tardir"'
9667 am__untar='pax -r'
9668 ;;
9669 cpio)
9670 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9671 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9672 am__untar='cpio -i -H $1 -d'
9673 ;;
9674 none)
9675 am__tar=false
9676 am__tar_=false
9677 am__untar=false
9678 ;;
9679 esac
9680
9681 # If the value was cached, stop now. We just wanted to have am__tar
9682 # and am__untar set.
9683 test -n "${am_cv_prog_tar_$1}" && break
9684
9685 # tar/untar a dummy directory, and stop if the command works
9686 rm -rf conftest.dir
9687 mkdir conftest.dir
9688 echo GrepMe > conftest.dir/file
9689 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
9690 rm -rf conftest.dir
9691 if test -s conftest.tar; then
9692 AM_RUN_LOG([$am__untar <conftest.tar])
9693 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
9694 fi
9695 done
9696 rm -rf conftest.dir
9697
9698 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
9699 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
9700 AC_SUBST([am__tar])
9701 AC_SUBST([am__untar])
9702 ]) # _AM_PROG_TAR
9703
9704 m4_include([acinclude.m4])