summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure73
1 files changed, 46 insertions, 27 deletions
diff --git a/configure b/configure
index c4754c2fc8..8a3700ccf4 100755
--- a/configure
+++ b/configure
@@ -185,8 +185,8 @@ fi
#-------------------------------------------------------------------------------
PLATFORM_X11=no
-PLATFORM_QWS=maybe
-PLATFORM_QPA=maybe
+PLATFORM_QWS=no
+PLATFORM_QPA=yes
BUILD_ON_MAC=no
if [ -d /System/Library/Frameworks/Carbon.framework ]; then
PLATFORM_MAC=maybe
@@ -751,7 +751,7 @@ CFG_DECORATION_PLUGIN_AVAILABLE=
CFG_DECORATION_PLUGIN=
CFG_XINPUT=runtime
CFG_XKB=auto
-CFG_XCB=no
+CFG_XCB=auto
CFG_NIS=auto
CFG_CUPS=auto
CFG_ICONV=auto
@@ -3315,7 +3315,7 @@ if [ '!' -z "$CFG_SDK" ]; then
fi
# find the default framework value
-if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
+if [ "$CFG_ARCH" = "macosx" ]; then
if [ "$CFG_FRAMEWORK" = "auto" ]; then
CFG_FRAMEWORK="$CFG_SHARED"
elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
@@ -3454,7 +3454,7 @@ if [ "$PLATFORM_MAC" = "yes" ] && [ "$XPLATFORM_SYMBIAN" = "no" ]; then
fi
# find the default framework value
-if [ "$PLATFORM_MAC" = "yes" ] && [ "$PLATFORM" != "macx-xlc" ]; then
+if [ "$CFG_ARCH" = "macosx" ]; then
if [ "$CFG_FRAMEWORK" = "auto" ]; then
CFG_FRAMEWORK="$CFG_SHARED"
elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
@@ -6184,7 +6184,9 @@ fi
if [ "$PLATFORM_QPA" = "yes" ]; then
# auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es2 = OpenGL ES 2.x)
- if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
+ if [ "$CFG_ARCH" = "macosx" ]; then
+ CFG_OPENGL=desktop
+ elif [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
CFG_OPENGL=desktop
elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then
@@ -6266,15 +6268,41 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
QMAKE_LIBS_WAYLAND=`$PKG_CONFIG --libs wayland-client 2>/dev/null`
QMAKE_INCDIR_WAYLAND=`$PKG_CONFIG --variable=includedir wayland-client 2>/dev/null`
QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null`
+ fi
+
+ # Check we actually have X11 :-)
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
+ QT_CONFIG="$QT_CONFIG xlib"
+ fi
+
+ if [ "$CFG_XCB" != "no" ]; then
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb "xcb" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ CFG_XCB=yes
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-render "xcb-render" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ QT_CONFIG="$QT_CONFIG xcb-render"
+ fi
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
- QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND `$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
- QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND `$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
+ if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/xcb-xlib "xcb-xlib" $L_FLAGS $I_FLAGS $l_FLAGS; then
+ QT_CONFIG="$QT_CONFIG xcb-xlib"
+ fi
else
- QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
+ CFG_XCB=no
fi
fi
+ # Detect libxkbcommon
+ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
+ QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
+ QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
+ QMAKE_CFLAGS_WAYLAND="$QMAKE_CFLAGS_WAYLAND $QMAKE_CFLAGS_XKBCOMMON"
+ QMAKE_LIBS_WAYLAND="$QMAKE_LIBS_WAYLAND $QMAKE_LIBS_XKBCOMMON"
+ QMAKE_CFLAGS_XCB="$QMAKE_CFLAGS_XCB $QMAKE_CFLAGS_XKBCOMMON"
+ QMAKE_LIBS_XCB="$QMAKE_LIBS_XCB $QMAKE_LIBS_XKBCOMMON"
+ else
+ QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
+ QMAKE_DEFINES_XCB=QT_NO_XCB_XKB
+ fi
+
# QMake variables set here override those in the mkspec. Therefore we only set the variables here if they are not zero.
if [ -n "$QMAKE_CFLAGS_WAYLAND" ] || [ -n "$QMAKE_LIBS_WAYLAND" ]; then
QMakeVar set QMAKE_CFLAGS_WAYLAND "$QMAKE_CFLAGS_WAYLAND"
@@ -6284,6 +6312,12 @@ if [ "$PLATFORM_QPA" = "yes" ]; then
QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND"
fi
+ if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
+ QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
+ QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
+ QMakeVar set QMAKE_DEFINES_XCB "$QMAKE_DEFINES_XCB"
+ fi
+
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/wayland "Wayland" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_WAYLAND $QMAKE_LIBS_WAYLAND; then
QT_CONFIG="$QT_CONFIG wayland"
fi
@@ -6961,19 +6995,6 @@ fi
[ "$XPLATFORM_MINGW" = "yes" ] && CFG_MAC_COCOA="no"
[ "$XPLATFORM_SYMBIAN" = "yes" ] && CFG_MAC_COCOA="no"
-# set the global Mac deployment target. This is overridden on an arch-by-arch basis
-# in some cases, see code further down
-case "$PLATFORM,$CFG_MAC_COCOA" in
- macx*,yes)
- # Cocoa
- QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.5
- ;;
- macx*,no)
- # gcc, Carbon
- QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.4
- ;;
-esac
-
# disable Qt 3 support on VxWorks and Symbian
case "$XPLATFORM" in
unsupported/vxworks*|symbian*)
@@ -7339,7 +7360,7 @@ fi
[ '!' -z "$L_FLAGS" ] && QMakeVar add QMAKE_LIBDIR_FLAGS "$L_FLAGS"
[ '!' -z "$l_FLAGS" ] && QMakeVar add LIBS "$l_FLAGS"
-if [ "$PLATFORM_MAC" = "yes" ]; then
+if [ "$CFG_ARCH" = "macosx" ]; then
if [ "$CFG_RPATH" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
fi
@@ -7709,9 +7730,7 @@ if [ "$CFG_EXCEPTIONS" = "no" ]; then
fi
# On Mac, set the minimum deployment target for the different architechtures
-# using the Xarch compiler option when supported (10.5 and up). On 10.4 the
-# deployment version is set to 10.4 globally using the QMAKE_MACOSX_DEPLOYMENT_TARGET
-# env. variable.
+# using the Xarch compiler option when supported (10.5 and up).
if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_XARCH" != "no" ] ; then
if echo "$CFG_MAC_ARCHS" | grep '\<x86\>' > /dev/null 2>&1; then
QMakeVar add QMAKE_CFLAGS "-Xarch_i386 -mmacosx-version-min=10.4"