https://bugs.gentoo.org/844097 We should only check for UIC (provided by qtwidgets) if we're building the GUI. Qt (just qtcore) itself is *always* needed to build mkvtoolnix (it's used for e.g. MIME type detection since 59.0.0), but the rest of Qt (like qtwidgets) is only needed for the GUI build. The build system incorrectly unconditionally checks for UIC. We fix it here to only check for it when doing a GUI build. First hunk (ac/qt5.m4, removing UIC check): Signed-off-by: Duane Robertson duane@duanerobertson.com Second hunk (rest, adding UIC check conditional on enable_gui): Signed-off-by: Sam James --- a/ac/qt5.m4 +++ b/ac/qt5.m4 @@ -51,7 +51,6 @@ check_qt5() { AC_PATH_PROG(LCONVERT, lconvert,, [$qt_searchpath]) AC_PATH_PROG(MOC, moc,, [$qt_searchpath]) AC_PATH_PROG(RCC, rcc,, [$qt_searchpath]) - AC_PATH_PROG(UIC, uic,, [$qt_searchpath]) if test x"$MOC" = x; then AC_MSG_CHECKING(for Qt 5) @@ -62,11 +61,6 @@ check_qt5() { AC_MSG_CHECKING(for Qt 5) AC_MSG_RESULT(no: could not find the rcc executable) return - - elif test x"$UIC" = x; then - AC_MSG_CHECKING(for Qt 5) - AC_MSG_RESULT(no: could not find the uic executable) - return fi --- a/ac/qt_common.m4 +++ b/ac/qt_common.m4 @@ -5,6 +5,37 @@ fi if test x"$enable_gui" = xyes; then BUILD_GUI=yes + # Copied from ac/qt6.m4. + qmake_properties="`mktemp`" + + "$QMAKE" -query > "$qmake_properties" + + qmake_ver="`$ac_cv_path_EGREP '^QT_VERSION:' "$qmake_properties" | sed 's/^QT_VERSION://'`" + + AC_MSG_CHECKING(for qmake's version) + if test -z "qmake_ver"; then + AC_MSG_RESULT(unknown; please contact the author) + return + elif ! check_version $qt_min_ver $qmake_ver; then + AC_MSG_RESULT(too old: $qmake_ver, neet at least $qt_mIN-ver) + return + else + AC_MSG_RESULT($qmake_ver) + fi + + qt_bindir="`$ac_cv_path_EGREP '^QT_INSTALL_BINS:' "$qmake_properties" | sed 's/^QT_INSTALL_BINS://'`" + qt_libexecdir="`$ac_cv_path_EGREP '^QT_INSTALL_LIBEXECS:' "$qmake_properties" | sed 's/^QT_INSTALL_LIBEXECS://'`" + qt_searchpath="$qt_libexecdir:$qt_bindir:$PATH" + + rm -f "$qmake_properties" + + AC_PATH_PROG(UIC, uic,, [$qt_searchpath]) + if test x"$UIC" = x; then + AC_MSG_CHECKING(for Qt 5 UIC (qtwidgets)) + AC_MSG_RESULT(no: could not find the uic executable) + exit 1 + fi + if test x"$have_qt6" = "xyes" ; then opt_features_yes="$opt_features_yes\n * MKVToolNix GUI (with Qt 6)" else