Completing menu file.
[debian/lxtask.git] / aclocal.m4
CommitLineData
b1f084da
DB
1# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
5218d3ad
DB
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17[m4_warning([this file was generated for autoconf 2.68.
b1f084da
DB
18You have another version of autoconf. It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
5218d3ad
DB
22# gettext.m4 serial 63 (gettext-0.18)
23dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
b1f084da
DB
24dnl This file is free software; the Free Software Foundation
25dnl gives unlimited permission to copy and/or distribute it,
26dnl with or without modifications, as long as this notice is preserved.
27dnl
28dnl This file can can be used in projects which are not available under
29dnl the GNU General Public License or the GNU Library General Public
30dnl License but which still want to provide support for the GNU gettext
31dnl functionality.
32dnl Please note that the actual code of the GNU gettext library is covered
33dnl by the GNU Library General Public License, and the rest of the GNU
34dnl gettext package package is covered by the GNU General Public License.
35dnl They are *not* in the public domain.
36
37dnl Authors:
38dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
5218d3ad 39dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
b1f084da
DB
40
41dnl Macro to add for using GNU gettext.
42
43dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
44dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
45dnl default (if it is not specified or empty) is 'no-libtool'.
46dnl INTLSYMBOL should be 'external' for packages with no intl directory,
47dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
48dnl If INTLSYMBOL is 'use-libtool', then a libtool library
49dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
50dnl depending on --{enable,disable}-{shared,static} and on the presence of
51dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
52dnl $(top_builddir)/intl/libintl.a will be created.
53dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
54dnl implementations (in libc or libintl) without the ngettext() function
55dnl will be ignored. If NEEDSYMBOL is specified and is
56dnl 'need-formatstring-macros', then GNU gettext implementations that don't
57dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
58dnl INTLDIR is used to find the intl libraries. If empty,
59dnl the value `$(top_builddir)/intl/' is used.
60dnl
61dnl The result of the configuration is one of three cases:
62dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
63dnl and used.
64dnl Catalog format: GNU --> install in $(datadir)
65dnl Catalog extension: .mo after installation, .gmo in source tree
66dnl 2) GNU gettext has been found in the system's C library.
67dnl Catalog format: GNU --> install in $(datadir)
68dnl Catalog extension: .mo after installation, .gmo in source tree
69dnl 3) No internationalization, always use English msgid.
70dnl Catalog format: none
71dnl Catalog extension: none
72dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
73dnl The use of .gmo is historical (it was needed to avoid overwriting the
74dnl GNU format catalogs when building on a platform with an X/Open gettext),
75dnl but we keep it in order not to force irrelevant filename changes on the
76dnl maintainers.
77dnl
78AC_DEFUN([AM_GNU_GETTEXT],
79[
80 dnl Argument checking.
81 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
82 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
83])])])])])
5218d3ad
DB
84 ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
85 [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
b1f084da
DB
86 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
87 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
88])])])])
89 define([gt_included_intl],
90 ifelse([$1], [external],
91 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
92 [yes]))
93 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
94 gt_NEEDS_INIT
95 AM_GNU_GETTEXT_NEED([$2])
96
97 AC_REQUIRE([AM_PO_SUBDIRS])dnl
98 ifelse(gt_included_intl, yes, [
99 AC_REQUIRE([AM_INTL_SUBDIR])dnl
100 ])
101
102 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
103 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
104 AC_REQUIRE([AC_LIB_RPATH])
105
106 dnl Sometimes libintl requires libiconv, so first search for libiconv.
107 dnl Ideally we would do this search only after the
108 dnl if test "$USE_NLS" = "yes"; then
109 dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
110 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
111 dnl the configure script would need to contain the same shell code
112 dnl again, outside any 'if'. There are two solutions:
113 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
114 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
115 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
116 dnl documented, we avoid it.
117 ifelse(gt_included_intl, yes, , [
118 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
119 ])
120
121 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
122 gt_INTL_MACOSX
123
124 dnl Set USE_NLS.
125 AC_REQUIRE([AM_NLS])
126
127 ifelse(gt_included_intl, yes, [
128 BUILD_INCLUDED_LIBINTL=no
129 USE_INCLUDED_LIBINTL=no
130 ])
131 LIBINTL=
132 LTLIBINTL=
133 POSUB=
134
135 dnl Add a version number to the cache macros.
136 case " $gt_needs " in
137 *" need-formatstring-macros "*) gt_api_version=3 ;;
138 *" need-ngettext "*) gt_api_version=2 ;;
139 *) gt_api_version=1 ;;
140 esac
141 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
142 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
143
144 dnl If we use NLS figure out what method
145 if test "$USE_NLS" = "yes"; then
146 gt_use_preinstalled_gnugettext=no
147 ifelse(gt_included_intl, yes, [
148 AC_MSG_CHECKING([whether included gettext is requested])
5218d3ad 149 AC_ARG_WITH([included-gettext],
b1f084da
DB
150 [ --with-included-gettext use the GNU gettext library included here],
151 nls_cv_force_use_gnu_gettext=$withval,
152 nls_cv_force_use_gnu_gettext=no)
5218d3ad 153 AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
b1f084da
DB
154
155 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
156 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
157 ])
158 dnl User does not insist on using GNU NLS library. Figure out what
159 dnl to use. If GNU gettext is available we use this. Else we have
160 dnl to fall back to GNU NLS library.
161
162 if test $gt_api_version -ge 3; then
163 gt_revision_test_code='
164#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
165#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
166#endif
167changequote(,)dnl
168typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
169changequote([,])dnl
170'
171 else
172 gt_revision_test_code=
173 fi
174 if test $gt_api_version -ge 2; then
175 gt_expression_test_code=' + * ngettext ("", "", 0)'
176 else
177 gt_expression_test_code=
178 fi
179
180 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
181 [AC_TRY_LINK([#include <libintl.h>
182$gt_revision_test_code
183extern int _nl_msg_cat_cntr;
184extern int *_nl_domain_bindings;],
185 [bindtextdomain ("", "");
186return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
187 [eval "$gt_func_gnugettext_libc=yes"],
188 [eval "$gt_func_gnugettext_libc=no"])])
189
190 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
191 dnl Sometimes libintl requires libiconv, so first search for libiconv.
192 ifelse(gt_included_intl, yes, , [
193 AM_ICONV_LINK
194 ])
195 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
196 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
197 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
198 dnl even if libiconv doesn't exist.
199 AC_LIB_LINKFLAGS_BODY([intl])
200 AC_CACHE_CHECK([for GNU gettext in libintl],
201 [$gt_func_gnugettext_libintl],
202 [gt_save_CPPFLAGS="$CPPFLAGS"
203 CPPFLAGS="$CPPFLAGS $INCINTL"
204 gt_save_LIBS="$LIBS"
205 LIBS="$LIBS $LIBINTL"
206 dnl Now see whether libintl exists and does not depend on libiconv.
207 AC_TRY_LINK([#include <libintl.h>
208$gt_revision_test_code
209extern int _nl_msg_cat_cntr;
210extern
211#ifdef __cplusplus
212"C"
213#endif
214const char *_nl_expand_alias (const char *);],
215 [bindtextdomain ("", "");
216return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
217 [eval "$gt_func_gnugettext_libintl=yes"],
218 [eval "$gt_func_gnugettext_libintl=no"])
219 dnl Now see whether libintl exists and depends on libiconv.
220 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
221 LIBS="$LIBS $LIBICONV"
222 AC_TRY_LINK([#include <libintl.h>
223$gt_revision_test_code
224extern int _nl_msg_cat_cntr;
225extern
226#ifdef __cplusplus
227"C"
228#endif
229const char *_nl_expand_alias (const char *);],
230 [bindtextdomain ("", "");
231return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
232 [LIBINTL="$LIBINTL $LIBICONV"
233 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
234 eval "$gt_func_gnugettext_libintl=yes"
235 ])
236 fi
237 CPPFLAGS="$gt_save_CPPFLAGS"
238 LIBS="$gt_save_LIBS"])
239 fi
240
241 dnl If an already present or preinstalled GNU gettext() is found,
242 dnl use it. But if this macro is used in GNU gettext, and GNU
243 dnl gettext is already preinstalled in libintl, we update this
244 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
245 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
246 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
247 && test "$PACKAGE" != gettext-runtime \
248 && test "$PACKAGE" != gettext-tools; }; then
249 gt_use_preinstalled_gnugettext=yes
250 else
251 dnl Reset the values set by searching for libintl.
252 LIBINTL=
253 LTLIBINTL=
254 INCINTL=
255 fi
256
257 ifelse(gt_included_intl, yes, [
258 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
259 dnl GNU gettext is not found in the C library.
260 dnl Fall back on included GNU gettext library.
261 nls_cv_use_gnu_gettext=yes
262 fi
263 fi
264
265 if test "$nls_cv_use_gnu_gettext" = "yes"; then
266 dnl Mark actions used to generate GNU NLS library.
267 BUILD_INCLUDED_LIBINTL=yes
268 USE_INCLUDED_LIBINTL=yes
269 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
270 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
271 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
272 fi
273
274 CATOBJEXT=
275 if test "$gt_use_preinstalled_gnugettext" = "yes" \
276 || test "$nls_cv_use_gnu_gettext" = "yes"; then
277 dnl Mark actions to use GNU gettext tools.
278 CATOBJEXT=.gmo
279 fi
280 ])
281
282 if test -n "$INTL_MACOSX_LIBS"; then
283 if test "$gt_use_preinstalled_gnugettext" = "yes" \
284 || test "$nls_cv_use_gnu_gettext" = "yes"; then
285 dnl Some extra flags are needed during linking.
286 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
287 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
288 fi
289 fi
290
291 if test "$gt_use_preinstalled_gnugettext" = "yes" \
292 || test "$nls_cv_use_gnu_gettext" = "yes"; then
5218d3ad 293 AC_DEFINE([ENABLE_NLS], [1],
b1f084da
DB
294 [Define to 1 if translation of program messages to the user's native language
295 is requested.])
296 else
297 USE_NLS=no
298 fi
299 fi
300
301 AC_MSG_CHECKING([whether to use NLS])
302 AC_MSG_RESULT([$USE_NLS])
303 if test "$USE_NLS" = "yes"; then
304 AC_MSG_CHECKING([where the gettext function comes from])
305 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
306 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
307 gt_source="external libintl"
308 else
309 gt_source="libc"
310 fi
311 else
312 gt_source="included intl directory"
313 fi
314 AC_MSG_RESULT([$gt_source])
315 fi
316
317 if test "$USE_NLS" = "yes"; then
318
319 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
320 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
321 AC_MSG_CHECKING([how to link with libintl])
322 AC_MSG_RESULT([$LIBINTL])
323 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
324 fi
325
326 dnl For backward compatibility. Some packages may be using this.
5218d3ad 327 AC_DEFINE([HAVE_GETTEXT], [1],
b1f084da 328 [Define if the GNU gettext() function is already present or preinstalled.])
5218d3ad 329 AC_DEFINE([HAVE_DCGETTEXT], [1],
b1f084da
DB
330 [Define if the GNU dcgettext() function is already present or preinstalled.])
331 fi
332
333 dnl We need to process the po/ directory.
334 POSUB=po
335 fi
336
337 ifelse(gt_included_intl, yes, [
338 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
339 dnl to 'yes' because some of the testsuite requires it.
340 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
341 BUILD_INCLUDED_LIBINTL=yes
342 fi
343
344 dnl Make all variables we use known to autoconf.
5218d3ad
DB
345 AC_SUBST([BUILD_INCLUDED_LIBINTL])
346 AC_SUBST([USE_INCLUDED_LIBINTL])
347 AC_SUBST([CATOBJEXT])
b1f084da
DB
348
349 dnl For backward compatibility. Some configure.ins may be using this.
350 nls_cv_header_intl=
351 nls_cv_header_libgt=
352
353 dnl For backward compatibility. Some Makefiles may be using this.
354 DATADIRNAME=share
5218d3ad 355 AC_SUBST([DATADIRNAME])
b1f084da
DB
356
357 dnl For backward compatibility. Some Makefiles may be using this.
358 INSTOBJEXT=.mo
5218d3ad 359 AC_SUBST([INSTOBJEXT])
b1f084da
DB
360
361 dnl For backward compatibility. Some Makefiles may be using this.
362 GENCAT=gencat
5218d3ad 363 AC_SUBST([GENCAT])
b1f084da
DB
364
365 dnl For backward compatibility. Some Makefiles may be using this.
366 INTLOBJS=
367 if test "$USE_INCLUDED_LIBINTL" = yes; then
368 INTLOBJS="\$(GETTOBJS)"
369 fi
5218d3ad 370 AC_SUBST([INTLOBJS])
b1f084da
DB
371
372 dnl Enable libtool support if the surrounding package wishes it.
373 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
5218d3ad 374 AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
b1f084da
DB
375 ])
376
377 dnl For backward compatibility. Some Makefiles may be using this.
378 INTLLIBS="$LIBINTL"
5218d3ad 379 AC_SUBST([INTLLIBS])
b1f084da
DB
380
381 dnl Make all documented variables known to autoconf.
5218d3ad
DB
382 AC_SUBST([LIBINTL])
383 AC_SUBST([LTLIBINTL])
384 AC_SUBST([POSUB])
b1f084da
DB
385])
386
387
388dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
389m4_define([gt_NEEDS_INIT],
390[
391 m4_divert_text([DEFAULTS], [gt_needs=])
392 m4_define([gt_NEEDS_INIT], [])
393])
394
395
396dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
397AC_DEFUN([AM_GNU_GETTEXT_NEED],
398[
399 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
400])
401
402
403dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
404AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
405
406# Copyright (C) 1995-2002 Free Software Foundation, Inc.
407# Copyright (C) 2001-2003,2004 Red Hat, Inc.
408#
409# This file is free software, distributed under the terms of the GNU
410# General Public License. As a special exception to the GNU General
411# Public License, this file may be distributed as part of a program
412# that contains a configuration script generated by Autoconf, under
413# the same distribution terms as the rest of that program.
414#
415# This file can be copied and used freely without restrictions. It can
416# be used in projects which are not available under the GNU Public License
417# but which still want to provide support for the GNU gettext functionality.
418#
419# Macro to add for using GNU gettext.
420# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
421#
422# Modified to never use included libintl.
423# Owen Taylor <otaylor@redhat.com>, 12/15/1998
424#
425# Major rework to remove unused code
426# Owen Taylor <otaylor@redhat.com>, 12/11/2002
427#
428# Added better handling of ALL_LINGUAS from GNU gettext version
429# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
430#
431# Modified to require ngettext
432# Matthias Clasen <mclasen@redhat.com> 08/06/2004
433#
434# We need this here as well, since someone might use autoconf-2.5x
435# to configure GLib then an older version to configure a package
436# using AM_GLIB_GNU_GETTEXT
437AC_PREREQ(2.53)
438
439dnl
440dnl We go to great lengths to make sure that aclocal won't
441dnl try to pull in the installed version of these macros
442dnl when running aclocal in the glib directory.
443dnl
444m4_copy([AC_DEFUN],[glib_DEFUN])
445m4_copy([AC_REQUIRE],[glib_REQUIRE])
446dnl
447dnl At the end, if we're not within glib, we'll define the public
448dnl definitions in terms of our private definitions.
449dnl
450
451# GLIB_LC_MESSAGES
452#--------------------
453glib_DEFUN([GLIB_LC_MESSAGES],
454 [AC_CHECK_HEADERS([locale.h])
455 if test $ac_cv_header_locale_h = yes; then
456 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
457 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
458 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
459 if test $am_cv_val_LC_MESSAGES = yes; then
460 AC_DEFINE(HAVE_LC_MESSAGES, 1,
461 [Define if your <locale.h> file defines LC_MESSAGES.])
462 fi
463 fi])
464
465# GLIB_PATH_PROG_WITH_TEST
466#----------------------------
467dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
468dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
469glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
470[# Extract the first word of "$2", so it can be a program name with args.
471set dummy $2; ac_word=[$]2
472AC_MSG_CHECKING([for $ac_word])
473AC_CACHE_VAL(ac_cv_path_$1,
474[case "[$]$1" in
475 /*)
476 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
477 ;;
478 *)
479 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
480 for ac_dir in ifelse([$5], , $PATH, [$5]); do
481 test -z "$ac_dir" && ac_dir=.
482 if test -f $ac_dir/$ac_word; then
483 if [$3]; then
484 ac_cv_path_$1="$ac_dir/$ac_word"
485 break
486 fi
487 fi
488 done
489 IFS="$ac_save_ifs"
490dnl If no 4th arg is given, leave the cache variable unset,
491dnl so AC_PATH_PROGS will keep looking.
492ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
493])dnl
494 ;;
495esac])dnl
496$1="$ac_cv_path_$1"
497if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
498 AC_MSG_RESULT([$]$1)
499else
500 AC_MSG_RESULT(no)
501fi
502AC_SUBST($1)dnl
503])
504
505# GLIB_WITH_NLS
506#-----------------
507glib_DEFUN([GLIB_WITH_NLS],
508 dnl NLS is obligatory
509 [USE_NLS=yes
510 AC_SUBST(USE_NLS)
511
512 gt_cv_have_gettext=no
513
514 CATOBJEXT=NONE
515 XGETTEXT=:
516 INTLLIBS=
517
518 AC_CHECK_HEADER(libintl.h,
519 [gt_cv_func_dgettext_libintl="no"
520 libintl_extra_libs=""
521
522 #
523 # First check in libc
524 #
525 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
526 [AC_TRY_LINK([
527#include <libintl.h>
528],
529 [return !ngettext ("","", 1)],
530 gt_cv_func_ngettext_libc=yes,
531 gt_cv_func_ngettext_libc=no)
532 ])
533
534 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
535 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
536 [AC_TRY_LINK([
537#include <libintl.h>
538],
539 [return !dgettext ("","")],
540 gt_cv_func_dgettext_libc=yes,
541 gt_cv_func_dgettext_libc=no)
542 ])
543 fi
544
545 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
546 AC_CHECK_FUNCS(bind_textdomain_codeset)
547 fi
548
549 #
550 # If we don't have everything we want, check in libintl
551 #
552 if test "$gt_cv_func_dgettext_libc" != "yes" \
553 || test "$gt_cv_func_ngettext_libc" != "yes" \
554 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
555
556 AC_CHECK_LIB(intl, bindtextdomain,
557 [AC_CHECK_LIB(intl, ngettext,
558 [AC_CHECK_LIB(intl, dgettext,
559 gt_cv_func_dgettext_libintl=yes)])])
560
561 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
562 AC_MSG_CHECKING([if -liconv is needed to use gettext])
563 AC_MSG_RESULT([])
564 AC_CHECK_LIB(intl, ngettext,
565 [AC_CHECK_LIB(intl, dcgettext,
566 [gt_cv_func_dgettext_libintl=yes
567 libintl_extra_libs=-liconv],
568 :,-liconv)],
569 :,-liconv)
570 fi
571
572 #
573 # If we found libintl, then check in it for bind_textdomain_codeset();
574 # we'll prefer libc if neither have bind_textdomain_codeset(),
575 # and both have dgettext and ngettext
576 #
577 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
578 glib_save_LIBS="$LIBS"
579 LIBS="$LIBS -lintl $libintl_extra_libs"
580 unset ac_cv_func_bind_textdomain_codeset
581 AC_CHECK_FUNCS(bind_textdomain_codeset)
582 LIBS="$glib_save_LIBS"
583
584 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
585 gt_cv_func_dgettext_libc=no
586 else
587 if test "$gt_cv_func_dgettext_libc" = "yes" \
588 && test "$gt_cv_func_ngettext_libc" = "yes"; then
589 gt_cv_func_dgettext_libintl=no
590 fi
591 fi
592 fi
593 fi
594
595 if test "$gt_cv_func_dgettext_libc" = "yes" \
596 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
597 gt_cv_have_gettext=yes
598 fi
599
600 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
601 INTLLIBS="-lintl $libintl_extra_libs"
602 fi
603
604 if test "$gt_cv_have_gettext" = "yes"; then
605 AC_DEFINE(HAVE_GETTEXT,1,
606 [Define if the GNU gettext() function is already present or preinstalled.])
607 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
608 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
609 if test "$MSGFMT" != "no"; then
610 glib_save_LIBS="$LIBS"
611 LIBS="$LIBS $INTLLIBS"
612 AC_CHECK_FUNCS(dcgettext)
613 MSGFMT_OPTS=
614 AC_MSG_CHECKING([if msgfmt accepts -c])
615 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
616msgid ""
617msgstr ""
618"Content-Type: text/plain; charset=UTF-8\n"
619"Project-Id-Version: test 1.0\n"
620"PO-Revision-Date: 2007-02-15 12:01+0100\n"
621"Last-Translator: test <foo@bar.xx>\n"
622"Language-Team: C <LL@li.org>\n"
623"MIME-Version: 1.0\n"
624"Content-Transfer-Encoding: 8bit\n"
625], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
626 AC_SUBST(MSGFMT_OPTS)
627 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
628 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
629 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
630 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
631 return _nl_msg_cat_cntr],
632 [CATOBJEXT=.gmo
633 DATADIRNAME=share],
634 [case $host in
635 *-*-solaris*)
636 dnl On Solaris, if bind_textdomain_codeset is in libc,
637 dnl GNU format message catalog is always supported,
638 dnl since both are added to the libc all together.
639 dnl Hence, we'd like to go with DATADIRNAME=share and
640 dnl and CATOBJEXT=.gmo in this case.
641 AC_CHECK_FUNC(bind_textdomain_codeset,
642 [CATOBJEXT=.gmo
643 DATADIRNAME=share],
644 [CATOBJEXT=.mo
645 DATADIRNAME=lib])
646 ;;
647 *)
648 CATOBJEXT=.mo
649 DATADIRNAME=lib
650 ;;
651 esac])
652 LIBS="$glib_save_LIBS"
653 INSTOBJEXT=.mo
654 else
655 gt_cv_have_gettext=no
656 fi
657 fi
658 ])
659
660 if test "$gt_cv_have_gettext" = "yes" ; then
661 AC_DEFINE(ENABLE_NLS, 1,
662 [always defined to indicate that i18n is enabled])
663 fi
664
665 dnl Test whether we really found GNU xgettext.
666 if test "$XGETTEXT" != ":"; then
667 dnl If it is not GNU xgettext we define it as : so that the
668 dnl Makefiles still can work.
669 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
670 : ;
671 else
672 AC_MSG_RESULT(
673 [found xgettext program is not GNU xgettext; ignore it])
674 XGETTEXT=":"
675 fi
676 fi
677
678 # We need to process the po/ directory.
679 POSUB=po
680
681 AC_OUTPUT_COMMANDS(
682 [case "$CONFIG_FILES" in *po/Makefile.in*)
683 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
684 esac])
685
686 dnl These rules are solely for the distribution goal. While doing this
687 dnl we only have to keep exactly one list of the available catalogs
5218d3ad 688 dnl in configure.ac.
b1f084da
DB
689 for lang in $ALL_LINGUAS; do
690 GMOFILES="$GMOFILES $lang.gmo"
691 POFILES="$POFILES $lang.po"
692 done
693
694 dnl Make all variables we use known to autoconf.
695 AC_SUBST(CATALOGS)
696 AC_SUBST(CATOBJEXT)
697 AC_SUBST(DATADIRNAME)
698 AC_SUBST(GMOFILES)
699 AC_SUBST(INSTOBJEXT)
700 AC_SUBST(INTLLIBS)
701 AC_SUBST(PO_IN_DATADIR_TRUE)
702 AC_SUBST(PO_IN_DATADIR_FALSE)
703 AC_SUBST(POFILES)
704 AC_SUBST(POSUB)
705 ])
706
707# AM_GLIB_GNU_GETTEXT
708# -------------------
709# Do checks necessary for use of gettext. If a suitable implementation
710# of gettext is found in either in libintl or in the C library,
711# it will set INTLLIBS to the libraries needed for use of gettext
712# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
713# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
714# on various variables needed by the Makefile.in.in installed by
715# glib-gettextize.
716dnl
717glib_DEFUN([GLIB_GNU_GETTEXT],
718 [AC_REQUIRE([AC_PROG_CC])dnl
719 AC_REQUIRE([AC_HEADER_STDC])dnl
720
721 GLIB_LC_MESSAGES
722 GLIB_WITH_NLS
723
724 if test "$gt_cv_have_gettext" = "yes"; then
725 if test "x$ALL_LINGUAS" = "x"; then
726 LINGUAS=
727 else
728 AC_MSG_CHECKING(for catalogs to be installed)
729 NEW_LINGUAS=
730 for presentlang in $ALL_LINGUAS; do
731 useit=no
732 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
733 desiredlanguages="$LINGUAS"
734 else
735 desiredlanguages="$ALL_LINGUAS"
736 fi
737 for desiredlang in $desiredlanguages; do
738 # Use the presentlang catalog if desiredlang is
739 # a. equal to presentlang, or
740 # b. a variant of presentlang (because in this case,
741 # presentlang can be used as a fallback for messages
742 # which are not translated in the desiredlang catalog).
743 case "$desiredlang" in
744 "$presentlang"*) useit=yes;;
745 esac
746 done
747 if test $useit = yes; then
748 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
749 fi
750 done
751 LINGUAS=$NEW_LINGUAS
752 AC_MSG_RESULT($LINGUAS)
753 fi
754
755 dnl Construct list of names of catalog files to be constructed.
756 if test -n "$LINGUAS"; then
757 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
758 fi
759 fi
760
761 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
762 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
763 dnl Try to locate is.
764 MKINSTALLDIRS=
765 if test -n "$ac_aux_dir"; then
766 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
767 fi
768 if test -z "$MKINSTALLDIRS"; then
769 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
770 fi
771 AC_SUBST(MKINSTALLDIRS)
772
773 dnl Generate list of files to be processed by xgettext which will
774 dnl be included in po/Makefile.
775 test -d po || mkdir po
776 if test "x$srcdir" != "x."; then
777 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
778 posrcprefix="$srcdir/"
779 else
780 posrcprefix="../$srcdir/"
781 fi
782 else
783 posrcprefix="../"
784 fi
785 rm -f po/POTFILES
786 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
787 < $srcdir/po/POTFILES.in > po/POTFILES
788 ])
789
790# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
791# -------------------------------
792# Define VARIABLE to the location where catalog files will
793# be installed by po/Makefile.
794glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
795[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
796glib_save_prefix="$prefix"
797glib_save_exec_prefix="$exec_prefix"
798glib_save_datarootdir="$datarootdir"
799test "x$prefix" = xNONE && prefix=$ac_default_prefix
800test "x$exec_prefix" = xNONE && exec_prefix=$prefix
801datarootdir=`eval echo "${datarootdir}"`
802if test "x$CATOBJEXT" = "x.mo" ; then
803 localedir=`eval echo "${libdir}/locale"`
804else
805 localedir=`eval echo "${datadir}/locale"`
806fi
807prefix="$glib_save_prefix"
808exec_prefix="$glib_save_exec_prefix"
809datarootdir="$glib_save_datarootdir"
810AC_DEFINE_UNQUOTED($1, "$localedir",
811 [Define the location where the catalogs will be installed])
812])
813
814dnl
815dnl Now the definitions that aclocal will find
816dnl
5218d3ad 817ifdef(glib_configure_ac,[],[
b1f084da
DB
818AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
819AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
820])dnl
821
822# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
823#
824# Create a temporary file with TEST-FILE as its contents and pass the
825# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
826# 0 and perform ACTION-IF-FAIL for any other exit status.
827AC_DEFUN([GLIB_RUN_PROG],
828[cat >conftest.foo <<_ACEOF
829$2
830_ACEOF
831if AC_RUN_LOG([$1 conftest.foo]); then
832 m4_ifval([$3], [$3], [:])
833m4_ifvaln([$4], [else $4])dnl
834echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
835sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
836fi])
837
838
839
840dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
841# serial 40 IT_PROG_INTLTOOL
842AC_DEFUN([IT_PROG_INTLTOOL], [
843AC_PREREQ([2.50])dnl
844AC_REQUIRE([AM_NLS])dnl
845
846case "$am__api_version" in
847 1.[01234])
848 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
849 ;;
850 *)
851 ;;
852esac
853
854if test -n "$1"; then
855 AC_MSG_CHECKING([for intltool >= $1])
856
857 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
858 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
859 [INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
860 ]
861 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
862 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
863 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
864fi
865
866AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
867AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
868AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
869if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
870 AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
871fi
872
873 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
874INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
875 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
876 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
877 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
878 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
879 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
880 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
881INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
882 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
883 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
884 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
885 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
886 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
887 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
888 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
889 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
890 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
891 INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
892
893_IT_SUBST(INTLTOOL_DESKTOP_RULE)
894_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
895_IT_SUBST(INTLTOOL_KEYS_RULE)
896_IT_SUBST(INTLTOOL_PROP_RULE)
897_IT_SUBST(INTLTOOL_OAF_RULE)
898_IT_SUBST(INTLTOOL_PONG_RULE)
899_IT_SUBST(INTLTOOL_SERVER_RULE)
900_IT_SUBST(INTLTOOL_SHEET_RULE)
901_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
902_IT_SUBST(INTLTOOL_UI_RULE)
903_IT_SUBST(INTLTOOL_XAM_RULE)
904_IT_SUBST(INTLTOOL_KBD_RULE)
905_IT_SUBST(INTLTOOL_XML_RULE)
906_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
907_IT_SUBST(INTLTOOL_CAVES_RULE)
908_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
909_IT_SUBST(INTLTOOL_THEME_RULE)
910_IT_SUBST(INTLTOOL_SERVICE_RULE)
911_IT_SUBST(INTLTOOL_POLICY_RULE)
912
913# Check the gettext tools to make sure they are GNU
914AC_PATH_PROG(XGETTEXT, xgettext)
915AC_PATH_PROG(MSGMERGE, msgmerge)
916AC_PATH_PROG(MSGFMT, msgfmt)
917AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
918if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
919 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
920fi
921xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
922mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
923mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
924if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
925 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
926fi
927
928AC_PATH_PROG(INTLTOOL_PERL, perl)
929if test -z "$INTLTOOL_PERL"; then
930 AC_MSG_ERROR([perl not found])
931fi
932AC_MSG_CHECKING([for perl >= 5.8.1])
933$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
934if test $? -ne 0; then
935 AC_MSG_ERROR([perl 5.8.1 is required for intltool])
936else
937 IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
938 AC_MSG_RESULT([$IT_PERL_VERSION])
939fi
940if test "x$2" != "xno-xml"; then
941 AC_MSG_CHECKING([for XML::Parser])
942 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
943 AC_MSG_RESULT([ok])
944 else
945 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
946 fi
947fi
948
949# Substitute ALL_LINGUAS so we can use it in po/Makefile
950AC_SUBST(ALL_LINGUAS)
951
952# Set DATADIRNAME correctly if it is not set yet
953# (copied from glib-gettext.m4)
954if test -z "$DATADIRNAME"; then
955 AC_LINK_IFELSE(
956 [AC_LANG_PROGRAM([[]],
957 [[extern int _nl_msg_cat_cntr;
958 return _nl_msg_cat_cntr]])],
959 [DATADIRNAME=share],
960 [case $host in
961 *-*-solaris*)
962 dnl On Solaris, if bind_textdomain_codeset is in libc,
963 dnl GNU format message catalog is always supported,
964 dnl since both are added to the libc all together.
965 dnl Hence, we'd like to go with DATADIRNAME=share
966 dnl in this case.
967 AC_CHECK_FUNC(bind_textdomain_codeset,
968 [DATADIRNAME=share], [DATADIRNAME=lib])
969 ;;
970 *)
971 [DATADIRNAME=lib]
972 ;;
973 esac])
974fi
975AC_SUBST(DATADIRNAME)
976
977IT_PO_SUBDIR([po])
978
979])
980
981
982# IT_PO_SUBDIR(DIRNAME)
983# ---------------------
984# All po subdirs have to be declared with this macro; the subdir "po" is
985# declared by IT_PROG_INTLTOOL.
986#
987AC_DEFUN([IT_PO_SUBDIR],
988[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
989dnl
5218d3ad 990dnl The following CONFIG_COMMANDS should be executed at the very end
b1f084da
DB
991dnl of config.status.
992AC_CONFIG_COMMANDS_PRE([
993 AC_CONFIG_COMMANDS([$1/stamp-it], [
994 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
995 AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
996 fi
997 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
998 >"$1/stamp-it.tmp"
999 [sed '/^#/d
1000 s/^[[].*] *//
1001 /^[ ]*$/d
1002 '"s|^| $ac_top_srcdir/|" \
1003 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1004 ]
1005 [sed '/^POTFILES =/,/[^\\]$/ {
1006 /^POTFILES =/!d
1007 r $1/POTFILES
1008 }
1009 ' "$1/Makefile.in" >"$1/Makefile"]
1010 rm -f "$1/Makefile.tmp"
1011 mv "$1/stamp-it.tmp" "$1/stamp-it"
1012 ])
1013])dnl
1014])
1015
1016# _IT_SUBST(VARIABLE)
1017# -------------------
1018# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1019#
1020AC_DEFUN([_IT_SUBST],
1021[
1022AC_SUBST([$1])
1023m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1024]
1025)
1026
1027# deprecated macros
1028AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1029# A hint is needed for aclocal from Automake <= 1.9.4:
1030# AC_DEFUN([AC_PROG_INTLTOOL], ...)
1031
1032
5218d3ad
DB
1033# nls.m4 serial 5 (gettext-0.18)
1034dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
1035dnl Inc.
b1f084da
DB
1036dnl This file is free software; the Free Software Foundation
1037dnl gives unlimited permission to copy and/or distribute it,
1038dnl with or without modifications, as long as this notice is preserved.
1039dnl
1040dnl This file can can be used in projects which are not available under
1041dnl the GNU General Public License or the GNU Library General Public
1042dnl License but which still want to provide support for the GNU gettext
1043dnl functionality.
1044dnl Please note that the actual code of the GNU gettext library is covered
1045dnl by the GNU Library General Public License, and the rest of the GNU
1046dnl gettext package package is covered by the GNU General Public License.
1047dnl They are *not* in the public domain.
1048
1049dnl Authors:
1050dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
1051dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
1052
5218d3ad 1053AC_PREREQ([2.50])
b1f084da
DB
1054
1055AC_DEFUN([AM_NLS],
1056[
1057 AC_MSG_CHECKING([whether NLS is requested])
1058 dnl Default is enabled NLS
5218d3ad 1059 AC_ARG_ENABLE([nls],
b1f084da
DB
1060 [ --disable-nls do not use Native Language Support],
1061 USE_NLS=$enableval, USE_NLS=yes)
5218d3ad
DB
1062 AC_MSG_RESULT([$USE_NLS])
1063 AC_SUBST([USE_NLS])
b1f084da
DB
1064])
1065
1066# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
5218d3ad 1067# serial 1 (pkg-config-0.24)
b1f084da
DB
1068#
1069# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
1070#
1071# This program is free software; you can redistribute it and/or modify
1072# it under the terms of the GNU General Public License as published by
1073# the Free Software Foundation; either version 2 of the License, or
1074# (at your option) any later version.
1075#
1076# This program is distributed in the hope that it will be useful, but
1077# WITHOUT ANY WARRANTY; without even the implied warranty of
1078# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1079# General Public License for more details.
1080#
1081# You should have received a copy of the GNU General Public License
1082# along with this program; if not, write to the Free Software
1083# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1084#
1085# As a special exception to the GNU General Public License, if you
1086# distribute this file as part of a program that contains a
1087# configuration script generated by Autoconf, you may include it under
1088# the same distribution terms that you use for the rest of that program.
1089
1090# PKG_PROG_PKG_CONFIG([MIN-VERSION])
1091# ----------------------------------
1092AC_DEFUN([PKG_PROG_PKG_CONFIG],
1093[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
1094m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
5218d3ad
DB
1095AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
1096AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
1097AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1098
b1f084da
DB
1099if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
1100 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
1101fi
1102if test -n "$PKG_CONFIG"; then
1103 _pkg_min_version=m4_default([$1], [0.9.0])
1104 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
1105 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
1106 AC_MSG_RESULT([yes])
1107 else
1108 AC_MSG_RESULT([no])
1109 PKG_CONFIG=""
1110 fi
b1f084da
DB
1111fi[]dnl
1112])# PKG_PROG_PKG_CONFIG
1113
1114# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
1115#
1116# Check to see whether a particular set of modules exists. Similar
1117# to PKG_CHECK_MODULES(), but does not set variables or print errors.
1118#
5218d3ad
DB
1119# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1120# only at the first occurence in configure.ac, so if the first place
1121# it's called might be skipped (such as if it is within an "if", you
1122# have to call PKG_CHECK_EXISTS manually
b1f084da
DB
1123# --------------------------------------------------------------
1124AC_DEFUN([PKG_CHECK_EXISTS],
1125[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1126if test -n "$PKG_CONFIG" && \
1127 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
5218d3ad 1128 m4_default([$2], [:])
b1f084da
DB
1129m4_ifvaln([$3], [else
1130 $3])dnl
1131fi])
1132
b1f084da
DB
1133# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
1134# ---------------------------------------------
1135m4_define([_PKG_CONFIG],
1136[if test -n "$$1"; then
1137 pkg_cv_[]$1="$$1"
1138 elif test -n "$PKG_CONFIG"; then
1139 PKG_CHECK_EXISTS([$3],
1140 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
1141 [pkg_failed=yes])
1142 else
1143 pkg_failed=untried
1144fi[]dnl
1145])# _PKG_CONFIG
1146
1147# _PKG_SHORT_ERRORS_SUPPORTED
1148# -----------------------------
1149AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
1150[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1151if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
1152 _pkg_short_errors_supported=yes
1153else
1154 _pkg_short_errors_supported=no
1155fi[]dnl
1156])# _PKG_SHORT_ERRORS_SUPPORTED
1157
1158
1159# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
1160# [ACTION-IF-NOT-FOUND])
1161#
1162#
1163# Note that if there is a possibility the first call to
1164# PKG_CHECK_MODULES might not happen, you should be sure to include an
1165# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
1166#
1167#
1168# --------------------------------------------------------------
1169AC_DEFUN([PKG_CHECK_MODULES],
1170[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
1171AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
1172AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1173
1174pkg_failed=no
1175AC_MSG_CHECKING([for $1])
1176
1177_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
1178_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1179
1180m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
1181and $1[]_LIBS to avoid the need to call pkg-config.
1182See the pkg-config man page for more details.])
1183
1184if test $pkg_failed = yes; then
5218d3ad 1185 AC_MSG_RESULT([no])
b1f084da
DB
1186 _PKG_SHORT_ERRORS_SUPPORTED
1187 if test $_pkg_short_errors_supported = yes; then
1188 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
1189 else
1190 $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
1191 fi
1192 # Put the nasty error message in config.log where it belongs
1193 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1194
5218d3ad 1195 m4_default([$4], [AC_MSG_ERROR(
b1f084da
DB
1196[Package requirements ($2) were not met:
1197
1198$$1_PKG_ERRORS
1199
1200Consider adjusting the PKG_CONFIG_PATH environment variable if you
1201installed software in a non-standard prefix.
1202
5218d3ad
DB
1203_PKG_TEXT])[]dnl
1204 ])
b1f084da 1205elif test $pkg_failed = untried; then
5218d3ad
DB
1206 AC_MSG_RESULT([no])
1207 m4_default([$4], [AC_MSG_FAILURE(
b1f084da
DB
1208[The pkg-config script could not be found or is too old. Make sure it
1209is in your PATH or set the PKG_CONFIG environment variable to the full
1210path to pkg-config.
1211
1212_PKG_TEXT
1213
5218d3ad
DB
1214To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
1215 ])
b1f084da
DB
1216else
1217 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
1218 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
1219 AC_MSG_RESULT([yes])
5218d3ad 1220 $3
b1f084da
DB
1221fi[]dnl
1222])# PKG_CHECK_MODULES
1223
1224# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
1225#
1226# This file is free software; the Free Software Foundation
1227# gives unlimited permission to copy and/or distribute it,
1228# with or without modifications, as long as this notice is preserved.
1229
1230# AM_AUTOMAKE_VERSION(VERSION)
1231# ----------------------------
1232# Automake X.Y traces this macro to ensure aclocal.m4 has been
1233# generated from the m4 files accompanying Automake X.Y.
1234# (This private macro should not be called outside this file.)
1235AC_DEFUN([AM_AUTOMAKE_VERSION],
1236[am__api_version='1.11'
1237dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
1238dnl require some minimum version. Point them to the right macro.
1239m4_if([$1], [1.11.1], [],
1240 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
1241])
1242
1243# _AM_AUTOCONF_VERSION(VERSION)
1244# -----------------------------
1245# aclocal traces this macro to find the Autoconf version.
1246# This is a private macro too. Using m4_define simplifies
1247# the logic in aclocal, which can simply ignore this definition.
1248m4_define([_AM_AUTOCONF_VERSION], [])
1249
1250# AM_SET_CURRENT_AUTOMAKE_VERSION
1251# -------------------------------
1252# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
1253# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
1254AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1255[AM_AUTOMAKE_VERSION([1.11.1])dnl
1256m4_ifndef([AC_AUTOCONF_VERSION],
1257 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1258_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
1259
1260# AM_AUX_DIR_EXPAND -*- Autoconf -*-
1261
1262# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1263#
1264# This file is free software; the Free Software Foundation
1265# gives unlimited permission to copy and/or distribute it,
1266# with or without modifications, as long as this notice is preserved.
1267
1268# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1269# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
1270# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
1271#
1272# Of course, Automake must honor this variable whenever it calls a
1273# tool from the auxiliary directory. The problem is that $srcdir (and
1274# therefore $ac_aux_dir as well) can be either absolute or relative,
1275# depending on how configure is run. This is pretty annoying, since
1276# it makes $ac_aux_dir quite unusable in subdirectories: in the top
1277# source directory, any form will work fine, but in subdirectories a
1278# relative path needs to be adjusted first.
1279#
1280# $ac_aux_dir/missing
1281# fails when called from a subdirectory if $ac_aux_dir is relative
1282# $top_srcdir/$ac_aux_dir/missing
1283# fails if $ac_aux_dir is absolute,
1284# fails when called from a subdirectory in a VPATH build with
1285# a relative $ac_aux_dir
1286#
1287# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1288# are both prefixed by $srcdir. In an in-source build this is usually
1289# harmless because $srcdir is `.', but things will broke when you
1290# start a VPATH build or use an absolute $srcdir.
1291#
1292# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1293# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1294# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1295# and then we would define $MISSING as
1296# MISSING="\${SHELL} $am_aux_dir/missing"
1297# This will work as long as MISSING is not called from configure, because
1298# unfortunately $(top_srcdir) has no meaning in configure.
1299# However there are other variables, like CC, which are often used in
1300# configure, and could therefore not use this "fixed" $ac_aux_dir.
1301#
1302# Another solution, used here, is to always expand $ac_aux_dir to an
1303# absolute PATH. The drawback is that using absolute paths prevent a
1304# configured tree to be moved without reconfiguration.
1305
1306AC_DEFUN([AM_AUX_DIR_EXPAND],
1307[dnl Rely on autoconf to set up CDPATH properly.
1308AC_PREREQ([2.50])dnl
1309# expand $ac_aux_dir to an absolute path
1310am_aux_dir=`cd $ac_aux_dir && pwd`
1311])
1312
1313# AM_CONDITIONAL -*- Autoconf -*-
1314
1315# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
1316# Free Software Foundation, Inc.
1317#
1318# This file is free software; the Free Software Foundation
1319# gives unlimited permission to copy and/or distribute it,
1320# with or without modifications, as long as this notice is preserved.
1321
1322# serial 9
1323
1324# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1325# -------------------------------------
1326# Define a conditional.
1327AC_DEFUN([AM_CONDITIONAL],
1328[AC_PREREQ(2.52)dnl
1329 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1330 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1331AC_SUBST([$1_TRUE])dnl
1332AC_SUBST([$1_FALSE])dnl
1333_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1334_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1335m4_define([_AM_COND_VALUE_$1], [$2])dnl
1336if $2; then
1337 $1_TRUE=
1338 $1_FALSE='#'
1339else
1340 $1_TRUE='#'
1341 $1_FALSE=
1342fi
1343AC_CONFIG_COMMANDS_PRE(
1344[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1345 AC_MSG_ERROR([[conditional "$1" was never defined.
1346Usually this means the macro was only invoked conditionally.]])
1347fi])])
1348
1349# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
1350# Free Software Foundation, Inc.
1351#
1352# This file is free software; the Free Software Foundation
1353# gives unlimited permission to copy and/or distribute it,
1354# with or without modifications, as long as this notice is preserved.
1355
1356# serial 10
1357
1358# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1359# written in clear, in which case automake, when reading aclocal.m4,
1360# will think it sees a *use*, and therefore will trigger all it's
1361# C support machinery. Also note that it means that autoscan, seeing
1362# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1363
1364
1365# _AM_DEPENDENCIES(NAME)
1366# ----------------------
1367# See how the compiler implements dependency checking.
1368# NAME is "CC", "CXX", "GCJ", or "OBJC".
1369# We try a few techniques and use that to set a single cache variable.
1370#
1371# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1372# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1373# dependency, and given that the user is not expected to run this macro,
1374# just rely on AC_PROG_CC.
1375AC_DEFUN([_AM_DEPENDENCIES],
1376[AC_REQUIRE([AM_SET_DEPDIR])dnl
1377AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1378AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1379AC_REQUIRE([AM_DEP_TRACK])dnl
1380
1381ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
1382 [$1], CXX, [depcc="$CXX" am_compiler_list=],
1383 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1384 [$1], UPC, [depcc="$UPC" am_compiler_list=],
1385 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1386 [depcc="$$1" am_compiler_list=])
1387
1388AC_CACHE_CHECK([dependency style of $depcc],
1389 [am_cv_$1_dependencies_compiler_type],
1390[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1391 # We make a subdir and do the tests there. Otherwise we can end up
1392 # making bogus files that we don't know about and never remove. For
1393 # instance it was reported that on HP-UX the gcc test will end up
1394 # making a dummy file named `D' -- because `-MD' means `put the output
1395 # in D'.
1396 mkdir conftest.dir
1397 # Copy depcomp to subdir because otherwise we won't find it if we're
1398 # using a relative directory.
1399 cp "$am_depcomp" conftest.dir
1400 cd conftest.dir
1401 # We will build objects and dependencies in a subdirectory because
1402 # it helps to detect inapplicable dependency modes. For instance
1403 # both Tru64's cc and ICC support -MD to output dependencies as a
1404 # side effect of compilation, but ICC will put the dependencies in
1405 # the current directory while Tru64 will put them in the object
1406 # directory.
1407 mkdir sub
1408
1409 am_cv_$1_dependencies_compiler_type=none
1410 if test "$am_compiler_list" = ""; then
1411 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1412 fi
1413 am__universal=false
1414 m4_case([$1], [CC],
1415 [case " $depcc " in #(
1416 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1417 esac],
1418 [CXX],
1419 [case " $depcc " in #(
1420 *\ -arch\ *\ -arch\ *) am__universal=true ;;
1421 esac])
1422
1423 for depmode in $am_compiler_list; do
1424 # Setup a source with many dependencies, because some compilers
1425 # like to wrap large dependency lists on column 80 (with \), and
1426 # we should not choose a depcomp mode which is confused by this.
1427 #
1428 # We need to recreate these files for each test, as the compiler may
1429 # overwrite some of them when testing with obscure command lines.
1430 # This happens at least with the AIX C compiler.
1431 : > sub/conftest.c
1432 for i in 1 2 3 4 5 6; do
1433 echo '#include "conftst'$i'.h"' >> sub/conftest.c
1434 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
1435 # Solaris 8's {/usr,}/bin/sh.
1436 touch sub/conftst$i.h
1437 done
1438 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
1439
1440 # We check with `-c' and `-o' for the sake of the "dashmstdout"
1441 # mode. It turns out that the SunPro C++ compiler does not properly
1442 # handle `-M -o', and we need to detect this. Also, some Intel
1443 # versions had trouble with output in subdirs
1444 am__obj=sub/conftest.${OBJEXT-o}
1445 am__minus_obj="-o $am__obj"
1446 case $depmode in
1447 gcc)
1448 # This depmode causes a compiler race in universal mode.
1449 test "$am__universal" = false || continue
1450 ;;
1451 nosideeffect)
1452 # after this tag, mechanisms are not by side-effect, so they'll
1453 # only be used when explicitly requested
1454 if test "x$enable_dependency_tracking" = xyes; then
1455 continue
1456 else
1457 break
1458 fi
1459 ;;
1460 msvisualcpp | msvcmsys)
1461 # This compiler won't grok `-c -o', but also, the minuso test has
1462 # not run yet. These depmodes are late enough in the game, and
1463 # so weak that their functioning should not be impacted.
1464 am__obj=conftest.${OBJEXT-o}
1465 am__minus_obj=
1466 ;;
1467 none) break ;;
1468 esac
1469 if depmode=$depmode \
1470 source=sub/conftest.c object=$am__obj \
1471 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1472 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
1473 >/dev/null 2>conftest.err &&
1474 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
1475 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1476 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
1477 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1478 # icc doesn't choke on unknown options, it will just issue warnings
1479 # or remarks (even with -Werror). So we grep stderr for any message
1480 # that says an option was ignored or not supported.
1481 # When given -MP, icc 7.0 and 7.1 complain thusly:
1482 # icc: Command line warning: ignoring option '-M'; no argument required
1483 # The diagnosis changed in icc 8.0:
1484 # icc: Command line remark: option '-MP' not supported
1485 if (grep 'ignoring option' conftest.err ||
1486 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1487 am_cv_$1_dependencies_compiler_type=$depmode
1488 break
1489 fi
1490 fi
1491 done
1492
1493 cd ..
1494 rm -rf conftest.dir
1495else
1496 am_cv_$1_dependencies_compiler_type=none
1497fi
1498])
1499AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1500AM_CONDITIONAL([am__fastdep$1], [
1501 test "x$enable_dependency_tracking" != xno \
1502 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1503])
1504
1505
1506# AM_SET_DEPDIR
1507# -------------
1508# Choose a directory name for dependency files.
1509# This macro is AC_REQUIREd in _AM_DEPENDENCIES
1510AC_DEFUN([AM_SET_DEPDIR],
1511[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1512AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1513])
1514
1515
1516# AM_DEP_TRACK
1517# ------------
1518AC_DEFUN([AM_DEP_TRACK],
1519[AC_ARG_ENABLE(dependency-tracking,
1520[ --disable-dependency-tracking speeds up one-time build
1521 --enable-dependency-tracking do not reject slow dependency extractors])
1522if test "x$enable_dependency_tracking" != xno; then
1523 am_depcomp="$ac_aux_dir/depcomp"
1524 AMDEPBACKSLASH='\'
1525fi
1526AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1527AC_SUBST([AMDEPBACKSLASH])dnl
1528_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
1529])
1530
1531# Generate code to set up dependency tracking. -*- Autoconf -*-
1532
1533# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1534# Free Software Foundation, Inc.
1535#
1536# This file is free software; the Free Software Foundation
1537# gives unlimited permission to copy and/or distribute it,
1538# with or without modifications, as long as this notice is preserved.
1539
1540#serial 5
1541
1542# _AM_OUTPUT_DEPENDENCY_COMMANDS
1543# ------------------------------
1544AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1545[{
1546 # Autoconf 2.62 quotes --file arguments for eval, but not when files
1547 # are listed without --file. Let's play safe and only enable the eval
1548 # if we detect the quoting.
1549 case $CONFIG_FILES in
1550 *\'*) eval set x "$CONFIG_FILES" ;;
1551 *) set x $CONFIG_FILES ;;
1552 esac
1553 shift
1554 for mf
1555 do
1556 # Strip MF so we end up with the name of the file.
1557 mf=`echo "$mf" | sed -e 's/:.*$//'`
1558 # Check whether this is an Automake generated Makefile or not.
1559 # We used to match only the files named `Makefile.in', but
1560 # some people rename them; so instead we look at the file content.
1561 # Grep'ing the first line is not enough: some people post-process
1562 # each Makefile.in and add a new line on top of each file to say so.
1563 # Grep'ing the whole file is not good either: AIX grep has a line
1564 # limit of 2048, but all sed's we know have understand at least 4000.
1565 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
1566 dirpart=`AS_DIRNAME("$mf")`
1567 else
1568 continue
1569 fi
1570 # Extract the definition of DEPDIR, am__include, and am__quote
1571 # from the Makefile without running `make'.
1572 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1573 test -z "$DEPDIR" && continue
1574 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1575 test -z "am__include" && continue
1576 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1577 # When using ansi2knr, U may be empty or an underscore; expand it
1578 U=`sed -n 's/^U = //p' < "$mf"`
1579 # Find all dependency output files, they are included files with
1580 # $(DEPDIR) in their names. We invoke sed twice because it is the
1581 # simplest approach to changing $(DEPDIR) to its actual value in the
1582 # expansion.
1583 for file in `sed -n "
1584 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1585 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1586 # Make sure the directory exists.
1587 test -f "$dirpart/$file" && continue
1588 fdir=`AS_DIRNAME(["$file"])`
1589 AS_MKDIR_P([$dirpart/$fdir])
1590 # echo "creating $dirpart/$file"
1591 echo '# dummy' > "$dirpart/$file"
1592 done
1593 done
1594}
1595])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1596
1597
1598# AM_OUTPUT_DEPENDENCY_COMMANDS
1599# -----------------------------
1600# This macro should only be invoked once -- use via AC_REQUIRE.
1601#
1602# This code is only required when automatic dependency tracking
1603# is enabled. FIXME. This creates each `.P' file that we will
1604# need in order to bootstrap the dependency handling code.
1605AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1606[AC_CONFIG_COMMANDS([depfiles],
1607 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1608 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1609])
1610
1611# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1612# Free Software Foundation, Inc.
1613#
1614# This file is free software; the Free Software Foundation
1615# gives unlimited permission to copy and/or distribute it,
1616# with or without modifications, as long as this notice is preserved.
1617
1618# serial 8
1619
1620# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
1621AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
1622
1623# Do all the work for Automake. -*- Autoconf -*-
1624
1625# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
1626# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
1627#
1628# This file is free software; the Free Software Foundation
1629# gives unlimited permission to copy and/or distribute it,
1630# with or without modifications, as long as this notice is preserved.
1631
1632# serial 16
1633
1634# This macro actually does too much. Some checks are only needed if
1635# your package does certain things. But this isn't really a big deal.
1636
1637# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1638# AM_INIT_AUTOMAKE([OPTIONS])
1639# -----------------------------------------------
1640# The call with PACKAGE and VERSION arguments is the old style
1641# call (pre autoconf-2.50), which is being phased out. PACKAGE
1642# and VERSION should now be passed to AC_INIT and removed from
1643# the call to AM_INIT_AUTOMAKE.
1644# We support both call styles for the transition. After
1645# the next Automake release, Autoconf can make the AC_INIT
1646# arguments mandatory, and then we can depend on a new Autoconf
1647# release and drop the old call support.
1648AC_DEFUN([AM_INIT_AUTOMAKE],
1649[AC_PREREQ([2.62])dnl
1650dnl Autoconf wants to disallow AM_ names. We explicitly allow
1651dnl the ones we care about.
1652m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1653AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1654AC_REQUIRE([AC_PROG_INSTALL])dnl
1655if test "`cd $srcdir && pwd`" != "`pwd`"; then
1656 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
1657 # is not polluted with repeated "-I."
1658 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
1659 # test to see if srcdir already configured
1660 if test -f $srcdir/config.status; then
1661 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1662 fi
1663fi
1664
1665# test whether we have cygpath
1666if test -z "$CYGPATH_W"; then
1667 if (cygpath --version) >/dev/null 2>/dev/null; then
1668 CYGPATH_W='cygpath -w'
1669 else
1670 CYGPATH_W=echo
1671 fi
1672fi
1673AC_SUBST([CYGPATH_W])
1674
1675# Define the identity of the package.
1676dnl Distinguish between old-style and new-style calls.
1677m4_ifval([$2],
1678[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1679 AC_SUBST([PACKAGE], [$1])dnl
1680 AC_SUBST([VERSION], [$2])],
1681[_AM_SET_OPTIONS([$1])dnl
1682dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
1683m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
1684 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
1685 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1686 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1687
1688_AM_IF_OPTION([no-define],,
1689[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1690 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1691
1692# Some tools Automake needs.
1693AC_REQUIRE([AM_SANITY_CHECK])dnl
1694AC_REQUIRE([AC_ARG_PROGRAM])dnl
1695AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1696AM_MISSING_PROG(AUTOCONF, autoconf)
1697AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1698AM_MISSING_PROG(AUTOHEADER, autoheader)
1699AM_MISSING_PROG(MAKEINFO, makeinfo)
1700AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1701AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
1702AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1703# We need awk for the "check" target. The system "awk" is bad on
1704# some platforms.
1705AC_REQUIRE([AC_PROG_AWK])dnl
1706AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1707AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1708_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1709 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1710 [_AM_PROG_TAR([v7])])])
1711_AM_IF_OPTION([no-dependencies],,
1712[AC_PROVIDE_IFELSE([AC_PROG_CC],
1713 [_AM_DEPENDENCIES(CC)],
1714 [define([AC_PROG_CC],
1715 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1716AC_PROVIDE_IFELSE([AC_PROG_CXX],
1717 [_AM_DEPENDENCIES(CXX)],
1718 [define([AC_PROG_CXX],
1719 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1720AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1721 [_AM_DEPENDENCIES(OBJC)],
1722 [define([AC_PROG_OBJC],
1723 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1724])
1725_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1726dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1727dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1728dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1729AC_CONFIG_COMMANDS_PRE(dnl
1730[m4_provide_if([_AM_COMPILER_EXEEXT],
1731 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1732])
1733
1734dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1735dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1736dnl mangled by Autoconf and run in a shell conditional statement.
1737m4_define([_AC_COMPILER_EXEEXT],
1738m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1739
1740
1741# When config.status generates a header, we must update the stamp-h file.
1742# This file resides in the same directory as the config header
1743# that is generated. The stamp files are numbered to have different names.
1744
1745# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1746# loop where config.status creates the headers, so we can generate
1747# our stamp files there.
1748AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1749[# Compute $1's index in $config_headers.
1750_am_arg=$1
1751_am_stamp_count=1
1752for _am_header in $config_headers :; do
1753 case $_am_header in
1754 $_am_arg | $_am_arg:* )
1755 break ;;
1756 * )
1757 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1758 esac
1759done
1760echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
1761
1762# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
1763#
1764# This file is free software; the Free Software Foundation
1765# gives unlimited permission to copy and/or distribute it,
1766# with or without modifications, as long as this notice is preserved.
1767
1768# AM_PROG_INSTALL_SH
1769# ------------------
1770# Define $install_sh.
1771AC_DEFUN([AM_PROG_INSTALL_SH],
1772[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1773if test x"${install_sh}" != xset; then
1774 case $am_aux_dir in
1775 *\ * | *\ *)
1776 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
1777 *)
1778 install_sh="\${SHELL} $am_aux_dir/install-sh"
1779 esac
1780fi
1781AC_SUBST(install_sh)])
1782
1783# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1784#
1785# This file is free software; the Free Software Foundation
1786# gives unlimited permission to copy and/or distribute it,
1787# with or without modifications, as long as this notice is preserved.
1788
1789# serial 2
1790
1791# Check whether the underlying file-system supports filenames
1792# with a leading dot. For instance MS-DOS doesn't.
1793AC_DEFUN([AM_SET_LEADING_DOT],
1794[rm -rf .tst 2>/dev/null
1795mkdir .tst 2>/dev/null
1796if test -d .tst; then
1797 am__leading_dot=.
1798else
1799 am__leading_dot=_
1800fi
1801rmdir .tst 2>/dev/null
1802AC_SUBST([am__leading_dot])])
1803
1804# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
1805# From Jim Meyering
1806
1807# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
1808# Free Software Foundation, Inc.
1809#
1810# This file is free software; the Free Software Foundation
1811# gives unlimited permission to copy and/or distribute it,
1812# with or without modifications, as long as this notice is preserved.
1813
1814# serial 5
1815
1816# AM_MAINTAINER_MODE([DEFAULT-MODE])
1817# ----------------------------------
1818# Control maintainer-specific portions of Makefiles.
1819# Default is to disable them, unless `enable' is passed literally.
1820# For symmetry, `disable' may be passed as well. Anyway, the user
1821# can override the default with the --enable/--disable switch.
1822AC_DEFUN([AM_MAINTAINER_MODE],
1823[m4_case(m4_default([$1], [disable]),
1824 [enable], [m4_define([am_maintainer_other], [disable])],
1825 [disable], [m4_define([am_maintainer_other], [enable])],
1826 [m4_define([am_maintainer_other], [enable])
1827 m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
1828AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
1829 dnl maintainer-mode's default is 'disable' unless 'enable' is passed
1830 AC_ARG_ENABLE([maintainer-mode],
1831[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
1832 (and sometimes confusing) to the casual installer],
1833 [USE_MAINTAINER_MODE=$enableval],
1834 [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
1835 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1836 AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
1837 MAINT=$MAINTAINER_MODE_TRUE
1838 AC_SUBST([MAINT])dnl
1839]
1840)
1841
1842AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1843
1844# Check to see how 'make' treats includes. -*- Autoconf -*-
1845
1846# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
1847#
1848# This file is free software; the Free Software Foundation
1849# gives unlimited permission to copy and/or distribute it,
1850# with or without modifications, as long as this notice is preserved.
1851
1852# serial 4
1853
1854# AM_MAKE_INCLUDE()
1855# -----------------
1856# Check to see how make treats includes.
1857AC_DEFUN([AM_MAKE_INCLUDE],
1858[am_make=${MAKE-make}
1859cat > confinc << 'END'
1860am__doit:
1861 @echo this is the am__doit target
1862.PHONY: am__doit
1863END
1864# If we don't find an include directive, just comment out the code.
1865AC_MSG_CHECKING([for style of include used by $am_make])
1866am__include="#"
1867am__quote=
1868_am_result=none
1869# First try GNU make style include.
1870echo "include confinc" > confmf
1871# Ignore all kinds of additional output from `make'.
1872case `$am_make -s -f confmf 2> /dev/null` in #(
1873*the\ am__doit\ target*)
1874 am__include=include
1875 am__quote=
1876 _am_result=GNU
1877 ;;
1878esac
1879# Now try BSD make style include.
1880if test "$am__include" = "#"; then
1881 echo '.include "confinc"' > confmf
1882 case `$am_make -s -f confmf 2> /dev/null` in #(
1883 *the\ am__doit\ target*)
1884 am__include=.include
1885 am__quote="\""
1886 _am_result=BSD
1887 ;;
1888 esac
1889fi
1890AC_SUBST([am__include])
1891AC_SUBST([am__quote])
1892AC_MSG_RESULT([$_am_result])
1893rm -f confinc confmf
1894])
1895
1896# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
1897# Free Software Foundation, Inc.
1898#
1899# This file is free software; the Free Software Foundation
1900# gives unlimited permission to copy and/or distribute it,
1901# with or without modifications, as long as this notice is preserved.
1902
1903# serial 6
1904
1905# AM_PROG_CC_C_O
1906# --------------
1907# Like AC_PROG_CC_C_O, but changed for automake.
1908AC_DEFUN([AM_PROG_CC_C_O],
1909[AC_REQUIRE([AC_PROG_CC_C_O])dnl
1910AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1911AC_REQUIRE_AUX_FILE([compile])dnl
1912# FIXME: we rely on the cache variable name because
1913# there is no other way.
1914set dummy $CC
1915am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
1916eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
1917if test "$am_t" != yes; then
1918 # Losing compiler, so override with the script.
1919 # FIXME: It is wrong to rewrite CC.
1920 # But if we don't then we get into trouble of one sort or another.
1921 # A longer-term fix would be to have automake use am__CC in this case,
1922 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
1923 CC="$am_aux_dir/compile $CC"
1924fi
1925dnl Make sure AC_PROG_CC is never called again, or it will override our
1926dnl setting of CC.
1927m4_define([AC_PROG_CC],
1928 [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
1929])
1930
1931# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1932
1933# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
1934# Free Software Foundation, Inc.
1935#
1936# This file is free software; the Free Software Foundation
1937# gives unlimited permission to copy and/or distribute it,
1938# with or without modifications, as long as this notice is preserved.
1939
1940# serial 6
1941
1942# AM_MISSING_PROG(NAME, PROGRAM)
1943# ------------------------------
1944AC_DEFUN([AM_MISSING_PROG],
1945[AC_REQUIRE([AM_MISSING_HAS_RUN])
1946$1=${$1-"${am_missing_run}$2"}
1947AC_SUBST($1)])
1948
1949
1950# AM_MISSING_HAS_RUN
1951# ------------------
1952# Define MISSING if not defined so far and test if it supports --run.
1953# If it does, set am_missing_run to use it, otherwise, to nothing.
1954AC_DEFUN([AM_MISSING_HAS_RUN],
1955[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1956AC_REQUIRE_AUX_FILE([missing])dnl
1957if test x"${MISSING+set}" != xset; then
1958 case $am_aux_dir in
1959 *\ * | *\ *)
1960 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
1961 *)
1962 MISSING="\${SHELL} $am_aux_dir/missing" ;;
1963 esac
1964fi
1965# Use eval to expand $SHELL
1966if eval "$MISSING --run true"; then
1967 am_missing_run="$MISSING --run "
1968else
1969 am_missing_run=
1970 AC_MSG_WARN([`missing' script is too old or missing])
1971fi
1972])
1973
1974# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1975#
1976# This file is free software; the Free Software Foundation
1977# gives unlimited permission to copy and/or distribute it,
1978# with or without modifications, as long as this notice is preserved.
1979
1980# AM_PROG_MKDIR_P
1981# ---------------
1982# Check for `mkdir -p'.
1983AC_DEFUN([AM_PROG_MKDIR_P],
1984[AC_PREREQ([2.60])dnl
1985AC_REQUIRE([AC_PROG_MKDIR_P])dnl
1986dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
1987dnl while keeping a definition of mkdir_p for backward compatibility.
1988dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
1989dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
1990dnl Makefile.ins that do not define MKDIR_P, so we do our own
1991dnl adjustment using top_builddir (which is defined more often than
1992dnl MKDIR_P).
1993AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
1994case $mkdir_p in
1995 [[\\/$]]* | ?:[[\\/]]*) ;;
1996 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1997esac
1998])
1999
2000# Helper functions for option handling. -*- Autoconf -*-
2001
2002# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
2003#
2004# This file is free software; the Free Software Foundation
2005# gives unlimited permission to copy and/or distribute it,
2006# with or without modifications, as long as this notice is preserved.
2007
2008# serial 4
2009
2010# _AM_MANGLE_OPTION(NAME)
2011# -----------------------
2012AC_DEFUN([_AM_MANGLE_OPTION],
2013[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
2014
2015# _AM_SET_OPTION(NAME)
2016# ------------------------------
2017# Set option NAME. Presently that only means defining a flag for this option.
2018AC_DEFUN([_AM_SET_OPTION],
2019[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
2020
2021# _AM_SET_OPTIONS(OPTIONS)
2022# ----------------------------------
2023# OPTIONS is a space-separated list of Automake options.
2024AC_DEFUN([_AM_SET_OPTIONS],
2025[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
2026
2027# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
2028# -------------------------------------------
2029# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
2030AC_DEFUN([_AM_IF_OPTION],
2031[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
2032
2033# Check to make sure that the build environment is sane. -*- Autoconf -*-
2034
2035# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
2036# Free Software Foundation, Inc.
2037#
2038# This file is free software; the Free Software Foundation
2039# gives unlimited permission to copy and/or distribute it,
2040# with or without modifications, as long as this notice is preserved.
2041
2042# serial 5
2043
2044# AM_SANITY_CHECK
2045# ---------------
2046AC_DEFUN([AM_SANITY_CHECK],
2047[AC_MSG_CHECKING([whether build environment is sane])
2048# Just in case
2049sleep 1
2050echo timestamp > conftest.file
2051# Reject unsafe characters in $srcdir or the absolute working directory
2052# name. Accept space and tab only in the latter.
2053am_lf='
2054'
2055case `pwd` in
2056 *[[\\\"\#\$\&\'\`$am_lf]]*)
2057 AC_MSG_ERROR([unsafe absolute working directory name]);;
2058esac
2059case $srcdir in
2060 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
2061 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
2062esac
2063
2064# Do `set' in a subshell so we don't clobber the current shell's
2065# arguments. Must try -L first in case configure is actually a
2066# symlink; some systems play weird games with the mod time of symlinks
2067# (eg FreeBSD returns the mod time of the symlink's containing
2068# directory).
2069if (
2070 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2071 if test "$[*]" = "X"; then
2072 # -L didn't work.
2073 set X `ls -t "$srcdir/configure" conftest.file`
2074 fi
2075 rm -f conftest.file
2076 if test "$[*]" != "X $srcdir/configure conftest.file" \
2077 && test "$[*]" != "X conftest.file $srcdir/configure"; then
2078
2079 # If neither matched, then we have a broken ls. This can happen
2080 # if, for instance, CONFIG_SHELL is bash and it inherits a
2081 # broken ls alias from the environment. This has actually
2082 # happened. Such a system could not be considered "sane".
2083 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
2084alias in your environment])
2085 fi
2086
2087 test "$[2]" = conftest.file
2088 )
2089then
2090 # Ok.
2091 :
2092else
2093 AC_MSG_ERROR([newly created file is older than distributed files!
2094Check your system clock])
2095fi
2096AC_MSG_RESULT(yes)])
2097
2098# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
2099#
2100# This file is free software; the Free Software Foundation
2101# gives unlimited permission to copy and/or distribute it,
2102# with or without modifications, as long as this notice is preserved.
2103
2104# AM_PROG_INSTALL_STRIP
2105# ---------------------
2106# One issue with vendor `install' (even GNU) is that you can't
2107# specify the program used to strip binaries. This is especially
2108# annoying in cross-compiling environments, where the build's strip
2109# is unlikely to handle the host's binaries.
2110# Fortunately install-sh will honor a STRIPPROG variable, so we
2111# always use install-sh in `make install-strip', and initialize
2112# STRIPPROG with the value of the STRIP variable (set by the user).
2113AC_DEFUN([AM_PROG_INSTALL_STRIP],
2114[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
2115# Installed binaries are usually stripped using `strip' when the user
2116# run `make install-strip'. However `strip' might not be the right
2117# tool to use in cross-compilation environments, therefore Automake
2118# will honor the `STRIP' environment variable to overrule this program.
2119dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
2120if test "$cross_compiling" != no; then
2121 AC_CHECK_TOOL([STRIP], [strip], :)
2122fi
2123INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2124AC_SUBST([INSTALL_STRIP_PROGRAM])])
2125
2126# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
2127#
2128# This file is free software; the Free Software Foundation
2129# gives unlimited permission to copy and/or distribute it,
2130# with or without modifications, as long as this notice is preserved.
2131
2132# serial 2
2133
2134# _AM_SUBST_NOTMAKE(VARIABLE)
2135# ---------------------------
2136# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
2137# This macro is traced by Automake.
2138AC_DEFUN([_AM_SUBST_NOTMAKE])
2139
2140# AM_SUBST_NOTMAKE(VARIABLE)
2141# ---------------------------
2142# Public sister of _AM_SUBST_NOTMAKE.
2143AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
2144
2145# Check how to create a tarball. -*- Autoconf -*-
2146
2147# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
2148#
2149# This file is free software; the Free Software Foundation
2150# gives unlimited permission to copy and/or distribute it,
2151# with or without modifications, as long as this notice is preserved.
2152
2153# serial 2
2154
2155# _AM_PROG_TAR(FORMAT)
2156# --------------------
2157# Check how to create a tarball in format FORMAT.
2158# FORMAT should be one of `v7', `ustar', or `pax'.
2159#
2160# Substitute a variable $(am__tar) that is a command
2161# writing to stdout a FORMAT-tarball containing the directory
2162# $tardir.
2163# tardir=directory && $(am__tar) > result.tar
2164#
2165# Substitute a variable $(am__untar) that extract such
2166# a tarball read from stdin.
2167# $(am__untar) < result.tar
2168AC_DEFUN([_AM_PROG_TAR],
2169[# Always define AMTAR for backward compatibility.
2170AM_MISSING_PROG([AMTAR], [tar])
2171m4_if([$1], [v7],
2172 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
2173 [m4_case([$1], [ustar],, [pax],,
2174 [m4_fatal([Unknown tar format])])
2175AC_MSG_CHECKING([how to create a $1 tar archive])
2176# Loop over all known methods to create a tar archive until one works.
2177_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
2178_am_tools=${am_cv_prog_tar_$1-$_am_tools}
2179# Do not fold the above two line into one, because Tru64 sh and
2180# Solaris sh will not grok spaces in the rhs of `-'.
2181for _am_tool in $_am_tools
2182do
2183 case $_am_tool in
2184 gnutar)
2185 for _am_tar in tar gnutar gtar;
2186 do
2187 AM_RUN_LOG([$_am_tar --version]) && break
2188 done
2189 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
2190 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
2191 am__untar="$_am_tar -xf -"
2192 ;;
2193 plaintar)
2194 # Must skip GNU tar: if it does not support --format= it doesn't create
2195 # ustar tarball either.
2196 (tar --version) >/dev/null 2>&1 && continue
2197 am__tar='tar chf - "$$tardir"'
2198 am__tar_='tar chf - "$tardir"'
2199 am__untar='tar xf -'
2200 ;;
2201 pax)
2202 am__tar='pax -L -x $1 -w "$$tardir"'
2203 am__tar_='pax -L -x $1 -w "$tardir"'
2204 am__untar='pax -r'
2205 ;;
2206 cpio)
2207 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
2208 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
2209 am__untar='cpio -i -H $1 -d'
2210 ;;
2211 none)
2212 am__tar=false
2213 am__tar_=false
2214 am__untar=false
2215 ;;
2216 esac
2217
2218 # If the value was cached, stop now. We just wanted to have am__tar
2219 # and am__untar set.
2220 test -n "${am_cv_prog_tar_$1}" && break
2221
2222 # tar/untar a dummy directory, and stop if the command works
2223 rm -rf conftest.dir
2224 mkdir conftest.dir
2225 echo GrepMe > conftest.dir/file
2226 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
2227 rm -rf conftest.dir
2228 if test -s conftest.tar; then
2229 AM_RUN_LOG([$am__untar <conftest.tar])
2230 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
2231 fi
2232done
2233rm -rf conftest.dir
2234
2235AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
2236AC_MSG_RESULT([$am_cv_prog_tar_$1])])
2237AC_SUBST([am__tar])
2238AC_SUBST([am__untar])
2239]) # _AM_PROG_TAR
2240