[PATCH] configure: Check if version of msgfmt (from gettext) is recent enough by checking features (try 2).
Christian Costa
titan.costa at gmail.com
Mon Mar 5 13:00:20 CST 2012
Now just check features rather than version number.
---
configure.ac | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0b68774..e04bea8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -284,6 +284,25 @@ AC_CHECK_PROGS(CONVERT, convert, false)
AC_CHECK_PROGS(ICOTOOL, icotool, false)
AC_CHECK_PROGS(MSGFMT, msgfmt, false)
+dnl Check the msgfmt version
+if test "$MSGFMT" = "msgfmt"
+then
+ AC_MSG_CHECKING([whether msgfmt (from gettext) is recent enough])
+ cat >conftest.po <<EOF
+# comment
+msgctxt "ctxt"
+msgid "id"
+msgstr "str"
+EOF
+ if msgfmt conftest.po >/dev/null 2>&AS_MESSAGE_LOG_FD
+ then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ MSGFMT=false
+ fi
+fi
+
if test "x$enable_maintainer_mode" != "xyes"
then
AC_SUBST([MAINTAINER_MODE],[\#])
@@ -350,7 +369,7 @@ fi
test "x$with_gettext" != xno || MSGFMT=false
WINE_WARNING_WITH(gettext,[test "$MSGFMT" = false],
- [gettext tools not found, translations won't be built.])
+ [gettext tools not found (or too old), translations won't be built.])
dnl **** Check for some libraries ****
More information about the wine-patches
mailing list