summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure136
1 files changed, 72 insertions, 64 deletions
diff --git a/configure b/configure
index d0b0ed8ae2..3879f6674c 100755
--- a/configure
+++ b/configure
@@ -611,6 +611,7 @@ CFG_OPENVG_LC_INCLUDES=no
CFG_OPENVG_SHIVA=auto
CFG_OPENVG_ON_OPENGL=auto
CFG_EGL=auto
+CFG_GLX=auto
CFG_SSE=auto
CFG_FONTCONFIG=auto
CFG_FREETYPE=auto
@@ -647,6 +648,7 @@ CFG_XINPUT=runtime
CFG_XKB=auto
CFG_XKBCOMMON=auto
CFG_XCB=auto
+CFG_XCB_XLIB=auto
CFG_XCB_GLX=no
CFG_EGLFS=auto
CFG_DIRECTFB=auto
@@ -776,6 +778,14 @@ QT_LIBS_GLIB=
# default qpa platform
QT_QPA_DEFAULT_PLATFORM=
+# Android vars
+CFG_DEFAULT_ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT
+CFG_DEFAULT_ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT
+CFG_DEFAULT_ANDROID_PLATFORM=android-9
+CFG_DEFAULT_ANDROID_TARGET_ARCH=armeabi-v7a
+CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION=4.8
+CFG_DEFAULT_ANDROID_NDK_HOST=$ANDROID_NDK_HOST
+
#-------------------------------------------------------------------------------
# check SQL drivers available in this package
#-------------------------------------------------------------------------------
@@ -786,15 +796,6 @@ CFG_SQL_oci=no
CFG_SQL_db2=no
CFG_SQL_AVAILABLE=
-
-# Android vars
-CFG_DEFAULT_ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT
-CFG_DEFAULT_ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT
-CFG_DEFAULT_ANDROID_PLATFORM=android-9
-CFG_DEFAULT_ANDROID_TARGET_ARCH=armeabi-v7a
-CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION=4.8
-CFG_DEFAULT_ANDROID_NDK_HOST=$ANDROID_NDK_HOST
-
if [ -d "$relpath/src/plugins/sqldrivers" ]; then
for a in "$relpath/src/plugins/sqldrivers/"*; do
if [ -d "$a" ]; then
@@ -1480,6 +1481,13 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
+ glx)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_GLX="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
pch)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_PRECOMPILE="$VAL"
@@ -1691,6 +1699,13 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
+ xcb-xlib)
+ if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+ CFG_XCB_XLIB="$VAL"
+ else
+ UNKNOWN_OPT=yes
+ fi
+ ;;
wayland)
CFG_OBSOLETE_WAYLAND=yes
;;
@@ -2336,6 +2351,9 @@ Third Party Libraries:
-no-xinput2 ........ Do not compile XInput2 support.
* -xinput2 ........... Compile XInput2 support.
+ -no-xcb-xlib........ Do not compile Xcb-Xlib support.
+ * -xcb-xlib........... Compile Xcb-Xlib support.
+
-no-glib ........... Do not compile Glib support.
+ -glib .............. Compile Glib support.
@@ -2419,7 +2437,7 @@ Additional options:
* -xcb ............... Compile Xcb support.
-no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
- * -eglfs ............. Compile EGLFS support (Requires OpenGL ES 2 support).
+ * -eglfs ............. Compile EGLFS support.
-no-directfb ....... Do not compile DirectFB support.
* -directfb .......... Compile DirectFB support.
@@ -2428,7 +2446,7 @@ Additional options:
* -linuxfb ........... Compile Linux Framebuffer support.
-no-kms ............ Do not compile KMS support.
- * -kms ............... Compile KMS support (Requires EGL and OpenGL ES 2 support).
+ * -kms ............... Compile KMS support (Requires EGL).
-qpa <name> ......... Sets the default QPA platform (e.g xcb, cocoa, windows).
@@ -2679,8 +2697,10 @@ fi
[ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
-case `basename "$XPLATFORM"` in win32-g++*) XPLATFORM_MINGW=yes;; esac
case "$XPLATFORM" in
+ *win32-g++*)
+ XPLATFORM_MINGW=yes
+ ;;
*-maemo*)
XPLATFORM_MAEMO=yes
;;
@@ -4423,11 +4443,6 @@ if [ "$CFG_EGLFS" = "yes" ]; then
echo "The EGLFS plugin requires EGL support and cannot be built"
exit 101
fi
- if [ "$CFG_OPENGL" != "es2" ]; then
- echo "The EGLFS plugin requires OpenGL ES 2 support and cannot be built"
- exit 101
- fi
- CFG_OPENGL="es2"
CFG_EGL=yes
fi
@@ -4436,10 +4451,6 @@ if [ "$CFG_KMS" = "yes" ]; then
echo "The KMS plugin requires EGL support and cannot be built"
exit 101
fi
- if [ "$CFG_OPENGL" != "es2" ]; then
- echo "The KMS plugin requires OpenGL ES 2 support and cannot be built"
- exit 101
- fi
fi
# auto-detect SQL-modules support
@@ -4899,19 +4910,6 @@ if [ "$XPLATFORM_MINGW" = "yes" ]; then
fi
CFG_OPENGL=no
fi
- case "$PLATFORM" in
- hpux*)
- # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
- if [ "$CFG_OPENGL" = "desktop" ]; then
- compileTest x11/glxfbconfig "OpenGL"
- if [ $? != "0" ]; then
- QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
- fi
- fi
- ;;
- *)
- ;;
- esac
elif [ "$CFG_OPENGL" = "es2" ]; then
#OpenGL ES 2.x
compileTest unix/opengles2 "OpenGL ES 2.x"
@@ -4932,17 +4930,6 @@ if [ "$XPLATFORM_MINGW" = "yes" ]; then
echo " ${XQMAKESPEC}."
exit 1
fi
- case "$PLATFORM" in
- hpux*)
- # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
- compileTest x11/glxfbconfig "OpenGL"
- if [ $? != "0" ]; then
- QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
- fi
- ;;
- *)
- ;;
- esac
fi
fi # X11/MINGW OpenGL
@@ -5136,8 +5123,10 @@ if [ "$CFG_XCB" != "no" ]; then
exit 1
fi
- if compileTest qpa/xcb-xlib "xcb-xlib" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
- QT_CONFIG="$QT_CONFIG xcb-xlib"
+ if [ "$CFG_XCB_XLIB" != "no" ]; then
+ if compileTest qpa/xcb-xlib "xcb-xlib" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
+ QT_CONFIG="$QT_CONFIG xcb-xlib"
+ fi
fi
if [ "$CFG_SM" != "no" ] && [ -n "$PKG_CONFIG" ]; then
@@ -5275,18 +5264,13 @@ elif [ "$CFG_XKBCOMMON" = "no" ]; then
fi
# EGL Support
-if [ "$CFG_OPENGL" != "es2" ]; then
- if [ "$CFG_EGL" = "yes" ] && [ "$CFG_OPENGL" = "desktop" ]; then
- echo "EGL support was requested but Qt is being configured for desktop OpenGL."
- echo "Either disable EGL support or enable OpenGL ES support."
- exit 101
- elif [ "$CFG_EGL" = "yes" ] && [ "$CFG_OPENGL" = "no" ]; then
- echo "EGL support was requested but OpenGL ES support is disabled."
- echo "Either disable EGL support or enable OpenGL ES support."
+if [ "$CFG_EGL" != "no" ]; then
+ if [ "$CFG_EGL" = "yes" ] && [ "$CFG_OPENGL" = "no" ]; then
+ echo "EGL support was requested but OpenGL support is disabled."
+ echo "Either disable EGL support or enable OpenGL support."
exit 101
fi
- CFG_EGL=no
-elif [ "$CFG_EGL" != "no" ]; then
+
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
@@ -5307,8 +5291,26 @@ elif [ "$CFG_EGL" != "no" ]; then
fi
fi
+# GLX Support
+if [ "$CFG_GLX" != "no" ]; then
+ if [ "$CFG_GLX" = "yes" ] && [ "$CFG_OPENGL" = "no" ]; then
+ echo "GLX support was requested but OpenGL support is disabled."
+ echo "Either disable GLX support or enable OpenGL support."
+ exit 101
+ fi
+ if compileTest qpa/glx "GLX"; then
+ CFG_GLX=yes
+ elif [ "$CFG_GLX" = "yes" ]; then
+ echo " The GLX functionality test failed; GLX is required by the xcb plugin to manage contexts & surfaces."
+ exit 1
+ else
+ CFG_GLX=no
+ fi
+fi
+
+
if [ "$CFG_EGLFS" != "no" ]; then
- if [ "$CFG_OPENGL" = "es2" ] && [ "$XPLATFORM_QNX" = "no" ]; then
+ if [ "$XPLATFORM_QNX" = "no" ]; then
CFG_EGLFS="$CFG_EGL"
else
CFG_EGLFS="no"
@@ -5316,7 +5318,7 @@ if [ "$CFG_EGLFS" != "no" ]; then
fi
if [ "$CFG_KMS" = "yes" ]; then
- if [ "$CFG_OPENGL" = "es2" ] && [ "$CFG_EGL" = "yes" ]; then
+ if [ "$CFG_EGL" = "yes" ]; then
CFG_KMS="yes"
else
CFG_KMS="no"
@@ -5668,6 +5670,13 @@ else
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
fi
+# enable glx
+if [ "$CFG_GLX" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG glx"
+else
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLX"
+fi
+
# enable eglfs
if [ "$CFG_EGLFS" = "yes" ]; then
QT_CONFIG="$QT_CONFIG eglfs"
@@ -5700,11 +5709,7 @@ else
fi
if [ "$CFG_OPENGL" = "es2" ]; then
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES"
-fi
-
-if [ "$CFG_OPENGL" = "es2" ]; then
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_2"
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES QT_OPENGL_ES_2"
QT_CONFIG="$QT_CONFIG opengles2"
fi
@@ -6703,6 +6708,8 @@ else
report_support " pkg-config ............. no"
fi
report_support " PulseAudio ............." "$CFG_PULSEAUDIO"
+report_support " EGL ...................." "$CFG_EGL"
+report_support " GLX ...................." "$CFG_GLX"
report_support " QPA backends:"
report_support " DirectFB ............." "$CFG_DIRECTFB"
report_support " EGLFS ................" "$CFG_EGLFS"
@@ -6711,6 +6718,7 @@ report_support " LinuxFB .............." "$CFG_LINUXFB"
report_support " XCB .................." "$CFG_XCB" system "system library" qt "bundled copy"
if [ "$CFG_XCB" != "no" ]; then
report_support " MIT-SHM ............" "$CFG_MITSHM"
+ report_support " Xcb-Xlib ..........." "$CFG_XCB_XLIB"
report_support " Xcursor ............" "$CFG_XCURSOR" runtime "loaded at runtime"
report_support " Xfixes ............." "$CFG_XFIXES" runtime "loaded at runtime"
report_support " Xi ................." "$CFG_XINPUT" runtime "loaded at runtime"