[vlc-commits] configure: add conditional for Qt5 X11

Rémi Denis-Courmont git at videolan.org
Tue Nov 29 21:31:29 CET 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Nov 29 22:08:03 2016 +0200| [84796d325a67aab36a2800d94f5fa44d4ab9dbfe] | committer: Rémi Denis-Courmont

configure: add conditional for Qt5 X11

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=84796d325a67aab36a2800d94f5fa44d4ab9dbfe
---

 configure.ac               |  7 ++++---
 modules/gui/qt/Makefile.am | 13 ++++++++-----
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0083586..ec930d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3753,11 +3753,11 @@ AC_ARG_ENABLE(qt, [
     enable_qt="no"
   ])
 ])
+have_qt5_x11="no"
 AS_IF([test "${enable_qt}" != "no"], [
   PKG_CHECK_MODULES([QT], [Qt5Core >= 5.2.0 Qt5Widgets Qt5Gui], [
-      PKG_CHECK_MODULES([QTX11], [Qt5X11Extras], [
-          VLC_ADD_LIBS([qt],[${QTX11_LIBS}])
-          VLC_ADD_CXXFLAGS([qt],[${QTX11_CFLAGS} -DQT5_HAS_X11])
+      PKG_CHECK_MODULES([QT5_X11], [Qt5X11Extras], [
+          have_qt5_x11="yes"
       ],[
           AC_MSG_WARN([Not building Qt Interface with X11 helpers.])
       ])
@@ -3786,6 +3786,7 @@ AS_IF([test "${enable_qt}" != "no"], [
   ALIASES="${ALIASES} qvlc"
 ])
 AM_CONDITIONAL(ENABLE_QT, [test "$enable_qt" != "no"])
+AM_CONDITIONAL([HAVE_QT5_X11], [test "${have_qt5_x11}" = "yes"])
 
 dnl
 dnl detect kde4-config patch (used for kde solids).
diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
index 8546529..c00dc87 100644
--- a/modules/gui/qt/Makefile.am
+++ b/modules/gui/qt/Makefile.am
@@ -17,17 +17,20 @@ SUFFIXES += .ui .h .hpp .moc.cpp
 libqt_plugin_la_CXXFLAGS = $(AM_CXXFLAGS) $(QT_CFLAGS) $(CXXFLAGS_qt)
 libqt_plugin_la_LIBADD = $(QT_LIBS) $(LIBS_qt) $(LIBM)
 libqt_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)'
-if HAVE_OS2
-else
+if HAVE_DARWIN
+libqt_plugin_la_LDFLAGS += -Wl,-framework,Cocoa
+endif
+if HAVE_QT5_X11
+libqt_plugin_la_CXXFLAGS += $(QT5_X11_CFLAGS) -DQT5_HAS_X11
+libqt_plugin_la_LIBADD += $(QT5_X11_LIBS)
+endif
 if HAVE_WIN32
 libqt_plugin_la_LIBADD += $(LIBCOM) -lcomctl32 -luuid
 else
+if !HAVE_OS2
 libqt_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIB) -lX11
 endif
 endif
-if HAVE_DARWIN
-libqt_plugin_la_LDFLAGS += -Wl,-framework,Cocoa
-endif
 
 gui_LTLIBRARIES =  $(LTLIBqt)
 EXTRA_LTLIBRARIES = libqt_plugin.la



More information about the vlc-commits mailing list