summaryrefslogtreecommitdiff
path: root/intltool.m4
diff options
context:
space:
mode:
authordobey <>2007-10-31 03:41:26 +0000
committerdobey <>2007-10-31 03:41:26 +0000
commitbf57de750941b5fd58fa3a869236cd4bd5d6ad79 (patch)
treeaadca322f477b869ae4c01b59c72ab1ec8a24152 /intltool.m4
parentbaebe233dc7b3f8d6028f763023ad84dfce4624a (diff)
downloadintltool-bf57de750941b5fd58fa3a869236cd4bd5d6ad79.tar.gz
2007-10-31 Rodney Dawes <dobey.pwns@gmail.com>
* intltool.m4: Add a block to check for GNU gettext tools and fail if the scripts aren't found and aren't GNU versions Fixes #490845
Diffstat (limited to 'intltool.m4')
-rw-r--r--intltool.m414
1 files changed, 14 insertions, 0 deletions
diff --git a/intltool.m4 b/intltool.m4
index 115b993..f27ec0f 100644
--- a/intltool.m4
+++ b/intltool.m4
@@ -87,6 +87,20 @@ AC_SUBST(INTLTOOL_THEME_RULE)
AC_SUBST(INTLTOOL_SERVICE_RULE)
AC_SUBST(INTLTOOL_POLICY_RULE)
+# Check the gettext tools to make sure they are GNU
+AC_PATH_PROG(XGETTEXT, xgettext)
+AC_PATH_PROG(MSGMERGE, msgmerge)
+AC_PATH_PROG(MSGFMT, msgfmt)
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+ AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+ AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+
# Use the tools built into the package, not the ones that are installed.
AC_SUBST(INTLTOOL_EXTRACT, '$(top_builddir)/intltool-extract')
AC_SUBST(INTLTOOL_MERGE, '$(top_builddir)/intltool-merge')