1 # generated automatically by aclocal 1.15 -*- Autoconf -*-
3 # Copyright (C) 1996-2014 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 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
16 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
18 # This file is free software, distributed under the terms of the GNU
19 # General Public License. As a special exception to the GNU General
20 # Public License, this file may be distributed as part of a program
21 # that contains a configuration script generated by Autoconf, under
22 # the same distribution terms as the rest of that program.
24 # This file can be copied and used freely without restrictions. It can
25 # be used in projects which are not available under the GNU Public License
26 # but which still want to provide support for the GNU gettext functionality.
28 # Macro to add for using GNU gettext.
29 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
31 # Modified to never use included libintl.
32 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
34 # Major rework to remove unused code
35 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
37 # Added better handling of ALL_LINGUAS from GNU gettext version
38 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
40 # Modified to require ngettext
41 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
43 # We need this here as well, since someone might use autoconf-2.5x
44 # to configure GLib then an older version to configure a package
45 # using AM_GLIB_GNU_GETTEXT
49 dnl We go to great lengths to make sure that aclocal won't
50 dnl try to pull in the installed version of these macros
51 dnl when running aclocal in the glib directory.
53 m4_copy([AC_DEFUN],[glib_DEFUN])
54 m4_copy([AC_REQUIRE],[glib_REQUIRE])
56 dnl At the end, if we're not within glib, we'll define the public
57 dnl definitions in terms of our private definitions.
62 glib_DEFUN([GLIB_LC_MESSAGES],
63 [AC_CHECK_HEADERS([locale.h])
64 if test $ac_cv_header_locale_h = yes; then
65 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
66 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
67 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
68 if test $am_cv_val_LC_MESSAGES = yes; then
69 AC_DEFINE(HAVE_LC_MESSAGES, 1,
70 [Define if your <locale.h> file defines LC_MESSAGES.])
74 # GLIB_PATH_PROG_WITH_TEST
75 #----------------------------
76 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
77 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
78 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
79 [# Extract the first word of "$2", so it can be a program name with args.
80 set dummy $2; ac_word=[$]2
81 AC_MSG_CHECKING([for $ac_word])
82 AC_CACHE_VAL(ac_cv_path_$1,
85 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
88 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
89 for ac_dir in ifelse([$5], , $PATH, [$5]); do
90 test -z "$ac_dir" && ac_dir=.
91 if test -f $ac_dir/$ac_word; then
93 ac_cv_path_$1="$ac_dir/$ac_word"
99 dnl If no 4th arg is given, leave the cache variable unset,
100 dnl so AC_PATH_PROGS will keep looking.
101 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
106 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
116 glib_DEFUN([GLIB_WITH_NLS],
117 dnl NLS is obligatory
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)
223 AC_MSG_CHECKING([if msgfmt accepts -c])
224 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
227 "Content-Type: text/plain; charset=UTF-8\n"
228 "Project-Id-Version: test 1.0\n"
229 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
230 "Last-Translator: test <foo@bar.xx>\n"
231 "Language-Team: C <LL@li.org>\n"
232 "MIME-Version: 1.0\n"
233 "Content-Transfer-Encoding: 8bit\n"
234 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
235 AC_SUBST(MSGFMT_OPTS)
236 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
237 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
238 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
239 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
240 return _nl_msg_cat_cntr],
245 dnl On Solaris, if bind_textdomain_codeset is in libc,
246 dnl GNU format message catalog is always supported,
247 dnl since both are added to the libc all together.
248 dnl Hence, we'd like to go with DATADIRNAME=share and
249 dnl and CATOBJEXT=.gmo in this case.
250 AC_CHECK_FUNC(bind_textdomain_codeset,
265 LIBS="$glib_save_LIBS"
268 gt_cv_have_gettext=no
273 if test "$gt_cv_have_gettext" = "yes" ; then
274 AC_DEFINE(ENABLE_NLS, 1,
275 [always defined to indicate that i18n is enabled])
278 dnl Test whether we really found GNU xgettext.
279 if test "$XGETTEXT" != ":"; then
280 dnl If it is not GNU xgettext we define it as : so that the
281 dnl Makefiles still can work.
282 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
286 [found xgettext program is not GNU xgettext; ignore it])
291 # We need to process the po/ directory.
295 [case "$CONFIG_FILES" in *po/Makefile.in*)
296 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
299 dnl These rules are solely for the distribution goal. While doing this
300 dnl we only have to keep exactly one list of the available catalogs
302 for lang in $ALL_LINGUAS; do
303 GMOFILES="$GMOFILES $lang.gmo"
304 POFILES="$POFILES $lang.po"
307 dnl Make all variables we use known to autoconf.
310 AC_SUBST(DATADIRNAME)
314 AC_SUBST(PO_IN_DATADIR_TRUE)
315 AC_SUBST(PO_IN_DATADIR_FALSE)
320 # AM_GLIB_GNU_GETTEXT
321 # -------------------
322 # Do checks necessary for use of gettext. If a suitable implementation
323 # of gettext is found in either in libintl or in the C library,
324 # it will set INTLLIBS to the libraries needed for use of gettext
325 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
326 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
327 # on various variables needed by the Makefile.in.in installed by
330 AU_DEFUN([GLIB_GNU_GETTEXT],
331 [AC_REQUIRE([AC_PROG_CC])dnl
336 if test "$gt_cv_have_gettext" = "yes"; then
337 if test "x$ALL_LINGUAS" = "x"; then
340 AC_MSG_CHECKING(for catalogs to be installed)
342 for presentlang in $ALL_LINGUAS; do
344 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
345 desiredlanguages="$LINGUAS"
347 desiredlanguages="$ALL_LINGUAS"
349 for desiredlang in $desiredlanguages; do
350 # Use the presentlang catalog if desiredlang is
351 # a. equal to presentlang, or
352 # b. a variant of presentlang (because in this case,
353 # presentlang can be used as a fallback for messages
354 # which are not translated in the desiredlang catalog).
355 case "$desiredlang" in
356 "$presentlang"*) useit=yes;;
359 if test $useit = yes; then
360 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
364 AC_MSG_RESULT($LINGUAS)
367 dnl Construct list of names of catalog files to be constructed.
368 if test -n "$LINGUAS"; then
369 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
373 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
374 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
375 dnl Try to locate is.
377 if test -n "$ac_aux_dir"; then
378 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
380 if test -z "$MKINSTALLDIRS"; then
381 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
383 AC_SUBST(MKINSTALLDIRS)
385 dnl Generate list of files to be processed by xgettext which will
386 dnl be included in po/Makefile.
387 test -d po || mkdir po
388 if test "x$srcdir" != "x."; then
389 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
390 posrcprefix="$srcdir/"
392 posrcprefix="../$srcdir/"
398 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
399 < $srcdir/po/POTFILES.in > po/POTFILES
401 [[$0: This macro is deprecated. You should use upstream gettext instead.]])
403 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
404 # -------------------------------
405 # Define VARIABLE to the location where catalog files will
406 # be installed by po/Makefile.
407 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
408 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
409 glib_save_prefix="$prefix"
410 glib_save_exec_prefix="$exec_prefix"
411 glib_save_datarootdir="$datarootdir"
412 test "x$prefix" = xNONE && prefix=$ac_default_prefix
413 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
414 datarootdir=`eval echo "${datarootdir}"`
415 if test "x$CATOBJEXT" = "x.mo" ; then
416 localedir=`eval echo "${libdir}/locale"`
418 localedir=`eval echo "${datadir}/locale"`
420 prefix="$glib_save_prefix"
421 exec_prefix="$glib_save_exec_prefix"
422 datarootdir="$glib_save_datarootdir"
423 AC_DEFINE_UNQUOTED($1, "$localedir",
424 [Define the location where the catalogs will be installed])
428 dnl Now the definitions that aclocal will find
430 ifdef(glib_configure_ac,[],[
431 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
432 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
435 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
437 # Create a temporary file with TEST-FILE as its contents and pass the
438 # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
439 # 0 and perform ACTION-IF-FAIL for any other exit status.
440 AC_DEFUN([GLIB_RUN_PROG],
441 [cat >conftest.foo <<_ACEOF
444 if AC_RUN_LOG([$1 conftest.foo]); then
445 m4_ifval([$3], [$3], [:])
446 m4_ifvaln([$4], [else $4])dnl
447 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
448 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
453 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
454 # serial 42 IT_PROG_INTLTOOL
455 AC_DEFUN([IT_PROG_INTLTOOL], [
457 AC_REQUIRE([AM_NLS])dnl
459 case "$am__api_version" in
461 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
467 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
468 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
469 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
470 if test -n "$1"; then
471 AC_MSG_CHECKING([for intltool >= $1])
472 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
473 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
474 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
477 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
478 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
479 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
480 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
481 AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
484 if test -z "$AM_DEFAULT_VERBOSITY"; then
485 AM_DEFAULT_VERBOSITY=1
487 AC_SUBST([AM_DEFAULT_VERBOSITY])
489 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
490 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
491 INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;'
492 AC_SUBST(INTLTOOL_V_MERGE)
493 AC_SUBST(INTLTOOL__v_MERGE_)
494 AC_SUBST(INTLTOOL__v_MERGE_0)
496 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
497 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
498 intltool__v_merge_options_0='-q'
499 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
500 AC_SUBST(intltool__v_merge_options_)
501 AC_SUBST(intltool__v_merge_options_0)
503 INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
504 INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
505 INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
506 INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
507 INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
508 INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
509 INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
510 INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
511 INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
512 INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
513 INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
514 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
515 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
517 INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
519 INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
520 INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
521 INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
522 INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
523 INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
524 INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
525 INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
527 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
528 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
529 _IT_SUBST(INTLTOOL_KEYS_RULE)
530 _IT_SUBST(INTLTOOL_PROP_RULE)
531 _IT_SUBST(INTLTOOL_OAF_RULE)
532 _IT_SUBST(INTLTOOL_PONG_RULE)
533 _IT_SUBST(INTLTOOL_SERVER_RULE)
534 _IT_SUBST(INTLTOOL_SHEET_RULE)
535 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
536 _IT_SUBST(INTLTOOL_UI_RULE)
537 _IT_SUBST(INTLTOOL_XAM_RULE)
538 _IT_SUBST(INTLTOOL_KBD_RULE)
539 _IT_SUBST(INTLTOOL_XML_RULE)
540 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
541 _IT_SUBST(INTLTOOL_CAVES_RULE)
542 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
543 _IT_SUBST(INTLTOOL_THEME_RULE)
544 _IT_SUBST(INTLTOOL_SERVICE_RULE)
545 _IT_SUBST(INTLTOOL_POLICY_RULE)
547 # Check the gettext tools to make sure they are GNU
548 AC_PATH_PROG(XGETTEXT, xgettext)
549 AC_PATH_PROG(MSGMERGE, msgmerge)
550 AC_PATH_PROG(MSGFMT, msgfmt)
551 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
552 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
553 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
555 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
556 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
557 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
558 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
559 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
562 # Substitute ALL_LINGUAS so we can use it in po/Makefile
563 AC_SUBST(ALL_LINGUAS)
570 # IT_PO_SUBDIR(DIRNAME)
571 # ---------------------
572 # All po subdirs have to be declared with this macro; the subdir "po" is
573 # declared by IT_PROG_INTLTOOL.
575 AC_DEFUN([IT_PO_SUBDIR],
576 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
578 dnl The following CONFIG_COMMANDS should be executed at the very end
579 dnl of config.status.
580 AC_CONFIG_COMMANDS_PRE([
581 AC_CONFIG_COMMANDS([$1/stamp-it], [
582 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
583 AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
585 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
590 '"s|^| $ac_top_srcdir/|" \
591 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
593 [sed '/^POTFILES =/,/[^\\]$/ {
597 ' "$1/Makefile.in" >"$1/Makefile"]
598 rm -f "$1/Makefile.tmp"
599 mv "$1/stamp-it.tmp" "$1/stamp-it"
604 # _IT_SUBST(VARIABLE)
605 # -------------------
606 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
608 AC_DEFUN([_IT_SUBST],
611 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
616 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
617 # A hint is needed for aclocal from Automake <= 1.9.4:
618 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
621 # nls.m4 serial 5 (gettext-0.18)
622 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
624 dnl This file is free software; the Free Software Foundation
625 dnl gives unlimited permission to copy and/or distribute it,
626 dnl with or without modifications, as long as this notice is preserved.
628 dnl This file can be used in projects which are not available under
629 dnl the GNU General Public License or the GNU Library General Public
630 dnl License but which still want to provide support for the GNU gettext
632 dnl Please note that the actual code of the GNU gettext library is covered
633 dnl by the GNU Library General Public License, and the rest of the GNU
634 dnl gettext package is covered by the GNU General Public License.
635 dnl They are *not* in the public domain.
638 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
639 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
645 AC_MSG_CHECKING([whether NLS is requested])
646 dnl Default is enabled NLS
648 [ --disable-nls do not use Native Language Support],
649 USE_NLS=$enableval, USE_NLS=yes)
650 AC_MSG_RESULT([$USE_NLS])
654 # Copyright (C) 2006-2014 Free Software Foundation, Inc.
656 # This file is free software; the Free Software Foundation
657 # gives unlimited permission to copy and/or distribute it,
658 # with or without modifications, as long as this notice is preserved.
660 # _AM_SUBST_NOTMAKE(VARIABLE)
661 # ---------------------------
662 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
663 # This macro is traced by Automake.
664 AC_DEFUN([_AM_SUBST_NOTMAKE])
666 # AM_SUBST_NOTMAKE(VARIABLE)
667 # --------------------------
668 # Public sister of _AM_SUBST_NOTMAKE.
669 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])