1 # generated automatically by aclocal 1.9.6 -*- Autoconf -*-
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.
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
14 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
15 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
17 # This file is free software, distributed under the terms of the GNU
18 # General Public License. As a special exception to the GNU General
19 # Public License, this file may be distributed as part of a program
20 # that contains a configuration script generated by Autoconf, under
21 # the same distribution terms as the rest of that program.
23 # This file can be copied and used freely without restrictions. It can
24 # be used in projects which are not available under the GNU Public License
25 # but which still want to provide support for the GNU gettext functionality.
27 # Macro to add for using GNU gettext.
28 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
30 # Modified to never use included libintl.
31 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
33 # Major rework to remove unused code
34 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
36 # Added better handling of ALL_LINGUAS from GNU gettext version
37 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
39 # Modified to require ngettext
40 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
42 # We need this here as well, since someone might use autoconf-2.5x
43 # to configure GLib then an older version to configure a package
44 # using AM_GLIB_GNU_GETTEXT
48 dnl We go to great lengths to make sure that aclocal won't
49 dnl try to pull in the installed version of these macros
50 dnl when running aclocal in the glib directory.
52 m4_copy([AC_DEFUN],[glib_DEFUN])
53 m4_copy([AC_REQUIRE],[glib_REQUIRE])
55 dnl At the end, if we're not within glib, we'll define the public
56 dnl definitions in terms of our private definitions.
61 glib_DEFUN([GLIB_LC_MESSAGES],
62 [AC_CHECK_HEADERS([locale.h])
63 if test $ac_cv_header_locale_h = yes; then
64 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
65 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
66 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
67 if test $am_cv_val_LC_MESSAGES = yes; then
68 AC_DEFINE(HAVE_LC_MESSAGES, 1,
69 [Define if your <locale.h> file defines LC_MESSAGES.])
73 # GLIB_PATH_PROG_WITH_TEST
74 #----------------------------
75 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
76 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
77 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
78 [# Extract the first word of "$2", so it can be a program name with args.
79 set dummy $2; ac_word=[$]2
80 AC_MSG_CHECKING([for $ac_word])
81 AC_CACHE_VAL(ac_cv_path_$1,
84 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
87 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
88 for ac_dir in ifelse([$5], , $PATH, [$5]); do
89 test -z "$ac_dir" && ac_dir=.
90 if test -f $ac_dir/$ac_word; then
92 ac_cv_path_$1="$ac_dir/$ac_word"
98 dnl If no 4th arg is given, leave the cache variable unset,
99 dnl so AC_PATH_PROGS will keep looking.
100 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
105 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
115 glib_DEFUN([GLIB_WITH_NLS],
116 dnl NLS is obligatory
117 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
121 gt_cv_have_gettext=no
127 AC_CHECK_HEADER(libintl.h,
128 [gt_cv_func_dgettext_libintl="no"
129 libintl_extra_libs=""
132 # First check in libc
134 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
138 [return !ngettext ("","", 1)],
139 gt_cv_func_ngettext_libc=yes,
140 gt_cv_func_ngettext_libc=no)
143 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
144 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
148 [return !dgettext ("","")],
149 gt_cv_func_dgettext_libc=yes,
150 gt_cv_func_dgettext_libc=no)
154 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
155 AC_CHECK_FUNCS(bind_textdomain_codeset)
159 # If we don't have everything we want, check in libintl
161 if test "$gt_cv_func_dgettext_libc" != "yes" \
162 || test "$gt_cv_func_ngettext_libc" != "yes" \
163 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
165 AC_CHECK_LIB(intl, bindtextdomain,
166 [AC_CHECK_LIB(intl, ngettext,
167 [AC_CHECK_LIB(intl, dgettext,
168 gt_cv_func_dgettext_libintl=yes)])])
170 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
171 AC_MSG_CHECKING([if -liconv is needed to use gettext])
173 AC_CHECK_LIB(intl, ngettext,
174 [AC_CHECK_LIB(intl, dcgettext,
175 [gt_cv_func_dgettext_libintl=yes
176 libintl_extra_libs=-liconv],
182 # If we found libintl, then check in it for bind_textdomain_codeset();
183 # we'll prefer libc if neither have bind_textdomain_codeset(),
184 # and both have dgettext and ngettext
186 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
187 glib_save_LIBS="$LIBS"
188 LIBS="$LIBS -lintl $libintl_extra_libs"
189 unset ac_cv_func_bind_textdomain_codeset
190 AC_CHECK_FUNCS(bind_textdomain_codeset)
191 LIBS="$glib_save_LIBS"
193 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
194 gt_cv_func_dgettext_libc=no
196 if test "$gt_cv_func_dgettext_libc" = "yes" \
197 && test "$gt_cv_func_ngettext_libc" = "yes"; then
198 gt_cv_func_dgettext_libintl=no
204 if test "$gt_cv_func_dgettext_libc" = "yes" \
205 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
206 gt_cv_have_gettext=yes
209 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
210 INTLLIBS="-lintl $libintl_extra_libs"
213 if test "$gt_cv_have_gettext" = "yes"; then
214 AC_DEFINE(HAVE_GETTEXT,1,
215 [Define if the GNU gettext() function is already present or preinstalled.])
216 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
217 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
218 if test "$MSGFMT" != "no"; then
219 glib_save_LIBS="$LIBS"
220 LIBS="$LIBS $INTLLIBS"
221 AC_CHECK_FUNCS(dcgettext)
222 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
223 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
224 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
225 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
226 return _nl_msg_cat_cntr],
231 dnl On Solaris, if bind_textdomain_codeset is in libc,
232 dnl GNU format message catalog is always supported,
233 dnl since both are added to the libc all together.
234 dnl Hence, we'd like to go with DATADIRNAME=share and
235 dnl and CATOBJEXT=.gmo in this case.
236 AC_CHECK_FUNC(bind_textdomain_codeset,
247 LIBS="$glib_save_LIBS"
250 gt_cv_have_gettext=no
255 if test "$gt_cv_have_gettext" = "yes" ; then
256 AC_DEFINE(ENABLE_NLS, 1,
257 [always defined to indicate that i18n is enabled])
260 dnl Test whether we really found GNU xgettext.
261 if test "$XGETTEXT" != ":"; then
262 dnl If it is not GNU xgettext we define it as : so that the
263 dnl Makefiles still can work.
264 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
268 [found xgettext program is not GNU xgettext; ignore it])
273 # We need to process the po/ directory.
277 [case "$CONFIG_FILES" in *po/Makefile.in*)
278 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
281 dnl These rules are solely for the distribution goal. While doing this
282 dnl we only have to keep exactly one list of the available catalogs
284 for lang in $ALL_LINGUAS; do
285 GMOFILES="$GMOFILES $lang.gmo"
286 POFILES="$POFILES $lang.po"
289 dnl Make all variables we use known to autoconf.
292 AC_SUBST(DATADIRNAME)
296 AC_SUBST(PO_IN_DATADIR_TRUE)
297 AC_SUBST(PO_IN_DATADIR_FALSE)
302 # AM_GLIB_GNU_GETTEXT
303 # -------------------
304 # Do checks necessary for use of gettext. If a suitable implementation
305 # of gettext is found in either in libintl or in the C library,
306 # it will set INTLLIBS to the libraries needed for use of gettext
307 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
308 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
309 # on various variables needed by the Makefile.in.in installed by
312 glib_DEFUN([GLIB_GNU_GETTEXT],
313 [AC_REQUIRE([AC_PROG_CC])dnl
314 AC_REQUIRE([AC_HEADER_STDC])dnl
319 if test "$gt_cv_have_gettext" = "yes"; then
320 if test "x$ALL_LINGUAS" = "x"; then
323 AC_MSG_CHECKING(for catalogs to be installed)
325 for presentlang in $ALL_LINGUAS; do
327 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
328 desiredlanguages="$LINGUAS"
330 desiredlanguages="$ALL_LINGUAS"
332 for desiredlang in $desiredlanguages; do
333 # Use the presentlang catalog if desiredlang is
334 # a. equal to presentlang, or
335 # b. a variant of presentlang (because in this case,
336 # presentlang can be used as a fallback for messages
337 # which are not translated in the desiredlang catalog).
338 case "$desiredlang" in
339 "$presentlang"*) useit=yes;;
342 if test $useit = yes; then
343 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
347 AC_MSG_RESULT($LINGUAS)
350 dnl Construct list of names of catalog files to be constructed.
351 if test -n "$LINGUAS"; then
352 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
356 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
357 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
358 dnl Try to locate is.
360 if test -n "$ac_aux_dir"; then
361 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
363 if test -z "$MKINSTALLDIRS"; then
364 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
366 AC_SUBST(MKINSTALLDIRS)
368 dnl Generate list of files to be processed by xgettext which will
369 dnl be included in po/Makefile.
370 test -d po || mkdir po
371 if test "x$srcdir" != "x."; then
372 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
373 posrcprefix="$srcdir/"
375 posrcprefix="../$srcdir/"
381 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
382 < $srcdir/po/POTFILES.in > po/POTFILES
385 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
386 # -------------------------------
387 # Define VARIABLE to the location where catalog files will
388 # be installed by po/Makefile.
389 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
390 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
391 glib_save_prefix="$prefix"
392 glib_save_exec_prefix="$exec_prefix"
393 glib_save_datarootdir="$datarootdir"
394 test "x$prefix" = xNONE && prefix=$ac_default_prefix
395 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
396 datarootdir=`eval echo "${datarootdir}"`
397 if test "x$CATOBJEXT" = "x.mo" ; then
398 localedir=`eval echo "${libdir}/locale"`
400 localedir=`eval echo "${datadir}/locale"`
402 prefix="$glib_save_prefix"
403 exec_prefix="$glib_save_exec_prefix"
404 datarootdir="$glib_save_datarootdir"
405 AC_DEFINE_UNQUOTED($1, "$localedir",
406 [Define the location where the catalogs will be installed])
410 dnl Now the definitions that aclocal will find
412 ifdef(glib_configure_in,[],[
413 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
414 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
418 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
419 # serial 35 IT_PROG_INTLTOOL
420 AC_DEFUN([IT_PROG_INTLTOOL],
421 [AC_PREREQ([2.50])dnl
423 case "$am__api_version" in
425 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
431 if test -n "$1"; then
432 AC_MSG_CHECKING(for intltool >= $1)
434 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
435 INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
436 [INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split($ 2, VERSION, "."); print VERSION[1] * 1000 + VERSION[2] * 100 + VERSION[3];}' ${ac_aux_dir}/intltool-update.in`
438 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
439 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
440 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
443 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 $< [$]@'
444 INTLTOOL_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 $< [$]@'
445 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 $< [$]@'
446 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 $< [$]@'
447 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
448 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 $< [$]@'
449 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 $< [$]@'
450 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 $< [$]@'
451 INTLTOOL_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 $< [$]@'
452 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 $< [$]@'
453 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 $< [$]@'
454 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
455 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 $< [$]@'
456 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 $< [$]@'
457 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 $< [$]@'
458 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 $< [$]@'
459 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 $< [$]@'
460 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 $< [$]@'
462 AC_SUBST(INTLTOOL_DESKTOP_RULE)
463 AC_SUBST(INTLTOOL_DIRECTORY_RULE)
464 AC_SUBST(INTLTOOL_KEYS_RULE)
465 AC_SUBST(INTLTOOL_PROP_RULE)
466 AC_SUBST(INTLTOOL_OAF_RULE)
467 AC_SUBST(INTLTOOL_PONG_RULE)
468 AC_SUBST(INTLTOOL_SERVER_RULE)
469 AC_SUBST(INTLTOOL_SHEET_RULE)
470 AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
471 AC_SUBST(INTLTOOL_UI_RULE)
472 AC_SUBST(INTLTOOL_XAM_RULE)
473 AC_SUBST(INTLTOOL_KBD_RULE)
474 AC_SUBST(INTLTOOL_XML_RULE)
475 AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
476 AC_SUBST(INTLTOOL_CAVES_RULE)
477 AC_SUBST(INTLTOOL_SCHEMAS_RULE)
478 AC_SUBST(INTLTOOL_THEME_RULE)
479 AC_SUBST(INTLTOOL_SERVICE_RULE)
481 # Use the tools built into the package, not the ones that are installed.
482 AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
483 AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
484 AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
486 AC_PATH_PROG(INTLTOOL_PERL, perl)
487 if test -z "$INTLTOOL_PERL"; then
488 AC_MSG_ERROR([perl not found; required for intltool])
490 if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
491 AC_MSG_ERROR([perl 5.x required for intltool])
493 if test "x$2" != "xno-xml"; then
494 AC_MSG_CHECKING([for XML::Parser])
495 if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
498 AC_MSG_ERROR([XML::Parser perl module is required for intltool])
502 AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
503 AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
504 AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
505 AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
507 # Substitute ALL_LINGUAS so we can use it in po/Makefile
508 AC_SUBST(ALL_LINGUAS)
510 # Set DATADIRNAME correctly if it is not set yet
511 # (copied from glib-gettext.m4)
512 if test -z "$DATADIRNAME"; then
513 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
514 return _nl_msg_cat_cntr],
518 dnl On Solaris, if bind_textdomain_codeset is in libc,
519 dnl GNU format message catalog is always supported,
520 dnl since both are added to the libc all together.
521 dnl Hence, we'd like to go with DATADIRNAME=share
523 AC_CHECK_FUNC(bind_textdomain_codeset,
524 [DATADIRNAME=share], [DATADIRNAME=lib])
531 AC_SUBST(DATADIRNAME)
535 dnl The following is very similar to
537 dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
539 dnl with the following slight differences:
540 dnl - the *.in files are in ac_aux_dir,
541 dnl - if the file haven't changed upon reconfigure, it's not touched,
542 dnl - the evaluation of the third parameter enables a hack which computes
543 dnl the actual value of $libdir,
544 dnl - the user sees "executing intltool commands", instead of
545 dnl "creating intltool-extract" and such.
547 dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
550 AC_CONFIG_COMMANDS([intltool], [
552 for file in intltool-extract intltool-merge intltool-update; do
553 sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
554 -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
555 -e "s|@INTLTOOL_ICONV@|${INTLTOOL_ICONV}|g" \
556 -e "s|@INTLTOOL_MSGFMT@|${INTLTOOL_MSGFMT}|g" \
557 -e "s|@INTLTOOL_MSGMERGE@|${INTLTOOL_MSGMERGE}|g" \
558 -e "s|@INTLTOOL_XGETTEXT@|${INTLTOOL_XGETTEXT}|g" \
559 -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
560 < ${ac_aux_dir}/${file}.in > ${file}.out
561 if cmp -s ${file} ${file}.out 2>/dev/null; then
564 mv -f ${file}.out ${file}
571 [INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
572 prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
573 INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' INTLTOOL_ICONV='${INTLTOOL_ICONV}'
574 INTLTOOL_MSGFMT='${INTLTOOL_MSGFMT}' INTLTOOL_MSGMERGE='${INTLTOOL_MSGMERGE}'
575 INTLTOOL_XGETTEXT='${INTLTOOL_XGETTEXT}'])
580 # IT_PO_SUBDIR(DIRNAME)
581 # ---------------------
582 # All po subdirs have to be declared with this macro; the subdir "po" is
583 # declared by IT_PROG_INTLTOOL.
585 AC_DEFUN([IT_PO_SUBDIR],
586 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
588 dnl The following CONFIG_COMMANDS should be exetuted at the very end
589 dnl of config.status.
590 AC_CONFIG_COMMANDS_PRE([
591 AC_CONFIG_COMMANDS([$1/stamp-it], [
592 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
597 '"s|^| $ac_top_srcdir/|" \
598 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
600 if test ! -f "$1/Makefile"; then
601 AC_MSG_ERROR([$1/Makefile is not ready.])
603 mv "$1/Makefile" "$1/Makefile.tmp"
604 [sed '/^POTFILES =/,/[^\\]$/ {
608 ' "$1/Makefile.tmp" >"$1/Makefile"]
609 rm -f "$1/Makefile.tmp"
610 mv "$1/stamp-it.tmp" "$1/stamp-it"
617 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
618 # A hint is needed for aclocal from Automake <= 1.9.4:
619 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
622 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
624 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
626 # This program is free software; you can redistribute it and/or modify
627 # it under the terms of the GNU General Public License as published by
628 # the Free Software Foundation; either version 2 of the License, or
629 # (at your option) any later version.
631 # This program is distributed in the hope that it will be useful, but
632 # WITHOUT ANY WARRANTY; without even the implied warranty of
633 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
634 # General Public License for more details.
636 # You should have received a copy of the GNU General Public License
637 # along with this program; if not, write to the Free Software
638 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
640 # As a special exception to the GNU General Public License, if you
641 # distribute this file as part of a program that contains a
642 # configuration script generated by Autoconf, you may include it under
643 # the same distribution terms that you use for the rest of that program.
645 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
646 # ----------------------------------
647 AC_DEFUN([PKG_PROG_PKG_CONFIG],
648 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
649 m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
650 AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
651 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
652 AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
654 if test -n "$PKG_CONFIG"; then
655 _pkg_min_version=m4_default([$1], [0.9.0])
656 AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
657 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
665 ])# PKG_PROG_PKG_CONFIG
667 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
669 # Check to see whether a particular set of modules exists. Similar
670 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
673 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
674 # this or PKG_CHECK_MODULES is called, or make sure to call
675 # PKG_CHECK_EXISTS manually
676 # --------------------------------------------------------------
677 AC_DEFUN([PKG_CHECK_EXISTS],
678 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
679 if test -n "$PKG_CONFIG" && \
680 AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
681 m4_ifval([$2], [$2], [:])
682 m4_ifvaln([$3], [else
687 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
688 # ---------------------------------------------
689 m4_define([_PKG_CONFIG],
690 [if test -n "$PKG_CONFIG"; then
691 if test -n "$$1"; then
694 PKG_CHECK_EXISTS([$3],
695 [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
703 # _PKG_SHORT_ERRORS_SUPPORTED
704 # -----------------------------
705 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
706 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
707 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
708 _pkg_short_errors_supported=yes
710 _pkg_short_errors_supported=no
712 ])# _PKG_SHORT_ERRORS_SUPPORTED
715 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
716 # [ACTION-IF-NOT-FOUND])
719 # Note that if there is a possibility the first call to
720 # PKG_CHECK_MODULES might not happen, you should be sure to include an
721 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
724 # --------------------------------------------------------------
725 AC_DEFUN([PKG_CHECK_MODULES],
726 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
727 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
728 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
731 AC_MSG_CHECKING([for $1])
733 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
734 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
736 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
737 and $1[]_LIBS to avoid the need to call pkg-config.
738 See the pkg-config man page for more details.])
740 if test $pkg_failed = yes; then
741 _PKG_SHORT_ERRORS_SUPPORTED
742 if test $_pkg_short_errors_supported = yes; then
743 $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
745 $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
747 # Put the nasty error message in config.log where it belongs
748 echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
750 ifelse([$4], , [AC_MSG_ERROR(dnl
751 [Package requirements ($2) were not met:
755 Consider adjusting the PKG_CONFIG_PATH environment variable if you
756 installed software in a non-standard prefix.
762 elif test $pkg_failed = untried; then
763 ifelse([$4], , [AC_MSG_FAILURE(dnl
764 [The pkg-config script could not be found or is too old. Make sure it
765 is in your PATH or set the PKG_CONFIG environment variable to the full
770 To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
773 $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
774 $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
776 ifelse([$3], , :, [$3])
778 ])# PKG_CHECK_MODULES
780 # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
782 # This file is free software; the Free Software Foundation
783 # gives unlimited permission to copy and/or distribute it,
784 # with or without modifications, as long as this notice is preserved.
786 # AM_AUTOMAKE_VERSION(VERSION)
787 # ----------------------------
788 # Automake X.Y traces this macro to ensure aclocal.m4 has been
789 # generated from the m4 files accompanying Automake X.Y.
790 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
792 # AM_SET_CURRENT_AUTOMAKE_VERSION
793 # -------------------------------
794 # Call AM_AUTOMAKE_VERSION so it can be traced.
795 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
796 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
797 [AM_AUTOMAKE_VERSION([1.9.6])])
799 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
801 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
803 # This file is free software; the Free Software Foundation
804 # gives unlimited permission to copy and/or distribute it,
805 # with or without modifications, as long as this notice is preserved.
807 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
808 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
809 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
811 # Of course, Automake must honor this variable whenever it calls a
812 # tool from the auxiliary directory. The problem is that $srcdir (and
813 # therefore $ac_aux_dir as well) can be either absolute or relative,
814 # depending on how configure is run. This is pretty annoying, since
815 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
816 # source directory, any form will work fine, but in subdirectories a
817 # relative path needs to be adjusted first.
819 # $ac_aux_dir/missing
820 # fails when called from a subdirectory if $ac_aux_dir is relative
821 # $top_srcdir/$ac_aux_dir/missing
822 # fails if $ac_aux_dir is absolute,
823 # fails when called from a subdirectory in a VPATH build with
824 # a relative $ac_aux_dir
826 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
827 # are both prefixed by $srcdir. In an in-source build this is usually
828 # harmless because $srcdir is `.', but things will broke when you
829 # start a VPATH build or use an absolute $srcdir.
831 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
832 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
833 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
834 # and then we would define $MISSING as
835 # MISSING="\${SHELL} $am_aux_dir/missing"
836 # This will work as long as MISSING is not called from configure, because
837 # unfortunately $(top_srcdir) has no meaning in configure.
838 # However there are other variables, like CC, which are often used in
839 # configure, and could therefore not use this "fixed" $ac_aux_dir.
841 # Another solution, used here, is to always expand $ac_aux_dir to an
842 # absolute PATH. The drawback is that using absolute paths prevent a
843 # configured tree to be moved without reconfiguration.
845 AC_DEFUN([AM_AUX_DIR_EXPAND],
846 [dnl Rely on autoconf to set up CDPATH properly.
848 # expand $ac_aux_dir to an absolute path
849 am_aux_dir=`cd $ac_aux_dir && pwd`
853 # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005
854 # Free Software Foundation, Inc.
856 # This file is free software; the Free Software Foundation
857 # gives unlimited permission to copy and/or distribute it,
858 # with or without modifications, as long as this notice is preserved.
862 # This was merged into AC_PROG_CC in Autoconf.
864 AU_DEFUN([AM_PROG_CC_STDC],
866 AC_DIAGNOSE([obsolete], [$0:
867 your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
868 `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when
869 you adjust the code. You can also remove the above call to
870 AC_PROG_CC if you already called it elsewhere.])
871 am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
873 AU_DEFUN([fp_PROG_CC_STDC])
875 # AM_CONDITIONAL -*- Autoconf -*-
877 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
878 # Free Software Foundation, Inc.
880 # This file is free software; the Free Software Foundation
881 # gives unlimited permission to copy and/or distribute it,
882 # with or without modifications, as long as this notice is preserved.
886 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
887 # -------------------------------------
888 # Define a conditional.
889 AC_DEFUN([AM_CONDITIONAL],
891 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
892 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
902 AC_CONFIG_COMMANDS_PRE(
903 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
904 AC_MSG_ERROR([[conditional "$1" was never defined.
905 Usually this means the macro was only invoked conditionally.]])
909 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
910 # Free Software Foundation, Inc.
912 # This file is free software; the Free Software Foundation
913 # gives unlimited permission to copy and/or distribute it,
914 # with or without modifications, as long as this notice is preserved.
918 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
919 # written in clear, in which case automake, when reading aclocal.m4,
920 # will think it sees a *use*, and therefore will trigger all it's
921 # C support machinery. Also note that it means that autoscan, seeing
922 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
925 # _AM_DEPENDENCIES(NAME)
926 # ----------------------
927 # See how the compiler implements dependency checking.
928 # NAME is "CC", "CXX", "GCJ", or "OBJC".
929 # We try a few techniques and use that to set a single cache variable.
931 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
932 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
933 # dependency, and given that the user is not expected to run this macro,
934 # just rely on AC_PROG_CC.
935 AC_DEFUN([_AM_DEPENDENCIES],
936 [AC_REQUIRE([AM_SET_DEPDIR])dnl
937 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
938 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
939 AC_REQUIRE([AM_DEP_TRACK])dnl
941 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
942 [$1], CXX, [depcc="$CXX" am_compiler_list=],
943 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
944 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
945 [depcc="$$1" am_compiler_list=])
947 AC_CACHE_CHECK([dependency style of $depcc],
948 [am_cv_$1_dependencies_compiler_type],
949 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
950 # We make a subdir and do the tests there. Otherwise we can end up
951 # making bogus files that we don't know about and never remove. For
952 # instance it was reported that on HP-UX the gcc test will end up
953 # making a dummy file named `D' -- because `-MD' means `put the output
956 # Copy depcomp to subdir because otherwise we won't find it if we're
957 # using a relative directory.
958 cp "$am_depcomp" conftest.dir
960 # We will build objects and dependencies in a subdirectory because
961 # it helps to detect inapplicable dependency modes. For instance
962 # both Tru64's cc and ICC support -MD to output dependencies as a
963 # side effect of compilation, but ICC will put the dependencies in
964 # the current directory while Tru64 will put them in the object
968 am_cv_$1_dependencies_compiler_type=none
969 if test "$am_compiler_list" = ""; then
970 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
972 for depmode in $am_compiler_list; do
973 # Setup a source with many dependencies, because some compilers
974 # like to wrap large dependency lists on column 80 (with \), and
975 # we should not choose a depcomp mode which is confused by this.
977 # We need to recreate these files for each test, as the compiler may
978 # overwrite some of them when testing with obscure command lines.
979 # This happens at least with the AIX C compiler.
981 for i in 1 2 3 4 5 6; do
982 echo '#include "conftst'$i'.h"' >> sub/conftest.c
983 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
984 # Solaris 8's {/usr,}/bin/sh.
985 touch sub/conftst$i.h
987 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
991 # after this tag, mechanisms are not by side-effect, so they'll
992 # only be used when explicitly requested
993 if test "x$enable_dependency_tracking" = xyes; then
1001 # We check with `-c' and `-o' for the sake of the "dashmstdout"
1002 # mode. It turns out that the SunPro C++ compiler does not properly
1003 # handle `-M -o', and we need to detect this.
1004 if depmode=$depmode \
1005 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
1006 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
1007 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
1008 >/dev/null 2>conftest.err &&
1009 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
1010 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
1011 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1012 # icc doesn't choke on unknown options, it will just issue warnings
1013 # or remarks (even with -Werror). So we grep stderr for any message
1014 # that says an option was ignored or not supported.
1015 # When given -MP, icc 7.0 and 7.1 complain thusly:
1016 # icc: Command line warning: ignoring option '-M'; no argument required
1017 # The diagnosis changed in icc 8.0:
1018 # icc: Command line remark: option '-MP' not supported
1019 if (grep 'ignoring option' conftest.err ||
1020 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
1021 am_cv_$1_dependencies_compiler_type=$depmode
1030 am_cv_$1_dependencies_compiler_type=none
1033 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1034 AM_CONDITIONAL([am__fastdep$1], [
1035 test "x$enable_dependency_tracking" != xno \
1036 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1042 # Choose a directory name for dependency files.
1043 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
1044 AC_DEFUN([AM_SET_DEPDIR],
1045 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1046 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1052 AC_DEFUN([AM_DEP_TRACK],
1053 [AC_ARG_ENABLE(dependency-tracking,
1054 [ --disable-dependency-tracking speeds up one-time build
1055 --enable-dependency-tracking do not reject slow dependency extractors])
1056 if test "x$enable_dependency_tracking" != xno; then
1057 am_depcomp="$ac_aux_dir/depcomp"
1060 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1061 AC_SUBST([AMDEPBACKSLASH])
1064 # Generate code to set up dependency tracking. -*- Autoconf -*-
1066 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
1067 # Free Software Foundation, Inc.
1069 # This file is free software; the Free Software Foundation
1070 # gives unlimited permission to copy and/or distribute it,
1071 # with or without modifications, as long as this notice is preserved.
1075 # _AM_OUTPUT_DEPENDENCY_COMMANDS
1076 # ------------------------------
1077 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1078 [for mf in $CONFIG_FILES; do
1079 # Strip MF so we end up with the name of the file.
1080 mf=`echo "$mf" | sed -e 's/:.*$//'`
1081 # Check whether this is an Automake generated Makefile or not.
1082 # We used to match only the files named `Makefile.in', but
1083 # some people rename them; so instead we look at the file content.
1084 # Grep'ing the first line is not enough: some people post-process
1085 # each Makefile.in and add a new line on top of each file to say so.
1086 # So let's grep whole file.
1087 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
1088 dirpart=`AS_DIRNAME("$mf")`
1092 # Extract the definition of DEPDIR, am__include, and am__quote
1093 # from the Makefile without running `make'.
1094 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
1095 test -z "$DEPDIR" && continue
1096 am__include=`sed -n 's/^am__include = //p' < "$mf"`
1097 test -z "am__include" && continue
1098 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
1099 # When using ansi2knr, U may be empty or an underscore; expand it
1100 U=`sed -n 's/^U = //p' < "$mf"`
1101 # Find all dependency output files, they are included files with
1102 # $(DEPDIR) in their names. We invoke sed twice because it is the
1103 # simplest approach to changing $(DEPDIR) to its actual value in the
1105 for file in `sed -n "
1106 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
1107 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1108 # Make sure the directory exists.
1109 test -f "$dirpart/$file" && continue
1110 fdir=`AS_DIRNAME(["$file"])`
1111 AS_MKDIR_P([$dirpart/$fdir])
1112 # echo "creating $dirpart/$file"
1113 echo '# dummy' > "$dirpart/$file"
1116 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1119 # AM_OUTPUT_DEPENDENCY_COMMANDS
1120 # -----------------------------
1121 # This macro should only be invoked once -- use via AC_REQUIRE.
1123 # This code is only required when automatic dependency tracking
1124 # is enabled. FIXME. This creates each `.P' file that we will
1125 # need in order to bootstrap the dependency handling code.
1126 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1127 [AC_CONFIG_COMMANDS([depfiles],
1128 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1129 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1132 # Do all the work for Automake. -*- Autoconf -*-
1134 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
1135 # Free Software Foundation, Inc.
1137 # This file is free software; the Free Software Foundation
1138 # gives unlimited permission to copy and/or distribute it,
1139 # with or without modifications, as long as this notice is preserved.
1143 # This macro actually does too much. Some checks are only needed if
1144 # your package does certain things. But this isn't really a big deal.
1146 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1147 # AM_INIT_AUTOMAKE([OPTIONS])
1148 # -----------------------------------------------
1149 # The call with PACKAGE and VERSION arguments is the old style
1150 # call (pre autoconf-2.50), which is being phased out. PACKAGE
1151 # and VERSION should now be passed to AC_INIT and removed from
1152 # the call to AM_INIT_AUTOMAKE.
1153 # We support both call styles for the transition. After
1154 # the next Automake release, Autoconf can make the AC_INIT
1155 # arguments mandatory, and then we can depend on a new Autoconf
1156 # release and drop the old call support.
1157 AC_DEFUN([AM_INIT_AUTOMAKE],
1158 [AC_PREREQ([2.58])dnl
1159 dnl Autoconf wants to disallow AM_ names. We explicitly allow
1160 dnl the ones we care about.
1161 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1162 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1163 AC_REQUIRE([AC_PROG_INSTALL])dnl
1164 # test to see if srcdir already configured
1165 if test "`cd $srcdir && pwd`" != "`pwd`" &&
1166 test -f $srcdir/config.status; then
1167 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1170 # test whether we have cygpath
1171 if test -z "$CYGPATH_W"; then
1172 if (cygpath --version) >/dev/null 2>/dev/null; then
1173 CYGPATH_W='cygpath -w'
1178 AC_SUBST([CYGPATH_W])
1180 # Define the identity of the package.
1181 dnl Distinguish between old-style and new-style calls.
1183 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1184 AC_SUBST([PACKAGE], [$1])dnl
1185 AC_SUBST([VERSION], [$2])],
1186 [_AM_SET_OPTIONS([$1])dnl
1187 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1188 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1190 _AM_IF_OPTION([no-define],,
1191 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1192 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1194 # Some tools Automake needs.
1195 AC_REQUIRE([AM_SANITY_CHECK])dnl
1196 AC_REQUIRE([AC_ARG_PROGRAM])dnl
1197 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1198 AM_MISSING_PROG(AUTOCONF, autoconf)
1199 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1200 AM_MISSING_PROG(AUTOHEADER, autoheader)
1201 AM_MISSING_PROG(MAKEINFO, makeinfo)
1203 AM_PROG_INSTALL_STRIP
1204 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
1205 # We need awk for the "check" target. The system "awk" is bad on
1207 AC_REQUIRE([AC_PROG_AWK])dnl
1208 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1209 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1210 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1211 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1212 [_AM_PROG_TAR([v7])])])
1213 _AM_IF_OPTION([no-dependencies],,
1214 [AC_PROVIDE_IFELSE([AC_PROG_CC],
1215 [_AM_DEPENDENCIES(CC)],
1216 [define([AC_PROG_CC],
1217 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1218 AC_PROVIDE_IFELSE([AC_PROG_CXX],
1219 [_AM_DEPENDENCIES(CXX)],
1220 [define([AC_PROG_CXX],
1221 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1226 # When config.status generates a header, we must update the stamp-h file.
1227 # This file resides in the same directory as the config header
1228 # that is generated. The stamp files are numbered to have different names.
1230 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1231 # loop where config.status creates the headers, so we can generate
1232 # our stamp files there.
1233 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1234 [# Compute $1's index in $config_headers.
1236 for _am_header in $config_headers :; do
1241 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
1244 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1246 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1248 # This file is free software; the Free Software Foundation
1249 # gives unlimited permission to copy and/or distribute it,
1250 # with or without modifications, as long as this notice is preserved.
1252 # AM_PROG_INSTALL_SH
1253 # ------------------
1254 # Define $install_sh.
1255 AC_DEFUN([AM_PROG_INSTALL_SH],
1256 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1257 install_sh=${install_sh-"$am_aux_dir/install-sh"}
1258 AC_SUBST(install_sh)])
1260 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
1262 # This file is free software; the Free Software Foundation
1263 # gives unlimited permission to copy and/or distribute it,
1264 # with or without modifications, as long as this notice is preserved.
1268 # Check whether the underlying file-system supports filenames
1269 # with a leading dot. For instance MS-DOS doesn't.
1270 AC_DEFUN([AM_SET_LEADING_DOT],
1271 [rm -rf .tst 2>/dev/null
1272 mkdir .tst 2>/dev/null
1273 if test -d .tst; then
1278 rmdir .tst 2>/dev/null
1279 AC_SUBST([am__leading_dot])])
1281 # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
1284 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
1285 # Free Software Foundation, Inc.
1287 # This file is free software; the Free Software Foundation
1288 # gives unlimited permission to copy and/or distribute it,
1289 # with or without modifications, as long as this notice is preserved.
1293 AC_DEFUN([AM_MAINTAINER_MODE],
1294 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1295 dnl maintainer-mode is disabled by default
1296 AC_ARG_ENABLE(maintainer-mode,
1297 [ --enable-maintainer-mode enable make rules and dependencies not useful
1298 (and sometimes confusing) to the casual installer],
1299 USE_MAINTAINER_MODE=$enableval,
1300 USE_MAINTAINER_MODE=no)
1301 AC_MSG_RESULT([$USE_MAINTAINER_MODE])
1302 AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
1303 MAINT=$MAINTAINER_MODE_TRUE
1308 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
1310 # Check to see how 'make' treats includes. -*- Autoconf -*-
1312 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
1314 # This file is free software; the Free Software Foundation
1315 # gives unlimited permission to copy and/or distribute it,
1316 # with or without modifications, as long as this notice is preserved.
1322 # Check to see how make treats includes.
1323 AC_DEFUN([AM_MAKE_INCLUDE],
1324 [am_make=${MAKE-make}
1325 cat > confinc << 'END'
1330 # If we don't find an include directive, just comment out the code.
1331 AC_MSG_CHECKING([for style of include used by $am_make])
1335 # First try GNU make style include.
1336 echo "include confinc" > confmf
1337 # We grep out `Entering directory' and `Leaving directory'
1338 # messages which can occur if `w' ends up in MAKEFLAGS.
1339 # In particular we don't look at `^make:' because GNU make might
1340 # be invoked under some other name (usually "gmake"), in which
1341 # case it prints its new name instead of `make'.
1342 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
1347 # Now try BSD make style include.
1348 if test "$am__include" = "#"; then
1349 echo '.include "confinc"' > confmf
1350 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1351 am__include=.include
1356 AC_SUBST([am__include])
1357 AC_SUBST([am__quote])
1358 AC_MSG_RESULT([$_am_result])
1359 rm -f confinc confmf
1362 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
1364 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
1365 # Free Software Foundation, Inc.
1367 # This file is free software; the Free Software Foundation
1368 # gives unlimited permission to copy and/or distribute it,
1369 # with or without modifications, as long as this notice is preserved.
1373 # AM_MISSING_PROG(NAME, PROGRAM)
1374 # ------------------------------
1375 AC_DEFUN([AM_MISSING_PROG],
1376 [AC_REQUIRE([AM_MISSING_HAS_RUN])
1377 $1=${$1-"${am_missing_run}$2"}
1381 # AM_MISSING_HAS_RUN
1382 # ------------------
1383 # Define MISSING if not defined so far and test if it supports --run.
1384 # If it does, set am_missing_run to use it, otherwise, to nothing.
1385 AC_DEFUN([AM_MISSING_HAS_RUN],
1386 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1387 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1388 # Use eval to expand $SHELL
1389 if eval "$MISSING --run true"; then
1390 am_missing_run="$MISSING --run "
1393 AC_MSG_WARN([`missing' script is too old or missing])
1397 # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
1399 # This file is free software; the Free Software Foundation
1400 # gives unlimited permission to copy and/or distribute it,
1401 # with or without modifications, as long as this notice is preserved.
1405 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
1407 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
1408 # created by `make install' are always world readable, even if the
1409 # installer happens to have an overly restrictive umask (e.g. 077).
1410 # This was a mistake. There are at least two reasons why we must not
1412 # - it causes special bits like SGID to be ignored,
1413 # - it may be too restrictive (some setups expect 775 directories).
1415 # Do not use -m 0755 and let people choose whatever they expect by
1418 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
1419 # Some implementations (such as Solaris 8's) are not thread-safe: if a
1420 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
1421 # concurrently, both version can detect that a/ is missing, but only
1422 # one can create it and the other will error out. Consequently we
1423 # restrict ourselves to GNU make (using the --version option ensures
1425 AC_DEFUN([AM_PROG_MKDIR_P],
1426 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
1427 # We used to keeping the `.' as first argument, in order to
1428 # allow $(mkdir_p) to be used without argument. As in
1429 # $(mkdir_p) $(somedir)
1430 # where $(somedir) is conditionally defined. However this is wrong
1432 # 1. if the package is installed by a user who cannot write `.'
1433 # make install will fail,
1434 # 2. the above comment should most certainly read
1435 # $(mkdir_p) $(DESTDIR)$(somedir)
1436 # so it does not work when $(somedir) is undefined and
1437 # $(DESTDIR) is not.
1438 # To support the latter case, we have to write
1439 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
1440 # so the `.' trick is pointless.
1441 mkdir_p='mkdir -p --'
1443 # On NextStep and OpenStep, the `mkdir' command does not
1444 # recognize any option. It will interpret all options as
1445 # directories to create, and then abort because `.' already
1447 for d in ./-p ./--version;
1449 test -d $d && rmdir $d
1451 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
1452 if test -f "$ac_aux_dir/mkinstalldirs"; then
1453 mkdir_p='$(mkinstalldirs)'
1455 mkdir_p='$(install_sh) -d'
1458 AC_SUBST([mkdir_p])])
1460 # Helper functions for option handling. -*- Autoconf -*-
1462 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
1464 # This file is free software; the Free Software Foundation
1465 # gives unlimited permission to copy and/or distribute it,
1466 # with or without modifications, as long as this notice is preserved.
1470 # _AM_MANGLE_OPTION(NAME)
1471 # -----------------------
1472 AC_DEFUN([_AM_MANGLE_OPTION],
1473 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1475 # _AM_SET_OPTION(NAME)
1476 # ------------------------------
1477 # Set option NAME. Presently that only means defining a flag for this option.
1478 AC_DEFUN([_AM_SET_OPTION],
1479 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1481 # _AM_SET_OPTIONS(OPTIONS)
1482 # ----------------------------------
1483 # OPTIONS is a space-separated list of Automake options.
1484 AC_DEFUN([_AM_SET_OPTIONS],
1485 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1487 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1488 # -------------------------------------------
1489 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1490 AC_DEFUN([_AM_IF_OPTION],
1491 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1493 # Check to make sure that the build environment is sane. -*- Autoconf -*-
1495 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
1496 # Free Software Foundation, Inc.
1498 # This file is free software; the Free Software Foundation
1499 # gives unlimited permission to copy and/or distribute it,
1500 # with or without modifications, as long as this notice is preserved.
1506 AC_DEFUN([AM_SANITY_CHECK],
1507 [AC_MSG_CHECKING([whether build environment is sane])
1510 echo timestamp > conftest.file
1511 # Do `set' in a subshell so we don't clobber the current shell's
1512 # arguments. Must try -L first in case configure is actually a
1513 # symlink; some systems play weird games with the mod time of symlinks
1514 # (eg FreeBSD returns the mod time of the symlink's containing
1517 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1518 if test "$[*]" = "X"; then
1520 set X `ls -t $srcdir/configure conftest.file`
1523 if test "$[*]" != "X $srcdir/configure conftest.file" \
1524 && test "$[*]" != "X conftest.file $srcdir/configure"; then
1526 # If neither matched, then we have a broken ls. This can happen
1527 # if, for instance, CONFIG_SHELL is bash and it inherits a
1528 # broken ls alias from the environment. This has actually
1529 # happened. Such a system could not be considered "sane".
1530 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1531 alias in your environment])
1534 test "$[2]" = conftest.file
1540 AC_MSG_ERROR([newly created file is older than distributed files!
1541 Check your system clock])
1543 AC_MSG_RESULT(yes)])
1545 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
1547 # This file is free software; the Free Software Foundation
1548 # gives unlimited permission to copy and/or distribute it,
1549 # with or without modifications, as long as this notice is preserved.
1551 # AM_PROG_INSTALL_STRIP
1552 # ---------------------
1553 # One issue with vendor `install' (even GNU) is that you can't
1554 # specify the program used to strip binaries. This is especially
1555 # annoying in cross-compiling environments, where the build's strip
1556 # is unlikely to handle the host's binaries.
1557 # Fortunately install-sh will honor a STRIPPROG variable, so we
1558 # always use install-sh in `make install-strip', and initialize
1559 # STRIPPROG with the value of the STRIP variable (set by the user).
1560 AC_DEFUN([AM_PROG_INSTALL_STRIP],
1561 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1562 # Installed binaries are usually stripped using `strip' when the user
1563 # run `make install-strip'. However `strip' might not be the right
1564 # tool to use in cross-compilation environments, therefore Automake
1565 # will honor the `STRIP' environment variable to overrule this program.
1566 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1567 if test "$cross_compiling" != no; then
1568 AC_CHECK_TOOL([STRIP], [strip], :)
1570 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
1571 AC_SUBST([INSTALL_STRIP_PROGRAM])])
1573 # Check how to create a tarball. -*- Autoconf -*-
1575 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
1577 # This file is free software; the Free Software Foundation
1578 # gives unlimited permission to copy and/or distribute it,
1579 # with or without modifications, as long as this notice is preserved.
1583 # _AM_PROG_TAR(FORMAT)
1584 # --------------------
1585 # Check how to create a tarball in format FORMAT.
1586 # FORMAT should be one of `v7', `ustar', or `pax'.
1588 # Substitute a variable $(am__tar) that is a command
1589 # writing to stdout a FORMAT-tarball containing the directory
1591 # tardir=directory && $(am__tar) > result.tar
1593 # Substitute a variable $(am__untar) that extract such
1594 # a tarball read from stdin.
1595 # $(am__untar) < result.tar
1596 AC_DEFUN([_AM_PROG_TAR],
1597 [# Always define AMTAR for backward compatibility.
1598 AM_MISSING_PROG([AMTAR], [tar])
1600 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
1601 [m4_case([$1], [ustar],, [pax],,
1602 [m4_fatal([Unknown tar format])])
1603 AC_MSG_CHECKING([how to create a $1 tar archive])
1604 # Loop over all known methods to create a tar archive until one works.
1605 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1606 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1607 # Do not fold the above two line into one, because Tru64 sh and
1608 # Solaris sh will not grok spaces in the rhs of `-'.
1609 for _am_tool in $_am_tools
1613 for _am_tar in tar gnutar gtar;
1615 AM_RUN_LOG([$_am_tar --version]) && break
1617 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1618 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1619 am__untar="$_am_tar -xf -"
1622 # Must skip GNU tar: if it does not support --format= it doesn't create
1623 # ustar tarball either.
1624 (tar --version) >/dev/null 2>&1 && continue
1625 am__tar='tar chf - "$$tardir"'
1626 am__tar_='tar chf - "$tardir"'
1627 am__untar='tar xf -'
1630 am__tar='pax -L -x $1 -w "$$tardir"'
1631 am__tar_='pax -L -x $1 -w "$tardir"'
1635 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1636 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1637 am__untar='cpio -i -H $1 -d'
1646 # If the value was cached, stop now. We just wanted to have am__tar
1647 # and am__untar set.
1648 test -n "${am_cv_prog_tar_$1}" && break
1650 # tar/untar a dummy directory, and stop if the command works
1653 echo GrepMe > conftest.dir/file
1654 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1656 if test -s conftest.tar; then
1657 AM_RUN_LOG([$am__untar <conftest.tar])
1658 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1663 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1664 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1666 AC_SUBST([am__untar])