summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2010-12-22 16:32:29 +0000
committerEmmanuele Bassi <ebassi@linux.intel.com>2010-12-22 16:32:58 +0000
commitfa27bc38dbc9dce562c1181120659f03f1de24c9 (patch)
tree354d8dd09415ec54ce12c1e9e91a4db08949e766 /build
parent48eccd785155710caef8420f61e12c831801e1de (diff)
downloadclutter-gtk-fa27bc38dbc9dce562c1181120659f03f1de24c9.tar.gz
build: Use gettext
Diffstat (limited to 'build')
-rw-r--r--build/autotools/Makefile.am1
-rw-r--r--build/autotools/as-linguas.m424
2 files changed, 25 insertions, 0 deletions
diff --git a/build/autotools/Makefile.am b/build/autotools/Makefile.am
index ac9e454..7e66517 100644
--- a/build/autotools/Makefile.am
+++ b/build/autotools/Makefile.am
@@ -1,4 +1,5 @@
EXTRA_DIST = \
introspection.m4 \
as-compiler-flag.m4 \
+ as-linguas.m4 \
Makefile.am.silent
diff --git a/build/autotools/as-linguas.m4 b/build/autotools/as-linguas.m4
new file mode 100644
index 0000000..92b28f7
--- /dev/null
+++ b/build/autotools/as-linguas.m4
@@ -0,0 +1,24 @@
+# Set ALL_ALL_LINGUAS based on the .po files present. Optional argument is the
+# name of the po directory. $podir/LINGUAS.ignore can be used to ignore a
+# subset of the po files.
+
+AC_DEFUN([AS_ALL_LINGUAS],
+[
+ AC_MSG_CHECKING([for linguas])
+ podir="m4_default([$1],[$srcdir/po])"
+ linguas=`cd $podir && ls *.po 2>/dev/null | awk 'BEGIN { FS="."; ORS=" " } { print $[]1 }'`
+ if test -f "$podir/LINGUAS.ignore"; then
+ ALL_LINGUAS="";
+ ignore_linguas=`sed -n -e 's/^\s\+\|\s\+$//g' -e '/^#/b' -e '/\S/!b' \
+ -e 's/\s\+/\n/g' -e p "$podir/LINGUAS.ignore"`;
+ for lang in $linguas; do
+ if ! echo "$ignore_linguas" | grep -q "^${lang}$"; then
+ ALL_LINGUAS="$ALL_LINGUAS $lang";
+ fi;
+ done;
+ else
+ ALL_LINGUAS="$linguas";
+ fi;
+ AC_SUBST([ALL_LINGUAS])
+ AC_MSG_RESULT($ALL_LINGUAS)
+])