456
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
457
# serial 40 IT_PROG_INTLTOOL
458
AC_DEFUN([IT_PROG_INTLTOOL], [
460
AC_REQUIRE([AM_NLS])dnl
462
case "$am__api_version" in
464
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
470
if test -n "$1"; then
471
AC_MSG_CHECKING([for intltool >= $1])
473
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
474
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
475
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
477
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
478
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
479
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
482
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
483
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
484
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
485
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
486
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
489
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 $< [$]@'
490
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 $< [$]@'
491
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 $< [$]@'
492
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 $< [$]@'
493
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
494
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 $< [$]@'
495
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 $< [$]@'
496
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 $< [$]@'
497
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 $< [$]@'
498
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 $< [$]@'
499
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 $< [$]@'
500
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
501
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 $< [$]@'
502
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 $< [$]@'
503
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 $< [$]@'
504
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 $< [$]@'
505
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 $< [$]@'
506
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 $< [$]@'
507
INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
509
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
510
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
511
_IT_SUBST(INTLTOOL_KEYS_RULE)
512
_IT_SUBST(INTLTOOL_PROP_RULE)
513
_IT_SUBST(INTLTOOL_OAF_RULE)
514
_IT_SUBST(INTLTOOL_PONG_RULE)
515
_IT_SUBST(INTLTOOL_SERVER_RULE)
516
_IT_SUBST(INTLTOOL_SHEET_RULE)
517
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
518
_IT_SUBST(INTLTOOL_UI_RULE)
519
_IT_SUBST(INTLTOOL_XAM_RULE)
520
_IT_SUBST(INTLTOOL_KBD_RULE)
521
_IT_SUBST(INTLTOOL_XML_RULE)
522
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
523
_IT_SUBST(INTLTOOL_CAVES_RULE)
524
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
525
_IT_SUBST(INTLTOOL_THEME_RULE)
526
_IT_SUBST(INTLTOOL_SERVICE_RULE)
527
_IT_SUBST(INTLTOOL_POLICY_RULE)
529
# Check the gettext tools to make sure they are GNU
530
AC_PATH_PROG(XGETTEXT, xgettext)
531
AC_PATH_PROG(MSGMERGE, msgmerge)
532
AC_PATH_PROG(MSGFMT, msgfmt)
533
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
534
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
535
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
537
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
538
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
539
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
540
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
541
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
544
AC_PATH_PROG(INTLTOOL_PERL, perl)
545
if test -z "$INTLTOOL_PERL"; then
546
AC_MSG_ERROR([perl not found])
548
AC_MSG_CHECKING([for perl >= 5.8.1])
549
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
550
if test $? -ne 0; then
551
AC_MSG_ERROR([perl 5.8.1 is required for intltool])
553
IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
554
AC_MSG_RESULT([$IT_PERL_VERSION])
556
if test "x$2" != "xno-xml"; then
557
AC_MSG_CHECKING([for XML::Parser])
558
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
561
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
565
# Substitute ALL_LINGUAS so we can use it in po/Makefile
566
AC_SUBST(ALL_LINGUAS)
568
# Set DATADIRNAME correctly if it is not set yet
569
# (copied from glib-gettext.m4)
570
if test -z "$DATADIRNAME"; then
572
[AC_LANG_PROGRAM([[]],
573
[[extern int _nl_msg_cat_cntr;
574
return _nl_msg_cat_cntr]])],
578
dnl On Solaris, if bind_textdomain_codeset is in libc,
579
dnl GNU format message catalog is always supported,
580
dnl since both are added to the libc all together.
581
dnl Hence, we'd like to go with DATADIRNAME=share
583
AC_CHECK_FUNC(bind_textdomain_codeset,
584
[DATADIRNAME=share], [DATADIRNAME=lib])
591
AC_SUBST(DATADIRNAME)
598
# IT_PO_SUBDIR(DIRNAME)
599
# ---------------------
600
# All po subdirs have to be declared with this macro; the subdir "po" is
601
# declared by IT_PROG_INTLTOOL.
603
AC_DEFUN([IT_PO_SUBDIR],
604
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
606
dnl The following CONFIG_COMMANDS should be exetuted at the very end
607
dnl of config.status.
608
AC_CONFIG_COMMANDS_PRE([
609
AC_CONFIG_COMMANDS([$1/stamp-it], [
610
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
611
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
613
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
618
'"s|^| $ac_top_srcdir/|" \
619
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
621
[sed '/^POTFILES =/,/[^\\]$/ {
625
' "$1/Makefile.in" >"$1/Makefile"]
626
rm -f "$1/Makefile.tmp"
627
mv "$1/stamp-it.tmp" "$1/stamp-it"
632
# _IT_SUBST(VARIABLE)
633
# -------------------
634
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
636
AC_DEFUN([_IT_SUBST],
639
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
644
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
645
# A hint is needed for aclocal from Automake <= 1.9.4:
646
# AC_DEFUN([AC_PROG_INTLTOOL], ...)
649
455
# nls.m4 serial 3 (gettext-0.15)
650
456
dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
651
457
dnl This file is free software; the Free Software Foundation
1284
1115
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1285
1116
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1286
1117
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
1287
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1288
[_AM_PROG_TAR([v7])])])
1118
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
1119
[_AM_PROG_TAR([v7])])])
1289
1120
_AM_IF_OPTION([no-dependencies],,
1290
1121
[AC_PROVIDE_IFELSE([AC_PROG_CC],
1291
[_AM_DEPENDENCIES(CC)],
1292
[define([AC_PROG_CC],
1293
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1122
[_AM_DEPENDENCIES(CC)],
1123
[define([AC_PROG_CC],
1124
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1294
1125
AC_PROVIDE_IFELSE([AC_PROG_CXX],
1295
[_AM_DEPENDENCIES(CXX)],
1296
[define([AC_PROG_CXX],
1297
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1126
[_AM_DEPENDENCIES(CXX)],
1127
[define([AC_PROG_CXX],
1128
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1298
1129
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
1299
[_AM_DEPENDENCIES(OBJC)],
1300
[define([AC_PROG_OBJC],
1301
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1130
[_AM_DEPENDENCIES(OBJC)],
1131
[define([AC_PROG_OBJC],
1132
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
1134
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
1135
dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
1136
dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
1137
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
1138
AC_CONFIG_COMMANDS_PRE(dnl
1139
[m4_provide_if([_AM_COMPILER_EXEEXT],
1140
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
1143
dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
1144
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
1145
dnl mangled by Autoconf and run in a shell conditional statement.
1146
m4_define([_AC_COMPILER_EXEEXT],
1147
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
1306
1150
# When config.status generates a header, we must update the stamp-h file.
1711
1589
AC_SUBST([am__untar])
1712
1590
]) # _AM_PROG_TAR
1593
dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
1594
# serial 40 IT_PROG_INTLTOOL
1595
AC_DEFUN([IT_PROG_INTLTOOL], [
1596
AC_PREREQ([2.50])dnl
1597
AC_REQUIRE([AM_NLS])dnl
1599
case "$am__api_version" in
1601
AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
1607
if test -n "$1"; then
1608
AC_MSG_CHECKING([for intltool >= $1])
1610
INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1611
INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
1612
[INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
1614
AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
1615
test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
1616
AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
1619
AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
1620
AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
1621
AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
1622
if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
1623
AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
1626
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 $< [$]@'
1627
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 $< [$]@'
1628
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 $< [$]@'
1629
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 $< [$]@'
1630
INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
1631
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 $< [$]@'
1632
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 $< [$]@'
1633
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 $< [$]@'
1634
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 $< [$]@'
1635
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 $< [$]@'
1636
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 $< [$]@'
1637
INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
1638
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 $< [$]@'
1639
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 $< [$]@'
1640
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 $< [$]@'
1641
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 $< [$]@'
1642
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 $< [$]@'
1643
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 $< [$]@'
1644
INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
1646
_IT_SUBST(INTLTOOL_DESKTOP_RULE)
1647
_IT_SUBST(INTLTOOL_DIRECTORY_RULE)
1648
_IT_SUBST(INTLTOOL_KEYS_RULE)
1649
_IT_SUBST(INTLTOOL_PROP_RULE)
1650
_IT_SUBST(INTLTOOL_OAF_RULE)
1651
_IT_SUBST(INTLTOOL_PONG_RULE)
1652
_IT_SUBST(INTLTOOL_SERVER_RULE)
1653
_IT_SUBST(INTLTOOL_SHEET_RULE)
1654
_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
1655
_IT_SUBST(INTLTOOL_UI_RULE)
1656
_IT_SUBST(INTLTOOL_XAM_RULE)
1657
_IT_SUBST(INTLTOOL_KBD_RULE)
1658
_IT_SUBST(INTLTOOL_XML_RULE)
1659
_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
1660
_IT_SUBST(INTLTOOL_CAVES_RULE)
1661
_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
1662
_IT_SUBST(INTLTOOL_THEME_RULE)
1663
_IT_SUBST(INTLTOOL_SERVICE_RULE)
1664
_IT_SUBST(INTLTOOL_POLICY_RULE)
1666
# Check the gettext tools to make sure they are GNU
1667
AC_PATH_PROG(XGETTEXT, xgettext)
1668
AC_PATH_PROG(MSGMERGE, msgmerge)
1669
AC_PATH_PROG(MSGFMT, msgfmt)
1670
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
1671
if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
1672
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1674
xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
1675
mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
1676
mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
1677
if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
1678
AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
1681
AC_PATH_PROG(INTLTOOL_PERL, perl)
1682
if test -z "$INTLTOOL_PERL"; then
1683
AC_MSG_ERROR([perl not found])
1685
AC_MSG_CHECKING([for perl >= 5.8.1])
1686
$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
1687
if test $? -ne 0; then
1688
AC_MSG_ERROR([perl 5.8.1 is required for intltool])
1690
IT_PERL_VERSION="`$INTLTOOL_PERL -e \"printf '%vd', $^V\"`"
1691
AC_MSG_RESULT([$IT_PERL_VERSION])
1693
if test "x$2" != "xno-xml"; then
1694
AC_MSG_CHECKING([for XML::Parser])
1695
if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
1698
AC_MSG_ERROR([XML::Parser perl module is required for intltool])
1702
# Substitute ALL_LINGUAS so we can use it in po/Makefile
1703
AC_SUBST(ALL_LINGUAS)
1705
# Set DATADIRNAME correctly if it is not set yet
1706
# (copied from glib-gettext.m4)
1707
if test -z "$DATADIRNAME"; then
1709
[AC_LANG_PROGRAM([[]],
1710
[[extern int _nl_msg_cat_cntr;
1711
return _nl_msg_cat_cntr]])],
1712
[DATADIRNAME=share],
1715
dnl On Solaris, if bind_textdomain_codeset is in libc,
1716
dnl GNU format message catalog is always supported,
1717
dnl since both are added to the libc all together.
1718
dnl Hence, we'd like to go with DATADIRNAME=share
1720
AC_CHECK_FUNC(bind_textdomain_codeset,
1721
[DATADIRNAME=share], [DATADIRNAME=lib])
1728
AC_SUBST(DATADIRNAME)
1735
# IT_PO_SUBDIR(DIRNAME)
1736
# ---------------------
1737
# All po subdirs have to be declared with this macro; the subdir "po" is
1738
# declared by IT_PROG_INTLTOOL.
1740
AC_DEFUN([IT_PO_SUBDIR],
1741
[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
1743
dnl The following CONFIG_COMMANDS should be exetuted at the very end
1744
dnl of config.status.
1745
AC_CONFIG_COMMANDS_PRE([
1746
AC_CONFIG_COMMANDS([$1/stamp-it], [
1747
if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
1748
AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
1750
rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
1755
'"s|^| $ac_top_srcdir/|" \
1756
"$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
1758
[sed '/^POTFILES =/,/[^\\]$/ {
1762
' "$1/Makefile.in" >"$1/Makefile"]
1763
rm -f "$1/Makefile.tmp"
1764
mv "$1/stamp-it.tmp" "$1/stamp-it"
1769
# _IT_SUBST(VARIABLE)
1770
# -------------------
1771
# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
1773
AC_DEFUN([_IT_SUBST],
1776
m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
1781
AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
1782
# A hint is needed for aclocal from Automake <= 1.9.4:
1783
# AC_DEFUN([AC_PROG_INTLTOOL], ...)