aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2015-03-01 19:04:32 +0100
committerMartin Kaiser <wireshark@kaiser.cx>2015-03-07 18:26:12 +0000
commit7d01a84d0e2833f685b7e70c3a52097891286566 (patch)
treedbbbc2f21284c35f95267b42907933c2b9f1246d /configure.ac
parent9b19d9a5f8b2d68634e2d64d3bc5235cf3f7e720 (diff)
[Qt translations] create the .qm files during the build
create the .qm files from the .ts files at compile time for now, this works for autotools only don't fail if Qt's lrelease tool is not available, skip building the .qm files in this case Change-Id: I869a6dc8220eb03e7ffc8bfdb2b6f3930f6cac72 Reviewed-on: https://code.wireshark.org/review/7460 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac23
1 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 06a3d890d4..11e90e0c5f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1877,6 +1877,29 @@ then
fi
AC_SUBST(RCC)
+AC_PATH_PROG(LRELEASE, lrelease)
+if test "x$LRELEASE" = x; then
+ AC_PATH_PROG(LRELEASE, lrelease-qt5)
+ if test "x$LRELEASE" = x; then
+ AC_PATH_PROG(LRELEASE, lrelease-qt4)
+ fi
+fi
+# Debian/Ubuntu ship a package qtchooser that installs placeholders for
+# the Qt tools like lrelease - check if the lrelease that we found is
+# really the one that's part of Qt linguist
+if (test "x$LRELEASE" != x) ; then
+ AC_MSG_CHECKING([if $LRELEASE is usable])
+ if (sh -c $LRELEASE -help 2> /dev/null | grep -i linguist 2>&1 > /dev/null ) ; then
+ AC_MSG_RESULT(yes)
+ have_lrelease="yes"
+ AC_SUBST(LRELEASE)
+ else
+ AC_MSG_RESULT(no)
+ have_lrelease="no"
+ fi
+fi
+AM_CONDITIONAL(HAVE_LRELEASE, test "x$have_lrelease" = "xyes")
+
# Error out if a glib header other than a "top level" header
# (glib.h, glib-object.h, gio.h) or certain other headers( e.g.,gmodule.h)
# is used.