From 336f24465a106553dae26ac84a3c43f9ad939a57 Mon Sep 17 00:00:00 2001 From: Bradley Smith Date: Sun, 18 Mar 2012 18:44:31 -0700 Subject: [PATCH] Improves configure checks for XCB. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The XCB plugin requries libxcb >= 1.5. Configure and config.tests/qpa/xcb now check for this. Change-Id: I96c688b79bf5b49fd3ecc4ddc12ebdc2d3788790 Reviewed-by: Samuel Rødal Reviewed-by: Oswald Buddenhagen --- config.tests/qpa/xcb/xcb.cpp | 3 +++ configure | 2 +- src/plugins/platforms/xcb/README | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config.tests/qpa/xcb/xcb.cpp b/config.tests/qpa/xcb/xcb.cpp index c594d4f38b..6037f15e82 100644 --- a/config.tests/qpa/xcb/xcb.cpp +++ b/config.tests/qpa/xcb/xcb.cpp @@ -58,5 +58,8 @@ int main(int, char **) xcb_connection_t *connection = xcb_connect("", &primaryScreen); + // This won't compile unless libxcb >= 1.5 which defines XCB_ATOM_PRIMARY. + int xcbAtomPrimary = XCB_ATOM_PRIMARY; + return 0; } diff --git a/configure b/configure index 8164badeba..0ec2d92133 100755 --- a/configure +++ b/configure @@ -5041,7 +5041,7 @@ if [ "$PLATFORM_QPA" = "yes" ]; then fi if [ "$CFG_XCB" != "no" ]; then - if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xcb 2>/dev/null; then + if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`" QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`" fi diff --git a/src/plugins/platforms/xcb/README b/src/plugins/platforms/xcb/README index 17e8bb53eb..eede0cc149 100644 --- a/src/plugins/platforms/xcb/README +++ b/src/plugins/platforms/xcb/README @@ -1,3 +1,5 @@ +Requires libxcb >= 1.5. + Required packages: libxcb1 libxcb1-dev libx11-xcb1 libx11-xcb-dev libxcb-keysyms1 libxcb-keysyms1-dev libxcb-image0 libxcb-image0-dev libxcb-shm0 libxcb-shm0-dev libxcb-icccm1 libxcb-icccm1-dev libxcb-sync0 libxcb-sync0-dev libxcb-render-util0 libxcb-render-util0-dev libxcb-xfixes0-dev libxrender-dev libxcb-shape0-dev