Fix Makefile.am not to build GTK setup module.
[framework/uifw/ise-engine-hangul.git] / skim / 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 # iconv.m4 serial AM4 (gettext-0.11.3)
435 dnl Copyright (C) 2000-2002 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 dnl From Bruno Haible.
441
442 AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
443 [
444   dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
445   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
446   AC_REQUIRE([AC_LIB_RPATH])
447
448   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
449   dnl accordingly.
450   AC_LIB_LINKFLAGS_BODY([iconv])
451 ])
452
453 AC_DEFUN([AM_ICONV_LINK],
454 [
455   dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
456   dnl those with the standalone portable GNU libiconv installed).
457
458   dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
459   dnl accordingly.
460   AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
461
462   dnl Add $INCICONV to CPPFLAGS before performing the following checks,
463   dnl because if the user has installed libiconv and not disabled its use
464   dnl via --without-libiconv-prefix, he wants to use it. The first
465   dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
466   am_save_CPPFLAGS="$CPPFLAGS"
467   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
468
469   AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
470     am_cv_func_iconv="no, consider installing GNU libiconv"
471     am_cv_lib_iconv=no
472     AC_TRY_LINK([#include <stdlib.h>
473 #include <iconv.h>],
474       [iconv_t cd = iconv_open("","");
475        iconv(cd,NULL,NULL,NULL,NULL);
476        iconv_close(cd);],
477       am_cv_func_iconv=yes)
478     if test "$am_cv_func_iconv" != yes; then
479       am_save_LIBS="$LIBS"
480       LIBS="$LIBS $LIBICONV"
481       AC_TRY_LINK([#include <stdlib.h>
482 #include <iconv.h>],
483         [iconv_t cd = iconv_open("","");
484          iconv(cd,NULL,NULL,NULL,NULL);
485          iconv_close(cd);],
486         am_cv_lib_iconv=yes
487         am_cv_func_iconv=yes)
488       LIBS="$am_save_LIBS"
489     fi
490   ])
491   if test "$am_cv_func_iconv" = yes; then
492     AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
493   fi
494   if test "$am_cv_lib_iconv" = yes; then
495     AC_MSG_CHECKING([how to link with libiconv])
496     AC_MSG_RESULT([$LIBICONV])
497   else
498     dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
499     dnl either.
500     CPPFLAGS="$am_save_CPPFLAGS"
501     LIBICONV=
502     LTLIBICONV=
503   fi
504   AC_SUBST(LIBICONV)
505   AC_SUBST(LTLIBICONV)
506 ])
507
508 AC_DEFUN([AM_ICONV],
509 [
510   AM_ICONV_LINK
511   if test "$am_cv_func_iconv" = yes; then
512     AC_MSG_CHECKING([for iconv declaration])
513     AC_CACHE_VAL(am_cv_proto_iconv, [
514       AC_TRY_COMPILE([
515 #include <stdlib.h>
516 #include <iconv.h>
517 extern
518 #ifdef __cplusplus
519 "C"
520 #endif
521 #if defined(__STDC__) || defined(__cplusplus)
522 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
523 #else
524 size_t iconv();
525 #endif
526 ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
527       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
528     am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
529     AC_MSG_RESULT([$]{ac_t:-
530          }[$]am_cv_proto_iconv)
531     AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
532       [Define as const if the declaration of iconv() needs const.])
533   fi
534 ])
535
536 # lib-ld.m4 serial 3 (gettext-0.13)
537 dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
538 dnl This file is free software; the Free Software Foundation
539 dnl gives unlimited permission to copy and/or distribute it,
540 dnl with or without modifications, as long as this notice is preserved.
541
542 dnl Subroutines of libtool.m4,
543 dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
544 dnl with libtool.m4.
545
546 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
547 AC_DEFUN([AC_LIB_PROG_LD_GNU],
548 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
549 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
550 case `$LD -v 2>&1 </dev/null` in
551 *GNU* | *'with BFD'*)
552   acl_cv_prog_gnu_ld=yes ;;
553 *)
554   acl_cv_prog_gnu_ld=no ;;
555 esac])
556 with_gnu_ld=$acl_cv_prog_gnu_ld
557 ])
558
559 dnl From libtool-1.4. Sets the variable LD.
560 AC_DEFUN([AC_LIB_PROG_LD],
561 [AC_ARG_WITH(gnu-ld,
562 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
563 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
564 AC_REQUIRE([AC_PROG_CC])dnl
565 AC_REQUIRE([AC_CANONICAL_HOST])dnl
566 # Prepare PATH_SEPARATOR.
567 # The user is always right.
568 if test "${PATH_SEPARATOR+set}" != set; then
569   echo "#! /bin/sh" >conf$$.sh
570   echo  "exit 0"   >>conf$$.sh
571   chmod +x conf$$.sh
572   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
573     PATH_SEPARATOR=';'
574   else
575     PATH_SEPARATOR=:
576   fi
577   rm -f conf$$.sh
578 fi
579 ac_prog=ld
580 if test "$GCC" = yes; then
581   # Check if gcc -print-prog-name=ld gives a path.
582   AC_MSG_CHECKING([for ld used by GCC])
583   case $host in
584   *-*-mingw*)
585     # gcc leaves a trailing carriage return which upsets mingw
586     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
587   *)
588     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
589   esac
590   case $ac_prog in
591     # Accept absolute paths.
592     [[\\/]* | [A-Za-z]:[\\/]*)]
593       [re_direlt='/[^/][^/]*/\.\./']
594       # Canonicalize the path of ld
595       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
596       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
597         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
598       done
599       test -z "$LD" && LD="$ac_prog"
600       ;;
601   "")
602     # If it fails, then pretend we aren't using GCC.
603     ac_prog=ld
604     ;;
605   *)
606     # If it is relative, then search for the first ld in PATH.
607     with_gnu_ld=unknown
608     ;;
609   esac
610 elif test "$with_gnu_ld" = yes; then
611   AC_MSG_CHECKING([for GNU ld])
612 else
613   AC_MSG_CHECKING([for non-GNU ld])
614 fi
615 AC_CACHE_VAL(acl_cv_path_LD,
616 [if test -z "$LD"; then
617   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
618   for ac_dir in $PATH; do
619     test -z "$ac_dir" && ac_dir=.
620     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
621       acl_cv_path_LD="$ac_dir/$ac_prog"
622       # Check to see if the program is GNU ld.  I'd rather use --version,
623       # but apparently some GNU ld's only accept -v.
624       # Break only if it was the GNU/non-GNU ld that we prefer.
625       case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
626       *GNU* | *'with BFD'*)
627         test "$with_gnu_ld" != no && break ;;
628       *)
629         test "$with_gnu_ld" != yes && break ;;
630       esac
631     fi
632   done
633   IFS="$ac_save_ifs"
634 else
635   acl_cv_path_LD="$LD" # Let the user override the test with a path.
636 fi])
637 LD="$acl_cv_path_LD"
638 if test -n "$LD"; then
639   AC_MSG_RESULT($LD)
640 else
641   AC_MSG_RESULT(no)
642 fi
643 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
644 AC_LIB_PROG_LD_GNU
645 ])
646
647 # lib-link.m4 serial 9 (gettext-0.16)
648 dnl Copyright (C) 2001-2006 Free Software Foundation, Inc.
649 dnl This file is free software; the Free Software Foundation
650 dnl gives unlimited permission to copy and/or distribute it,
651 dnl with or without modifications, as long as this notice is preserved.
652
653 dnl From Bruno Haible.
654
655 AC_PREREQ(2.50)
656
657 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
658 dnl the libraries corresponding to explicit and implicit dependencies.
659 dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
660 dnl augments the CPPFLAGS variable.
661 AC_DEFUN([AC_LIB_LINKFLAGS],
662 [
663   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
664   AC_REQUIRE([AC_LIB_RPATH])
665   define([Name],[translit([$1],[./-], [___])])
666   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
667                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
668   AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
669     AC_LIB_LINKFLAGS_BODY([$1], [$2])
670     ac_cv_lib[]Name[]_libs="$LIB[]NAME"
671     ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
672     ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
673   ])
674   LIB[]NAME="$ac_cv_lib[]Name[]_libs"
675   LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
676   INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
677   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
678   AC_SUBST([LIB]NAME)
679   AC_SUBST([LTLIB]NAME)
680   dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
681   dnl results of this search when this library appears as a dependency.
682   HAVE_LIB[]NAME=yes
683   undefine([Name])
684   undefine([NAME])
685 ])
686
687 dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
688 dnl searches for libname and the libraries corresponding to explicit and
689 dnl implicit dependencies, together with the specified include files and
690 dnl the ability to compile and link the specified testcode. If found, it
691 dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
692 dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
693 dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
694 dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
695 AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
696 [
697   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
698   AC_REQUIRE([AC_LIB_RPATH])
699   define([Name],[translit([$1],[./-], [___])])
700   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
701                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
702
703   dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
704   dnl accordingly.
705   AC_LIB_LINKFLAGS_BODY([$1], [$2])
706
707   dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
708   dnl because if the user has installed lib[]Name and not disabled its use
709   dnl via --without-lib[]Name-prefix, he wants to use it.
710   ac_save_CPPFLAGS="$CPPFLAGS"
711   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
712
713   AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
714     ac_save_LIBS="$LIBS"
715     LIBS="$LIBS $LIB[]NAME"
716     AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
717     LIBS="$ac_save_LIBS"
718   ])
719   if test "$ac_cv_lib[]Name" = yes; then
720     HAVE_LIB[]NAME=yes
721     AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
722     AC_MSG_CHECKING([how to link with lib[]$1])
723     AC_MSG_RESULT([$LIB[]NAME])
724   else
725     HAVE_LIB[]NAME=no
726     dnl If $LIB[]NAME didn't lead to a usable library, we don't need
727     dnl $INC[]NAME either.
728     CPPFLAGS="$ac_save_CPPFLAGS"
729     LIB[]NAME=
730     LTLIB[]NAME=
731   fi
732   AC_SUBST([HAVE_LIB]NAME)
733   AC_SUBST([LIB]NAME)
734   AC_SUBST([LTLIB]NAME)
735   undefine([Name])
736   undefine([NAME])
737 ])
738
739 dnl Determine the platform dependent parameters needed to use rpath:
740 dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
741 dnl hardcode_direct, hardcode_minus_L.
742 AC_DEFUN([AC_LIB_RPATH],
743 [
744   dnl Tell automake >= 1.10 to complain if config.rpath is missing.
745   m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
746   AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
747   AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
748   AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
749   AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
750   AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
751     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
752     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
753     . ./conftest.sh
754     rm -f ./conftest.sh
755     acl_cv_rpath=done
756   ])
757   wl="$acl_cv_wl"
758   libext="$acl_cv_libext"
759   shlibext="$acl_cv_shlibext"
760   hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
761   hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
762   hardcode_direct="$acl_cv_hardcode_direct"
763   hardcode_minus_L="$acl_cv_hardcode_minus_L"
764   dnl Determine whether the user wants rpath handling at all.
765   AC_ARG_ENABLE(rpath,
766     [  --disable-rpath         do not hardcode runtime library paths],
767     :, enable_rpath=yes)
768 ])
769
770 dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
771 dnl the libraries corresponding to explicit and implicit dependencies.
772 dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
773 AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
774 [
775   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
776   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
777                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
778   dnl By default, look in $includedir and $libdir.
779   use_additional=yes
780   AC_LIB_WITH_FINAL_PREFIX([
781     eval additional_includedir=\"$includedir\"
782     eval additional_libdir=\"$libdir\"
783   ])
784   AC_LIB_ARG_WITH([lib$1-prefix],
785 [  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
786   --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
787 [
788     if test "X$withval" = "Xno"; then
789       use_additional=no
790     else
791       if test "X$withval" = "X"; then
792         AC_LIB_WITH_FINAL_PREFIX([
793           eval additional_includedir=\"$includedir\"
794           eval additional_libdir=\"$libdir\"
795         ])
796       else
797         additional_includedir="$withval/include"
798         additional_libdir="$withval/$acl_libdirstem"
799       fi
800     fi
801 ])
802   dnl Search the library and its dependencies in $additional_libdir and
803   dnl $LDFLAGS. Using breadth-first-seach.
804   LIB[]NAME=
805   LTLIB[]NAME=
806   INC[]NAME=
807   rpathdirs=
808   ltrpathdirs=
809   names_already_handled=
810   names_next_round='$1 $2'
811   while test -n "$names_next_round"; do
812     names_this_round="$names_next_round"
813     names_next_round=
814     for name in $names_this_round; do
815       already_handled=
816       for n in $names_already_handled; do
817         if test "$n" = "$name"; then
818           already_handled=yes
819           break
820         fi
821       done
822       if test -z "$already_handled"; then
823         names_already_handled="$names_already_handled $name"
824         dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
825         dnl or AC_LIB_HAVE_LINKFLAGS call.
826         uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
827         eval value=\"\$HAVE_LIB$uppername\"
828         if test -n "$value"; then
829           if test "$value" = yes; then
830             eval value=\"\$LIB$uppername\"
831             test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
832             eval value=\"\$LTLIB$uppername\"
833             test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
834           else
835             dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
836             dnl that this library doesn't exist. So just drop it.
837             :
838           fi
839         else
840           dnl Search the library lib$name in $additional_libdir and $LDFLAGS
841           dnl and the already constructed $LIBNAME/$LTLIBNAME.
842           found_dir=
843           found_la=
844           found_so=
845           found_a=
846           if test $use_additional = yes; then
847             if test -n "$shlibext" \
848                && { test -f "$additional_libdir/lib$name.$shlibext" \
849                     || { test "$shlibext" = dll \
850                          && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
851               found_dir="$additional_libdir"
852               if test -f "$additional_libdir/lib$name.$shlibext"; then
853                 found_so="$additional_libdir/lib$name.$shlibext"
854               else
855                 found_so="$additional_libdir/lib$name.dll.a"
856               fi
857               if test -f "$additional_libdir/lib$name.la"; then
858                 found_la="$additional_libdir/lib$name.la"
859               fi
860             else
861               if test -f "$additional_libdir/lib$name.$libext"; then
862                 found_dir="$additional_libdir"
863                 found_a="$additional_libdir/lib$name.$libext"
864                 if test -f "$additional_libdir/lib$name.la"; then
865                   found_la="$additional_libdir/lib$name.la"
866                 fi
867               fi
868             fi
869           fi
870           if test "X$found_dir" = "X"; then
871             for x in $LDFLAGS $LTLIB[]NAME; do
872               AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
873               case "$x" in
874                 -L*)
875                   dir=`echo "X$x" | sed -e 's/^X-L//'`
876                   if test -n "$shlibext" \
877                      && { test -f "$dir/lib$name.$shlibext" \
878                           || { test "$shlibext" = dll \
879                                && test -f "$dir/lib$name.dll.a"; }; }; then
880                     found_dir="$dir"
881                     if test -f "$dir/lib$name.$shlibext"; then
882                       found_so="$dir/lib$name.$shlibext"
883                     else
884                       found_so="$dir/lib$name.dll.a"
885                     fi
886                     if test -f "$dir/lib$name.la"; then
887                       found_la="$dir/lib$name.la"
888                     fi
889                   else
890                     if test -f "$dir/lib$name.$libext"; then
891                       found_dir="$dir"
892                       found_a="$dir/lib$name.$libext"
893                       if test -f "$dir/lib$name.la"; then
894                         found_la="$dir/lib$name.la"
895                       fi
896                     fi
897                   fi
898                   ;;
899               esac
900               if test "X$found_dir" != "X"; then
901                 break
902               fi
903             done
904           fi
905           if test "X$found_dir" != "X"; then
906             dnl Found the library.
907             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
908             if test "X$found_so" != "X"; then
909               dnl Linking with a shared library. We attempt to hardcode its
910               dnl directory into the executable's runpath, unless it's the
911               dnl standard /usr/lib.
912               if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
913                 dnl No hardcoding is needed.
914                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
915               else
916                 dnl Use an explicit option to hardcode DIR into the resulting
917                 dnl binary.
918                 dnl Potentially add DIR to ltrpathdirs.
919                 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
920                 haveit=
921                 for x in $ltrpathdirs; do
922                   if test "X$x" = "X$found_dir"; then
923                     haveit=yes
924                     break
925                   fi
926                 done
927                 if test -z "$haveit"; then
928                   ltrpathdirs="$ltrpathdirs $found_dir"
929                 fi
930                 dnl The hardcoding into $LIBNAME is system dependent.
931                 if test "$hardcode_direct" = yes; then
932                   dnl Using DIR/libNAME.so during linking hardcodes DIR into the
933                   dnl resulting binary.
934                   LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
935                 else
936                   if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
937                     dnl Use an explicit option to hardcode DIR into the resulting
938                     dnl binary.
939                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
940                     dnl Potentially add DIR to rpathdirs.
941                     dnl The rpathdirs will be appended to $LIBNAME at the end.
942                     haveit=
943                     for x in $rpathdirs; do
944                       if test "X$x" = "X$found_dir"; then
945                         haveit=yes
946                         break
947                       fi
948                     done
949                     if test -z "$haveit"; then
950                       rpathdirs="$rpathdirs $found_dir"
951                     fi
952                   else
953                     dnl Rely on "-L$found_dir".
954                     dnl But don't add it if it's already contained in the LDFLAGS
955                     dnl or the already constructed $LIBNAME
956                     haveit=
957                     for x in $LDFLAGS $LIB[]NAME; do
958                       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
959                       if test "X$x" = "X-L$found_dir"; then
960                         haveit=yes
961                         break
962                       fi
963                     done
964                     if test -z "$haveit"; then
965                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
966                     fi
967                     if test "$hardcode_minus_L" != no; then
968                       dnl FIXME: Not sure whether we should use
969                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
970                       dnl here.
971                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
972                     else
973                       dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
974                       dnl here, because this doesn't fit in flags passed to the
975                       dnl compiler. So give up. No hardcoding. This affects only
976                       dnl very old systems.
977                       dnl FIXME: Not sure whether we should use
978                       dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
979                       dnl here.
980                       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
981                     fi
982                   fi
983                 fi
984               fi
985             else
986               if test "X$found_a" != "X"; then
987                 dnl Linking with a static library.
988                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
989               else
990                 dnl We shouldn't come here, but anyway it's good to have a
991                 dnl fallback.
992                 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
993               fi
994             fi
995             dnl Assume the include files are nearby.
996             additional_includedir=
997             case "$found_dir" in
998               */$acl_libdirstem | */$acl_libdirstem/)
999                 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
1000                 additional_includedir="$basedir/include"
1001                 ;;
1002             esac
1003             if test "X$additional_includedir" != "X"; then
1004               dnl Potentially add $additional_includedir to $INCNAME.
1005               dnl But don't add it
1006               dnl   1. if it's the standard /usr/include,
1007               dnl   2. if it's /usr/local/include and we are using GCC on Linux,
1008               dnl   3. if it's already present in $CPPFLAGS or the already
1009               dnl      constructed $INCNAME,
1010               dnl   4. if it doesn't exist as a directory.
1011               if test "X$additional_includedir" != "X/usr/include"; then
1012                 haveit=
1013                 if test "X$additional_includedir" = "X/usr/local/include"; then
1014                   if test -n "$GCC"; then
1015                     case $host_os in
1016                       linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1017                     esac
1018                   fi
1019                 fi
1020                 if test -z "$haveit"; then
1021                   for x in $CPPFLAGS $INC[]NAME; do
1022                     AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1023                     if test "X$x" = "X-I$additional_includedir"; then
1024                       haveit=yes
1025                       break
1026                     fi
1027                   done
1028                   if test -z "$haveit"; then
1029                     if test -d "$additional_includedir"; then
1030                       dnl Really add $additional_includedir to $INCNAME.
1031                       INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
1032                     fi
1033                   fi
1034                 fi
1035               fi
1036             fi
1037             dnl Look for dependencies.
1038             if test -n "$found_la"; then
1039               dnl Read the .la file. It defines the variables
1040               dnl dlname, library_names, old_library, dependency_libs, current,
1041               dnl age, revision, installed, dlopen, dlpreopen, libdir.
1042               save_libdir="$libdir"
1043               case "$found_la" in
1044                 */* | *\\*) . "$found_la" ;;
1045                 *) . "./$found_la" ;;
1046               esac
1047               libdir="$save_libdir"
1048               dnl We use only dependency_libs.
1049               for dep in $dependency_libs; do
1050                 case "$dep" in
1051                   -L*)
1052                     additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
1053                     dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
1054                     dnl But don't add it
1055                     dnl   1. if it's the standard /usr/lib,
1056                     dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
1057                     dnl   3. if it's already present in $LDFLAGS or the already
1058                     dnl      constructed $LIBNAME,
1059                     dnl   4. if it doesn't exist as a directory.
1060                     if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1061                       haveit=
1062                       if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1063                         if test -n "$GCC"; then
1064                           case $host_os in
1065                             linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1066                           esac
1067                         fi
1068                       fi
1069                       if test -z "$haveit"; then
1070                         haveit=
1071                         for x in $LDFLAGS $LIB[]NAME; do
1072                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1073                           if test "X$x" = "X-L$additional_libdir"; then
1074                             haveit=yes
1075                             break
1076                           fi
1077                         done
1078                         if test -z "$haveit"; then
1079                           if test -d "$additional_libdir"; then
1080                             dnl Really add $additional_libdir to $LIBNAME.
1081                             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
1082                           fi
1083                         fi
1084                         haveit=
1085                         for x in $LDFLAGS $LTLIB[]NAME; do
1086                           AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1087                           if test "X$x" = "X-L$additional_libdir"; then
1088                             haveit=yes
1089                             break
1090                           fi
1091                         done
1092                         if test -z "$haveit"; then
1093                           if test -d "$additional_libdir"; then
1094                             dnl Really add $additional_libdir to $LTLIBNAME.
1095                             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
1096                           fi
1097                         fi
1098                       fi
1099                     fi
1100                     ;;
1101                   -R*)
1102                     dir=`echo "X$dep" | sed -e 's/^X-R//'`
1103                     if test "$enable_rpath" != no; then
1104                       dnl Potentially add DIR to rpathdirs.
1105                       dnl The rpathdirs will be appended to $LIBNAME at the end.
1106                       haveit=
1107                       for x in $rpathdirs; do
1108                         if test "X$x" = "X$dir"; then
1109                           haveit=yes
1110                           break
1111                         fi
1112                       done
1113                       if test -z "$haveit"; then
1114                         rpathdirs="$rpathdirs $dir"
1115                       fi
1116                       dnl Potentially add DIR to ltrpathdirs.
1117                       dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
1118                       haveit=
1119                       for x in $ltrpathdirs; do
1120                         if test "X$x" = "X$dir"; then
1121                           haveit=yes
1122                           break
1123                         fi
1124                       done
1125                       if test -z "$haveit"; then
1126                         ltrpathdirs="$ltrpathdirs $dir"
1127                       fi
1128                     fi
1129                     ;;
1130                   -l*)
1131                     dnl Handle this in the next round.
1132                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
1133                     ;;
1134                   *.la)
1135                     dnl Handle this in the next round. Throw away the .la's
1136                     dnl directory; it is already contained in a preceding -L
1137                     dnl option.
1138                     names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
1139                     ;;
1140                   *)
1141                     dnl Most likely an immediate library name.
1142                     LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
1143                     LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
1144                     ;;
1145                 esac
1146               done
1147             fi
1148           else
1149             dnl Didn't find the library; assume it is in the system directories
1150             dnl known to the linker and runtime loader. (All the system
1151             dnl directories known to the linker should also be known to the
1152             dnl runtime loader, otherwise the system is severely misconfigured.)
1153             LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
1154             LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
1155           fi
1156         fi
1157       fi
1158     done
1159   done
1160   if test "X$rpathdirs" != "X"; then
1161     if test -n "$hardcode_libdir_separator"; then
1162       dnl Weird platform: only the last -rpath option counts, the user must
1163       dnl pass all path elements in one option. We can arrange that for a
1164       dnl single library, but not when more than one $LIBNAMEs are used.
1165       alldirs=
1166       for found_dir in $rpathdirs; do
1167         alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
1168       done
1169       dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
1170       acl_save_libdir="$libdir"
1171       libdir="$alldirs"
1172       eval flag=\"$hardcode_libdir_flag_spec\"
1173       libdir="$acl_save_libdir"
1174       LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1175     else
1176       dnl The -rpath options are cumulative.
1177       for found_dir in $rpathdirs; do
1178         acl_save_libdir="$libdir"
1179         libdir="$found_dir"
1180         eval flag=\"$hardcode_libdir_flag_spec\"
1181         libdir="$acl_save_libdir"
1182         LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
1183       done
1184     fi
1185   fi
1186   if test "X$ltrpathdirs" != "X"; then
1187     dnl When using libtool, the option that works for both libraries and
1188     dnl executables is -R. The -R options are cumulative.
1189     for found_dir in $ltrpathdirs; do
1190       LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
1191     done
1192   fi
1193 ])
1194
1195 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
1196 dnl unless already present in VAR.
1197 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
1198 dnl contains two or three consecutive elements that belong together.
1199 AC_DEFUN([AC_LIB_APPENDTOVAR],
1200 [
1201   for element in [$2]; do
1202     haveit=
1203     for x in $[$1]; do
1204       AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1205       if test "X$x" = "X$element"; then
1206         haveit=yes
1207         break
1208       fi
1209     done
1210     if test -z "$haveit"; then
1211       [$1]="${[$1]}${[$1]:+ }$element"
1212     fi
1213   done
1214 ])
1215
1216 dnl For those cases where a variable contains several -L and -l options
1217 dnl referring to unknown libraries and directories, this macro determines the
1218 dnl necessary additional linker options for the runtime path.
1219 dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
1220 dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
1221 dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
1222 dnl otherwise linking without libtool is assumed.
1223 AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
1224 [
1225   AC_REQUIRE([AC_LIB_RPATH])
1226   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1227   $1=
1228   if test "$enable_rpath" != no; then
1229     if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
1230       dnl Use an explicit option to hardcode directories into the resulting
1231       dnl binary.
1232       rpathdirs=
1233       next=
1234       for opt in $2; do
1235         if test -n "$next"; then
1236           dir="$next"
1237           dnl No need to hardcode the standard /usr/lib.
1238           if test "X$dir" != "X/usr/$acl_libdirstem"; then
1239             rpathdirs="$rpathdirs $dir"
1240           fi
1241           next=
1242         else
1243           case $opt in
1244             -L) next=yes ;;
1245             -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
1246                  dnl No need to hardcode the standard /usr/lib.
1247                  if test "X$dir" != "X/usr/$acl_libdirstem"; then
1248                    rpathdirs="$rpathdirs $dir"
1249                  fi
1250                  next= ;;
1251             *) next= ;;
1252           esac
1253         fi
1254       done
1255       if test "X$rpathdirs" != "X"; then
1256         if test -n ""$3""; then
1257           dnl libtool is used for linking. Use -R options.
1258           for dir in $rpathdirs; do
1259             $1="${$1}${$1:+ }-R$dir"
1260           done
1261         else
1262           dnl The linker is used for linking directly.
1263           if test -n "$hardcode_libdir_separator"; then
1264             dnl Weird platform: only the last -rpath option counts, the user
1265             dnl must pass all path elements in one option.
1266             alldirs=
1267             for dir in $rpathdirs; do
1268               alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir"
1269             done
1270             acl_save_libdir="$libdir"
1271             libdir="$alldirs"
1272             eval flag=\"$hardcode_libdir_flag_spec\"
1273             libdir="$acl_save_libdir"
1274             $1="$flag"
1275           else
1276             dnl The -rpath options are cumulative.
1277             for dir in $rpathdirs; do
1278               acl_save_libdir="$libdir"
1279               libdir="$dir"
1280               eval flag=\"$hardcode_libdir_flag_spec\"
1281               libdir="$acl_save_libdir"
1282               $1="${$1}${$1:+ }$flag"
1283             done
1284           fi
1285         fi
1286       fi
1287     fi
1288   fi
1289   AC_SUBST([$1])
1290 ])
1291
1292 # lib-prefix.m4 serial 5 (gettext-0.15)
1293 dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
1294 dnl This file is free software; the Free Software Foundation
1295 dnl gives unlimited permission to copy and/or distribute it,
1296 dnl with or without modifications, as long as this notice is preserved.
1297
1298 dnl From Bruno Haible.
1299
1300 dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
1301 dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
1302 dnl require excessive bracketing.
1303 ifdef([AC_HELP_STRING],
1304 [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
1305 [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
1306
1307 dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
1308 dnl to access previously installed libraries. The basic assumption is that
1309 dnl a user will want packages to use other packages he previously installed
1310 dnl with the same --prefix option.
1311 dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
1312 dnl libraries, but is otherwise very convenient.
1313 AC_DEFUN([AC_LIB_PREFIX],
1314 [
1315   AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
1316   AC_REQUIRE([AC_PROG_CC])
1317   AC_REQUIRE([AC_CANONICAL_HOST])
1318   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
1319   AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
1320   dnl By default, look in $includedir and $libdir.
1321   use_additional=yes
1322   AC_LIB_WITH_FINAL_PREFIX([
1323     eval additional_includedir=\"$includedir\"
1324     eval additional_libdir=\"$libdir\"
1325   ])
1326   AC_LIB_ARG_WITH([lib-prefix],
1327 [  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
1328   --without-lib-prefix    don't search for libraries in includedir and libdir],
1329 [
1330     if test "X$withval" = "Xno"; then
1331       use_additional=no
1332     else
1333       if test "X$withval" = "X"; then
1334         AC_LIB_WITH_FINAL_PREFIX([
1335           eval additional_includedir=\"$includedir\"
1336           eval additional_libdir=\"$libdir\"
1337         ])
1338       else
1339         additional_includedir="$withval/include"
1340         additional_libdir="$withval/$acl_libdirstem"
1341       fi
1342     fi
1343 ])
1344   if test $use_additional = yes; then
1345     dnl Potentially add $additional_includedir to $CPPFLAGS.
1346     dnl But don't add it
1347     dnl   1. if it's the standard /usr/include,
1348     dnl   2. if it's already present in $CPPFLAGS,
1349     dnl   3. if it's /usr/local/include and we are using GCC on Linux,
1350     dnl   4. if it doesn't exist as a directory.
1351     if test "X$additional_includedir" != "X/usr/include"; then
1352       haveit=
1353       for x in $CPPFLAGS; do
1354         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1355         if test "X$x" = "X-I$additional_includedir"; then
1356           haveit=yes
1357           break
1358         fi
1359       done
1360       if test -z "$haveit"; then
1361         if test "X$additional_includedir" = "X/usr/local/include"; then
1362           if test -n "$GCC"; then
1363             case $host_os in
1364               linux* | gnu* | k*bsd*-gnu) haveit=yes;;
1365             esac
1366           fi
1367         fi
1368         if test -z "$haveit"; then
1369           if test -d "$additional_includedir"; then
1370             dnl Really add $additional_includedir to $CPPFLAGS.
1371             CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
1372           fi
1373         fi
1374       fi
1375     fi
1376     dnl Potentially add $additional_libdir to $LDFLAGS.
1377     dnl But don't add it
1378     dnl   1. if it's the standard /usr/lib,
1379     dnl   2. if it's already present in $LDFLAGS,
1380     dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
1381     dnl   4. if it doesn't exist as a directory.
1382     if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
1383       haveit=
1384       for x in $LDFLAGS; do
1385         AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
1386         if test "X$x" = "X-L$additional_libdir"; then
1387           haveit=yes
1388           break
1389         fi
1390       done
1391       if test -z "$haveit"; then
1392         if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
1393           if test -n "$GCC"; then
1394             case $host_os in
1395               linux*) haveit=yes;;
1396             esac
1397           fi
1398         fi
1399         if test -z "$haveit"; then
1400           if test -d "$additional_libdir"; then
1401             dnl Really add $additional_libdir to $LDFLAGS.
1402             LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
1403           fi
1404         fi
1405       fi
1406     fi
1407   fi
1408 ])
1409
1410 dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
1411 dnl acl_final_exec_prefix, containing the values to which $prefix and
1412 dnl $exec_prefix will expand at the end of the configure script.
1413 AC_DEFUN([AC_LIB_PREPARE_PREFIX],
1414 [
1415   dnl Unfortunately, prefix and exec_prefix get only finally determined
1416   dnl at the end of configure.
1417   if test "X$prefix" = "XNONE"; then
1418     acl_final_prefix="$ac_default_prefix"
1419   else
1420     acl_final_prefix="$prefix"
1421   fi
1422   if test "X$exec_prefix" = "XNONE"; then
1423     acl_final_exec_prefix='${prefix}'
1424   else
1425     acl_final_exec_prefix="$exec_prefix"
1426   fi
1427   acl_save_prefix="$prefix"
1428   prefix="$acl_final_prefix"
1429   eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
1430   prefix="$acl_save_prefix"
1431 ])
1432
1433 dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
1434 dnl variables prefix and exec_prefix bound to the values they will have
1435 dnl at the end of the configure script.
1436 AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
1437 [
1438   acl_save_prefix="$prefix"
1439   prefix="$acl_final_prefix"
1440   acl_save_exec_prefix="$exec_prefix"
1441   exec_prefix="$acl_final_exec_prefix"
1442   $1
1443   exec_prefix="$acl_save_exec_prefix"
1444   prefix="$acl_save_prefix"
1445 ])
1446
1447 dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
1448 dnl the basename of the libdir, either "lib" or "lib64".
1449 AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
1450 [
1451   dnl There is no formal standard regarding lib and lib64. The current
1452   dnl practice is that on a system supporting 32-bit and 64-bit instruction
1453   dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
1454   dnl libraries go under $prefix/lib. We determine the compiler's default
1455   dnl mode by looking at the compiler's library search path. If at least
1456   dnl of its elements ends in /lib64 or points to a directory whose absolute
1457   dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
1458   dnl default, namely "lib".
1459   acl_libdirstem=lib
1460   searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
1461   if test -n "$searchpath"; then
1462     acl_save_IFS="${IFS=        }"; IFS=":"
1463     for searchdir in $searchpath; do
1464       if test -d "$searchdir"; then
1465         case "$searchdir" in
1466           */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
1467           *) searchdir=`cd "$searchdir" && pwd`
1468              case "$searchdir" in
1469                */lib64 ) acl_libdirstem=lib64 ;;
1470              esac ;;
1471         esac
1472       fi
1473     done
1474     IFS="$acl_save_IFS"
1475   fi
1476 ])
1477
1478 # nls.m4 serial 3 (gettext-0.15)
1479 dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
1480 dnl This file is free software; the Free Software Foundation
1481 dnl gives unlimited permission to copy and/or distribute it,
1482 dnl with or without modifications, as long as this notice is preserved.
1483 dnl
1484 dnl This file can can be used in projects which are not available under
1485 dnl the GNU General Public License or the GNU Library General Public
1486 dnl License but which still want to provide support for the GNU gettext
1487 dnl functionality.
1488 dnl Please note that the actual code of the GNU gettext library is covered
1489 dnl by the GNU Library General Public License, and the rest of the GNU
1490 dnl gettext package package is covered by the GNU General Public License.
1491 dnl They are *not* in the public domain.
1492
1493 dnl Authors:
1494 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1495 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1496
1497 AC_PREREQ(2.50)
1498
1499 AC_DEFUN([AM_NLS],
1500 [
1501   AC_MSG_CHECKING([whether NLS is requested])
1502   dnl Default is enabled NLS
1503   AC_ARG_ENABLE(nls,
1504     [  --disable-nls           do not use Native Language Support],
1505     USE_NLS=$enableval, USE_NLS=yes)
1506   AC_MSG_RESULT($USE_NLS)
1507   AC_SUBST(USE_NLS)
1508 ])
1509
1510 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
1511
1512 # Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
1513 #
1514 # This program is free software; you can redistribute it and/or modify
1515 # it under the terms of the GNU General Public License as published by
1516 # the Free Software Foundation; either version 2 of the License, or
1517 # (at your option) any later version.
1518 #
1519 # This program is distributed in the hope that it will be useful, but
1520 # WITHOUT ANY WARRANTY; without even the implied warranty of
1521 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1522 # General Public License for more details.
1523 #
1524 # You should have received a copy of the GNU General Public License
1525 # along with this program; if not, write to the Free Software
1526 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1527 #
1528 # As a special exception to the GNU General Public License, if you
1529 # distribute this file as part of a program that contains a
1530 # configuration script generated by Autoconf, you may include it under
1531 # the same distribution terms that you use for the rest of that program.
1532
1533 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
1534 # ----------------------------------
1535 AC_DEFUN([PKG_PROG_PKG_CONFIG],
1536 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1537 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
1538 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
1539 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1540         AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1541 fi
1542 if test -n "$PKG_CONFIG"; then
1543         _pkg_min_version=m4_default([$1], [0.9.0])
1544         AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1545         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1546                 AC_MSG_RESULT([yes])
1547         else
1548                 AC_MSG_RESULT([no])
1549                 PKG_CONFIG=""
1550         fi
1551                 
1552 fi[]dnl
1553 ])# PKG_PROG_PKG_CONFIG
1554
1555 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1556 #
1557 # Check to see whether a particular set of modules exists.  Similar
1558 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
1559 #
1560 #
1561 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
1562 # this or PKG_CHECK_MODULES is called, or make sure to call
1563 # PKG_CHECK_EXISTS manually
1564 # --------------------------------------------------------------
1565 AC_DEFUN([PKG_CHECK_EXISTS],
1566 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1567 if test -n "$PKG_CONFIG" && \
1568     AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
1569   m4_ifval([$2], [$2], [:])
1570 m4_ifvaln([$3], [else
1571   $3])dnl
1572 fi])
1573
1574
1575 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1576 # ---------------------------------------------
1577 m4_define([_PKG_CONFIG],
1578 [if test -n "$PKG_CONFIG"; then
1579     if test -n "$$1"; then
1580         pkg_cv_[]$1="$$1"
1581     else
1582         PKG_CHECK_EXISTS([$3],
1583                          [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1584                          [pkg_failed=yes])
1585     fi
1586 else
1587         pkg_failed=untried
1588 fi[]dnl
1589 ])# _PKG_CONFIG
1590
1591 # _PKG_SHORT_ERRORS_SUPPORTED
1592 # -----------------------------
1593 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1594 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1595 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1596         _pkg_short_errors_supported=yes
1597 else
1598         _pkg_short_errors_supported=no
1599 fi[]dnl
1600 ])# _PKG_SHORT_ERRORS_SUPPORTED
1601
1602
1603 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1604 # [ACTION-IF-NOT-FOUND])
1605 #
1606 #
1607 # Note that if there is a possibility the first call to
1608 # PKG_CHECK_MODULES might not happen, you should be sure to include an
1609 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1610 #
1611 #
1612 # --------------------------------------------------------------
1613 AC_DEFUN([PKG_CHECK_MODULES],
1614 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1615 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1616 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1617
1618 pkg_failed=no
1619 AC_MSG_CHECKING([for $1])
1620
1621 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1622 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
1623
1624 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1625 and $1[]_LIBS to avoid the need to call pkg-config.
1626 See the pkg-config man page for more details.])
1627
1628 if test $pkg_failed = yes; then
1629         _PKG_SHORT_ERRORS_SUPPORTED
1630         if test $_pkg_short_errors_supported = yes; then
1631                 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
1632         else 
1633                 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
1634         fi
1635         # Put the nasty error message in config.log where it belongs
1636         echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1637
1638         ifelse([$4], , [AC_MSG_ERROR(dnl
1639 [Package requirements ($2) were not met:
1640
1641 $$1_PKG_ERRORS
1642
1643 Consider adjusting the PKG_CONFIG_PATH environment variable if you
1644 installed software in a non-standard prefix.
1645
1646 _PKG_TEXT
1647 ])],
1648                 [AC_MSG_RESULT([no])
1649                 $4])
1650 elif test $pkg_failed = untried; then
1651         ifelse([$4], , [AC_MSG_FAILURE(dnl
1652 [The pkg-config script could not be found or is too old.  Make sure it
1653 is in your PATH or set the PKG_CONFIG environment variable to the full
1654 path to pkg-config.
1655
1656 _PKG_TEXT
1657
1658 To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
1659                 [$4])
1660 else
1661         $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1662         $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1663         AC_MSG_RESULT([yes])
1664         ifelse([$3], , :, [$3])
1665 fi[]dnl
1666 ])# PKG_CHECK_MODULES
1667
1668 # po.m4 serial 13 (gettext-0.15)
1669 dnl Copyright (C) 1995-2006 Free Software Foundation, Inc.
1670 dnl This file is free software; the Free Software Foundation
1671 dnl gives unlimited permission to copy and/or distribute it,
1672 dnl with or without modifications, as long as this notice is preserved.
1673 dnl
1674 dnl This file can can be used in projects which are not available under
1675 dnl the GNU General Public License or the GNU Library General Public
1676 dnl License but which still want to provide support for the GNU gettext
1677 dnl functionality.
1678 dnl Please note that the actual code of the GNU gettext library is covered
1679 dnl by the GNU Library General Public License, and the rest of the GNU
1680 dnl gettext package package is covered by the GNU General Public License.
1681 dnl They are *not* in the public domain.
1682
1683 dnl Authors:
1684 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1685 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1686
1687 AC_PREREQ(2.50)
1688
1689 dnl Checks for all prerequisites of the po subdirectory.
1690 AC_DEFUN([AM_PO_SUBDIRS],
1691 [
1692   AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1693   AC_REQUIRE([AC_PROG_INSTALL])dnl
1694   AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
1695   AC_REQUIRE([AM_NLS])dnl
1696
1697   dnl Perform the following tests also if --disable-nls has been given,
1698   dnl because they are needed for "make dist" to work.
1699
1700   dnl Search for GNU msgfmt in the PATH.
1701   dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
1702   dnl The second test excludes FreeBSD msgfmt.
1703   AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
1704     [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
1705      (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1706     :)
1707   AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1708
1709   dnl Test whether it is GNU msgfmt >= 0.15.
1710 changequote(,)dnl
1711   case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
1712     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
1713     *) MSGFMT_015=$MSGFMT ;;
1714   esac
1715 changequote([,])dnl
1716   AC_SUBST([MSGFMT_015])
1717 changequote(,)dnl
1718   case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
1719     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
1720     *) GMSGFMT_015=$GMSGFMT ;;
1721   esac
1722 changequote([,])dnl
1723   AC_SUBST([GMSGFMT_015])
1724
1725   dnl Search for GNU xgettext 0.12 or newer in the PATH.
1726   dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
1727   dnl The second test excludes FreeBSD xgettext.
1728   AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
1729     [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
1730      (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
1731     :)
1732   dnl Remove leftover from FreeBSD xgettext call.
1733   rm -f messages.po
1734
1735   dnl Test whether it is GNU xgettext >= 0.15.
1736 changequote(,)dnl
1737   case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
1738     '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
1739     *) XGETTEXT_015=$XGETTEXT ;;
1740   esac
1741 changequote([,])dnl
1742   AC_SUBST([XGETTEXT_015])
1743
1744   dnl Search for GNU msgmerge 0.11 or newer in the PATH.
1745   AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
1746     [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
1747
1748   dnl Installation directories.
1749   dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
1750   dnl have to define it here, so that it can be used in po/Makefile.
1751   test -n "$localedir" || localedir='${datadir}/locale'
1752   AC_SUBST([localedir])
1753
1754   AC_CONFIG_COMMANDS([po-directories], [[
1755     for ac_file in $CONFIG_FILES; do
1756       # Support "outfile[:infile[:infile...]]"
1757       case "$ac_file" in
1758         *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1759       esac
1760       # PO directories have a Makefile.in generated from Makefile.in.in.
1761       case "$ac_file" in */Makefile.in)
1762         # Adjust a relative srcdir.
1763         ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1764         ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1765         ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1766         # In autoconf-2.13 it is called $ac_given_srcdir.
1767         # In autoconf-2.50 it is called $srcdir.
1768         test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1769         case "$ac_given_srcdir" in
1770           .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1771           /*) top_srcdir="$ac_given_srcdir" ;;
1772           *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
1773         esac
1774         # Treat a directory as a PO directory if and only if it has a
1775         # POTFILES.in file. This allows packages to have multiple PO
1776         # directories under different names or in different locations.
1777         if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
1778           rm -f "$ac_dir/POTFILES"
1779           test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
1780           cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[   ]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
1781           POMAKEFILEDEPS="POTFILES.in"
1782           # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
1783           # on $ac_dir but don't depend on user-specified configuration
1784           # parameters.
1785           if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1786             # The LINGUAS file contains the set of available languages.
1787             if test -n "$OBSOLETE_ALL_LINGUAS"; then
1788               test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1789             fi
1790             ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1791             # Hide the ALL_LINGUAS assigment from automake < 1.5.
1792             eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1793             POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
1794           else
1795             # The set of available languages was given in configure.in.
1796             # Hide the ALL_LINGUAS assigment from automake < 1.5.
1797             eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
1798           fi
1799           # Compute POFILES
1800           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
1801           # Compute UPDATEPOFILES
1802           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
1803           # Compute DUMMYPOFILES
1804           # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
1805           # Compute GMOFILES
1806           # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
1807           case "$ac_given_srcdir" in
1808             .) srcdirpre= ;;
1809             *) srcdirpre='$(srcdir)/' ;;
1810           esac
1811           POFILES=
1812           UPDATEPOFILES=
1813           DUMMYPOFILES=
1814           GMOFILES=
1815           for lang in $ALL_LINGUAS; do
1816             POFILES="$POFILES $srcdirpre$lang.po"
1817             UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
1818             DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
1819             GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
1820           done
1821           # CATALOGS depends on both $ac_dir and the user's LINGUAS
1822           # environment variable.
1823           INST_LINGUAS=
1824           if test -n "$ALL_LINGUAS"; then
1825             for presentlang in $ALL_LINGUAS; do
1826               useit=no
1827               if test "%UNSET%" != "$LINGUAS"; then
1828                 desiredlanguages="$LINGUAS"
1829               else
1830                 desiredlanguages="$ALL_LINGUAS"
1831               fi
1832               for desiredlang in $desiredlanguages; do
1833                 # Use the presentlang catalog if desiredlang is
1834                 #   a. equal to presentlang, or
1835                 #   b. a variant of presentlang (because in this case,
1836                 #      presentlang can be used as a fallback for messages
1837                 #      which are not translated in the desiredlang catalog).
1838                 case "$desiredlang" in
1839                   "$presentlang"*) useit=yes;;
1840                 esac
1841               done
1842               if test $useit = yes; then
1843                 INST_LINGUAS="$INST_LINGUAS $presentlang"
1844               fi
1845             done
1846           fi
1847           CATALOGS=
1848           if test -n "$INST_LINGUAS"; then
1849             for lang in $INST_LINGUAS; do
1850               CATALOGS="$CATALOGS $lang.gmo"
1851             done
1852           fi
1853           test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
1854           sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
1855           for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
1856             if test -f "$f"; then
1857               case "$f" in
1858                 *.orig | *.bak | *~) ;;
1859                 *) cat "$f" >> "$ac_dir/Makefile" ;;
1860               esac
1861             fi
1862           done
1863         fi
1864         ;;
1865       esac
1866     done]],
1867    [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
1868     # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
1869     # from automake < 1.5.
1870     eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
1871     # Capture the value of LINGUAS because we need it to compute CATALOGS.
1872     LINGUAS="${LINGUAS-%UNSET%}"
1873    ])
1874 ])
1875
1876 dnl Postprocesses a Makefile in a directory containing PO files.
1877 AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
1878 [
1879   # When this code is run, in config.status, two variables have already been
1880   # set:
1881   # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
1882   # - LINGUAS is the value of the environment variable LINGUAS at configure
1883   #   time.
1884
1885 changequote(,)dnl
1886   # Adjust a relative srcdir.
1887   ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
1888   ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
1889   ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
1890   # In autoconf-2.13 it is called $ac_given_srcdir.
1891   # In autoconf-2.50 it is called $srcdir.
1892   test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
1893   case "$ac_given_srcdir" in
1894     .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
1895     /*) top_srcdir="$ac_given_srcdir" ;;
1896     *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
1897   esac
1898
1899   # Find a way to echo strings without interpreting backslash.
1900   if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
1901     gt_echo='echo'
1902   else
1903     if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
1904       gt_echo='printf %s\n'
1905     else
1906       echo_func () {
1907         cat <<EOT
1908 $*
1909 EOT
1910       }
1911       gt_echo='echo_func'
1912     fi
1913   fi
1914
1915   # A sed script that extracts the value of VARIABLE from a Makefile.
1916   sed_x_variable='
1917 # Test if the hold space is empty.
1918 x
1919 s/P/P/
1920 x
1921 ta
1922 # Yes it was empty. Look if we have the expected variable definition.
1923 /^[      ]*VARIABLE[     ]*=/{
1924   # Seen the first line of the variable definition.
1925   s/^[   ]*VARIABLE[     ]*=//
1926   ba
1927 }
1928 bd
1929 :a
1930 # Here we are processing a line from the variable definition.
1931 # Remove comment, more precisely replace it with a space.
1932 s/#.*$/ /
1933 # See if the line ends in a backslash.
1934 tb
1935 :b
1936 s/\\$//
1937 # Print the line, without the trailing backslash.
1938 p
1939 tc
1940 # There was no trailing backslash. The end of the variable definition is
1941 # reached. Clear the hold space.
1942 s/^.*$//
1943 x
1944 bd
1945 :c
1946 # A trailing backslash means that the variable definition continues in the
1947 # next line. Put a nonempty string into the hold space to indicate this.
1948 s/^.*$/P/
1949 x
1950 :d
1951 '
1952 changequote([,])dnl
1953
1954   # Set POTFILES to the value of the Makefile variable POTFILES.
1955   sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
1956   POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
1957   # Compute POTFILES_DEPS as
1958   #   $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
1959   POTFILES_DEPS=
1960   for file in $POTFILES; do
1961     POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
1962   done
1963   POMAKEFILEDEPS=""
1964
1965   if test -n "$OBSOLETE_ALL_LINGUAS"; then
1966     test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
1967   fi
1968   if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
1969     # The LINGUAS file contains the set of available languages.
1970     ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
1971     POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
1972   else
1973     # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
1974     sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
1975     ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
1976   fi
1977   # Hide the ALL_LINGUAS assigment from automake < 1.5.
1978   eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
1979   # Compute POFILES
1980   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
1981   # Compute UPDATEPOFILES
1982   # as      $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
1983   # Compute DUMMYPOFILES
1984   # as      $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
1985   # Compute GMOFILES
1986   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
1987   # Compute PROPERTIESFILES
1988   # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
1989   # Compute CLASSFILES
1990   # as      $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
1991   # Compute QMFILES
1992   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
1993   # Compute MSGFILES
1994   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
1995   # Compute RESOURCESDLLFILES
1996   # as      $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
1997   case "$ac_given_srcdir" in
1998     .) srcdirpre= ;;
1999     *) srcdirpre='$(srcdir)/' ;;
2000   esac
2001   POFILES=
2002   UPDATEPOFILES=
2003   DUMMYPOFILES=
2004   GMOFILES=
2005   PROPERTIESFILES=
2006   CLASSFILES=
2007   QMFILES=
2008   MSGFILES=
2009   RESOURCESDLLFILES=
2010   for lang in $ALL_LINGUAS; do
2011     POFILES="$POFILES $srcdirpre$lang.po"
2012     UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
2013     DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
2014     GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
2015     PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
2016     CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
2017     QMFILES="$QMFILES $srcdirpre$lang.qm"
2018     frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2019     MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
2020     frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
2021     RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
2022   done
2023   # CATALOGS depends on both $ac_dir and the user's LINGUAS
2024   # environment variable.
2025   INST_LINGUAS=
2026   if test -n "$ALL_LINGUAS"; then
2027     for presentlang in $ALL_LINGUAS; do
2028       useit=no
2029       if test "%UNSET%" != "$LINGUAS"; then
2030         desiredlanguages="$LINGUAS"
2031       else
2032         desiredlanguages="$ALL_LINGUAS"
2033       fi
2034       for desiredlang in $desiredlanguages; do
2035         # Use the presentlang catalog if desiredlang is
2036         #   a. equal to presentlang, or
2037         #   b. a variant of presentlang (because in this case,
2038         #      presentlang can be used as a fallback for messages
2039         #      which are not translated in the desiredlang catalog).
2040         case "$desiredlang" in
2041           "$presentlang"*) useit=yes;;
2042         esac
2043       done
2044       if test $useit = yes; then
2045         INST_LINGUAS="$INST_LINGUAS $presentlang"
2046       fi
2047     done
2048   fi
2049   CATALOGS=
2050   JAVACATALOGS=
2051   QTCATALOGS=
2052   TCLCATALOGS=
2053   CSHARPCATALOGS=
2054   if test -n "$INST_LINGUAS"; then
2055     for lang in $INST_LINGUAS; do
2056       CATALOGS="$CATALOGS $lang.gmo"
2057       JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
2058       QTCATALOGS="$QTCATALOGS $lang.qm"
2059       frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2060       TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
2061       frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
2062       CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
2063     done
2064   fi
2065
2066   sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
2067   if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
2068     # Add dependencies that cannot be formulated as a simple suffix rule.
2069     for lang in $ALL_LINGUAS; do
2070       frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
2071       cat >> "$ac_file.tmp" <<EOF
2072 $frobbedlang.msg: $lang.po
2073         @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
2074         \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2075 EOF
2076     done
2077   fi
2078   if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
2079     # Add dependencies that cannot be formulated as a simple suffix rule.
2080     for lang in $ALL_LINGUAS; do
2081       frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
2082       cat >> "$ac_file.tmp" <<EOF
2083 $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
2084         @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
2085         \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
2086 EOF
2087     done
2088   fi
2089   if test -n "$POMAKEFILEDEPS"; then
2090     cat >> "$ac_file.tmp" <<EOF
2091 Makefile: $POMAKEFILEDEPS
2092 EOF
2093   fi
2094   mv "$ac_file.tmp" "$ac_file"
2095 ])
2096
2097 # progtest.m4 serial 4 (gettext-0.14.2)
2098 dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
2099 dnl This file is free software; the Free Software Foundation
2100 dnl gives unlimited permission to copy and/or distribute it,
2101 dnl with or without modifications, as long as this notice is preserved.
2102 dnl
2103 dnl This file can can be used in projects which are not available under
2104 dnl the GNU General Public License or the GNU Library General Public
2105 dnl License but which still want to provide support for the GNU gettext
2106 dnl functionality.
2107 dnl Please note that the actual code of the GNU gettext library is covered
2108 dnl by the GNU Library General Public License, and the rest of the GNU
2109 dnl gettext package package is covered by the GNU General Public License.
2110 dnl They are *not* in the public domain.
2111
2112 dnl Authors:
2113 dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
2114
2115 AC_PREREQ(2.50)
2116
2117 # Search path for a program which passes the given test.
2118
2119 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2120 dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2121 AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2122 [
2123 # Prepare PATH_SEPARATOR.
2124 # The user is always right.
2125 if test "${PATH_SEPARATOR+set}" != set; then
2126   echo "#! /bin/sh" >conf$$.sh
2127   echo  "exit 0"   >>conf$$.sh
2128   chmod +x conf$$.sh
2129   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
2130     PATH_SEPARATOR=';'
2131   else
2132     PATH_SEPARATOR=:
2133   fi
2134   rm -f conf$$.sh
2135 fi
2136
2137 # Find out how to test for executable files. Don't use a zero-byte file,
2138 # as systems may use methods other than mode bits to determine executability.
2139 cat >conf$$.file <<_ASEOF
2140 #! /bin/sh
2141 exit 0
2142 _ASEOF
2143 chmod +x conf$$.file
2144 if test -x conf$$.file >/dev/null 2>&1; then
2145   ac_executable_p="test -x"
2146 else
2147   ac_executable_p="test -f"
2148 fi
2149 rm -f conf$$.file
2150
2151 # Extract the first word of "$2", so it can be a program name with args.
2152 set dummy $2; ac_word=[$]2
2153 AC_MSG_CHECKING([for $ac_word])
2154 AC_CACHE_VAL(ac_cv_path_$1,
2155 [case "[$]$1" in
2156   [[\\/]]* | ?:[[\\/]]*)
2157     ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2158     ;;
2159   *)
2160     ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
2161     for ac_dir in ifelse([$5], , $PATH, [$5]); do
2162       IFS="$ac_save_IFS"
2163       test -z "$ac_dir" && ac_dir=.
2164       for ac_exec_ext in '' $ac_executable_extensions; do
2165         if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
2166           echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
2167           if [$3]; then
2168             ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
2169             break 2
2170           fi
2171         fi
2172       done
2173     done
2174     IFS="$ac_save_IFS"
2175 dnl If no 4th arg is given, leave the cache variable unset,
2176 dnl so AC_PATH_PROGS will keep looking.
2177 ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2178 ])dnl
2179     ;;
2180 esac])dnl
2181 $1="$ac_cv_path_$1"
2182 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2183   AC_MSG_RESULT([$]$1)
2184 else
2185   AC_MSG_RESULT(no)
2186 fi
2187 AC_SUBST($1)dnl
2188 ])
2189
2190 # Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
2191 #
2192 # This file is free software; the Free Software Foundation
2193 # gives unlimited permission to copy and/or distribute it,
2194 # with or without modifications, as long as this notice is preserved.
2195
2196 # AM_AUTOMAKE_VERSION(VERSION)
2197 # ----------------------------
2198 # Automake X.Y traces this macro to ensure aclocal.m4 has been
2199 # generated from the m4 files accompanying Automake X.Y.
2200 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
2201
2202 # AM_SET_CURRENT_AUTOMAKE_VERSION
2203 # -------------------------------
2204 # Call AM_AUTOMAKE_VERSION so it can be traced.
2205 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
2206 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
2207          [AM_AUTOMAKE_VERSION([1.9.6])])
2208
2209 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
2210
2211 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
2212 #
2213 # This file is free software; the Free Software Foundation
2214 # gives unlimited permission to copy and/or distribute it,
2215 # with or without modifications, as long as this notice is preserved.
2216
2217 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
2218 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
2219 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
2220 #
2221 # Of course, Automake must honor this variable whenever it calls a
2222 # tool from the auxiliary directory.  The problem is that $srcdir (and
2223 # therefore $ac_aux_dir as well) can be either absolute or relative,
2224 # depending on how configure is run.  This is pretty annoying, since
2225 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
2226 # source directory, any form will work fine, but in subdirectories a
2227 # relative path needs to be adjusted first.
2228 #
2229 # $ac_aux_dir/missing
2230 #    fails when called from a subdirectory if $ac_aux_dir is relative
2231 # $top_srcdir/$ac_aux_dir/missing
2232 #    fails if $ac_aux_dir is absolute,
2233 #    fails when called from a subdirectory in a VPATH build with
2234 #          a relative $ac_aux_dir
2235 #
2236 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
2237 # are both prefixed by $srcdir.  In an in-source build this is usually
2238 # harmless because $srcdir is `.', but things will broke when you
2239 # start a VPATH build or use an absolute $srcdir.
2240 #
2241 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
2242 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
2243 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
2244 # and then we would define $MISSING as
2245 #   MISSING="\${SHELL} $am_aux_dir/missing"
2246 # This will work as long as MISSING is not called from configure, because
2247 # unfortunately $(top_srcdir) has no meaning in configure.
2248 # However there are other variables, like CC, which are often used in
2249 # configure, and could therefore not use this "fixed" $ac_aux_dir.
2250 #
2251 # Another solution, used here, is to always expand $ac_aux_dir to an
2252 # absolute PATH.  The drawback is that using absolute paths prevent a
2253 # configured tree to be moved without reconfiguration.
2254
2255 AC_DEFUN([AM_AUX_DIR_EXPAND],
2256 [dnl Rely on autoconf to set up CDPATH properly.
2257 AC_PREREQ([2.50])dnl
2258 # expand $ac_aux_dir to an absolute path
2259 am_aux_dir=`cd $ac_aux_dir && pwd`
2260 ])
2261
2262 # AM_CONDITIONAL                                            -*- Autoconf -*-
2263
2264 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
2265 # Free Software Foundation, Inc.
2266 #
2267 # This file is free software; the Free Software Foundation
2268 # gives unlimited permission to copy and/or distribute it,
2269 # with or without modifications, as long as this notice is preserved.
2270
2271 # serial 7
2272
2273 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
2274 # -------------------------------------
2275 # Define a conditional.
2276 AC_DEFUN([AM_CONDITIONAL],
2277 [AC_PREREQ(2.52)dnl
2278  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
2279         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
2280 AC_SUBST([$1_TRUE])
2281 AC_SUBST([$1_FALSE])
2282 if $2; then
2283   $1_TRUE=
2284   $1_FALSE='#'
2285 else
2286   $1_TRUE='#'
2287   $1_FALSE=
2288 fi
2289 AC_CONFIG_COMMANDS_PRE(
2290 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
2291   AC_MSG_ERROR([[conditional "$1" was never defined.
2292 Usually this means the macro was only invoked conditionally.]])
2293 fi])])
2294
2295
2296 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
2297 # Free Software Foundation, Inc.
2298 #
2299 # This file is free software; the Free Software Foundation
2300 # gives unlimited permission to copy and/or distribute it,
2301 # with or without modifications, as long as this notice is preserved.
2302
2303 # serial 8
2304
2305 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
2306 # written in clear, in which case automake, when reading aclocal.m4,
2307 # will think it sees a *use*, and therefore will trigger all it's
2308 # C support machinery.  Also note that it means that autoscan, seeing
2309 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
2310
2311
2312 # _AM_DEPENDENCIES(NAME)
2313 # ----------------------
2314 # See how the compiler implements dependency checking.
2315 # NAME is "CC", "CXX", "GCJ", or "OBJC".
2316 # We try a few techniques and use that to set a single cache variable.
2317 #
2318 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
2319 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
2320 # dependency, and given that the user is not expected to run this macro,
2321 # just rely on AC_PROG_CC.
2322 AC_DEFUN([_AM_DEPENDENCIES],
2323 [AC_REQUIRE([AM_SET_DEPDIR])dnl
2324 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
2325 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
2326 AC_REQUIRE([AM_DEP_TRACK])dnl
2327
2328 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
2329        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
2330        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
2331        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
2332                    [depcc="$$1"   am_compiler_list=])
2333
2334 AC_CACHE_CHECK([dependency style of $depcc],
2335                [am_cv_$1_dependencies_compiler_type],
2336 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2337   # We make a subdir and do the tests there.  Otherwise we can end up
2338   # making bogus files that we don't know about and never remove.  For
2339   # instance it was reported that on HP-UX the gcc test will end up
2340   # making a dummy file named `D' -- because `-MD' means `put the output
2341   # in D'.
2342   mkdir conftest.dir
2343   # Copy depcomp to subdir because otherwise we won't find it if we're
2344   # using a relative directory.
2345   cp "$am_depcomp" conftest.dir
2346   cd conftest.dir
2347   # We will build objects and dependencies in a subdirectory because
2348   # it helps to detect inapplicable dependency modes.  For instance
2349   # both Tru64's cc and ICC support -MD to output dependencies as a
2350   # side effect of compilation, but ICC will put the dependencies in
2351   # the current directory while Tru64 will put them in the object
2352   # directory.
2353   mkdir sub
2354
2355   am_cv_$1_dependencies_compiler_type=none
2356   if test "$am_compiler_list" = ""; then
2357      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2358   fi
2359   for depmode in $am_compiler_list; do
2360     # Setup a source with many dependencies, because some compilers
2361     # like to wrap large dependency lists on column 80 (with \), and
2362     # we should not choose a depcomp mode which is confused by this.
2363     #
2364     # We need to recreate these files for each test, as the compiler may
2365     # overwrite some of them when testing with obscure command lines.
2366     # This happens at least with the AIX C compiler.
2367     : > sub/conftest.c
2368     for i in 1 2 3 4 5 6; do
2369       echo '#include "conftst'$i'.h"' >> sub/conftest.c
2370       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
2371       # Solaris 8's {/usr,}/bin/sh.
2372       touch sub/conftst$i.h
2373     done
2374     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2375
2376     case $depmode in
2377     nosideeffect)
2378       # after this tag, mechanisms are not by side-effect, so they'll
2379       # only be used when explicitly requested
2380       if test "x$enable_dependency_tracking" = xyes; then
2381         continue
2382       else
2383         break
2384       fi
2385       ;;
2386     none) break ;;
2387     esac
2388     # We check with `-c' and `-o' for the sake of the "dashmstdout"
2389     # mode.  It turns out that the SunPro C++ compiler does not properly
2390     # handle `-M -o', and we need to detect this.
2391     if depmode=$depmode \
2392        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
2393        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2394        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
2395          >/dev/null 2>conftest.err &&
2396        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2397        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
2398        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2399       # icc doesn't choke on unknown options, it will just issue warnings
2400       # or remarks (even with -Werror).  So we grep stderr for any message
2401       # that says an option was ignored or not supported.
2402       # When given -MP, icc 7.0 and 7.1 complain thusly:
2403       #   icc: Command line warning: ignoring option '-M'; no argument required
2404       # The diagnosis changed in icc 8.0:
2405       #   icc: Command line remark: option '-MP' not supported
2406       if (grep 'ignoring option' conftest.err ||
2407           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
2408         am_cv_$1_dependencies_compiler_type=$depmode
2409         break
2410       fi
2411     fi
2412   done
2413
2414   cd ..
2415   rm -rf conftest.dir
2416 else
2417   am_cv_$1_dependencies_compiler_type=none
2418 fi
2419 ])
2420 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2421 AM_CONDITIONAL([am__fastdep$1], [
2422   test "x$enable_dependency_tracking" != xno \
2423   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
2424 ])
2425
2426
2427 # AM_SET_DEPDIR
2428 # -------------
2429 # Choose a directory name for dependency files.
2430 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
2431 AC_DEFUN([AM_SET_DEPDIR],
2432 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2433 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
2434 ])
2435
2436
2437 # AM_DEP_TRACK
2438 # ------------
2439 AC_DEFUN([AM_DEP_TRACK],
2440 [AC_ARG_ENABLE(dependency-tracking,
2441 [  --disable-dependency-tracking  speeds up one-time build
2442   --enable-dependency-tracking   do not reject slow dependency extractors])
2443 if test "x$enable_dependency_tracking" != xno; then
2444   am_depcomp="$ac_aux_dir/depcomp"
2445   AMDEPBACKSLASH='\'
2446 fi
2447 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
2448 AC_SUBST([AMDEPBACKSLASH])
2449 ])
2450
2451 # Generate code to set up dependency tracking.              -*- Autoconf -*-
2452
2453 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
2454 # Free Software Foundation, Inc.
2455 #
2456 # This file is free software; the Free Software Foundation
2457 # gives unlimited permission to copy and/or distribute it,
2458 # with or without modifications, as long as this notice is preserved.
2459
2460 #serial 3
2461
2462 # _AM_OUTPUT_DEPENDENCY_COMMANDS
2463 # ------------------------------
2464 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
2465 [for mf in $CONFIG_FILES; do
2466   # Strip MF so we end up with the name of the file.
2467   mf=`echo "$mf" | sed -e 's/:.*$//'`
2468   # Check whether this is an Automake generated Makefile or not.
2469   # We used to match only the files named `Makefile.in', but
2470   # some people rename them; so instead we look at the file content.
2471   # Grep'ing the first line is not enough: some people post-process
2472   # each Makefile.in and add a new line on top of each file to say so.
2473   # So let's grep whole file.
2474   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
2475     dirpart=`AS_DIRNAME("$mf")`
2476   else
2477     continue
2478   fi
2479   # Extract the definition of DEPDIR, am__include, and am__quote
2480   # from the Makefile without running `make'.
2481   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
2482   test -z "$DEPDIR" && continue
2483   am__include=`sed -n 's/^am__include = //p' < "$mf"`
2484   test -z "am__include" && continue
2485   am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
2486   # When using ansi2knr, U may be empty or an underscore; expand it
2487   U=`sed -n 's/^U = //p' < "$mf"`
2488   # Find all dependency output files, they are included files with
2489   # $(DEPDIR) in their names.  We invoke sed twice because it is the
2490   # simplest approach to changing $(DEPDIR) to its actual value in the
2491   # expansion.
2492   for file in `sed -n "
2493     s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
2494        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
2495     # Make sure the directory exists.
2496     test -f "$dirpart/$file" && continue
2497     fdir=`AS_DIRNAME(["$file"])`
2498     AS_MKDIR_P([$dirpart/$fdir])
2499     # echo "creating $dirpart/$file"
2500     echo '# dummy' > "$dirpart/$file"
2501   done
2502 done
2503 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
2504
2505
2506 # AM_OUTPUT_DEPENDENCY_COMMANDS
2507 # -----------------------------
2508 # This macro should only be invoked once -- use via AC_REQUIRE.
2509 #
2510 # This code is only required when automatic dependency tracking
2511 # is enabled.  FIXME.  This creates each `.P' file that we will
2512 # need in order to bootstrap the dependency handling code.
2513 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
2514 [AC_CONFIG_COMMANDS([depfiles],
2515      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
2516      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
2517 ])
2518
2519 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
2520 # Free Software Foundation, Inc.
2521 #
2522 # This file is free software; the Free Software Foundation
2523 # gives unlimited permission to copy and/or distribute it,
2524 # with or without modifications, as long as this notice is preserved.
2525
2526 # serial 8
2527
2528 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
2529 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
2530
2531 # Do all the work for Automake.                             -*- Autoconf -*-
2532
2533 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
2534 # Free Software Foundation, Inc.
2535 #
2536 # This file is free software; the Free Software Foundation
2537 # gives unlimited permission to copy and/or distribute it,
2538 # with or without modifications, as long as this notice is preserved.
2539
2540 # serial 12
2541
2542 # This macro actually does too much.  Some checks are only needed if
2543 # your package does certain things.  But this isn't really a big deal.
2544
2545 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
2546 # AM_INIT_AUTOMAKE([OPTIONS])
2547 # -----------------------------------------------
2548 # The call with PACKAGE and VERSION arguments is the old style
2549 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
2550 # and VERSION should now be passed to AC_INIT and removed from
2551 # the call to AM_INIT_AUTOMAKE.
2552 # We support both call styles for the transition.  After
2553 # the next Automake release, Autoconf can make the AC_INIT
2554 # arguments mandatory, and then we can depend on a new Autoconf
2555 # release and drop the old call support.
2556 AC_DEFUN([AM_INIT_AUTOMAKE],
2557 [AC_PREREQ([2.58])dnl
2558 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
2559 dnl the ones we care about.
2560 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
2561 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
2562 AC_REQUIRE([AC_PROG_INSTALL])dnl
2563 # test to see if srcdir already configured
2564 if test "`cd $srcdir && pwd`" != "`pwd`" &&
2565    test -f $srcdir/config.status; then
2566   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
2567 fi
2568
2569 # test whether we have cygpath
2570 if test -z "$CYGPATH_W"; then
2571   if (cygpath --version) >/dev/null 2>/dev/null; then
2572     CYGPATH_W='cygpath -w'
2573   else
2574     CYGPATH_W=echo
2575   fi
2576 fi
2577 AC_SUBST([CYGPATH_W])
2578
2579 # Define the identity of the package.
2580 dnl Distinguish between old-style and new-style calls.
2581 m4_ifval([$2],
2582 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
2583  AC_SUBST([PACKAGE], [$1])dnl
2584  AC_SUBST([VERSION], [$2])],
2585 [_AM_SET_OPTIONS([$1])dnl
2586  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
2587  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
2588
2589 _AM_IF_OPTION([no-define],,
2590 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
2591  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
2592
2593 # Some tools Automake needs.
2594 AC_REQUIRE([AM_SANITY_CHECK])dnl
2595 AC_REQUIRE([AC_ARG_PROGRAM])dnl
2596 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
2597 AM_MISSING_PROG(AUTOCONF, autoconf)
2598 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
2599 AM_MISSING_PROG(AUTOHEADER, autoheader)
2600 AM_MISSING_PROG(MAKEINFO, makeinfo)
2601 AM_PROG_INSTALL_SH
2602 AM_PROG_INSTALL_STRIP
2603 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
2604 # We need awk for the "check" target.  The system "awk" is bad on
2605 # some platforms.
2606 AC_REQUIRE([AC_PROG_AWK])dnl
2607 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
2608 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
2609 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
2610               [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
2611                              [_AM_PROG_TAR([v7])])])
2612 _AM_IF_OPTION([no-dependencies],,
2613 [AC_PROVIDE_IFELSE([AC_PROG_CC],
2614                   [_AM_DEPENDENCIES(CC)],
2615                   [define([AC_PROG_CC],
2616                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
2617 AC_PROVIDE_IFELSE([AC_PROG_CXX],
2618                   [_AM_DEPENDENCIES(CXX)],
2619                   [define([AC_PROG_CXX],
2620                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
2621 ])
2622 ])
2623
2624
2625 # When config.status generates a header, we must update the stamp-h file.
2626 # This file resides in the same directory as the config header
2627 # that is generated.  The stamp files are numbered to have different names.
2628
2629 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
2630 # loop where config.status creates the headers, so we can generate
2631 # our stamp files there.
2632 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
2633 [# Compute $1's index in $config_headers.
2634 _am_stamp_count=1
2635 for _am_header in $config_headers :; do
2636   case $_am_header in
2637     $1 | $1:* )
2638       break ;;
2639     * )
2640       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
2641   esac
2642 done
2643 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
2644
2645 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
2646 #
2647 # This file is free software; the Free Software Foundation
2648 # gives unlimited permission to copy and/or distribute it,
2649 # with or without modifications, as long as this notice is preserved.
2650
2651 # AM_PROG_INSTALL_SH
2652 # ------------------
2653 # Define $install_sh.
2654 AC_DEFUN([AM_PROG_INSTALL_SH],
2655 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2656 install_sh=${install_sh-"$am_aux_dir/install-sh"}
2657 AC_SUBST(install_sh)])
2658
2659 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
2660 #
2661 # This file is free software; the Free Software Foundation
2662 # gives unlimited permission to copy and/or distribute it,
2663 # with or without modifications, as long as this notice is preserved.
2664
2665 # serial 2
2666
2667 # Check whether the underlying file-system supports filenames
2668 # with a leading dot.  For instance MS-DOS doesn't.
2669 AC_DEFUN([AM_SET_LEADING_DOT],
2670 [rm -rf .tst 2>/dev/null
2671 mkdir .tst 2>/dev/null
2672 if test -d .tst; then
2673   am__leading_dot=.
2674 else
2675   am__leading_dot=_
2676 fi
2677 rmdir .tst 2>/dev/null
2678 AC_SUBST([am__leading_dot])])
2679
2680 # Check to see how 'make' treats includes.                  -*- Autoconf -*-
2681
2682 # Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
2683 #
2684 # This file is free software; the Free Software Foundation
2685 # gives unlimited permission to copy and/or distribute it,
2686 # with or without modifications, as long as this notice is preserved.
2687
2688 # serial 3
2689
2690 # AM_MAKE_INCLUDE()
2691 # -----------------
2692 # Check to see how make treats includes.
2693 AC_DEFUN([AM_MAKE_INCLUDE],
2694 [am_make=${MAKE-make}
2695 cat > confinc << 'END'
2696 am__doit:
2697         @echo done
2698 .PHONY: am__doit
2699 END
2700 # If we don't find an include directive, just comment out the code.
2701 AC_MSG_CHECKING([for style of include used by $am_make])
2702 am__include="#"
2703 am__quote=
2704 _am_result=none
2705 # First try GNU make style include.
2706 echo "include confinc" > confmf
2707 # We grep out `Entering directory' and `Leaving directory'
2708 # messages which can occur if `w' ends up in MAKEFLAGS.
2709 # In particular we don't look at `^make:' because GNU make might
2710 # be invoked under some other name (usually "gmake"), in which
2711 # case it prints its new name instead of `make'.
2712 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
2713    am__include=include
2714    am__quote=
2715    _am_result=GNU
2716 fi
2717 # Now try BSD make style include.
2718 if test "$am__include" = "#"; then
2719    echo '.include "confinc"' > confmf
2720    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
2721       am__include=.include
2722       am__quote="\""
2723       _am_result=BSD
2724    fi
2725 fi
2726 AC_SUBST([am__include])
2727 AC_SUBST([am__quote])
2728 AC_MSG_RESULT([$_am_result])
2729 rm -f confinc confmf
2730 ])
2731
2732 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
2733
2734 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
2735 # Free Software Foundation, Inc.
2736 #
2737 # This file is free software; the Free Software Foundation
2738 # gives unlimited permission to copy and/or distribute it,
2739 # with or without modifications, as long as this notice is preserved.
2740
2741 # serial 4
2742
2743 # AM_MISSING_PROG(NAME, PROGRAM)
2744 # ------------------------------
2745 AC_DEFUN([AM_MISSING_PROG],
2746 [AC_REQUIRE([AM_MISSING_HAS_RUN])
2747 $1=${$1-"${am_missing_run}$2"}
2748 AC_SUBST($1)])
2749
2750
2751 # AM_MISSING_HAS_RUN
2752 # ------------------
2753 # Define MISSING if not defined so far and test if it supports --run.
2754 # If it does, set am_missing_run to use it, otherwise, to nothing.
2755 AC_DEFUN([AM_MISSING_HAS_RUN],
2756 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
2757 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
2758 # Use eval to expand $SHELL
2759 if eval "$MISSING --run true"; then
2760   am_missing_run="$MISSING --run "
2761 else
2762   am_missing_run=
2763   AC_MSG_WARN([`missing' script is too old or missing])
2764 fi
2765 ])
2766
2767 # Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
2768 #
2769 # This file is free software; the Free Software Foundation
2770 # gives unlimited permission to copy and/or distribute it,
2771 # with or without modifications, as long as this notice is preserved.
2772
2773 # AM_PROG_MKDIR_P
2774 # ---------------
2775 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
2776 #
2777 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
2778 # created by `make install' are always world readable, even if the
2779 # installer happens to have an overly restrictive umask (e.g. 077).
2780 # This was a mistake.  There are at least two reasons why we must not
2781 # use `-m 0755':
2782 #   - it causes special bits like SGID to be ignored,
2783 #   - it may be too restrictive (some setups expect 775 directories).
2784 #
2785 # Do not use -m 0755 and let people choose whatever they expect by
2786 # setting umask.
2787 #
2788 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
2789 # Some implementations (such as Solaris 8's) are not thread-safe: if a
2790 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
2791 # concurrently, both version can detect that a/ is missing, but only
2792 # one can create it and the other will error out.  Consequently we
2793 # restrict ourselves to GNU make (using the --version option ensures
2794 # this.)
2795 AC_DEFUN([AM_PROG_MKDIR_P],
2796 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
2797   # We used to keeping the `.' as first argument, in order to
2798   # allow $(mkdir_p) to be used without argument.  As in
2799   #   $(mkdir_p) $(somedir)
2800   # where $(somedir) is conditionally defined.  However this is wrong
2801   # for two reasons:
2802   #  1. if the package is installed by a user who cannot write `.'
2803   #     make install will fail,
2804   #  2. the above comment should most certainly read
2805   #     $(mkdir_p) $(DESTDIR)$(somedir)
2806   #     so it does not work when $(somedir) is undefined and
2807   #     $(DESTDIR) is not.
2808   #  To support the latter case, we have to write
2809   #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
2810   #  so the `.' trick is pointless.
2811   mkdir_p='mkdir -p --'
2812 else
2813   # On NextStep and OpenStep, the `mkdir' command does not
2814   # recognize any option.  It will interpret all options as
2815   # directories to create, and then abort because `.' already
2816   # exists.
2817   for d in ./-p ./--version;
2818   do
2819     test -d $d && rmdir $d
2820   done
2821   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
2822   if test -f "$ac_aux_dir/mkinstalldirs"; then
2823     mkdir_p='$(mkinstalldirs)'
2824   else
2825     mkdir_p='$(install_sh) -d'
2826   fi
2827 fi
2828 AC_SUBST([mkdir_p])])
2829
2830 # Helper functions for option handling.                     -*- Autoconf -*-
2831
2832 # Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
2833 #
2834 # This file is free software; the Free Software Foundation
2835 # gives unlimited permission to copy and/or distribute it,
2836 # with or without modifications, as long as this notice is preserved.
2837
2838 # serial 3
2839
2840 # _AM_MANGLE_OPTION(NAME)
2841 # -----------------------
2842 AC_DEFUN([_AM_MANGLE_OPTION],
2843 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2844
2845 # _AM_SET_OPTION(NAME)
2846 # ------------------------------
2847 # Set option NAME.  Presently that only means defining a flag for this option.
2848 AC_DEFUN([_AM_SET_OPTION],
2849 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
2850
2851 # _AM_SET_OPTIONS(OPTIONS)
2852 # ----------------------------------
2853 # OPTIONS is a space-separated list of Automake options.
2854 AC_DEFUN([_AM_SET_OPTIONS],
2855 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2856
2857 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2858 # -------------------------------------------
2859 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2860 AC_DEFUN([_AM_IF_OPTION],
2861 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2862
2863 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
2864
2865 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
2866 # Free Software Foundation, Inc.
2867 #
2868 # This file is free software; the Free Software Foundation
2869 # gives unlimited permission to copy and/or distribute it,
2870 # with or without modifications, as long as this notice is preserved.
2871
2872 # serial 4
2873
2874 # AM_SANITY_CHECK
2875 # ---------------
2876 AC_DEFUN([AM_SANITY_CHECK],
2877 [AC_MSG_CHECKING([whether build environment is sane])
2878 # Just in case
2879 sleep 1
2880 echo timestamp > conftest.file
2881 # Do `set' in a subshell so we don't clobber the current shell's
2882 # arguments.  Must try -L first in case configure is actually a
2883 # symlink; some systems play weird games with the mod time of symlinks
2884 # (eg FreeBSD returns the mod time of the symlink's containing
2885 # directory).
2886 if (
2887    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
2888    if test "$[*]" = "X"; then
2889       # -L didn't work.
2890       set X `ls -t $srcdir/configure conftest.file`
2891    fi
2892    rm -f conftest.file
2893    if test "$[*]" != "X $srcdir/configure conftest.file" \
2894       && test "$[*]" != "X conftest.file $srcdir/configure"; then
2895
2896       # If neither matched, then we have a broken ls.  This can happen
2897       # if, for instance, CONFIG_SHELL is bash and it inherits a
2898       # broken ls alias from the environment.  This has actually
2899       # happened.  Such a system could not be considered "sane".
2900       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
2901 alias in your environment])
2902    fi
2903
2904    test "$[2]" = conftest.file
2905    )
2906 then
2907    # Ok.
2908    :
2909 else
2910    AC_MSG_ERROR([newly created file is older than distributed files!
2911 Check your system clock])
2912 fi
2913 AC_MSG_RESULT(yes)])
2914
2915 # Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
2916 #
2917 # This file is free software; the Free Software Foundation
2918 # gives unlimited permission to copy and/or distribute it,
2919 # with or without modifications, as long as this notice is preserved.
2920
2921 # AM_PROG_INSTALL_STRIP
2922 # ---------------------
2923 # One issue with vendor `install' (even GNU) is that you can't
2924 # specify the program used to strip binaries.  This is especially
2925 # annoying in cross-compiling environments, where the build's strip
2926 # is unlikely to handle the host's binaries.
2927 # Fortunately install-sh will honor a STRIPPROG variable, so we
2928 # always use install-sh in `make install-strip', and initialize
2929 # STRIPPROG with the value of the STRIP variable (set by the user).
2930 AC_DEFUN([AM_PROG_INSTALL_STRIP],
2931 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2932 # Installed binaries are usually stripped using `strip' when the user
2933 # run `make install-strip'.  However `strip' might not be the right
2934 # tool to use in cross-compilation environments, therefore Automake
2935 # will honor the `STRIP' environment variable to overrule this program.
2936 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2937 if test "$cross_compiling" != no; then
2938   AC_CHECK_TOOL([STRIP], [strip], :)
2939 fi
2940 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
2941 AC_SUBST([INSTALL_STRIP_PROGRAM])])
2942
2943 # Check how to create a tarball.                            -*- Autoconf -*-
2944
2945 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
2946 #
2947 # This file is free software; the Free Software Foundation
2948 # gives unlimited permission to copy and/or distribute it,
2949 # with or without modifications, as long as this notice is preserved.
2950
2951 # serial 2
2952
2953 # _AM_PROG_TAR(FORMAT)
2954 # --------------------
2955 # Check how to create a tarball in format FORMAT.
2956 # FORMAT should be one of `v7', `ustar', or `pax'.
2957 #
2958 # Substitute a variable $(am__tar) that is a command
2959 # writing to stdout a FORMAT-tarball containing the directory
2960 # $tardir.
2961 #     tardir=directory && $(am__tar) > result.tar
2962 #
2963 # Substitute a variable $(am__untar) that extract such
2964 # a tarball read from stdin.
2965 #     $(am__untar) < result.tar
2966 AC_DEFUN([_AM_PROG_TAR],
2967 [# Always define AMTAR for backward compatibility.
2968 AM_MISSING_PROG([AMTAR], [tar])
2969 m4_if([$1], [v7],
2970      [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
2971      [m4_case([$1], [ustar],, [pax],,
2972               [m4_fatal([Unknown tar format])])
2973 AC_MSG_CHECKING([how to create a $1 tar archive])
2974 # Loop over all known methods to create a tar archive until one works.
2975 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2976 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
2977 # Do not fold the above two line into one, because Tru64 sh and
2978 # Solaris sh will not grok spaces in the rhs of `-'.
2979 for _am_tool in $_am_tools
2980 do
2981   case $_am_tool in
2982   gnutar)
2983     for _am_tar in tar gnutar gtar;
2984     do
2985       AM_RUN_LOG([$_am_tar --version]) && break
2986     done
2987     am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2988     am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2989     am__untar="$_am_tar -xf -"
2990     ;;
2991   plaintar)
2992     # Must skip GNU tar: if it does not support --format= it doesn't create
2993     # ustar tarball either.
2994     (tar --version) >/dev/null 2>&1 && continue
2995     am__tar='tar chf - "$$tardir"'
2996     am__tar_='tar chf - "$tardir"'
2997     am__untar='tar xf -'
2998     ;;
2999   pax)
3000     am__tar='pax -L -x $1 -w "$$tardir"'
3001     am__tar_='pax -L -x $1 -w "$tardir"'
3002     am__untar='pax -r'
3003     ;;
3004   cpio)
3005     am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
3006     am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
3007     am__untar='cpio -i -H $1 -d'
3008     ;;
3009   none)
3010     am__tar=false
3011     am__tar_=false
3012     am__untar=false
3013     ;;
3014   esac
3015
3016   # If the value was cached, stop now.  We just wanted to have am__tar
3017   # and am__untar set.
3018   test -n "${am_cv_prog_tar_$1}" && break
3019
3020   # tar/untar a dummy directory, and stop if the command works
3021   rm -rf conftest.dir
3022   mkdir conftest.dir
3023   echo GrepMe > conftest.dir/file
3024   AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
3025   rm -rf conftest.dir
3026   if test -s conftest.tar; then
3027     AM_RUN_LOG([$am__untar <conftest.tar])
3028     grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
3029   fi
3030 done
3031 rm -rf conftest.dir
3032
3033 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
3034 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
3035 AC_SUBST([am__tar])
3036 AC_SUBST([am__untar])
3037 ]) # _AM_PROG_TAR
3038
3039 m4_include([acinclude.m4])