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