summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-02-10 15:12:36 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2023-02-10 21:16:34 +0000
commit9fbcf60c51f9bc553c6e6e0204fac975a87ebf13 (patch)
treeaf21560e60f7e94a19ed70ca8f1836da9bc27eed /configure.ac
parentd367cefb0281767762b1671c03b3852cf3d1b7ab (diff)
qt6 configure: Add moc version check
This way, it is determined at configure time if the moc meant to be used for Qt 6 is actually a Qt 5 one, as happened e.g. on Arch Linux without upcoming Change-Id Iefca23e6391a952eb79108260ae1417fc75ad0ef ("qt6 configure: Search for Qt 6 moc in more locations"). Fail at configure rather than build time in such cases. Change-Id: I2ada2045f41f08bf339920d043226f9b36c335b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146780 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ed0e05d6a7b3..3dd1a3df366a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13120,6 +13120,12 @@ then
if test "$MOC6" = "no"; then
AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify
the root of your Qt installation by exporting QT6DIR before running "configure".])
+ else
+ moc6_test_ver="`$MOC6 -v 2>&1 | $SED -n -e 's/^moc \(6.*\)/\1/p'`"
+ if test -z "$moc6_test_ver"; then
+ AC_MSG_ERROR([Wrong moc for Qt6 found.])
+ fi
+ AC_MSG_NOTICE([Detected moc version: $moc_test_ver])
fi
fi
AC_SUBST(QT6_CFLAGS)