Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2008-08-07 18:07:56 (GMT)
committer Jonas Smedegaard <dr@jones.dk>2008-08-07 18:07:56 (GMT)
commit81a5abfbfd6c535ce808e250053b04c001a81104 (patch)
treef7c94db6ac209bd1dc7cce3dc3720810e523ee51
parentbc47c421d52d063a73bde888409f391a380a70ce (diff)
Imported Upstream version 0.82.1upstream/0.82.1
-rw-r--r--Makefile.in59
-rw-r--r--aclocal.m4434
-rwxr-xr-xautogen.sh6
-rwxr-xr-xconfigure2163
-rw-r--r--intltool-extract.in875
-rw-r--r--intltool-merge.in1506
-rw-r--r--intltool-update.in1166
-rw-r--r--m4/intltool.m4234
-rw-r--r--po/Makefile.in.in218
-rw-r--r--po/pseudo.po37
-rw-r--r--po/sugar-base.pot37
-rw-r--r--src/Makefile.in46
-rw-r--r--src/sugar/Makefile.in46
13 files changed, 6705 insertions, 122 deletions
diff --git a/Makefile.in b/Makefile.in
index 57d26e4..79143f7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -37,8 +37,8 @@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
config.guess config.sub depcomp install-sh ltmain.sh missing \
py-compile
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/python.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
+ $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -71,12 +71,15 @@ DIST_ARCHIVES = $(distdir).tar.bz2
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -87,6 +90,7 @@ CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
@@ -99,12 +103,40 @@ EXTENSION_CFLAGS = @EXTENSION_CFLAGS@
EXTENSION_LIBS = @EXTENSION_LIBS@
F77 = @F77@
FFLAGS = @FFLAGS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -113,6 +145,10 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -122,6 +158,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
PYGTK_CODEGEN = @PYGTK_CODEGEN@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
@@ -134,7 +174,9 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@@ -191,7 +233,17 @@ target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = src
+DISTCLEANFILES = \
+ intltool-extract \
+ intltool-merge \
+ intltool-update
+
+EXTRA_DIST = \
+ intltool-merge.in \
+ intltool-update.in \
+ intltool-extract.in
+
+SUBDIRS = src po
all: all-recursive
.SUFFIXES:
@@ -540,6 +592,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
diff --git a/aclocal.m4 b/aclocal.m4
index 2346a4e..2901407 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -19,6 +19,439 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
+# Copyright (C) 1995-2002 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003,2004 Red Hat, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+#
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
+#
+# Modified to never use included libintl.
+# Owen Taylor <otaylor@redhat.com>, 12/15/1998
+#
+# Major rework to remove unused code
+# Owen Taylor <otaylor@redhat.com>, 12/11/2002
+#
+# Added better handling of ALL_LINGUAS from GNU gettext version
+# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
+#
+# Modified to require ngettext
+# Matthias Clasen <mclasen@redhat.com> 08/06/2004
+#
+# We need this here as well, since someone might use autoconf-2.5x
+# to configure GLib then an older version to configure a package
+# using AM_GLIB_GNU_GETTEXT
+AC_PREREQ(2.53)
+
+dnl
+dnl We go to great lengths to make sure that aclocal won't
+dnl try to pull in the installed version of these macros
+dnl when running aclocal in the glib directory.
+dnl
+m4_copy([AC_DEFUN],[glib_DEFUN])
+m4_copy([AC_REQUIRE],[glib_REQUIRE])
+dnl
+dnl At the end, if we're not within glib, we'll define the public
+dnl definitions in terms of our private definitions.
+dnl
+
+# GLIB_LC_MESSAGES
+#--------------------
+glib_DEFUN([GLIB_LC_MESSAGES],
+ [AC_CHECK_HEADERS([locale.h])
+ if test $ac_cv_header_locale_h = yes; then
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
+ [Define if your <locale.h> file defines LC_MESSAGES.])
+ fi
+ fi])
+
+# GLIB_PATH_PROG_WITH_TEST
+#----------------------------
+dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+# GLIB_WITH_NLS
+#-----------------
+glib_DEFUN([GLIB_WITH_NLS],
+ dnl NLS is obligatory
+ [USE_NLS=yes
+ AC_SUBST(USE_NLS)
+
+ gt_cv_have_gettext=no
+
+ CATOBJEXT=NONE
+ XGETTEXT=:
+ INTLLIBS=
+
+ AC_CHECK_HEADER(libintl.h,
+ [gt_cv_func_dgettext_libintl="no"
+ libintl_extra_libs=""
+
+ #
+ # First check in libc
+ #
+ AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
+ [AC_TRY_LINK([
+#include <libintl.h>
+],
+ [return !ngettext ("","", 1)],
+ gt_cv_func_ngettext_libc=yes,
+ gt_cv_func_ngettext_libc=no)
+ ])
+
+ if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+ AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
+ [AC_TRY_LINK([
+#include <libintl.h>
+],
+ [return !dgettext ("","")],
+ gt_cv_func_dgettext_libc=yes,
+ gt_cv_func_dgettext_libc=no)
+ ])
+ fi
+
+ if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+ AC_CHECK_FUNCS(bind_textdomain_codeset)
+ fi
+
+ #
+ # If we don't have everything we want, check in libintl
+ #
+ if test "$gt_cv_func_dgettext_libc" != "yes" \
+ || test "$gt_cv_func_ngettext_libc" != "yes" \
+ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+
+ AC_CHECK_LIB(intl, bindtextdomain,
+ [AC_CHECK_LIB(intl, ngettext,
+ [AC_CHECK_LIB(intl, dgettext,
+ gt_cv_func_dgettext_libintl=yes)])])
+
+ if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+ AC_MSG_CHECKING([if -liconv is needed to use gettext])
+ AC_MSG_RESULT([])
+ AC_CHECK_LIB(intl, ngettext,
+ [AC_CHECK_LIB(intl, dcgettext,
+ [gt_cv_func_dgettext_libintl=yes
+ libintl_extra_libs=-liconv],
+ :,-liconv)],
+ :,-liconv)
+ fi
+
+ #
+ # If we found libintl, then check in it for bind_textdomain_codeset();
+ # we'll prefer libc if neither have bind_textdomain_codeset(),
+ # and both have dgettext and ngettext
+ #
+ if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+ glib_save_LIBS="$LIBS"
+ LIBS="$LIBS -lintl $libintl_extra_libs"
+ unset ac_cv_func_bind_textdomain_codeset
+ AC_CHECK_FUNCS(bind_textdomain_codeset)
+ LIBS="$glib_save_LIBS"
+
+ if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+ gt_cv_func_dgettext_libc=no
+ else
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
+ && test "$gt_cv_func_ngettext_libc" = "yes"; then
+ gt_cv_func_dgettext_libintl=no
+ fi
+ fi
+ fi
+ fi
+
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
+ || test "$gt_cv_func_dgettext_libintl" = "yes"; then
+ gt_cv_have_gettext=yes
+ fi
+
+ if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+ INTLLIBS="-lintl $libintl_extra_libs"
+ fi
+
+ if test "$gt_cv_have_gettext" = "yes"; then
+ AC_DEFINE(HAVE_GETTEXT,1,
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+ if test "$MSGFMT" != "no"; then
+ glib_save_LIBS="$LIBS"
+ LIBS="$LIBS $INTLLIBS"
+ AC_CHECK_FUNCS(dcgettext)
+ MSGFMT_OPTS=
+ AC_MSG_CHECKING([if msgfmt accepts -c])
+ GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Project-Id-Version: test 1.0\n"
+"PO-Revision-Date: 2007-02-15 12:01+0100\n"
+"Last-Translator: test <foo@bar.xx>\n"
+"Language-Team: C <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Transfer-Encoding: 8bit\n"
+], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
+ AC_SUBST(MSGFMT_OPTS)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr],
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [case $host in
+ *-*-solaris*)
+ dnl On Solaris, if bind_textdomain_codeset is in libc,
+ dnl GNU format message catalog is always supported,
+ dnl since both are added to the libc all together.
+ dnl Hence, we'd like to go with DATADIRNAME=share and
+ dnl and CATOBJEXT=.gmo in this case.
+ AC_CHECK_FUNC(bind_textdomain_codeset,
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [CATOBJEXT=.mo
+ DATADIRNAME=lib])
+ ;;
+ *)
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+ ;;
+ esac])
+ LIBS="$glib_save_LIBS"
+ INSTOBJEXT=.mo
+ else
+ gt_cv_have_gettext=no
+ fi
+ fi
+ ])
+
+ if test "$gt_cv_have_gettext" = "yes" ; then
+ AC_DEFINE(ENABLE_NLS, 1,
+ [always defined to indicate that i18n is enabled])
+ fi
+
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is not GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+
+ AC_OUTPUT_COMMANDS(
+ [case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac])
+
+ dnl These rules are solely for the distribution goal. While doing this
+ dnl we only have to keep exactly one list of the available catalogs
+ dnl in configure.in.
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(CATALOGS)
+ AC_SUBST(CATOBJEXT)
+ AC_SUBST(DATADIRNAME)
+ AC_SUBST(GMOFILES)
+ AC_SUBST(INSTOBJEXT)
+ AC_SUBST(INTLLIBS)
+ AC_SUBST(PO_IN_DATADIR_TRUE)
+ AC_SUBST(PO_IN_DATADIR_FALSE)
+ AC_SUBST(POFILES)
+ AC_SUBST(POSUB)
+ ])
+
+# AM_GLIB_GNU_GETTEXT
+# -------------------
+# Do checks necessary for use of gettext. If a suitable implementation
+# of gettext is found in either in libintl or in the C library,
+# it will set INTLLIBS to the libraries needed for use of gettext
+# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
+# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
+# on various variables needed by the Makefile.in.in installed by
+# glib-gettextize.
+dnl
+glib_DEFUN([GLIB_GNU_GETTEXT],
+ [AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+
+ GLIB_LC_MESSAGES
+ GLIB_WITH_NLS
+
+ if test "$gt_cv_have_gettext" = "yes"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ AC_MSG_CHECKING(for catalogs to be installed)
+ NEW_LINGUAS=
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+ fi
+ done
+ LINGUAS=$NEW_LINGUAS
+ AC_MSG_RESULT($LINGUAS)
+ fi
+
+ dnl Construct list of names of catalog files to be constructed.
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+ dnl Try to locate is.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+
+ dnl Generate list of files to be processed by xgettext which will
+ dnl be included in po/Makefile.
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+ ])
+
+# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
+# -------------------------------
+# Define VARIABLE to the location where catalog files will
+# be installed by po/Makefile.
+glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
+[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
+glib_save_prefix="$prefix"
+glib_save_exec_prefix="$exec_prefix"
+glib_save_datarootdir="$datarootdir"
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+datarootdir=`eval echo "${datarootdir}"`
+if test "x$CATOBJEXT" = "x.mo" ; then
+ localedir=`eval echo "${libdir}/locale"`
+else
+ localedir=`eval echo "${datadir}/locale"`
+fi
+prefix="$glib_save_prefix"
+exec_prefix="$glib_save_exec_prefix"
+datarootdir="$glib_save_datarootdir"
+AC_DEFINE_UNQUOTED($1, "$localedir",
+ [Define the location where the catalogs will be installed])
+])
+
+dnl
+dnl Now the definitions that aclocal will find
+dnl
+ifdef(glib_configure_in,[],[
+AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
+AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
+])dnl
+
+# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
+#
+# Create a temporary file with TEST-FILE as its contents and pass the
+# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
+# 0 and perform ACTION-IF-FAIL for any other exit status.
+AC_DEFUN([GLIB_RUN_PROG],
+[cat >conftest.foo <<_ACEOF
+$2
+_ACEOF
+if AC_RUN_LOG([$1 conftest.foo]); then
+ m4_ifval([$3], [$3], [:])
+m4_ifvaln([$4], [else $4])dnl
+echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
+sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
+fi])
+
+
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
# serial 51 AC_PROG_LIBTOOL
@@ -7754,4 +8187,5 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
+m4_include([m4/intltool.m4])
m4_include([m4/python.m4])
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 3d12f8f..0000000
--- a/autogen.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-export ACLOCAL="aclocal -I m4"
-
-intltoolize
-autoreconf -i
-./configure "$@"
diff --git a/configure b/configure
index cb5da3c..4c66748 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for sugar-base 0.81.1.
+# Generated by GNU Autoconf 2.61 for sugar-base 0.82.1.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -726,8 +726,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='sugar-base'
PACKAGE_TARNAME='sugar-base'
-PACKAGE_VERSION='0.81.1'
-PACKAGE_STRING='sugar-base 0.81.1'
+PACKAGE_VERSION='0.82.1'
+PACKAGE_STRING='sugar-base 0.82.1'
PACKAGE_BUGREPORT=''
ac_unique_file="configure.ac"
@@ -883,6 +883,48 @@ PYGTK_CODEGEN
PKG_CONFIG
EXTENSION_CFLAGS
EXTENSION_LIBS
+INTLTOOL_DESKTOP_RULE
+INTLTOOL_DIRECTORY_RULE
+INTLTOOL_KEYS_RULE
+INTLTOOL_PROP_RULE
+INTLTOOL_OAF_RULE
+INTLTOOL_PONG_RULE
+INTLTOOL_SERVER_RULE
+INTLTOOL_SHEET_RULE
+INTLTOOL_SOUNDLIST_RULE
+INTLTOOL_UI_RULE
+INTLTOOL_XAM_RULE
+INTLTOOL_KBD_RULE
+INTLTOOL_XML_RULE
+INTLTOOL_XML_NOMERGE_RULE
+INTLTOOL_CAVES_RULE
+INTLTOOL_SCHEMAS_RULE
+INTLTOOL_THEME_RULE
+INTLTOOL_SERVICE_RULE
+INTLTOOL_POLICY_RULE
+XGETTEXT
+MSGMERGE
+MSGFMT
+INTLTOOL_EXTRACT
+INTLTOOL_MERGE
+INTLTOOL_UPDATE
+INTLTOOL_PERL
+ALL_LINGUAS
+DATADIRNAME
+GETTEXT_PACKAGE
+USE_NLS
+MSGFMT_OPTS
+GMSGFMT
+CATALOGS
+CATOBJEXT
+GMOFILES
+INSTOBJEXT
+INTLLIBS
+PO_IN_DATADIR_TRUE
+PO_IN_DATADIR_FALSE
+POFILES
+POSUB
+MKINSTALLDIRS
LIBOBJS
LTLIBOBJS'
ac_subst_files=''
@@ -1406,7 +1448,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures sugar-base 0.81.1 to adapt to many kinds of systems.
+\`configure' configures sugar-base 0.82.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1476,7 +1518,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of sugar-base 0.81.1:";;
+ short | recursive ) echo "Configuration of sugar-base 0.82.1:";;
esac
cat <<\_ACEOF
@@ -1582,7 +1624,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-sugar-base configure 0.81.1
+sugar-base configure 0.82.1
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1596,7 +1638,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by sugar-base $as_me 0.81.1, which was
+It was created by sugar-base $as_me 0.82.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2292,7 +2334,7 @@ fi
# Define the identity of the package.
PACKAGE='sugar-base'
- VERSION='0.81.1'
+ VERSION='0.82.1'
cat >>confdefs.h <<_ACEOF
@@ -4337,7 +4379,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4340 "configure"' > conftest.$ac_ext
+ echo '#line 4382 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -7075,11 +7117,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7078: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7120: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7082: \$? = $ac_status" >&5
+ echo "$as_me:7124: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7365,11 +7407,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7368: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7410: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7372: \$? = $ac_status" >&5
+ echo "$as_me:7414: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7469,11 +7511,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7472: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7514: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7476: \$? = $ac_status" >&5
+ echo "$as_me:7518: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -9820,7 +9862,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9823 "configure"
+#line 9865 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9920,7 +9962,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9923 "configure"
+#line 9965 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12340,11 +12382,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12343: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12385: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:12347: \$? = $ac_status" >&5
+ echo "$as_me:12389: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -12444,11 +12486,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:12447: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:12489: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:12451: \$? = $ac_status" >&5
+ echo "$as_me:12493: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14008,11 +14050,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14011: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14053: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:14015: \$? = $ac_status" >&5
+ echo "$as_me:14057: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -14112,11 +14154,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:14115: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:14157: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:14119: \$? = $ac_status" >&5
+ echo "$as_me:14161: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -16301,11 +16343,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16304: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16346: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16308: \$? = $ac_status" >&5
+ echo "$as_me:16350: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16591,11 +16633,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16594: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16636: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:16598: \$? = $ac_status" >&5
+ echo "$as_me:16640: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16695,11 +16737,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16698: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16740: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16702: \$? = $ac_status" >&5
+ echo "$as_me:16744: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -19808,7 +19850,1961 @@ echo "${ECHO_T}yes" >&6; }
:
fi
-ac_config_files="$ac_config_files Makefile src/Makefile src/sugar/Makefile"
+# Setup GETTEXT
+#
+ALL_LINGUAS="af am ar ay bg bn bn_IN ca de dz el en es fa fa_AF ff fr gu ha hi ht ig is it ja km ko mk ml mn mr mvo nb ne nl pa pap pis pl ps pt pt_BR qu ro ru rw sd si sl te th tpi tr ur vi yo zh_CN zh_TW"
+
+GETTEXT_PACKAGE=sugar-base
+
+case "$am__api_version" in
+ 1.01234)
+ { { echo "$as_me:$LINENO: error: Automake 1.5 or newer is required to use intltool" >&5
+echo "$as_me: error: Automake 1.5 or newer is required to use intltool" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ *)
+ ;;
+esac
+
+if test -n "0.33"; then
+ { echo "$as_me:$LINENO: checking for intltool >= 0.33" >&5
+echo $ECHO_N "checking for intltool >= 0.33... $ECHO_C" >&6; }
+
+ INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.33 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+ INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
+ 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`
+
+ { echo "$as_me:$LINENO: result: $INTLTOOL_APPLIED_VERSION found" >&5
+echo "${ECHO_T}$INTLTOOL_APPLIED_VERSION found" >&6; }
+ test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
+ { { echo "$as_me:$LINENO: error: Your intltool is too old. You need intltool 0.33 or later." >&5
+echo "$as_me: error: Your intltool is too old. You need intltool 0.33 or later." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ 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 $< $@'
+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 $< $@'
+ 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 $< $@'
+ 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 $< $@'
+ INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< $@'
+ 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 $< $@'
+ 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 $< $@'
+ 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 $< $@'
+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 $< $@'
+ 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 $< $@'
+ 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 $< $@'
+ INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< $@'
+ 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 $< $@'
+ 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 $< $@'
+ 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 $< $@'
+ 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 $< $@'
+ 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 $< $@'
+ 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 $< $@'
+ 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 $< $@'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check the gettext tools to make sure they are GNU
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $XGETTEXT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+XGETTEXT=$ac_cv_path_XGETTEXT
+if test -n "$XGETTEXT"; then
+ { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $MSGMERGE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+MSGMERGE=$ac_cv_path_MSGMERGE
+if test -n "$MSGMERGE"; then
+ { echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+echo "${ECHO_T}$MSGMERGE" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $MSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+MSGFMT=$ac_cv_path_MSGFMT
+if test -n "$MSGFMT"; then
+ { echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+ { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
+echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+ { { echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
+echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# Use the tools built into the package, not the ones that are installed.
+INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
+
+INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
+
+INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
+
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_INTLTOOL_PERL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $INTLTOOL_PERL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
+if test -n "$INTLTOOL_PERL"; then
+ { echo "$as_me:$LINENO: result: $INTLTOOL_PERL" >&5
+echo "${ECHO_T}$INTLTOOL_PERL" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+if test -z "$INTLTOOL_PERL"; then
+ { { echo "$as_me:$LINENO: error: perl not found; required for intltool" >&5
+echo "$as_me: error: perl not found; required for intltool" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
+ { { echo "$as_me:$LINENO: error: perl 5.x required for intltool" >&5
+echo "$as_me: error: perl 5.x required for intltool" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test "x" != "xno-xml"; then
+ { echo "$as_me:$LINENO: checking for XML::Parser" >&5
+echo $ECHO_N "checking for XML::Parser... $ECHO_C" >&6; }
+ if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
+ { echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6; }
+ else
+ { { echo "$as_me:$LINENO: error: XML::Parser perl module is required for intltool" >&5
+echo "$as_me: error: XML::Parser perl module is required for intltool" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+fi
+
+# Substitute ALL_LINGUAS so we can use it in po/Makefile
+
+
+# Set DATADIRNAME correctly if it is not set yet
+# (copied from glib-gettext.m4)
+if test -z "$DATADIRNAME"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ DATADIRNAME=share
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ case $host in
+ *-*-solaris*)
+ { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
+echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; }
+if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define bind_textdomain_codeset to an innocuous variant, in case <limits.h> declares bind_textdomain_codeset.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define bind_textdomain_codeset innocuous_bind_textdomain_codeset
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char bind_textdomain_codeset (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef bind_textdomain_codeset
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char bind_textdomain_codeset ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset
+choke me
+#endif
+
+int
+main ()
+{
+return bind_textdomain_codeset ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func_bind_textdomain_codeset=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_bind_textdomain_codeset=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
+echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6; }
+if test $ac_cv_func_bind_textdomain_codeset = yes; then
+ DATADIRNAME=share
+else
+ DATADIRNAME=lib
+fi
+
+ ;;
+ *)
+ DATADIRNAME=lib
+ ;;
+ esac
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+
+
+
+ac_config_commands="$ac_config_commands intltool"
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
+_ACEOF
+
+
+
+for ac_header in locale.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_locale_h = yes; then
+ { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
+echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; }
+if test "${am_cv_val_LC_MESSAGES+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <locale.h>
+int
+main ()
+{
+return LC_MESSAGES
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ am_cv_val_LC_MESSAGES=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ am_cv_val_LC_MESSAGES=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
+echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; }
+ if test $am_cv_val_LC_MESSAGES = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LC_MESSAGES 1
+_ACEOF
+
+ fi
+ fi
+ USE_NLS=yes
+
+
+ gt_cv_have_gettext=no
+
+ CATOBJEXT=NONE
+ XGETTEXT=:
+ INTLLIBS=
+
+ if test "${ac_cv_header_libintl_h+set}" = set; then
+ { echo "$as_me:$LINENO: checking for libintl.h" >&5
+echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_libintl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking libintl.h usability" >&5
+echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <libintl.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking libintl.h presence" >&5
+echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <libintl.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for libintl.h" >&5
+echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_libintl_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_libintl_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
+echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; }
+
+fi
+if test $ac_cv_header_libintl_h = yes; then
+ gt_cv_func_dgettext_libintl="no"
+ libintl_extra_libs=""
+
+ #
+ # First check in libc
+ #
+ { echo "$as_me:$LINENO: checking for ngettext in libc" >&5
+echo $ECHO_N "checking for ngettext in libc... $ECHO_C" >&6; }
+if test "${gt_cv_func_ngettext_libc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <libintl.h>
+
+int
+main ()
+{
+return !ngettext ("","", 1)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ gt_cv_func_ngettext_libc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gt_cv_func_ngettext_libc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5
+echo "${ECHO_T}$gt_cv_func_ngettext_libc" >&6; }
+
+ if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+ { echo "$as_me:$LINENO: checking for dgettext in libc" >&5
+echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; }
+if test "${gt_cv_func_dgettext_libc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <libintl.h>
+
+int
+main ()
+{
+return !dgettext ("","")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ gt_cv_func_dgettext_libc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gt_cv_func_dgettext_libc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5
+echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; }
+ fi
+
+ if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+
+for ac_func in bind_textdomain_codeset
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ fi
+
+ #
+ # If we don't have everything we want, check in libintl
+ #
+ if test "$gt_cv_func_dgettext_libc" != "yes" \
+ || test "$gt_cv_func_ngettext_libc" != "yes" \
+ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+
+ { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
+echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char bindtextdomain ();
+int
+main ()
+{
+return bindtextdomain ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_intl_bindtextdomain=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_intl_bindtextdomain=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; }
+if test $ac_cv_lib_intl_bindtextdomain = yes; then
+ { echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
+echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_intl_ngettext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ngettext ();
+int
+main ()
+{
+return ngettext ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_intl_ngettext=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_intl_ngettext=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6; }
+if test $ac_cv_lib_intl_ngettext = yes; then
+ { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
+echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_intl_dgettext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dgettext ();
+int
+main ()
+{
+return dgettext ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_intl_dgettext=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_intl_dgettext=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
+if test $ac_cv_lib_intl_dgettext = yes; then
+ gt_cv_func_dgettext_libintl=yes
+fi
+
+fi
+
+fi
+
+
+ if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+ { echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5
+echo $ECHO_N "checking if -liconv is needed to use gettext... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: result: " >&5
+echo "${ECHO_T}" >&6; }
+ { echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5
+echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_intl_ngettext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl -liconv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ngettext ();
+int
+main ()
+{
+return ngettext ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_intl_ngettext=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_intl_ngettext=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6; }
+if test $ac_cv_lib_intl_ngettext = yes; then
+ { echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5
+echo $ECHO_N "checking for dcgettext in -lintl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_intl_dcgettext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl -liconv $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dcgettext ();
+int
+main ()
+{
+return dcgettext ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_intl_dcgettext=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_intl_dcgettext=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5
+echo "${ECHO_T}$ac_cv_lib_intl_dcgettext" >&6; }
+if test $ac_cv_lib_intl_dcgettext = yes; then
+ gt_cv_func_dgettext_libintl=yes
+ libintl_extra_libs=-liconv
+else
+ :
+fi
+
+else
+ :
+fi
+
+ fi
+
+ #
+ # If we found libintl, then check in it for bind_textdomain_codeset();
+ # we'll prefer libc if neither have bind_textdomain_codeset(),
+ # and both have dgettext and ngettext
+ #
+ if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+ glib_save_LIBS="$LIBS"
+ LIBS="$LIBS -lintl $libintl_extra_libs"
+ unset ac_cv_func_bind_textdomain_codeset
+
+for ac_func in bind_textdomain_codeset
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$glib_save_LIBS"
+
+ if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+ gt_cv_func_dgettext_libc=no
+ else
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
+ && test "$gt_cv_func_ngettext_libc" = "yes"; then
+ gt_cv_func_dgettext_libintl=no
+ fi
+ fi
+ fi
+ fi
+
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
+ || test "$gt_cv_func_dgettext_libintl" = "yes"; then
+ gt_cv_have_gettext=yes
+ fi
+
+ if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+ INTLLIBS="-lintl $libintl_extra_libs"
+ fi
+
+ if test "$gt_cv_have_gettext" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETTEXT 1
+_ACEOF
+
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case "$MSGFMT" in
+ /*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != "no"; then
+ { echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+ if test "$MSGFMT" != "no"; then
+ glib_save_LIBS="$LIBS"
+ LIBS="$LIBS $INTLLIBS"
+
+for ac_func in dcgettext
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ MSGFMT_OPTS=
+ { echo "$as_me:$LINENO: checking if msgfmt accepts -c" >&5
+echo $ECHO_N "checking if msgfmt accepts -c... $ECHO_C" >&6; }
+ cat >conftest.foo <<_ACEOF
+
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Project-Id-Version: test 1.0\n"
+"PO-Revision-Date: 2007-02-15 12:01+0100\n"
+"Last-Translator: test <foo@bar.xx>\n"
+"Language-Team: C <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+_ACEOF
+if { (echo "$as_me:$LINENO: \$MSGFMT -c -o /dev/null conftest.foo") >&5
+ ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ MSGFMT_OPTS=-c; { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+echo "$as_me: failed input was:" >&5
+sed 's/^/| /' conftest.foo >&5
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+ { echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ # Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case "$XGETTEXT" in
+ /*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+ { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ case $host in
+ *-*-solaris*)
+ { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5
+echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; }
+if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define bind_textdomain_codeset to an innocuous variant, in case <limits.h> declares bind_textdomain_codeset.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define bind_textdomain_codeset innocuous_bind_textdomain_codeset
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char bind_textdomain_codeset (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef bind_textdomain_codeset
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char bind_textdomain_codeset ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset
+choke me
+#endif
+
+int
+main ()
+{
+return bind_textdomain_codeset ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func_bind_textdomain_codeset=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_bind_textdomain_codeset=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5
+echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6; }
+if test $ac_cv_func_bind_textdomain_codeset = yes; then
+ CATOBJEXT=.gmo
+ DATADIRNAME=share
+else
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+fi
+
+ ;;
+ *)
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+ ;;
+ esac
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$glib_save_LIBS"
+ INSTOBJEXT=.mo
+ else
+ gt_cv_have_gettext=no
+ fi
+ fi
+
+fi
+
+
+
+ if test "$gt_cv_have_gettext" = "yes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_NLS 1
+_ACEOF
+
+ fi
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
+echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; }
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+
+ ac_config_commands="$ac_config_commands default-1"
+
+
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test "$gt_cv_have_gettext" = "yes"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
+echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; }
+ NEW_LINGUAS=
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+ fi
+ done
+ LINGUAS=$NEW_LINGUAS
+ { echo "$as_me:$LINENO: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6; }
+ fi
+
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+
+
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+
+
+ac_config_files="$ac_config_files Makefile src/Makefile src/sugar/Makefile po/Makefile.in"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -19958,6 +21954,10 @@ Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+ ac_config_commands="$ac_config_commands po/stamp-it"
+
+
+
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -20257,7 +22257,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by sugar-base $as_me 0.81.1, which was
+This file was extended by sugar-base $as_me 0.82.1, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20304,7 +22304,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-sugar-base config.status 0.81.1
+sugar-base config.status 0.82.1
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -20400,6 +22400,10 @@ cat >>$CONFIG_STATUS <<_ACEOF
# INIT-COMMANDS
#
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
+prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
+INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'
+
_ACEOF
@@ -20410,9 +22414,13 @@ for ac_config_target in $ac_config_targets
do
case $ac_config_target in
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "intltool") CONFIG_COMMANDS="$CONFIG_COMMANDS intltool" ;;
+ "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"src/sugar/Makefile") CONFIG_FILES="$CONFIG_FILES src/sugar/Makefile" ;;
+ "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+ "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -20631,11 +22639,53 @@ PYGTK_CODEGEN!$PYGTK_CODEGEN$ac_delim
PKG_CONFIG!$PKG_CONFIG$ac_delim
EXTENSION_CFLAGS!$EXTENSION_CFLAGS$ac_delim
EXTENSION_LIBS!$EXTENSION_LIBS$ac_delim
+INTLTOOL_DESKTOP_RULE!$INTLTOOL_DESKTOP_RULE$ac_delim
+INTLTOOL_DIRECTORY_RULE!$INTLTOOL_DIRECTORY_RULE$ac_delim
+INTLTOOL_KEYS_RULE!$INTLTOOL_KEYS_RULE$ac_delim
+INTLTOOL_PROP_RULE!$INTLTOOL_PROP_RULE$ac_delim
+INTLTOOL_OAF_RULE!$INTLTOOL_OAF_RULE$ac_delim
+INTLTOOL_PONG_RULE!$INTLTOOL_PONG_RULE$ac_delim
+INTLTOOL_SERVER_RULE!$INTLTOOL_SERVER_RULE$ac_delim
+INTLTOOL_SHEET_RULE!$INTLTOOL_SHEET_RULE$ac_delim
+INTLTOOL_SOUNDLIST_RULE!$INTLTOOL_SOUNDLIST_RULE$ac_delim
+INTLTOOL_UI_RULE!$INTLTOOL_UI_RULE$ac_delim
+INTLTOOL_XAM_RULE!$INTLTOOL_XAM_RULE$ac_delim
+INTLTOOL_KBD_RULE!$INTLTOOL_KBD_RULE$ac_delim
+INTLTOOL_XML_RULE!$INTLTOOL_XML_RULE$ac_delim
+INTLTOOL_XML_NOMERGE_RULE!$INTLTOOL_XML_NOMERGE_RULE$ac_delim
+INTLTOOL_CAVES_RULE!$INTLTOOL_CAVES_RULE$ac_delim
+INTLTOOL_SCHEMAS_RULE!$INTLTOOL_SCHEMAS_RULE$ac_delim
+INTLTOOL_THEME_RULE!$INTLTOOL_THEME_RULE$ac_delim
+INTLTOOL_SERVICE_RULE!$INTLTOOL_SERVICE_RULE$ac_delim
+INTLTOOL_POLICY_RULE!$INTLTOOL_POLICY_RULE$ac_delim
+XGETTEXT!$XGETTEXT$ac_delim
+MSGMERGE!$MSGMERGE$ac_delim
+MSGFMT!$MSGFMT$ac_delim
+INTLTOOL_EXTRACT!$INTLTOOL_EXTRACT$ac_delim
+INTLTOOL_MERGE!$INTLTOOL_MERGE$ac_delim
+INTLTOOL_UPDATE!$INTLTOOL_UPDATE$ac_delim
+INTLTOOL_PERL!$INTLTOOL_PERL$ac_delim
+ALL_LINGUAS!$ALL_LINGUAS$ac_delim
+DATADIRNAME!$DATADIRNAME$ac_delim
+GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim
+USE_NLS!$USE_NLS$ac_delim
+MSGFMT_OPTS!$MSGFMT_OPTS$ac_delim
+GMSGFMT!$GMSGFMT$ac_delim
+CATALOGS!$CATALOGS$ac_delim
+CATOBJEXT!$CATOBJEXT$ac_delim
+GMOFILES!$GMOFILES$ac_delim
+INSTOBJEXT!$INSTOBJEXT$ac_delim
+INTLLIBS!$INTLLIBS$ac_delim
+PO_IN_DATADIR_TRUE!$PO_IN_DATADIR_TRUE$ac_delim
+PO_IN_DATADIR_FALSE!$PO_IN_DATADIR_FALSE$ac_delim
+POFILES!$POFILES$ac_delim
+POSUB!$POSUB$ac_delim
+MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 63; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -21071,6 +23121,49 @@ echo "$as_me: error: cannot create directory $as_dir" >&2;}
done
done
;;
+ "intltool":C)
+
+for file in intltool-extract intltool-merge intltool-update; do
+ sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
+ -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
+ -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
+ < ${ac_aux_dir}/${file}.in > ${file}.out
+ if cmp -s ${file} ${file}.out 2>/dev/null; then
+ rm -f ${file}.out
+ else
+ mv -f ${file}.out ${file}
+ fi
+ chmod ugo+x ${file}
+ chmod u+w ${file}
+done
+
+ ;;
+ "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac ;;
+ "po/stamp-it":C)
+ rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
+ >"po/stamp-it.tmp"
+ sed '/^#/d
+ s/^[[].*] *//
+ /^[ ]*$/d
+ '"s|^| $ac_top_srcdir/|" \
+ "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
+
+ if test ! -f "po/Makefile"; then
+ { { echo "$as_me:$LINENO: error: po/Makefile is not ready." >&5
+echo "$as_me: error: po/Makefile is not ready." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ mv "po/Makefile" "po/Makefile.tmp"
+ sed '/^POTFILES =/,/[^\\]$/ {
+ /^POTFILES =/!d
+ r po/POTFILES
+ }
+ ' "po/Makefile.tmp" >"po/Makefile"
+ rm -f "po/Makefile.tmp"
+ mv "po/stamp-it.tmp" "po/stamp-it"
+ ;;
esac
done # for ac_tag
diff --git a/intltool-extract.in b/intltool-extract.in
new file mode 100644
index 0000000..e671bdd
--- /dev/null
+++ b/intltool-extract.in
@@ -0,0 +1,875 @@
+#!@INTLTOOL_PERL@ -w
+# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+
+#
+# The Intltool Message Extractor
+#
+# Copyright (C) 2000-2001, 2003 Free Software Foundation.
+#
+# Intltool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# Intltool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+#
+# Authors: Kenneth Christiansen <kenneth@gnu.org>
+# Darin Adler <darin@bentspoon.com>
+#
+
+## Release information
+my $PROGRAM = "intltool-extract";
+my $PACKAGE = "intltool";
+my $VERSION = "0.37.1";
+
+## Loaded modules
+use strict;
+use File::Basename;
+use Getopt::Long;
+
+## Scalars used by the option stuff
+my $TYPE_ARG = "0";
+my $LOCAL_ARG = "0";
+my $HELP_ARG = "0";
+my $VERSION_ARG = "0";
+my $UPDATE_ARG = "0";
+my $QUIET_ARG = "0";
+my $SRCDIR_ARG = ".";
+
+my $FILE;
+my $OUTFILE;
+
+my $gettext_type = "";
+my $input;
+my %messages = ();
+my %loc = ();
+my %count = ();
+my %comments = ();
+my $strcount = 0;
+
+my $XMLCOMMENT = "";
+
+## Use this instead of \w for XML files to handle more possible characters.
+my $w = "[-A-Za-z0-9._:]";
+
+## Always print first
+$| = 1;
+
+## Handle options
+GetOptions (
+ "type=s" => \$TYPE_ARG,
+ "local|l" => \$LOCAL_ARG,
+ "help|h" => \$HELP_ARG,
+ "version|v" => \$VERSION_ARG,
+ "update" => \$UPDATE_ARG,
+ "quiet|q" => \$QUIET_ARG,
+ "srcdir=s" => \$SRCDIR_ARG,
+ ) or &error;
+
+&split_on_argument;
+
+
+## Check for options.
+## This section will check for the different options.
+
+sub split_on_argument {
+
+ if ($VERSION_ARG) {
+ &version;
+
+ } elsif ($HELP_ARG) {
+ &help;
+
+ } elsif ($LOCAL_ARG) {
+ &place_local;
+ &extract;
+
+ } elsif ($UPDATE_ARG) {
+ &place_normal;
+ &extract;
+
+ } elsif (@ARGV > 0) {
+ &place_normal;
+ &message;
+ &extract;
+
+ } else {
+ &help;
+
+ }
+}
+
+sub place_normal {
+ $FILE = $ARGV[0];
+ $OUTFILE = "$FILE.h";
+
+ my $dirname = dirname ($OUTFILE);
+ if (! -d "$dirname" && $dirname ne "") {
+ system ("mkdir -p $dirname");
+ }
+}
+
+sub place_local {
+ $FILE = $ARGV[0];
+ $OUTFILE = fileparse($FILE, ());
+ if (!-e "tmp/") {
+ system("mkdir tmp/");
+ }
+ $OUTFILE = "./tmp/$OUTFILE.h"
+}
+
+sub determine_type {
+ if ($TYPE_ARG =~ /^gettext\/(.*)/) {
+ $gettext_type=$1
+ }
+}
+
+## Sub for printing release information
+sub version{
+ print <<_EOF_;
+${PROGRAM} (${PACKAGE}) $VERSION
+Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+Written by Kenneth Christiansen, 2000.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+_EOF_
+ exit;
+}
+
+## Sub for printing usage information
+sub help {
+ print <<_EOF_;
+Usage: ${PROGRAM} [OPTION]... [FILENAME]
+Generates a header file from an XML source file.
+
+It grabs all strings between <_translatable_node> and its end tag in
+XML files. Read manpage (man ${PROGRAM}) for more info.
+
+ --type=TYPE Specify the file type of FILENAME. Currently supports:
+ "gettext/glade", "gettext/ini", "gettext/keys"
+ "gettext/rfc822deb", "gettext/schemas",
+ "gettext/scheme", "gettext/xml", "gettext/quoted",
+ "gettext/quotedxml"
+ -l, --local Writes output into current working directory
+ (conflicts with --update)
+ --update Writes output into the same directory the source file
+ reside (conflicts with --local)
+ --srcdir Root of the source tree
+ -v, --version Output version information and exit
+ -h, --help Display this help and exit
+ -q, --quiet Quiet mode
+
+Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
+or send email to <xml-i18n-tools\@gnome.org>.
+_EOF_
+ exit;
+}
+
+## Sub for printing error messages
+sub error{
+ print STDERR "Try `${PROGRAM} --help' for more information.\n";
+ exit;
+}
+
+sub message {
+ print "Generating C format header file for translation.\n" unless $QUIET_ARG;
+}
+
+sub extract {
+ &determine_type;
+
+ &convert;
+
+ open OUT, ">$OUTFILE";
+ binmode (OUT) if $^O eq 'MSWin32';
+ &msg_write;
+ close OUT;
+
+ print "Wrote $OUTFILE\n" unless $QUIET_ARG;
+}
+
+sub convert {
+
+ ## Reading the file
+ {
+ local (*IN);
+ local $/; #slurp mode
+ open (IN, "<$SRCDIR_ARG/$FILE") || die "can't open $SRCDIR_ARG/$FILE: $!";
+ $input = <IN>;
+ }
+
+ &type_ini if $gettext_type eq "ini";
+ &type_keys if $gettext_type eq "keys";
+ &type_xml if $gettext_type eq "xml";
+ &type_glade if $gettext_type eq "glade";
+ &type_scheme if $gettext_type eq "scheme";
+ &type_schemas if $gettext_type eq "schemas";
+ &type_rfc822deb if $gettext_type eq "rfc822deb";
+ &type_quoted if $gettext_type eq "quoted";
+ &type_quotedxml if $gettext_type eq "quotedxml";
+}
+
+sub entity_decode_minimal
+{
+ local ($_) = @_;
+
+ s/&apos;/'/g; # '
+ s/&quot;/"/g; # "
+ s/&amp;/&/g;
+
+ return $_;
+}
+
+sub entity_decode
+{
+ local ($_) = @_;
+
+ s/&apos;/'/g; # '
+ s/&quot;/"/g; # "
+ s/&lt;/</g;
+ s/&gt;/>/g;
+ s/&amp;/&/g;
+
+ return $_;
+}
+
+sub escape_char
+{
+ return '\"' if $_ eq '"';
+ return '\n' if $_ eq "\n";
+ return '\\\\' if $_ eq '\\';
+
+ return $_;
+}
+
+sub escape
+{
+ my ($string) = @_;
+ return join "", map &escape_char, split //, $string;
+}
+
+sub type_ini {
+ ### For generic translatable desktop files ###
+ while ($input =~ /^(#(.+)\n)?^_.*=(.*)$/mg) {
+ if (defined($2)) {
+ $comments{$3} = $2;
+ }
+ $messages{$3} = [];
+ }
+}
+
+sub type_keys {
+ ### For generic translatable mime/keys files ###
+ while ($input =~ /^\s*_\w+=(.*)$/mg) {
+ $messages{$1} = [];
+ }
+}
+
+sub type_xml {
+ ### For generic translatable XML files ###
+ my $tree = readXml($input);
+ parseTree(0, $tree);
+}
+
+sub print_var {
+ my $var = shift;
+ my $vartype = ref $var;
+
+ if ($vartype =~ /ARRAY/) {
+ my @arr = @{$var};
+ print "[ ";
+ foreach my $el (@arr) {
+ print_var($el);
+ print ", ";
+ }
+ print "] ";
+ } elsif ($vartype =~ /HASH/) {
+ my %hash = %{$var};
+ print "{ ";
+ foreach my $key (keys %hash) {
+ print "$key => ";
+ print_var($hash{$key});
+ print ", ";
+ }
+ print "} ";
+ } else {
+ print $var;
+ }
+}
+
+# Same syntax as getAttributeString in intltool-merge.in.in, similar logic (look for ## differences comment)
+sub getAttributeString
+{
+ my $sub = shift;
+ my $do_translate = shift || 1;
+ my $language = shift || "";
+ my $translate = shift;
+ my $result = "";
+ foreach my $e (reverse(sort(keys %{ $sub }))) {
+ my $key = $e;
+ my $string = $sub->{$e};
+ my $quote = '"';
+
+ $string =~ s/^[\s]+//;
+ $string =~ s/[\s]+$//;
+
+ if ($string =~ /^'.*'$/)
+ {
+ $quote = "'";
+ }
+ $string =~ s/^['"]//g;
+ $string =~ s/['"]$//g;
+
+ ## differences from intltool-merge.in.in
+ if ($key =~ /^_/) {
+ $comments{entity_decode($string)} = $XMLCOMMENT if $XMLCOMMENT;
+ $messages{entity_decode($string)} = [];
+ $$translate = 2;
+ }
+ ## differences end here from intltool-merge.in.in
+ $result .= " $key=$quote$string$quote";
+ }
+ return $result;
+}
+
+# Verbatim copy from intltool-merge.in.in
+sub getXMLstring
+{
+ my $ref = shift;
+ my $spacepreserve = shift || 0;
+ my @list = @{ $ref };
+ my $result = "";
+
+ my $count = scalar(@list);
+ my $attrs = $list[0];
+ my $index = 1;
+
+ $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
+ $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
+
+ while ($index < $count) {
+ my $type = $list[$index];
+ my $content = $list[$index+1];
+ if (! $type ) {
+ # We've got CDATA
+ if ($content) {
+ # lets strip the whitespace here, and *ONLY* here
+ $content =~ s/\s+/ /gs if (!$spacepreserve);
+ $result .= $content;
+ }
+ } elsif ( "$type" ne "1" ) {
+ # We've got another element
+ $result .= "<$type";
+ $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements
+ if ($content) {
+ my $subresult = getXMLstring($content, $spacepreserve);
+ if ($subresult) {
+ $result .= ">".$subresult . "</$type>";
+ } else {
+ $result .= "/>";
+ }
+ } else {
+ $result .= "/>";
+ }
+ }
+ $index += 2;
+ }
+ return $result;
+}
+
+# Verbatim copy from intltool-merge.in.in, except for MULTIPLE_OUTPUT handling removed
+# Translate list of nodes if necessary
+sub translate_subnodes
+{
+ my $fh = shift;
+ my $content = shift;
+ my $language = shift || "";
+ my $singlelang = shift || 0;
+ my $spacepreserve = shift || 0;
+
+ my @nodes = @{ $content };
+
+ my $count = scalar(@nodes);
+ my $index = 0;
+ while ($index < $count) {
+ my $type = $nodes[$index];
+ my $rest = $nodes[$index+1];
+ traverse($fh, $type, $rest, $language, $spacepreserve);
+ $index += 2;
+ }
+}
+
+# Based on traverse() in intltool-merge.in.in
+sub traverse
+{
+ my $fh = shift; # unused, to allow us to sync code between -merge and -extract
+ my $nodename = shift;
+ my $content = shift;
+ my $language = shift || "";
+ my $spacepreserve = shift || 0;
+
+ if ($nodename && "$nodename" eq "1") {
+ $XMLCOMMENT = $content;
+ } elsif ($nodename) {
+ # element
+ my @all = @{ $content };
+ my $attrs = shift @all;
+ my $translate = 0;
+ my $outattr = getAttributeString($attrs, 1, $language, \$translate);
+
+ if ($nodename =~ /^_/) {
+ $translate = 1;
+ $nodename =~ s/^_//;
+ }
+ my $lookup = '';
+
+ $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
+ $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
+
+ if ($translate) {
+ $lookup = getXMLstring($content, $spacepreserve);
+ if (!$spacepreserve) {
+ $lookup =~ s/^\s+//s;
+ $lookup =~ s/\s+$//s;
+ }
+
+ if ($lookup && $translate != 2) {
+ $comments{$lookup} = $XMLCOMMENT if $XMLCOMMENT;
+ $messages{$lookup} = [];
+ } elsif ($translate == 2) {
+ translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
+ }
+ } else {
+ $XMLCOMMENT = "";
+ my $count = scalar(@all);
+ if ($count > 0) {
+ my $index = 0;
+ while ($index < $count) {
+ my $type = $all[$index];
+ my $rest = $all[$index+1];
+ traverse($fh, $type, $rest, $language, $spacepreserve);
+ $index += 2;
+ }
+ }
+ }
+ $XMLCOMMENT = "";
+ }
+}
+
+
+# Verbatim copy from intltool-merge.in.in, $fh for compatibility
+sub parseTree
+{
+ my $fh = shift;
+ my $ref = shift;
+ my $language = shift || "";
+
+ my $name = shift @{ $ref };
+ my $cont = shift @{ $ref };
+
+ while (!$name || "$name" eq "1") {
+ $name = shift @{ $ref };
+ $cont = shift @{ $ref };
+ }
+
+ my $spacepreserve = 0;
+ my $attrs = @{$cont}[0];
+ $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
+
+ traverse($fh, $name, $cont, $language, $spacepreserve);
+}
+
+# Verbatim copy from intltool-merge.in.in
+sub intltool_tree_comment
+{
+ my $expat = shift;
+ my $data = $expat->original_string();
+ my $clist = $expat->{Curlist};
+ my $pos = $#$clist;
+
+ $data =~ s/^<!--//s;
+ $data =~ s/-->$//s;
+ push @$clist, 1 => $data;
+}
+
+# Verbatim copy from intltool-merge.in.in
+sub intltool_tree_cdatastart
+{
+ my $expat = shift;
+ my $clist = $expat->{Curlist};
+ my $pos = $#$clist;
+
+ push @$clist, 0 => $expat->original_string();
+}
+
+# Verbatim copy from intltool-merge.in.in
+sub intltool_tree_cdataend
+{
+ my $expat = shift;
+ my $clist = $expat->{Curlist};
+ my $pos = $#$clist;
+
+ $clist->[$pos] .= $expat->original_string();
+}
+
+# Verbatim copy from intltool-merge.in.in
+sub intltool_tree_char
+{
+ my $expat = shift;
+ my $text = shift;
+ my $clist = $expat->{Curlist};
+ my $pos = $#$clist;
+
+ # Use original_string so that we retain escaped entities
+ # in CDATA sections.
+ #
+ if ($pos > 0 and $clist->[$pos - 1] eq '0') {
+ $clist->[$pos] .= $expat->original_string();
+ } else {
+ push @$clist, 0 => $expat->original_string();
+ }
+}
+
+# Verbatim copy from intltool-merge.in.in
+sub intltool_tree_start
+{
+ my $expat = shift;
+ my $tag = shift;
+ my @origlist = ();
+
+ # Use original_string so that we retain escaped entities
+ # in attribute values. We must convert the string to an
+ # @origlist array to conform to the structure of the Tree
+ # Style.
+ #
+ my @original_array = split /\x/, $expat->original_string();
+ my $source = $expat->original_string();
+
+ # Remove leading tag.
+ #
+ $source =~ s|^\s*<\s*(\S+)||s;
+
+ # Grab attribute key/value pairs and push onto @origlist array.
+ #
+ while ($source)
+ {
+ if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/)
+ {
+ $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s;
+ push @origlist, $1;
+ push @origlist, '"' . $2 . '"';
+ }
+ elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/)
+ {
+ $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s;
+ push @origlist, $1;
+ push @origlist, "'" . $2 . "'";
+ }
+ else
+ {
+ last;
+ }
+ }
+
+ my $ol = [ { @origlist } ];
+
+ push @{ $expat->{Lists} }, $expat->{Curlist};
+ push @{ $expat->{Curlist} }, $tag => $ol;
+ $expat->{Curlist} = $ol;
+}
+
+# Copied from intltool-merge.in.in and added comment handler.
+sub readXml
+{
+ my $xmldoc = shift || return;
+ my $ret = eval 'require XML::Parser';
+ if(!$ret) {
+ die "You must have XML::Parser installed to run $0\n\n";
+ }
+ my $xp = new XML::Parser(Style => 'Tree');
+ $xp->setHandlers(Char => \&intltool_tree_char);
+ $xp->setHandlers(Start => \&intltool_tree_start);
+ $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart);
+ $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend);
+
+ ## differences from intltool-merge.in.in
+ $xp->setHandlers(Comment => \&intltool_tree_comment);
+ ## differences end here from intltool-merge.in.in
+
+ my $tree = $xp->parse($xmldoc);
+ #print_var($tree);
+
+# <foo><!-- comment --><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
+# would be:
+# [foo, [{}, 1, "comment", head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar,
+# [{}, 0, "Howdy", ref, [{}]], 0, "do" ] ]
+
+ return $tree;
+}
+
+sub type_schemas {
+ ### For schemas XML files ###
+
+ # FIXME: We should handle escaped < (less than)
+ while ($input =~ /
+ <locale\ name="C">\s*
+ (<default>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/default>\s*)?
+ (<short>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/short>\s*)?
+ (<long>\s*(?:<!--([^>]*?)-->\s*)?(.*?)\s*<\/long>\s*)?
+ <\/locale>
+ /sgx) {
+ my @totranslate = ($3,$6,$9);
+ my @eachcomment = ($2,$5,$8);
+ foreach (@totranslate) {
+ my $currentcomment = shift @eachcomment;
+ next if !$_;
+ s/\s+/ /g;
+ $messages{entity_decode_minimal($_)} = [];
+ $comments{entity_decode_minimal($_)} = $currentcomment if (defined($currentcomment));
+ }
+ }
+}
+
+sub type_rfc822deb {
+ ### For rfc822-style Debian configuration files ###
+
+ my $lineno = 1;
+ my $type = '';
+ while ($input =~ /\G(.*?)(^|\n)(_+)([^:]+):[ \t]*(.*?)(?=\n\S|$)/sg)
+ {
+ my ($pre, $newline, $underscore, $tag, $text) = ($1, $2, $3, $4, $5);
+ while ($pre =~ m/\n/g)
+ {
+ $lineno ++;
+ }
+ $lineno += length($newline);
+ my @str_list = rfc822deb_split(length($underscore), $text);
+ for my $str (@str_list)
+ {
+ $strcount++;
+ $messages{$str} = [];
+ $loc{$str} = $lineno;
+ $count{$str} = $strcount;
+ my $usercomment = '';
+ while($pre =~ s/(^|\n)#([^\n]*)$//s)
+ {
+ $usercomment = "\n" . $2 . $usercomment;
+ }
+ $comments{$str} = $tag . $usercomment;
+ }
+ $lineno += ($text =~ s/\n//g);
+ }
+}
+
+sub rfc822deb_split {
+ # Debian defines a special way to deal with rfc822-style files:
+ # when a value contain newlines, it consists of
+ # 1. a short form (first line)
+ # 2. a long description, all lines begin with a space,
+ # and paragraphs are separated by a single dot on a line
+ # This routine returns an array of all paragraphs, and reformat
+ # them.
+ # When first argument is 2, the string is a comma separated list of
+ # values.
+ my $type = shift;
+ my $text = shift;
+ $text =~ s/^[ \t]//mg;
+ return (split(/, */, $text, 0)) if $type ne 1;
+ return ($text) if $text !~ /\n/;
+
+ $text =~ s/([^\n]*)\n//;
+ my @list = ($1);
+ my $str = '';
+ for my $line (split (/\n/, $text))
+ {
+ chomp $line;
+ if ($line =~ /^\.\s*$/)
+ {
+ # New paragraph
+ $str =~ s/\s*$//;
+ push(@list, $str);
+ $str = '';
+ }
+ elsif ($line =~ /^\s/)
+ {
+ # Line which must not be reformatted
+ $str .= "\n" if length ($str) && $str !~ /\n$/;
+ $line =~ s/\s+$//;
+ $str .= $line."\n";
+ }
+ else
+ {
+ # Continuation line, remove newline
+ $str .= " " if length ($str) && $str !~ /\n$/;
+ $str .= $line;
+ }
+ }
+ $str =~ s/\s*$//;
+ push(@list, $str) if length ($str);
+ return @list;
+}
+
+sub type_quoted {
+ while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) {
+ my $message = $1;
+ my $before = $`;
+ $message =~ s/\\\"/\"/g;
+ $before =~ s/[^\n]//g;
+ $messages{$message} = [];
+ $loc{$message} = length ($before) + 2;
+ }
+}
+
+sub type_quotedxml {
+ while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) {
+ my $message = $1;
+ my $before = $`;
+ $message =~ s/\\\"/\"/g;
+ $message = entity_decode($message);
+ $before =~ s/[^\n]//g;
+ $messages{$message} = [];
+ $loc{$message} = length ($before) + 2;
+ }
+}
+
+sub type_glade {
+ ### For translatable Glade XML files ###
+
+ my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message";
+
+ while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) {
+ # Glade sometimes uses tags that normally mark translatable things for
+ # little bits of non-translatable content. We work around this by not
+ # translating strings that only includes something like label4 or window1.
+ $messages{entity_decode($2)} = [] unless $2 =~ /^(window|label|dialog)[0-9]+$/;
+ }
+
+ while ($input =~ /<items>(..[^<]*)<\/items>/sg) {
+ for my $item (split (/\n/, $1)) {
+ $messages{entity_decode($item)} = [];
+ }
+ }
+
+ ## handle new glade files
+ while ($input =~ /<(property|atkproperty)\s+[^>]*translatable\s*=\s*"yes"(?:\s+[^>]*comments\s*=\s*"([^"]*)")?[^>]*>([^<]+)<\/\1>/sg) {
+ $messages{entity_decode($3)} = [] unless $3 =~ /^(window|label)[0-9]+$/;
+ if (defined($2) and !($3 =~ /^(window|label)[0-9]+$/)) {
+ $comments{entity_decode($3)} = entity_decode($2) ;
+ }
+ }
+ while ($input =~ /<atkaction\s+action_name="([^>]*)"\s+description="([^>]+)"\/>/sg) {
+ $messages{entity_decode_minimal($2)} = [];
+ }
+}
+
+sub type_scheme {
+ my ($line, $i, $state, $str, $trcomment, $char);
+ for $line (split(/\n/, $input)) {
+ $i = 0;
+ $state = 0; # 0 - nothing, 1 - string, 2 - translatable string
+ while ($i < length($line)) {
+ if (substr($line,$i,1) eq "\"") {
+ if ($state == 2) {
+ $comments{$str} = $trcomment if ($trcomment);
+ $messages{$str} = [];
+ $str = '';
+ $state = 0; $trcomment = "";
+ } elsif ($state == 1) {
+ $str = '';
+ $state = 0; $trcomment = "";
+ } else {
+ $state = 1;
+ $str = '';
+ if ($i>0 && substr($line,$i-1,1) eq '_') {
+ $state = 2;
+ }
+ }
+ } elsif (!$state) {
+ if (substr($line,$i,1) eq ";") {
+ $trcomment = substr($line,$i+1);
+ $trcomment =~ s/^;*\s*//;
+ $i = length($line);
+ } elsif ($trcomment && substr($line,$i,1) !~ /\s|\(|\)|_/) {
+ $trcomment = "";
+ }
+ } else {
+ if (substr($line,$i,1) eq "\\") {
+ $char = substr($line,$i+1,1);
+ if ($char ne "\"" && $char ne "\\") {
+ $str = $str . "\\";
+ }
+ $i++;
+ }
+ $str = $str . substr($line,$i,1);
+ }
+ $i++;
+ }
+ }
+}
+
+sub msg_write {
+ my @msgids;
+ if (%count)
+ {
+ @msgids = sort { $count{$a} <=> $count{$b} } keys %count;
+ }
+ else
+ {
+ @msgids = sort keys %messages;
+ }
+ for my $message (@msgids)
+ {
+ my $offsetlines = 1;
+ $offsetlines++ if $message =~ /%/;
+ if (defined ($comments{$message}))
+ {
+ while ($comments{$message} =~ m/\n/g)
+ {
+ $offsetlines++;
+ }
+ }
+ print OUT "# ".($loc{$message} - $offsetlines). " \"$FILE\"\n"
+ if defined $loc{$message};
+ print OUT "/* ".$comments{$message}." */\n"
+ if defined $comments{$message};
+ print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/;
+
+ my @lines = split (/\n/, $message, -1);
+ for (my $n = 0; $n < @lines; $n++)
+ {
+ if ($n == 0)
+ {
+ print OUT "char *s = N_(\"";
+ }
+ else
+ {
+ print OUT " \"";
+ }
+
+ print OUT escape($lines[$n]);
+
+ if ($n < @lines - 1)
+ {
+ print OUT "\\n\"\n";
+ }
+ else
+ {
+ print OUT "\");\n";
+ }
+ }
+ }
+}
+
diff --git a/intltool-merge.in b/intltool-merge.in
new file mode 100644
index 0000000..60c3f3e
--- /dev/null
+++ b/intltool-merge.in
@@ -0,0 +1,1506 @@
+#!@INTLTOOL_PERL@ -w
+# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+
+#
+# The Intltool Message Merger
+#
+# Copyright (C) 2000, 2003 Free Software Foundation.
+# Copyright (C) 2000, 2001 Eazel, Inc
+#
+# Intltool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# version 2 published by the Free Software Foundation.
+#
+# Intltool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+#
+# Authors: Maciej Stachowiak <mjs@noisehavoc.org>
+# Kenneth Christiansen <kenneth@gnu.org>
+# Darin Adler <darin@bentspoon.com>
+#
+# Proper XML UTF-8'ification written by Cyrille Chepelov <chepelov@calixo.net>
+#
+
+## Release information
+my $PROGRAM = "intltool-merge";
+my $PACKAGE = "intltool";
+my $VERSION = "0.37.1";
+
+## Loaded modules
+use strict;
+use Getopt::Long;
+use Text::Wrap;
+use File::Basename;
+
+my $must_end_tag = -1;
+my $last_depth = -1;
+my $translation_depth = -1;
+my @tag_stack = ();
+my @entered_tag = ();
+my @translation_strings = ();
+my $leading_space = "";
+
+## Scalars used by the option stuff
+my $HELP_ARG = 0;
+my $VERSION_ARG = 0;
+my $BA_STYLE_ARG = 0;
+my $XML_STYLE_ARG = 0;
+my $KEYS_STYLE_ARG = 0;
+my $DESKTOP_STYLE_ARG = 0;
+my $SCHEMAS_STYLE_ARG = 0;
+my $RFC822DEB_STYLE_ARG = 0;
+my $QUOTED_STYLE_ARG = 0;
+my $QUOTEDXML_STYLE_ARG = 0;
+my $QUIET_ARG = 0;
+my $PASS_THROUGH_ARG = 0;
+my $UTF8_ARG = 0;
+my $MULTIPLE_OUTPUT = 0;
+my $cache_file;
+
+## Handle options
+GetOptions
+(
+ "help" => \$HELP_ARG,
+ "version" => \$VERSION_ARG,
+ "quiet|q" => \$QUIET_ARG,
+ "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility
+ "ba-style|b" => \$BA_STYLE_ARG,
+ "xml-style|x" => \$XML_STYLE_ARG,
+ "keys-style|k" => \$KEYS_STYLE_ARG,
+ "desktop-style|d" => \$DESKTOP_STYLE_ARG,
+ "schemas-style|s" => \$SCHEMAS_STYLE_ARG,
+ "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG,
+ "quoted-style" => \$QUOTED_STYLE_ARG,
+ "quotedxml-style" => \$QUOTEDXML_STYLE_ARG,
+ "pass-through|p" => \$PASS_THROUGH_ARG,
+ "utf8|u" => \$UTF8_ARG,
+ "multiple-output|m" => \$MULTIPLE_OUTPUT,
+ "cache|c=s" => \$cache_file
+ ) or &error;
+
+my $PO_DIR;
+my $FILE;
+my $OUTFILE;
+
+my %po_files_by_lang = ();
+my %translations = ();
+my $iconv = $ENV{"ICONV"} || "iconv";
+my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null');
+
+sub isProgramInPath
+{
+ my ($file) = @_;
+ # If either a file exists, or when run it returns 0 exit status
+ return 1 if ((-x $file) or (system("$file -l >$devnull") == 0));
+ return 0;
+}
+
+if (! isProgramInPath ("$iconv"))
+{
+ print STDERR " *** iconv is not found on this system!\n".
+ " *** Without it, intltool-merge can not convert encodings.\n";
+ exit;
+}
+
+# Use this instead of \w for XML files to handle more possible characters.
+my $w = "[-A-Za-z0-9._:]";
+
+# XML quoted string contents
+my $q = "[^\\\"]*";
+
+## Check for options.
+
+if ($VERSION_ARG)
+{
+ &print_version;
+}
+elsif ($HELP_ARG)
+{
+ &print_help;
+}
+elsif ($BA_STYLE_ARG && @ARGV > 2)
+{
+ &utf8_sanity_check;
+ &preparation;
+ &print_message;
+ &ba_merge_translations;
+ &finalize;
+}
+elsif ($XML_STYLE_ARG && @ARGV > 2)
+{
+ &utf8_sanity_check;
+ &preparation;
+ &print_message;
+ &xml_merge_output;
+ &finalize;
+}
+elsif ($KEYS_STYLE_ARG && @ARGV > 2)
+{
+ &utf8_sanity_check;
+ &preparation;
+ &print_message;
+ &keys_merge_translations;
+ &finalize;
+}
+elsif ($DESKTOP_STYLE_ARG && @ARGV > 2)
+{
+ &utf8_sanity_check;
+ &preparation;
+ &print_message;
+ &desktop_merge_translations;
+ &finalize;
+}
+elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2)
+{
+ &utf8_sanity_check;
+ &preparation;
+ &print_message;
+ &schemas_merge_translations;
+ &finalize;
+}
+elsif ($RFC822DEB_STYLE_ARG && @ARGV > 2)
+{
+ &preparation;
+ &print_message;
+ &rfc822deb_merge_translations;
+ &finalize;
+}
+elsif (($QUOTED_STYLE_ARG || $QUOTEDXML_STYLE_ARG) && @ARGV > 2)
+{
+ &utf8_sanity_check;
+ &preparation;
+ &print_message;
+ &quoted_merge_translations($QUOTEDXML_STYLE_ARG);
+ &finalize;
+}
+else
+{
+ &print_help;
+}
+
+exit;
+
+## Sub for printing release information
+sub print_version
+{
+ print <<_EOF_;
+${PROGRAM} (${PACKAGE}) ${VERSION}
+Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen.
+
+Copyright (C) 2000-2003 Free Software Foundation, Inc.
+Copyright (C) 2000-2001 Eazel, Inc.
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+_EOF_
+ exit;
+}
+
+## Sub for printing usage information
+sub print_help
+{
+ print <<_EOF_;
+Usage: ${PROGRAM} [OPTION]... PO_DIRECTORY FILENAME OUTPUT_FILE
+Generates an output file that includes some localized attributes from an
+untranslated source file.
+
+Mandatory options: (exactly one must be specified)
+ -b, --ba-style includes translations in the bonobo-activation style
+ -d, --desktop-style includes translations in the desktop style
+ -k, --keys-style includes translations in the keys style
+ -s, --schemas-style includes translations in the schemas style
+ -r, --rfc822deb-style includes translations in the RFC822 style
+ --quoted-style includes translations in the quoted string style
+ --quotedxml-style includes translations in the quoted xml string style
+ -x, --xml-style includes translations in the standard xml style
+
+Other options:
+ -u, --utf8 convert all strings to UTF-8 before merging
+ (default for everything except RFC822 style)
+ -p, --pass-through deprecated, does nothing and issues a warning
+ -m, --multiple-output output one localized file per locale, instead of
+ a single file containing all localized elements
+ -c, --cache=FILE specify cache file name
+ (usually \$top_builddir/po/.intltool-merge-cache)
+ -q, --quiet suppress most messages
+ --help display this help and exit
+ --version output version information and exit
+
+Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
+or send email to <xml-i18n-tools\@gnome.org>.
+_EOF_
+ exit;
+}
+
+
+## Sub for printing error messages
+sub print_error
+{
+ print STDERR "Try `${PROGRAM} --help' for more information.\n";
+ exit;
+}
+
+
+sub print_message
+{
+ print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG;
+}
+
+
+sub preparation
+{
+ $PO_DIR = $ARGV[0];
+ $FILE = $ARGV[1];
+ $OUTFILE = $ARGV[2];
+
+ &gather_po_files;
+ &get_translation_database;
+}
+
+# General-purpose code for looking up translations in .po files
+
+sub po_file2lang
+{
+ my ($tmp) = @_;
+ $tmp =~ s/^.*\/(.*)\.po$/$1/;
+ return $tmp;
+}
+
+sub gather_po_files
+{
+ if (my $linguas = $ENV{"LINGUAS"})
+ {
+ for my $lang (split / /, $linguas) {
+ my $po_file = $PO_DIR . "/" . $lang . ".po";
+ if (-e $po_file) {
+ $po_files_by_lang{$lang} = $po_file;
+ }
+ }
+ }
+ else
+ {
+ if (open LINGUAS_FILE, "$PO_DIR/LINGUAS")
+ {
+ while (<LINGUAS_FILE>)
+ {
+ next if /^#/;
+
+ for my $lang (split)
+ {
+ chomp ($lang);
+ my $po_file = $PO_DIR . "/" . $lang . ".po";
+ if (-e $po_file) {
+ $po_files_by_lang{$lang} = $po_file;
+ }
+ }
+ }
+
+ close LINGUAS_FILE;
+ }
+ else
+ {
+ for my $po_file (glob "$PO_DIR/*.po") {
+ $po_files_by_lang{po_file2lang($po_file)} = $po_file;
+ }
+ }
+ }
+}
+
+sub get_local_charset
+{
+ my ($encoding) = @_;
+ my $alias_file = $ENV{"G_CHARSET_ALIAS"} || "@INTLTOOL_LIBDIR@/charset.alias";
+
+ # seek character encoding aliases in charset.alias (glib)
+
+ if (open CHARSET_ALIAS, $alias_file)
+ {
+ while (<CHARSET_ALIAS>)
+ {
+ next if /^\#/;
+ return $1 if (/^\s*([-._a-zA-Z0-9]+)\s+$encoding\b/i)
+ }
+
+ close CHARSET_ALIAS;
+ }
+
+ # if not found, return input string
+
+ return $encoding;
+}
+
+sub get_po_encoding
+{
+ my ($in_po_file) = @_;
+ my $encoding = "";
+
+ open IN_PO_FILE, $in_po_file or die;
+ while (<IN_PO_FILE>)
+ {
+ ## example: "Content-Type: text/plain; charset=ISO-8859-1\n"
+ if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/)
+ {
+ $encoding = $1;
+ last;
+ }
+ }
+ close IN_PO_FILE;
+
+ if (!$encoding)
+ {
+ print STDERR "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n" unless $QUIET_ARG;
+ $encoding = "ISO-8859-1";
+ }
+
+ system ("$iconv -f $encoding -t UTF-8 <$devnull 2>$devnull");
+ if ($?) {
+ $encoding = get_local_charset($encoding);
+ }
+
+ return $encoding
+}
+
+sub utf8_sanity_check
+{
+ print STDERR "Warning: option --pass-through has been removed.\n" if $PASS_THROUGH_ARG;
+ $UTF8_ARG = 1;
+}
+
+sub get_translation_database
+{
+ if ($cache_file) {
+ &get_cached_translation_database;
+ } else {
+ &create_translation_database;
+ }
+}
+
+sub get_newest_po_age
+{
+ my $newest_age;
+
+ foreach my $file (values %po_files_by_lang)
+ {
+ my $file_age = -M $file;
+ $newest_age = $file_age if !$newest_age || $file_age < $newest_age;
+ }
+
+ $newest_age = 0 if !$newest_age;
+
+ return $newest_age;
+}
+
+sub create_cache
+{
+ print "Generating and caching the translation database\n" unless $QUIET_ARG;
+
+ &create_translation_database;
+
+ open CACHE, ">$cache_file" || die;
+ print CACHE join "\x01", %translations;
+ close CACHE;
+}
+
+sub load_cache
+{
+ print "Found cached translation database\n" unless $QUIET_ARG;
+
+ my $contents;
+ open CACHE, "<$cache_file" || die;
+ {
+ local $/;
+ $contents = <CACHE>;
+ }
+ close CACHE;
+ %translations = split "\x01", $contents;
+}
+
+sub get_cached_translation_database
+{
+ my $cache_file_age = -M $cache_file;
+ if (defined $cache_file_age)
+ {
+ if ($cache_file_age <= &get_newest_po_age)
+ {
+ &load_cache;
+ return;
+ }
+ print "Found too-old cached translation database\n" unless $QUIET_ARG;
+ }
+
+ &create_cache;
+}
+
+sub create_translation_database
+{
+ for my $lang (keys %po_files_by_lang)
+ {
+ my $po_file = $po_files_by_lang{$lang};
+
+ if ($UTF8_ARG)
+ {
+ my $encoding = get_po_encoding ($po_file);
+
+ if (lc $encoding eq "utf-8")
+ {
+ open PO_FILE, "<$po_file";
+ }
+ else
+ {
+ print "NOTICE: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;;
+
+ open PO_FILE, "$iconv -f $encoding -t UTF-8 $po_file|";
+ }
+ }
+ else
+ {
+ open PO_FILE, "<$po_file";
+ }
+
+ my $nextfuzzy = 0;
+ my $inmsgid = 0;
+ my $inmsgstr = 0;
+ my $msgid = "";
+ my $msgstr = "";
+
+ while (<PO_FILE>)
+ {
+ $nextfuzzy = 1 if /^#, fuzzy/;
+
+ if (/^msgid "((\\.|[^\\]+)*)"/ )
+ {
+ $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
+ $msgid = "";
+ $msgstr = "";
+
+ if ($nextfuzzy) {
+ $inmsgid = 0;
+ } else {
+ $msgid = unescape_po_string($1);
+ $inmsgid = 1;
+ }
+ $inmsgstr = 0;
+ $nextfuzzy = 0;
+ }
+
+ if (/^msgstr "((\\.|[^\\]+)*)"/)
+ {
+ $msgstr = unescape_po_string($1);
+ $inmsgstr = 1;
+ $inmsgid = 0;
+ }
+
+ if (/^"((\\.|[^\\]+)*)"/)
+ {
+ $msgid .= unescape_po_string($1) if $inmsgid;
+ $msgstr .= unescape_po_string($1) if $inmsgstr;
+ }
+ }
+ $translations{$lang, $msgid} = $msgstr if $inmsgstr && $msgid && $msgstr;
+ }
+}
+
+sub finalize
+{
+}
+
+sub unescape_one_sequence
+{
+ my ($sequence) = @_;
+
+ return "\\" if $sequence eq "\\\\";
+ return "\"" if $sequence eq "\\\"";
+ return "\n" if $sequence eq "\\n";
+ return "\r" if $sequence eq "\\r";
+ return "\t" if $sequence eq "\\t";
+ return "\b" if $sequence eq "\\b";
+ return "\f" if $sequence eq "\\f";
+ return "\a" if $sequence eq "\\a";
+ return chr(11) if $sequence eq "\\v"; # vertical tab, see ascii(7)
+
+ return chr(hex($1)) if ($sequence =~ /\\x([0-9a-fA-F]{2})/);
+ return chr(oct($1)) if ($sequence =~ /\\([0-7]{3})/);
+
+ # FIXME: Is \0 supported as well? Kenneth and Rodney don't want it, see bug #48489
+
+ return $sequence;
+}
+
+sub unescape_po_string
+{
+ my ($string) = @_;
+
+ $string =~ s/(\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\.)/unescape_one_sequence($1)/eg;
+
+ return $string;
+}
+
+sub entity_decode
+{
+ local ($_) = @_;
+
+ s/&apos;/'/g; # '
+ s/&quot;/"/g; # "
+ s/&lt;/</g;
+ s/&gt;/>/g;
+ s/&amp;/&/g;
+
+ return $_;
+}
+
+# entity_encode: (string)
+#
+# Encode the given string to XML format (encode '<' etc).
+
+sub entity_encode
+{
+ my ($pre_encoded) = @_;
+
+ my @list_of_chars = unpack ('C*', $pre_encoded);
+
+ # with UTF-8 we only encode minimalistic
+ return join ('', map (&entity_encode_int_minimalist, @list_of_chars));
+}
+
+sub entity_encode_int_minimalist
+{
+ return "&quot;" if $_ == 34;
+ return "&amp;" if $_ == 38;
+ return "&apos;" if $_ == 39;
+ return "&lt;" if $_ == 60;
+ return "&gt;" if $_ == 62;
+ return chr $_;
+}
+
+sub entity_encoded_translation
+{
+ my ($lang, $string) = @_;
+
+ my $translation = $translations{$lang, $string};
+ return $string if !$translation;
+ return entity_encode ($translation);
+}
+
+## XML (bonobo-activation specific) merge code
+
+sub ba_merge_translations
+{
+ my $source;
+
+ {
+ local $/; # slurp mode
+ open INPUT, "<$FILE" or die "can't open $FILE: $!";
+ $source = <INPUT>;
+ close INPUT;
+ }
+
+ open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!";
+ # Binmode so that selftest works ok if using a native Win32 Perl...
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+
+ while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s)
+ {
+ print OUTPUT $1;
+
+ my $node = $2 . "\n";
+
+ my @strings = ();
+ $_ = $node;
+ while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) {
+ push @strings, entity_decode($3);
+ }
+ print OUTPUT;
+
+ my %langs;
+ for my $string (@strings)
+ {
+ for my $lang (keys %po_files_by_lang)
+ {
+ $langs{$lang} = 1 if $translations{$lang, $string};
+ }
+ }
+
+ for my $lang (sort keys %langs)
+ {
+ $_ = $node;
+ s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s;
+ s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg;
+ print OUTPUT;
+ }
+ }
+
+ print OUTPUT $source;
+
+ close OUTPUT;
+}
+
+
+## XML (non-bonobo-activation) merge code
+
+
+# Process tag attributes
+# Only parameter is a HASH containing attributes -> values mapping
+sub getAttributeString
+{
+ my $sub = shift;
+ my $do_translate = shift || 0;
+ my $language = shift || "";
+ my $result = "";
+ my $translate = shift;
+ foreach my $e (reverse(sort(keys %{ $sub }))) {
+ my $key = $e;
+ my $string = $sub->{$e};
+ my $quote = '"';
+
+ $string =~ s/^[\s]+//;
+ $string =~ s/[\s]+$//;
+
+ if ($string =~ /^'.*'$/)
+ {
+ $quote = "'";
+ }
+ $string =~ s/^['"]//g;
+ $string =~ s/['"]$//g;
+
+ if ($do_translate && $key =~ /^_/) {
+ $key =~ s|^_||g;
+ if ($language) {
+ # Handle translation
+ my $decode_string = entity_decode($string);
+ my $translation = $translations{$language, $decode_string};
+ if ($translation) {
+ $translation = entity_encode($translation);
+ $string = $translation;
+ }
+ $$translate = 2;
+ } else {
+ $$translate = 2 if ($translate && (!$$translate)); # watch not to "overwrite" $translate
+ }
+ }
+
+ $result .= " $key=$quote$string$quote";
+ }
+ return $result;
+}
+
+# Returns a translatable string from XML node, it works on contents of every node in XML::Parser tree
+sub getXMLstring
+{
+ my $ref = shift;
+ my $spacepreserve = shift || 0;
+ my @list = @{ $ref };
+ my $result = "";
+
+ my $count = scalar(@list);
+ my $attrs = $list[0];
+ my $index = 1;
+
+ $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
+ $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
+
+ while ($index < $count) {
+ my $type = $list[$index];
+ my $content = $list[$index+1];
+ if (! $type ) {
+ # We've got CDATA
+ if ($content) {
+ # lets strip the whitespace here, and *ONLY* here
+ $content =~ s/\s+/ /gs if (!$spacepreserve);
+ $result .= $content;
+ }
+ } elsif ( "$type" ne "1" ) {
+ # We've got another element
+ $result .= "<$type";
+ $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements
+ if ($content) {
+ my $subresult = getXMLstring($content, $spacepreserve);
+ if ($subresult) {
+ $result .= ">".$subresult . "</$type>";
+ } else {
+ $result .= "/>";
+ }
+ } else {
+ $result .= "/>";
+ }
+ }
+ $index += 2;
+ }
+ return $result;
+}
+
+# Translate list of nodes if necessary
+sub translate_subnodes
+{
+ my $fh = shift;
+ my $content = shift;
+ my $language = shift || "";
+ my $singlelang = shift || 0;
+ my $spacepreserve = shift || 0;
+
+ my @nodes = @{ $content };
+
+ my $count = scalar(@nodes);
+ my $index = 0;
+ while ($index < $count) {
+ my $type = $nodes[$index];
+ my $rest = $nodes[$index+1];
+ if ($singlelang) {
+ my $oldMO = $MULTIPLE_OUTPUT;
+ $MULTIPLE_OUTPUT = 1;
+ traverse($fh, $type, $rest, $language, $spacepreserve);
+ $MULTIPLE_OUTPUT = $oldMO;
+ } else {
+ traverse($fh, $type, $rest, $language, $spacepreserve);
+ }
+ $index += 2;
+ }
+}
+
+sub isWellFormedXmlFragment
+{
+ my $ret = eval 'require XML::Parser';
+ if(!$ret) {
+ die "You must have XML::Parser installed to run $0\n\n";
+ }
+
+ my $fragment = shift;
+ return 0 if (!$fragment);
+
+ $fragment = "<root>$fragment</root>";
+ my $xp = new XML::Parser(Style => 'Tree');
+ my $tree = 0;
+ eval { $tree = $xp->parse($fragment); };
+ return $tree;
+}
+
+sub traverse
+{
+ my $fh = shift;
+ my $nodename = shift;
+ my $content = shift;
+ my $language = shift || "";
+ my $spacepreserve = shift || 0;
+
+ if (!$nodename) {
+ if ($content =~ /^[\s]*$/) {
+ $leading_space .= $content;
+ }
+ print $fh $content;
+ } else {
+ # element
+ my @all = @{ $content };
+ my $attrs = shift @all;
+ my $translate = 0;
+ my $outattr = getAttributeString($attrs, 1, $language, \$translate);
+
+ if ($nodename =~ /^_/) {
+ $translate = 1;
+ $nodename =~ s/^_//;
+ }
+ my $lookup = '';
+
+ $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/));
+ $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
+
+ print $fh "<$nodename", $outattr;
+ if ($translate) {
+ $lookup = getXMLstring($content, $spacepreserve);
+ if (!$spacepreserve) {
+ $lookup =~ s/^\s+//s;
+ $lookup =~ s/\s+$//s;
+ }
+
+ if ($lookup || $translate == 2) {
+ my $translation = $translations{$language, $lookup} if isWellFormedXmlFragment($translations{$language, $lookup});
+ if ($MULTIPLE_OUTPUT && ($translation || $translate == 2)) {
+ $translation = $lookup if (!$translation);
+ print $fh " xml:lang=\"", $language, "\"" if $language;
+ print $fh ">";
+ if ($translate == 2) {
+ translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
+ } else {
+ print $fh $translation;
+ }
+ print $fh "</$nodename>";
+
+ return; # this means there will be no same translation with xml:lang="$language"...
+ # if we want them both, just remove this "return"
+ } else {
+ print $fh ">";
+ if ($translate == 2) {
+ translate_subnodes($fh, \@all, $language, 1, $spacepreserve);
+ } else {
+ print $fh $lookup;
+ }
+ print $fh "</$nodename>";
+ }
+ } else {
+ print $fh "/>";
+ }
+
+ for my $lang (sort keys %po_files_by_lang) {
+ if ($MULTIPLE_OUTPUT && $lang ne "$language") {
+ next;
+ }
+ if ($lang) {
+ # Handle translation
+ #
+ my $translate = 0;
+ my $localattrs = getAttributeString($attrs, 1, $lang, \$translate);
+ my $translation = $translations{$lang, $lookup} if isWellFormedXmlFragment($translations{$lang, $lookup});
+ if ($translate && !$translation) {
+ $translation = $lookup;
+ }
+
+ if ($translation || $translate) {
+ print $fh "\n";
+ $leading_space =~ s/.*\n//g;
+ print $fh $leading_space;
+ print $fh "<", $nodename, " xml:lang=\"", $lang, "\"", $localattrs, ">";
+ if ($translate == 2) {
+ translate_subnodes($fh, \@all, $lang, 1, $spacepreserve);
+ } else {
+ print $fh $translation;
+ }
+ print $fh "</$nodename>";
+ }
+ }
+ }
+
+ } else {
+ my $count = scalar(@all);
+ if ($count > 0) {
+ print $fh ">";
+ my $index = 0;
+ while ($index < $count) {
+ my $type = $all[$index];
+ my $rest = $all[$index+1];
+ traverse($fh, $type, $rest, $language, $spacepreserve);
+ $index += 2;
+ }
+ print $fh "</$nodename>";
+ } else {
+ print $fh "/>";
+ }
+ }
+ }
+}
+
+sub intltool_tree_comment
+{
+ my $expat = shift;
+ my $data = shift;
+ my $clist = $expat->{Curlist};
+ my $pos = $#$clist;
+
+ push @$clist, 1 => $data;
+}
+
+sub intltool_tree_cdatastart
+{
+ my $expat = shift;
+ my $clist = $expat->{Curlist};
+ my $pos = $#$clist;
+
+ push @$clist, 0 => $expat->original_string();
+}
+
+sub intltool_tree_cdataend
+{
+ my $expat = shift;
+ my $clist = $expat->{Curlist};
+ my $pos = $#$clist;
+
+ $clist->[$pos] .= $expat->original_string();
+}
+
+sub intltool_tree_char
+{
+ my $expat = shift;
+ my $text = shift;
+ my $clist = $expat->{Curlist};
+ my $pos = $#$clist;
+
+ # Use original_string so that we retain escaped entities
+ # in CDATA sections.
+ #
+ if ($pos > 0 and $clist->[$pos - 1] eq '0') {
+ $clist->[$pos] .= $expat->original_string();
+ } else {
+ push @$clist, 0 => $expat->original_string();
+ }
+}
+
+sub intltool_tree_start
+{
+ my $expat = shift;
+ my $tag = shift;
+ my @origlist = ();
+
+ # Use original_string so that we retain escaped entities
+ # in attribute values. We must convert the string to an
+ # @origlist array to conform to the structure of the Tree
+ # Style.
+ #
+ my @original_array = split /\x/, $expat->original_string();
+ my $source = $expat->original_string();
+
+ # Remove leading tag.
+ #
+ $source =~ s|^\s*<\s*(\S+)||s;
+
+ # Grab attribute key/value pairs and push onto @origlist array.
+ #
+ while ($source)
+ {
+ if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/)
+ {
+ $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s;
+ push @origlist, $1;
+ push @origlist, '"' . $2 . '"';
+ }
+ elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/)
+ {
+ $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s;
+ push @origlist, $1;
+ push @origlist, "'" . $2 . "'";
+ }
+ else
+ {
+ last;
+ }
+ }
+
+ my $ol = [ { @origlist } ];
+
+ push @{ $expat->{Lists} }, $expat->{Curlist};
+ push @{ $expat->{Curlist} }, $tag => $ol;
+ $expat->{Curlist} = $ol;
+}
+
+sub readXml
+{
+ my $filename = shift || return;
+ if(!-f $filename) {
+ die "ERROR Cannot find filename: $filename\n";
+ }
+
+ my $ret = eval 'require XML::Parser';
+ if(!$ret) {
+ die "You must have XML::Parser installed to run $0\n\n";
+ }
+ my $xp = new XML::Parser(Style => 'Tree');
+ $xp->setHandlers(Char => \&intltool_tree_char);
+ $xp->setHandlers(Start => \&intltool_tree_start);
+ $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart);
+ $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend);
+ my $tree = $xp->parsefile($filename);
+
+# <foo><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
+# would be:
+# [foo, [{}, head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, [{},
+# 0, "Howdy", ref, [{}]], 0, "do" ] ]
+
+ return $tree;
+}
+
+sub print_header
+{
+ my $infile = shift;
+ my $fh = shift;
+ my $source;
+
+ if(!-f $infile) {
+ die "ERROR Cannot find filename: $infile\n";
+ }
+
+ print $fh qq{<?xml version="1.0" encoding="UTF-8"?>\n};
+ {
+ local $/;
+ open DOCINPUT, "<${FILE}" or die;
+ $source = <DOCINPUT>;
+ close DOCINPUT;
+ }
+ if ($source =~ /(<!DOCTYPE.*\[.*\]\s*>)/s)
+ {
+ print $fh "$1\n";
+ }
+ elsif ($source =~ /(<!DOCTYPE[^>]*>)/s)
+ {
+ print $fh "$1\n";
+ }
+}
+
+sub parseTree
+{
+ my $fh = shift;
+ my $ref = shift;
+ my $language = shift || "";
+
+ my $name = shift @{ $ref };
+ my $cont = shift @{ $ref };
+
+ while (!$name || "$name" eq "1") {
+ $name = shift @{ $ref };
+ $cont = shift @{ $ref };
+ }
+
+ my $spacepreserve = 0;
+ my $attrs = @{$cont}[0];
+ $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/));
+
+ traverse($fh, $name, $cont, $language, $spacepreserve);
+}
+
+sub xml_merge_output
+{
+ my $source;
+
+ if ($MULTIPLE_OUTPUT) {
+ for my $lang (sort keys %po_files_by_lang) {
+ if ( ! -d $lang ) {
+ mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n";
+ }
+ open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n";
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+ my $tree = readXml($FILE);
+ print_header($FILE, \*OUTPUT);
+ parseTree(\*OUTPUT, $tree, $lang);
+ close OUTPUT;
+ print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG;
+ }
+ if ( ! -d "C" ) {
+ mkdir "C" or -d "C" or die "Cannot create subdirectory C: $!\n";
+ }
+ open OUTPUT, ">C/$OUTFILE" or die "Cannot open C/$OUTFILE: $!\n";
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+ my $tree = readXml($FILE);
+ print_header($FILE, \*OUTPUT);
+ parseTree(\*OUTPUT, $tree);
+ close OUTPUT;
+ print "CREATED C/$OUTFILE\n" unless $QUIET_ARG;
+ } else {
+ open OUTPUT, ">$OUTFILE" or die "Cannot open $OUTFILE: $!\n";
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+ my $tree = readXml($FILE);
+ print_header($FILE, \*OUTPUT);
+ parseTree(\*OUTPUT, $tree);
+ close OUTPUT;
+ print "CREATED $OUTFILE\n" unless $QUIET_ARG;
+ }
+}
+
+sub keys_merge_translation
+{
+ my ($lang) = @_;
+
+ if ( ! -d $lang && $MULTIPLE_OUTPUT)
+ {
+ mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n";
+ }
+
+ open INPUT, "<${FILE}" or die "Cannot open ${FILE}: $!\n";
+ open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n";
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+
+ while (<INPUT>)
+ {
+ if (s/^(\s*)_(\w+=(.*))/$1$2/)
+ {
+ my $string = $3;
+
+ if (!$MULTIPLE_OUTPUT)
+ {
+ print OUTPUT;
+
+ my $non_translated_line = $_;
+
+ for my $lang (sort keys %po_files_by_lang)
+ {
+ my $translation = $translations{$lang, $string};
+ next if !$translation;
+
+ $_ = $non_translated_line;
+ s/(\w+)=.*/[$lang]$1=$translation/;
+ print OUTPUT;
+ }
+ }
+ else
+ {
+ my $non_translated_line = $_;
+ my $translation = $translations{$lang, $string};
+ $translation = $string if !$translation;
+
+ $_ = $non_translated_line;
+ s/(\w+)=.*/$1=$translation/;
+ print OUTPUT;
+ }
+ }
+ else
+ {
+ print OUTPUT;
+ }
+ }
+
+ close OUTPUT;
+ close INPUT;
+
+ print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG;
+}
+
+sub keys_merge_translations
+{
+ if ($MULTIPLE_OUTPUT)
+ {
+ for my $lang (sort keys %po_files_by_lang)
+ {
+ keys_merge_translation ($lang);
+ }
+ keys_merge_translation ("C");
+ }
+ else
+ {
+ keys_merge_translation (".");
+ }
+}
+
+sub desktop_merge_translations
+{
+ open INPUT, "<${FILE}" or die;
+ open OUTPUT, ">${OUTFILE}" or die;
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+
+ while (<INPUT>)
+ {
+ if (s/^(\s*)_(\w+=(.*))/$1$2/)
+ {
+ my $string = $3;
+
+ print OUTPUT;
+
+ my $non_translated_line = $_;
+
+ for my $lang (sort keys %po_files_by_lang)
+ {
+ my $translation = $translations{$lang, $string};
+ next if !$translation;
+
+ $_ = $non_translated_line;
+ s/(\w+)=.*/${1}[$lang]=$translation/;
+ print OUTPUT;
+ }
+ }
+ else
+ {
+ print OUTPUT;
+ }
+ }
+
+ close OUTPUT;
+ close INPUT;
+}
+
+sub schemas_merge_translations
+{
+ my $source;
+
+ {
+ local $/; # slurp mode
+ open INPUT, "<$FILE" or die "can't open $FILE: $!";
+ $source = <INPUT>;
+ close INPUT;
+ }
+
+ open OUTPUT, ">$OUTFILE" or die;
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+
+ # FIXME: support attribute translations
+
+ # Empty nodes never need translation, so unmark all of them.
+ # For example, <_foo/> is just replaced by <foo/>.
+ $source =~ s|<\s*_($w+)\s*/>|<$1/>|g;
+
+ while ($source =~ s/
+ (.*?)
+ (\s+)(<locale\ name="C">(\s*)
+ (<default>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/default>)?(\s*)
+ (<short>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/short>)?(\s*)
+ (<long>\s*(?:<!--[^>]*?-->\s*)?(.*?)\s*<\/long>)?(\s*)
+ <\/locale>)
+ //sx)
+ {
+ print OUTPUT $1;
+
+ my $locale_start_spaces = $2 ? $2 : '';
+ my $default_spaces = $4 ? $4 : '';
+ my $short_spaces = $7 ? $7 : '';
+ my $long_spaces = $10 ? $10 : '';
+ my $locale_end_spaces = $13 ? $13 : '';
+ my $c_default_block = $3 ? $3 : '';
+ my $default_string = $6 ? $6 : '';
+ my $short_string = $9 ? $9 : '';
+ my $long_string = $12 ? $12 : '';
+
+ print OUTPUT "$locale_start_spaces$c_default_block";
+
+ $default_string =~ s/\s+/ /g;
+ $default_string = entity_decode($default_string);
+ $short_string =~ s/\s+/ /g;
+ $short_string = entity_decode($short_string);
+ $long_string =~ s/\s+/ /g;
+ $long_string = entity_decode($long_string);
+
+ for my $lang (sort keys %po_files_by_lang)
+ {
+ my $default_translation = $translations{$lang, $default_string};
+ my $short_translation = $translations{$lang, $short_string};
+ my $long_translation = $translations{$lang, $long_string};
+
+ next if (!$default_translation && !$short_translation &&
+ !$long_translation);
+
+ print OUTPUT "\n$locale_start_spaces<locale name=\"$lang\">";
+
+ print OUTPUT "$default_spaces";
+
+ if ($default_translation)
+ {
+ $default_translation = entity_encode($default_translation);
+ print OUTPUT "<default>$default_translation</default>";
+ }
+
+ print OUTPUT "$short_spaces";
+
+ if ($short_translation)
+ {
+ $short_translation = entity_encode($short_translation);
+ print OUTPUT "<short>$short_translation</short>";
+ }
+
+ print OUTPUT "$long_spaces";
+
+ if ($long_translation)
+ {
+ $long_translation = entity_encode($long_translation);
+ print OUTPUT "<long>$long_translation</long>";
+ }
+
+ print OUTPUT "$locale_end_spaces</locale>";
+ }
+ }
+
+ print OUTPUT $source;
+
+ close OUTPUT;
+}
+
+sub rfc822deb_merge_translations
+{
+ my %encodings = ();
+ for my $lang (keys %po_files_by_lang) {
+ $encodings{$lang} = ($UTF8_ARG ? 'UTF-8' : get_po_encoding($po_files_by_lang{$lang}));
+ }
+
+ my $source;
+
+ $Text::Wrap::huge = 'overflow';
+ $Text::Wrap::break = qr/\n|\s(?=\S)/;
+
+ {
+ local $/; # slurp mode
+ open INPUT, "<$FILE" or die "can't open $FILE: $!";
+ $source = <INPUT>;
+ close INPUT;
+ }
+
+ open OUTPUT, ">${OUTFILE}" or die;
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+
+ while ($source =~ /(^|\n+)(_*)([^:\s]+)(:[ \t]*)(.*?)(?=\n[\S\n]|$)/sg)
+ {
+ my $sep = $1;
+ my $non_translated_line = $3.$4;
+ my $string = $5;
+ my $underscore = length($2);
+ next if $underscore eq 0 && $non_translated_line =~ /^#/;
+ # Remove [] dummy strings
+ my $stripped = $string;
+ $stripped =~ s/\[\s[^\[\]]*\],/,/g if $underscore eq 2;
+ $stripped =~ s/\[\s[^\[\]]*\]$//;
+ $non_translated_line .= $stripped;
+
+ print OUTPUT $sep.$non_translated_line;
+
+ if ($underscore)
+ {
+ my @str_list = rfc822deb_split($underscore, $string);
+
+ for my $lang (sort keys %po_files_by_lang)
+ {
+ my $is_translated = 1;
+ my $str_translated = '';
+ my $first = 1;
+
+ for my $str (@str_list)
+ {
+ my $translation = $translations{$lang, $str};
+
+ if (!$translation)
+ {
+ $is_translated = 0;
+ last;
+ }
+
+ # $translation may also contain [] dummy
+ # strings, mostly to indicate an empty string
+ $translation =~ s/\[\s[^\[\]]*\]$//;
+
+ if ($first)
+ {
+ if ($underscore eq 2)
+ {
+ $str_translated .= $translation;
+ }
+ else
+ {
+ $str_translated .=
+ Text::Tabs::expand($translation) .
+ "\n";
+ }
+ }
+ else
+ {
+ if ($underscore eq 2)
+ {
+ $str_translated .= ', ' . $translation;
+ }
+ else
+ {
+ $str_translated .= Text::Tabs::expand(
+ Text::Wrap::wrap(' ', ' ', $translation)) .
+ "\n .\n";
+ }
+ }
+ $first = 0;
+
+ # To fix some problems with Text::Wrap::wrap
+ $str_translated =~ s/(\n )+\n/\n .\n/g;
+ }
+ next unless $is_translated;
+
+ $str_translated =~ s/\n \.\n$//;
+ $str_translated =~ s/\s+$//;
+
+ $_ = $non_translated_line;
+ s/^(\w+):\s*.*/$sep${1}-$lang.$encodings{$lang}: $str_translated/s;
+ print OUTPUT;
+ }
+ }
+ }
+ print OUTPUT "\n";
+
+ close OUTPUT;
+ close INPUT;
+}
+
+sub rfc822deb_split
+{
+ # Debian defines a special way to deal with rfc822-style files:
+ # when a value contain newlines, it consists of
+ # 1. a short form (first line)
+ # 2. a long description, all lines begin with a space,
+ # and paragraphs are separated by a single dot on a line
+ # This routine returns an array of all paragraphs, and reformat
+ # them.
+ # When first argument is 2, the string is a comma separated list of
+ # values.
+ my $type = shift;
+ my $text = shift;
+ $text =~ s/^[ \t]//mg;
+ return (split(/, */, $text, 0)) if $type ne 1;
+ return ($text) if $text !~ /\n/;
+
+ $text =~ s/([^\n]*)\n//;
+ my @list = ($1);
+ my $str = '';
+
+ for my $line (split (/\n/, $text))
+ {
+ chomp $line;
+ if ($line =~ /^\.\s*$/)
+ {
+ # New paragraph
+ $str =~ s/\s*$//;
+ push(@list, $str);
+ $str = '';
+ }
+ elsif ($line =~ /^\s/)
+ {
+ # Line which must not be reformatted
+ $str .= "\n" if length ($str) && $str !~ /\n$/;
+ $line =~ s/\s+$//;
+ $str .= $line."\n";
+ }
+ else
+ {
+ # Continuation line, remove newline
+ $str .= " " if length ($str) && $str !~ /\n$/;
+ $str .= $line;
+ }
+ }
+
+ $str =~ s/\s*$//;
+ push(@list, $str) if length ($str);
+
+ return @list;
+}
+
+sub quoted_translation
+{
+ my ($xml_mode, $lang, $string) = @_;
+
+ $string = entity_decode($string) if $xml_mode;
+ $string =~ s/\\\"/\"/g;
+
+ my $translation = $translations{$lang, $string};
+ $translation = $string if !$translation;
+ $translation = entity_encode($translation) if $xml_mode;
+ $translation =~ s/\"/\\\"/g;
+ return $translation
+}
+
+sub quoted_merge_translations
+{
+ my ($xml_mode) = @_;
+
+ if (!$MULTIPLE_OUTPUT) {
+ print "Quoted only supports Multiple Output.\n";
+ exit(1);
+ }
+
+ for my $lang (sort keys %po_files_by_lang) {
+ if ( ! -d $lang ) {
+ mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n";
+ }
+ open INPUT, "<${FILE}" or die;
+ open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n";
+ binmode (OUTPUT) if $^O eq 'MSWin32';
+ while (<INPUT>)
+ {
+ s/\"(([^\"]|\\\")*[^\\\"])\"/"\"" . &quoted_translation($xml_mode, $lang, $1) . "\""/ge;
+ print OUTPUT;
+ }
+ close OUTPUT;
+ close INPUT;
+ }
+}
diff --git a/intltool-update.in b/intltool-update.in
new file mode 100644
index 0000000..2684cc0
--- /dev/null
+++ b/intltool-update.in
@@ -0,0 +1,1166 @@
+#!@INTLTOOL_PERL@ -w
+# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+
+#
+# The Intltool Message Updater
+#
+# Copyright (C) 2000-2003 Free Software Foundation.
+#
+# Intltool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# version 2 published by the Free Software Foundation.
+#
+# Intltool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+#
+# Authors: Kenneth Christiansen <kenneth@gnu.org>
+# Maciej Stachowiak
+# Darin Adler <darin@bentspoon.com>
+
+## Release information
+my $PROGRAM = "intltool-update";
+my $VERSION = "0.37.1";
+my $PACKAGE = "intltool";
+
+## Loaded modules
+use strict;
+use Getopt::Long;
+use Cwd;
+use File::Copy;
+use File::Find;
+
+## Scalars used by the option stuff
+my $HELP_ARG = 0;
+my $VERSION_ARG = 0;
+my $DIST_ARG = 0;
+my $POT_ARG = 0;
+my $HEADERS_ARG = 0;
+my $MAINTAIN_ARG = 0;
+my $REPORT_ARG = 0;
+my $VERBOSE = 0;
+my $GETTEXT_PACKAGE = "";
+my $OUTPUT_FILE = "";
+
+my @languages;
+my %varhash = ();
+my %po_files_by_lang = ();
+
+# Regular expressions to categorize file types.
+# FIXME: Please check if the following is correct
+
+my $xml_support =
+"xml(?:\\.in)*|". # http://www.w3.org/XML/ (Note: .in is not required)
+"ui|". # Bonobo specific - User Interface desc. files
+"lang|". # ?
+"glade2?(?:\\.in)*|". # Glade specific - User Interface desc. files (Note: .in is not required)
+"scm(?:\\.in)*|". # ? (Note: .in is not required)
+"oaf(?:\\.in)+|". # DEPRECATED: Replaces by Bonobo .server files
+"etspec|". # ?
+"server(?:\\.in)+|". # Bonobo specific
+"sheet(?:\\.in)+|". # ?
+"schemas(?:\\.in)+|". # GConf specific
+"pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer.
+"kbd(?:\\.in)+|". # GOK specific.
+"policy(?:\\.in)+"; # PolicyKit files
+
+my $ini_support =
+"icon(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec
+"desktop(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec
+"caves(?:\\.in)+|". # GNOME Games specific
+"directory(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec
+"soundlist(?:\\.in)+|". # GNOME specific
+"keys(?:\\.in)+|". # GNOME Mime database specific
+"theme(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec
+"service(?:\\.in)+"; # DBus specific
+
+my $buildin_gettext_support =
+"c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py";
+
+## Always flush buffer when printing
+$| = 1;
+
+## Sometimes the source tree will be rooted somewhere else.
+my $SRCDIR = $ENV{"srcdir"} || ".";
+my $POTFILES_in;
+
+$POTFILES_in = "<$SRCDIR/POTFILES.in";
+
+my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null');
+
+## Handle options
+GetOptions
+(
+ "help" => \$HELP_ARG,
+ "version" => \$VERSION_ARG,
+ "dist|d" => \$DIST_ARG,
+ "pot|p" => \$POT_ARG,
+ "headers|s" => \$HEADERS_ARG,
+ "maintain|m" => \$MAINTAIN_ARG,
+ "report|r" => \$REPORT_ARG,
+ "verbose|x" => \$VERBOSE,
+ "gettext-package|g=s" => \$GETTEXT_PACKAGE,
+ "output-file|o=s" => \$OUTPUT_FILE,
+ ) or &Console_WriteError_InvalidOption;
+
+&Console_Write_IntltoolHelp if $HELP_ARG;
+&Console_Write_IntltoolVersion if $VERSION_ARG;
+
+my $arg_count = ($DIST_ARG > 0)
+ + ($POT_ARG > 0)
+ + ($HEADERS_ARG > 0)
+ + ($MAINTAIN_ARG > 0)
+ + ($REPORT_ARG > 0);
+
+&Console_Write_IntltoolHelp if $arg_count > 1;
+
+my $PKGNAME = FindPackageName ();
+
+# --version and --help don't require a module name
+my $MODULE = $GETTEXT_PACKAGE || $PKGNAME || "unknown";
+
+if ($POT_ARG)
+{
+ &GenerateHeaders;
+ &GeneratePOTemplate;
+}
+elsif ($HEADERS_ARG)
+{
+ &GenerateHeaders;
+}
+elsif ($MAINTAIN_ARG)
+{
+ &FindLeftoutFiles;
+}
+elsif ($REPORT_ARG)
+{
+ &GenerateHeaders;
+ &GeneratePOTemplate;
+ &Console_Write_CoverageReport;
+}
+elsif ((defined $ARGV[0]) && $ARGV[0] =~ /^[a-z]/)
+{
+ my $lang = $ARGV[0];
+
+ ## Report error if the language file supplied
+ ## to the command line is non-existent
+ &Console_WriteError_NotExisting("$SRCDIR/$lang.po")
+ if ! -s "$SRCDIR/$lang.po";
+
+ if (!$DIST_ARG)
+ {
+ print "Working, please wait..." if $VERBOSE;
+ &GenerateHeaders;
+ &GeneratePOTemplate;
+ }
+ &POFile_Update ($lang, $OUTPUT_FILE);
+ &Console_Write_TranslationStatus ($lang, $OUTPUT_FILE);
+}
+else
+{
+ &Console_Write_IntltoolHelp;
+}
+
+exit;
+
+#########
+
+sub Console_Write_IntltoolVersion
+{
+ print <<_EOF_;
+${PROGRAM} (${PACKAGE}) $VERSION
+Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler.
+
+Copyright (C) 2000-2003 Free Software Foundation, Inc.
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+_EOF_
+ exit;
+}
+
+sub Console_Write_IntltoolHelp
+{
+ print <<_EOF_;
+Usage: ${PROGRAM} [OPTION]... LANGCODE
+Updates PO template files and merge them with the translations.
+
+Mode of operation (only one is allowed):
+ -p, --pot generate the PO template only
+ -s, --headers generate the header files in POTFILES.in
+ -m, --maintain search for left out files from POTFILES.in
+ -r, --report display a status report for the module
+ -d, --dist merge LANGCODE.po with existing PO template
+
+Extra options:
+ -g, --gettext-package=NAME override PO template name, useful with --pot
+ -o, --output-file=FILE write merged translation to FILE
+ -x, --verbose display lots of feedback
+ --help display this help and exit
+ --version output version information and exit
+
+Examples of use:
+${PROGRAM} --pot just create a new PO template
+${PROGRAM} xy create new PO template and merge xy.po with it
+
+Report bugs to http://bugzilla.gnome.org/ (product name "$PACKAGE")
+or send email to <xml-i18n-tools\@gnome.org>.
+_EOF_
+ exit;
+}
+
+sub echo_n
+{
+ my $str = shift;
+ my $ret = `echo "$str"`;
+
+ $ret =~ s/\n$//; # do we need the "s" flag?
+
+ return $ret;
+}
+
+sub POFile_DetermineType ($)
+{
+ my $type = $_;
+ my $gettext_type;
+
+ my $xml_regex = "(?:" . $xml_support . ")";
+ my $ini_regex = "(?:" . $ini_support . ")";
+ my $buildin_regex = "(?:" . $buildin_gettext_support . ")";
+
+ if ($type =~ /\[type: gettext\/([^\]].*)]/)
+ {
+ $gettext_type=$1;
+ }
+ elsif ($type =~ /schemas(\.in)+$/)
+ {
+ $gettext_type="schemas";
+ }
+ elsif ($type =~ /glade2?(\.in)*$/)
+ {
+ $gettext_type="glade";
+ }
+ elsif ($type =~ /scm(\.in)*$/)
+ {
+ $gettext_type="scheme";
+ }
+ elsif ($type =~ /keys(\.in)+$/)
+ {
+ $gettext_type="keys";
+ }
+
+ # bucket types
+
+ elsif ($type =~ /$xml_regex$/)
+ {
+ $gettext_type="xml";
+ }
+ elsif ($type =~ /$ini_regex$/)
+ {
+ $gettext_type="ini";
+ }
+ elsif ($type =~ /$buildin_regex$/)
+ {
+ $gettext_type="buildin";
+ }
+ else
+ {
+ $gettext_type="unknown";
+ }
+
+ return "gettext\/$gettext_type";
+}
+
+sub TextFile_DetermineEncoding ($)
+{
+ my $gettext_code="ASCII"; # All files are ASCII by default
+ my $filetype=`file $_ | cut -d ' ' -f 2`;
+
+ if ($? eq "0")
+ {
+ if ($filetype =~ /^(ISO|UTF)/)
+ {
+ chomp ($gettext_code = $filetype);
+ }
+ elsif ($filetype =~ /^XML/)
+ {
+ $gettext_code="UTF-8"; # We asume that .glade and other .xml files are UTF-8
+ }
+ }
+
+ return $gettext_code;
+}
+
+sub isNotValidMissing
+{
+ my ($file) = @_;
+
+ return if $file =~ /^\{arch\}\/.*$/;
+ return if $file =~ /^$varhash{"PACKAGE"}-$varhash{"VERSION"}\/.*$/;
+}
+
+sub FindLeftoutFiles
+{
+ my (@buf_i18n_plain,
+ @buf_i18n_xml,
+ @buf_i18n_xml_unmarked,
+ @buf_i18n_ini,
+ @buf_potfiles,
+ @buf_potfiles_ignore,
+ @buf_allfiles,
+ @buf_allfiles_sorted,
+ @buf_potfiles_sorted,
+ @buf_potfiles_ignore_sorted
+ );
+
+ ## Search and find all translatable files
+ find sub {
+ push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/;
+ push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/;
+ push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/;
+ push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/;
+ }, "..";
+ find sub {
+ push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/;
+ push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/;
+ push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/;
+ push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/;
+ }, "$SRCDIR/.." if "$SRCDIR" ne ".";
+
+ open POTFILES, $POTFILES_in or die "$PROGRAM: there's no POTFILES.in!\n";
+ @buf_potfiles = grep !/^(#|\s*$)/, <POTFILES>;
+ close POTFILES;
+
+ foreach (@buf_potfiles) {
+ s/^\[.*]\s*//;
+ }
+
+ print "Searching for missing translatable files...\n" if $VERBOSE;
+
+ ## Check if we should ignore some found files, when
+ ## comparing with POTFILES.in
+ foreach my $ignore ("POTFILES.skip", "POTFILES.ignore")
+ {
+ (-s "$SRCDIR/$ignore") or next;
+
+ if ("$ignore" eq "POTFILES.ignore")
+ {
+ print "The usage of POTFILES.ignore is deprecated. Please consider moving the\n".
+ "content of this file to POTFILES.skip.\n";
+ }
+
+ print "Found $ignore: Ignoring files...\n" if $VERBOSE;
+ open FILE, "<$SRCDIR/$ignore" or die "ERROR: Failed to open $SRCDIR/$ignore!\n";
+
+ while (<FILE>)
+ {
+ push @buf_potfiles_ignore, $_ unless /^(#|\s*$)/;
+ }
+ close FILE;
+
+ @buf_potfiles_ignore_sorted = sort (@buf_potfiles_ignore);
+ }
+
+ foreach my $file (@buf_i18n_plain)
+ {
+ my $in_comment = 0;
+ my $in_macro = 0;
+
+ open FILE, "<$file";
+ while (<FILE>)
+ {
+ # Handle continued multi-line comment.
+ if ($in_comment)
+ {
+ next unless s-.*\*/--;
+ $in_comment = 0;
+ }
+
+ # Handle continued macro.
+ if ($in_macro)
+ {
+ $in_macro = 0 unless /\\$/;
+ next;
+ }
+
+ # Handle start of macro (or any preprocessor directive).
+ if (/^\s*\#/)
+ {
+ $in_macro = 1 if /^([^\\]|\\.)*\\$/;
+ next;
+ }
+
+ # Handle comments and quoted text.
+ while (m-(/\*|//|\'|\")-) # \' and \" keep emacs perl mode happy
+ {
+ my $match = $1;
+ if ($match eq "/*")
+ {
+ if (!s-/\*.*?\*/--)
+ {
+ s-/\*.*--;
+ $in_comment = 1;
+ }
+ }
+ elsif ($match eq "//")
+ {
+ s-//.*--;
+ }
+ else # ' or "
+ {
+ if (!s-$match([^\\]|\\.)*?$match-QUOTEDTEXT-)
+ {
+ warn "mismatched quotes at line $. in $file\n";
+ s-$match.*--;
+ }
+ }
+ }
+
+ if (/\w\.GetString *\(QUOTEDTEXT/)
+ {
+ if (defined isNotValidMissing (unpack("x3 A*", $file))) {
+ ## Remove the first 3 chars and add newline
+ push @buf_allfiles, unpack("x3 A*", $file) . "\n";
+ }
+ last;
+ }
+
+ ## C_ N_ Q_ and _ are the macros defined in gi8n.h
+ if (/[CNQ]?_ *\(QUOTEDTEXT/)
+ {
+ if (defined isNotValidMissing (unpack("x3 A*", $file))) {
+ ## Remove the first 3 chars and add newline
+ push @buf_allfiles, unpack("x3 A*", $file) . "\n";
+ }
+ last;
+ }
+ }
+ close FILE;
+ }
+
+ foreach my $file (@buf_i18n_xml)
+ {
+ open FILE, "<$file";
+
+ while (<FILE>)
+ {
+ # FIXME: share the pattern matching code with intltool-extract
+ if (/\s_[-A-Za-z0-9._:]+\s*=\s*\"([^"]+)\"/ || /<_[^>]+>/ || /translatable=\"yes\"/)
+ {
+ if (defined isNotValidMissing (unpack("x3 A*", $file))) {
+ push @buf_allfiles, unpack("x3 A*", $file) . "\n";
+ }
+ last;
+ }
+ }
+ close FILE;
+ }
+
+ foreach my $file (@buf_i18n_ini)
+ {
+ open FILE, "<$file";
+ while (<FILE>)
+ {
+ if (/_(.*)=/)
+ {
+ if (defined isNotValidMissing (unpack("x3 A*", $file))) {
+ push @buf_allfiles, unpack("x3 A*", $file) . "\n";
+ }
+ last;
+ }
+ }
+ close FILE;
+ }
+
+ foreach my $file (@buf_i18n_xml_unmarked)
+ {
+ if (defined isNotValidMissing (unpack("x3 A*", $file))) {
+ push @buf_allfiles, unpack("x3 A*", $file) . "\n";
+ }
+ }
+
+
+ @buf_allfiles_sorted = sort (@buf_allfiles);
+ @buf_potfiles_sorted = sort (@buf_potfiles);
+
+ my %in2;
+ foreach (@buf_potfiles_sorted)
+ {
+ s#^$SRCDIR/../##;
+ s#^$SRCDIR/##;
+ $in2{$_} = 1;
+ }
+
+ foreach (@buf_potfiles_ignore_sorted)
+ {
+ s#^$SRCDIR/../##;
+ s#^$SRCDIR/##;
+ $in2{$_} = 1;
+ }
+
+ my @result;
+
+ foreach (@buf_allfiles_sorted)
+ {
+ my $dummy = $_;
+ my $srcdir = $SRCDIR;
+
+ $srcdir =~ s#^../##;
+ $dummy =~ s#^$srcdir/../##;
+ $dummy =~ s#^$srcdir/##;
+ $dummy =~ s#_build/##;
+ if (!exists($in2{$dummy}))
+ {
+ push @result, $dummy
+ }
+ }
+
+ my @buf_potfiles_notexist;
+
+ foreach (@buf_potfiles_sorted)
+ {
+ chomp (my $dummy = $_);
+ if ("$dummy" ne "" and !(-f "$SRCDIR/../$dummy" or -f "../$dummy"))
+ {
+ push @buf_potfiles_notexist, $_;
+ }
+ }
+
+ ## Save file with information about the files missing
+ ## if any, and give information about this procedure.
+ if (@result + @buf_potfiles_notexist > 0)
+ {
+ if (@result)
+ {
+ print "\n" if $VERBOSE;
+ unlink "missing";
+ open OUT, ">missing";
+ print OUT @result;
+ close OUT;
+ warn "\e[1mThe following files contain translations and are currently not in use. Please\e[0m\n".
+ "\e[1mconsider adding these to the POTFILES.in file, located in the po/ directory.\e[0m\n\n";
+ print STDERR @result, "\n";
+ warn "If some of these files are left out on purpose then please add them to\n".
+ "POTFILES.skip instead of POTFILES.in. A file \e[1m'missing'\e[0m containing this list\n".
+ "of left out files has been written in the current directory.\n";
+ }
+ if (@buf_potfiles_notexist)
+ {
+ unlink "notexist";
+ open OUT, ">notexist";
+ print OUT @buf_potfiles_notexist;
+ close OUT;
+ warn "\n" if ($VERBOSE or @result);
+ warn "\e[1mThe following files do not exist anymore:\e[0m\n\n";
+ warn @buf_potfiles_notexist, "\n";
+ warn "Please remove them from POTFILES.in. A file \e[1m'notexist'\e[0m\n".
+ "containing this list of absent files has been written in the current directory.\n";
+ }
+ }
+
+ ## If there is nothing to complain about, notify the user
+ else {
+ print "\nAll files containing translations are present in POTFILES.in.\n" if $VERBOSE;
+ }
+}
+
+sub Console_WriteError_InvalidOption
+{
+ ## Handle invalid arguments
+ print STDERR "Try `${PROGRAM} --help' for more information.\n";
+ exit 1;
+}
+
+sub isProgramInPath
+{
+ my ($file) = @_;
+ # If either a file exists, or when run it returns 0 exit status
+ return 1 if ((-x $file) or (system("$file --version >$devnull") == 0));
+ return 0;
+}
+
+sub isGNUGettextTool
+{
+ my ($file) = @_;
+ # Check that we are using GNU gettext tools
+ if (isProgramInPath ($file))
+ {
+ my $version = `$file --version`;
+ return 1 if ($version =~ m/.*\(GNU .*\).*/);
+ }
+ return 0;
+}
+
+sub GenerateHeaders
+{
+ my $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} || "intltool-extract";
+
+ ## Generate the .h header files, so we can allow glade and
+ ## xml translation support
+ if (! isProgramInPath ("$EXTRACT"))
+ {
+ print STDERR "\n *** The intltool-extract script wasn't found!"
+ ."\n *** Without it, intltool-update can not generate files.\n";
+ exit;
+ }
+ else
+ {
+ open (FILE, $POTFILES_in) or die "$PROGRAM: POTFILES.in not found.\n";
+
+ while (<FILE>)
+ {
+ chomp;
+ next if /^\[\s*encoding/;
+
+ ## Find xml files in POTFILES.in and generate the
+ ## files with help from the extract script
+
+ my $gettext_type= &POFile_DetermineType ($1);
+
+ if (/\.($xml_support|$ini_support)$/ || /^\[/)
+ {
+ s/^\[[^\[].*]\s*//;
+
+ my $filename = "../$_";
+
+ if ($VERBOSE)
+ {
+ system ($EXTRACT, "--update", "--srcdir=$SRCDIR",
+ "--type=$gettext_type", $filename);
+ }
+ else
+ {
+ system ($EXTRACT, "--update", "--type=$gettext_type",
+ "--srcdir=$SRCDIR", "--quiet", $filename);
+ }
+ }
+ }
+ close FILE;
+ }
+}
+
+#
+# Generate .pot file from POTFILES.in
+#
+sub GeneratePOTemplate
+{
+ my $XGETTEXT = $ENV{"XGETTEXT"} || "xgettext";
+ my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || '';
+ chomp $XGETTEXT;
+
+ if (! isGNUGettextTool ("$XGETTEXT"))
+ {
+ print STDERR " *** GNU xgettext is not found on this system!\n".
+ " *** Without it, intltool-update can not extract strings.\n";
+ exit;
+ }
+
+ print "Building $MODULE.pot...\n" if $VERBOSE;
+
+ open INFILE, $POTFILES_in;
+ unlink "POTFILES.in.temp";
+ open OUTFILE, ">POTFILES.in.temp" or die("Cannot open POTFILES.in.temp for writing");
+
+ my $gettext_support_nonascii = 0;
+
+ # checks for GNU gettext >= 0.12
+ my $dummy = `$XGETTEXT --version --from-code=UTF-8 >$devnull 2>$devnull`;
+ if ($? == 0)
+ {
+ $gettext_support_nonascii = 1;
+ }
+ else
+ {
+ # urge everybody to upgrade gettext
+ print STDERR "WARNING: This version of gettext does not support extracting non-ASCII\n".
+ " strings. That means you should install a version of gettext\n".
+ " that supports non-ASCII strings (such as GNU gettext >= 0.12),\n".
+ " or have to let non-ASCII strings untranslated. (If there is any)\n";
+ }
+
+ my $encoding = "ASCII";
+ my $forced_gettext_code;
+ my @temp_headers;
+ my $encoding_problem_is_reported = 0;
+
+ while (<INFILE>)
+ {
+ next if (/^#/ or /^\s*$/);
+
+ chomp;
+
+ my $gettext_code;
+
+ if (/^\[\s*encoding:\s*(.*)\s*\]/)
+ {
+ $forced_gettext_code=$1;
+ }
+ elsif (/\.($xml_support|$ini_support)$/ || /^\[/)
+ {
+ s/^\[.*]\s*//;
+ print OUTFILE "../$_.h\n";
+ push @temp_headers, "../$_.h";
+ $gettext_code = &TextFile_DetermineEncoding ("../$_.h") if ($gettext_support_nonascii and not defined $forced_gettext_code);
+ }
+ else
+ {
+ print OUTFILE "$SRCDIR/../$_\n";
+ $gettext_code = &TextFile_DetermineEncoding ("$SRCDIR/../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code);
+ }
+
+ next if (! $gettext_support_nonascii);
+
+ if (defined $forced_gettext_code)
+ {
+ $encoding=$forced_gettext_code;
+ }
+ elsif (defined $gettext_code and "$encoding" ne "$gettext_code")
+ {
+ if ($encoding eq "ASCII")
+ {
+ $encoding=$gettext_code;
+ }
+ elsif ($gettext_code ne "ASCII")
+ {
+ # Only report once because the message is quite long
+ if (! $encoding_problem_is_reported)
+ {
+ print STDERR "WARNING: You should use the same file encoding for all your project files,\n".
+ " but $PROGRAM thinks that most of the source files are in\n".
+ " $encoding encoding, while \"$_\" is (likely) in\n".
+ " $gettext_code encoding. If you are sure that all translatable strings\n".
+ " are in same encoding (say UTF-8), please \e[1m*prepend*\e[0m the following\n".
+ " line to POTFILES.in:\n\n".
+ " [encoding: UTF-8]\n\n".
+ " and make sure that configure.in/ac checks for $PACKAGE >= 0.27 .\n".
+ "(such warning message will only be reported once.)\n";
+ $encoding_problem_is_reported = 1;
+ }
+ }
+ }
+ }
+
+ close OUTFILE;
+ close INFILE;
+
+ unlink "$MODULE.pot";
+ my @xgettext_argument=("$XGETTEXT",
+ "--add-comments",
+ "--directory\=.",
+ "--default-domain\=$MODULE",
+ "--flag\=g_strdup_printf:1:c-format",
+ "--flag\=g_string_printf:2:c-format",
+ "--flag\=g_string_append_printf:2:c-format",
+ "--flag\=g_error_new:3:c-format",
+ "--flag\=g_set_error:4:c-format",
+ "--flag\=g_markup_printf_escaped:1:c-format",
+ "--flag\=g_log:3:c-format",
+ "--flag\=g_print:1:c-format",
+ "--flag\=g_printerr:1:c-format",
+ "--flag\=g_printf:1:c-format",
+ "--flag\=g_fprintf:2:c-format",
+ "--flag\=g_sprintf:2:c-format",
+ "--flag\=g_snprintf:3:c-format",
+ "--flag\=g_scanner_error:2:c-format",
+ "--flag\=g_scanner_warn:2:c-format",
+ "--output\=$MODULE\.pot",
+ "--files-from\=\.\/POTFILES\.in\.temp");
+ my $XGETTEXT_KEYWORDS = &FindPOTKeywords;
+ push @xgettext_argument, $XGETTEXT_KEYWORDS;
+ my $MSGID_BUGS_ADDRESS = &FindMakevarsBugAddress;
+ push @xgettext_argument, "--msgid-bugs-address\=\"$MSGID_BUGS_ADDRESS\"" if $MSGID_BUGS_ADDRESS;
+ push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii);
+ push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS;
+ my $xgettext_command = join ' ', @xgettext_argument;
+
+ # intercept xgettext error message
+ print "Running $xgettext_command\n" if $VERBOSE;
+ my $xgettext_error_msg = `$xgettext_command 2>\&1`;
+ my $command_failed = $?;
+
+ unlink "POTFILES.in.temp";
+
+ print "Removing generated header (.h) files..." if $VERBOSE;
+ unlink foreach (@temp_headers);
+ print "done.\n" if $VERBOSE;
+
+ if (! $command_failed)
+ {
+ if (! -e "$MODULE.pot")
+ {
+ print "None of the files in POTFILES.in contain strings marked for translation.\n" if $VERBOSE;
+ }
+ else
+ {
+ print "Wrote $MODULE.pot\n" if $VERBOSE;
+ }
+ }
+ else
+ {
+ if ($xgettext_error_msg =~ /--from-code/)
+ {
+ # replace non-ASCII error message with a more useful one.
+ print STDERR "ERROR: xgettext failed to generate PO template file because there is non-ASCII\n".
+ " string marked for translation. Please make sure that all strings marked\n".
+ " for translation are in uniform encoding (say UTF-8), then \e[1m*prepend*\e[0m the\n".
+ " following line to POTFILES.in and rerun $PROGRAM:\n\n".
+ " [encoding: UTF-8]\n\n";
+ }
+ else
+ {
+ print STDERR "$xgettext_error_msg";
+ if (-e "$MODULE.pot")
+ {
+ # is this possible?
+ print STDERR "ERROR: xgettext failed but still managed to generate PO template file.\n".
+ " Please consult error message above if there is any.\n";
+ }
+ else
+ {
+ print STDERR "ERROR: xgettext failed to generate PO template file. Please consult\n".
+ " error message above if there is any.\n";
+ }
+ }
+ exit (1);
+ }
+}
+
+sub POFile_Update
+{
+ -f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n";
+
+ my $MSGMERGE = $ENV{"MSGMERGE"} || "msgmerge";
+ my ($lang, $outfile) = @_;
+
+ if (! isGNUGettextTool ("$MSGMERGE"))
+ {
+ print STDERR " *** GNU msgmerge is not found on this system!\n".
+ " *** Without it, intltool-update can not extract strings.\n";
+ exit;
+ }
+
+ print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE;
+
+ my $infile = "$SRCDIR/$lang.po";
+ $outfile = "$SRCDIR/$lang.po" if ($outfile eq "");
+
+ # I think msgmerge won't overwrite old file if merge is not successful
+ system ("$MSGMERGE", "-o", $outfile, $infile, "$MODULE.pot");
+}
+
+sub Console_WriteError_NotExisting
+{
+ my ($file) = @_;
+
+ ## Report error if supplied language file is non-existing
+ print STDERR "$PROGRAM: $file does not exist!\n";
+ print STDERR "Try '$PROGRAM --help' for more information.\n";
+ exit;
+}
+
+sub GatherPOFiles
+{
+ my @po_files = glob ("./*.po");
+
+ @languages = map (&POFile_GetLanguage, @po_files);
+
+ foreach my $lang (@languages)
+ {
+ $po_files_by_lang{$lang} = shift (@po_files);
+ }
+}
+
+sub POFile_GetLanguage ($)
+{
+ s/^(.*\/)?(.+)\.po$/$2/;
+ return $_;
+}
+
+sub Console_Write_TranslationStatus
+{
+ my ($lang, $output_file) = @_;
+ my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt";
+
+ if (! isGNUGettextTool ("$MSGFMT"))
+ {
+ print STDERR " *** GNU msgfmt is not found on this system!\n".
+ " *** Without it, intltool-update can not extract strings.\n";
+ exit;
+ }
+
+ $output_file = "$SRCDIR/$lang.po" if ($output_file eq "");
+
+ system ("$MSGFMT", "-o", "$devnull", "--verbose", $output_file);
+}
+
+sub Console_Write_CoverageReport
+{
+ my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt";
+
+ if (! isGNUGettextTool ("$MSGFMT"))
+ {
+ print STDERR " *** GNU msgfmt is not found on this system!\n".
+ " *** Without it, intltool-update can not extract strings.\n";
+ exit;
+ }
+
+ &GatherPOFiles;
+
+ foreach my $lang (@languages)
+ {
+ print STDERR "$lang: ";
+ &POFile_Update ($lang, "");
+ }
+
+ print STDERR "\n\n * Current translation support in $MODULE \n\n";
+
+ foreach my $lang (@languages)
+ {
+ print STDERR "$lang: ";
+ system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po");
+ }
+}
+
+sub SubstituteVariable
+{
+ my ($str) = @_;
+
+ # always need to rewind file whenever it has been accessed
+ seek (CONF, 0, 0);
+
+ # cache each variable. varhash is global to we can add
+ # variables elsewhere.
+ while (<CONF>)
+ {
+ if (/^(\w+)=(.*)$/)
+ {
+ ($varhash{$1} = $2) =~ s/^["'](.*)["']$/$1/;
+ }
+ }
+
+ if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/)
+ {
+ my $rest = $3;
+ my $untouched = $1;
+ my $sub = "";
+ # Ignore recursive definitions of variables
+ $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/;
+
+ return SubstituteVariable ("$untouched$sub$rest");
+ }
+
+ # We're using Perl backticks ` and "echo -n" here in order to
+ # expand any shell escapes (such as backticks themselves) in every variable
+ return echo_n ($str);
+}
+
+sub CONF_Handle_Open
+{
+ my $base_dirname = getcwd();
+ $base_dirname =~ s@.*/@@;
+
+ my ($conf_in, $src_dir);
+
+ if ($base_dirname =~ /^po(-.+)?$/)
+ {
+ if (-f "Makevars")
+ {
+ my $makefile_source;
+
+ local (*IN);
+ open (IN, "<Makevars") || die "can't open Makevars: $!";
+
+ while (<IN>)
+ {
+ if (/^top_builddir[ \t]*=/)
+ {
+ $src_dir = $_;
+ $src_dir =~ s/^top_builddir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/;
+
+ chomp $src_dir;
+ if (-f "$src_dir" . "/configure.ac") {
+ $conf_in = "$src_dir" . "/configure.ac" . "\n";
+ } else {
+ $conf_in = "$src_dir" . "/configure.in" . "\n";
+ }
+ last;
+ }
+ }
+ close IN;
+
+ $conf_in || die "Cannot find top_builddir in Makevars.";
+ }
+ elsif (-f "$SRCDIR/../configure.ac")
+ {
+ $conf_in = "$SRCDIR/../configure.ac";
+ }
+ elsif (-f "$SRCDIR/../configure.in")
+ {
+ $conf_in = "$SRCDIR/../configure.in";
+ }
+ else
+ {
+ my $makefile_source;
+
+ local (*IN);
+ open (IN, "<Makefile") || return;
+
+ while (<IN>)
+ {
+ if (/^top_srcdir[ \t]*=/)
+ {
+ $src_dir = $_;
+ $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/;
+
+ chomp $src_dir;
+ $conf_in = "$src_dir" . "/configure.in" . "\n";
+
+ last;
+ }
+ }
+ close IN;
+
+ $conf_in || die "Cannot find top_srcdir in Makefile.";
+ }
+
+ open (CONF, "<$conf_in");
+ }
+ else
+ {
+ print STDERR "$PROGRAM: Unable to proceed.\n" .
+ "Make sure to run this script inside the po directory.\n";
+ exit;
+ }
+}
+
+sub FindPackageName
+{
+ my $version;
+ my $domain = &FindMakevarsDomain;
+ my $name = $domain || "untitled";
+
+ &CONF_Handle_Open;
+
+ my $conf_source; {
+ local (*IN);
+ open (IN, "<&CONF") || return $name;
+ seek (IN, 0, 0);
+ local $/; # slurp mode
+ $conf_source = <IN>;
+ close IN;
+ }
+
+ # priority for getting package name:
+ # 1. GETTEXT_PACKAGE
+ # 2. first argument of AC_INIT (with >= 2 arguments)
+ # 3. first argument of AM_INIT_AUTOMAKE (with >= 2 argument)
+
+ # /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m
+ # the \s makes this not work, why?
+ if ($conf_source =~ /^AM_INIT_AUTOMAKE\(([^,\)]+),([^,\)]+)/m)
+ {
+ ($name, $version) = ($1, $2);
+ $name =~ s/[\[\]\s]//g;
+ $version =~ s/[\[\]\s]//g;
+ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
+ $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
+ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
+ $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
+ }
+
+ if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)/m)
+ {
+ ($name, $version) = ($1, $2);
+ $name =~ s/[\[\]\s]//g;
+ $version =~ s/[\[\]\s]//g;
+ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
+ $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
+ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
+ $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
+ }
+
+ # \s makes this not work, why?
+ $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m;
+
+ # m4 macros AC_PACKAGE_NAME, AC_PACKAGE_VERSION etc. have same value
+ # as corresponding $PACKAGE_NAME, $PACKAGE_VERSION etc. shell variables.
+ $name =~ s/\bAC_PACKAGE_/\$PACKAGE_/g;
+
+ $name = $domain if $domain;
+
+ $name = SubstituteVariable ($name);
+ $name =~ s/^["'](.*)["']$/$1/;
+
+ return $name if $name;
+}
+
+
+sub FindPOTKeywords
+{
+
+ my $keywords = "--keyword\=\_ --keyword\=N\_ --keyword\=U\_ --keyword\=Q\_";
+ my $varname = "XGETTEXT_OPTIONS";
+ my $make_source; {
+ local (*IN);
+ open (IN, "<Makevars") || (open(IN, "<Makefile.in.in") && ($varname = "XGETTEXT_KEYWORDS")) || return $keywords;
+ seek (IN, 0, 0);
+ local $/; # slurp mode
+ $make_source = <IN>;
+ close IN;
+ }
+
+ # unwrap lines split with a trailing \
+ $make_source =~ s/\\ $ \n/ /mxg;
+ $keywords = $1 if $make_source =~ /^$varname[ ]*=\[?([^\n\]]+)/m;
+
+ return $keywords;
+}
+
+sub FindMakevarsDomain
+{
+
+ my $domain = "";
+ my $makevars_source; {
+ local (*IN);
+ open (IN, "<Makevars") || return $domain;
+ seek (IN, 0, 0);
+ local $/; # slurp mode
+ $makevars_source = <IN>;
+ close IN;
+ }
+
+ $domain = $1 if $makevars_source =~ /^DOMAIN[ ]*=\[?([^\n\]\$]+)/m;
+ $domain =~ s/^\s+//;
+ $domain =~ s/\s+$//;
+
+ return $domain;
+}
+
+sub FindMakevarsBugAddress
+{
+
+ my $address = "";
+ my $makevars_source; {
+ local (*IN);
+ open (IN, "<Makevars") || return undef;
+ seek (IN, 0, 0);
+ local $/; # slurp mode
+ $makevars_source = <IN>;
+ close IN;
+ }
+
+ $address = $1 if $makevars_source =~ /^MSGID_BUGS_ADDRESS[ ]*=\[?([^\n\]\$]+)/m;
+ $address =~ s/^\s+//;
+ $address =~ s/\s+$//;
+
+ return $address;
+}
diff --git a/m4/intltool.m4 b/m4/intltool.m4
new file mode 100644
index 0000000..f27ec0f
--- /dev/null
+++ b/m4/intltool.m4
@@ -0,0 +1,234 @@
+## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*-
+## Copyright (C) 2001 Eazel, Inc.
+## Author: Maciej Stachowiak <mjs@noisehavoc.org>
+## Kenneth Christiansen <kenneth@gnu.org>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+##
+## As a special exception to the GNU General Public License, if you
+## distribute this file as part of a program that contains a
+## configuration script generated by Autoconf, you may include it under
+## the same distribution terms that you use for the rest of that program.
+
+dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
+# serial 36 IT_PROG_INTLTOOL
+AC_DEFUN([IT_PROG_INTLTOOL],
+[AC_PREREQ([2.50])dnl
+
+case "$am__api_version" in
+ 1.[01234])
+ AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
+ ;;
+ *)
+ ;;
+esac
+
+if test -n "$1"; then
+ AC_MSG_CHECKING([for intltool >= $1])
+
+ INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
+ INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { print $ 2; }' ${ac_aux_dir}/intltool-update.in`
+ [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`
+ ]
+ AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
+ test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
+ AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
+fi
+
+ 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 $< [$]@'
+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 $< [$]@'
+ 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 $< [$]@'
+ 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 $< [$]@'
+ INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
+ 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 $< [$]@'
+ 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 $< [$]@'
+ 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 $< [$]@'
+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 $< [$]@'
+ 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 $< [$]@'
+ 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 $< [$]@'
+ INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@'
+ 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 $< [$]@'
+ 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 $< [$]@'
+ 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 $< [$]@'
+ 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 $< [$]@'
+ 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 $< [$]@'
+ 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 $< [$]@'
+ 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 $< [$]@'
+
+AC_SUBST(INTLTOOL_DESKTOP_RULE)
+AC_SUBST(INTLTOOL_DIRECTORY_RULE)
+AC_SUBST(INTLTOOL_KEYS_RULE)
+AC_SUBST(INTLTOOL_PROP_RULE)
+AC_SUBST(INTLTOOL_OAF_RULE)
+AC_SUBST(INTLTOOL_PONG_RULE)
+AC_SUBST(INTLTOOL_SERVER_RULE)
+AC_SUBST(INTLTOOL_SHEET_RULE)
+AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
+AC_SUBST(INTLTOOL_UI_RULE)
+AC_SUBST(INTLTOOL_XAM_RULE)
+AC_SUBST(INTLTOOL_KBD_RULE)
+AC_SUBST(INTLTOOL_XML_RULE)
+AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
+AC_SUBST(INTLTOOL_CAVES_RULE)
+AC_SUBST(INTLTOOL_SCHEMAS_RULE)
+AC_SUBST(INTLTOOL_THEME_RULE)
+AC_SUBST(INTLTOOL_SERVICE_RULE)
+AC_SUBST(INTLTOOL_POLICY_RULE)
+
+# Check the gettext tools to make sure they are GNU
+AC_PATH_PROG(XGETTEXT, xgettext)
+AC_PATH_PROG(MSGMERGE, msgmerge)
+AC_PATH_PROG(MSGFMT, msgfmt)
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+ AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+ AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+
+# Use the tools built into the package, not the ones that are installed.
+AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
+AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')
+AC_SUBST(INTLTOOL_UPDATE, '$(top_builddir)/intltool-update')
+
+AC_PATH_PROG(INTLTOOL_PERL, perl)
+if test -z "$INTLTOOL_PERL"; then
+ AC_MSG_ERROR([perl not found; required for intltool])
+fi
+if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
+ AC_MSG_ERROR([perl 5.x required for intltool])
+fi
+if test "x$2" != "xno-xml"; then
+ AC_MSG_CHECKING([for XML::Parser])
+ if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
+ AC_MSG_RESULT([ok])
+ else
+ AC_MSG_ERROR([XML::Parser perl module is required for intltool])
+ fi
+fi
+
+# Substitute ALL_LINGUAS so we can use it in po/Makefile
+AC_SUBST(ALL_LINGUAS)
+
+# Set DATADIRNAME correctly if it is not set yet
+# (copied from glib-gettext.m4)
+if test -z "$DATADIRNAME"; then
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[]],
+ [[extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr]])],
+ [DATADIRNAME=share],
+ [case $host in
+ *-*-solaris*)
+ dnl On Solaris, if bind_textdomain_codeset is in libc,
+ dnl GNU format message catalog is always supported,
+ dnl since both are added to the libc all together.
+ dnl Hence, we'd like to go with DATADIRNAME=share
+ dnl in this case.
+ AC_CHECK_FUNC(bind_textdomain_codeset,
+ [DATADIRNAME=share], [DATADIRNAME=lib])
+ ;;
+ *)
+ [DATADIRNAME=lib]
+ ;;
+ esac])
+fi
+AC_SUBST(DATADIRNAME)
+
+IT_PO_SUBDIR([po])
+
+dnl The following is very similar to
+dnl
+dnl AC_CONFIG_FILES([intltool-extract intltool-merge intltool-update])
+dnl
+dnl with the following slight differences:
+dnl - the *.in files are in ac_aux_dir,
+dnl - if the file haven't changed upon reconfigure, it's not touched,
+dnl - the evaluation of the third parameter enables a hack which computes
+dnl the actual value of $libdir,
+dnl - the user sees "executing intltool commands", instead of
+dnl "creating intltool-extract" and such.
+dnl
+dnl Nothing crucial here, and we could use AC_CONFIG_FILES, if there were
+dnl a reason for it.
+
+AC_CONFIG_COMMANDS([intltool], [
+
+for file in intltool-extract intltool-merge intltool-update; do
+ sed -e "s|@INTLTOOL_EXTRACT@|`pwd`/intltool-extract|g" \
+ -e "s|@INTLTOOL_LIBDIR@|${INTLTOOL_LIBDIR}|g" \
+ -e "s|@INTLTOOL_PERL@|${INTLTOOL_PERL}|g" \
+ < ${ac_aux_dir}/${file}.in > ${file}.out
+ if cmp -s ${file} ${file}.out 2>/dev/null; then
+ rm -f ${file}.out
+ else
+ mv -f ${file}.out ${file}
+ fi
+ chmod ugo+x ${file}
+ chmod u+w ${file}
+done
+
+],
+[INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir='${ac_aux_dir}'
+prefix="$prefix" exec_prefix="$exec_prefix" INTLTOOL_LIBDIR="$libdir"
+INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}'])
+
+])
+
+
+# IT_PO_SUBDIR(DIRNAME)
+# ---------------------
+# All po subdirs have to be declared with this macro; the subdir "po" is
+# declared by IT_PROG_INTLTOOL.
+#
+AC_DEFUN([IT_PO_SUBDIR],
+[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
+dnl
+dnl The following CONFIG_COMMANDS should be exetuted at the very end
+dnl of config.status.
+AC_CONFIG_COMMANDS_PRE([
+ AC_CONFIG_COMMANDS([$1/stamp-it], [
+ rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
+ >"$1/stamp-it.tmp"
+ [sed '/^#/d
+ s/^[[].*] *//
+ /^[ ]*$/d
+ '"s|^| $ac_top_srcdir/|" \
+ "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
+ ]
+ if test ! -f "$1/Makefile"; then
+ AC_MSG_ERROR([$1/Makefile is not ready.])
+ fi
+ mv "$1/Makefile" "$1/Makefile.tmp"
+ [sed '/^POTFILES =/,/[^\\]$/ {
+ /^POTFILES =/!d
+ r $1/POTFILES
+ }
+ ' "$1/Makefile.tmp" >"$1/Makefile"]
+ rm -f "$1/Makefile.tmp"
+ mv "$1/stamp-it.tmp" "$1/stamp-it"
+ ])
+])dnl
+])
+
+
+# deprecated macros
+AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
+# A hint is needed for aclocal from Automake <= 1.9.4:
+# AC_DEFUN([AC_PROG_INTLTOOL], ...)
+
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644
index 0000000..6891e8f
--- /dev/null
+++ b/po/Makefile.in.in
@@ -0,0 +1,218 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
+#
+# This file may be copied and used freely without restrictions. It may
+# be used in projects which are not available under a GNU Public License,
+# but which still want to provide support for the GNU gettext functionality.
+#
+# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
+# instead of PACKAGE and to look for po2tbl in ./ not in intl/
+#
+# - Modified by jacob berkman <jacob@ximian.com> to install
+# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
+#
+# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
+#
+# We have the following line for use by intltoolize:
+# INTLTOOL_MAKEFILE
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+datarootdir = @datarootdir@
+libdir = @libdir@
+DATADIRNAME = @DATADIRNAME@
+itlocaledir = $(prefix)/$(DATADIRNAME)/locale
+subdir = po
+install_sh = @install_sh@
+# Automake >= 1.8 provides @mkdir_p@.
+# Until it can be supposed, use the safe fallback:
+mkdir_p = $(install_sh) -d
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
+
+ALL_LINGUAS = @ALL_LINGUAS@
+
+PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
+
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi)
+
+USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+
+POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
+
+DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
+EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
+
+POTFILES = \
+# This comment gets stripped out
+
+CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
+
+.SUFFIXES:
+.SUFFIXES: .po .pox .gmo .mo .msg .cat
+
+.po.pox:
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && gencat $@ $*.msg
+
+
+all: all-@USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(GETTEXT_PACKAGE).pot: $(POTFILES)
+ $(GENPOT)
+
+install: install-data
+install-data: install-data-@USE_NLS@
+install-data-no: all
+install-data-yes: all
+ $(mkdir_p) $(DESTDIR)$(itlocaledir)
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $$dir; \
+ if test -r $$lang.gmo; then \
+ $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+ echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+ echo "installing $(srcdir)/$$lang.gmo as" \
+ "$$dir/$(GETTEXT_PACKAGE).mo"; \
+ fi; \
+ if test -r $$lang.gmo.m; then \
+ $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
+ echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
+ else \
+ if test -r $(srcdir)/$$lang.gmo.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
+ $$dir/$(GETTEXT_PACKAGE).mo.m; \
+ echo "installing $(srcdir)/$$lang.gmo.m as" \
+ "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+
+# Empty stubs to satisfy archaic automake needs
+dvi info tags TAGS ID:
+
+# Define this as empty until I found a useful application.
+install-exec installcheck:
+
+uninstall:
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
+ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+ done
+
+check: all $(GETTEXT_PACKAGE).pot
+ rm -f missing notexist
+ srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
+ if [ -r missing -o -r notexist ]; then \
+ exit 1; \
+ fi
+
+mostlyclean:
+ rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
+ rm -f .intltool-merge-cache
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES stamp-it
+ rm -f *.mo *.msg *.cat *.cat.m *.gmo
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f Makefile.in.in
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ extra_dists="$(EXTRA_DISTFILES)"; \
+ for file in $$extra_dists; do \
+ test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
+ done; \
+ for file in $$dists; do \
+ test -f $$file || file="$(srcdir)/$$file"; \
+ ln $$file $(distdir) 2> /dev/null \
+ || cp -p $$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ tmpdir=`pwd`; \
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ echo "$$lang:"; \
+ result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
+ if $$result; then \
+ if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$lang.gmo failed!"; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi; \
+ done
+
+Makefile POTFILES: stamp-it
+ @if test ! -f $@; then \
+ rm -f stamp-it; \
+ $(MAKE) stamp-it; \
+ fi
+
+stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
+ $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po/pseudo.po b/po/pseudo.po
deleted file mode 100644
index c3145a6..0000000
--- a/po/pseudo.po
+++ /dev/null
@@ -1,37 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-06-24 00:21+0530\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Translate Toolkit 1.1.1rc4\n"
-
-#: ../src/sugar/mime.py:29
-msgid "Text"
-msgstr ""
-
-#: ../src/sugar/mime.py:37
-msgid "Image"
-msgstr ""
-
-#: ../src/sugar/mime.py:42
-msgid "Audio"
-msgstr ""
-
-#: ../src/sugar/mime.py:47
-msgid "Video"
-msgstr ""
-
-#: ../src/sugar/mime.py:52
-msgid "Link"
-msgstr ""
diff --git a/po/sugar-base.pot b/po/sugar-base.pot
deleted file mode 100644
index 21c2ab1..0000000
--- a/po/sugar-base.pot
+++ /dev/null
@@ -1,37 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-06-24 00:21+0530\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../src/sugar/mime.py:29
-msgid "Text"
-msgstr ""
-
-#: ../src/sugar/mime.py:37
-msgid "Image"
-msgstr ""
-
-#: ../src/sugar/mime.py:42
-msgid "Audio"
-msgstr ""
-
-#: ../src/sugar/mime.py:47
-msgid "Video"
-msgstr ""
-
-#: ../src/sugar/mime.py:52
-msgid "Link"
-msgstr ""
diff --git a/src/Makefile.in b/src/Makefile.in
index 480d140..37ea8db 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -34,8 +34,8 @@ host_triplet = @host@
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/python.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
+ $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -56,12 +56,15 @@ CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -72,6 +75,7 @@ CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
@@ -84,12 +88,40 @@ EXTENSION_CFLAGS = @EXTENSION_CFLAGS@
EXTENSION_LIBS = @EXTENSION_LIBS@
F77 = @F77@
FFLAGS = @FFLAGS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -98,6 +130,10 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -107,6 +143,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
PYGTK_CODEGEN = @PYGTK_CODEGEN@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
@@ -119,7 +159,9 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
diff --git a/src/sugar/Makefile.in b/src/sugar/Makefile.in
index 2b97b37..fe3a034 100644
--- a/src/sugar/Makefile.in
+++ b/src/sugar/Makefile.in
@@ -36,8 +36,8 @@ subdir = src/sugar
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(sugar_PYTHON)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/python.m4 \
- $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \
+ $(top_srcdir)/m4/python.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -86,12 +86,15 @@ ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
@@ -102,6 +105,7 @@ CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
@@ -114,12 +118,40 @@ EXTENSION_CFLAGS = @EXTENSION_CFLAGS@
EXTENSION_LIBS = @EXTENSION_LIBS@
F77 = @F77@
FFLAGS = @FFLAGS@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+INTLTOOL_CAVES_RULE = @INTLTOOL_CAVES_RULE@
+INTLTOOL_DESKTOP_RULE = @INTLTOOL_DESKTOP_RULE@
+INTLTOOL_DIRECTORY_RULE = @INTLTOOL_DIRECTORY_RULE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+INTLTOOL_KBD_RULE = @INTLTOOL_KBD_RULE@
+INTLTOOL_KEYS_RULE = @INTLTOOL_KEYS_RULE@
+INTLTOOL_MERGE = @INTLTOOL_MERGE@
+INTLTOOL_OAF_RULE = @INTLTOOL_OAF_RULE@
+INTLTOOL_PERL = @INTLTOOL_PERL@
+INTLTOOL_POLICY_RULE = @INTLTOOL_POLICY_RULE@
+INTLTOOL_PONG_RULE = @INTLTOOL_PONG_RULE@
+INTLTOOL_PROP_RULE = @INTLTOOL_PROP_RULE@
+INTLTOOL_SCHEMAS_RULE = @INTLTOOL_SCHEMAS_RULE@
+INTLTOOL_SERVER_RULE = @INTLTOOL_SERVER_RULE@
+INTLTOOL_SERVICE_RULE = @INTLTOOL_SERVICE_RULE@
+INTLTOOL_SHEET_RULE = @INTLTOOL_SHEET_RULE@
+INTLTOOL_SOUNDLIST_RULE = @INTLTOOL_SOUNDLIST_RULE@
+INTLTOOL_THEME_RULE = @INTLTOOL_THEME_RULE@
+INTLTOOL_UI_RULE = @INTLTOOL_UI_RULE@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_XAM_RULE = @INTLTOOL_XAM_RULE@
+INTLTOOL_XML_NOMERGE_RULE = @INTLTOOL_XML_NOMERGE_RULE@
+INTLTOOL_XML_RULE = @INTLTOOL_XML_RULE@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -128,6 +160,10 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -137,6 +173,10 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
PYGTK_CODEGEN = @PYGTK_CODEGEN@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
@@ -149,7 +189,9 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
+USE_NLS = @USE_NLS@
VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@