summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure55
1 files changed, 27 insertions, 28 deletions
diff --git a/configure b/configure
index 6124d6d8a5..12b08aa9c8 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
@@ -3319,7 +3319,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
@@ -3458,7 +3458,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
@@ -6207,7 +6207,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
@@ -6289,13 +6291,19 @@ 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
- 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`"
- else
- QMAKE_DEFINES_WAYLAND=QT_NO_WAYLAND_XKB
- 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.
@@ -6307,6 +6315,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
@@ -6984,19 +6998,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*)
@@ -7362,7 +7363,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
@@ -7732,9 +7733,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"