summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2012-10-29 12:59:09 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-07 16:55:50 +0100
commit21bd66e1ea06e466754ab06ee2c5f8b737bb4bd7 (patch)
tree2680ca806c003ca2b37d3f6c8b5431f51a3695fe /configure
parentf4121624e9067078249f0fad171c1f8c98271877 (diff)
Add configure option to minimize xcb runtime dependencies
Some of the xcb- libraries we depend upon are not (yet) common across distributions. This is problematic for binaries that should be working on different distributions. The patch mitigates this by: Adding the files from libxcb-proto (version 0.1.6), compiled with libxcb-1.5 xcb-util (version 0.3.9) xcb-util-image (version 0.3.9) xcb-util-keysyms (version 0.3.9) xcb-util-renderutil (version 0.3.8) xcb-util-wm (version 0.3.9) from xcb.freedesktop.org/dist to src/3rdparty/xcb. Adding a configure option '-qt-xcb' to use the sources instead of linking to the respective runtime libraries. Task-number: QTBUG-27803 Change-Id: I6ea87daa382871b2b9072a601511523fa0b9f44b Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure56
1 files changed, 41 insertions, 15 deletions
diff --git a/configure b/configure
index 97479f6432..06c61ef2a5 100755
--- a/configure
+++ b/configure
@@ -1722,8 +1722,11 @@ while [ "$#" -gt 0 ]; do
fi
;;
xcb)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ] || [ "$VAL" = "qt" ]; then
CFG_XCB="$VAL"
+ if [ "$VAL" = "yes" ]; then
+ CFG_XCB="system"
+ fi
else
UNKNOWN_OPT=yes
fi
@@ -3201,6 +3204,10 @@ Third Party Libraries:
-qt-pcre ........... Use the PCRE library bundled with Qt.
+ -system-pcre ....... Use the PCRE library from the operating system.
+ -qt-xcb ............ Use xcb- libraries bundled with Qt.
+ (libxcb.so will still be used from operating system).
+ + -system-xcb ........ Use xcb- libraries from the operating system.
+
Additional options:
-make <part> ....... Add part to the list of parts to be built at make time.
@@ -4800,18 +4807,37 @@ fi
if [ "$CFG_XCB" != "no" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
- QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb xcb-image xcb-keysyms xcb-icccm xcb-sync xcb-xfixes xcb-randr 2>/dev/null`"
- QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb xcb-image xcb-keysyms xcb-icccm xcb-sync xcb-xfixes xcb-randr 2>/dev/null`"
+ QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
+ QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
fi
if compileTest qpa/xcb "xcb" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
- CFG_XCB=yes
- if compileTest qpa/xcb-render "xcb-render" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
- QT_CONFIG="$QT_CONFIG xcb-render"
- fi
- if compileTest qpa/xcb-glx "xcb-glx" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
- CFG_XCB_GLX=yes
- QT_CONFIG="$QT_CONFIG xcb-glx"
+ if [ "$CFG_XCB" = "qt" ]; then
+ QT_CONFIG="$QT_CONFIG xcb-qt"
+ else
+ CFG_XCB="system"
+
+ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
+ XCB_PACKAGES="xcb xcb-shm xcb-sync xcb-xfixes xcb-randr xcb-image xcb-keysyms xcb-icccm"
+ QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags $XCB_PACKAGES 2>/dev/null`"
+ QMAKE_LIBS_XCB="`$PKG_CONFIG --libs $XCB_PACKAGES 2>/dev/null`"
+ fi
+
+ if compileTest qpa/xcb-syslibs "xcb-syslibs" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
+ if compileTest qpa/xcb-render "xcb-render" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
+ QT_CONFIG="$QT_CONFIG xcb-render"
+ fi
+
+ if compileTest qpa/xcb-glx "xcb-glx" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
+ CFG_XCB_GLX=yes
+ QT_CONFIG="$QT_CONFIG xcb-glx"
+ fi
+ else
+ echo "The test for linking against libxcb and support libraries failed!"
+ echo " You might need install dependency packages, or pass -qt-xcb."
+ echo " See src/plugins/platforms/xcb/README."
+ exit 1
+ fi
fi
if compileTest qpa/xcb-xlib "xcb-xlib" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
@@ -4836,9 +4862,9 @@ if [ "$CFG_XCB" != "no" ]; then
fi
fi
else
- if [ "$CFG_XCB" = "yes" ]; then
- echo "The XCB test failed!"
- echo " You might need to install dependency packages."
+ if [ "$CFG_XCB" != "auto" ]; then
+ echo "The test for linking against libxcb failed!"
+ echo " You might need to install dependency packages for libxcb."
echo " See src/plugins/platforms/xcb/README."
exit 1
fi
@@ -5465,7 +5491,7 @@ fi
[ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
[ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
[ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
-[ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
+[ "$CFG_XCB" != "no" ] && QT_CONFIG="$QT_CONFIG xcb"
[ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
[ "$CFG_SYSTEM_PROXIES" = "yes" ] && QT_CONFIG="$QT_CONFIG system-proxies"
@@ -6304,7 +6330,7 @@ echo "libICU support ......... $CFG_ICU"
echo "PCRE support ........... $CFG_PCRE"
echo "Xcb support ............ $CFG_XCB"
echo "Xrender support ........ $CFG_XRENDER"
-if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
+if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" != "no" ]; then
echo "XInput2 support ........ $CFG_XINPUT2"
fi
echo "EGLFS support .......... $CFG_EGLFS"