1 # generated automatically by aclocal 1.14.1 -*- Autoconf -*-
3 # Copyright (C) 1996-2013 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 glib_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
402 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
403 # -------------------------------
404 # Define VARIABLE to the location where catalog files will
405 # be installed by po/Makefile.
406 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
407 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
408 glib_save_prefix="$prefix"
409 glib_save_exec_prefix="$exec_prefix"
410 glib_save_datarootdir="$datarootdir"
411 test "x$prefix" = xNONE && prefix=$ac_default_prefix
412 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
413 datarootdir=`eval echo "${datarootdir}"`
414 if test "x$CATOBJEXT" = "x.mo" ; then
415 localedir=`eval echo "${libdir}/locale"`
417 localedir=`eval echo "${datadir}/locale"`
419 prefix="$glib_save_prefix"
420 exec_prefix="$glib_save_exec_prefix"
421 datarootdir="$glib_save_datarootdir"
422 AC_DEFINE_UNQUOTED($1, "$localedir",
423 [Define the location where the catalogs will be installed])
427 dnl Now the definitions that aclocal will find
429 ifdef(glib_configure_ac,[],[
430 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
431 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
434 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
436 # Create a temporary file with TEST-FILE as its contents and pass the
437 # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
438 # 0 and perform ACTION-IF-FAIL for any other exit status.
439 AC_DEFUN([GLIB_RUN_PROG],
440 [cat >conftest.foo <<_ACEOF
443 if AC_RUN_LOG([$1 conftest.foo]); then
444 m4_ifval([$3], [$3], [:])
445 m4_ifvaln([$4], [else $4])dnl
446 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
447 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
452 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
453 # serial 42 IT_PROG_INTLTOOL
454 AC_DEFUN([IT_PROG_INTLTOOL], [
456 AC_REQUIRE([AM_NLS])dnl
458 case "$am__api_version" in
460 AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
466 INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
467 INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
468 INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
469 if test -n "$1"; then
470 AC_MSG_CHECKING([for intltool >= $1])
471 AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
472 test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
473 AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
476 AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
477 AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
478 AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
479 if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
480 AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
483 if test -z "$AM_DEFAULT_VERBOSITY"; then
484 AM_DEFAULT_VERBOSITY=1
486 AC_SUBST([AM_DEFAULT_VERBOSITY])
488 INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
489 INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
490 INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;'
491 AC_SUBST(INTLTOOL_V_MERGE)
492 AC_SUBST(INTLTOOL__v_MERGE_)
493 AC_SUBST(INTLTOOL__v_MERGE_0)
495 INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
496 intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
497 intltool__v_merge_options_0='-q'
498 AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
499 AC_SUBST(intltool__v_merge_options_)
500 AC_SUBST(intltool__v_merge_options_0)
502 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 $< [$]@'
503 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 $< [$]@'
504 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 $< [$]@'
505 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 $< [$]@'
506 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 $< [$]@'
507 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 $< [$]@'
508 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 $< [$]@'
509 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 $< [$]@'
510 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 $< [$]@'
511 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 $< [$]@'
512 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 $< [$]@'
513 if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
514 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 $< [$]@'
516 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'
518 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 $< [$]@'
519 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 $< [$]@'
520 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 $< [$]@'
521 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 $< [$]@'
522 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 $< [$]@'
523 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 $< [$]@'
524 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 $< [$]@'
526 _IT_SUBST(INTLTOOL_DESKTOP_RULE)
527 _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
528 _IT_SUBST(INTLTOOL_KEYS_RULE)
529 _IT_SUBST(INTLTOOL_PROP_RULE)
530 _IT_SUBST(INTLTOOL_OAF_RULE)
531 _IT_SUBST(INTLTOOL_PONG_RULE)
532 _IT_SUBST(INTLTOOL_SERVER_RULE)
533 _IT_SUBST(INTLTOOL_SHEET_RULE)
534 _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
535 _IT_SUBST(INTLTOOL_UI_RULE)
536 _IT_SUBST(INTLTOOL_XAM_RULE)
537 _IT_SUBST(INTLTOOL_KBD_RULE)
538 _IT_SUBST(INTLTOOL_XML_RULE)
539 _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
540 _IT_SUBST(INTLTOOL_CAVES_RULE)
541 _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
542 _IT_SUBST(INTLTOOL_THEME_RULE)
543 _IT_SUBST(INTLTOOL_SERVICE_RULE)
544 _IT_SUBST(INTLTOOL_POLICY_RULE)
546 # Check the gettext tools to make sure they are GNU
547 AC_PATH_PROG(XGETTEXT, xgettext)
548 AC_PATH_PROG(MSGMERGE, msgmerge)
549 AC_PATH_PROG(MSGFMT, msgfmt)
550 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
551 if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
552 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
554 xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
555 mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
556 mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
557 if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
558 AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
561 # Substitute ALL_LINGUAS so we can use it in po/Makefile
562 AC_SUBST(ALL_LINGUAS)
564 # Set DATADIRNAME correctly if it is not set yet
565 # (copied from glib-gettext.m4)
566 if test -z "$DATADIRNAME"; then
568 [AC_LANG_PROGRAM([[]],
569 [[extern int _nl_msg_cat_cntr;
570 return _nl_msg_cat_cntr]])],
574 dnl On Solaris, if bind_textdomain_codeset is in libc,
575 dnl GNU format message catalog is always supported,
576 dnl since both are added to the libc all together.
577 dnl Hence, we'd like to go with DATADIRNAME=share
579 AC_CHECK_FUNC(bind_textdomain_codeset,
580 [DATADIRNAME=share], [DATADIRNAME=lib])
587 AC_SUBST(DATADIRNAME)
594 # IT_PO_SUBDIR(DIRNAME)
595 # ---------------------
596 # All po subdirs have to be declared with this macro; the subdir "po" is
597 # declared by IT_PROG_INTLTOOL.
599 AC_DEFUN([IT_PO_SUBDIR],
600 [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
602 dnl The following CONFIG_COMMANDS should be executed at the very end
603 dnl of config.status.
604 AC_CONFIG_COMMANDS_PRE([
605 AC_CONFIG_COMMANDS([$1/stamp-it], [
606 if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
607 AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
609 rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
614 '"s|^| $ac_top_srcdir/|" \
615 "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
617 [sed '/^POTFILES =/,/[^\\]$/ {
621 ' "$1/Makefile.in" >"$1/Makefile"]
622 rm -f "$1/Makefile.tmp"
623 mv "$1/stamp-it.tmp" "$1/stamp-it"
628 # _IT_SUBST(VARIABLE)
629 # -------------------
630 # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
632 AC_DEFUN([_IT_SUBST],
635 m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
640 AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
641 # A hint is needed for aclocal from Automake <= 1.9.4:
642 # AC_DEFUN([AC_PROG_INTLTOOL], ...)
645 # nls.m4 serial 5 (gettext-0.18)
646 dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
648 dnl This file is free software; the Free Software Foundation
649 dnl gives unlimited permission to copy and/or distribute it,
650 dnl with or without modifications, as long as this notice is preserved.
652 dnl This file can can be used in projects which are not available under
653 dnl the GNU General Public License or the GNU Library General Public
654 dnl License but which still want to provide support for the GNU gettext
656 dnl Please note that the actual code of the GNU gettext library is covered
657 dnl by the GNU Library General Public License, and the rest of the GNU
658 dnl gettext package package is covered by the GNU General Public License.
659 dnl They are *not* in the public domain.
662 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
663 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
669 AC_MSG_CHECKING([whether NLS is requested])
670 dnl Default is enabled NLS
672 [ --disable-nls do not use Native Language Support],
673 USE_NLS=$enableval, USE_NLS=yes)
674 AC_MSG_RESULT([$USE_NLS])
678 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
680 # This file is free software; the Free Software Foundation
681 # gives unlimited permission to copy and/or distribute it,
682 # with or without modifications, as long as this notice is preserved.
684 # _AM_SUBST_NOTMAKE(VARIABLE)
685 # ---------------------------
686 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
687 # This macro is traced by Automake.
688 AC_DEFUN([_AM_SUBST_NOTMAKE])
690 # AM_SUBST_NOTMAKE(VARIABLE)
691 # --------------------------
692 # Public sister of _AM_SUBST_NOTMAKE.
693 AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])