[vlc-devel] [PATCH] 2.2 configure: fallback to qt4 on unpatched qt5

Francois Cartegnie fcvlcdev at free.fr
Fri Apr 1 16:19:35 CEST 2016


---
 configure.ac | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index bb5d1dd..36c0ffd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3736,7 +3736,12 @@ AC_ARG_ENABLE(qt, [
   ])
 ])
 AS_IF([test "${enable_qt}" != "no"], [
-  PKG_CHECK_MODULES([QT], [Qt5Core >= 5.1.0 Qt5Widgets Qt5Gui], [
+  PKG_CHECK_EXISTS([Qt5Core >= 5.5.0 Qt5Core < 5.6.0], [
+    AC_MSG_WARN(["You cannot build VLC with Qt-5.5.0. You need to backport I78ef29975181ee22429c9bd4b11d96d9e68b7a9c"])
+    dnl force qt5 detection to fail and try qt4
+    qt5_min_version="5.6.0"], [qt5_min_version="5.1.0"] )
+
+  PKG_CHECK_MODULES([QT], [Qt5Core >= [$qt5_min_version] Qt5Widgets Qt5Gui], [
       PKG_CHECK_MODULES([QTX11], [Qt5X11Extras], [
           VLC_ADD_LIBS([qt4],[${QTX11_LIBS}])
           VLC_ADD_CXXFLAGS([qt4],[${QTX11_CFLAGS} -DQT5_HAS_X11])
@@ -3754,10 +3759,6 @@ AS_IF([test "${enable_qt}" != "no"], [
           AC_MSG_WARN([Not building Qt Interface with X11 helpers.])
       ])
 
-      PKG_CHECK_EXISTS([Qt5Core >= 5.5.0 Qt5Core < 5.6.0], [
-        AC_MSG_ERROR(["You cannot build VLC with Qt-5.5.0. You need to backport I78ef29975181ee22429c9bd4b11d96d9e68b7a9c"])
-      ])
-
       QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)"
       QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins Qt5Core)"
       AC_PATH_PROGS(MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}" "${QT_PATH}/bin" "${CONTRIB_DIR}/bin"])
-- 
2.5.5



More information about the vlc-devel mailing list