Upload Tizen:Main source
[external/shadow-utils.git] / aclocal.m4
1 # generated automatically by aclocal 1.10.2 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_ifndef([AC_AUTOCONF_VERSION],
15   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17 [m4_warning([this file was generated for autoconf 2.63.
18 You have another version of autoconf.  It may work, but is not guaranteed to.
19 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22 # gettext.m4 serial 60 (gettext-0.17)
23 dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
24 dnl This file is free software; the Free Software Foundation
25 dnl gives unlimited permission to copy and/or distribute it,
26 dnl with or without modifications, as long as this notice is preserved.
27 dnl
28 dnl This file can can be used in projects which are not available under
29 dnl the GNU General Public License or the GNU Library General Public
30 dnl License but which still want to provide support for the GNU gettext
31 dnl functionality.
32 dnl Please note that the actual code of the GNU gettext library is covered
33 dnl by the GNU Library General Public License, and the rest of the GNU
34 dnl gettext package package is covered by the GNU General Public License.
35 dnl They are *not* in the public domain.
36
37 dnl Authors:
38 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
39 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006.
40
41 dnl Macro to add for using GNU gettext.
42
43 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
44 dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
45 dnl    default (if it is not specified or empty) is 'no-libtool'.
46 dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
47 dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
48 dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
49 dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
50 dnl    depending on --{enable,disable}-{shared,static} and on the presence of
51 dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
52 dnl    $(top_builddir)/intl/libintl.a will be created.
53 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
54 dnl    implementations (in libc or libintl) without the ngettext() function
55 dnl    will be ignored.  If NEEDSYMBOL is specified and is
56 dnl    'need-formatstring-macros', then GNU gettext implementations that don't
57 dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
58 dnl INTLDIR is used to find the intl libraries.  If empty,
59 dnl    the value `$(top_builddir)/intl/' is used.
60 dnl
61 dnl The result of the configuration is one of three cases:
62 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
63 dnl    and used.
64 dnl    Catalog format: GNU --> install in $(datadir)
65 dnl    Catalog extension: .mo after installation, .gmo in source tree
66 dnl 2) GNU gettext has been found in the system's C library.
67 dnl    Catalog format: GNU --> install in $(datadir)
68 dnl    Catalog extension: .mo after installation, .gmo in source tree
69 dnl 3) No internationalization, always use English msgid.
70 dnl    Catalog format: none
71 dnl    Catalog extension: none
72 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
73 dnl The use of .gmo is historical (it was needed to avoid overwriting the
74 dnl GNU format catalogs when building on a platform with an X/Open gettext),
75 dnl but we keep it in order not to force irrelevant filename changes on the
76 dnl maintainers.
77 dnl
78 AC_DEFUN([AM_GNU_GETTEXT],
79 [
80   dnl Argument checking.
81   ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
82     [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
83 ])])])])])
84   ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
85     [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
86 ])])])])
87   define([gt_included_intl],
88     ifelse([$1], [external],
89       ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
90       [yes]))
91   define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
92   gt_NEEDS_INIT
93   AM_GNU_GETTEXT_NEED([$2])
94
95   AC_REQUIRE([AM_PO_SUBDIRS])dnl
96   ifelse(gt_included_intl, yes, [
97     AC_REQUIRE([AM_INTL_SUBDIR])dnl
98   ])
99
100   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
101   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
102   AC_REQUIRE([AC_LIB_RPATH])
103
104   dnl Sometimes libintl requires libiconv, so first search for libiconv.
105   dnl Ideally we would do this search only after the
106   dnl      if test "$USE_NLS" = "yes"; then
107   dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
108   dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
109   dnl the configure script would need to contain the same shell code
110   dnl again, outside any 'if'. There are two solutions:
111   dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
112   dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
113   dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
114   dnl documented, we avoid it.
115   ifelse(gt_included_intl, yes, , [
116     AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
117   ])
118
119   dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
120   gt_INTL_MACOSX
121
122   dnl Set USE_NLS.
123   AC_REQUIRE([AM_NLS])
124
125   ifelse(gt_included_intl, yes, [
126     BUILD_INCLUDED_LIBINTL=no
127     USE_INCLUDED_LIBINTL=no
128   ])
129   LIBINTL=
130   LTLIBINTL=
131   POSUB=
132
133   dnl Add a version number to the cache macros.
134   case " $gt_needs " in
135     *" need-formatstring-macros "*) gt_api_version=3 ;;
136     *" need-ngettext "*) gt_api_version=2 ;;
137     *) gt_api_version=1 ;;
138   esac
139   gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
140   gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
141
142   dnl If we use NLS figure out what method
143   if test "$USE_NLS" = "yes"; then
144     gt_use_preinstalled_gnugettext=no
145     ifelse(gt_included_intl, yes, [
146       AC_MSG_CHECKING([whether included gettext is requested])
147       AC_ARG_WITH(included-gettext,
148         [  --with-included-gettext use the GNU gettext library included here],
149         nls_cv_force_use_gnu_gettext=$withval,
150         nls_cv_force_use_gnu_gettext=no)
151       AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
152
153       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
154       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
155     ])
156         dnl User does not insist on using GNU NLS library.  Figure out what
157         dnl to use.  If GNU gettext is available we use this.  Else we have
158         dnl to fall back to GNU NLS library.
159
160         if test $gt_api_version -ge 3; then
161           gt_revision_test_code='
162 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
163 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
164 #endif
165 changequote(,)dnl
166 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
167 changequote([,])dnl
168 '
169         else
170           gt_revision_test_code=
171         fi
172         if test $gt_api_version -ge 2; then
173           gt_expression_test_code=' + * ngettext ("", "", 0)'
174         else
175           gt_expression_test_code=
176         fi
177
178         AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
179          [AC_TRY_LINK([#include <libintl.h>
180 $gt_revision_test_code
181 extern int _nl_msg_cat_cntr;
182 extern int *_nl_domain_bindings;],
183             [bindtextdomain ("", "");
184 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
185             [eval "$gt_func_gnugettext_libc=yes"],
186             [eval "$gt_func_gnugettext_libc=no"])])
187
188         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
189           dnl Sometimes libintl requires libiconv, so first search for libiconv.
190           ifelse(gt_included_intl, yes, , [
191             AM_ICONV_LINK
192           ])
193           dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
194           dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
195           dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
196           dnl even if libiconv doesn't exist.
197           AC_LIB_LINKFLAGS_BODY([intl])
198           AC_CACHE_CHECK([for GNU gettext in libintl],
199             [$gt_func_gnugettext_libintl],
200            [gt_save_CPPFLAGS="$CPPFLAGS"
201             CPPFLAGS="$CPPFLAGS $INCINTL"
202             gt_save_LIBS="$LIBS"
203             LIBS="$LIBS $LIBINTL"
204             dnl Now see whether libintl exists and does not depend on libiconv.
205             AC_TRY_LINK([#include <libintl.h>
206 $gt_revision_test_code
207 extern int _nl_msg_cat_cntr;
208 extern
209 #ifdef __cplusplus
210 "C"
211 #endif
212 const char *_nl_expand_alias (const char *);],
213               [bindtextdomain ("", "");
214 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
215               [eval "$gt_func_gnugettext_libintl=yes"],
216               [eval "$gt_func_gnugettext_libintl=no"])
217             dnl Now see whether libintl exists and depends on libiconv.
218             if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
219               LIBS="$LIBS $LIBICONV"
220               AC_TRY_LINK([#include <libintl.h>
221 $gt_revision_test_code
222 extern int _nl_msg_cat_cntr;
223 extern
224 #ifdef __cplusplus
225 "C"
226 #endif
227 const char *_nl_expand_alias (const char *);],
228                 [bindtextdomain ("", "");
229 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
230                [LIBINTL="$LIBINTL $LIBICONV"
231                 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
232                 eval "$gt_func_gnugettext_libintl=yes"
233                ])
234             fi
235             CPPFLAGS="$gt_save_CPPFLAGS"
236             LIBS="$gt_save_LIBS"])
237         fi
238
239         dnl If an already present or preinstalled GNU gettext() is found,
240         dnl use it.  But if this macro is used in GNU gettext, and GNU
241         dnl gettext is already preinstalled in libintl, we update this
242         dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
243         if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
244            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
245                 && test "$PACKAGE" != gettext-runtime \
246                 && test "$PACKAGE" != gettext-tools; }; then
247           gt_use_preinstalled_gnugettext=yes
248         else
249           dnl Reset the values set by searching for libintl.
250           LIBINTL=
251           LTLIBINTL=
252           INCINTL=
253         fi
254
255     ifelse(gt_included_intl, yes, [
256         if test "$gt_use_preinstalled_gnugettext" != "yes"; then
257           dnl GNU gettext is not found in the C library.
258           dnl Fall back on included GNU gettext library.
259           nls_cv_use_gnu_gettext=yes
260         fi
261       fi
262
263       if test "$nls_cv_use_gnu_gettext" = "yes"; then
264         dnl Mark actions used to generate GNU NLS library.
265         BUILD_INCLUDED_LIBINTL=yes
266         USE_INCLUDED_LIBINTL=yes
267         LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
268         LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
269         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
270       fi
271
272       CATOBJEXT=
273       if test "$gt_use_preinstalled_gnugettext" = "yes" \
274          || test "$nls_cv_use_gnu_gettext" = "yes"; then
275         dnl Mark actions to use GNU gettext tools.
276         CATOBJEXT=.gmo
277       fi
278     ])
279
280     if test -n "$INTL_MACOSX_LIBS"; then
281       if test "$gt_use_preinstalled_gnugettext" = "yes" \
282          || test "$nls_cv_use_gnu_gettext" = "yes"; then
283         dnl Some extra flags are needed during linking.
284         LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
285         LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
286       fi
287     fi
288
289     if test "$gt_use_preinstalled_gnugettext" = "yes" \
290        || test "$nls_cv_use_gnu_gettext" = "yes"; then
291       AC_DEFINE(ENABLE_NLS, 1,
292         [Define to 1 if translation of program messages to the user's native language
293    is requested.])
294     else
295       USE_NLS=no
296     fi
297   fi
298
299   AC_MSG_CHECKING([whether to use NLS])
300   AC_MSG_RESULT([$USE_NLS])
301   if test "$USE_NLS" = "yes"; then
302     AC_MSG_CHECKING([where the gettext function comes from])
303     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
304       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
305         gt_source="external libintl"
306       else
307         gt_source="libc"
308       fi
309     else
310       gt_source="included intl directory"
311     fi
312     AC_MSG_RESULT([$gt_source])
313   fi
314
315   if test "$USE_NLS" = "yes"; then
316
317     if test "$gt_use_preinstalled_gnugettext" = "yes"; then
318       if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
319         AC_MSG_CHECKING([how to link with libintl])
320         AC_MSG_RESULT([$LIBINTL])
321         AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
322       fi
323
324       dnl For backward compatibility. Some packages may be using this.
325       AC_DEFINE(HAVE_GETTEXT, 1,
326        [Define if the GNU gettext() function is already present or preinstalled.])
327       AC_DEFINE(HAVE_DCGETTEXT, 1,
328        [Define if the GNU dcgettext() function is already present or preinstalled.])
329     fi
330
331     dnl We need to process the po/ directory.
332     POSUB=po
333   fi
334
335   ifelse(gt_included_intl, yes, [
336     dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
337     dnl to 'yes' because some of the testsuite requires it.
338     if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
339       BUILD_INCLUDED_LIBINTL=yes
340     fi
341
342     dnl Make all variables we use known to autoconf.
343     AC_SUBST(BUILD_INCLUDED_LIBINTL)
344     AC_SUBST(USE_INCLUDED_LIBINTL)
345     AC_SUBST(CATOBJEXT)
346
347     dnl For backward compatibility. Some configure.ins may be using this.
348     nls_cv_header_intl=
349     nls_cv_header_libgt=
350
351     dnl For backward compatibility. Some Makefiles may be using this.
352     DATADIRNAME=share
353     AC_SUBST(DATADIRNAME)
354
355     dnl For backward compatibility. Some Makefiles may be using this.
356     INSTOBJEXT=.mo
357     AC_SUBST(INSTOBJEXT)
358
359     dnl For backward compatibility. Some Makefiles may be using this.
360     GENCAT=gencat
361     AC_SUBST(GENCAT)
362
363     dnl For backward compatibility. Some Makefiles may be using this.
364     INTLOBJS=
365     if test "$USE_INCLUDED_LIBINTL" = yes; then
366       INTLOBJS="\$(GETTOBJS)"
367     fi
368     AC_SUBST(INTLOBJS)
369
370     dnl Enable libtool support if the surrounding package wishes it.
371     INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
372     AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
373   ])
374
375   dnl For backward compatibility. Some Makefiles may be using this.
376   INTLLIBS="$LIBINTL"
377   AC_SUBST(INTLLIBS)
378
379   dnl Make all documented variables known to autoconf.
380   AC_SUBST(LIBINTL)
381   AC_SUBST(LTLIBINTL)
382   AC_SUBST(POSUB)
383 ])
384
385
386 dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
387 m4_define([gt_NEEDS_INIT],
388 [
389   m4_divert_text([DEFAULTS], [gt_needs=])
390   m4_define([gt_NEEDS_INIT], [])
391 ])
392
393
394 dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
395 AC_DEFUN([AM_GNU_GETTEXT_NEED],
396 [
397   m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
398 ])
399
400
401 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
402 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
403
404 # iconv.m4 serial AM6 (gettext-0.17)
405 dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
406 dnl This file is free software; the Free Software Foundation
407 dnl gives unlimited permission to copy and/or distribute it,
408 dnl with or without modifications, as long as this notice is preserved.
409
410 dnl From Bruno Haible.
411
412 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
413 [
414   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
415   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
416   AC_REQUIRE([AC_LIB_RPATH])
417
418   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
419   dnl accordingly.
420   AC_LIB_LINKFLAGS_BODY([iconv])
421 ])
422
423 AC_DEFUN([AM_ICONV_LINK],
424 [
425   dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
426   dnl those with the standalone portable GNU libiconv installed).
427   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
428
429   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
430   dnl accordingly.
431   AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
432
433   dnl Add $INCICONV to CPPFLAGS before performing the following checks,
434   dnl because if the user has installed libiconv and not disabled its use
435   dnl via --without-libiconv-prefix, he wants to use it. The first
436   dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
437   am_save_CPPFLAGS="$CPPFLAGS"
438   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
439
440   AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
441     am_cv_func_iconv="no, consider installing GNU libiconv"
442     am_cv_lib_iconv=no
443     AC_TRY_LINK([#include <stdlib.h>
444 #include <iconv.h>],
445       [iconv_t cd = iconv_open("","");
446        iconv(cd,NULL,NULL,NULL,NULL);
447        iconv_close(cd);],
448       am_cv_func_iconv=yes)
449     if test "$am_cv_func_iconv" != yes; then
450       am_save_LIBS="$LIBS"
451       LIBS="$LIBS $LIBICONV"
452       AC_TRY_LINK([#include <stdlib.h>
453 #include <iconv.h>],
454         [iconv_t cd = iconv_open("","");
455          iconv(cd,NULL,NULL,NULL,NULL);
456          iconv_close(cd);],
457         am_cv_lib_iconv=yes
458         am_cv_func_iconv=yes)
459       LIBS="$am_save_LIBS"
460     fi
461   ])
462   if test "$am_cv_func_iconv" = yes; then
463     AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
464       dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
465       am_save_LIBS="$LIBS"
466       if test $am_cv_lib_iconv = yes; then
467         LIBS="$LIBS $LIBICONV"
468       fi
469       AC_TRY_RUN([
470 #include <iconv.h>
471 #include <string.h>
472 int main ()
473 {
474   /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
475      returns.  */
476   {
477     iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
478     if (cd_utf8_to_88591 != (iconv_t)(-1))
479       {
480         static const char input[] = "\342\202\254"; /* EURO SIGN */
481         char buf[10];
482         const char *inptr = input;
483         size_t inbytesleft = strlen (input);
484         char *outptr = buf;
485         size_t outbytesleft = sizeof (buf);
486         size_t res = iconv (cd_utf8_to_88591,
487                             (char **) &inptr, &inbytesleft,
488                             &outptr, &outbytesleft);
489         if (res == 0)
490           return 1;
491       }
492   }
493 #if 0 /* This bug could be worked around by the caller.  */
494   /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
495   {
496     iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
497     if (cd_88591_to_utf8 != (iconv_t)(-1))
498       {
499         static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
500         char buf[50];
501         const char *inptr = input;
502         size_t inbytesleft = strlen (input);
503         char *outptr = buf;
504         size_t outbytesleft = sizeof (buf);
505         size_t res = iconv (cd_88591_to_utf8,
506                             (char **) &inptr, &inbytesleft,
507                             &outptr, &outbytesleft);
508         if ((int)res > 0)
509           return 1;
510       }
511   }
512 #endif
513   /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
514      provided.  */
515   if (/* Try standardized names.  */
516       iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
517       /* Try IRIX, OSF/1 names.  */
518       && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
519       /* Try AIX names.  */
520       && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
521       /* Try HP-UX names.  */
522       && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
523     return 1;
524   return 0;
525 }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
526         [case "$host_os" in
527            aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
528            *)            am_cv_func_iconv_works="guessing yes" ;;
529          esac])
530       LIBS="$am_save_LIBS"
531     ])
532     case "$am_cv_func_iconv_works" in
533       *no) am_func_iconv=no am_cv_lib_iconv=no ;;
534       *)   am_func_iconv=yes ;;
535     esac
536   else
537     am_func_iconv=no am_cv_lib_iconv=no
538   fi
539   if test "$am_func_iconv" = yes; then
540     AC_DEFINE(HAVE_ICONV, 1,
541       [Define if you have the iconv() function and it works.])
542   fi
543   if test "$am_cv_lib_iconv" = yes; then
544     AC_MSG_CHECKING([how to link with libiconv])
545     AC_MSG_RESULT([$LIBICONV])
546   else
547     dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
548     dnl either.
549     CPPFLAGS="$am_save_CPPFLAGS"
550     LIBICONV=
551     LTLIBICONV=
552   fi
553   AC_SUBST(LIBICONV)
554   AC_SUBST(LTLIBICONV)
555 ])
556
557 AC_DEFUN([AM_ICONV],
558 [
559   AM_ICONV_LINK
560   if test "$am_cv_func_iconv" = yes; then
561     AC_MSG_CHECKING([for iconv declaration])
562     AC_CACHE_VAL(am_cv_proto_iconv, [
563       AC_TRY_COMPILE([
564 #include <stdlib.h>
565 #include <iconv.h>
566 extern
567 #ifdef __cplusplus
568 "C"
569 #endif
570 #if defined(__STDC__) || defined(__cplusplus)
571 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
572 #else
573 size_t iconv();
574 #endif
575 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
576       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
577     am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
578     AC_MSG_RESULT([$]{ac_t:-
579          }[$]am_cv_proto_iconv)
580     AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
581       [Define as const if the declaration of iconv() needs const.])
582   fi
583 ])
584
585 # intlmacosx.m4 serial 1 (gettext-0.17)
586 dnl Copyright (C) 2004-2007 Free Software Foundation, Inc.
587 dnl This file is free software; the Free Software Foundation
588 dnl gives unlimited permission to copy and/or distribute it,
589 dnl with or without modifications, as long as this notice is preserved.
590 dnl
591 dnl This file can can be used in projects which are not available under
592 dnl the GNU General Public License or the GNU Library General Public
593 dnl License but which still want to provide support for the GNU gettext
594 dnl functionality.
595 dnl Please note that the actual code of the GNU gettext library is covered
596 dnl by the GNU Library General Public License, and the rest of the GNU
597 dnl gettext package package is covered by the GNU General Public License.
598 dnl They are *not* in the public domain.
599
600 dnl Checks for special options needed on MacOS X.
601 dnl Defines INTL_MACOSX_LIBS.
602 AC_DEFUN([gt_INTL_MACOSX],
603 [
604   dnl Check for API introduced in MacOS X 10.2.
605   AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
606     gt_cv_func_CFPreferencesCopyAppValue,
607     [gt_save_LIBS="$LIBS"
608      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
609      AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
610        [CFPreferencesCopyAppValue(NULL, NULL)],
611        [gt_cv_func_CFPreferencesCopyAppValue=yes],
612        [gt_cv_func_CFPreferencesCopyAppValue=no])
613      LIBS="$gt_save_LIBS"])
614   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
615     AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
616       [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
617   fi
618   dnl Check for API introduced in MacOS X 10.3.
619   AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
620     [gt_save_LIBS="$LIBS"
621      LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
622      AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
623        [gt_cv_func_CFLocaleCopyCurrent=yes],
624        [gt_cv_func_CFLocaleCopyCurrent=no])
625      LIBS="$gt_save_LIBS"])
626   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
627     AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
628       [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
629   fi
630   INTL_MACOSX_LIBS=
631   if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
632     INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
633   fi
634   AC_SUBST([INTL_MACOSX_LIBS])
635 ])
636
637 # lib-ld.m4 serial 3 (gettext-0.13)
638 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
639 dnl This file is free software; the Free Software Foundation
640 dnl gives unlimited permission to copy and/or distribute it,
641 dnl with or without modifications, as long as this notice is preserved.
642
643 dnl Subroutines of libtool.m4,
644 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
645 dnl with libtool.m4.
646
647 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
648 AC_DEFUN([AC_LIB_PROG_LD_GNU],
649 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
650 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
651 case `$LD -v 2>&1 </dev/null` in
652 *GNU* | *'with BFD'*)
653   acl_cv_prog_gnu_ld=yes ;;
654 *)
655   acl_cv_prog_gnu_ld=no ;;
656 esac])
657 with_gnu_ld=$acl_cv_prog_gnu_ld
658 ])
659
660 dnl From libtool-1.4. Sets the variable LD.
661 AC_DEFUN([AC_LIB_PROG_LD],
662 [AC_ARG_WITH(gnu-ld,
663 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
664 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
665 AC_REQUIRE([AC_PROG_CC])dnl
666 AC_REQUIRE([AC_CANONICAL_HOST])dnl
667 # Prepare PATH_SEPARATOR.
668 # The user is always right.
669 if test "${PATH_SEPARATOR+set}" != set; then
670   echo "#! /bin/sh" >conf$$.sh
671   echo  "exit 0"   >>conf$$.sh
672   chmod +x conf$$.sh
673   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
674     PATH_SEPARATOR=';'
675   else
676     PATH_SEPARATOR=:
677   fi
678   rm -f conf$$.sh
679 fi
680 ac_prog=ld
681 if test "$GCC" = yes; then
682   # Check if gcc -print-prog-name=ld gives a path.
683   AC_MSG_CHECKING([for ld used by GCC])
684   case $host in
685   *-*-mingw*)
686     # gcc leaves a trailing carriage return which upsets mingw
687     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
688   *)
689     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
690   esac
691   case $ac_prog in
692     # Accept absolute paths.
693     [[\\/]* | [A-Za-z]:[\\/]*)]
694       [re_direlt='/[^/][^/]*/\.\./']
695       # Canonicalize the path of ld
696       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
697       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
698         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
699       done
700       test -z "$LD" && LD="$ac_prog"
701       ;;
702   "")
703     # If it fails, then pretend we aren't using GCC.
704     ac_prog=ld
705     ;;
706   *)
707     # If it is relative, then search for the first ld in PATH.
708     with_gnu_ld=unknown
709     ;;
710   esac
711 elif test "$with_gnu_ld" = yes; then
712   AC_MSG_CHECKING([for GNU ld])
713 else
714   AC_MSG_CHECKING([for non-GNU ld])
715 fi
716 AC_CACHE_VAL(acl_cv_path_LD,
717 [if test -z "$LD"; then
718   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
719   for ac_dir in $PATH; do
720     test -z "$ac_dir" && ac_dir=.
721     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
722       acl_cv_path_LD="$ac_dir/$ac_prog"
723       # Check to see if the program is GNU ld.  I'd rather use --version,
724       # but apparently some GNU ld's only accept -v.
725       # Break only if it was the GNU/non-GNU ld that we prefer.
726       case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
727       *GNU* | *'with BFD'*)
728         test "$with_gnu_ld" != no && break ;;
729       *)
730         test "$with_gnu_ld" != yes && break ;;
731       esac
732     fi
733   done
734   IFS="$ac_save_ifs"
735 else
736   acl_cv_path_LD="$LD" # Let the user override the test with a path.
737 fi])
738 LD="$acl_cv_path_LD"
739 if test -n "$LD"; then
740   AC_MSG_RESULT($LD)
741 else
742   AC_MSG_RESULT(no)
743 fi
744 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
745 AC_LIB_PROG_LD_GNU
746 ])
747
748 # lib-link.m4 serial 13 (gettext-0.17)
749 dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
750 dnl This file is free software; the Free Software Foundation
751 dnl gives unlimited permission to copy and/or distribute it,
752 dnl with or without modifications, as long as this notice is preserved.
753
754 dnl From Bruno Haible.
755
756 AC_PREREQ(2.54)
757
758 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
759 dnl the libraries corresponding to explicit and implicit dependencies.
760 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
761 dnl augments the CPPFLAGS variable.
762 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
763 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
764 AC_DEFUN([AC_LIB_LINKFLAGS],
765 [
766   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
767   AC_REQUIRE([AC_LIB_RPATH])
768   define([Name],[translit([$1],[./-], [___])])
769   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
770                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
771   AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
772     AC_LIB_LINKFLAGS_BODY([$1], [$2])
773     ac_cv_lib[]Name[]_libs="$LIB[]NAME"
774     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
775     ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
776     ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
777   ])
778   LIB[]NAME="$ac_cv_lib[]Name[]_libs"
779   LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
780   INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
781   LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
782   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
783   AC_SUBST([LIB]NAME)
784   AC_SUBST([LTLIB]NAME)
785   AC_SUBST([LIB]NAME[_PREFIX])
786   dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
787   dnl results of this search when this library appears as a dependency.
788   HAVE_LIB[]NAME=yes
789   undefine([Name])
790   undefine([NAME])
791 ])
792
793 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
794 dnl searches for libname and the libraries corresponding to explicit and
795 dnl implicit dependencies, together with the specified include files and
796 dnl the ability to compile and link the specified testcode. If found, it
797 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
798 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
799 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
800 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
801 dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
802 dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
803 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
804 [
805   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
806   AC_REQUIRE([AC_LIB_RPATH])
807   define([Name],[translit([$1],[./-], [___])])
808   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
809                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
810
811   dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
812   dnl accordingly.
813   AC_LIB_LINKFLAGS_BODY([$1], [$2])
814
815   dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
816   dnl because if the user has installed lib[]Name and not disabled its use
817   dnl via --without-lib[]Name-prefix, he wants to use it.
818   ac_save_CPPFLAGS="$CPPFLAGS"
819   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
820
821   AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
822     ac_save_LIBS="$LIBS"
823     LIBS="$LIBS $LIB[]NAME"
824     AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
825     LIBS="$ac_save_LIBS"
826   ])
827   if test "$ac_cv_lib[]Name" = yes; then
828     HAVE_LIB[]NAME=yes
829     AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
830     AC_MSG_CHECKING([how to link with lib[]$1])
831     AC_MSG_RESULT([$LIB[]NAME])
832   else
833     HAVE_LIB[]NAME=no
834     dnl If $LIB[]NAME didn't lead to a usable library, we don't need
835     dnl $INC[]NAME either.
836     CPPFLAGS="$ac_save_CPPFLAGS"
837     LIB[]NAME=
838     LTLIB[]NAME=
839     LIB[]NAME[]_PREFIX=
840   fi
841   AC_SUBST([HAVE_LIB]NAME)
842   AC_SUBST([LIB]NAME)
843   AC_SUBST([LTLIB]NAME)
844   AC_SUBST([LIB]NAME[_PREFIX])
845   undefine([Name])
846   undefine([NAME])
847 ])
848
849 dnl Determine the platform dependent parameters needed to use rpath:
850 dnl   acl_libext,
851 dnl   acl_shlibext,
852 dnl   acl_hardcode_libdir_flag_spec,
853 dnl   acl_hardcode_libdir_separator,
854 dnl   acl_hardcode_direct,
855 dnl   acl_hardcode_minus_L.
856 AC_DEFUN([AC_LIB_RPATH],
857 [
858   dnl Tell automake >= 1.10 to complain if config.rpath is missing.
859   m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
860   AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
861   AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
862   AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
863   AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
864   AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
865     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
866     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
867     . ./conftest.sh
868     rm -f ./conftest.sh
869     acl_cv_rpath=done
870   ])
871   wl="$acl_cv_wl"
872   acl_libext="$acl_cv_libext"
873   acl_shlibext="$acl_cv_shlibext"
874   acl_libname_spec="$acl_cv_libname_spec"
875   acl_library_names_spec="$acl_cv_library_names_spec"
876   acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
877   acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
878   acl_hardcode_direct="$acl_cv_hardcode_direct"
879   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
880   dnl Determine whether the user wants rpath handling at all.
881   AC_ARG_ENABLE(rpath,
882     [  --disable-rpath         do not hardcode runtime library paths],
883     :, enable_rpath=yes)
884 ])
885
886 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
887 dnl the libraries corresponding to explicit and implicit dependencies.
888 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
889 dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
890 dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
891 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
892 [
893   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
894   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
895                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
896   dnl Autoconf >= 2.61 supports dots in --with options.
897   define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
898   dnl By default, look in $includedir and $libdir.
899   use_additional=yes
900   AC_LIB_WITH_FINAL_PREFIX([
901     eval additional_includedir=\"$includedir\"
902     eval additional_libdir=\"$libdir\"
903   ])
904   AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
905 [  --with-lib]N_A_M_E[-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
906   --without-lib]N_A_M_E[-prefix     don't search for lib$1 in includedir and libdir],
907 [
908     if test "X$withval" = "Xno"; then
909       use_additional=no
910     else
911       if test "X$withval" = "X"; then
912         AC_LIB_WITH_FINAL_PREFIX([
913           eval additional_includedir=\"$includedir\"
914           eval additional_libdir=\"$libdir\"
915         ])
916       else
917         additional_includedir="$withval/include"
918         additional_libdir="$withval/$acl_libdirstem"
919       fi
920     fi
921 ])
922   dnl Search the library and its dependencies in $additional_libdir and
923   dnl $LDFLAGS. Using breadth-first-seach.
924   LIB[]NAME=
925   LTLIB[]NAME=
926   INC[]NAME=
927   LIB[]NAME[]_PREFIX=
928   rpathdirs=
929   ltrpathdirs=
930   names_already_handled=
931   names_next_round='$1 $2'
932   while test -n "$names_next_round"; do
933     names_this_round="$names_next_round"
934     names_next_round=
935     for name in $names_this_round; do
936       already_handled=
937       for n in $names_already_handled; do
938         if test "$n" = "$name"; then
939           already_handled=yes
940           break
941         fi
942       done
943       if test -z "$already_handled"; then
944         names_already_handled="$names_already_handled $name"
945         dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
946         dnl or AC_LIB_HAVE_LINKFLAGS call.
947         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
948         eval value=\"\$HAVE_LIB$uppername\"
949         if test -n "$value"; then
950           if test "$value" = yes; then
951             eval value=\"\$LIB$uppername\"
952             test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
953             eval value=\"\$LTLIB$uppername\"
954             test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
955           else
956             dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
957             dnl that this library doesn't exist. So just drop it.
958             :
959           fi
960         else
961           dnl Search the library lib$name in $additional_libdir and $LDFLAGS
962           dnl and the already constructed $LIBNAME/$LTLIBNAME.
963           found_dir=
964           found_la=
965           found_so=
966           found_a=
967           eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
968           if test -n "$acl_shlibext"; then
969             shrext=".$acl_shlibext"             # typically: shrext=.so
970           else
971             shrext=
972           fi
973           if test $use_additional = yes; then
974             dir="$additional_libdir"
975             dnl The same code as in the loop below:
976             dnl First look for a shared library.
977             if test -n "$acl_shlibext"; then
978               if test -f "$dir/$libname$shrext"; then
979                 found_dir="$dir"
980                 found_so="$dir/$libname$shrext"
981               else
982                 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
983                   ver=`(cd "$dir" && \
984                         for f in "$libname$shrext".*; do echo "$f"; done \
985                         | sed -e "s,^$libname$shrext\\\\.,," \
986                         | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
987                         | sed 1q ) 2>/dev/null`
988                   if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
989                     found_dir="$dir"
990                     found_so="$dir/$libname$shrext.$ver"
991                   fi
992                 else
993                   eval library_names=\"$acl_library_names_spec\"
994                   for f in $library_names; do
995                     if test -f "$dir/$f"; then
996                       found_dir="$dir"
997                       found_so="$dir/$f"
998                       break
999                     fi
1000                   done
1001                 fi
1002               fi
1003             fi
1004             dnl Then look for a static library.
1005             if test "X$found_dir" = "X"; then
1006               if test -f "$dir/$libname.$acl_libext"; then
1007                 found_dir="$dir"
1008                 found_a="$dir/$libname.$acl_libext"
1009               fi
1010             fi
1011             if test "X$found_dir" != "X"; then
1012               if test -f "$dir/$libname.la"; then
1013                 found_la="$dir/$libname.la"
1014               fi
1015             fi
1016           fi
1017           if test "X$found_dir" = "X"; then
1018             for x in $LDFLAGS $LTLIB[]NAME; do
1019               AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1020               case "$x" in
1021                 -L*)
1022                   dir=`echo "X$x" | sed -e 's/^X-L//'`
1023                   dnl First look for a shared library.
1024                   if test -n "$acl_shlibext"; then
1025                     if test -f "$dir/$libname$shrext"; then
1026                       found_dir="$dir"
1027                       found_so="$dir/$libname$shrext"
1028                     else
1029                       if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
1030                         ver=`(cd "$dir" && \
1031                               for f in "$libname$shrext".*; do echo "$f"; done \
1032                               | sed -e "s,^$libname$shrext\\\\.,," \
1033                               | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
1034                               | sed 1q ) 2>/dev/null`
1035                         if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
1036                           found_dir="$dir"
1037                           found_so="$dir/$libname$shrext.$ver"
1038                         fi
1039                       else
1040                         eval library_names=\"$acl_library_names_spec\"
1041                         for f in $library_names; do
1042                           if test -f "$dir/$f"; then
1043                             found_dir="$dir"
1044                             found_so="$dir/$f"
1045                             break
1046                           fi
1047                         done
1048                       fi
1049                     fi
1050                   fi
1051                   dnl Then look for a static library.
1052                   if test "X$found_dir" = "X"; then
1053                     if test -f "$dir/$libname.$acl_libext"; then
1054                       found_dir="$dir"
1055                       found_a="$dir/$libname.$acl_libext"
1056                     fi
1057                   fi
1058                   if test "X$found_dir" != "X"; then
1059                     if test -f "$dir/$libname.la"; then
1060                       found_la="$dir/$libname.la"
1061                     fi
1062                   fi
1063                   ;;
1064               esac
1065               if test "X$found_dir" != "X"; then
1066                 break
1067               fi
1068             done
1069           fi
1070           if test "X$found_dir" != "X"; then
1071             dnl Found the library.
1072             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1073             if test "X$found_so" != "X"; then
1074               dnl Linking with a shared library. We attempt to hardcode its
1075               dnl directory into the executable's runpath, unless it's the
1076               dnl standard /usr/lib.
1077               if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
1078                 dnl No hardcoding is needed.
1079                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1080               else
1081                 dnl Use an explicit option to hardcode DIR into the resulting
1082                 dnl binary.
1083                 dnl Potentially add DIR to ltrpathdirs.
1084                 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1085                 haveit=
1086                 for x in $ltrpathdirs; do
1087                   if test "X$x" = "X$found_dir"; then
1088                     haveit=yes
1089                     break
1090                   fi
1091                 done
1092                 if test -z "$haveit"; then
1093                   ltrpathdirs="$ltrpathdirs $found_dir"
1094                 fi
1095                 dnl The hardcoding into $LIBNAME is system dependent.
1096                 if test "$acl_hardcode_direct" = yes; then
1097                   dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1098                   dnl resulting binary.
1099                   LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1100                 else
1101                   if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1102                     dnl Use an explicit option to hardcode DIR into the resulting
1103                     dnl binary.
1104                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1105                     dnl Potentially add DIR to rpathdirs.
1106                     dnl The rpathdirs will be appended to $LIBNAME at the end.
1107                     haveit=
1108                     for x in $rpathdirs; do
1109                       if test "X$x" = "X$found_dir"; then
1110                         haveit=yes
1111                         break
1112                       fi
1113                     done
1114                     if test -z "$haveit"; then
1115                       rpathdirs="$rpathdirs $found_dir"
1116                     fi
1117                   else
1118                     dnl Rely on "-L$found_dir".
1119                     dnl But don't add it if it's already contained in the LDFLAGS
1120                     dnl or the already constructed $LIBNAME
1121                     haveit=
1122                     for x in $LDFLAGS $LIB[]NAME; do
1123                       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1124                       if test "X$x" = "X-L$found_dir"; then
1125                         haveit=yes
1126                         break
1127                       fi
1128                     done
1129                     if test -z "$haveit"; then
1130                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1131                     fi
1132                     if test "$acl_hardcode_minus_L" != no; then
1133                       dnl FIXME: Not sure whether we should use
1134                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1135                       dnl here.
1136                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1137                     else
1138                       dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1139                       dnl here, because this doesn't fit in flags passed to the
1140                       dnl compiler. So give up. No hardcoding. This affects only
1141                       dnl very old systems.
1142                       dnl FIXME: Not sure whether we should use
1143                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1144                       dnl here.
1145                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1146                     fi
1147                   fi
1148                 fi
1149               fi
1150             else
1151               if test "X$found_a" != "X"; then
1152                 dnl Linking with a static library.
1153                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1154               else
1155                 dnl We shouldn't come here, but anyway it's good to have a
1156                 dnl fallback.
1157                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1158               fi
1159             fi
1160             dnl Assume the include files are nearby.
1161             additional_includedir=
1162             case "$found_dir" in
1163               */$acl_libdirstem | */$acl_libdirstem/)
1164                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1165                 LIB[]NAME[]_PREFIX="$basedir"
1166                 additional_includedir="$basedir/include"
1167                 ;;
1168             esac
1169             if test "X$additional_includedir" != "X"; then
1170               dnl Potentially add $additional_includedir to $INCNAME.
1171               dnl But don't add it
1172               dnl   1. if it's the standard /usr/include,
1173               dnl   2. if it's /usr/local/include and we are using GCC on Linux,
1174               dnl   3. if it's already present in $CPPFLAGS or the already
1175               dnl      constructed $INCNAME,
1176               dnl   4. if it doesn't exist as a directory.
1177               if test "X$additional_includedir" != "X/usr/include"; then
1178                 haveit=
1179                 if test "X$additional_includedir" = "X/usr/local/include"; then
1180                   if test -n "$GCC"; then
1181                     case $host_os in
1182                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1183                     esac
1184                   fi
1185                 fi
1186                 if test -z "$haveit"; then
1187                   for x in $CPPFLAGS $INC[]NAME; do
1188                     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1189                     if test "X$x" = "X-I$additional_includedir"; then
1190                       haveit=yes
1191                       break
1192                     fi
1193                   done
1194                   if test -z "$haveit"; then
1195                     if test -d "$additional_includedir"; then
1196                       dnl Really add $additional_includedir to $INCNAME.
1197                       INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1198                     fi
1199                   fi
1200                 fi
1201               fi
1202             fi
1203             dnl Look for dependencies.
1204             if test -n "$found_la"; then
1205               dnl Read the .la file. It defines the variables
1206               dnl dlname, library_names, old_library, dependency_libs, current,
1207               dnl age, revision, installed, dlopen, dlpreopen, libdir.
1208               save_libdir="$libdir"
1209               case "$found_la" in
1210                 */* | *\\*) . "$found_la" ;;
1211                 *) . "./$found_la" ;;
1212               esac
1213               libdir="$save_libdir"
1214               dnl We use only dependency_libs.
1215               for dep in $dependency_libs; do
1216                 case "$dep" in
1217                   -L*)
1218                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1219                     dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1220                     dnl But don't add it
1221                     dnl   1. if it's the standard /usr/lib,
1222                     dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
1223                     dnl   3. if it's already present in $LDFLAGS or the already
1224                     dnl      constructed $LIBNAME,
1225                     dnl   4. if it doesn't exist as a directory.
1226                     if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1227                       haveit=
1228                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1229                         if test -n "$GCC"; then
1230                           case $host_os in
1231                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1232                           esac
1233                         fi
1234                       fi
1235                       if test -z "$haveit"; then
1236                         haveit=
1237                         for x in $LDFLAGS $LIB[]NAME; do
1238                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1239                           if test "X$x" = "X-L$additional_libdir"; then
1240                             haveit=yes
1241                             break
1242                           fi
1243                         done
1244                         if test -z "$haveit"; then
1245                           if test -d "$additional_libdir"; then
1246                             dnl Really add $additional_libdir to $LIBNAME.
1247                             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1248                           fi
1249                         fi
1250                         haveit=
1251                         for x in $LDFLAGS $LTLIB[]NAME; do
1252                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1253                           if test "X$x" = "X-L$additional_libdir"; then
1254                             haveit=yes
1255                             break
1256                           fi
1257                         done
1258                         if test -z "$haveit"; then
1259                           if test -d "$additional_libdir"; then
1260                             dnl Really add $additional_libdir to $LTLIBNAME.
1261                             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1262                           fi
1263                         fi
1264                       fi
1265                     fi
1266                     ;;
1267                   -R*)
1268                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
1269                     if test "$enable_rpath" != no; then
1270                       dnl Potentially add DIR to rpathdirs.
1271                       dnl The rpathdirs will be appended to $LIBNAME at the end.
1272                       haveit=
1273                       for x in $rpathdirs; do
1274                         if test "X$x" = "X$dir"; then
1275                           haveit=yes
1276                           break
1277                         fi
1278                       done
1279                       if test -z "$haveit"; then
1280                         rpathdirs="$rpathdirs $dir"
1281                       fi
1282                       dnl Potentially add DIR to ltrpathdirs.
1283                       dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1284                       haveit=
1285                       for x in $ltrpathdirs; do
1286                         if test "X$x" = "X$dir"; then
1287                           haveit=yes
1288                           break
1289                         fi
1290                       done
1291                       if test -z "$haveit"; then
1292                         ltrpathdirs="$ltrpathdirs $dir"
1293                       fi
1294                     fi
1295                     ;;
1296                   -l*)
1297                     dnl Handle this in the next round.
1298                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1299                     ;;
1300                   *.la)
1301                     dnl Handle this in the next round. Throw away the .la's
1302                     dnl directory; it is already contained in a preceding -L
1303                     dnl option.
1304                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1305                     ;;
1306                   *)
1307                     dnl Most likely an immediate library name.
1308                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1309                     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1310                     ;;
1311                 esac
1312               done
1313             fi
1314           else
1315             dnl Didn't find the library; assume it is in the system directories
1316             dnl known to the linker and runtime loader. (All the system
1317             dnl directories known to the linker should also be known to the
1318             dnl runtime loader, otherwise the system is severely misconfigured.)
1319             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1320             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1321           fi
1322         fi
1323       fi
1324     done
1325   done
1326   if test "X$rpathdirs" != "X"; then
1327     if test -n "$acl_hardcode_libdir_separator"; then
1328       dnl Weird platform: only the last -rpath option counts, the user must
1329       dnl pass all path elements in one option. We can arrange that for a
1330       dnl single library, but not when more than one $LIBNAMEs are used.
1331       alldirs=
1332       for found_dir in $rpathdirs; do
1333         alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1334       done
1335       dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1336       acl_save_libdir="$libdir"
1337       libdir="$alldirs"
1338       eval flag=\"$acl_hardcode_libdir_flag_spec\"
1339       libdir="$acl_save_libdir"
1340       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1341     else
1342       dnl The -rpath options are cumulative.
1343       for found_dir in $rpathdirs; do
1344         acl_save_libdir="$libdir"
1345         libdir="$found_dir"
1346         eval flag=\"$acl_hardcode_libdir_flag_spec\"
1347         libdir="$acl_save_libdir"
1348         LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1349       done
1350     fi
1351   fi
1352   if test "X$ltrpathdirs" != "X"; then
1353     dnl When using libtool, the option that works for both libraries and
1354     dnl executables is -R. The -R options are cumulative.
1355     for found_dir in $ltrpathdirs; do
1356       LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1357     done
1358   fi
1359 ])
1360
1361 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1362 dnl unless already present in VAR.
1363 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1364 dnl contains two or three consecutive elements that belong together.
1365 AC_DEFUN([AC_LIB_APPENDTOVAR],
1366 [
1367   for element in [$2]; do
1368     haveit=
1369     for x in $[$1]; do
1370       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1371       if test "X$x" = "X$element"; then
1372         haveit=yes
1373         break
1374       fi
1375     done
1376     if test -z "$haveit"; then
1377       [$1]="${[$1]}${[$1]:+ }$element"
1378     fi
1379   done
1380 ])
1381
1382 dnl For those cases where a variable contains several -L and -l options
1383 dnl referring to unknown libraries and directories, this macro determines the
1384 dnl necessary additional linker options for the runtime path.
1385 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1386 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1387 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1388 dnl otherwise linking without libtool is assumed.
1389 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1390 [
1391   AC_REQUIRE([AC_LIB_RPATH])
1392   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1393   $1=
1394   if test "$enable_rpath" != no; then
1395     if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1396       dnl Use an explicit option to hardcode directories into the resulting
1397       dnl binary.
1398       rpathdirs=
1399       next=
1400       for opt in $2; do
1401         if test -n "$next"; then
1402           dir="$next"
1403           dnl No need to hardcode the standard /usr/lib.
1404           if test "X$dir" != "X/usr/$acl_libdirstem"; then
1405             rpathdirs="$rpathdirs $dir"
1406           fi
1407           next=
1408         else
1409           case $opt in
1410             -L) next=yes ;;
1411             -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1412                  dnl No need to hardcode the standard /usr/lib.
1413                  if test "X$dir" != "X/usr/$acl_libdirstem"; then
1414                    rpathdirs="$rpathdirs $dir"
1415                  fi
1416                  next= ;;
1417             *) next= ;;
1418           esac
1419         fi
1420       done
1421       if test "X$rpathdirs" != "X"; then
1422         if test -n ""$3""; then
1423           dnl libtool is used for linking. Use -R options.
1424           for dir in $rpathdirs; do
1425             $1="${$1}${$1:+ }-R$dir"
1426           done
1427         else
1428           dnl The linker is used for linking directly.
1429           if test -n "$acl_hardcode_libdir_separator"; then
1430             dnl Weird platform: only the last -rpath option counts, the user
1431             dnl must pass all path elements in one option.
1432             alldirs=
1433             for dir in $rpathdirs; do
1434               alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1435             done
1436             acl_save_libdir="$libdir"
1437             libdir="$alldirs"
1438             eval flag=\"$acl_hardcode_libdir_flag_spec\"
1439             libdir="$acl_save_libdir"
1440             $1="$flag"
1441           else
1442             dnl The -rpath options are cumulative.
1443             for dir in $rpathdirs; do
1444               acl_save_libdir="$libdir"
1445               libdir="$dir"
1446               eval flag=\"$acl_hardcode_libdir_flag_spec\"
1447               libdir="$acl_save_libdir"
1448               $1="${$1}${$1:+ }$flag"
1449             done
1450           fi
1451         fi
1452       fi
1453     fi
1454   fi
1455   AC_SUBST([$1])
1456 ])
1457
1458 # lib-prefix.m4 serial 5 (gettext-0.15)
1459 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
1460 dnl This file is free software; the Free Software Foundation
1461 dnl gives unlimited permission to copy and/or distribute it,
1462 dnl with or without modifications, as long as this notice is preserved.
1463
1464 dnl From Bruno Haible.
1465
1466 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1467 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1468 dnl require excessive bracketing.
1469 ifdef([AC_HELP_STRING],
1470 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1471 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1472
1473 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1474 dnl to access previously installed libraries. The basic assumption is that
1475 dnl a user will want packages to use other packages he previously installed
1476 dnl with the same --prefix option.
1477 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1478 dnl libraries, but is otherwise very convenient.
1479 AC_DEFUN([AC_LIB_PREFIX],
1480 [
1481   AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1482   AC_REQUIRE([AC_PROG_CC])
1483   AC_REQUIRE([AC_CANONICAL_HOST])
1484   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1485   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1486   dnl By default, look in $includedir and $libdir.
1487   use_additional=yes
1488   AC_LIB_WITH_FINAL_PREFIX([
1489     eval additional_includedir=\"$includedir\"
1490     eval additional_libdir=\"$libdir\"
1491   ])
1492   AC_LIB_ARG_WITH([lib-prefix],
1493 [  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1494   --without-lib-prefix    don't search for libraries in includedir and libdir],
1495 [
1496     if test "X$withval" = "Xno"; then
1497       use_additional=no
1498     else
1499       if test "X$withval" = "X"; then
1500         AC_LIB_WITH_FINAL_PREFIX([
1501           eval additional_includedir=\"$includedir\"
1502           eval additional_libdir=\"$libdir\"
1503         ])
1504       else
1505         additional_includedir="$withval/include"
1506         additional_libdir="$withval/$acl_libdirstem"
1507       fi
1508     fi
1509 ])
1510   if test $use_additional = yes; then
1511     dnl Potentially add $additional_includedir to $CPPFLAGS.
1512     dnl But don't add it
1513     dnl   1. if it's the standard /usr/include,
1514     dnl   2. if it's already present in $CPPFLAGS,
1515     dnl   3. if it's /usr/local/include and we are using GCC on Linux,
1516     dnl   4. if it doesn't exist as a directory.
1517     if test "X$additional_includedir" != "X/usr/include"; then
1518       haveit=
1519       for x in $CPPFLAGS; do
1520         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1521         if test "X$x" = "X-I$additional_includedir"; then
1522           haveit=yes
1523           break
1524         fi
1525       done
1526       if test -z "$haveit"; then
1527         if test "X$additional_includedir" = "X/usr/local/include"; then
1528           if test -n "$GCC"; then
1529             case $host_os in
1530               linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1531             esac
1532           fi
1533         fi
1534         if test -z "$haveit"; then
1535           if test -d "$additional_includedir"; then
1536             dnl Really add $additional_includedir to $CPPFLAGS.
1537             CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1538           fi
1539         fi
1540       fi
1541     fi
1542     dnl Potentially add $additional_libdir to $LDFLAGS.
1543     dnl But don't add it
1544     dnl   1. if it's the standard /usr/lib,
1545     dnl   2. if it's already present in $LDFLAGS,
1546     dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
1547     dnl   4. if it doesn't exist as a directory.
1548     if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1549       haveit=
1550       for x in $LDFLAGS; do
1551         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1552         if test "X$x" = "X-L$additional_libdir"; then
1553           haveit=yes
1554           break
1555         fi
1556       done
1557       if test -z "$haveit"; then
1558         if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1559           if test -n "$GCC"; then
1560             case $host_os in
1561               linux*) haveit=yes;;
1562             esac
1563           fi
1564         fi
1565         if test -z "$haveit"; then
1566           if test -d "$additional_libdir"; then
1567             dnl Really add $additional_libdir to $LDFLAGS.
1568             LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1569           fi
1570         fi
1571       fi
1572     fi
1573   fi
1574 ])
1575
1576 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1577 dnl acl_final_exec_prefix, containing the values to which $prefix and
1578 dnl $exec_prefix will expand at the end of the configure script.
1579 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1580 [
1581   dnl Unfortunately, prefix and exec_prefix get only finally determined
1582   dnl at the end of configure.
1583   if test "X$prefix" = "XNONE"; then
1584     acl_final_prefix="$ac_default_prefix"
1585   else
1586     acl_final_prefix="$prefix"
1587   fi
1588   if test "X$exec_prefix" = "XNONE"; then
1589     acl_final_exec_prefix='${prefix}'
1590   else
1591     acl_final_exec_prefix="$exec_prefix"
1592   fi
1593   acl_save_prefix="$prefix"
1594   prefix="$acl_final_prefix"
1595   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1596   prefix="$acl_save_prefix"
1597 ])
1598
1599 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1600 dnl variables prefix and exec_prefix bound to the values they will have
1601 dnl at the end of the configure script.
1602 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1603 [
1604   acl_save_prefix="$prefix"
1605   prefix="$acl_final_prefix"
1606   acl_save_exec_prefix="$exec_prefix"
1607   exec_prefix="$acl_final_exec_prefix"
1608   $1
1609   exec_prefix="$acl_save_exec_prefix"
1610   prefix="$acl_save_prefix"
1611 ])
1612
1613 dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
1614 dnl the basename of the libdir, either "lib" or "lib64".
1615 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1616 [
1617   dnl There is no formal standard regarding lib and lib64. The current
1618   dnl practice is that on a system supporting 32-bit and 64-bit instruction
1619   dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
1620   dnl libraries go under $prefix/lib. We determine the compiler's default
1621   dnl mode by looking at the compiler's library search path. If at least
1622   dnl of its elements ends in /lib64 or points to a directory whose absolute
1623   dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
1624   dnl default, namely "lib".
1625   acl_libdirstem=lib
1626   searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1627   if test -n "$searchpath"; then
1628     acl_save_IFS="${IFS=        }"; IFS=":"
1629     for searchdir in $searchpath; do
1630       if test -d "$searchdir"; then
1631         case "$searchdir" in
1632           */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1633           *) searchdir=`cd "$searchdir" && pwd`
1634              case "$searchdir" in
1635                */lib64 ) acl_libdirstem=lib64 ;;
1636              esac ;;
1637         esac
1638       fi
1639     done
1640     IFS="$acl_save_IFS"
1641   fi
1642 ])
1643
1644 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1645 #
1646 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1647 #                 2006, 2007, 2008 Free Software Foundation, Inc.
1648 #   Written by Gordon Matzigkeit, 1996
1649 #
1650 # This file is free software; the Free Software Foundation gives
1651 # unlimited permission to copy and/or distribute it, with or without
1652 # modifications, as long as this notice is preserved.
1653
1654 m4_define([_LT_COPYING], [dnl
1655 #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1656 #                 2006, 2007, 2008 Free Software Foundation, Inc.
1657 #   Written by Gordon Matzigkeit, 1996
1658 #
1659 #   This file is part of GNU Libtool.
1660 #
1661 # GNU Libtool is free software; you can redistribute it and/or
1662 # modify it under the terms of the GNU General Public License as
1663 # published by the Free Software Foundation; either version 2 of
1664 # the License, or (at your option) any later version.
1665 #
1666 # As a special exception to the GNU General Public License,
1667 # if you distribute this file as part of a program or library that
1668 # is built using GNU Libtool, you may include this file under the
1669 # same distribution terms that you use for the rest of that program.
1670 #
1671 # GNU Libtool is distributed in the hope that it will be useful,
1672 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1673 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1674 # GNU General Public License for more details.
1675 #
1676 # You should have received a copy of the GNU General Public License
1677 # along with GNU Libtool; see the file COPYING.  If not, a copy
1678 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1679 # obtained by writing to the Free Software Foundation, Inc.,
1680 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1681 ])
1682
1683 # serial 56 LT_INIT
1684
1685
1686 # LT_PREREQ(VERSION)
1687 # ------------------
1688 # Complain and exit if this libtool version is less that VERSION.
1689 m4_defun([LT_PREREQ],
1690 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1691        [m4_default([$3],
1692                    [m4_fatal([Libtool version $1 or higher is required],
1693                              63)])],
1694        [$2])])
1695
1696
1697 # _LT_CHECK_BUILDDIR
1698 # ------------------
1699 # Complain if the absolute build directory name contains unusual characters
1700 m4_defun([_LT_CHECK_BUILDDIR],
1701 [case `pwd` in
1702   *\ * | *\     *)
1703     AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1704 esac
1705 ])
1706
1707
1708 # LT_INIT([OPTIONS])
1709 # ------------------
1710 AC_DEFUN([LT_INIT],
1711 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1712 AC_BEFORE([$0], [LT_LANG])dnl
1713 AC_BEFORE([$0], [LT_OUTPUT])dnl
1714 AC_BEFORE([$0], [LTDL_INIT])dnl
1715 m4_require([_LT_CHECK_BUILDDIR])dnl
1716
1717 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1718 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1719 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1720 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1721 dnl unless we require an AC_DEFUNed macro:
1722 AC_REQUIRE([LTOPTIONS_VERSION])dnl
1723 AC_REQUIRE([LTSUGAR_VERSION])dnl
1724 AC_REQUIRE([LTVERSION_VERSION])dnl
1725 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1726 m4_require([_LT_PROG_LTMAIN])dnl
1727
1728 dnl Parse OPTIONS
1729 _LT_SET_OPTIONS([$0], [$1])
1730
1731 # This can be used to rebuild libtool when needed
1732 LIBTOOL_DEPS="$ltmain"
1733
1734 # Always use our own libtool.
1735 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1736 AC_SUBST(LIBTOOL)dnl
1737
1738 _LT_SETUP
1739
1740 # Only expand once:
1741 m4_define([LT_INIT])
1742 ])# LT_INIT
1743
1744 # Old names:
1745 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1746 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1747 dnl aclocal-1.4 backwards compatibility:
1748 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1749 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1750
1751
1752 # _LT_CC_BASENAME(CC)
1753 # -------------------
1754 # Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1755 m4_defun([_LT_CC_BASENAME],
1756 [for cc_temp in $1""; do
1757   case $cc_temp in
1758     compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1759     distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1760     \-*) ;;
1761     *) break;;
1762   esac
1763 done
1764 cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1765 ])
1766
1767
1768 # _LT_FILEUTILS_DEFAULTS
1769 # ----------------------
1770 # It is okay to use these file commands and assume they have been set
1771 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1772 m4_defun([_LT_FILEUTILS_DEFAULTS],
1773 [: ${CP="cp -f"}
1774 : ${MV="mv -f"}
1775 : ${RM="rm -f"}
1776 ])# _LT_FILEUTILS_DEFAULTS
1777
1778
1779 # _LT_SETUP
1780 # ---------
1781 m4_defun([_LT_SETUP],
1782 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
1783 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1784 _LT_DECL([], [host_alias], [0], [The host system])dnl
1785 _LT_DECL([], [host], [0])dnl
1786 _LT_DECL([], [host_os], [0])dnl
1787 dnl
1788 _LT_DECL([], [build_alias], [0], [The build system])dnl
1789 _LT_DECL([], [build], [0])dnl
1790 _LT_DECL([], [build_os], [0])dnl
1791 dnl
1792 AC_REQUIRE([AC_PROG_CC])dnl
1793 AC_REQUIRE([LT_PATH_LD])dnl
1794 AC_REQUIRE([LT_PATH_NM])dnl
1795 dnl
1796 AC_REQUIRE([AC_PROG_LN_S])dnl
1797 test -z "$LN_S" && LN_S="ln -s"
1798 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1799 dnl
1800 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1801 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1802 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1803 dnl
1804 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1805 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1806 m4_require([_LT_CMD_RELOAD])dnl
1807 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1808 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1809 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1810
1811 _LT_CONFIG_LIBTOOL_INIT([
1812 # See if we are running on zsh, and set the options which allow our
1813 # commands through without removal of \ escapes INIT.
1814 if test -n "\${ZSH_VERSION+set}" ; then
1815    setopt NO_GLOB_SUBST
1816 fi
1817 ])
1818 if test -n "${ZSH_VERSION+set}" ; then
1819    setopt NO_GLOB_SUBST
1820 fi
1821
1822 _LT_CHECK_OBJDIR
1823
1824 m4_require([_LT_TAG_COMPILER])dnl
1825 _LT_PROG_ECHO_BACKSLASH
1826
1827 case $host_os in
1828 aix3*)
1829   # AIX sometimes has problems with the GCC collect2 program.  For some
1830   # reason, if we set the COLLECT_NAMES environment variable, the problems
1831   # vanish in a puff of smoke.
1832   if test "X${COLLECT_NAMES+set}" != Xset; then
1833     COLLECT_NAMES=
1834     export COLLECT_NAMES
1835   fi
1836   ;;
1837 esac
1838
1839 # Sed substitution that helps us do robust quoting.  It backslashifies
1840 # metacharacters that are still active within double-quoted strings.
1841 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1842
1843 # Same as above, but do not quote variable references.
1844 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1845
1846 # Sed substitution to delay expansion of an escaped shell variable in a
1847 # double_quote_subst'ed string.
1848 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1849
1850 # Sed substitution to delay expansion of an escaped single quote.
1851 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1852
1853 # Sed substitution to avoid accidental globbing in evaled expressions
1854 no_glob_subst='s/\*/\\\*/g'
1855
1856 # Global variables:
1857 ofile=libtool
1858 can_build_shared=yes
1859
1860 # All known linkers require a `.a' archive for static linking (except MSVC,
1861 # which needs '.lib').
1862 libext=a
1863
1864 with_gnu_ld="$lt_cv_prog_gnu_ld"
1865
1866 old_CC="$CC"
1867 old_CFLAGS="$CFLAGS"
1868
1869 # Set sane defaults for various variables
1870 test -z "$CC" && CC=cc
1871 test -z "$LTCC" && LTCC=$CC
1872 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1873 test -z "$LD" && LD=ld
1874 test -z "$ac_objext" && ac_objext=o
1875
1876 _LT_CC_BASENAME([$compiler])
1877
1878 # Only perform the check for file, if the check method requires it
1879 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1880 case $deplibs_check_method in
1881 file_magic*)
1882   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1883     _LT_PATH_MAGIC
1884   fi
1885   ;;
1886 esac
1887
1888 # Use C for the default configuration in the libtool script
1889 LT_SUPPORTED_TAG([CC])
1890 _LT_LANG_C_CONFIG
1891 _LT_LANG_DEFAULT_CONFIG
1892 _LT_CONFIG_COMMANDS
1893 ])# _LT_SETUP
1894
1895
1896 # _LT_PROG_LTMAIN
1897 # ---------------
1898 # Note that this code is called both from `configure', and `config.status'
1899 # now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1900 # `config.status' has no value for ac_aux_dir unless we are using Automake,
1901 # so we pass a copy along to make sure it has a sensible value anyway.
1902 m4_defun([_LT_PROG_LTMAIN],
1903 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1904 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1905 ltmain="$ac_aux_dir/ltmain.sh"
1906 ])# _LT_PROG_LTMAIN
1907
1908
1909
1910 # So that we can recreate a full libtool script including additional
1911 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1912 # in macros and then make a single call at the end using the `libtool'
1913 # label.
1914
1915
1916 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1917 # ----------------------------------------
1918 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1919 m4_define([_LT_CONFIG_LIBTOOL_INIT],
1920 [m4_ifval([$1],
1921           [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1922                      [$1
1923 ])])])
1924
1925 # Initialize.
1926 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1927
1928
1929 # _LT_CONFIG_LIBTOOL([COMMANDS])
1930 # ------------------------------
1931 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1932 m4_define([_LT_CONFIG_LIBTOOL],
1933 [m4_ifval([$1],
1934           [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1935                      [$1
1936 ])])])
1937
1938 # Initialize.
1939 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1940
1941
1942 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1943 # -----------------------------------------------------
1944 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1945 [_LT_CONFIG_LIBTOOL([$1])
1946 _LT_CONFIG_LIBTOOL_INIT([$2])
1947 ])
1948
1949
1950 # _LT_FORMAT_COMMENT([COMMENT])
1951 # -----------------------------
1952 # Add leading comment marks to the start of each line, and a trailing
1953 # full-stop to the whole comment if one is not present already.
1954 m4_define([_LT_FORMAT_COMMENT],
1955 [m4_ifval([$1], [
1956 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1957               [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1958 )])
1959
1960
1961
1962
1963
1964 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1965 # -------------------------------------------------------------------
1966 # CONFIGNAME is the name given to the value in the libtool script.
1967 # VARNAME is the (base) name used in the configure script.
1968 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1969 # VARNAME.  Any other value will be used directly.
1970 m4_define([_LT_DECL],
1971 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1972     [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1973         [m4_ifval([$1], [$1], [$2])])
1974     lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1975     m4_ifval([$4],
1976         [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1977     lt_dict_add_subkey([lt_decl_dict], [$2],
1978         [tagged?], [m4_ifval([$5], [yes], [no])])])
1979 ])
1980
1981
1982 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1983 # --------------------------------------------------------
1984 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1985
1986
1987 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1988 # ------------------------------------------------
1989 m4_define([lt_decl_tag_varnames],
1990 [_lt_decl_filter([tagged?], [yes], $@)])
1991
1992
1993 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1994 # ---------------------------------------------------------
1995 m4_define([_lt_decl_filter],
1996 [m4_case([$#],
1997   [0], [m4_fatal([$0: too few arguments: $#])],
1998   [1], [m4_fatal([$0: too few arguments: $#: $1])],
1999   [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2000   [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2001   [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2002 ])
2003
2004
2005 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2006 # --------------------------------------------------
2007 m4_define([lt_decl_quote_varnames],
2008 [_lt_decl_filter([value], [1], $@)])
2009
2010
2011 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2012 # ---------------------------------------------------
2013 m4_define([lt_decl_dquote_varnames],
2014 [_lt_decl_filter([value], [2], $@)])
2015
2016
2017 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2018 # ---------------------------------------------------
2019 m4_define([lt_decl_varnames_tagged],
2020 [m4_assert([$# <= 2])dnl
2021 _$0(m4_quote(m4_default([$1], [[, ]])),
2022     m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2023     m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2024 m4_define([_lt_decl_varnames_tagged],
2025 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2026
2027
2028 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2029 # ------------------------------------------------
2030 m4_define([lt_decl_all_varnames],
2031 [_$0(m4_quote(m4_default([$1], [[, ]])),
2032      m4_if([$2], [],
2033            m4_quote(lt_decl_varnames),
2034         m4_quote(m4_shift($@))))[]dnl
2035 ])
2036 m4_define([_lt_decl_all_varnames],
2037 [lt_join($@, lt_decl_varnames_tagged([$1],
2038                         lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2039 ])
2040
2041
2042 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
2043 # ------------------------------------
2044 # Quote a variable value, and forward it to `config.status' so that its
2045 # declaration there will have the same value as in `configure'.  VARNAME
2046 # must have a single quote delimited value for this to work.
2047 m4_define([_LT_CONFIG_STATUS_DECLARE],
2048 [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
2049
2050
2051 # _LT_CONFIG_STATUS_DECLARATIONS
2052 # ------------------------------
2053 # We delimit libtool config variables with single quotes, so when
2054 # we write them to config.status, we have to be sure to quote all
2055 # embedded single quotes properly.  In configure, this macro expands
2056 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2057 #
2058 #    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
2059 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2060 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2061     [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2062
2063
2064 # _LT_LIBTOOL_TAGS
2065 # ----------------
2066 # Output comment and list of tags supported by the script
2067 m4_defun([_LT_LIBTOOL_TAGS],
2068 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2069 available_tags="_LT_TAGS"dnl
2070 ])
2071
2072
2073 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2074 # -----------------------------------
2075 # Extract the dictionary values for VARNAME (optionally with TAG) and
2076 # expand to a commented shell variable setting:
2077 #
2078 #    # Some comment about what VAR is for.
2079 #    visible_name=$lt_internal_name
2080 m4_define([_LT_LIBTOOL_DECLARE],
2081 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2082                                            [description])))[]dnl
2083 m4_pushdef([_libtool_name],
2084     m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2085 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2086     [0], [_libtool_name=[$]$1],
2087     [1], [_libtool_name=$lt_[]$1],
2088     [2], [_libtool_name=$lt_[]$1],
2089     [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2090 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2091 ])
2092
2093
2094 # _LT_LIBTOOL_CONFIG_VARS
2095 # -----------------------
2096 # Produce commented declarations of non-tagged libtool config variables
2097 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2098 # script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
2099 # section) are produced by _LT_LIBTOOL_TAG_VARS.
2100 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2101 [m4_foreach([_lt_var],
2102     m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2103     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2104
2105
2106 # _LT_LIBTOOL_TAG_VARS(TAG)
2107 # -------------------------
2108 m4_define([_LT_LIBTOOL_TAG_VARS],
2109 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2110     [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2111
2112
2113 # _LT_TAGVAR(VARNAME, [TAGNAME])
2114 # ------------------------------
2115 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2116
2117
2118 # _LT_CONFIG_COMMANDS
2119 # -------------------
2120 # Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
2121 # variables for single and double quote escaping we saved from calls
2122 # to _LT_DECL, we can put quote escaped variables declarations
2123 # into `config.status', and then the shell code to quote escape them in
2124 # for loops in `config.status'.  Finally, any additional code accumulated
2125 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2126 m4_defun([_LT_CONFIG_COMMANDS],
2127 [AC_PROVIDE_IFELSE([LT_OUTPUT],
2128         dnl If the libtool generation code has been placed in $CONFIG_LT,
2129         dnl instead of duplicating it all over again into config.status,
2130         dnl then we will have config.status run $CONFIG_LT later, so it
2131         dnl needs to know what name is stored there:
2132         [AC_CONFIG_COMMANDS([libtool],
2133             [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2134     dnl If the libtool generation code is destined for config.status,
2135     dnl expand the accumulated commands and init code now:
2136     [AC_CONFIG_COMMANDS([libtool],
2137         [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2138 ])#_LT_CONFIG_COMMANDS
2139
2140
2141 # Initialize.
2142 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2143 [
2144
2145 # The HP-UX ksh and POSIX shell print the target directory to stdout
2146 # if CDPATH is set.
2147 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2148
2149 sed_quote_subst='$sed_quote_subst'
2150 double_quote_subst='$double_quote_subst'
2151 delay_variable_subst='$delay_variable_subst'
2152 _LT_CONFIG_STATUS_DECLARATIONS
2153 LTCC='$LTCC'
2154 LTCFLAGS='$LTCFLAGS'
2155 compiler='$compiler_DEFAULT'
2156
2157 # Quote evaled strings.
2158 for var in lt_decl_all_varnames([[ \
2159 ]], lt_decl_quote_varnames); do
2160     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2161     *[[\\\\\\\`\\"\\\$]]*)
2162       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2163       ;;
2164     *)
2165       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2166       ;;
2167     esac
2168 done
2169
2170 # Double-quote double-evaled strings.
2171 for var in lt_decl_all_varnames([[ \
2172 ]], lt_decl_dquote_varnames); do
2173     case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2174     *[[\\\\\\\`\\"\\\$]]*)
2175       eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2176       ;;
2177     *)
2178       eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2179       ;;
2180     esac
2181 done
2182
2183 # Fix-up fallback echo if it was mangled by the above quoting rules.
2184 case \$lt_ECHO in
2185 *'\\\[$]0 --fallback-echo"')dnl "
2186   lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
2187   ;;
2188 esac
2189
2190 _LT_OUTPUT_LIBTOOL_INIT
2191 ])
2192
2193
2194 # LT_OUTPUT
2195 # ---------
2196 # This macro allows early generation of the libtool script (before
2197 # AC_OUTPUT is called), incase it is used in configure for compilation
2198 # tests.
2199 AC_DEFUN([LT_OUTPUT],
2200 [: ${CONFIG_LT=./config.lt}
2201 AC_MSG_NOTICE([creating $CONFIG_LT])
2202 cat >"$CONFIG_LT" <<_LTEOF
2203 #! $SHELL
2204 # Generated by $as_me.
2205 # Run this file to recreate a libtool stub with the current configuration.
2206
2207 lt_cl_silent=false
2208 SHELL=\${CONFIG_SHELL-$SHELL}
2209 _LTEOF
2210
2211 cat >>"$CONFIG_LT" <<\_LTEOF
2212 AS_SHELL_SANITIZE
2213 _AS_PREPARE
2214
2215 exec AS_MESSAGE_FD>&1
2216 exec AS_MESSAGE_LOG_FD>>config.log
2217 {
2218   echo
2219   AS_BOX([Running $as_me.])
2220 } >&AS_MESSAGE_LOG_FD
2221
2222 lt_cl_help="\
2223 \`$as_me' creates a local libtool stub from the current configuration,
2224 for use in further configure time tests before the real libtool is
2225 generated.
2226
2227 Usage: $[0] [[OPTIONS]]
2228
2229   -h, --help      print this help, then exit
2230   -V, --version   print version number, then exit
2231   -q, --quiet     do not print progress messages
2232   -d, --debug     don't remove temporary files
2233
2234 Report bugs to <bug-libtool@gnu.org>."
2235
2236 lt_cl_version="\
2237 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2238 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2239 configured by $[0], generated by m4_PACKAGE_STRING.
2240
2241 Copyright (C) 2008 Free Software Foundation, Inc.
2242 This config.lt script is free software; the Free Software Foundation
2243 gives unlimited permision to copy, distribute and modify it."
2244
2245 while test $[#] != 0
2246 do
2247   case $[1] in
2248     --version | --v* | -V )
2249       echo "$lt_cl_version"; exit 0 ;;
2250     --help | --h* | -h )
2251       echo "$lt_cl_help"; exit 0 ;;
2252     --debug | --d* | -d )
2253       debug=: ;;
2254     --quiet | --q* | --silent | --s* | -q )
2255       lt_cl_silent=: ;;
2256
2257     -*) AC_MSG_ERROR([unrecognized option: $[1]
2258 Try \`$[0] --help' for more information.]) ;;
2259
2260     *) AC_MSG_ERROR([unrecognized argument: $[1]
2261 Try \`$[0] --help' for more information.]) ;;
2262   esac
2263   shift
2264 done
2265
2266 if $lt_cl_silent; then
2267   exec AS_MESSAGE_FD>/dev/null
2268 fi
2269 _LTEOF
2270
2271 cat >>"$CONFIG_LT" <<_LTEOF
2272 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2273 _LTEOF
2274
2275 cat >>"$CONFIG_LT" <<\_LTEOF
2276 AC_MSG_NOTICE([creating $ofile])
2277 _LT_OUTPUT_LIBTOOL_COMMANDS
2278 AS_EXIT(0)
2279 _LTEOF
2280 chmod +x "$CONFIG_LT"
2281
2282 # configure is writing to config.log, but config.lt does its own redirection,
2283 # appending to config.log, which fails on DOS, as config.log is still kept
2284 # open by configure.  Here we exec the FD to /dev/null, effectively closing
2285 # config.log, so it can be properly (re)opened and appended to by config.lt.
2286 if test "$no_create" != yes; then
2287   lt_cl_success=:
2288   test "$silent" = yes &&
2289     lt_config_lt_args="$lt_config_lt_args --quiet"
2290   exec AS_MESSAGE_LOG_FD>/dev/null
2291   $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2292   exec AS_MESSAGE_LOG_FD>>config.log
2293   $lt_cl_success || AS_EXIT(1)
2294 fi
2295 ])# LT_OUTPUT
2296
2297
2298 # _LT_CONFIG(TAG)
2299 # ---------------
2300 # If TAG is the built-in tag, create an initial libtool script with a
2301 # default configuration from the untagged config vars.  Otherwise add code
2302 # to config.status for appending the configuration named by TAG from the
2303 # matching tagged config vars.
2304 m4_defun([_LT_CONFIG],
2305 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2306 _LT_CONFIG_SAVE_COMMANDS([
2307   m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2308   m4_if(_LT_TAG, [C], [
2309     # See if we are running on zsh, and set the options which allow our
2310     # commands through without removal of \ escapes.
2311     if test -n "${ZSH_VERSION+set}" ; then
2312       setopt NO_GLOB_SUBST
2313     fi
2314
2315     cfgfile="${ofile}T"
2316     trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2317     $RM "$cfgfile"
2318
2319     cat <<_LT_EOF >> "$cfgfile"
2320 #! $SHELL
2321
2322 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2323 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2324 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2325 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2326 #
2327 _LT_COPYING
2328 _LT_LIBTOOL_TAGS
2329
2330 # ### BEGIN LIBTOOL CONFIG
2331 _LT_LIBTOOL_CONFIG_VARS
2332 _LT_LIBTOOL_TAG_VARS
2333 # ### END LIBTOOL CONFIG
2334
2335 _LT_EOF
2336
2337   case $host_os in
2338   aix3*)
2339     cat <<\_LT_EOF >> "$cfgfile"
2340 # AIX sometimes has problems with the GCC collect2 program.  For some
2341 # reason, if we set the COLLECT_NAMES environment variable, the problems
2342 # vanish in a puff of smoke.
2343 if test "X${COLLECT_NAMES+set}" != Xset; then
2344   COLLECT_NAMES=
2345   export COLLECT_NAMES
2346 fi
2347 _LT_EOF
2348     ;;
2349   esac
2350
2351   _LT_PROG_LTMAIN
2352
2353   # We use sed instead of cat because bash on DJGPP gets confused if
2354   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
2355   # text mode, it properly converts lines to CR/LF.  This bash problem
2356   # is reportedly fixed, but why not run on old versions too?
2357   sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
2358     || (rm -f "$cfgfile"; exit 1)
2359
2360   _LT_PROG_XSI_SHELLFNS
2361
2362   sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
2363     || (rm -f "$cfgfile"; exit 1)
2364
2365   mv -f "$cfgfile" "$ofile" ||
2366     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2367   chmod +x "$ofile"
2368 ],
2369 [cat <<_LT_EOF >> "$ofile"
2370
2371 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2372 dnl in a comment (ie after a #).
2373 # ### BEGIN LIBTOOL TAG CONFIG: $1
2374 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
2375 # ### END LIBTOOL TAG CONFIG: $1
2376 _LT_EOF
2377 ])dnl /m4_if
2378 ],
2379 [m4_if([$1], [], [
2380     PACKAGE='$PACKAGE'
2381     VERSION='$VERSION'
2382     TIMESTAMP='$TIMESTAMP'
2383     RM='$RM'
2384     ofile='$ofile'], [])
2385 ])dnl /_LT_CONFIG_SAVE_COMMANDS
2386 ])# _LT_CONFIG
2387
2388
2389 # LT_SUPPORTED_TAG(TAG)
2390 # ---------------------
2391 # Trace this macro to discover what tags are supported by the libtool
2392 # --tag option, using:
2393 #    autoconf --trace 'LT_SUPPORTED_TAG:$1'
2394 AC_DEFUN([LT_SUPPORTED_TAG], [])
2395
2396
2397 # C support is built-in for now
2398 m4_define([_LT_LANG_C_enabled], [])
2399 m4_define([_LT_TAGS], [])
2400
2401
2402 # LT_LANG(LANG)
2403 # -------------
2404 # Enable libtool support for the given language if not already enabled.
2405 AC_DEFUN([LT_LANG],
2406 [AC_BEFORE([$0], [LT_OUTPUT])dnl
2407 m4_case([$1],
2408   [C],                  [_LT_LANG(C)],
2409   [C++],                [_LT_LANG(CXX)],
2410   [Java],               [_LT_LANG(GCJ)],
2411   [Fortran 77],         [_LT_LANG(F77)],
2412   [Fortran],            [_LT_LANG(FC)],
2413   [Windows Resource],   [_LT_LANG(RC)],
2414   [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2415     [_LT_LANG($1)],
2416     [m4_fatal([$0: unsupported language: "$1"])])])dnl
2417 ])# LT_LANG
2418
2419
2420 # _LT_LANG(LANGNAME)
2421 # ------------------
2422 m4_defun([_LT_LANG],
2423 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
2424   [LT_SUPPORTED_TAG([$1])dnl
2425   m4_append([_LT_TAGS], [$1 ])dnl
2426   m4_define([_LT_LANG_]$1[_enabled], [])dnl
2427   _LT_LANG_$1_CONFIG($1)])dnl
2428 ])# _LT_LANG
2429
2430
2431 # _LT_LANG_DEFAULT_CONFIG
2432 # -----------------------
2433 m4_defun([_LT_LANG_DEFAULT_CONFIG],
2434 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
2435   [LT_LANG(CXX)],
2436   [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2437
2438 AC_PROVIDE_IFELSE([AC_PROG_F77],
2439   [LT_LANG(F77)],
2440   [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2441
2442 AC_PROVIDE_IFELSE([AC_PROG_FC],
2443   [LT_LANG(FC)],
2444   [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2445
2446 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2447 dnl pulling things in needlessly.
2448 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2449   [LT_LANG(GCJ)],
2450   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2451     [LT_LANG(GCJ)],
2452     [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2453       [LT_LANG(GCJ)],
2454       [m4_ifdef([AC_PROG_GCJ],
2455         [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2456        m4_ifdef([A][M_PROG_GCJ],
2457         [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2458        m4_ifdef([LT_PROG_GCJ],
2459         [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2460
2461 AC_PROVIDE_IFELSE([LT_PROG_RC],
2462   [LT_LANG(RC)],
2463   [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2464 ])# _LT_LANG_DEFAULT_CONFIG
2465
2466 # Obsolete macros:
2467 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2468 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2469 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2470 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2471 dnl aclocal-1.4 backwards compatibility:
2472 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2473 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2474 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2475 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2476
2477
2478 # _LT_TAG_COMPILER
2479 # ----------------
2480 m4_defun([_LT_TAG_COMPILER],
2481 [AC_REQUIRE([AC_PROG_CC])dnl
2482
2483 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2484 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2485 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2486 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2487
2488 # If no C compiler was specified, use CC.
2489 LTCC=${LTCC-"$CC"}
2490
2491 # If no C compiler flags were specified, use CFLAGS.
2492 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2493
2494 # Allow CC to be a program name with arguments.
2495 compiler=$CC
2496 ])# _LT_TAG_COMPILER
2497
2498
2499 # _LT_COMPILER_BOILERPLATE
2500 # ------------------------
2501 # Check for compiler boilerplate output or warnings with
2502 # the simple compiler test code.
2503 m4_defun([_LT_COMPILER_BOILERPLATE],
2504 [m4_require([_LT_DECL_SED])dnl
2505 ac_outfile=conftest.$ac_objext
2506 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2507 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2508 _lt_compiler_boilerplate=`cat conftest.err`
2509 $RM conftest*
2510 ])# _LT_COMPILER_BOILERPLATE
2511
2512
2513 # _LT_LINKER_BOILERPLATE
2514 # ----------------------
2515 # Check for linker boilerplate output or warnings with
2516 # the simple link test code.
2517 m4_defun([_LT_LINKER_BOILERPLATE],
2518 [m4_require([_LT_DECL_SED])dnl
2519 ac_outfile=conftest.$ac_objext
2520 echo "$lt_simple_link_test_code" >conftest.$ac_ext
2521 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2522 _lt_linker_boilerplate=`cat conftest.err`
2523 $RM -r conftest*
2524 ])# _LT_LINKER_BOILERPLATE
2525
2526 # _LT_REQUIRED_DARWIN_CHECKS
2527 # -------------------------
2528 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2529   case $host_os in
2530     rhapsody* | darwin*)
2531     AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2532     AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2533     AC_CHECK_TOOL([LIPO], [lipo], [:])
2534     AC_CHECK_TOOL([OTOOL], [otool], [:])
2535     AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2536     _LT_DECL([], [DSYMUTIL], [1],
2537       [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2538     _LT_DECL([], [NMEDIT], [1],
2539       [Tool to change global to local symbols on Mac OS X])
2540     _LT_DECL([], [LIPO], [1],
2541       [Tool to manipulate fat objects and archives on Mac OS X])
2542     _LT_DECL([], [OTOOL], [1],
2543       [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2544     _LT_DECL([], [OTOOL64], [1],
2545       [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2546
2547     AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2548       [lt_cv_apple_cc_single_mod=no
2549       if test -z "${LT_MULTI_MODULE}"; then
2550         # By default we will add the -single_module flag. You can override
2551         # by either setting the environment variable LT_MULTI_MODULE
2552         # non-empty at configure time, or by adding -multi_module to the
2553         # link flags.
2554         rm -rf libconftest.dylib*
2555         echo "int foo(void){return 1;}" > conftest.c
2556         echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2557 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2558         $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2559           -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2560         _lt_result=$?
2561         if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
2562           lt_cv_apple_cc_single_mod=yes
2563         else
2564           cat conftest.err >&AS_MESSAGE_LOG_FD
2565         fi
2566         rm -rf libconftest.dylib*
2567         rm -f conftest.*
2568       fi])
2569     AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2570       [lt_cv_ld_exported_symbols_list],
2571       [lt_cv_ld_exported_symbols_list=no
2572       save_LDFLAGS=$LDFLAGS
2573       echo "_main" > conftest.sym
2574       LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2575       AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2576         [lt_cv_ld_exported_symbols_list=yes],
2577         [lt_cv_ld_exported_symbols_list=no])
2578         LDFLAGS="$save_LDFLAGS"
2579     ])
2580     case $host_os in
2581     rhapsody* | darwin1.[[012]])
2582       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2583     darwin1.*)
2584       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2585     darwin*) # darwin 5.x on
2586       # if running on 10.5 or later, the deployment target defaults
2587       # to the OS version, if on x86, and 10.4, the deployment
2588       # target defaults to 10.4. Don't you love it?
2589       case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2590         10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2591           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2592         10.[[012]]*)
2593           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2594         10.*)
2595           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2596       esac
2597     ;;
2598   esac
2599     if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2600       _lt_dar_single_mod='$single_module'
2601     fi
2602     if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2603       _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2604     else
2605       _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2606     fi
2607     if test "$DSYMUTIL" != ":"; then
2608       _lt_dsymutil='~$DSYMUTIL $lib || :'
2609     else
2610       _lt_dsymutil=
2611     fi
2612     ;;
2613   esac
2614 ])
2615
2616
2617 # _LT_DARWIN_LINKER_FEATURES
2618 # --------------------------
2619 # Checks for linker and compiler features on darwin
2620 m4_defun([_LT_DARWIN_LINKER_FEATURES],
2621 [
2622   m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2623   _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2624   _LT_TAGVAR(hardcode_direct, $1)=no
2625   _LT_TAGVAR(hardcode_automatic, $1)=yes
2626   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2627   _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2628   _LT_TAGVAR(link_all_deplibs, $1)=yes
2629   _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2630   case $cc_basename in
2631      ifort*) _lt_dar_can_shared=yes ;;
2632      *) _lt_dar_can_shared=$GCC ;;
2633   esac
2634   if test "$_lt_dar_can_shared" = "yes"; then
2635     output_verbose_link_cmd=echo
2636     _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
2637     _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2638     _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
2639     _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
2640     m4_if([$1], [CXX],
2641 [   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2642       _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
2643       _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
2644     fi
2645 ],[])
2646   else
2647   _LT_TAGVAR(ld_shlibs, $1)=no
2648   fi
2649 ])
2650
2651 # _LT_SYS_MODULE_PATH_AIX
2652 # -----------------------
2653 # Links a minimal program and checks the executable
2654 # for the system default hardcoded library path. In most cases,
2655 # this is /usr/lib:/lib, but when the MPI compilers are used
2656 # the location of the communication and MPI libs are included too.
2657 # If we don't find anything, use the default library path according
2658 # to the aix ld manual.
2659 m4_defun([_LT_SYS_MODULE_PATH_AIX],
2660 [m4_require([_LT_DECL_SED])dnl
2661 AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2662 lt_aix_libpath_sed='
2663     /Import File Strings/,/^$/ {
2664         /^0/ {
2665             s/^0  *\(.*\)$/\1/
2666             p
2667         }
2668     }'
2669 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2670 # Check for a 64-bit object if we didn't find anything.
2671 if test -z "$aix_libpath"; then
2672   aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2673 fi],[])
2674 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2675 ])# _LT_SYS_MODULE_PATH_AIX
2676
2677
2678 # _LT_SHELL_INIT(ARG)
2679 # -------------------
2680 m4_define([_LT_SHELL_INIT],
2681 [ifdef([AC_DIVERSION_NOTICE],
2682              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
2683          [AC_DIVERT_PUSH(NOTICE)])
2684 $1
2685 AC_DIVERT_POP
2686 ])# _LT_SHELL_INIT
2687
2688
2689 # _LT_PROG_ECHO_BACKSLASH
2690 # -----------------------
2691 # Add some code to the start of the generated configure script which
2692 # will find an echo command which doesn't interpret backslashes.
2693 m4_defun([_LT_PROG_ECHO_BACKSLASH],
2694 [_LT_SHELL_INIT([
2695 # Check that we are running under the correct shell.
2696 SHELL=${CONFIG_SHELL-/bin/sh}
2697
2698 case X$lt_ECHO in
2699 X*--fallback-echo)
2700   # Remove one level of quotation (which was required for Make).
2701   ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2702   ;;
2703 esac
2704
2705 ECHO=${lt_ECHO-echo}
2706 if test "X[$]1" = X--no-reexec; then
2707   # Discard the --no-reexec flag, and continue.
2708   shift
2709 elif test "X[$]1" = X--fallback-echo; then
2710   # Avoid inline document here, it may be left over
2711   :
2712 elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
2713   # Yippee, $ECHO works!
2714   :
2715 else
2716   # Restart under the correct shell.
2717   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2718 fi
2719
2720 if test "X[$]1" = X--fallback-echo; then
2721   # used as fallback echo
2722   shift
2723   cat <<_LT_EOF
2724 [$]*
2725 _LT_EOF
2726   exit 0
2727 fi
2728
2729 # The HP-UX ksh and POSIX shell print the target directory to stdout
2730 # if CDPATH is set.
2731 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2732
2733 if test -z "$lt_ECHO"; then
2734   if test "X${echo_test_string+set}" != Xset; then
2735     # find a string as large as possible, as long as the shell can cope with it
2736     for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
2737       # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
2738       if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
2739          { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
2740       then
2741         break
2742       fi
2743     done
2744   fi
2745
2746   if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2747      echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2748      test "X$echo_testing_string" = "X$echo_test_string"; then
2749     :
2750   else
2751     # The Solaris, AIX, and Digital Unix default echo programs unquote
2752     # backslashes.  This makes it impossible to quote backslashes using
2753     #   echo "$something" | sed 's/\\/\\\\/g'
2754     #
2755     # So, first we look for a working echo in the user's PATH.
2756
2757     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2758     for dir in $PATH /usr/ucb; do
2759       IFS="$lt_save_ifs"
2760       if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
2761          test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
2762          echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
2763          test "X$echo_testing_string" = "X$echo_test_string"; then
2764         ECHO="$dir/echo"
2765         break
2766       fi
2767     done
2768     IFS="$lt_save_ifs"
2769
2770     if test "X$ECHO" = Xecho; then
2771       # We didn't find a better echo, so look for alternatives.
2772       if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
2773          echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
2774          test "X$echo_testing_string" = "X$echo_test_string"; then
2775         # This shell has a builtin print -r that does the trick.
2776         ECHO='print -r'
2777       elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
2778            test "X$CONFIG_SHELL" != X/bin/ksh; then
2779         # If we have ksh, try running configure again with it.
2780         ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2781         export ORIGINAL_CONFIG_SHELL
2782         CONFIG_SHELL=/bin/ksh
2783         export CONFIG_SHELL
2784         exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2785       else
2786         # Try using printf.
2787         ECHO='printf %s\n'
2788         if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2789            echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2790            test "X$echo_testing_string" = "X$echo_test_string"; then
2791           # Cool, printf works
2792           :
2793         elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2794              test "X$echo_testing_string" = 'X\t' &&
2795              echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2796              test "X$echo_testing_string" = "X$echo_test_string"; then
2797           CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2798           export CONFIG_SHELL
2799           SHELL="$CONFIG_SHELL"
2800           export SHELL
2801           ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2802         elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2803              test "X$echo_testing_string" = 'X\t' &&
2804              echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2805              test "X$echo_testing_string" = "X$echo_test_string"; then
2806           ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2807         else
2808           # maybe with a smaller string...
2809           prev=:
2810
2811           for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2812             if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
2813             then
2814               break
2815             fi
2816             prev="$cmd"
2817           done
2818
2819           if test "$prev" != 'sed 50q "[$]0"'; then
2820             echo_test_string=`eval $prev`
2821             export echo_test_string
2822             exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2823           else
2824             # Oops.  We lost completely, so just stick with echo.
2825             ECHO=echo
2826           fi
2827         fi
2828       fi
2829     fi
2830   fi
2831 fi
2832
2833 # Copy echo and quote the copy suitably for passing to libtool from
2834 # the Makefile, instead of quoting the original, which is used later.
2835 lt_ECHO=$ECHO
2836 if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2837    lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2838 fi
2839
2840 AC_SUBST(lt_ECHO)
2841 ])
2842 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2843 _LT_DECL([], [ECHO], [1],
2844     [An echo program that does not interpret backslashes])
2845 ])# _LT_PROG_ECHO_BACKSLASH
2846
2847
2848 # _LT_ENABLE_LOCK
2849 # ---------------
2850 m4_defun([_LT_ENABLE_LOCK],
2851 [AC_ARG_ENABLE([libtool-lock],
2852   [AS_HELP_STRING([--disable-libtool-lock],
2853     [avoid locking (might break parallel builds)])])
2854 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2855
2856 # Some flags need to be propagated to the compiler or linker for good
2857 # libtool support.
2858 case $host in
2859 ia64-*-hpux*)
2860   # Find out which ABI we are using.
2861   echo 'int i;' > conftest.$ac_ext
2862   if AC_TRY_EVAL(ac_compile); then
2863     case `/usr/bin/file conftest.$ac_objext` in
2864       *ELF-32*)
2865         HPUX_IA64_MODE="32"
2866         ;;
2867       *ELF-64*)
2868         HPUX_IA64_MODE="64"
2869         ;;
2870     esac
2871   fi
2872   rm -rf conftest*
2873   ;;
2874 *-*-irix6*)
2875   # Find out which ABI we are using.
2876   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2877   if AC_TRY_EVAL(ac_compile); then
2878     if test "$lt_cv_prog_gnu_ld" = yes; then
2879       case `/usr/bin/file conftest.$ac_objext` in
2880         *32-bit*)
2881           LD="${LD-ld} -melf32bsmip"
2882           ;;
2883         *N32*)
2884           LD="${LD-ld} -melf32bmipn32"
2885           ;;
2886         *64-bit*)
2887           LD="${LD-ld} -melf64bmip"
2888         ;;
2889       esac
2890     else
2891       case `/usr/bin/file conftest.$ac_objext` in
2892         *32-bit*)
2893           LD="${LD-ld} -32"
2894           ;;
2895         *N32*)
2896           LD="${LD-ld} -n32"
2897           ;;
2898         *64-bit*)
2899           LD="${LD-ld} -64"
2900           ;;
2901       esac
2902     fi
2903   fi
2904   rm -rf conftest*
2905   ;;
2906
2907 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2908 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2909   # Find out which ABI we are using.
2910   echo 'int i;' > conftest.$ac_ext
2911   if AC_TRY_EVAL(ac_compile); then
2912     case `/usr/bin/file conftest.o` in
2913       *32-bit*)
2914         case $host in
2915           x86_64-*kfreebsd*-gnu)
2916             LD="${LD-ld} -m elf_i386_fbsd"
2917             ;;
2918           x86_64-*linux*)
2919             LD="${LD-ld} -m elf_i386"
2920             ;;
2921           ppc64-*linux*|powerpc64-*linux*)
2922             LD="${LD-ld} -m elf32ppclinux"
2923             ;;
2924           s390x-*linux*)
2925             LD="${LD-ld} -m elf_s390"
2926             ;;
2927           sparc64-*linux*)
2928             LD="${LD-ld} -m elf32_sparc"
2929             ;;
2930         esac
2931         ;;
2932       *64-bit*)
2933         case $host in
2934           x86_64-*kfreebsd*-gnu)
2935             LD="${LD-ld} -m elf_x86_64_fbsd"
2936             ;;
2937           x86_64-*linux*)
2938             LD="${LD-ld} -m elf_x86_64"
2939             ;;
2940           ppc*-*linux*|powerpc*-*linux*)
2941             LD="${LD-ld} -m elf64ppc"
2942             ;;
2943           s390*-*linux*|s390*-*tpf*)
2944             LD="${LD-ld} -m elf64_s390"
2945             ;;
2946           sparc*-*linux*)
2947             LD="${LD-ld} -m elf64_sparc"
2948             ;;
2949         esac
2950         ;;
2951     esac
2952   fi
2953   rm -rf conftest*
2954   ;;
2955
2956 *-*-sco3.2v5*)
2957   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2958   SAVE_CFLAGS="$CFLAGS"
2959   CFLAGS="$CFLAGS -belf"
2960   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2961     [AC_LANG_PUSH(C)
2962      AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2963      AC_LANG_POP])
2964   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2965     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2966     CFLAGS="$SAVE_CFLAGS"
2967   fi
2968   ;;
2969 sparc*-*solaris*)
2970   # Find out which ABI we are using.
2971   echo 'int i;' > conftest.$ac_ext
2972   if AC_TRY_EVAL(ac_compile); then
2973     case `/usr/bin/file conftest.o` in
2974     *64-bit*)
2975       case $lt_cv_prog_gnu_ld in
2976       yes*) LD="${LD-ld} -m elf64_sparc" ;;
2977       *)
2978         if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2979           LD="${LD-ld} -64"
2980         fi
2981         ;;
2982       esac
2983       ;;
2984     esac
2985   fi
2986   rm -rf conftest*
2987   ;;
2988 esac
2989
2990 need_locks="$enable_libtool_lock"
2991 ])# _LT_ENABLE_LOCK
2992
2993
2994 # _LT_CMD_OLD_ARCHIVE
2995 # -------------------
2996 m4_defun([_LT_CMD_OLD_ARCHIVE],
2997 [AC_CHECK_TOOL(AR, ar, false)
2998 test -z "$AR" && AR=ar
2999 test -z "$AR_FLAGS" && AR_FLAGS=cru
3000 _LT_DECL([], [AR], [1], [The archiver])
3001 _LT_DECL([], [AR_FLAGS], [1])
3002
3003 AC_CHECK_TOOL(STRIP, strip, :)
3004 test -z "$STRIP" && STRIP=:
3005 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
3006
3007 AC_CHECK_TOOL(RANLIB, ranlib, :)
3008 test -z "$RANLIB" && RANLIB=:
3009 _LT_DECL([], [RANLIB], [1],
3010     [Commands used to install an old-style archive])
3011
3012 # Determine commands to create old-style static archives.
3013 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3014 old_postinstall_cmds='chmod 644 $oldlib'
3015 old_postuninstall_cmds=
3016
3017 if test -n "$RANLIB"; then
3018   case $host_os in
3019   openbsd*)
3020     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3021     ;;
3022   *)
3023     old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3024     ;;
3025   esac
3026   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3027 fi
3028 _LT_DECL([], [old_postinstall_cmds], [2])
3029 _LT_DECL([], [old_postuninstall_cmds], [2])
3030 _LT_TAGDECL([], [old_archive_cmds], [2],
3031     [Commands used to build an old-style archive])
3032 ])# _LT_CMD_OLD_ARCHIVE
3033
3034
3035 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3036 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3037 # ----------------------------------------------------------------
3038 # Check whether the given compiler option works
3039 AC_DEFUN([_LT_COMPILER_OPTION],
3040 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3041 m4_require([_LT_DECL_SED])dnl
3042 AC_CACHE_CHECK([$1], [$2],
3043   [$2=no
3044    m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3045    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3046    lt_compiler_flag="$3"
3047    # Insert the option either (1) after the last *FLAGS variable, or
3048    # (2) before a word containing "conftest.", or (3) at the end.
3049    # Note that $ac_compile itself does not contain backslashes and begins
3050    # with a dollar sign (not a hyphen), so the echo should work correctly.
3051    # The option is referenced via a variable to avoid confusing sed.
3052    lt_compile=`echo "$ac_compile" | $SED \
3053    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3054    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3055    -e 's:$: $lt_compiler_flag:'`
3056    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3057    (eval "$lt_compile" 2>conftest.err)
3058    ac_status=$?
3059    cat conftest.err >&AS_MESSAGE_LOG_FD
3060    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3061    if (exit $ac_status) && test -s "$ac_outfile"; then
3062      # The compiler can only warn and ignore the option if not recognized
3063      # So say no if there are warnings other than the usual output.
3064      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
3065      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3066      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3067        $2=yes
3068      fi
3069    fi
3070    $RM conftest*
3071 ])
3072
3073 if test x"[$]$2" = xyes; then
3074     m4_if([$5], , :, [$5])
3075 else
3076     m4_if([$6], , :, [$6])
3077 fi
3078 ])# _LT_COMPILER_OPTION
3079
3080 # Old name:
3081 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3082 dnl aclocal-1.4 backwards compatibility:
3083 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3084
3085
3086 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3087 #                  [ACTION-SUCCESS], [ACTION-FAILURE])
3088 # ----------------------------------------------------
3089 # Check whether the given linker option works
3090 AC_DEFUN([_LT_LINKER_OPTION],
3091 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3092 m4_require([_LT_DECL_SED])dnl
3093 AC_CACHE_CHECK([$1], [$2],
3094   [$2=no
3095    save_LDFLAGS="$LDFLAGS"
3096    LDFLAGS="$LDFLAGS $3"
3097    echo "$lt_simple_link_test_code" > conftest.$ac_ext
3098    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3099      # The linker can only warn and ignore the option if not recognized
3100      # So say no if there are warnings
3101      if test -s conftest.err; then
3102        # Append any errors to the config.log.
3103        cat conftest.err 1>&AS_MESSAGE_LOG_FD
3104        $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
3105        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3106        if diff conftest.exp conftest.er2 >/dev/null; then
3107          $2=yes
3108        fi
3109      else
3110        $2=yes
3111      fi
3112    fi
3113    $RM -r conftest*
3114    LDFLAGS="$save_LDFLAGS"
3115 ])
3116
3117 if test x"[$]$2" = xyes; then
3118     m4_if([$4], , :, [$4])
3119 else
3120     m4_if([$5], , :, [$5])
3121 fi
3122 ])# _LT_LINKER_OPTION
3123
3124 # Old name:
3125 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3126 dnl aclocal-1.4 backwards compatibility:
3127 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3128
3129
3130 # LT_CMD_MAX_LEN
3131 #---------------
3132 AC_DEFUN([LT_CMD_MAX_LEN],
3133 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3134 # find the maximum length of command line arguments
3135 AC_MSG_CHECKING([the maximum length of command line arguments])
3136 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3137   i=0
3138   teststring="ABCD"
3139
3140   case $build_os in
3141   msdosdjgpp*)
3142     # On DJGPP, this test can blow up pretty badly due to problems in libc
3143     # (any single argument exceeding 2000 bytes causes a buffer overrun
3144     # during glob expansion).  Even if it were fixed, the result of this
3145     # check would be larger than it should be.
3146     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3147     ;;
3148
3149   gnu*)
3150     # Under GNU Hurd, this test is not required because there is
3151     # no limit to the length of command line arguments.
3152     # Libtool will interpret -1 as no limit whatsoever
3153     lt_cv_sys_max_cmd_len=-1;
3154     ;;
3155
3156   cygwin* | mingw* | cegcc*)
3157     # On Win9x/ME, this test blows up -- it succeeds, but takes
3158     # about 5 minutes as the teststring grows exponentially.
3159     # Worse, since 9x/ME are not pre-emptively multitasking,
3160     # you end up with a "frozen" computer, even though with patience
3161     # the test eventually succeeds (with a max line length of 256k).
3162     # Instead, let's just punt: use the minimum linelength reported by
3163     # all of the supported platforms: 8192 (on NT/2K/XP).
3164     lt_cv_sys_max_cmd_len=8192;
3165     ;;
3166
3167   amigaos*)
3168     # On AmigaOS with pdksh, this test takes hours, literally.
3169     # So we just punt and use a minimum line length of 8192.
3170     lt_cv_sys_max_cmd_len=8192;
3171     ;;
3172
3173   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3174     # This has been around since 386BSD, at least.  Likely further.
3175     if test -x /sbin/sysctl; then
3176       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3177     elif test -x /usr/sbin/sysctl; then
3178       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3179     else
3180       lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
3181     fi
3182     # And add a safety zone
3183     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3184     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3185     ;;
3186
3187   interix*)
3188     # We know the value 262144 and hardcode it with a safety zone (like BSD)
3189     lt_cv_sys_max_cmd_len=196608
3190     ;;
3191
3192   osf*)
3193     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3194     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3195     # nice to cause kernel panics so lets avoid the loop below.
3196     # First set a reasonable default.
3197     lt_cv_sys_max_cmd_len=16384
3198     #
3199     if test -x /sbin/sysconfig; then
3200       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3201         *1*) lt_cv_sys_max_cmd_len=-1 ;;
3202       esac
3203     fi
3204     ;;
3205   sco3.2v5*)
3206     lt_cv_sys_max_cmd_len=102400
3207     ;;
3208   sysv5* | sco5v6* | sysv4.2uw2*)
3209     kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3210     if test -n "$kargmax"; then
3211       lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[         ]]//'`
3212     else
3213       lt_cv_sys_max_cmd_len=32768
3214     fi
3215     ;;
3216   *)
3217     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3218     if test -n "$lt_cv_sys_max_cmd_len"; then
3219       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3220       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3221     else
3222       # Make teststring a little bigger before we do anything with it.
3223       # a 1K string should be a reasonable start.
3224       for i in 1 2 3 4 5 6 7 8 ; do
3225         teststring=$teststring$teststring
3226       done
3227       SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3228       # If test is not a shell built-in, we'll probably end up computing a
3229       # maximum length that is only half of the actual maximum length, but
3230       # we can't tell.
3231       while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
3232                  = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
3233               test $i != 17 # 1/2 MB should be enough
3234       do
3235         i=`expr $i + 1`
3236         teststring=$teststring$teststring
3237       done
3238       # Only check the string length outside the loop.
3239       lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3240       teststring=
3241       # Add a significant safety factor because C++ compilers can tack on
3242       # massive amounts of additional arguments before passing them to the
3243       # linker.  It appears as though 1/2 is a usable value.
3244       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3245     fi
3246     ;;
3247   esac
3248 ])
3249 if test -n $lt_cv_sys_max_cmd_len ; then
3250   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3251 else
3252   AC_MSG_RESULT(none)
3253 fi
3254 max_cmd_len=$lt_cv_sys_max_cmd_len
3255 _LT_DECL([], [max_cmd_len], [0],
3256     [What is the maximum length of a command?])
3257 ])# LT_CMD_MAX_LEN
3258
3259 # Old name:
3260 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3261 dnl aclocal-1.4 backwards compatibility:
3262 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3263
3264
3265 # _LT_HEADER_DLFCN
3266 # ----------------
3267 m4_defun([_LT_HEADER_DLFCN],
3268 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3269 ])# _LT_HEADER_DLFCN
3270
3271
3272 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3273 #                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3274 # ----------------------------------------------------------------
3275 m4_defun([_LT_TRY_DLOPEN_SELF],
3276 [m4_require([_LT_HEADER_DLFCN])dnl
3277 if test "$cross_compiling" = yes; then :
3278   [$4]
3279 else
3280   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3281   lt_status=$lt_dlunknown
3282   cat > conftest.$ac_ext <<_LT_EOF
3283 [#line __oline__ "configure"
3284 #include "confdefs.h"
3285
3286 #if HAVE_DLFCN_H
3287 #include <dlfcn.h>
3288 #endif
3289
3290 #include <stdio.h>
3291
3292 #ifdef RTLD_GLOBAL
3293 #  define LT_DLGLOBAL           RTLD_GLOBAL
3294 #else
3295 #  ifdef DL_GLOBAL
3296 #    define LT_DLGLOBAL         DL_GLOBAL
3297 #  else
3298 #    define LT_DLGLOBAL         0
3299 #  endif
3300 #endif
3301
3302 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3303    find out it does not work in some platform. */
3304 #ifndef LT_DLLAZY_OR_NOW
3305 #  ifdef RTLD_LAZY
3306 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
3307 #  else
3308 #    ifdef DL_LAZY
3309 #      define LT_DLLAZY_OR_NOW          DL_LAZY
3310 #    else
3311 #      ifdef RTLD_NOW
3312 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
3313 #      else
3314 #        ifdef DL_NOW
3315 #          define LT_DLLAZY_OR_NOW      DL_NOW
3316 #        else
3317 #          define LT_DLLAZY_OR_NOW      0
3318 #        endif
3319 #      endif
3320 #    endif
3321 #  endif
3322 #endif
3323
3324 void fnord() { int i=42;}
3325 int main ()
3326 {
3327   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3328   int status = $lt_dlunknown;
3329
3330   if (self)
3331     {
3332       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
3333       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3334       /* dlclose (self); */
3335     }
3336   else
3337     puts (dlerror ());
3338
3339   return status;
3340 }]
3341 _LT_EOF
3342   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3343     (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3344     lt_status=$?
3345     case x$lt_status in
3346       x$lt_dlno_uscore) $1 ;;
3347       x$lt_dlneed_uscore) $2 ;;
3348       x$lt_dlunknown|x*) $3 ;;
3349     esac
3350   else :
3351     # compilation failed
3352     $3
3353   fi
3354 fi
3355 rm -fr conftest*
3356 ])# _LT_TRY_DLOPEN_SELF
3357
3358
3359 # LT_SYS_DLOPEN_SELF
3360 # ------------------
3361 AC_DEFUN([LT_SYS_DLOPEN_SELF],
3362 [m4_require([_LT_HEADER_DLFCN])dnl
3363 if test "x$enable_dlopen" != xyes; then
3364   enable_dlopen=unknown
3365   enable_dlopen_self=unknown
3366   enable_dlopen_self_static=unknown
3367 else
3368   lt_cv_dlopen=no
3369   lt_cv_dlopen_libs=
3370
3371   case $host_os in
3372   beos*)
3373     lt_cv_dlopen="load_add_on"
3374     lt_cv_dlopen_libs=
3375     lt_cv_dlopen_self=yes
3376     ;;
3377
3378   mingw* | pw32* | cegcc*)
3379     lt_cv_dlopen="LoadLibrary"
3380     lt_cv_dlopen_libs=
3381     ;;
3382
3383   cygwin*)
3384     lt_cv_dlopen="dlopen"
3385     lt_cv_dlopen_libs=
3386     ;;
3387
3388   darwin*)
3389   # if libdl is installed we need to link against it
3390     AC_CHECK_LIB([dl], [dlopen],
3391                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3392     lt_cv_dlopen="dyld"
3393     lt_cv_dlopen_libs=
3394     lt_cv_dlopen_self=yes
3395     ])
3396     ;;
3397
3398   *)
3399     AC_CHECK_FUNC([shl_load],
3400           [lt_cv_dlopen="shl_load"],
3401       [AC_CHECK_LIB([dld], [shl_load],
3402             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3403         [AC_CHECK_FUNC([dlopen],
3404               [lt_cv_dlopen="dlopen"],
3405           [AC_CHECK_LIB([dl], [dlopen],
3406                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3407             [AC_CHECK_LIB([svld], [dlopen],
3408                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3409               [AC_CHECK_LIB([dld], [dld_link],
3410                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3411               ])
3412             ])
3413           ])
3414         ])
3415       ])
3416     ;;
3417   esac
3418
3419   if test "x$lt_cv_dlopen" != xno; then
3420     enable_dlopen=yes
3421   else
3422     enable_dlopen=no
3423   fi
3424
3425   case $lt_cv_dlopen in
3426   dlopen)
3427     save_CPPFLAGS="$CPPFLAGS"
3428     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3429
3430     save_LDFLAGS="$LDFLAGS"
3431     wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3432
3433     save_LIBS="$LIBS"
3434     LIBS="$lt_cv_dlopen_libs $LIBS"
3435
3436     AC_CACHE_CHECK([whether a program can dlopen itself],
3437           lt_cv_dlopen_self, [dnl
3438           _LT_TRY_DLOPEN_SELF(
3439             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3440             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3441     ])
3442
3443     if test "x$lt_cv_dlopen_self" = xyes; then
3444       wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3445       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3446           lt_cv_dlopen_self_static, [dnl
3447           _LT_TRY_DLOPEN_SELF(
3448             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3449             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
3450       ])
3451     fi
3452
3453     CPPFLAGS="$save_CPPFLAGS"
3454     LDFLAGS="$save_LDFLAGS"
3455     LIBS="$save_LIBS"
3456     ;;
3457   esac
3458
3459   case $lt_cv_dlopen_self in
3460   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3461   *) enable_dlopen_self=unknown ;;
3462   esac
3463
3464   case $lt_cv_dlopen_self_static in
3465   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3466   *) enable_dlopen_self_static=unknown ;;
3467   esac
3468 fi
3469 _LT_DECL([dlopen_support], [enable_dlopen], [0],
3470          [Whether dlopen is supported])
3471 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3472          [Whether dlopen of programs is supported])
3473 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3474          [Whether dlopen of statically linked programs is supported])
3475 ])# LT_SYS_DLOPEN_SELF
3476
3477 # Old name:
3478 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3479 dnl aclocal-1.4 backwards compatibility:
3480 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3481
3482
3483 # _LT_COMPILER_C_O([TAGNAME])
3484 # ---------------------------
3485 # Check to see if options -c and -o are simultaneously supported by compiler.
3486 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
3487 m4_defun([_LT_COMPILER_C_O],
3488 [m4_require([_LT_DECL_SED])dnl
3489 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3490 m4_require([_LT_TAG_COMPILER])dnl
3491 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3492   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3493   [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3494    $RM -r conftest 2>/dev/null
3495    mkdir conftest
3496    cd conftest
3497    mkdir out
3498    echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3499
3500    lt_compiler_flag="-o out/conftest2.$ac_objext"
3501    # Insert the option either (1) after the last *FLAGS variable, or
3502    # (2) before a word containing "conftest.", or (3) at the end.
3503    # Note that $ac_compile itself does not contain backslashes and begins
3504    # with a dollar sign (not a hyphen), so the echo should work correctly.
3505    lt_compile=`echo "$ac_compile" | $SED \
3506    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3507    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3508    -e 's:$: $lt_compiler_flag:'`
3509    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3510    (eval "$lt_compile" 2>out/conftest.err)
3511    ac_status=$?
3512    cat out/conftest.err >&AS_MESSAGE_LOG_FD
3513    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3514    if (exit $ac_status) && test -s out/conftest2.$ac_objext
3515    then
3516      # The compiler can only warn and ignore the option if not recognized
3517      # So say no if there are warnings
3518      $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
3519      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3520      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3521        _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3522      fi
3523    fi
3524    chmod u+w . 2>&AS_MESSAGE_LOG_FD
3525    $RM conftest*
3526    # SGI C++ compiler will create directory out/ii_files/ for
3527    # template instantiation
3528    test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3529    $RM out/* && rmdir out
3530    cd ..
3531    $RM -r conftest
3532    $RM conftest*
3533 ])
3534 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3535         [Does compiler simultaneously support -c and -o options?])
3536 ])# _LT_COMPILER_C_O
3537
3538
3539 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
3540 # ----------------------------------
3541 # Check to see if we can do hard links to lock some files if needed
3542 m4_defun([_LT_COMPILER_FILE_LOCKS],
3543 [m4_require([_LT_ENABLE_LOCK])dnl
3544 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3545 _LT_COMPILER_C_O([$1])
3546
3547 hard_links="nottested"
3548 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3549   # do not overwrite the value of need_locks provided by the user
3550   AC_MSG_CHECKING([if we can lock with hard links])
3551   hard_links=yes
3552   $RM conftest*
3553   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3554   touch conftest.a
3555   ln conftest.a conftest.b 2>&5 || hard_links=no
3556   ln conftest.a conftest.b 2>/dev/null && hard_links=no
3557   AC_MSG_RESULT([$hard_links])
3558   if test "$hard_links" = no; then
3559     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3560     need_locks=warn
3561   fi
3562 else
3563   need_locks=no
3564 fi
3565 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3566 ])# _LT_COMPILER_FILE_LOCKS
3567
3568
3569 # _LT_CHECK_OBJDIR
3570 # ----------------
3571 m4_defun([_LT_CHECK_OBJDIR],
3572 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3573 [rm -f .libs 2>/dev/null
3574 mkdir .libs 2>/dev/null
3575 if test -d .libs; then
3576   lt_cv_objdir=.libs
3577 else
3578   # MS-DOS does not allow filenames that begin with a dot.
3579   lt_cv_objdir=_libs
3580 fi
3581 rmdir .libs 2>/dev/null])
3582 objdir=$lt_cv_objdir
3583 _LT_DECL([], [objdir], [0],
3584          [The name of the directory that contains temporary libtool files])dnl
3585 m4_pattern_allow([LT_OBJDIR])dnl
3586 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3587   [Define to the sub-directory in which libtool stores uninstalled libraries.])
3588 ])# _LT_CHECK_OBJDIR
3589
3590
3591 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3592 # --------------------------------------
3593 # Check hardcoding attributes.
3594 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3595 [AC_MSG_CHECKING([how to hardcode library paths into programs])
3596 _LT_TAGVAR(hardcode_action, $1)=
3597 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3598    test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3599    test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3600
3601   # We can hardcode non-existent directories.
3602   if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3603      # If the only mechanism to avoid hardcoding is shlibpath_var, we
3604      # have to relink, otherwise we might link with an installed library
3605      # when we should be linking with a yet-to-be-installed one
3606      ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3607      test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3608     # Linking always hardcodes the temporary library directory.
3609     _LT_TAGVAR(hardcode_action, $1)=relink
3610   else
3611     # We can link without hardcoding, and we can hardcode nonexisting dirs.
3612     _LT_TAGVAR(hardcode_action, $1)=immediate
3613   fi
3614 else
3615   # We cannot hardcode anything, or else we can only hardcode existing
3616   # directories.
3617   _LT_TAGVAR(hardcode_action, $1)=unsupported
3618 fi
3619 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3620
3621 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3622    test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3623   # Fast installation is not supported
3624   enable_fast_install=no
3625 elif test "$shlibpath_overrides_runpath" = yes ||
3626      test "$enable_shared" = no; then
3627   # Fast installation is not necessary
3628   enable_fast_install=needless
3629 fi
3630 _LT_TAGDECL([], [hardcode_action], [0],
3631     [How to hardcode a shared library path into an executable])
3632 ])# _LT_LINKER_HARDCODE_LIBPATH
3633
3634
3635 # _LT_CMD_STRIPLIB
3636 # ----------------
3637 m4_defun([_LT_CMD_STRIPLIB],
3638 [m4_require([_LT_DECL_EGREP])
3639 striplib=
3640 old_striplib=
3641 AC_MSG_CHECKING([whether stripping libraries is possible])
3642 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3643   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3644   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3645   AC_MSG_RESULT([yes])
3646 else
3647 # FIXME - insert some real tests, host_os isn't really good enough
3648   case $host_os in
3649   darwin*)
3650     if test -n "$STRIP" ; then
3651       striplib="$STRIP -x"
3652       old_striplib="$STRIP -S"
3653       AC_MSG_RESULT([yes])
3654     else
3655       AC_MSG_RESULT([no])
3656     fi
3657     ;;
3658   *)
3659     AC_MSG_RESULT([no])
3660     ;;
3661   esac
3662 fi
3663 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3664 _LT_DECL([], [striplib], [1])
3665 ])# _LT_CMD_STRIPLIB
3666
3667
3668 # _LT_SYS_DYNAMIC_LINKER([TAG])
3669 # -----------------------------
3670 # PORTME Fill in your ld.so characteristics
3671 m4_defun([_LT_SYS_DYNAMIC_LINKER],
3672 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3673 m4_require([_LT_DECL_EGREP])dnl
3674 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3675 m4_require([_LT_DECL_OBJDUMP])dnl
3676 m4_require([_LT_DECL_SED])dnl
3677 AC_MSG_CHECKING([dynamic linker characteristics])
3678 m4_if([$1],
3679         [], [
3680 if test "$GCC" = yes; then
3681   case $host_os in
3682     darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3683     *) lt_awk_arg="/^libraries:/" ;;
3684   esac
3685   lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3686   if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
3687     # if the path contains ";" then we assume it to be the separator
3688     # otherwise default to the standard path separator (i.e. ":") - it is
3689     # assumed that no part of a normal pathname contains ";" but that should
3690     # okay in the real world where ";" in dirpaths is itself problematic.
3691     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
3692   else
3693     lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3694   fi
3695   # Ok, now we have the path, separated by spaces, we can step through it
3696   # and add multilib dir if necessary.
3697   lt_tmp_lt_search_path_spec=
3698   lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3699   for lt_sys_path in $lt_search_path_spec; do
3700     if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3701       lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3702     else
3703       test -d "$lt_sys_path" && \
3704         lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3705     fi
3706   done
3707   lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
3708 BEGIN {RS=" "; FS="/|\n";} {
3709   lt_foo="";
3710   lt_count=0;
3711   for (lt_i = NF; lt_i > 0; lt_i--) {
3712     if ($lt_i != "" && $lt_i != ".") {
3713       if ($lt_i == "..") {
3714         lt_count++;
3715       } else {
3716         if (lt_count == 0) {
3717           lt_foo="/" $lt_i lt_foo;
3718         } else {
3719           lt_count--;
3720         }
3721       }
3722     }
3723   }
3724   if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3725   if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3726 }'`
3727   sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
3728 else
3729   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3730 fi])
3731 library_names_spec=
3732 libname_spec='lib$name'
3733 soname_spec=
3734 shrext_cmds=".so"
3735 postinstall_cmds=
3736 postuninstall_cmds=
3737 finish_cmds=
3738 finish_eval=
3739 shlibpath_var=
3740 shlibpath_overrides_runpath=unknown
3741 version_type=none
3742 dynamic_linker="$host_os ld.so"
3743 sys_lib_dlsearch_path_spec="/lib /usr/lib"
3744 need_lib_prefix=unknown
3745 hardcode_into_libs=no
3746
3747 # when you set need_version to no, make sure it does not cause -set_version
3748 # flags to be left without arguments
3749 need_version=unknown
3750
3751 case $host_os in
3752 aix3*)
3753   version_type=linux
3754   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3755   shlibpath_var=LIBPATH
3756
3757   # AIX 3 has no versioning support, so we append a major version to the name.
3758   soname_spec='${libname}${release}${shared_ext}$major'
3759   ;;
3760
3761 aix[[4-9]]*)
3762   version_type=linux
3763   need_lib_prefix=no
3764   need_version=no
3765   hardcode_into_libs=yes
3766   if test "$host_cpu" = ia64; then
3767     # AIX 5 supports IA64
3768     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3769     shlibpath_var=LD_LIBRARY_PATH
3770   else
3771     # With GCC up to 2.95.x, collect2 would create an import file
3772     # for dependence libraries.  The import file would start with
3773     # the line `#! .'.  This would cause the generated library to
3774     # depend on `.', always an invalid library.  This was fixed in
3775     # development snapshots of GCC prior to 3.0.
3776     case $host_os in
3777       aix4 | aix4.[[01]] | aix4.[[01]].*)
3778       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3779            echo ' yes '
3780            echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3781         :
3782       else
3783         can_build_shared=no
3784       fi
3785       ;;
3786     esac
3787     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3788     # soname into executable. Probably we can add versioning support to
3789     # collect2, so additional links can be useful in future.
3790     if test "$aix_use_runtimelinking" = yes; then
3791       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3792       # instead of lib<name>.a to let people know that these are not
3793       # typical AIX shared libraries.
3794       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3795     else
3796       # We preserve .a as extension for shared libraries through AIX4.2
3797       # and later when we are not doing run time linking.
3798       library_names_spec='${libname}${release}.a $libname.a'
3799       soname_spec='${libname}${release}${shared_ext}$major'
3800     fi
3801     shlibpath_var=LIBPATH
3802   fi
3803   ;;
3804
3805 amigaos*)
3806   case $host_cpu in
3807   powerpc)
3808     # Since July 2007 AmigaOS4 officially supports .so libraries.
3809     # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3810     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3811     ;;
3812   m68k)
3813     library_names_spec='$libname.ixlibrary $libname.a'
3814     # Create ${libname}_ixlibrary.a entries in /sys/libs.
3815     finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
3816     ;;
3817   esac
3818   ;;
3819
3820 beos*)
3821   library_names_spec='${libname}${shared_ext}'
3822   dynamic_linker="$host_os ld.so"
3823   shlibpath_var=LIBRARY_PATH
3824   ;;
3825
3826 bsdi[[45]]*)
3827   version_type=linux
3828   need_version=no
3829   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3830   soname_spec='${libname}${release}${shared_ext}$major'
3831   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3832   shlibpath_var=LD_LIBRARY_PATH
3833   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3834   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3835   # the default ld.so.conf also contains /usr/contrib/lib and
3836   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3837   # libtool to hard-code these into programs
3838   ;;
3839
3840 cygwin* | mingw* | pw32* | cegcc*)
3841   version_type=windows
3842   shrext_cmds=".dll"
3843   need_version=no
3844   need_lib_prefix=no
3845
3846   case $GCC,$host_os in
3847   yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
3848     library_names_spec='$libname.dll.a'
3849     # DLL is installed to $(libdir)/../bin by postinstall_cmds
3850     postinstall_cmds='base_file=`basename \${file}`~
3851       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3852       dldir=$destdir/`dirname \$dlpath`~
3853       test -d \$dldir || mkdir -p \$dldir~
3854       $install_prog $dir/$dlname \$dldir/$dlname~
3855       chmod a+x \$dldir/$dlname~
3856       if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3857         eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3858       fi'
3859     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3860       dlpath=$dir/\$dldll~
3861        $RM \$dlpath'
3862     shlibpath_overrides_runpath=yes
3863
3864     case $host_os in
3865     cygwin*)
3866       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3867       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3868       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3869       ;;
3870     mingw* | cegcc*)
3871       # MinGW DLLs use traditional 'lib' prefix
3872       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3873       sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3874       if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3875         # It is most probably a Windows format PATH printed by
3876         # mingw gcc, but we are running on Cygwin. Gcc prints its search
3877         # path with ; separators, and with drive letters. We can handle the
3878         # drive letters (cygwin fileutils understands them), so leave them,
3879         # especially as we might pass files found there to a mingw objdump,
3880         # which wouldn't understand a cygwinified path. Ahh.
3881         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3882       else
3883         sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3884       fi
3885       ;;
3886     pw32*)
3887       # pw32 DLLs use 'pw' prefix rather than 'lib'
3888       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3889       ;;
3890     esac
3891     ;;
3892
3893   *)
3894     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3895     ;;
3896   esac
3897   dynamic_linker='Win32 ld.exe'
3898   # FIXME: first we should search . and the directory the executable is in
3899   shlibpath_var=PATH
3900   ;;
3901
3902 darwin* | rhapsody*)
3903   dynamic_linker="$host_os dyld"
3904   version_type=darwin
3905   need_lib_prefix=no
3906   need_version=no
3907   library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3908   soname_spec='${libname}${release}${major}$shared_ext'
3909   shlibpath_overrides_runpath=yes
3910   shlibpath_var=DYLD_LIBRARY_PATH
3911   shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3912 m4_if([$1], [],[
3913   sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3914   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3915   ;;
3916
3917 dgux*)
3918   version_type=linux
3919   need_lib_prefix=no
3920   need_version=no
3921   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3922   soname_spec='${libname}${release}${shared_ext}$major'
3923   shlibpath_var=LD_LIBRARY_PATH
3924   ;;
3925
3926 freebsd1*)
3927   dynamic_linker=no
3928   ;;
3929
3930 freebsd* | dragonfly*)
3931   # DragonFly does not have aout.  When/if they implement a new
3932   # versioning mechanism, adjust this.
3933   if test -x /usr/bin/objformat; then
3934     objformat=`/usr/bin/objformat`
3935   else
3936     case $host_os in
3937     freebsd[[123]]*) objformat=aout ;;
3938     *) objformat=elf ;;
3939     esac
3940   fi
3941   version_type=freebsd-$objformat
3942   case $version_type in
3943     freebsd-elf*)
3944       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3945       need_version=no
3946       need_lib_prefix=no
3947       ;;
3948     freebsd-*)
3949       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3950       need_version=yes
3951       ;;
3952   esac
3953   shlibpath_var=LD_LIBRARY_PATH
3954   case $host_os in
3955   freebsd2*)
3956     shlibpath_overrides_runpath=yes
3957     ;;
3958   freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3959     shlibpath_overrides_runpath=yes
3960     hardcode_into_libs=yes
3961     ;;
3962   freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3963   freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3964     shlibpath_overrides_runpath=no
3965     hardcode_into_libs=yes
3966     ;;
3967   *) # from 4.6 on, and DragonFly
3968     shlibpath_overrides_runpath=yes
3969     hardcode_into_libs=yes
3970     ;;
3971   esac
3972   ;;
3973
3974 gnu*)
3975   version_type=linux
3976   need_lib_prefix=no
3977   need_version=no
3978   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3979   soname_spec='${libname}${release}${shared_ext}$major'
3980   shlibpath_var=LD_LIBRARY_PATH
3981   hardcode_into_libs=yes
3982   ;;
3983
3984 hpux9* | hpux10* | hpux11*)
3985   # Give a soname corresponding to the major version so that dld.sl refuses to
3986   # link against other versions.
3987   version_type=sunos
3988   need_lib_prefix=no
3989   need_version=no
3990   case $host_cpu in
3991   ia64*)
3992     shrext_cmds='.so'
3993     hardcode_into_libs=yes
3994     dynamic_linker="$host_os dld.so"
3995     shlibpath_var=LD_LIBRARY_PATH
3996     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3997     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3998     soname_spec='${libname}${release}${shared_ext}$major'
3999     if test "X$HPUX_IA64_MODE" = X32; then
4000       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4001     else
4002       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4003     fi
4004     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4005     ;;
4006   hppa*64*)
4007     shrext_cmds='.sl'
4008     hardcode_into_libs=yes
4009     dynamic_linker="$host_os dld.sl"
4010     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4011     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4012     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4013     soname_spec='${libname}${release}${shared_ext}$major'
4014     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4015     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4016     ;;
4017   *)
4018     shrext_cmds='.sl'
4019     dynamic_linker="$host_os dld.sl"
4020     shlibpath_var=SHLIB_PATH
4021     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4022     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4023     soname_spec='${libname}${release}${shared_ext}$major'
4024     ;;
4025   esac
4026   # HP-UX runs *really* slowly unless shared libraries are mode 555.
4027   postinstall_cmds='chmod 555 $lib'
4028   ;;
4029
4030 interix[[3-9]]*)
4031   version_type=linux
4032   need_lib_prefix=no
4033   need_version=no
4034   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4035   soname_spec='${libname}${release}${shared_ext}$major'
4036   dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4037   shlibpath_var=LD_LIBRARY_PATH
4038   shlibpath_overrides_runpath=no
4039   hardcode_into_libs=yes
4040   ;;
4041
4042 irix5* | irix6* | nonstopux*)
4043   case $host_os in
4044     nonstopux*) version_type=nonstopux ;;
4045     *)
4046         if test "$lt_cv_prog_gnu_ld" = yes; then
4047                 version_type=linux
4048         else
4049                 version_type=irix
4050         fi ;;
4051   esac
4052   need_lib_prefix=no
4053   need_version=no
4054   soname_spec='${libname}${release}${shared_ext}$major'
4055   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4056   case $host_os in
4057   irix5* | nonstopux*)
4058     libsuff= shlibsuff=
4059     ;;
4060   *)
4061     case $LD in # libtool.m4 will add one of these switches to LD
4062     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4063       libsuff= shlibsuff= libmagic=32-bit;;
4064     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4065       libsuff=32 shlibsuff=N32 libmagic=N32;;
4066     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4067       libsuff=64 shlibsuff=64 libmagic=64-bit;;
4068     *) libsuff= shlibsuff= libmagic=never-match;;
4069     esac
4070     ;;
4071   esac
4072   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4073   shlibpath_overrides_runpath=no
4074   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4075   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4076   hardcode_into_libs=yes
4077   ;;
4078
4079 # No shared lib support for Linux oldld, aout, or coff.
4080 linux*oldld* | linux*aout* | linux*coff*)
4081   dynamic_linker=no
4082   ;;
4083
4084 # This must be Linux ELF.
4085 linux* | k*bsd*-gnu)
4086   version_type=linux
4087   need_lib_prefix=no
4088   need_version=no
4089   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4090   soname_spec='${libname}${release}${shared_ext}$major'
4091   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4092   shlibpath_var=LD_LIBRARY_PATH
4093   shlibpath_overrides_runpath=no
4094   # Some binutils ld are patched to set DT_RUNPATH
4095   save_LDFLAGS=$LDFLAGS
4096   save_libdir=$libdir
4097   eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4098        LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4099   AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4100     [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4101        [shlibpath_overrides_runpath=yes])])
4102   LDFLAGS=$save_LDFLAGS
4103   libdir=$save_libdir
4104
4105   # This implies no fast_install, which is unacceptable.
4106   # Some rework will be needed to allow for fast_install
4107   # before this can be enabled.
4108   hardcode_into_libs=yes
4109
4110   # Append ld.so.conf contents to the search path
4111   if test -f /etc/ld.so.conf; then
4112     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[   ]*hwcap[        ]/d;s/[:,      ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
4113     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4114   fi
4115
4116   # We used to test for /lib/ld.so.1 and disable shared libraries on
4117   # powerpc, because MkLinux only supported shared libraries with the
4118   # GNU dynamic linker.  Since this was broken with cross compilers,
4119   # most powerpc-linux boxes support dynamic linking these days and
4120   # people can always --disable-shared, the test was removed, and we
4121   # assume the GNU/Linux dynamic linker is in use.
4122   dynamic_linker='GNU/Linux ld.so'
4123   ;;
4124
4125 netbsdelf*-gnu)
4126   version_type=linux
4127   need_lib_prefix=no
4128   need_version=no
4129   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4130   soname_spec='${libname}${release}${shared_ext}$major'
4131   shlibpath_var=LD_LIBRARY_PATH
4132   shlibpath_overrides_runpath=no
4133   hardcode_into_libs=yes
4134   dynamic_linker='NetBSD ld.elf_so'
4135   ;;
4136
4137 netbsd*)
4138   version_type=sunos
4139   need_lib_prefix=no
4140   need_version=no
4141   if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4142     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4143     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4144     dynamic_linker='NetBSD (a.out) ld.so'
4145   else
4146     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4147     soname_spec='${libname}${release}${shared_ext}$major'
4148     dynamic_linker='NetBSD ld.elf_so'
4149   fi
4150   shlibpath_var=LD_LIBRARY_PATH
4151   shlibpath_overrides_runpath=yes
4152   hardcode_into_libs=yes
4153   ;;
4154
4155 newsos6)
4156   version_type=linux
4157   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4158   shlibpath_var=LD_LIBRARY_PATH
4159   shlibpath_overrides_runpath=yes
4160   ;;
4161
4162 *nto* | *qnx*)
4163   version_type=qnx
4164   need_lib_prefix=no
4165   need_version=no
4166   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4167   soname_spec='${libname}${release}${shared_ext}$major'
4168   shlibpath_var=LD_LIBRARY_PATH
4169   shlibpath_overrides_runpath=no
4170   hardcode_into_libs=yes
4171   dynamic_linker='ldqnx.so'
4172   ;;
4173
4174 openbsd*)
4175   version_type=sunos
4176   sys_lib_dlsearch_path_spec="/usr/lib"
4177   need_lib_prefix=no
4178   # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4179   case $host_os in
4180     openbsd3.3 | openbsd3.3.*)  need_version=yes ;;
4181     *)                          need_version=no  ;;
4182   esac
4183   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4184   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4185   shlibpath_var=LD_LIBRARY_PATH
4186   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4187     case $host_os in
4188       openbsd2.[[89]] | openbsd2.[[89]].*)
4189         shlibpath_overrides_runpath=no
4190         ;;
4191       *)
4192         shlibpath_overrides_runpath=yes
4193         ;;
4194       esac
4195   else
4196     shlibpath_overrides_runpath=yes
4197   fi
4198   ;;
4199
4200 os2*)
4201   libname_spec='$name'
4202   shrext_cmds=".dll"
4203   need_lib_prefix=no
4204   library_names_spec='$libname${shared_ext} $libname.a'
4205   dynamic_linker='OS/2 ld.exe'
4206   shlibpath_var=LIBPATH
4207   ;;
4208
4209 osf3* | osf4* | osf5*)
4210   version_type=osf
4211   need_lib_prefix=no
4212   need_version=no
4213   soname_spec='${libname}${release}${shared_ext}$major'
4214   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4215   shlibpath_var=LD_LIBRARY_PATH
4216   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4217   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4218   ;;
4219
4220 rdos*)
4221   dynamic_linker=no
4222   ;;
4223
4224 solaris*)
4225   version_type=linux
4226   need_lib_prefix=no
4227   need_version=no
4228   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4229   soname_spec='${libname}${release}${shared_ext}$major'
4230   shlibpath_var=LD_LIBRARY_PATH
4231   shlibpath_overrides_runpath=yes
4232   hardcode_into_libs=yes
4233   # ldd complains unless libraries are executable
4234   postinstall_cmds='chmod +x $lib'
4235   ;;
4236
4237 sunos4*)
4238   version_type=sunos
4239   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4240   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4241   shlibpath_var=LD_LIBRARY_PATH
4242   shlibpath_overrides_runpath=yes
4243   if test "$with_gnu_ld" = yes; then
4244     need_lib_prefix=no
4245   fi
4246   need_version=yes
4247   ;;
4248
4249 sysv4 | sysv4.3*)
4250   version_type=linux
4251   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4252   soname_spec='${libname}${release}${shared_ext}$major'
4253   shlibpath_var=LD_LIBRARY_PATH
4254   case $host_vendor in
4255     sni)
4256       shlibpath_overrides_runpath=no
4257       need_lib_prefix=no
4258       runpath_var=LD_RUN_PATH
4259       ;;
4260     siemens)
4261       need_lib_prefix=no
4262       ;;
4263     motorola)
4264       need_lib_prefix=no
4265       need_version=no
4266       shlibpath_overrides_runpath=no
4267       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4268       ;;
4269   esac
4270   ;;
4271
4272 sysv4*MP*)
4273   if test -d /usr/nec ;then
4274     version_type=linux
4275     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4276     soname_spec='$libname${shared_ext}.$major'
4277     shlibpath_var=LD_LIBRARY_PATH
4278   fi
4279   ;;
4280
4281 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4282   version_type=freebsd-elf
4283   need_lib_prefix=no
4284   need_version=no
4285   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4286   soname_spec='${libname}${release}${shared_ext}$major'
4287   shlibpath_var=LD_LIBRARY_PATH
4288   shlibpath_overrides_runpath=yes
4289   hardcode_into_libs=yes
4290   if test "$with_gnu_ld" = yes; then
4291     sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4292   else
4293     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4294     case $host_os in
4295       sco3.2v5*)
4296         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4297         ;;
4298     esac
4299   fi
4300   sys_lib_dlsearch_path_spec='/usr/lib'
4301   ;;
4302
4303 tpf*)
4304   # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
4305   version_type=linux
4306   need_lib_prefix=no
4307   need_version=no
4308   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4309   shlibpath_var=LD_LIBRARY_PATH
4310   shlibpath_overrides_runpath=no
4311   hardcode_into_libs=yes
4312   ;;
4313
4314 uts4*)
4315   version_type=linux
4316   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4317   soname_spec='${libname}${release}${shared_ext}$major'
4318   shlibpath_var=LD_LIBRARY_PATH
4319   ;;
4320
4321 *)
4322   dynamic_linker=no
4323   ;;
4324 esac
4325 AC_MSG_RESULT([$dynamic_linker])
4326 test "$dynamic_linker" = no && can_build_shared=no
4327
4328 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4329 if test "$GCC" = yes; then
4330   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4331 fi
4332
4333 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4334   sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4335 fi
4336 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4337   sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4338 fi
4339
4340 _LT_DECL([], [variables_saved_for_relink], [1],
4341     [Variables whose values should be saved in libtool wrapper scripts and
4342     restored at link time])
4343 _LT_DECL([], [need_lib_prefix], [0],
4344     [Do we need the "lib" prefix for modules?])
4345 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4346 _LT_DECL([], [version_type], [0], [Library versioning type])
4347 _LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
4348 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4349 _LT_DECL([], [shlibpath_overrides_runpath], [0],
4350     [Is shlibpath searched before the hard-coded library search path?])
4351 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4352 _LT_DECL([], [library_names_spec], [1],
4353     [[List of archive names.  First name is the real one, the rest are links.
4354     The last name is the one that the linker finds with -lNAME]])
4355 _LT_DECL([], [soname_spec], [1],
4356     [[The coded name of the library, if different from the real name]])
4357 _LT_DECL([], [postinstall_cmds], [2],
4358     [Command to use after installation of a shared archive])
4359 _LT_DECL([], [postuninstall_cmds], [2],
4360     [Command to use after uninstallation of a shared archive])
4361 _LT_DECL([], [finish_cmds], [2],
4362     [Commands used to finish a libtool library installation in a directory])
4363 _LT_DECL([], [finish_eval], [1],
4364     [[As "finish_cmds", except a single script fragment to be evaled but
4365     not shown]])
4366 _LT_DECL([], [hardcode_into_libs], [0],
4367     [Whether we should hardcode library paths into libraries])
4368 _LT_DECL([], [sys_lib_search_path_spec], [2],
4369     [Compile-time system search path for libraries])
4370 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4371     [Run-time system search path for libraries])
4372 ])# _LT_SYS_DYNAMIC_LINKER
4373
4374
4375 # _LT_PATH_TOOL_PREFIX(TOOL)
4376 # --------------------------
4377 # find a file program which can recognize shared library
4378 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4379 [m4_require([_LT_DECL_EGREP])dnl
4380 AC_MSG_CHECKING([for $1])
4381 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4382 [case $MAGIC_CMD in
4383 [[\\/*] |  ?:[\\/]*])
4384   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4385   ;;
4386 *)
4387   lt_save_MAGIC_CMD="$MAGIC_CMD"
4388   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4389 dnl $ac_dummy forces splitting on constant user-supplied paths.
4390 dnl POSIX.2 word splitting is done only on the output of word expansions,
4391 dnl not every word.  This closes a longstanding sh security hole.
4392   ac_dummy="m4_if([$2], , $PATH, [$2])"
4393   for ac_dir in $ac_dummy; do
4394     IFS="$lt_save_ifs"
4395     test -z "$ac_dir" && ac_dir=.
4396     if test -f $ac_dir/$1; then
4397       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4398       if test -n "$file_magic_test_file"; then
4399         case $deplibs_check_method in
4400         "file_magic "*)
4401           file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4402           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4403           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4404             $EGREP "$file_magic_regex" > /dev/null; then
4405             :
4406           else
4407             cat <<_LT_EOF 1>&2
4408
4409 *** Warning: the command libtool uses to detect shared libraries,
4410 *** $file_magic_cmd, produces output that libtool cannot recognize.
4411 *** The result is that libtool may fail to recognize shared libraries
4412 *** as such.  This will affect the creation of libtool libraries that
4413 *** depend on shared libraries, but programs linked with such libtool
4414 *** libraries will work regardless of this problem.  Nevertheless, you
4415 *** may want to report the problem to your system manager and/or to
4416 *** bug-libtool@gnu.org
4417
4418 _LT_EOF
4419           fi ;;
4420         esac
4421       fi
4422       break
4423     fi
4424   done
4425   IFS="$lt_save_ifs"
4426   MAGIC_CMD="$lt_save_MAGIC_CMD"
4427   ;;
4428 esac])
4429 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4430 if test -n "$MAGIC_CMD"; then
4431   AC_MSG_RESULT($MAGIC_CMD)
4432 else
4433   AC_MSG_RESULT(no)
4434 fi
4435 _LT_DECL([], [MAGIC_CMD], [0],
4436          [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4437 ])# _LT_PATH_TOOL_PREFIX
4438
4439 # Old name:
4440 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4441 dnl aclocal-1.4 backwards compatibility:
4442 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4443
4444
4445 # _LT_PATH_MAGIC
4446 # --------------
4447 # find a file program which can recognize a shared library
4448 m4_defun([_LT_PATH_MAGIC],
4449 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4450 if test -z "$lt_cv_path_MAGIC_CMD"; then
4451   if test -n "$ac_tool_prefix"; then
4452     _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4453   else
4454     MAGIC_CMD=:
4455   fi
4456 fi
4457 ])# _LT_PATH_MAGIC
4458
4459
4460 # LT_PATH_LD
4461 # ----------
4462 # find the pathname to the GNU or non-GNU linker
4463 AC_DEFUN([LT_PATH_LD],
4464 [AC_REQUIRE([AC_PROG_CC])dnl
4465 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4466 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4467 m4_require([_LT_DECL_SED])dnl
4468 m4_require([_LT_DECL_EGREP])dnl
4469
4470 AC_ARG_WITH([gnu-ld],
4471     [AS_HELP_STRING([--with-gnu-ld],
4472         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
4473     [test "$withval" = no || with_gnu_ld=yes],
4474     [with_gnu_ld=no])dnl
4475
4476 ac_prog=ld
4477 if test "$GCC" = yes; then
4478   # Check if gcc -print-prog-name=ld gives a path.
4479   AC_MSG_CHECKING([for ld used by $CC])
4480   case $host in
4481   *-*-mingw*)
4482     # gcc leaves a trailing carriage return which upsets mingw
4483     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4484   *)
4485     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4486   esac
4487   case $ac_prog in
4488     # Accept absolute paths.
4489     [[\\/]]* | ?:[[\\/]]*)
4490       re_direlt='/[[^/]][[^/]]*/\.\./'
4491       # Canonicalize the pathname of ld
4492       ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4493       while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4494         ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4495       done
4496       test -z "$LD" && LD="$ac_prog"
4497       ;;
4498   "")
4499     # If it fails, then pretend we aren't using GCC.
4500     ac_prog=ld
4501     ;;
4502   *)
4503     # If it is relative, then search for the first ld in PATH.
4504     with_gnu_ld=unknown
4505     ;;
4506   esac
4507 elif test "$with_gnu_ld" = yes; then
4508   AC_MSG_CHECKING([for GNU ld])
4509 else
4510   AC_MSG_CHECKING([for non-GNU ld])
4511 fi
4512 AC_CACHE_VAL(lt_cv_path_LD,
4513 [if test -z "$LD"; then
4514   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4515   for ac_dir in $PATH; do
4516     IFS="$lt_save_ifs"
4517     test -z "$ac_dir" && ac_dir=.
4518     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4519       lt_cv_path_LD="$ac_dir/$ac_prog"
4520       # Check to see if the program is GNU ld.  I'd rather use --version,
4521       # but apparently some variants of GNU ld only accept -v.
4522       # Break only if it was the GNU/non-GNU ld that we prefer.
4523       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4524       *GNU* | *'with BFD'*)
4525         test "$with_gnu_ld" != no && break
4526         ;;
4527       *)
4528         test "$with_gnu_ld" != yes && break
4529         ;;
4530       esac
4531     fi
4532   done
4533   IFS="$lt_save_ifs"
4534 else
4535   lt_cv_path_LD="$LD" # Let the user override the test with a path.
4536 fi])
4537 LD="$lt_cv_path_LD"
4538 if test -n "$LD"; then
4539   AC_MSG_RESULT($LD)
4540 else
4541   AC_MSG_RESULT(no)
4542 fi
4543 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4544 _LT_PATH_LD_GNU
4545 AC_SUBST([LD])
4546
4547 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4548 ])# LT_PATH_LD
4549
4550 # Old names:
4551 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4552 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4553 dnl aclocal-1.4 backwards compatibility:
4554 dnl AC_DEFUN([AM_PROG_LD], [])
4555 dnl AC_DEFUN([AC_PROG_LD], [])
4556
4557
4558 # _LT_PATH_LD_GNU
4559 #- --------------
4560 m4_defun([_LT_PATH_LD_GNU],
4561 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4562 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
4563 case `$LD -v 2>&1 </dev/null` in
4564 *GNU* | *'with BFD'*)
4565   lt_cv_prog_gnu_ld=yes
4566   ;;
4567 *)
4568   lt_cv_prog_gnu_ld=no
4569   ;;
4570 esac])
4571 with_gnu_ld=$lt_cv_prog_gnu_ld
4572 ])# _LT_PATH_LD_GNU
4573
4574
4575 # _LT_CMD_RELOAD
4576 # --------------
4577 # find reload flag for linker
4578 #   -- PORTME Some linkers may need a different reload flag.
4579 m4_defun([_LT_CMD_RELOAD],
4580 [AC_CACHE_CHECK([for $LD option to reload object files],
4581   lt_cv_ld_reload_flag,
4582   [lt_cv_ld_reload_flag='-r'])
4583 reload_flag=$lt_cv_ld_reload_flag
4584 case $reload_flag in
4585 "" | " "*) ;;
4586 *) reload_flag=" $reload_flag" ;;
4587 esac
4588 reload_cmds='$LD$reload_flag -o $output$reload_objs'
4589 case $host_os in
4590   darwin*)
4591     if test "$GCC" = yes; then
4592       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4593     else
4594       reload_cmds='$LD$reload_flag -o $output$reload_objs'
4595     fi
4596     ;;
4597 esac
4598 _LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4599 _LT_DECL([], [reload_cmds], [2])dnl
4600 ])# _LT_CMD_RELOAD
4601
4602
4603 # _LT_CHECK_MAGIC_METHOD
4604 # ----------------------
4605 # how to check for library dependencies
4606 #  -- PORTME fill in with the dynamic library characteristics
4607 m4_defun([_LT_CHECK_MAGIC_METHOD],
4608 [m4_require([_LT_DECL_EGREP])
4609 m4_require([_LT_DECL_OBJDUMP])
4610 AC_CACHE_CHECK([how to recognize dependent libraries],
4611 lt_cv_deplibs_check_method,
4612 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4613 lt_cv_file_magic_test_file=
4614 lt_cv_deplibs_check_method='unknown'
4615 # Need to set the preceding variable on all platforms that support
4616 # interlibrary dependencies.
4617 # 'none' -- dependencies not supported.
4618 # `unknown' -- same as none, but documents that we really don't know.
4619 # 'pass_all' -- all dependencies passed with no checks.
4620 # 'test_compile' -- check by making test program.
4621 # 'file_magic [[regex]]' -- check by looking for files in library path
4622 # which responds to the $file_magic_cmd with a given extended regex.
4623 # If you have `file' or equivalent on your system and you're not sure
4624 # whether `pass_all' will *always* work, you probably want this one.
4625
4626 case $host_os in
4627 aix[[4-9]]*)
4628   lt_cv_deplibs_check_method=pass_all
4629   ;;
4630
4631 beos*)
4632   lt_cv_deplibs_check_method=pass_all
4633   ;;
4634
4635 bsdi[[45]]*)
4636   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4637   lt_cv_file_magic_cmd='/usr/bin/file -L'
4638   lt_cv_file_magic_test_file=/shlib/libc.so
4639   ;;
4640
4641 cygwin*)
4642   # func_win32_libid is a shell function defined in ltmain.sh
4643   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4644   lt_cv_file_magic_cmd='func_win32_libid'
4645   ;;
4646
4647 mingw* | pw32*)
4648   # Base MSYS/MinGW do not provide the 'file' command needed by
4649   # func_win32_libid shell function, so use a weaker test based on 'objdump',
4650   # unless we find 'file', for example because we are cross-compiling.
4651   if ( file / ) >/dev/null 2>&1; then
4652     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4653     lt_cv_file_magic_cmd='func_win32_libid'
4654   else
4655     lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4656     lt_cv_file_magic_cmd='$OBJDUMP -f'
4657   fi
4658   ;;
4659
4660 cegcc)
4661   # use the weaker test based on 'objdump'. See mingw*.
4662   lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4663   lt_cv_file_magic_cmd='$OBJDUMP -f'
4664   ;;
4665
4666 darwin* | rhapsody*)
4667   lt_cv_deplibs_check_method=pass_all
4668   ;;
4669
4670 freebsd* | dragonfly*)
4671   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4672     case $host_cpu in
4673     i*86 )
4674       # Not sure whether the presence of OpenBSD here was a mistake.
4675       # Let's accept both of them until this is cleared up.
4676       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4677       lt_cv_file_magic_cmd=/usr/bin/file
4678       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4679       ;;
4680     esac
4681   else
4682     lt_cv_deplibs_check_method=pass_all
4683   fi
4684   ;;
4685
4686 gnu*)
4687   lt_cv_deplibs_check_method=pass_all
4688   ;;
4689
4690 hpux10.20* | hpux11*)
4691   lt_cv_file_magic_cmd=/usr/bin/file
4692   case $host_cpu in
4693   ia64*)
4694     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4695     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4696     ;;
4697   hppa*64*)
4698     [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
4699     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4700     ;;
4701   *)
4702     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4703     lt_cv_file_magic_test_file=/usr/lib/libc.sl
4704     ;;
4705   esac
4706   ;;
4707
4708 interix[[3-9]]*)
4709   # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4710   lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4711   ;;
4712
4713 irix5* | irix6* | nonstopux*)
4714   case $LD in
4715   *-32|*"-32 ") libmagic=32-bit;;
4716   *-n32|*"-n32 ") libmagic=N32;;
4717   *-64|*"-64 ") libmagic=64-bit;;
4718   *) libmagic=never-match;;
4719   esac
4720   lt_cv_deplibs_check_method=pass_all
4721   ;;
4722
4723 # This must be Linux ELF.
4724 linux* | k*bsd*-gnu)
4725   lt_cv_deplibs_check_method=pass_all
4726   ;;
4727
4728 netbsd* | netbsdelf*-gnu)
4729   if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4730     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4731   else
4732     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4733   fi
4734   ;;
4735
4736 newos6*)
4737   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4738   lt_cv_file_magic_cmd=/usr/bin/file
4739   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4740   ;;
4741
4742 *nto* | *qnx*)
4743   lt_cv_deplibs_check_method=pass_all
4744   ;;
4745
4746 openbsd*)
4747   if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4748     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4749   else
4750     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4751   fi
4752   ;;
4753
4754 osf3* | osf4* | osf5*)
4755   lt_cv_deplibs_check_method=pass_all
4756   ;;
4757
4758 rdos*)
4759   lt_cv_deplibs_check_method=pass_all
4760   ;;
4761
4762 solaris*)
4763   lt_cv_deplibs_check_method=pass_all
4764   ;;
4765
4766 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4767   lt_cv_deplibs_check_method=pass_all
4768   ;;
4769
4770 sysv4 | sysv4.3*)
4771   case $host_vendor in
4772   motorola)
4773     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
4774     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4775     ;;
4776   ncr)
4777     lt_cv_deplibs_check_method=pass_all
4778     ;;
4779   sequent)
4780     lt_cv_file_magic_cmd='/bin/file'
4781     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4782     ;;
4783   sni)
4784     lt_cv_file_magic_cmd='/bin/file'
4785     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4786     lt_cv_file_magic_test_file=/lib/libc.so
4787     ;;
4788   siemens)
4789     lt_cv_deplibs_check_method=pass_all
4790     ;;
4791   pc)
4792     lt_cv_deplibs_check_method=pass_all
4793     ;;
4794   esac
4795   ;;
4796
4797 tpf*)
4798   lt_cv_deplibs_check_method=pass_all
4799   ;;
4800 esac
4801 ])
4802 file_magic_cmd=$lt_cv_file_magic_cmd
4803 deplibs_check_method=$lt_cv_deplibs_check_method
4804 test -z "$deplibs_check_method" && deplibs_check_method=unknown
4805
4806 _LT_DECL([], [deplibs_check_method], [1],
4807     [Method to check whether dependent libraries are shared objects])
4808 _LT_DECL([], [file_magic_cmd], [1],
4809     [Command to use when deplibs_check_method == "file_magic"])
4810 ])# _LT_CHECK_MAGIC_METHOD
4811
4812
4813 # LT_PATH_NM
4814 # ----------
4815 # find the pathname to a BSD- or MS-compatible name lister
4816 AC_DEFUN([LT_PATH_NM],
4817 [AC_REQUIRE([AC_PROG_CC])dnl
4818 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4819 [if test -n "$NM"; then
4820   # Let the user override the test.
4821   lt_cv_path_NM="$NM"
4822 else
4823   lt_nm_to_check="${ac_tool_prefix}nm"
4824   if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4825     lt_nm_to_check="$lt_nm_to_check nm"
4826   fi
4827   for lt_tmp_nm in $lt_nm_to_check; do
4828     lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4829     for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4830       IFS="$lt_save_ifs"
4831       test -z "$ac_dir" && ac_dir=.
4832       tmp_nm="$ac_dir/$lt_tmp_nm"
4833       if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4834         # Check to see if the nm accepts a BSD-compat flag.
4835         # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4836         #   nm: unknown option "B" ignored
4837         # Tru64's nm complains that /dev/null is an invalid object file
4838         case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4839         */dev/null* | *'Invalid file or object type'*)
4840           lt_cv_path_NM="$tmp_nm -B"
4841           break
4842           ;;
4843         *)
4844           case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4845           */dev/null*)
4846             lt_cv_path_NM="$tmp_nm -p"
4847             break
4848             ;;
4849           *)
4850             lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4851             continue # so that we can try to find one that supports BSD flags
4852             ;;
4853           esac
4854           ;;
4855         esac
4856       fi
4857     done
4858     IFS="$lt_save_ifs"
4859   done
4860   : ${lt_cv_path_NM=no}
4861 fi])
4862 if test "$lt_cv_path_NM" != "no"; then
4863   NM="$lt_cv_path_NM"
4864 else
4865   # Didn't find any BSD compatible name lister, look for dumpbin.
4866   AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
4867   AC_SUBST([DUMPBIN])
4868   if test "$DUMPBIN" != ":"; then
4869     NM="$DUMPBIN"
4870   fi
4871 fi
4872 test -z "$NM" && NM=nm
4873 AC_SUBST([NM])
4874 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4875
4876 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4877   [lt_cv_nm_interface="BSD nm"
4878   echo "int some_variable = 0;" > conftest.$ac_ext
4879   (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4880   (eval "$ac_compile" 2>conftest.err)
4881   cat conftest.err >&AS_MESSAGE_LOG_FD
4882   (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4883   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4884   cat conftest.err >&AS_MESSAGE_LOG_FD
4885   (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
4886   cat conftest.out >&AS_MESSAGE_LOG_FD
4887   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4888     lt_cv_nm_interface="MS dumpbin"
4889   fi
4890   rm -f conftest*])
4891 ])# LT_PATH_NM
4892
4893 # Old names:
4894 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4895 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4896 dnl aclocal-1.4 backwards compatibility:
4897 dnl AC_DEFUN([AM_PROG_NM], [])
4898 dnl AC_DEFUN([AC_PROG_NM], [])
4899
4900
4901 # LT_LIB_M
4902 # --------
4903 # check for math library
4904 AC_DEFUN([LT_LIB_M],
4905 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4906 LIBM=
4907 case $host in
4908 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4909   # These system don't have libm, or don't need it
4910   ;;
4911 *-ncr-sysv4.3*)
4912   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4913   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4914   ;;
4915 *)
4916   AC_CHECK_LIB(m, cos, LIBM="-lm")
4917   ;;
4918 esac
4919 AC_SUBST([LIBM])
4920 ])# LT_LIB_M
4921
4922 # Old name:
4923 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4924 dnl aclocal-1.4 backwards compatibility:
4925 dnl AC_DEFUN([AC_CHECK_LIBM], [])
4926
4927
4928 # _LT_COMPILER_NO_RTTI([TAGNAME])
4929 # -------------------------------
4930 m4_defun([_LT_COMPILER_NO_RTTI],
4931 [m4_require([_LT_TAG_COMPILER])dnl
4932
4933 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4934
4935 if test "$GCC" = yes; then
4936   _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4937
4938   _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4939     lt_cv_prog_compiler_rtti_exceptions,
4940     [-fno-rtti -fno-exceptions], [],
4941     [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4942 fi
4943 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4944         [Compiler flag to turn off builtin functions])
4945 ])# _LT_COMPILER_NO_RTTI
4946
4947
4948 # _LT_CMD_GLOBAL_SYMBOLS
4949 # ----------------------
4950 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4951 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4952 AC_REQUIRE([AC_PROG_CC])dnl
4953 AC_REQUIRE([LT_PATH_NM])dnl
4954 AC_REQUIRE([LT_PATH_LD])dnl
4955 m4_require([_LT_DECL_SED])dnl
4956 m4_require([_LT_DECL_EGREP])dnl
4957 m4_require([_LT_TAG_COMPILER])dnl
4958
4959 # Check for command to grab the raw symbol name followed by C symbol from nm.
4960 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4961 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4962 [
4963 # These are sane defaults that work on at least a few old systems.
4964 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4965
4966 # Character class describing NM global symbol codes.
4967 symcode='[[BCDEGRST]]'
4968
4969 # Regexp to match symbols that can be accessed directly from C.
4970 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4971
4972 # Define system-specific variables.
4973 case $host_os in
4974 aix*)
4975   symcode='[[BCDT]]'
4976   ;;
4977 cygwin* | mingw* | pw32* | cegcc*)
4978   symcode='[[ABCDGISTW]]'
4979   ;;
4980 hpux*)
4981   if test "$host_cpu" = ia64; then
4982     symcode='[[ABCDEGRST]]'
4983   fi
4984   ;;
4985 irix* | nonstopux*)
4986   symcode='[[BCDEGRST]]'
4987   ;;
4988 osf*)
4989   symcode='[[BCDEGQRST]]'
4990   ;;
4991 solaris*)
4992   symcode='[[BDRT]]'
4993   ;;
4994 sco3.2v5*)
4995   symcode='[[DT]]'
4996   ;;
4997 sysv4.2uw2*)
4998   symcode='[[DT]]'
4999   ;;
5000 sysv5* | sco5v6* | unixware* | OpenUNIX*)
5001   symcode='[[ABDT]]'
5002   ;;
5003 sysv4)
5004   symcode='[[DFNSTU]]'
5005   ;;
5006 esac
5007
5008 # If we're using GNU nm, then use its standard symbol codes.
5009 case `$NM -V 2>&1` in
5010 *GNU* | *'with BFD'*)
5011   symcode='[[ABCDGIRSTW]]' ;;
5012 esac
5013
5014 # Transform an extracted symbol line into a proper C declaration.
5015 # Some systems (esp. on ia64) link data and code symbols differently,
5016 # so use this general approach.
5017 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5018
5019 # Transform an extracted symbol line into symbol name and symbol address
5020 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
5021 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
5022
5023 # Handle CRLF in mingw tool chain
5024 opt_cr=
5025 case $build_os in
5026 mingw*)
5027   opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5028   ;;
5029 esac
5030
5031 # Try without a prefix underscore, then with it.
5032 for ac_symprfx in "" "_"; do
5033
5034   # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5035   symxfrm="\\1 $ac_symprfx\\2 \\2"
5036
5037   # Write the raw and C identifiers.
5038   if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5039     # Fake it for dumpbin and say T for any non-static function
5040     # and D for any global variable.
5041     # Also find C++ and __fastcall symbols from MSVC++,
5042     # which start with @ or ?.
5043     lt_cv_sys_global_symbol_pipe="$AWK ['"\
5044 "     {last_section=section; section=\$ 3};"\
5045 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5046 "     \$ 0!~/External *\|/{next};"\
5047 "     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5048 "     {if(hide[section]) next};"\
5049 "     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5050 "     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5051 "     s[1]~/^[@?]/{print s[1], s[1]; next};"\
5052 "     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5053 "     ' prfx=^$ac_symprfx]"
5054   else
5055     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5056   fi
5057
5058   # Check to see that the pipe works correctly.
5059   pipe_works=no
5060
5061   rm -f conftest*
5062   cat > conftest.$ac_ext <<_LT_EOF
5063 #ifdef __cplusplus
5064 extern "C" {
5065 #endif
5066 char nm_test_var;
5067 void nm_test_func(void);
5068 void nm_test_func(void){}
5069 #ifdef __cplusplus
5070 }
5071 #endif
5072 int main(){nm_test_var='a';nm_test_func();return(0);}
5073 _LT_EOF
5074
5075   if AC_TRY_EVAL(ac_compile); then
5076     # Now try to grab the symbols.
5077     nlist=conftest.nm
5078     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5079       # Try sorting and uniquifying the output.
5080       if sort "$nlist" | uniq > "$nlist"T; then
5081         mv -f "$nlist"T "$nlist"
5082       else
5083         rm -f "$nlist"T
5084       fi
5085
5086       # Make sure that we snagged all the symbols we need.
5087       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5088         if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5089           cat <<_LT_EOF > conftest.$ac_ext
5090 #ifdef __cplusplus
5091 extern "C" {
5092 #endif
5093
5094 _LT_EOF
5095           # Now generate the symbol file.
5096           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5097
5098           cat <<_LT_EOF >> conftest.$ac_ext
5099
5100 /* The mapping between symbol names and symbols.  */
5101 const struct {
5102   const char *name;
5103   void       *address;
5104 }
5105 lt__PROGRAM__LTX_preloaded_symbols[[]] =
5106 {
5107   { "@PROGRAM@", (void *) 0 },
5108 _LT_EOF
5109           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5110           cat <<\_LT_EOF >> conftest.$ac_ext
5111   {0, (void *) 0}
5112 };
5113
5114 /* This works around a problem in FreeBSD linker */
5115 #ifdef FREEBSD_WORKAROUND
5116 static const void *lt_preloaded_setup() {
5117   return lt__PROGRAM__LTX_preloaded_symbols;
5118 }
5119 #endif
5120
5121 #ifdef __cplusplus
5122 }
5123 #endif
5124 _LT_EOF
5125           # Now try linking the two files.
5126           mv conftest.$ac_objext conftstm.$ac_objext
5127           lt_save_LIBS="$LIBS"
5128           lt_save_CFLAGS="$CFLAGS"
5129           LIBS="conftstm.$ac_objext"
5130           CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5131           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5132             pipe_works=yes
5133           fi
5134           LIBS="$lt_save_LIBS"
5135           CFLAGS="$lt_save_CFLAGS"
5136         else
5137           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5138         fi
5139       else
5140         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5141       fi
5142     else
5143       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5144     fi
5145   else
5146     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5147     cat conftest.$ac_ext >&5
5148   fi
5149   rm -rf conftest* conftst*
5150
5151   # Do not use the global_symbol_pipe unless it works.
5152   if test "$pipe_works" = yes; then
5153     break
5154   else
5155     lt_cv_sys_global_symbol_pipe=
5156   fi
5157 done
5158 ])
5159 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5160   lt_cv_sys_global_symbol_to_cdecl=
5161 fi
5162 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5163   AC_MSG_RESULT(failed)
5164 else
5165   AC_MSG_RESULT(ok)
5166 fi
5167
5168 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5169     [Take the output of nm and produce a listing of raw symbols and C names])
5170 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5171     [Transform the output of nm in a proper C declaration])
5172 _LT_DECL([global_symbol_to_c_name_address],
5173     [lt_cv_sys_global_symbol_to_c_name_address], [1],
5174     [Transform the output of nm in a C name address pair])
5175 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5176     [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5177     [Transform the output of nm in a C name address pair when lib prefix is needed])
5178 ]) # _LT_CMD_GLOBAL_SYMBOLS
5179
5180
5181 # _LT_COMPILER_PIC([TAGNAME])
5182 # ---------------------------
5183 m4_defun([_LT_COMPILER_PIC],
5184 [m4_require([_LT_TAG_COMPILER])dnl
5185 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
5186 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5187 _LT_TAGVAR(lt_prog_compiler_static, $1)=
5188
5189 AC_MSG_CHECKING([for $compiler option to produce PIC])
5190 m4_if([$1], [CXX], [
5191   # C++ specific cases for pic, static, wl, etc.
5192   if test "$GXX" = yes; then
5193     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5194     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5195
5196     case $host_os in
5197     aix*)
5198       # All AIX code is PIC.
5199       if test "$host_cpu" = ia64; then
5200         # AIX 5 now supports IA64 processor
5201         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5202       fi
5203       ;;
5204
5205     amigaos*)
5206       case $host_cpu in
5207       powerpc)
5208             # see comment about AmigaOS4 .so support
5209             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5210         ;;
5211       m68k)
5212             # FIXME: we need at least 68020 code to build shared libraries, but
5213             # adding the `-m68020' flag to GCC prevents building anything better,
5214             # like `-m68040'.
5215             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5216         ;;
5217       esac
5218       ;;
5219
5220     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5221       # PIC is the default for these OSes.
5222       ;;
5223     mingw* | cygwin* | os2* | pw32* | cegcc*)
5224       # This hack is so that the source file can tell whether it is being
5225       # built for inclusion in a dll (and should export symbols for example).
5226       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5227       # (--disable-auto-import) libraries
5228       m4_if([$1], [GCJ], [],
5229         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5230       ;;
5231     darwin* | rhapsody*)
5232       # PIC is the default on this platform
5233       # Common symbols not allowed in MH_DYLIB files
5234       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5235       ;;
5236     *djgpp*)
5237       # DJGPP does not support shared libraries at all
5238       _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5239       ;;
5240     interix[[3-9]]*)
5241       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5242       # Instead, we relocate shared libraries at runtime.
5243       ;;
5244     sysv4*MP*)
5245       if test -d /usr/nec; then
5246         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5247       fi
5248       ;;
5249     hpux*)
5250       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5251       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5252       # sets the default TLS model and affects inlining.
5253       case $host_cpu in
5254       hppa*64*)
5255         ;;
5256       *)
5257         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5258         ;;
5259       esac
5260       ;;
5261     *qnx* | *nto*)
5262       # QNX uses GNU C++, but need to define -shared option too, otherwise
5263       # it will coredump.
5264       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5265       ;;
5266     *)
5267       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5268       ;;
5269     esac
5270   else
5271     case $host_os in
5272       aix[[4-9]]*)
5273         # All AIX code is PIC.
5274         if test "$host_cpu" = ia64; then
5275           # AIX 5 now supports IA64 processor
5276           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5277         else
5278           _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5279         fi
5280         ;;
5281       chorus*)
5282         case $cc_basename in
5283         cxch68*)
5284           # Green Hills C++ Compiler
5285           # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5286           ;;
5287         esac
5288         ;;
5289       dgux*)
5290         case $cc_basename in
5291           ec++*)
5292             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5293             ;;
5294           ghcx*)
5295             # Green Hills C++ Compiler
5296             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5297             ;;
5298           *)
5299             ;;
5300         esac
5301         ;;
5302       freebsd* | dragonfly*)
5303         # FreeBSD uses GNU C++
5304         ;;
5305       hpux9* | hpux10* | hpux11*)
5306         case $cc_basename in
5307           CC*)
5308             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5309             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5310             if test "$host_cpu" != ia64; then
5311               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5312             fi
5313             ;;
5314           aCC*)
5315             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5316             _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5317             case $host_cpu in
5318             hppa*64*|ia64*)
5319               # +Z the default
5320               ;;
5321             *)
5322               _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5323               ;;
5324             esac
5325             ;;
5326           *)
5327             ;;
5328         esac
5329         ;;
5330       interix*)
5331         # This is c89, which is MS Visual C++ (no shared libs)
5332         # Anyone wants to do a port?
5333         ;;
5334       irix5* | irix6* | nonstopux*)
5335         case $cc_basename in
5336           CC*)
5337             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5338             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5339             # CC pic flag -KPIC is the default.
5340             ;;
5341           *)
5342             ;;
5343         esac
5344         ;;
5345       linux* | k*bsd*-gnu)
5346         case $cc_basename in
5347           KCC*)
5348             # KAI C++ Compiler
5349             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5350             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5351             ;;
5352           ecpc* )
5353             # old Intel C++ for x86_64 which still supported -KPIC.
5354             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5355             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5356             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5357             ;;
5358           icpc* )
5359             # Intel C++, used to be incompatible with GCC.
5360             # ICC 10 doesn't accept -KPIC any more.
5361             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5362             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5363             _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5364             ;;
5365           pgCC* | pgcpp*)
5366             # Portland Group C++ compiler
5367             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5368             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5369             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5370             ;;
5371           cxx*)
5372             # Compaq C++
5373             # Make sure the PIC flag is empty.  It appears that all Alpha
5374             # Linux and Compaq Tru64 Unix objects are PIC.
5375             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5376             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5377             ;;
5378           xlc* | xlC*)
5379             # IBM XL 8.0 on PPC
5380             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5381             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5382             _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5383             ;;
5384           *)
5385             case `$CC -V 2>&1 | sed 5q` in
5386             *Sun\ C*)
5387               # Sun C++ 5.9
5388               _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5389               _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5390               _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5391               ;;
5392             esac
5393             ;;
5394         esac
5395         ;;
5396       lynxos*)
5397         ;;
5398       m88k*)
5399         ;;
5400       mvs*)
5401         case $cc_basename in
5402           cxx*)
5403             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5404             ;;
5405           *)
5406             ;;
5407         esac
5408         ;;
5409       netbsd* | netbsdelf*-gnu)
5410         ;;
5411       *qnx* | *nto*)
5412         # QNX uses GNU C++, but need to define -shared option too, otherwise
5413         # it will coredump.
5414         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5415         ;;
5416       osf3* | osf4* | osf5*)
5417         case $cc_basename in
5418           KCC*)
5419             _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5420             ;;
5421           RCC*)
5422             # Rational C++ 2.4.1
5423             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5424             ;;
5425           cxx*)
5426             # Digital/Compaq C++
5427             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5428             # Make sure the PIC flag is empty.  It appears that all Alpha
5429             # Linux and Compaq Tru64 Unix objects are PIC.
5430             _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5431             _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5432             ;;
5433           *)
5434             ;;
5435         esac
5436         ;;
5437       psos*)
5438         ;;
5439       solaris*)
5440         case $cc_basename in
5441           CC*)
5442             # Sun C++ 4.2, 5.x and Centerline C++
5443             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5444             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5445             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5446             ;;
5447           gcx*)
5448             # Green Hills C++ Compiler
5449             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5450             ;;
5451           *)
5452             ;;
5453         esac
5454         ;;
5455       sunos4*)
5456         case $cc_basename in
5457           CC*)
5458             # Sun C++ 4.x
5459             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5460             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5461             ;;
5462           lcc*)
5463             # Lucid
5464             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5465             ;;
5466           *)
5467             ;;
5468         esac
5469         ;;
5470       sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5471         case $cc_basename in
5472           CC*)
5473             _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5474             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5475             _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5476             ;;
5477         esac
5478         ;;
5479       tandem*)
5480         case $cc_basename in
5481           NCC*)
5482             # NonStop-UX NCC 3.20
5483             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5484             ;;
5485           *)
5486             ;;
5487         esac
5488         ;;
5489       vxworks*)
5490         ;;
5491       *)
5492         _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5493         ;;
5494     esac
5495   fi
5496 ],
5497 [
5498   if test "$GCC" = yes; then
5499     _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5500     _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5501
5502     case $host_os in
5503       aix*)
5504       # All AIX code is PIC.
5505       if test "$host_cpu" = ia64; then
5506         # AIX 5 now supports IA64 processor
5507         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5508       fi
5509       ;;
5510
5511     amigaos*)
5512       case $host_cpu in
5513       powerpc)
5514             # see comment about AmigaOS4 .so support
5515             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5516         ;;
5517       m68k)
5518             # FIXME: we need at least 68020 code to build shared libraries, but
5519             # adding the `-m68020' flag to GCC prevents building anything better,
5520             # like `-m68040'.
5521             _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5522         ;;
5523       esac
5524       ;;
5525
5526     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5527       # PIC is the default for these OSes.
5528       ;;
5529
5530     mingw* | cygwin* | pw32* | os2* | cegcc*)
5531       # This hack is so that the source file can tell whether it is being
5532       # built for inclusion in a dll (and should export symbols for example).
5533       # Although the cygwin gcc ignores -fPIC, still need this for old-style
5534       # (--disable-auto-import) libraries
5535       m4_if([$1], [GCJ], [],
5536         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5537       ;;
5538
5539     darwin* | rhapsody*)
5540       # PIC is the default on this platform
5541       # Common symbols not allowed in MH_DYLIB files
5542       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5543       ;;
5544
5545     hpux*)
5546       # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5547       # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5548       # sets the default TLS model and affects inlining.
5549       case $host_cpu in
5550       hppa*64*)
5551         # +Z the default
5552         ;;
5553       *)
5554         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5555         ;;
5556       esac
5557       ;;
5558
5559     interix[[3-9]]*)
5560       # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5561       # Instead, we relocate shared libraries at runtime.
5562       ;;
5563
5564     msdosdjgpp*)
5565       # Just because we use GCC doesn't mean we suddenly get shared libraries
5566       # on systems that don't support them.
5567       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5568       enable_shared=no
5569       ;;
5570
5571     *nto* | *qnx*)
5572       # QNX uses GNU C++, but need to define -shared option too, otherwise
5573       # it will coredump.
5574       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5575       ;;
5576
5577     sysv4*MP*)
5578       if test -d /usr/nec; then
5579         _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5580       fi
5581       ;;
5582
5583     *)
5584       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5585       ;;
5586     esac
5587   else
5588     # PORTME Check for flag to pass linker flags through the system compiler.
5589     case $host_os in
5590     aix*)
5591       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5592       if test "$host_cpu" = ia64; then
5593         # AIX 5 now supports IA64 processor
5594         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5595       else
5596         _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5597       fi
5598       ;;
5599
5600     mingw* | cygwin* | pw32* | os2* | cegcc*)
5601       # This hack is so that the source file can tell whether it is being
5602       # built for inclusion in a dll (and should export symbols for example).
5603       m4_if([$1], [GCJ], [],
5604         [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5605       ;;
5606
5607     hpux9* | hpux10* | hpux11*)
5608       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5609       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5610       # not for PA HP-UX.
5611       case $host_cpu in
5612       hppa*64*|ia64*)
5613         # +Z the default
5614         ;;
5615       *)
5616         _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5617         ;;
5618       esac
5619       # Is there a better lt_prog_compiler_static that works with the bundled CC?
5620       _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5621       ;;
5622
5623     irix5* | irix6* | nonstopux*)
5624       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5625       # PIC (with -KPIC) is the default.
5626       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5627       ;;
5628
5629     linux* | k*bsd*-gnu)
5630       case $cc_basename in
5631       # old Intel for x86_64 which still supported -KPIC.
5632       ecc*)
5633         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5634         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5635         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5636         ;;
5637       # icc used to be incompatible with GCC.
5638       # ICC 10 doesn't accept -KPIC any more.
5639       icc* | ifort*)
5640         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5641         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5642         _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5643         ;;
5644       # Lahey Fortran 8.1.
5645       lf95*)
5646         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5647         _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5648         _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5649         ;;
5650       pgcc* | pgf77* | pgf90* | pgf95*)
5651         # Portland Group compilers (*not* the Pentium gcc compiler,
5652         # which looks to be a dead project)
5653         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5654         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5655         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5656         ;;
5657       ccc*)
5658         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5659         # All Alpha code is PIC.
5660         _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5661         ;;
5662       xl*)
5663         # IBM XL C 8.0/Fortran 10.1 on PPC
5664         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5665         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5666         _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5667         ;;
5668       *)
5669         case `$CC -V 2>&1 | sed 5q` in
5670         *Sun\ C*)
5671           # Sun C 5.9
5672           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5673           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5674           _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5675           ;;
5676         *Sun\ F*)
5677           # Sun Fortran 8.3 passes all unrecognized flags to the linker
5678           _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5679           _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5680           _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5681           ;;
5682         esac
5683         ;;
5684       esac
5685       ;;
5686
5687     newsos6)
5688       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5689       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5690       ;;
5691
5692     *nto* | *qnx*)
5693       # QNX uses GNU C++, but need to define -shared option too, otherwise
5694       # it will coredump.
5695       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5696       ;;
5697
5698     osf3* | osf4* | osf5*)
5699       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5700       # All OSF/1 code is PIC.
5701       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5702       ;;
5703
5704     rdos*)
5705       _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5706       ;;
5707
5708     solaris*)
5709       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5710       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5711       case $cc_basename in
5712       f77* | f90* | f95*)
5713         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5714       *)
5715         _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5716       esac
5717       ;;
5718
5719     sunos4*)
5720       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5721       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5722       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5723       ;;
5724
5725     sysv4 | sysv4.2uw2* | sysv4.3*)
5726       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5727       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5728       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5729       ;;
5730
5731     sysv4*MP*)
5732       if test -d /usr/nec ;then
5733         _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5734         _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5735       fi
5736       ;;
5737
5738     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5739       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5740       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5741       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5742       ;;
5743
5744     unicos*)
5745       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5746       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5747       ;;
5748
5749     uts4*)
5750       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5751       _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5752       ;;
5753
5754     *)
5755       _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5756       ;;
5757     esac
5758   fi
5759 ])
5760 case $host_os in
5761   # For platforms which do not support PIC, -DPIC is meaningless:
5762   *djgpp*)
5763     _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5764     ;;
5765   *)
5766     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5767     ;;
5768 esac
5769 AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5770 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5771         [How to pass a linker flag through the compiler])
5772
5773 #
5774 # Check to make sure the PIC flag actually works.
5775 #
5776 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5777   _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5778     [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5779     [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5780     [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5781      "" | " "*) ;;
5782      *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5783      esac],
5784     [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5785      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5786 fi
5787 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5788         [Additional compiler flags for building library objects])
5789
5790 #
5791 # Check to make sure the static flag actually works.
5792 #
5793 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5794 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5795   _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5796   $lt_tmp_static_flag,
5797   [],
5798   [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5799 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5800         [Compiler flag to prevent dynamic linking])
5801 ])# _LT_COMPILER_PIC
5802
5803
5804 # _LT_LINKER_SHLIBS([TAGNAME])
5805 # ----------------------------
5806 # See if the linker supports building shared libraries.
5807 m4_defun([_LT_LINKER_SHLIBS],
5808 [AC_REQUIRE([LT_PATH_LD])dnl
5809 AC_REQUIRE([LT_PATH_NM])dnl
5810 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5811 m4_require([_LT_DECL_EGREP])dnl
5812 m4_require([_LT_DECL_SED])dnl
5813 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5814 m4_require([_LT_TAG_COMPILER])dnl
5815 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5816 m4_if([$1], [CXX], [
5817   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5818   case $host_os in
5819   aix[[4-9]]*)
5820     # If we're using GNU nm, then we don't want the "-C" option.
5821     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5822     if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5823       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5824     else
5825       _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5826     fi
5827     ;;
5828   pw32*)
5829     _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5830   ;;
5831   cygwin* | mingw* | cegcc*)
5832     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5833   ;;
5834   linux* | k*bsd*-gnu)
5835     _LT_TAGVAR(link_all_deplibs, $1)=no
5836   ;;
5837   *)
5838     _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5839   ;;
5840   esac
5841   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5842 ], [
5843   runpath_var=
5844   _LT_TAGVAR(allow_undefined_flag, $1)=
5845   _LT_TAGVAR(always_export_symbols, $1)=no
5846   _LT_TAGVAR(archive_cmds, $1)=
5847   _LT_TAGVAR(archive_expsym_cmds, $1)=
5848   _LT_TAGVAR(compiler_needs_object, $1)=no
5849   _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5850   _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5851   _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5852   _LT_TAGVAR(hardcode_automatic, $1)=no
5853   _LT_TAGVAR(hardcode_direct, $1)=no
5854   _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5855   _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5856   _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5857   _LT_TAGVAR(hardcode_libdir_separator, $1)=
5858   _LT_TAGVAR(hardcode_minus_L, $1)=no
5859   _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5860   _LT_TAGVAR(inherit_rpath, $1)=no
5861   _LT_TAGVAR(link_all_deplibs, $1)=unknown
5862   _LT_TAGVAR(module_cmds, $1)=
5863   _LT_TAGVAR(module_expsym_cmds, $1)=
5864   _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5865   _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5866   _LT_TAGVAR(thread_safe_flag_spec, $1)=
5867   _LT_TAGVAR(whole_archive_flag_spec, $1)=
5868   # include_expsyms should be a list of space-separated symbols to be *always*
5869   # included in the symbol list
5870   _LT_TAGVAR(include_expsyms, $1)=
5871   # exclude_expsyms can be an extended regexp of symbols to exclude
5872   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5873   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5874   # as well as any symbol that contains `d'.
5875   _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5876   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5877   # platforms (ab)use it in PIC code, but their linkers get confused if
5878   # the symbol is explicitly referenced.  Since portable code cannot
5879   # rely on this symbol name, it's probably fine to never include it in
5880   # preloaded symbol tables.
5881   # Exclude shared library initialization/finalization symbols.
5882 dnl Note also adjust exclude_expsyms for C++ above.
5883   extract_expsyms_cmds=
5884
5885   case $host_os in
5886   cygwin* | mingw* | pw32* | cegcc*)
5887     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5888     # When not using gcc, we currently assume that we are using
5889     # Microsoft Visual C++.
5890     if test "$GCC" != yes; then
5891       with_gnu_ld=no
5892     fi
5893     ;;
5894   interix*)
5895     # we just hope/assume this is gcc and not c89 (= MSVC++)
5896     with_gnu_ld=yes
5897     ;;
5898   openbsd*)
5899     with_gnu_ld=no
5900     ;;
5901   linux* | k*bsd*-gnu)
5902     _LT_TAGVAR(link_all_deplibs, $1)=no
5903     ;;
5904   esac
5905
5906   _LT_TAGVAR(ld_shlibs, $1)=yes
5907   if test "$with_gnu_ld" = yes; then
5908     # If archive_cmds runs LD, not CC, wlarc should be empty
5909     wlarc='${wl}'
5910
5911     # Set some defaults for GNU ld with shared library support. These
5912     # are reset later if shared libraries are not supported. Putting them
5913     # here allows them to be overridden if necessary.
5914     runpath_var=LD_RUN_PATH
5915     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5916     _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5917     # ancient GNU ld didn't support --whole-archive et. al.
5918     if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5919       _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5920     else
5921       _LT_TAGVAR(whole_archive_flag_spec, $1)=
5922     fi
5923     supports_anon_versioning=no
5924     case `$LD -v 2>&1` in
5925       *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5926       *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5927       *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5928       *\ 2.11.*) ;; # other 2.11 versions
5929       *) supports_anon_versioning=yes ;;
5930     esac
5931
5932     # See if GNU ld supports shared libraries.
5933     case $host_os in
5934     aix[[3-9]]*)
5935       # On AIX/PPC, the GNU linker is very broken
5936       if test "$host_cpu" != ia64; then
5937         _LT_TAGVAR(ld_shlibs, $1)=no
5938         cat <<_LT_EOF 1>&2
5939
5940 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5941 *** to be unable to reliably create shared libraries on AIX.
5942 *** Therefore, libtool is disabling shared libraries support.  If you
5943 *** really care for shared libraries, you may want to modify your PATH
5944 *** so that a non-GNU linker is found, and then restart.
5945
5946 _LT_EOF
5947       fi
5948       ;;
5949
5950     amigaos*)
5951       case $host_cpu in
5952       powerpc)
5953             # see comment about AmigaOS4 .so support
5954             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5955             _LT_TAGVAR(archive_expsym_cmds, $1)=''
5956         ;;
5957       m68k)
5958             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5959             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5960             _LT_TAGVAR(hardcode_minus_L, $1)=yes
5961         ;;
5962       esac
5963       ;;
5964
5965     beos*)
5966       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5967         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5968         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5969         # support --undefined.  This deserves some investigation.  FIXME
5970         _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5971       else
5972         _LT_TAGVAR(ld_shlibs, $1)=no
5973       fi
5974       ;;
5975
5976     cygwin* | mingw* | pw32* | cegcc*)
5977       # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5978       # as there is no search path for DLLs.
5979       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5980       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5981       _LT_TAGVAR(always_export_symbols, $1)=no
5982       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5983       _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5984
5985       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5986         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5987         # If the export-symbols file already is a .def file (1st line
5988         # is EXPORTS), use it as is; otherwise, prepend...
5989         _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5990           cp $export_symbols $output_objdir/$soname.def;
5991         else
5992           echo EXPORTS > $output_objdir/$soname.def;
5993           cat $export_symbols >> $output_objdir/$soname.def;
5994         fi~
5995         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5996       else
5997         _LT_TAGVAR(ld_shlibs, $1)=no
5998       fi
5999       ;;
6000
6001     interix[[3-9]]*)
6002       _LT_TAGVAR(hardcode_direct, $1)=no
6003       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6004       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6005       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6006       # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6007       # Instead, shared libraries are loaded at an image base (0x10000000 by
6008       # default) and relocated if they conflict, which is a slow very memory
6009       # consuming and fragmenting process.  To avoid this, we pick a random,
6010       # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6011       # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6012       _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6013       _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6014       ;;
6015
6016     gnu* | linux* | tpf* | k*bsd*-gnu)
6017       tmp_diet=no
6018       if test "$host_os" = linux-dietlibc; then
6019         case $cc_basename in
6020           diet\ *) tmp_diet=yes;;       # linux-dietlibc with static linking (!diet-dyn)
6021         esac
6022       fi
6023       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6024          && test "$tmp_diet" = no
6025       then
6026         tmp_addflag=
6027         tmp_sharedflag='-shared'
6028         case $cc_basename,$host_cpu in
6029         pgcc*)                          # Portland Group C compiler
6030           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6031           tmp_addflag=' $pic_flag'
6032           ;;
6033         pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
6034           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6035           tmp_addflag=' $pic_flag -Mnomain' ;;
6036         ecc*,ia64* | icc*,ia64*)        # Intel C compiler on ia64
6037           tmp_addflag=' -i_dynamic' ;;
6038         efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
6039           tmp_addflag=' -i_dynamic -nofor_main' ;;
6040         ifc* | ifort*)                  # Intel Fortran compiler
6041           tmp_addflag=' -nofor_main' ;;
6042         lf95*)                          # Lahey Fortran 8.1
6043           _LT_TAGVAR(whole_archive_flag_spec, $1)=
6044           tmp_sharedflag='--shared' ;;
6045         xl[[cC]]*)                      # IBM XL C 8.0 on PPC (deal with xlf below)
6046           tmp_sharedflag='-qmkshrobj'
6047           tmp_addflag= ;;
6048         esac
6049         case `$CC -V 2>&1 | sed 5q` in
6050         *Sun\ C*)                       # Sun C 5.9
6051           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6052           _LT_TAGVAR(compiler_needs_object, $1)=yes
6053           tmp_sharedflag='-G' ;;
6054         *Sun\ F*)                       # Sun Fortran 8.3
6055           tmp_sharedflag='-G' ;;
6056         esac
6057         _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6058
6059         if test "x$supports_anon_versioning" = xyes; then
6060           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6061             cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6062             echo "local: *; };" >> $output_objdir/$libname.ver~
6063             $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6064         fi
6065
6066         case $cc_basename in
6067         xlf*)
6068           # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6069           _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6070           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6071           _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6072           _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
6073           if test "x$supports_anon_versioning" = xyes; then
6074             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6075               cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6076               echo "local: *; };" >> $output_objdir/$libname.ver~
6077               $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6078           fi
6079           ;;
6080         esac
6081       else
6082         _LT_TAGVAR(ld_shlibs, $1)=no
6083       fi
6084       ;;
6085
6086     netbsd* | netbsdelf*-gnu)
6087       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6088         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6089         wlarc=
6090       else
6091         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6092         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6093       fi
6094       ;;
6095
6096     solaris*)
6097       if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6098         _LT_TAGVAR(ld_shlibs, $1)=no
6099         cat <<_LT_EOF 1>&2
6100
6101 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
6102 *** create shared libraries on Solaris systems.  Therefore, libtool
6103 *** is disabling shared libraries support.  We urge you to upgrade GNU
6104 *** binutils to release 2.9.1 or newer.  Another option is to modify
6105 *** your PATH or compiler configuration so that the native linker is
6106 *** used, and then restart.
6107
6108 _LT_EOF
6109       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6110         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6111         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6112       else
6113         _LT_TAGVAR(ld_shlibs, $1)=no
6114       fi
6115       ;;
6116
6117     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6118       case `$LD -v 2>&1` in
6119         *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6120         _LT_TAGVAR(ld_shlibs, $1)=no
6121         cat <<_LT_EOF 1>&2
6122
6123 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6124 *** reliably create shared libraries on SCO systems.  Therefore, libtool
6125 *** is disabling shared libraries support.  We urge you to upgrade GNU
6126 *** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6127 *** your PATH or compiler configuration so that the native linker is
6128 *** used, and then restart.
6129
6130 _LT_EOF
6131         ;;
6132         *)
6133           # For security reasons, it is highly recommended that you always
6134           # use absolute paths for naming shared libraries, and exclude the
6135           # DT_RUNPATH tag from executables and libraries.  But doing so
6136           # requires that you compile everything twice, which is a pain.
6137           if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6138             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6139             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6140             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6141           else
6142             _LT_TAGVAR(ld_shlibs, $1)=no
6143           fi
6144         ;;
6145       esac
6146       ;;
6147
6148     sunos4*)
6149       _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6150       wlarc=
6151       _LT_TAGVAR(hardcode_direct, $1)=yes
6152       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6153       ;;
6154
6155     *)
6156       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6157         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6158         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6159       else
6160         _LT_TAGVAR(ld_shlibs, $1)=no
6161       fi
6162       ;;
6163     esac
6164
6165     if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6166       runpath_var=
6167       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6168       _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6169       _LT_TAGVAR(whole_archive_flag_spec, $1)=
6170     fi
6171   else
6172     # PORTME fill in a description of your system's linker (not GNU ld)
6173     case $host_os in
6174     aix3*)
6175       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6176       _LT_TAGVAR(always_export_symbols, $1)=yes
6177       _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
6178       # Note: this linker hardcodes the directories in LIBPATH if there
6179       # are no directories specified by -L.
6180       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6181       if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6182         # Neither direct hardcoding nor static linking is supported with a
6183         # broken collect2.
6184         _LT_TAGVAR(hardcode_direct, $1)=unsupported
6185       fi
6186       ;;
6187
6188     aix[[4-9]]*)
6189       if test "$host_cpu" = ia64; then
6190         # On IA64, the linker does run time linking by default, so we don't
6191         # have to do anything special.
6192         aix_use_runtimelinking=no
6193         exp_sym_flag='-Bexport'
6194         no_entry_flag=""
6195       else
6196         # If we're using GNU nm, then we don't want the "-C" option.
6197         # -C means demangle to AIX nm, but means don't demangle with GNU nm
6198         if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6199           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6200         else
6201           _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6202         fi
6203         aix_use_runtimelinking=no
6204
6205         # Test if we are trying to use run time linking or normal
6206         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6207         # need to do runtime linking.
6208         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6209           for ld_flag in $LDFLAGS; do
6210           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6211             aix_use_runtimelinking=yes
6212             break
6213           fi
6214           done
6215           ;;
6216         esac
6217
6218         exp_sym_flag='-bexport'
6219         no_entry_flag='-bnoentry'
6220       fi
6221
6222       # When large executables or shared objects are built, AIX ld can
6223       # have problems creating the table of contents.  If linking a library
6224       # or program results in "error TOC overflow" add -mminimal-toc to
6225       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6226       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6227
6228       _LT_TAGVAR(archive_cmds, $1)=''
6229       _LT_TAGVAR(hardcode_direct, $1)=yes
6230       _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6231       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6232       _LT_TAGVAR(link_all_deplibs, $1)=yes
6233       _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6234
6235       if test "$GCC" = yes; then
6236         case $host_os in aix4.[[012]]|aix4.[[012]].*)
6237         # We only want to do this on AIX 4.2 and lower, the check
6238         # below for broken collect2 doesn't work under 4.3+
6239           collect2name=`${CC} -print-prog-name=collect2`
6240           if test -f "$collect2name" &&
6241            strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6242           then
6243           # We have reworked collect2
6244           :
6245           else
6246           # We have old collect2
6247           _LT_TAGVAR(hardcode_direct, $1)=unsupported
6248           # It fails to find uninstalled libraries when the uninstalled
6249           # path is not listed in the libpath.  Setting hardcode_minus_L
6250           # to unsupported forces relinking
6251           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6252           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6253           _LT_TAGVAR(hardcode_libdir_separator, $1)=
6254           fi
6255           ;;
6256         esac
6257         shared_flag='-shared'
6258         if test "$aix_use_runtimelinking" = yes; then
6259           shared_flag="$shared_flag "'${wl}-G'
6260         fi
6261         _LT_TAGVAR(link_all_deplibs, $1)=no
6262       else
6263         # not using gcc
6264         if test "$host_cpu" = ia64; then
6265         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6266         # chokes on -Wl,-G. The following line is correct:
6267           shared_flag='-G'
6268         else
6269           if test "$aix_use_runtimelinking" = yes; then
6270             shared_flag='${wl}-G'
6271           else
6272             shared_flag='${wl}-bM:SRE'
6273           fi
6274         fi
6275       fi
6276
6277       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6278       # It seems that -bexpall does not export symbols beginning with
6279       # underscore (_), so it is better to generate a list of symbols to export.
6280       _LT_TAGVAR(always_export_symbols, $1)=yes
6281       if test "$aix_use_runtimelinking" = yes; then
6282         # Warning - without using the other runtime loading flags (-brtl),
6283         # -berok will link without error, but may produce a broken library.
6284         _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6285         # Determine the default libpath from the value encoded in an
6286         # empty executable.
6287         _LT_SYS_MODULE_PATH_AIX
6288         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6289         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6290       else
6291         if test "$host_cpu" = ia64; then
6292           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6293           _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6294           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6295         else
6296          # Determine the default libpath from the value encoded in an
6297          # empty executable.
6298          _LT_SYS_MODULE_PATH_AIX
6299          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6300           # Warning - without using the other run time loading flags,
6301           # -berok will link without error, but may produce a broken library.
6302           _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6303           _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6304           # Exported symbols can be pulled into shared objects from archives
6305           _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6306           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6307           # This is similar to how AIX traditionally builds its shared libraries.
6308           _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6309         fi
6310       fi
6311       ;;
6312
6313     amigaos*)
6314       case $host_cpu in
6315       powerpc)
6316             # see comment about AmigaOS4 .so support
6317             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6318             _LT_TAGVAR(archive_expsym_cmds, $1)=''
6319         ;;
6320       m68k)
6321             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6322             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6323             _LT_TAGVAR(hardcode_minus_L, $1)=yes
6324         ;;
6325       esac
6326       ;;
6327
6328     bsdi[[45]]*)
6329       _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6330       ;;
6331
6332     cygwin* | mingw* | pw32* | cegcc*)
6333       # When not using gcc, we currently assume that we are using
6334       # Microsoft Visual C++.
6335       # hardcode_libdir_flag_spec is actually meaningless, as there is
6336       # no search path for DLLs.
6337       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6338       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6339       # Tell ltmain to make .lib files, not .a files.
6340       libext=lib
6341       # Tell ltmain to make .dll files, not .so files.
6342       shrext_cmds=".dll"
6343       # FIXME: Setting linknames here is a bad hack.
6344       _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
6345       # The linker will automatically build a .lib file if we build a DLL.
6346       _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6347       # FIXME: Should let the user specify the lib program.
6348       _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6349       _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6350       _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6351       ;;
6352
6353     darwin* | rhapsody*)
6354       _LT_DARWIN_LINKER_FEATURES($1)
6355       ;;
6356
6357     dgux*)
6358       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6359       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6360       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6361       ;;
6362
6363     freebsd1*)
6364       _LT_TAGVAR(ld_shlibs, $1)=no
6365       ;;
6366
6367     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6368     # support.  Future versions do this automatically, but an explicit c++rt0.o
6369     # does not break anything, and helps significantly (at the cost of a little
6370     # extra space).
6371     freebsd2.2*)
6372       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6373       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6374       _LT_TAGVAR(hardcode_direct, $1)=yes
6375       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6376       ;;
6377
6378     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6379     freebsd2*)
6380       _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6381       _LT_TAGVAR(hardcode_direct, $1)=yes
6382       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6383       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6384       ;;
6385
6386     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6387     freebsd* | dragonfly*)
6388       _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6389       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6390       _LT_TAGVAR(hardcode_direct, $1)=yes
6391       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6392       ;;
6393
6394     hpux9*)
6395       if test "$GCC" = yes; then
6396         _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6397       else
6398         _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6399       fi
6400       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6401       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6402       _LT_TAGVAR(hardcode_direct, $1)=yes
6403
6404       # hardcode_minus_L: Not really in the search PATH,
6405       # but as the default location of the library.
6406       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6407       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6408       ;;
6409
6410     hpux10*)
6411       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6412         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6413       else
6414         _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6415       fi
6416       if test "$with_gnu_ld" = no; then
6417         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6418         _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6419         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6420         _LT_TAGVAR(hardcode_direct, $1)=yes
6421         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6422         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6423         # hardcode_minus_L: Not really in the search PATH,
6424         # but as the default location of the library.
6425         _LT_TAGVAR(hardcode_minus_L, $1)=yes
6426       fi
6427       ;;
6428
6429     hpux11*)
6430       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6431         case $host_cpu in
6432         hppa*64*)
6433           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6434           ;;
6435         ia64*)
6436           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6437           ;;
6438         *)
6439           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6440           ;;
6441         esac
6442       else
6443         case $host_cpu in
6444         hppa*64*)
6445           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6446           ;;
6447         ia64*)
6448           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6449           ;;
6450         *)
6451           _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6452           ;;
6453         esac
6454       fi
6455       if test "$with_gnu_ld" = no; then
6456         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6457         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6458
6459         case $host_cpu in
6460         hppa*64*|ia64*)
6461           _LT_TAGVAR(hardcode_direct, $1)=no
6462           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6463           ;;
6464         *)
6465           _LT_TAGVAR(hardcode_direct, $1)=yes
6466           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6467           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6468
6469           # hardcode_minus_L: Not really in the search PATH,
6470           # but as the default location of the library.
6471           _LT_TAGVAR(hardcode_minus_L, $1)=yes
6472           ;;
6473         esac
6474       fi
6475       ;;
6476
6477     irix5* | irix6* | nonstopux*)
6478       if test "$GCC" = yes; then
6479         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6480         # Try to use the -exported_symbol ld option, if it does not
6481         # work, assume that -exports_file does not work either and
6482         # implicitly export all symbols.
6483         save_LDFLAGS="$LDFLAGS"
6484         LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6485         AC_LINK_IFELSE(int foo(void) {},
6486           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6487         )
6488         LDFLAGS="$save_LDFLAGS"
6489       else
6490         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6491         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
6492       fi
6493       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6494       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6495       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6496       _LT_TAGVAR(inherit_rpath, $1)=yes
6497       _LT_TAGVAR(link_all_deplibs, $1)=yes
6498       ;;
6499
6500     netbsd* | netbsdelf*-gnu)
6501       if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6502         _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6503       else
6504         _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6505       fi
6506       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6507       _LT_TAGVAR(hardcode_direct, $1)=yes
6508       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6509       ;;
6510
6511     newsos6)
6512       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6513       _LT_TAGVAR(hardcode_direct, $1)=yes
6514       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6515       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6516       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6517       ;;
6518
6519     *nto* | *qnx*)
6520       ;;
6521
6522     openbsd*)
6523       if test -f /usr/libexec/ld.so; then
6524         _LT_TAGVAR(hardcode_direct, $1)=yes
6525         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6526         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6527         if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6528           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6529           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6530           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6531           _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6532         else
6533           case $host_os in
6534            openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6535              _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6536              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6537              ;;
6538            *)
6539              _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6540              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6541              ;;
6542           esac
6543         fi
6544       else
6545         _LT_TAGVAR(ld_shlibs, $1)=no
6546       fi
6547       ;;
6548
6549     os2*)
6550       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6551       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6552       _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6553       _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6554       _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6555       ;;
6556
6557     osf3*)
6558       if test "$GCC" = yes; then
6559         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6560         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6561       else
6562         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6563         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6564       fi
6565       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6566       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6567       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6568       ;;
6569
6570     osf4* | osf5*)      # as osf3* with the addition of -msym flag
6571       if test "$GCC" = yes; then
6572         _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6573         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6574         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6575       else
6576         _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6577         _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
6578         _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
6579         $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6580
6581         # Both c and cxx compiler support -rpath directly
6582         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6583       fi
6584       _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6585       _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6586       ;;
6587
6588     solaris*)
6589       _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6590       if test "$GCC" = yes; then
6591         wlarc='${wl}'
6592         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6593         _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6594           $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6595       else
6596         case `$CC -V 2>&1` in
6597         *"Compilers 5.0"*)
6598           wlarc=''
6599           _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6600           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6601           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6602           ;;
6603         *)
6604           wlarc='${wl}'
6605           _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6606           _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6607           $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6608           ;;
6609         esac
6610       fi
6611       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6612       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6613       case $host_os in
6614       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6615       *)
6616         # The compiler driver will combine and reorder linker options,
6617         # but understands `-z linker_flag'.  GCC discards it without `$wl',
6618         # but is careful enough not to reorder.
6619         # Supported since Solaris 2.6 (maybe 2.5.1?)
6620         if test "$GCC" = yes; then
6621           _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6622         else
6623           _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6624         fi
6625         ;;
6626       esac
6627       _LT_TAGVAR(link_all_deplibs, $1)=yes
6628       ;;
6629
6630     sunos4*)
6631       if test "x$host_vendor" = xsequent; then
6632         # Use $CC to link under sequent, because it throws in some extra .o
6633         # files that make .init and .fini sections work.
6634         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6635       else
6636         _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6637       fi
6638       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6639       _LT_TAGVAR(hardcode_direct, $1)=yes
6640       _LT_TAGVAR(hardcode_minus_L, $1)=yes
6641       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6642       ;;
6643
6644     sysv4)
6645       case $host_vendor in
6646         sni)
6647           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6648           _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6649         ;;
6650         siemens)
6651           ## LD is ld it makes a PLAMLIB
6652           ## CC just makes a GrossModule.
6653           _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6654           _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6655           _LT_TAGVAR(hardcode_direct, $1)=no
6656         ;;
6657         motorola)
6658           _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6659           _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6660         ;;
6661       esac
6662       runpath_var='LD_RUN_PATH'
6663       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6664       ;;
6665
6666     sysv4.3*)
6667       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6668       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6669       _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6670       ;;
6671
6672     sysv4*MP*)
6673       if test -d /usr/nec; then
6674         _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6675         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6676         runpath_var=LD_RUN_PATH
6677         hardcode_runpath_var=yes
6678         _LT_TAGVAR(ld_shlibs, $1)=yes
6679       fi
6680       ;;
6681
6682     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6683       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6684       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6685       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6686       runpath_var='LD_RUN_PATH'
6687
6688       if test "$GCC" = yes; then
6689         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6690         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6691       else
6692         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6693         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6694       fi
6695       ;;
6696
6697     sysv5* | sco3.2v5* | sco5v6*)
6698       # Note: We can NOT use -z defs as we might desire, because we do not
6699       # link with -lc, and that would cause any symbols used from libc to
6700       # always be unresolved, which means just about no library would
6701       # ever link correctly.  If we're not using GNU ld we use -z text
6702       # though, which does catch some bad symbols but isn't as heavy-handed
6703       # as -z defs.
6704       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6705       _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6706       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6707       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6708       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6709       _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6710       _LT_TAGVAR(link_all_deplibs, $1)=yes
6711       _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6712       runpath_var='LD_RUN_PATH'
6713
6714       if test "$GCC" = yes; then
6715         _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6716         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6717       else
6718         _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6719         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6720       fi
6721       ;;
6722
6723     uts4*)
6724       _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6725       _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6726       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6727       ;;
6728
6729     *)
6730       _LT_TAGVAR(ld_shlibs, $1)=no
6731       ;;
6732     esac
6733
6734     if test x$host_vendor = xsni; then
6735       case $host in
6736       sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6737         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6738         ;;
6739       esac
6740     fi
6741   fi
6742 ])
6743 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6744 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6745
6746 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6747
6748 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6749 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6750 _LT_DECL([], [extract_expsyms_cmds], [2],
6751     [The commands to extract the exported symbol list from a shared archive])
6752
6753 #
6754 # Do we need to explicitly link libc?
6755 #
6756 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6757 x|xyes)
6758   # Assume -lc should be added
6759   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6760
6761   if test "$enable_shared" = yes && test "$GCC" = yes; then
6762     case $_LT_TAGVAR(archive_cmds, $1) in
6763     *'~'*)
6764       # FIXME: we may have to deal with multi-command sequences.
6765       ;;
6766     '$CC '*)
6767       # Test whether the compiler implicitly links with -lc since on some
6768       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6769       # to ld, don't add -lc before -lgcc.
6770       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6771       $RM conftest*
6772       echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6773
6774       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6775         soname=conftest
6776         lib=conftest
6777         libobjs=conftest.$ac_objext
6778         deplibs=
6779         wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6780         pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6781         compiler_flags=-v
6782         linker_flags=-v
6783         verstring=
6784         output_objdir=.
6785         libname=conftest
6786         lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6787         _LT_TAGVAR(allow_undefined_flag, $1)=
6788         if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6789         then
6790           _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6791         else
6792           _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6793         fi
6794         _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6795       else
6796         cat conftest.err 1>&5
6797       fi
6798       $RM conftest*
6799       AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
6800       ;;
6801     esac
6802   fi
6803   ;;
6804 esac
6805
6806 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6807     [Whether or not to add -lc for building shared libraries])
6808 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6809     [enable_shared_with_static_runtimes], [0],
6810     [Whether or not to disallow shared libs when runtime libs are static])
6811 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6812     [Compiler flag to allow reflexive dlopens])
6813 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
6814     [Compiler flag to generate shared objects directly from archives])
6815 _LT_TAGDECL([], [compiler_needs_object], [1],
6816     [Whether the compiler copes with passing no objects directly])
6817 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6818     [Create an old-style archive from a shared archive])
6819 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6820     [Create a temporary old-style archive to link instead of a shared archive])
6821 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6822 _LT_TAGDECL([], [archive_expsym_cmds], [2])
6823 _LT_TAGDECL([], [module_cmds], [2],
6824     [Commands used to build a loadable module if different from building
6825     a shared archive.])
6826 _LT_TAGDECL([], [module_expsym_cmds], [2])
6827 _LT_TAGDECL([], [with_gnu_ld], [1],
6828     [Whether we are building with GNU ld or not])
6829 _LT_TAGDECL([], [allow_undefined_flag], [1],
6830     [Flag that allows shared libraries with undefined symbols to be built])
6831 _LT_TAGDECL([], [no_undefined_flag], [1],
6832     [Flag that enforces no undefined symbols])
6833 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6834     [Flag to hardcode $libdir into a binary during linking.
6835     This must work even if $libdir does not exist])
6836 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6837     [[If ld is used when linking, flag to hardcode $libdir into a binary
6838     during linking.  This must work even if $libdir does not exist]])
6839 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
6840     [Whether we need a single "-rpath" flag with a separated argument])
6841 _LT_TAGDECL([], [hardcode_direct], [0],
6842     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6843     DIR into the resulting binary])
6844 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
6845     [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6846     DIR into the resulting binary and the resulting library dependency is
6847     "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6848     library is relocated])
6849 _LT_TAGDECL([], [hardcode_minus_L], [0],
6850     [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6851     into the resulting binary])
6852 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6853     [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6854     into the resulting binary])
6855 _LT_TAGDECL([], [hardcode_automatic], [0],
6856     [Set to "yes" if building a shared library automatically hardcodes DIR
6857     into the library and all subsequent libraries and executables linked
6858     against it])
6859 _LT_TAGDECL([], [inherit_rpath], [0],
6860     [Set to yes if linker adds runtime paths of dependent libraries
6861     to runtime path list])
6862 _LT_TAGDECL([], [link_all_deplibs], [0],
6863     [Whether libtool must link a program against all its dependency libraries])
6864 _LT_TAGDECL([], [fix_srcfile_path], [1],
6865     [Fix the shell variable $srcfile for the compiler])
6866 _LT_TAGDECL([], [always_export_symbols], [0],
6867     [Set to "yes" if exported symbols are required])
6868 _LT_TAGDECL([], [export_symbols_cmds], [2],
6869     [The commands to list exported symbols])
6870 _LT_TAGDECL([], [exclude_expsyms], [1],
6871     [Symbols that should not be listed in the preloaded symbols])
6872 _LT_TAGDECL([], [include_expsyms], [1],
6873     [Symbols that must always be exported])
6874 _LT_TAGDECL([], [prelink_cmds], [2],
6875     [Commands necessary for linking programs (against libraries) with templates])
6876 _LT_TAGDECL([], [file_list_spec], [1],
6877     [Specify filename containing input files])
6878 dnl FIXME: Not yet implemented
6879 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6880 dnl    [Compiler flag to generate thread safe objects])
6881 ])# _LT_LINKER_SHLIBS
6882
6883
6884 # _LT_LANG_C_CONFIG([TAG])
6885 # ------------------------
6886 # Ensure that the configuration variables for a C compiler are suitably
6887 # defined.  These variables are subsequently used by _LT_CONFIG to write
6888 # the compiler configuration to `libtool'.
6889 m4_defun([_LT_LANG_C_CONFIG],
6890 [m4_require([_LT_DECL_EGREP])dnl
6891 lt_save_CC="$CC"
6892 AC_LANG_PUSH(C)
6893
6894 # Source file extension for C test sources.
6895 ac_ext=c
6896
6897 # Object file extension for compiled C test sources.
6898 objext=o
6899 _LT_TAGVAR(objext, $1)=$objext
6900
6901 # Code to be used in simple compile tests
6902 lt_simple_compile_test_code="int some_variable = 0;"
6903
6904 # Code to be used in simple link tests
6905 lt_simple_link_test_code='int main(){return(0);}'
6906
6907 _LT_TAG_COMPILER
6908 # Save the default compiler, since it gets overwritten when the other
6909 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6910 compiler_DEFAULT=$CC
6911
6912 # save warnings/boilerplate of simple test code
6913 _LT_COMPILER_BOILERPLATE
6914 _LT_LINKER_BOILERPLATE
6915
6916 if test -n "$compiler"; then
6917   _LT_COMPILER_NO_RTTI($1)
6918   _LT_COMPILER_PIC($1)
6919   _LT_COMPILER_C_O($1)
6920   _LT_COMPILER_FILE_LOCKS($1)
6921   _LT_LINKER_SHLIBS($1)
6922   _LT_SYS_DYNAMIC_LINKER($1)
6923   _LT_LINKER_HARDCODE_LIBPATH($1)
6924   LT_SYS_DLOPEN_SELF
6925   _LT_CMD_STRIPLIB
6926
6927   # Report which library types will actually be built
6928   AC_MSG_CHECKING([if libtool supports shared libraries])
6929   AC_MSG_RESULT([$can_build_shared])
6930
6931   AC_MSG_CHECKING([whether to build shared libraries])
6932   test "$can_build_shared" = "no" && enable_shared=no
6933
6934   # On AIX, shared libraries and static libraries use the same namespace, and
6935   # are all built from PIC.
6936   case $host_os in
6937   aix3*)
6938     test "$enable_shared" = yes && enable_static=no
6939     if test -n "$RANLIB"; then
6940       archive_cmds="$archive_cmds~\$RANLIB \$lib"
6941       postinstall_cmds='$RANLIB $lib'
6942     fi
6943     ;;
6944
6945   aix[[4-9]]*)
6946     if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6947       test "$enable_shared" = yes && enable_static=no
6948     fi
6949     ;;
6950   esac
6951   AC_MSG_RESULT([$enable_shared])
6952
6953   AC_MSG_CHECKING([whether to build static libraries])
6954   # Make sure either enable_shared or enable_static is yes.
6955   test "$enable_shared" = yes || enable_static=yes
6956   AC_MSG_RESULT([$enable_static])
6957
6958   _LT_CONFIG($1)
6959 fi
6960 AC_LANG_POP
6961 CC="$lt_save_CC"
6962 ])# _LT_LANG_C_CONFIG
6963
6964
6965 # _LT_PROG_CXX
6966 # ------------
6967 # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
6968 # compiler, we have our own version here.
6969 m4_defun([_LT_PROG_CXX],
6970 [
6971 pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
6972 AC_PROG_CXX
6973 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6974     ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6975     (test "X$CXX" != "Xg++"))) ; then
6976   AC_PROG_CXXCPP
6977 else
6978   _lt_caught_CXX_error=yes
6979 fi
6980 popdef([AC_MSG_ERROR])
6981 ])# _LT_PROG_CXX
6982
6983 dnl aclocal-1.4 backwards compatibility:
6984 dnl AC_DEFUN([_LT_PROG_CXX], [])
6985
6986
6987 # _LT_LANG_CXX_CONFIG([TAG])
6988 # --------------------------
6989 # Ensure that the configuration variables for a C++ compiler are suitably
6990 # defined.  These variables are subsequently used by _LT_CONFIG to write
6991 # the compiler configuration to `libtool'.
6992 m4_defun([_LT_LANG_CXX_CONFIG],
6993 [AC_REQUIRE([_LT_PROG_CXX])dnl
6994 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6995 m4_require([_LT_DECL_EGREP])dnl
6996
6997 AC_LANG_PUSH(C++)
6998 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6999 _LT_TAGVAR(allow_undefined_flag, $1)=
7000 _LT_TAGVAR(always_export_symbols, $1)=no
7001 _LT_TAGVAR(archive_expsym_cmds, $1)=
7002 _LT_TAGVAR(compiler_needs_object, $1)=no
7003 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7004 _LT_TAGVAR(hardcode_direct, $1)=no
7005 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
7006 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7007 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7008 _LT_TAGVAR(hardcode_libdir_separator, $1)=
7009 _LT_TAGVAR(hardcode_minus_L, $1)=no
7010 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7011 _LT_TAGVAR(hardcode_automatic, $1)=no
7012 _LT_TAGVAR(inherit_rpath, $1)=no
7013 _LT_TAGVAR(module_cmds, $1)=
7014 _LT_TAGVAR(module_expsym_cmds, $1)=
7015 _LT_TAGVAR(link_all_deplibs, $1)=unknown
7016 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7017 _LT_TAGVAR(no_undefined_flag, $1)=
7018 _LT_TAGVAR(whole_archive_flag_spec, $1)=
7019 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7020
7021 # Source file extension for C++ test sources.
7022 ac_ext=cpp
7023
7024 # Object file extension for compiled C++ test sources.
7025 objext=o
7026 _LT_TAGVAR(objext, $1)=$objext
7027
7028 # No sense in running all these tests if we already determined that
7029 # the CXX compiler isn't working.  Some variables (like enable_shared)
7030 # are currently assumed to apply to all compilers on this platform,
7031 # and will be corrupted by setting them based on a non-working compiler.
7032 if test "$_lt_caught_CXX_error" != yes; then
7033   # Code to be used in simple compile tests
7034   lt_simple_compile_test_code="int some_variable = 0;"
7035
7036   # Code to be used in simple link tests
7037   lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7038
7039   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7040   _LT_TAG_COMPILER
7041
7042   # save warnings/boilerplate of simple test code
7043   _LT_COMPILER_BOILERPLATE
7044   _LT_LINKER_BOILERPLATE
7045
7046   # Allow CC to be a program name with arguments.
7047   lt_save_CC=$CC
7048   lt_save_LD=$LD
7049   lt_save_GCC=$GCC
7050   GCC=$GXX
7051   lt_save_with_gnu_ld=$with_gnu_ld
7052   lt_save_path_LD=$lt_cv_path_LD
7053   if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7054     lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7055   else
7056     $as_unset lt_cv_prog_gnu_ld
7057   fi
7058   if test -n "${lt_cv_path_LDCXX+set}"; then
7059     lt_cv_path_LD=$lt_cv_path_LDCXX
7060   else
7061     $as_unset lt_cv_path_LD
7062   fi
7063   test -z "${LDCXX+set}" || LD=$LDCXX
7064   CC=${CXX-"c++"}
7065   compiler=$CC
7066   _LT_TAGVAR(compiler, $1)=$CC
7067   _LT_CC_BASENAME([$compiler])
7068
7069   if test -n "$compiler"; then
7070     # We don't want -fno-exception when compiling C++ code, so set the
7071     # no_builtin_flag separately
7072     if test "$GXX" = yes; then
7073       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7074     else
7075       _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7076     fi
7077
7078     if test "$GXX" = yes; then
7079       # Set up default GNU C++ configuration
7080
7081       LT_PATH_LD
7082
7083       # Check if GNU C++ uses GNU ld as the underlying linker, since the
7084       # archiving commands below assume that GNU ld is being used.
7085       if test "$with_gnu_ld" = yes; then
7086         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7087         _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7088
7089         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7090         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7091
7092         # If archive_cmds runs LD, not CC, wlarc should be empty
7093         # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7094         #     investigate it a little bit more. (MM)
7095         wlarc='${wl}'
7096
7097         # ancient GNU ld didn't support --whole-archive et. al.
7098         if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7099           $GREP 'no-whole-archive' > /dev/null; then
7100           _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7101         else
7102           _LT_TAGVAR(whole_archive_flag_spec, $1)=
7103         fi
7104       else
7105         with_gnu_ld=no
7106         wlarc=
7107
7108         # A generic and very simple default shared library creation
7109         # command for GNU C++ for the case where it uses the native
7110         # linker, instead of GNU ld.  If possible, this setting should
7111         # overridden to take advantage of the native linker features on
7112         # the platform it is being used on.
7113         _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7114       fi
7115
7116       # Commands to make compiler produce verbose output that lists
7117       # what "hidden" libraries, object files and flags are used when
7118       # linking a shared library.
7119       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7120
7121     else
7122       GXX=no
7123       with_gnu_ld=no
7124       wlarc=
7125     fi
7126
7127     # PORTME: fill in a description of your system's C++ link characteristics
7128     AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7129     _LT_TAGVAR(ld_shlibs, $1)=yes
7130     case $host_os in
7131       aix3*)
7132         # FIXME: insert proper C++ library support
7133         _LT_TAGVAR(ld_shlibs, $1)=no
7134         ;;
7135       aix[[4-9]]*)
7136         if test "$host_cpu" = ia64; then
7137           # On IA64, the linker does run time linking by default, so we don't
7138           # have to do anything special.
7139           aix_use_runtimelinking=no
7140           exp_sym_flag='-Bexport'
7141           no_entry_flag=""
7142         else
7143           aix_use_runtimelinking=no
7144
7145           # Test if we are trying to use run time linking or normal
7146           # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7147           # need to do runtime linking.
7148           case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7149             for ld_flag in $LDFLAGS; do
7150               case $ld_flag in
7151               *-brtl*)
7152                 aix_use_runtimelinking=yes
7153                 break
7154                 ;;
7155               esac
7156             done
7157             ;;
7158           esac
7159
7160           exp_sym_flag='-bexport'
7161           no_entry_flag='-bnoentry'
7162         fi
7163
7164         # When large executables or shared objects are built, AIX ld can
7165         # have problems creating the table of contents.  If linking a library
7166         # or program results in "error TOC overflow" add -mminimal-toc to
7167         # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7168         # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7169
7170         _LT_TAGVAR(archive_cmds, $1)=''
7171         _LT_TAGVAR(hardcode_direct, $1)=yes
7172         _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7173         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7174         _LT_TAGVAR(link_all_deplibs, $1)=yes
7175         _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7176
7177         if test "$GXX" = yes; then
7178           case $host_os in aix4.[[012]]|aix4.[[012]].*)
7179           # We only want to do this on AIX 4.2 and lower, the check
7180           # below for broken collect2 doesn't work under 4.3+
7181           collect2name=`${CC} -print-prog-name=collect2`
7182           if test -f "$collect2name" &&
7183              strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7184           then
7185             # We have reworked collect2
7186             :
7187           else
7188             # We have old collect2
7189             _LT_TAGVAR(hardcode_direct, $1)=unsupported
7190             # It fails to find uninstalled libraries when the uninstalled
7191             # path is not listed in the libpath.  Setting hardcode_minus_L
7192             # to unsupported forces relinking
7193             _LT_TAGVAR(hardcode_minus_L, $1)=yes
7194             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7195             _LT_TAGVAR(hardcode_libdir_separator, $1)=
7196           fi
7197           esac
7198           shared_flag='-shared'
7199           if test "$aix_use_runtimelinking" = yes; then
7200             shared_flag="$shared_flag "'${wl}-G'
7201           fi
7202         else
7203           # not using gcc
7204           if test "$host_cpu" = ia64; then
7205           # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7206           # chokes on -Wl,-G. The following line is correct:
7207           shared_flag='-G'
7208           else
7209             if test "$aix_use_runtimelinking" = yes; then
7210               shared_flag='${wl}-G'
7211             else
7212               shared_flag='${wl}-bM:SRE'
7213             fi
7214           fi
7215         fi
7216
7217         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7218         # It seems that -bexpall does not export symbols beginning with
7219         # underscore (_), so it is better to generate a list of symbols to
7220         # export.
7221         _LT_TAGVAR(always_export_symbols, $1)=yes
7222         if test "$aix_use_runtimelinking" = yes; then
7223           # Warning - without using the other runtime loading flags (-brtl),
7224           # -berok will link without error, but may produce a broken library.
7225           _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7226           # Determine the default libpath from the value encoded in an empty
7227           # executable.
7228           _LT_SYS_MODULE_PATH_AIX
7229           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7230
7231           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7232         else
7233           if test "$host_cpu" = ia64; then
7234             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7235             _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7236             _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
7237           else
7238             # Determine the default libpath from the value encoded in an
7239             # empty executable.
7240             _LT_SYS_MODULE_PATH_AIX
7241             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7242             # Warning - without using the other run time loading flags,
7243             # -berok will link without error, but may produce a broken library.
7244             _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7245             _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7246             # Exported symbols can be pulled into shared objects from archives
7247             _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7248             _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7249             # This is similar to how AIX traditionally builds its shared
7250             # libraries.
7251             _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7252           fi
7253         fi
7254         ;;
7255
7256       beos*)
7257         if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7258           _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7259           # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7260           # support --undefined.  This deserves some investigation.  FIXME
7261           _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7262         else
7263           _LT_TAGVAR(ld_shlibs, $1)=no
7264         fi
7265         ;;
7266
7267       chorus*)
7268         case $cc_basename in
7269           *)
7270           # FIXME: insert proper C++ library support
7271           _LT_TAGVAR(ld_shlibs, $1)=no
7272           ;;
7273         esac
7274         ;;
7275
7276       cygwin* | mingw* | pw32* | cegcc*)
7277         # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7278         # as there is no search path for DLLs.
7279         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7280         _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7281         _LT_TAGVAR(always_export_symbols, $1)=no
7282         _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7283
7284         if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7285           _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7286           # If the export-symbols file already is a .def file (1st line
7287           # is EXPORTS), use it as is; otherwise, prepend...
7288           _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7289             cp $export_symbols $output_objdir/$soname.def;
7290           else
7291             echo EXPORTS > $output_objdir/$soname.def;
7292             cat $export_symbols >> $output_objdir/$soname.def;
7293           fi~
7294           $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'
7295         else
7296           _LT_TAGVAR(ld_shlibs, $1)=no
7297         fi
7298         ;;
7299       darwin* | rhapsody*)
7300         _LT_DARWIN_LINKER_FEATURES($1)
7301         ;;
7302
7303       dgux*)
7304         case $cc_basename in
7305           ec++*)
7306             # FIXME: insert proper C++ library support
7307             _LT_TAGVAR(ld_shlibs, $1)=no
7308             ;;
7309           ghcx*)
7310             # Green Hills C++ Compiler
7311             # FIXME: insert proper C++ library support
7312             _LT_TAGVAR(ld_shlibs, $1)=no
7313             ;;
7314           *)
7315             # FIXME: insert proper C++ library support
7316             _LT_TAGVAR(ld_shlibs, $1)=no
7317             ;;
7318         esac
7319         ;;
7320
7321       freebsd[[12]]*)
7322         # C++ shared libraries reported to be fairly broken before
7323         # switch to ELF
7324         _LT_TAGVAR(ld_shlibs, $1)=no
7325         ;;
7326
7327       freebsd-elf*)
7328         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7329         ;;
7330
7331       freebsd* | dragonfly*)
7332         # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7333         # conventions
7334         _LT_TAGVAR(ld_shlibs, $1)=yes
7335         ;;
7336
7337       gnu*)
7338         ;;
7339
7340       hpux9*)
7341         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7342         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7343         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7344         _LT_TAGVAR(hardcode_direct, $1)=yes
7345         _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7346                                              # but as the default
7347                                              # location of the library.
7348
7349         case $cc_basename in
7350           CC*)
7351             # FIXME: insert proper C++ library support
7352             _LT_TAGVAR(ld_shlibs, $1)=no
7353             ;;
7354           aCC*)
7355             _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7356             # Commands to make compiler produce verbose output that lists
7357             # what "hidden" libraries, object files and flags are used when
7358             # linking a shared library.
7359             #
7360             # There doesn't appear to be a way to prevent this compiler from
7361             # explicitly linking system object files so we need to strip them
7362             # from the output so that they don't get included in the library
7363             # dependencies.
7364             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
7365             ;;
7366           *)
7367             if test "$GXX" = yes; then
7368               _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7369             else
7370               # FIXME: insert proper C++ library support
7371               _LT_TAGVAR(ld_shlibs, $1)=no
7372             fi
7373             ;;
7374         esac
7375         ;;
7376
7377       hpux10*|hpux11*)
7378         if test $with_gnu_ld = no; then
7379           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7380           _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7381
7382           case $host_cpu in
7383             hppa*64*|ia64*)
7384               ;;
7385             *)
7386               _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7387               ;;
7388           esac
7389         fi
7390         case $host_cpu in
7391           hppa*64*|ia64*)
7392             _LT_TAGVAR(hardcode_direct, $1)=no
7393             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7394             ;;
7395           *)
7396             _LT_TAGVAR(hardcode_direct, $1)=yes
7397             _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7398             _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7399                                                  # but as the default
7400                                                  # location of the library.
7401             ;;
7402         esac
7403
7404         case $cc_basename in
7405           CC*)
7406             # FIXME: insert proper C++ library support
7407             _LT_TAGVAR(ld_shlibs, $1)=no
7408             ;;
7409           aCC*)
7410             case $host_cpu in
7411               hppa*64*)
7412                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7413                 ;;
7414               ia64*)
7415                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7416                 ;;
7417               *)
7418                 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7419                 ;;
7420             esac
7421             # Commands to make compiler produce verbose output that lists
7422             # what "hidden" libraries, object files and flags are used when
7423             # linking a shared library.
7424             #
7425             # There doesn't appear to be a way to prevent this compiler from
7426             # explicitly linking system object files so we need to strip them
7427             # from the output so that they don't get included in the library
7428             # dependencies.
7429             output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
7430             ;;
7431           *)
7432             if test "$GXX" = yes; then
7433               if test $with_gnu_ld = no; then
7434                 case $host_cpu in
7435                   hppa*64*)
7436                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7437                     ;;
7438                   ia64*)
7439                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7440                     ;;
7441                   *)
7442                     _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7443                     ;;
7444                 esac
7445               fi
7446             else
7447               # FIXME: insert proper C++ library support
7448               _LT_TAGVAR(ld_shlibs, $1)=no
7449             fi
7450             ;;
7451         esac
7452         ;;
7453
7454       interix[[3-9]]*)
7455         _LT_TAGVAR(hardcode_direct, $1)=no
7456         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7457         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7458         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7459         # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7460         # Instead, shared libraries are loaded at an image base (0x10000000 by
7461         # default) and relocated if they conflict, which is a slow very memory
7462         # consuming and fragmenting process.  To avoid this, we pick a random,
7463         # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7464         # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7465         _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7466         _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7467         ;;
7468       irix5* | irix6*)
7469         case $cc_basename in
7470           CC*)
7471             # SGI C++
7472             _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7473
7474             # Archives containing C++ object files must be created using
7475             # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7476             # necessary to make sure instantiated templates are included
7477             # in the archive.
7478             _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7479             ;;
7480           *)
7481             if test "$GXX" = yes; then
7482               if test "$with_gnu_ld" = no; then
7483                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7484               else
7485                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
7486               fi
7487             fi
7488             _LT_TAGVAR(link_all_deplibs, $1)=yes
7489             ;;
7490         esac
7491         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7492         _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7493         _LT_TAGVAR(inherit_rpath, $1)=yes
7494         ;;
7495
7496       linux* | k*bsd*-gnu)
7497         case $cc_basename in
7498           KCC*)
7499             # Kuck and Associates, Inc. (KAI) C++ Compiler
7500
7501             # KCC will only create a shared library if the output file
7502             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7503             # to its proper name (with version) after linking.
7504             _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7505             _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
7506             # Commands to make compiler produce verbose output that lists
7507             # what "hidden" libraries, object files and flags are used when
7508             # linking a shared library.
7509             #
7510             # There doesn't appear to be a way to prevent this compiler from
7511             # explicitly linking system object files so we need to strip them
7512             # from the output so that they don't get included in the library
7513             # dependencies.
7514             output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
7515
7516             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7517             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7518
7519             # Archives containing C++ object files must be created using
7520             # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7521             _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7522             ;;
7523           icpc* | ecpc* )
7524             # Intel C++
7525             with_gnu_ld=yes
7526             # version 8.0 and above of icpc choke on multiply defined symbols
7527             # if we add $predep_objects and $postdep_objects, however 7.1 and
7528             # earlier do not add the objects themselves.
7529             case `$CC -V 2>&1` in
7530               *"Version 7."*)
7531                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7532                 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7533                 ;;
7534               *)  # Version 8.0 or newer
7535                 tmp_idyn=
7536                 case $host_cpu in
7537                   ia64*) tmp_idyn=' -i_dynamic';;
7538                 esac
7539                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7540                 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7541                 ;;
7542             esac
7543             _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7544             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7545             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7546             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7547             ;;
7548           pgCC* | pgcpp*)
7549             # Portland Group C++ compiler
7550             case `$CC -V` in
7551             *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
7552               _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7553                 rm -rf $tpldir~
7554                 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7555                 compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
7556               _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7557                 rm -rf $tpldir~
7558                 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7559                 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
7560                 $RANLIB $oldlib'
7561               _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7562                 rm -rf $tpldir~
7563                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7564                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7565               _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7566                 rm -rf $tpldir~
7567                 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7568                 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7569               ;;
7570             *) # Version 6 will use weak symbols
7571               _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7572               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7573               ;;
7574             esac
7575
7576             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7577             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7578             _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
7579             ;;
7580           cxx*)
7581             # Compaq C++
7582             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7583             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
7584
7585             runpath_var=LD_RUN_PATH
7586             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7587             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7588
7589             # Commands to make compiler produce verbose output that lists
7590             # what "hidden" libraries, object files and flags are used when
7591             # linking a shared library.
7592             #
7593             # There doesn't appear to be a way to prevent this compiler from
7594             # explicitly linking system object files so we need to strip them
7595             # from the output so that they don't get included in the library
7596             # dependencies.
7597             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
7598             ;;
7599           xl*)
7600             # IBM XL 8.0 on PPC, with GNU ld
7601             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7602             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7603             _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7604             if test "x$supports_anon_versioning" = xyes; then
7605               _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7606                 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7607                 echo "local: *; };" >> $output_objdir/$libname.ver~
7608                 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7609             fi
7610             ;;
7611           *)
7612             case `$CC -V 2>&1 | sed 5q` in
7613             *Sun\ C*)
7614               # Sun C++ 5.9
7615               _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7616               _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7617               _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
7618               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7619               _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
7620               _LT_TAGVAR(compiler_needs_object, $1)=yes
7621
7622               # Not sure whether something based on
7623               # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7624               # would be better.
7625               output_verbose_link_cmd='echo'
7626
7627               # Archives containing C++ object files must be created using
7628               # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7629               # necessary to make sure instantiated templates are included
7630               # in the archive.
7631               _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7632               ;;
7633             esac
7634             ;;
7635         esac
7636         ;;
7637
7638       lynxos*)
7639         # FIXME: insert proper C++ library support
7640         _LT_TAGVAR(ld_shlibs, $1)=no
7641         ;;
7642
7643       m88k*)
7644         # FIXME: insert proper C++ library support
7645         _LT_TAGVAR(ld_shlibs, $1)=no
7646         ;;
7647
7648       mvs*)
7649         case $cc_basename in
7650           cxx*)
7651             # FIXME: insert proper C++ library support
7652             _LT_TAGVAR(ld_shlibs, $1)=no
7653             ;;
7654           *)
7655             # FIXME: insert proper C++ library support
7656             _LT_TAGVAR(ld_shlibs, $1)=no
7657             ;;
7658         esac
7659         ;;
7660
7661       netbsd*)
7662         if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7663           _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7664           wlarc=
7665           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7666           _LT_TAGVAR(hardcode_direct, $1)=yes
7667           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7668         fi
7669         # Workaround some broken pre-1.5 toolchains
7670         output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7671         ;;
7672
7673       *nto* | *qnx*)
7674         _LT_TAGVAR(ld_shlibs, $1)=yes
7675         ;;
7676
7677       openbsd2*)
7678         # C++ shared libraries are fairly broken
7679         _LT_TAGVAR(ld_shlibs, $1)=no
7680         ;;
7681
7682       openbsd*)
7683         if test -f /usr/libexec/ld.so; then
7684           _LT_TAGVAR(hardcode_direct, $1)=yes
7685           _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7686           _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7687           _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7688           _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7689           if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7690             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
7691             _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7692             _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7693           fi
7694           output_verbose_link_cmd=echo
7695         else
7696           _LT_TAGVAR(ld_shlibs, $1)=no
7697         fi
7698         ;;
7699
7700       osf3* | osf4* | osf5*)
7701         case $cc_basename in
7702           KCC*)
7703             # Kuck and Associates, Inc. (KAI) C++ Compiler
7704
7705             # KCC will only create a shared library if the output file
7706             # ends with ".so" (or ".sl" for HP-UX), so rename the library
7707             # to its proper name (with version) after linking.
7708             _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7709
7710             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7711             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7712
7713             # Archives containing C++ object files must be created using
7714             # the KAI C++ compiler.
7715             case $host in
7716               osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7717               *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7718             esac
7719             ;;
7720           RCC*)
7721             # Rational C++ 2.4.1
7722             # FIXME: insert proper C++ library support
7723             _LT_TAGVAR(ld_shlibs, $1)=no
7724             ;;
7725           cxx*)
7726             case $host in
7727               osf3*)
7728                 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7729                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7730                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7731                 ;;
7732               *)
7733                 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7734                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7735                 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7736                   echo "-hidden">> $lib.exp~
7737                   $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
7738                   $RM $lib.exp'
7739                 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7740                 ;;
7741             esac
7742
7743             _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7744
7745             # Commands to make compiler produce verbose output that lists
7746             # what "hidden" libraries, object files and flags are used when
7747             # linking a shared library.
7748             #
7749             # There doesn't appear to be a way to prevent this compiler from
7750             # explicitly linking system object files so we need to strip them
7751             # from the output so that they don't get included in the library
7752             # dependencies.
7753             output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
7754             ;;
7755           *)
7756             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7757               _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7758               case $host in
7759                 osf3*)
7760                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7761                   ;;
7762                 *)
7763                   _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7764                   ;;
7765               esac
7766
7767               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7768               _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7769
7770               # Commands to make compiler produce verbose output that lists
7771               # what "hidden" libraries, object files and flags are used when
7772               # linking a shared library.
7773               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7774
7775             else
7776               # FIXME: insert proper C++ library support
7777               _LT_TAGVAR(ld_shlibs, $1)=no
7778             fi
7779             ;;
7780         esac
7781         ;;
7782
7783       psos*)
7784         # FIXME: insert proper C++ library support
7785         _LT_TAGVAR(ld_shlibs, $1)=no
7786         ;;
7787
7788       sunos4*)
7789         case $cc_basename in
7790           CC*)
7791             # Sun C++ 4.x
7792             # FIXME: insert proper C++ library support
7793             _LT_TAGVAR(ld_shlibs, $1)=no
7794             ;;
7795           lcc*)
7796             # Lucid
7797             # FIXME: insert proper C++ library support
7798             _LT_TAGVAR(ld_shlibs, $1)=no
7799             ;;
7800           *)
7801             # FIXME: insert proper C++ library support
7802             _LT_TAGVAR(ld_shlibs, $1)=no
7803             ;;
7804         esac
7805         ;;
7806
7807       solaris*)
7808         case $cc_basename in
7809           CC*)
7810             # Sun C++ 4.2, 5.x and Centerline C++
7811             _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7812             _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7813             _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7814             _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7815               $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'
7816
7817             _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7818             _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7819             case $host_os in
7820               solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7821               *)
7822                 # The compiler driver will combine and reorder linker options,
7823                 # but understands `-z linker_flag'.
7824                 # Supported since Solaris 2.6 (maybe 2.5.1?)
7825                 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7826                 ;;
7827             esac
7828             _LT_TAGVAR(link_all_deplibs, $1)=yes
7829
7830             output_verbose_link_cmd='echo'
7831
7832             # Archives containing C++ object files must be created using
7833             # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7834             # necessary to make sure instantiated templates are included
7835             # in the archive.
7836             _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7837             ;;
7838           gcx*)
7839             # Green Hills C++ Compiler
7840             _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7841
7842             # The C++ compiler must be used to create the archive.
7843             _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7844             ;;
7845           *)
7846             # GNU C++ compiler with Solaris linker
7847             if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7848               _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7849               if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7850                 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7851                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7852                   $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7853
7854                 # Commands to make compiler produce verbose output that lists
7855                 # what "hidden" libraries, object files and flags are used when
7856                 # linking a shared library.
7857                 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7858               else
7859                 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7860                 # platform.
7861                 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7862                 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7863                   $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7864
7865                 # Commands to make compiler produce verbose output that lists
7866                 # what "hidden" libraries, object files and flags are used when
7867                 # linking a shared library.
7868                 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7869               fi
7870
7871               _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7872               case $host_os in
7873                 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7874                 *)
7875                   _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7876                   ;;
7877               esac
7878             fi
7879             ;;
7880         esac
7881         ;;
7882
7883     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7884       _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7885       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7886       _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7887       runpath_var='LD_RUN_PATH'
7888
7889       case $cc_basename in
7890         CC*)
7891           _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7892           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7893           ;;
7894         *)
7895           _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7896           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7897           ;;
7898       esac
7899       ;;
7900
7901       sysv5* | sco3.2v5* | sco5v6*)
7902         # Note: We can NOT use -z defs as we might desire, because we do not
7903         # link with -lc, and that would cause any symbols used from libc to
7904         # always be unresolved, which means just about no library would
7905         # ever link correctly.  If we're not using GNU ld we use -z text
7906         # though, which does catch some bad symbols but isn't as heavy-handed
7907         # as -z defs.
7908         _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7909         _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7910         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7911         _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7912         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7913         _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7914         _LT_TAGVAR(link_all_deplibs, $1)=yes
7915         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7916         runpath_var='LD_RUN_PATH'
7917
7918         case $cc_basename in
7919           CC*)
7920             _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7921             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7922             ;;
7923           *)
7924             _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7925             _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7926             ;;
7927         esac
7928       ;;
7929
7930       tandem*)
7931         case $cc_basename in
7932           NCC*)
7933             # NonStop-UX NCC 3.20
7934             # FIXME: insert proper C++ library support
7935             _LT_TAGVAR(ld_shlibs, $1)=no
7936             ;;
7937           *)
7938             # FIXME: insert proper C++ library support
7939             _LT_TAGVAR(ld_shlibs, $1)=no
7940             ;;
7941         esac
7942         ;;
7943
7944       vxworks*)
7945         # FIXME: insert proper C++ library support
7946         _LT_TAGVAR(ld_shlibs, $1)=no
7947         ;;
7948
7949       *)
7950         # FIXME: insert proper C++ library support
7951         _LT_TAGVAR(ld_shlibs, $1)=no
7952         ;;
7953     esac
7954
7955     AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7956     test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7957
7958     _LT_TAGVAR(GCC, $1)="$GXX"
7959     _LT_TAGVAR(LD, $1)="$LD"
7960
7961     ## CAVEAT EMPTOR:
7962     ## There is no encapsulation within the following macros, do not change
7963     ## the running order or otherwise move them around unless you know exactly
7964     ## what you are doing...
7965     _LT_SYS_HIDDEN_LIBDEPS($1)
7966     _LT_COMPILER_PIC($1)
7967     _LT_COMPILER_C_O($1)
7968     _LT_COMPILER_FILE_LOCKS($1)
7969     _LT_LINKER_SHLIBS($1)
7970     _LT_SYS_DYNAMIC_LINKER($1)
7971     _LT_LINKER_HARDCODE_LIBPATH($1)
7972
7973     _LT_CONFIG($1)
7974   fi # test -n "$compiler"
7975
7976   CC=$lt_save_CC
7977   LDCXX=$LD
7978   LD=$lt_save_LD
7979   GCC=$lt_save_GCC
7980   with_gnu_ld=$lt_save_with_gnu_ld
7981   lt_cv_path_LDCXX=$lt_cv_path_LD
7982   lt_cv_path_LD=$lt_save_path_LD
7983   lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7984   lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7985 fi # test "$_lt_caught_CXX_error" != yes
7986
7987 AC_LANG_POP
7988 ])# _LT_LANG_CXX_CONFIG
7989
7990
7991 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7992 # ---------------------------------
7993 # Figure out "hidden" library dependencies from verbose
7994 # compiler output when linking a shared library.
7995 # Parse the compiler output and extract the necessary
7996 # objects, libraries and library flags.
7997 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7998 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7999 # Dependencies to place before and after the object being linked:
8000 _LT_TAGVAR(predep_objects, $1)=
8001 _LT_TAGVAR(postdep_objects, $1)=
8002 _LT_TAGVAR(predeps, $1)=
8003 _LT_TAGVAR(postdeps, $1)=
8004 _LT_TAGVAR(compiler_lib_search_path, $1)=
8005
8006 dnl we can't use the lt_simple_compile_test_code here,
8007 dnl because it contains code intended for an executable,
8008 dnl not a library.  It's possible we should let each
8009 dnl tag define a new lt_????_link_test_code variable,
8010 dnl but it's only used here...
8011 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8012 int a;
8013 void foo (void) { a = 0; }
8014 _LT_EOF
8015 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8016 class Foo
8017 {
8018 public:
8019   Foo (void) { a = 0; }
8020 private:
8021   int a;
8022 };
8023 _LT_EOF
8024 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8025       subroutine foo
8026       implicit none
8027       integer*4 a
8028       a=0
8029       return
8030       end
8031 _LT_EOF
8032 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8033       subroutine foo
8034       implicit none
8035       integer a
8036       a=0
8037       return
8038       end
8039 _LT_EOF
8040 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8041 public class foo {
8042   private int a;
8043   public void bar (void) {
8044     a = 0;
8045   }
8046 };
8047 _LT_EOF
8048 ])
8049 dnl Parse the compiler output and extract the necessary
8050 dnl objects, libraries and library flags.
8051 if AC_TRY_EVAL(ac_compile); then
8052   # Parse the compiler output and extract the necessary
8053   # objects, libraries and library flags.
8054
8055   # Sentinel used to keep track of whether or not we are before
8056   # the conftest object file.
8057   pre_test_object_deps_done=no
8058
8059   for p in `eval "$output_verbose_link_cmd"`; do
8060     case $p in
8061
8062     -L* | -R* | -l*)
8063        # Some compilers place space between "-{L,R}" and the path.
8064        # Remove the space.
8065        if test $p = "-L" ||
8066           test $p = "-R"; then
8067          prev=$p
8068          continue
8069        else
8070          prev=
8071        fi
8072
8073        if test "$pre_test_object_deps_done" = no; then
8074          case $p in
8075          -L* | -R*)
8076            # Internal compiler library paths should come after those
8077            # provided the user.  The postdeps already come after the
8078            # user supplied libs so there is no need to process them.
8079            if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8080              _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8081            else
8082              _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8083            fi
8084            ;;
8085          # The "-l" case would never come before the object being
8086          # linked, so don't bother handling this case.
8087          esac
8088        else
8089          if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8090            _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8091          else
8092            _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8093          fi
8094        fi
8095        ;;
8096
8097     *.$objext)
8098        # This assumes that the test object file only shows up
8099        # once in the compiler output.
8100        if test "$p" = "conftest.$objext"; then
8101          pre_test_object_deps_done=yes
8102          continue
8103        fi
8104
8105        if test "$pre_test_object_deps_done" = no; then
8106          if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8107            _LT_TAGVAR(predep_objects, $1)="$p"
8108          else
8109            _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8110          fi
8111        else
8112          if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8113            _LT_TAGVAR(postdep_objects, $1)="$p"
8114          else
8115            _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8116          fi
8117        fi
8118        ;;
8119
8120     *) ;; # Ignore the rest.
8121
8122     esac
8123   done
8124
8125   # Clean up.
8126   rm -f a.out a.exe
8127 else
8128   echo "libtool.m4: error: problem compiling $1 test program"
8129 fi
8130
8131 $RM -f confest.$objext
8132
8133 # PORTME: override above test on systems where it is broken
8134 m4_if([$1], [CXX],
8135 [case $host_os in
8136 interix[[3-9]]*)
8137   # Interix 3.5 installs completely hosed .la files for C++, so rather than
8138   # hack all around it, let's just trust "g++" to DTRT.
8139   _LT_TAGVAR(predep_objects,$1)=
8140   _LT_TAGVAR(postdep_objects,$1)=
8141   _LT_TAGVAR(postdeps,$1)=
8142   ;;
8143
8144 linux*)
8145   case `$CC -V 2>&1 | sed 5q` in
8146   *Sun\ C*)
8147     # Sun C++ 5.9
8148
8149     # The more standards-conforming stlport4 library is
8150     # incompatible with the Cstd library. Avoid specifying
8151     # it if it's in CXXFLAGS. Ignore libCrun as
8152     # -library=stlport4 depends on it.
8153     case " $CXX $CXXFLAGS " in
8154     *" -library=stlport4 "*)
8155       solaris_use_stlport4=yes
8156       ;;
8157     esac
8158
8159     if test "$solaris_use_stlport4" != yes; then
8160       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8161     fi
8162     ;;
8163   esac
8164   ;;
8165
8166 solaris*)
8167   case $cc_basename in
8168   CC*)
8169     # The more standards-conforming stlport4 library is
8170     # incompatible with the Cstd library. Avoid specifying
8171     # it if it's in CXXFLAGS. Ignore libCrun as
8172     # -library=stlport4 depends on it.
8173     case " $CXX $CXXFLAGS " in
8174     *" -library=stlport4 "*)
8175       solaris_use_stlport4=yes
8176       ;;
8177     esac
8178
8179     # Adding this requires a known-good setup of shared libraries for
8180     # Sun compiler versions before 5.6, else PIC objects from an old
8181     # archive will be linked into the output, leading to subtle bugs.
8182     if test "$solaris_use_stlport4" != yes; then
8183       _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8184     fi
8185     ;;
8186   esac
8187   ;;
8188 esac
8189 ])
8190
8191 case " $_LT_TAGVAR(postdeps, $1) " in
8192 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8193 esac
8194  _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8195 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8196  _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8197 fi
8198 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8199     [The directories searched by this compiler when creating a shared library])
8200 _LT_TAGDECL([], [predep_objects], [1],
8201     [Dependencies to place before and after the objects being linked to
8202     create a shared library])
8203 _LT_TAGDECL([], [postdep_objects], [1])
8204 _LT_TAGDECL([], [predeps], [1])
8205 _LT_TAGDECL([], [postdeps], [1])
8206 _LT_TAGDECL([], [compiler_lib_search_path], [1],
8207     [The library search path used internally by the compiler when linking
8208     a shared library])
8209 ])# _LT_SYS_HIDDEN_LIBDEPS
8210
8211
8212 # _LT_PROG_F77
8213 # ------------
8214 # Since AC_PROG_F77 is broken, in that it returns the empty string
8215 # if there is no fortran compiler, we have our own version here.
8216 m4_defun([_LT_PROG_F77],
8217 [
8218 pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
8219 AC_PROG_F77
8220 if test -z "$F77" || test "X$F77" = "Xno"; then
8221   _lt_disable_F77=yes
8222 fi
8223 popdef([AC_MSG_ERROR])
8224 ])# _LT_PROG_F77
8225
8226 dnl aclocal-1.4 backwards compatibility:
8227 dnl AC_DEFUN([_LT_PROG_F77], [])
8228
8229
8230 # _LT_LANG_F77_CONFIG([TAG])
8231 # --------------------------
8232 # Ensure that the configuration variables for a Fortran 77 compiler are
8233 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8234 # to write the compiler configuration to `libtool'.
8235 m4_defun([_LT_LANG_F77_CONFIG],
8236 [AC_REQUIRE([_LT_PROG_F77])dnl
8237 AC_LANG_PUSH(Fortran 77)
8238
8239 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8240 _LT_TAGVAR(allow_undefined_flag, $1)=
8241 _LT_TAGVAR(always_export_symbols, $1)=no
8242 _LT_TAGVAR(archive_expsym_cmds, $1)=
8243 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8244 _LT_TAGVAR(hardcode_direct, $1)=no
8245 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8246 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8247 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8248 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8249 _LT_TAGVAR(hardcode_minus_L, $1)=no
8250 _LT_TAGVAR(hardcode_automatic, $1)=no
8251 _LT_TAGVAR(inherit_rpath, $1)=no
8252 _LT_TAGVAR(module_cmds, $1)=
8253 _LT_TAGVAR(module_expsym_cmds, $1)=
8254 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8255 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8256 _LT_TAGVAR(no_undefined_flag, $1)=
8257 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8258 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8259
8260 # Source file extension for f77 test sources.
8261 ac_ext=f
8262
8263 # Object file extension for compiled f77 test sources.
8264 objext=o
8265 _LT_TAGVAR(objext, $1)=$objext
8266
8267 # No sense in running all these tests if we already determined that
8268 # the F77 compiler isn't working.  Some variables (like enable_shared)
8269 # are currently assumed to apply to all compilers on this platform,
8270 # and will be corrupted by setting them based on a non-working compiler.
8271 if test "$_lt_disable_F77" != yes; then
8272   # Code to be used in simple compile tests
8273   lt_simple_compile_test_code="\
8274       subroutine t
8275       return
8276       end
8277 "
8278
8279   # Code to be used in simple link tests
8280   lt_simple_link_test_code="\
8281       program t
8282       end
8283 "
8284
8285   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8286   _LT_TAG_COMPILER
8287
8288   # save warnings/boilerplate of simple test code
8289   _LT_COMPILER_BOILERPLATE
8290   _LT_LINKER_BOILERPLATE
8291
8292   # Allow CC to be a program name with arguments.
8293   lt_save_CC="$CC"
8294   lt_save_GCC=$GCC
8295   CC=${F77-"f77"}
8296   compiler=$CC
8297   _LT_TAGVAR(compiler, $1)=$CC
8298   _LT_CC_BASENAME([$compiler])
8299   GCC=$G77
8300   if test -n "$compiler"; then
8301     AC_MSG_CHECKING([if libtool supports shared libraries])
8302     AC_MSG_RESULT([$can_build_shared])
8303
8304     AC_MSG_CHECKING([whether to build shared libraries])
8305     test "$can_build_shared" = "no" && enable_shared=no
8306
8307     # On AIX, shared libraries and static libraries use the same namespace, and
8308     # are all built from PIC.
8309     case $host_os in
8310       aix3*)
8311         test "$enable_shared" = yes && enable_static=no
8312         if test -n "$RANLIB"; then
8313           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8314           postinstall_cmds='$RANLIB $lib'
8315         fi
8316         ;;
8317       aix[[4-9]]*)
8318         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8319           test "$enable_shared" = yes && enable_static=no
8320         fi
8321         ;;
8322     esac
8323     AC_MSG_RESULT([$enable_shared])
8324
8325     AC_MSG_CHECKING([whether to build static libraries])
8326     # Make sure either enable_shared or enable_static is yes.
8327     test "$enable_shared" = yes || enable_static=yes
8328     AC_MSG_RESULT([$enable_static])
8329
8330     _LT_TAGVAR(GCC, $1)="$G77"
8331     _LT_TAGVAR(LD, $1)="$LD"
8332
8333     ## CAVEAT EMPTOR:
8334     ## There is no encapsulation within the following macros, do not change
8335     ## the running order or otherwise move them around unless you know exactly
8336     ## what you are doing...
8337     _LT_COMPILER_PIC($1)
8338     _LT_COMPILER_C_O($1)
8339     _LT_COMPILER_FILE_LOCKS($1)
8340     _LT_LINKER_SHLIBS($1)
8341     _LT_SYS_DYNAMIC_LINKER($1)
8342     _LT_LINKER_HARDCODE_LIBPATH($1)
8343
8344     _LT_CONFIG($1)
8345   fi # test -n "$compiler"
8346
8347   GCC=$lt_save_GCC
8348   CC="$lt_save_CC"
8349 fi # test "$_lt_disable_F77" != yes
8350
8351 AC_LANG_POP
8352 ])# _LT_LANG_F77_CONFIG
8353
8354
8355 # _LT_PROG_FC
8356 # -----------
8357 # Since AC_PROG_FC is broken, in that it returns the empty string
8358 # if there is no fortran compiler, we have our own version here.
8359 m4_defun([_LT_PROG_FC],
8360 [
8361 pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
8362 AC_PROG_FC
8363 if test -z "$FC" || test "X$FC" = "Xno"; then
8364   _lt_disable_FC=yes
8365 fi
8366 popdef([AC_MSG_ERROR])
8367 ])# _LT_PROG_FC
8368
8369 dnl aclocal-1.4 backwards compatibility:
8370 dnl AC_DEFUN([_LT_PROG_FC], [])
8371
8372
8373 # _LT_LANG_FC_CONFIG([TAG])
8374 # -------------------------
8375 # Ensure that the configuration variables for a Fortran compiler are
8376 # suitably defined.  These variables are subsequently used by _LT_CONFIG
8377 # to write the compiler configuration to `libtool'.
8378 m4_defun([_LT_LANG_FC_CONFIG],
8379 [AC_REQUIRE([_LT_PROG_FC])dnl
8380 AC_LANG_PUSH(Fortran)
8381
8382 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8383 _LT_TAGVAR(allow_undefined_flag, $1)=
8384 _LT_TAGVAR(always_export_symbols, $1)=no
8385 _LT_TAGVAR(archive_expsym_cmds, $1)=
8386 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
8387 _LT_TAGVAR(hardcode_direct, $1)=no
8388 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
8389 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8390 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8391 _LT_TAGVAR(hardcode_libdir_separator, $1)=
8392 _LT_TAGVAR(hardcode_minus_L, $1)=no
8393 _LT_TAGVAR(hardcode_automatic, $1)=no
8394 _LT_TAGVAR(inherit_rpath, $1)=no
8395 _LT_TAGVAR(module_cmds, $1)=
8396 _LT_TAGVAR(module_expsym_cmds, $1)=
8397 _LT_TAGVAR(link_all_deplibs, $1)=unknown
8398 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8399 _LT_TAGVAR(no_undefined_flag, $1)=
8400 _LT_TAGVAR(whole_archive_flag_spec, $1)=
8401 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8402
8403 # Source file extension for fc test sources.
8404 ac_ext=${ac_fc_srcext-f}
8405
8406 # Object file extension for compiled fc test sources.
8407 objext=o
8408 _LT_TAGVAR(objext, $1)=$objext
8409
8410 # No sense in running all these tests if we already determined that
8411 # the FC compiler isn't working.  Some variables (like enable_shared)
8412 # are currently assumed to apply to all compilers on this platform,
8413 # and will be corrupted by setting them based on a non-working compiler.
8414 if test "$_lt_disable_FC" != yes; then
8415   # Code to be used in simple compile tests
8416   lt_simple_compile_test_code="\
8417       subroutine t
8418       return
8419       end
8420 "
8421
8422   # Code to be used in simple link tests
8423   lt_simple_link_test_code="\
8424       program t
8425       end
8426 "
8427
8428   # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8429   _LT_TAG_COMPILER
8430
8431   # save warnings/boilerplate of simple test code
8432   _LT_COMPILER_BOILERPLATE
8433   _LT_LINKER_BOILERPLATE
8434
8435   # Allow CC to be a program name with arguments.
8436   lt_save_CC="$CC"
8437   lt_save_GCC=$GCC
8438   CC=${FC-"f95"}
8439   compiler=$CC
8440   GCC=$ac_cv_fc_compiler_gnu
8441
8442   _LT_TAGVAR(compiler, $1)=$CC
8443   _LT_CC_BASENAME([$compiler])
8444
8445   if test -n "$compiler"; then
8446     AC_MSG_CHECKING([if libtool supports shared libraries])
8447     AC_MSG_RESULT([$can_build_shared])
8448
8449     AC_MSG_CHECKING([whether to build shared libraries])
8450     test "$can_build_shared" = "no" && enable_shared=no
8451
8452     # On AIX, shared libraries and static libraries use the same namespace, and
8453     # are all built from PIC.
8454     case $host_os in
8455       aix3*)
8456         test "$enable_shared" = yes && enable_static=no
8457         if test -n "$RANLIB"; then
8458           archive_cmds="$archive_cmds~\$RANLIB \$lib"
8459           postinstall_cmds='$RANLIB $lib'
8460         fi
8461         ;;
8462       aix[[4-9]]*)
8463         if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8464           test "$enable_shared" = yes && enable_static=no
8465         fi
8466         ;;
8467     esac
8468     AC_MSG_RESULT([$enable_shared])
8469
8470     AC_MSG_CHECKING([whether to build static libraries])
8471     # Make sure either enable_shared or enable_static is yes.
8472     test "$enable_shared" = yes || enable_static=yes
8473     AC_MSG_RESULT([$enable_static])
8474
8475     _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8476     _LT_TAGVAR(LD, $1)="$LD"
8477
8478     ## CAVEAT EMPTOR:
8479     ## There is no encapsulation within the following macros, do not change
8480     ## the running order or otherwise move them around unless you know exactly
8481     ## what you are doing...
8482     _LT_SYS_HIDDEN_LIBDEPS($1)
8483     _LT_COMPILER_PIC($1)
8484     _LT_COMPILER_C_O($1)
8485     _LT_COMPILER_FILE_LOCKS($1)
8486     _LT_LINKER_SHLIBS($1)
8487     _LT_SYS_DYNAMIC_LINKER($1)
8488     _LT_LINKER_HARDCODE_LIBPATH($1)
8489
8490     _LT_CONFIG($1)
8491   fi # test -n "$compiler"
8492
8493   GCC=$lt_save_GCC
8494   CC="$lt_save_CC"
8495 fi # test "$_lt_disable_FC" != yes
8496
8497 AC_LANG_POP
8498 ])# _LT_LANG_FC_CONFIG
8499
8500
8501 # _LT_LANG_GCJ_CONFIG([TAG])
8502 # --------------------------
8503 # Ensure that the configuration variables for the GNU Java Compiler compiler
8504 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8505 # to write the compiler configuration to `libtool'.
8506 m4_defun([_LT_LANG_GCJ_CONFIG],
8507 [AC_REQUIRE([LT_PROG_GCJ])dnl
8508 AC_LANG_SAVE
8509
8510 # Source file extension for Java test sources.
8511 ac_ext=java
8512
8513 # Object file extension for compiled Java test sources.
8514 objext=o
8515 _LT_TAGVAR(objext, $1)=$objext
8516
8517 # Code to be used in simple compile tests
8518 lt_simple_compile_test_code="class foo {}"
8519
8520 # Code to be used in simple link tests
8521 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8522
8523 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8524 _LT_TAG_COMPILER
8525
8526 # save warnings/boilerplate of simple test code
8527 _LT_COMPILER_BOILERPLATE
8528 _LT_LINKER_BOILERPLATE
8529
8530 # Allow CC to be a program name with arguments.
8531 lt_save_CC="$CC"
8532 lt_save_GCC=$GCC
8533 GCC=yes
8534 CC=${GCJ-"gcj"}
8535 compiler=$CC
8536 _LT_TAGVAR(compiler, $1)=$CC
8537 _LT_TAGVAR(LD, $1)="$LD"
8538 _LT_CC_BASENAME([$compiler])
8539
8540 # GCJ did not exist at the time GCC didn't implicitly link libc in.
8541 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8542
8543 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8544
8545 if test -n "$compiler"; then
8546   _LT_COMPILER_NO_RTTI($1)
8547   _LT_COMPILER_PIC($1)
8548   _LT_COMPILER_C_O($1)
8549   _LT_COMPILER_FILE_LOCKS($1)
8550   _LT_LINKER_SHLIBS($1)
8551   _LT_LINKER_HARDCODE_LIBPATH($1)
8552
8553   _LT_CONFIG($1)
8554 fi
8555
8556 AC_LANG_RESTORE
8557
8558 GCC=$lt_save_GCC
8559 CC="$lt_save_CC"
8560 ])# _LT_LANG_GCJ_CONFIG
8561
8562
8563 # _LT_LANG_RC_CONFIG([TAG])
8564 # -------------------------
8565 # Ensure that the configuration variables for the Windows resource compiler
8566 # are suitably defined.  These variables are subsequently used by _LT_CONFIG
8567 # to write the compiler configuration to `libtool'.
8568 m4_defun([_LT_LANG_RC_CONFIG],
8569 [AC_REQUIRE([LT_PROG_RC])dnl
8570 AC_LANG_SAVE
8571
8572 # Source file extension for RC test sources.
8573 ac_ext=rc
8574
8575 # Object file extension for compiled RC test sources.
8576 objext=o
8577 _LT_TAGVAR(objext, $1)=$objext
8578
8579 # Code to be used in simple compile tests
8580 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8581
8582 # Code to be used in simple link tests
8583 lt_simple_link_test_code="$lt_simple_compile_test_code"
8584
8585 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8586 _LT_TAG_COMPILER
8587
8588 # save warnings/boilerplate of simple test code
8589 _LT_COMPILER_BOILERPLATE
8590 _LT_LINKER_BOILERPLATE
8591
8592 # Allow CC to be a program name with arguments.
8593 lt_save_CC="$CC"
8594 lt_save_GCC=$GCC
8595 GCC=
8596 CC=${RC-"windres"}
8597 compiler=$CC
8598 _LT_TAGVAR(compiler, $1)=$CC
8599 _LT_CC_BASENAME([$compiler])
8600 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8601
8602 if test -n "$compiler"; then
8603   :
8604   _LT_CONFIG($1)
8605 fi
8606
8607 GCC=$lt_save_GCC
8608 AC_LANG_RESTORE
8609 CC="$lt_save_CC"
8610 ])# _LT_LANG_RC_CONFIG
8611
8612
8613 # LT_PROG_GCJ
8614 # -----------
8615 AC_DEFUN([LT_PROG_GCJ],
8616 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8617   [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8618     [AC_CHECK_TOOL(GCJ, gcj,)
8619       test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8620       AC_SUBST(GCJFLAGS)])])[]dnl
8621 ])
8622
8623 # Old name:
8624 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8625 dnl aclocal-1.4 backwards compatibility:
8626 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8627
8628
8629 # LT_PROG_RC
8630 # ----------
8631 AC_DEFUN([LT_PROG_RC],
8632 [AC_CHECK_TOOL(RC, windres,)
8633 ])
8634
8635 # Old name:
8636 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8637 dnl aclocal-1.4 backwards compatibility:
8638 dnl AC_DEFUN([LT_AC_PROG_RC], [])
8639
8640
8641 # _LT_DECL_EGREP
8642 # --------------
8643 # If we don't have a new enough Autoconf to choose the best grep
8644 # available, choose the one first in the user's PATH.
8645 m4_defun([_LT_DECL_EGREP],
8646 [AC_REQUIRE([AC_PROG_EGREP])dnl
8647 AC_REQUIRE([AC_PROG_FGREP])dnl
8648 test -z "$GREP" && GREP=grep
8649 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8650 _LT_DECL([], [EGREP], [1], [An ERE matcher])
8651 _LT_DECL([], [FGREP], [1], [A literal string matcher])
8652 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8653 AC_SUBST([GREP])
8654 ])
8655
8656
8657 # _LT_DECL_OBJDUMP
8658 # --------------
8659 # If we don't have a new enough Autoconf to choose the best objdump
8660 # available, choose the one first in the user's PATH.
8661 m4_defun([_LT_DECL_OBJDUMP],
8662 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
8663 test -z "$OBJDUMP" && OBJDUMP=objdump
8664 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8665 AC_SUBST([OBJDUMP])
8666 ])
8667
8668
8669 # _LT_DECL_SED
8670 # ------------
8671 # Check for a fully-functional sed program, that truncates
8672 # as few characters as possible.  Prefer GNU sed if found.
8673 m4_defun([_LT_DECL_SED],
8674 [AC_PROG_SED
8675 test -z "$SED" && SED=sed
8676 Xsed="$SED -e 1s/^X//"
8677 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8678 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8679     [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8680 ])# _LT_DECL_SED
8681
8682 m4_ifndef([AC_PROG_SED], [
8683 # NOTE: This macro has been submitted for inclusion into   #
8684 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8685 #  a released version of Autoconf we should remove this    #
8686 #  macro and use it instead.                               #
8687
8688 m4_defun([AC_PROG_SED],
8689 [AC_MSG_CHECKING([for a sed that does not truncate output])
8690 AC_CACHE_VAL(lt_cv_path_SED,
8691 [# Loop through the user's path and test for sed and gsed.
8692 # Then use that list of sed's as ones to test for truncation.
8693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8694 for as_dir in $PATH
8695 do
8696   IFS=$as_save_IFS
8697   test -z "$as_dir" && as_dir=.
8698   for lt_ac_prog in sed gsed; do
8699     for ac_exec_ext in '' $ac_executable_extensions; do
8700       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8701         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8702       fi
8703     done
8704   done
8705 done
8706 IFS=$as_save_IFS
8707 lt_ac_max=0
8708 lt_ac_count=0
8709 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
8710 # along with /bin/sed that truncates output.
8711 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8712   test ! -f $lt_ac_sed && continue
8713   cat /dev/null > conftest.in
8714   lt_ac_count=0
8715   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8716   # Check for GNU sed and select it if it is found.
8717   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8718     lt_cv_path_SED=$lt_ac_sed
8719     break
8720   fi
8721   while true; do
8722     cat conftest.in conftest.in >conftest.tmp
8723     mv conftest.tmp conftest.in
8724     cp conftest.in conftest.nl
8725     echo >>conftest.nl
8726     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8727     cmp -s conftest.out conftest.nl || break
8728     # 10000 chars as input seems more than enough
8729     test $lt_ac_count -gt 10 && break
8730     lt_ac_count=`expr $lt_ac_count + 1`
8731     if test $lt_ac_count -gt $lt_ac_max; then
8732       lt_ac_max=$lt_ac_count
8733       lt_cv_path_SED=$lt_ac_sed
8734     fi
8735   done
8736 done
8737 ])
8738 SED=$lt_cv_path_SED
8739 AC_SUBST([SED])
8740 AC_MSG_RESULT([$SED])
8741 ])#AC_PROG_SED
8742 ])#m4_ifndef
8743
8744 # Old name:
8745 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8746 dnl aclocal-1.4 backwards compatibility:
8747 dnl AC_DEFUN([LT_AC_PROG_SED], [])
8748
8749
8750 # _LT_CHECK_SHELL_FEATURES
8751 # ------------------------
8752 # Find out whether the shell is Bourne or XSI compatible,
8753 # or has some other useful features.
8754 m4_defun([_LT_CHECK_SHELL_FEATURES],
8755 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8756 # Try some XSI features
8757 xsi_shell=no
8758 ( _lt_dummy="a/b/c"
8759   test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
8760       = c,a/b,, \
8761     && eval 'test $(( 1 + 1 )) -eq 2 \
8762     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8763   && xsi_shell=yes
8764 AC_MSG_RESULT([$xsi_shell])
8765 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8766
8767 AC_MSG_CHECKING([whether the shell understands "+="])
8768 lt_shell_append=no
8769 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8770     >/dev/null 2>&1 \
8771   && lt_shell_append=yes
8772 AC_MSG_RESULT([$lt_shell_append])
8773 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8774
8775 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8776   lt_unset=unset
8777 else
8778   lt_unset=false
8779 fi
8780 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8781
8782 # test EBCDIC or ASCII
8783 case `echo X|tr X '\101'` in
8784  A) # ASCII based system
8785     # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8786   lt_SP2NL='tr \040 \012'
8787   lt_NL2SP='tr \015\012 \040\040'
8788   ;;
8789  *) # EBCDIC based system
8790   lt_SP2NL='tr \100 \n'
8791   lt_NL2SP='tr \r\n \100\100'
8792   ;;
8793 esac
8794 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8795 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8796 ])# _LT_CHECK_SHELL_FEATURES
8797
8798
8799 # _LT_PROG_XSI_SHELLFNS
8800 # ---------------------
8801 # Bourne and XSI compatible variants of some useful shell functions.
8802 m4_defun([_LT_PROG_XSI_SHELLFNS],
8803 [case $xsi_shell in
8804   yes)
8805     cat << \_LT_EOF >> "$cfgfile"
8806
8807 # func_dirname file append nondir_replacement
8808 # Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8809 # otherwise set result to NONDIR_REPLACEMENT.
8810 func_dirname ()
8811 {
8812   case ${1} in
8813     */*) func_dirname_result="${1%/*}${2}" ;;
8814     *  ) func_dirname_result="${3}" ;;
8815   esac
8816 }
8817
8818 # func_basename file
8819 func_basename ()
8820 {
8821   func_basename_result="${1##*/}"
8822 }
8823
8824 # func_dirname_and_basename file append nondir_replacement
8825 # perform func_basename and func_dirname in a single function
8826 # call:
8827 #   dirname:  Compute the dirname of FILE.  If nonempty,
8828 #             add APPEND to the result, otherwise set result
8829 #             to NONDIR_REPLACEMENT.
8830 #             value returned in "$func_dirname_result"
8831 #   basename: Compute filename of FILE.
8832 #             value retuned in "$func_basename_result"
8833 # Implementation must be kept synchronized with func_dirname
8834 # and func_basename. For efficiency, we do not delegate to
8835 # those functions but instead duplicate the functionality here.
8836 func_dirname_and_basename ()
8837 {
8838   case ${1} in
8839     */*) func_dirname_result="${1%/*}${2}" ;;
8840     *  ) func_dirname_result="${3}" ;;
8841   esac
8842   func_basename_result="${1##*/}"
8843 }
8844
8845 # func_stripname prefix suffix name
8846 # strip PREFIX and SUFFIX off of NAME.
8847 # PREFIX and SUFFIX must not contain globbing or regex special
8848 # characters, hashes, percent signs, but SUFFIX may contain a leading
8849 # dot (in which case that matches only a dot).
8850 func_stripname ()
8851 {
8852   # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8853   # positional parameters, so assign one to ordinary parameter first.
8854   func_stripname_result=${3}
8855   func_stripname_result=${func_stripname_result#"${1}"}
8856   func_stripname_result=${func_stripname_result%"${2}"}
8857 }
8858
8859 # func_opt_split
8860 func_opt_split ()
8861 {
8862   func_opt_split_opt=${1%%=*}
8863   func_opt_split_arg=${1#*=}
8864 }
8865
8866 # func_lo2o object
8867 func_lo2o ()
8868 {
8869   case ${1} in
8870     *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8871     *)    func_lo2o_result=${1} ;;
8872   esac
8873 }
8874
8875 # func_xform libobj-or-source
8876 func_xform ()
8877 {
8878   func_xform_result=${1%.*}.lo
8879 }
8880
8881 # func_arith arithmetic-term...
8882 func_arith ()
8883 {
8884   func_arith_result=$(( $[*] ))
8885 }
8886
8887 # func_len string
8888 # STRING may not start with a hyphen.
8889 func_len ()
8890 {
8891   func_len_result=${#1}
8892 }
8893
8894 _LT_EOF
8895     ;;
8896   *) # Bourne compatible functions.
8897     cat << \_LT_EOF >> "$cfgfile"
8898
8899 # func_dirname file append nondir_replacement
8900 # Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8901 # otherwise set result to NONDIR_REPLACEMENT.
8902 func_dirname ()
8903 {
8904   # Extract subdirectory from the argument.
8905   func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
8906   if test "X$func_dirname_result" = "X${1}"; then
8907     func_dirname_result="${3}"
8908   else
8909     func_dirname_result="$func_dirname_result${2}"
8910   fi
8911 }
8912
8913 # func_basename file
8914 func_basename ()
8915 {
8916   func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
8917 }
8918
8919 dnl func_dirname_and_basename
8920 dnl A portable version of this function is already defined in general.m4sh
8921 dnl so there is no need for it here.
8922
8923 # func_stripname prefix suffix name
8924 # strip PREFIX and SUFFIX off of NAME.
8925 # PREFIX and SUFFIX must not contain globbing or regex special
8926 # characters, hashes, percent signs, but SUFFIX may contain a leading
8927 # dot (in which case that matches only a dot).
8928 # func_strip_suffix prefix name
8929 func_stripname ()
8930 {
8931   case ${2} in
8932     .*) func_stripname_result=`$ECHO "X${3}" \
8933            | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
8934     *)  func_stripname_result=`$ECHO "X${3}" \
8935            | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
8936   esac
8937 }
8938
8939 # sed scripts:
8940 my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8941 my_sed_long_arg='1s/^-[[^=]]*=//'
8942
8943 # func_opt_split
8944 func_opt_split ()
8945 {
8946   func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
8947   func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
8948 }
8949
8950 # func_lo2o object
8951 func_lo2o ()
8952 {
8953   func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
8954 }
8955
8956 # func_xform libobj-or-source
8957 func_xform ()
8958 {
8959   func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
8960 }
8961
8962 # func_arith arithmetic-term...
8963 func_arith ()
8964 {
8965   func_arith_result=`expr "$[@]"`
8966 }
8967
8968 # func_len string
8969 # STRING may not start with a hyphen.
8970 func_len ()
8971 {
8972   func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8973 }
8974
8975 _LT_EOF
8976 esac
8977
8978 case $lt_shell_append in
8979   yes)
8980     cat << \_LT_EOF >> "$cfgfile"
8981
8982 # func_append var value
8983 # Append VALUE to the end of shell variable VAR.
8984 func_append ()
8985 {
8986   eval "$[1]+=\$[2]"
8987 }
8988 _LT_EOF
8989     ;;
8990   *)
8991     cat << \_LT_EOF >> "$cfgfile"
8992
8993 # func_append var value
8994 # Append VALUE to the end of shell variable VAR.
8995 func_append ()
8996 {
8997   eval "$[1]=\$$[1]\$[2]"
8998 }
8999
9000 _LT_EOF
9001     ;;
9002   esac
9003 ])
9004
9005 # Helper functions for option handling.                    -*- Autoconf -*-
9006 #
9007 #   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9008 #   Written by Gary V. Vaughan, 2004
9009 #
9010 # This file is free software; the Free Software Foundation gives
9011 # unlimited permission to copy and/or distribute it, with or without
9012 # modifications, as long as this notice is preserved.
9013
9014 # serial 6 ltoptions.m4
9015
9016 # This is to help aclocal find these macros, as it can't see m4_define.
9017 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9018
9019
9020 # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9021 # ------------------------------------------
9022 m4_define([_LT_MANGLE_OPTION],
9023 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9024
9025
9026 # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9027 # ---------------------------------------
9028 # Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9029 # matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9030 # saved as a flag.
9031 m4_define([_LT_SET_OPTION],
9032 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9033 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9034         _LT_MANGLE_DEFUN([$1], [$2]),
9035     [m4_warning([Unknown $1 option `$2'])])[]dnl
9036 ])
9037
9038
9039 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9040 # ------------------------------------------------------------
9041 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9042 m4_define([_LT_IF_OPTION],
9043 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9044
9045
9046 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9047 # -------------------------------------------------------
9048 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9049 # are set.
9050 m4_define([_LT_UNLESS_OPTIONS],
9051 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9052             [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9053                       [m4_define([$0_found])])])[]dnl
9054 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9055 ])[]dnl
9056 ])
9057
9058
9059 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9060 # ----------------------------------------
9061 # OPTION-LIST is a space-separated list of Libtool options associated
9062 # with MACRO-NAME.  If any OPTION has a matching handler declared with
9063 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9064 # the unknown option and exit.
9065 m4_defun([_LT_SET_OPTIONS],
9066 [# Set options
9067 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9068     [_LT_SET_OPTION([$1], _LT_Option)])
9069
9070 m4_if([$1],[LT_INIT],[
9071   dnl
9072   dnl Simply set some default values (i.e off) if boolean options were not
9073   dnl specified:
9074   _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9075   ])
9076   _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9077   ])
9078   dnl
9079   dnl If no reference was made to various pairs of opposing options, then
9080   dnl we run the default mode handler for the pair.  For example, if neither
9081   dnl `shared' nor `disable-shared' was passed, we enable building of shared
9082   dnl archives by default:
9083   _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9084   _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9085   _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9086   _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9087                    [_LT_ENABLE_FAST_INSTALL])
9088   ])
9089 ])# _LT_SET_OPTIONS
9090
9091
9092
9093 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9094 # -----------------------------------------
9095 m4_define([_LT_MANGLE_DEFUN],
9096 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9097
9098
9099 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9100 # -----------------------------------------------
9101 m4_define([LT_OPTION_DEFINE],
9102 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9103 ])# LT_OPTION_DEFINE
9104
9105
9106 # dlopen
9107 # ------
9108 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9109 ])
9110
9111 AU_DEFUN([AC_LIBTOOL_DLOPEN],
9112 [_LT_SET_OPTION([LT_INIT], [dlopen])
9113 AC_DIAGNOSE([obsolete],
9114 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9115 put the `dlopen' option into LT_INIT's first parameter.])
9116 ])
9117
9118 dnl aclocal-1.4 backwards compatibility:
9119 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9120
9121
9122 # win32-dll
9123 # ---------
9124 # Declare package support for building win32 dll's.
9125 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9126 [enable_win32_dll=yes
9127
9128 case $host in
9129 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
9130   AC_CHECK_TOOL(AS, as, false)
9131   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9132   AC_CHECK_TOOL(OBJDUMP, objdump, false)
9133   ;;
9134 esac
9135
9136 test -z "$AS" && AS=as
9137 _LT_DECL([], [AS],      [0], [Assembler program])dnl
9138
9139 test -z "$DLLTOOL" && DLLTOOL=dlltool
9140 _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
9141
9142 test -z "$OBJDUMP" && OBJDUMP=objdump
9143 _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
9144 ])# win32-dll
9145
9146 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9147 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
9148 _LT_SET_OPTION([LT_INIT], [win32-dll])
9149 AC_DIAGNOSE([obsolete],
9150 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9151 put the `win32-dll' option into LT_INIT's first parameter.])
9152 ])
9153
9154 dnl aclocal-1.4 backwards compatibility:
9155 dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9156
9157
9158 # _LT_ENABLE_SHARED([DEFAULT])
9159 # ----------------------------
9160 # implement the --enable-shared flag, and supports the `shared' and
9161 # `disable-shared' LT_INIT options.
9162 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9163 m4_define([_LT_ENABLE_SHARED],
9164 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9165 AC_ARG_ENABLE([shared],
9166     [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9167         [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9168     [p=${PACKAGE-default}
9169     case $enableval in
9170     yes) enable_shared=yes ;;
9171     no) enable_shared=no ;;
9172     *)
9173       enable_shared=no
9174       # Look at the argument we got.  We use all the common list separators.
9175       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9176       for pkg in $enableval; do
9177         IFS="$lt_save_ifs"
9178         if test "X$pkg" = "X$p"; then
9179           enable_shared=yes
9180         fi
9181       done
9182       IFS="$lt_save_ifs"
9183       ;;
9184     esac],
9185     [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9186
9187     _LT_DECL([build_libtool_libs], [enable_shared], [0],
9188         [Whether or not to build shared libraries])
9189 ])# _LT_ENABLE_SHARED
9190
9191 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9192 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9193
9194 # Old names:
9195 AC_DEFUN([AC_ENABLE_SHARED],
9196 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9197 ])
9198
9199 AC_DEFUN([AC_DISABLE_SHARED],
9200 [_LT_SET_OPTION([LT_INIT], [disable-shared])
9201 ])
9202
9203 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9204 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9205
9206 dnl aclocal-1.4 backwards compatibility:
9207 dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9208 dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9209
9210
9211
9212 # _LT_ENABLE_STATIC([DEFAULT])
9213 # ----------------------------
9214 # implement the --enable-static flag, and support the `static' and
9215 # `disable-static' LT_INIT options.
9216 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9217 m4_define([_LT_ENABLE_STATIC],
9218 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9219 AC_ARG_ENABLE([static],
9220     [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9221         [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9222     [p=${PACKAGE-default}
9223     case $enableval in
9224     yes) enable_static=yes ;;
9225     no) enable_static=no ;;
9226     *)
9227      enable_static=no
9228       # Look at the argument we got.  We use all the common list separators.
9229       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9230       for pkg in $enableval; do
9231         IFS="$lt_save_ifs"
9232         if test "X$pkg" = "X$p"; then
9233           enable_static=yes
9234         fi
9235       done
9236       IFS="$lt_save_ifs"
9237       ;;
9238     esac],
9239     [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9240
9241     _LT_DECL([build_old_libs], [enable_static], [0],
9242         [Whether or not to build static libraries])
9243 ])# _LT_ENABLE_STATIC
9244
9245 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9246 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9247
9248 # Old names:
9249 AC_DEFUN([AC_ENABLE_STATIC],
9250 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9251 ])
9252
9253 AC_DEFUN([AC_DISABLE_STATIC],
9254 [_LT_SET_OPTION([LT_INIT], [disable-static])
9255 ])
9256
9257 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9258 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9259
9260 dnl aclocal-1.4 backwards compatibility:
9261 dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9262 dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9263
9264
9265
9266 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
9267 # ----------------------------------
9268 # implement the --enable-fast-install flag, and support the `fast-install'
9269 # and `disable-fast-install' LT_INIT options.
9270 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9271 m4_define([_LT_ENABLE_FAST_INSTALL],
9272 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9273 AC_ARG_ENABLE([fast-install],
9274     [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9275     [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9276     [p=${PACKAGE-default}
9277     case $enableval in
9278     yes) enable_fast_install=yes ;;
9279     no) enable_fast_install=no ;;
9280     *)
9281       enable_fast_install=no
9282       # Look at the argument we got.  We use all the common list separators.
9283       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9284       for pkg in $enableval; do
9285         IFS="$lt_save_ifs"
9286         if test "X$pkg" = "X$p"; then
9287           enable_fast_install=yes
9288         fi
9289       done
9290       IFS="$lt_save_ifs"
9291       ;;
9292     esac],
9293     [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9294
9295 _LT_DECL([fast_install], [enable_fast_install], [0],
9296          [Whether or not to optimize for fast installation])dnl
9297 ])# _LT_ENABLE_FAST_INSTALL
9298
9299 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9300 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9301
9302 # Old names:
9303 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9304 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9305 AC_DIAGNOSE([obsolete],
9306 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9307 the `fast-install' option into LT_INIT's first parameter.])
9308 ])
9309
9310 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9311 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9312 AC_DIAGNOSE([obsolete],
9313 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
9314 the `disable-fast-install' option into LT_INIT's first parameter.])
9315 ])
9316
9317 dnl aclocal-1.4 backwards compatibility:
9318 dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9319 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9320
9321
9322 # _LT_WITH_PIC([MODE])
9323 # --------------------
9324 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
9325 # LT_INIT options.
9326 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9327 m4_define([_LT_WITH_PIC],
9328 [AC_ARG_WITH([pic],
9329     [AS_HELP_STRING([--with-pic],
9330         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9331     [pic_mode="$withval"],
9332     [pic_mode=default])
9333
9334 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9335
9336 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9337 ])# _LT_WITH_PIC
9338
9339 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9340 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9341
9342 # Old name:
9343 AU_DEFUN([AC_LIBTOOL_PICMODE],
9344 [_LT_SET_OPTION([LT_INIT], [pic-only])
9345 AC_DIAGNOSE([obsolete],
9346 [$0: Remove this warning and the call to _LT_SET_OPTION when you
9347 put the `pic-only' option into LT_INIT's first parameter.])
9348 ])
9349
9350 dnl aclocal-1.4 backwards compatibility:
9351 dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9352
9353
9354 m4_define([_LTDL_MODE], [])
9355 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9356                  [m4_define([_LTDL_MODE], [nonrecursive])])
9357 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9358                  [m4_define([_LTDL_MODE], [recursive])])
9359 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9360                  [m4_define([_LTDL_MODE], [subproject])])
9361
9362 m4_define([_LTDL_TYPE], [])
9363 LT_OPTION_DEFINE([LTDL_INIT], [installable],
9364                  [m4_define([_LTDL_TYPE], [installable])])
9365 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9366                  [m4_define([_LTDL_TYPE], [convenience])])
9367
9368 # ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9369 #
9370 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9371 # Written by Gary V. Vaughan, 2004
9372 #
9373 # This file is free software; the Free Software Foundation gives
9374 # unlimited permission to copy and/or distribute it, with or without
9375 # modifications, as long as this notice is preserved.
9376
9377 # serial 6 ltsugar.m4
9378
9379 # This is to help aclocal find these macros, as it can't see m4_define.
9380 AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9381
9382
9383 # lt_join(SEP, ARG1, [ARG2...])
9384 # -----------------------------
9385 # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9386 # associated separator.
9387 # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9388 # versions in m4sugar had bugs.
9389 m4_define([lt_join],
9390 [m4_if([$#], [1], [],
9391        [$#], [2], [[$2]],
9392        [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9393 m4_define([_lt_join],
9394 [m4_if([$#$2], [2], [],
9395        [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9396
9397
9398 # lt_car(LIST)
9399 # lt_cdr(LIST)
9400 # ------------
9401 # Manipulate m4 lists.
9402 # These macros are necessary as long as will still need to support
9403 # Autoconf-2.59 which quotes differently.
9404 m4_define([lt_car], [[$1]])
9405 m4_define([lt_cdr],
9406 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9407        [$#], 1, [],
9408        [m4_dquote(m4_shift($@))])])
9409 m4_define([lt_unquote], $1)
9410
9411
9412 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
9413 # ------------------------------------------
9414 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9415 # Note that neither SEPARATOR nor STRING are expanded; they are appended
9416 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9417 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
9418 # than defined and empty).
9419 #
9420 # This macro is needed until we can rely on Autoconf 2.62, since earlier
9421 # versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9422 m4_define([lt_append],
9423 [m4_define([$1],
9424            m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9425
9426
9427
9428 # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9429 # ----------------------------------------------------------
9430 # Produce a SEP delimited list of all paired combinations of elements of
9431 # PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9432 # has the form PREFIXmINFIXSUFFIXn.
9433 # Needed until we can rely on m4_combine added in Autoconf 2.62.
9434 m4_define([lt_combine],
9435 [m4_if(m4_eval([$# > 3]), [1],
9436        [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9437 [[m4_foreach([_Lt_prefix], [$2],
9438              [m4_foreach([_Lt_suffix],
9439                 ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9440         [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9441
9442
9443 # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9444 # -----------------------------------------------------------------------
9445 # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9446 # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9447 m4_define([lt_if_append_uniq],
9448 [m4_ifdef([$1],
9449           [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9450                  [lt_append([$1], [$2], [$3])$4],
9451                  [$5])],
9452           [lt_append([$1], [$2], [$3])$4])])
9453
9454
9455 # lt_dict_add(DICT, KEY, VALUE)
9456 # -----------------------------
9457 m4_define([lt_dict_add],
9458 [m4_define([$1($2)], [$3])])
9459
9460
9461 # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9462 # --------------------------------------------
9463 m4_define([lt_dict_add_subkey],
9464 [m4_define([$1($2:$3)], [$4])])
9465
9466
9467 # lt_dict_fetch(DICT, KEY, [SUBKEY])
9468 # ----------------------------------
9469 m4_define([lt_dict_fetch],
9470 [m4_ifval([$3],
9471         m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9472     m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9473
9474
9475 # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9476 # -----------------------------------------------------------------
9477 m4_define([lt_if_dict_fetch],
9478 [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9479         [$5],
9480     [$6])])
9481
9482
9483 # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9484 # --------------------------------------------------------------
9485 m4_define([lt_dict_filter],
9486 [m4_if([$5], [], [],
9487   [lt_join(m4_quote(m4_default([$4], [[, ]])),
9488            lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9489                       [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9490 ])
9491
9492 # ltversion.m4 -- version numbers                       -*- Autoconf -*-
9493 #
9494 #   Copyright (C) 2004 Free Software Foundation, Inc.
9495 #   Written by Scott James Remnant, 2004
9496 #
9497 # This file is free software; the Free Software Foundation gives
9498 # unlimited permission to copy and/or distribute it, with or without
9499 # modifications, as long as this notice is preserved.
9500
9501 # Generated from ltversion.in.
9502
9503 # serial 3012 ltversion.m4
9504 # This file is part of GNU Libtool
9505
9506 m4_define([LT_PACKAGE_VERSION], [2.2.6])
9507 m4_define([LT_PACKAGE_REVISION], [1.3012])
9508
9509 AC_DEFUN([LTVERSION_VERSION],
9510 [macro_version='2.2.6'
9511 macro_revision='1.3012'
9512 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9513 _LT_DECL(, macro_revision, 0)
9514 ])
9515
9516 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9517 #
9518 #   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
9519 #   Written by Scott James Remnant, 2004.
9520 #
9521 # This file is free software; the Free Software Foundation gives
9522 # unlimited permission to copy and/or distribute it, with or without
9523 # modifications, as long as this notice is preserved.
9524
9525 # serial 4 lt~obsolete.m4
9526
9527 # These exist entirely to fool aclocal when bootstrapping libtool.
9528 #
9529 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9530 # which have later been changed to m4_define as they aren't part of the
9531 # exported API, or moved to Autoconf or Automake where they belong.
9532 #
9533 # The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9534 # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9535 # using a macro with the same name in our local m4/libtool.m4 it'll
9536 # pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9537 # and doesn't know about Autoconf macros at all.)
9538 #
9539 # So we provide this file, which has a silly filename so it's always
9540 # included after everything else.  This provides aclocal with the
9541 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9542 # because those macros already exist, or will be overwritten later.
9543 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9544 #
9545 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9546 # Yes, that means every name once taken will need to remain here until
9547 # we give up compatibility with versions before 1.7, at which point
9548 # we need to keep only those names which we still refer to.
9549
9550 # This is to help aclocal find these macros, as it can't see m4_define.
9551 AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9552
9553 m4_ifndef([AC_LIBTOOL_LINKER_OPTION],   [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9554 m4_ifndef([AC_PROG_EGREP],              [AC_DEFUN([AC_PROG_EGREP])])
9555 m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9556 m4_ifndef([_LT_AC_SHELL_INIT],          [AC_DEFUN([_LT_AC_SHELL_INIT])])
9557 m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],     [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9558 m4_ifndef([_LT_PROG_LTMAIN],            [AC_DEFUN([_LT_PROG_LTMAIN])])
9559 m4_ifndef([_LT_AC_TAGVAR],              [AC_DEFUN([_LT_AC_TAGVAR])])
9560 m4_ifndef([AC_LTDL_ENABLE_INSTALL],     [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9561 m4_ifndef([AC_LTDL_PREOPEN],            [AC_DEFUN([AC_LTDL_PREOPEN])])
9562 m4_ifndef([_LT_AC_SYS_COMPILER],        [AC_DEFUN([_LT_AC_SYS_COMPILER])])
9563 m4_ifndef([_LT_AC_LOCK],                [AC_DEFUN([_LT_AC_LOCK])])
9564 m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9565 m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],     [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9566 m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],     [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9567 m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9568 m4_ifndef([AC_LIBTOOL_OBJDIR],          [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9569 m4_ifndef([AC_LTDL_OBJDIR],             [AC_DEFUN([AC_LTDL_OBJDIR])])
9570 m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9571 m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],   [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9572 m4_ifndef([AC_PATH_MAGIC],              [AC_DEFUN([AC_PATH_MAGIC])])
9573 m4_ifndef([AC_PROG_LD_GNU],             [AC_DEFUN([AC_PROG_LD_GNU])])
9574 m4_ifndef([AC_PROG_LD_RELOAD_FLAG],     [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9575 m4_ifndef([AC_DEPLIBS_CHECK_METHOD],    [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9576 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9577 m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9578 m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9579 m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],  [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9580 m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],  [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9581 m4_ifndef([LT_AC_PROG_EGREP],           [AC_DEFUN([LT_AC_PROG_EGREP])])
9582 m4_ifndef([LT_AC_PROG_SED],             [AC_DEFUN([LT_AC_PROG_SED])])
9583 m4_ifndef([_LT_CC_BASENAME],            [AC_DEFUN([_LT_CC_BASENAME])])
9584 m4_ifndef([_LT_COMPILER_BOILERPLATE],   [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9585 m4_ifndef([_LT_LINKER_BOILERPLATE],     [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9586 m4_ifndef([_AC_PROG_LIBTOOL],           [AC_DEFUN([_AC_PROG_LIBTOOL])])
9587 m4_ifndef([AC_LIBTOOL_SETUP],           [AC_DEFUN([AC_LIBTOOL_SETUP])])
9588 m4_ifndef([_LT_AC_CHECK_DLFCN],         [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9589 m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],      [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9590 m4_ifndef([_LT_AC_TAGCONFIG],           [AC_DEFUN([_LT_AC_TAGCONFIG])])
9591 m4_ifndef([AC_DISABLE_FAST_INSTALL],    [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9592 m4_ifndef([_LT_AC_LANG_CXX],            [AC_DEFUN([_LT_AC_LANG_CXX])])
9593 m4_ifndef([_LT_AC_LANG_F77],            [AC_DEFUN([_LT_AC_LANG_F77])])
9594 m4_ifndef([_LT_AC_LANG_GCJ],            [AC_DEFUN([_LT_AC_LANG_GCJ])])
9595 m4_ifndef([AC_LIBTOOL_RC],              [AC_DEFUN([AC_LIBTOOL_RC])])
9596 m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],   [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9597 m4_ifndef([_LT_AC_LANG_C_CONFIG],       [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9598 m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9599 m4_ifndef([_LT_AC_LANG_CXX_CONFIG],     [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9600 m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9601 m4_ifndef([_LT_AC_LANG_F77_CONFIG],     [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9602 m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9603 m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],     [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9604 m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9605 m4_ifndef([_LT_AC_LANG_RC_CONFIG],      [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9606 m4_ifndef([AC_LIBTOOL_CONFIG],          [AC_DEFUN([AC_LIBTOOL_CONFIG])])
9607 m4_ifndef([_LT_AC_FILE_LTDLL_C],        [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9608
9609 # nls.m4 serial 3 (gettext-0.15)
9610 dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
9611 dnl This file is free software; the Free Software Foundation
9612 dnl gives unlimited permission to copy and/or distribute it,
9613 dnl with or without modifications, as long as this notice is preserved.
9614 dnl
9615 dnl This file can can be used in projects which are not available under
9616 dnl the GNU General Public License or the GNU Library General Public
9617 dnl License but which still want to provide support for the GNU gettext
9618 dnl functionality.
9619 dnl Please note that the actual code of the GNU gettext library is covered
9620 dnl by the GNU Library General Public License, and the rest of the GNU
9621 dnl gettext package package is covered by the GNU General Public License.
9622 dnl They are *not* in the public domain.
9623
9624 dnl Authors:
9625 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9626 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9627
9628 AC_PREREQ(2.50)
9629
9630 AC_DEFUN([AM_NLS],
9631 [
9632   AC_MSG_CHECKING([whether NLS is requested])
9633   dnl Default is enabled NLS
9634   AC_ARG_ENABLE(nls,
9635     [  --disable-nls           do not use Native Language Support],
9636     USE_NLS=$enableval, USE_NLS=yes)
9637   AC_MSG_RESULT($USE_NLS)
9638   AC_SUBST(USE_NLS)
9639 ])
9640
9641 # po.m4 serial 15 (gettext-0.17)
9642 dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
9643 dnl This file is free software; the Free Software Foundation
9644 dnl gives unlimited permission to copy and/or distribute it,
9645 dnl with or without modifications, as long as this notice is preserved.
9646 dnl
9647 dnl This file can can be used in projects which are not available under
9648 dnl the GNU General Public License or the GNU Library General Public
9649 dnl License but which still want to provide support for the GNU gettext
9650 dnl functionality.
9651 dnl Please note that the actual code of the GNU gettext library is covered
9652 dnl by the GNU Library General Public License, and the rest of the GNU
9653 dnl gettext package package is covered by the GNU General Public License.
9654 dnl They are *not* in the public domain.
9655
9656 dnl Authors:
9657 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
9658 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
9659
9660 AC_PREREQ(2.50)
9661
9662 dnl Checks for all prerequisites of the po subdirectory.
9663 AC_DEFUN([AM_PO_SUBDIRS],
9664 [
9665   AC_REQUIRE([AC_PROG_MAKE_SET])dnl
9666   AC_REQUIRE([AC_PROG_INSTALL])dnl
9667   AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
9668   AC_REQUIRE([AM_NLS])dnl
9669
9670   dnl Release version of the gettext macros. This is used to ensure that
9671   dnl the gettext macros and po/Makefile.in.in are in sync.
9672   AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
9673
9674   dnl Perform the following tests also if --disable-nls has been given,
9675   dnl because they are needed for "make dist" to work.
9676
9677   dnl Search for GNU msgfmt in the PATH.
9678   dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
9679   dnl The second test excludes FreeBSD msgfmt.
9680   AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
9681     [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
9682      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
9683     :)
9684   AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
9685
9686   dnl Test whether it is GNU msgfmt >= 0.15.
9687 changequote(,)dnl
9688   case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
9689     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
9690     *) MSGFMT_015=$MSGFMT ;;
9691   esac
9692 changequote([,])dnl
9693   AC_SUBST([MSGFMT_015])
9694 changequote(,)dnl
9695   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
9696     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
9697     *) GMSGFMT_015=$GMSGFMT ;;
9698   esac
9699 changequote([,])dnl
9700   AC_SUBST([GMSGFMT_015])
9701
9702   dnl Search for GNU xgettext 0.12 or newer in the PATH.
9703   dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
9704   dnl The second test excludes FreeBSD xgettext.
9705   AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
9706     [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
9707      (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)],
9708     :)
9709   dnl Remove leftover from FreeBSD xgettext call.
9710   rm -f messages.po
9711
9712   dnl Test whether it is GNU xgettext >= 0.15.
9713 changequote(,)dnl
9714   case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
9715     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
9716     *) XGETTEXT_015=$XGETTEXT ;;
9717   esac
9718 changequote([,])dnl
9719   AC_SUBST([XGETTEXT_015])
9720
9721   dnl Search for GNU msgmerge 0.11 or newer in the PATH.
9722   AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
9723     [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
9724
9725   dnl Installation directories.
9726   dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
9727   dnl have to define it here, so that it can be used in po/Makefile.
9728   test -n "$localedir" || localedir='${datadir}/locale'
9729   AC_SUBST([localedir])
9730
9731   dnl Support for AM_XGETTEXT_OPTION.
9732   test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
9733   AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
9734
9735   AC_CONFIG_COMMANDS([po-directories], [[
9736     for ac_file in $CONFIG_FILES; do
9737       # Support "outfile[:infile[:infile...]]"
9738       case "$ac_file" in
9739         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9740       esac
9741       # PO directories have a Makefile.in generated from Makefile.in.in.
9742       case "$ac_file" in */Makefile.in)
9743         # Adjust a relative srcdir.
9744         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9745         ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9746         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9747         # In autoconf-2.13 it is called $ac_given_srcdir.
9748         # In autoconf-2.50 it is called $srcdir.
9749         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9750         case "$ac_given_srcdir" in
9751           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9752           /*) top_srcdir="$ac_given_srcdir" ;;
9753           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
9754         esac
9755         # Treat a directory as a PO directory if and only if it has a
9756         # POTFILES.in file. This allows packages to have multiple PO
9757         # directories under different names or in different locations.
9758         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
9759           rm -f "$ac_dir/POTFILES"
9760           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
9761           cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
9762           POMAKEFILEDEPS="POTFILES.in"
9763           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
9764           # on $ac_dir but don't depend on user-specified configuration
9765           # parameters.
9766           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
9767             # The LINGUAS file contains the set of available languages.
9768             if test -n "$OBSOLETE_ALL_LINGUAS"; then
9769               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
9770             fi
9771             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
9772             # Hide the ALL_LINGUAS assigment from automake < 1.5.
9773             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
9774             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
9775           else
9776             # The set of available languages was given in configure.in.
9777             # Hide the ALL_LINGUAS assigment from automake < 1.5.
9778             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
9779           fi
9780           # Compute POFILES
9781           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
9782           # Compute UPDATEPOFILES
9783           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
9784           # Compute DUMMYPOFILES
9785           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
9786           # Compute GMOFILES
9787           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
9788           case "$ac_given_srcdir" in
9789             .) srcdirpre= ;;
9790             *) srcdirpre='$(srcdir)/' ;;
9791           esac
9792           POFILES=
9793           UPDATEPOFILES=
9794           DUMMYPOFILES=
9795           GMOFILES=
9796           for lang in $ALL_LINGUAS; do
9797             POFILES="$POFILES $srcdirpre$lang.po"
9798             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
9799             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
9800             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
9801           done
9802           # CATALOGS depends on both $ac_dir and the user's LINGUAS
9803           # environment variable.
9804           INST_LINGUAS=
9805           if test -n "$ALL_LINGUAS"; then
9806             for presentlang in $ALL_LINGUAS; do
9807               useit=no
9808               if test "%UNSET%" != "$LINGUAS"; then
9809                 desiredlanguages="$LINGUAS"
9810               else
9811                 desiredlanguages="$ALL_LINGUAS"
9812               fi
9813               for desiredlang in $desiredlanguages; do
9814                 # Use the presentlang catalog if desiredlang is
9815                 #   a. equal to presentlang, or
9816                 #   b. a variant of presentlang (because in this case,
9817                 #      presentlang can be used as a fallback for messages
9818                 #      which are not translated in the desiredlang catalog).
9819                 case "$desiredlang" in
9820                   "$presentlang"*) useit=yes;;
9821                 esac
9822               done
9823               if test $useit = yes; then
9824                 INST_LINGUAS="$INST_LINGUAS $presentlang"
9825               fi
9826             done
9827           fi
9828           CATALOGS=
9829           if test -n "$INST_LINGUAS"; then
9830             for lang in $INST_LINGUAS; do
9831               CATALOGS="$CATALOGS $lang.gmo"
9832             done
9833           fi
9834           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
9835           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"
9836           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
9837             if test -f "$f"; then
9838               case "$f" in
9839                 *.orig | *.bak | *~) ;;
9840                 *) cat "$f" >> "$ac_dir/Makefile" ;;
9841               esac
9842             fi
9843           done
9844         fi
9845         ;;
9846       esac
9847     done]],
9848    [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
9849     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
9850     # from automake < 1.5.
9851     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
9852     # Capture the value of LINGUAS because we need it to compute CATALOGS.
9853     LINGUAS="${LINGUAS-%UNSET%}"
9854    ])
9855 ])
9856
9857 dnl Postprocesses a Makefile in a directory containing PO files.
9858 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
9859 [
9860   # When this code is run, in config.status, two variables have already been
9861   # set:
9862   # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
9863   # - LINGUAS is the value of the environment variable LINGUAS at configure
9864   #   time.
9865
9866 changequote(,)dnl
9867   # Adjust a relative srcdir.
9868   ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
9869   ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
9870   ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
9871   # In autoconf-2.13 it is called $ac_given_srcdir.
9872   # In autoconf-2.50 it is called $srcdir.
9873   test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
9874   case "$ac_given_srcdir" in
9875     .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
9876     /*) top_srcdir="$ac_given_srcdir" ;;
9877     *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
9878   esac
9879
9880   # Find a way to echo strings without interpreting backslash.
9881   if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
9882     gt_echo='echo'
9883   else
9884     if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
9885       gt_echo='printf %s\n'
9886     else
9887       echo_func () {
9888         cat <<EOT
9889 $*
9890 EOT
9891       }
9892       gt_echo='echo_func'
9893     fi
9894   fi
9895
9896   # A sed script that extracts the value of VARIABLE from a Makefile.
9897   sed_x_variable='
9898 # Test if the hold space is empty.
9899 x
9900 s/P/P/
9901 x
9902 ta
9903 # Yes it was empty. Look if we have the expected variable definition.
9904 /^[      ]*VARIABLE[     ]*=/{
9905   # Seen the first line of the variable definition.
9906   s/^[   ]*VARIABLE[     ]*=//
9907   ba
9908 }
9909 bd
9910 :a
9911 # Here we are processing a line from the variable definition.
9912 # Remove comment, more precisely replace it with a space.
9913 s/#.*$/ /
9914 # See if the line ends in a backslash.
9915 tb
9916 :b
9917 s/\\$//
9918 # Print the line, without the trailing backslash.
9919 p
9920 tc
9921 # There was no trailing backslash. The end of the variable definition is
9922 # reached. Clear the hold space.
9923 s/^.*$//
9924 x
9925 bd
9926 :c
9927 # A trailing backslash means that the variable definition continues in the
9928 # next line. Put a nonempty string into the hold space to indicate this.
9929 s/^.*$/P/
9930 x
9931 :d
9932 '
9933 changequote([,])dnl
9934
9935   # Set POTFILES to the value of the Makefile variable POTFILES.
9936   sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
9937   POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
9938   # Compute POTFILES_DEPS as
9939   #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
9940   POTFILES_DEPS=
9941   for file in $POTFILES; do
9942     POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
9943   done
9944   POMAKEFILEDEPS=""
9945
9946   if test -n "$OBSOLETE_ALL_LINGUAS"; then
9947     test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
9948   fi
9949   if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
9950     # The LINGUAS file contains the set of available languages.
9951     ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
9952     POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
9953   else
9954     # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
9955     sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
9956     ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
9957   fi
9958   # Hide the ALL_LINGUAS assigment from automake < 1.5.
9959   eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
9960   # Compute POFILES
9961   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
9962   # Compute UPDATEPOFILES
9963   # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
9964   # Compute DUMMYPOFILES
9965   # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
9966   # Compute GMOFILES
9967   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
9968   # Compute PROPERTIESFILES
9969   # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
9970   # Compute CLASSFILES
9971   # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
9972   # Compute QMFILES
9973   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
9974   # Compute MSGFILES
9975   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
9976   # Compute RESOURCESDLLFILES
9977   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
9978   case "$ac_given_srcdir" in
9979     .) srcdirpre= ;;
9980     *) srcdirpre='$(srcdir)/' ;;
9981   esac
9982   POFILES=
9983   UPDATEPOFILES=
9984   DUMMYPOFILES=
9985   GMOFILES=
9986   PROPERTIESFILES=
9987   CLASSFILES=
9988   QMFILES=
9989   MSGFILES=
9990   RESOURCESDLLFILES=
9991   for lang in $ALL_LINGUAS; do
9992     POFILES="$POFILES $srcdirpre$lang.po"
9993     UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
9994     DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
9995     GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
9996     PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
9997     CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
9998     QMFILES="$QMFILES $srcdirpre$lang.qm"
9999     frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
10000     MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
10001     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/'`
10002     RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
10003   done
10004   # CATALOGS depends on both $ac_dir and the user's LINGUAS
10005   # environment variable.
10006   INST_LINGUAS=
10007   if test -n "$ALL_LINGUAS"; then
10008     for presentlang in $ALL_LINGUAS; do
10009       useit=no
10010       if test "%UNSET%" != "$LINGUAS"; then
10011         desiredlanguages="$LINGUAS"
10012       else
10013         desiredlanguages="$ALL_LINGUAS"
10014       fi
10015       for desiredlang in $desiredlanguages; do
10016         # Use the presentlang catalog if desiredlang is
10017         #   a. equal to presentlang, or
10018         #   b. a variant of presentlang (because in this case,
10019         #      presentlang can be used as a fallback for messages
10020         #      which are not translated in the desiredlang catalog).
10021         case "$desiredlang" in
10022           "$presentlang"*) useit=yes;;
10023         esac
10024       done
10025       if test $useit = yes; then
10026         INST_LINGUAS="$INST_LINGUAS $presentlang"
10027       fi
10028     done
10029   fi
10030   CATALOGS=
10031   JAVACATALOGS=
10032   QTCATALOGS=
10033   TCLCATALOGS=
10034   CSHARPCATALOGS=
10035   if test -n "$INST_LINGUAS"; then
10036     for lang in $INST_LINGUAS; do
10037       CATALOGS="$CATALOGS $lang.gmo"
10038       JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
10039       QTCATALOGS="$QTCATALOGS $lang.qm"
10040       frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
10041       TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
10042       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/'`
10043       CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
10044     done
10045   fi
10046
10047   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"
10048   if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
10049     # Add dependencies that cannot be formulated as a simple suffix rule.
10050     for lang in $ALL_LINGUAS; do
10051       frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
10052       cat >> "$ac_file.tmp" <<EOF
10053 $frobbedlang.msg: $lang.po
10054         @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
10055         \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
10056 EOF
10057     done
10058   fi
10059   if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
10060     # Add dependencies that cannot be formulated as a simple suffix rule.
10061     for lang in $ALL_LINGUAS; do
10062       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/'`
10063       cat >> "$ac_file.tmp" <<EOF
10064 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
10065         @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
10066         \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
10067 EOF
10068     done
10069   fi
10070   if test -n "$POMAKEFILEDEPS"; then
10071     cat >> "$ac_file.tmp" <<EOF
10072 Makefile: $POMAKEFILEDEPS
10073 EOF
10074   fi
10075   mv "$ac_file.tmp" "$ac_file"
10076 ])
10077
10078 dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
10079 AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
10080 [
10081   XGETTEXT_EXTRA_OPTIONS=
10082 ])
10083
10084 dnl Registers an option to be passed to xgettext in the po subdirectory.
10085 AC_DEFUN([AM_XGETTEXT_OPTION],
10086 [
10087   AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
10088   XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
10089 ])
10090
10091 # progtest.m4 serial 4 (gettext-0.14.2)
10092 dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
10093 dnl This file is free software; the Free Software Foundation
10094 dnl gives unlimited permission to copy and/or distribute it,
10095 dnl with or without modifications, as long as this notice is preserved.
10096 dnl
10097 dnl This file can can be used in projects which are not available under
10098 dnl the GNU General Public License or the GNU Library General Public
10099 dnl License but which still want to provide support for the GNU gettext
10100 dnl functionality.
10101 dnl Please note that the actual code of the GNU gettext library is covered
10102 dnl by the GNU Library General Public License, and the rest of the GNU
10103 dnl gettext package package is covered by the GNU General Public License.
10104 dnl They are *not* in the public domain.
10105
10106 dnl Authors:
10107 dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
10108
10109 AC_PREREQ(2.50)
10110
10111 # Search path for a program which passes the given test.
10112
10113 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
10114 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
10115 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
10116 [
10117 # Prepare PATH_SEPARATOR.
10118 # The user is always right.
10119 if test "${PATH_SEPARATOR+set}" != set; then
10120   echo "#! /bin/sh" >conf$$.sh
10121   echo  "exit 0"   >>conf$$.sh
10122   chmod +x conf$$.sh
10123   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
10124     PATH_SEPARATOR=';'
10125   else
10126     PATH_SEPARATOR=:
10127   fi
10128   rm -f conf$$.sh
10129 fi
10130
10131 # Find out how to test for executable files. Don't use a zero-byte file,
10132 # as systems may use methods other than mode bits to determine executability.
10133 cat >conf$$.file <<_ASEOF
10134 #! /bin/sh
10135 exit 0
10136 _ASEOF
10137 chmod +x conf$$.file
10138 if test -x conf$$.file >/dev/null 2>&1; then
10139   ac_executable_p="test -x"
10140 else
10141   ac_executable_p="test -f"
10142 fi
10143 rm -f conf$$.file
10144
10145 # Extract the first word of "$2", so it can be a program name with args.
10146 set dummy $2; ac_word=[$]2
10147 AC_MSG_CHECKING([for $ac_word])
10148 AC_CACHE_VAL(ac_cv_path_$1,
10149 [case "[$]$1" in
10150   [[\\/]]* | ?:[[\\/]]*)
10151     ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
10152     ;;
10153   *)
10154     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
10155     for ac_dir in ifelse([$5], , $PATH, [$5]); do
10156       IFS="$ac_save_IFS"
10157       test -z "$ac_dir" && ac_dir=.
10158       for ac_exec_ext in '' $ac_executable_extensions; do
10159         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
10160           echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
10161           if [$3]; then
10162             ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
10163             break 2
10164           fi
10165         fi
10166       done
10167     done
10168     IFS="$ac_save_IFS"
10169 dnl If no 4th arg is given, leave the cache variable unset,
10170 dnl so AC_PATH_PROGS will keep looking.
10171 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
10172 ])dnl
10173     ;;
10174 esac])dnl
10175 $1="$ac_cv_path_$1"
10176 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
10177   AC_MSG_RESULT([$]$1)
10178 else
10179   AC_MSG_RESULT(no)
10180 fi
10181 AC_SUBST($1)dnl
10182 ])
10183
10184 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
10185 #
10186 # This file is free software; the Free Software Foundation
10187 # gives unlimited permission to copy and/or distribute it,
10188 # with or without modifications, as long as this notice is preserved.
10189
10190 # AM_AUTOMAKE_VERSION(VERSION)
10191 # ----------------------------
10192 # Automake X.Y traces this macro to ensure aclocal.m4 has been
10193 # generated from the m4 files accompanying Automake X.Y.
10194 # (This private macro should not be called outside this file.)
10195 AC_DEFUN([AM_AUTOMAKE_VERSION],
10196 [am__api_version='1.10'
10197 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
10198 dnl require some minimum version.  Point them to the right macro.
10199 m4_if([$1], [1.10.2], [],
10200       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
10201 ])
10202
10203 # _AM_AUTOCONF_VERSION(VERSION)
10204 # -----------------------------
10205 # aclocal traces this macro to find the Autoconf version.
10206 # This is a private macro too.  Using m4_define simplifies
10207 # the logic in aclocal, which can simply ignore this definition.
10208 m4_define([_AM_AUTOCONF_VERSION], [])
10209
10210 # AM_SET_CURRENT_AUTOMAKE_VERSION
10211 # -------------------------------
10212 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
10213 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
10214 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
10215 [AM_AUTOMAKE_VERSION([1.10.2])dnl
10216 m4_ifndef([AC_AUTOCONF_VERSION],
10217   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
10218 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
10219
10220 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
10221
10222 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
10223 #
10224 # This file is free software; the Free Software Foundation
10225 # gives unlimited permission to copy and/or distribute it,
10226 # with or without modifications, as long as this notice is preserved.
10227
10228 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
10229 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
10230 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
10231 #
10232 # Of course, Automake must honor this variable whenever it calls a
10233 # tool from the auxiliary directory.  The problem is that $srcdir (and
10234 # therefore $ac_aux_dir as well) can be either absolute or relative,
10235 # depending on how configure is run.  This is pretty annoying, since
10236 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
10237 # source directory, any form will work fine, but in subdirectories a
10238 # relative path needs to be adjusted first.
10239 #
10240 # $ac_aux_dir/missing
10241 #    fails when called from a subdirectory if $ac_aux_dir is relative
10242 # $top_srcdir/$ac_aux_dir/missing
10243 #    fails if $ac_aux_dir is absolute,
10244 #    fails when called from a subdirectory in a VPATH build with
10245 #          a relative $ac_aux_dir
10246 #
10247 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
10248 # are both prefixed by $srcdir.  In an in-source build this is usually
10249 # harmless because $srcdir is `.', but things will broke when you
10250 # start a VPATH build or use an absolute $srcdir.
10251 #
10252 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
10253 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
10254 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
10255 # and then we would define $MISSING as
10256 #   MISSING="\${SHELL} $am_aux_dir/missing"
10257 # This will work as long as MISSING is not called from configure, because
10258 # unfortunately $(top_srcdir) has no meaning in configure.
10259 # However there are other variables, like CC, which are often used in
10260 # configure, and could therefore not use this "fixed" $ac_aux_dir.
10261 #
10262 # Another solution, used here, is to always expand $ac_aux_dir to an
10263 # absolute PATH.  The drawback is that using absolute paths prevent a
10264 # configured tree to be moved without reconfiguration.
10265
10266 AC_DEFUN([AM_AUX_DIR_EXPAND],
10267 [dnl Rely on autoconf to set up CDPATH properly.
10268 AC_PREREQ([2.50])dnl
10269 # expand $ac_aux_dir to an absolute path
10270 am_aux_dir=`cd $ac_aux_dir && pwd`
10271 ])
10272
10273 # AM_CONDITIONAL                                            -*- Autoconf -*-
10274
10275 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
10276 # Free Software Foundation, Inc.
10277 #
10278 # This file is free software; the Free Software Foundation
10279 # gives unlimited permission to copy and/or distribute it,
10280 # with or without modifications, as long as this notice is preserved.
10281
10282 # serial 8
10283
10284 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
10285 # -------------------------------------
10286 # Define a conditional.
10287 AC_DEFUN([AM_CONDITIONAL],
10288 [AC_PREREQ(2.52)dnl
10289  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
10290         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
10291 AC_SUBST([$1_TRUE])dnl
10292 AC_SUBST([$1_FALSE])dnl
10293 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
10294 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
10295 if $2; then
10296   $1_TRUE=
10297   $1_FALSE='#'
10298 else
10299   $1_TRUE='#'
10300   $1_FALSE=
10301 fi
10302 AC_CONFIG_COMMANDS_PRE(
10303 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
10304   AC_MSG_ERROR([[conditional "$1" was never defined.
10305 Usually this means the macro was only invoked conditionally.]])
10306 fi])])
10307
10308 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
10309 # Free Software Foundation, Inc.
10310 #
10311 # This file is free software; the Free Software Foundation
10312 # gives unlimited permission to copy and/or distribute it,
10313 # with or without modifications, as long as this notice is preserved.
10314
10315 # serial 9
10316
10317 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
10318 # written in clear, in which case automake, when reading aclocal.m4,
10319 # will think it sees a *use*, and therefore will trigger all it's
10320 # C support machinery.  Also note that it means that autoscan, seeing
10321 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
10322
10323
10324 # _AM_DEPENDENCIES(NAME)
10325 # ----------------------
10326 # See how the compiler implements dependency checking.
10327 # NAME is "CC", "CXX", "GCJ", or "OBJC".
10328 # We try a few techniques and use that to set a single cache variable.
10329 #
10330 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
10331 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
10332 # dependency, and given that the user is not expected to run this macro,
10333 # just rely on AC_PROG_CC.
10334 AC_DEFUN([_AM_DEPENDENCIES],
10335 [AC_REQUIRE([AM_SET_DEPDIR])dnl
10336 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
10337 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
10338 AC_REQUIRE([AM_DEP_TRACK])dnl
10339
10340 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
10341        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
10342        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
10343        [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
10344        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
10345                    [depcc="$$1"   am_compiler_list=])
10346
10347 AC_CACHE_CHECK([dependency style of $depcc],
10348                [am_cv_$1_dependencies_compiler_type],
10349 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
10350   # We make a subdir and do the tests there.  Otherwise we can end up
10351   # making bogus files that we don't know about and never remove.  For
10352   # instance it was reported that on HP-UX the gcc test will end up
10353   # making a dummy file named `D' -- because `-MD' means `put the output
10354   # in D'.
10355   mkdir conftest.dir
10356   # Copy depcomp to subdir because otherwise we won't find it if we're
10357   # using a relative directory.
10358   cp "$am_depcomp" conftest.dir
10359   cd conftest.dir
10360   # We will build objects and dependencies in a subdirectory because
10361   # it helps to detect inapplicable dependency modes.  For instance
10362   # both Tru64's cc and ICC support -MD to output dependencies as a
10363   # side effect of compilation, but ICC will put the dependencies in
10364   # the current directory while Tru64 will put them in the object
10365   # directory.
10366   mkdir sub
10367
10368   am_cv_$1_dependencies_compiler_type=none
10369   if test "$am_compiler_list" = ""; then
10370      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
10371   fi
10372   for depmode in $am_compiler_list; do
10373     # Setup a source with many dependencies, because some compilers
10374     # like to wrap large dependency lists on column 80 (with \), and
10375     # we should not choose a depcomp mode which is confused by this.
10376     #
10377     # We need to recreate these files for each test, as the compiler may
10378     # overwrite some of them when testing with obscure command lines.
10379     # This happens at least with the AIX C compiler.
10380     : > sub/conftest.c
10381     for i in 1 2 3 4 5 6; do
10382       echo '#include "conftst'$i'.h"' >> sub/conftest.c
10383       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
10384       # Solaris 8's {/usr,}/bin/sh.
10385       touch sub/conftst$i.h
10386     done
10387     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
10388
10389     case $depmode in
10390     nosideeffect)
10391       # after this tag, mechanisms are not by side-effect, so they'll
10392       # only be used when explicitly requested
10393       if test "x$enable_dependency_tracking" = xyes; then
10394         continue
10395       else
10396         break
10397       fi
10398       ;;
10399     none) break ;;
10400     esac
10401     # We check with `-c' and `-o' for the sake of the "dashmstdout"
10402     # mode.  It turns out that the SunPro C++ compiler does not properly
10403     # handle `-M -o', and we need to detect this.
10404     if depmode=$depmode \
10405        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
10406        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
10407        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
10408          >/dev/null 2>conftest.err &&
10409        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
10410        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
10411        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
10412        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
10413       # icc doesn't choke on unknown options, it will just issue warnings
10414       # or remarks (even with -Werror).  So we grep stderr for any message
10415       # that says an option was ignored or not supported.
10416       # When given -MP, icc 7.0 and 7.1 complain thusly:
10417       #   icc: Command line warning: ignoring option '-M'; no argument required
10418       # The diagnosis changed in icc 8.0:
10419       #   icc: Command line remark: option '-MP' not supported
10420       if (grep 'ignoring option' conftest.err ||
10421           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
10422         am_cv_$1_dependencies_compiler_type=$depmode
10423         break
10424       fi
10425     fi
10426   done
10427
10428   cd ..
10429   rm -rf conftest.dir
10430 else
10431   am_cv_$1_dependencies_compiler_type=none
10432 fi
10433 ])
10434 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
10435 AM_CONDITIONAL([am__fastdep$1], [
10436   test "x$enable_dependency_tracking" != xno \
10437   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
10438 ])
10439
10440
10441 # AM_SET_DEPDIR
10442 # -------------
10443 # Choose a directory name for dependency files.
10444 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
10445 AC_DEFUN([AM_SET_DEPDIR],
10446 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10447 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
10448 ])
10449
10450
10451 # AM_DEP_TRACK
10452 # ------------
10453 AC_DEFUN([AM_DEP_TRACK],
10454 [AC_ARG_ENABLE(dependency-tracking,
10455 [  --disable-dependency-tracking  speeds up one-time build
10456   --enable-dependency-tracking   do not reject slow dependency extractors])
10457 if test "x$enable_dependency_tracking" != xno; then
10458   am_depcomp="$ac_aux_dir/depcomp"
10459   AMDEPBACKSLASH='\'
10460 fi
10461 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
10462 AC_SUBST([AMDEPBACKSLASH])dnl
10463 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
10464 ])
10465
10466 # Generate code to set up dependency tracking.              -*- Autoconf -*-
10467
10468 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
10469 # Free Software Foundation, Inc.
10470 #
10471 # This file is free software; the Free Software Foundation
10472 # gives unlimited permission to copy and/or distribute it,
10473 # with or without modifications, as long as this notice is preserved.
10474
10475 #serial 4
10476
10477 # _AM_OUTPUT_DEPENDENCY_COMMANDS
10478 # ------------------------------
10479 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
10480 [# Autoconf 2.62 quotes --file arguments for eval, but not when files
10481 # are listed without --file.  Let's play safe and only enable the eval
10482 # if we detect the quoting.
10483 case $CONFIG_FILES in
10484 *\'*) eval set x "$CONFIG_FILES" ;;
10485 *)   set x $CONFIG_FILES ;;
10486 esac
10487 shift
10488 for mf
10489 do
10490   # Strip MF so we end up with the name of the file.
10491   mf=`echo "$mf" | sed -e 's/:.*$//'`
10492   # Check whether this is an Automake generated Makefile or not.
10493   # We used to match only the files named `Makefile.in', but
10494   # some people rename them; so instead we look at the file content.
10495   # Grep'ing the first line is not enough: some people post-process
10496   # each Makefile.in and add a new line on top of each file to say so.
10497   # Grep'ing the whole file is not good either: AIX grep has a line
10498   # limit of 2048, but all sed's we know have understand at least 4000.
10499   if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
10500     dirpart=`AS_DIRNAME("$mf")`
10501   else
10502     continue
10503   fi
10504   # Extract the definition of DEPDIR, am__include, and am__quote
10505   # from the Makefile without running `make'.
10506   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
10507   test -z "$DEPDIR" && continue
10508   am__include=`sed -n 's/^am__include = //p' < "$mf"`
10509   test -z "am__include" && continue
10510   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
10511   # When using ansi2knr, U may be empty or an underscore; expand it
10512   U=`sed -n 's/^U = //p' < "$mf"`
10513   # Find all dependency output files, they are included files with
10514   # $(DEPDIR) in their names.  We invoke sed twice because it is the
10515   # simplest approach to changing $(DEPDIR) to its actual value in the
10516   # expansion.
10517   for file in `sed -n "
10518     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
10519        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
10520     # Make sure the directory exists.
10521     test -f "$dirpart/$file" && continue
10522     fdir=`AS_DIRNAME(["$file"])`
10523     AS_MKDIR_P([$dirpart/$fdir])
10524     # echo "creating $dirpart/$file"
10525     echo '# dummy' > "$dirpart/$file"
10526   done
10527 done
10528 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10529
10530
10531 # AM_OUTPUT_DEPENDENCY_COMMANDS
10532 # -----------------------------
10533 # This macro should only be invoked once -- use via AC_REQUIRE.
10534 #
10535 # This code is only required when automatic dependency tracking
10536 # is enabled.  FIXME.  This creates each `.P' file that we will
10537 # need in order to bootstrap the dependency handling code.
10538 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10539 [AC_CONFIG_COMMANDS([depfiles],
10540      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10541      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10542 ])
10543
10544 # Do all the work for Automake.                             -*- Autoconf -*-
10545
10546 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
10547 # 2005, 2006, 2008 Free Software Foundation, Inc.
10548 #
10549 # This file is free software; the Free Software Foundation
10550 # gives unlimited permission to copy and/or distribute it,
10551 # with or without modifications, as long as this notice is preserved.
10552
10553 # serial 13
10554
10555 # This macro actually does too much.  Some checks are only needed if
10556 # your package does certain things.  But this isn't really a big deal.
10557
10558 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10559 # AM_INIT_AUTOMAKE([OPTIONS])
10560 # -----------------------------------------------
10561 # The call with PACKAGE and VERSION arguments is the old style
10562 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
10563 # and VERSION should now be passed to AC_INIT and removed from
10564 # the call to AM_INIT_AUTOMAKE.
10565 # We support both call styles for the transition.  After
10566 # the next Automake release, Autoconf can make the AC_INIT
10567 # arguments mandatory, and then we can depend on a new Autoconf
10568 # release and drop the old call support.
10569 AC_DEFUN([AM_INIT_AUTOMAKE],
10570 [AC_PREREQ([2.60])dnl
10571 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
10572 dnl the ones we care about.
10573 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10574 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10575 AC_REQUIRE([AC_PROG_INSTALL])dnl
10576 if test "`cd $srcdir && pwd`" != "`pwd`"; then
10577   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
10578   # is not polluted with repeated "-I."
10579   AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
10580   # test to see if srcdir already configured
10581   if test -f $srcdir/config.status; then
10582     AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10583   fi
10584 fi
10585
10586 # test whether we have cygpath
10587 if test -z "$CYGPATH_W"; then
10588   if (cygpath --version) >/dev/null 2>/dev/null; then
10589     CYGPATH_W='cygpath -w'
10590   else
10591     CYGPATH_W=echo
10592   fi
10593 fi
10594 AC_SUBST([CYGPATH_W])
10595
10596 # Define the identity of the package.
10597 dnl Distinguish between old-style and new-style calls.
10598 m4_ifval([$2],
10599 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10600  AC_SUBST([PACKAGE], [$1])dnl
10601  AC_SUBST([VERSION], [$2])],
10602 [_AM_SET_OPTIONS([$1])dnl
10603 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10604 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
10605   [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
10606  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10607  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10608
10609 _AM_IF_OPTION([no-define],,
10610 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
10611  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
10612
10613 # Some tools Automake needs.
10614 AC_REQUIRE([AM_SANITY_CHECK])dnl
10615 AC_REQUIRE([AC_ARG_PROGRAM])dnl
10616 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
10617 AM_MISSING_PROG(AUTOCONF, autoconf)
10618 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
10619 AM_MISSING_PROG(AUTOHEADER, autoheader)
10620 AM_MISSING_PROG(MAKEINFO, makeinfo)
10621 AM_PROG_INSTALL_SH
10622 AM_PROG_INSTALL_STRIP
10623 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
10624 # We need awk for the "check" target.  The system "awk" is bad on
10625 # some platforms.
10626 AC_REQUIRE([AC_PROG_AWK])dnl
10627 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10628 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10629 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
10630               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10631                              [_AM_PROG_TAR([v7])])])
10632 _AM_IF_OPTION([no-dependencies],,
10633 [AC_PROVIDE_IFELSE([AC_PROG_CC],
10634                   [_AM_DEPENDENCIES(CC)],
10635                   [define([AC_PROG_CC],
10636                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
10637 AC_PROVIDE_IFELSE([AC_PROG_CXX],
10638                   [_AM_DEPENDENCIES(CXX)],
10639                   [define([AC_PROG_CXX],
10640                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
10641 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
10642                   [_AM_DEPENDENCIES(OBJC)],
10643                   [define([AC_PROG_OBJC],
10644                           defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
10645 ])
10646 ])
10647
10648
10649 # When config.status generates a header, we must update the stamp-h file.
10650 # This file resides in the same directory as the config header
10651 # that is generated.  The stamp files are numbered to have different names.
10652
10653 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10654 # loop where config.status creates the headers, so we can generate
10655 # our stamp files there.
10656 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10657 [# Compute $1's index in $config_headers.
10658 _am_arg=$1
10659 _am_stamp_count=1
10660 for _am_header in $config_headers :; do
10661   case $_am_header in
10662     $_am_arg | $_am_arg:* )
10663       break ;;
10664     * )
10665       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10666   esac
10667 done
10668 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10669
10670 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
10671 #
10672 # This file is free software; the Free Software Foundation
10673 # gives unlimited permission to copy and/or distribute it,
10674 # with or without modifications, as long as this notice is preserved.
10675
10676 # AM_PROG_INSTALL_SH
10677 # ------------------
10678 # Define $install_sh.
10679 AC_DEFUN([AM_PROG_INSTALL_SH],
10680 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10681 install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
10682 AC_SUBST(install_sh)])
10683
10684 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
10685 #
10686 # This file is free software; the Free Software Foundation
10687 # gives unlimited permission to copy and/or distribute it,
10688 # with or without modifications, as long as this notice is preserved.
10689
10690 # serial 2
10691
10692 # Check whether the underlying file-system supports filenames
10693 # with a leading dot.  For instance MS-DOS doesn't.
10694 AC_DEFUN([AM_SET_LEADING_DOT],
10695 [rm -rf .tst 2>/dev/null
10696 mkdir .tst 2>/dev/null
10697 if test -d .tst; then
10698   am__leading_dot=.
10699 else
10700   am__leading_dot=_
10701 fi
10702 rmdir .tst 2>/dev/null
10703 AC_SUBST([am__leading_dot])])
10704
10705 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
10706 # From Jim Meyering
10707
10708 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
10709 # Free Software Foundation, Inc.
10710 #
10711 # This file is free software; the Free Software Foundation
10712 # gives unlimited permission to copy and/or distribute it,
10713 # with or without modifications, as long as this notice is preserved.
10714
10715 # serial 4
10716
10717 AC_DEFUN([AM_MAINTAINER_MODE],
10718 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
10719   dnl maintainer-mode is disabled by default
10720   AC_ARG_ENABLE(maintainer-mode,
10721 [  --enable-maintainer-mode  enable make rules and dependencies not useful
10722                           (and sometimes confusing) to the casual installer],
10723       USE_MAINTAINER_MODE=$enableval,
10724       USE_MAINTAINER_MODE=no)
10725   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
10726   AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
10727   MAINT=$MAINTAINER_MODE_TRUE
10728   AC_SUBST(MAINT)dnl
10729 ]
10730 )
10731
10732 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
10733
10734 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
10735
10736 # Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
10737 #
10738 # This file is free software; the Free Software Foundation
10739 # gives unlimited permission to copy and/or distribute it,
10740 # with or without modifications, as long as this notice is preserved.
10741
10742 # serial 3
10743
10744 # AM_MAKE_INCLUDE()
10745 # -----------------
10746 # Check to see how make treats includes.
10747 AC_DEFUN([AM_MAKE_INCLUDE],
10748 [am_make=${MAKE-make}
10749 cat > confinc << 'END'
10750 am__doit:
10751         @echo done
10752 .PHONY: am__doit
10753 END
10754 # If we don't find an include directive, just comment out the code.
10755 AC_MSG_CHECKING([for style of include used by $am_make])
10756 am__include="#"
10757 am__quote=
10758 _am_result=none
10759 # First try GNU make style include.
10760 echo "include confinc" > confmf
10761 # We grep out `Entering directory' and `Leaving directory'
10762 # messages which can occur if `w' ends up in MAKEFLAGS.
10763 # In particular we don't look at `^make:' because GNU make might
10764 # be invoked under some other name (usually "gmake"), in which
10765 # case it prints its new name instead of `make'.
10766 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
10767    am__include=include
10768    am__quote=
10769    _am_result=GNU
10770 fi
10771 # Now try BSD make style include.
10772 if test "$am__include" = "#"; then
10773    echo '.include "confinc"' > confmf
10774    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
10775       am__include=.include
10776       am__quote="\""
10777       _am_result=BSD
10778    fi
10779 fi
10780 AC_SUBST([am__include])
10781 AC_SUBST([am__quote])
10782 AC_MSG_RESULT([$_am_result])
10783 rm -f confinc confmf
10784 ])
10785
10786 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
10787
10788 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
10789 # Free Software Foundation, Inc.
10790 #
10791 # This file is free software; the Free Software Foundation
10792 # gives unlimited permission to copy and/or distribute it,
10793 # with or without modifications, as long as this notice is preserved.
10794
10795 # serial 5
10796
10797 # AM_MISSING_PROG(NAME, PROGRAM)
10798 # ------------------------------
10799 AC_DEFUN([AM_MISSING_PROG],
10800 [AC_REQUIRE([AM_MISSING_HAS_RUN])
10801 $1=${$1-"${am_missing_run}$2"}
10802 AC_SUBST($1)])
10803
10804
10805 # AM_MISSING_HAS_RUN
10806 # ------------------
10807 # Define MISSING if not defined so far and test if it supports --run.
10808 # If it does, set am_missing_run to use it, otherwise, to nothing.
10809 AC_DEFUN([AM_MISSING_HAS_RUN],
10810 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10811 AC_REQUIRE_AUX_FILE([missing])dnl
10812 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
10813 # Use eval to expand $SHELL
10814 if eval "$MISSING --run true"; then
10815   am_missing_run="$MISSING --run "
10816 else
10817   am_missing_run=
10818   AC_MSG_WARN([`missing' script is too old or missing])
10819 fi
10820 ])
10821
10822 # Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
10823 #
10824 # This file is free software; the Free Software Foundation
10825 # gives unlimited permission to copy and/or distribute it,
10826 # with or without modifications, as long as this notice is preserved.
10827
10828 # AM_PROG_MKDIR_P
10829 # ---------------
10830 # Check for `mkdir -p'.
10831 AC_DEFUN([AM_PROG_MKDIR_P],
10832 [AC_PREREQ([2.60])dnl
10833 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10834 dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
10835 dnl while keeping a definition of mkdir_p for backward compatibility.
10836 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
10837 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
10838 dnl Makefile.ins that do not define MKDIR_P, so we do our own
10839 dnl adjustment using top_builddir (which is defined more often than
10840 dnl MKDIR_P).
10841 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
10842 case $mkdir_p in
10843   [[\\/$]]* | ?:[[\\/]]*) ;;
10844   */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
10845 esac
10846 ])
10847
10848 # Helper functions for option handling.                     -*- Autoconf -*-
10849
10850 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
10851 #
10852 # This file is free software; the Free Software Foundation
10853 # gives unlimited permission to copy and/or distribute it,
10854 # with or without modifications, as long as this notice is preserved.
10855
10856 # serial 4
10857
10858 # _AM_MANGLE_OPTION(NAME)
10859 # -----------------------
10860 AC_DEFUN([_AM_MANGLE_OPTION],
10861 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10862
10863 # _AM_SET_OPTION(NAME)
10864 # ------------------------------
10865 # Set option NAME.  Presently that only means defining a flag for this option.
10866 AC_DEFUN([_AM_SET_OPTION],
10867 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10868
10869 # _AM_SET_OPTIONS(OPTIONS)
10870 # ----------------------------------
10871 # OPTIONS is a space-separated list of Automake options.
10872 AC_DEFUN([_AM_SET_OPTIONS],
10873 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10874
10875 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10876 # -------------------------------------------
10877 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10878 AC_DEFUN([_AM_IF_OPTION],
10879 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10880
10881 # Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2005, 2006
10882 # Free Software Foundation, Inc.
10883 #
10884 # This file is free software; the Free Software Foundation
10885 # gives unlimited permission to copy and/or distribute it,
10886 # with or without modifications, as long as this notice is preserved.
10887
10888 # serial 5
10889
10890 AC_DEFUN([AM_C_PROTOTYPES],
10891 [AC_REQUIRE([AC_C_PROTOTYPES])
10892 if test "$ac_cv_prog_cc_stdc" != no; then
10893   U= ANSI2KNR=
10894 else
10895   U=_ ANSI2KNR=./ansi2knr
10896 fi
10897 # Ensure some checks needed by ansi2knr itself.
10898 AC_REQUIRE([AC_HEADER_STDC])
10899 AC_CHECK_HEADERS([string.h])
10900 AC_SUBST([U])dnl
10901 AC_SUBST([ANSI2KNR])dnl
10902 _AM_SUBST_NOTMAKE([ANSI2KNR])dnl
10903 ])
10904
10905 AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
10906
10907 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
10908
10909 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
10910 # Free Software Foundation, Inc.
10911 #
10912 # This file is free software; the Free Software Foundation
10913 # gives unlimited permission to copy and/or distribute it,
10914 # with or without modifications, as long as this notice is preserved.
10915
10916 # serial 4
10917
10918 # AM_SANITY_CHECK
10919 # ---------------
10920 AC_DEFUN([AM_SANITY_CHECK],
10921 [AC_MSG_CHECKING([whether build environment is sane])
10922 # Just in case
10923 sleep 1
10924 echo timestamp > conftest.file
10925 # Do `set' in a subshell so we don't clobber the current shell's
10926 # arguments.  Must try -L first in case configure is actually a
10927 # symlink; some systems play weird games with the mod time of symlinks
10928 # (eg FreeBSD returns the mod time of the symlink's containing
10929 # directory).
10930 if (
10931    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
10932    if test "$[*]" = "X"; then
10933       # -L didn't work.
10934       set X `ls -t $srcdir/configure conftest.file`
10935    fi
10936    rm -f conftest.file
10937    if test "$[*]" != "X $srcdir/configure conftest.file" \
10938       && test "$[*]" != "X conftest.file $srcdir/configure"; then
10939
10940       # If neither matched, then we have a broken ls.  This can happen
10941       # if, for instance, CONFIG_SHELL is bash and it inherits a
10942       # broken ls alias from the environment.  This has actually
10943       # happened.  Such a system could not be considered "sane".
10944       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10945 alias in your environment])
10946    fi
10947
10948    test "$[2]" = conftest.file
10949    )
10950 then
10951    # Ok.
10952    :
10953 else
10954    AC_MSG_ERROR([newly created file is older than distributed files!
10955 Check your system clock])
10956 fi
10957 AC_MSG_RESULT(yes)])
10958
10959 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
10960 #
10961 # This file is free software; the Free Software Foundation
10962 # gives unlimited permission to copy and/or distribute it,
10963 # with or without modifications, as long as this notice is preserved.
10964
10965 # AM_PROG_INSTALL_STRIP
10966 # ---------------------
10967 # One issue with vendor `install' (even GNU) is that you can't
10968 # specify the program used to strip binaries.  This is especially
10969 # annoying in cross-compiling environments, where the build's strip
10970 # is unlikely to handle the host's binaries.
10971 # Fortunately install-sh will honor a STRIPPROG variable, so we
10972 # always use install-sh in `make install-strip', and initialize
10973 # STRIPPROG with the value of the STRIP variable (set by the user).
10974 AC_DEFUN([AM_PROG_INSTALL_STRIP],
10975 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10976 # Installed binaries are usually stripped using `strip' when the user
10977 # run `make install-strip'.  However `strip' might not be the right
10978 # tool to use in cross-compilation environments, therefore Automake
10979 # will honor the `STRIP' environment variable to overrule this program.
10980 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10981 if test "$cross_compiling" != no; then
10982   AC_CHECK_TOOL([STRIP], [strip], :)
10983 fi
10984 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10985 AC_SUBST([INSTALL_STRIP_PROGRAM])])
10986
10987 # Copyright (C) 2006  Free Software Foundation, Inc.
10988 #
10989 # This file is free software; the Free Software Foundation
10990 # gives unlimited permission to copy and/or distribute it,
10991 # with or without modifications, as long as this notice is preserved.
10992
10993 # _AM_SUBST_NOTMAKE(VARIABLE)
10994 # ---------------------------
10995 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10996 # This macro is traced by Automake.
10997 AC_DEFUN([_AM_SUBST_NOTMAKE])
10998
10999 # Check how to create a tarball.                            -*- Autoconf -*-
11000
11001 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
11002 #
11003 # This file is free software; the Free Software Foundation
11004 # gives unlimited permission to copy and/or distribute it,
11005 # with or without modifications, as long as this notice is preserved.
11006
11007 # serial 2
11008
11009 # _AM_PROG_TAR(FORMAT)
11010 # --------------------
11011 # Check how to create a tarball in format FORMAT.
11012 # FORMAT should be one of `v7', `ustar', or `pax'.
11013 #
11014 # Substitute a variable $(am__tar) that is a command
11015 # writing to stdout a FORMAT-tarball containing the directory
11016 # $tardir.
11017 #     tardir=directory && $(am__tar) > result.tar
11018 #
11019 # Substitute a variable $(am__untar) that extract such
11020 # a tarball read from stdin.
11021 #     $(am__untar) < result.tar
11022 AC_DEFUN([_AM_PROG_TAR],
11023 [# Always define AMTAR for backward compatibility.
11024 AM_MISSING_PROG([AMTAR], [tar])
11025 m4_if([$1], [v7],
11026      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
11027      [m4_case([$1], [ustar],, [pax],,
11028               [m4_fatal([Unknown tar format])])
11029 AC_MSG_CHECKING([how to create a $1 tar archive])
11030 # Loop over all known methods to create a tar archive until one works.
11031 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
11032 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
11033 # Do not fold the above two line into one, because Tru64 sh and
11034 # Solaris sh will not grok spaces in the rhs of `-'.
11035 for _am_tool in $_am_tools
11036 do
11037   case $_am_tool in
11038   gnutar)
11039     for _am_tar in tar gnutar gtar;
11040     do
11041       AM_RUN_LOG([$_am_tar --version]) && break
11042     done
11043     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
11044     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
11045     am__untar="$_am_tar -xf -"
11046     ;;
11047   plaintar)
11048     # Must skip GNU tar: if it does not support --format= it doesn't create
11049     # ustar tarball either.
11050     (tar --version) >/dev/null 2>&1 && continue
11051     am__tar='tar chf - "$$tardir"'
11052     am__tar_='tar chf - "$tardir"'
11053     am__untar='tar xf -'
11054     ;;
11055   pax)
11056     am__tar='pax -L -x $1 -w "$$tardir"'
11057     am__tar_='pax -L -x $1 -w "$tardir"'
11058     am__untar='pax -r'
11059     ;;
11060   cpio)
11061     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
11062     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
11063     am__untar='cpio -i -H $1 -d'
11064     ;;
11065   none)
11066     am__tar=false
11067     am__tar_=false
11068     am__untar=false
11069     ;;
11070   esac
11071
11072   # If the value was cached, stop now.  We just wanted to have am__tar
11073   # and am__untar set.
11074   test -n "${am_cv_prog_tar_$1}" && break
11075
11076   # tar/untar a dummy directory, and stop if the command works
11077   rm -rf conftest.dir
11078   mkdir conftest.dir
11079   echo GrepMe > conftest.dir/file
11080   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
11081   rm -rf conftest.dir
11082   if test -s conftest.tar; then
11083     AM_RUN_LOG([$am__untar <conftest.tar])
11084     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
11085   fi
11086 done
11087 rm -rf conftest.dir
11088
11089 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
11090 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
11091 AC_SUBST([am__tar])
11092 AC_SUBST([am__untar])
11093 ]) # _AM_PROG_TAR
11094
11095 m4_include([acinclude.m4])