# HG changeset patch
# User Mark Doliner <mark@kingant.net>
# Date 1252188512 0
# Node ID a709dc0bb3f3ff73c1aa60cd82e3b8b94d3251cc
# Parent  52d7605300733e6f8d6780f80dfadccaadfa8d3d
Add a sed line to our autogen.sh script to hopefully avoid ever creating
tarballs without working languages in the future.  Fixes #9520.

diff -r 52d760530073 -r a709dc0bb3f3 autogen.sh
--- a/autogen.sh	Sat Sep 05 20:01:46 2009 +0000
+++ b/autogen.sh	Sat Sep 05 22:08:32 2009 +0000
@@ -129,6 +129,7 @@
 check "$libtoolize";		LIBTOOLIZE=${BIN};
 check "glib-gettextize";	GLIB_GETTEXTIZE=${BIN};
 check "intltoolize";		INTLTOOLIZE=${BIN};
+check "sed";				SED=${BIN};
 check "aclocal";		ACLOCAL=${BIN};
 check "autoheader";		AUTOHEADER=${BIN};
 check "automake";		AUTOMAKE=${BIN};
@@ -140,6 +141,9 @@
 run_or_die ${LIBTOOLIZE} ${LIBTOOLIZE_FLAGS:-"-c -f --automake"}
 run_or_die ${GLIB_GETTEXTIZE} ${GLIB_GETTEXTIZE_FLAGS:-"--force --copy"}
 run_or_die ${INTLTOOLIZE} ${INTLTOOLIZE_FLAGS:-"-c -f --automake"}
+# This call to sed is needed to work around an annoying bug in intltool 0.40.6
+# See http://developer.pidgin.im/ticket/9520 for details
+run_or_die ${SED} "s:'\^\$\$lang\$\$':\^\$\$lang\$\$:g" -i po/Makefile.in.in
 run_or_die ${ACLOCAL} ${ACLOCAL_FLAGS:-"-I m4macros"}
 run_or_die ${AUTOHEADER} ${AUTOHEADER_FLAGS}
 run_or_die ${AUTOMAKE} ${AUTOMAKE_FLAGS:-"-a -c --gnu"}