[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: branch: master updated (rel_0.1.1.90-8-geac8acc)



The branch, master has been updated
       via  eac8acc49f010f027aa46e45fd6957964dab31a3 (commit)
       via  7f6d5f1fc2a03db3238a8f5d1f800e3247cfadc3 (commit)
       via  e0b0257b906859df0f875be92629b56b0b51430e (commit)
      from  473c02e336e6d550e7fa42287a6f9ecb486d3ba8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 .gitignore                     |    5 +
 Makefile.am                    |   10 +-
 autogen.sh                     |  132 ++++
 configure.ac                   |    1 -
 tools/py-compile => py-compile |    0 
 tools/install-sh               |  323 ---------
 tools/intltool-extract.in      |  861 ------------------------
 tools/intltool-merge.in        | 1451 ----------------------------------------
 tools/intltool-update.in       | 1164 --------------------------------
 tools/missing                  |  360 ----------
 10 files changed, 144 insertions(+), 4163 deletions(-)
 create mode 100755 autogen.sh
 rename tools/py-compile => py-compile (100%)
 delete mode 100755 tools/install-sh
 delete mode 100644 tools/intltool-extract.in
 delete mode 100644 tools/intltool-merge.in
 delete mode 100644 tools/intltool-update.in
 delete mode 100755 tools/missing


=================
 Commit Messages
=================

commit eac8acc49f010f027aa46e45fd6957964dab31a3
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Dec 25 05:07:35 2007 +0000

    Remove autogenerated files from source control

:100644 100644 790da0b... d996d6d... M	.gitignore
:100644 100644 11685f3... aa8e2d6... M	Makefile.am
:100755 000000 4d4a951... 0000000... D	install-sh
:100644 000000 7b83435... 0000000... D	intltool-extract.in
:100644 000000 e5671d7... 0000000... D	intltool-merge.in
:100644 000000 bffd10f... 0000000... D	intltool-update.in
:100755 000000 894e786... 0000000... D	missing

commit 7f6d5f1fc2a03db3238a8f5d1f800e3247cfadc3
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Dec 25 04:58:28 2007 +0000

    Add an autogen.sh to reconfigure the source directory build tools
    
    autogen.sh was copied from gattrib's source directory.

:000000 100755 0000000... d94ffc3... A	autogen.sh

commit e0b0257b906859df0f875be92629b56b0b51430e
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Dec 25 04:56:24 2007 +0000

    Remove use of AC_CONFIG_AUX_DIR() as it does not play nice with intltool.
    
    intltoolize will try an install the po/Makefile.in.in as a subdir of the
    tools directory, which is not what we want.

:100644 100644 00a9e71... 790da0b... M	.gitignore
:100644 100644 7a0dc64... 11685f3... M	Makefile.am
:100644 100644 217e351... afcc449... M	configure.ac
:000000 100755 0000000... 4d4a951... A	install-sh
:000000 100644 0000000... 7b83435... A	intltool-extract.in
:000000 100644 0000000... e5671d7... A	intltool-merge.in
:000000 100644 0000000... bffd10f... A	intltool-update.in
:000000 100755 0000000... 894e786... A	missing
:000000 100755 0000000... d6e900b... A	py-compile
:100755 000000 4d4a951... 0000000... D	tools/install-sh
:100644 000000 7b83435... 0000000... D	tools/intltool-extract.in
:100644 000000 e5671d7... 0000000... D	tools/intltool-merge.in
:100644 000000 bffd10f... 0000000... D	tools/intltool-update.in
:100755 000000 894e786... 0000000... D	tools/missing
:100755 000000 d6e900b... 0000000... D	tools/py-compile

=========
 Changes
=========

commit eac8acc49f010f027aa46e45fd6957964dab31a3
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Dec 25 05:07:35 2007 +0000

    Remove autogenerated files from source control

diff --git a/.gitignore b/.gitignore
index 790da0b..d996d6d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,4 +13,5 @@ intltool-merge
 intltool-merge.in
 intltool-update
 intltool-update.in
-
+install-sh
+missing
diff --git a/Makefile.am b/Makefile.am
index 11685f3..aa8e2d6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -43,6 +43,10 @@ DISTCLEANFILES = intltool-extract \
                  intltool-merge \
                  intltool-update \
                  po/.intltool-merge-cache
+MAINTAINERCLEANFILES = Makefile.in configure config.h.in \
+                       config.status aclocal.m4 libgeda.pc config.guess \
+                       config.sub depcomp install-sh missing mkinstalldirs \
+                       $(INTLTOOL_FILES)
 
 templatesdir = @templatesdir@
 
diff --git a/install-sh b/install-sh
deleted file mode 100755
index 4d4a951..0000000
--- a/install-sh
+++ /dev/null
@@ -1,323 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2005-05-14.22
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-chmodcmd="$chmodprog 0755"
-chowncmd=
-chgrpcmd=
-stripcmd=
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=
-dst=
-dir_arg=
-dstarg=
-no_target_directory=
-
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
-   or: $0 [OPTION]... SRCFILES... DIRECTORY
-   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
-   or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
--c         (ignored)
--d         create directories instead of installing files.
--g GROUP   $chgrpprog installed files to GROUP.
--m MODE    $chmodprog installed files to MODE.
--o USER    $chownprog installed files to USER.
--s         $stripprog installed files.
--t DIRECTORY  install into DIRECTORY.
--T         report an error if DSTFILE is a directory.
---help     display this help and exit.
---version  display version info and exit.
-
-Environment variables override the default commands:
-  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
-"
-
-while test -n "$1"; do
-  case $1 in
-    -c) shift
-        continue;;
-
-    -d) dir_arg=true
-        shift
-        continue;;
-
-    -g) chgrpcmd="$chgrpprog $2"
-        shift
-        shift
-        continue;;
-
-    --help) echo "$usage"; exit $?;;
-
-    -m) chmodcmd="$chmodprog $2"
-        shift
-        shift
-        continue;;
-
-    -o) chowncmd="$chownprog $2"
-        shift
-        shift
-        continue;;
-
-    -s) stripcmd=$stripprog
-        shift
-        continue;;
-
-    -t) dstarg=$2
-	shift
-	shift
-	continue;;
-
-    -T) no_target_directory=true
-	shift
-	continue;;
-
-    --version) echo "$0 $scriptversion"; exit $?;;
-
-    *)  # When -d is used, all remaining arguments are directories to create.
-	# When -t is used, the destination is already specified.
-	test -n "$dir_arg$dstarg" && break
-        # Otherwise, the last argument is the destination.  Remove it from $@.
-	for arg
-	do
-          if test -n "$dstarg"; then
-	    # $@ is not empty: it contains at least $arg.
-	    set fnord "$@" "$dstarg"
-	    shift # fnord
-	  fi
-	  shift # arg
-	  dstarg=$arg
-	done
-	break;;
-  esac
-done
-
-if test -z "$1"; then
-  if test -z "$dir_arg"; then
-    echo "$0: no input file specified." >&2
-    exit 1
-  fi
-  # It's OK to call `install-sh -d' without argument.
-  # This can happen when creating conditional directories.
-  exit 0
-fi
-
-for src
-do
-  # Protect names starting with `-'.
-  case $src in
-    -*) src=./$src ;;
-  esac
-
-  if test -n "$dir_arg"; then
-    dst=$src
-    src=
-
-    if test -d "$dst"; then
-      mkdircmd=:
-      chmodcmd=
-    else
-      mkdircmd=$mkdirprog
-    fi
-  else
-    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
-    # might cause directories to be created, which would be especially bad
-    # if $src (and thus $dsttmp) contains '*'.
-    if test ! -f "$src" && test ! -d "$src"; then
-      echo "$0: $src does not exist." >&2
-      exit 1
-    fi
-
-    if test -z "$dstarg"; then
-      echo "$0: no destination specified." >&2
-      exit 1
-    fi
-
-    dst=$dstarg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst ;;
-    esac
-
-    # If destination is a directory, append the input filename; won't work
-    # if double slashes aren't ignored.
-    if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-	echo "$0: $dstarg: Is a directory" >&2
-	exit 1
-      fi
-      dst=$dst/`basename "$src"`
-    fi
-  fi
-
-  # This sed command emulates the dirname command.
-  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
-
-  # Make sure that the destination directory exists.
-
-  # Skip lots of stat calls in the usual case.
-  if test ! -d "$dstdir"; then
-    defaultIFS='
-	 '
-    IFS="${IFS-$defaultIFS}"
-
-    oIFS=$IFS
-    # Some sh's can't handle IFS=/ for some reason.
-    IFS='%'
-    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-    shift
-    IFS=$oIFS
-
-    pathcomp=
-
-    while test $# -ne 0 ; do
-      pathcomp=$pathcomp$1
-      shift
-      if test ! -d "$pathcomp"; then
-        $mkdirprog "$pathcomp"
-	# mkdir can fail with a `File exist' error in case several
-	# install-sh are creating the directory concurrently.  This
-	# is OK.
-	test -d "$pathcomp" || exit
-      fi
-      pathcomp=$pathcomp/
-    done
-  fi
-
-  if test -n "$dir_arg"; then
-    $doit $mkdircmd "$dst" \
-      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
-  else
-    dstfile=`basename "$dst"`
-
-    # Make a couple of temp file names in the proper directory.
-    dsttmp=$dstdir/_inst.$$_
-    rmtmp=$dstdir/_rm.$$_
-
-    # Trap to clean up those temp files at exit.
-    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-    trap '(exit $?); exit' 1 2 13 15
-
-    # Copy the file name to the temp name.
-    $doit $cpprog "$src" "$dsttmp" &&
-
-    # and set any options; do chmod last to preserve setuid bits.
-    #
-    # If any of these fail, we abort the whole thing.  If we want to
-    # ignore errors from any of these, just make sure not to ignore
-    # errors from the above "$doit $cpprog $src $dsttmp" command.
-    #
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
-
-    # Now rename the file to the real destination.
-    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
-      || {
-	   # The rename failed, perhaps because mv can't rename something else
-	   # to itself, or perhaps because mv is so ancient that it does not
-	   # support -f.
-
-	   # Now remove or move aside any old file at destination location.
-	   # We try this two ways since rm can't unlink itself on some
-	   # systems and the destination file might be busy for other
-	   # reasons.  In this case, the final cleanup might fail but the new
-	   # file should still install successfully.
-	   {
-	     if test -f "$dstdir/$dstfile"; then
-	       $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
-	       || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
-	       || {
-		 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
-		 (exit 1); exit 1
-	       }
-	     else
-	       :
-	     fi
-	   } &&
-
-	   # Now rename the file to the real destination.
-	   $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
-	 }
-    }
-  fi || { (exit 1); exit 1; }
-done
-
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
-  (exit 0); exit 0
-}
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/intltool-extract.in b/intltool-extract.in
deleted file mode 100644
index 7b83435..0000000
--- a/intltool-extract.in
+++ /dev/null
@@ -1,861 +0,0 @@
-#!@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@xxxxxxx>
-#           Darin Adler <darin@xxxxxxxxxxxxx>
-#
-
-## Release information
-my $PROGRAM      = "intltool-extract";
-my $PACKAGE      = "intltool";
-my $VERSION      = "0.36.2";
-
-## 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"
-  -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";
-}
-
-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_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
deleted file mode 100644
index e5671d7..0000000
--- a/intltool-merge.in
+++ /dev/null
@@ -1,1451 +0,0 @@
-#!@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@xxxxxxxxxxxxxx>
-#            Kenneth Christiansen <kenneth@xxxxxxx>
-#            Darin Adler <darin@xxxxxxxxxxxxx>
-#
-#  Proper XML UTF-8'ification written by Cyrille Chepelov <chepelov@xxxxxxxxxx>
-#
-
-## Release information
-my $PROGRAM = "intltool-merge";
-my $PACKAGE = "intltool";
-my $VERSION = "0.36.2";
-
-## 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 $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,
- "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 && @ARGV > 2) 
-{
-	&utf8_sanity_check;
-	&preparation;
-	&print_message;
-	&quoted_merge_translations;
-	&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
-  -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 /^#/;
-
-                if (/([-a-zA-Z_@.]+)\n/)
-                {
-                    my $lang = $1;
-
-                    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 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;
-        }
-    } 
-    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_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+)=.*/[$lang]$1=$translation/;
-                print OUTPUT;
-            }
-	} 
-        else 
-        {
-            print OUTPUT;
-        }
-    }
-
-    close OUTPUT;
-    close INPUT;
-}
-
-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 ($lang, $string) = @_;
-
-    $string =~ s/\\\"/\"/g;
-
-    my $translation = $translations{$lang, $string};
-    $translation = $string if !$translation;
-
-    $translation =~ s/\"/\\\"/g;
-    return $translation
-}
-
-sub quoted_merge_translations
-{
-    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($lang, $1) . "\""/ge;
-            print OUTPUT;
-        }
-        close OUTPUT;
-        close INPUT;
-    }
-}
diff --git a/intltool-update.in b/intltool-update.in
deleted file mode 100644
index bffd10f..0000000
--- a/intltool-update.in
+++ /dev/null
@@ -1,1164 +0,0 @@
-#!@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@xxxxxxx>
-#           Maciej Stachowiak
-#           Darin Adler <darin@xxxxxxxxxxxxx>
-
-## Release information
-my $PROGRAM = "intltool-update";
-my $VERSION = "0.36.2";
-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/..";
-
-    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;
-	    }
-
-            ## N_ Q_ and _ are the three macros defined in gi8n.h
-	    if (/[NQ]?_ *\(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;
-    }
-
-    $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/missing b/missing
deleted file mode 100755
index 894e786..0000000
--- a/missing
+++ /dev/null
@@ -1,360 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2005-06-08.21
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
-#   Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@xxxxxxxxxxxxxxxx>, 1996.
-
-# 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, 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.
-
-if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
-  exit 1
-fi
-
-run=:
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
-
-msg="missing on your system"
-
-case "$1" in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  # Exit code 63 means version mismatch.  This often happens
-  # when the user try to use an ancient version of a tool on
-  # a file that requires a minimum version.  In this case we
-  # we should proceed has if the program had been absent, or
-  # if --run hadn't been passed.
-  if test $? = 63; then
-    run=:
-    msg="probably too old"
-  fi
-  ;;
-
-  -h|--h|--he|--hel|--help)
-    echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
-  -h, --help      display this help and exit
-  -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
-
-Send bug reports to <bug-automake@xxxxxxx>."
-    exit $?
-    ;;
-
-  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing $scriptversion (GNU Automake)"
-    exit $?
-    ;;
-
-  -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
-    exit 1
-    ;;
-
-esac
-
-# Now exit if we have it, but it failed.  Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).
-case "$1" in
-  lex|yacc)
-    # Not GNU programs, they don't have --version.
-    ;;
-
-  tar)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
-  *)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       # Could not run --version or --help.  This is probably someone
-       # running `$TOOL --version' or `$TOOL --help' to check whether
-       # $TOOL exists and not knowing $TOOL uses missing.
-       exit 1
-    fi
-    ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-  aclocal*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case "$f" in
-      *:*) touch_files="$touch_files "`echo "$f" |
-				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-	   sed 's/\.am$/.in/' |
-	   while read f; do touch "$f"; done
-    ;;
-
-  autom4te)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
-    if test -f "$file"; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo "#! /bin/sh"
-	echo "# Created by GNU Automake missing as a replacement of"
-	echo "#  $ $@"
-	echo "exit 0"
-	chmod +x $file
-	exit 1
-    fi
-    ;;
-
-  bison|yacc)
-    echo 1>&2 "\
-WARNING: \`$1' $msg.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-	case "$LASTARG" in
-	*.y)
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-	    if [ -f "$SRCFILE" ]; then
-	         cp "$SRCFILE" y.tab.c
-	    fi
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-	    if [ -f "$SRCFILE" ]; then
-	         cp "$SRCFILE" y.tab.h
-	    fi
-	  ;;
-	esac
-    fi
-    if [ ! -f y.tab.h ]; then
-	echo >y.tab.h
-    fi
-    if [ ! -f y.tab.c ]; then
-	echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex|flex)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-	case "$LASTARG" in
-	*.l)
-	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-	    if [ -f "$SRCFILE" ]; then
-	         cp "$SRCFILE" lex.yy.c
-	    fi
-	  ;;
-	esac
-    fi
-    if [ ! -f lex.yy.c ]; then
-	echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-	 you modified a dependency of a manual page.  You may need the
-	 \`Help2man' package in order for those modifications to take
-	 effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-    fi
-    if [ -f "$file" ]; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo ".ab help2man is required to generate this page"
-	exit 1
-    fi
-    ;;
-
-  makeinfo)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-      # ... or it is the one specified with @setfilename ...
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
-    fi
-    # If the file does not exist, the user really needs makeinfo;
-    # let's fail without touching anything.
-    test -f $file || exit 1
-    touch $file
-    ;;
-
-  tar)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-	case "$firstarg" in
-	*o*)
-	    firstarg=`echo "$firstarg" | sed s/o//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-	case "$firstarg" in
-	*h*)
-	    firstarg=`echo "$firstarg" | sed s/h//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequisites for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
-    ;;
-esac
-
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:

commit 7f6d5f1fc2a03db3238a8f5d1f800e3247cfadc3
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Dec 25 04:58:28 2007 +0000

    Add an autogen.sh to reconfigure the source directory build tools
    
    autogen.sh was copied from gattrib's source directory.

diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..d94ffc3
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,132 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+# This file came from glade-2.0.0 with modifications for gEDA/gaf.  
+# Ales Hvezda 11/09/2003 
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+configure_script=configure.ac
+
+DIE=0
+
+(test -f $srcdir/$configure_script) || {
+    echo -n "**Error**: Directory [ $srcdir ] does not look like the"
+    echo " top-level package directory"
+    exit 1
+}
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: You must have \`autoconf' installed."
+  echo "Download the appropriate package for your distribution,"
+  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/";
+  DIE=1
+}
+
+(grep "^AM_PROG_LIBTOOL" $srcdir/$configure_script >/dev/null) && {
+  (libtool --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`libtool' installed."
+    echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/";
+    DIE=1
+  }
+}
+
+(grep "^AM_GNU_GETTEXT" $srcdir/$configure_script >/dev/null) && {
+  (grep "sed.*POTFILES" $srcdir/$configure_script) > /dev/null || \
+  (autopoint --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`gettext' installed."
+    echo "You can get it from: http://www.gnu.org/software/gettext";
+    DIE=1
+  }
+}
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: You must have \`automake' installed."
+  echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/";
+  DIE=1
+  NO_AUTOMAKE=yes
+}
+
+
+# if no automake, don't bother testing for aclocal
+test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
+  echo "installed doesn't appear recent enough."
+  echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/";
+  DIE=1
+}
+
+if test "$DIE" -eq 1; then
+  exit 1
+fi
+
+# Don't run configure automatically.
+#if test -z "$*"; then
+#  echo "**Warning**: I am going to run \`configure' with no arguments."
+#  echo "If you wish to pass any to it, please specify them on the"
+#  echo \`$0\'" command line."
+#  echo
+#fi
+
+case $CC in
+xlc )
+  am_opt=--include-deps;;
+esac
+
+for coin in $srcdir/$configure_script
+do 
+  dr=`dirname $coin`
+  if test -f $dr/NO-AUTO-GEN; then
+    echo skipping $dr -- flagged as no auto-gen
+  else
+    echo processing $dr
+    ( cd $dr
+
+      aclocalinclude="$ACLOCAL_FLAGS"
+
+      if grep "^AM_GNU_GETTEXT" $configure_script >/dev/null; then
+	echo "autogen.sh running: autopoint ..." 
+	echo "no" | autopoint --force 
+	#echo "Creating $dr/po/Makevars ..."
+        #mv -f $dr/po/Makevars.template $dr/po/Makevars
+      fi
+      if grep "^IT_PROG_INTLTOOL" $configure_script >/dev/null; then
+	echo "autogen.sh running: intltoolize ..."
+	echo "no" | intltoolize --force --copy --automake
+      fi
+      if grep "^AM_PROG_LIBTOOL" $configure_script >/dev/null; then
+	if test -z "$NO_LIBTOOLIZE" ; then 
+	  echo "autogen.sh running: libtoolize ..."
+	  libtoolize --force --copy
+	fi
+      fi
+      echo "autogen.sh running: aclocal $aclocalinclude ..."
+      aclocal $aclocalinclude
+      if grep "^AM_CONFIG_HEADER" $configure_script >/dev/null; then
+	echo "autogen.sh running: autoheader ..."
+	autoheader
+      fi
+      echo "autogen.sh running: automake $am_opt ..."
+      automake --copy --add-missing --gnu $am_opt
+      echo "autogen.sh running: autoconf ..."
+      autoconf 
+    )
+  fi
+done
+
+
+# Don't run configure.
+#conf_flags="--enable-maintainer-mode"
+#
+#if test x$NOCONFIGURE = x; then
+#  echo Running $srcdir/configure $conf_flags "$@" ...
+#  $srcdir/configure $conf_flags "$@" \
+#  && echo Now type \`make\' to compile. || exit 1
+#else
+#  echo Skipping configure process.
+#fi

commit e0b0257b906859df0f875be92629b56b0b51430e
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Dec 25 04:56:24 2007 +0000

    Remove use of AC_CONFIG_AUX_DIR() as it does not play nice with intltool.
    
    intltoolize will try an install the po/Makefile.in.in as a subdir of the
    tools directory, which is not what we want.

diff --git a/.gitignore b/.gitignore
index 00a9e71..790da0b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,5 +8,9 @@ config.log
 config.status
 config.py
 intltool-extract
+intltool-extract.in
 intltool-merge
+intltool-merge.in
 intltool-update
+intltool-update.in
+
diff --git a/Makefile.am b/Makefile.am
index 7a0dc64..11685f3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,9 +32,9 @@ pkglib_PYTHON = lib/xgsch2pcb/pcbmanager.py \
 
 nodist_pkglib_PYTHON = config.py
 
-INTLTOOL_FILES = tools/intltool-extract.in \
-                 tools/intltool-merge.in \
-                 tools/intltool-update.in
+INTLTOOL_FILES = intltool-extract.in \
+                 intltool-merge.in \
+                 intltool-update.in
 
 EXTRA_DIST = xgsch2pcb.in lib/xgsch2pcb/config.py.in \
              $(INTLTOOL_FILES) icon-theme-installer
diff --git a/configure.ac b/configure.ac
index 217e351..afcc449 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,6 @@
 
 AC_PREREQ(2.59)
 AC_INIT([geda-xgsch2pcb], [0.1.1.90], BUG-REPORT-ADDRESS)
-AC_CONFIG_AUX_DIR([tools])
 
 AM_INIT_AUTOMAKE([foreign])
 
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..4d4a951
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,323 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2005-05-14.22
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+chmodcmd="$chmodprog 0755"
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c         (ignored)
+-d         create directories instead of installing files.
+-g GROUP   $chgrpprog installed files to GROUP.
+-m MODE    $chmodprog installed files to MODE.
+-o USER    $chownprog installed files to USER.
+-s         $stripprog installed files.
+-t DIRECTORY  install into DIRECTORY.
+-T         report an error if DSTFILE is a directory.
+--help     display this help and exit.
+--version  display version info and exit.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+  case $1 in
+    -c) shift
+        continue;;
+
+    -d) dir_arg=true
+        shift
+        continue;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+        shift
+        shift
+        continue;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) chmodcmd="$chmodprog $2"
+        shift
+        shift
+        continue;;
+
+    -o) chowncmd="$chownprog $2"
+        shift
+        shift
+        continue;;
+
+    -s) stripcmd=$stripprog
+        shift
+        continue;;
+
+    -t) dstarg=$2
+	shift
+	shift
+	continue;;
+
+    -T) no_target_directory=true
+	shift
+	continue;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    *)  # When -d is used, all remaining arguments are directories to create.
+	# When -t is used, the destination is already specified.
+	test -n "$dir_arg$dstarg" && break
+        # Otherwise, the last argument is the destination.  Remove it from $@.
+	for arg
+	do
+          if test -n "$dstarg"; then
+	    # $@ is not empty: it contains at least $arg.
+	    set fnord "$@" "$dstarg"
+	    shift # fnord
+	  fi
+	  shift # arg
+	  dstarg=$arg
+	done
+	break;;
+  esac
+done
+
+if test -z "$1"; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call `install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+for src
+do
+  # Protect names starting with `-'.
+  case $src in
+    -*) src=./$src ;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    src=
+
+    if test -d "$dst"; then
+      mkdircmd=:
+      chmodcmd=
+    else
+      mkdircmd=$mkdirprog
+    fi
+  else
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dstarg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+
+    dst=$dstarg
+    # Protect names starting with `-'.
+    case $dst in
+      -*) dst=./$dst ;;
+    esac
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dstarg: Is a directory" >&2
+	exit 1
+      fi
+      dst=$dst/`basename "$src"`
+    fi
+  fi
+
+  # This sed command emulates the dirname command.
+  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+  # Make sure that the destination directory exists.
+
+  # Skip lots of stat calls in the usual case.
+  if test ! -d "$dstdir"; then
+    defaultIFS='
+	 '
+    IFS="${IFS-$defaultIFS}"
+
+    oIFS=$IFS
+    # Some sh's can't handle IFS=/ for some reason.
+    IFS='%'
+    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+    shift
+    IFS=$oIFS
+
+    pathcomp=
+
+    while test $# -ne 0 ; do
+      pathcomp=$pathcomp$1
+      shift
+      if test ! -d "$pathcomp"; then
+        $mkdirprog "$pathcomp"
+	# mkdir can fail with a `File exist' error in case several
+	# install-sh are creating the directory concurrently.  This
+	# is OK.
+	test -d "$pathcomp" || exit
+      fi
+      pathcomp=$pathcomp/
+    done
+  fi
+
+  if test -n "$dir_arg"; then
+    $doit $mkdircmd "$dst" \
+      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+  else
+    dstfile=`basename "$dst"`
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+    trap '(exit $?); exit' 1 2 13 15
+
+    # Copy the file name to the temp name.
+    $doit $cpprog "$src" "$dsttmp" &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+    # Now rename the file to the real destination.
+    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+      || {
+	   # The rename failed, perhaps because mv can't rename something else
+	   # to itself, or perhaps because mv is so ancient that it does not
+	   # support -f.
+
+	   # Now remove or move aside any old file at destination location.
+	   # We try this two ways since rm can't unlink itself on some
+	   # systems and the destination file might be busy for other
+	   # reasons.  In this case, the final cleanup might fail but the new
+	   # file should still install successfully.
+	   {
+	     if test -f "$dstdir/$dstfile"; then
+	       $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+	       || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+	       || {
+		 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+		 (exit 1); exit 1
+	       }
+	     else
+	       :
+	     fi
+	   } &&
+
+	   # Now rename the file to the real destination.
+	   $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+	 }
+    }
+  fi || { (exit 1); exit 1; }
+done
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+  (exit 0); exit 0
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/intltool-extract.in b/intltool-extract.in
new file mode 100644
index 0000000..7b83435
--- /dev/null
+++ b/intltool-extract.in
@@ -0,0 +1,861 @@
+#!@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@xxxxxxx>
+#           Darin Adler <darin@xxxxxxxxxxxxx>
+#
+
+## Release information
+my $PROGRAM      = "intltool-extract";
+my $PACKAGE      = "intltool";
+my $VERSION      = "0.36.2";
+
+## 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"
+  -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";
+}
+
+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_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..e5671d7
--- /dev/null
+++ b/intltool-merge.in
@@ -0,0 +1,1451 @@
+#!@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@xxxxxxxxxxxxxx>
+#            Kenneth Christiansen <kenneth@xxxxxxx>
+#            Darin Adler <darin@xxxxxxxxxxxxx>
+#
+#  Proper XML UTF-8'ification written by Cyrille Chepelov <chepelov@xxxxxxxxxx>
+#
+
+## Release information
+my $PROGRAM = "intltool-merge";
+my $PACKAGE = "intltool";
+my $VERSION = "0.36.2";
+
+## 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 $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,
+ "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 && @ARGV > 2) 
+{
+	&utf8_sanity_check;
+	&preparation;
+	&print_message;
+	&quoted_merge_translations;
+	&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
+  -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 /^#/;
+
+                if (/([-a-zA-Z_@.]+)\n/)
+                {
+                    my $lang = $1;
+
+                    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 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;
+        }
+    } 
+    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_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+)=.*/[$lang]$1=$translation/;
+                print OUTPUT;
+            }
+	} 
+        else 
+        {
+            print OUTPUT;
+        }
+    }
+
+    close OUTPUT;
+    close INPUT;
+}
+
+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 ($lang, $string) = @_;
+
+    $string =~ s/\\\"/\"/g;
+
+    my $translation = $translations{$lang, $string};
+    $translation = $string if !$translation;
+
+    $translation =~ s/\"/\\\"/g;
+    return $translation
+}
+
+sub quoted_merge_translations
+{
+    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($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..bffd10f
--- /dev/null
+++ b/intltool-update.in
@@ -0,0 +1,1164 @@
+#!@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@xxxxxxx>
+#           Maciej Stachowiak
+#           Darin Adler <darin@xxxxxxxxxxxxx>
+
+## Release information
+my $PROGRAM = "intltool-update";
+my $VERSION = "0.36.2";
+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/..";
+
+    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;
+	    }
+
+            ## N_ Q_ and _ are the three macros defined in gi8n.h
+	    if (/[NQ]?_ *\(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;
+    }
+
+    $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/missing b/missing
new file mode 100755
index 0000000..894e786
--- /dev/null
+++ b/missing
@@ -0,0 +1,360 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2005-06-08.21
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+#   Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@xxxxxxxxxxxxxxxx>, 1996.
+
+# 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, 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.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case "$1" in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  # Exit code 63 means version mismatch.  This often happens
+  # when the user try to use an ancient version of a tool on
+  # a file that requires a minimum version.  In this case we
+  # we should proceed has if the program had been absent, or
+  # if --run hadn't been passed.
+  if test $? = 63; then
+    run=:
+    msg="probably too old"
+  fi
+  ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@xxxxxxx>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Now exit if we have it, but it failed.  Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case "$1" in
+  lex|yacc)
+    # Not GNU programs, they don't have --version.
+    ;;
+
+  tar)
+    if test -n "$run"; then
+       echo 1>&2 "ERROR: \`tar' requires --run"
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       exit 1
+    fi
+    ;;
+
+  *)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+       # Could not run --version or --help.  This is probably someone
+       # running `$TOOL --version' or `$TOOL --help' to check whether
+       # $TOOL exists and not knowing $TOOL uses missing.
+       exit 1
+    fi
+    ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+  aclocal*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' $msg.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -f "$file" ]; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    echo 1>&2 "\
+WARNING: \`$1' is $msg.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    # The file to touch is that specified with -o ...
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      # ... or it is the one specified with @setfilename ...
+      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+      # ... or it is derived from the source name (dir/f.texi becomes f.info)
+      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+    fi
+    # If the file does not exist, the user really needs makeinfo;
+    # let's fail without touching anything.
+    test -f $file || exit 1
+    touch $file
+    ;;
+
+  tar)
+    shift
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case "$firstarg" in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case "$firstarg" in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+         You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequisites for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/py-compile b/py-compile
new file mode 100755
index 0000000..d6e900b
--- /dev/null
+++ b/py-compile
@@ -0,0 +1,146 @@
+#!/bin/sh
+# py-compile - Compile a Python program
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 2000, 2001, 2003, 2004, 2005  Free Software Foundation, Inc.
+
+# 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, 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.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@xxxxxxx> or send patches to
+# <automake-patches@xxxxxxx>.
+
+if [ -z "$PYTHON" ]; then
+  PYTHON=python
+fi
+
+basedir=
+destdir=
+files=
+while test $# -ne 0; do
+  case "$1" in
+    --basedir)
+      basedir=$2
+      if test -z "$basedir"; then
+        echo "$0: Missing argument to --basedir." 1>&2
+        exit 1
+      fi
+      shift
+      ;;
+    --destdir)
+      destdir=$2
+      if test -z "$destdir"; then
+        echo "$0: Missing argument to --destdir." 1>&2
+        exit 1
+      fi
+      shift
+      ;;
+    -h|--h*)
+      cat <<\EOF
+Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
+
+Byte compile some python scripts FILES.  Use --destdir to specify any
+leading directory path to the FILES that you don't want to include in the
+byte compiled file.  Specify --basedir for any additional path information you
+do want to be shown in the byte compiled file.
+
+Example:
+  py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py
+
+Report bugs to <bug-automake@xxxxxxx>.
+EOF
+      exit $?
+      ;;
+    -v|--v*)
+      echo "py-compile $scriptversion"
+      exit $?
+      ;;
+    *)
+      files="$files $1"
+      ;;
+  esac
+  shift
+done
+
+if test -z "$files"; then
+    echo "$0: No files given.  Try \`$0 --help' for more information." 1>&2
+    exit 1
+fi
+
+# if basedir was given, then it should be prepended to filenames before
+# byte compilation.
+if [ -z "$basedir" ]; then
+    pathtrans="path = file"
+else
+    pathtrans="path = os.path.join('$basedir', file)"
+fi
+
+# if destdir was given, then it needs to be prepended to the filename to
+# byte compile but not go into the compiled file.
+if [ -z "$destdir" ]; then
+    filetrans="filepath = path"
+else
+    filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
+fi
+
+$PYTHON -c "
+import sys, os, string, py_compile
+
+files = '''$files'''
+
+print 'Byte-compiling python modules...'
+for file in string.split(files):
+    $pathtrans
+    $filetrans
+    if not os.path.exists(filepath) or not (len(filepath) >= 3
+                                            and filepath[-3:] == '.py'):
+	continue
+    print file,
+    sys.stdout.flush()
+    py_compile.compile(filepath, filepath + 'c', path)
+print" || exit $?
+
+# this will fail for python < 1.5, but that doesn't matter ...
+$PYTHON -O -c "
+import sys, os, string, py_compile
+
+files = '''$files'''
+print 'Byte-compiling python modules (optimized versions) ...'
+for file in string.split(files):
+    $pathtrans
+    $filetrans
+    if not os.path.exists(filepath) or not (len(filepath) >= 3
+                                            and filepath[-3:] == '.py'):
+	continue
+    print file,
+    sys.stdout.flush()
+    py_compile.compile(filepath, filepath + 'o', path)
+print" 2>/dev/null || :
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/tools/install-sh b/tools/install-sh
deleted file mode 100755
index 4d4a951..0000000
--- a/tools/install-sh
+++ /dev/null
@@ -1,323 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2005-05-14.22
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.  It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-chmodcmd="$chmodprog 0755"
-chowncmd=
-chgrpcmd=
-stripcmd=
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=
-dst=
-dir_arg=
-dstarg=
-no_target_directory=
-
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
-   or: $0 [OPTION]... SRCFILES... DIRECTORY
-   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
-   or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
--c         (ignored)
--d         create directories instead of installing files.
--g GROUP   $chgrpprog installed files to GROUP.
--m MODE    $chmodprog installed files to MODE.
--o USER    $chownprog installed files to USER.
--s         $stripprog installed files.
--t DIRECTORY  install into DIRECTORY.
--T         report an error if DSTFILE is a directory.
---help     display this help and exit.
---version  display version info and exit.
-
-Environment variables override the default commands:
-  CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
-"
-
-while test -n "$1"; do
-  case $1 in
-    -c) shift
-        continue;;
-
-    -d) dir_arg=true
-        shift
-        continue;;
-
-    -g) chgrpcmd="$chgrpprog $2"
-        shift
-        shift
-        continue;;
-
-    --help) echo "$usage"; exit $?;;
-
-    -m) chmodcmd="$chmodprog $2"
-        shift
-        shift
-        continue;;
-
-    -o) chowncmd="$chownprog $2"
-        shift
-        shift
-        continue;;
-
-    -s) stripcmd=$stripprog
-        shift
-        continue;;
-
-    -t) dstarg=$2
-	shift
-	shift
-	continue;;
-
-    -T) no_target_directory=true
-	shift
-	continue;;
-
-    --version) echo "$0 $scriptversion"; exit $?;;
-
-    *)  # When -d is used, all remaining arguments are directories to create.
-	# When -t is used, the destination is already specified.
-	test -n "$dir_arg$dstarg" && break
-        # Otherwise, the last argument is the destination.  Remove it from $@.
-	for arg
-	do
-          if test -n "$dstarg"; then
-	    # $@ is not empty: it contains at least $arg.
-	    set fnord "$@" "$dstarg"
-	    shift # fnord
-	  fi
-	  shift # arg
-	  dstarg=$arg
-	done
-	break;;
-  esac
-done
-
-if test -z "$1"; then
-  if test -z "$dir_arg"; then
-    echo "$0: no input file specified." >&2
-    exit 1
-  fi
-  # It's OK to call `install-sh -d' without argument.
-  # This can happen when creating conditional directories.
-  exit 0
-fi
-
-for src
-do
-  # Protect names starting with `-'.
-  case $src in
-    -*) src=./$src ;;
-  esac
-
-  if test -n "$dir_arg"; then
-    dst=$src
-    src=
-
-    if test -d "$dst"; then
-      mkdircmd=:
-      chmodcmd=
-    else
-      mkdircmd=$mkdirprog
-    fi
-  else
-    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
-    # might cause directories to be created, which would be especially bad
-    # if $src (and thus $dsttmp) contains '*'.
-    if test ! -f "$src" && test ! -d "$src"; then
-      echo "$0: $src does not exist." >&2
-      exit 1
-    fi
-
-    if test -z "$dstarg"; then
-      echo "$0: no destination specified." >&2
-      exit 1
-    fi
-
-    dst=$dstarg
-    # Protect names starting with `-'.
-    case $dst in
-      -*) dst=./$dst ;;
-    esac
-
-    # If destination is a directory, append the input filename; won't work
-    # if double slashes aren't ignored.
-    if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-	echo "$0: $dstarg: Is a directory" >&2
-	exit 1
-      fi
-      dst=$dst/`basename "$src"`
-    fi
-  fi
-
-  # This sed command emulates the dirname command.
-  dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
-
-  # Make sure that the destination directory exists.
-
-  # Skip lots of stat calls in the usual case.
-  if test ! -d "$dstdir"; then
-    defaultIFS='
-	 '
-    IFS="${IFS-$defaultIFS}"
-
-    oIFS=$IFS
-    # Some sh's can't handle IFS=/ for some reason.
-    IFS='%'
-    set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-    shift
-    IFS=$oIFS
-
-    pathcomp=
-
-    while test $# -ne 0 ; do
-      pathcomp=$pathcomp$1
-      shift
-      if test ! -d "$pathcomp"; then
-        $mkdirprog "$pathcomp"
-	# mkdir can fail with a `File exist' error in case several
-	# install-sh are creating the directory concurrently.  This
-	# is OK.
-	test -d "$pathcomp" || exit
-      fi
-      pathcomp=$pathcomp/
-    done
-  fi
-
-  if test -n "$dir_arg"; then
-    $doit $mkdircmd "$dst" \
-      && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
-  else
-    dstfile=`basename "$dst"`
-
-    # Make a couple of temp file names in the proper directory.
-    dsttmp=$dstdir/_inst.$$_
-    rmtmp=$dstdir/_rm.$$_
-
-    # Trap to clean up those temp files at exit.
-    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-    trap '(exit $?); exit' 1 2 13 15
-
-    # Copy the file name to the temp name.
-    $doit $cpprog "$src" "$dsttmp" &&
-
-    # and set any options; do chmod last to preserve setuid bits.
-    #
-    # If any of these fail, we abort the whole thing.  If we want to
-    # ignore errors from any of these, just make sure not to ignore
-    # errors from the above "$doit $cpprog $src $dsttmp" command.
-    #
-    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
-      && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
-      && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
-      && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
-
-    # Now rename the file to the real destination.
-    { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
-      || {
-	   # The rename failed, perhaps because mv can't rename something else
-	   # to itself, or perhaps because mv is so ancient that it does not
-	   # support -f.
-
-	   # Now remove or move aside any old file at destination location.
-	   # We try this two ways since rm can't unlink itself on some
-	   # systems and the destination file might be busy for other
-	   # reasons.  In this case, the final cleanup might fail but the new
-	   # file should still install successfully.
-	   {
-	     if test -f "$dstdir/$dstfile"; then
-	       $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
-	       || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
-	       || {
-		 echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
-		 (exit 1); exit 1
-	       }
-	     else
-	       :
-	     fi
-	   } &&
-
-	   # Now rename the file to the real destination.
-	   $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
-	 }
-    }
-  fi || { (exit 1); exit 1; }
-done
-
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
-  (exit 0); exit 0
-}
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/tools/intltool-extract.in b/tools/intltool-extract.in
deleted file mode 100644
index 7b83435..0000000
--- a/tools/intltool-extract.in
+++ /dev/null
@@ -1,861 +0,0 @@
-#!@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@xxxxxxx>
-#           Darin Adler <darin@xxxxxxxxxxxxx>
-#
-
-## Release information
-my $PROGRAM      = "intltool-extract";
-my $PACKAGE      = "intltool";
-my $VERSION      = "0.36.2";
-
-## 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"
-  -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";
-}
-
-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_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/tools/intltool-merge.in b/tools/intltool-merge.in
deleted file mode 100644
index e5671d7..0000000
--- a/tools/intltool-merge.in
+++ /dev/null
@@ -1,1451 +0,0 @@
-#!@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@xxxxxxxxxxxxxx>
-#            Kenneth Christiansen <kenneth@xxxxxxx>
-#            Darin Adler <darin@xxxxxxxxxxxxx>
-#
-#  Proper XML UTF-8'ification written by Cyrille Chepelov <chepelov@xxxxxxxxxx>
-#
-
-## Release information
-my $PROGRAM = "intltool-merge";
-my $PACKAGE = "intltool";
-my $VERSION = "0.36.2";
-
-## 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 $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,
- "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 && @ARGV > 2) 
-{
-	&utf8_sanity_check;
-	&preparation;
-	&print_message;
-	&quoted_merge_translations;
-	&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
-  -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 /^#/;
-
-                if (/([-a-zA-Z_@.]+)\n/)
-                {
-                    my $lang = $1;
-
-                    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 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;
-        }
-    } 
-    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_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+)=.*/[$lang]$1=$translation/;
-                print OUTPUT;
-            }
-	} 
-        else 
-        {
-            print OUTPUT;
-        }
-    }
-
-    close OUTPUT;
-    close INPUT;
-}
-
-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 ($lang, $string) = @_;
-
-    $string =~ s/\\\"/\"/g;
-
-    my $translation = $translations{$lang, $string};
-    $translation = $string if !$translation;
-
-    $translation =~ s/\"/\\\"/g;
-    return $translation
-}
-
-sub quoted_merge_translations
-{
-    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($lang, $1) . "\""/ge;
-            print OUTPUT;
-        }
-        close OUTPUT;
-        close INPUT;
-    }
-}
diff --git a/tools/intltool-update.in b/tools/intltool-update.in
deleted file mode 100644
index bffd10f..0000000
--- a/tools/intltool-update.in
+++ /dev/null
@@ -1,1164 +0,0 @@
-#!@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@xxxxxxx>
-#           Maciej Stachowiak
-#           Darin Adler <darin@xxxxxxxxxxxxx>
-
-## Release information
-my $PROGRAM = "intltool-update";
-my $VERSION = "0.36.2";
-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/..";
-
-    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;
-	    }
-
-            ## N_ Q_ and _ are the three macros defined in gi8n.h
-	    if (/[NQ]?_ *\(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;
-    }
-
-    $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/tools/missing b/tools/missing
deleted file mode 100755
index 894e786..0000000
--- a/tools/missing
+++ /dev/null
@@ -1,360 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2005-06-08.21
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
-#   Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@xxxxxxxxxxxxxxxx>, 1996.
-
-# 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, 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.
-
-if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
-  exit 1
-fi
-
-run=:
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
-
-msg="missing on your system"
-
-case "$1" in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  # Exit code 63 means version mismatch.  This often happens
-  # when the user try to use an ancient version of a tool on
-  # a file that requires a minimum version.  In this case we
-  # we should proceed has if the program had been absent, or
-  # if --run hadn't been passed.
-  if test $? = 63; then
-    run=:
-    msg="probably too old"
-  fi
-  ;;
-
-  -h|--h|--he|--hel|--help)
-    echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
-  -h, --help      display this help and exit
-  -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  tar          try tar, gnutar, gtar, then tar without non-portable flags
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
-
-Send bug reports to <bug-automake@xxxxxxx>."
-    exit $?
-    ;;
-
-  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing $scriptversion (GNU Automake)"
-    exit $?
-    ;;
-
-  -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
-    exit 1
-    ;;
-
-esac
-
-# Now exit if we have it, but it failed.  Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).
-case "$1" in
-  lex|yacc)
-    # Not GNU programs, they don't have --version.
-    ;;
-
-  tar)
-    if test -n "$run"; then
-       echo 1>&2 "ERROR: \`tar' requires --run"
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       exit 1
-    fi
-    ;;
-
-  *)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       # Could not run --version or --help.  This is probably someone
-       # running `$TOOL --version' or `$TOOL --help' to check whether
-       # $TOOL exists and not knowing $TOOL uses missing.
-       exit 1
-    fi
-    ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-  aclocal*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case "$f" in
-      *:*) touch_files="$touch_files "`echo "$f" |
-				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
-
-  automake*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-	   sed 's/\.am$/.in/' |
-	   while read f; do touch "$f"; done
-    ;;
-
-  autom4te)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
-    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
-    if test -f "$file"; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo "#! /bin/sh"
-	echo "# Created by GNU Automake missing as a replacement of"
-	echo "#  $ $@"
-	echo "exit 0"
-	chmod +x $file
-	exit 1
-    fi
-    ;;
-
-  bison|yacc)
-    echo 1>&2 "\
-WARNING: \`$1' $msg.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-	case "$LASTARG" in
-	*.y)
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-	    if [ -f "$SRCFILE" ]; then
-	         cp "$SRCFILE" y.tab.c
-	    fi
-	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-	    if [ -f "$SRCFILE" ]; then
-	         cp "$SRCFILE" y.tab.h
-	    fi
-	  ;;
-	esac
-    fi
-    if [ ! -f y.tab.h ]; then
-	echo >y.tab.h
-    fi
-    if [ ! -f y.tab.c ]; then
-	echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex|flex)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if [ $# -ne 1 ]; then
-        eval LASTARG="\${$#}"
-	case "$LASTARG" in
-	*.l)
-	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-	    if [ -f "$SRCFILE" ]; then
-	         cp "$SRCFILE" lex.yy.c
-	    fi
-	  ;;
-	esac
-    fi
-    if [ ! -f lex.yy.c ]; then
-	echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-	 you modified a dependency of a manual page.  You may need the
-	 \`Help2man' package in order for those modifications to take
-	 effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
-    fi
-    if [ -f "$file" ]; then
-	touch $file
-    else
-	test -z "$file" || exec >$file
-	echo ".ab help2man is required to generate this page"
-	exit 1
-    fi
-    ;;
-
-  makeinfo)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
-    if test -z "$file"; then
-      # ... or it is the one specified with @setfilename ...
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
-    fi
-    # If the file does not exist, the user really needs makeinfo;
-    # let's fail without touching anything.
-    test -f $file || exit 1
-    touch $file
-    ;;
-
-  tar)
-    shift
-
-    # We have already tried tar in the generic part.
-    # Look for gnutar/gtar before invocation to avoid ugly error
-    # messages.
-    if (gnutar --version > /dev/null 2>&1); then
-       gnutar "$@" && exit 0
-    fi
-    if (gtar --version > /dev/null 2>&1); then
-       gtar "$@" && exit 0
-    fi
-    firstarg="$1"
-    if shift; then
-	case "$firstarg" in
-	*o*)
-	    firstarg=`echo "$firstarg" | sed s/o//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-	case "$firstarg" in
-	*h*)
-	    firstarg=`echo "$firstarg" | sed s/h//`
-	    tar "$firstarg" "$@" && exit 0
-	    ;;
-	esac
-    fi
-
-    echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
-         You may want to install GNU tar or Free paxutils, or check the
-         command line arguments."
-    exit 1
-    ;;
-
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequisites for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
-    ;;
-esac
-
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/tools/py-compile b/tools/py-compile
deleted file mode 100755
index d6e900b..0000000
--- a/tools/py-compile
+++ /dev/null
@@ -1,146 +0,0 @@
-#!/bin/sh
-# py-compile - Compile a Python program
-
-scriptversion=2005-05-14.22
-
-# Copyright (C) 2000, 2001, 2003, 2004, 2005  Free Software Foundation, Inc.
-
-# 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, 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., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, 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.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@xxxxxxx> or send patches to
-# <automake-patches@xxxxxxx>.
-
-if [ -z "$PYTHON" ]; then
-  PYTHON=python
-fi
-
-basedir=
-destdir=
-files=
-while test $# -ne 0; do
-  case "$1" in
-    --basedir)
-      basedir=$2
-      if test -z "$basedir"; then
-        echo "$0: Missing argument to --basedir." 1>&2
-        exit 1
-      fi
-      shift
-      ;;
-    --destdir)
-      destdir=$2
-      if test -z "$destdir"; then
-        echo "$0: Missing argument to --destdir." 1>&2
-        exit 1
-      fi
-      shift
-      ;;
-    -h|--h*)
-      cat <<\EOF
-Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
-
-Byte compile some python scripts FILES.  Use --destdir to specify any
-leading directory path to the FILES that you don't want to include in the
-byte compiled file.  Specify --basedir for any additional path information you
-do want to be shown in the byte compiled file.
-
-Example:
-  py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py
-
-Report bugs to <bug-automake@xxxxxxx>.
-EOF
-      exit $?
-      ;;
-    -v|--v*)
-      echo "py-compile $scriptversion"
-      exit $?
-      ;;
-    *)
-      files="$files $1"
-      ;;
-  esac
-  shift
-done
-
-if test -z "$files"; then
-    echo "$0: No files given.  Try \`$0 --help' for more information." 1>&2
-    exit 1
-fi
-
-# if basedir was given, then it should be prepended to filenames before
-# byte compilation.
-if [ -z "$basedir" ]; then
-    pathtrans="path = file"
-else
-    pathtrans="path = os.path.join('$basedir', file)"
-fi
-
-# if destdir was given, then it needs to be prepended to the filename to
-# byte compile but not go into the compiled file.
-if [ -z "$destdir" ]; then
-    filetrans="filepath = path"
-else
-    filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
-fi
-
-$PYTHON -c "
-import sys, os, string, py_compile
-
-files = '''$files'''
-
-print 'Byte-compiling python modules...'
-for file in string.split(files):
-    $pathtrans
-    $filetrans
-    if not os.path.exists(filepath) or not (len(filepath) >= 3
-                                            and filepath[-3:] == '.py'):
-	continue
-    print file,
-    sys.stdout.flush()
-    py_compile.compile(filepath, filepath + 'c', path)
-print" || exit $?
-
-# this will fail for python < 1.5, but that doesn't matter ...
-$PYTHON -O -c "
-import sys, os, string, py_compile
-
-files = '''$files'''
-print 'Byte-compiling python modules (optimized versions) ...'
-for file in string.split(files):
-    $pathtrans
-    $filetrans
-    if not os.path.exists(filepath) or not (len(filepath) >= 3
-                                            and filepath[-3:] == '.py'):
-	continue
-    print file,
-    sys.stdout.flush()
-    py_compile.compile(filepath, filepath + 'o', path)
-print" 2>/dev/null || :
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs