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