1# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_AUTOCONF_VERSION],
15  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
17[m4_warning([this file was generated for autoconf 2.63.
18You have another version of autoconf.  It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22# gettext.m4 serial 60 (gettext-0.17)
23dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
24dnl This file is free software; the Free Software Foundation
25dnl gives unlimited permission to copy and/or distribute it,
26dnl with or without modifications, as long as this notice is preserved.
27dnl
28dnl This file can can be used in projects which are not available under
29dnl the GNU General Public License or the GNU Library General Public
30dnl License but which still want to provide support for the GNU gettext
31dnl functionality.
32dnl Please note that the actual code of the GNU gettext library is covered
33dnl by the GNU Library General Public License, and the rest of the GNU
34dnl gettext package package is covered by the GNU General Public License.
35dnl They are *not* in the public domain.
36
37dnl Authors:
38dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
39dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2006.
40
41dnl Macro to add for using GNU gettext.
42
43dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
44dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
45dnl    default (if it is not specified or empty) is 'no-libtool'.
46dnl    INTLSYMBOL should be 'external' for packages with no intl directory,
47dnl    and 'no-libtool' or 'use-libtool' for packages with an intl directory.
48dnl    If INTLSYMBOL is 'use-libtool', then a libtool library
49dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
50dnl    depending on --{enable,disable}-{shared,static} and on the presence of
51dnl    AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
52dnl    $(top_builddir)/intl/libintl.a will be created.
53dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
54dnl    implementations (in libc or libintl) without the ngettext() function
55dnl    will be ignored.  If NEEDSYMBOL is specified and is
56dnl    'need-formatstring-macros', then GNU gettext implementations that don't
57dnl    support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
58dnl INTLDIR is used to find the intl libraries.  If empty,
59dnl    the value `$(top_builddir)/intl/' is used.
60dnl
61dnl The result of the configuration is one of three cases:
62dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
63dnl    and used.
64dnl    Catalog format: GNU --> install in $(datadir)
65dnl    Catalog extension: .mo after installation, .gmo in source tree
66dnl 2) GNU gettext has been found in the system's C library.
67dnl    Catalog format: GNU --> install in $(datadir)
68dnl    Catalog extension: .mo after installation, .gmo in source tree
69dnl 3) No internationalization, always use English msgid.
70dnl    Catalog format: none
71dnl    Catalog extension: none
72dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
73dnl The use of .gmo is historical (it was needed to avoid overwriting the
74dnl GNU format catalogs when building on a platform with an X/Open gettext),
75dnl but we keep it in order not to force irrelevant filename changes on the
76dnl maintainers.
77dnl
78AC_DEFUN([AM_GNU_GETTEXT],
79[
80  dnl Argument checking.
81  ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
82    [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
83])])])])])
84  ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
85    [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
86])])])])
87  define([gt_included_intl],
88    ifelse([$1], [external],
89      ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
90      [yes]))
91  define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
92  gt_NEEDS_INIT
93  AM_GNU_GETTEXT_NEED([$2])
94
95  AC_REQUIRE([AM_PO_SUBDIRS])dnl
96  ifelse(gt_included_intl, yes, [
97    AC_REQUIRE([AM_INTL_SUBDIR])dnl
98  ])
99
100  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
101  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
102  AC_REQUIRE([AC_LIB_RPATH])
103
104  dnl Sometimes libintl requires libiconv, so first search for libiconv.
105  dnl Ideally we would do this search only after the
106  dnl      if test "$USE_NLS" = "yes"; then
107  dnl        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
108  dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
109  dnl the configure script would need to contain the same shell code
110  dnl again, outside any 'if'. There are two solutions:
111  dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
112  dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
113  dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
114  dnl documented, we avoid it.
115  ifelse(gt_included_intl, yes, , [
116    AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
117  ])
118
119  dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
120  gt_INTL_MACOSX
121
122  dnl Set USE_NLS.
123  AC_REQUIRE([AM_NLS])
124
125  ifelse(gt_included_intl, yes, [
126    BUILD_INCLUDED_LIBINTL=no
127    USE_INCLUDED_LIBINTL=no
128  ])
129  LIBINTL=
130  LTLIBINTL=
131  POSUB=
132
133  dnl Add a version number to the cache macros.
134  case " $gt_needs " in
135    *" need-formatstring-macros "*) gt_api_version=3 ;;
136    *" need-ngettext "*) gt_api_version=2 ;;
137    *) gt_api_version=1 ;;
138  esac
139  gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
140  gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
141
142  dnl If we use NLS figure out what method
143  if test "$USE_NLS" = "yes"; then
144    gt_use_preinstalled_gnugettext=no
145    ifelse(gt_included_intl, yes, [
146      AC_MSG_CHECKING([whether included gettext is requested])
147      AC_ARG_WITH(included-gettext,
148        [  --with-included-gettext use the GNU gettext library included here],
149        nls_cv_force_use_gnu_gettext=$withval,
150        nls_cv_force_use_gnu_gettext=no)
151      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
152
153      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
154      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
155    ])
156        dnl User does not insist on using GNU NLS library.  Figure out what
157        dnl to use.  If GNU gettext is available we use this.  Else we have
158        dnl to fall back to GNU NLS library.
159
160        if test $gt_api_version -ge 3; then
161          gt_revision_test_code='
162#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
163#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
164#endif
165changequote(,)dnl
166typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
167changequote([,])dnl
168'
169        else
170          gt_revision_test_code=
171        fi
172        if test $gt_api_version -ge 2; then
173          gt_expression_test_code=' + * ngettext ("", "", 0)'
174        else
175          gt_expression_test_code=
176        fi
177
178        AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
179         [AC_TRY_LINK([#include <libintl.h>
180$gt_revision_test_code
181extern int _nl_msg_cat_cntr;
182extern int *_nl_domain_bindings;],
183            [bindtextdomain ("", "");
184return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
185            [eval "$gt_func_gnugettext_libc=yes"],
186            [eval "$gt_func_gnugettext_libc=no"])])
187
188        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
189          dnl Sometimes libintl requires libiconv, so first search for libiconv.
190          ifelse(gt_included_intl, yes, , [
191            AM_ICONV_LINK
192          ])
193          dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
194          dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
195          dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
196          dnl even if libiconv doesn't exist.
197          AC_LIB_LINKFLAGS_BODY([intl])
198          AC_CACHE_CHECK([for GNU gettext in libintl],
199            [$gt_func_gnugettext_libintl],
200           [gt_save_CPPFLAGS="$CPPFLAGS"
201            CPPFLAGS="$CPPFLAGS $INCINTL"
202            gt_save_LIBS="$LIBS"
203            LIBS="$LIBS $LIBINTL"
204            dnl Now see whether libintl exists and does not depend on libiconv.
205            AC_TRY_LINK([#include <libintl.h>
206$gt_revision_test_code
207extern int _nl_msg_cat_cntr;
208extern
209#ifdef __cplusplus
210"C"
211#endif
212const char *_nl_expand_alias (const char *);],
213              [bindtextdomain ("", "");
214return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
215              [eval "$gt_func_gnugettext_libintl=yes"],
216              [eval "$gt_func_gnugettext_libintl=no"])
217            dnl Now see whether libintl exists and depends on libiconv.
218            if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
219              LIBS="$LIBS $LIBICONV"
220              AC_TRY_LINK([#include <libintl.h>
221$gt_revision_test_code
222extern int _nl_msg_cat_cntr;
223extern
224#ifdef __cplusplus
225"C"
226#endif
227const char *_nl_expand_alias (const char *);],
228                [bindtextdomain ("", "");
229return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
230               [LIBINTL="$LIBINTL $LIBICONV"
231                LTLIBINTL="$LTLIBINTL $LTLIBICONV"
232                eval "$gt_func_gnugettext_libintl=yes"
233               ])
234            fi
235            CPPFLAGS="$gt_save_CPPFLAGS"
236            LIBS="$gt_save_LIBS"])
237        fi
238
239        dnl If an already present or preinstalled GNU gettext() is found,
240        dnl use it.  But if this macro is used in GNU gettext, and GNU
241        dnl gettext is already preinstalled in libintl, we update this
242        dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
243        if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
244           || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
245                && test "$PACKAGE" != gettext-runtime \
246                && test "$PACKAGE" != gettext-tools; }; then
247          gt_use_preinstalled_gnugettext=yes
248        else
249          dnl Reset the values set by searching for libintl.
250          LIBINTL=
251          LTLIBINTL=
252          INCINTL=
253        fi
254
255    ifelse(gt_included_intl, yes, [
256        if test "$gt_use_preinstalled_gnugettext" != "yes"; then
257          dnl GNU gettext is not found in the C library.
258          dnl Fall back on included GNU gettext library.
259          nls_cv_use_gnu_gettext=yes
260        fi
261      fi
262
263      if test "$nls_cv_use_gnu_gettext" = "yes"; then
264        dnl Mark actions used to generate GNU NLS library.
265        BUILD_INCLUDED_LIBINTL=yes
266        USE_INCLUDED_LIBINTL=yes
267        LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
268        LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
269        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
270      fi
271
272      CATOBJEXT=
273      if test "$gt_use_preinstalled_gnugettext" = "yes" \
274         || test "$nls_cv_use_gnu_gettext" = "yes"; then
275        dnl Mark actions to use GNU gettext tools.
276        CATOBJEXT=.gmo
277      fi
278    ])
279
280    if test -n "$INTL_MACOSX_LIBS"; then
281      if test "$gt_use_preinstalled_gnugettext" = "yes" \
282         || test "$nls_cv_use_gnu_gettext" = "yes"; then
283        dnl Some extra flags are needed during linking.
284        LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
285        LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
286      fi
287    fi
288
289    if test "$gt_use_preinstalled_gnugettext" = "yes" \
290       || test "$nls_cv_use_gnu_gettext" = "yes"; then
291      AC_DEFINE(ENABLE_NLS, 1,
292        [Define to 1 if translation of program messages to the user's native language
293   is requested.])
294    else
295      USE_NLS=no
296    fi
297  fi
298
299  AC_MSG_CHECKING([whether to use NLS])
300  AC_MSG_RESULT([$USE_NLS])
301  if test "$USE_NLS" = "yes"; then
302    AC_MSG_CHECKING([where the gettext function comes from])
303    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
304      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
305        gt_source="external libintl"
306      else
307        gt_source="libc"
308      fi
309    else
310      gt_source="included intl directory"
311    fi
312    AC_MSG_RESULT([$gt_source])
313  fi
314
315  if test "$USE_NLS" = "yes"; then
316
317    if test "$gt_use_preinstalled_gnugettext" = "yes"; then
318      if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
319        AC_MSG_CHECKING([how to link with libintl])
320        AC_MSG_RESULT([$LIBINTL])
321        AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
322      fi
323
324      dnl For backward compatibility. Some packages may be using this.
325      AC_DEFINE(HAVE_GETTEXT, 1,
326       [Define if the GNU gettext() function is already present or preinstalled.])
327      AC_DEFINE(HAVE_DCGETTEXT, 1,
328       [Define if the GNU dcgettext() function is already present or preinstalled.])
329    fi
330
331    dnl We need to process the po/ directory.
332    POSUB=po
333  fi
334
335  ifelse(gt_included_intl, yes, [
336    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
337    dnl to 'yes' because some of the testsuite requires it.
338    if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
339      BUILD_INCLUDED_LIBINTL=yes
340    fi
341
342    dnl Make all variables we use known to autoconf.
343    AC_SUBST(BUILD_INCLUDED_LIBINTL)
344    AC_SUBST(USE_INCLUDED_LIBINTL)
345    AC_SUBST(CATOBJEXT)
346
347    dnl For backward compatibility. Some configure.ins may be using this.
348    nls_cv_header_intl=
349    nls_cv_header_libgt=
350
351    dnl For backward compatibility. Some Makefiles may be using this.
352    DATADIRNAME=share
353    AC_SUBST(DATADIRNAME)
354
355    dnl For backward compatibility. Some Makefiles may be using this.
356    INSTOBJEXT=.mo
357    AC_SUBST(INSTOBJEXT)
358
359    dnl For backward compatibility. Some Makefiles may be using this.
360    GENCAT=gencat
361    AC_SUBST(GENCAT)
362
363    dnl For backward compatibility. Some Makefiles may be using this.
364    INTLOBJS=
365    if test "$USE_INCLUDED_LIBINTL" = yes; then
366      INTLOBJS="\$(GETTOBJS)"
367    fi
368    AC_SUBST(INTLOBJS)
369
370    dnl Enable libtool support if the surrounding package wishes it.
371    INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
372    AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
373  ])
374
375  dnl For backward compatibility. Some Makefiles may be using this.
376  INTLLIBS="$LIBINTL"
377  AC_SUBST(INTLLIBS)
378
379  dnl Make all documented variables known to autoconf.
380  AC_SUBST(LIBINTL)
381  AC_SUBST(LTLIBINTL)
382  AC_SUBST(POSUB)
383])
384
385
386dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
387m4_define([gt_NEEDS_INIT],
388[
389  m4_divert_text([DEFAULTS], [gt_needs=])
390  m4_define([gt_NEEDS_INIT], [])
391])
392
393
394dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
395AC_DEFUN([AM_GNU_GETTEXT_NEED],
396[
397  m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
398])
399
400
401dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
402AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
403
404# iconv.m4 serial AM6 (gettext-0.17)
405dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
406dnl This file is free software; the Free Software Foundation
407dnl gives unlimited permission to copy and/or distribute it,
408dnl with or without modifications, as long as this notice is preserved.
409
410dnl From Bruno Haible.
411
412AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
413[
414  dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
415  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
416  AC_REQUIRE([AC_LIB_RPATH])
417
418  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
419  dnl accordingly.
420  AC_LIB_LINKFLAGS_BODY([iconv])
421])
422
423AC_DEFUN([AM_ICONV_LINK],
424[
425  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
426  dnl those with the standalone portable GNU libiconv installed).
427  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
428
429  dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
430  dnl accordingly.
431  AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
432
433  dnl Add $INCICONV to CPPFLAGS before performing the following checks,
434  dnl because if the user has installed libiconv and not disabled its use
435  dnl via --without-libiconv-prefix, he wants to use it. The first
436  dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
437  am_save_CPPFLAGS="$CPPFLAGS"
438  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
439
440  AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
441    am_cv_func_iconv="no, consider installing GNU libiconv"
442    am_cv_lib_iconv=no
443    AC_TRY_LINK([#include <stdlib.h>
444#include <iconv.h>],
445      [iconv_t cd = iconv_open("","");
446       iconv(cd,NULL,NULL,NULL,NULL);
447       iconv_close(cd);],
448      am_cv_func_iconv=yes)
449    if test "$am_cv_func_iconv" != yes; then
450      am_save_LIBS="$LIBS"
451      LIBS="$LIBS $LIBICONV"
452      AC_TRY_LINK([#include <stdlib.h>
453#include <iconv.h>],
454        [iconv_t cd = iconv_open("","");
455         iconv(cd,NULL,NULL,NULL,NULL);
456         iconv_close(cd);],
457        am_cv_lib_iconv=yes
458        am_cv_func_iconv=yes)
459      LIBS="$am_save_LIBS"
460    fi
461  ])
462  if test "$am_cv_func_iconv" = yes; then
463    AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
464      dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
465      am_save_LIBS="$LIBS"
466      if test $am_cv_lib_iconv = yes; then
467        LIBS="$LIBS $LIBICONV"
468      fi
469      AC_TRY_RUN([
470#include <iconv.h>
471#include <string.h>
472int main ()
473{
474  /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
475     returns.  */
476  {
477    iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
478    if (cd_utf8_to_88591 != (iconv_t)(-1))
479      {
480        static const char input[] = "\342\202\254"; /* EURO SIGN */
481        char buf[10];
482        const char *inptr = input;
483        size_t inbytesleft = strlen (input);
484        char *outptr = buf;
485        size_t outbytesleft = sizeof (buf);
486        size_t res = iconv (cd_utf8_to_88591,
487                            (char **) &inptr, &inbytesleft,
488                            &outptr, &outbytesleft);
489        if (res == 0)
490          return 1;
491      }
492  }
493#if 0 /* This bug could be worked around by the caller.  */
494  /* Test against HP-UX 11.11 bug: Positive return value instead of 0.  */
495  {
496    iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
497    if (cd_88591_to_utf8 != (iconv_t)(-1))
498      {
499        static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
500        char buf[50];
501        const char *inptr = input;
502        size_t inbytesleft = strlen (input);
503        char *outptr = buf;
504        size_t outbytesleft = sizeof (buf);
505        size_t res = iconv (cd_88591_to_utf8,
506                            (char **) &inptr, &inbytesleft,
507                            &outptr, &outbytesleft);
508        if ((int)res > 0)
509          return 1;
510      }
511  }
512#endif
513  /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
514     provided.  */
515  if (/* Try standardized names.  */
516      iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
517      /* Try IRIX, OSF/1 names.  */
518      && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
519      /* Try AIX names.  */
520      && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
521      /* Try HP-UX names.  */
522      && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
523    return 1;
524  return 0;
525}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
526        [case "$host_os" in
527           aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
528           *)            am_cv_func_iconv_works="guessing yes" ;;
529         esac])
530      LIBS="$am_save_LIBS"
531    ])
532    case "$am_cv_func_iconv_works" in
533      *no) am_func_iconv=no am_cv_lib_iconv=no ;;
534      *)   am_func_iconv=yes ;;
535    esac
536  else
537    am_func_iconv=no am_cv_lib_iconv=no
538  fi
539  if test "$am_func_iconv" = yes; then
540    AC_DEFINE(HAVE_ICONV, 1,
541      [Define if you have the iconv() function and it works.])
542  fi
543  if test "$am_cv_lib_iconv" = yes; then
544    AC_MSG_CHECKING([how to link with libiconv])
545    AC_MSG_RESULT([$LIBICONV])
546  else
547    dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
548    dnl either.
549    CPPFLAGS="$am_save_CPPFLAGS"
550    LIBICONV=
551    LTLIBICONV=
552  fi
553  AC_SUBST(LIBICONV)
554  AC_SUBST(LTLIBICONV)
555])
556
557AC_DEFUN([AM_ICONV],
558[
559  AM_ICONV_LINK
560  if test "$am_cv_func_iconv" = yes; then
561    AC_MSG_CHECKING([for iconv declaration])
562    AC_CACHE_VAL(am_cv_proto_iconv, [
563      AC_TRY_COMPILE([
564#include <stdlib.h>
565#include <iconv.h>
566extern
567#ifdef __cplusplus
568"C"
569#endif
570#if defined(__STDC__) || defined(__cplusplus)
571size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
572#else
573size_t iconv();
574#endif
575], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
576      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
577    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
578    AC_MSG_RESULT([$]{ac_t:-
579         }[$]am_cv_proto_iconv)
580    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
581      [Define as const if the declaration of iconv() needs const.])
582  fi
583])
584
585# lib-ld.m4 serial 3 (gettext-0.13)
586dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
587dnl This file is free software; the Free Software Foundation
588dnl gives unlimited permission to copy and/or distribute it,
589dnl with or without modifications, as long as this notice is preserved.
590
591dnl Subroutines of libtool.m4,
592dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
593dnl with libtool.m4.
594
595dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
596AC_DEFUN([AC_LIB_PROG_LD_GNU],
597[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
598[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
599case `$LD -v 2>&1 </dev/null` in
600*GNU* | *'with BFD'*)
601  acl_cv_prog_gnu_ld=yes ;;
602*)
603  acl_cv_prog_gnu_ld=no ;;
604esac])
605with_gnu_ld=$acl_cv_prog_gnu_ld
606])
607
608dnl From libtool-1.4. Sets the variable LD.
609AC_DEFUN([AC_LIB_PROG_LD],
610[AC_ARG_WITH(gnu-ld,
611[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
612test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
613AC_REQUIRE([AC_PROG_CC])dnl
614AC_REQUIRE([AC_CANONICAL_HOST])dnl
615# Prepare PATH_SEPARATOR.
616# The user is always right.
617if test "${PATH_SEPARATOR+set}" != set; then
618  echo "#! /bin/sh" >conf$$.sh
619  echo  "exit 0"   >>conf$$.sh
620  chmod +x conf$$.sh
621  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
622    PATH_SEPARATOR=';'
623  else
624    PATH_SEPARATOR=:
625  fi
626  rm -f conf$$.sh
627fi
628ac_prog=ld
629if test "$GCC" = yes; then
630  # Check if gcc -print-prog-name=ld gives a path.
631  AC_MSG_CHECKING([for ld used by GCC])
632  case $host in
633  *-*-mingw*)
634    # gcc leaves a trailing carriage return which upsets mingw
635    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
636  *)
637    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
638  esac
639  case $ac_prog in
640    # Accept absolute paths.
641    [[\\/]* | [A-Za-z]:[\\/]*)]
642      [re_direlt='/[^/][^/]*/\.\./']
643      # Canonicalize the path of ld
644      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
645      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
646	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
647      done
648      test -z "$LD" && LD="$ac_prog"
649      ;;
650  "")
651    # If it fails, then pretend we aren't using GCC.
652    ac_prog=ld
653    ;;
654  *)
655    # If it is relative, then search for the first ld in PATH.
656    with_gnu_ld=unknown
657    ;;
658  esac
659elif test "$with_gnu_ld" = yes; then
660  AC_MSG_CHECKING([for GNU ld])
661else
662  AC_MSG_CHECKING([for non-GNU ld])
663fi
664AC_CACHE_VAL(acl_cv_path_LD,
665[if test -z "$LD"; then
666  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
667  for ac_dir in $PATH; do
668    test -z "$ac_dir" && ac_dir=.
669    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
670      acl_cv_path_LD="$ac_dir/$ac_prog"
671      # Check to see if the program is GNU ld.  I'd rather use --version,
672      # but apparently some GNU ld's only accept -v.
673      # Break only if it was the GNU/non-GNU ld that we prefer.
674      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
675      *GNU* | *'with BFD'*)
676	test "$with_gnu_ld" != no && break ;;
677      *)
678	test "$with_gnu_ld" != yes && break ;;
679      esac
680    fi
681  done
682  IFS="$ac_save_ifs"
683else
684  acl_cv_path_LD="$LD" # Let the user override the test with a path.
685fi])
686LD="$acl_cv_path_LD"
687if test -n "$LD"; then
688  AC_MSG_RESULT($LD)
689else
690  AC_MSG_RESULT(no)
691fi
692test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
693AC_LIB_PROG_LD_GNU
694])
695
696# lib-link.m4 serial 13 (gettext-0.17)
697dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
698dnl This file is free software; the Free Software Foundation
699dnl gives unlimited permission to copy and/or distribute it,
700dnl with or without modifications, as long as this notice is preserved.
701
702dnl From Bruno Haible.
703
704AC_PREREQ(2.54)
705
706dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
707dnl the libraries corresponding to explicit and implicit dependencies.
708dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
709dnl augments the CPPFLAGS variable.
710dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
711dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
712AC_DEFUN([AC_LIB_LINKFLAGS],
713[
714  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
715  AC_REQUIRE([AC_LIB_RPATH])
716  define([Name],[translit([$1],[./-], [___])])
717  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
718                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
719  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
720    AC_LIB_LINKFLAGS_BODY([$1], [$2])
721    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
722    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
723    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
724    ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
725  ])
726  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
727  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
728  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
729  LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
730  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
731  AC_SUBST([LIB]NAME)
732  AC_SUBST([LTLIB]NAME)
733  AC_SUBST([LIB]NAME[_PREFIX])
734  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
735  dnl results of this search when this library appears as a dependency.
736  HAVE_LIB[]NAME=yes
737  undefine([Name])
738  undefine([NAME])
739])
740
741dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
742dnl searches for libname and the libraries corresponding to explicit and
743dnl implicit dependencies, together with the specified include files and
744dnl the ability to compile and link the specified testcode. If found, it
745dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
746dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
747dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
748dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
749dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
750dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
751AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
752[
753  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
754  AC_REQUIRE([AC_LIB_RPATH])
755  define([Name],[translit([$1],[./-], [___])])
756  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
757                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
758
759  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
760  dnl accordingly.
761  AC_LIB_LINKFLAGS_BODY([$1], [$2])
762
763  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
764  dnl because if the user has installed lib[]Name and not disabled its use
765  dnl via --without-lib[]Name-prefix, he wants to use it.
766  ac_save_CPPFLAGS="$CPPFLAGS"
767  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
768
769  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
770    ac_save_LIBS="$LIBS"
771    LIBS="$LIBS $LIB[]NAME"
772    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
773    LIBS="$ac_save_LIBS"
774  ])
775  if test "$ac_cv_lib[]Name" = yes; then
776    HAVE_LIB[]NAME=yes
777    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
778    AC_MSG_CHECKING([how to link with lib[]$1])
779    AC_MSG_RESULT([$LIB[]NAME])
780  else
781    HAVE_LIB[]NAME=no
782    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
783    dnl $INC[]NAME either.
784    CPPFLAGS="$ac_save_CPPFLAGS"
785    LIB[]NAME=
786    LTLIB[]NAME=
787    LIB[]NAME[]_PREFIX=
788  fi
789  AC_SUBST([HAVE_LIB]NAME)
790  AC_SUBST([LIB]NAME)
791  AC_SUBST([LTLIB]NAME)
792  AC_SUBST([LIB]NAME[_PREFIX])
793  undefine([Name])
794  undefine([NAME])
795])
796
797dnl Determine the platform dependent parameters needed to use rpath:
798dnl   acl_libext,
799dnl   acl_shlibext,
800dnl   acl_hardcode_libdir_flag_spec,
801dnl   acl_hardcode_libdir_separator,
802dnl   acl_hardcode_direct,
803dnl   acl_hardcode_minus_L.
804AC_DEFUN([AC_LIB_RPATH],
805[
806  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
807  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
808  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
809  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
810  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
811  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
812  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
813    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
814    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
815    . ./conftest.sh
816    rm -f ./conftest.sh
817    acl_cv_rpath=done
818  ])
819  wl="$acl_cv_wl"
820  acl_libext="$acl_cv_libext"
821  acl_shlibext="$acl_cv_shlibext"
822  acl_libname_spec="$acl_cv_libname_spec"
823  acl_library_names_spec="$acl_cv_library_names_spec"
824  acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
825  acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
826  acl_hardcode_direct="$acl_cv_hardcode_direct"
827  acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
828  dnl Determine whether the user wants rpath handling at all.
829  AC_ARG_ENABLE(rpath,
830    [  --disable-rpath         do not hardcode runtime library paths],
831    :, enable_rpath=yes)
832])
833
834dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
835dnl the libraries corresponding to explicit and implicit dependencies.
836dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
837dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
838dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
839AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
840[
841  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
842  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
843                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
844  dnl Autoconf >= 2.61 supports dots in --with options.
845  define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
846  dnl By default, look in $includedir and $libdir.
847  use_additional=yes
848  AC_LIB_WITH_FINAL_PREFIX([
849    eval additional_includedir=\"$includedir\"
850    eval additional_libdir=\"$libdir\"
851  ])
852  AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
853[  --with-lib]N_A_M_E[-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
854  --without-lib]N_A_M_E[-prefix     don't search for lib$1 in includedir and libdir],
855[
856    if test "X$withval" = "Xno"; then
857      use_additional=no
858    else
859      if test "X$withval" = "X"; then
860        AC_LIB_WITH_FINAL_PREFIX([
861          eval additional_includedir=\"$includedir\"
862          eval additional_libdir=\"$libdir\"
863        ])
864      else
865        additional_includedir="$withval/include"
866        additional_libdir="$withval/$acl_libdirstem"
867      fi
868    fi
869])
870  dnl Search the library and its dependencies in $additional_libdir and
871  dnl $LDFLAGS. Using breadth-first-seach.
872  LIB[]NAME=
873  LTLIB[]NAME=
874  INC[]NAME=
875  LIB[]NAME[]_PREFIX=
876  rpathdirs=
877  ltrpathdirs=
878  names_already_handled=
879  names_next_round='$1 $2'
880  while test -n "$names_next_round"; do
881    names_this_round="$names_next_round"
882    names_next_round=
883    for name in $names_this_round; do
884      already_handled=
885      for n in $names_already_handled; do
886        if test "$n" = "$name"; then
887          already_handled=yes
888          break
889        fi
890      done
891      if test -z "$already_handled"; then
892        names_already_handled="$names_already_handled $name"
893        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
894        dnl or AC_LIB_HAVE_LINKFLAGS call.
895        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
896        eval value=\"\$HAVE_LIB$uppername\"
897        if test -n "$value"; then
898          if test "$value" = yes; then
899            eval value=\"\$LIB$uppername\"
900            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
901            eval value=\"\$LTLIB$uppername\"
902            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
903          else
904            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
905            dnl that this library doesn't exist. So just drop it.
906            :
907          fi
908        else
909          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
910          dnl and the already constructed $LIBNAME/$LTLIBNAME.
911          found_dir=
912          found_la=
913          found_so=
914          found_a=
915          eval libname=\"$acl_libname_spec\"    # typically: libname=lib$name
916          if test -n "$acl_shlibext"; then
917            shrext=".$acl_shlibext"             # typically: shrext=.so
918          else
919            shrext=
920          fi
921          if test $use_additional = yes; then
922            dir="$additional_libdir"
923            dnl The same code as in the loop below:
924            dnl First look for a shared library.
925            if test -n "$acl_shlibext"; then
926              if test -f "$dir/$libname$shrext"; then
927                found_dir="$dir"
928                found_so="$dir/$libname$shrext"
929              else
930                if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
931                  ver=`(cd "$dir" && \
932                        for f in "$libname$shrext".*; do echo "$f"; done \
933                        | sed -e "s,^$libname$shrext\\\\.,," \
934                        | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
935                        | sed 1q ) 2>/dev/null`
936                  if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
937                    found_dir="$dir"
938                    found_so="$dir/$libname$shrext.$ver"
939                  fi
940                else
941                  eval library_names=\"$acl_library_names_spec\"
942                  for f in $library_names; do
943                    if test -f "$dir/$f"; then
944                      found_dir="$dir"
945                      found_so="$dir/$f"
946                      break
947                    fi
948                  done
949                fi
950              fi
951            fi
952            dnl Then look for a static library.
953            if test "X$found_dir" = "X"; then
954              if test -f "$dir/$libname.$acl_libext"; then
955                found_dir="$dir"
956                found_a="$dir/$libname.$acl_libext"
957              fi
958            fi
959            if test "X$found_dir" != "X"; then
960              if test -f "$dir/$libname.la"; then
961                found_la="$dir/$libname.la"
962              fi
963            fi
964          fi
965          if test "X$found_dir" = "X"; then
966            for x in $LDFLAGS $LTLIB[]NAME; do
967              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
968              case "$x" in
969                -L*)
970                  dir=`echo "X$x" | sed -e 's/^X-L//'`
971                  dnl First look for a shared library.
972                  if test -n "$acl_shlibext"; then
973                    if test -f "$dir/$libname$shrext"; then
974                      found_dir="$dir"
975                      found_so="$dir/$libname$shrext"
976                    else
977                      if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
978                        ver=`(cd "$dir" && \
979                              for f in "$libname$shrext".*; do echo "$f"; done \
980                              | sed -e "s,^$libname$shrext\\\\.,," \
981                              | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
982                              | sed 1q ) 2>/dev/null`
983                        if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
984                          found_dir="$dir"
985                          found_so="$dir/$libname$shrext.$ver"
986                        fi
987                      else
988                        eval library_names=\"$acl_library_names_spec\"
989                        for f in $library_names; do
990                          if test -f "$dir/$f"; then
991                            found_dir="$dir"
992                            found_so="$dir/$f"
993                            break
994                          fi
995                        done
996                      fi
997                    fi
998                  fi
999                  dnl Then look for a static library.
1000                  if test "X$found_dir" = "X"; then
1001                    if test -f "$dir/$libname.$acl_libext"; then
1002                      found_dir="$dir"
1003                      found_a="$dir/$libname.$acl_libext"
1004                    fi
1005                  fi
1006                  if test "X$found_dir" != "X"; then
1007                    if test -f "$dir/$libname.la"; then
1008                      found_la="$dir/$libname.la"
1009                    fi
1010                  fi
1011                  ;;
1012              esac
1013              if test "X$found_dir" != "X"; then
1014                break
1015              fi
1016            done
1017          fi
1018          if test "X$found_dir" != "X"; then
1019            dnl Found the library.
1020            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
1021            if test "X$found_so" != "X"; then
1022              dnl Linking with a shared library. We attempt to hardcode its
1023              dnl directory into the executable's runpath, unless it's the
1024              dnl standard /usr/lib.
1025              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
1026                dnl No hardcoding is needed.
1027                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1028              else
1029                dnl Use an explicit option to hardcode DIR into the resulting
1030                dnl binary.
1031                dnl Potentially add DIR to ltrpathdirs.
1032                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1033                haveit=
1034                for x in $ltrpathdirs; do
1035                  if test "X$x" = "X$found_dir"; then
1036                    haveit=yes
1037                    break
1038                  fi
1039                done
1040                if test -z "$haveit"; then
1041                  ltrpathdirs="$ltrpathdirs $found_dir"
1042                fi
1043                dnl The hardcoding into $LIBNAME is system dependent.
1044                if test "$acl_hardcode_direct" = yes; then
1045                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
1046                  dnl resulting binary.
1047                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1048                else
1049                  if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1050                    dnl Use an explicit option to hardcode DIR into the resulting
1051                    dnl binary.
1052                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1053                    dnl Potentially add DIR to rpathdirs.
1054                    dnl The rpathdirs will be appended to $LIBNAME at the end.
1055                    haveit=
1056                    for x in $rpathdirs; do
1057                      if test "X$x" = "X$found_dir"; then
1058                        haveit=yes
1059                        break
1060                      fi
1061                    done
1062                    if test -z "$haveit"; then
1063                      rpathdirs="$rpathdirs $found_dir"
1064                    fi
1065                  else
1066                    dnl Rely on "-L$found_dir".
1067                    dnl But don't add it if it's already contained in the LDFLAGS
1068                    dnl or the already constructed $LIBNAME
1069                    haveit=
1070                    for x in $LDFLAGS $LIB[]NAME; do
1071                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1072                      if test "X$x" = "X-L$found_dir"; then
1073                        haveit=yes
1074                        break
1075                      fi
1076                    done
1077                    if test -z "$haveit"; then
1078                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
1079                    fi
1080                    if test "$acl_hardcode_minus_L" != no; then
1081                      dnl FIXME: Not sure whether we should use
1082                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1083                      dnl here.
1084                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
1085                    else
1086                      dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
1087                      dnl here, because this doesn't fit in flags passed to the
1088                      dnl compiler. So give up. No hardcoding. This affects only
1089                      dnl very old systems.
1090                      dnl FIXME: Not sure whether we should use
1091                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
1092                      dnl here.
1093                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1094                    fi
1095                  fi
1096                fi
1097              fi
1098            else
1099              if test "X$found_a" != "X"; then
1100                dnl Linking with a static library.
1101                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
1102              else
1103                dnl We shouldn't come here, but anyway it's good to have a
1104                dnl fallback.
1105                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
1106              fi
1107            fi
1108            dnl Assume the include files are nearby.
1109            additional_includedir=
1110            case "$found_dir" in
1111              */$acl_libdirstem | */$acl_libdirstem/)
1112                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1113                LIB[]NAME[]_PREFIX="$basedir"
1114                additional_includedir="$basedir/include"
1115                ;;
1116            esac
1117            if test "X$additional_includedir" != "X"; then
1118              dnl Potentially add $additional_includedir to $INCNAME.
1119              dnl But don't add it
1120              dnl   1. if it's the standard /usr/include,
1121              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
1122              dnl   3. if it's already present in $CPPFLAGS or the already
1123              dnl      constructed $INCNAME,
1124              dnl   4. if it doesn't exist as a directory.
1125              if test "X$additional_includedir" != "X/usr/include"; then
1126                haveit=
1127                if test "X$additional_includedir" = "X/usr/local/include"; then
1128                  if test -n "$GCC"; then
1129                    case $host_os in
1130                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1131                    esac
1132                  fi
1133                fi
1134                if test -z "$haveit"; then
1135                  for x in $CPPFLAGS $INC[]NAME; do
1136                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1137                    if test "X$x" = "X-I$additional_includedir"; then
1138                      haveit=yes
1139                      break
1140                    fi
1141                  done
1142                  if test -z "$haveit"; then
1143                    if test -d "$additional_includedir"; then
1144                      dnl Really add $additional_includedir to $INCNAME.
1145                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1146                    fi
1147                  fi
1148                fi
1149              fi
1150            fi
1151            dnl Look for dependencies.
1152            if test -n "$found_la"; then
1153              dnl Read the .la file. It defines the variables
1154              dnl dlname, library_names, old_library, dependency_libs, current,
1155              dnl age, revision, installed, dlopen, dlpreopen, libdir.
1156              save_libdir="$libdir"
1157              case "$found_la" in
1158                */* | *\\*) . "$found_la" ;;
1159                *) . "./$found_la" ;;
1160              esac
1161              libdir="$save_libdir"
1162              dnl We use only dependency_libs.
1163              for dep in $dependency_libs; do
1164                case "$dep" in
1165                  -L*)
1166                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1167                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1168                    dnl But don't add it
1169                    dnl   1. if it's the standard /usr/lib,
1170                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
1171                    dnl   3. if it's already present in $LDFLAGS or the already
1172                    dnl      constructed $LIBNAME,
1173                    dnl   4. if it doesn't exist as a directory.
1174                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1175                      haveit=
1176                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1177                        if test -n "$GCC"; then
1178                          case $host_os in
1179                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1180                          esac
1181                        fi
1182                      fi
1183                      if test -z "$haveit"; then
1184                        haveit=
1185                        for x in $LDFLAGS $LIB[]NAME; do
1186                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1187                          if test "X$x" = "X-L$additional_libdir"; then
1188                            haveit=yes
1189                            break
1190                          fi
1191                        done
1192                        if test -z "$haveit"; then
1193                          if test -d "$additional_libdir"; then
1194                            dnl Really add $additional_libdir to $LIBNAME.
1195                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1196                          fi
1197                        fi
1198                        haveit=
1199                        for x in $LDFLAGS $LTLIB[]NAME; do
1200                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1201                          if test "X$x" = "X-L$additional_libdir"; then
1202                            haveit=yes
1203                            break
1204                          fi
1205                        done
1206                        if test -z "$haveit"; then
1207                          if test -d "$additional_libdir"; then
1208                            dnl Really add $additional_libdir to $LTLIBNAME.
1209                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1210                          fi
1211                        fi
1212                      fi
1213                    fi
1214                    ;;
1215                  -R*)
1216                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
1217                    if test "$enable_rpath" != no; then
1218                      dnl Potentially add DIR to rpathdirs.
1219                      dnl The rpathdirs will be appended to $LIBNAME at the end.
1220                      haveit=
1221                      for x in $rpathdirs; do
1222                        if test "X$x" = "X$dir"; then
1223                          haveit=yes
1224                          break
1225                        fi
1226                      done
1227                      if test -z "$haveit"; then
1228                        rpathdirs="$rpathdirs $dir"
1229                      fi
1230                      dnl Potentially add DIR to ltrpathdirs.
1231                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1232                      haveit=
1233                      for x in $ltrpathdirs; do
1234                        if test "X$x" = "X$dir"; then
1235                          haveit=yes
1236                          break
1237                        fi
1238                      done
1239                      if test -z "$haveit"; then
1240                        ltrpathdirs="$ltrpathdirs $dir"
1241                      fi
1242                    fi
1243                    ;;
1244                  -l*)
1245                    dnl Handle this in the next round.
1246                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1247                    ;;
1248                  *.la)
1249                    dnl Handle this in the next round. Throw away the .la's
1250                    dnl directory; it is already contained in a preceding -L
1251                    dnl option.
1252                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1253                    ;;
1254                  *)
1255                    dnl Most likely an immediate library name.
1256                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1257                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1258                    ;;
1259                esac
1260              done
1261            fi
1262          else
1263            dnl Didn't find the library; assume it is in the system directories
1264            dnl known to the linker and runtime loader. (All the system
1265            dnl directories known to the linker should also be known to the
1266            dnl runtime loader, otherwise the system is severely misconfigured.)
1267            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1268            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1269          fi
1270        fi
1271      fi
1272    done
1273  done
1274  if test "X$rpathdirs" != "X"; then
1275    if test -n "$acl_hardcode_libdir_separator"; then
1276      dnl Weird platform: only the last -rpath option counts, the user must
1277      dnl pass all path elements in one option. We can arrange that for a
1278      dnl single library, but not when more than one $LIBNAMEs are used.
1279      alldirs=
1280      for found_dir in $rpathdirs; do
1281        alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
1282      done
1283      dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
1284      acl_save_libdir="$libdir"
1285      libdir="$alldirs"
1286      eval flag=\"$acl_hardcode_libdir_flag_spec\"
1287      libdir="$acl_save_libdir"
1288      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1289    else
1290      dnl The -rpath options are cumulative.
1291      for found_dir in $rpathdirs; do
1292        acl_save_libdir="$libdir"
1293        libdir="$found_dir"
1294        eval flag=\"$acl_hardcode_libdir_flag_spec\"
1295        libdir="$acl_save_libdir"
1296        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1297      done
1298    fi
1299  fi
1300  if test "X$ltrpathdirs" != "X"; then
1301    dnl When using libtool, the option that works for both libraries and
1302    dnl executables is -R. The -R options are cumulative.
1303    for found_dir in $ltrpathdirs; do
1304      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1305    done
1306  fi
1307])
1308
1309dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1310dnl unless already present in VAR.
1311dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1312dnl contains two or three consecutive elements that belong together.
1313AC_DEFUN([AC_LIB_APPENDTOVAR],
1314[
1315  for element in [$2]; do
1316    haveit=
1317    for x in $[$1]; do
1318      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1319      if test "X$x" = "X$element"; then
1320        haveit=yes
1321        break
1322      fi
1323    done
1324    if test -z "$haveit"; then
1325      [$1]="${[$1]}${[$1]:+ }$element"
1326    fi
1327  done
1328])
1329
1330dnl For those cases where a variable contains several -L and -l options
1331dnl referring to unknown libraries and directories, this macro determines the
1332dnl necessary additional linker options for the runtime path.
1333dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1334dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1335dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1336dnl otherwise linking without libtool is assumed.
1337AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1338[
1339  AC_REQUIRE([AC_LIB_RPATH])
1340  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1341  $1=
1342  if test "$enable_rpath" != no; then
1343    if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
1344      dnl Use an explicit option to hardcode directories into the resulting
1345      dnl binary.
1346      rpathdirs=
1347      next=
1348      for opt in $2; do
1349        if test -n "$next"; then
1350          dir="$next"
1351          dnl No need to hardcode the standard /usr/lib.
1352          if test "X$dir" != "X/usr/$acl_libdirstem"; then
1353            rpathdirs="$rpathdirs $dir"
1354          fi
1355          next=
1356        else
1357          case $opt in
1358            -L) next=yes ;;
1359            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1360                 dnl No need to hardcode the standard /usr/lib.
1361                 if test "X$dir" != "X/usr/$acl_libdirstem"; then
1362                   rpathdirs="$rpathdirs $dir"
1363                 fi
1364                 next= ;;
1365            *) next= ;;
1366          esac
1367        fi
1368      done
1369      if test "X$rpathdirs" != "X"; then
1370        if test -n ""$3""; then
1371          dnl libtool is used for linking. Use -R options.
1372          for dir in $rpathdirs; do
1373            $1="${$1}${$1:+ }-R$dir"
1374          done
1375        else
1376          dnl The linker is used for linking directly.
1377          if test -n "$acl_hardcode_libdir_separator"; then
1378            dnl Weird platform: only the last -rpath option counts, the user
1379            dnl must pass all path elements in one option.
1380            alldirs=
1381            for dir in $rpathdirs; do
1382              alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
1383            done
1384            acl_save_libdir="$libdir"
1385            libdir="$alldirs"
1386            eval flag=\"$acl_hardcode_libdir_flag_spec\"
1387            libdir="$acl_save_libdir"
1388            $1="$flag"
1389          else
1390            dnl The -rpath options are cumulative.
1391            for dir in $rpathdirs; do
1392              acl_save_libdir="$libdir"
1393              libdir="$dir"
1394              eval flag=\"$acl_hardcode_libdir_flag_spec\"
1395              libdir="$acl_save_libdir"
1396              $1="${$1}${$1:+ }$flag"
1397            done
1398          fi
1399        fi
1400      fi
1401    fi
1402  fi
1403  AC_SUBST([$1])
1404])
1405
1406# lib-prefix.m4 serial 5 (gettext-0.15)
1407dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
1408dnl This file is free software; the Free Software Foundation
1409dnl gives unlimited permission to copy and/or distribute it,
1410dnl with or without modifications, as long as this notice is preserved.
1411
1412dnl From Bruno Haible.
1413
1414dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1415dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1416dnl require excessive bracketing.
1417ifdef([AC_HELP_STRING],
1418[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1419[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1420
1421dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1422dnl to access previously installed libraries. The basic assumption is that
1423dnl a user will want packages to use other packages he previously installed
1424dnl with the same --prefix option.
1425dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1426dnl libraries, but is otherwise very convenient.
1427AC_DEFUN([AC_LIB_PREFIX],
1428[
1429  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1430  AC_REQUIRE([AC_PROG_CC])
1431  AC_REQUIRE([AC_CANONICAL_HOST])
1432  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1433  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1434  dnl By default, look in $includedir and $libdir.
1435  use_additional=yes
1436  AC_LIB_WITH_FINAL_PREFIX([
1437    eval additional_includedir=\"$includedir\"
1438    eval additional_libdir=\"$libdir\"
1439  ])
1440  AC_LIB_ARG_WITH([lib-prefix],
1441[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1442  --without-lib-prefix    don't search for libraries in includedir and libdir],
1443[
1444    if test "X$withval" = "Xno"; then
1445      use_additional=no
1446    else
1447      if test "X$withval" = "X"; then
1448        AC_LIB_WITH_FINAL_PREFIX([
1449          eval additional_includedir=\"$includedir\"
1450          eval additional_libdir=\"$libdir\"
1451        ])
1452      else
1453        additional_includedir="$withval/include"
1454        additional_libdir="$withval/$acl_libdirstem"
1455      fi
1456    fi
1457])
1458  if test $use_additional = yes; then
1459    dnl Potentially add $additional_includedir to $CPPFLAGS.
1460    dnl But don't add it
1461    dnl   1. if it's the standard /usr/include,
1462    dnl   2. if it's already present in $CPPFLAGS,
1463    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
1464    dnl   4. if it doesn't exist as a directory.
1465    if test "X$additional_includedir" != "X/usr/include"; then
1466      haveit=
1467      for x in $CPPFLAGS; do
1468        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1469        if test "X$x" = "X-I$additional_includedir"; then
1470          haveit=yes
1471          break
1472        fi
1473      done
1474      if test -z "$haveit"; then
1475        if test "X$additional_includedir" = "X/usr/local/include"; then
1476          if test -n "$GCC"; then
1477            case $host_os in
1478              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1479            esac
1480          fi
1481        fi
1482        if test -z "$haveit"; then
1483          if test -d "$additional_includedir"; then
1484            dnl Really add $additional_includedir to $CPPFLAGS.
1485            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1486          fi
1487        fi
1488      fi
1489    fi
1490    dnl Potentially add $additional_libdir to $LDFLAGS.
1491    dnl But don't add it
1492    dnl   1. if it's the standard /usr/lib,
1493    dnl   2. if it's already present in $LDFLAGS,
1494    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
1495    dnl   4. if it doesn't exist as a directory.
1496    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1497      haveit=
1498      for x in $LDFLAGS; do
1499        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1500        if test "X$x" = "X-L$additional_libdir"; then
1501          haveit=yes
1502          break
1503        fi
1504      done
1505      if test -z "$haveit"; then
1506        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1507          if test -n "$GCC"; then
1508            case $host_os in
1509              linux*) haveit=yes;;
1510            esac
1511          fi
1512        fi
1513        if test -z "$haveit"; then
1514          if test -d "$additional_libdir"; then
1515            dnl Really add $additional_libdir to $LDFLAGS.
1516            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1517          fi
1518        fi
1519      fi
1520    fi
1521  fi
1522])
1523
1524dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1525dnl acl_final_exec_prefix, containing the values to which $prefix and
1526dnl $exec_prefix will expand at the end of the configure script.
1527AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1528[
1529  dnl Unfortunately, prefix and exec_prefix get only finally determined
1530  dnl at the end of configure.
1531  if test "X$prefix" = "XNONE"; then
1532    acl_final_prefix="$ac_default_prefix"
1533  else
1534    acl_final_prefix="$prefix"
1535  fi
1536  if test "X$exec_prefix" = "XNONE"; then
1537    acl_final_exec_prefix='${prefix}'
1538  else
1539    acl_final_exec_prefix="$exec_prefix"
1540  fi
1541  acl_save_prefix="$prefix"
1542  prefix="$acl_final_prefix"
1543  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1544  prefix="$acl_save_prefix"
1545])
1546
1547dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1548dnl variables prefix and exec_prefix bound to the values they will have
1549dnl at the end of the configure script.
1550AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1551[
1552  acl_save_prefix="$prefix"
1553  prefix="$acl_final_prefix"
1554  acl_save_exec_prefix="$exec_prefix"
1555  exec_prefix="$acl_final_exec_prefix"
1556  $1
1557  exec_prefix="$acl_save_exec_prefix"
1558  prefix="$acl_save_prefix"
1559])
1560
1561dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
1562dnl the basename of the libdir, either "lib" or "lib64".
1563AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1564[
1565  dnl There is no formal standard regarding lib and lib64. The current
1566  dnl practice is that on a system supporting 32-bit and 64-bit instruction
1567  dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
1568  dnl libraries go under $prefix/lib. We determine the compiler's default
1569  dnl mode by looking at the compiler's library search path. If at least
1570  dnl of its elements ends in /lib64 or points to a directory whose absolute
1571  dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
1572  dnl default, namely "lib".
1573  acl_libdirstem=lib
1574  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1575  if test -n "$searchpath"; then
1576    acl_save_IFS="${IFS= 	}"; IFS=":"
1577    for searchdir in $searchpath; do
1578      if test -d "$searchdir"; then
1579        case "$searchdir" in
1580          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1581          *) searchdir=`cd "$searchdir" && pwd`
1582             case "$searchdir" in
1583               */lib64 ) acl_libdirstem=lib64 ;;
1584             esac ;;
1585        esac
1586      fi
1587    done
1588    IFS="$acl_save_IFS"
1589  fi
1590])
1591
1592# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1593#
1594#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1595#                 2006, 2007, 2008 Free Software Foundation, Inc.
1596#   Written by Gordon Matzigkeit, 1996
1597#
1598# This file is free software; the Free Software Foundation gives
1599# unlimited permission to copy and/or distribute it, with or without
1600# modifications, as long as this notice is preserved.
1601
1602m4_define([_LT_COPYING], [dnl
1603#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1604#                 2006, 2007, 2008 Free Software Foundation, Inc.
1605#   Written by Gordon Matzigkeit, 1996
1606#
1607#   This file is part of GNU Libtool.
1608#
1609# GNU Libtool is free software; you can redistribute it and/or
1610# modify it under the terms of the GNU General Public License as
1611# published by the Free Software Foundation; either version 2 of
1612# the License, or (at your option) any later version.
1613#
1614# As a special exception to the GNU General Public License,
1615# if you distribute this file as part of a program or library that
1616# is built using GNU Libtool, you may include this file under the
1617# same distribution terms that you use for the rest of that program.
1618#
1619# GNU Libtool is distributed in the hope that it will be useful,
1620# but WITHOUT ANY WARRANTY; without even the implied warranty of
1621# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1622# GNU General Public License for more details.
1623#
1624# You should have received a copy of the GNU General Public License
1625# along with GNU Libtool; see the file COPYING.  If not, a copy
1626# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1627# obtained by writing to the Free Software Foundation, Inc.,
1628# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1629])
1630
1631# serial 56 LT_INIT
1632
1633
1634# LT_PREREQ(VERSION)
1635# ------------------
1636# Complain and exit if this libtool version is less that VERSION.
1637m4_defun([LT_PREREQ],
1638[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1639       [m4_default([$3],
1640		   [m4_fatal([Libtool version $1 or higher is required],
1641		             63)])],
1642       [$2])])
1643
1644
1645# _LT_CHECK_BUILDDIR
1646# ------------------
1647# Complain if the absolute build directory name contains unusual characters
1648m4_defun([_LT_CHECK_BUILDDIR],
1649[case `pwd` in
1650  *\ * | *\	*)
1651    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1652esac
1653])
1654
1655
1656# LT_INIT([OPTIONS])
1657# ------------------
1658AC_DEFUN([LT_INIT],
1659[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1660AC_BEFORE([$0], [LT_LANG])dnl
1661AC_BEFORE([$0], [LT_OUTPUT])dnl
1662AC_BEFORE([$0], [LTDL_INIT])dnl
1663m4_require([_LT_CHECK_BUILDDIR])dnl
1664
1665dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1666m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1667m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1668dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1669dnl unless we require an AC_DEFUNed macro:
1670AC_REQUIRE([LTOPTIONS_VERSION])dnl
1671AC_REQUIRE([LTSUGAR_VERSION])dnl
1672AC_REQUIRE([LTVERSION_VERSION])dnl
1673AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1674m4_require([_LT_PROG_LTMAIN])dnl
1675
1676dnl Parse OPTIONS
1677_LT_SET_OPTIONS([$0], [$1])
1678
1679# This can be used to rebuild libtool when needed
1680LIBTOOL_DEPS="$ltmain"
1681
1682# Always use our own libtool.
1683LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1684AC_SUBST(LIBTOOL)dnl
1685
1686_LT_SETUP
1687
1688# Only expand once:
1689m4_define([LT_INIT])
1690])# LT_INIT
1691
1692# Old names:
1693AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1694AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1695dnl aclocal-1.4 backwards compatibility:
1696dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1697dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1698
1699
1700# _LT_CC_BASENAME(CC)
1701# -------------------
1702# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1703m4_defun([_LT_CC_BASENAME],
1704[for cc_temp in $1""; do
1705  case $cc_temp in
1706    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1707    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1708    \-*) ;;
1709    *) break;;
1710  esac
1711done
1712cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1713])
1714
1715
1716# _LT_FILEUTILS_DEFAULTS
1717# ----------------------
1718# It is okay to use these file commands and assume they have been set
1719# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1720m4_defun([_LT_FILEUTILS_DEFAULTS],
1721[: ${CP="cp -f"}
1722: ${MV="mv -f"}
1723: ${RM="rm -f"}
1724])# _LT_FILEUTILS_DEFAULTS
1725
1726
1727# _LT_SETUP
1728# ---------
1729m4_defun([_LT_SETUP],
1730[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1731AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1732_LT_DECL([], [host_alias], [0], [The host system])dnl
1733_LT_DECL([], [host], [0])dnl
1734_LT_DECL([], [host_os], [0])dnl
1735dnl
1736_LT_DECL([], [build_alias], [0], [The build system])dnl
1737_LT_DECL([], [build], [0])dnl
1738_LT_DECL([], [build_os], [0])dnl
1739dnl
1740AC_REQUIRE([AC_PROG_CC])dnl
1741AC_REQUIRE([LT_PATH_LD])dnl
1742AC_REQUIRE([LT_PATH_NM])dnl
1743dnl
1744AC_REQUIRE([AC_PROG_LN_S])dnl
1745test -z "$LN_S" && LN_S="ln -s"
1746_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1747dnl
1748AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1749_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1750_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1751dnl
1752m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1753m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1754m4_require([_LT_CMD_RELOAD])dnl
1755m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1756m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1757m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1758
1759_LT_CONFIG_LIBTOOL_INIT([
1760# See if we are running on zsh, and set the options which allow our
1761# commands through without removal of \ escapes INIT.
1762if test -n "\${ZSH_VERSION+set}" ; then
1763   setopt NO_GLOB_SUBST
1764fi
1765])
1766if test -n "${ZSH_VERSION+set}" ; then
1767   setopt NO_GLOB_SUBST
1768fi
1769
1770_LT_CHECK_OBJDIR
1771
1772m4_require([_LT_TAG_COMPILER])dnl
1773_LT_PROG_ECHO_BACKSLASH
1774
1775case $host_os in
1776aix3*)
1777  # AIX sometimes has problems with the GCC collect2 program.  For some
1778  # reason, if we set the COLLECT_NAMES environment variable, the problems
1779  # vanish in a puff of smoke.
1780  if test "X${COLLECT_NAMES+set}" != Xset; then
1781    COLLECT_NAMES=
1782    export COLLECT_NAMES
1783  fi
1784  ;;
1785esac
1786
1787# Sed substitution that helps us do robust quoting.  It backslashifies
1788# metacharacters that are still active within double-quoted strings.
1789sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1790
1791# Same as above, but do not quote variable references.
1792double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1793
1794# Sed substitution to delay expansion of an escaped shell variable in a
1795# double_quote_subst'ed string.
1796delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1797
1798# Sed substitution to delay expansion of an escaped single quote.
1799delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1800
1801# Sed substitution to avoid accidental globbing in evaled expressions
1802no_glob_subst='s/\*/\\\*/g'
1803
1804# Global variables:
1805ofile=libtool
1806can_build_shared=yes
1807
1808# All known linkers require a `.a' archive for static linking (except MSVC,
1809# which needs '.lib').
1810libext=a
1811
1812with_gnu_ld="$lt_cv_prog_gnu_ld"
1813
1814old_CC="$CC"
1815old_CFLAGS="$CFLAGS"
1816
1817# Set sane defaults for various variables
1818test -z "$CC" && CC=cc
1819test -z "$LTCC" && LTCC=$CC
1820test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1821test -z "$LD" && LD=ld
1822test -z "$ac_objext" && ac_objext=o
1823
1824_LT_CC_BASENAME([$compiler])
1825
1826# Only perform the check for file, if the check method requires it
1827test -z "$MAGIC_CMD" && MAGIC_CMD=file
1828case $deplibs_check_method in
1829file_magic*)
1830  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1831    _LT_PATH_MAGIC
1832  fi
1833  ;;
1834esac
1835
1836# Use C for the default configuration in the libtool script
1837LT_SUPPORTED_TAG([CC])
1838_LT_LANG_C_CONFIG
1839_LT_LANG_DEFAULT_CONFIG
1840_LT_CONFIG_COMMANDS
1841])# _LT_SETUP
1842
1843
1844# _LT_PROG_LTMAIN
1845# ---------------
1846# Note that this code is called both from `configure', and `config.status'
1847# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1848# `config.status' has no value for ac_aux_dir unless we are using Automake,
1849# so we pass a copy along to make sure it has a sensible value anyway.
1850m4_defun([_LT_PROG_LTMAIN],
1851[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1852_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1853ltmain="$ac_aux_dir/ltmain.sh"
1854])# _LT_PROG_LTMAIN
1855
1856
1857
1858# So that we can recreate a full libtool script including additional
1859# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1860# in macros and then make a single call at the end using the `libtool'
1861# label.
1862
1863
1864# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1865# ----------------------------------------
1866# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1867m4_define([_LT_CONFIG_LIBTOOL_INIT],
1868[m4_ifval([$1],
1869          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1870                     [$1
1871])])])
1872
1873# Initialize.
1874m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1875
1876
1877# _LT_CONFIG_LIBTOOL([COMMANDS])
1878# ------------------------------
1879# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1880m4_define([_LT_CONFIG_LIBTOOL],
1881[m4_ifval([$1],
1882          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1883                     [$1
1884])])])
1885
1886# Initialize.
1887m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1888
1889
1890# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1891# -----------------------------------------------------
1892m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1893[_LT_CONFIG_LIBTOOL([$1])
1894_LT_CONFIG_LIBTOOL_INIT([$2])
1895])
1896
1897
1898# _LT_FORMAT_COMMENT([COMMENT])
1899# -----------------------------
1900# Add leading comment marks to the start of each line, and a trailing
1901# full-stop to the whole comment if one is not present already.
1902m4_define([_LT_FORMAT_COMMENT],
1903[m4_ifval([$1], [
1904m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1905              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1906)])
1907
1908
1909
1910
1911
1912# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1913# -------------------------------------------------------------------
1914# CONFIGNAME is the name given to the value in the libtool script.
1915# VARNAME is the (base) name used in the configure script.
1916# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1917# VARNAME.  Any other value will be used directly.
1918m4_define([_LT_DECL],
1919[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1920    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1921	[m4_ifval([$1], [$1], [$2])])
1922    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1923    m4_ifval([$4],
1924	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1925    lt_dict_add_subkey([lt_decl_dict], [$2],
1926	[tagged?], [m4_ifval([$5], [yes], [no])])])
1927])
1928
1929
1930# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1931# --------------------------------------------------------
1932m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1933
1934
1935# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1936# ------------------------------------------------
1937m4_define([lt_decl_tag_varnames],
1938[_lt_decl_filter([tagged?], [yes], $@)])
1939
1940
1941# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1942# ---------------------------------------------------------
1943m4_define([_lt_decl_filter],
1944[m4_case([$#],
1945  [0], [m4_fatal([$0: too few arguments: $#])],
1946  [1], [m4_fatal([$0: too few arguments: $#: $1])],
1947  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1948  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1949  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1950])
1951
1952
1953# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1954# --------------------------------------------------
1955m4_define([lt_decl_quote_varnames],
1956[_lt_decl_filter([value], [1], $@)])
1957
1958
1959# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1960# ---------------------------------------------------
1961m4_define([lt_decl_dquote_varnames],
1962[_lt_decl_filter([value], [2], $@)])
1963
1964
1965# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1966# ---------------------------------------------------
1967m4_define([lt_decl_varnames_tagged],
1968[m4_assert([$# <= 2])dnl
1969_$0(m4_quote(m4_default([$1], [[, ]])),
1970    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1971    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1972m4_define([_lt_decl_varnames_tagged],
1973[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1974
1975
1976# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1977# ------------------------------------------------
1978m4_define([lt_decl_all_varnames],
1979[_$0(m4_quote(m4_default([$1], [[, ]])),
1980     m4_if([$2], [],
1981	   m4_quote(lt_decl_varnames),
1982	m4_quote(m4_shift($@))))[]dnl
1983])
1984m4_define([_lt_decl_all_varnames],
1985[lt_join($@, lt_decl_varnames_tagged([$1],
1986			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1987])
1988
1989
1990# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1991# ------------------------------------
1992# Quote a variable value, and forward it to `config.status' so that its
1993# declaration there will have the same value as in `configure'.  VARNAME
1994# must have a single quote delimited value for this to work.
1995m4_define([_LT_CONFIG_STATUS_DECLARE],
1996[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
1997
1998
1999# _LT_CONFIG_STATUS_DECLARATIONS
2000# ------------------------------
2001# We delimit libtool config variables with single quotes, so when
2002# we write them to config.status, we have to be sure to quote all
2003# embedded single quotes properly.  In configure, this macro expands
2004# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2005#
2006#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
2007m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2008[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2009    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2010
2011
2012# _LT_LIBTOOL_TAGS
2013# ----------------
2014# Output comment and list of tags supported by the script
2015m4_defun([_LT_LIBTOOL_TAGS],
2016[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2017available_tags="_LT_TAGS"dnl
2018])
2019
2020
2021# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2022# -----------------------------------
2023# Extract the dictionary values for VARNAME (optionally with TAG) and
2024# expand to a commented shell variable setting:
2025#
2026#    # Some comment about what VAR is for.
2027#    visible_name=$lt_internal_name
2028m4_define([_LT_LIBTOOL_DECLARE],
2029[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2030					   [description])))[]dnl
2031m4_pushdef([_libtool_name],
2032    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2033m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2034    [0], [_libtool_name=[$]$1],
2035    [1], [_libtool_name=$lt_[]$1],
2036    [2], [_libtool_name=$lt_[]$1],
2037    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2038m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2039])
2040
2041
2042# _LT_LIBTOOL_CONFIG_VARS
2043# -----------------------
2044# Produce commented declarations of non-tagged libtool config variables
2045# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2046# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
2047# section) are produced by _LT_LIBTOOL_TAG_VARS.
2048m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2049[m4_foreach([_lt_var],
2050    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2051    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2052
2053
2054# _LT_LIBTOOL_TAG_VARS(TAG)
2055# -------------------------
2056m4_define([_LT_LIBTOOL_TAG_VARS],
2057[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2058    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2059
2060
2061# _LT_TAGVAR(VARNAME, [TAGNAME])
2062# ------------------------------
2063m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2064
2065
2066# _LT_CONFIG_COMMANDS
2067# -------------------
2068# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
2069# variables for single and double quote escaping we saved from calls
2070# to _LT_DECL, we can put quote escaped variables declarations
2071# into `config.status', and then the shell code to quote escape them in
2072# for loops in `config.status'.  Finally, any additional code accumulated
2073# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2074m4_defun([_LT_CONFIG_COMMANDS],
2075[AC_PROVIDE_IFELSE([LT_OUTPUT],
2076	dnl If the libtool generation code has been placed in $CONFIG_LT,
2077	dnl instead of duplicating it all over again into config.status,
2078	dnl then we will have config.status run $CONFIG_LT later, so it
2079	dnl needs to know what name is stored there:
2080        [AC_CONFIG_COMMANDS([libtool],
2081            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2082    dnl If the libtool generation code is destined for config.status,
2083    dnl expand the accumulated commands and init code now:
2084    [AC_CONFIG_COMMANDS([libtool],
2085        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2086])#_LT_CONFIG_COMMANDS
2087
2088
2089# Initialize.
2090m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2091[
2092
2093# The HP-UX ksh and POSIX shell print the target directory to stdout
2094# if CDPATH is set.
2095(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2096
2097sed_quote_subst='$sed_quote_subst'
2098double_quote_subst='$double_quote_subst'
2099delay_variable_subst='$delay_variable_subst'
2100_LT_CONFIG_STATUS_DECLARATIONS
2101LTCC='$LTCC'
2102LTCFLAGS='$LTCFLAGS'
2103compiler='$compiler_DEFAULT'
2104
2105# Quote evaled strings.
2106for var in lt_decl_all_varnames([[ \
2107]], lt_decl_quote_varnames); do
2108    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2109    *[[\\\\\\\`\\"\\\$]]*)
2110      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2111      ;;
2112    *)
2113      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2114      ;;
2115    esac
2116done
2117
2118# Double-quote double-evaled strings.
2119for var in lt_decl_all_varnames([[ \
2120]], lt_decl_dquote_varnames); do
2121    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2122    *[[\\\\\\\`\\"\\\$]]*)
2123      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2124      ;;
2125    *)
2126      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2127      ;;
2128    esac
2129done
2130
2131# Fix-up fallback echo if it was mangled by the above quoting rules.
2132case \$lt_ECHO in
2133*'\\\[$]0 --fallback-echo"')dnl "
2134  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
2135  ;;
2136esac
2137
2138_LT_OUTPUT_LIBTOOL_INIT
2139])
2140
2141
2142# LT_OUTPUT
2143# ---------
2144# This macro allows early generation of the libtool script (before
2145# AC_OUTPUT is called), incase it is used in configure for compilation
2146# tests.
2147AC_DEFUN([LT_OUTPUT],
2148[: ${CONFIG_LT=./config.lt}
2149AC_MSG_NOTICE([creating $CONFIG_LT])
2150cat >"$CONFIG_LT" <<_LTEOF
2151#! $SHELL
2152# Generated by $as_me.
2153# Run this file to recreate a libtool stub with the current configuration.
2154
2155lt_cl_silent=false
2156SHELL=\${CONFIG_SHELL-$SHELL}
2157_LTEOF
2158
2159cat >>"$CONFIG_LT" <<\_LTEOF
2160AS_SHELL_SANITIZE
2161_AS_PREPARE
2162
2163exec AS_MESSAGE_FD>&1
2164exec AS_MESSAGE_LOG_FD>>config.log
2165{
2166  echo
2167  AS_BOX([Running $as_me.])
2168} >&AS_MESSAGE_LOG_FD
2169
2170lt_cl_help="\
2171\`$as_me' creates a local libtool stub from the current configuration,
2172for use in further configure time tests before the real libtool is
2173generated.
2174
2175Usage: $[0] [[OPTIONS]]
2176
2177  -h, --help      print this help, then exit
2178  -V, --version   print version number, then exit
2179  -q, --quiet     do not print progress messages
2180  -d, --debug     don't remove temporary files
2181
2182Report bugs to <bug-libtool@gnu.org>."
2183
2184lt_cl_version="\
2185m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2186m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2187configured by $[0], generated by m4_PACKAGE_STRING.
2188
2189Copyright (C) 2008 Free Software Foundation, Inc.
2190This config.lt script is free software; the Free Software Foundation
2191gives unlimited permision to copy, distribute and modify it."
2192
2193while test $[#] != 0
2194do
2195  case $[1] in
2196    --version | --v* | -V )
2197      echo "$lt_cl_version"; exit 0 ;;
2198    --help | --h* | -h )
2199      echo "$lt_cl_help"; exit 0 ;;
2200    --debug | --d* | -d )
2201      debug=: ;;
2202    --quiet | --q* | --silent | --s* | -q )
2203      lt_cl_silent=: ;;
2204
2205    -*) AC_MSG_ERROR([unrecognized option: $[1]
2206Try \`$[0] --help' for more information.]) ;;
2207
2208    *) AC_MSG_ERROR([unrecognized argument: $[1]
2209Try \`$[0] --help' for more information.]) ;;
2210  esac
2211  shift
2212done
2213
2214if $lt_cl_silent; then
2215  exec AS_MESSAGE_FD>/dev/null
2216fi
2217_LTEOF
2218
2219cat >>"$CONFIG_LT" <<_LTEOF
2220_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2221_LTEOF
2222
2223cat >>"$CONFIG_LT" <<\_LTEOF
2224AC_MSG_NOTICE([creating $ofile])
2225_LT_OUTPUT_LIBTOOL_COMMANDS
2226AS_EXIT(0)
2227_LTEOF
2228chmod +x "$CONFIG_LT"
2229
2230# configure is writing to config.log, but config.lt does its own redirection,
2231# appending to config.log, which fails on DOS, as config.log is still kept
2232# open by configure.  Here we exec the FD to /dev/null, effectively closing
2233# config.log, so it can be properly (re)opened and appended to by config.lt.
2234if test "$no_create" != yes; then
2235  lt_cl_success=:
2236  test "$silent" = yes &&
2237    lt_config_lt_args="$lt_config_lt_args --quiet"
2238  exec AS_MESSAGE_LOG_FD>/dev/null
2239  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2240  exec AS_MESSAGE_LOG_FD>>config.log
2241  $lt_cl_success || AS_EXIT(1)
2242fi
2243])# LT_OUTPUT
2244
2245
2246# _LT_CONFIG(TAG)
2247# ---------------
2248# If TAG is the built-in tag, create an initial libtool script with a
2249# default configuration from the untagged config vars.  Otherwise add code
2250# to config.status for appending the configuration named by TAG from the
2251# matching tagged config vars.
2252m4_defun([_LT_CONFIG],
2253[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2254_LT_CONFIG_SAVE_COMMANDS([
2255  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2256  m4_if(_LT_TAG, [C], [
2257    # See if we are running on zsh, and set the options which allow our
2258    # commands through without removal of \ escapes.
2259    if test -n "${ZSH_VERSION+set}" ; then
2260      setopt NO_GLOB_SUBST
2261    fi
2262
2263    cfgfile="${ofile}T"
2264    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2265    $RM "$cfgfile"
2266
2267    cat <<_LT_EOF >> "$cfgfile"
2268#! $SHELL
2269
2270# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2271# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2272# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2273# NOTE: Changes made to this file will be lost: look at ltmain.sh.
2274#
2275_LT_COPYING
2276_LT_LIBTOOL_TAGS
2277
2278# ### BEGIN LIBTOOL CONFIG
2279_LT_LIBTOOL_CONFIG_VARS
2280_LT_LIBTOOL_TAG_VARS
2281# ### END LIBTOOL CONFIG
2282
2283_LT_EOF
2284
2285  case $host_os in
2286  aix3*)
2287    cat <<\_LT_EOF >> "$cfgfile"
2288# AIX sometimes has problems with the GCC collect2 program.  For some
2289# reason, if we set the COLLECT_NAMES environment variable, the problems
2290# vanish in a puff of smoke.
2291if test "X${COLLECT_NAMES+set}" != Xset; then
2292  COLLECT_NAMES=
2293  export COLLECT_NAMES
2294fi
2295_LT_EOF
2296    ;;
2297  esac
2298
2299  _LT_PROG_LTMAIN
2300
2301  # We use sed instead of cat because bash on DJGPP gets confused if
2302  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
2303  # text mode, it properly converts lines to CR/LF.  This bash problem
2304  # is reportedly fixed, but why not run on old versions too?
2305  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
2306    || (rm -f "$cfgfile"; exit 1)
2307
2308  _LT_PROG_XSI_SHELLFNS
2309
2310  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
2311    || (rm -f "$cfgfile"; exit 1)
2312
2313  mv -f "$cfgfile" "$ofile" ||
2314    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2315  chmod +x "$ofile"
2316],
2317[cat <<_LT_EOF >> "$ofile"
2318
2319dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2320dnl in a comment (ie after a #).
2321# ### BEGIN LIBTOOL TAG CONFIG: $1
2322_LT_LIBTOOL_TAG_VARS(_LT_TAG)
2323# ### END LIBTOOL TAG CONFIG: $1
2324_LT_EOF
2325])dnl /m4_if
2326],
2327[m4_if([$1], [], [
2328    PACKAGE='$PACKAGE'
2329    VERSION='$VERSION'
2330    TIMESTAMP='$TIMESTAMP'
2331    RM='$RM'
2332    ofile='$ofile'], [])
2333])dnl /_LT_CONFIG_SAVE_COMMANDS
2334])# _LT_CONFIG
2335
2336
2337# LT_SUPPORTED_TAG(TAG)
2338# ---------------------
2339# Trace this macro to discover what tags are supported by the libtool
2340# --tag option, using:
2341#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
2342AC_DEFUN([LT_SUPPORTED_TAG], [])
2343
2344
2345# C support is built-in for now
2346m4_define([_LT_LANG_C_enabled], [])
2347m4_define([_LT_TAGS], [])
2348
2349
2350# LT_LANG(LANG)
2351# -------------
2352# Enable libtool support for the given language if not already enabled.
2353AC_DEFUN([LT_LANG],
2354[AC_BEFORE([$0], [LT_OUTPUT])dnl
2355m4_case([$1],
2356  [C],			[_LT_LANG(C)],
2357  [C++],		[_LT_LANG(CXX)],
2358  [Java],		[_LT_LANG(GCJ)],
2359  [Fortran 77],		[_LT_LANG(F77)],
2360  [Fortran],		[_LT_LANG(FC)],
2361  [Windows Resource],	[_LT_LANG(RC)],
2362  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2363    [_LT_LANG($1)],
2364    [m4_fatal([$0: unsupported language: "$1"])])])dnl
2365])# LT_LANG
2366
2367
2368# _LT_LANG(LANGNAME)
2369# ------------------
2370m4_defun([_LT_LANG],
2371[m4_ifdef([_LT_LANG_]$1[_enabled], [],
2372  [LT_SUPPORTED_TAG([$1])dnl
2373  m4_append([_LT_TAGS], [$1 ])dnl
2374  m4_define([_LT_LANG_]$1[_enabled], [])dnl
2375  _LT_LANG_$1_CONFIG($1)])dnl
2376])# _LT_LANG
2377
2378
2379# _LT_LANG_DEFAULT_CONFIG
2380# -----------------------
2381m4_defun([_LT_LANG_DEFAULT_CONFIG],
2382[AC_PROVIDE_IFELSE([AC_PROG_CXX],
2383  [LT_LANG(CXX)],
2384  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2385
2386AC_PROVIDE_IFELSE([AC_PROG_F77],
2387  [LT_LANG(F77)],
2388  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2389
2390AC_PROVIDE_IFELSE([AC_PROG_FC],
2391  [LT_LANG(FC)],
2392  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2393
2394dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2395dnl pulling things in needlessly.
2396AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2397  [LT_LANG(GCJ)],
2398  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2399    [LT_LANG(GCJ)],
2400    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2401      [LT_LANG(GCJ)],
2402      [m4_ifdef([AC_PROG_GCJ],
2403	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2404       m4_ifdef([A][M_PROG_GCJ],
2405	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2406       m4_ifdef([LT_PROG_GCJ],
2407	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2408
2409AC_PROVIDE_IFELSE([LT_PROG_RC],
2410  [LT_LANG(RC)],
2411  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2412])# _LT_LANG_DEFAULT_CONFIG
2413
2414# Obsolete macros:
2415AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2416AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2417AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2418AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2419dnl aclocal-1.4 backwards compatibility:
2420dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2421dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2422dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2423dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2424
2425
2426# _LT_TAG_COMPILER
2427# ----------------
2428m4_defun([_LT_TAG_COMPILER],
2429[AC_REQUIRE([AC_PROG_CC])dnl
2430
2431_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2432_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2433_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2434_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2435
2436# If no C compiler was specified, use CC.
2437LTCC=${LTCC-"$CC"}
2438
2439# If no C compiler flags were specified, use CFLAGS.
2440LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2441
2442# Allow CC to be a program name with arguments.
2443compiler=$CC
2444])# _LT_TAG_COMPILER
2445
2446
2447# _LT_COMPILER_BOILERPLATE
2448# ------------------------
2449# Check for compiler boilerplate output or warnings with
2450# the simple compiler test code.
2451m4_defun([_LT_COMPILER_BOILERPLATE],
2452[m4_require([_LT_DECL_SED])dnl
2453ac_outfile=conftest.$ac_objext
2454echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2455eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2456_lt_compiler_boilerplate=`cat conftest.err`
2457$RM conftest*
2458])# _LT_COMPILER_BOILERPLATE
2459
2460
2461# _LT_LINKER_BOILERPLATE
2462# ----------------------
2463# Check for linker boilerplate output or warnings with
2464# the simple link test code.
2465m4_defun([_LT_LINKER_BOILERPLATE],
2466[m4_require([_LT_DECL_SED])dnl
2467ac_outfile=conftest.$ac_objext
2468echo "$lt_simple_link_test_code" >conftest.$ac_ext
2469eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2470_lt_linker_boilerplate=`cat conftest.err`
2471$RM -r conftest*
2472])# _LT_LINKER_BOILERPLATE
2473
2474# _LT_REQUIRED_DARWIN_CHECKS
2475# -------------------------
2476m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2477  case $host_os in
2478    rhapsody* | darwin*)
2479    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2480    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2481    AC_CHECK_TOOL([LIPO], [lipo], [:])
2482    AC_CHECK_TOOL([OTOOL], [otool], [:])
2483    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2484    _LT_DECL([], [DSYMUTIL], [1],
2485      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2486    _LT_DECL([], [NMEDIT], [1],
2487      [Tool to change global to local symbols on Mac OS X])
2488    _LT_DECL([], [LIPO], [1],
2489      [Tool to manipulate fat objects and archives on Mac OS X])
2490    _LT_DECL([], [OTOOL], [1],
2491      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2492    _LT_DECL([], [OTOOL64], [1],
2493      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2494
2495    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2496      [lt_cv_apple_cc_single_mod=no
2497      if test -z "${LT_MULTI_MODULE}"; then
2498	# By default we will add the -single_module flag. You can override
2499	# by either setting the environment variable LT_MULTI_MODULE
2500	# non-empty at configure time, or by adding -multi_module to the
2501	# link flags.
2502	rm -rf libconftest.dylib*
2503	echo "int foo(void){return 1;}" > conftest.c
2504	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2505-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2506	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2507	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2508        _lt_result=$?
2509	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
2510	  lt_cv_apple_cc_single_mod=yes
2511	else
2512	  cat conftest.err >&AS_MESSAGE_LOG_FD
2513	fi
2514	rm -rf libconftest.dylib*
2515	rm -f conftest.*
2516      fi])
2517    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2518      [lt_cv_ld_exported_symbols_list],
2519      [lt_cv_ld_exported_symbols_list=no
2520      save_LDFLAGS=$LDFLAGS
2521      echo "_main" > conftest.sym
2522      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2523      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2524	[lt_cv_ld_exported_symbols_list=yes],
2525	[lt_cv_ld_exported_symbols_list=no])
2526	LDFLAGS="$save_LDFLAGS"
2527    ])
2528    case $host_os in
2529    rhapsody* | darwin1.[[012]])
2530      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2531    darwin1.*)
2532      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2533    darwin*) # darwin 5.x on
2534      # if running on 10.5 or later, the deployment target defaults
2535      # to the OS version, if on x86, and 10.4, the deployment
2536      # target defaults to 10.4. Don't you love it?
2537      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2538	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2539	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2540	10.[[012]]*)
2541	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2542	10.*)
2543	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2544      esac
2545    ;;
2546  esac
2547    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2548      _lt_dar_single_mod='$single_module'
2549    fi
2550    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2551      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2552    else
2553      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2554    fi
2555    if test "$DSYMUTIL" != ":"; then
2556      _lt_dsymutil='~$DSYMUTIL $lib || :'
2557    else
2558      _lt_dsymutil=
2559    fi
2560    ;;
2561  esac
2562])
2563
2564
2565# _LT_DARWIN_LINKER_FEATURES
2566# --------------------------
2567# Checks for linker and compiler features on darwin
2568m4_defun([_LT_DARWIN_LINKER_FEATURES],
2569[
2570  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2571  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2572  _LT_TAGVAR(hardcode_direct, $1)=no
2573  _LT_TAGVAR(hardcode_automatic, $1)=yes
2574  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2575  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2576  _LT_TAGVAR(link_all_deplibs, $1)=yes
2577  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2578  case $cc_basename in
2579     ifort*) _lt_dar_can_shared=yes ;;
2580     *) _lt_dar_can_shared=$GCC ;;
2581  esac
2582  if test "$_lt_dar_can_shared" = "yes"; then
2583    output_verbose_link_cmd=echo
2584    _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}"
2585    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2586    _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}"
2587    _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}"
2588    m4_if([$1], [CXX],
2589[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2590      _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}"
2591      _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}"
2592    fi
2593],[])
2594  else
2595  _LT_TAGVAR(ld_shlibs, $1)=no
2596  fi
2597])
2598
2599# _LT_SYS_MODULE_PATH_AIX
2600# -----------------------
2601# Links a minimal program and checks the executable
2602# for the system default hardcoded library path. In most cases,
2603# this is /usr/lib:/lib, but when the MPI compilers are used
2604# the location of the communication and MPI libs are included too.
2605# If we don't find anything, use the default library path according
2606# to the aix ld manual.
2607m4_defun([_LT_SYS_MODULE_PATH_AIX],
2608[m4_require([_LT_DECL_SED])dnl
2609AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2610lt_aix_libpath_sed='
2611    /Import File Strings/,/^$/ {
2612	/^0/ {
2613	    s/^0  *\(.*\)$/\1/
2614	    p
2615	}
2616    }'
2617aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2618# Check for a 64-bit object if we didn't find anything.
2619if test -z "$aix_libpath"; then
2620  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2621fi],[])
2622if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2623])# _LT_SYS_MODULE_PATH_AIX
2624
2625
2626# _LT_SHELL_INIT(ARG)
2627# -------------------
2628m4_define([_LT_SHELL_INIT],
2629[ifdef([AC_DIVERSION_NOTICE],
2630	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
2631	 [AC_DIVERT_PUSH(NOTICE)])
2632$1
2633AC_DIVERT_POP
2634])# _LT_SHELL_INIT
2635
2636
2637# _LT_PROG_ECHO_BACKSLASH
2638# -----------------------
2639# Add some code to the start of the generated configure script which
2640# will find an echo command which doesn't interpret backslashes.
2641m4_defun([_LT_PROG_ECHO_BACKSLASH],
2642[_LT_SHELL_INIT([
2643# Check that we are running under the correct shell.
2644SHELL=${CONFIG_SHELL-/bin/sh}
2645
2646case X$lt_ECHO in
2647X*--fallback-echo)
2648  # Remove one level of quotation (which was required for Make).
2649  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2650  ;;
2651esac
2652
2653ECHO=${lt_ECHO-echo}
2654if test "X[$]1" = X--no-reexec; then
2655  # Discard the --no-reexec flag, and continue.
2656  shift
2657elif test "X[$]1" = X--fallback-echo; then
2658  # Avoid inline document here, it may be left over
2659  :
2660elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
2661  # Yippee, $ECHO works!
2662  :
2663else
2664  # Restart under the correct shell.
2665  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2666fi
2667
2668if test "X[$]1" = X--fallback-echo; then
2669  # used as fallback echo
2670  shift
2671  cat <<_LT_EOF
2672[$]*
2673_LT_EOF
2674  exit 0
2675fi
2676
2677# The HP-UX ksh and POSIX shell print the target directory to stdout
2678# if CDPATH is set.
2679(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2680
2681if test -z "$lt_ECHO"; then
2682  if test "X${echo_test_string+set}" != Xset; then
2683    # find a string as large as possible, as long as the shell can cope with it
2684    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
2685      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
2686      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
2687	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
2688      then
2689        break
2690      fi
2691    done
2692  fi
2693
2694  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2695     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2696     test "X$echo_testing_string" = "X$echo_test_string"; then
2697    :
2698  else
2699    # The Solaris, AIX, and Digital Unix default echo programs unquote
2700    # backslashes.  This makes it impossible to quote backslashes using
2701    #   echo "$something" | sed 's/\\/\\\\/g'
2702    #
2703    # So, first we look for a working echo in the user's PATH.
2704
2705    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2706    for dir in $PATH /usr/ucb; do
2707      IFS="$lt_save_ifs"
2708      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
2709         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
2710         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
2711         test "X$echo_testing_string" = "X$echo_test_string"; then
2712        ECHO="$dir/echo"
2713        break
2714      fi
2715    done
2716    IFS="$lt_save_ifs"
2717
2718    if test "X$ECHO" = Xecho; then
2719      # We didn't find a better echo, so look for alternatives.
2720      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
2721         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
2722         test "X$echo_testing_string" = "X$echo_test_string"; then
2723        # This shell has a builtin print -r that does the trick.
2724        ECHO='print -r'
2725      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
2726	   test "X$CONFIG_SHELL" != X/bin/ksh; then
2727        # If we have ksh, try running configure again with it.
2728        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2729        export ORIGINAL_CONFIG_SHELL
2730        CONFIG_SHELL=/bin/ksh
2731        export CONFIG_SHELL
2732        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2733      else
2734        # Try using printf.
2735        ECHO='printf %s\n'
2736        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
2737	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
2738	   test "X$echo_testing_string" = "X$echo_test_string"; then
2739	  # Cool, printf works
2740	  :
2741        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2742	     test "X$echo_testing_string" = 'X\t' &&
2743	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2744	     test "X$echo_testing_string" = "X$echo_test_string"; then
2745	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2746	  export CONFIG_SHELL
2747	  SHELL="$CONFIG_SHELL"
2748	  export SHELL
2749	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2750        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2751	     test "X$echo_testing_string" = 'X\t' &&
2752	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2753	     test "X$echo_testing_string" = "X$echo_test_string"; then
2754	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
2755        else
2756	  # maybe with a smaller string...
2757	  prev=:
2758
2759	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2760	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
2761	    then
2762	      break
2763	    fi
2764	    prev="$cmd"
2765	  done
2766
2767	  if test "$prev" != 'sed 50q "[$]0"'; then
2768	    echo_test_string=`eval $prev`
2769	    export echo_test_string
2770	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2771	  else
2772	    # Oops.  We lost completely, so just stick with echo.
2773	    ECHO=echo
2774	  fi
2775        fi
2776      fi
2777    fi
2778  fi
2779fi
2780
2781# Copy echo and quote the copy suitably for passing to libtool from
2782# the Makefile, instead of quoting the original, which is used later.
2783lt_ECHO=$ECHO
2784if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2785   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2786fi
2787
2788AC_SUBST(lt_ECHO)
2789])
2790_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2791_LT_DECL([], [ECHO], [1],
2792    [An echo program that does not interpret backslashes])
2793])# _LT_PROG_ECHO_BACKSLASH
2794
2795
2796# _LT_ENABLE_LOCK
2797# ---------------
2798m4_defun([_LT_ENABLE_LOCK],
2799[AC_ARG_ENABLE([libtool-lock],
2800  [AS_HELP_STRING([--disable-libtool-lock],
2801    [avoid locking (might break parallel builds)])])
2802test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2803
2804# Some flags need to be propagated to the compiler or linker for good
2805# libtool support.
2806case $host in
2807ia64-*-hpux*)
2808  # Find out which ABI we are using.
2809  echo 'int i;' > conftest.$ac_ext
2810  if AC_TRY_EVAL(ac_compile); then
2811    case `/usr/bin/file conftest.$ac_objext` in
2812      *ELF-32*)
2813	HPUX_IA64_MODE="32"
2814	;;
2815      *ELF-64*)
2816	HPUX_IA64_MODE="64"
2817	;;
2818    esac
2819  fi
2820  rm -rf conftest*
2821  ;;
2822*-*-irix6*)
2823  # Find out which ABI we are using.
2824  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2825  if AC_TRY_EVAL(ac_compile); then
2826    if test "$lt_cv_prog_gnu_ld" = yes; then
2827      case `/usr/bin/file conftest.$ac_objext` in
2828	*32-bit*)
2829	  LD="${LD-ld} -melf32bsmip"
2830	  ;;
2831	*N32*)
2832	  LD="${LD-ld} -melf32bmipn32"
2833	  ;;
2834	*64-bit*)
2835	  LD="${LD-ld} -melf64bmip"
2836	;;
2837      esac
2838    else
2839      case `/usr/bin/file conftest.$ac_objext` in
2840	*32-bit*)
2841	  LD="${LD-ld} -32"
2842	  ;;
2843	*N32*)
2844	  LD="${LD-ld} -n32"
2845	  ;;
2846	*64-bit*)
2847	  LD="${LD-ld} -64"
2848	  ;;
2849      esac
2850    fi
2851  fi
2852  rm -rf conftest*
2853  ;;
2854
2855x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2856s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2857  # Find out which ABI we are using.
2858  echo 'int i;' > conftest.$ac_ext
2859  if AC_TRY_EVAL(ac_compile); then
2860    case `/usr/bin/file conftest.o` in
2861      *32-bit*)
2862	case $host in
2863	  x86_64-*kfreebsd*-gnu)
2864	    LD="${LD-ld} -m elf_i386_fbsd"
2865	    ;;
2866	  x86_64-*linux*)
2867	    LD="${LD-ld} -m elf_i386"
2868	    ;;
2869	  ppc64-*linux*|powerpc64-*linux*)
2870	    LD="${LD-ld} -m elf32ppclinux"
2871	    ;;
2872	  s390x-*linux*)
2873	    LD="${LD-ld} -m elf_s390"
2874	    ;;
2875	  sparc64-*linux*)
2876	    LD="${LD-ld} -m elf32_sparc"
2877	    ;;
2878	esac
2879	;;
2880      *64-bit*)
2881	case $host in
2882	  x86_64-*kfreebsd*-gnu)
2883	    LD="${LD-ld} -m elf_x86_64_fbsd"
2884	    ;;
2885	  x86_64-*linux*)
2886	    LD="${LD-ld} -m elf_x86_64"
2887	    ;;
2888	  ppc*-*linux*|powerpc*-*linux*)
2889	    LD="${LD-ld} -m elf64ppc"
2890	    ;;
2891	  s390*-*linux*|s390*-*tpf*)
2892	    LD="${LD-ld} -m elf64_s390"
2893	    ;;
2894	  sparc*-*linux*)
2895	    LD="${LD-ld} -m elf64_sparc"
2896	    ;;
2897	esac
2898	;;
2899    esac
2900  fi
2901  rm -rf conftest*
2902  ;;
2903
2904*-*-sco3.2v5*)
2905  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2906  SAVE_CFLAGS="$CFLAGS"
2907  CFLAGS="$CFLAGS -belf"
2908  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2909    [AC_LANG_PUSH(C)
2910     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2911     AC_LANG_POP])
2912  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2913    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2914    CFLAGS="$SAVE_CFLAGS"
2915  fi
2916  ;;
2917sparc*-*solaris*)
2918  # Find out which ABI we are using.
2919  echo 'int i;' > conftest.$ac_ext
2920  if AC_TRY_EVAL(ac_compile); then
2921    case `/usr/bin/file conftest.o` in
2922    *64-bit*)
2923      case $lt_cv_prog_gnu_ld in
2924      yes*) LD="${LD-ld} -m elf64_sparc" ;;
2925      *)
2926	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2927	  LD="${LD-ld} -64"
2928	fi
2929	;;
2930      esac
2931      ;;
2932    esac
2933  fi
2934  rm -rf conftest*
2935  ;;
2936esac
2937
2938need_locks="$enable_libtool_lock"
2939])# _LT_ENABLE_LOCK
2940
2941
2942# _LT_CMD_OLD_ARCHIVE
2943# -------------------
2944m4_defun([_LT_CMD_OLD_ARCHIVE],
2945[AC_CHECK_TOOL(AR, ar, false)
2946test -z "$AR" && AR=ar
2947test -z "$AR_FLAGS" && AR_FLAGS=cru
2948_LT_DECL([], [AR], [1], [The archiver])
2949_LT_DECL([], [AR_FLAGS], [1])
2950
2951AC_CHECK_TOOL(STRIP, strip, :)
2952test -z "$STRIP" && STRIP=:
2953_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2954
2955AC_CHECK_TOOL(RANLIB, ranlib, :)
2956test -z "$RANLIB" && RANLIB=:
2957_LT_DECL([], [RANLIB], [1],
2958    [Commands used to install an old-style archive])
2959
2960# Determine commands to create old-style static archives.
2961old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2962old_postinstall_cmds='chmod 644 $oldlib'
2963old_postuninstall_cmds=
2964
2965if test -n "$RANLIB"; then
2966  case $host_os in
2967  openbsd*)
2968    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2969    ;;
2970  *)
2971    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2972    ;;
2973  esac
2974  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2975fi
2976_LT_DECL([], [old_postinstall_cmds], [2])
2977_LT_DECL([], [old_postuninstall_cmds], [2])
2978_LT_TAGDECL([], [old_archive_cmds], [2],
2979    [Commands used to build an old-style archive])
2980])# _LT_CMD_OLD_ARCHIVE
2981
2982
2983# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2984#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2985# ----------------------------------------------------------------
2986# Check whether the given compiler option works
2987AC_DEFUN([_LT_COMPILER_OPTION],
2988[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2989m4_require([_LT_DECL_SED])dnl
2990AC_CACHE_CHECK([$1], [$2],
2991  [$2=no
2992   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2993   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2994   lt_compiler_flag="$3"
2995   # Insert the option either (1) after the last *FLAGS variable, or
2996   # (2) before a word containing "conftest.", or (3) at the end.
2997   # Note that $ac_compile itself does not contain backslashes and begins
2998   # with a dollar sign (not a hyphen), so the echo should work correctly.
2999   # The option is referenced via a variable to avoid confusing sed.
3000   lt_compile=`echo "$ac_compile" | $SED \
3001   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3002   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3003   -e 's:$: $lt_compiler_flag:'`
3004   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3005   (eval "$lt_compile" 2>conftest.err)
3006   ac_status=$?
3007   cat conftest.err >&AS_MESSAGE_LOG_FD
3008   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3009   if (exit $ac_status) && test -s "$ac_outfile"; then
3010     # The compiler can only warn and ignore the option if not recognized
3011     # So say no if there are warnings other than the usual output.
3012     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
3013     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3014     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3015       $2=yes
3016     fi
3017   fi
3018   $RM conftest*
3019])
3020
3021if test x"[$]$2" = xyes; then
3022    m4_if([$5], , :, [$5])
3023else
3024    m4_if([$6], , :, [$6])
3025fi
3026])# _LT_COMPILER_OPTION
3027
3028# Old name:
3029AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3030dnl aclocal-1.4 backwards compatibility:
3031dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3032
3033
3034# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3035#                  [ACTION-SUCCESS], [ACTION-FAILURE])
3036# ----------------------------------------------------
3037# Check whether the given linker option works
3038AC_DEFUN([_LT_LINKER_OPTION],
3039[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3040m4_require([_LT_DECL_SED])dnl
3041AC_CACHE_CHECK([$1], [$2],
3042  [$2=no
3043   save_LDFLAGS="$LDFLAGS"
3044   LDFLAGS="$LDFLAGS $3"
3045   echo "$lt_simple_link_test_code" > conftest.$ac_ext
3046   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3047     # The linker can only warn and ignore the option if not recognized
3048     # So say no if there are warnings
3049     if test -s conftest.err; then
3050       # Append any errors to the config.log.
3051       cat conftest.err 1>&AS_MESSAGE_LOG_FD
3052       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
3053       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3054       if diff conftest.exp conftest.er2 >/dev/null; then
3055         $2=yes
3056       fi
3057     else
3058       $2=yes
3059     fi
3060   fi
3061   $RM -r conftest*
3062   LDFLAGS="$save_LDFLAGS"
3063])
3064
3065if test x"[$]$2" = xyes; then
3066    m4_if([$4], , :, [$4])
3067else
3068    m4_if([$5], , :, [$5])
3069fi
3070])# _LT_LINKER_OPTION
3071
3072# Old name:
3073AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3074dnl aclocal-1.4 backwards compatibility:
3075dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3076
3077
3078# LT_CMD_MAX_LEN
3079#---------------
3080AC_DEFUN([LT_CMD_MAX_LEN],
3081[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3082# find the maximum length of command line arguments
3083AC_MSG_CHECKING([the maximum length of command line arguments])
3084AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3085  i=0
3086  teststring="ABCD"
3087
3088  case $build_os in
3089  msdosdjgpp*)
3090    # On DJGPP, this test can blow up pretty badly due to problems in libc
3091    # (any single argument exceeding 2000 bytes causes a buffer overrun
3092    # during glob expansion).  Even if it were fixed, the result of this
3093    # check would be larger than it should be.
3094    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3095    ;;
3096
3097  gnu*)
3098    # Under GNU Hurd, this test is not required because there is
3099    # no limit to the length of command line arguments.
3100    # Libtool will interpret -1 as no limit whatsoever
3101    lt_cv_sys_max_cmd_len=-1;
3102    ;;
3103
3104  cygwin* | mingw* | cegcc*)
3105    # On Win9x/ME, this test blows up -- it succeeds, but takes
3106    # about 5 minutes as the teststring grows exponentially.
3107    # Worse, since 9x/ME are not pre-emptively multitasking,
3108    # you end up with a "frozen" computer, even though with patience
3109    # the test eventually succeeds (with a max line length of 256k).
3110    # Instead, let's just punt: use the minimum linelength reported by
3111    # all of the supported platforms: 8192 (on NT/2K/XP).
3112    lt_cv_sys_max_cmd_len=8192;
3113    ;;
3114
3115  amigaos*)
3116    # On AmigaOS with pdksh, this test takes hours, literally.
3117    # So we just punt and use a minimum line length of 8192.
3118    lt_cv_sys_max_cmd_len=8192;
3119    ;;
3120
3121  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3122    # This has been around since 386BSD, at least.  Likely further.
3123    if test -x /sbin/sysctl; then
3124      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3125    elif test -x /usr/sbin/sysctl; then
3126      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3127    else
3128      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
3129    fi
3130    # And add a safety zone
3131    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3132    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3133    ;;
3134
3135  interix*)
3136    # We know the value 262144 and hardcode it with a safety zone (like BSD)
3137    lt_cv_sys_max_cmd_len=196608
3138    ;;
3139
3140  osf*)
3141    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3142    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3143    # nice to cause kernel panics so lets avoid the loop below.
3144    # First set a reasonable default.
3145    lt_cv_sys_max_cmd_len=16384
3146    #
3147    if test -x /sbin/sysconfig; then
3148      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3149        *1*) lt_cv_sys_max_cmd_len=-1 ;;
3150      esac
3151    fi
3152    ;;
3153  sco3.2v5*)
3154    lt_cv_sys_max_cmd_len=102400
3155    ;;
3156  sysv5* | sco5v6* | sysv4.2uw2*)
3157    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3158    if test -n "$kargmax"; then
3159      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
3160    else
3161      lt_cv_sys_max_cmd_len=32768
3162    fi
3163    ;;
3164  *)
3165    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3166    if test -n "$lt_cv_sys_max_cmd_len"; then
3167      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3168      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3169    else
3170      # Make teststring a little bigger before we do anything with it.
3171      # a 1K string should be a reasonable start.
3172      for i in 1 2 3 4 5 6 7 8 ; do
3173        teststring=$teststring$teststring
3174      done
3175      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3176      # If test is not a shell built-in, we'll probably end up computing a
3177      # maximum length that is only half of the actual maximum length, but
3178      # we can't tell.
3179      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
3180	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
3181	      test $i != 17 # 1/2 MB should be enough
3182      do
3183        i=`expr $i + 1`
3184        teststring=$teststring$teststring
3185      done
3186      # Only check the string length outside the loop.
3187      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3188      teststring=
3189      # Add a significant safety factor because C++ compilers can tack on
3190      # massive amounts of additional arguments before passing them to the
3191      # linker.  It appears as though 1/2 is a usable value.
3192      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3193    fi
3194    ;;
3195  esac
3196])
3197if test -n $lt_cv_sys_max_cmd_len ; then
3198  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3199else
3200  AC_MSG_RESULT(none)
3201fi
3202max_cmd_len=$lt_cv_sys_max_cmd_len
3203_LT_DECL([], [max_cmd_len], [0],
3204    [What is the maximum length of a command?])
3205])# LT_CMD_MAX_LEN
3206
3207# Old name:
3208AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3209dnl aclocal-1.4 backwards compatibility:
3210dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3211
3212
3213# _LT_HEADER_DLFCN
3214# ----------------
3215m4_defun([_LT_HEADER_DLFCN],
3216[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3217])# _LT_HEADER_DLFCN
3218
3219
3220# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3221#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3222# ----------------------------------------------------------------
3223m4_defun([_LT_TRY_DLOPEN_SELF],
3224[m4_require([_LT_HEADER_DLFCN])dnl
3225if test "$cross_compiling" = yes; then :
3226  [$4]
3227else
3228  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3229  lt_status=$lt_dlunknown
3230  cat > conftest.$ac_ext <<_LT_EOF
3231[#line __oline__ "configure"
3232#include "confdefs.h"
3233
3234#if HAVE_DLFCN_H
3235#include <dlfcn.h>
3236#endif
3237
3238#include <stdio.h>
3239
3240#ifdef RTLD_GLOBAL
3241#  define LT_DLGLOBAL		RTLD_GLOBAL
3242#else
3243#  ifdef DL_GLOBAL
3244#    define LT_DLGLOBAL		DL_GLOBAL
3245#  else
3246#    define LT_DLGLOBAL		0
3247#  endif
3248#endif
3249
3250/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3251   find out it does not work in some platform. */
3252#ifndef LT_DLLAZY_OR_NOW
3253#  ifdef RTLD_LAZY
3254#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
3255#  else
3256#    ifdef DL_LAZY
3257#      define LT_DLLAZY_OR_NOW		DL_LAZY
3258#    else
3259#      ifdef RTLD_NOW
3260#        define LT_DLLAZY_OR_NOW	RTLD_NOW
3261#      else
3262#        ifdef DL_NOW
3263#          define LT_DLLAZY_OR_NOW	DL_NOW
3264#        else
3265#          define LT_DLLAZY_OR_NOW	0
3266#        endif
3267#      endif
3268#    endif
3269#  endif
3270#endif
3271
3272void fnord() { int i=42;}
3273int main ()
3274{
3275  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3276  int status = $lt_dlunknown;
3277
3278  if (self)
3279    {
3280      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
3281      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
3282      /* dlclose (self); */
3283    }
3284  else
3285    puts (dlerror ());
3286
3287  return status;
3288}]
3289_LT_EOF
3290  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3291    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3292    lt_status=$?
3293    case x$lt_status in
3294      x$lt_dlno_uscore) $1 ;;
3295      x$lt_dlneed_uscore) $2 ;;
3296      x$lt_dlunknown|x*) $3 ;;
3297    esac
3298  else :
3299    # compilation failed
3300    $3
3301  fi
3302fi
3303rm -fr conftest*
3304])# _LT_TRY_DLOPEN_SELF
3305
3306
3307# LT_SYS_DLOPEN_SELF
3308# ------------------
3309AC_DEFUN([LT_SYS_DLOPEN_SELF],
3310[m4_require([_LT_HEADER_DLFCN])dnl
3311if test "x$enable_dlopen" != xyes; then
3312  enable_dlopen=unknown
3313  enable_dlopen_self=unknown
3314  enable_dlopen_self_static=unknown
3315else
3316  lt_cv_dlopen=no
3317  lt_cv_dlopen_libs=
3318
3319  case $host_os in
3320  beos*)
3321    lt_cv_dlopen="load_add_on"
3322    lt_cv_dlopen_libs=
3323    lt_cv_dlopen_self=yes
3324    ;;
3325
3326  mingw* | pw32* | cegcc*)
3327    lt_cv_dlopen="LoadLibrary"
3328    lt_cv_dlopen_libs=
3329    ;;
3330
3331  cygwin*)
3332    lt_cv_dlopen="dlopen"
3333    lt_cv_dlopen_libs=
3334    ;;
3335
3336  darwin*)
3337  # if libdl is installed we need to link against it
3338    AC_CHECK_LIB([dl], [dlopen],
3339		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3340    lt_cv_dlopen="dyld"
3341    lt_cv_dlopen_libs=
3342    lt_cv_dlopen_self=yes
3343    ])
3344    ;;
3345
3346  *)
3347    AC_CHECK_FUNC([shl_load],
3348	  [lt_cv_dlopen="shl_load"],
3349      [AC_CHECK_LIB([dld], [shl_load],
3350	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3351	[AC_CHECK_FUNC([dlopen],
3352	      [lt_cv_dlopen="dlopen"],
3353	  [AC_CHECK_LIB([dl], [dlopen],
3354		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3355	    [AC_CHECK_LIB([svld], [dlopen],
3356		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3357	      [AC_CHECK_LIB([dld], [dld_link],
3358		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3359	      ])
3360	    ])
3361	  ])
3362	])
3363      ])
3364    ;;
3365  esac
3366
3367  if test "x$lt_cv_dlopen" != xno; then
3368    enable_dlopen=yes
3369  else
3370    enable_dlopen=no
3371  fi
3372
3373  case $lt_cv_dlopen in
3374  dlopen)
3375    save_CPPFLAGS="$CPPFLAGS"
3376    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3377
3378    save_LDFLAGS="$LDFLAGS"
3379    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3380
3381    save_LIBS="$LIBS"
3382    LIBS="$lt_cv_dlopen_libs $LIBS"
3383
3384    AC_CACHE_CHECK([whether a program can dlopen itself],
3385	  lt_cv_dlopen_self, [dnl
3386	  _LT_TRY_DLOPEN_SELF(
3387	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3388	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3389    ])
3390
3391    if test "x$lt_cv_dlopen_self" = xyes; then
3392      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3393      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3394	  lt_cv_dlopen_self_static, [dnl
3395	  _LT_TRY_DLOPEN_SELF(
3396	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3397	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
3398      ])
3399    fi
3400
3401    CPPFLAGS="$save_CPPFLAGS"
3402    LDFLAGS="$save_LDFLAGS"
3403    LIBS="$save_LIBS"
3404    ;;
3405  esac
3406
3407  case $lt_cv_dlopen_self in
3408  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3409  *) enable_dlopen_self=unknown ;;
3410  esac
3411
3412  case $lt_cv_dlopen_self_static in
3413  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3414  *) enable_dlopen_self_static=unknown ;;
3415  esac
3416fi
3417_LT_DECL([dlopen_support], [enable_dlopen], [0],
3418	 [Whether dlopen is supported])
3419_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3420	 [Whether dlopen of programs is supported])
3421_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3422	 [Whether dlopen of statically linked programs is supported])
3423])# LT_SYS_DLOPEN_SELF
3424
3425# Old name:
3426AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3427dnl aclocal-1.4 backwards compatibility:
3428dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3429
3430
3431# _LT_COMPILER_C_O([TAGNAME])
3432# ---------------------------
3433# Check to see if options -c and -o are simultaneously supported by compiler.
3434# This macro does not hard code the compiler like AC_PROG_CC_C_O.
3435m4_defun([_LT_COMPILER_C_O],
3436[m4_require([_LT_DECL_SED])dnl
3437m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3438m4_require([_LT_TAG_COMPILER])dnl
3439AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3440  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3441  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3442   $RM -r conftest 2>/dev/null
3443   mkdir conftest
3444   cd conftest
3445   mkdir out
3446   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3447
3448   lt_compiler_flag="-o out/conftest2.$ac_objext"
3449   # Insert the option either (1) after the last *FLAGS variable, or
3450   # (2) before a word containing "conftest.", or (3) at the end.
3451   # Note that $ac_compile itself does not contain backslashes and begins
3452   # with a dollar sign (not a hyphen), so the echo should work correctly.
3453   lt_compile=`echo "$ac_compile" | $SED \
3454   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3455   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3456   -e 's:$: $lt_compiler_flag:'`
3457   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3458   (eval "$lt_compile" 2>out/conftest.err)
3459   ac_status=$?
3460   cat out/conftest.err >&AS_MESSAGE_LOG_FD
3461   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3462   if (exit $ac_status) && test -s out/conftest2.$ac_objext
3463   then
3464     # The compiler can only warn and ignore the option if not recognized
3465     # So say no if there are warnings
3466     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
3467     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3468     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3469       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3470     fi
3471   fi
3472   chmod u+w . 2>&AS_MESSAGE_LOG_FD
3473   $RM conftest*
3474   # SGI C++ compiler will create directory out/ii_files/ for
3475   # template instantiation
3476   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3477   $RM out/* && rmdir out
3478   cd ..
3479   $RM -r conftest
3480   $RM conftest*
3481])
3482_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3483	[Does compiler simultaneously support -c and -o options?])
3484])# _LT_COMPILER_C_O
3485
3486
3487# _LT_COMPILER_FILE_LOCKS([TAGNAME])
3488# ----------------------------------
3489# Check to see if we can do hard links to lock some files if needed
3490m4_defun([_LT_COMPILER_FILE_LOCKS],
3491[m4_require([_LT_ENABLE_LOCK])dnl
3492m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3493_LT_COMPILER_C_O([$1])
3494
3495hard_links="nottested"
3496if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3497  # do not overwrite the value of need_locks provided by the user
3498  AC_MSG_CHECKING([if we can lock with hard links])
3499  hard_links=yes
3500  $RM conftest*
3501  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3502  touch conftest.a
3503  ln conftest.a conftest.b 2>&5 || hard_links=no
3504  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3505  AC_MSG_RESULT([$hard_links])
3506  if test "$hard_links" = no; then
3507    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3508    need_locks=warn
3509  fi
3510else
3511  need_locks=no
3512fi
3513_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3514])# _LT_COMPILER_FILE_LOCKS
3515
3516
3517# _LT_CHECK_OBJDIR
3518# ----------------
3519m4_defun([_LT_CHECK_OBJDIR],
3520[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3521[rm -f .libs 2>/dev/null
3522mkdir .libs 2>/dev/null
3523if test -d .libs; then
3524  lt_cv_objdir=.libs
3525else
3526  # MS-DOS does not allow filenames that begin with a dot.
3527  lt_cv_objdir=_libs
3528fi
3529rmdir .libs 2>/dev/null])
3530objdir=$lt_cv_objdir
3531_LT_DECL([], [objdir], [0],
3532         [The name of the directory that contains temporary libtool files])dnl
3533m4_pattern_allow([LT_OBJDIR])dnl
3534AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3535  [Define to the sub-directory in which libtool stores uninstalled libraries.])
3536])# _LT_CHECK_OBJDIR
3537
3538
3539# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3540# --------------------------------------
3541# Check hardcoding attributes.
3542m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3543[AC_MSG_CHECKING([how to hardcode library paths into programs])
3544_LT_TAGVAR(hardcode_action, $1)=
3545if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3546   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3547   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3548
3549  # We can hardcode non-existent directories.
3550  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3551     # If the only mechanism to avoid hardcoding is shlibpath_var, we
3552     # have to relink, otherwise we might link with an installed library
3553     # when we should be linking with a yet-to-be-installed one
3554     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3555     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3556    # Linking always hardcodes the temporary library directory.
3557    _LT_TAGVAR(hardcode_action, $1)=relink
3558  else
3559    # We can link without hardcoding, and we can hardcode nonexisting dirs.
3560    _LT_TAGVAR(hardcode_action, $1)=immediate
3561  fi
3562else
3563  # We cannot hardcode anything, or else we can only hardcode existing
3564  # directories.
3565  _LT_TAGVAR(hardcode_action, $1)=unsupported
3566fi
3567AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3568
3569if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3570   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3571  # Fast installation is not supported
3572  enable_fast_install=no
3573elif test "$shlibpath_overrides_runpath" = yes ||
3574     test "$enable_shared" = no; then
3575  # Fast installation is not necessary
3576  enable_fast_install=needless
3577fi
3578_LT_TAGDECL([], [hardcode_action], [0],
3579    [How to hardcode a shared library path into an executable])
3580])# _LT_LINKER_HARDCODE_LIBPATH
3581
3582
3583# _LT_CMD_STRIPLIB
3584# ----------------
3585m4_defun([_LT_CMD_STRIPLIB],
3586[m4_require([_LT_DECL_EGREP])
3587striplib=
3588old_striplib=
3589AC_MSG_CHECKING([whether stripping libraries is possible])
3590if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3591  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3592  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3593  AC_MSG_RESULT([yes])
3594else
3595# FIXME - insert some real tests, host_os isn't really good enough
3596  case $host_os in
3597  darwin*)
3598    if test -n "$STRIP" ; then
3599      striplib="$STRIP -x"
3600      old_striplib="$STRIP -S"
3601      AC_MSG_RESULT([yes])
3602    else
3603      AC_MSG_RESULT([no])
3604    fi
3605    ;;
3606  *)
3607    AC_MSG_RESULT([no])
3608    ;;
3609  esac
3610fi
3611_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3612_LT_DECL([], [striplib], [1])
3613])# _LT_CMD_STRIPLIB
3614
3615
3616# _LT_SYS_DYNAMIC_LINKER([TAG])
3617# -----------------------------
3618# PORTME Fill in your ld.so characteristics
3619m4_defun([_LT_SYS_DYNAMIC_LINKER],
3620[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3621m4_require([_LT_DECL_EGREP])dnl
3622m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3623m4_require([_LT_DECL_OBJDUMP])dnl
3624m4_require([_LT_DECL_SED])dnl
3625AC_MSG_CHECKING([dynamic linker characteristics])
3626m4_if([$1],
3627	[], [
3628if test "$GCC" = yes; then
3629  case $host_os in
3630    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3631    *) lt_awk_arg="/^libraries:/" ;;
3632  esac
3633  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3634  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
3635    # if the path contains ";" then we assume it to be the separator
3636    # otherwise default to the standard path separator (i.e. ":") - it is
3637    # assumed that no part of a normal pathname contains ";" but that should
3638    # okay in the real world where ";" in dirpaths is itself problematic.
3639    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
3640  else
3641    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3642  fi
3643  # Ok, now we have the path, separated by spaces, we can step through it
3644  # and add multilib dir if necessary.
3645  lt_tmp_lt_search_path_spec=
3646  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3647  for lt_sys_path in $lt_search_path_spec; do
3648    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3649      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3650    else
3651      test -d "$lt_sys_path" && \
3652	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3653    fi
3654  done
3655  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
3656BEGIN {RS=" "; FS="/|\n";} {
3657  lt_foo="";
3658  lt_count=0;
3659  for (lt_i = NF; lt_i > 0; lt_i--) {
3660    if ($lt_i != "" && $lt_i != ".") {
3661      if ($lt_i == "..") {
3662        lt_count++;
3663      } else {
3664        if (lt_count == 0) {
3665          lt_foo="/" $lt_i lt_foo;
3666        } else {
3667          lt_count--;
3668        }
3669      }
3670    }
3671  }
3672  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3673  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3674}'`
3675  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
3676else
3677  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3678fi])
3679library_names_spec=
3680libname_spec='lib$name'
3681soname_spec=
3682shrext_cmds=".so"
3683postinstall_cmds=
3684postuninstall_cmds=
3685finish_cmds=
3686finish_eval=
3687shlibpath_var=
3688shlibpath_overrides_runpath=unknown
3689version_type=none
3690dynamic_linker="$host_os ld.so"
3691sys_lib_dlsearch_path_spec="/lib /usr/lib"
3692need_lib_prefix=unknown
3693hardcode_into_libs=no
3694
3695# when you set need_version to no, make sure it does not cause -set_version
3696# flags to be left without arguments
3697need_version=unknown
3698
3699case $host_os in
3700aix3*)
3701  version_type=linux
3702  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3703  shlibpath_var=LIBPATH
3704
3705  # AIX 3 has no versioning support, so we append a major version to the name.
3706  soname_spec='${libname}${release}${shared_ext}$major'
3707  ;;
3708
3709aix[[4-9]]*)
3710  version_type=linux
3711  need_lib_prefix=no
3712  need_version=no
3713  hardcode_into_libs=yes
3714  if test "$host_cpu" = ia64; then
3715    # AIX 5 supports IA64
3716    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3717    shlibpath_var=LD_LIBRARY_PATH
3718  else
3719    # With GCC up to 2.95.x, collect2 would create an import file
3720    # for dependence libraries.  The import file would start with
3721    # the line `#! .'.  This would cause the generated library to
3722    # depend on `.', always an invalid library.  This was fixed in
3723    # development snapshots of GCC prior to 3.0.
3724    case $host_os in
3725      aix4 | aix4.[[01]] | aix4.[[01]].*)
3726      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3727	   echo ' yes '
3728	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3729	:
3730      else
3731	can_build_shared=no
3732      fi
3733      ;;
3734    esac
3735    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3736    # soname into executable. Probably we can add versioning support to
3737    # collect2, so additional links can be useful in future.
3738    if test "$aix_use_runtimelinking" = yes; then
3739      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3740      # instead of lib<name>.a to let people know that these are not
3741      # typical AIX shared libraries.
3742      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3743    else
3744      # We preserve .a as extension for shared libraries through AIX4.2
3745      # and later when we are not doing run time linking.
3746      library_names_spec='${libname}${release}.a $libname.a'
3747      soname_spec='${libname}${release}${shared_ext}$major'
3748    fi
3749    shlibpath_var=LIBPATH
3750  fi
3751  ;;
3752
3753amigaos*)
3754  case $host_cpu in
3755  powerpc)
3756    # Since July 2007 AmigaOS4 officially supports .so libraries.
3757    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3758    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3759    ;;
3760  m68k)
3761    library_names_spec='$libname.ixlibrary $libname.a'
3762    # Create ${libname}_ixlibrary.a entries in /sys/libs.
3763    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'
3764    ;;
3765  esac
3766  ;;
3767
3768beos*)
3769  library_names_spec='${libname}${shared_ext}'
3770  dynamic_linker="$host_os ld.so"
3771  shlibpath_var=LIBRARY_PATH
3772  ;;
3773
3774bsdi[[45]]*)
3775  version_type=linux
3776  need_version=no
3777  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3778  soname_spec='${libname}${release}${shared_ext}$major'
3779  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3780  shlibpath_var=LD_LIBRARY_PATH
3781  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3782  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3783  # the default ld.so.conf also contains /usr/contrib/lib and
3784  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3785  # libtool to hard-code these into programs
3786  ;;
3787
3788cygwin* | mingw* | pw32* | cegcc*)
3789  version_type=windows
3790  shrext_cmds=".dll"
3791  need_version=no
3792  need_lib_prefix=no
3793
3794  case $GCC,$host_os in
3795  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
3796    library_names_spec='$libname.dll.a'
3797    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3798    postinstall_cmds='base_file=`basename \${file}`~
3799      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3800      dldir=$destdir/`dirname \$dlpath`~
3801      test -d \$dldir || mkdir -p \$dldir~
3802      $install_prog $dir/$dlname \$dldir/$dlname~
3803      chmod a+x \$dldir/$dlname~
3804      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3805        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3806      fi'
3807    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3808      dlpath=$dir/\$dldll~
3809       $RM \$dlpath'
3810    shlibpath_overrides_runpath=yes
3811
3812    case $host_os in
3813    cygwin*)
3814      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3815      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3816      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3817      ;;
3818    mingw* | cegcc*)
3819      # MinGW DLLs use traditional 'lib' prefix
3820      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3821      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3822      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3823        # It is most probably a Windows format PATH printed by
3824        # mingw gcc, but we are running on Cygwin. Gcc prints its search
3825        # path with ; separators, and with drive letters. We can handle the
3826        # drive letters (cygwin fileutils understands them), so leave them,
3827        # especially as we might pass files found there to a mingw objdump,
3828        # which wouldn't understand a cygwinified path. Ahh.
3829        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3830      else
3831        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3832      fi
3833      ;;
3834    pw32*)
3835      # pw32 DLLs use 'pw' prefix rather than 'lib'
3836      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3837      ;;
3838    esac
3839    ;;
3840
3841  *)
3842    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3843    ;;
3844  esac
3845  dynamic_linker='Win32 ld.exe'
3846  # FIXME: first we should search . and the directory the executable is in
3847  shlibpath_var=PATH
3848  ;;
3849
3850darwin* | rhapsody*)
3851  dynamic_linker="$host_os dyld"
3852  version_type=darwin
3853  need_lib_prefix=no
3854  need_version=no
3855  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3856  soname_spec='${libname}${release}${major}$shared_ext'
3857  shlibpath_overrides_runpath=yes
3858  shlibpath_var=DYLD_LIBRARY_PATH
3859  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3860m4_if([$1], [],[
3861  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3862  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3863  ;;
3864
3865dgux*)
3866  version_type=linux
3867  need_lib_prefix=no
3868  need_version=no
3869  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3870  soname_spec='${libname}${release}${shared_ext}$major'
3871  shlibpath_var=LD_LIBRARY_PATH
3872  ;;
3873
3874freebsd1*)
3875  dynamic_linker=no
3876  ;;
3877
3878freebsd* | dragonfly*)
3879  # DragonFly does not have aout.  When/if they implement a new
3880  # versioning mechanism, adjust this.
3881  if test -x /usr/bin/objformat; then
3882    objformat=`/usr/bin/objformat`
3883  else
3884    case $host_os in
3885    freebsd[[123]]*) objformat=aout ;;
3886    *) objformat=elf ;;
3887    esac
3888  fi
3889  version_type=freebsd-$objformat
3890  case $version_type in
3891    freebsd-elf*)
3892      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3893      need_version=no
3894      need_lib_prefix=no
3895      ;;
3896    freebsd-*)
3897      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3898      need_version=yes
3899      ;;
3900  esac
3901  shlibpath_var=LD_LIBRARY_PATH
3902  case $host_os in
3903  freebsd2*)
3904    shlibpath_overrides_runpath=yes
3905    ;;
3906  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3907    shlibpath_overrides_runpath=yes
3908    hardcode_into_libs=yes
3909    ;;
3910  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3911  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3912    shlibpath_overrides_runpath=no
3913    hardcode_into_libs=yes
3914    ;;
3915  *) # from 4.6 on, and DragonFly
3916    shlibpath_overrides_runpath=yes
3917    hardcode_into_libs=yes
3918    ;;
3919  esac
3920  ;;
3921
3922gnu*)
3923  version_type=linux
3924  need_lib_prefix=no
3925  need_version=no
3926  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3927  soname_spec='${libname}${release}${shared_ext}$major'
3928  shlibpath_var=LD_LIBRARY_PATH
3929  hardcode_into_libs=yes
3930  ;;
3931
3932hpux9* | hpux10* | hpux11*)
3933  # Give a soname corresponding to the major version so that dld.sl refuses to
3934  # link against other versions.
3935  version_type=sunos
3936  need_lib_prefix=no
3937  need_version=no
3938  case $host_cpu in
3939  ia64*)
3940    shrext_cmds='.so'
3941    hardcode_into_libs=yes
3942    dynamic_linker="$host_os dld.so"
3943    shlibpath_var=LD_LIBRARY_PATH
3944    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3945    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3946    soname_spec='${libname}${release}${shared_ext}$major'
3947    if test "X$HPUX_IA64_MODE" = X32; then
3948      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3949    else
3950      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3951    fi
3952    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3953    ;;
3954  hppa*64*)
3955    shrext_cmds='.sl'
3956    hardcode_into_libs=yes
3957    dynamic_linker="$host_os dld.sl"
3958    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3959    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3960    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3961    soname_spec='${libname}${release}${shared_ext}$major'
3962    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3963    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3964    ;;
3965  *)
3966    shrext_cmds='.sl'
3967    dynamic_linker="$host_os dld.sl"
3968    shlibpath_var=SHLIB_PATH
3969    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3970    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3971    soname_spec='${libname}${release}${shared_ext}$major'
3972    ;;
3973  esac
3974  # HP-UX runs *really* slowly unless shared libraries are mode 555.
3975  postinstall_cmds='chmod 555 $lib'
3976  ;;
3977
3978interix[[3-9]]*)
3979  version_type=linux
3980  need_lib_prefix=no
3981  need_version=no
3982  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3983  soname_spec='${libname}${release}${shared_ext}$major'
3984  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3985  shlibpath_var=LD_LIBRARY_PATH
3986  shlibpath_overrides_runpath=no
3987  hardcode_into_libs=yes
3988  ;;
3989
3990irix5* | irix6* | nonstopux*)
3991  case $host_os in
3992    nonstopux*) version_type=nonstopux ;;
3993    *)
3994	if test "$lt_cv_prog_gnu_ld" = yes; then
3995		version_type=linux
3996	else
3997		version_type=irix
3998	fi ;;
3999  esac
4000  need_lib_prefix=no
4001  need_version=no
4002  soname_spec='${libname}${release}${shared_ext}$major'
4003  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4004  case $host_os in
4005  irix5* | nonstopux*)
4006    libsuff= shlibsuff=
4007    ;;
4008  *)
4009    case $LD in # libtool.m4 will add one of these switches to LD
4010    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4011      libsuff= shlibsuff= libmagic=32-bit;;
4012    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4013      libsuff=32 shlibsuff=N32 libmagic=N32;;
4014    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4015      libsuff=64 shlibsuff=64 libmagic=64-bit;;
4016    *) libsuff= shlibsuff= libmagic=never-match;;
4017    esac
4018    ;;
4019  esac
4020  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4021  shlibpath_overrides_runpath=no
4022  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4023  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4024  hardcode_into_libs=yes
4025  ;;
4026
4027# No shared lib support for Linux oldld, aout, or coff.
4028linux*oldld* | linux*aout* | linux*coff*)
4029  dynamic_linker=no
4030  ;;
4031
4032# This must be Linux ELF.
4033linux* | k*bsd*-gnu)
4034  version_type=linux
4035  need_lib_prefix=no
4036  need_version=no
4037  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4038  soname_spec='${libname}${release}${shared_ext}$major'
4039  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4040  shlibpath_var=LD_LIBRARY_PATH
4041  shlibpath_overrides_runpath=no
4042  # Some binutils ld are patched to set DT_RUNPATH
4043  save_LDFLAGS=$LDFLAGS
4044  save_libdir=$libdir
4045  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4046       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4047  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4048    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4049       [shlibpath_overrides_runpath=yes])])
4050  LDFLAGS=$save_LDFLAGS
4051  libdir=$save_libdir
4052
4053  # This implies no fast_install, which is unacceptable.
4054  # Some rework will be needed to allow for fast_install
4055  # before this can be enabled.
4056  hardcode_into_libs=yes
4057
4058  # Append ld.so.conf contents to the search path
4059  if test -f /etc/ld.so.conf; then
4060    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' ' '`
4061    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4062  fi
4063
4064  # We used to test for /lib/ld.so.1 and disable shared libraries on
4065  # powerpc, because MkLinux only supported shared libraries with the
4066  # GNU dynamic linker.  Since this was broken with cross compilers,
4067  # most powerpc-linux boxes support dynamic linking these days and
4068  # people can always --disable-shared, the test was removed, and we
4069  # assume the GNU/Linux dynamic linker is in use.
4070  dynamic_linker='GNU/Linux ld.so'
4071  ;;
4072
4073netbsd*)
4074  version_type=sunos
4075  need_lib_prefix=no
4076  need_version=no
4077  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4078    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4079    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4080    dynamic_linker='NetBSD (a.out) ld.so'
4081  else
4082    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4083    soname_spec='${libname}${release}${shared_ext}$major'
4084    dynamic_linker='NetBSD ld.elf_so'
4085  fi
4086  shlibpath_var=LD_LIBRARY_PATH
4087  shlibpath_overrides_runpath=yes
4088  hardcode_into_libs=yes
4089  ;;
4090
4091newsos6)
4092  version_type=linux
4093  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4094  shlibpath_var=LD_LIBRARY_PATH
4095  shlibpath_overrides_runpath=yes
4096  ;;
4097
4098*nto* | *qnx*)
4099  version_type=qnx
4100  need_lib_prefix=no
4101  need_version=no
4102  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4103  soname_spec='${libname}${release}${shared_ext}$major'
4104  shlibpath_var=LD_LIBRARY_PATH
4105  shlibpath_overrides_runpath=no
4106  hardcode_into_libs=yes
4107  dynamic_linker='ldqnx.so'
4108  ;;
4109
4110openbsd*)
4111  version_type=sunos
4112  sys_lib_dlsearch_path_spec="/usr/lib"
4113  need_lib_prefix=no
4114  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4115  case $host_os in
4116    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
4117    *)				need_version=no  ;;
4118  esac
4119  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4120  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4121  shlibpath_var=LD_LIBRARY_PATH
4122  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4123    case $host_os in
4124      openbsd2.[[89]] | openbsd2.[[89]].*)
4125	shlibpath_overrides_runpath=no
4126	;;
4127      *)
4128	shlibpath_overrides_runpath=yes
4129	;;
4130      esac
4131  else
4132    shlibpath_overrides_runpath=yes
4133  fi
4134  ;;
4135
4136os2*)
4137  libname_spec='$name'
4138  shrext_cmds=".dll"
4139  need_lib_prefix=no
4140  library_names_spec='$libname${shared_ext} $libname.a'
4141  dynamic_linker='OS/2 ld.exe'
4142  shlibpath_var=LIBPATH
4143  ;;
4144
4145osf3* | osf4* | osf5*)
4146  version_type=osf
4147  need_lib_prefix=no
4148  need_version=no
4149  soname_spec='${libname}${release}${shared_ext}$major'
4150  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4151  shlibpath_var=LD_LIBRARY_PATH
4152  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4153  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4154  ;;
4155
4156rdos*)
4157  dynamic_linker=no
4158  ;;
4159
4160solaris*)
4161  version_type=linux
4162  need_lib_prefix=no
4163  need_version=no
4164  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4165  soname_spec='${libname}${release}${shared_ext}$major'
4166  shlibpath_var=LD_LIBRARY_PATH
4167  shlibpath_overrides_runpath=yes
4168  hardcode_into_libs=yes
4169  # ldd complains unless libraries are executable
4170  postinstall_cmds='chmod +x $lib'
4171  ;;
4172
4173sunos4*)
4174  version_type=sunos
4175  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4176  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4177  shlibpath_var=LD_LIBRARY_PATH
4178  shlibpath_overrides_runpath=yes
4179  if test "$with_gnu_ld" = yes; then
4180    need_lib_prefix=no
4181  fi
4182  need_version=yes
4183  ;;
4184
4185sysv4 | sysv4.3*)
4186  version_type=linux
4187  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4188  soname_spec='${libname}${release}${shared_ext}$major'
4189  shlibpath_var=LD_LIBRARY_PATH
4190  case $host_vendor in
4191    sni)
4192      shlibpath_overrides_runpath=no
4193      need_lib_prefix=no
4194      runpath_var=LD_RUN_PATH
4195      ;;
4196    siemens)
4197      need_lib_prefix=no
4198      ;;
4199    motorola)
4200      need_lib_prefix=no
4201      need_version=no
4202      shlibpath_overrides_runpath=no
4203      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4204      ;;
4205  esac
4206  ;;
4207
4208sysv4*MP*)
4209  if test -d /usr/nec ;then
4210    version_type=linux
4211    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4212    soname_spec='$libname${shared_ext}.$major'
4213    shlibpath_var=LD_LIBRARY_PATH
4214  fi
4215  ;;
4216
4217sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4218  version_type=freebsd-elf
4219  need_lib_prefix=no
4220  need_version=no
4221  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4222  soname_spec='${libname}${release}${shared_ext}$major'
4223  shlibpath_var=LD_LIBRARY_PATH
4224  shlibpath_overrides_runpath=yes
4225  hardcode_into_libs=yes
4226  if test "$with_gnu_ld" = yes; then
4227    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4228  else
4229    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4230    case $host_os in
4231      sco3.2v5*)
4232        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4233	;;
4234    esac
4235  fi
4236  sys_lib_dlsearch_path_spec='/usr/lib'
4237  ;;
4238
4239tpf*)
4240  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
4241  version_type=linux
4242  need_lib_prefix=no
4243  need_version=no
4244  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4245  shlibpath_var=LD_LIBRARY_PATH
4246  shlibpath_overrides_runpath=no
4247  hardcode_into_libs=yes
4248  ;;
4249
4250uts4*)
4251  version_type=linux
4252  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4253  soname_spec='${libname}${release}${shared_ext}$major'
4254  shlibpath_var=LD_LIBRARY_PATH
4255  ;;
4256
4257*)
4258  dynamic_linker=no
4259  ;;
4260esac
4261AC_MSG_RESULT([$dynamic_linker])
4262test "$dynamic_linker" = no && can_build_shared=no
4263
4264variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4265if test "$GCC" = yes; then
4266  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4267fi
4268
4269if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4270  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4271fi
4272if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4273  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4274fi
4275
4276_LT_DECL([], [variables_saved_for_relink], [1],
4277    [Variables whose values should be saved in libtool wrapper scripts and
4278    restored at link time])
4279_LT_DECL([], [need_lib_prefix], [0],
4280    [Do we need the "lib" prefix for modules?])
4281_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4282_LT_DECL([], [version_type], [0], [Library versioning type])
4283_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
4284_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4285_LT_DECL([], [shlibpath_overrides_runpath], [0],
4286    [Is shlibpath searched before the hard-coded library search path?])
4287_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4288_LT_DECL([], [library_names_spec], [1],
4289    [[List of archive names.  First name is the real one, the rest are links.
4290    The last name is the one that the linker finds with -lNAME]])
4291_LT_DECL([], [soname_spec], [1],
4292    [[The coded name of the library, if different from the real name]])
4293_LT_DECL([], [postinstall_cmds], [2],
4294    [Command to use after installation of a shared archive])
4295_LT_DECL([], [postuninstall_cmds], [2],
4296    [Command to use after uninstallation of a shared archive])
4297_LT_DECL([], [finish_cmds], [2],
4298    [Commands used to finish a libtool library installation in a directory])
4299_LT_DECL([], [finish_eval], [1],
4300    [[As "finish_cmds", except a single script fragment to be evaled but
4301    not shown]])
4302_LT_DECL([], [hardcode_into_libs], [0],
4303    [Whether we should hardcode library paths into libraries])
4304_LT_DECL([], [sys_lib_search_path_spec], [2],
4305    [Compile-time system search path for libraries])
4306_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4307    [Run-time system search path for libraries])
4308])# _LT_SYS_DYNAMIC_LINKER
4309
4310
4311# _LT_PATH_TOOL_PREFIX(TOOL)
4312# --------------------------
4313# find a file program which can recognize shared library
4314AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4315[m4_require([_LT_DECL_EGREP])dnl
4316AC_MSG_CHECKING([for $1])
4317AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4318[case $MAGIC_CMD in
4319[[\\/*] |  ?:[\\/]*])
4320  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4321  ;;
4322*)
4323  lt_save_MAGIC_CMD="$MAGIC_CMD"
4324  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4325dnl $ac_dummy forces splitting on constant user-supplied paths.
4326dnl POSIX.2 word splitting is done only on the output of word expansions,
4327dnl not every word.  This closes a longstanding sh security hole.
4328  ac_dummy="m4_if([$2], , $PATH, [$2])"
4329  for ac_dir in $ac_dummy; do
4330    IFS="$lt_save_ifs"
4331    test -z "$ac_dir" && ac_dir=.
4332    if test -f $ac_dir/$1; then
4333      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4334      if test -n "$file_magic_test_file"; then
4335	case $deplibs_check_method in
4336	"file_magic "*)
4337	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4338	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4339	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4340	    $EGREP "$file_magic_regex" > /dev/null; then
4341	    :
4342	  else
4343	    cat <<_LT_EOF 1>&2
4344
4345*** Warning: the command libtool uses to detect shared libraries,
4346*** $file_magic_cmd, produces output that libtool cannot recognize.
4347*** The result is that libtool may fail to recognize shared libraries
4348*** as such.  This will affect the creation of libtool libraries that
4349*** depend on shared libraries, but programs linked with such libtool
4350*** libraries will work regardless of this problem.  Nevertheless, you
4351*** may want to report the problem to your system manager and/or to
4352*** bug-libtool@gnu.org
4353
4354_LT_EOF
4355	  fi ;;
4356	esac
4357      fi
4358      break
4359    fi
4360  done
4361  IFS="$lt_save_ifs"
4362  MAGIC_CMD="$lt_save_MAGIC_CMD"
4363  ;;
4364esac])
4365MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4366if test -n "$MAGIC_CMD"; then
4367  AC_MSG_RESULT($MAGIC_CMD)
4368else
4369  AC_MSG_RESULT(no)
4370fi
4371_LT_DECL([], [MAGIC_CMD], [0],
4372	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4373])# _LT_PATH_TOOL_PREFIX
4374
4375# Old name:
4376AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4377dnl aclocal-1.4 backwards compatibility:
4378dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4379
4380
4381# _LT_PATH_MAGIC
4382# --------------
4383# find a file program which can recognize a shared library
4384m4_defun([_LT_PATH_MAGIC],
4385[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4386if test -z "$lt_cv_path_MAGIC_CMD"; then
4387  if test -n "$ac_tool_prefix"; then
4388    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4389  else
4390    MAGIC_CMD=:
4391  fi
4392fi
4393])# _LT_PATH_MAGIC
4394
4395
4396# LT_PATH_LD
4397# ----------
4398# find the pathname to the GNU or non-GNU linker
4399AC_DEFUN([LT_PATH_LD],
4400[AC_REQUIRE([AC_PROG_CC])dnl
4401AC_REQUIRE([AC_CANONICAL_HOST])dnl
4402AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4403m4_require([_LT_DECL_SED])dnl
4404m4_require([_LT_DECL_EGREP])dnl
4405
4406AC_ARG_WITH([gnu-ld],
4407    [AS_HELP_STRING([--with-gnu-ld],
4408	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
4409    [test "$withval" = no || with_gnu_ld=yes],
4410    [with_gnu_ld=no])dnl
4411
4412ac_prog=ld
4413if test "$GCC" = yes; then
4414  # Check if gcc -print-prog-name=ld gives a path.
4415  AC_MSG_CHECKING([for ld used by $CC])
4416  case $host in
4417  *-*-mingw*)
4418    # gcc leaves a trailing carriage return which upsets mingw
4419    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4420  *)
4421    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4422  esac
4423  case $ac_prog in
4424    # Accept absolute paths.
4425    [[\\/]]* | ?:[[\\/]]*)
4426      re_direlt='/[[^/]][[^/]]*/\.\./'
4427      # Canonicalize the pathname of ld
4428      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4429      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4430	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4431      done
4432      test -z "$LD" && LD="$ac_prog"
4433      ;;
4434  "")
4435    # If it fails, then pretend we aren't using GCC.
4436    ac_prog=ld
4437    ;;
4438  *)
4439    # If it is relative, then search for the first ld in PATH.
4440    with_gnu_ld=unknown
4441    ;;
4442  esac
4443elif test "$with_gnu_ld" = yes; then
4444  AC_MSG_CHECKING([for GNU ld])
4445else
4446  AC_MSG_CHECKING([for non-GNU ld])
4447fi
4448AC_CACHE_VAL(lt_cv_path_LD,
4449[if test -z "$LD"; then
4450  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4451  for ac_dir in $PATH; do
4452    IFS="$lt_save_ifs"
4453    test -z "$ac_dir" && ac_dir=.
4454    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4455      lt_cv_path_LD="$ac_dir/$ac_prog"
4456      # Check to see if the program is GNU ld.  I'd rather use --version,
4457      # but apparently some variants of GNU ld only accept -v.
4458      # Break only if it was the GNU/non-GNU ld that we prefer.
4459      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4460      *GNU* | *'with BFD'*)
4461	test "$with_gnu_ld" != no && break
4462	;;
4463      *)
4464	test "$with_gnu_ld" != yes && break
4465	;;
4466      esac
4467    fi
4468  done
4469  IFS="$lt_save_ifs"
4470else
4471  lt_cv_path_LD="$LD" # Let the user override the test with a path.
4472fi])
4473LD="$lt_cv_path_LD"
4474if test -n "$LD"; then
4475  AC_MSG_RESULT($LD)
4476else
4477  AC_MSG_RESULT(no)
4478fi
4479test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4480_LT_PATH_LD_GNU
4481AC_SUBST([LD])
4482
4483_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4484])# LT_PATH_LD
4485
4486# Old names:
4487AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4488AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4489dnl aclocal-1.4 backwards compatibility:
4490dnl AC_DEFUN([AM_PROG_LD], [])
4491dnl AC_DEFUN([AC_PROG_LD], [])
4492
4493
4494# _LT_PATH_LD_GNU
4495#- --------------
4496m4_defun([_LT_PATH_LD_GNU],
4497[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4498[# I'd rather use --version here, but apparently some GNU lds only accept -v.
4499case `$LD -v 2>&1 </dev/null` in
4500*GNU* | *'with BFD'*)
4501  lt_cv_prog_gnu_ld=yes
4502  ;;
4503*)
4504  lt_cv_prog_gnu_ld=no
4505  ;;
4506esac])
4507with_gnu_ld=$lt_cv_prog_gnu_ld
4508])# _LT_PATH_LD_GNU
4509
4510
4511# _LT_CMD_RELOAD
4512# --------------
4513# find reload flag for linker
4514#   -- PORTME Some linkers may need a different reload flag.
4515m4_defun([_LT_CMD_RELOAD],
4516[AC_CACHE_CHECK([for $LD option to reload object files],
4517  lt_cv_ld_reload_flag,
4518  [lt_cv_ld_reload_flag='-r'])
4519reload_flag=$lt_cv_ld_reload_flag
4520case $reload_flag in
4521"" | " "*) ;;
4522*) reload_flag=" $reload_flag" ;;
4523esac
4524reload_cmds='$LD$reload_flag -o $output$reload_objs'
4525case $host_os in
4526  darwin*)
4527    if test "$GCC" = yes; then
4528      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4529    else
4530      reload_cmds='$LD$reload_flag -o $output$reload_objs'
4531    fi
4532    ;;
4533esac
4534_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4535_LT_DECL([], [reload_cmds], [2])dnl
4536])# _LT_CMD_RELOAD
4537
4538
4539# _LT_CHECK_MAGIC_METHOD
4540# ----------------------
4541# how to check for library dependencies
4542#  -- PORTME fill in with the dynamic library characteristics
4543m4_defun([_LT_CHECK_MAGIC_METHOD],
4544[m4_require([_LT_DECL_EGREP])
4545m4_require([_LT_DECL_OBJDUMP])
4546AC_CACHE_CHECK([how to recognize dependent libraries],
4547lt_cv_deplibs_check_method,
4548[lt_cv_file_magic_cmd='$MAGIC_CMD'
4549lt_cv_file_magic_test_file=
4550lt_cv_deplibs_check_method='unknown'
4551# Need to set the preceding variable on all platforms that support
4552# interlibrary dependencies.
4553# 'none' -- dependencies not supported.
4554# `unknown' -- same as none, but documents that we really don't know.
4555# 'pass_all' -- all dependencies passed with no checks.
4556# 'test_compile' -- check by making test program.
4557# 'file_magic [[regex]]' -- check by looking for files in library path
4558# which responds to the $file_magic_cmd with a given extended regex.
4559# If you have `file' or equivalent on your system and you're not sure
4560# whether `pass_all' will *always* work, you probably want this one.
4561
4562case $host_os in
4563aix[[4-9]]*)
4564  lt_cv_deplibs_check_method=pass_all
4565  ;;
4566
4567beos*)
4568  lt_cv_deplibs_check_method=pass_all
4569  ;;
4570
4571bsdi[[45]]*)
4572  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4573  lt_cv_file_magic_cmd='/usr/bin/file -L'
4574  lt_cv_file_magic_test_file=/shlib/libc.so
4575  ;;
4576
4577cygwin*)
4578  # func_win32_libid is a shell function defined in ltmain.sh
4579  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4580  lt_cv_file_magic_cmd='func_win32_libid'
4581  ;;
4582
4583mingw* | pw32*)
4584  # Base MSYS/MinGW do not provide the 'file' command needed by
4585  # func_win32_libid shell function, so use a weaker test based on 'objdump',
4586  # unless we find 'file', for example because we are cross-compiling.
4587  if ( file / ) >/dev/null 2>&1; then
4588    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4589    lt_cv_file_magic_cmd='func_win32_libid'
4590  else
4591    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4592    lt_cv_file_magic_cmd='$OBJDUMP -f'
4593  fi
4594  ;;
4595
4596cegcc)
4597  # use the weaker test based on 'objdump'. See mingw*.
4598  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4599  lt_cv_file_magic_cmd='$OBJDUMP -f'
4600  ;;
4601
4602darwin* | rhapsody*)
4603  lt_cv_deplibs_check_method=pass_all
4604  ;;
4605
4606freebsd* | dragonfly*)
4607  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4608    case $host_cpu in
4609    i*86 )
4610      # Not sure whether the presence of OpenBSD here was a mistake.
4611      # Let's accept both of them until this is cleared up.
4612      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4613      lt_cv_file_magic_cmd=/usr/bin/file
4614      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4615      ;;
4616    esac
4617  else
4618    lt_cv_deplibs_check_method=pass_all
4619  fi
4620  ;;
4621
4622gnu*)
4623  lt_cv_deplibs_check_method=pass_all
4624  ;;
4625
4626hpux10.20* | hpux11*)
4627  lt_cv_file_magic_cmd=/usr/bin/file
4628  case $host_cpu in
4629  ia64*)
4630    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4631    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4632    ;;
4633  hppa*64*)
4634    [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]']
4635    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4636    ;;
4637  *)
4638    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4639    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4640    ;;
4641  esac
4642  ;;
4643
4644interix[[3-9]]*)
4645  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4646  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4647  ;;
4648
4649irix5* | irix6* | nonstopux*)
4650  case $LD in
4651  *-32|*"-32 ") libmagic=32-bit;;
4652  *-n32|*"-n32 ") libmagic=N32;;
4653  *-64|*"-64 ") libmagic=64-bit;;
4654  *) libmagic=never-match;;
4655  esac
4656  lt_cv_deplibs_check_method=pass_all
4657  ;;
4658
4659# This must be Linux ELF.
4660linux* | k*bsd*-gnu)
4661  lt_cv_deplibs_check_method=pass_all
4662  ;;
4663
4664netbsd*)
4665  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4666    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4667  else
4668    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4669  fi
4670  ;;
4671
4672newos6*)
4673  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4674  lt_cv_file_magic_cmd=/usr/bin/file
4675  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4676  ;;
4677
4678*nto* | *qnx*)
4679  lt_cv_deplibs_check_method=pass_all
4680  ;;
4681
4682openbsd*)
4683  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4684    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4685  else
4686    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4687  fi
4688  ;;
4689
4690osf3* | osf4* | osf5*)
4691  lt_cv_deplibs_check_method=pass_all
4692  ;;
4693
4694rdos*)
4695  lt_cv_deplibs_check_method=pass_all
4696  ;;
4697
4698solaris*)
4699  lt_cv_deplibs_check_method=pass_all
4700  ;;
4701
4702sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4703  lt_cv_deplibs_check_method=pass_all
4704  ;;
4705
4706sysv4 | sysv4.3*)
4707  case $host_vendor in
4708  motorola)
4709    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]]'
4710    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4711    ;;
4712  ncr)
4713    lt_cv_deplibs_check_method=pass_all
4714    ;;
4715  sequent)
4716    lt_cv_file_magic_cmd='/bin/file'
4717    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4718    ;;
4719  sni)
4720    lt_cv_file_magic_cmd='/bin/file'
4721    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4722    lt_cv_file_magic_test_file=/lib/libc.so
4723    ;;
4724  siemens)
4725    lt_cv_deplibs_check_method=pass_all
4726    ;;
4727  pc)
4728    lt_cv_deplibs_check_method=pass_all
4729    ;;
4730  esac
4731  ;;
4732
4733tpf*)
4734  lt_cv_deplibs_check_method=pass_all
4735  ;;
4736esac
4737])
4738file_magic_cmd=$lt_cv_file_magic_cmd
4739deplibs_check_method=$lt_cv_deplibs_check_method
4740test -z "$deplibs_check_method" && deplibs_check_method=unknown
4741
4742_LT_DECL([], [deplibs_check_method], [1],
4743    [Method to check whether dependent libraries are shared objects])
4744_LT_DECL([], [file_magic_cmd], [1],
4745    [Command to use when deplibs_check_method == "file_magic"])
4746])# _LT_CHECK_MAGIC_METHOD
4747
4748
4749# LT_PATH_NM
4750# ----------
4751# find the pathname to a BSD- or MS-compatible name lister
4752AC_DEFUN([LT_PATH_NM],
4753[AC_REQUIRE([AC_PROG_CC])dnl
4754AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4755[if test -n "$NM"; then
4756  # Let the user override the test.
4757  lt_cv_path_NM="$NM"
4758else
4759  lt_nm_to_check="${ac_tool_prefix}nm"
4760  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4761    lt_nm_to_check="$lt_nm_to_check nm"
4762  fi
4763  for lt_tmp_nm in $lt_nm_to_check; do
4764    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4765    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4766      IFS="$lt_save_ifs"
4767      test -z "$ac_dir" && ac_dir=.
4768      tmp_nm="$ac_dir/$lt_tmp_nm"
4769      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4770	# Check to see if the nm accepts a BSD-compat flag.
4771	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4772	#   nm: unknown option "B" ignored
4773	# Tru64's nm complains that /dev/null is an invalid object file
4774	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4775	*/dev/null* | *'Invalid file or object type'*)
4776	  lt_cv_path_NM="$tmp_nm -B"
4777	  break
4778	  ;;
4779	*)
4780	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4781	  */dev/null*)
4782	    lt_cv_path_NM="$tmp_nm -p"
4783	    break
4784	    ;;
4785	  *)
4786	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4787	    continue # so that we can try to find one that supports BSD flags
4788	    ;;
4789	  esac
4790	  ;;
4791	esac
4792      fi
4793    done
4794    IFS="$lt_save_ifs"
4795  done
4796  : ${lt_cv_path_NM=no}
4797fi])
4798if test "$lt_cv_path_NM" != "no"; then
4799  NM="$lt_cv_path_NM"
4800else
4801  # Didn't find any BSD compatible name lister, look for dumpbin.
4802  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
4803  AC_SUBST([DUMPBIN])
4804  if test "$DUMPBIN" != ":"; then
4805    NM="$DUMPBIN"
4806  fi
4807fi
4808test -z "$NM" && NM=nm
4809AC_SUBST([NM])
4810_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4811
4812AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4813  [lt_cv_nm_interface="BSD nm"
4814  echo "int some_variable = 0;" > conftest.$ac_ext
4815  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4816  (eval "$ac_compile" 2>conftest.err)
4817  cat conftest.err >&AS_MESSAGE_LOG_FD
4818  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4819  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4820  cat conftest.err >&AS_MESSAGE_LOG_FD
4821  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
4822  cat conftest.out >&AS_MESSAGE_LOG_FD
4823  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4824    lt_cv_nm_interface="MS dumpbin"
4825  fi
4826  rm -f conftest*])
4827])# LT_PATH_NM
4828
4829# Old names:
4830AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4831AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4832dnl aclocal-1.4 backwards compatibility:
4833dnl AC_DEFUN([AM_PROG_NM], [])
4834dnl AC_DEFUN([AC_PROG_NM], [])
4835
4836
4837# LT_LIB_M
4838# --------
4839# check for math library
4840AC_DEFUN([LT_LIB_M],
4841[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4842LIBM=
4843case $host in
4844*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4845  # These system don't have libm, or don't need it
4846  ;;
4847*-ncr-sysv4.3*)
4848  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4849  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4850  ;;
4851*)
4852  AC_CHECK_LIB(m, cos, LIBM="-lm")
4853  ;;
4854esac
4855AC_SUBST([LIBM])
4856])# LT_LIB_M
4857
4858# Old name:
4859AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4860dnl aclocal-1.4 backwards compatibility:
4861dnl AC_DEFUN([AC_CHECK_LIBM], [])
4862
4863
4864# _LT_COMPILER_NO_RTTI([TAGNAME])
4865# -------------------------------
4866m4_defun([_LT_COMPILER_NO_RTTI],
4867[m4_require([_LT_TAG_COMPILER])dnl
4868
4869_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4870
4871if test "$GCC" = yes; then
4872  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4873
4874  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4875    lt_cv_prog_compiler_rtti_exceptions,
4876    [-fno-rtti -fno-exceptions], [],
4877    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4878fi
4879_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4880	[Compiler flag to turn off builtin functions])
4881])# _LT_COMPILER_NO_RTTI
4882
4883
4884# _LT_CMD_GLOBAL_SYMBOLS
4885# ----------------------
4886m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4887[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4888AC_REQUIRE([AC_PROG_CC])dnl
4889AC_REQUIRE([LT_PATH_NM])dnl
4890AC_REQUIRE([LT_PATH_LD])dnl
4891m4_require([_LT_DECL_SED])dnl
4892m4_require([_LT_DECL_EGREP])dnl
4893m4_require([_LT_TAG_COMPILER])dnl
4894
4895# Check for command to grab the raw symbol name followed by C symbol from nm.
4896AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4897AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4898[
4899# These are sane defaults that work on at least a few old systems.
4900# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4901
4902# Character class describing NM global symbol codes.
4903symcode='[[BCDEGRST]]'
4904
4905# Regexp to match symbols that can be accessed directly from C.
4906sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4907
4908# Define system-specific variables.
4909case $host_os in
4910aix*)
4911  symcode='[[BCDT]]'
4912  ;;
4913cygwin* | mingw* | pw32* | cegcc*)
4914  symcode='[[ABCDGISTW]]'
4915  ;;
4916hpux*)
4917  if test "$host_cpu" = ia64; then
4918    symcode='[[ABCDEGRST]]'
4919  fi
4920  ;;
4921irix* | nonstopux*)
4922  symcode='[[BCDEGRST]]'
4923  ;;
4924osf*)
4925  symcode='[[BCDEGQRST]]'
4926  ;;
4927solaris*)
4928  symcode='[[BDRT]]'
4929  ;;
4930sco3.2v5*)
4931  symcode='[[DT]]'
4932  ;;
4933sysv4.2uw2*)
4934  symcode='[[DT]]'
4935  ;;
4936sysv5* | sco5v6* | unixware* | OpenUNIX*)
4937  symcode='[[ABDT]]'
4938  ;;
4939sysv4)
4940  symcode='[[DFNSTU]]'
4941  ;;
4942esac
4943
4944# If we're using GNU nm, then use its standard symbol codes.
4945case `$NM -V 2>&1` in
4946*GNU* | *'with BFD'*)
4947  symcode='[[ABCDGIRSTW]]' ;;
4948esac
4949
4950# Transform an extracted symbol line into a proper C declaration.
4951# Some systems (esp. on ia64) link data and code symbols differently,
4952# so use this general approach.
4953lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4954
4955# Transform an extracted symbol line into symbol name and symbol address
4956lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4957lt_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'"
4958
4959# Handle CRLF in mingw tool chain
4960opt_cr=
4961case $build_os in
4962mingw*)
4963  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4964  ;;
4965esac
4966
4967# Try without a prefix underscore, then with it.
4968for ac_symprfx in "" "_"; do
4969
4970  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4971  symxfrm="\\1 $ac_symprfx\\2 \\2"
4972
4973  # Write the raw and C identifiers.
4974  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4975    # Fake it for dumpbin and say T for any non-static function
4976    # and D for any global variable.
4977    # Also find C++ and __fastcall symbols from MSVC++,
4978    # which start with @ or ?.
4979    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4980"     {last_section=section; section=\$ 3};"\
4981"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4982"     \$ 0!~/External *\|/{next};"\
4983"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4984"     {if(hide[section]) next};"\
4985"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4986"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4987"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4988"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4989"     ' prfx=^$ac_symprfx]"
4990  else
4991    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4992  fi
4993
4994  # Check to see that the pipe works correctly.
4995  pipe_works=no
4996
4997  rm -f conftest*
4998  cat > conftest.$ac_ext <<_LT_EOF
4999#ifdef __cplusplus
5000extern "C" {
5001#endif
5002char nm_test_var;
5003void nm_test_func(void);
5004void nm_test_func(void){}
5005#ifdef __cplusplus
5006}
5007#endif
5008int main(){nm_test_var='a';nm_test_func();return(0);}
5009_LT_EOF
5010
5011  if AC_TRY_EVAL(ac_compile); then
5012    # Now try to grab the symbols.
5013    nlist=conftest.nm
5014    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5015      # Try sorting and uniquifying the output.
5016      if sort "$nlist" | uniq > "$nlist"T; then
5017	mv -f "$nlist"T "$nlist"
5018      else
5019	rm -f "$nlist"T
5020      fi
5021
5022      # Make sure that we snagged all the symbols we need.
5023      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5024	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5025	  cat <<_LT_EOF > conftest.$ac_ext
5026#ifdef __cplusplus
5027extern "C" {
5028#endif
5029
5030_LT_EOF
5031	  # Now generate the symbol file.
5032	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5033
5034	  cat <<_LT_EOF >> conftest.$ac_ext
5035
5036/* The mapping between symbol names and symbols.  */
5037const struct {
5038  const char *name;
5039  void       *address;
5040}
5041lt__PROGRAM__LTX_preloaded_symbols[[]] =
5042{
5043  { "@PROGRAM@", (void *) 0 },
5044_LT_EOF
5045	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5046	  cat <<\_LT_EOF >> conftest.$ac_ext
5047  {0, (void *) 0}
5048};
5049
5050/* This works around a problem in FreeBSD linker */
5051#ifdef FREEBSD_WORKAROUND
5052static const void *lt_preloaded_setup() {
5053  return lt__PROGRAM__LTX_preloaded_symbols;
5054}
5055#endif
5056
5057#ifdef __cplusplus
5058}
5059#endif
5060_LT_EOF
5061	  # Now try linking the two files.
5062	  mv conftest.$ac_objext conftstm.$ac_objext
5063	  lt_save_LIBS="$LIBS"
5064	  lt_save_CFLAGS="$CFLAGS"
5065	  LIBS="conftstm.$ac_objext"
5066	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5067	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5068	    pipe_works=yes
5069	  fi
5070	  LIBS="$lt_save_LIBS"
5071	  CFLAGS="$lt_save_CFLAGS"
5072	else
5073	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5074	fi
5075      else
5076	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5077      fi
5078    else
5079      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5080    fi
5081  else
5082    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5083    cat conftest.$ac_ext >&5
5084  fi
5085  rm -rf conftest* conftst*
5086
5087  # Do not use the global_symbol_pipe unless it works.
5088  if test "$pipe_works" = yes; then
5089    break
5090  else
5091    lt_cv_sys_global_symbol_pipe=
5092  fi
5093done
5094])
5095if test -z "$lt_cv_sys_global_symbol_pipe"; then
5096  lt_cv_sys_global_symbol_to_cdecl=
5097fi
5098if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5099  AC_MSG_RESULT(failed)
5100else
5101  AC_MSG_RESULT(ok)
5102fi
5103
5104_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5105    [Take the output of nm and produce a listing of raw symbols and C names])
5106_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5107    [Transform the output of nm in a proper C declaration])
5108_LT_DECL([global_symbol_to_c_name_address],
5109    [lt_cv_sys_global_symbol_to_c_name_address], [1],
5110    [Transform the output of nm in a C name address pair])
5111_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5112    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5113    [Transform the output of nm in a C name address pair when lib prefix is needed])
5114]) # _LT_CMD_GLOBAL_SYMBOLS
5115
5116
5117# _LT_COMPILER_PIC([TAGNAME])
5118# ---------------------------
5119m4_defun([_LT_COMPILER_PIC],
5120[m4_require([_LT_TAG_COMPILER])dnl
5121_LT_TAGVAR(lt_prog_compiler_wl, $1)=
5122_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5123_LT_TAGVAR(lt_prog_compiler_static, $1)=
5124
5125AC_MSG_CHECKING([for $compiler option to produce PIC])
5126m4_if([$1], [CXX], [
5127  # C++ specific cases for pic, static, wl, etc.
5128  if test "$GXX" = yes; then
5129    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5130    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5131
5132    case $host_os in
5133    aix*)
5134      # All AIX code is PIC.
5135      if test "$host_cpu" = ia64; then
5136	# AIX 5 now supports IA64 processor
5137	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5138      fi
5139      ;;
5140
5141    amigaos*)
5142      case $host_cpu in
5143      powerpc)
5144            # see comment about AmigaOS4 .so support
5145            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5146        ;;
5147      m68k)
5148            # FIXME: we need at least 68020 code to build shared libraries, but
5149            # adding the `-m68020' flag to GCC prevents building anything better,
5150            # like `-m68040'.
5151            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5152        ;;
5153      esac
5154      ;;
5155
5156    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5157      # PIC is the default for these OSes.
5158      ;;
5159    mingw* | cygwin* | os2* | pw32* | cegcc*)
5160      # This hack is so that the source file can tell whether it is being
5161      # built for inclusion in a dll (and should export symbols for example).
5162      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5163      # (--disable-auto-import) libraries
5164      m4_if([$1], [GCJ], [],
5165	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5166      ;;
5167    darwin* | rhapsody*)
5168      # PIC is the default on this platform
5169      # Common symbols not allowed in MH_DYLIB files
5170      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5171      ;;
5172    *djgpp*)
5173      # DJGPP does not support shared libraries at all
5174      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5175      ;;
5176    interix[[3-9]]*)
5177      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5178      # Instead, we relocate shared libraries at runtime.
5179      ;;
5180    sysv4*MP*)
5181      if test -d /usr/nec; then
5182	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5183      fi
5184      ;;
5185    hpux*)
5186      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5187      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5188      # sets the default TLS model and affects inlining.
5189      case $host_cpu in
5190      hppa*64*)
5191	;;
5192      *)
5193	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5194	;;
5195      esac
5196      ;;
5197    *qnx* | *nto*)
5198      # QNX uses GNU C++, but need to define -shared option too, otherwise
5199      # it will coredump.
5200      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5201      ;;
5202    *)
5203      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5204      ;;
5205    esac
5206  else
5207    case $host_os in
5208      aix[[4-9]]*)
5209	# All AIX code is PIC.
5210	if test "$host_cpu" = ia64; then
5211	  # AIX 5 now supports IA64 processor
5212	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5213	else
5214	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5215	fi
5216	;;
5217      chorus*)
5218	case $cc_basename in
5219	cxch68*)
5220	  # Green Hills C++ Compiler
5221	  # _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"
5222	  ;;
5223	esac
5224	;;
5225      dgux*)
5226	case $cc_basename in
5227	  ec++*)
5228	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5229	    ;;
5230	  ghcx*)
5231	    # Green Hills C++ Compiler
5232	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5233	    ;;
5234	  *)
5235	    ;;
5236	esac
5237	;;
5238      freebsd* | dragonfly*)
5239	# FreeBSD uses GNU C++
5240	;;
5241      hpux9* | hpux10* | hpux11*)
5242	case $cc_basename in
5243	  CC*)
5244	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5245	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5246	    if test "$host_cpu" != ia64; then
5247	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5248	    fi
5249	    ;;
5250	  aCC*)
5251	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5252	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5253	    case $host_cpu in
5254	    hppa*64*|ia64*)
5255	      # +Z the default
5256	      ;;
5257	    *)
5258	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5259	      ;;
5260	    esac
5261	    ;;
5262	  *)
5263	    ;;
5264	esac
5265	;;
5266      interix*)
5267	# This is c89, which is MS Visual C++ (no shared libs)
5268	# Anyone wants to do a port?
5269	;;
5270      irix5* | irix6* | nonstopux*)
5271	case $cc_basename in
5272	  CC*)
5273	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5274	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5275	    # CC pic flag -KPIC is the default.
5276	    ;;
5277	  *)
5278	    ;;
5279	esac
5280	;;
5281      linux* | k*bsd*-gnu)
5282	case $cc_basename in
5283	  KCC*)
5284	    # KAI C++ Compiler
5285	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5286	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5287	    ;;
5288	  ecpc* )
5289	    # old Intel C++ for x86_64 which still supported -KPIC.
5290	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5291	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5292	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5293	    ;;
5294	  icpc* )
5295	    # Intel C++, used to be incompatible with GCC.
5296	    # ICC 10 doesn't accept -KPIC any more.
5297	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5298	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5299	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5300	    ;;
5301	  pgCC* | pgcpp*)
5302	    # Portland Group C++ compiler
5303	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5304	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5305	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5306	    ;;
5307	  cxx*)
5308	    # Compaq C++
5309	    # Make sure the PIC flag is empty.  It appears that all Alpha
5310	    # Linux and Compaq Tru64 Unix objects are PIC.
5311	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5312	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5313	    ;;
5314	  xlc* | xlC*)
5315	    # IBM XL 8.0 on PPC
5316	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5317	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5318	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5319	    ;;
5320	  *)
5321	    case `$CC -V 2>&1 | sed 5q` in
5322	    *Sun\ C*)
5323	      # Sun C++ 5.9
5324	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5325	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5326	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5327	      ;;
5328	    esac
5329	    ;;
5330	esac
5331	;;
5332      lynxos*)
5333	;;
5334      m88k*)
5335	;;
5336      mvs*)
5337	case $cc_basename in
5338	  cxx*)
5339	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5340	    ;;
5341	  *)
5342	    ;;
5343	esac
5344	;;
5345      netbsd*)
5346	;;
5347      *qnx* | *nto*)
5348        # QNX uses GNU C++, but need to define -shared option too, otherwise
5349        # it will coredump.
5350        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5351        ;;
5352      osf3* | osf4* | osf5*)
5353	case $cc_basename in
5354	  KCC*)
5355	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5356	    ;;
5357	  RCC*)
5358	    # Rational C++ 2.4.1
5359	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5360	    ;;
5361	  cxx*)
5362	    # Digital/Compaq C++
5363	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5364	    # Make sure the PIC flag is empty.  It appears that all Alpha
5365	    # Linux and Compaq Tru64 Unix objects are PIC.
5366	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5367	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5368	    ;;
5369	  *)
5370	    ;;
5371	esac
5372	;;
5373      psos*)
5374	;;
5375      solaris*)
5376	case $cc_basename in
5377	  CC*)
5378	    # Sun C++ 4.2, 5.x and Centerline C++
5379	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5380	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5381	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5382	    ;;
5383	  gcx*)
5384	    # Green Hills C++ Compiler
5385	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5386	    ;;
5387	  *)
5388	    ;;
5389	esac
5390	;;
5391      sunos4*)
5392	case $cc_basename in
5393	  CC*)
5394	    # Sun C++ 4.x
5395	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5396	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5397	    ;;
5398	  lcc*)
5399	    # Lucid
5400	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5401	    ;;
5402	  *)
5403	    ;;
5404	esac
5405	;;
5406      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5407	case $cc_basename in
5408	  CC*)
5409	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5410	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5411	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5412	    ;;
5413	esac
5414	;;
5415      tandem*)
5416	case $cc_basename in
5417	  NCC*)
5418	    # NonStop-UX NCC 3.20
5419	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5420	    ;;
5421	  *)
5422	    ;;
5423	esac
5424	;;
5425      vxworks*)
5426	;;
5427      *)
5428	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5429	;;
5430    esac
5431  fi
5432],
5433[
5434  if test "$GCC" = yes; then
5435    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5436    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5437
5438    case $host_os in
5439      aix*)
5440      # All AIX code is PIC.
5441      if test "$host_cpu" = ia64; then
5442	# AIX 5 now supports IA64 processor
5443	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5444      fi
5445      ;;
5446
5447    amigaos*)
5448      case $host_cpu in
5449      powerpc)
5450            # see comment about AmigaOS4 .so support
5451            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5452        ;;
5453      m68k)
5454            # FIXME: we need at least 68020 code to build shared libraries, but
5455            # adding the `-m68020' flag to GCC prevents building anything better,
5456            # like `-m68040'.
5457            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5458        ;;
5459      esac
5460      ;;
5461
5462    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5463      # PIC is the default for these OSes.
5464      ;;
5465
5466    mingw* | cygwin* | pw32* | os2* | cegcc*)
5467      # This hack is so that the source file can tell whether it is being
5468      # built for inclusion in a dll (and should export symbols for example).
5469      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5470      # (--disable-auto-import) libraries
5471      m4_if([$1], [GCJ], [],
5472	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5473      ;;
5474
5475    darwin* | rhapsody*)
5476      # PIC is the default on this platform
5477      # Common symbols not allowed in MH_DYLIB files
5478      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5479      ;;
5480
5481    hpux*)
5482      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5483      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5484      # sets the default TLS model and affects inlining.
5485      case $host_cpu in
5486      hppa*64*)
5487	# +Z the default
5488	;;
5489      *)
5490	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5491	;;
5492      esac
5493      ;;
5494
5495    interix[[3-9]]*)
5496      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5497      # Instead, we relocate shared libraries at runtime.
5498      ;;
5499
5500    msdosdjgpp*)
5501      # Just because we use GCC doesn't mean we suddenly get shared libraries
5502      # on systems that don't support them.
5503      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5504      enable_shared=no
5505      ;;
5506
5507    *nto* | *qnx*)
5508      # QNX uses GNU C++, but need to define -shared option too, otherwise
5509      # it will coredump.
5510      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5511      ;;
5512
5513    sysv4*MP*)
5514      if test -d /usr/nec; then
5515	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5516      fi
5517      ;;
5518
5519    *)
5520      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5521      ;;
5522    esac
5523  else
5524    # PORTME Check for flag to pass linker flags through the system compiler.
5525    case $host_os in
5526    aix*)
5527      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5528      if test "$host_cpu" = ia64; then
5529	# AIX 5 now supports IA64 processor
5530	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5531      else
5532	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5533      fi
5534      ;;
5535
5536    mingw* | cygwin* | pw32* | os2* | cegcc*)
5537      # This hack is so that the source file can tell whether it is being
5538      # built for inclusion in a dll (and should export symbols for example).
5539      m4_if([$1], [GCJ], [],
5540	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5541      ;;
5542
5543    hpux9* | hpux10* | hpux11*)
5544      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5545      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5546      # not for PA HP-UX.
5547      case $host_cpu in
5548      hppa*64*|ia64*)
5549	# +Z the default
5550	;;
5551      *)
5552	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5553	;;
5554      esac
5555      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5556      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5557      ;;
5558
5559    irix5* | irix6* | nonstopux*)
5560      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5561      # PIC (with -KPIC) is the default.
5562      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5563      ;;
5564
5565    linux* | k*bsd*-gnu)
5566      case $cc_basename in
5567      # old Intel for x86_64 which still supported -KPIC.
5568      ecc*)
5569	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5570	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5571	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5572        ;;
5573      # icc used to be incompatible with GCC.
5574      # ICC 10 doesn't accept -KPIC any more.
5575      icc* | ifort*)
5576	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5577	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5578	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5579        ;;
5580      # Lahey Fortran 8.1.
5581      lf95*)
5582	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5583	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5584	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5585	;;
5586      pgcc* | pgf77* | pgf90* | pgf95*)
5587        # Portland Group compilers (*not* the Pentium gcc compiler,
5588	# which looks to be a dead project)
5589	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5590	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5591	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5592        ;;
5593      ccc*)
5594        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5595        # All Alpha code is PIC.
5596        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5597        ;;
5598      xl*)
5599	# IBM XL C 8.0/Fortran 10.1 on PPC
5600	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5601	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5602	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5603	;;
5604      *)
5605	case `$CC -V 2>&1 | sed 5q` in
5606	*Sun\ C*)
5607	  # Sun C 5.9
5608	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5609	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5610	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5611	  ;;
5612	*Sun\ F*)
5613	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5614	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5615	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5616	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5617	  ;;
5618	esac
5619	;;
5620      esac
5621      ;;
5622
5623    newsos6)
5624      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5625      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5626      ;;
5627
5628    *nto* | *qnx*)
5629      # QNX uses GNU C++, but need to define -shared option too, otherwise
5630      # it will coredump.
5631      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5632      ;;
5633
5634    osf3* | osf4* | osf5*)
5635      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5636      # All OSF/1 code is PIC.
5637      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5638      ;;
5639
5640    rdos*)
5641      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5642      ;;
5643
5644    solaris*)
5645      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5646      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5647      case $cc_basename in
5648      f77* | f90* | f95*)
5649	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5650      *)
5651	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5652      esac
5653      ;;
5654
5655    sunos4*)
5656      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5657      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5658      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5659      ;;
5660
5661    sysv4 | sysv4.2uw2* | sysv4.3*)
5662      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5663      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5664      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5665      ;;
5666
5667    sysv4*MP*)
5668      if test -d /usr/nec ;then
5669	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5670	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5671      fi
5672      ;;
5673
5674    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5675      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5676      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5677      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5678      ;;
5679
5680    unicos*)
5681      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5682      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5683      ;;
5684
5685    uts4*)
5686      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5687      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5688      ;;
5689
5690    *)
5691      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5692      ;;
5693    esac
5694  fi
5695])
5696case $host_os in
5697  # For platforms which do not support PIC, -DPIC is meaningless:
5698  *djgpp*)
5699    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5700    ;;
5701  *)
5702    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5703    ;;
5704esac
5705AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5706_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5707	[How to pass a linker flag through the compiler])
5708
5709#
5710# Check to make sure the PIC flag actually works.
5711#
5712if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5713  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5714    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5715    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5716    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5717     "" | " "*) ;;
5718     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5719     esac],
5720    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5721     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5722fi
5723_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5724	[Additional compiler flags for building library objects])
5725
5726#
5727# Check to make sure the static flag actually works.
5728#
5729wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5730_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5731  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5732  $lt_tmp_static_flag,
5733  [],
5734  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5735_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5736	[Compiler flag to prevent dynamic linking])
5737])# _LT_COMPILER_PIC
5738
5739
5740# _LT_LINKER_SHLIBS([TAGNAME])
5741# ----------------------------
5742# See if the linker supports building shared libraries.
5743m4_defun([_LT_LINKER_SHLIBS],
5744[AC_REQUIRE([LT_PATH_LD])dnl
5745AC_REQUIRE([LT_PATH_NM])dnl
5746m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5747m4_require([_LT_DECL_EGREP])dnl
5748m4_require([_LT_DECL_SED])dnl
5749m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5750m4_require([_LT_TAG_COMPILER])dnl
5751AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5752m4_if([$1], [CXX], [
5753  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5754  case $host_os in
5755  aix[[4-9]]*)
5756    # If we're using GNU nm, then we don't want the "-C" option.
5757    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5758    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5759      _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'
5760    else
5761      _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'
5762    fi
5763    ;;
5764  pw32*)
5765    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5766  ;;
5767  cygwin* | mingw* | cegcc*)
5768    _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'
5769  ;;
5770  *)
5771    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5772  ;;
5773  esac
5774  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5775], [
5776  runpath_var=
5777  _LT_TAGVAR(allow_undefined_flag, $1)=
5778  _LT_TAGVAR(always_export_symbols, $1)=no
5779  _LT_TAGVAR(archive_cmds, $1)=
5780  _LT_TAGVAR(archive_expsym_cmds, $1)=
5781  _LT_TAGVAR(compiler_needs_object, $1)=no
5782  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5783  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5784  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5785  _LT_TAGVAR(hardcode_automatic, $1)=no
5786  _LT_TAGVAR(hardcode_direct, $1)=no
5787  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5788  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5789  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5790  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5791  _LT_TAGVAR(hardcode_minus_L, $1)=no
5792  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5793  _LT_TAGVAR(inherit_rpath, $1)=no
5794  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5795  _LT_TAGVAR(module_cmds, $1)=
5796  _LT_TAGVAR(module_expsym_cmds, $1)=
5797  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5798  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5799  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5800  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5801  # include_expsyms should be a list of space-separated symbols to be *always*
5802  # included in the symbol list
5803  _LT_TAGVAR(include_expsyms, $1)=
5804  # exclude_expsyms can be an extended regexp of symbols to exclude
5805  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5806  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5807  # as well as any symbol that contains `d'.
5808  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5809  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5810  # platforms (ab)use it in PIC code, but their linkers get confused if
5811  # the symbol is explicitly referenced.  Since portable code cannot
5812  # rely on this symbol name, it's probably fine to never include it in
5813  # preloaded symbol tables.
5814  # Exclude shared library initialization/finalization symbols.
5815dnl Note also adjust exclude_expsyms for C++ above.
5816  extract_expsyms_cmds=
5817
5818  case $host_os in
5819  cygwin* | mingw* | pw32* | cegcc*)
5820    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5821    # When not using gcc, we currently assume that we are using
5822    # Microsoft Visual C++.
5823    if test "$GCC" != yes; then
5824      with_gnu_ld=no
5825    fi
5826    ;;
5827  interix*)
5828    # we just hope/assume this is gcc and not c89 (= MSVC++)
5829    with_gnu_ld=yes
5830    ;;
5831  openbsd*)
5832    with_gnu_ld=no
5833    ;;
5834  esac
5835
5836  _LT_TAGVAR(ld_shlibs, $1)=yes
5837  if test "$with_gnu_ld" = yes; then
5838    # If archive_cmds runs LD, not CC, wlarc should be empty
5839    wlarc='${wl}'
5840
5841    # Set some defaults for GNU ld with shared library support. These
5842    # are reset later if shared libraries are not supported. Putting them
5843    # here allows them to be overridden if necessary.
5844    runpath_var=LD_RUN_PATH
5845    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5846    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5847    # ancient GNU ld didn't support --whole-archive et. al.
5848    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5849      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5850    else
5851      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5852    fi
5853    supports_anon_versioning=no
5854    case `$LD -v 2>&1` in
5855      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5856      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5857      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5858      *\ 2.11.*) ;; # other 2.11 versions
5859      *) supports_anon_versioning=yes ;;
5860    esac
5861
5862    # See if GNU ld supports shared libraries.
5863    case $host_os in
5864    aix[[3-9]]*)
5865      # On AIX/PPC, the GNU linker is very broken
5866      if test "$host_cpu" != ia64; then
5867	_LT_TAGVAR(ld_shlibs, $1)=no
5868	cat <<_LT_EOF 1>&2
5869
5870*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5871*** to be unable to reliably create shared libraries on AIX.
5872*** Therefore, libtool is disabling shared libraries support.  If you
5873*** really care for shared libraries, you may want to modify your PATH
5874*** so that a non-GNU linker is found, and then restart.
5875
5876_LT_EOF
5877      fi
5878      ;;
5879
5880    amigaos*)
5881      case $host_cpu in
5882      powerpc)
5883            # see comment about AmigaOS4 .so support
5884            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5885            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5886        ;;
5887      m68k)
5888            _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)'
5889            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5890            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5891        ;;
5892      esac
5893      ;;
5894
5895    beos*)
5896      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5897	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5898	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5899	# support --undefined.  This deserves some investigation.  FIXME
5900	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5901      else
5902	_LT_TAGVAR(ld_shlibs, $1)=no
5903      fi
5904      ;;
5905
5906    cygwin* | mingw* | pw32* | cegcc*)
5907      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5908      # as there is no search path for DLLs.
5909      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5910      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5911      _LT_TAGVAR(always_export_symbols, $1)=no
5912      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5913      _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'
5914
5915      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5916        _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'
5917	# If the export-symbols file already is a .def file (1st line
5918	# is EXPORTS), use it as is; otherwise, prepend...
5919	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5920	  cp $export_symbols $output_objdir/$soname.def;
5921	else
5922	  echo EXPORTS > $output_objdir/$soname.def;
5923	  cat $export_symbols >> $output_objdir/$soname.def;
5924	fi~
5925	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5926      else
5927	_LT_TAGVAR(ld_shlibs, $1)=no
5928      fi
5929      ;;
5930
5931    interix[[3-9]]*)
5932      _LT_TAGVAR(hardcode_direct, $1)=no
5933      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5934      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5935      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5936      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5937      # Instead, shared libraries are loaded at an image base (0x10000000 by
5938      # default) and relocated if they conflict, which is a slow very memory
5939      # consuming and fragmenting process.  To avoid this, we pick a random,
5940      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5941      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5942      _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'
5943      _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'
5944      ;;
5945
5946    gnu* | linux* | tpf* | k*bsd*-gnu)
5947      tmp_diet=no
5948      if test "$host_os" = linux-dietlibc; then
5949	case $cc_basename in
5950	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5951	esac
5952      fi
5953      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5954	 && test "$tmp_diet" = no
5955      then
5956	tmp_addflag=
5957	tmp_sharedflag='-shared'
5958	case $cc_basename,$host_cpu in
5959        pgcc*)				# Portland Group C compiler
5960	  _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'
5961	  tmp_addflag=' $pic_flag'
5962	  ;;
5963	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
5964	  _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'
5965	  tmp_addflag=' $pic_flag -Mnomain' ;;
5966	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5967	  tmp_addflag=' -i_dynamic' ;;
5968	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5969	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5970	ifc* | ifort*)			# Intel Fortran compiler
5971	  tmp_addflag=' -nofor_main' ;;
5972	lf95*)				# Lahey Fortran 8.1
5973	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5974	  tmp_sharedflag='--shared' ;;
5975	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
5976	  tmp_sharedflag='-qmkshrobj'
5977	  tmp_addflag= ;;
5978	esac
5979	case `$CC -V 2>&1 | sed 5q` in
5980	*Sun\ C*)			# Sun C 5.9
5981	  _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'
5982	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5983	  tmp_sharedflag='-G' ;;
5984	*Sun\ F*)			# Sun Fortran 8.3
5985	  tmp_sharedflag='-G' ;;
5986	esac
5987	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5988
5989        if test "x$supports_anon_versioning" = xyes; then
5990          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5991	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5992	    echo "local: *; };" >> $output_objdir/$libname.ver~
5993	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5994        fi
5995
5996	case $cc_basename in
5997	xlf*)
5998	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5999	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6000	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6001	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6002	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
6003	  if test "x$supports_anon_versioning" = xyes; then
6004	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6005	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6006	      echo "local: *; };" >> $output_objdir/$libname.ver~
6007	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6008	  fi
6009	  ;;
6010	esac
6011      else
6012        _LT_TAGVAR(ld_shlibs, $1)=no
6013      fi
6014      ;;
6015
6016    netbsd*)
6017      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6018	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6019	wlarc=
6020      else
6021	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6022	_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'
6023      fi
6024      ;;
6025
6026    solaris*)
6027      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6028	_LT_TAGVAR(ld_shlibs, $1)=no
6029	cat <<_LT_EOF 1>&2
6030
6031*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6032*** create shared libraries on Solaris systems.  Therefore, libtool
6033*** is disabling shared libraries support.  We urge you to upgrade GNU
6034*** binutils to release 2.9.1 or newer.  Another option is to modify
6035*** your PATH or compiler configuration so that the native linker is
6036*** used, and then restart.
6037
6038_LT_EOF
6039      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6040	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6041	_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'
6042      else
6043	_LT_TAGVAR(ld_shlibs, $1)=no
6044      fi
6045      ;;
6046
6047    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6048      case `$LD -v 2>&1` in
6049        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6050	_LT_TAGVAR(ld_shlibs, $1)=no
6051	cat <<_LT_EOF 1>&2
6052
6053*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6054*** reliably create shared libraries on SCO systems.  Therefore, libtool
6055*** is disabling shared libraries support.  We urge you to upgrade GNU
6056*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6057*** your PATH or compiler configuration so that the native linker is
6058*** used, and then restart.
6059
6060_LT_EOF
6061	;;
6062	*)
6063	  # For security reasons, it is highly recommended that you always
6064	  # use absolute paths for naming shared libraries, and exclude the
6065	  # DT_RUNPATH tag from executables and libraries.  But doing so
6066	  # requires that you compile everything twice, which is a pain.
6067	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6068	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6069	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6070	    _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'
6071	  else
6072	    _LT_TAGVAR(ld_shlibs, $1)=no
6073	  fi
6074	;;
6075      esac
6076      ;;
6077
6078    sunos4*)
6079      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6080      wlarc=
6081      _LT_TAGVAR(hardcode_direct, $1)=yes
6082      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6083      ;;
6084
6085    *)
6086      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6087	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6088	_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'
6089      else
6090	_LT_TAGVAR(ld_shlibs, $1)=no
6091      fi
6092      ;;
6093    esac
6094
6095    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6096      runpath_var=
6097      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6098      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6099      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6100    fi
6101  else
6102    # PORTME fill in a description of your system's linker (not GNU ld)
6103    case $host_os in
6104    aix3*)
6105      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6106      _LT_TAGVAR(always_export_symbols, $1)=yes
6107      _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'
6108      # Note: this linker hardcodes the directories in LIBPATH if there
6109      # are no directories specified by -L.
6110      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6111      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6112	# Neither direct hardcoding nor static linking is supported with a
6113	# broken collect2.
6114	_LT_TAGVAR(hardcode_direct, $1)=unsupported
6115      fi
6116      ;;
6117
6118    aix[[4-9]]*)
6119      if test "$host_cpu" = ia64; then
6120	# On IA64, the linker does run time linking by default, so we don't
6121	# have to do anything special.
6122	aix_use_runtimelinking=no
6123	exp_sym_flag='-Bexport'
6124	no_entry_flag=""
6125      else
6126	# If we're using GNU nm, then we don't want the "-C" option.
6127	# -C means demangle to AIX nm, but means don't demangle with GNU nm
6128	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6129	  _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'
6130	else
6131	  _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'
6132	fi
6133	aix_use_runtimelinking=no
6134
6135	# Test if we are trying to use run time linking or normal
6136	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6137	# need to do runtime linking.
6138	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6139	  for ld_flag in $LDFLAGS; do
6140	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6141	    aix_use_runtimelinking=yes
6142	    break
6143	  fi
6144	  done
6145	  ;;
6146	esac
6147
6148	exp_sym_flag='-bexport'
6149	no_entry_flag='-bnoentry'
6150      fi
6151
6152      # When large executables or shared objects are built, AIX ld can
6153      # have problems creating the table of contents.  If linking a library
6154      # or program results in "error TOC overflow" add -mminimal-toc to
6155      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6156      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6157
6158      _LT_TAGVAR(archive_cmds, $1)=''
6159      _LT_TAGVAR(hardcode_direct, $1)=yes
6160      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6161      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6162      _LT_TAGVAR(link_all_deplibs, $1)=yes
6163      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6164
6165      if test "$GCC" = yes; then
6166	case $host_os in aix4.[[012]]|aix4.[[012]].*)
6167	# We only want to do this on AIX 4.2 and lower, the check
6168	# below for broken collect2 doesn't work under 4.3+
6169	  collect2name=`${CC} -print-prog-name=collect2`
6170	  if test -f "$collect2name" &&
6171	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6172	  then
6173	  # We have reworked collect2
6174	  :
6175	  else
6176	  # We have old collect2
6177	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
6178	  # It fails to find uninstalled libraries when the uninstalled
6179	  # path is not listed in the libpath.  Setting hardcode_minus_L
6180	  # to unsupported forces relinking
6181	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6182	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6183	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
6184	  fi
6185	  ;;
6186	esac
6187	shared_flag='-shared'
6188	if test "$aix_use_runtimelinking" = yes; then
6189	  shared_flag="$shared_flag "'${wl}-G'
6190	fi
6191      else
6192	# not using gcc
6193	if test "$host_cpu" = ia64; then
6194	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6195	# chokes on -Wl,-G. The following line is correct:
6196	  shared_flag='-G'
6197	else
6198	  if test "$aix_use_runtimelinking" = yes; then
6199	    shared_flag='${wl}-G'
6200	  else
6201	    shared_flag='${wl}-bM:SRE'
6202	  fi
6203	fi
6204      fi
6205
6206      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6207      # It seems that -bexpall does not export symbols beginning with
6208      # underscore (_), so it is better to generate a list of symbols to export.
6209      _LT_TAGVAR(always_export_symbols, $1)=yes
6210      if test "$aix_use_runtimelinking" = yes; then
6211	# Warning - without using the other runtime loading flags (-brtl),
6212	# -berok will link without error, but may produce a broken library.
6213	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6214        # Determine the default libpath from the value encoded in an
6215        # empty executable.
6216        _LT_SYS_MODULE_PATH_AIX
6217        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6218        _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"
6219      else
6220	if test "$host_cpu" = ia64; then
6221	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6222	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6223	  _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"
6224	else
6225	 # Determine the default libpath from the value encoded in an
6226	 # empty executable.
6227	 _LT_SYS_MODULE_PATH_AIX
6228	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6229	  # Warning - without using the other run time loading flags,
6230	  # -berok will link without error, but may produce a broken library.
6231	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6232	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6233	  # Exported symbols can be pulled into shared objects from archives
6234	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6235	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6236	  # This is similar to how AIX traditionally builds its shared libraries.
6237	  _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'
6238	fi
6239      fi
6240      ;;
6241
6242    amigaos*)
6243      case $host_cpu in
6244      powerpc)
6245            # see comment about AmigaOS4 .so support
6246            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6247            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6248        ;;
6249      m68k)
6250            _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)'
6251            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6252            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6253        ;;
6254      esac
6255      ;;
6256
6257    bsdi[[45]]*)
6258      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6259      ;;
6260
6261    cygwin* | mingw* | pw32* | cegcc*)
6262      # When not using gcc, we currently assume that we are using
6263      # Microsoft Visual C++.
6264      # hardcode_libdir_flag_spec is actually meaningless, as there is
6265      # no search path for DLLs.
6266      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6267      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6268      # Tell ltmain to make .lib files, not .a files.
6269      libext=lib
6270      # Tell ltmain to make .dll files, not .so files.
6271      shrext_cmds=".dll"
6272      # FIXME: Setting linknames here is a bad hack.
6273      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
6274      # The linker will automatically build a .lib file if we build a DLL.
6275      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6276      # FIXME: Should let the user specify the lib program.
6277      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6278      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6279      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6280      ;;
6281
6282    darwin* | rhapsody*)
6283      _LT_DARWIN_LINKER_FEATURES($1)
6284      ;;
6285
6286    dgux*)
6287      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6288      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6289      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6290      ;;
6291
6292    freebsd1*)
6293      _LT_TAGVAR(ld_shlibs, $1)=no
6294      ;;
6295
6296    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6297    # support.  Future versions do this automatically, but an explicit c++rt0.o
6298    # does not break anything, and helps significantly (at the cost of a little
6299    # extra space).
6300    freebsd2.2*)
6301      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6302      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6303      _LT_TAGVAR(hardcode_direct, $1)=yes
6304      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6305      ;;
6306
6307    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6308    freebsd2*)
6309      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6310      _LT_TAGVAR(hardcode_direct, $1)=yes
6311      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6312      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6313      ;;
6314
6315    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6316    freebsd* | dragonfly*)
6317      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6318      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6319      _LT_TAGVAR(hardcode_direct, $1)=yes
6320      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6321      ;;
6322
6323    hpux9*)
6324      if test "$GCC" = yes; then
6325	_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'
6326      else
6327	_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'
6328      fi
6329      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6330      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6331      _LT_TAGVAR(hardcode_direct, $1)=yes
6332
6333      # hardcode_minus_L: Not really in the search PATH,
6334      # but as the default location of the library.
6335      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6336      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6337      ;;
6338
6339    hpux10*)
6340      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6341	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6342      else
6343	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6344      fi
6345      if test "$with_gnu_ld" = no; then
6346	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6347	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6348	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6349	_LT_TAGVAR(hardcode_direct, $1)=yes
6350	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6351	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6352	# hardcode_minus_L: Not really in the search PATH,
6353	# but as the default location of the library.
6354	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6355      fi
6356      ;;
6357
6358    hpux11*)
6359      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6360	case $host_cpu in
6361	hppa*64*)
6362	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6363	  ;;
6364	ia64*)
6365	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6366	  ;;
6367	*)
6368	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6369	  ;;
6370	esac
6371      else
6372	case $host_cpu in
6373	hppa*64*)
6374	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6375	  ;;
6376	ia64*)
6377	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6378	  ;;
6379	*)
6380	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6381	  ;;
6382	esac
6383      fi
6384      if test "$with_gnu_ld" = no; then
6385	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6386	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6387
6388	case $host_cpu in
6389	hppa*64*|ia64*)
6390	  _LT_TAGVAR(hardcode_direct, $1)=no
6391	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6392	  ;;
6393	*)
6394	  _LT_TAGVAR(hardcode_direct, $1)=yes
6395	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6396	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6397
6398	  # hardcode_minus_L: Not really in the search PATH,
6399	  # but as the default location of the library.
6400	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6401	  ;;
6402	esac
6403      fi
6404      ;;
6405
6406    irix5* | irix6* | nonstopux*)
6407      if test "$GCC" = yes; then
6408	_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'
6409	# Try to use the -exported_symbol ld option, if it does not
6410	# work, assume that -exports_file does not work either and
6411	# implicitly export all symbols.
6412        save_LDFLAGS="$LDFLAGS"
6413        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6414        AC_LINK_IFELSE(int foo(void) {},
6415          _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'
6416        )
6417        LDFLAGS="$save_LDFLAGS"
6418      else
6419	_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'
6420	_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'
6421      fi
6422      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6423      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6424      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6425      _LT_TAGVAR(inherit_rpath, $1)=yes
6426      _LT_TAGVAR(link_all_deplibs, $1)=yes
6427      ;;
6428
6429    netbsd*)
6430      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6431	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6432      else
6433	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6434      fi
6435      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6436      _LT_TAGVAR(hardcode_direct, $1)=yes
6437      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6438      ;;
6439
6440    newsos6)
6441      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6442      _LT_TAGVAR(hardcode_direct, $1)=yes
6443      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6444      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6445      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6446      ;;
6447
6448    *nto* | *qnx*)
6449      ;;
6450
6451    openbsd*)
6452      if test -f /usr/libexec/ld.so; then
6453	_LT_TAGVAR(hardcode_direct, $1)=yes
6454	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6455	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6456	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6457	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6458	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6459	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6460	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6461	else
6462	  case $host_os in
6463	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6464	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6465	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6466	     ;;
6467	   *)
6468	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6469	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6470	     ;;
6471	  esac
6472	fi
6473      else
6474	_LT_TAGVAR(ld_shlibs, $1)=no
6475      fi
6476      ;;
6477
6478    os2*)
6479      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6480      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6481      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6482      _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'
6483      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6484      ;;
6485
6486    osf3*)
6487      if test "$GCC" = yes; then
6488	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6489	_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'
6490      else
6491	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6492	_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'
6493      fi
6494      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6495      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6496      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6497      ;;
6498
6499    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6500      if test "$GCC" = yes; then
6501	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6502	_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'
6503	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6504      else
6505	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6506	_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'
6507	_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~
6508	$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'
6509
6510	# Both c and cxx compiler support -rpath directly
6511	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6512      fi
6513      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6514      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6515      ;;
6516
6517    solaris*)
6518      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6519      if test "$GCC" = yes; then
6520	wlarc='${wl}'
6521	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6522	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6523	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6524      else
6525	case `$CC -V 2>&1` in
6526	*"Compilers 5.0"*)
6527	  wlarc=''
6528	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6529	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6530	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6531	  ;;
6532	*)
6533	  wlarc='${wl}'
6534	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6535	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6536	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6537	  ;;
6538	esac
6539      fi
6540      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6541      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6542      case $host_os in
6543      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6544      *)
6545	# The compiler driver will combine and reorder linker options,
6546	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6547	# but is careful enough not to reorder.
6548	# Supported since Solaris 2.6 (maybe 2.5.1?)
6549	if test "$GCC" = yes; then
6550	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6551	else
6552	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6553	fi
6554	;;
6555      esac
6556      _LT_TAGVAR(link_all_deplibs, $1)=yes
6557      ;;
6558
6559    sunos4*)
6560      if test "x$host_vendor" = xsequent; then
6561	# Use $CC to link under sequent, because it throws in some extra .o
6562	# files that make .init and .fini sections work.
6563	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6564      else
6565	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6566      fi
6567      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6568      _LT_TAGVAR(hardcode_direct, $1)=yes
6569      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6570      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6571      ;;
6572
6573    sysv4)
6574      case $host_vendor in
6575	sni)
6576	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6577	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6578	;;
6579	siemens)
6580	  ## LD is ld it makes a PLAMLIB
6581	  ## CC just makes a GrossModule.
6582	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6583	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6584	  _LT_TAGVAR(hardcode_direct, $1)=no
6585        ;;
6586	motorola)
6587	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6588	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6589	;;
6590      esac
6591      runpath_var='LD_RUN_PATH'
6592      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6593      ;;
6594
6595    sysv4.3*)
6596      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6597      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6598      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6599      ;;
6600
6601    sysv4*MP*)
6602      if test -d /usr/nec; then
6603	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6604	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6605	runpath_var=LD_RUN_PATH
6606	hardcode_runpath_var=yes
6607	_LT_TAGVAR(ld_shlibs, $1)=yes
6608      fi
6609      ;;
6610
6611    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6612      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6613      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6614      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6615      runpath_var='LD_RUN_PATH'
6616
6617      if test "$GCC" = yes; then
6618	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6619	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6620      else
6621	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6622	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6623      fi
6624      ;;
6625
6626    sysv5* | sco3.2v5* | sco5v6*)
6627      # Note: We can NOT use -z defs as we might desire, because we do not
6628      # link with -lc, and that would cause any symbols used from libc to
6629      # always be unresolved, which means just about no library would
6630      # ever link correctly.  If we're not using GNU ld we use -z text
6631      # though, which does catch some bad symbols but isn't as heavy-handed
6632      # as -z defs.
6633      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6634      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6635      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6636      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6637      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6638      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6639      _LT_TAGVAR(link_all_deplibs, $1)=yes
6640      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6641      runpath_var='LD_RUN_PATH'
6642
6643      if test "$GCC" = yes; then
6644	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6645	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6646      else
6647	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6648	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6649      fi
6650      ;;
6651
6652    uts4*)
6653      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6654      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6655      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6656      ;;
6657
6658    *)
6659      _LT_TAGVAR(ld_shlibs, $1)=no
6660      ;;
6661    esac
6662
6663    if test x$host_vendor = xsni; then
6664      case $host in
6665      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6666	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6667	;;
6668      esac
6669    fi
6670  fi
6671])
6672AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6673test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6674
6675_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6676
6677_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6678_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6679_LT_DECL([], [extract_expsyms_cmds], [2],
6680    [The commands to extract the exported symbol list from a shared archive])
6681
6682#
6683# Do we need to explicitly link libc?
6684#
6685case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6686x|xyes)
6687  # Assume -lc should be added
6688  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6689
6690  if test "$enable_shared" = yes && test "$GCC" = yes; then
6691    case $_LT_TAGVAR(archive_cmds, $1) in
6692    *'~'*)
6693      # FIXME: we may have to deal with multi-command sequences.
6694      ;;
6695    '$CC '*)
6696      # Test whether the compiler implicitly links with -lc since on some
6697      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6698      # to ld, don't add -lc before -lgcc.
6699      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6700      $RM conftest*
6701      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6702
6703      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6704        soname=conftest
6705        lib=conftest
6706        libobjs=conftest.$ac_objext
6707        deplibs=
6708        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6709	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6710        compiler_flags=-v
6711        linker_flags=-v
6712        verstring=
6713        output_objdir=.
6714        libname=conftest
6715        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6716        _LT_TAGVAR(allow_undefined_flag, $1)=
6717        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6718        then
6719	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6720        else
6721	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6722        fi
6723        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6724      else
6725        cat conftest.err 1>&5
6726      fi
6727      $RM conftest*
6728      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
6729      ;;
6730    esac
6731  fi
6732  ;;
6733esac
6734
6735_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6736    [Whether or not to add -lc for building shared libraries])
6737_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6738    [enable_shared_with_static_runtimes], [0],
6739    [Whether or not to disallow shared libs when runtime libs are static])
6740_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6741    [Compiler flag to allow reflexive dlopens])
6742_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6743    [Compiler flag to generate shared objects directly from archives])
6744_LT_TAGDECL([], [compiler_needs_object], [1],
6745    [Whether the compiler copes with passing no objects directly])
6746_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6747    [Create an old-style archive from a shared archive])
6748_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6749    [Create a temporary old-style archive to link instead of a shared archive])
6750_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6751_LT_TAGDECL([], [archive_expsym_cmds], [2])
6752_LT_TAGDECL([], [module_cmds], [2],
6753    [Commands used to build a loadable module if different from building
6754    a shared archive.])
6755_LT_TAGDECL([], [module_expsym_cmds], [2])
6756_LT_TAGDECL([], [with_gnu_ld], [1],
6757    [Whether we are building with GNU ld or not])
6758_LT_TAGDECL([], [allow_undefined_flag], [1],
6759    [Flag that allows shared libraries with undefined symbols to be built])
6760_LT_TAGDECL([], [no_undefined_flag], [1],
6761    [Flag that enforces no undefined symbols])
6762_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6763    [Flag to hardcode $libdir into a binary during linking.
6764    This must work even if $libdir does not exist])
6765_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6766    [[If ld is used when linking, flag to hardcode $libdir into a binary
6767    during linking.  This must work even if $libdir does not exist]])
6768_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6769    [Whether we need a single "-rpath" flag with a separated argument])
6770_LT_TAGDECL([], [hardcode_direct], [0],
6771    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6772    DIR into the resulting binary])
6773_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6774    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6775    DIR into the resulting binary and the resulting library dependency is
6776    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6777    library is relocated])
6778_LT_TAGDECL([], [hardcode_minus_L], [0],
6779    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6780    into the resulting binary])
6781_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6782    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6783    into the resulting binary])
6784_LT_TAGDECL([], [hardcode_automatic], [0],
6785    [Set to "yes" if building a shared library automatically hardcodes DIR
6786    into the library and all subsequent libraries and executables linked
6787    against it])
6788_LT_TAGDECL([], [inherit_rpath], [0],
6789    [Set to yes if linker adds runtime paths of dependent libraries
6790    to runtime path list])
6791_LT_TAGDECL([], [link_all_deplibs], [0],
6792    [Whether libtool must link a program against all its dependency libraries])
6793_LT_TAGDECL([], [fix_srcfile_path], [1],
6794    [Fix the shell variable $srcfile for the compiler])
6795_LT_TAGDECL([], [always_export_symbols], [0],
6796    [Set to "yes" if exported symbols are required])
6797_LT_TAGDECL([], [export_symbols_cmds], [2],
6798    [The commands to list exported symbols])
6799_LT_TAGDECL([], [exclude_expsyms], [1],
6800    [Symbols that should not be listed in the preloaded symbols])
6801_LT_TAGDECL([], [include_expsyms], [1],
6802    [Symbols that must always be exported])
6803_LT_TAGDECL([], [prelink_cmds], [2],
6804    [Commands necessary for linking programs (against libraries) with templates])
6805_LT_TAGDECL([], [file_list_spec], [1],
6806    [Specify filename containing input files])
6807dnl FIXME: Not yet implemented
6808dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6809dnl    [Compiler flag to generate thread safe objects])
6810])# _LT_LINKER_SHLIBS
6811
6812
6813# _LT_LANG_C_CONFIG([TAG])
6814# ------------------------
6815# Ensure that the configuration variables for a C compiler are suitably
6816# defined.  These variables are subsequently used by _LT_CONFIG to write
6817# the compiler configuration to `libtool'.
6818m4_defun([_LT_LANG_C_CONFIG],
6819[m4_require([_LT_DECL_EGREP])dnl
6820lt_save_CC="$CC"
6821AC_LANG_PUSH(C)
6822
6823# Source file extension for C test sources.
6824ac_ext=c
6825
6826# Object file extension for compiled C test sources.
6827objext=o
6828_LT_TAGVAR(objext, $1)=$objext
6829
6830# Code to be used in simple compile tests
6831lt_simple_compile_test_code="int some_variable = 0;"
6832
6833# Code to be used in simple link tests
6834lt_simple_link_test_code='int main(){return(0);}'
6835
6836_LT_TAG_COMPILER
6837# Save the default compiler, since it gets overwritten when the other
6838# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6839compiler_DEFAULT=$CC
6840
6841# save warnings/boilerplate of simple test code
6842_LT_COMPILER_BOILERPLATE
6843_LT_LINKER_BOILERPLATE
6844
6845if test -n "$compiler"; then
6846  _LT_COMPILER_NO_RTTI($1)
6847  _LT_COMPILER_PIC($1)
6848  _LT_COMPILER_C_O($1)
6849  _LT_COMPILER_FILE_LOCKS($1)
6850  _LT_LINKER_SHLIBS($1)
6851  _LT_SYS_DYNAMIC_LINKER($1)
6852  _LT_LINKER_HARDCODE_LIBPATH($1)
6853  LT_SYS_DLOPEN_SELF
6854  _LT_CMD_STRIPLIB
6855
6856  # Report which library types will actually be built
6857  AC_MSG_CHECKING([if libtool supports shared libraries])
6858  AC_MSG_RESULT([$can_build_shared])
6859
6860  AC_MSG_CHECKING([whether to build shared libraries])
6861  test "$can_build_shared" = "no" && enable_shared=no
6862
6863  # On AIX, shared libraries and static libraries use the same namespace, and
6864  # are all built from PIC.
6865  case $host_os in
6866  aix3*)
6867    test "$enable_shared" = yes && enable_static=no
6868    if test -n "$RANLIB"; then
6869      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6870      postinstall_cmds='$RANLIB $lib'
6871    fi
6872    ;;
6873
6874  aix[[4-9]]*)
6875    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6876      test "$enable_shared" = yes && enable_static=no
6877    fi
6878    ;;
6879  esac
6880  AC_MSG_RESULT([$enable_shared])
6881
6882  AC_MSG_CHECKING([whether to build static libraries])
6883  # Make sure either enable_shared or enable_static is yes.
6884  test "$enable_shared" = yes || enable_static=yes
6885  AC_MSG_RESULT([$enable_static])
6886
6887  _LT_CONFIG($1)
6888fi
6889AC_LANG_POP
6890CC="$lt_save_CC"
6891])# _LT_LANG_C_CONFIG
6892
6893
6894# _LT_PROG_CXX
6895# ------------
6896# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
6897# compiler, we have our own version here.
6898m4_defun([_LT_PROG_CXX],
6899[
6900pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
6901AC_PROG_CXX
6902if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6903    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6904    (test "X$CXX" != "Xg++"))) ; then
6905  AC_PROG_CXXCPP
6906else
6907  _lt_caught_CXX_error=yes
6908fi
6909popdef([AC_MSG_ERROR])
6910])# _LT_PROG_CXX
6911
6912dnl aclocal-1.4 backwards compatibility:
6913dnl AC_DEFUN([_LT_PROG_CXX], [])
6914
6915
6916# _LT_LANG_CXX_CONFIG([TAG])
6917# --------------------------
6918# Ensure that the configuration variables for a C++ compiler are suitably
6919# defined.  These variables are subsequently used by _LT_CONFIG to write
6920# the compiler configuration to `libtool'.
6921m4_defun([_LT_LANG_CXX_CONFIG],
6922[AC_REQUIRE([_LT_PROG_CXX])dnl
6923m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6924m4_require([_LT_DECL_EGREP])dnl
6925
6926AC_LANG_PUSH(C++)
6927_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6928_LT_TAGVAR(allow_undefined_flag, $1)=
6929_LT_TAGVAR(always_export_symbols, $1)=no
6930_LT_TAGVAR(archive_expsym_cmds, $1)=
6931_LT_TAGVAR(compiler_needs_object, $1)=no
6932_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6933_LT_TAGVAR(hardcode_direct, $1)=no
6934_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6935_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6936_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6937_LT_TAGVAR(hardcode_libdir_separator, $1)=
6938_LT_TAGVAR(hardcode_minus_L, $1)=no
6939_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6940_LT_TAGVAR(hardcode_automatic, $1)=no
6941_LT_TAGVAR(inherit_rpath, $1)=no
6942_LT_TAGVAR(module_cmds, $1)=
6943_LT_TAGVAR(module_expsym_cmds, $1)=
6944_LT_TAGVAR(link_all_deplibs, $1)=unknown
6945_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6946_LT_TAGVAR(no_undefined_flag, $1)=
6947_LT_TAGVAR(whole_archive_flag_spec, $1)=
6948_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6949
6950# Source file extension for C++ test sources.
6951ac_ext=cpp
6952
6953# Object file extension for compiled C++ test sources.
6954objext=o
6955_LT_TAGVAR(objext, $1)=$objext
6956
6957# No sense in running all these tests if we already determined that
6958# the CXX compiler isn't working.  Some variables (like enable_shared)
6959# are currently assumed to apply to all compilers on this platform,
6960# and will be corrupted by setting them based on a non-working compiler.
6961if test "$_lt_caught_CXX_error" != yes; then
6962  # Code to be used in simple compile tests
6963  lt_simple_compile_test_code="int some_variable = 0;"
6964
6965  # Code to be used in simple link tests
6966  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6967
6968  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6969  _LT_TAG_COMPILER
6970
6971  # save warnings/boilerplate of simple test code
6972  _LT_COMPILER_BOILERPLATE
6973  _LT_LINKER_BOILERPLATE
6974
6975  # Allow CC to be a program name with arguments.
6976  lt_save_CC=$CC
6977  lt_save_LD=$LD
6978  lt_save_GCC=$GCC
6979  GCC=$GXX
6980  lt_save_with_gnu_ld=$with_gnu_ld
6981  lt_save_path_LD=$lt_cv_path_LD
6982  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6983    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6984  else
6985    $as_unset lt_cv_prog_gnu_ld
6986  fi
6987  if test -n "${lt_cv_path_LDCXX+set}"; then
6988    lt_cv_path_LD=$lt_cv_path_LDCXX
6989  else
6990    $as_unset lt_cv_path_LD
6991  fi
6992  test -z "${LDCXX+set}" || LD=$LDCXX
6993  CC=${CXX-"c++"}
6994  compiler=$CC
6995  _LT_TAGVAR(compiler, $1)=$CC
6996  _LT_CC_BASENAME([$compiler])
6997
6998  if test -n "$compiler"; then
6999    # We don't want -fno-exception when compiling C++ code, so set the
7000    # no_builtin_flag separately
7001    if test "$GXX" = yes; then
7002      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7003    else
7004      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7005    fi
7006
7007    if test "$GXX" = yes; then
7008      # Set up default GNU C++ configuration
7009
7010      LT_PATH_LD
7011
7012      # Check if GNU C++ uses GNU ld as the underlying linker, since the
7013      # archiving commands below assume that GNU ld is being used.
7014      if test "$with_gnu_ld" = yes; then
7015        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7016        _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'
7017
7018        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7019        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7020
7021        # If archive_cmds runs LD, not CC, wlarc should be empty
7022        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7023        #     investigate it a little bit more. (MM)
7024        wlarc='${wl}'
7025
7026        # ancient GNU ld didn't support --whole-archive et. al.
7027        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7028	  $GREP 'no-whole-archive' > /dev/null; then
7029          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7030        else
7031          _LT_TAGVAR(whole_archive_flag_spec, $1)=
7032        fi
7033      else
7034        with_gnu_ld=no
7035        wlarc=
7036
7037        # A generic and very simple default shared library creation
7038        # command for GNU C++ for the case where it uses the native
7039        # linker, instead of GNU ld.  If possible, this setting should
7040        # overridden to take advantage of the native linker features on
7041        # the platform it is being used on.
7042        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7043      fi
7044
7045      # Commands to make compiler produce verbose output that lists
7046      # what "hidden" libraries, object files and flags are used when
7047      # linking a shared library.
7048      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7049
7050    else
7051      GXX=no
7052      with_gnu_ld=no
7053      wlarc=
7054    fi
7055
7056    # PORTME: fill in a description of your system's C++ link characteristics
7057    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7058    _LT_TAGVAR(ld_shlibs, $1)=yes
7059    case $host_os in
7060      aix3*)
7061        # FIXME: insert proper C++ library support
7062        _LT_TAGVAR(ld_shlibs, $1)=no
7063        ;;
7064      aix[[4-9]]*)
7065        if test "$host_cpu" = ia64; then
7066          # On IA64, the linker does run time linking by default, so we don't
7067          # have to do anything special.
7068          aix_use_runtimelinking=no
7069          exp_sym_flag='-Bexport'
7070          no_entry_flag=""
7071        else
7072          aix_use_runtimelinking=no
7073
7074          # Test if we are trying to use run time linking or normal
7075          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7076          # need to do runtime linking.
7077          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7078	    for ld_flag in $LDFLAGS; do
7079	      case $ld_flag in
7080	      *-brtl*)
7081	        aix_use_runtimelinking=yes
7082	        break
7083	        ;;
7084	      esac
7085	    done
7086	    ;;
7087          esac
7088
7089          exp_sym_flag='-bexport'
7090          no_entry_flag='-bnoentry'
7091        fi
7092
7093        # When large executables or shared objects are built, AIX ld can
7094        # have problems creating the table of contents.  If linking a library
7095        # or program results in "error TOC overflow" add -mminimal-toc to
7096        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7097        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7098
7099        _LT_TAGVAR(archive_cmds, $1)=''
7100        _LT_TAGVAR(hardcode_direct, $1)=yes
7101        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7102        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7103        _LT_TAGVAR(link_all_deplibs, $1)=yes
7104        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7105
7106        if test "$GXX" = yes; then
7107          case $host_os in aix4.[[012]]|aix4.[[012]].*)
7108          # We only want to do this on AIX 4.2 and lower, the check
7109          # below for broken collect2 doesn't work under 4.3+
7110	  collect2name=`${CC} -print-prog-name=collect2`
7111	  if test -f "$collect2name" &&
7112	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7113	  then
7114	    # We have reworked collect2
7115	    :
7116	  else
7117	    # We have old collect2
7118	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
7119	    # It fails to find uninstalled libraries when the uninstalled
7120	    # path is not listed in the libpath.  Setting hardcode_minus_L
7121	    # to unsupported forces relinking
7122	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
7123	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7124	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
7125	  fi
7126          esac
7127          shared_flag='-shared'
7128	  if test "$aix_use_runtimelinking" = yes; then
7129	    shared_flag="$shared_flag "'${wl}-G'
7130	  fi
7131        else
7132          # not using gcc
7133          if test "$host_cpu" = ia64; then
7134	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7135	  # chokes on -Wl,-G. The following line is correct:
7136	  shared_flag='-G'
7137          else
7138	    if test "$aix_use_runtimelinking" = yes; then
7139	      shared_flag='${wl}-G'
7140	    else
7141	      shared_flag='${wl}-bM:SRE'
7142	    fi
7143          fi
7144        fi
7145
7146        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7147        # It seems that -bexpall does not export symbols beginning with
7148        # underscore (_), so it is better to generate a list of symbols to
7149	# export.
7150        _LT_TAGVAR(always_export_symbols, $1)=yes
7151        if test "$aix_use_runtimelinking" = yes; then
7152          # Warning - without using the other runtime loading flags (-brtl),
7153          # -berok will link without error, but may produce a broken library.
7154          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7155          # Determine the default libpath from the value encoded in an empty
7156          # executable.
7157          _LT_SYS_MODULE_PATH_AIX
7158          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7159
7160          _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"
7161        else
7162          if test "$host_cpu" = ia64; then
7163	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7164	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7165	    _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"
7166          else
7167	    # Determine the default libpath from the value encoded in an
7168	    # empty executable.
7169	    _LT_SYS_MODULE_PATH_AIX
7170	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7171	    # Warning - without using the other run time loading flags,
7172	    # -berok will link without error, but may produce a broken library.
7173	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7174	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7175	    # Exported symbols can be pulled into shared objects from archives
7176	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7177	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7178	    # This is similar to how AIX traditionally builds its shared
7179	    # libraries.
7180	    _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'
7181          fi
7182        fi
7183        ;;
7184
7185      beos*)
7186	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7187	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7188	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7189	  # support --undefined.  This deserves some investigation.  FIXME
7190	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7191	else
7192	  _LT_TAGVAR(ld_shlibs, $1)=no
7193	fi
7194	;;
7195
7196      chorus*)
7197        case $cc_basename in
7198          *)
7199	  # FIXME: insert proper C++ library support
7200	  _LT_TAGVAR(ld_shlibs, $1)=no
7201	  ;;
7202        esac
7203        ;;
7204
7205      cygwin* | mingw* | pw32* | cegcc*)
7206        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7207        # as there is no search path for DLLs.
7208        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7209        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7210        _LT_TAGVAR(always_export_symbols, $1)=no
7211        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7212
7213        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7214          _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'
7215          # If the export-symbols file already is a .def file (1st line
7216          # is EXPORTS), use it as is; otherwise, prepend...
7217          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7218	    cp $export_symbols $output_objdir/$soname.def;
7219          else
7220	    echo EXPORTS > $output_objdir/$soname.def;
7221	    cat $export_symbols >> $output_objdir/$soname.def;
7222          fi~
7223          $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'
7224        else
7225          _LT_TAGVAR(ld_shlibs, $1)=no
7226        fi
7227        ;;
7228      darwin* | rhapsody*)
7229        _LT_DARWIN_LINKER_FEATURES($1)
7230	;;
7231
7232      dgux*)
7233        case $cc_basename in
7234          ec++*)
7235	    # FIXME: insert proper C++ library support
7236	    _LT_TAGVAR(ld_shlibs, $1)=no
7237	    ;;
7238          ghcx*)
7239	    # Green Hills C++ Compiler
7240	    # FIXME: insert proper C++ library support
7241	    _LT_TAGVAR(ld_shlibs, $1)=no
7242	    ;;
7243          *)
7244	    # FIXME: insert proper C++ library support
7245	    _LT_TAGVAR(ld_shlibs, $1)=no
7246	    ;;
7247        esac
7248        ;;
7249
7250      freebsd[[12]]*)
7251        # C++ shared libraries reported to be fairly broken before
7252	# switch to ELF
7253        _LT_TAGVAR(ld_shlibs, $1)=no
7254        ;;
7255
7256      freebsd-elf*)
7257        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7258        ;;
7259
7260      freebsd* | dragonfly*)
7261        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7262        # conventions
7263        _LT_TAGVAR(ld_shlibs, $1)=yes
7264        ;;
7265
7266      gnu*)
7267        ;;
7268
7269      hpux9*)
7270        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7271        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7272        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7273        _LT_TAGVAR(hardcode_direct, $1)=yes
7274        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7275				             # but as the default
7276				             # location of the library.
7277
7278        case $cc_basename in
7279          CC*)
7280            # FIXME: insert proper C++ library support
7281            _LT_TAGVAR(ld_shlibs, $1)=no
7282            ;;
7283          aCC*)
7284            _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'
7285            # Commands to make compiler produce verbose output that lists
7286            # what "hidden" libraries, object files and flags are used when
7287            # linking a shared library.
7288            #
7289            # There doesn't appear to be a way to prevent this compiler from
7290            # explicitly linking system object files so we need to strip them
7291            # from the output so that they don't get included in the library
7292            # dependencies.
7293            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'
7294            ;;
7295          *)
7296            if test "$GXX" = yes; then
7297              _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'
7298            else
7299              # FIXME: insert proper C++ library support
7300              _LT_TAGVAR(ld_shlibs, $1)=no
7301            fi
7302            ;;
7303        esac
7304        ;;
7305
7306      hpux10*|hpux11*)
7307        if test $with_gnu_ld = no; then
7308	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7309	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7310
7311          case $host_cpu in
7312            hppa*64*|ia64*)
7313              ;;
7314            *)
7315	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7316              ;;
7317          esac
7318        fi
7319        case $host_cpu in
7320          hppa*64*|ia64*)
7321            _LT_TAGVAR(hardcode_direct, $1)=no
7322            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7323            ;;
7324          *)
7325            _LT_TAGVAR(hardcode_direct, $1)=yes
7326            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7327            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7328					         # but as the default
7329					         # location of the library.
7330            ;;
7331        esac
7332
7333        case $cc_basename in
7334          CC*)
7335	    # FIXME: insert proper C++ library support
7336	    _LT_TAGVAR(ld_shlibs, $1)=no
7337	    ;;
7338          aCC*)
7339	    case $host_cpu in
7340	      hppa*64*)
7341	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7342	        ;;
7343	      ia64*)
7344	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7345	        ;;
7346	      *)
7347	        _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'
7348	        ;;
7349	    esac
7350	    # Commands to make compiler produce verbose output that lists
7351	    # what "hidden" libraries, object files and flags are used when
7352	    # linking a shared library.
7353	    #
7354	    # There doesn't appear to be a way to prevent this compiler from
7355	    # explicitly linking system object files so we need to strip them
7356	    # from the output so that they don't get included in the library
7357	    # dependencies.
7358	    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'
7359	    ;;
7360          *)
7361	    if test "$GXX" = yes; then
7362	      if test $with_gnu_ld = no; then
7363	        case $host_cpu in
7364	          hppa*64*)
7365	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7366	            ;;
7367	          ia64*)
7368	            _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'
7369	            ;;
7370	          *)
7371	            _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'
7372	            ;;
7373	        esac
7374	      fi
7375	    else
7376	      # FIXME: insert proper C++ library support
7377	      _LT_TAGVAR(ld_shlibs, $1)=no
7378	    fi
7379	    ;;
7380        esac
7381        ;;
7382
7383      interix[[3-9]]*)
7384	_LT_TAGVAR(hardcode_direct, $1)=no
7385	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7386	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7387	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7388	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7389	# Instead, shared libraries are loaded at an image base (0x10000000 by
7390	# default) and relocated if they conflict, which is a slow very memory
7391	# consuming and fragmenting process.  To avoid this, we pick a random,
7392	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7393	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7394	_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'
7395	_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'
7396	;;
7397      irix5* | irix6*)
7398        case $cc_basename in
7399          CC*)
7400	    # SGI C++
7401	    _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'
7402
7403	    # Archives containing C++ object files must be created using
7404	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7405	    # necessary to make sure instantiated templates are included
7406	    # in the archive.
7407	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7408	    ;;
7409          *)
7410	    if test "$GXX" = yes; then
7411	      if test "$with_gnu_ld" = no; then
7412	        _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'
7413	      else
7414	        _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'
7415	      fi
7416	    fi
7417	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7418	    ;;
7419        esac
7420        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7421        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7422        _LT_TAGVAR(inherit_rpath, $1)=yes
7423        ;;
7424
7425      linux* | k*bsd*-gnu)
7426        case $cc_basename in
7427          KCC*)
7428	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7429
7430	    # KCC will only create a shared library if the output file
7431	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7432	    # to its proper name (with version) after linking.
7433	    _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'
7434	    _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'
7435	    # Commands to make compiler produce verbose output that lists
7436	    # what "hidden" libraries, object files and flags are used when
7437	    # linking a shared library.
7438	    #
7439	    # There doesn't appear to be a way to prevent this compiler from
7440	    # explicitly linking system object files so we need to strip them
7441	    # from the output so that they don't get included in the library
7442	    # dependencies.
7443	    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'
7444
7445	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7446	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7447
7448	    # Archives containing C++ object files must be created using
7449	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7450	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7451	    ;;
7452	  icpc* | ecpc* )
7453	    # Intel C++
7454	    with_gnu_ld=yes
7455	    # version 8.0 and above of icpc choke on multiply defined symbols
7456	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7457	    # earlier do not add the objects themselves.
7458	    case `$CC -V 2>&1` in
7459	      *"Version 7."*)
7460	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7461		_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'
7462		;;
7463	      *)  # Version 8.0 or newer
7464	        tmp_idyn=
7465	        case $host_cpu in
7466		  ia64*) tmp_idyn=' -i_dynamic';;
7467		esac
7468	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7469		_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'
7470		;;
7471	    esac
7472	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7473	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7474	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7475	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7476	    ;;
7477          pgCC* | pgcpp*)
7478            # Portland Group C++ compiler
7479	    case `$CC -V` in
7480	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
7481	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7482		rm -rf $tpldir~
7483		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7484		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
7485	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7486		rm -rf $tpldir~
7487		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7488		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
7489		$RANLIB $oldlib'
7490	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7491		rm -rf $tpldir~
7492		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7493		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7494	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7495		rm -rf $tpldir~
7496		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7497		$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'
7498	      ;;
7499	    *) # Version 6 will use weak symbols
7500	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7501	      _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'
7502	      ;;
7503	    esac
7504
7505	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7506	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7507	    _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'
7508            ;;
7509	  cxx*)
7510	    # Compaq C++
7511	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7512	    _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'
7513
7514	    runpath_var=LD_RUN_PATH
7515	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7516	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7517
7518	    # Commands to make compiler produce verbose output that lists
7519	    # what "hidden" libraries, object files and flags are used when
7520	    # linking a shared library.
7521	    #
7522	    # There doesn't appear to be a way to prevent this compiler from
7523	    # explicitly linking system object files so we need to strip them
7524	    # from the output so that they don't get included in the library
7525	    # dependencies.
7526	    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'
7527	    ;;
7528	  xl*)
7529	    # IBM XL 8.0 on PPC, with GNU ld
7530	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7531	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7532	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7533	    if test "x$supports_anon_versioning" = xyes; then
7534	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7535		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7536		echo "local: *; };" >> $output_objdir/$libname.ver~
7537		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7538	    fi
7539	    ;;
7540	  *)
7541	    case `$CC -V 2>&1 | sed 5q` in
7542	    *Sun\ C*)
7543	      # Sun C++ 5.9
7544	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7545	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7546	      _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'
7547	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7548	      _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'
7549	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7550
7551	      # Not sure whether something based on
7552	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7553	      # would be better.
7554	      output_verbose_link_cmd='echo'
7555
7556	      # Archives containing C++ object files must be created using
7557	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7558	      # necessary to make sure instantiated templates are included
7559	      # in the archive.
7560	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7561	      ;;
7562	    esac
7563	    ;;
7564	esac
7565	;;
7566
7567      lynxos*)
7568        # FIXME: insert proper C++ library support
7569	_LT_TAGVAR(ld_shlibs, $1)=no
7570	;;
7571
7572      m88k*)
7573        # FIXME: insert proper C++ library support
7574        _LT_TAGVAR(ld_shlibs, $1)=no
7575	;;
7576
7577      mvs*)
7578        case $cc_basename in
7579          cxx*)
7580	    # FIXME: insert proper C++ library support
7581	    _LT_TAGVAR(ld_shlibs, $1)=no
7582	    ;;
7583	  *)
7584	    # FIXME: insert proper C++ library support
7585	    _LT_TAGVAR(ld_shlibs, $1)=no
7586	    ;;
7587	esac
7588	;;
7589
7590      netbsd*)
7591        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7592	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7593	  wlarc=
7594	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7595	  _LT_TAGVAR(hardcode_direct, $1)=yes
7596	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7597	fi
7598	# Workaround some broken pre-1.5 toolchains
7599	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7600	;;
7601
7602      *nto* | *qnx*)
7603        _LT_TAGVAR(ld_shlibs, $1)=yes
7604	;;
7605
7606      openbsd2*)
7607        # C++ shared libraries are fairly broken
7608	_LT_TAGVAR(ld_shlibs, $1)=no
7609	;;
7610
7611      openbsd*)
7612	if test -f /usr/libexec/ld.so; then
7613	  _LT_TAGVAR(hardcode_direct, $1)=yes
7614	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7615	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7616	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7617	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7618	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7619	    _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'
7620	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7621	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7622	  fi
7623	  output_verbose_link_cmd=echo
7624	else
7625	  _LT_TAGVAR(ld_shlibs, $1)=no
7626	fi
7627	;;
7628
7629      osf3* | osf4* | osf5*)
7630        case $cc_basename in
7631          KCC*)
7632	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7633
7634	    # KCC will only create a shared library if the output file
7635	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7636	    # to its proper name (with version) after linking.
7637	    _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'
7638
7639	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7640	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7641
7642	    # Archives containing C++ object files must be created using
7643	    # the KAI C++ compiler.
7644	    case $host in
7645	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7646	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7647	    esac
7648	    ;;
7649          RCC*)
7650	    # Rational C++ 2.4.1
7651	    # FIXME: insert proper C++ library support
7652	    _LT_TAGVAR(ld_shlibs, $1)=no
7653	    ;;
7654          cxx*)
7655	    case $host in
7656	      osf3*)
7657	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7658	        _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'
7659	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7660		;;
7661	      *)
7662	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7663	        _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'
7664	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7665	          echo "-hidden">> $lib.exp~
7666	          $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~
7667	          $RM $lib.exp'
7668	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7669		;;
7670	    esac
7671
7672	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7673
7674	    # Commands to make compiler produce verbose output that lists
7675	    # what "hidden" libraries, object files and flags are used when
7676	    # linking a shared library.
7677	    #
7678	    # There doesn't appear to be a way to prevent this compiler from
7679	    # explicitly linking system object files so we need to strip them
7680	    # from the output so that they don't get included in the library
7681	    # dependencies.
7682	    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'
7683	    ;;
7684	  *)
7685	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7686	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7687	      case $host in
7688	        osf3*)
7689	          _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'
7690		  ;;
7691	        *)
7692	          _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'
7693		  ;;
7694	      esac
7695
7696	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7697	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7698
7699	      # Commands to make compiler produce verbose output that lists
7700	      # what "hidden" libraries, object files and flags are used when
7701	      # linking a shared library.
7702	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7703
7704	    else
7705	      # FIXME: insert proper C++ library support
7706	      _LT_TAGVAR(ld_shlibs, $1)=no
7707	    fi
7708	    ;;
7709        esac
7710        ;;
7711
7712      psos*)
7713        # FIXME: insert proper C++ library support
7714        _LT_TAGVAR(ld_shlibs, $1)=no
7715        ;;
7716
7717      sunos4*)
7718        case $cc_basename in
7719          CC*)
7720	    # Sun C++ 4.x
7721	    # FIXME: insert proper C++ library support
7722	    _LT_TAGVAR(ld_shlibs, $1)=no
7723	    ;;
7724          lcc*)
7725	    # Lucid
7726	    # FIXME: insert proper C++ library support
7727	    _LT_TAGVAR(ld_shlibs, $1)=no
7728	    ;;
7729          *)
7730	    # FIXME: insert proper C++ library support
7731	    _LT_TAGVAR(ld_shlibs, $1)=no
7732	    ;;
7733        esac
7734        ;;
7735
7736      solaris*)
7737        case $cc_basename in
7738          CC*)
7739	    # Sun C++ 4.2, 5.x and Centerline C++
7740            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7741	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7742	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7743	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7744	      $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'
7745
7746	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7747	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7748	    case $host_os in
7749	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7750	      *)
7751		# The compiler driver will combine and reorder linker options,
7752		# but understands `-z linker_flag'.
7753	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7754		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7755	        ;;
7756	    esac
7757	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7758
7759	    output_verbose_link_cmd='echo'
7760
7761	    # Archives containing C++ object files must be created using
7762	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7763	    # necessary to make sure instantiated templates are included
7764	    # in the archive.
7765	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7766	    ;;
7767          gcx*)
7768	    # Green Hills C++ Compiler
7769	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7770
7771	    # The C++ compiler must be used to create the archive.
7772	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7773	    ;;
7774          *)
7775	    # GNU C++ compiler with Solaris linker
7776	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7777	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7778	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7779	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7780	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7781		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7782
7783	        # Commands to make compiler produce verbose output that lists
7784	        # what "hidden" libraries, object files and flags are used when
7785	        # linking a shared library.
7786	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7787	      else
7788	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
7789	        # platform.
7790	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7791	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7792		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7793
7794	        # Commands to make compiler produce verbose output that lists
7795	        # what "hidden" libraries, object files and flags are used when
7796	        # linking a shared library.
7797	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7798	      fi
7799
7800	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7801	      case $host_os in
7802		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7803		*)
7804		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7805		  ;;
7806	      esac
7807	    fi
7808	    ;;
7809        esac
7810        ;;
7811
7812    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7813      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7814      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7815      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7816      runpath_var='LD_RUN_PATH'
7817
7818      case $cc_basename in
7819        CC*)
7820	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7821	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7822	  ;;
7823	*)
7824	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7825	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7826	  ;;
7827      esac
7828      ;;
7829
7830      sysv5* | sco3.2v5* | sco5v6*)
7831	# Note: We can NOT use -z defs as we might desire, because we do not
7832	# link with -lc, and that would cause any symbols used from libc to
7833	# always be unresolved, which means just about no library would
7834	# ever link correctly.  If we're not using GNU ld we use -z text
7835	# though, which does catch some bad symbols but isn't as heavy-handed
7836	# as -z defs.
7837	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7838	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7839	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7840	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7841	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7842	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7843	_LT_TAGVAR(link_all_deplibs, $1)=yes
7844	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7845	runpath_var='LD_RUN_PATH'
7846
7847	case $cc_basename in
7848          CC*)
7849	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7850	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7851	    ;;
7852	  *)
7853	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7854	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7855	    ;;
7856	esac
7857      ;;
7858
7859      tandem*)
7860        case $cc_basename in
7861          NCC*)
7862	    # NonStop-UX NCC 3.20
7863	    # FIXME: insert proper C++ library support
7864	    _LT_TAGVAR(ld_shlibs, $1)=no
7865	    ;;
7866          *)
7867	    # FIXME: insert proper C++ library support
7868	    _LT_TAGVAR(ld_shlibs, $1)=no
7869	    ;;
7870        esac
7871        ;;
7872
7873      vxworks*)
7874        # FIXME: insert proper C++ library support
7875        _LT_TAGVAR(ld_shlibs, $1)=no
7876        ;;
7877
7878      *)
7879        # FIXME: insert proper C++ library support
7880        _LT_TAGVAR(ld_shlibs, $1)=no
7881        ;;
7882    esac
7883
7884    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7885    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7886
7887    _LT_TAGVAR(GCC, $1)="$GXX"
7888    _LT_TAGVAR(LD, $1)="$LD"
7889
7890    ## CAVEAT EMPTOR:
7891    ## There is no encapsulation within the following macros, do not change
7892    ## the running order or otherwise move them around unless you know exactly
7893    ## what you are doing...
7894    _LT_SYS_HIDDEN_LIBDEPS($1)
7895    _LT_COMPILER_PIC($1)
7896    _LT_COMPILER_C_O($1)
7897    _LT_COMPILER_FILE_LOCKS($1)
7898    _LT_LINKER_SHLIBS($1)
7899    _LT_SYS_DYNAMIC_LINKER($1)
7900    _LT_LINKER_HARDCODE_LIBPATH($1)
7901
7902    _LT_CONFIG($1)
7903  fi # test -n "$compiler"
7904
7905  CC=$lt_save_CC
7906  LDCXX=$LD
7907  LD=$lt_save_LD
7908  GCC=$lt_save_GCC
7909  with_gnu_ld=$lt_save_with_gnu_ld
7910  lt_cv_path_LDCXX=$lt_cv_path_LD
7911  lt_cv_path_LD=$lt_save_path_LD
7912  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7913  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7914fi # test "$_lt_caught_CXX_error" != yes
7915
7916AC_LANG_POP
7917])# _LT_LANG_CXX_CONFIG
7918
7919
7920# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7921# ---------------------------------
7922# Figure out "hidden" library dependencies from verbose
7923# compiler output when linking a shared library.
7924# Parse the compiler output and extract the necessary
7925# objects, libraries and library flags.
7926m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7927[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7928# Dependencies to place before and after the object being linked:
7929_LT_TAGVAR(predep_objects, $1)=
7930_LT_TAGVAR(postdep_objects, $1)=
7931_LT_TAGVAR(predeps, $1)=
7932_LT_TAGVAR(postdeps, $1)=
7933_LT_TAGVAR(compiler_lib_search_path, $1)=
7934
7935dnl we can't use the lt_simple_compile_test_code here,
7936dnl because it contains code intended for an executable,
7937dnl not a library.  It's possible we should let each
7938dnl tag define a new lt_????_link_test_code variable,
7939dnl but it's only used here...
7940m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7941int a;
7942void foo (void) { a = 0; }
7943_LT_EOF
7944], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7945class Foo
7946{
7947public:
7948  Foo (void) { a = 0; }
7949private:
7950  int a;
7951};
7952_LT_EOF
7953], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7954      subroutine foo
7955      implicit none
7956      integer*4 a
7957      a=0
7958      return
7959      end
7960_LT_EOF
7961], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7962      subroutine foo
7963      implicit none
7964      integer a
7965      a=0
7966      return
7967      end
7968_LT_EOF
7969], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7970public class foo {
7971  private int a;
7972  public void bar (void) {
7973    a = 0;
7974  }
7975};
7976_LT_EOF
7977])
7978dnl Parse the compiler output and extract the necessary
7979dnl objects, libraries and library flags.
7980if AC_TRY_EVAL(ac_compile); then
7981  # Parse the compiler output and extract the necessary
7982  # objects, libraries and library flags.
7983
7984  # Sentinel used to keep track of whether or not we are before
7985  # the conftest object file.
7986  pre_test_object_deps_done=no
7987
7988  for p in `eval "$output_verbose_link_cmd"`; do
7989    case $p in
7990
7991    -L* | -R* | -l*)
7992       # Some compilers place space between "-{L,R}" and the path.
7993       # Remove the space.
7994       if test $p = "-L" ||
7995          test $p = "-R"; then
7996	 prev=$p
7997	 continue
7998       else
7999	 prev=
8000       fi
8001
8002       if test "$pre_test_object_deps_done" = no; then
8003	 case $p in
8004	 -L* | -R*)
8005	   # Internal compiler library paths should come after those
8006	   # provided the user.  The postdeps already come after the
8007	   # user supplied libs so there is no need to process them.
8008	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8009	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8010	   else
8011	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8012	   fi
8013	   ;;
8014	 # The "-l" case would never come before the object being
8015	 # linked, so don't bother handling this case.
8016	 esac
8017       else
8018	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8019	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8020	 else
8021	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8022	 fi
8023       fi
8024       ;;
8025
8026    *.$objext)
8027       # This assumes that the test object file only shows up
8028       # once in the compiler output.
8029       if test "$p" = "conftest.$objext"; then
8030	 pre_test_object_deps_done=yes
8031	 continue
8032       fi
8033
8034       if test "$pre_test_object_deps_done" = no; then
8035	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8036	   _LT_TAGVAR(predep_objects, $1)="$p"
8037	 else
8038	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8039	 fi
8040       else
8041	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8042	   _LT_TAGVAR(postdep_objects, $1)="$p"
8043	 else
8044	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8045	 fi
8046       fi
8047       ;;
8048
8049    *) ;; # Ignore the rest.
8050
8051    esac
8052  done
8053
8054  # Clean up.
8055  rm -f a.out a.exe
8056else
8057  echo "libtool.m4: error: problem compiling $1 test program"
8058fi
8059
8060$RM -f confest.$objext
8061
8062# PORTME: override above test on systems where it is broken
8063m4_if([$1], [CXX],
8064[case $host_os in
8065interix[[3-9]]*)
8066  # Interix 3.5 installs completely hosed .la files for C++, so rather than
8067  # hack all around it, let's just trust "g++" to DTRT.
8068  _LT_TAGVAR(predep_objects,$1)=
8069  _LT_TAGVAR(postdep_objects,$1)=
8070  _LT_TAGVAR(postdeps,$1)=
8071  ;;
8072
8073linux*)
8074  case `$CC -V 2>&1 | sed 5q` in
8075  *Sun\ C*)
8076    # Sun C++ 5.9
8077
8078    # The more standards-conforming stlport4 library is
8079    # incompatible with the Cstd library. Avoid specifying
8080    # it if it's in CXXFLAGS. Ignore libCrun as
8081    # -library=stlport4 depends on it.
8082    case " $CXX $CXXFLAGS " in
8083    *" -library=stlport4 "*)
8084      solaris_use_stlport4=yes
8085      ;;
8086    esac
8087
8088    if test "$solaris_use_stlport4" != yes; then
8089      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8090    fi
8091    ;;
8092  esac
8093  ;;
8094
8095solaris*)
8096  case $cc_basename in
8097  CC*)
8098    # The more standards-conforming stlport4 library is
8099    # incompatible with the Cstd library. Avoid specifying
8100    # it if it's in CXXFLAGS. Ignore libCrun as
8101    # -library=stlport4 depends on it.
8102    case " $CXX $CXXFLAGS " in
8103    *" -library=stlport4 "*)
8104      solaris_use_stlport4=yes
8105      ;;
8106    esac
8107
8108    # Adding this requires a known-good setup of shared libraries for
8109    # Sun compiler versions before 5.6, else PIC objects from an old
8110    # archive will be linked into the output, leading to subtle bugs.
8111    if test "$solaris_use_stlport4" != yes; then
8112      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8113    fi
8114    ;;
8115  esac
8116  ;;
8117esac
8118])
8119
8120case " $_LT_TAGVAR(postdeps, $1) " in
8121*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8122esac
8123 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8124if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8125 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8126fi
8127_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8128    [The directories searched by this compiler when creating a shared library])
8129_LT_TAGDECL([], [predep_objects], [1],
8130    [Dependencies to place before and after the objects being linked to
8131    create a shared library])
8132_LT_TAGDECL([], [postdep_objects], [1])
8133_LT_TAGDECL([], [predeps], [1])
8134_LT_TAGDECL([], [postdeps], [1])
8135_LT_TAGDECL([], [compiler_lib_search_path], [1],
8136    [The library search path used internally by the compiler when linking
8137    a shared library])
8138])# _LT_SYS_HIDDEN_LIBDEPS
8139
8140
8141# _LT_PROG_F77
8142# ------------
8143# Since AC_PROG_F77 is broken, in that it returns the empty string
8144# if there is no fortran compiler, we have our own version here.
8145m4_defun([_LT_PROG_F77],
8146[
8147pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
8148AC_PROG_F77
8149if test -z "$F77" || test "X$F77" = "Xno"; then
8150  _lt_disable_F77=yes
8151fi
8152popdef([AC_MSG_ERROR])
8153])# _LT_PROG_F77
8154
8155dnl aclocal-1.4 backwards compatibility:
8156dnl AC_DEFUN([_LT_PROG_F77], [])
8157
8158
8159# _LT_LANG_F77_CONFIG([TAG])
8160# --------------------------
8161# Ensure that the configuration variables for a Fortran 77 compiler are
8162# suitably defined.  These variables are subsequently used by _LT_CONFIG
8163# to write the compiler configuration to `libtool'.
8164m4_defun([_LT_LANG_F77_CONFIG],
8165[AC_REQUIRE([_LT_PROG_F77])dnl
8166AC_LANG_PUSH(Fortran 77)
8167
8168_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8169_LT_TAGVAR(allow_undefined_flag, $1)=
8170_LT_TAGVAR(always_export_symbols, $1)=no
8171_LT_TAGVAR(archive_expsym_cmds, $1)=
8172_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8173_LT_TAGVAR(hardcode_direct, $1)=no
8174_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8175_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8176_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8177_LT_TAGVAR(hardcode_libdir_separator, $1)=
8178_LT_TAGVAR(hardcode_minus_L, $1)=no
8179_LT_TAGVAR(hardcode_automatic, $1)=no
8180_LT_TAGVAR(inherit_rpath, $1)=no
8181_LT_TAGVAR(module_cmds, $1)=
8182_LT_TAGVAR(module_expsym_cmds, $1)=
8183_LT_TAGVAR(link_all_deplibs, $1)=unknown
8184_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8185_LT_TAGVAR(no_undefined_flag, $1)=
8186_LT_TAGVAR(whole_archive_flag_spec, $1)=
8187_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8188
8189# Source file extension for f77 test sources.
8190ac_ext=f
8191
8192# Object file extension for compiled f77 test sources.
8193objext=o
8194_LT_TAGVAR(objext, $1)=$objext
8195
8196# No sense in running all these tests if we already determined that
8197# the F77 compiler isn't working.  Some variables (like enable_shared)
8198# are currently assumed to apply to all compilers on this platform,
8199# and will be corrupted by setting them based on a non-working compiler.
8200if test "$_lt_disable_F77" != yes; then
8201  # Code to be used in simple compile tests
8202  lt_simple_compile_test_code="\
8203      subroutine t
8204      return
8205      end
8206"
8207
8208  # Code to be used in simple link tests
8209  lt_simple_link_test_code="\
8210      program t
8211      end
8212"
8213
8214  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8215  _LT_TAG_COMPILER
8216
8217  # save warnings/boilerplate of simple test code
8218  _LT_COMPILER_BOILERPLATE
8219  _LT_LINKER_BOILERPLATE
8220
8221  # Allow CC to be a program name with arguments.
8222  lt_save_CC="$CC"
8223  lt_save_GCC=$GCC
8224  CC=${F77-"f77"}
8225  compiler=$CC
8226  _LT_TAGVAR(compiler, $1)=$CC
8227  _LT_CC_BASENAME([$compiler])
8228  GCC=$G77
8229  if test -n "$compiler"; then
8230    AC_MSG_CHECKING([if libtool supports shared libraries])
8231    AC_MSG_RESULT([$can_build_shared])
8232
8233    AC_MSG_CHECKING([whether to build shared libraries])
8234    test "$can_build_shared" = "no" && enable_shared=no
8235
8236    # On AIX, shared libraries and static libraries use the same namespace, and
8237    # are all built from PIC.
8238    case $host_os in
8239      aix3*)
8240        test "$enable_shared" = yes && enable_static=no
8241        if test -n "$RANLIB"; then
8242          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8243          postinstall_cmds='$RANLIB $lib'
8244        fi
8245        ;;
8246      aix[[4-9]]*)
8247	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8248	  test "$enable_shared" = yes && enable_static=no
8249	fi
8250        ;;
8251    esac
8252    AC_MSG_RESULT([$enable_shared])
8253
8254    AC_MSG_CHECKING([whether to build static libraries])
8255    # Make sure either enable_shared or enable_static is yes.
8256    test "$enable_shared" = yes || enable_static=yes
8257    AC_MSG_RESULT([$enable_static])
8258
8259    _LT_TAGVAR(GCC, $1)="$G77"
8260    _LT_TAGVAR(LD, $1)="$LD"
8261
8262    ## CAVEAT EMPTOR:
8263    ## There is no encapsulation within the following macros, do not change
8264    ## the running order or otherwise move them around unless you know exactly
8265    ## what you are doing...
8266    _LT_COMPILER_PIC($1)
8267    _LT_COMPILER_C_O($1)
8268    _LT_COMPILER_FILE_LOCKS($1)
8269    _LT_LINKER_SHLIBS($1)
8270    _LT_SYS_DYNAMIC_LINKER($1)
8271    _LT_LINKER_HARDCODE_LIBPATH($1)
8272
8273    _LT_CONFIG($1)
8274  fi # test -n "$compiler"
8275
8276  GCC=$lt_save_GCC
8277  CC="$lt_save_CC"
8278fi # test "$_lt_disable_F77" != yes
8279
8280AC_LANG_POP
8281])# _LT_LANG_F77_CONFIG
8282
8283
8284# _LT_PROG_FC
8285# -----------
8286# Since AC_PROG_FC is broken, in that it returns the empty string
8287# if there is no fortran compiler, we have our own version here.
8288m4_defun([_LT_PROG_FC],
8289[
8290pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
8291AC_PROG_FC
8292if test -z "$FC" || test "X$FC" = "Xno"; then
8293  _lt_disable_FC=yes
8294fi
8295popdef([AC_MSG_ERROR])
8296])# _LT_PROG_FC
8297
8298dnl aclocal-1.4 backwards compatibility:
8299dnl AC_DEFUN([_LT_PROG_FC], [])
8300
8301
8302# _LT_LANG_FC_CONFIG([TAG])
8303# -------------------------
8304# Ensure that the configuration variables for a Fortran compiler are
8305# suitably defined.  These variables are subsequently used by _LT_CONFIG
8306# to write the compiler configuration to `libtool'.
8307m4_defun([_LT_LANG_FC_CONFIG],
8308[AC_REQUIRE([_LT_PROG_FC])dnl
8309AC_LANG_PUSH(Fortran)
8310
8311_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8312_LT_TAGVAR(allow_undefined_flag, $1)=
8313_LT_TAGVAR(always_export_symbols, $1)=no
8314_LT_TAGVAR(archive_expsym_cmds, $1)=
8315_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8316_LT_TAGVAR(hardcode_direct, $1)=no
8317_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8318_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8319_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8320_LT_TAGVAR(hardcode_libdir_separator, $1)=
8321_LT_TAGVAR(hardcode_minus_L, $1)=no
8322_LT_TAGVAR(hardcode_automatic, $1)=no
8323_LT_TAGVAR(inherit_rpath, $1)=no
8324_LT_TAGVAR(module_cmds, $1)=
8325_LT_TAGVAR(module_expsym_cmds, $1)=
8326_LT_TAGVAR(link_all_deplibs, $1)=unknown
8327_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8328_LT_TAGVAR(no_undefined_flag, $1)=
8329_LT_TAGVAR(whole_archive_flag_spec, $1)=
8330_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8331
8332# Source file extension for fc test sources.
8333ac_ext=${ac_fc_srcext-f}
8334
8335# Object file extension for compiled fc test sources.
8336objext=o
8337_LT_TAGVAR(objext, $1)=$objext
8338
8339# No sense in running all these tests if we already determined that
8340# the FC compiler isn't working.  Some variables (like enable_shared)
8341# are currently assumed to apply to all compilers on this platform,
8342# and will be corrupted by setting them based on a non-working compiler.
8343if test "$_lt_disable_FC" != yes; then
8344  # Code to be used in simple compile tests
8345  lt_simple_compile_test_code="\
8346      subroutine t
8347      return
8348      end
8349"
8350
8351  # Code to be used in simple link tests
8352  lt_simple_link_test_code="\
8353      program t
8354      end
8355"
8356
8357  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8358  _LT_TAG_COMPILER
8359
8360  # save warnings/boilerplate of simple test code
8361  _LT_COMPILER_BOILERPLATE
8362  _LT_LINKER_BOILERPLATE
8363
8364  # Allow CC to be a program name with arguments.
8365  lt_save_CC="$CC"
8366  lt_save_GCC=$GCC
8367  CC=${FC-"f95"}
8368  compiler=$CC
8369  GCC=$ac_cv_fc_compiler_gnu
8370
8371  _LT_TAGVAR(compiler, $1)=$CC
8372  _LT_CC_BASENAME([$compiler])
8373
8374  if test -n "$compiler"; then
8375    AC_MSG_CHECKING([if libtool supports shared libraries])
8376    AC_MSG_RESULT([$can_build_shared])
8377
8378    AC_MSG_CHECKING([whether to build shared libraries])
8379    test "$can_build_shared" = "no" && enable_shared=no
8380
8381    # On AIX, shared libraries and static libraries use the same namespace, and
8382    # are all built from PIC.
8383    case $host_os in
8384      aix3*)
8385        test "$enable_shared" = yes && enable_static=no
8386        if test -n "$RANLIB"; then
8387          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8388          postinstall_cmds='$RANLIB $lib'
8389        fi
8390        ;;
8391      aix[[4-9]]*)
8392	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8393	  test "$enable_shared" = yes && enable_static=no
8394	fi
8395        ;;
8396    esac
8397    AC_MSG_RESULT([$enable_shared])
8398
8399    AC_MSG_CHECKING([whether to build static libraries])
8400    # Make sure either enable_shared or enable_static is yes.
8401    test "$enable_shared" = yes || enable_static=yes
8402    AC_MSG_RESULT([$enable_static])
8403
8404    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8405    _LT_TAGVAR(LD, $1)="$LD"
8406
8407    ## CAVEAT EMPTOR:
8408    ## There is no encapsulation within the following macros, do not change
8409    ## the running order or otherwise move them around unless you know exactly
8410    ## what you are doing...
8411    _LT_SYS_HIDDEN_LIBDEPS($1)
8412    _LT_COMPILER_PIC($1)
8413    _LT_COMPILER_C_O($1)
8414    _LT_COMPILER_FILE_LOCKS($1)
8415    _LT_LINKER_SHLIBS($1)
8416    _LT_SYS_DYNAMIC_LINKER($1)
8417    _LT_LINKER_HARDCODE_LIBPATH($1)
8418
8419    _LT_CONFIG($1)
8420  fi # test -n "$compiler"
8421
8422  GCC=$lt_save_GCC
8423  CC="$lt_save_CC"
8424fi # test "$_lt_disable_FC" != yes
8425
8426AC_LANG_POP
8427])# _LT_LANG_FC_CONFIG
8428
8429
8430# _LT_LANG_GCJ_CONFIG([TAG])
8431# --------------------------
8432# Ensure that the configuration variables for the GNU Java Compiler compiler
8433# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8434# to write the compiler configuration to `libtool'.
8435m4_defun([_LT_LANG_GCJ_CONFIG],
8436[AC_REQUIRE([LT_PROG_GCJ])dnl
8437AC_LANG_SAVE
8438
8439# Source file extension for Java test sources.
8440ac_ext=java
8441
8442# Object file extension for compiled Java test sources.
8443objext=o
8444_LT_TAGVAR(objext, $1)=$objext
8445
8446# Code to be used in simple compile tests
8447lt_simple_compile_test_code="class foo {}"
8448
8449# Code to be used in simple link tests
8450lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8451
8452# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8453_LT_TAG_COMPILER
8454
8455# save warnings/boilerplate of simple test code
8456_LT_COMPILER_BOILERPLATE
8457_LT_LINKER_BOILERPLATE
8458
8459# Allow CC to be a program name with arguments.
8460lt_save_CC="$CC"
8461lt_save_GCC=$GCC
8462GCC=yes
8463CC=${GCJ-"gcj"}
8464compiler=$CC
8465_LT_TAGVAR(compiler, $1)=$CC
8466_LT_TAGVAR(LD, $1)="$LD"
8467_LT_CC_BASENAME([$compiler])
8468
8469# GCJ did not exist at the time GCC didn't implicitly link libc in.
8470_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8471
8472_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8473
8474if test -n "$compiler"; then
8475  _LT_COMPILER_NO_RTTI($1)
8476  _LT_COMPILER_PIC($1)
8477  _LT_COMPILER_C_O($1)
8478  _LT_COMPILER_FILE_LOCKS($1)
8479  _LT_LINKER_SHLIBS($1)
8480  _LT_LINKER_HARDCODE_LIBPATH($1)
8481
8482  _LT_CONFIG($1)
8483fi
8484
8485AC_LANG_RESTORE
8486
8487GCC=$lt_save_GCC
8488CC="$lt_save_CC"
8489])# _LT_LANG_GCJ_CONFIG
8490
8491
8492# _LT_LANG_RC_CONFIG([TAG])
8493# -------------------------
8494# Ensure that the configuration variables for the Windows resource compiler
8495# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8496# to write the compiler configuration to `libtool'.
8497m4_defun([_LT_LANG_RC_CONFIG],
8498[AC_REQUIRE([LT_PROG_RC])dnl
8499AC_LANG_SAVE
8500
8501# Source file extension for RC test sources.
8502ac_ext=rc
8503
8504# Object file extension for compiled RC test sources.
8505objext=o
8506_LT_TAGVAR(objext, $1)=$objext
8507
8508# Code to be used in simple compile tests
8509lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8510
8511# Code to be used in simple link tests
8512lt_simple_link_test_code="$lt_simple_compile_test_code"
8513
8514# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8515_LT_TAG_COMPILER
8516
8517# save warnings/boilerplate of simple test code
8518_LT_COMPILER_BOILERPLATE
8519_LT_LINKER_BOILERPLATE
8520
8521# Allow CC to be a program name with arguments.
8522lt_save_CC="$CC"
8523lt_save_GCC=$GCC
8524GCC=
8525CC=${RC-"windres"}
8526compiler=$CC
8527_LT_TAGVAR(compiler, $1)=$CC
8528_LT_CC_BASENAME([$compiler])
8529_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8530
8531if test -n "$compiler"; then
8532  :
8533  _LT_CONFIG($1)
8534fi
8535
8536GCC=$lt_save_GCC
8537AC_LANG_RESTORE
8538CC="$lt_save_CC"
8539])# _LT_LANG_RC_CONFIG
8540
8541
8542# LT_PROG_GCJ
8543# -----------
8544AC_DEFUN([LT_PROG_GCJ],
8545[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8546  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8547    [AC_CHECK_TOOL(GCJ, gcj,)
8548      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8549      AC_SUBST(GCJFLAGS)])])[]dnl
8550])
8551
8552# Old name:
8553AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8554dnl aclocal-1.4 backwards compatibility:
8555dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8556
8557
8558# LT_PROG_RC
8559# ----------
8560AC_DEFUN([LT_PROG_RC],
8561[AC_CHECK_TOOL(RC, windres,)
8562])
8563
8564# Old name:
8565AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8566dnl aclocal-1.4 backwards compatibility:
8567dnl AC_DEFUN([LT_AC_PROG_RC], [])
8568
8569
8570# _LT_DECL_EGREP
8571# --------------
8572# If we don't have a new enough Autoconf to choose the best grep
8573# available, choose the one first in the user's PATH.
8574m4_defun([_LT_DECL_EGREP],
8575[AC_REQUIRE([AC_PROG_EGREP])dnl
8576AC_REQUIRE([AC_PROG_FGREP])dnl
8577test -z "$GREP" && GREP=grep
8578_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8579_LT_DECL([], [EGREP], [1], [An ERE matcher])
8580_LT_DECL([], [FGREP], [1], [A literal string matcher])
8581dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8582AC_SUBST([GREP])
8583])
8584
8585
8586# _LT_DECL_OBJDUMP
8587# --------------
8588# If we don't have a new enough Autoconf to choose the best objdump
8589# available, choose the one first in the user's PATH.
8590m4_defun([_LT_DECL_OBJDUMP],
8591[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8592test -z "$OBJDUMP" && OBJDUMP=objdump
8593_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8594AC_SUBST([OBJDUMP])
8595])
8596
8597
8598# _LT_DECL_SED
8599# ------------
8600# Check for a fully-functional sed program, that truncates
8601# as few characters as possible.  Prefer GNU sed if found.
8602m4_defun([_LT_DECL_SED],
8603[AC_PROG_SED
8604test -z "$SED" && SED=sed
8605Xsed="$SED -e 1s/^X//"
8606_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8607_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8608    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8609])# _LT_DECL_SED
8610
8611m4_ifndef([AC_PROG_SED], [
8612# NOTE: This macro has been submitted for inclusion into   #
8613#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8614#  a released version of Autoconf we should remove this    #
8615#  macro and use it instead.                               #
8616
8617m4_defun([AC_PROG_SED],
8618[AC_MSG_CHECKING([for a sed that does not truncate output])
8619AC_CACHE_VAL(lt_cv_path_SED,
8620[# Loop through the user's path and test for sed and gsed.
8621# Then use that list of sed's as ones to test for truncation.
8622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8623for as_dir in $PATH
8624do
8625  IFS=$as_save_IFS
8626  test -z "$as_dir" && as_dir=.
8627  for lt_ac_prog in sed gsed; do
8628    for ac_exec_ext in '' $ac_executable_extensions; do
8629      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8630        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8631      fi
8632    done
8633  done
8634done
8635IFS=$as_save_IFS
8636lt_ac_max=0
8637lt_ac_count=0
8638# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8639# along with /bin/sed that truncates output.
8640for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8641  test ! -f $lt_ac_sed && continue
8642  cat /dev/null > conftest.in
8643  lt_ac_count=0
8644  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8645  # Check for GNU sed and select it if it is found.
8646  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8647    lt_cv_path_SED=$lt_ac_sed
8648    break
8649  fi
8650  while true; do
8651    cat conftest.in conftest.in >conftest.tmp
8652    mv conftest.tmp conftest.in
8653    cp conftest.in conftest.nl
8654    echo >>conftest.nl
8655    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8656    cmp -s conftest.out conftest.nl || break
8657    # 10000 chars as input seems more than enough
8658    test $lt_ac_count -gt 10 && break
8659    lt_ac_count=`expr $lt_ac_count + 1`
8660    if test $lt_ac_count -gt $lt_ac_max; then
8661      lt_ac_max=$lt_ac_count
8662      lt_cv_path_SED=$lt_ac_sed
8663    fi
8664  done
8665done
8666])
8667SED=$lt_cv_path_SED
8668AC_SUBST([SED])
8669AC_MSG_RESULT([$SED])
8670])#AC_PROG_SED
8671])#m4_ifndef
8672
8673# Old name:
8674AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8675dnl aclocal-1.4 backwards compatibility:
8676dnl AC_DEFUN([LT_AC_PROG_SED], [])
8677
8678
8679# _LT_CHECK_SHELL_FEATURES
8680# ------------------------
8681# Find out whether the shell is Bourne or XSI compatible,
8682# or has some other useful features.
8683m4_defun([_LT_CHECK_SHELL_FEATURES],
8684[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8685# Try some XSI features
8686xsi_shell=no
8687( _lt_dummy="a/b/c"
8688  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
8689      = c,a/b,, \
8690    && eval 'test $(( 1 + 1 )) -eq 2 \
8691    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8692  && xsi_shell=yes
8693AC_MSG_RESULT([$xsi_shell])
8694_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8695
8696AC_MSG_CHECKING([whether the shell understands "+="])
8697lt_shell_append=no
8698( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8699    >/dev/null 2>&1 \
8700  && lt_shell_append=yes
8701AC_MSG_RESULT([$lt_shell_append])
8702_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8703
8704if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8705  lt_unset=unset
8706else
8707  lt_unset=false
8708fi
8709_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8710
8711# test EBCDIC or ASCII
8712case `echo X|tr X '\101'` in
8713 A) # ASCII based system
8714    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8715  lt_SP2NL='tr \040 \012'
8716  lt_NL2SP='tr \015\012 \040\040'
8717  ;;
8718 *) # EBCDIC based system
8719  lt_SP2NL='tr \100 \n'
8720  lt_NL2SP='tr \r\n \100\100'
8721  ;;
8722esac
8723_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8724_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8725])# _LT_CHECK_SHELL_FEATURES
8726
8727
8728# _LT_PROG_XSI_SHELLFNS
8729# ---------------------
8730# Bourne and XSI compatible variants of some useful shell functions.
8731m4_defun([_LT_PROG_XSI_SHELLFNS],
8732[case $xsi_shell in
8733  yes)
8734    cat << \_LT_EOF >> "$cfgfile"
8735
8736# func_dirname file append nondir_replacement
8737# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8738# otherwise set result to NONDIR_REPLACEMENT.
8739func_dirname ()
8740{
8741  case ${1} in
8742    */*) func_dirname_result="${1%/*}${2}" ;;
8743    *  ) func_dirname_result="${3}" ;;
8744  esac
8745}
8746
8747# func_basename file
8748func_basename ()
8749{
8750  func_basename_result="${1##*/}"
8751}
8752
8753# func_dirname_and_basename file append nondir_replacement
8754# perform func_basename and func_dirname in a single function
8755# call:
8756#   dirname:  Compute the dirname of FILE.  If nonempty,
8757#             add APPEND to the result, otherwise set result
8758#             to NONDIR_REPLACEMENT.
8759#             value returned in "$func_dirname_result"
8760#   basename: Compute filename of FILE.
8761#             value retuned in "$func_basename_result"
8762# Implementation must be kept synchronized with func_dirname
8763# and func_basename. For efficiency, we do not delegate to
8764# those functions but instead duplicate the functionality here.
8765func_dirname_and_basename ()
8766{
8767  case ${1} in
8768    */*) func_dirname_result="${1%/*}${2}" ;;
8769    *  ) func_dirname_result="${3}" ;;
8770  esac
8771  func_basename_result="${1##*/}"
8772}
8773
8774# func_stripname prefix suffix name
8775# strip PREFIX and SUFFIX off of NAME.
8776# PREFIX and SUFFIX must not contain globbing or regex special
8777# characters, hashes, percent signs, but SUFFIX may contain a leading
8778# dot (in which case that matches only a dot).
8779func_stripname ()
8780{
8781  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8782  # positional parameters, so assign one to ordinary parameter first.
8783  func_stripname_result=${3}
8784  func_stripname_result=${func_stripname_result#"${1}"}
8785  func_stripname_result=${func_stripname_result%"${2}"}
8786}
8787
8788# func_opt_split
8789func_opt_split ()
8790{
8791  func_opt_split_opt=${1%%=*}
8792  func_opt_split_arg=${1#*=}
8793}
8794
8795# func_lo2o object
8796func_lo2o ()
8797{
8798  case ${1} in
8799    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8800    *)    func_lo2o_result=${1} ;;
8801  esac
8802}
8803
8804# func_xform libobj-or-source
8805func_xform ()
8806{
8807  func_xform_result=${1%.*}.lo
8808}
8809
8810# func_arith arithmetic-term...
8811func_arith ()
8812{
8813  func_arith_result=$(( $[*] ))
8814}
8815
8816# func_len string
8817# STRING may not start with a hyphen.
8818func_len ()
8819{
8820  func_len_result=${#1}
8821}
8822
8823_LT_EOF
8824    ;;
8825  *) # Bourne compatible functions.
8826    cat << \_LT_EOF >> "$cfgfile"
8827
8828# func_dirname file append nondir_replacement
8829# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
8830# otherwise set result to NONDIR_REPLACEMENT.
8831func_dirname ()
8832{
8833  # Extract subdirectory from the argument.
8834  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
8835  if test "X$func_dirname_result" = "X${1}"; then
8836    func_dirname_result="${3}"
8837  else
8838    func_dirname_result="$func_dirname_result${2}"
8839  fi
8840}
8841
8842# func_basename file
8843func_basename ()
8844{
8845  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
8846}
8847
8848dnl func_dirname_and_basename
8849dnl A portable version of this function is already defined in general.m4sh
8850dnl so there is no need for it here.
8851
8852# func_stripname prefix suffix name
8853# strip PREFIX and SUFFIX off of NAME.
8854# PREFIX and SUFFIX must not contain globbing or regex special
8855# characters, hashes, percent signs, but SUFFIX may contain a leading
8856# dot (in which case that matches only a dot).
8857# func_strip_suffix prefix name
8858func_stripname ()
8859{
8860  case ${2} in
8861    .*) func_stripname_result=`$ECHO "X${3}" \
8862           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
8863    *)  func_stripname_result=`$ECHO "X${3}" \
8864           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
8865  esac
8866}
8867
8868# sed scripts:
8869my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
8870my_sed_long_arg='1s/^-[[^=]]*=//'
8871
8872# func_opt_split
8873func_opt_split ()
8874{
8875  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
8876  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
8877}
8878
8879# func_lo2o object
8880func_lo2o ()
8881{
8882  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
8883}
8884
8885# func_xform libobj-or-source
8886func_xform ()
8887{
8888  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
8889}
8890
8891# func_arith arithmetic-term...
8892func_arith ()
8893{
8894  func_arith_result=`expr "$[@]"`
8895}
8896
8897# func_len string
8898# STRING may not start with a hyphen.
8899func_len ()
8900{
8901  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
8902}
8903
8904_LT_EOF
8905esac
8906
8907case $lt_shell_append in
8908  yes)
8909    cat << \_LT_EOF >> "$cfgfile"
8910
8911# func_append var value
8912# Append VALUE to the end of shell variable VAR.
8913func_append ()
8914{
8915  eval "$[1]+=\$[2]"
8916}
8917_LT_EOF
8918    ;;
8919  *)
8920    cat << \_LT_EOF >> "$cfgfile"
8921
8922# func_append var value
8923# Append VALUE to the end of shell variable VAR.
8924func_append ()
8925{
8926  eval "$[1]=\$$[1]\$[2]"
8927}
8928
8929_LT_EOF
8930    ;;
8931  esac
8932])
8933
8934# Helper functions for option handling.                    -*- Autoconf -*-
8935#
8936#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
8937#   Written by Gary V. Vaughan, 2004
8938#
8939# This file is free software; the Free Software Foundation gives
8940# unlimited permission to copy and/or distribute it, with or without
8941# modifications, as long as this notice is preserved.
8942
8943# serial 6 ltoptions.m4
8944
8945# This is to help aclocal find these macros, as it can't see m4_define.
8946AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8947
8948
8949# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8950# ------------------------------------------
8951m4_define([_LT_MANGLE_OPTION],
8952[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8953
8954
8955# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8956# ---------------------------------------
8957# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8958# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8959# saved as a flag.
8960m4_define([_LT_SET_OPTION],
8961[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8962m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8963        _LT_MANGLE_DEFUN([$1], [$2]),
8964    [m4_warning([Unknown $1 option `$2'])])[]dnl
8965])
8966
8967
8968# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8969# ------------------------------------------------------------
8970# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8971m4_define([_LT_IF_OPTION],
8972[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8973
8974
8975# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8976# -------------------------------------------------------
8977# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8978# are set.
8979m4_define([_LT_UNLESS_OPTIONS],
8980[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8981	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8982		      [m4_define([$0_found])])])[]dnl
8983m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8984])[]dnl
8985])
8986
8987
8988# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8989# ----------------------------------------
8990# OPTION-LIST is a space-separated list of Libtool options associated
8991# with MACRO-NAME.  If any OPTION has a matching handler declared with
8992# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8993# the unknown option and exit.
8994m4_defun([_LT_SET_OPTIONS],
8995[# Set options
8996m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8997    [_LT_SET_OPTION([$1], _LT_Option)])
8998
8999m4_if([$1],[LT_INIT],[
9000  dnl
9001  dnl Simply set some default values (i.e off) if boolean options were not
9002  dnl specified:
9003  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9004  ])
9005  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9006  ])
9007  dnl
9008  dnl If no reference was made to various pairs of opposing options, then
9009  dnl we run the default mode handler for the pair.  For example, if neither
9010  dnl `shared' nor `disable-shared' was passed, we enable building of shared
9011  dnl archives by default:
9012  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9013  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9014  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9015  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9016  		   [_LT_ENABLE_FAST_INSTALL])
9017  ])
9018])# _LT_SET_OPTIONS
9019
9020
9021
9022# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9023# -----------------------------------------
9024m4_define([_LT_MANGLE_DEFUN],
9025[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9026
9027
9028# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9029# -----------------------------------------------
9030m4_define([LT_OPTION_DEFINE],
9031[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9032])# LT_OPTION_DEFINE
9033
9034
9035# dlopen
9036# ------
9037LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9038])
9039
9040AU_DEFUN([AC_LIBTOOL_DLOPEN],
9041[_LT_SET_OPTION([LT_INIT], [dlopen])
9042AC_DIAGNOSE([obsolete],
9043[$0: Remove this warning and the call to _LT_SET_OPTION when you
9044put the `dlopen' option into LT_INIT's first parameter.])
9045])
9046
9047dnl aclocal-1.4 backwards compatibility:
9048dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9049
9050
9051# win32-dll
9052# ---------
9053# Declare package support for building win32 dll's.
9054LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9055[enable_win32_dll=yes
9056
9057case $host in
9058*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
9059  AC_CHECK_TOOL(AS, as, false)
9060  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9061  AC_CHECK_TOOL(OBJDUMP, objdump, false)
9062  ;;
9063esac
9064
9065test -z "$AS" && AS=as
9066_LT_DECL([], [AS],      [0], [Assembler program])dnl
9067
9068test -z "$DLLTOOL" && DLLTOOL=dlltool
9069_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
9070
9071test -z "$OBJDUMP" && OBJDUMP=objdump
9072_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
9073])# win32-dll
9074
9075AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9076[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9077_LT_SET_OPTION([LT_INIT], [win32-dll])
9078AC_DIAGNOSE([obsolete],
9079[$0: Remove this warning and the call to _LT_SET_OPTION when you
9080put the `win32-dll' option into LT_INIT's first parameter.])
9081])
9082
9083dnl aclocal-1.4 backwards compatibility:
9084dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9085
9086
9087# _LT_ENABLE_SHARED([DEFAULT])
9088# ----------------------------
9089# implement the --enable-shared flag, and supports the `shared' and
9090# `disable-shared' LT_INIT options.
9091# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9092m4_define([_LT_ENABLE_SHARED],
9093[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9094AC_ARG_ENABLE([shared],
9095    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9096	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9097    [p=${PACKAGE-default}
9098    case $enableval in
9099    yes) enable_shared=yes ;;
9100    no) enable_shared=no ;;
9101    *)
9102      enable_shared=no
9103      # Look at the argument we got.  We use all the common list separators.
9104      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9105      for pkg in $enableval; do
9106	IFS="$lt_save_ifs"
9107	if test "X$pkg" = "X$p"; then
9108	  enable_shared=yes
9109	fi
9110      done
9111      IFS="$lt_save_ifs"
9112      ;;
9113    esac],
9114    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9115
9116    _LT_DECL([build_libtool_libs], [enable_shared], [0],
9117	[Whether or not to build shared libraries])
9118])# _LT_ENABLE_SHARED
9119
9120LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9121LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9122
9123# Old names:
9124AC_DEFUN([AC_ENABLE_SHARED],
9125[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9126])
9127
9128AC_DEFUN([AC_DISABLE_SHARED],
9129[_LT_SET_OPTION([LT_INIT], [disable-shared])
9130])
9131
9132AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9133AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9134
9135dnl aclocal-1.4 backwards compatibility:
9136dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9137dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9138
9139
9140
9141# _LT_ENABLE_STATIC([DEFAULT])
9142# ----------------------------
9143# implement the --enable-static flag, and support the `static' and
9144# `disable-static' LT_INIT options.
9145# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9146m4_define([_LT_ENABLE_STATIC],
9147[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9148AC_ARG_ENABLE([static],
9149    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9150	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9151    [p=${PACKAGE-default}
9152    case $enableval in
9153    yes) enable_static=yes ;;
9154    no) enable_static=no ;;
9155    *)
9156     enable_static=no
9157      # Look at the argument we got.  We use all the common list separators.
9158      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9159      for pkg in $enableval; do
9160	IFS="$lt_save_ifs"
9161	if test "X$pkg" = "X$p"; then
9162	  enable_static=yes
9163	fi
9164      done
9165      IFS="$lt_save_ifs"
9166      ;;
9167    esac],
9168    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9169
9170    _LT_DECL([build_old_libs], [enable_static], [0],
9171	[Whether or not to build static libraries])
9172])# _LT_ENABLE_STATIC
9173
9174LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9175LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9176
9177# Old names:
9178AC_DEFUN([AC_ENABLE_STATIC],
9179[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9180])
9181
9182AC_DEFUN([AC_DISABLE_STATIC],
9183[_LT_SET_OPTION([LT_INIT], [disable-static])
9184])
9185
9186AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9187AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9188
9189dnl aclocal-1.4 backwards compatibility:
9190dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9191dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9192
9193
9194
9195# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9196# ----------------------------------
9197# implement the --enable-fast-install flag, and support the `fast-install'
9198# and `disable-fast-install' LT_INIT options.
9199# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9200m4_define([_LT_ENABLE_FAST_INSTALL],
9201[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9202AC_ARG_ENABLE([fast-install],
9203    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9204    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9205    [p=${PACKAGE-default}
9206    case $enableval in
9207    yes) enable_fast_install=yes ;;
9208    no) enable_fast_install=no ;;
9209    *)
9210      enable_fast_install=no
9211      # Look at the argument we got.  We use all the common list separators.
9212      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9213      for pkg in $enableval; do
9214	IFS="$lt_save_ifs"
9215	if test "X$pkg" = "X$p"; then
9216	  enable_fast_install=yes
9217	fi
9218      done
9219      IFS="$lt_save_ifs"
9220      ;;
9221    esac],
9222    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9223
9224_LT_DECL([fast_install], [enable_fast_install], [0],
9225	 [Whether or not to optimize for fast installation])dnl
9226])# _LT_ENABLE_FAST_INSTALL
9227
9228LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9229LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9230
9231# Old names:
9232AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9233[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9234AC_DIAGNOSE([obsolete],
9235[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9236the `fast-install' option into LT_INIT's first parameter.])
9237])
9238
9239AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9240[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9241AC_DIAGNOSE([obsolete],
9242[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9243the `disable-fast-install' option into LT_INIT's first parameter.])
9244])
9245
9246dnl aclocal-1.4 backwards compatibility:
9247dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9248dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9249
9250
9251# _LT_WITH_PIC([MODE])
9252# --------------------
9253# implement the --with-pic flag, and support the `pic-only' and `no-pic'
9254# LT_INIT options.
9255# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9256m4_define([_LT_WITH_PIC],
9257[AC_ARG_WITH([pic],
9258    [AS_HELP_STRING([--with-pic],
9259	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9260    [pic_mode="$withval"],
9261    [pic_mode=default])
9262
9263test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9264
9265_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9266])# _LT_WITH_PIC
9267
9268LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9269LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9270
9271# Old name:
9272AU_DEFUN([AC_LIBTOOL_PICMODE],
9273[_LT_SET_OPTION([LT_INIT], [pic-only])
9274AC_DIAGNOSE([obsolete],
9275[$0: Remove this warning and the call to _LT_SET_OPTION when you
9276put the `pic-only' option into LT_INIT's first parameter.])
9277])
9278
9279dnl aclocal-1.4 backwards compatibility:
9280dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9281
9282
9283m4_define([_LTDL_MODE], [])
9284LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9285		 [m4_define([_LTDL_MODE], [nonrecursive])])
9286LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9287		 [m4_define([_LTDL_MODE], [recursive])])
9288LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9289		 [m4_define([_LTDL_MODE], [subproject])])
9290
9291m4_define([_LTDL_TYPE], [])
9292LT_OPTION_DEFINE([LTDL_INIT], [installable],
9293		 [m4_define([_LTDL_TYPE], [installable])])
9294LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9295		 [m4_define([_LTDL_TYPE], [convenience])])
9296
9297# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9298#
9299# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9300# Written by Gary V. Vaughan, 2004
9301#
9302# This file is free software; the Free Software Foundation gives
9303# unlimited permission to copy and/or distribute it, with or without
9304# modifications, as long as this notice is preserved.
9305
9306# serial 6 ltsugar.m4
9307
9308# This is to help aclocal find these macros, as it can't see m4_define.
9309AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9310
9311
9312# lt_join(SEP, ARG1, [ARG2...])
9313# -----------------------------
9314# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9315# associated separator.
9316# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9317# versions in m4sugar had bugs.
9318m4_define([lt_join],
9319[m4_if([$#], [1], [],
9320       [$#], [2], [[$2]],
9321       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9322m4_define([_lt_join],
9323[m4_if([$#$2], [2], [],
9324       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9325
9326
9327# lt_car(LIST)
9328# lt_cdr(LIST)
9329# ------------
9330# Manipulate m4 lists.
9331# These macros are necessary as long as will still need to support
9332# Autoconf-2.59 which quotes differently.
9333m4_define([lt_car], [[$1]])
9334m4_define([lt_cdr],
9335[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9336       [$#], 1, [],
9337       [m4_dquote(m4_shift($@))])])
9338m4_define([lt_unquote], $1)
9339
9340
9341# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9342# ------------------------------------------
9343# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9344# Note that neither SEPARATOR nor STRING are expanded; they are appended
9345# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9346# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9347# than defined and empty).
9348#
9349# This macro is needed until we can rely on Autoconf 2.62, since earlier
9350# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9351m4_define([lt_append],
9352[m4_define([$1],
9353	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9354
9355
9356
9357# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9358# ----------------------------------------------------------
9359# Produce a SEP delimited list of all paired combinations of elements of
9360# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9361# has the form PREFIXmINFIXSUFFIXn.
9362# Needed until we can rely on m4_combine added in Autoconf 2.62.
9363m4_define([lt_combine],
9364[m4_if(m4_eval([$# > 3]), [1],
9365       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9366[[m4_foreach([_Lt_prefix], [$2],
9367	     [m4_foreach([_Lt_suffix],
9368		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9369	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9370
9371
9372# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9373# -----------------------------------------------------------------------
9374# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9375# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9376m4_define([lt_if_append_uniq],
9377[m4_ifdef([$1],
9378	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9379		 [lt_append([$1], [$2], [$3])$4],
9380		 [$5])],
9381	  [lt_append([$1], [$2], [$3])$4])])
9382
9383
9384# lt_dict_add(DICT, KEY, VALUE)
9385# -----------------------------
9386m4_define([lt_dict_add],
9387[m4_define([$1($2)], [$3])])
9388
9389
9390# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9391# --------------------------------------------
9392m4_define([lt_dict_add_subkey],
9393[m4_define([$1($2:$3)], [$4])])
9394
9395
9396# lt_dict_fetch(DICT, KEY, [SUBKEY])
9397# ----------------------------------
9398m4_define([lt_dict_fetch],
9399[m4_ifval([$3],
9400	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9401    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9402
9403
9404# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9405# -----------------------------------------------------------------
9406m4_define([lt_if_dict_fetch],
9407[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9408	[$5],
9409    [$6])])
9410
9411
9412# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9413# --------------------------------------------------------------
9414m4_define([lt_dict_filter],
9415[m4_if([$5], [], [],
9416  [lt_join(m4_quote(m4_default([$4], [[, ]])),
9417           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9418		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9419])
9420
9421# ltversion.m4 -- version numbers			-*- Autoconf -*-
9422#
9423#   Copyright (C) 2004 Free Software Foundation, Inc.
9424#   Written by Scott James Remnant, 2004
9425#
9426# This file is free software; the Free Software Foundation gives
9427# unlimited permission to copy and/or distribute it, with or without
9428# modifications, as long as this notice is preserved.
9429
9430# Generated from ltversion.in.
9431
9432# serial 3012 ltversion.m4
9433# This file is part of GNU Libtool
9434
9435m4_define([LT_PACKAGE_VERSION], [2.2.6])
9436m4_define([LT_PACKAGE_REVISION], [1.3012])
9437
9438AC_DEFUN([LTVERSION_VERSION],
9439[macro_version='2.2.6'
9440macro_revision='1.3012'
9441_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9442_LT_DECL(, macro_revision, 0)
9443])
9444
9445# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9446#
9447#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
9448#   Written by Scott James Remnant, 2004.
9449#
9450# This file is free software; the Free Software Foundation gives
9451# unlimited permission to copy and/or distribute it, with or without
9452# modifications, as long as this notice is preserved.
9453
9454# serial 4 lt~obsolete.m4
9455
9456# These exist entirely to fool aclocal when bootstrapping libtool.
9457#
9458# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9459# which have later been changed to m4_define as they aren't part of the
9460# exported API, or moved to Autoconf or Automake where they belong.
9461#
9462# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9463# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9464# using a macro with the same name in our local m4/libtool.m4 it'll
9465# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9466# and doesn't know about Autoconf macros at all.)
9467#
9468# So we provide this file, which has a silly filename so it's always
9469# included after everything else.  This provides aclocal with the
9470# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9471# because those macros already exist, or will be overwritten later.
9472# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9473#
9474# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9475# Yes, that means every name once taken will need to remain here until
9476# we give up compatibility with versions before 1.7, at which point
9477# we need to keep only those names which we still refer to.
9478
9479# This is to help aclocal find these macros, as it can't see m4_define.
9480AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9481
9482m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9483m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9484m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9485m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9486m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9487m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9488m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9489m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9490m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9491m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9492m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9493m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9494m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9495m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9496m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9497m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9498m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9499m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9500m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9501m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9502m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9503m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9504m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9505m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9506m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9507m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9508m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9509m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9510m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9511m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9512m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9513m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9514m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9515m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9516m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9517m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9518m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9519m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9520m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9521m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9522m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9523m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9524m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
9525m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9526m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9527m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9528m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9529m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9530m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9531m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9532m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9533m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9534m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9535m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9536m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9537
9538# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9539#
9540# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9541#
9542# This program is free software; you can redistribute it and/or modify
9543# it under the terms of the GNU General Public License as published by
9544# the Free Software Foundation; either version 2 of the License, or
9545# (at your option) any later version.
9546#
9547# This program is distributed in the hope that it will be useful, but
9548# WITHOUT ANY WARRANTY; without even the implied warranty of
9549# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9550# General Public License for more details.
9551#
9552# You should have received a copy of the GNU General Public License
9553# along with this program; if not, write to the Free Software
9554# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9555#
9556# As a special exception to the GNU General Public License, if you
9557# distribute this file as part of a program that contains a
9558# configuration script generated by Autoconf, you may include it under
9559# the same distribution terms that you use for the rest of that program.
9560
9561# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9562# ----------------------------------
9563AC_DEFUN([PKG_PROG_PKG_CONFIG],
9564[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9565m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
9566AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
9567if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9568	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9569fi
9570if test -n "$PKG_CONFIG"; then
9571	_pkg_min_version=m4_default([$1], [0.9.0])
9572	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9573	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9574		AC_MSG_RESULT([yes])
9575	else
9576		AC_MSG_RESULT([no])
9577		PKG_CONFIG=""
9578	fi
9579
9580fi[]dnl
9581])# PKG_PROG_PKG_CONFIG
9582
9583# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9584#
9585# Check to see whether a particular set of modules exists.  Similar
9586# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9587#
9588#
9589# Similar to PKG_CHECK_MODULES, make sure that the first instance of
9590# this or PKG_CHECK_MODULES is called, or make sure to call
9591# PKG_CHECK_EXISTS manually
9592# --------------------------------------------------------------
9593AC_DEFUN([PKG_CHECK_EXISTS],
9594[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9595if test -n "$PKG_CONFIG" && \
9596    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9597  m4_ifval([$2], [$2], [:])
9598m4_ifvaln([$3], [else
9599  $3])dnl
9600fi])
9601
9602
9603# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9604# ---------------------------------------------
9605m4_define([_PKG_CONFIG],
9606[if test -n "$$1"; then
9607    pkg_cv_[]$1="$$1"
9608 elif test -n "$PKG_CONFIG"; then
9609    PKG_CHECK_EXISTS([$3],
9610                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
9611		     [pkg_failed=yes])
9612 else
9613    pkg_failed=untried
9614fi[]dnl
9615])# _PKG_CONFIG
9616
9617# _PKG_SHORT_ERRORS_SUPPORTED
9618# -----------------------------
9619AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9620[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9621if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9622        _pkg_short_errors_supported=yes
9623else
9624        _pkg_short_errors_supported=no
9625fi[]dnl
9626])# _PKG_SHORT_ERRORS_SUPPORTED
9627
9628
9629# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9630# [ACTION-IF-NOT-FOUND])
9631#
9632#
9633# Note that if there is a possibility the first call to
9634# PKG_CHECK_MODULES might not happen, you should be sure to include an
9635# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9636#
9637#
9638# --------------------------------------------------------------
9639AC_DEFUN([PKG_CHECK_MODULES],
9640[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9641AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9642AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9643
9644pkg_failed=no
9645AC_MSG_CHECKING([for $1])
9646
9647_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9648_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9649
9650m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9651and $1[]_LIBS to avoid the need to call pkg-config.
9652See the pkg-config man page for more details.])
9653
9654if test $pkg_failed = yes; then
9655        _PKG_SHORT_ERRORS_SUPPORTED
9656        if test $_pkg_short_errors_supported = yes; then
9657	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
9658        else
9659	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
9660        fi
9661	# Put the nasty error message in config.log where it belongs
9662	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9663
9664	ifelse([$4], , [AC_MSG_ERROR(dnl
9665[Package requirements ($2) were not met:
9666
9667$$1_PKG_ERRORS
9668
9669Consider adjusting the PKG_CONFIG_PATH environment variable if you
9670installed software in a non-standard prefix.
9671
9672_PKG_TEXT
9673])],
9674		[AC_MSG_RESULT([no])
9675                $4])
9676elif test $pkg_failed = untried; then
9677	ifelse([$4], , [AC_MSG_FAILURE(dnl
9678[The pkg-config script could not be found or is too old.  Make sure it
9679is in your PATH or set the PKG_CONFIG environment variable to the full
9680path to pkg-config.
9681
9682_PKG_TEXT
9683
9684To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
9685		[$4])
9686else
9687	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9688	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9689        AC_MSG_RESULT([yes])
9690	ifelse([$3], , :, [$3])
9691fi[]dnl
9692])# PKG_CHECK_MODULES
9693
9694# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
9695#
9696# This file is free software; the Free Software Foundation
9697# gives unlimited permission to copy and/or distribute it,
9698# with or without modifications, as long as this notice is preserved.
9699
9700# AM_AUTOMAKE_VERSION(VERSION)
9701# ----------------------------
9702# Automake X.Y traces this macro to ensure aclocal.m4 has been
9703# generated from the m4 files accompanying Automake X.Y.
9704# (This private macro should not be called outside this file.)
9705AC_DEFUN([AM_AUTOMAKE_VERSION],
9706[am__api_version='1.10'
9707dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
9708dnl require some minimum version.  Point them to the right macro.
9709m4_if([$1], [1.10.2], [],
9710      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
9711])
9712
9713# _AM_AUTOCONF_VERSION(VERSION)
9714# -----------------------------
9715# aclocal traces this macro to find the Autoconf version.
9716# This is a private macro too.  Using m4_define simplifies
9717# the logic in aclocal, which can simply ignore this definition.
9718m4_define([_AM_AUTOCONF_VERSION], [])
9719
9720# AM_SET_CURRENT_AUTOMAKE_VERSION
9721# -------------------------------
9722# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
9723# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
9724AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
9725[AM_AUTOMAKE_VERSION([1.10.2])dnl
9726m4_ifndef([AC_AUTOCONF_VERSION],
9727  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
9728_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
9729
9730# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
9731
9732# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
9733#
9734# This file is free software; the Free Software Foundation
9735# gives unlimited permission to copy and/or distribute it,
9736# with or without modifications, as long as this notice is preserved.
9737
9738# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
9739# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
9740# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
9741#
9742# Of course, Automake must honor this variable whenever it calls a
9743# tool from the auxiliary directory.  The problem is that $srcdir (and
9744# therefore $ac_aux_dir as well) can be either absolute or relative,
9745# depending on how configure is run.  This is pretty annoying, since
9746# it makes $ac_aux_dir quite unusable in subdirectories: in the top
9747# source directory, any form will work fine, but in subdirectories a
9748# relative path needs to be adjusted first.
9749#
9750# $ac_aux_dir/missing
9751#    fails when called from a subdirectory if $ac_aux_dir is relative
9752# $top_srcdir/$ac_aux_dir/missing
9753#    fails if $ac_aux_dir is absolute,
9754#    fails when called from a subdirectory in a VPATH build with
9755#          a relative $ac_aux_dir
9756#
9757# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9758# are both prefixed by $srcdir.  In an in-source build this is usually
9759# harmless because $srcdir is `.', but things will broke when you
9760# start a VPATH build or use an absolute $srcdir.
9761#
9762# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9763# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9764#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9765# and then we would define $MISSING as
9766#   MISSING="\${SHELL} $am_aux_dir/missing"
9767# This will work as long as MISSING is not called from configure, because
9768# unfortunately $(top_srcdir) has no meaning in configure.
9769# However there are other variables, like CC, which are often used in
9770# configure, and could therefore not use this "fixed" $ac_aux_dir.
9771#
9772# Another solution, used here, is to always expand $ac_aux_dir to an
9773# absolute PATH.  The drawback is that using absolute paths prevent a
9774# configured tree to be moved without reconfiguration.
9775
9776AC_DEFUN([AM_AUX_DIR_EXPAND],
9777[dnl Rely on autoconf to set up CDPATH properly.
9778AC_PREREQ([2.50])dnl
9779# expand $ac_aux_dir to an absolute path
9780am_aux_dir=`cd $ac_aux_dir && pwd`
9781])
9782
9783# AM_CONDITIONAL                                            -*- Autoconf -*-
9784
9785# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
9786# Free Software Foundation, Inc.
9787#
9788# This file is free software; the Free Software Foundation
9789# gives unlimited permission to copy and/or distribute it,
9790# with or without modifications, as long as this notice is preserved.
9791
9792# serial 8
9793
9794# AM_CONDITIONAL(NAME, SHELL-CONDITION)
9795# -------------------------------------
9796# Define a conditional.
9797AC_DEFUN([AM_CONDITIONAL],
9798[AC_PREREQ(2.52)dnl
9799 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
9800	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
9801AC_SUBST([$1_TRUE])dnl
9802AC_SUBST([$1_FALSE])dnl
9803_AM_SUBST_NOTMAKE([$1_TRUE])dnl
9804_AM_SUBST_NOTMAKE([$1_FALSE])dnl
9805if $2; then
9806  $1_TRUE=
9807  $1_FALSE='#'
9808else
9809  $1_TRUE='#'
9810  $1_FALSE=
9811fi
9812AC_CONFIG_COMMANDS_PRE(
9813[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
9814  AC_MSG_ERROR([[conditional "$1" was never defined.
9815Usually this means the macro was only invoked conditionally.]])
9816fi])])
9817
9818# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
9819# Free Software Foundation, Inc.
9820#
9821# This file is free software; the Free Software Foundation
9822# gives unlimited permission to copy and/or distribute it,
9823# with or without modifications, as long as this notice is preserved.
9824
9825# serial 9
9826
9827# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
9828# written in clear, in which case automake, when reading aclocal.m4,
9829# will think it sees a *use*, and therefore will trigger all it's
9830# C support machinery.  Also note that it means that autoscan, seeing
9831# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
9832
9833
9834# _AM_DEPENDENCIES(NAME)
9835# ----------------------
9836# See how the compiler implements dependency checking.
9837# NAME is "CC", "CXX", "GCJ", or "OBJC".
9838# We try a few techniques and use that to set a single cache variable.
9839#
9840# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
9841# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
9842# dependency, and given that the user is not expected to run this macro,
9843# just rely on AC_PROG_CC.
9844AC_DEFUN([_AM_DEPENDENCIES],
9845[AC_REQUIRE([AM_SET_DEPDIR])dnl
9846AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
9847AC_REQUIRE([AM_MAKE_INCLUDE])dnl
9848AC_REQUIRE([AM_DEP_TRACK])dnl
9849
9850ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
9851       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
9852       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
9853       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
9854       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
9855                   [depcc="$$1"   am_compiler_list=])
9856
9857AC_CACHE_CHECK([dependency style of $depcc],
9858               [am_cv_$1_dependencies_compiler_type],
9859[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
9860  # We make a subdir and do the tests there.  Otherwise we can end up
9861  # making bogus files that we don't know about and never remove.  For
9862  # instance it was reported that on HP-UX the gcc test will end up
9863  # making a dummy file named `D' -- because `-MD' means `put the output
9864  # in D'.
9865  mkdir conftest.dir
9866  # Copy depcomp to subdir because otherwise we won't find it if we're
9867  # using a relative directory.
9868  cp "$am_depcomp" conftest.dir
9869  cd conftest.dir
9870  # We will build objects and dependencies in a subdirectory because
9871  # it helps to detect inapplicable dependency modes.  For instance
9872  # both Tru64's cc and ICC support -MD to output dependencies as a
9873  # side effect of compilation, but ICC will put the dependencies in
9874  # the current directory while Tru64 will put them in the object
9875  # directory.
9876  mkdir sub
9877
9878  am_cv_$1_dependencies_compiler_type=none
9879  if test "$am_compiler_list" = ""; then
9880     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
9881  fi
9882  for depmode in $am_compiler_list; do
9883    # Setup a source with many dependencies, because some compilers
9884    # like to wrap large dependency lists on column 80 (with \), and
9885    # we should not choose a depcomp mode which is confused by this.
9886    #
9887    # We need to recreate these files for each test, as the compiler may
9888    # overwrite some of them when testing with obscure command lines.
9889    # This happens at least with the AIX C compiler.
9890    : > sub/conftest.c
9891    for i in 1 2 3 4 5 6; do
9892      echo '#include "conftst'$i'.h"' >> sub/conftest.c
9893      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
9894      # Solaris 8's {/usr,}/bin/sh.
9895      touch sub/conftst$i.h
9896    done
9897    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
9898
9899    case $depmode in
9900    nosideeffect)
9901      # after this tag, mechanisms are not by side-effect, so they'll
9902      # only be used when explicitly requested
9903      if test "x$enable_dependency_tracking" = xyes; then
9904	continue
9905      else
9906	break
9907      fi
9908      ;;
9909    none) break ;;
9910    esac
9911    # We check with `-c' and `-o' for the sake of the "dashmstdout"
9912    # mode.  It turns out that the SunPro C++ compiler does not properly
9913    # handle `-M -o', and we need to detect this.
9914    if depmode=$depmode \
9915       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
9916       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
9917       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
9918         >/dev/null 2>conftest.err &&
9919       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
9920       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
9921       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
9922       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
9923      # icc doesn't choke on unknown options, it will just issue warnings
9924      # or remarks (even with -Werror).  So we grep stderr for any message
9925      # that says an option was ignored or not supported.
9926      # When given -MP, icc 7.0 and 7.1 complain thusly:
9927      #   icc: Command line warning: ignoring option '-M'; no argument required
9928      # The diagnosis changed in icc 8.0:
9929      #   icc: Command line remark: option '-MP' not supported
9930      if (grep 'ignoring option' conftest.err ||
9931          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
9932        am_cv_$1_dependencies_compiler_type=$depmode
9933        break
9934      fi
9935    fi
9936  done
9937
9938  cd ..
9939  rm -rf conftest.dir
9940else
9941  am_cv_$1_dependencies_compiler_type=none
9942fi
9943])
9944AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
9945AM_CONDITIONAL([am__fastdep$1], [
9946  test "x$enable_dependency_tracking" != xno \
9947  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
9948])
9949
9950
9951# AM_SET_DEPDIR
9952# -------------
9953# Choose a directory name for dependency files.
9954# This macro is AC_REQUIREd in _AM_DEPENDENCIES
9955AC_DEFUN([AM_SET_DEPDIR],
9956[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
9957AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
9958])
9959
9960
9961# AM_DEP_TRACK
9962# ------------
9963AC_DEFUN([AM_DEP_TRACK],
9964[AC_ARG_ENABLE(dependency-tracking,
9965[  --disable-dependency-tracking  speeds up one-time build
9966  --enable-dependency-tracking   do not reject slow dependency extractors])
9967if test "x$enable_dependency_tracking" != xno; then
9968  am_depcomp="$ac_aux_dir/depcomp"
9969  AMDEPBACKSLASH='\'
9970fi
9971AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
9972AC_SUBST([AMDEPBACKSLASH])dnl
9973_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
9974])
9975
9976# Generate code to set up dependency tracking.              -*- Autoconf -*-
9977
9978# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
9979# Free Software Foundation, Inc.
9980#
9981# This file is free software; the Free Software Foundation
9982# gives unlimited permission to copy and/or distribute it,
9983# with or without modifications, as long as this notice is preserved.
9984
9985#serial 4
9986
9987# _AM_OUTPUT_DEPENDENCY_COMMANDS
9988# ------------------------------
9989AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
9990[# Autoconf 2.62 quotes --file arguments for eval, but not when files
9991# are listed without --file.  Let's play safe and only enable the eval
9992# if we detect the quoting.
9993case $CONFIG_FILES in
9994*\'*) eval set x "$CONFIG_FILES" ;;
9995*)   set x $CONFIG_FILES ;;
9996esac
9997shift
9998for mf
9999do
10000  # Strip MF so we end up with the name of the file.
10001  mf=`echo "$mf" | sed -e 's/:.*$//'`
10002  # Check whether this is an Automake generated Makefile or not.
10003  # We used to match only the files named `Makefile.in', but
10004  # some people rename them; so instead we look at the file content.
10005  # Grep'ing the first line is not enough: some people post-process
10006  # each Makefile.in and add a new line on top of each file to say so.
10007  # Grep'ing the whole file is not good either: AIX grep has a line
10008  # limit of 2048, but all sed's we know have understand at least 4000.
10009  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
10010    dirpart=`AS_DIRNAME("$mf")`
10011  else
10012    continue
10013  fi
10014  # Extract the definition of DEPDIR, am__include, and am__quote
10015  # from the Makefile without running `make'.
10016  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
10017  test -z "$DEPDIR" && continue
10018  am__include=`sed -n 's/^am__include = //p' < "$mf"`
10019  test -z "am__include" && continue
10020  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
10021  # When using ansi2knr, U may be empty or an underscore; expand it
10022  U=`sed -n 's/^U = //p' < "$mf"`
10023  # Find all dependency output files, they are included files with
10024  # $(DEPDIR) in their names.  We invoke sed twice because it is the
10025  # simplest approach to changing $(DEPDIR) to its actual value in the
10026  # expansion.
10027  for file in `sed -n "
10028    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
10029       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
10030    # Make sure the directory exists.
10031    test -f "$dirpart/$file" && continue
10032    fdir=`AS_DIRNAME(["$file"])`
10033    AS_MKDIR_P([$dirpart/$fdir])
10034    # echo "creating $dirpart/$file"
10035    echo '# dummy' > "$dirpart/$file"
10036  done
10037done
10038])# _AM_OUTPUT_DEPENDENCY_COMMANDS
10039
10040
10041# AM_OUTPUT_DEPENDENCY_COMMANDS
10042# -----------------------------
10043# This macro should only be invoked once -- use via AC_REQUIRE.
10044#
10045# This code is only required when automatic dependency tracking
10046# is enabled.  FIXME.  This creates each `.P' file that we will
10047# need in order to bootstrap the dependency handling code.
10048AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
10049[AC_CONFIG_COMMANDS([depfiles],
10050     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
10051     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
10052])
10053
10054# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
10055# Free Software Foundation, Inc.
10056#
10057# This file is free software; the Free Software Foundation
10058# gives unlimited permission to copy and/or distribute it,
10059# with or without modifications, as long as this notice is preserved.
10060
10061# serial 8
10062
10063# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
10064AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
10065
10066# Do all the work for Automake.                             -*- Autoconf -*-
10067
10068# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
10069# 2005, 2006, 2008 Free Software Foundation, Inc.
10070#
10071# This file is free software; the Free Software Foundation
10072# gives unlimited permission to copy and/or distribute it,
10073# with or without modifications, as long as this notice is preserved.
10074
10075# serial 13
10076
10077# This macro actually does too much.  Some checks are only needed if
10078# your package does certain things.  But this isn't really a big deal.
10079
10080# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
10081# AM_INIT_AUTOMAKE([OPTIONS])
10082# -----------------------------------------------
10083# The call with PACKAGE and VERSION arguments is the old style
10084# call (pre autoconf-2.50), which is being phased out.  PACKAGE
10085# and VERSION should now be passed to AC_INIT and removed from
10086# the call to AM_INIT_AUTOMAKE.
10087# We support both call styles for the transition.  After
10088# the next Automake release, Autoconf can make the AC_INIT
10089# arguments mandatory, and then we can depend on a new Autoconf
10090# release and drop the old call support.
10091AC_DEFUN([AM_INIT_AUTOMAKE],
10092[AC_PREREQ([2.60])dnl
10093dnl Autoconf wants to disallow AM_ names.  We explicitly allow
10094dnl the ones we care about.
10095m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
10096AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
10097AC_REQUIRE([AC_PROG_INSTALL])dnl
10098if test "`cd $srcdir && pwd`" != "`pwd`"; then
10099  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
10100  # is not polluted with repeated "-I."
10101  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
10102  # test to see if srcdir already configured
10103  if test -f $srcdir/config.status; then
10104    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
10105  fi
10106fi
10107
10108# test whether we have cygpath
10109if test -z "$CYGPATH_W"; then
10110  if (cygpath --version) >/dev/null 2>/dev/null; then
10111    CYGPATH_W='cygpath -w'
10112  else
10113    CYGPATH_W=echo
10114  fi
10115fi
10116AC_SUBST([CYGPATH_W])
10117
10118# Define the identity of the package.
10119dnl Distinguish between old-style and new-style calls.
10120m4_ifval([$2],
10121[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
10122 AC_SUBST([PACKAGE], [$1])dnl
10123 AC_SUBST([VERSION], [$2])],
10124[_AM_SET_OPTIONS([$1])dnl
10125dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
10126m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
10127  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
10128 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
10129 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
10130
10131_AM_IF_OPTION([no-define],,
10132[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
10133 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
10134
10135# Some tools Automake needs.
10136AC_REQUIRE([AM_SANITY_CHECK])dnl
10137AC_REQUIRE([AC_ARG_PROGRAM])dnl
10138AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
10139AM_MISSING_PROG(AUTOCONF, autoconf)
10140AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
10141AM_MISSING_PROG(AUTOHEADER, autoheader)
10142AM_MISSING_PROG(MAKEINFO, makeinfo)
10143AM_PROG_INSTALL_SH
10144AM_PROG_INSTALL_STRIP
10145AC_REQUIRE([AM_PROG_MKDIR_P])dnl
10146# We need awk for the "check" target.  The system "awk" is bad on
10147# some platforms.
10148AC_REQUIRE([AC_PROG_AWK])dnl
10149AC_REQUIRE([AC_PROG_MAKE_SET])dnl
10150AC_REQUIRE([AM_SET_LEADING_DOT])dnl
10151_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
10152              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
10153	      		     [_AM_PROG_TAR([v7])])])
10154_AM_IF_OPTION([no-dependencies],,
10155[AC_PROVIDE_IFELSE([AC_PROG_CC],
10156                  [_AM_DEPENDENCIES(CC)],
10157                  [define([AC_PROG_CC],
10158                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
10159AC_PROVIDE_IFELSE([AC_PROG_CXX],
10160                  [_AM_DEPENDENCIES(CXX)],
10161                  [define([AC_PROG_CXX],
10162                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
10163AC_PROVIDE_IFELSE([AC_PROG_OBJC],
10164                  [_AM_DEPENDENCIES(OBJC)],
10165                  [define([AC_PROG_OBJC],
10166                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
10167])
10168])
10169
10170
10171# When config.status generates a header, we must update the stamp-h file.
10172# This file resides in the same directory as the config header
10173# that is generated.  The stamp files are numbered to have different names.
10174
10175# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
10176# loop where config.status creates the headers, so we can generate
10177# our stamp files there.
10178AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
10179[# Compute $1's index in $config_headers.
10180_am_arg=$1
10181_am_stamp_count=1
10182for _am_header in $config_headers :; do
10183  case $_am_header in
10184    $_am_arg | $_am_arg:* )
10185      break ;;
10186    * )
10187      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
10188  esac
10189done
10190echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
10191
10192# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
10193#
10194# This file is free software; the Free Software Foundation
10195# gives unlimited permission to copy and/or distribute it,
10196# with or without modifications, as long as this notice is preserved.
10197
10198# AM_PROG_INSTALL_SH
10199# ------------------
10200# Define $install_sh.
10201AC_DEFUN([AM_PROG_INSTALL_SH],
10202[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10203install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
10204AC_SUBST(install_sh)])
10205
10206# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
10207#
10208# This file is free software; the Free Software Foundation
10209# gives unlimited permission to copy and/or distribute it,
10210# with or without modifications, as long as this notice is preserved.
10211
10212# serial 2
10213
10214# Check whether the underlying file-system supports filenames
10215# with a leading dot.  For instance MS-DOS doesn't.
10216AC_DEFUN([AM_SET_LEADING_DOT],
10217[rm -rf .tst 2>/dev/null
10218mkdir .tst 2>/dev/null
10219if test -d .tst; then
10220  am__leading_dot=.
10221else
10222  am__leading_dot=_
10223fi
10224rmdir .tst 2>/dev/null
10225AC_SUBST([am__leading_dot])])
10226
10227# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
10228# From Jim Meyering
10229
10230# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
10231# Free Software Foundation, Inc.
10232#
10233# This file is free software; the Free Software Foundation
10234# gives unlimited permission to copy and/or distribute it,
10235# with or without modifications, as long as this notice is preserved.
10236
10237# serial 4
10238
10239AC_DEFUN([AM_MAINTAINER_MODE],
10240[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
10241  dnl maintainer-mode is disabled by default
10242  AC_ARG_ENABLE(maintainer-mode,
10243[  --enable-maintainer-mode  enable make rules and dependencies not useful
10244			  (and sometimes confusing) to the casual installer],
10245      USE_MAINTAINER_MODE=$enableval,
10246      USE_MAINTAINER_MODE=no)
10247  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
10248  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
10249  MAINT=$MAINTAINER_MODE_TRUE
10250  AC_SUBST(MAINT)dnl
10251]
10252)
10253
10254AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
10255
10256# Check to see how 'make' treats includes.	            -*- Autoconf -*-
10257
10258# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
10259#
10260# This file is free software; the Free Software Foundation
10261# gives unlimited permission to copy and/or distribute it,
10262# with or without modifications, as long as this notice is preserved.
10263
10264# serial 3
10265
10266# AM_MAKE_INCLUDE()
10267# -----------------
10268# Check to see how make treats includes.
10269AC_DEFUN([AM_MAKE_INCLUDE],
10270[am_make=${MAKE-make}
10271cat > confinc << 'END'
10272am__doit:
10273	@echo done
10274.PHONY: am__doit
10275END
10276# If we don't find an include directive, just comment out the code.
10277AC_MSG_CHECKING([for style of include used by $am_make])
10278am__include="#"
10279am__quote=
10280_am_result=none
10281# First try GNU make style include.
10282echo "include confinc" > confmf
10283# We grep out `Entering directory' and `Leaving directory'
10284# messages which can occur if `w' ends up in MAKEFLAGS.
10285# In particular we don't look at `^make:' because GNU make might
10286# be invoked under some other name (usually "gmake"), in which
10287# case it prints its new name instead of `make'.
10288if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
10289   am__include=include
10290   am__quote=
10291   _am_result=GNU
10292fi
10293# Now try BSD make style include.
10294if test "$am__include" = "#"; then
10295   echo '.include "confinc"' > confmf
10296   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
10297      am__include=.include
10298      am__quote="\""
10299      _am_result=BSD
10300   fi
10301fi
10302AC_SUBST([am__include])
10303AC_SUBST([am__quote])
10304AC_MSG_RESULT([$_am_result])
10305rm -f confinc confmf
10306])
10307
10308# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
10309
10310# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
10311# Free Software Foundation, Inc.
10312#
10313# This file is free software; the Free Software Foundation
10314# gives unlimited permission to copy and/or distribute it,
10315# with or without modifications, as long as this notice is preserved.
10316
10317# serial 5
10318
10319# AM_MISSING_PROG(NAME, PROGRAM)
10320# ------------------------------
10321AC_DEFUN([AM_MISSING_PROG],
10322[AC_REQUIRE([AM_MISSING_HAS_RUN])
10323$1=${$1-"${am_missing_run}$2"}
10324AC_SUBST($1)])
10325
10326
10327# AM_MISSING_HAS_RUN
10328# ------------------
10329# Define MISSING if not defined so far and test if it supports --run.
10330# If it does, set am_missing_run to use it, otherwise, to nothing.
10331AC_DEFUN([AM_MISSING_HAS_RUN],
10332[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
10333AC_REQUIRE_AUX_FILE([missing])dnl
10334test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
10335# Use eval to expand $SHELL
10336if eval "$MISSING --run true"; then
10337  am_missing_run="$MISSING --run "
10338else
10339  am_missing_run=
10340  AC_MSG_WARN([`missing' script is too old or missing])
10341fi
10342])
10343
10344# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
10345#
10346# This file is free software; the Free Software Foundation
10347# gives unlimited permission to copy and/or distribute it,
10348# with or without modifications, as long as this notice is preserved.
10349
10350# AM_PROG_MKDIR_P
10351# ---------------
10352# Check for `mkdir -p'.
10353AC_DEFUN([AM_PROG_MKDIR_P],
10354[AC_PREREQ([2.60])dnl
10355AC_REQUIRE([AC_PROG_MKDIR_P])dnl
10356dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
10357dnl while keeping a definition of mkdir_p for backward compatibility.
10358dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
10359dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
10360dnl Makefile.ins that do not define MKDIR_P, so we do our own
10361dnl adjustment using top_builddir (which is defined more often than
10362dnl MKDIR_P).
10363AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
10364case $mkdir_p in
10365  [[\\/$]]* | ?:[[\\/]]*) ;;
10366  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
10367esac
10368])
10369
10370# Helper functions for option handling.                     -*- Autoconf -*-
10371
10372# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
10373#
10374# This file is free software; the Free Software Foundation
10375# gives unlimited permission to copy and/or distribute it,
10376# with or without modifications, as long as this notice is preserved.
10377
10378# serial 4
10379
10380# _AM_MANGLE_OPTION(NAME)
10381# -----------------------
10382AC_DEFUN([_AM_MANGLE_OPTION],
10383[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
10384
10385# _AM_SET_OPTION(NAME)
10386# ------------------------------
10387# Set option NAME.  Presently that only means defining a flag for this option.
10388AC_DEFUN([_AM_SET_OPTION],
10389[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
10390
10391# _AM_SET_OPTIONS(OPTIONS)
10392# ----------------------------------
10393# OPTIONS is a space-separated list of Automake options.
10394AC_DEFUN([_AM_SET_OPTIONS],
10395[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
10396
10397# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
10398# -------------------------------------------
10399# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
10400AC_DEFUN([_AM_IF_OPTION],
10401[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
10402
10403# Check to make sure that the build environment is sane.    -*- Autoconf -*-
10404
10405# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
10406# Free Software Foundation, Inc.
10407#
10408# This file is free software; the Free Software Foundation
10409# gives unlimited permission to copy and/or distribute it,
10410# with or without modifications, as long as this notice is preserved.
10411
10412# serial 4
10413
10414# AM_SANITY_CHECK
10415# ---------------
10416AC_DEFUN([AM_SANITY_CHECK],
10417[AC_MSG_CHECKING([whether build environment is sane])
10418# Just in case
10419sleep 1
10420echo timestamp > conftest.file
10421# Do `set' in a subshell so we don't clobber the current shell's
10422# arguments.  Must try -L first in case configure is actually a
10423# symlink; some systems play weird games with the mod time of symlinks
10424# (eg FreeBSD returns the mod time of the symlink's containing
10425# directory).
10426if (
10427   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
10428   if test "$[*]" = "X"; then
10429      # -L didn't work.
10430      set X `ls -t $srcdir/configure conftest.file`
10431   fi
10432   rm -f conftest.file
10433   if test "$[*]" != "X $srcdir/configure conftest.file" \
10434      && test "$[*]" != "X conftest.file $srcdir/configure"; then
10435
10436      # If neither matched, then we have a broken ls.  This can happen
10437      # if, for instance, CONFIG_SHELL is bash and it inherits a
10438      # broken ls alias from the environment.  This has actually
10439      # happened.  Such a system could not be considered "sane".
10440      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
10441alias in your environment])
10442   fi
10443
10444   test "$[2]" = conftest.file
10445   )
10446then
10447   # Ok.
10448   :
10449else
10450   AC_MSG_ERROR([newly created file is older than distributed files!
10451Check your system clock])
10452fi
10453AC_MSG_RESULT(yes)])
10454
10455# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
10456#
10457# This file is free software; the Free Software Foundation
10458# gives unlimited permission to copy and/or distribute it,
10459# with or without modifications, as long as this notice is preserved.
10460
10461# AM_PROG_INSTALL_STRIP
10462# ---------------------
10463# One issue with vendor `install' (even GNU) is that you can't
10464# specify the program used to strip binaries.  This is especially
10465# annoying in cross-compiling environments, where the build's strip
10466# is unlikely to handle the host's binaries.
10467# Fortunately install-sh will honor a STRIPPROG variable, so we
10468# always use install-sh in `make install-strip', and initialize
10469# STRIPPROG with the value of the STRIP variable (set by the user).
10470AC_DEFUN([AM_PROG_INSTALL_STRIP],
10471[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10472# Installed binaries are usually stripped using `strip' when the user
10473# run `make install-strip'.  However `strip' might not be the right
10474# tool to use in cross-compilation environments, therefore Automake
10475# will honor the `STRIP' environment variable to overrule this program.
10476dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
10477if test "$cross_compiling" != no; then
10478  AC_CHECK_TOOL([STRIP], [strip], :)
10479fi
10480INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10481AC_SUBST([INSTALL_STRIP_PROGRAM])])
10482
10483# Copyright (C) 2006  Free Software Foundation, Inc.
10484#
10485# This file is free software; the Free Software Foundation
10486# gives unlimited permission to copy and/or distribute it,
10487# with or without modifications, as long as this notice is preserved.
10488
10489# _AM_SUBST_NOTMAKE(VARIABLE)
10490# ---------------------------
10491# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10492# This macro is traced by Automake.
10493AC_DEFUN([_AM_SUBST_NOTMAKE])
10494
10495# Check how to create a tarball.                            -*- Autoconf -*-
10496
10497# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
10498#
10499# This file is free software; the Free Software Foundation
10500# gives unlimited permission to copy and/or distribute it,
10501# with or without modifications, as long as this notice is preserved.
10502
10503# serial 2
10504
10505# _AM_PROG_TAR(FORMAT)
10506# --------------------
10507# Check how to create a tarball in format FORMAT.
10508# FORMAT should be one of `v7', `ustar', or `pax'.
10509#
10510# Substitute a variable $(am__tar) that is a command
10511# writing to stdout a FORMAT-tarball containing the directory
10512# $tardir.
10513#     tardir=directory && $(am__tar) > result.tar
10514#
10515# Substitute a variable $(am__untar) that extract such
10516# a tarball read from stdin.
10517#     $(am__untar) < result.tar
10518AC_DEFUN([_AM_PROG_TAR],
10519[# Always define AMTAR for backward compatibility.
10520AM_MISSING_PROG([AMTAR], [tar])
10521m4_if([$1], [v7],
10522     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
10523     [m4_case([$1], [ustar],, [pax],,
10524              [m4_fatal([Unknown tar format])])
10525AC_MSG_CHECKING([how to create a $1 tar archive])
10526# Loop over all known methods to create a tar archive until one works.
10527_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10528_am_tools=${am_cv_prog_tar_$1-$_am_tools}
10529# Do not fold the above two line into one, because Tru64 sh and
10530# Solaris sh will not grok spaces in the rhs of `-'.
10531for _am_tool in $_am_tools
10532do
10533  case $_am_tool in
10534  gnutar)
10535    for _am_tar in tar gnutar gtar;
10536    do
10537      AM_RUN_LOG([$_am_tar --version]) && break
10538    done
10539    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10540    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10541    am__untar="$_am_tar -xf -"
10542    ;;
10543  plaintar)
10544    # Must skip GNU tar: if it does not support --format= it doesn't create
10545    # ustar tarball either.
10546    (tar --version) >/dev/null 2>&1 && continue
10547    am__tar='tar chf - "$$tardir"'
10548    am__tar_='tar chf - "$tardir"'
10549    am__untar='tar xf -'
10550    ;;
10551  pax)
10552    am__tar='pax -L -x $1 -w "$$tardir"'
10553    am__tar_='pax -L -x $1 -w "$tardir"'
10554    am__untar='pax -r'
10555    ;;
10556  cpio)
10557    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10558    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10559    am__untar='cpio -i -H $1 -d'
10560    ;;
10561  none)
10562    am__tar=false
10563    am__tar_=false
10564    am__untar=false
10565    ;;
10566  esac
10567
10568  # If the value was cached, stop now.  We just wanted to have am__tar
10569  # and am__untar set.
10570  test -n "${am_cv_prog_tar_$1}" && break
10571
10572  # tar/untar a dummy directory, and stop if the command works
10573  rm -rf conftest.dir
10574  mkdir conftest.dir
10575  echo GrepMe > conftest.dir/file
10576  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10577  rm -rf conftest.dir
10578  if test -s conftest.tar; then
10579    AM_RUN_LOG([$am__untar <conftest.tar])
10580    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10581  fi
10582done
10583rm -rf conftest.dir
10584
10585AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10586AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10587AC_SUBST([am__tar])
10588AC_SUBST([am__untar])
10589]) # _AM_PROG_TAR
10590
10591