summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfig.tests/unix/compile.test109
-rwxr-xr-xconfigure4543
-rw-r--r--configure.json2493
-rw-r--r--configure.pri629
-rw-r--r--mkspecs/features/configure.prf28
-rw-r--r--mkspecs/features/configure_base.prf44
-rw-r--r--mkspecs/features/qt_configure.prf1170
7 files changed, 4406 insertions, 4610 deletions
diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test
deleted file mode 100755
index f5db1847b8..0000000000
--- a/config.tests/unix/compile.test
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/bin/sh
-
-SUCCESS=no
-QMKSPEC=$1
-XPLATFORM=`basename "$1"`
-QMAKE_CONFIG=$2
-VERBOSE=$3
-SRCDIR=$4
-OUTDIR=$5
-TEST=$6
-EXE=`basename "$6"`
-DESCRIPTION=$7
-QMAKE=$8
-QTCONF=$9
-shift 9
-LFLAGS="$SYSROOT_FLAG"
-INCLUDEPATH=""
-CFLAGS="$SYSROOT_FLAG"
-CXXFLAGS="$SYSROOT_FLAG"
-MAC_ARCH_CXXFLAGS=""
-MAC_ARCH_LFLAGS=""
-QMAKE_ARGS=
-while [ "$#" -gt 0 ]; do
- PARAM=$1
- case $PARAM in
- -config)
- QMAKE_CONFIG="$QMAKE_CONFIG $2"
- shift
- ;;
- -framework)
- LFLAGS="$LFLAGS -framework \"$2\""
- shift
- ;;
- -arch)
- MAC_ARCH_CFLAGS="$MAC_ARCH_CFLAGS -arch $2"
- MAC_ARCH_CXXFLAGS="$MAC_ARCH_CXXFLAGS -arch $2"
- MAC_ARCH_LFLAGS="$MAC_ARCH_LFLAGS -arch $2"
- shift
- ;;
- -F*|-m*|-x*)
- LFLAGS="$LFLAGS \"$PARAM\""
- CFLAGS="$CFLAGS \"$PARAM\""
- CXXFLAGS="$CXXFLAGS \"$PARAM\""
- ;;
- -L*|-l*|-pthread)
- LFLAGS="$LFLAGS \"$PARAM\""
- ;;
- -I*)
- INC=`echo $PARAM | sed -e 's/^-I//'`
- INCLUDEPATH="$INCLUDEPATH \"$INC\""
- ;;
- -f*|-D*)
- CFLAGS="$CFLAGS \"$PARAM\""
- CXXFLAGS="$CXXFLAGS \"$PARAM\""
- ;;
- -Qoption)
- # Two-argument form for the Sun Compiler
- CFLAGS="$CFLAGS $PARAM \"$2\""
- CXXFLAGS="$CXXFLAGS $PARAM \"$2\""
- shift
- ;;
- *)
- QMAKE_ARGS="$QMAKE_ARGS $PARAM"
- ;;
- esac
- shift
-done
-
-test -d "$OUTDIR/$TEST" || mkdir -p "$OUTDIR/$TEST"
-
-cd "$OUTDIR/$TEST"
-
-test -r Makefile && $MAKE distclean >/dev/null 2>&1
-# Make sure output from possible previous tests is gone
-rm -f "$EXE" "${EXE}.exe"
-
-set -- \
- "$QMAKE" \
- -qtconf "$QTCONF" \
- -nocache \
- -spec "$QMKSPEC" \
- "CONFIG+=$QMAKE_CONFIG" \
- "CONFIG+=android_app" \
- "CONFIG-=debug_and_release app_bundle lib_bundle" \
- "LIBS+=$LFLAGS" \
- "LIBS+=$MAC_ARCH_LFLAGS" \
- "INCLUDEPATH*=$INCLUDEPATH" \
- "QMAKE_CFLAGS*=$CFLAGS" \
- "QMAKE_CFLAGS+=$MAC_ARCH_CFLAGS" \
- "QMAKE_CXXFLAGS*=$CXXFLAGS" \
- "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" \
- $QMAKE_ARGS \
- "$SRCDIR/$TEST/$EXE.pro" \
- -o "$OUTDIR/$TEST/Makefile"
-if [ "$VERBOSE" = "yes" ]; then
- echo
- OUTDIR=$OUTDIR "$@" && $MAKE && SUCCESS=yes
-else
- OUTDIR=$OUTDIR "$@" >/dev/null 2>&1 && $MAKE >/dev/null 2>&1 && SUCCESS=yes
-fi
-
-# done
-if [ "$SUCCESS" != "yes" ]; then
- [ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION disabled." || echo " no."
- exit 1
-else
- [ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION enabled." || echo " yes."
- exit 0
-fi
diff --git a/configure b/configure
index 91fc986b85..e028ea69da 100755
--- a/configure
+++ b/configure
@@ -42,7 +42,6 @@ outpath=`/bin/pwd`
# where to find which..
unixtests="$relpath/config.tests/unix"
-mactests="$relpath/config.tests/mac"
WHICH="$unixtests/which.test"
PERL=`$WHICH perl 2>/dev/null`
@@ -84,6 +83,8 @@ fi
# later cache the command line in config.status
OPT_CMDLINE=
for i in "$@"; do
+ QMAKE_CMDLINE="$QMAKE_CMDLINE
+$i"
if [ "x$i" != "x-v" ]; then
[ -z "${i##* *}" ] && i="'$i'"
OPT_CMDLINE="$OPT_CMDLINE $i"
@@ -91,10 +92,6 @@ for i in "$@"; do
done
# initialize global variables
-CONFIG_SEPARATORS=`printf ' \t'`
-QMAKE_CONFIG=
-QTCONFIG_CONFIG=
-QT_CONFIG=
QMAKE_VARS_FILE=.qmake.vars
DEVICE_VARS_FILE=.device.vars
HOST_VARS_FILE=.host.vars
@@ -107,11 +104,6 @@ HOST_VARS_FILE=.host.vars
# utility functions
#-------------------------------------------------------------------------------
-shellEscape()
-{
- echo "$@" | sed 's/ /\ /g'
-}
-
makeabs()
{
local FILE="$1"
@@ -155,21 +147,6 @@ QMakeVar()
echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
}
-shellArgumentListToQMakeListHelper()
-{
- local retval
- for arg in "$@"; do retval="$retval \"$arg\""; done
- echo "$retval"
-}
-
-# Convert a string usable on a shell command line into word-by-word quoted
-# qmake list.
-shellArgumentListToQMakeList()
-{
- # eval is needed for the shell to interpret the backslash escape sequences
- eval shellArgumentListToQMakeListHelper "$@"
-}
-
# Helper function for getQMakeConf. It parses include statements in
# qmake.conf and prints out the expanded file
expandQMakeConf()
@@ -345,113 +322,6 @@ getXQMakeConf()
getSingleQMakeVariable "$1" "$xspecvals"
}
-testXConfig()
-{
- # Put a space on each end of the CONFIG value so that searching for the
- # target with whitespace on either side will work even when it's the
- # first/last/only item in the CONFIG value.
- case \ `getXQMakeConf CONFIG`\ in
- *[${CONFIG_SEPARATORS}]$1[${CONFIG_SEPARATORS}]*)
- return 0
- ;;
- *)
- return 1
- ;;
- esac
-}
-
-compilerSupportsFlag()
-{
- cat >conftest.cpp <<EOF
-int main() { return 0; }
-EOF
- if [ "$OPT_VERBOSE" = "yes" ]; then
- "$@" -o conftest-out conftest.cpp
- else
- "$@" -o conftest-out conftest.cpp >/dev/null 2>&1
- fi
- ret=$?
- rm -f conftest.cpp conftest-out
- return $ret
-}
-
-linkerSupportsFlag()
-{
- compiler=$1
- shift
- lflags=-Wl
- for flag
- do
- safe_flag=`shellEscape "$flag"`
- lflags=$lflags,$safe_flag
- done
- if [ $CFG_USE_GOLD_LINKER = yes ]; then
- lflags="-fuse-ld=gold $lflags"
- fi
- compilerSupportsFlag $compiler $lflags
-}
-
-# $1: newline-separated list of default paths
-# stdin: input path
-# stdout: input path or nothing
-filterDefaultPaths()
-{
- local path
- path=`cat`
- path=`makeabs "$path"`
- echo "$1" | grep "^$path\$" > /dev/null || echo "$path"
-}
-
-filterIncludePath()
-{
- filterDefaultPaths "$DEFAULT_INCDIRS"
-}
-
-filterLibraryPath()
-{
- filterDefaultPaths "$DEFAULT_LIBDIRS"
-}
-
-filterPathOptionsHelper()
-{
- local flag defpaths sep p path
- flag=$1; shift
- defpaths=$1; shift
- sep=
- for p in "$@"; do
- path=${p#$flag}
- if [ "x$path" != "x$p" ]; then
- path=`echo "$path" | filterDefaultPaths "$defpaths"`
- test -z "$path" && continue
- fi
- # Re-quote for shell & qmake
- p=`echo "$p" | sed 's,[^ ]* .*,"&",g'`
- printf "%s%s" "$sep" "$p"
- sep=" "
- done
- echo
-}
-
-# $1: flag
-# $2: newline-separated list of default paths
-# stdin: list of command line options
-# sdout: stdin without the options naming default paths
-filterPathOptions()
-{
- # The eval does escape interpretation for us
- eval filterPathOptionsHelper $1 "\"$2\"" "`cat`"
-}
-
-filterIncludeOptions()
-{
- filterPathOptions -I "$DEFAULT_INCDIRS"
-}
-
-filterLibraryOptions()
-{
- filterPathOptions -L "$DEFAULT_LIBDIRS"
-}
-
#-------------------------------------------------------------------------------
# device options
#-------------------------------------------------------------------------------
@@ -520,10 +390,6 @@ else
ECHO_C='\c'
fi
-#-------------------------------------------------------------------------------
-# window system detection
-#-------------------------------------------------------------------------------
-
BUILD_ON_MAC=no
if [ -d /System/Library/Frameworks/Carbon.framework ]; then
BUILD_ON_MAC=yes
@@ -608,65 +474,17 @@ mkdir -p "$outpath/config.tests"
rm -f "$outpath/config.tests/.qmake.cache"
cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
-QMakeVar add styles "mac fusion windows"
-
# QTDIR may be set and point to an old or system-wide Qt installation
unset QTDIR
-# the minimum version of libdbus-1 that we require:
-MIN_DBUS_1_VERSION=1.2
-
# initalize internal variables
-CFG_CONFIGURE_EXIT_ON_ERROR=yes
-CFG_PROFILE=no
-CFG_STRIP=yes
-CFG_GUI=auto # (yes|no|auto)
-CFG_WIDGETS=yes
-CFG_DEBUG=auto
-CFG_MYSQL_CONFIG=
-CFG_PSQL_CONFIG=
-CFG_DEBUG_RELEASE=no
-CFG_FORCEDEBUGINFO=no
CFG_RELEASE_TOOLS=no
-CFG_SHARED=yes
-CFG_SM=auto
-CFG_SYSTEM_ZLIB=auto
-CFG_MTDEV=auto
-CFG_JOURNALD=no
-CFG_SYSLOG=no
-CFG_SQLITE=qt
-CFG_GIF=yes
-CFG_PNG=yes
-CFG_LIBPNG=auto
-CFG_JPEG=yes
-CFG_LIBJPEG=auto
-CFG_XRENDER=auto
-CFG_OPENGL=auto
-CFG_EGL=auto
-CFG_EGL_X=auto
-CFG_DOUBLECONVERSION=auto
-CFG_FONTCONFIG=auto
-CFG_FREETYPE=auto
-CFG_HARFBUZZ=auto
-CFG_SQL_AVAILABLE=
QT_ALL_BUILD_PARTS=" libs tools examples tests "
QT_DEFAULT_BUILD_PARTS="libs tools examples"
CFG_BUILD_PARTS=""
CFG_NOBUILD_PARTS=""
CFG_SKIP_MODULES=""
-CFG_COMPILE_EXAMPLES=yes
-CFG_QML_DEBUG=yes
-CFG_PKGCONFIG=auto
-CFG_STACK_PROTECTOR_STRONG=auto
-CFG_SLOG2=auto
-CFG_PPS=auto
-CFG_QNX_IMF=auto
-CFG_LGMON=auto
-CFG_SYSTEM_PROXIES=yes
CFG_ANDROID_STYLE_ASSETS=yes
-CFG_GSTREAMER=auto
-CFG_GSTREAMER_VERSION=""
-CFG_STD_ATOMIC64=auto
# Target architecture
CFG_ARCH=
@@ -675,114 +493,18 @@ CFG_CPUFEATURES=
CFG_HOST_ARCH=
CFG_HOST_CPUFEATURES=
-CFG_USE_GNUMAKE=no
-CFG_XINPUT2=auto
-CFG_XKB=auto
-CFG_XKBCOMMON=yes
-CFG_XKBCOMMON_EVDEV=auto
-CFG_XKB_CONFIG_ROOT=auto
-CFG_XCB=auto
-CFG_XCB_XLIB=auto
-CFG_XCB_GLX=no
-CFG_EGLFS=auto
-CFG_EGLFS_BRCM=no
-CFG_EGLFS_EGLDEVICE=no
-CFG_EGLFS_MALI=no
-CFG_EGLFS_VIV=no
-CFG_EGLFS_VIV_WL=no
-CFG_DIRECTFB=no
-CFG_GBM=auto
-CFG_LINUXFB=auto
-CFG_INTEGRITYFB=no
-CFG_KMS=auto
-CFG_MIRCLIENT=auto
-CFG_LIBUDEV=auto
-CFG_LIBINPUT=auto
-CFG_EVDEV=auto
-CFG_TSLIB=auto
-CFG_CUPS=auto
-CFG_ICONV=auto
-CFG_DBUS=auto
-CFG_GLIB=auto
-CFG_GTK=auto
-CFG_LARGEFILE=yes
-CFG_OPENSSL=auto
-CFG_LIBPROXY=no
-CFG_SECURETRANSPORT=auto
-CFG_PRECOMPILE=auto
-CFG_LTCG=no
-CFG_SEPARATE_DEBUG_INFO=no
-CFG_REDUCE_EXPORTS=auto
-CFG_SSE2=auto
-CFG_SSE3=auto
-CFG_SSSE3=auto
-CFG_SSE4_1=auto
-CFG_SSE4_2=auto
-CFG_AVX=auto
-CFG_AVX2=auto
-CFG_AVX512=auto
-CFG_REDUCE_RELOCATIONS=auto
-CFG_ACCESSIBILITY=auto
-CFG_ACCESSIBILITY_ATSPI_BRIDGE=no # will be enabled depending on dbus and accessibility being enabled
-CFG_NEON=auto
-CFG_MIPS_DSP=auto
-CFG_MIPS_DSPR2=auto
-CFG_CLOCK_GETTIME=auto
-CFG_CLOCK_MONOTONIC=auto
-CFG_POSIX_FALLOCATE=auto
-CFG_MREMAP=auto
-CFG_GETADDRINFO=auto
-CFG_IPV6IFNAME=auto
-CFG_GETIFADDRS=auto
-CFG_INOTIFY=auto
-CFG_EVENTFD=auto
-CFG_CLOEXEC=no
-CFG_POLL=auto
-CFG_RPATH=yes
-CFG_FRAMEWORK=auto
-CFG_USE_GOLD_LINKER=auto
-CFG_ENABLE_NEW_DTAGS=auto
-DEFINES=
-INCLUDES=
-D_FLAGS=
-I_FLAGS=
-L_FLAGS=
-RPATH_FLAGS=
-W_FLAGS=
-QCONFIG_FLAGS=
XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
XPLATFORM_MAC=no # Whether target platform is OS X, iOS or tvOS
XPLATFORM_IOS=no # Whether target platform is iOS
XPLATFORM_TVOS=no # Whether target platform is tvOS
XPLATFORM_ANDROID=no
XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
-XPLATFORM_QNX=no
-XPLATFORM_HAIKU=no
-XPLATFORM_INTEGRITY=no
PLATFORM=$QMAKESPEC
-QT_CROSS_COMPILE=no
OPT_CONFIRM_LICENSE=no
OPT_SHADOW=maybe
OPT_VERBOSE=no
OPT_HELP=
CFG_SILENT=no
-CFG_ALSA=auto
-CFG_PULSEAUDIO=auto
-CFG_COREWLAN=auto
-CFG_ICU=auto
-CFG_FORCE_ASSERTS=no
-CFG_SANITIZERS=none
-CFG_SANITIZE_ADDRESS=no
-CFG_SANITIZE_THREAD=no
-CFG_SANITIZE_MEMORY=no
-CFG_SANITIZE_UNDEFINED=no
-CFG_PCRE=auto
-CFG_STDCXX=auto
-CFG_DIRECTWRITE=no
-CFG_DIRECTWRITE2=auto
-CFG_WERROR=auto
-CFG_HEADERSCLEAN=auto
-CFG_QREAL=double
OPT_MAC_SDK=
COMMERCIAL_USER=ask
CFG_DEV=no
@@ -811,27 +533,7 @@ QT_HOST_LIBS=
QT_HOST_DATA=
QT_EXT_PREFIX=
-#flags for SQL drivers
-QMAKE_CFLAGS_PSQL=
-QMAKE_LIBS_PSQL=
-QMAKE_CFLAGS_MYSQL=
-QMAKE_LIBS_MYSQL=
-QMAKE_LIBS_MYSQL_R=
-QMAKE_CFLAGS_SQLITE=
-QMAKE_LIBS_SQLITE=
-QMAKE_LIBS_ODBC="-lodbc"
-QMAKE_LIBS_TDS=
-
-# flags for libdbus-1
-QMAKE_CFLAGS_DBUS=
-QMAKE_LIBS_DBUS=
-
-# flags for Glib (X11 only)
-QMAKE_CFLAGS_GLIB=
-QMAKE_LIBS_GLIB=
-
# default qpa platform
-QT_QPA_DEFAULT_PLATFORM=
# Android vars
CFG_DEFAULT_ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT
@@ -842,21 +544,6 @@ CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION=4.9
CFG_DEFAULT_ANDROID_NDK_HOST=$ANDROID_NDK_HOST
#-------------------------------------------------------------------------------
-# check SQL drivers available in this package
-#-------------------------------------------------------------------------------
-
-CFG_SQL_AVAILABLE=
-if [ -d "$relpath/src/plugins/sqldrivers" ]; then
- for a in "$relpath/src/plugins/sqldrivers/"*; do
- if [ -d "$a" ]; then
- base_a=`basename "$a"`
- CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
- eval "CFG_SQL_${base_a}=auto"
- fi
- done
-fi
-
-#-------------------------------------------------------------------------------
# parse command line arguments
#-------------------------------------------------------------------------------
@@ -927,13 +614,6 @@ while [ "$#" -gt 0 ]; do
-device-option| \
-host-option| \
-sdk| \
- -c++std | \
- -mysql_config| \
- -psql_config| \
- -qpa| \
- -qreal| \
- -sanitize| \
- -xkb-config-root| \
-android-sdk| \
-android-ndk| \
-android-ndk-platform| \
@@ -949,44 +629,12 @@ while [ "$#" -gt 0 ]; do
VAR=`echo $1 | sed 's,^-\([^-]*\)-.*,\1,'`
VAL=`echo $1 | sed 's,^-[^-]*-\(.*\),\1,'`
;;
- -system-proxies)
- VAR=system-proxies
- VAL=yes
- ;;
- -no-system-proxies)
- VAR=system-proxies
- VAL=no
- ;;
#Qt Builtin/System style options
-no-*|-system-*|-qt-*)
VAR=`echo $1 | sed 's,^-[^-]*-\(.*\),\1,'`
VAL=`echo $1 | sed 's,^-\([^-]*\)-.*,\1,'`
;;
#Options that cannot be generalized
- -k|-continue)
- VAR=fatal_error
- VAL=no
- ;;
- -opengl)
- VAR=opengl
- # this option may or may not be followed by an argument
- if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
- VAL=yes
- else
- shift;
- VAL=$1
- fi
- ;;
- -gstreamer)
- VAR=gstreamer
- # this option may or may not be followed by an argument
- if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
- VAL=yes
- else
- shift;
- VAL=$1
- fi
- ;;
-hostprefix)
VAR=`echo $1 | sed 's,^-\(.*\),\1,'`
# this option may or may not be followed by an argument
@@ -996,111 +644,23 @@ while [ "$#" -gt 0 ]; do
shift;
VAL=$1
fi
- ;;
- -qtnamespace)
- VAR="qtnamespace"
- shift
- VAL="$1"
- ;;
- -qtlibinfix)
- VAR="qtlibinfix"
- shift
- VAL="$1"
- ;;
- -D?*|-D)
- VAR="add_define"
- if [ "$1" = "-D" ]; then
- shift
- VAL="$1"
- else
- VAL=`echo $1 | sed 's,-D,,'`
- fi
- ;;
- -I?*|-I)
- VAR="add_ipath"
- if [ "$1" = "-I" ]; then
- shift
- VAL="$1"
- else
- VAL=`echo $1 | sed 's,-I,,'`
- fi
- ;;
- -L?*|-L)
- VAR="add_lpath"
- if [ "$1" = "-L" ]; then
- shift
- VAL="$1"
- else
- VAL=`echo $1 | sed 's,-L,,'`
- fi
- ;;
- -R?*|-R)
- VAR="add_rpath"
- if [ "$1" = "-R" ]; then
- shift
- VAL="$1"
- else
- VAL=`echo $1 | sed 's,-R,,'`
- fi
- ;;
- -l) # -lfoo is handled differently
- VAR="add_link"
- shift
- VAL="$1"
- ;;
- -F?*|-F)
- VAR="add_fpath"
- if [ "$1" = "-F" ]; then
- shift
- VAL="$1"
- else
- VAL=`echo $1 | sed 's,-F,,'`
- fi
- ;;
- -fw) # -fwfoo is handled differently
- VAR="add_framework"
- shift
- VAL="$1"
- ;;
- -W*)
- VAR="add_warn"
- VAL="$1"
- ;;
+ ;;
#General options, including Qt style yes options
-*)
VAR=`echo $1 | sed 's,^-\(.*\),\1,'`
VAL="yes"
;;
+ # most options don't need processing in the configure script, skip them. qmake will do the real validation
*)
- UNKNOWN_ARG=yes
- ;;
- esac
- if [ "$UNKNOWN_ARG" = "yes" ]; then
- echo "$1: unknown argument"
- ERROR=yes
shift
continue
- fi
+ ;;
+ esac
+
shift
UNKNOWN_OPT=no
case "$VAR" in
- accessibility)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_ACCESSIBILITY="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- gnumake)
- CFG_USE_GNUMAKE="$VAL"
- ;;
- mysql_config)
- CFG_MYSQL_CONFIG="$VAL"
- ;;
- psql_config)
- CFG_PSQL_CONFIG="$VAL"
- ;;
prefix)
QT_INSTALL_PREFIX="$VAL"
;;
@@ -1120,14 +680,8 @@ while [ "$#" -gt 0 ]; do
QT_EXT_PREFIX="$VAL"
;;
pkg-config)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_PKGCONFIG="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
;;
force-pkg-config)
- CFG_PKGCONFIG="yes"
;;
docdir)
QT_INSTALL_DOCS="$VAL"
@@ -1153,12 +707,6 @@ while [ "$#" -gt 0 ]; do
libdir)
QT_INSTALL_LIBS="$VAL"
;;
- qtnamespace)
- QT_NAMESPACE="$VAL"
- ;;
- qtlibinfix)
- QT_LIBINFIX="$VAL"
- ;;
translationdir)
QT_INSTALL_TRANSLATIONS="$VAL"
;;
@@ -1171,45 +719,6 @@ while [ "$#" -gt 0 ]; do
testsdir)
QT_INSTALL_TESTS="$VAL"
;;
- qreal)
- CFG_QREAL="$VAL"
- if [ "$CFG_QREAL" = "float" ]; then
- CFG_QREAL_STRING="\"float\""
- elif [ "$CFG_QREAL" != "double" ]; then
- if [ -z "$PERL" ]; then
- echo "configure needs perl in \$PATH if the -qreal option is used with" >&2
- echo "a value different from \"float\"" >&2
- exit 1
- fi
- CFG_QREAL_STRING=`perl -e '$_ = $ARGV[0];
- s/ +/ /g; s/^ +//; s/ +$//;
- while (/(.)/g) {
- $c = $1;
- if ($c =~ /[a-zA-Z0-9]/) { $result .= $c; }
- else { $result .= "_" . unpack("H*", $c); }
- }
- print "\"$result\"";' "$CFG_QREAL"`
- fi
- ;;
- sanitize)
- if [ "$VAL" = "address" ]; then
- CFG_SANITIZE_ADDRESS=yes
- elif [ "$VAL" = "thread" ]; then
- CFG_SANITIZE_THREAD=yes
- elif [ "$VAL" = "memory" ]; then
- CFG_SANITIZE_MEMORY=yes
- elif [ "$VAL" = "undefined" ]; then
- CFG_SANITIZE_UNDEFINED=yes
- else
- echo "Unknown sanitizer: '$VAL'"
- ERROR=true
- fi
- if [ "$CFG_SANITIZERS" = "none" ]; then
- CFG_SANITIZERS=$VAL
- else
- CFG_SANITIZERS="$CFG_SANITIZERS $VAL"
- fi
- ;;
sysroot)
CFG_SYSROOT="$VAL"
;;
@@ -1226,15 +735,6 @@ while [ "$#" -gt 0 ]; do
libexecdir)
QT_INSTALL_LIBEXECS="$VAL"
;;
- opengl)
- if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
- [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
- [ "$VAL" = "es2" ]; then
- CFG_OPENGL="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
nomake)
if [ -n "${QT_ALL_BUILD_PARTS%%* $VAL *}" ]; then
echo "Unknown part $VAL passed to -nomake." >&2
@@ -1261,13 +761,6 @@ while [ "$#" -gt 0 ]; do
fi
CFG_SKIP_MODULES="$CFG_SKIP_MODULES $VAL"
;;
- compile-examples)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_COMPILE_EXAMPLES="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
sdk)
if [ "$BUILD_ON_MAC" = "yes" ]; then
DeviceVar set !host_build:QMAKE_MAC_SDK "$VAL"
@@ -1276,61 +769,11 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
- harfbuzz)
- [ "$VAL" = "yes" ] && VAL=qt
- if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
- CFG_HARFBUZZ="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
-
- framework)
- if [ "$BUILD_ON_MAC" = "yes" ]; then
- CFG_FRAMEWORK="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- profile)
- if [ "$VAL" = "yes" ]; then
- CFG_PROFILE=yes
- QMakeVar add QMAKE_CFLAGS -pg
- QMakeVar add QMAKE_CXXFLAGS -pg
- QMakeVar add QMAKE_LFLAGS -pg
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- strip)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_STRIP=$VAL
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- testcocoon)
- if [ "$VAL" = "yes" ]; then
- QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
- fi
- ;;
- gcov)
- if [ "$VAL" = "yes" ]; then
- QTCONFIG_CONFIG="$QTCONFIG_CONFIG gcov"
- fi
- ;;
platform)
PLATFORM="$VAL"
;;
xplatform)
XPLATFORM="$VAL"
- case `basename "$XPLATFORM"` in win32-g++*)
- XPLATFORM_MINGW=yes
- CFG_RPATH=no
- CFG_REDUCE_EXPORTS=no
- CFG_ICU=no
- ;;
- esac
;;
device)
XPLATFORM=`resolveDeviceMkspec $VAL`
@@ -1346,36 +789,9 @@ while [ "$#" -gt 0 ]; do
HOST_VAL=`echo $VAL | cut -d '=' -f 2-`
HostVar set $HOST_VAR "$HOST_VAL"
;;
- qpa)
- QT_QPA_DEFAULT_PLATFORM="$VAL"
- ;;
- debug-and-release)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_DEBUG_RELEASE="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- release)
- if [ "$VAL" = "yes" ]; then
- CFG_DEBUG=no
- elif [ "$VAL" = "no" ]; then
- CFG_DEBUG=yes
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- debug)
- CFG_DEBUG="$VAL"
- ;;
- force-debug-info)
- CFG_FORCEDEBUGINFO="$VAL"
- ;;
optimized-qmake|optimized-tools)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_RELEASE_TOOLS="$VAL"
- else
- UNKNOWN_OPT=yes
fi
;;
developer-build)
@@ -1387,545 +803,21 @@ while [ "$#" -gt 0 ]; do
opensource)
COMMERCIAL_USER="no"
;;
- static)
- if [ "$VAL" = "yes" ]; then
- CFG_SHARED=no
- elif [ "$VAL" = "no" ]; then
- CFG_SHARED=yes
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- fatal_error)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
feature-*)
FEATURE=`echo $VAR | sed 's,^[^-]*-\([^-]*\),\1,' | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
if grep "^Feature: *${FEATURE} *\$" "$relpath"/src/corelib/global/qfeatures.txt >/dev/null 2>&1; then
+ F=`echo $VAR | sed 's,^[^-]*-\([^-]*\),\1,'`
if [ "$VAL" = "no" ]; then
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
- elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
- else
+ F="no-$F"
+ elif [ "$VAL" != "yes" ] && [ "$VAL" != "unknown" ]; then
UNKNOWN_OPT=yes
fi
+ CFG_FEATURES="$CFG_FEATURES $F"
else
echo "ERROR: Unknown feature $FEATURE"
UNKNOWN_OPT=yes
fi
;;
- shared)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_SHARED="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- gif)
- if [ "$VAL" = "no" ]; then
- CFG_GIF="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- sm)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_SM="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
-
- ;;
- xinput2)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_XINPUT2="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- egl)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_EGL="$VAL"
- CFG_EGL_X="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- pch)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_PRECOMPILE="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- ltcg)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_LTCG="$VAL"
- else
- UNKNOWN_OPT=no
- fi
- ;;
- separate-debug-info)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_SEPARATE_DEBUG_INFO="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- reduce-exports)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_REDUCE_EXPORTS="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- sse2)
- if [ "$VAL" = "no" ]; then
- CFG_SSE2="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- sse3)
- if [ "$VAL" = "no" ]; then
- CFG_SSE3="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- ssse3)
- if [ "$VAL" = "no" ]; then
- CFG_SSSE3="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- sse4.1)
- if [ "$VAL" = "no" ]; then
- CFG_SSE4_1="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- sse4.2)
- if [ "$VAL" = "no" ]; then
- CFG_SSE4_2="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- avx)
- if [ "$VAL" = "no" ]; then
- CFG_AVX="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- avx2)
- if [ "$VAL" = "no" ]; then
- CFG_AVX2="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- avx512)
- if [ "$VAL" = "no" ]; then
- CFG_AVX512=""
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- mips_dsp)
- if [ "$VAL" = "no" ]; then
- CFG_MIPS_DSP="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- mips_dspr2)
- if [ "$VAL" = "no" ]; then
- CFG_MIPS_DSPR2="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- reduce-relocations)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_REDUCE_RELOCATIONS="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- use-gold-linker)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_USE_GOLD_LINKER="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- zlib)
- if [ "$VAL" = "system" ]; then
- CFG_SYSTEM_ZLIB="yes"
- elif [ "$VAL" = "qt" ]; then
- CFG_SYSTEM_ZLIB="no"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- mtdev)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_MTDEV="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- journald)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_JOURNALD="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- syslog)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_SYSLOG="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- sqlite)
- if [ "$VAL" = "system" ]; then
- CFG_SQLITE=system
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- libpng)
- [ "$VAL" = "yes" ] && VAL=qt
- if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
- CFG_LIBPNG="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- libjpeg)
- [ "$VAL" = "yes" ] && VAL=qt
- if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
- CFG_LIBJPEG="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- xrender)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_XRENDER="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- doubleconversion)
- if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
- CFG_DOUBLECONVERSION="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- fontconfig)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_FONTCONFIG="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- freetype)
- [ "$VAL" = "yes" ] && VAL=qt
- if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
- CFG_FREETYPE="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- xkb)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_XKB="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- xkbcommon-evdev)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_XKBCOMMON_EVDEV="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- xkbcommon|xkbcommon-x11)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
- CFG_XKBCOMMON="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- xcb)
- 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
- ;;
- xcb-xlib)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_XCB_XLIB="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- eglfs)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_EGLFS="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- directfb)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_DIRECTFB="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- gbm)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_GBM="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- linuxfb)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_LINUXFB="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- kms)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_KMS="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- mirclient)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_MIRCLIENT="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- libudev)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_LIBUDEV="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- libinput)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_LIBINPUT="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- evdev)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_EVDEV="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- tslib)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_TSLIB="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- cups)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_CUPS="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- iconv)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_ICONV="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- glib)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_GLIB="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- slog2)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_SLOG2="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- imf)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_QNX_IMF="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- pps)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_PPS="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- lgmon)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_LGMON="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- pulseaudio)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_PULSEAUDIO="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- alsa)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_ALSA="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- gstreamer)
- if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] ||
- [ "$VAL" = "0.10" ] || [ "$VAL" = "1.0" ] ||
- [ "$VAL" = "no" ]; then
- CFG_GSTREAMER="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- gtk)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_GTK="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- gui)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
- CFG_GUI="yes"
- else
- if [ "$VAL" = "no" ]; then
- CFG_GUI="no"
- else
- UNKNOWN_OPT=yes
- fi
- fi
- ;;
- widgets)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
- CFG_WIDGETS="yes"
- elif [ "$VAL" = "no" ]; then
- CFG_WIDGETS="no"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- qpa-platform-guard)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- echo "WARNING: The [-no]-qpa-platform-guard argument is deprecated and has no effect."
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- dbus)
- if [ "$VAL" = "no" ] || [ "$VAL" = "linked" ] || [ "$VAL" = "runtime" ]; then
- CFG_DBUS="$VAL"
- elif [ "$VAL" = "yes" ]; then
- # keep as auto, we'll auto-detect whether to go linked or runtime later
- CFG_DBUS=auto
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- dbus-linked)
- if [ "$VAL" = "yes" ]; then
- CFG_DBUS="linked"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- dbus-runtime)
- if [ "$VAL" = "yes" ]; then
- CFG_DBUS="runtime"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- openssl)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_OPENSSL="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- openssl-linked)
- if [ "$VAL" = "yes" ]; then
- CFG_OPENSSL="linked"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- securetransport)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_SECURETRANSPORT="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- libproxy)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_LIBPROXY="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- qml-debug)
- if [ "$VAL" = "yes" ]; then
- CFG_QML_DEBUG="yes"
- else
- if [ "$VAL" = "no" ]; then
- CFG_QML_DEBUG="no"
- else
- UNKNOWN_OPT=yes
- fi
- fi
- ;;
confirm-license)
if [ "$VAL" = "yes" ]; then
OPT_CONFIRM_LICENSE="$VAL"
@@ -1940,35 +832,6 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
- sql-*)
- # if Qt style options were used, $VAL can be "no", "yes", or "plugin", plugin for backwards compatibility
- [ "$VAL" = "plugin" ] && VAL=yes
- # now $VAL should be "yes" or "no"... double-check
- if [ "$VAL" != "no" ] && [ "$VAL" != "yes" ]; then
- UNKNOWN_OPT=yes
- fi
- # now $VAL is "no", "qt", or "plugin"
- OPT="$VAL"
- VAL=`echo $VAR | sed 's,^[^-]*-\([^-]*\).*,\1,'`
- VAR=`echo $VAR | sed 's,^\([^-]*\).*,\1,'`
-
- # Check that that user's value is available.
- found=no
- for d in $CFG_SQL_AVAILABLE; do
- if [ "$VAL" = "$d" ]; then
- found=yes
- break
- fi
- done
- if [ "$found" != "yes" ]; then
- echo "$CURRENT_OPT: unknown argument"
- ERROR=yes
- continue
- fi
-
- # set the CFG_SQL_driver
- eval "CFG_SQL_$VAL=\$OPT"
- ;;
v|verbose)
if [ "$VAL" = "yes" ]; then
OPT_VERBOSE=yes
@@ -1978,124 +841,10 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes
fi
;;
- rpath)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_RPATH="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- add_define)
- DEFINES="$DEFINES \"$VAL\""
- D_FLAGS="$D_FLAGS -D\"$VAL\""
- ;;
- add_ipath)
- INCLUDES="$INCLUDES \"$VAL\""
- I_FLAGS="$I_FLAGS -I\"${VAL}\""
- ;;
- add_lpath)
- L_FLAGS="$L_FLAGS -L\"${VAL}\""
- ;;
- add_rpath)
- RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
- ;;
- add_link)
- L_FLAGS="$L_FLAGS -l\"${VAL}\""
- ;;
- add_fpath)
- if [ "$BUILD_ON_MAC" = "yes" ]; then
- L_FLAGS="$L_FLAGS -F\"${VAL}\""
- I_FLAGS="$I_FLAGS -F\"${VAL}\""
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- add_framework)
- if [ "$BUILD_ON_MAC" = "yes" ]; then
- L_FLAGS="$L_FLAGS -framework \"${VAL}\""
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- add_warn)
- W_FLAGS="$W_FLAGS \"${VAL}\""
- ;;
silent)
+ # need to keep this here, to ensure qmake is built silently
CFG_SILENT="$VAL"
;;
- icu)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_ICU="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- force-asserts)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_FORCE_ASSERTS="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- pcre)
- if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
- CFG_PCRE="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- c++std)
- case "$VAL" in
- c++11|c++14|c++1z|auto)
- CFG_STDCXX="$VAL"
- ;;
- 11|14|1z)
- CFG_STDCXX="c++$VAL"
- ;;
- 1y|c++1y)
- CFG_STDCXX="c++14"
- ;;
- *)
- echo >&2 "Invalid C++ edition: $VAL; valid options are: c++11 c++14 c++1z auto"
- ERROR=yes
- ;;
- esac
- ;;
- system-proxies)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_SYSTEM_PROXIES="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- directwrite)
- if [ "$XPLATFORM_MINGW" = "yes" ] ; then
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_DIRECTWRITE="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- warnings-are-errors|Werror)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_WERROR="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- headersclean)
- if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
- CFG_HEADERSCLEAN="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- xkb-config-root)
- CFG_XKB_CONFIG_ROOT="$VAL"
- ;;
android-sdk)
CFG_DEFAULT_ANDROID_SDK_ROOT="$VAL"
;;
@@ -2115,32 +864,12 @@ while [ "$#" -gt 0 ]; do
CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION="$VAL"
;;
android-style-assets)
+ # Required to be able to show the correct license text
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_ANDROID_STYLE_ASSETS="$VAL"
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- l*) # -lfoo
- if [ "$VAL" = "yes" ]; then
- L_FLAGS="$L_FLAGS -l\"${VAR#l}\""
- else
- UNKNOWN_OPT=yes
- fi
- ;;
- fw*) # -fwfoo
- if [ "$VAL" = "yes" ]; then
- if [ "$BUILD_ON_MAC" = "yes" ]; then
- L_FLAGS="$L_FLAGS -framework \"${VAR#fw}\""
- else
- UNKNOWN_OPT=yes
- fi
- else
- UNKNOWN_OPT=yes
fi
;;
*)
- UNKNOWN_OPT=yes
;;
esac
if [ "$UNKNOWN_OPT" = "yes" ]; then
@@ -2320,10 +1049,8 @@ case "$XPLATFORM" in
XPLATFORM_MINGW=yes
;;
*qnx-*)
- XPLATFORM_QNX=yes
;;
*haiku-*)
- XPLATFORM_HAIKU=yes
;;
*ios*)
XPLATFORM_MAC=yes
@@ -2337,7 +1064,6 @@ case "$XPLATFORM" in
XPLATFORM_MAC=yes
;;
*integrity*)
- XPLATFORM_INTEGRITY=yes
;;
# XPLATFORM_ANDROID should not be set for unsupported/android-g++
*unsupported*)
@@ -2509,26 +1235,7 @@ fi
# command line and environment validation
#-------------------------------------------------------------------------------
-if [ "$XPLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then
- echo
- echo "WARNING: -debug-and-release is not supported outside of Mac OS X."
- echo "Qt can be built in release mode with separate debug information, so"
- echo "-debug-and-release is not necessary anymore"
- echo
-fi
-
-if ( [ "$CFG_XCB" = "system" ] || [ "$CFG_XCB" = "qt" ] ) && [ "$CFG_XKBCOMMON" = "no" ]; then
- echo "Error: -no-xkbcommon-x11 is not supported on XCB platform plugin."
- exit 101
-fi
-
if [ "$XPLATFORM_ANDROID" = "yes" ]; then
- if [ "$CFG_DBUS" = "auto" ]; then
- CFG_DBUS="no"
- fi
- if [ "$CFG_EGLFS" = "auto" ]; then
- CFG_EGLFS="no"
- fi
if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then
case $PLATFORM in
linux-*)
@@ -2574,9 +1281,6 @@ if [ "$XPLATFORM_ANDROID" = "yes" ]; then
exit 1
fi
- QT_QPA_DEFAULT_PLATFORM="android"
- CFG_LARGEFILE="no"
-
DeviceVar set DEFAULT_ANDROID_SDK_ROOT "$CFG_DEFAULT_ANDROID_SDK_ROOT"
DeviceVar set DEFAULT_ANDROID_NDK_ROOT "$CFG_DEFAULT_ANDROID_NDK_ROOT"
DeviceVar set DEFAULT_ANDROID_PLATFORM "$CFG_DEFAULT_ANDROID_PLATFORM"
@@ -2595,11 +1299,6 @@ if [ -d "$XPLATFORM" ]; then
else
XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
fi
-if [ "$PLATFORM" != "$XPLATFORM" ]; then
- QT_CROSS_COMPILE=yes
- QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
- QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
-fi
if [ "$BUILD_ON_MAC" = "yes" ]; then
if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
@@ -2679,118 +1378,24 @@ if [ "$OPT_SHADOW" = "yes" ]; then
mkdir -p "$outpath/mkspecs"
fi
-# detect build style
-if [ "$CFG_DEBUG" = "auto" ]; then
- if [ "$XPLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
- CFG_DEBUG_RELEASE=yes
- CFG_DEBUG=yes
- elif [ "$CFG_DEV" = "yes" ]; then
- CFG_DEBUG_RELEASE=no
- CFG_DEBUG=yes
- else
- CFG_DEBUG_RELEASE=no
- CFG_DEBUG=no
- fi
-fi
-if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG build_all debug_and_release"
-fi
-
-if [ "$CFG_FORCEDEBUGINFO" = "yes" ]; then
- QMAKE_CONFIG="$QMAKE_CONFIG force_debug_info"
-fi
-
-if [ "$CFG_RELEASE_TOOLS" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG release_tools"
-fi
-
-if [ "$XPLATFORM_MAC" = "yes" ]; then
- [ "$CFG_PKGCONFIG" = "auto" ] && CFG_PKGCONFIG="no"
-fi
-
if [ "$XPLATFORM_IOS" = "yes" ] || [ "$XPLATFORM_TVOS" = "yes" ]; then
- CFG_RPATH="no"
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS examples"
- CFG_SHARED="no" # iOS builds should be static to be able to submit to the App Store
CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtdoc qtmacextras qtserialport qtwebkit qtwebkit-examples"
- CFG_PRECOMPILE="no" # Precompiled headers not supported with multiple -arch arguments
if [ "$XPLATFORM_TVOS" = "yes" ]; then
CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtscript"
- CFG_WIDGETS="no"
fi
-
- # If the user passes -sdk on the command line we build a SDK-specific Qt build.
- # Otherwise we build a joined simulator and device build, which is the default.
- if [ -z "$OPT_MAC_SDK" ]; then
- QT_CONFIG="$QT_CONFIG build_all simulator_and_device"
- fi
-fi
-
-# disable XCB and GTK support auto-detection on Mac
-if [ "$XPLATFORM_MAC" = "yes" ]; then
- [ "$CFG_XCB" = "auto" ] && CFG_XCB=no
- [ "$CFG_GTK" = "auto" ] && CFG_GTK=no
fi
-QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
-TEST_COMPILER=$QMAKE_CONF_COMPILER
-
-if [ "$XPLATFORM_ANDROID" = "yes" ] ; then
- ANDROID_NDK_TOOLCHAIN_PREFIX=
- ANDROID_NDK_TOOLS_PREFIX=
- ANDROID_PLATFORM_ARCH=
- case $CFG_DEFAULT_ANDROID_TARGET_ARCH in
- armeabi*)
- ANDROID_NDK_TOOLS_PREFIX=arm-linux-androideabi
- ANDROID_NDK_TOOLCHAIN_PREFIX=arm-linux-androideabi
- ANDROID_PLATFORM_ARCH=arch-arm
- ;;
- x86)
- ANDROID_NDK_TOOLS_PREFIX=i686-linux-android
- ANDROID_NDK_TOOLCHAIN_PREFIX=x86
- ANDROID_PLATFORM_ARCH=arch-x86
- ;;
- mips)
- ANDROID_NDK_TOOLS_PREFIX=mipsel-linux-android
- ANDROID_NDK_TOOLCHAIN_PREFIX=mipsel-linux-android
- ANDROID_PLATFORM_ARCH=arch-mips
- ;;
- arm64-v8a)
- ANDROID_NDK_TOOLS_PREFIX=aarch64-linux-android
- ANDROID_NDK_TOOLCHAIN_PREFIX=aarch64-linux-android
- ANDROID_PLATFORM_ARCH=arch-arm64
- ;;
- mips64)
- ANDROID_NDK_TOOLS_PREFIX=mips64el-linux-android
- ANDROID_NDK_TOOLCHAIN_PREFIX=mips64el-linux-android
- ANDROID_PLATFORM_ARCH=arch-mips64
- ;;
- x86_64)
- ANDROID_NDK_TOOLS_PREFIX=x86_64-linux-android
- ANDROID_NDK_TOOLCHAIN_PREFIX=x86_64
- ANDROID_PLATFORM_ARCH=arch-x86_64
- ;;
- *)
- echo "ERROR: Unknown android arch $CFG_DEFAULT_ANDROID_TARGET_ARCH"
- exit 1
- ;;
- esac
- QMAKE_CONF_COMPILER=$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/$ANDROID_NDK_TOOLCHAIN_PREFIX-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST/bin/$ANDROID_NDK_TOOLS_PREFIX-g++
- TEST_COMPILER="$QMAKE_CONF_COMPILER --sysroot=$CFG_DEFAULT_ANDROID_NDK_ROOT/platforms/$CFG_DEFAULT_ANDROID_PLATFORM/$ANDROID_PLATFORM_ARCH/"
- if [ "$CFG_ANDROID_STYLE_ASSETS" = "yes" ]; then
- QMAKE_CONFIG="$QMAKE_CONFIG android-style-assets"
+if [ "$XPLATFORM_ANDROID" != "yes" ]; then
+ TEST_COMPILER=`getXQMakeConf QMAKE_CXX`
+ GCC_MACHINE_DUMP=
+ case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac
+ if [ -n "$GCC_MACHINE_DUMP" ]; then
+ DeviceVar set GCC_MACHINE_DUMP $($TEST_COMPILER -dumpmachine)
fi
fi
-TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
-
-GCC_MACHINE_DUMP=
-case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac
-if [ -n "$GCC_MACHINE_DUMP" ]; then
- DeviceVar set GCC_MACHINE_DUMP $($TEST_COMPILER -dumpmachine)
-fi
-
if [ -n "$CFG_SYSROOT" ] && [ "$CFG_GCC_SYSROOT" = "yes" ]; then
SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
else
@@ -2798,60 +1403,6 @@ else
fi
export SYSROOT_FLAG # used by config.tests/unix/{compile.test,arch.test}
-# Auto-detect default include and library search paths.
-
-# Use intermediate variable to get around backtick/quote nesting problems.
-awkprog='
-BEGIN { ORS = ""; FS = "="; incs = 0; libs = 0; }
-
-function normalize(dir)
-{
- do {
- odir = dir
- sub(/\/[^\/]+\/\.\./, "", dir)
- } while (dir != odir);
- do {
- odir = dir
- gsub(/\/\./, "", dir)
- } while (dir != odir);
- sub("/$", "", dir);
- return dir;
-}
-
-# extract include paths from indented lines between
-# #include <...> search starts here:
-# and
-# End of search list.
-/^\#include </ { yup=1; print "DEFAULT_INCDIRS=\""; next }
-/^End of search/ { yup=0; print "\"\n" }
-/ \(framework directory\)$/ { next }
-yup { print normalize(substr($0, 2)) "\n"; ++incs }
-
-# extract from one line like LIBRARY_PATH=/one/path:/another/path:...
-$1 == "LIBRARY_PATH" {
- libs = split($2, library_paths, ":");
- print "DEFAULT_LIBDIRS=\"";
- for (lib in library_paths) {
- dir = normalize(library_paths[lib]);
- if (!(dir in dirs)) {
- print dir "\n";
- dirs[dir] = 1;
- }
- }
- print "\"\n"
-}
-
-END {
- if (incs == 0)
- print "DEFAULT_INCDIRS=\"/usr/include\n/usr/local/include\"\n";
- if (libs == 0)
- print "DEFAULT_LIBDIRS=\"/lib\n/usr/lib\"\n";
-}'
-
-awkprog_result=`LC_ALL=C $TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null | $AWK "$awkprog"`
-eval "$awkprog_result"
-[ "$OPT_VERBOSE" = "yes" ] && echo "$awkprog_result"
-
#setup the build parts
if [ -z "$CFG_BUILD_PARTS" ]; then
CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
@@ -3053,10 +1604,6 @@ if [ -z "$QT_REL_HOST_DATA" ]; then
fi
fi
-if [ "$CFG_COMPILE_EXAMPLES" = "yes" ]; then
- QMAKE_CONFIG="$QMAKE_CONFIG compile_examples"
-fi
-
shortxspec=`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`
shortspec=`echo $QMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`
@@ -3415,9 +1962,6 @@ else
HOST_VARS_FILE="$HOST_VARS_OUTFILE"
fi
-
-echo "Running configuration tests..."
-
#-------------------------------------------------------------------------------
# Verify makespec
#-------------------------------------------------------------------------------
@@ -3433,130 +1977,6 @@ if [ $? != "0" ]; then
fi
#-------------------------------------------------------------------------------
-# Detect pkg-config
-#-------------------------------------------------------------------------------
-if [ -z "$PKG_CONFIG" ]; then
- # See if PKG_CONFIG is set in the mkspec:
- PKG_CONFIG="`"$CFG_QMAKE_PATH" -qtconf "$QTCONFFILE" -E -nocache -spec "$XQMAKESPEC" "CONFIG=" $DEV_NULL 2>&1 | sed -n -e 's,^PKG_CONFIG = \(.*\),\1,p'`"
- [ -n "$PKG_CONFIG" ] && [ "$OPT_VERBOSE" = "yes" ] && echo "Found pkg-config from mkspec: $PKG_CONFIG"
-fi
-if [ -z "$PKG_CONFIG" ]; then
- PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
- [ -n "$PKG_CONFIG" ] && [ "$OPT_VERBOSE" = "yes" ] && echo "Found pkg-config from \$PATH: $PKG_CONFIG"
-fi
-
-if [ "$CFG_PKGCONFIG" = "no" ]; then
- PKG_CONFIG=
- [ "$OPT_VERBOSE" = "yes" ] && echo "pkg-config support disabled."
-elif [ -n "$PKG_CONFIG" ]; then
- # found a pkg-config
- if [ "$QT_CROSS_COMPILE" = "yes" ]; then
- # when xcompiling, check environment to see if it's actually usable
- if [ -z "$PKG_CONFIG_LIBDIR" ]; then
- if [ -n "$CFG_SYSROOT" ] && [ -d "$CFG_SYSROOT/usr/lib/pkgconfig" ]; then
- PKG_CONFIG_LIBDIR=$CFG_SYSROOT/usr/lib/pkgconfig:$CFG_SYSROOT/usr/share/pkgconfig
- if [ -n "$GCC_MACHINE_DUMP" ]; then
- PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR:$CFG_SYSROOT/usr/lib/$GCC_MACHINE_DUMP/pkgconfig
- fi
- export PKG_CONFIG_LIBDIR
- echo >&2 "Note: PKG_CONFIG_LIBDIR automatically set to $PKG_CONFIG_LIBDIR"
- elif [ "$CFG_PKGCONFIG" = "auto" ]; then
- PKG_CONFIG=
- echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set and"
- echo >&2 "the host's .pc files would be used (even if you set PKG_CONFIG_PATH)."
- echo >&2 "Set this variable to the directory that contains target .pc files"
- echo >&2 "for pkg-config to function correctly when cross-compiling or"
- echo >&2 "use -pkg-config to override this test."
- fi
- fi
- if [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
- if [ -n "$CFG_SYSROOT" ]; then
- PKG_CONFIG_SYSROOT_DIR=$CFG_SYSROOT
- export PKG_CONFIG_SYSROOT_DIR
- echo >&2 "Note: PKG_CONFIG_SYSROOT_DIR automatically set to $PKG_CONFIG_SYSROOT_DIR"
- elif [ "$CFG_PKGCONFIG" = "auto" ]; then
- PKG_CONFIG=
- echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set."
- echo >&2 "Set this variable to your sysroot for pkg-config to function correctly when"
- echo >&2 "cross-compiling or use -pkg-config to override this test."
- fi
- fi
- fi
- if [ -n "$PKG_CONFIG" ]; then
- CFG_PKGCONFIG=yes
- else
- CFG_PKGCONFIG=no
- fi
-elif [ "$CFG_PKGCONFIG" = "yes" ]; then
- echo >&2 "Could not detect pkg-config from mkspec or PATH."
- exit 101
-fi
-
-if [ -z "$PKG_CONFIG" ]; then
- QT_CONFIG="$QT_CONFIG no-pkg-config"
-fi
-
-#-------------------------------------------------------------------------------
-# run configure tests
-#-------------------------------------------------------------------------------
-
-# parameters: path, name, extra args
-compileTest()
-{
- path=config.tests/$1
- name=$2
- shift 2
- # allow config tests which behave differently depending on the type of
- # library being built (shared/static) e.g. see config.tests/unix/icu
- test_config="$QMAKE_CONFIG shared"
- if [ "$CFG_SHARED" = "no" ]; then
- test_config="$QMAKE_CONFIG static"
- fi
- echo $ECHO_N "checking for $name... $ECHO_C"
- "$unixtests/compile.test" "$XQMAKESPEC" "$test_config" $OPT_VERBOSE "$relpath" "$outpath" "$path" "$name" "$CFG_QMAKE_PATH" "$QTCONFFILE" $I_FLAGS $D_FLAGS $L_FLAGS "$@"
-}
-
-compileTestWithPkgConfig()
-{
- if [ $# -lt 4 ]; then
- echo "CompileTestWithPkgConfig requires at least 4 arguments."
- echo "compileTestWithPkgConfig pkg_name configtest configtest_name qmake_postfix + additional arguments to compileTest"
- exit 1
- fi
-
- local pkg_name=$1
- local configtest=$2
- local configtest_name="$3"
- local qmake_postfix=$4
- shift 4
-
- local has_used_pkg_config="no"
-
- local incdir_raw incdir_mod cflags
- local libdir_raw libdir_mod libs
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists $pkg_name 2>/dev/null; then
- incdir_raw=`$PKG_CONFIG --cflags-only-I $pkg_name 2>/dev/null`
- cflags=`$PKG_CONFIG --cflags-only-other $pkg_name 2>/dev/null`
- libdir_raw=`$PKG_CONFIG --libs-only-L $pkg_name 2>/dev/null`
- libs=`$PKG_CONFIG --libs-only-l --libs-only-other $pkg_name 2>/dev/null`
- incdir_mod=`echo $incdir_raw | sed -e 's,^-I,,g' -e 's, -I, ,g'`
- libdir_mod=`echo $libdir_raw | sed -e 's,^-L,,g' -e 's, -L, ,g'`
- has_used_pkg_config="yes"
- fi
- if compileTest $configtest "$configtest_name" $libdir_raw $incdir_raw $libs $cflags "$@"; then
- if [ "$has_used_pkg_config" = "yes" ] && [ -n "$qmake_postfix" ]; then
- QMakeVar set QMAKE_INCDIR_$qmake_postfix "`shellArgumentListToQMakeList $incdir_mod`"
- QMakeVar set QMAKE_LIBDIR_$qmake_postfix "`shellArgumentListToQMakeList $libdir_mod`"
- QMakeVar set QMAKE_LIBS_$qmake_postfix "`shellArgumentListToQMakeList $libs`"
- QMakeVar set QMAKE_CFLAGS_$qmake_postfix "`shellArgumentListToQMakeList $cflags`"
- fi
- return 0
- else
- return 1
- fi
-}
-
-#-------------------------------------------------------------------------------
# determine the target and host architectures
#-------------------------------------------------------------------------------
@@ -3598,2697 +2018,79 @@ if [ "$OPT_VERBOSE" = "yes" ]; then
fi
#-------------------------------------------------------------------------------
-# functionality tests
+# run configure tests
#-------------------------------------------------------------------------------
-# auto-detect precompiled header support
-if [ "$CFG_PRECOMPILE" = "auto" ]; then
- if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
- CFG_PRECOMPILE=no
- else
- CFG_PRECOMPILE=yes
- fi
-fi
-
-# auto-detect -fvisibility support
-if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
- if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
- if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
- echo "-reduce-exports was requested but this compiler does not support it"
- echo "Re-run configure with -v for more information"
- exit 1
- fi
- CFG_REDUCE_EXPORTS=no
- else
- CFG_REDUCE_EXPORTS=yes
- fi
-fi
-
-# auto-detect -fuse-ld=gold support
-if [ "$CFG_USE_GOLD_LINKER" != "no" ]; then
- if compilerSupportsFlag $TEST_COMPILER -fuse-ld=gold; then
- CFG_USE_GOLD_LINKER=yes
- else
- if [ "$CFG_USE_GOLD_LINKER" = "yes" ]; then
- echo "-use-gold-linker was requested but this compiler does not support it"
- exit 1
- fi
- CFG_USE_GOLD_LINKER=no
- fi
-fi
-
-# auto-detect --enable-new-dtags support
-if linkerSupportsFlag $TEST_COMPILER --enable-new-dtags; then
- CFG_ENABLE_NEW_DTAGS=yes
-else
- CFG_ENABLE_NEW_DTAGS=no
-fi
-
-# auto-detect -fstack-protector-strong support (for QNX only currently)
-if [ "$XPLATFORM_QNX" = "yes" ]; then
- if compilerSupportsFlag $TEST_COMPILER -fstack-protector-strong; then
- CFG_STACK_PROTECTOR_STRONG=yes
- else
- CFG_STACK_PROTECTOR_STRONG=no
- fi
-else
- CFG_STACK_PROTECTOR_STRONG=no
-fi
-
-# detect the availability of the -Bsymbolic-functions linker optimization
-if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
- if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
- if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
- echo "-reduce-relocations was requested but this compiler does not support it"
- echo "Re-run configure with -v for more information"
- exit 1
- fi
- CFG_REDUCE_RELOCATIONS=no
- else
- CFG_REDUCE_RELOCATIONS=yes
- fi
-fi
-
-# auto-detect GNU make support
-if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
- CFG_USE_GNUMAKE=yes
-fi
-
-# find the default framework value
-if [ "$XPLATFORM_MAC" = "yes" ]; then
- if [ "$CFG_FRAMEWORK" = "auto" ]; then
- CFG_FRAMEWORK="$CFG_SHARED"
- elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
- echo
- echo "WARNING: Using static linking will disable the use of Mac frameworks."
- echo
- CFG_FRAMEWORK="no"
- fi
-else
- CFG_FRAMEWORK=no
-fi
-
-if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
- # sanity-check for separate debug info
- if [ "$CFG_SHARED" = "no" ]; then
- echo "ERROR: -separate-debug-info is incompatible with -static"
- exit 1
- fi
- if [ "$CFG_DEBUG" = "no" -a "$CFG_DEBUG_RELEASE" = "no" -a "$CFG_FORCEDEBUGINFO" = "no" ]; then
- echo "ERROR: -separate-debug-info needs -debug, -debug-and-release, or -force-debug-info"
- exit 1
- fi
-
- # Detect objcopy support
- if [ "$XPLATFORM_MAC" = "no" ]; then
- if ! compileTest unix/objcopy "objcopy"; then
- echo "ERROR: -separate-debug-info was requested but this binutils does not support it."
- echo "Re-run configure with -v for more information"
- exit 1
- fi
- fi
-fi
-
-# Detect C++11 & up support
-stdcxx_error=false
-if ! compileTest common/c++11 "C++11"; then
- echo "ERROR: Qt requires a C++11 compiler and yours does not seem to be that."
- echo "Please upgrade."
- exit 1
-elif [ "$CFG_STDCXX" = "c++11" ]; then
- : # CFG_STDCXX is correct
-elif ! compileTest common/c++14 "C++14"; then
- if [ "$CFG_STDCXX" != "auto" ]; then
- stdcxx_error=true
- else
- CFG_STDCXX="c++11"
- fi
-elif [ "$CFG_STDCXX" = "c++14" ]; then
- : # CFG_STDCXX is correct
-elif ! compileTest common/c++1z "C++1z"; then
- if [ "$CFG_STDCXX" != "auto" ]; then
- stdcxx_error=true
- else
- CFG_STDCXX="c++14"
- fi
-else
- CFG_STDCXX="c++1z"
-fi
-
-if $stdcxx_error && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "$CFG_STDCXX support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
-fi
+# copy some variables that are still being computed in the shell script into an input file for configure
+# This should go away in the future
-# Detect whether 64-bit std::atomic works -- some 32-bit platforms require extra library support
-if compileTest common/atomic64 "64-bit std::atomic"; then
- CFG_STD_ATOMIC64=yes
-elif compileTest common/atomic64 "64-bit std::atomic in -latomic" -latomic; then
- CFG_STD_ATOMIC64=libatomic
-else
- CFG_STD_ATOMIC64=no
-fi
-
-# Detect whether std::atomic works for function pointers -- some implementations are buggy
-if ! compileTest common/atomicfptr "std::atomic for function pointers"; then
- echo "ERROR: detected a std::atomic implementation that fails for function pointers."
- echo "Please apply the patch corresponding to your Standard Library vendor, found in"
- echo " $relpath/config.tests/common/atomicfptr"
- exit 101
-fi
-
-# detect sse2 support
-CFG_SSE_LIST=
-if [ "${CFG_SSE2}" = "auto" ]; then
- if compileTest common/sse2 "sse2"; then
- CFG_SSE2=yes
- CFG_SSE_LIST=SSE2
+QMAKE_TESTED_FEATURES="cpufeatures host_cpufeatures"
+echo "# Feature defaults set by configure command line" > $outpath/config.tests/configure.cfg
+for feature in $QMAKE_TESTED_FEATURES; do
+ if [ -n "$BASH_VERSION" ] && [ "${BASH_VERSION%%.*}" -gt 3 ]; then
+ upper=${feature^^*}
+ elif [ -n "$ZSH_VERSION" ]; then
+ upper=${(U)feature}
else
- CFG_SSE2=no
+ upper=`echo $feature | tr a-z A-Z`
fi
-fi
-
-# detect sse3 support
-if [ "${CFG_SSE2}" = "no" ]; then
- CFG_SSE3=no
-fi
-if [ "${CFG_SSE3}" = "auto" ]; then
- if compileTest common/sse3 "sse3"; then
- CFG_SSE3=yes
- CFG_SSE_LIST="$CFG_SSE_LIST SSE3"
- else
- CFG_SSE3=no
- fi
-fi
-
-# detect ssse3 support
-if [ "${CFG_SSE3}" = "no" ]; then
- CFG_SSSE3=no
-fi
-if [ "${CFG_SSSE3}" = "auto" ]; then
- if compileTest common/ssse3 "ssse3"; then
- CFG_SSSE3=yes
- CFG_SSE_LIST="$CFG_SSE_LIST SSSE3"
- else
- CFG_SSSE3=no
- fi
-fi
-
-# detect sse4.1 support
-if [ "${CFG_SSSE3}" = "no" ]; then
- CFG_SSE4_1=no
-fi
-if [ "${CFG_SSE4_1}" = "auto" ]; then
- if compileTest common/sse4_1 "sse4_1"; then
- CFG_SSE4_1=yes
- CFG_SSE_LIST="$CFG_SSE_LIST SSE4.1"
- else
- CFG_SSE4_1=no
+ upper=`echo $upper | sed 's,-,_,g'`
+ eval "res=\$CFG_$upper"
+ if [ "$res" != "auto" ]; then
+ echo "config.input.$feature=$res" >> $relpath/config.tests/configure.cfg
fi
-fi
-
-# detect sse4.2 support
-if [ "${CFG_SSE4_1}" = "no" ]; then
- CFG_SSE4_2=no
-fi
-if [ "${CFG_SSE4_2}" = "auto" ]; then
- if compileTest common/sse4_2 "sse4_2"; then
- CFG_SSE4_2=yes
- CFG_SSE_LIST="$CFG_SSE_LIST SSE4.2"
- else
- CFG_SSE4_2=no
- fi
-fi
-
-# detect avx support
-CFG_AVX_LIST=
-if [ "${CFG_SSE4_2}" = "no" ]; then
- CFG_AVX=no
-fi
-if [ "${CFG_AVX}" = "auto" ]; then
- if compileTest common/avx "avx"; then
- case "$XQMAKESPEC" in
- *g++*|*-clang*)
- # Some clang versions produce internal compiler errors compiling Qt AVX code
- case `$TEST_COMPILER --version` in
- Apple\ clang\ version\ [23]*)
- CFG_AVX=no
- if [ "$OPT_VERBOSE" = "yes" ]; then
- echo 'AVX support disabled for blacklisted clang compiler'
- fi
- ;;
- *)
- CFG_AVX=yes
- CFG_AVX_LIST=AVX
- ;;
- esac
- ;;
- *)
- CFG_AVX=yes
- CFG_AVX_LIST=AVX
- ;;
- esac
- else
- CFG_AVX=no
- fi
-fi
-
-# detect avx2 support
-if [ "${CFG_AVX}" = "no" ]; then
- CFG_AVX2=no
-fi
-if [ "${CFG_AVX2}" = "auto" ]; then
- if compileTest common/avx2 "avx2"; then
- CFG_AVX2=yes
- CFG_AVX_LIST="$CFG_AVX_LIST AVX2"
- else
- CFG_AVX2=no
- fi
-fi
-
-# detect avx512 support
-if [ "${CFG_AVX2}" = "no" ]; then
- CFG_AVX512=
-fi
-if [ "${CFG_AVX512}" = "auto" ]; then
- # First, test for AVX-512 Foundation
- if compileTest common/avx512 "avx512f" AVX512=F; then
- # Test for the sub-features
- CFG_AVX512=f
- CFG_AVX512_UPPER=AVX512F
- for feature in er cd pf dq bw vl ifma vbmi; do
- if [ -n "$BASH_VERSION" ] && [ "${BASH_VERSION%%.*}" -gt 3 ]; then
- upper=${feature^^*}
- elif [ -n "$ZSH_VERSION" ]; then
- upper=${(U)feature}
- else
- upper=`echo $feature | tr a-z A-Z`
- fi
- if compileTest common/avx512 "avx512$feature" AVX512=$upper; then
- CFG_AVX512="$CFG_AVX512 $feature"
- CFG_AVX512_UPPER="$CFG_AVX512_UPPER AVX512$upper"
- fi
- done
- else
- CFG_AVX512=
- fi
-fi
-
-# check Neon support
-if [ "$CFG_NEON" = "auto" ]; then
- # no compile test, just check what the compiler has
- case "$CFG_CPUFEATURES" in
- *neon*)
- CFG_NEON=yes
- ;;
- *)
- CFG_NEON=no
- ;;
- esac
-fi
-
-# detect mips_dsp support
-if [ "$CFG_ARCH" = "mips" ] && [ "${CFG_MIPS_DSP}" = "auto" ]; then
- if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dsp "mips_dsp" "$CFG_QMAKE_PATH" "$QTCONFFILE" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
- CFG_MIPS_DSP=yes
- else
- CFG_MIPS_DSP=no
- fi
-elif [ "$CFG_ARCH" != "mips" ]; then
- CFG_MIPS_DSP=no
-fi
-
-# detect mips_dspr2 support
-if [ "$CFG_ARCH" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "auto" ]; then
- if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dspr2 "mips_dspr2" "$CFG_QMAKE_PATH" "$QTCONFFILE" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
- CFG_MIPS_DSPR2=yes
- else
- CFG_MIPS_DSPR2=no
- fi
-elif [ "$CFG_ARCH" != "mips" ]; then
- CFG_MIPS_DSPR2=no
-fi
-
-[ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
-[ "$XPLATFORM_ANDROID" = "yes" ] && QMakeVar add styles "android"
-
-# check IPC support
-if ! compileTest unix/ipc_sysv "ipc_sysv" ; then
- # SYSV IPC is not supported - check POSIX IPC
- if compileTest unix/ipc_posix "ipc_posix" ; then
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_POSIX_IPC"
- else
- if [ "$XPLATFORM_ANDROID" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] ; then
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SYSTEMSEMAPHORE QT_NO_SHAREDMEMORY"
- fi
- fi
-fi
-
-if [ "$XPLATFORM_QNX" = "yes" ]; then
- if [ "$CFG_SLOG2" != "no" ]; then
- if compileTest unix/slog2 "slog2"; then
- CFG_SLOG2=yes
- QMAKE_CONFIG="$QMAKE_CONFIG slog2"
- else
- CFG_SLOG2=no
- fi
- fi
- if [ "$CFG_QNX_IMF" != "no" ]; then
- if compileTest unix/qqnx_imf "qqnx_imf"; then
- CFG_QNX_IMF=yes
- QMAKE_CONFIG="$QMAKE_CONFIG qqnx_imf"
- else
- CFG_QNX_IMF=no
- fi
- fi
- if [ "$CFG_PPS" != "no" ]; then
- if compileTest unix/pps "pps"; then
- CFG_PPS=yes
- QMAKE_CONFIG="$QMAKE_CONFIG qqnx_pps"
- else
- CFG_PPS=no
- fi
- fi
-
- if [ "$CFG_LGMON" != "no" ]; then
- if compileTest unix/lgmon "lgmon"; then
- CFG_LGMON=yes
- QMAKE_CONFIG="$QMAKE_CONFIG lgmon"
- else
- CFG_LGMON=no
- fi
- fi
-fi
-
-if [ "$XPLATFORM_INTEGRITY" = "yes" ]; then
- CFG_INTEGRITYFB=yes
- CFG_SHARED=no
- CFG_LARGEFILE=no
-fi
-
-# detect zlib
-if [ "$CFG_SYSTEM_ZLIB" = "auto" ]; then
- if compileTest unix/zlib "zlib"; then
- CFG_SYSTEM_ZLIB=yes
- else
- CFG_SYSTEM_ZLIB=no
- fi
-fi
-
-if [ "$CFG_MTDEV" != "no" ]; then
- if compileTest unix/mtdev "mtdev"; then
- CFG_MTDEV=yes
- else
- CFG_MTDEV=no
- fi
-fi
-if [ "$CFG_MTDEV" = "no" ]; then
- QMakeVar add DEFINES QT_NO_MTDEV
-fi
-
-if [ "$CFG_JOURNALD" != "no" ]; then
- if compileTest unix/journald "journald"; then
- CFG_JOURNALD=yes
- QMAKE_CONFIG="$QMAKE_CONFIG journald"
- else
- if [ "$CFG_JOURNALD" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "journald support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_JOURNALD=no
- fi
- fi
-fi
-
-if [ "$CFG_SYSLOG" != "no" ]; then
- if compileTest unix/syslog "syslog"; then
- CFG_SYSLOG=yes
- QMAKE_CONFIG="$QMAKE_CONFIG syslog"
- else
- if [ "$CFG_SYSLOG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "syslog support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_SYSLOG=no
- fi
- fi
-fi
-
-# detect jpeg
-if [ "$CFG_LIBJPEG" = "auto" ]; then
- if compileTest unix/libjpeg "libjpeg"; then
- CFG_LIBJPEG=system
- else
- CFG_LIBJPEG=qt
- fi
-fi
-
-# detect png
-if [ "$CFG_LIBPNG" = "auto" ]; then
- if compileTest unix/libpng "libpng"; then
- CFG_LIBPNG=system
- else
- CFG_LIBPNG=qt
- fi
-fi
-
-# detect dl
-if compileTest unix/dlopen "dlopen"; then
- QMAKE_CONFIG="$QMAKE_CONFIG no-libdl"
-else
- if ! compileTest unix/libdl "libdl"; then
- QMAKE_CONFIG="$QMAKE_CONFIG no-libdl"
- QMakeVar add DEFINES QT_NO_DYNAMIC_LIBRARY
- fi
-fi
-
-if [ "$CFG_EGLFS" = "yes" ]; then
- if [ "$CFG_EGL" = "no" ]; then
- echo "The EGLFS plugin requires EGL support and cannot be built"
- exit 101
- fi
- CFG_EGL=yes
-fi
-
-# auto-detect SQL-modules support
-for _SQLDR in $CFG_SQL_AVAILABLE; do
- case $_SQLDR in
- mysql)
- if [ "$CFG_SQL_mysql" != "no" ]; then
- [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
- if [ -x "$CFG_MYSQL_CONFIG" ]; then
- QMAKE_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null | filterIncludeOptions`
- # -rdynamic should not be returned by mysql_config, but is on RHEL 6.6
- QMAKE_LIBS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null | filterLibraryOptions | sed "s/-rdynamic//"`
- QMAKE_LIBS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null | filterLibraryOptions | sed "s/-rdynamic//"`
- QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
- QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
- fi
- if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
- if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
- echo " You need MySql 4 or higher."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_SQL_mysql="no"
- QMAKE_LIBS_MYSQL=""
- QMAKE_LIBS_MYSQL_R=""
- QMAKE_CFLAGS_MYSQL=""
- fi
- else
- if compileTest unix/mysql_r "MySQL (thread-safe)" $QMAKE_LIBS_MYSQL_R $QMAKE_CFLAGS_MYSQL; then
- QMakeVar add CONFIG use_libmysqlclient_r
- CFG_SQL_mysql=yes
- QMAKE_LIBS_MYSQL="$QMAKE_LIBS_MYSQL_R"
- elif compileTest unix/mysql "MySQL (thread-unsafe)" $QMAKE_LIBS_MYSQL $QMAKE_CFLAGS_MYSQL; then
- CFG_SQL_mysql=yes
- else
- if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "MySQL support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_SQL_mysql=no
- QMAKE_LIBS_MYSQL=""
- QMAKE_LIBS_MYSQL_R=""
- QMAKE_CFLAGS_MYSQL=""
- fi
- fi
- fi
- fi
- ;;
- psql)
- if [ "$CFG_SQL_psql" != "no" ]; then
- [ -z "$CFG_PSQL_CONFIG" ] && CFG_PSQL_CONFIG=`"$WHICH" pg_config`
- # Be careful not to use native pg_config when cross building.
- if [ "$XPLATFORM_MINGW" != "yes" ] && [ -x "$CFG_PSQL_CONFIG" ]; then
- QMAKE_CFLAGS_PSQL=`$CFG_PSQL_CONFIG --includedir 2>/dev/null | filterIncludePath`
- QMAKE_LIBS_PSQL=`$CFG_PSQL_CONFIG --libdir 2>/dev/null | filterLibraryPath`
- fi
- [ -z "$QMAKE_CFLAGS_PSQL" ] || QMAKE_CFLAGS_PSQL="-I$QMAKE_CFLAGS_PSQL"
- [ -z "$QMAKE_LIBS_PSQL" ] || QMAKE_LIBS_PSQL="-L$QMAKE_LIBS_PSQL"
- # But, respect PSQL_LIBS if set
- [ -z "$PSQL_LIBS" ] || QMAKE_LIBS_PSQL="$PSQL_LIBS"
- if compileTest unix/psql "PostgreSQL" $QMAKE_LIBS_PSQL $QMAKE_CFLAGS_PSQL; then
- CFG_SQL_psql=yes
- else
- if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "PostgreSQL support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_SQL_psql=no
- QMAKE_CFLAGS_PSQL=""
- QMAKE_LIBS_PSQL=""
- fi
- fi
- fi
- ;;
- odbc)
- if [ "$CFG_SQL_odbc" != "no" ]; then
- if [ "$XPLATFORM_MAC" != "yes" ] && compileTest unix/odbc "ODBC"; then
- CFG_SQL_odbc=yes
- else
- if compileTest unix/iodbc "iODBC"; then
- QMAKE_LIBS_ODBC="-liodbc"
- CFG_SQL_odbc=yes
- else
- if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "ODBC support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_SQL_odbc=no
- fi
- fi
- fi
- fi
- ;;
- oci)
- if [ "$CFG_SQL_oci" != "no" ]; then
- if compileTest unix/oci "OCI"; then
- CFG_SQL_oci=yes
- else
- if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_SQL_oci=no
- fi
- fi
- fi
- ;;
- tds)
- if [ "$CFG_SQL_tds" != "no" ]; then
- [ -z "$SYBASE" ] || QMAKE_LIBS_TDS="-L$SYBASE/lib"
- [ -z "$SYBASE_LIBS" ] || QMAKE_LIBS_TDS="$QMAKE_LIBS_TDS $SYBASE_LIBS"
- if compileTest unix/tds "TDS" $QMAKE_LIBS_TDS; then
- CFG_SQL_tds=yes
- else
- if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "TDS support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_SQL_tds=no
- fi
- fi
- fi
- ;;
- db2)
- if [ "$CFG_SQL_db2" != "no" ]; then
- if compileTest unix/db2 "DB2"; then
- CFG_SQL_db2=yes
- else
- if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "ODBC support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_SQL_db2=no
- fi
- fi
- fi
- ;;
- ibase)
- if [ "$CFG_SQL_ibase" != "no" ]; then
- if compileTest unix/ibase "InterBase"; then
- CFG_SQL_ibase=yes
- else
- if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "InterBase support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_SQL_ibase=no
- fi
- fi
- fi
- ;;
- sqlite2)
- if [ "$CFG_SQL_sqlite2" != "no" ]; then
- if compileTest unix/sqlite2 "SQLite2"; then
- CFG_SQL_sqlite2=yes
- else
- if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "SQLite2 support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_SQL_sqlite2=no
- fi
- fi
- fi
- ;;
- sqlite)
- if [ "$CFG_SQL_sqlite" != "no" ]; then
- SQLITE_AUTODETECT_FAILED="no"
- if [ "$CFG_SQLITE" = "system" ]; then
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists sqlite3 2>/dev/null; then
- QMAKE_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
- QMAKE_LIBS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
- else
- QMAKE_CFLAGS_SQLITE=
- QMAKE_LIBS_SQLITE="-lsqlite3 -lz"
- fi
- if compileTest unix/sqlite "SQLite" $QMAKE_LIBS_SQLITE $QMAKE_CFLAGS_SQLITE; then
- CFG_SQL_sqlite=yes
- QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
- else
- SQLITE_AUTODETECT_FAILED="yes"
- CFG_SQL_sqlite=no
- fi
- elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
- CFG_SQL_sqlite=yes
- else
- SQLITE_AUTODETECT_FAILED="yes"
- CFG_SQL_sqlite=no
- fi
-
- if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "SQLite support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- fi
- fi
- ;;
- *)
- if [ "$OPT_VERBOSE" = "yes" ]; then
- echo "unknown SQL driver: $_SQLDR"
- fi
- ;;
- esac
done
-# auto-detect CUPS support
-if [ "$CFG_CUPS" != "no" ]; then
- if compileTest unix/cups "Cups"; then
- CFG_CUPS=yes
- else
- if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "Cups support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_CUPS=no
- fi
- fi
-fi
-
-# auto-detect iconv(3) support
-if [ "$CFG_ICONV" != "no" ]; then
- if [ "$XPLATFORM_MINGW" = "yes" ]; then
- CFG_ICONV=no
- elif compileTest unix/iconv "POSIX iconv"; then
- CFG_ICONV=yes
- elif compileTest unix/sun-libiconv "SUN libiconv"; then
- CFG_ICONV=sun
- elif compileTest unix/gnu-libiconv "GNU libiconv"; then
- CFG_ICONV=gnu
- else
- if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "Iconv support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_ICONV=no
- fi
- fi
-fi
-
-# auto-detect libdbus-1 support
-# auto: detect if libdbus-1 is present; if so, link to it
-# linked: fail if libdbus-1 is not present; otherwise link to it
-# runtime: no detection (cannot fail), load libdbus-1 at runtime
-if [ "$CFG_DBUS" = "auto" ] || [ "$CFG_DBUS" = "linked" ]; then
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
- QMAKE_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
- QMAKE_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
- else
- QMAKE_LIBS_DBUS="-ldbus-1"
- fi
- if compileTest unix/dbus "D-Bus" $QMAKE_CFLAGS_DBUS $QMAKE_LIBS_DBUS; then
- QMakeVar set QMAKE_LIBS_DBUS "$QMAKE_LIBS_DBUS"
- QMakeVar set QMAKE_CFLAGS_DBUS "$QMAKE_CFLAGS_DBUS"
- # Try find correct host configuration for dbus tools when cross-compiling
- if [ "$QT_CROSS_COMPILE" = "yes" ] && env -i PATH="$PATH" \
- pkg-config --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
- QMAKE_CFLAGS_DBUS=`env -i PATH="$PATH" pkg-config --cflags dbus-1 2>/dev/null`
- fi
- QMakeVar set QT_HOST_CFLAGS_DBUS "$QMAKE_CFLAGS_DBUS"
- CFG_DBUS=linked
- else
- # Failed to compile the test, so it's an error if CFG_DBUS is "linked"
- if [ "$CFG_DBUS" = "linked" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "The Qt D-Bus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
- [ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- # CFG_DBUS is "auto" here
- CFG_DBUS=runtime
- fi
- fi
-fi
-
-# auto-detect libproxy support
-if [ "$CFG_LIBPROXY" != "no" ]; then
- if compileTest common/libproxy "libproxy"; then
- CFG_LIBPROXY=yes
- else
- if [ "$CFG_LIBPROXY" = "auto" ]; then
- CFG_LIBPROXY=no
- elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- # CFG_LIBPROXY is "yes" here
- echo "The libproxy support cannot be enabled because libproxy was not found."
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- fi
- fi
-fi
-
-# auto-detect Glib support
-if [ "$CFG_GLIB" != "no" ]; then
- if [ -n "$PKG_CONFIG" ]; then
- QMAKE_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
- QMAKE_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
- fi
- if compileTest unix/glib "Glib" $QMAKE_CFLAGS_GLIB $QMAKE_LIBS_GLIB; then
- CFG_GLIB=yes
- QMakeVar set QMAKE_CFLAGS_GLIB "$QMAKE_CFLAGS_GLIB"
- QMakeVar set QMAKE_LIBS_GLIB "$QMAKE_LIBS_GLIB"
- else
- if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "Glib support cannot be enabled due to functionality tests!"
- [ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_GLIB=no
- fi
- fi
-fi
-
-# auto-detect GTK style support
-if [ "$CFG_GLIB" = "yes" -a "$CFG_GTK" != "no" ]; then
- if [ -n "$PKG_CONFIG" ]; then
- QMAKE_CFLAGS_GTK3=`$PKG_CONFIG --cflags gtk+-3.0 2>/dev/null`
- QMAKE_LIBS_GTK3=`$PKG_CONFIG --libs gtk+-3.0 2>/dev/null`
- fi
- if [ -n "$QMAKE_CFLAGS_GTK3" ] ; then
- CFG_GTK=yes
- QT_CONFIG="$QT_CONFIG gtk3"
- QMakeVar set QMAKE_CFLAGS_GTK3 "$QMAKE_CFLAGS_GTK3"
- QMakeVar set QMAKE_LIBS_GTK3 "$QMAKE_LIBS_GTK3"
- else
- if [ "$CFG_GTK" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "GTK theme support cannot be enabled due to functionality tests!"
- [ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_GTK=no
- fi
- fi
-elif [ "$CFG_GLIB" = "no" ]; then
- CFG_GTK=no
-fi
-
-# auto-detect libicu support
-if [ "$CFG_ICU" != "no" ]; then
- if compileTest unix/icu "ICU"; then
- [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
- else
- if [ "$CFG_ICU" = "auto" ]; then
- CFG_ICU=no
- elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- # CFG_ICU is "yes"
-
- echo "The ICU library support cannot be enabled."
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- fi
- fi
-fi
-
-# Auto-detect PulseAudio support
-if [ "$CFG_PULSEAUDIO" != "no" ]; then
- if [ -n "$PKG_CONFIG" ]; then
- QMAKE_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
- QMAKE_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
- fi
- if compileTest unix/pulseaudio "PulseAudio" $QMAKE_CFLAGS_PULSEAUDIO $QMAKE_LIBS_PULSEAUDIO; then
- CFG_PULSEAUDIO=yes
- QMakeVar set QMAKE_CFLAGS_PULSEAUDIO "$QMAKE_CFLAGS_PULSEAUDIO"
- QMakeVar set QMAKE_LIBS_PULSEAUDIO "$QMAKE_LIBS_PULSEAUDIO"
- else
- if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "PulseAudio support cannot be enabled due to functionality tests!"
- [ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_PULSEAUDIO=no
- fi
- fi
-fi
-
-# X11/MINGW OpenGL
-if [ "$XPLATFORM_MINGW" = "yes" ]; then
- # auto-detect OpenGL support (es2 = OpenGL ES 2.0 or higher)
- if [ "$CFG_GUI" = "no" ]; then
- if [ "$CFG_OPENGL" = "auto" ]; then
- CFG_OPENGL=no
- fi
- if [ "$CFG_OPENGL" != "no" ]; then
- echo "OpenGL enabled, but GUI disabled."
- echo " You might need to either enable the GUI or disable OpenGL"
- exit 1
- fi
- fi
- if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
- if compileTest x11/opengl "OpenGL"; then
- CFG_OPENGL=desktop
- elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
- CFG_OPENGL=es2
- else
- if [ "$CFG_OPENGL" = "yes" ]; then
- echo "All the OpenGL functionality tests failed!"
- echo " You might need to modify the include and library search paths by editing"
- echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
- echo " ${XQMAKESPEC}."
- exit 1
- fi
- CFG_OPENGL=no
- fi
- elif [ "$CFG_OPENGL" = "es2" ]; then
- #OpenGL ES 2.0
- compileTest unix/opengles2 "OpenGL ES 2.0"
- if [ $? != "0" ]; then
- echo "The OpenGL ES 2.0 functionality test failed!"
- echo " You might need to modify the include and library search paths by editing"
- echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
- echo " ${XQMAKESPEC}."
- exit 1
- fi
- elif [ "$CFG_OPENGL" = "desktop" ]; then
- # Desktop OpenGL support
- compileTest x11/opengl "OpenGL"
- if [ $? != "0" ]; then
- echo "The OpenGL functionality test failed!"
- echo " You might need to modify the include and library search paths by editing"
- echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
- echo " ${XQMAKESPEC}."
- exit 1
- fi
- fi
-fi # X11/MINGW OpenGL
-
-if [ "$XPLATFORM_MAC" = "yes" ]; then
- if [ "$CFG_COREWLAN" = "auto" ]; then
- if compileTest mac/corewlan "CoreWlan"; then
- CFG_COREWLAN=yes
- else
- CFG_COREWLAN=no
- fi
- fi
-fi
-
-# auto-detect OpenGL support (es2 = OpenGL ES 2.0 or higher)
-if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
- if compileTestWithPkgConfig gl unix/opengldesktop "OpenGL" OPENGL; then
- CFG_OPENGL=desktop
- elif compileTestWithPkgConfig glesv2 unix/opengles2 "OpenGL ES 2.0" OPENGL_ES2; then
- CFG_OPENGL=es2
- else
- if [ "$CFG_OPENGL" = "yes" ]; then
- echo "All the OpenGL functionality tests failed!"
- echo " You might need to modify the include and library search paths by editing"
- echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
- echo " ${XQMAKESPEC}."
- exit 1
- fi
- CFG_OPENGL=no
- fi
-elif [ "$CFG_OPENGL" = "es2" ]; then
- #OpenGL ES 2.0
-
- compileTestWithPkgConfig glesv2 unix/opengles2 "OpenGL ES 2.0" OPENGL_ES2
- if [ $? != "0" ]; then
- echo "The OpenGL ES 2.0 functionality test failed!"
- [ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
- echo " You might need to modify the include and library search paths by editing"
- echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
- echo " ${XQMAKESPEC}."
- exit 1
- fi
-elif [ "$CFG_OPENGL" = "desktop" ]; then
- # Desktop OpenGL support
- compileTestWithPkgConfig gl unix/opengldesktop "OpenGL" OPENGL
- if [ $? != "0" ]; then
- echo "The OpenGL functionality test failed!"
- echo " You might need to modify the include and library search paths by editing"
- echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
- echo " ${XQMAKESPEC}."
- exit 1
- fi
-fi
-
-# If OpenGL ES 2.0 is enabled, check for 3.0 and higher. This is used to allow
-# compile-time differentiation and including the version specific (but backwards
-# compatible) ES headers (for example, GLES3/gl31.h). Other than that, there is
-# no difference in the configuration, even the library is the same.
-if [ "$CFG_OPENGL" = "es2" ]; then
- if compileTestWithPkgConfig glesv2 unix/opengles3 "OpenGL ES 3.0" ""; then
- # Add a define for ES3, in addition to ES and ES2.
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_3"
- fi
- if compileTestWithPkgConfig glesv2 unix/opengles31 "OpenGL ES 3.1" ""; then
- # Add a define for ES31.
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_3_1"
- fi
-fi
-
-# auto-detect FontConfig support
-ORIG_CFG_FREETYPE="$CFG_FREETYPE"
-if [ "$CFG_FONTCONFIG" != "no" ]; then
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
- QMAKE_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
- QMAKE_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
- else
- QMAKE_CFLAGS_FONTCONFIG=
- QMAKE_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
- fi
- if compileTest unix/fontconfig "FontConfig" $QMAKE_CFLAGS_FONTCONFIG $QMAKE_LIBS_FONTCONFIG; then
- QT_CONFIG="$QT_CONFIG fontconfig"
- QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QMAKE_CFLAGS_FONTCONFIG"
- QMakeVar set QMAKE_LIBS_FONTCONFIG "$QMAKE_LIBS_FONTCONFIG"
- CFG_FONTCONFIG=yes
- CFG_FREETYPE=system
- else
- CFG_FONTCONFIG=no
- fi
-
-fi
-
-if [ "$CFG_LIBUDEV" != "no" ]; then
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
- QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
- QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
- QMAKE_CFLAGS_LIBUDEV=`$PKG_CONFIG --cflags libudev 2>/dev/null`
- QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
- QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
- fi
- if compileTest unix/libudev "libudev" $QMAKE_CFLAGS_LIBUDEV $QMAKE_LIBS_LIBUDEV; then
- CFG_LIBUDEV=yes
- QT_CONFIG="$QT_CONFIG libudev"
- elif [ "$CFG_LIBUDEV" = "yes" ]; then
- echo "The libudev functionality test failed!"
- [ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
- exit 1
- else
- CFG_LIBUDEV=no
- fi
-fi
-if [ "$CFG_LIBUDEV" = "no" ]; then
- QMakeVar add DEFINES QT_NO_LIBUDEV
-fi
-
-if [ "$CFG_EVDEV" != "no" ]; then
- if compileTest unix/evdev "evdev"; then
- CFG_EVDEV=yes
- QT_CONFIG="$QT_CONFIG evdev"
- elif [ "$CFG_EVDEV" = "yes" ]; then
- echo "The evdev functionality test failed!"
- exit 1
- else
- CFG_EVDEV=no
- fi
-fi
-if [ "$CFG_EVDEV" = "no" ]; then
- QMakeVar add DEFINES QT_NO_EVDEV
-fi
-
-if [ "$CFG_TSLIB" != "no" ]; then
- if compileTest unix/tslib "tslib"; then
- CFG_TSLIB=yes
- QT_CONFIG="$QT_CONFIG tslib"
- elif [ "$CFG_TSLIB" = "yes" ]; then
- echo "The tslib functionality test failed!"
- exit 1
- else
- CFG_TSLIB=no
- fi
-fi
-if [ "$CFG_TSLIB" = "no" ]; then
- QMakeVar add DEFINES QT_NO_TSLIB
-fi
-
-if [ "$CFG_XKBCOMMON_EVDEV" != "no" ]; then
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
- QMAKE_INCDIR_XKBCOMMON_EVDEV=`$PKG_CONFIG --cflags-only-I xkbcommon 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
- QMAKE_LIBS_XKBCOMMON_EVDEV=`$PKG_CONFIG --libs xkbcommon 2>/dev/null`
- QMAKE_CFLAGS_XKBCOMMON_EVDEV=`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`
- QMakeVar set QMAKE_INCDIR_XKBCOMMON_EVDEV "$QMAKE_INCDIR_XKBCOMMON_EVDEV"
- QMakeVar set QMAKE_LIBS_XKBCOMMON_EVDEV "$QMAKE_LIBS_XKBCOMMON_EVDEV"
- fi
- if compileTest unix/xkbcommon "xkbcommon" $QMAKE_CFLAGS_XKBCOMMON_EVDEV $QMAKE_LIBS_XKBCOMMON_EVDEV; then
- CFG_XKBCOMMON_EVDEV=yes
- QT_CONFIG="$QT_CONFIG xkbcommon-evdev"
- elif [ "$CFG_XKBCOMMON_EVDEV" = "yes" ]; then
- echo "The xkbcommon-evdev functionality test failed!"
- exit 1
- else
- CFG_XKBCOMMON_EVDEV=no
- fi
-fi
-
-if [ "$CFG_LIBINPUT" != "no" ] && [ "$CFG_LIBUDEV" != "no" ]; then
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libinput 2>/dev/null; then
- QMAKE_INCDIR_LIBINPUT=`$PKG_CONFIG --cflags-only-I libinput 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
- QMAKE_LIBS_LIBINPUT=`$PKG_CONFIG --libs libinput 2>/dev/null`
- QMAKE_CFLAGS_LIBINPUT=`$PKG_CONFIG --cflags libinput 2>/dev/null`
- QMAKE_LIBINPUT_VERSION_MAJOR=`$PKG_CONFIG --modversion libinput 2>/dev/null | cut -d . -f 1`
- QMAKE_LIBINPUT_VERSION_MINOR=`$PKG_CONFIG --modversion libinput 2>/dev/null | cut -d . -f 2`
- QMakeVar set QMAKE_LIBINPUT_VERSION_MAJOR "$QMAKE_LIBINPUT_VERSION_MAJOR"
- QMakeVar set QMAKE_LIBINPUT_VERSION_MINOR "$QMAKE_LIBINPUT_VERSION_MINOR"
- QMakeVar set QMAKE_INCDIR_LIBINPUT "$QMAKE_INCDIR_LIBINPUT"
- QMakeVar set QMAKE_LIBS_LIBINPUT "$QMAKE_LIBS_LIBINPUT"
- fi
- if compileTest unix/libinput "libinput" $QMAKE_CFLAGS_LIBINPUT $QMAKE_LIBS_LIBINPUT; then
- CFG_LIBINPUT=yes
- QT_CONFIG="$QT_CONFIG libinput"
- elif [ "$CFG_LIBINPUT" = "yes" ]; then
- echo "The libinput functionality test failed!"
- exit 1
- else
- CFG_LIBINPUT=no
- fi
-else
- CFG_LIBINPUT=no
-fi
-if [ "$CFG_LIBINPUT" = "no" ]; then
- QMakeVar add DEFINES QT_NO_LIBINPUT
-fi
-
-# Check we actually have X11 :-)
-if compileTest x11/xlib "XLib"; then
- QT_CONFIG="$QT_CONFIG xlib"
-fi
-
-# auto-detect Xrender support
-if [ "$CFG_XRENDER" != "no" ]; then
- if compileTest x11/xrender "Xrender"; then
- CFG_XRENDER=yes
- QT_CONFIG="$QT_CONFIG xrender"
- else
- if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "Xrender support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_XRENDER=no
- fi
- fi
-fi
-
-# auto-detect XInput2 support
-if [ "$CFG_XINPUT2" != "no" ]; then
- if compileTest x11/xinput2 "XInput2"; then
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xi 2>/dev/null; then
- QMAKE_XINPUT2_VERSION_MAJOR=`$PKG_CONFIG --modversion xi 2>/dev/null | cut -d . -f 1`
- QMAKE_XINPUT2_VERSION_MINOR=`$PKG_CONFIG --modversion xi 2>/dev/null | cut -d . -f 2`
- QMAKE_XINPUT2_VERSION_PATCH=`$PKG_CONFIG --modversion xi 2>/dev/null | cut -d . -f 3`
- QMakeVar set QMAKE_XINPUT2_VERSION_MAJOR "$QMAKE_XINPUT2_VERSION_MAJOR"
- QMakeVar set QMAKE_XINPUT2_VERSION_MINOR "$QMAKE_XINPUT2_VERSION_MINOR"
- QMakeVar set QMAKE_XINPUT2_VERSION_PATCH "$QMAKE_XINPUT2_VERSION_PATCH"
- fi
- CFG_XINPUT2=yes
- else
- if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "XInput2 support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_XINPUT2=no
- fi
- fi
-fi
-
-if [ "$CFG_XCB" != "no" ]; then
- # find X11 prefix
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "x11" 2> /dev/null; then
- QMAKE_X11_PREFIX="`$PKG_CONFIG --variable=prefix x11`"
- else
- # default to LSB prefix
- QMAKE_X11_PREFIX="/usr"
- fi
- QMakeVar set QMAKE_X11_PREFIX "$QMAKE_X11_PREFIX"
-
- # both -qt-xcb and -system-xcb depends on libxcb from the system
- XCB_DEP="xcb >= 1.5"
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "$XCB_DEP" 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
- if ! compileTest qpa/xcb "xcb" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
- if [ "$CFG_XCB" != "auto" ]; then
- echo "Missing dependency lib$XCB_DEP."
- [ -z "$PKG_CONFIG" ] && echo "Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
- exit 1
- fi
- CFG_XCB=no
- fi
-
- # xcb plugin depends on libxkbcommon
- if [ "$CFG_XCB" != "no" ] && [ "$CFG_XKBCOMMON" = no ]; then
- if [ "$CFG_XCB" != "auto" ]; then
- echo "XCB plugin requires libxkbcommon. See -qt-xkbcommon-x11 and -system-xkbcommon-x11."
- exit 1
- fi
- CFG_XCB=no
- fi
-
- if [ "$CFG_XCB" != "no" ]; then
- if [ "$CFG_XCB" = "qt" ]; then
- QT_CONFIG="$QT_CONFIG xcb-qt"
- else
- # libxcb version 1.10 was the first version that enables xcb-xkb by default,
- # therefore the minimal xcb-xkb version we support is 1.10
- CFG_XKB=no
- XKB_DEP="xcb-xkb >= 1.10"
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "$XKB_DEP" 2>/dev/null; then
- QMAKE_CFLAGS_XKB="`$PKG_CONFIG --cflags xcb xcb-xkb 2>/dev/null`"
- QMAKE_LIBS_XKB="`$PKG_CONFIG --libs xcb xcb-xkb 2>/dev/null`"
- fi
- if compileTest qpa/xcb-xkb "xcb-xkb" $QMAKE_CFLAGS_XKB $QMAKE_LIBS_XKB; then
- CFG_XKB=yes
- else
- QMakeVar add DEFINES QT_NO_XKB
- fi
-
- XCB_PACKAGES="xcb xcb-shm xcb-sync xcb-xfixes xcb-randr xcb-image xcb-keysyms xcb-icccm xcb-shape"
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "$XCB_PACKAGES" 2>/dev/null; then
- 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
- CFG_XCB="system"
- if compileTest qpa/xcb-render "xcb-render" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
- QT_CONFIG="$QT_CONFIG xcb-render"
- fi
- else
- if [ "$CFG_XCB" != "auto" ]; then
- echo "The test for linking against libxcb and support libraries failed"
- echo "(need $XCB_PACKAGES)."
- echo "You might need to install dependency packages, or pass -qt-xcb."
- echo "See src/plugins/platforms/xcb/README."
- [ -z "$PKG_CONFIG" ] && echo "Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
- exit 1
- fi
- CFG_XCB="no"
- fi
- fi
- fi
-
- if [ "$CFG_XCB" != "no" ]; then
- QT_CONFIG="$QT_CONFIG xcb-plugin"
-
- # Other deps that are not bundled with -qt-xcb and therefore need to be
- # checked for both -qt-xcb and -system-xcb
-
- 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
-
- 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"
- CFG_XCB_XLIB=yes
- else
- CFG_XCB_XLIB=no
- fi
- fi
-
- if [ "$CFG_SM" != "no" ] && [ -n "$PKG_CONFIG" ]; then
- if $PKG_CONFIG --exists "sm" 2>/dev/null && $PKG_CONFIG --exists "ice" 2>/dev/null; then
- QT_CONFIG="$QT_CONFIG xcb-sm"
- fi
- fi
- fi
-fi
-
-if [ "$CFG_DIRECTFB" != "no" ]; then
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists directfb 2>/dev/null; then
- QMAKE_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
- QMAKE_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
- if compileTest qpa/directfb "DirectFB" $QMAKE_CFLAGS_DIRECTFB $QMAKE_LIBS_DIRECTFB; then
- CFG_DIRECTFB=yes
- elif [ "$CFG_DIRECTFB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo " DirectFB support cannot be enabled due to functionality tests!"
- [ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_DIRECTFB=no
- fi
- else
- CFG_DIRECTFB=no
- fi
-fi
-
-if [ "$CFG_GBM" != "no" ]; then
- if compileTest qpa/gbm "GBM"; then
- CFG_GBM=yes
- elif [ "$CFG_GBM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo " GBM support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_GBM=no
- fi
-fi
-
-if [ "$CFG_LINUXFB" != "no" ]; then
- if compileTest qpa/linuxfb "LinuxFB"; then
- CFG_LINUXFB=yes
- elif [ "$CFG_LINUXFB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo " Linux Framebuffer support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_LINUXFB=no
- fi
-fi
-
-if [ "$CFG_KMS" != "no" ]; then
- if compileTest qpa/kms "KMS"; then
- CFG_KMS=yes
- elif [ "$CFG_KMS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo " KMS support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_KMS=no
- fi
-fi
-
-if [ "$CFG_MIRCLIENT" != "no" ]; then
- if compileTest qpa/mirclient "Mir client"; then
- CFG_MIRCLIENT=yes
- elif [ "$CFG_MIRCLIENT" = "yes" ]; then
- echo " Mir client support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_MIRCLIENT=no
- fi
-fi
-
-# Detect libxkbcommon
-MIN_REQ_XKBCOMMON="0.4.1"
-# currently only xcb platform plugin supports building xkbcommon
-if [ "$CFG_XCB" != "no" ]; then
- if [ "$CFG_XKBCOMMON" != "no" ] && [ "$CFG_XKBCOMMON" != "qt" ]; then
- # Check if there is a suitable system-wide xkbcommon
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xkbcommon xkbcommon-x11 >= $MIN_REQ_XKBCOMMON" 2>/dev/null; then
- QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon xkbcommon-x11 2>/dev/null`"
- QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon xkbcommon-x11 2>/dev/null`"
-
- QMakeVar set QMAKE_CFLAGS_XKBCOMMON "$QMAKE_CFLAGS_XKBCOMMON"
- QMakeVar set QMAKE_LIBS_XKBCOMMON "$QMAKE_LIBS_XKBCOMMON"
- CFG_XKBCOMMON=system
- elif [ "$CFG_XKBCOMMON" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo " xkbcommon support cannot be enabled because either xkbcommon or "
- echo " xkbcommon-x11 >= $MIN_REQ_XKBCOMMON was not found via pkg-config!"
- [ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- # use the bundled version instead
- CFG_XKBCOMMON=qt
- fi
- fi
- if [ "$CFG_XKBCOMMON" = "qt" ]; then
- QT_CONFIG="$QT_CONFIG xkbcommon-qt"
- # detect XKB config root
- if [ "$CFG_XKB_CONFIG_ROOT" = "auto" ]; then
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xkeyboard-config" 2> /dev/null; then
- CFG_XKB_CONFIG_ROOT="`$PKG_CONFIG --variable=xkb_base xkeyboard-config`"
- else
- # search for xkb configs in most probable locations
- if [ -d "/usr/share/X11/xkb" ]; then
- # Linux
- CFG_XKB_CONFIG_ROOT="/usr/share/X11/xkb"
- elif [ -d "/usr/local/share/X11/xkb" ]; then
- # BSD UNIX
- CFG_XKB_CONFIG_ROOT="/usr/local/share/X11/xkb"
- fi
- fi
- fi
- QMakeVar set QMAKE_XKB_CONFIG_ROOT "$CFG_XKB_CONFIG_ROOT"
- if [ "$CFG_XKB_CONFIG_ROOT" = "auto" ]; then
- CFG_XKB_CONFIG_ROOT="not found"
- fi
- fi
-else
- CFG_XKBCOMMON=no
-fi
-
-# EGL 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
-
- 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`
- QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
- QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
- QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
- QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`"
- fi # detect EGL support
- if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
- CFG_EGL=yes
- if compileTest qpa/egl-x11 "EGL-X11" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
- CFG_EGL_X=yes
- else
- CFG_EGL_X=no
- fi
- elif [ "$CFG_EGL" = "yes" ]; then
- echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
- [ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
- echo " You might need to modify the include and library search paths by editing"
- echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
- exit 1
- else
- CFG_EGL=no
- CFG_EGL_X=no
- fi
-fi
-
-if [ "$CFG_EGLFS" != "no" ]; then
- if [ "$XPLATFORM_QNX" = "no" ] && [ "$CFG_OPENGL" != "no" ]; then
- CFG_EGLFS="$CFG_EGL"
- # Detect eglfs backends.
- if compileTest qpa/eglfs-brcm "eglfs-brcm"; then
- CFG_EGLFS_BRCM=yes
- else
- CFG_EGLFS_BRCM=no
- fi
- if compileTest qpa/eglfs-egldevice "eglfs-egldevice"; then
- CFG_EGLFS_EGLDEVICE=yes
- else
- CFG_EGLFS_EGLDEVICE=no
- fi
- if compileTest qpa/eglfs-mali "eglfs-mali" \
- || compileTest qpa/eglfs-mali-2 "eglfs-mali-2"; then
- CFG_EGLFS_MALI=yes
- else
- CFG_EGLFS_MALI=no
- fi
- if compileTest qpa/eglfs-viv "eglfs-viv"; then
- CFG_EGLFS_VIV=yes
- else
- CFG_EGLFS_VIV=no
- fi
- if [ "$CFG_EGLFS_VIV" = "yes" ] && compileTest qpa/wayland-server "wayland-server"; then
- CFG_EGLFS_VIV_WL=yes
- else
- CFG_EGLFS_VIV_WL=no
- fi
- else
- CFG_EGLFS="no"
- fi
-fi
-
-# Detect accessibility support
-if [ "$CFG_ACCESSIBILITY" = "no" ]; then
- echo >&2 "Warning: Disabling Accessibility. This version of Qt is unsupported."
-else
- CFG_ACCESSIBILITY=yes
-
- # linux/xcb accessibility bridge needs dbus
- if [ "$CFG_XCB" != "no" ]; then
- if [ "$CFG_DBUS" != "no" ]; then
- CFG_ACCESSIBILITY_ATSPI_BRIDGE=yes
- QT_CONFIG="$QT_CONFIG accessibility-atspi-bridge"
- else
- echo >&2 "Warning: Disabling Linux Accessibility Bridge: DBus is missing."
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY_ATSPI_BRIDGE"
- fi
- fi
-fi
-
-# Determine the default QPA platform
-if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
- # check the mkspec
- QT_QPA_DEFAULT_PLATFORM=`getXQMakeConf QT_QPA_DEFAULT_PLATFORM`
- if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
- if [ "$XPLATFORM_MINGW" = "yes" ]; then
- QT_QPA_DEFAULT_PLATFORM="windows"
- elif [ "$XPLATFORM_MAC" = "yes" ]; then
- QT_QPA_DEFAULT_PLATFORM="cocoa"
- elif [ "$UNAME_SYSTEM" = "QNX" ]; then
- QT_QPA_DEFAULT_PLATFORM="qnx"
- elif [ "$XPLATFORM_INTEGRITY" = "yes" ]; then
- QT_QPA_DEFAULT_PLATFORM="integrityfb"
- else
- QT_QPA_DEFAULT_PLATFORM="xcb"
- fi
- fi
-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"
-fi
-
-if [ "$CFG_DIRECTFB" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG directfb"
- QMakeVar set QMAKE_CFLAGS_DIRECTFB "$QMAKE_CFLAGS_DIRECTFB"
- QMakeVar set QMAKE_LIBS_DIRECTFB "$QMAKE_LIBS_DIRECTFB"
-fi
-if [ "$CFG_GBM" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG gbm"
-fi
-if [ "$CFG_LINUXFB" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG linuxfb"
-fi
-if [ "$CFG_INTEGRITYFB" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG integrityfb"
-fi
-if [ "$CFG_KMS" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG kms"
-fi
-if [ "$CFG_MIRCLIENT" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG mirclient"
-fi
-
-# double-conversion support
-if [ "$CFG_DOUBLECONVERSION" = "no" ]; then
- if ! compileTest common/xlocalescanprint "XLocaleScanPrint"; then
- echo "Your C library does not provide sscanf_l or snprintf_l."
- echo "You need to use libdouble-conversion for double/string conversion."
- exit 1
- fi
-elif [ "$CFG_DOUBLECONVERSION" != "qt" ]; then
- if compileTest unix/doubleconversion "DoubleConversion"; then
- CFG_DOUBLECONVERSION=system
- elif [ "$CFG_DOUBLECONVERSION" = "system" ]; then
- echo "No system libdouble-conversion found."
- exit 1
- else
- CFG_DOUBLECONVERSION=qt
- fi
-fi
-
-# freetype support
-[ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_FREETYPE" = "auto" ] && CFG_FREETYPE=no
-if [ "$CFG_FREETYPE" = "auto" ]; then
- if compileTest unix/freetype "FreeType"; then
- CFG_FREETYPE=system
- else
- CFG_FREETYPE=yes
- fi
-fi
-
-# harfbuzz support
-[ "$XPLATFORM_MAC" = "yes" ] && [ "$CFG_HARFBUZZ" = "auto" ] && CFG_HARFBUZZ=qt
-if [ "$CFG_HARFBUZZ" = "auto" ] || [ "$CFG_HARFBUZZ" = "system" ]; then
- if compileTest unix/harfbuzz "HarfBuzz"; then
- CFG_HARFBUZZ=system
- else
- if [ "$CFG_HARFBUZZ" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo " HarfBuzz system library support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_HARFBUZZ=qt
- fi
- fi
-fi
-if [ "$XPLATFORM_MAC" = "yes" -a "$CFG_HARFBUZZ" != "qt" ]; then
- echo
- echo "WARNING: On OS X, AAT is supported only with -qt-harfbuzz."
- echo
-fi
-
-if ! compileTest unix/stl "STL" &&
- [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "STL functionality check failed! Cannot build Qt with this STL library."
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- exit 101
-fi
-
-
-# detect POSIX clock_gettime()
-if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
- if compileTest unix/clock-gettime "POSIX clock_gettime()"; then
- CFG_CLOCK_GETTIME=yes
- else
- CFG_CLOCK_GETTIME=no
- fi
-fi
-
-# detect POSIX monotonic clocks
-if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
- if compileTest unix/clock-monotonic "POSIX Monotonic Clock"; then
- CFG_CLOCK_MONOTONIC=yes
- else
- CFG_CLOCK_MONOTONIC=no
- fi
-elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
- CFG_CLOCK_MONOTONIC=no
-fi
-
-# detect posix_fallocate
-if [ "$CFG_POSIX_FALLOCATE" = "auto" ]; then
- if compileTest unix/posix_fallocate "posix_fallocate"; then
- CFG_POSIX_FALLOCATE=yes
- else
- CFG_POSIX_FALLOCATE=no
- fi
-fi
-
-# detect mremap
-if [ "$CFG_MREMAP" = "auto" ]; then
- if compileTest unix/mremap "mremap"; then
- CFG_MREMAP=yes
- else
- CFG_MREMAP=no
- fi
-fi
-
-# find if the platform provides getaddrinfo (ipv6 dns lookups)
-if [ "$CFG_GETADDRINFO" != "no" ]; then
- if compileTest unix/getaddrinfo "getaddrinfo"; then
- CFG_GETADDRINFO=yes
- else
- if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "getaddrinfo support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_GETADDRINFO=no
- fi
- fi
-fi
-
-# find if the platform provides inotify
-if [ "$CFG_INOTIFY" != "no" ]; then
- if compileTest unix/inotify "inotify"; then
- CFG_INOTIFY=yes
- else
- if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "inotify support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_INOTIFY=no
- fi
- fi
-fi
-
-# find if the platform provides eventfd
-if [ "$CFG_EVENTFD" != "no" ]; then
- if compileTest unix/eventfd "eventfd"; then
- CFG_EVENTFD=yes
- else
- if [ "$CFG_EVENTFD" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "eventfd support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_EVENTFD=no
- fi
- fi
-fi
-
-# find if the platform provides if_nametoindex (ipv6 interface name support)
-if [ "$CFG_IPV6IFNAME" != "no" ]; then
- if compileTest unix/ipv6ifname "IPv6 interface name"; then
- CFG_IPV6IFNAME=yes
- else
- if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "IPv6 interface name support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_IPV6IFNAME=no
- fi
- fi
-fi
-
-# find if the platform provides getifaddrs (network interface enumeration)
-if [ "$CFG_GETIFADDRS" != "no" ]; then
- if compileTest unix/getifaddrs "getifaddrs"; then
- CFG_GETIFADDRS=yes
- else
- if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "getifaddrs support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_GETIFADDRS=no
- fi
- fi
-fi
-
-# find if the platform provides thread-safe CLOEXEC support
-if compileTest unix/cloexec "cloexec"; then
- CFG_CLOEXEC=yes
-fi
-
-if compileTest unix/ppoll "ppoll"; then
- CFG_POLL="ppoll"
-elif compileTest unix/pollts "pollts"; then
- CFG_POLL="pollts"
-elif compileTest unix/poll "poll"; then
- CFG_POLL="poll"
-else
- CFG_POLL="select"
-fi
-
-if [ "$XPLATFORM_MAC" = "yes" ] && [ "$CFG_SECURETRANSPORT" != "no" ] && ([ "$CFG_OPENSSL" = "no" ] || [ "$CFG_OPENSSL" = "auto" ]); then
- CFG_SECURETRANSPORT=yes
- CFG_OPENSSL=no
-else
- CFG_SECURETRANSPORT=no
-fi
-
-# detect OpenSSL
-if [ "$CFG_OPENSSL" != "no" ]; then
- if compileTest unix/openssl "OpenSSL"; then
- if [ "$CFG_OPENSSL" = "auto" ]; then
- CFG_OPENSSL=yes
- fi
- else
- if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "OpenSSL support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_OPENSSL=no
- fi
- fi
-fi
-
-
-# detect PCRE
-if [ "$CFG_PCRE" != "qt" ]; then
- if compileTest unix/pcre "PCRE"; then
- CFG_PCRE=system
- else
- if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
- echo "PCRE support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- echo " If you believe this message is in error you may use the continue"
- echo " switch (-continue) to $0 to continue."
- exit 101
- else
- CFG_PCRE=qt
- fi
- fi
-fi
-
-if [ "$CFG_ALSA" = "auto" ]; then
- if compileTest unix/alsa "alsa"; then
- CFG_ALSA=yes
- else
- CFG_ALSA=no
- fi
-fi
-
-# detect GStreamer support
-if [ "$CFG_GSTREAMER" = "auto" ] || [ "$CFG_GSTREAMER" = "yes" ]; then
- if compileTest unix/gstreamer "GStreamer 1.0" -config gst-1.0; then
- CFG_GSTREAMER=yes
- CFG_GSTREAMER_VERSION=1.0
- elif compileTest unix/gstreamer "GStreamer 0.10" -config gst-0.10; then
- CFG_GSTREAMER=yes
- CFG_GSTREAMER_VERSION=0.10
- else
- if [ "$CFG_GSTREAMER" = "yes" ]; then
- echo "GStreamer support cannot be enabled due to functionality tests!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- exit 1
- fi
- CFG_GSTREAMER=no
- fi
-elif [ "$CFG_GSTREAMER" = "0.10" ]; then
- if compileTest unix/gstreamer "GStreamer 0.10" -config gst-0.10; then
- CFG_GSTREAMER=yes
- CFG_GSTREAMER_VERSION=0.10
- else
- echo "The GStreamer 0.10 functionality test failed!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- exit 1
- fi
-elif [ "$CFG_GSTREAMER" = "1.0" ]; then
- if compileTest unix/gstreamer "GStreamer 1.0" -config gst-1.0; then
- CFG_GSTREAMER=yes
- CFG_GSTREAMER_VERSION=1.0
- else
- echo "The GStreamer 1.0 functionality test failed!"
- echo " Turn on verbose messaging (-v) to $0 to see the final report."
- exit 1
- fi
-fi
-
-# Detect DirectWrite 2 support on Windows
-if [ "$CFG_DIRECTWRITE" = "no" ]; then
- CFG_DIRECTWRITE2=no
-fi
-if [ "$CFG_DIRECTWRITE2" = "auto" ]; then
- if compileTest win/directwrite2 "directwrite2"; then
- CFG_DIRECTWRITE2=yes
- else
- CFG_DIRECTWRITE2=no
- fi
-fi
-
-#-------------------------------------------------------------------------------
-# ask for all that hasn't been auto-detected or specified in the arguments
-#-------------------------------------------------------------------------------
-
-# Set "c++11" unconditionally, as lots of code does contains(QT_CONFIG, c++11)
-QT_CONFIG="$QT_CONFIG c++11"
-if [ "$CFG_STDCXX" != "c++11" ]; then
- QT_CONFIG="$QT_CONFIG c++14"
- if [ "$CFG_STDCXX" != "c++14" ]; then
- QT_CONFIG="$QT_CONFIG c++1z"
- fi
-fi
-
-if [ "$CFG_STD_ATOMIC64" = "libatomic" ]; then
- QMAKE_CONFIG="$QMAKE_CONFIG atomic64-libatomic"
-fi
-
-if [ "$CFG_SILENT" = "yes" ]; then
- QMAKE_CONFIG="$QMAKE_CONFIG silent"
-fi
-
-# disable accessibility
-if [ "$CFG_ACCESSIBILITY" = "no" ]; then
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
-else
- QT_CONFIG="$QT_CONFIG accessibility"
-fi
-
-# enable egl
-if [ "$CFG_EGL" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG egl"
-else
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
-fi
-
-# enable egl on X
-if [ "$CFG_EGL_X" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG egl_x11"
-else
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL_X11"
-fi
-
-# enable eglfs
-if [ "$CFG_EGLFS" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG eglfs"
-else
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
-fi
-# eglfs backends
-if [ "$CFG_EGLFS_BRCM" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG eglfs_brcm"
-fi
-if [ "$CFG_EGLFS_EGLDEVICE" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG eglfs_egldevice"
-fi
-if [ "$CFG_EGLFS" = "yes" ] && [ "$CFG_KMS" = "yes" ] && [ "$CFG_GBM" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG eglfs_gbm"
- CFG_EGLFS_GBM="yes"
-else
- CFG_EGLFS_GBM="no"
-fi
-if [ "$CFG_EGLFS_MALI" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG eglfs_mali"
-fi
-if [ "$CFG_EGLFS_VIV" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG eglfs_viv"
- if [ "$CFG_EGLFS_VIV_WL" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG eglfs_viv_wl"
- fi
-fi
-
-# enable opengl
-if [ "$CFG_OPENGL" = "no" ]; then
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
-else
- QT_CONFIG="$QT_CONFIG opengl"
-fi
-
-if [ "$CFG_OPENGL" = "es2" ]; then
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES QT_OPENGL_ES_2"
- QT_CONFIG="$QT_CONFIG opengles2"
-fi
-
-if [ "$CFG_SHARED" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG shared"
- QTCONFIG_CONFIG="$QTCONFIG_CONFIG shared"
-elif [ "$CFG_SHARED" = "no" ]; then
- QT_CONFIG="$QT_CONFIG static"
- QTCONFIG_CONFIG="$QTCONFIG_CONFIG static"
-fi
-
-if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
- QMAKE_CONFIG="$QMAKE_CONFIG largefile"
-fi
-if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
- QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
-fi
-[ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
-[ "$CFG_STACK_PROTECTOR_STRONG" = "yes" ] && QT_CONFIG="$QT_CONFIG stack-protector-strong"
-[ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
-[ "$CFG_STRIP" = "no" ] && QMAKE_CONFIG="$QMAKE_CONFIG nostrip"
-if testXConfig precompile_header; then
- [ "$CFG_PRECOMPILE" = "no" ] && QMakeVar del CONFIG precompile_header
-else
- [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
-fi
-[ "$CFG_USE_GOLD_LINKER" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG use_gold_linker"
-[ "$CFG_ENABLE_NEW_DTAGS" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG enable_new_dtags"
-if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG separate_debug_info"
-fi
-[ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
-[ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
-[ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
-[ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
-[ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
-[ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
-[ "$CFG_AVX2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx2"
-for feature in $CFG_AVX512; do
- QMAKE_CONFIG="$QMAKE_CONFIG avx512$feature"
-done
-[ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
-if [ "$CFG_ARCH" = "mips" ]; then
- [ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
- [ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
-fi
-if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG clock-gettime"
-fi
-if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG clock-monotonic"
-fi
-if [ "$CFG_POSIX_FALLOCATE" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG posix_fallocate"
-fi
-if [ "$CFG_MREMAP" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG mremap"
-fi
-if [ "$CFG_GETADDRINFO" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG getaddrinfo"
-fi
-if [ "$CFG_IPV6IFNAME" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG ipv6ifname"
-fi
-if [ "$CFG_GETIFADDRS" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG getifaddrs"
-fi
-if [ "$CFG_INOTIFY" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG inotify"
-fi
-if [ "$CFG_EVENTFD" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG eventfd"
-fi
-if [ "$CFG_CLOEXEC" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG threadsafe-cloexec"
-fi
-if [ "$CFG_POLL" = "select" ]; then
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NATIVE_POLL"
-fi
-QT_CONFIG="$QT_CONFIG poll_$CFG_POLL"
-if [ "$CFG_LIBJPEG" = "no" ]; then
- CFG_JPEG="no"
-elif [ "$CFG_LIBJPEG" = "system" ]; then
- QT_CONFIG="$QT_CONFIG system-jpeg"
-fi
-if [ "$CFG_JPEG" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG jpeg"
-fi
-if [ "$CFG_LIBPNG" = "no" ]; then
- CFG_PNG="no"
-fi
-if [ "$CFG_LIBPNG" = "system" ]; then
- QT_CONFIG="$QT_CONFIG system-png"
-fi
-if [ "$CFG_PNG" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG png"
-fi
-if [ "$CFG_GIF" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG gif"
-fi
-if [ "$CFG_DOUBLECONVERSION" = "system" ]; then
- QT_CONFIG="$QT_CONFIG doubleconversion system-doubleconversion"
-elif [ "$CFG_DOUBLECONVERSION" = "qt" ]; then
- QT_CONFIG="$QT_CONFIG doubleconversion"
-fi
-if [ "$CFG_FREETYPE" = "no" ]; then
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
-elif [ "$CFG_FREETYPE" = "system" ]; then
- QT_CONFIG="$QT_CONFIG freetype system-freetype"
-else
- QT_CONFIG="$QT_CONFIG freetype"
-fi
-if [ "$CFG_HARFBUZZ" = "no" ]; then
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_HARFBUZZ"
-elif [ "$CFG_HARFBUZZ" = "system" ]; then
- QT_CONFIG="$QT_CONFIG harfbuzz system-harfbuzz"
-else
- QT_CONFIG="$QT_CONFIG harfbuzz"
-fi
-if [ "$CFG_GUI" = "auto" ]; then
- CFG_GUI="yes"
-fi
-if [ "$CFG_GUI" = "no" ]; then
- QT_CONFIG="$QT_CONFIG no-gui"
- CFG_WIDGETS="no"
-fi
-if [ "$CFG_WIDGETS" = "no" ]; then
- QT_CONFIG="$QT_CONFIG no-widgets"
- QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
-fi
-
-if [ "$XPLATFORM_MAC" = "yes" ]; then
- #On Mac we implicitly link against libz, so we
- #never use the 3rdparty stuff.
- CFG_SYSTEM_ZLIB=yes
-fi
-if [ "$CFG_SYSTEM_ZLIB" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG system-zlib"
-fi
-
-[ "$CFG_MTDEV" = "yes" ] && QT_CONFIG="$QT_CONFIG mtdev"
-[ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
-[ "$CFG_ICONV" != "no" ] && QT_CONFIG="$QT_CONFIG iconv"
-[ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
-[ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
-[ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
-[ "$CFG_DBUS" != "no" ] && QT_CONFIG="$QT_CONFIG dbus"
-[ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus-linked"
-[ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG ssl openssl"
-[ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG ssl openssl-linked"
-[ "$CFG_SECURETRANSPORT" = "yes" ] && QT_CONFIG="$QT_CONFIG ssl securetransport"
-[ "$CFG_LIBPROXY" = "yes" ] && QT_CONFIG="$QT_CONFIG libproxy"
-[ "$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"
-[ "$CFG_DIRECTWRITE" = "yes" ] && QT_CONFIG="$QT_CONFIG directwrite"
-[ "$CFG_DIRECTWRITE2" = "yes" ] && QT_CONFIG="$QT_CONFIG directwrite2"
-
-[ '!' -z "$DEFINES" ] && QMakeVar add EXTRA_DEFINES "$DEFINES"
-[ '!' -z "$INCLUDES" ] && QMakeVar add EXTRA_INCLUDEPATH "$INCLUDES"
-[ '!' -z "$L_FLAGS" ] && QMakeVar add EXTRA_LIBS "$L_FLAGS"
-
-if [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
- if [ -n "$RPATH_FLAGS" ]; then
- echo
- echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
- echo " undefined."
- echo
- exit 1
- elif [ "$CFG_RPATH" = "yes" ]; then
- RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
- CFG_RPATH=no
- fi
-else
- if [ -n "$RPATH_FLAGS" ]; then
- # add the user defined rpaths
- QMakeVar add EXTRA_RPATHS "$RPATH_FLAGS"
- fi
-fi
-if [ "$CFG_RPATH" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG rpath"
-fi
-
-if [ '!' -z "$W_FLAGS" ]; then
- # add the user defined warning flags
- QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
- QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
-fi
-
-if [ "$XPLATFORM_MINGW" = "yes" ]; then
- # mkspecs/features/win32/default_pre.prf sets "no-rtti".
- # Follow default behavior of configure.exe by overriding with "rtti".
- QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
-fi
-
-if [ "$CFG_ALSA" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG alsa"
-fi
-
-if [ "$CFG_PULSEAUDIO" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG pulseaudio"
-fi
-
-[ "$CFG_GSTREAMER_VERSION" = "0.10" ] && QT_CONFIG="$QT_CONFIG gstreamer-0.10"
-[ "$CFG_GSTREAMER_VERSION" = "1.0" ] && QT_CONFIG="$QT_CONFIG gstreamer-1.0"
-
-if [ "$CFG_COREWLAN" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG corewlan"
-fi
-
-if [ "$CFG_ICU" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG icu"
-fi
-
-if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG force_asserts"
-fi
-
-if [ "$CFG_LTCG" = "yes" ]; then
- QMAKE_CONFIG="$QMAKE_CONFIG ltcg"
-fi
-
-if [ "$CFG_SANITIZERS" != "none" ]; then
-
- QTCONFIG_CONFIG="$QTCONFIG_CONFIG sanitizer"
-
- if [ "$CFG_SANITIZE_ADDRESS" = "yes" ]; then
- QTCONFIG_CONFIG="$QTCONFIG_CONFIG sanitize_address"
- fi
-
- if [ "$CFG_SANITIZE_THREAD" = "yes" ]; then
- QTCONFIG_CONFIG="$QTCONFIG_CONFIG sanitize_thread"
- fi
-
- if [ "$CFG_SANITIZE_MEMORY" = "yes" ]; then
- QTCONFIG_CONFIG="$QTCONFIG_CONFIG sanitize_memory"
- fi
-
- if [ "$CFG_SANITIZE_UNDEFINED" = "yes" ]; then
- QTCONFIG_CONFIG="$QTCONFIG_CONFIG sanitize_undefined"
- fi
-fi
-
-if [ "$CFG_PCRE" = "qt" ]; then
- QMAKE_CONFIG="$QMAKE_CONFIG pcre"
-fi
-
-CFG_CONCURRENT="yes"
-QT_CONFIG="$QT_CONFIG concurrent"
-
-# ### Vestige
-if [ "$CFG_QML_DEBUG" = "no" ]; then
- QT_CONFIG="$QT_CONFIG no-qml-debug"
-fi
-
-case "$QMAKE_CONF_COMPILER" in
-*clang*)
- # Clang
- COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -v 2>&1 | sed -n -E '
-/^Apple (clang|LLVM) version /{s///; s/^([0-9]*)\.([0-9]*).*$/QT_APPLE_CLANG_MAJOR_VERSION=\1; QT_APPLE_CLANG_MINOR_VERSION=\2/;p;q;}
-/^clang version /{s///; s/^([0-9]*)\.([0-9]*).*$/QT_CLANG_MAJOR_VERSION=\1; QT_CLANG_MINOR_VERSION=\2/;p;q;}'`
- eval "$COMPILER_VERSION"
- ;;
-*icpc)
- # Intel CC
- COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -v 2>&1 | sed -n '
-s/icpc version \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\) .*$/QT_ICC_MAJOR_VERSION=\1; QT_ICC_MINOR_VERSION=\2; QT_ICC_PATCH_VERSION=\3/p'`
- eval "$COMPILER_VERSION"
- ;;
-*g++*)
- # GNU C++
- COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
-
- case "$COMPILER_VERSION" in
- *.*.*)
- QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
- QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
- QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
- ;;
- *.*)
- QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
- QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
- QT_GCC_PATCH_VERSION=0
- ;;
- *)
- QT_GCC_MAJOR_VERSION=$COMPILER_VERSION
- QT_GCC_MINOR_VERSION=0
- QT_GCC_PATCH_VERSION=0
- esac
-
- ;;
-*)
- #
- ;;
-esac
-
-echo "Done running configuration tests."
-
-# Save stdout in fd 3
-exec 3>&1
-
-#-------------------------------------------------------------------------------
-# part of configuration information goes into qconfig.h
-#-------------------------------------------------------------------------------
-
-# Open qconfig.h.new
-exec > "$outpath/src/corelib/global/qconfig.h.new"
-
-# start with Qt's version number
-cat <<EOF
-#define QT_VERSION_MAJOR $QT_MAJOR_VERSION
-#define QT_VERSION_MINOR $QT_MINOR_VERSION
-#define QT_VERSION_PATCH $QT_PATCH_VERSION
-#define QT_VERSION_STR "$QT_VERSION"
-
+cat >> "$outpath/config.tests/configure.cfg" <<EOF
+config.input.qt_build_parts = $CFG_BUILD_PARTS
+config.input.extra_features = $CFG_FEATURES
+config.input.skip_modules = $CFG_SKIP_MODULES
+config.input.qt_edition = $Edition
+config.input.qt_licheck = $Licheck
+config.input.qt_release_date = $ReleaseDate
+config.input.sysroot = $CFG_SYSROOT
EOF
-echo '/* Compile time features */'
-
-if [ "$CFG_SHARED" = "no" ]; then
- cat <<EOF
-/* Qt was configured for a static build */
-#if !defined(QT_SHARED) && !defined(QT_STATIC)
-# define QT_STATIC
-#endif
-
-EOF
-fi
-
-if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
- echo "#define QT_LARGEFILE_SUPPORT 64"
-fi
-
-if [ "$CFG_QREAL" != double ]; then
- echo "#define QT_COORD_TYPE $CFG_QREAL"
- echo "#define QT_COORD_TYPE_STRING $CFG_QREAL_STRING"
-fi
-
-if [ "$CFG_FRAMEWORK" = "yes" ]; then
- echo "#define QT_MAC_FRAMEWORK_BUILD"
-fi
-
-if [ "$CFG_STD_ATOMIC64" = "no" ]; then
- echo "#define QT_NO_STD_ATOMIC64"
-fi
-
-#REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
-if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
- echo "#define QT_REDUCE_RELOCATIONS"
-fi
-
-# Add compiler sub-architecture support
-echo ""
-echo "// Compiler sub-arch support"
-for SUBARCH in SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 AVX AVX2 \
- MIPS_DSP MIPS_DSPR2; do
- eval "VAL=\$CFG_$SUBARCH"
- case "$VAL" in
- yes)
- echo "#define QT_COMPILER_SUPPORTS_$SUBARCH 1" \
-
- ;;
- esac
-done
-for feature in $CFG_AVX512_UPPER; do
- echo "#define QT_COMPILER_SUPPORTS_$feature 1"
+# create a clean qmodule/qconfig.pri for running the tests
+# .qmake.cache loads qt_build_parts which requires that qmodule.pri exists
+for arg in qconfig qmodule; do
+ file="$outpath/mkspecs/$arg.pri"
+ [ ! -f "$file.old" ] && [ -f "$file" ] && mv "$file" "$file.old"
+ : > "$file"
done
-echo ""
-
-if [ "$CFG_DEV" = "yes" ]; then
- echo "#define QT_BUILD_INTERNAL"
-fi
-
-# Add turned on SQL drivers
-for DRIVER in $CFG_SQL_AVAILABLE; do
- eval "VAL=\$CFG_SQL_$DRIVER"
- if [ "$VAL" = "yes" ]; then
- SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
- fi
+# recreate command line for qmake
+set -f
+SAVED_IFS=$IFS
+IFS='
+'
+for i in $QMAKE_CMDLINE; do
+ set -- "$@" "$i"
done
+set +f
+IFS=$SAVED_IFS
-QMakeVar set sql-drivers "$SQL_DRIVERS"
-
-# Add other configuration options to the qconfig.h file
-[ "$CFG_GIF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_GIF"
-[ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
-[ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
-[ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
-[ "$CFG_LIBPROXY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LIBPROXY"
-
-# X11/Unix/Mac only configs
-[ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
-[ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
-[ "$CFG_EVDEV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EVDEV"
-[ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
-[ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
-[ "$CFG_POSIX_FALLOCATE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_POSIX_FALLOCATE"
-[ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
-[ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
-[ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
-[ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
-[ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
-[ "$CFG_EVENTFD" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EVENTFD"
-[ "$CFG_CLOEXEC" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_THREADSAFE_CLOEXEC=1"
-[ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
-[ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
-[ "$CFG_OPENSSL" = "no" ] && [ "$CFG_SECURETRANSPORT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SSL"
-[ "$CFG_SECURETRANSPORT" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SECURETRANSPORT"
-
-[ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
-[ "$CFG_TSLIB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_TSLIB"
-[ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
-[ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
-[ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
-
-[ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
-[ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
-[ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
-
-# sort QCONFIG_FLAGS for neatness if we can
-[ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
-QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
-
-if [ -n "$QCONFIG_FLAGS" ]; then
-cat << EOF
-#ifndef QT_BOOTSTRAPPED
-
-EOF
- for cfg in $QCONFIG_FLAGS; do
- cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
- cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
- # figure out define logic, so we can output the correct
- # ifdefs to override the global defines in a project
- cfgdNeg=
- if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
- # QT_NO_option can be forcefully turned on by QT_option
- cfgdNeg=`echo $cfgd | sed 's,QT_NO_,QT_,'`
- elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
- # QT_option can be forcefully turned off by QT_NO_option
- cfgdNeg=`echo $cfgd | sed 's,QT_,QT_NO_,'`
- fi
-
- if [ -z $cfgdNeg ]; then
-cat << EOF
-#ifndef $cfgd
-# define $cfg
-#endif
-
-EOF
- else
-cat << EOF
-#if defined($cfgd) && defined($cfgdNeg)
-# undef $cfgd
-#elif !defined($cfgd) && !defined($cfgdNeg)
-# define $cfg
-#endif
-
-EOF
- fi
- done
-cat << EOF
-#endif // QT_BOOTSTRAPPED
-
-EOF
-fi
-
-if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
-cat << EOF
-#define QT_VISIBILITY_AVAILABLE
-
-EOF
-fi
-
-if [ -n "$QT_LIBINFIX" ]; then
-cat << EOF
-#define QT_LIBINFIX "$QT_LIBINFIX"
-
-EOF
-fi
-
-echo "#define QT_QPA_DEFAULT_PLATFORM_NAME \"$QT_QPA_DEFAULT_PLATFORM\""
-
-# Close qconfig.h.new (by restoring the original stdout)
-exec >&3
-
-# avoid unecessary rebuilds by copying only if qconfig.h has changed
-if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
- rm -f "$outpath/src/corelib/global/qconfig.h.new"
-else
- mv -f "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
-fi
-
-#-------------------------------------------------------------------------------
-# save configuration into qconfig.pri
-#-------------------------------------------------------------------------------
-
-# open qconfig.pri
-QTCONFIG="$outpath/mkspecs/qconfig.pri"
-exec > "$QTCONFIG.tmp"
-
-if [ "$CFG_DEBUG" = "yes" ]; then
- QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
- if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG release"
- fi
- QT_CONFIG="$QT_CONFIG debug"
-elif [ "$CFG_DEBUG" = "no" ]; then
- QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
- if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG debug"
- fi
- QT_CONFIG="$QT_CONFIG release"
-fi
-if [ "$CFG_FRAMEWORK" = "no" ]; then
- QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
-else
- QT_CONFIG="$QT_CONFIG qt_framework"
- QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
-fi
-if [ "$CFG_DEV" = "yes" ]; then
- QT_CONFIG="$QT_CONFIG private_tests"
- if [ "$CFG_WERROR" != "no" ]; then
- QMAKE_CONFIG="$QMAKE_CONFIG warnings_are_errors"
- fi
- if [ "$CFG_HEADERSCLEAN" != "no" ]; then
- QMAKE_CONFIG="$QMAKE_CONFIG headersclean"
- fi
-else
- if [ "$CFG_WERROR" = "yes" ]; then
- QMAKE_CONFIG="$QMAKE_CONFIG warnings_are_errors"
- fi
- if [ "$CFG_HEADERSCLEAN" = "yes" ]; then
- QMAKE_CONFIG="$QMAKE_CONFIG headersclean"
- fi
-fi
-
-cat <<EOF
-#configuration
-CONFIG += $QTCONFIG_CONFIG
-host_build {
- QT_ARCH = $CFG_HOST_ARCH
- QT_TARGET_ARCH = $CFG_ARCH
-} else {
- QT_ARCH = $CFG_ARCH
-}
-QT_CONFIG += $QT_CONFIG
-
-#versioning
-QT_VERSION = $QT_VERSION
-QT_MAJOR_VERSION = $QT_MAJOR_VERSION
-QT_MINOR_VERSION = $QT_MINOR_VERSION
-QT_PATCH_VERSION = $QT_PATCH_VERSION
-
-#namespaces
-QT_LIBINFIX = $QT_LIBINFIX
-QT_NAMESPACE = $QT_NAMESPACE
-
-QT_EDITION = $Edition
-EOF
-
-if [ "$Edition" != "OpenSource" ] && [ "$Edition" != "Preview" ]; then
- echo "QT_LICHECK = $Licheck"
- echo "QT_RELEASE_DATE = $ReleaseDate"
-fi
-echo
+# redirect qmake's output to a dummy Makefile
+$CFG_QMAKE_PATH -o Makefile.cfg -qtconf "$QTCONFFILE" QT_ARCH=$CFG_ARCH QT_HOST_ARCH=$CFG_HOST_ARCH $relpath/configure.pri -- "$@" || exit 101
+rm Makefile.cfg
-if [ "$CFG_SHARED" = "no" ]; then
- echo "QT_DEFAULT_QPA_PLUGIN = q$QT_QPA_DEFAULT_PLATFORM"
- echo
-fi
-
-if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then
- echo "# pkgconfig"
- echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR"
- echo "PKG_CONFIG_LIBDIR = $PKG_CONFIG_LIBDIR"
- echo
-fi
-
-if [ -n "$CFG_SYSROOT" ] && [ "$CFG_GCC_SYSROOT" = "yes" ]; then
- echo "# sysroot"
- echo "!host_build {"
- echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]"
- echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]"
- echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]"
- echo "}"
- echo
-fi
-if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
- echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION"
- echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION"
- echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION"
-fi
-if [ -n "$QT_ICC_MAJOR_VERSION" ]; then
- echo "QT_ICC_MAJOR_VERSION = $QT_ICC_MAJOR_VERSION"
- echo "QT_ICC_MINOR_VERSION = $QT_ICC_MINOR_VERSION"
- echo "QT_ICC_PATCH_VERSION = $QT_ICC_PATCH_VERSION"
-fi
-if [ -n "$QT_CLANG_MAJOR_VERSION" ]; then
- echo "QT_CLANG_MAJOR_VERSION = $QT_CLANG_MAJOR_VERSION"
- echo "QT_CLANG_MINOR_VERSION = $QT_CLANG_MINOR_VERSION"
-fi
-if [ -n "$QT_APPLE_CLANG_MAJOR_VERSION" ]; then
- echo "QT_APPLE_CLANG_MAJOR_VERSION = $QT_APPLE_CLANG_MAJOR_VERSION"
- echo "QT_APPLE_CLANG_MINOR_VERSION = $QT_APPLE_CLANG_MINOR_VERSION"
-fi
-
-if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
- echo "#Qt opengl include path"
- echo "QMAKE_INCDIR_OPENGL_ES2 = `shellArgumentListToQMakeList "$QMAKE_INCDIR_OPENGL_ES2"`"
-fi
-
-# Close qconfig.pri.tmp (by restoring the original stdout)
-exec >&3
-
-# replace qconfig.pri if it differs from the newly created temp file
-if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
- rm -f "$QTCONFIG.tmp"
-else
- mv -f "$QTCONFIG.tmp" "$QTCONFIG"
-fi
-
-#-------------------------------------------------------------------------------
-# save configuration into qmodule.pri
-#-------------------------------------------------------------------------------
-
-# open qmodule.pri
-QTMODULE="$outpath/mkspecs/qmodule.pri"
-exec > "$QTMODULE.tmp"
-
-echo "CONFIG += $QMAKE_CONFIG"
-echo "QT_BUILD_PARTS += $CFG_BUILD_PARTS"
-if [ -n "$CFG_SKIP_MODULES" ]; then
- echo "QT_SKIP_MODULES += $CFG_SKIP_MODULES"
-fi
-DISABLED_FEATURES=
-for cfg in $QCONFIG_FLAGS; do
- ncfg=${cfg#QT_NO_}
- if [ x$ncfg != x$cfg ]; then
- DISABLED_FEATURES="$DISABLED_FEATURES $ncfg"
+# Re-use old file if unchanged, to avoid needless rebuilds
+for arg in qconfig qmodule; do
+ file="$outpath/mkspecs/$arg.pri"
+ if cmp -s "$file" "$file.old"; then
+ rm -f "$file"
+ mv "$file.old" "$file"
+ else
+ rm -f "$file.old"
fi
done
-if [ -n "$DISABLED_FEATURES" ]; then
- echo "QT_NO_DEFINES = $DISABLED_FEATURES"
-fi
-
-cat <<EOF
-host_build {
- QT_CPU_FEATURES.$CFG_HOST_ARCH = $CFG_HOST_CPUFEATURES
-} else {
- QT_CPU_FEATURES.$CFG_ARCH = $CFG_CPUFEATURES
-}
-EOF
-echo "QT_COORD_TYPE = $CFG_QREAL"
-
-if [ -n "$QMAKE_CFLAGS_PSQL" ]; then
- echo "QMAKE_CFLAGS_PSQL = $QMAKE_CFLAGS_PSQL"
-fi
-if [ -n "$QMAKE_LIBS_PSQL" ]; then
- echo "QMAKE_LIBS_PSQL = $QMAKE_LIBS_PSQL"
-fi
-if [ -n "$QMAKE_CFLAGS_MYSQL" ]; then
- echo "QMAKE_CFLAGS_MYSQL = $QMAKE_CFLAGS_MYSQL"
-fi
-if [ -n "$QMAKE_LIBS_MYSQL" ]; then
- echo "QMAKE_LIBS_MYSQL = $QMAKE_LIBS_MYSQL"
-fi
-if [ -n "$QMAKE_CFLAGS_SQLITE" ]; then
- echo "QMAKE_CFLAGS_SQLITE = $QMAKE_CFLAGS_SQLITE"
-fi
-if [ -n "$QMAKE_LIBS_SQLITE" ]; then
- echo "QMAKE_LIBS_SQLITE = $QMAKE_LIBS_SQLITE"
-fi
-if [ -n "$QMAKE_LIBS_ODBC" ]; then
- echo "QMAKE_LIBS_ODBC = $QMAKE_LIBS_ODBC"
-fi
-if [ -n "$QMAKE_LIBS_TDS" ]; then
- echo "QMAKE_LIBS_TDS = $QMAKE_LIBS_TDS"
-fi
-
-#dump in the OPENSSL_LIBS info
-if [ '!' -z "$OPENSSL_LIBS" ]; then
- echo "OPENSSL_LIBS = $OPENSSL_LIBS"
-elif [ "$CFG_OPENSSL" = "linked" ]; then
- echo "OPENSSL_LIBS = -lssl -lcrypto"
-fi
-
-# cmdline args
-cat "$QMAKE_VARS_FILE"
-# QMAKE_VARS_FILE will be still needed for a status message.
-
-# Close qmodule.pri.tmp (by restoring the original stdout)
-exec >&3
-
-# replace qmodule.pri if it differs from the newly created temp file
-if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
- rm -f "$QTMODULE.tmp"
-else
- mv -f "$QTMODULE.tmp" "$QTMODULE"
-fi
#-------------------------------------------------------------------------------
# give feedback on configuration
#-------------------------------------------------------------------------------
-exec 1>$outpath/config.summary # redirect output temporarily to config.summary
-
-report_support()
-{
- case "$#,$2" in
- 2,auto)
- # 2 arguments and the result is "auto", so just say "yes"
- # this is usually an error in the configure script, but oh well..
- echo "$1 yes"
- return
- ;;
- [012],* | *,no*)
- # 0, 1 or 2 arguments, or anything starting with "no"
- # print just the first part of the argument (before the dash)
- echo "$1 ${2%%-*}"
- return
- :;
- esac
- heading=$1
- shift
-
- value=$1
- shift
-
- while [ $# -gt 0 ]; do
- if [ "$value" = "$1" ]; then
- echo "$heading yes ($2)"
- return
- fi
- shift
- shift
- done
- echo "$heading $value"
-}
-
-report_support_plugin()
-{
- report_support "$1" "$2-$3" \
- yes-qt "in $4, using bundled copy" \
- yes-system "in $4, using system library" \
- plugin-qt "plugin, using bundled copy" \
- plugin-system "plugin, using system library"
-}
-
-echo
-echo " Configure summary"
-echo
-if [ "$XPLATFORM" = "$PLATFORM" ]; then
- # the missing space before $CFG_FEATURES is intentional
- echo "Build type: $PLATFORM ($CFG_ARCH, CPU features:${CFG_CPUFEATURES:- none detected})"
-else
- echo "Building on: $PLATFORM ($CFG_HOST_ARCH, CPU features:${CFG_HOST_CPUFEATURES:- none detected})"
- echo "Building for: $XPLATFORM ($CFG_ARCH, CPU features:${CFG_CPUFEATURES:- none detected})"
-fi
-
if [ -n "$PLATFORM_NOTES" ]; then
+ echo
echo "Platform notes:"
echo "$PLATFORM_NOTES"
else
@@ -6301,213 +2103,6 @@ if [ "$OPT_VERBOSE" = "yes" ]; then
echo
fi
-# Build configuration
-echo "Build options:"
-echo $ECHO_N " Configuration .......... $ECHO_C"
-echo $QMAKE_CONFIG $QT_CONFIG | tr ' ' '\n' | sort | tr '\n' ' '
-echo
-echo " Build parts ............ $CFG_BUILD_PARTS"
-release="release"
-[ "$CFG_FORCEDEBUGINFO" = "yes" ] && release="release (with debug info)"
-[ "$CFG_DEBUG" = "yes" ] && build_mode="debug" || build_mode=$release
-if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
- build_mode="debug and $release; default link: $build_mode"
-fi
-if [ "$CFG_RELEASE_TOOLS" = "yes" ]; then
- build_mode="$build_mode; optimized tools"
-fi
-echo " Mode ................... $build_mode"
-unset build_mode release
-echo " Using sanitizer(s)...... $CFG_SANITIZERS"
-echo " Using C++ standard ..... $CFG_STDCXX"
-echo " Using gold linker....... $CFG_USE_GOLD_LINKER"
-echo " Using new DTAGS ........ $CFG_ENABLE_NEW_DTAGS"
-echo " Using PCH .............. $CFG_PRECOMPILE"
-echo " Using LTCG ............. $CFG_LTCG"
-echo " Target compiler supports:"
-if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
- echo " SSE .................. ${CFG_SSE_LIST:-<none>}"
- echo " AVX .................. ${CFG_AVX_LIST:-<none>}"
- echo " AVX512 ............... ${CFG_AVX512_UPPER:-<none>}"
-elif [ "$CFG_ARCH" = "arm" -o "$CFG_ARCH" = "arm64" ]; then
- echo " Neon ................. ${CFG_NEON}"
-elif [ "$CFG_ARCH" = "mips" ]; then
- echo " DSP/DSPr2 ............ ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
-fi
-
-# Qt modules
-echo
-echo "Qt modules and options:"
-report_support " Qt D-Bus ..............." "$CFG_DBUS" runtime "loading dbus-1 at runtime" linked "linked to dbus-1"
-report_support " Qt Concurrent .........." "$CFG_CONCURRENT"
-report_support " Qt GUI ................." "$CFG_GUI"
-report_support " Qt Widgets ............." "$CFG_WIDGETS"
-report_support " QML debugging .........." "$CFG_QML_DEBUG"
-report_support " Use system proxies ....." "$CFG_SYSTEM_PROXIES"
-
-# Other things
-# Please keep sorted and properly grouped! The output is quite long, so it's
-# hard to find something you're searching for if it's not sorted.
-echo
-echo "Support enabled for:"
-report_support " Accessibility .........." "$CFG_ACCESSIBILITY"
-report_support " ALSA ..................." "$CFG_ALSA"
-report_support " CUPS ..................." "$CFG_CUPS"
-[ "$XPLATFORM_MINGW" = "yes" ] && \
- report_support " DirectWrite ............" "$CFG_DIRECTWRITE"
-report_support " DoubleConversion........" "$CFG_DOUBLECONVERSION" no "libc" system "system library" qt "bundled copy"
-report_support " Evdev .................." "$CFG_EVDEV"
-report_support " FontConfig ............." "$CFG_FONTCONFIG"
-report_support " FreeType ..............." "$CFG_FREETYPE" system "system library" yes "bundled copy"
-report_support " Glib ..................." "$CFG_GLIB"
-report_support " GStreamer .............." "$CFG_GSTREAMER" yes "$CFG_GSTREAMER_VERSION"
-report_support " GTK platformtheme ......" "$CFG_GTK"
-report_support " HarfBuzz ..............." "$CFG_HARFBUZZ" system "system library" qt "bundled copy"
-report_support " Iconv .................." "$CFG_ICONV"
-report_support " ICU ...................." "$CFG_ICU"
-report_support " Image formats:"
-report_support_plugin " GIF .................." "$CFG_GIF" qt QtGui
-report_support_plugin " JPEG ................." "$CFG_JPEG" "$CFG_LIBJPEG" QtGui
-report_support_plugin " PNG .................." "$CFG_PNG" "$CFG_LIBPNG" QtGui
-report_support " libinput................" "$CFG_LIBINPUT"
-report_support " Logging backends:"
-report_support " journald ..............." "$CFG_JOURNALD"
-report_support " syslog ..............." "$CFG_SYSLOG"
-report_support " mtdev .................." "$CFG_MTDEV" yes "system library"
-report_support " Networking:"
-[ "$XPLATFORM_MAC" = "yes" ] && \
- report_support " CoreWlan ............." "$CFG_COREWLAN"
-report_support " getaddrinfo .........." "$CFG_GETADDRINFO"
-report_support " getifaddrs ..........." "$CFG_GETIFADDRS"
-report_support " IPv6 ifname .........." "$CFG_IPV6IFNAME"
-report_support " libproxy.............." "$CFG_LIBPROXY"
-report_support " OpenSSL .............." "$CFG_OPENSSL" yes "loading libraries at run-time" linked "linked to the libraries"
-[ "$XPLATFORM_MAC" = "yes" ] && \
- report_support " SecureTransport ......" "$CFG_SECURETRANSPORT"
-report_support " OpenGL / OpenVG:"
-report_support " EGL .................." "$CFG_EGL"
-report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+"
-report_support " PCRE ..................." "$CFG_PCRE" yes "system library" qt "bundled copy"
-if [ -n "$PKG_CONFIG" ]; then
- report_support " pkg-config ............. yes"
-else
- report_support " pkg-config ............. no"
-fi
-report_support " PulseAudio ............." "$CFG_PULSEAUDIO"
-report_support " QPA backends:"
-report_support " DirectFB ............." "$CFG_DIRECTFB"
-report_support " EGLFS ................" "$CFG_EGLFS"
-report_support " EGLFS i.MX6 ........" "$CFG_EGLFS_VIV"
-report_support " EGLFS i.MX6 Wayland." "$CFG_EGLFS_VIV_WL"
-report_support " EGLFS EGLDevice ...." "$CFG_EGLFS_EGLDEVICE"
-report_support " EGLFS GBM .........." "$CFG_EGLFS_GBM"
-report_support " EGLFS Mali ........." "$CFG_EGLFS_MALI"
-report_support " EGLFS Raspberry Pi ." "$CFG_EGLFS_BRCM"
-report_support " EGLFS X11 .........." "$CFG_EGL_X"
-if [ "$XPLATFORM_INTEGRITY" = "yes" ]; then
- report_support " INTEGRITY Framebuffer " "$CFG_INTEGRITYFB"
-fi
-report_support " LinuxFB .............." "$CFG_LINUXFB"
-report_support " Mir client............" "$CFG_MIRCLIENT"
-report_support " XCB .................." "$CFG_XCB" system "system library" qt "bundled copy"
-if [ "$CFG_XCB" != "no" ]; then
- report_support " EGL on X ..........." "$CFG_EGL_X"
- report_support " GLX ................" "$CFG_XCB_GLX"
- report_support " Xcb-Xlib ..........." "$CFG_XCB_XLIB"
- report_support " Xi2 ................" "$CFG_XINPUT2" runtime "loaded at runtime"
- report_support " Xrender ............" "$CFG_XRENDER"
- report_support " XKB ................" "$CFG_XKB"
-fi
-report_support " Session management ....." "$CFG_SM"
-if [ "$XPLATFORM_QNX" = "yes" ]; then
- report_support " SLOG2 .................." "$CFG_SLOG2"
- report_support " IMF ...................." "$CFG_QNX_IMF"
- report_support " PPS ...................." "$CFG_PPS"
- report_support " LGMON .................." "$CFG_LGMON"
-fi
-report_support " SQL drivers:"
-report_support " DB2 .................." "$CFG_SQL_db2"
-report_support " InterBase ............" "$CFG_SQL_ibase"
-report_support " MySQL ................" "$CFG_SQL_mysql"
-report_support " OCI .................." "$CFG_SQL_oci"
-report_support " ODBC ................." "$CFG_SQL_odbc"
-report_support " PostgreSQL ..........." "$CFG_SQL_psql"
-report_support " SQLite 2 ............." "$CFG_SQL_sqlite2"
-report_support_plugin " SQLite ..............." "$CFG_SQL_sqlite" "$CFG_SQLITE" QtSql
-report_support " TDS .................." "$CFG_SQL_tds"
-report_support " tslib .................." "$CFG_TSLIB"
-report_support " udev ..................." "$CFG_LIBUDEV"
-report_support " xkbcommon-x11..........." "$CFG_XKBCOMMON" system "system library" qt "bundled copy, XKB config root: $CFG_XKB_CONFIG_ROOT"
-report_support " xkbcommon-evdev........." "$CFG_XKBCOMMON_EVDEV"
-report_support " zlib ..................." "$CFG_SYSTEM_ZLIB" yes "system library" no "bundled copy"
-
-echo
-
-# complain about not being able to use dynamic plugins if we are using a static build
-if [ "$CFG_SHARED" = "no" ]; then
- echo
- echo "WARNING: Using static linking will disable the use of dynamically"
- echo "loaded plugins. Make sure to import all needed static plugins,"
- echo "or compile needed modules into the library."
-fi
-if [ "$CFG_FREETYPE" = "system" ]; then
- if [ "$ORIG_CFG_FREETYPE" = "qt" ]; then
- echo
- echo "WARNING: Bundled FreeType can't be used. FontConfig use requires system FreeType."
- elif [ "$ORIG_CFG_FREETYPE" = "no" ]; then
- echo
- echo "WARNING: FreeType can't be disabled. FontConfig use requires system FreeType."
- fi
-fi
-if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
- echo
- echo "NOTE: When linking against OpenSSL, you can override the default"
- echo "library names through OPENSSL_LIBS."
- echo "For example:"
- echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
-fi
-if [ "$CFG_JOURNALD" = "yes" ] || [ "$CFG_SYSLOG" = "yes" ] || [ "$CFG_SLOG2" = "yes" ]; then
- echo
- echo "NOTE: journald, syslog or slog2 integration is enabled."
- echo "If your users intend on developing applications against this build,"
- echo "ensure that the IDEs they use either set QT_LOGGING_TO_CONSOLE to 1"
- echo "or the IDE is able to read the logged output from journald, syslog or slog2."
-fi
-if [ "$CFG_XKBCOMMON" = "qt" ] && [ "$CFG_XKB_CONFIG_ROOT" = "not found" ]; then
- echo
- echo "WARNING: Could not find XKB config root, use -xkb-config-root to set a path to "
- echo "XKB configuration data. This is required for keyboard input support."
-fi
-if [ "$CFG_QREAL" = double ] && [ "$CFG_ARCH" = arm ]; then
- echo
- echo "NOTE: Qt is using double for qreal on this system. This is binary incompatible against Qt 5.1."
- echo "Configure with '-qreal float' to create a build that is binary compatible with 5.1."
-fi
-if [ "$CFG_RELEASE_TOOLS" = "yes" -a \( "$CFG_DEBUG" = "no" -o "$CFG_DEBUG_RELEASE" = "yes" \) ]; then
- echo
- echo "NOTE: -optimized-tools is not useful in -release mode."
- echo
-fi
-if [ "$CFG_GUI" = "yes" ] && [ "$XPLATFORM_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ] && [ "$XPLATFORM_ANDROID" = "no" ] && [ "$XPLATFORM_HAIKU" = "no" ] && [ "$XPLATFORM_INTEGRITY" = "no" ]; then
- if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ] && [ "$CFG_LINUXFB" = "no" ] && [ "$CFG_MIRCLIENT" = "no" ]; then
- echo
- echo "No QPA platform plugin enabled! This will"
- echo "produce a Qt that cannot run GUI applications."
- echo
- fi
-fi
-
-exec 1>&3 3>&- # restore stdout
-cat $outpath/config.summary # display config feedback to user
-
-if [ "$XPLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
- echo
- echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
- echo "if you want a pure debug build."
- echo
- exit 1
-fi
-
sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
PROCS=1
EXEC=""
diff --git a/configure.json b/configure.json
new file mode 100644
index 0000000000..7623997409
--- /dev/null
+++ b/configure.json
@@ -0,0 +1,2493 @@
+{
+ "files": {
+ "publicHeader": "src/corelib/global/qconfig.h",
+ "publicPro": "mkspecs/qconfig.pri",
+ "privatePro": "mkspecs/qmodule.pri"
+ },
+
+ "commandline": {
+ "options": {
+ "prefix": "string",
+ "hostprefix": "string",
+ "extprefix": "string",
+
+ "archdatadir": "string",
+ "bindir": "string",
+ "datadir": "string",
+ "docdir": "string",
+ "examplesdir": "string",
+ "external-hostbindir": "string",
+ "headerdir": "string",
+ "hostbindir": "string",
+ "hostdatadir": "string",
+ "hostlibdir": "string",
+ "importdir": "string",
+ "libdir": "string",
+ "libexecdir": "string",
+ "plugindir": "string",
+ "qmldir": "string",
+ "settingsdir": "string",
+ "sysconfdir": "string",
+ "testsdir": "string",
+ "translationdir": "string",
+
+ "android-arch": "string",
+ "android-ndk": "string",
+ "android-ndk-host": "string",
+ "android-ndk-platform": "string",
+ "android-sdk": "string",
+ "android-style-assets": "boolean",
+ "android-toolchain-version": "string",
+
+ "accessibility": "boolean",
+ "alsa": "boolean",
+ "audio-backend": "boolean",
+ "avx": "boolean",
+ "avx2": "boolean",
+ "avx512": "boolean",
+ "c++std": "cxxstd",
+ "commercial": "void",
+ "compile_examples": "boolean",
+ "confirm-license": "void",
+ "continue": "void",
+ "cups": "boolean",
+ "dbus": { "type": "optionalString", "values": [ "no", "linked", "runtime" ] },
+ "dbus-linked": { "type": "void", "name": "dbus", "value": "linked" },
+ "dbus-runtime": { "type": "void", "name": "dbus", "value": "runtime" },
+ "debug": "void",
+ "debug-and-release": { "type": "boolean", "name": "debug_and_release" },
+ "developer-build": "void",
+ "device": "string",
+ "device-option": "string",
+ "directfb": "boolean",
+ "directwrite": "boolean",
+ "doubleconversion": { "type": "enum", "values": [ "no", "qt", "system" ] },
+ "egl": "boolean",
+ "eglfs": "boolean",
+ "evdev": "boolean",
+ "fontconfig": "boolean",
+ "force-asserts": { "type": "boolean", "name": "force_asserts" },
+ "force-debug-info": { "type": "boolean", "name": "force_debug_info" },
+ "force-pkg-config": { "type": "void", "name": "pkg-config" },
+ "framework": "boolean",
+ "freetype": { "type": "enum", "values": [ "no", "qt", "system" ] },
+ "gbm": "boolean",
+ "gcc-sysroot": "boolean",
+ "gcov": "boolean",
+ "gif": "boolean",
+ "glib": "boolean",
+ "gnumake": { "type": "boolean", "name": "GNUmake" },
+ "gstreamer": { "type": "optionalString", "values": [ "no", "yes", "0.10", "1.0" ] },
+ "gtk": { "type": "boolean", "name": "gtk3" },
+ "gui": "boolean",
+ "harfbuzz": { "type": "enum", "values": [ "no", "qt", "system" ] },
+ "headersclean": "boolean",
+ "host-option": "string",
+ "iconv": "boolean",
+ "icu": "boolean",
+ "imf": { "type": "boolean", "name": "qqnx_imf" },
+ "journald": "boolean",
+ "lgmon": "boolean",
+ "libinput": "boolean",
+ "libjpeg": { "type": "enum", "values": [ "no", "qt", "system" ] },
+ "libpng": { "type": "enum", "values": [ "no", "qt", "system" ] },
+ "libproxy": "boolean",
+ "libudev": "boolean",
+ "linuxfb": "boolean",
+ "ltcg": "boolean",
+ "kms": "boolean",
+ "make": { "type": "addString", "values": [ "examples", "libs", "tests", "tools" ] },
+ "mips_dsp": "boolean",
+ "mips_dspr2": "boolean",
+ "mirclient": "boolean",
+ "mtdev": "boolean",
+ "mysql_config": "string",
+ "nomake": { "type": "addString", "values": [ "examples", "tests", "tools" ] },
+ "opengl": { "type": "optionalString", "values": [ "no", "yes", "desktop", "es2" ] },
+ "opensource": { "type": "void", "name": "commercial", "value": "no" },
+ "openssl": "boolean",
+ "openssl-linked": { "type": "void", "name": "openssl", "value": "linked" },
+ "optimized-qmake": { "type": "boolean", "name": "release_tools" },
+ "optimized-tools": { "type": "boolean", "name": "release_tools" },
+ "pch": { "type": "boolean", "name": "precompile_header" },
+ "pcre": { "type": "enum", "values": [ "qt", "system" ] },
+ "pkg-config": "boolean",
+ "platform": "string",
+ "pps": { "type": "boolean", "name": "qqnx_pps" },
+ "profile": "boolean",
+ "psql_config": "string",
+ "pulseaudio": "boolean",
+ "qml-debug": "boolean",
+ "qpa": { "type": "string", "name": "qpa_default_platform" },
+ "qpa-platform-guard": "boolean",
+ "qreal": "string",
+ "qtlibinfix": { "type": "string", "name": "qt_libinfix" },
+ "qtnamespace": { "type": "string", "name": "qt_namespace" },
+ "reduce-exports": { "type": "boolean", "name": "reduce_exports" },
+ "reduce-relocations": { "type": "boolean", "name": "reduce_relocations" },
+ "release": { "type": "enum", "name": "debug", "values": { "yes": "no", "no": "yes" } },
+ "rpath": "boolean",
+ "sanitize": "sanitize",
+ "sdk": "string",
+ "securetransport": "boolean",
+ "separate-debug-info": { "type": "boolean", "name": "separate_debug_info" },
+ "shared": "boolean",
+ "silent": "void",
+ "skip": "addString",
+ "slog2": "boolean",
+ "sm": { "type": "boolean", "name": "sessionmanager" },
+ "sql-db2": { "type": "boolean", "name": "db2" },
+ "sql-ibase": { "type": "boolean", "name": "ibase" },
+ "sql-mysql": { "type": "boolean", "name": "mysql" },
+ "sql-oci": { "type": "boolean", "name": "oci" },
+ "sql-odbc": { "type": "boolean", "name": "odbc" },
+ "sql-psql": { "type": "boolean", "name": "psql" },
+ "sql-sqlite": { "type": "boolean", "name": "sqlite" },
+ "sql-sqlite2": { "type": "boolean", "name": "sqlite2" },
+ "sql-tds": { "type": "boolean", "name": "tds" },
+ "plugin-sql-db2": { "type": "void", "name": "db2" },
+ "plugin-sql-ibase": { "type": "void", "name": "ibase" },
+ "plugin-sql-mysql": { "type": "void", "name": "mysql" },
+ "plugin-sql-oci": { "type": "void", "name": "oci" },
+ "plugin-sql-odbc": { "type": "void", "name": "odbc" },
+ "plugin-sql-psql": { "type": "void", "name": "psql" },
+ "plugin-sql-sqlite": { "type": "void", "name": "sqlite" },
+ "plugin-sql-sqlite2": { "type": "void", "name": "sqlite2" },
+ "plugin-sql-tds": { "type": "void", "name": "tds" },
+ "sqlite": { "type": "enum", "name": "system-sqlite", "values": { "qt": "no", "system": "yes" } },
+ "sse2": "boolean",
+ "sse3": "boolean",
+ "sse4.1": { "type": "boolean", "name": "sse4_1" },
+ "sse4.2": { "type": "boolean", "name": "sse4_2" },
+ "ssse3": "boolean",
+ "static": { "type": "enum", "name": "shared", "values": { "yes": "no", "no": "yes" } },
+ "strip": "boolean",
+ "syslog": "boolean",
+ "sysroot": "string",
+ "system-proxies": "boolean",
+ "testcocoon": "boolean",
+ "tslib": "boolean",
+ "use-gold-linker": { "type": "boolean", "name": "use_gold_linker" },
+ "v": { "type": "void", "name": "verbose" },
+ "verbose": "void",
+ "warnings-are-errors": { "type": "boolean", "name": "warnings_are_errors" },
+ "Werror": { "type": "boolean", "name": "warnings_are_errors" },
+ "widgets": "boolean",
+ "xcb": { "type": "enum", "values": [ "no", "yes", "qt", "system" ] },
+ "xcb-xlib": "boolean",
+ "xinput2": "boolean",
+ "xkb": "boolean",
+ "xkb-config-root": "string",
+ "xkbcommon": { "type": "enum", "values": [ "no", "qt", "system" ] },
+ "xkbcommon-evdev": "boolean",
+ "xkbcommon-x11": { "type": "enum", "name": "xkbcommon", "values": [ "no", "qt", "system" ] },
+ "xplatform": "string",
+ "xrender": "boolean",
+ "zlib": { "type": "enum", "name": "system-zlib", "values": { "system": "yes", "qt": "no" } }
+ },
+ "prefix": {
+ "D": "defines",
+ "F": "fpaths",
+ "fw": "frameworks",
+ "I": "includes",
+ "L": "lpaths",
+ "l": "libs",
+ "R": "rpaths",
+ "W": "wflags"
+ }
+
+ },
+
+ "tests": {
+ "GNUmake": {
+ "description": "GNU make",
+ "type": "gnumake"
+ },
+ "pkg-config": {
+ "description": "pkg-config",
+ "type": "detectPkgConfig"
+ },
+ "stl": {
+ "description": "STL compatibility",
+ "type": "compile",
+ "test": "unix/stl"
+ },
+ "c++11": {
+ "description": "C++11 support",
+ "type": "compile",
+ "test": "common/c++11"
+ },
+ "c++14": {
+ "description": "C++14 support",
+ "type": "compile",
+ "test": "common/c++14"
+ },
+ "c++1z": {
+ "description": "C++1z support",
+ "type": "compile",
+ "test": "common/c++1z"
+ },
+ "compiler": {
+ "description": "Compiler",
+ "type": "checkCompiler",
+ "log": "compilerDescription"
+ },
+ "precompile_header": {
+ "description": "precompiled header support",
+ "type": "shell",
+ "test": "unix/precomp.test",
+ "args": "$$QMAKE_CXX yes"
+ },
+ "use_gold_linker": {
+ "description": "gold linker",
+ "type": "compilerSupportsFlag",
+ "flag": "-fuse-ld=gold"
+ },
+ "enable_new_dtags": {
+ "description": "new dtags support",
+ "type": "linkerSupportsFlag",
+ "flag": "--enable-new-dtags"
+ },
+ "reduce_exports": {
+ "description": "symbol visibility support",
+ "type": "shell",
+ "test": "unix/fvisibility.test",
+ "args": "$$QMAKE_CXX yes"
+ },
+ "reduce_relocations": {
+ "description": "-Bsymbolic-functions support",
+ "type": "shell",
+ "test": "unix/bsymbolic_functions.test",
+ "args": "$$QMAKE_CXX yes"
+ },
+ "dlopen": {
+ "description": "dlopen() in libc",
+ "type": "compile",
+ "test": "unix/dlopen"
+ },
+ "libdl": {
+ "description": "dlopen() in libdl",
+ "type": "compile",
+ "test": "unix/libdl"
+ },
+ "separate_debug_info": {
+ "description": "separate debug information support",
+ "type": "compile",
+ "test": "unix/objcopy"
+ },
+ "atomic64": {
+ "description": "64 bit atomics",
+ "type": "compile",
+ "test": "common/atomic64"
+ },
+ "atomic64_libatomic": {
+ "description": "64 bit atomics in libatomic",
+ "type": "compile",
+ "test": "common/atomic64",
+ "libs": "-latomic"
+ },
+ "atomicfptr": {
+ "description": "working std::atomic for function pointers",
+ "type": "compile",
+ "test": "common/atomicfptr"
+ },
+ "sse2": {
+ "description": "SSE2 instructions",
+ "type": "compile",
+ "test": "common/sse2"
+ },
+ "sse3": {
+ "description": "SSE3 instructions",
+ "type": "compile",
+ "test": "common/sse3"
+ },
+ "ssse3": {
+ "description": "SSSE3 instructions",
+ "type": "compile",
+ "test": "common/ssse3"
+ },
+ "sse4_1": {
+ "description": "SSE4.1 instructions",
+ "type": "compile",
+ "test": "common/sse4_1"
+ },
+ "sse4_2": {
+ "description": "SSE4.2 instructions",
+ "type": "compile",
+ "test": "common/sse4_2"
+ },
+ "avx": {
+ "description": "AVX instructions",
+ "type": "compile",
+ "test": "common/avx"
+ },
+ "avx_apple_clang": {
+ "description": "bugfree AVX support in compiler",
+ "type": "avx_test_apple_clang"
+ },
+ "avx2": {
+ "description": "AVX2 instructions",
+ "type": "compile",
+ "test": "common/avx2"
+ },
+ "avx512f": {
+ "description": "AVX512 F instructions",
+ "type": "compile",
+ "test": "common/avx512",
+ "args": "AVX512=F"
+ },
+ "avx512er": {
+ "description": "AVX512 ER instructions",
+ "type": "compile",
+ "test": "common/avx512",
+ "args": "AVX512=ER"
+ },
+ "avx512cd": {
+ "description": "AVX512 CD instructions",
+ "type": "compile",
+ "test": "common/avx512",
+ "args": "AVX512=CD"
+ },
+ "avx512pf": {
+ "description": "AVX512 PF instructions",
+ "type": "compile",
+ "test": "common/avx512",
+ "args": "AVX512=PF"
+ },
+ "avx512dq": {
+ "description": "AVX512 DQ instructions",
+ "type": "compile",
+ "test": "common/avx512",
+ "args": "AVX512=DQ"
+ },
+ "avx512bw": {
+ "description": "AVX512 BW instructions",
+ "type": "compile",
+ "test": "common/avx512",
+ "args": "AVX512=BW"
+ },
+ "avx512vl": {
+ "description": "AVX512 VL instructions",
+ "type": "compile",
+ "test": "common/avx512",
+ "args": "AVX512=VL"
+ },
+ "avx512ifma": {
+ "description": "AVX512 IFMA instructions",
+ "type": "compile",
+ "test": "common/avx512",
+ "args": "AVX512=IFMA"
+ },
+ "avx512vbmi": {
+ "description": "AVX512 VBMI instructions",
+ "type": "compile",
+ "test": "common/avx512",
+ "args": "AVX512=VBMI"
+ },
+ "mips_dsp": {
+ "description": "MIPS DSP instructions",
+ "type": "compile",
+ "test": "unix/mips_dsp"
+ },
+ "mips_dspr2": {
+ "description": "MIPS DSPr2 instructions",
+ "type": "compile",
+ "test": "common/mips_dspr2"
+ },
+ "neon": {
+ "description": "NEON instructions",
+ "type": "neon"
+ },
+
+ "clock-gettime": {
+ "description": "clock_gettime()",
+ "type": "compile",
+ "test": "unix/clock-gettime"
+ },
+ "clock-monotonic": {
+ "description": "POSIX monotonic clock",
+ "type": "compile",
+ "test": "unix/clock-monotonic"
+ },
+ "alsa": {
+ "description": "ALSA",
+ "type": "compile",
+ "test": "unix/alsa"
+ },
+ "evdev": {
+ "description": "evdev",
+ "type": "compile",
+ "test": "unix/evdev"
+ },
+ "eventfd": {
+ "description": "eventfd",
+ "type": "compile",
+ "test": "unix/eventfd"
+ },
+ "gbm": {
+ "description": "GBM",
+ "type": "compile",
+ "test": "qpa/gbm"
+ },
+ "getaddrinfo": {
+ "description": "getaddrinfo()",
+ "type": "compile",
+ "test": "unix/getaddrinfo"
+ },
+ "getifaddrs": {
+ "description": "getifaddrs()",
+ "type": "compile",
+ "test": "unix/getifaddrs"
+ },
+ "inotify": {
+ "description": "inotify",
+ "type": "compile",
+ "test": "unix/inotify"
+ },
+ "ipv6ifname": {
+ "description": "IPv6 ifname",
+ "type": "compile",
+ "test": "unix/ipv6ifname"
+ },
+ "libproxy": {
+ "description": "libproxy",
+ "type": "compile",
+ "test": "common/libproxy"
+ },
+ "linuxfb": {
+ "description": "LinuxFB",
+ "type": "compile",
+ "test": "qpa/linuxfb"
+ },
+ "kms": {
+ "description": "KMS",
+ "type": "compile",
+ "test": "qpa/kms"
+ },
+ "mirclient": {
+ "description": "Mir client libraries",
+ "type": "compile",
+ "test": "qpa/mirclient"
+ },
+ "mremap": {
+ "description": "mremap()",
+ "type": "compile",
+ "test": "unix/mremap"
+ },
+ "mtdev": {
+ "description": "mtdev",
+ "type": "compile",
+ "test": "unix/mtdev"
+ },
+ "journald": {
+ "description": "journald",
+ "type": "compile",
+ "test": "unix/journald"
+ },
+ "posix_fallocate": {
+ "description": "POSIX fallocate()",
+ "type": "compile",
+ "test": "unix/posix_fallocate"
+ },
+ "syslog": {
+ "description": "syslog",
+ "type": "compile",
+ "test": "unix/syslog"
+ },
+ "stack_protector": {
+ "description": "stack protection",
+ "type": "compilerSupportsFlag",
+ "test": "-fstack-protector-strong"
+ },
+ "slog2": {
+ "description": "slog2",
+ "type": "compile",
+ "test": "unix/slog2"
+ },
+ "imf": {
+ "description": "IMF",
+ "type": "compile",
+ "test": "unix/qqnx_imf"
+ },
+ "pps": {
+ "description": "PPS",
+ "type": "compile",
+ "test": "unix/pps"
+ },
+ "lgmon": {
+ "description": "lgmon",
+ "type": "compile",
+ "test": "unix/lgmon"
+ },
+ "ipc_sysv": {
+ "description": "SysV IPC",
+ "type": "compile",
+ "test": "unix/ipc_sysv"
+ },
+ "ipc_posix": {
+ "description": "POSIX IPC",
+ "type": "compile",
+ "test": "unix/ipc_posix"
+ },
+ "tslib": {
+ "description": "tslib",
+ "type": "compile",
+ "test": "unix/tslib"
+ },
+ "ppoll": {
+ "description": "ppoll()",
+ "type": "compile",
+ "test": "unix/ppoll"
+ },
+ "pollts": {
+ "description": "pollts()",
+ "type": "compile",
+ "test": "unix/pollts"
+ },
+ "poll": {
+ "description": "poll()",
+ "type": "compile",
+ "test": "unix/poll"
+ },
+ "cloexec": {
+ "description": "O_CLOEXEC",
+ "type": "compile",
+ "test": "unix/cloexec"
+ },
+ "corewlan": {
+ "description": "CoreWLan",
+ "type": "compile",
+ "test": "mac/corewlan"
+ },
+ "openssl": {
+ "description": "OpenSSL",
+ "type": "compile",
+ "test": "unix/openssl"
+ },
+ "openssl-libs": {
+ "description": "OpenSSL Libraries",
+ "type": "openssl",
+ "libs": "-lssl -lcrypto"
+ },
+ "icu": {
+ "description": "ICU",
+ "type": "compile",
+ "test": "unix/icu"
+ },
+ "glib": {
+ "description": "GLib",
+ "type": "compile",
+ "test": "unix/glib",
+ "pkg-config-args": "glib-2.0 gthread-2.0"
+ },
+ "gtk": {
+ "description": "GTK+",
+ "type": "pkgConfig",
+ "pkg-config-args": "gtk+-3.0"
+ },
+ "pulseaudio": {
+ "description": "PulseAudio >= 0.9.10",
+ "type": "compile",
+ "test": "unix/pulseaudio",
+ "pkg-config-args": "libpulse >= 0.9.10 libpulse-mainloop-glib"
+ },
+ "cups": {
+ "description": "CUPS",
+ "type": "compile",
+ "test": "unix/cups"
+ },
+ "libjpeg": {
+ "description": "libjpeg",
+ "type": "compile",
+ "test": "unix/libjpeg"
+ },
+ "libpng": {
+ "description": "libpng",
+ "type": "compile",
+ "test": "unix/libpng"
+ },
+ "zlib": {
+ "description": "zlib",
+ "type": "compile",
+ "test": "unix/zlib"
+ },
+ "posix-iconv": {
+ "description": "POSIX iconv",
+ "type": "compile",
+ "test": "unix/iconv"
+ },
+ "sun-iconv": {
+ "description": "SUN libiconv",
+ "type": "compile",
+ "test": "unix/sun-libiconv"
+ },
+ "gnu-iconv": {
+ "description": "GNU libiconv",
+ "type": "compile",
+ "test": "unix/gnu-libiconv"
+ },
+ "freetype": {
+ "description": "FreeType",
+ "type": "compile",
+ "test": "unix/freetype"
+ },
+ "fontconfig": {
+ "description": "Fontconfig",
+ "type": "compile",
+ "test": "unix/fontconfig",
+ "pkg-config-args": "fontconfig freetype2",
+ "libs": "-lfontconfig -lfreetype"
+ },
+ "harfbuzz": {
+ "description": "HarfBuzz",
+ "type": "compile",
+ "test": "unix/harfbuzz"
+ },
+ "dbus": {
+ "description": "D-Bus >= 1.2",
+ "type": "compile",
+ "test": "unix/dbus",
+ "pkg-config-args": "dbus-1 >= 1.2"
+ },
+ "host-dbus": {
+ "description": "D-Bus >= 1.2 (host)",
+ "type": "pkgConfig",
+ "host": true,
+ "pkg-config-args": "dbus-1 >= 1.2"
+ },
+ "directfb": {
+ "description": "DirectFB",
+ "type": "compile",
+ "test": "qpa/directfb",
+ "pkg-config-args": "directfb"
+ },
+ "egl": {
+ "description": "EGL",
+ "type": "compile",
+ "test": "qpa/egl",
+ "pkg-config-args": "egl"
+ },
+ "egl-x11": {
+ "description": "EGL on X11",
+ "type": "compile",
+ "test": "qpa/egl-x11",
+ "pkg-config-args": "egl"
+ },
+ "eglfs-brcm": {
+ "description": "Broadcom EGL (Rasberry Pi)",
+ "type": "compile",
+ "test": "qpa/eglfs-brcm"
+ },
+ "eglfs-egldevice": {
+ "description": "EGLDevice",
+ "type": "compile",
+ "test": "qpa/eglfs-egldevice"
+ },
+ "eglfs-mali": {
+ "description": "Mali EGL",
+ "type": "compile",
+ "test": "qpa/eglfs-mali"
+ },
+ "eglfs-viv": {
+ "description": "i.Mx6 EGL",
+ "type": "compile",
+ "test": "qpa/eglfs-viv"
+ },
+ "wayland-server": {
+ "description": "Wayland Server",
+ "type": "compile",
+ "test": "qpa/wayland-server"
+ },
+ "libinput": {
+ "description": "libinput",
+ "type": "compile",
+ "test": "unix/libinput",
+ "pkg-config-args": "libinput"
+ },
+ "libudev": {
+ "description": "udev",
+ "type": "compile",
+ "test": "unix/libudev",
+ "pkg-config-args": "libudev"
+ },
+ "xkbcommon": {
+ "description": "xkbcommon",
+ "type": "compile",
+ "test": "unix/xkbcommon",
+ "pkg-config-args": "xkbcommon"
+ },
+ "xkbcommon-x11": {
+ "description": "xkbcommon-x11 >= 0.4.1",
+ "type": "pkgConfig",
+ "pkg-config-args": "xkbcommon xkbcommon-x11 >= 0.4.1"
+ },
+ "xinput2": {
+ "description": "Xinput2",
+ "type": "compile",
+ "test": "x11/xinput2",
+ "pkg-config-args": "xi"
+ },
+ "doubleconversion": {
+ "description": "DoubleConversion",
+ "type": "compile",
+ "test": "unix/doubleconversion"
+ },
+ "xlocalescanprint": {
+ "description": "xlocale.h (or equivalents)",
+ "type": "compile",
+ "test": "common/xlocalescanprint"
+ },
+ "pcre": {
+ "description": "PCRE",
+ "type": "compile",
+ "test": "unix/pcre"
+ },
+ "gstreamer-1_0": {
+ "description": "GStreamer 1.0",
+ "type": "compile",
+ "test": "unix/gstreamer",
+ "args": "-config gst-1.0"
+ },
+ "gstreamer-0_10": {
+ "description": "GStreamer 0.10",
+ "type": "compile",
+ "test": "unix/gstreamer",
+ "args": "-config gst-0.10"
+ },
+ "xcb": {
+ "description": "XCB >= 1.5 (core)",
+ "type": "compile",
+ "test": "qpa/xcb",
+ "pkg-config-args": "xcb >= 1.5"
+ },
+ "xcb-syslibs": {
+ "description": "XCB (secondary)",
+ "type": "compile",
+ "test": "qpa/xcb-syslibs",
+ "pkg-config-args": "xcb xcb-shm xcb-sync xcb-xfixes xcb-randr xcb-image xcb-keysyms xcb-icccm xcb-shape"
+ },
+ "xcb-xkb": {
+ "description": "XCB XKB >= 1.10",
+ "type": "compile",
+ "test": "qpa/xcb-xkb",
+ "pkg-config-args": "xcb-xkb >= 1.10"
+ },
+ "xcb-render": {
+ "description": "XCB XRender",
+ "type": "compile",
+ "test": "qpa/xcb-render",
+ "pkg-config-args": "xcb"
+ },
+ "xcb-glx": {
+ "description": "XCB GLX",
+ "type": "compile",
+ "test": "qpa/xcb-glx",
+ "pkg-config-args": "xcb"
+ },
+ "xcb-xlib": {
+ "description": "XCB Xlib",
+ "type": "compile",
+ "test": "qpa/xcb-xlib",
+ "pkg-config-args": "xcb"
+ },
+ "x11-sm": {
+ "description": "X11 session management",
+ "type": "pkgConfig",
+ "pkg-config-args": "sm ice"
+ },
+ "xlib": {
+ "description": "XLib",
+ "type": "compile",
+ "test": "x11/xlib"
+ },
+ "xrender": {
+ "description": "XRender",
+ "type": "compile",
+ "test": "x11/xrender"
+ },
+ "x11prefix": {
+ "description": "X11 prefix",
+ "type": "getPkgConfigVariable",
+ "pkg-config-args": "x11",
+ "pkg-config-variable": "prefix",
+ "value": "/usr",
+ "log": "value"
+ },
+ "xkbconfigroot": {
+ "description": "XKB config root",
+ "type": "xkbConfigRoot",
+ "pkg-config-args": "xkeyboard-config",
+ "pkg-config-variable": "xkb_base",
+ "log": "value"
+ },
+ "opengl-desktop": {
+ "description": "Desktop OpenGL",
+ "type": "compile",
+ "test": "unix/opengldesktop",
+ "pkg-config-args": "gl"
+ },
+ "opengl-mingw": {
+ "description": "Desktop OpenGL",
+ "type": "compile",
+ "test": "x11/opengl"
+ },
+ "opengles2": {
+ "description": "OpenGL ES 2.0",
+ "type": "compile",
+ "test": "unix/opengles2",
+ "pkg-config-args": "glesv2"
+ },
+ "opengles3": {
+ "description": "OpenGL ES 3.0",
+ "type": "compile",
+ "test": "unix/opengles3",
+ "pkg-config-args": "glesv2"
+ },
+ "opengles31": {
+ "description": "OpenGL ES 3.1",
+ "type": "compile",
+ "test": "unix/opengles31",
+ "pkg-config-args": "glesv2"
+ },
+ "db2": {
+ "description": "DB2 (IBM)",
+ "type": "compile",
+ "test": "unix/db2"
+ },
+ "ibase": {
+ "description": "InterBase",
+ "type": "compile",
+ "test": "unix/ibase"
+ },
+ "mysql": {
+ "description": "MySQL",
+ "type": "mysqlCompile",
+ "test": "unix/mysql",
+ "query": "--libs"
+ },
+ "mysql_r": {
+ "description": "MySQL (threadsafe)",
+ "type": "mysqlCompile",
+ "test": "unix/mysql_r",
+ "query": "--libs_r"
+ },
+ "oci": {
+ "description": "OCI (Oracle)",
+ "type": "compile",
+ "test": "unix/oci"
+ },
+ "odbc": {
+ "description": "ODBC",
+ "type": "compile",
+ "test": "unix/odbc",
+ "libs": "-lodbc"
+ },
+ "iodbc": {
+ "description": "iODBC",
+ "type": "compile",
+ "test": "unix/iodbc",
+ "libs": "-liodbc"
+ },
+ "psql": {
+ "description": "PostgreSQL",
+ "type": "psqlCompile",
+ "test": "unix/psql"
+ },
+ "sqlite2": {
+ "description": "SQLite (version 2)",
+ "type": "compile",
+ "test": "unix/sqlite2"
+ },
+ "sqlite": {
+ "description": "SQLite (version 3)",
+ "type": "compile",
+ "test": "unix/sqlite",
+ "pkg-config-args": "sqlite3",
+ "libs": "-lsqlite3 -lz"
+ },
+ "tds": {
+ "description": "TDS (Sybase)",
+ "type": "tdsCompile",
+ "test": "unix/tds"
+ },
+ "directwrite2": {
+ "description": "DirectWrite 2",
+ "type": "compile",
+ "test": "win/directwrite2"
+ },
+ "qpa_default_platform": {
+ "description": "default QPA platform",
+ "type": "qpaDefaultPlatform",
+ "log": "value"
+ }
+ },
+
+ "features": {
+ "verbose": {
+ "description": "Verbose configure output",
+ "autoDetect": false,
+ "output": [ "verbose" ],
+ "priority": -3
+ },
+
+ "shared": {
+ "description": "Building shared libraries",
+ "condition": "!config.ios && !config.integrity",
+ "output": [
+ "shared",
+ "publicQtConfig",
+ "publicConfig",
+ { "type": "publicQtConfig", "negative": true, "name": "static" },
+ { "type": "publicConfig", "negative": true, "name": "static" }
+ ],
+ "priority": -2
+ },
+ "cross_compile": {
+ "description": "Cross compiling",
+ "condition": "call.crossCompile",
+ "output": [ "publicConfig", "privateConfig" ]
+ },
+ "compiler-flags": {
+ "output": [ "compilerFlags" ],
+ "priority": -2
+ },
+ "gcc-sysroot": {
+ "output": [ "gccSysroot" ],
+ "condition": "input.sysroot != ''",
+ "priority": -2
+ },
+ "pkg-config": {
+ "description": "Using pkg-config",
+ "autoDetect": "!config.darwin",
+ "condition": "tests.pkg-config",
+ "output": [
+ { "type": "publicQtConfig", "negative": true },
+ "pkgConfig"
+ ],
+ "priority": -1
+ },
+ "use_gold_linker": {
+ "description": "Using gold linker",
+ "condition": "tests.use_gold_linker",
+ "output": [ "privateConfig", "useGoldLinker" ],
+ "priority": -1
+ },
+
+ "developer-build": {
+ "description": "Developer build",
+ "autoDetect": false,
+ "output": [
+ { "type": "define", "name": "QT_BUILD_INTERNAL" },
+ { "type": "publicQtConfig", "name": "private_tests" }
+ ]
+ },
+ "debug": {
+ "description": "Build for debugging",
+ "autoDetect": "features.developer-build || config.win32 || config.darwin"
+ },
+ "debug_and_release": {
+ "description": "Compile libs in debug and release mode",
+ "autoDetect": "input.debug == ''",
+ "condition": "config.darwin || config.win32",
+ "output": [ "publicQtConfig", "debugAndRelease" ]
+ },
+ "force_debug_info": {
+ "description": "Add debug info in release mode",
+ "autoDetect": false,
+ "output": [ "privateConfig" ]
+ },
+ "separate_debug_info": {
+ "description": "Split off debug information",
+ "autoDetect": false,
+ "condition": [
+ "features.shared",
+ "features.debug || features.debug_and_release || features.force_debug_info",
+ "config.darwin || tests.separate_debug_info"
+ ],
+ "output": [ "publicQtConfig" ]
+ },
+ "release_tools": {
+ "description": "Compile tools in release mode",
+ "output": [ "publicQtConfig" ]
+ },
+ "simulator_and_device": {
+ "description": "Build for both simulator and device",
+ "condition": "config.ios && input.sdk != ''",
+ "output": [ "publicQtConfig" ]
+ },
+ "build_all": {
+ "condition": "features.debug_and_release || features.simulator_and_device",
+ "output": [ "publicQtConfig" ]
+ },
+ "rpath": {
+ "description": "Build with RPATH",
+ "condition": [
+ "!config.ios && !config.win32",
+ "var.QMAKE_LFLAGS_RPATH != ''"
+ ],
+ "output": [ "publicQtConfig" ]
+ },
+ "rpath_dir": {
+ "description": "RPATH directory",
+ "enable": "input.rpaths != ''",
+ "autoDetect": false,
+ "condition": [
+ "!config.ios && !config.win32",
+ "var.QMAKE_LFLAGS_RPATH != ''"
+ ],
+ "output": [ { "type": "varAppend", "name": "EXTRA_RPATHS", "value": "input.rpaths" } ]
+ },
+ "rtti": {
+ "description": "Build with RTTI",
+ "comment": "mkspecs/features/win32/default_pre.prf sets no-rtti. Follow default behavior of configure.exe by overriding with rtti.",
+ "condition": "config.win32",
+ "output": [ "publicConfig" ]
+ },
+ "force_asserts": {
+ "description": "Force assertions",
+ "autoDetect": false,
+ "output": [ "publicQtConfig" ]
+ },
+ "warnings_are_errors": {
+ "description": "WError",
+ "autoDetect": "features.developer-build",
+ "output": [ "privateConfig" ]
+ },
+ "headersclean": {
+ "description": "Check for clean headers",
+ "autoDetect": "features.developer-build",
+ "output": [ "privateConfig" ]
+ },
+ "framework": {
+ "description": "Build Apple Frameworks",
+ "condition": "config.darwin && features.shared",
+ "output": [
+ "publicQtConfig",
+ "publicConfig",
+ { "type": "define", "name": "QT_MAC_FRAMEWORK_BUILD" },
+ { "type": "publicConfig", "negative": true, "name": "qt_no_framework"}
+ ]
+ },
+ "largefile": {
+ "description": "Large file support",
+ "emitIf": "!config.win32",
+ "condition": "!config.android && !config.integrity",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_LARGEFILE_SUPPORT", "value": 64 }
+ ]
+ },
+ "testcocoon": {
+ "description": "Testcocoon support",
+ "autoDetect": false,
+ "output": [ "publicConfig" ]
+ },
+ "gcov": {
+ "description": "gcov support",
+ "autoDetect": false,
+ "output": [ "publicConfig" ]
+ },
+ "silent": {
+ "description": "Silent build",
+ "autoDetect": false,
+ "output": [ "privateConfig" ]
+ },
+ "sanitize_address": {
+ "description": "Addresses",
+ "autoDetect": false,
+ "output": [ "publicConfig" ]
+ },
+ "sanitize_thread": {
+ "description": "Threads",
+ "autoDetect": false,
+ "output": [ "publicConfig" ]
+ },
+ "sanitize_memory": {
+ "description": "Memory",
+ "autoDetect": false,
+ "output": [ "publicConfig" ]
+ },
+ "sanitize_undefined": {
+ "description": "Undefined",
+ "autoDetect": false,
+ "output": [ "publicConfig" ]
+ },
+ "sanitizer": {
+ "description": "Sanitizers",
+ "condition": "features.sanitize_address || features.sanitize_thread || features.sanitize_memory || features.sanitize_undefined",
+ "output": [ "publicConfig" ]
+ },
+ "GNUmake": {
+ "description": "GNU make",
+ "autoDetect": false,
+ "condition": "tests.GNUmake",
+ "output": [ "privateConfig" ]
+ },
+ "profile": {
+ "description": "GNU profiling support",
+ "autoDetect": false,
+ "output": [
+ { "type": "varAppend", "name": "QMAKE_CFLAGS", "value": "'-pg'" },
+ { "type": "varAppend", "name": "QMAKE_CXXFLAGS", "value": "'-pg'" },
+ { "type": "varAppend", "name": "QMAKE_LFLAGS", "value": "'-pg'" }
+ ]
+ },
+ "strip": {
+ "description": "Strip binaries",
+ "condition": "!features.profile",
+ "output": [ { "type": "privateConfig", "negative": true, "name": "nostrip" } ]
+ },
+ "stl": {
+ "description": "STL compatibility",
+ "condition": "tests.stl",
+ "output": [ "publicQtConfig" ]
+ },
+ "c++11": {
+ "description": "C++11 support",
+ "condition": "tests.c++11",
+ "output": [ "publicQtConfig" ]
+ },
+ "c++14": {
+ "description": "C++14 support",
+ "condition": "features.c++11 && tests.c++14",
+ "output": [ "publicQtConfig" ]
+ },
+ "c++1z": {
+ "description": "C++1z support",
+ "condition": "features.c++14 && tests.c++1z",
+ "output": [ "publicQtConfig" ]
+ },
+ "compiler": {
+ "description": "Compiler version",
+ "condition": "tests.compiler",
+ "output": [ "compilerVersion" ]
+ },
+ "precompile_header": {
+ "description": "Using precompiled headers",
+ "condition": "!config.ios && tests.precompile_header",
+ "output": [
+ "privateConfig",
+ { "type": "varRemove", "negative": true, "name": "CONFIG", "value": "'precompile_header'" }
+ ]
+ },
+ "ltcg": {
+ "description": "Using LTCG",
+ "autoDetect": false,
+ "output": [ "privateConfig" ]
+ },
+ "enable_new_dtags": {
+ "description": "Using new DTAGS",
+ "condition": "tests.enable_new_dtags",
+ "output": [ "privateConfig" ]
+ },
+ "reduce_exports": {
+ "description": "Reduce amount of exported symbols",
+ "condition": "!config.win32 && tests.reduce_exports",
+ "output": [
+ "publicQtConfig",
+ { "type": "define", "name": "QT_VISIBILITY_AVAILABLE" }
+ ]
+ },
+ "reduce_relocations": {
+ "description": "Reduce amount of relocations",
+ "condition": "tests.reduce_relocations",
+ "output": [
+ "publicQtConfig",
+ { "type": "define", "name": "QT_REDUCE_RELOCATIONS" }
+ ]
+ },
+ "dlopen": {
+ "description": "dlopen()",
+ "condition": "tests.dlopen || tests.libdl",
+ "output": [ { "type": "define", "negative": true, "name": "QT_NO_DYNAMIC_LIBRARY" } ]
+ },
+ "libdl": {
+ "description": "dlopen() in libdl",
+ "condition": "!tests.dlopen && tests.libdl",
+ "output": [ { "type": "privateConfig", "negative": true } ]
+ },
+ "std-atomic64": {
+ "description": "64 bit atomic operations",
+ "condition": "tests.atomic64 || tests.atomic64_libatomic",
+ "output": [
+ { "type": "define", "negative": true, "name": "QT_NO_STD_ATOMIC64" },
+ { "type": "privateConfig", "name": "atomic64-libatomic",
+ "condition": "!tests.atomic64 && tests.atomic64_libatomic" }
+ ]
+ },
+ "sse2": {
+ "description": "Use SSE2 instructions",
+ "condition": "(arch.i386 || arch.x86_64) && tests.sse2",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_SSE2", "value": 1 }
+ ]
+ },
+ "sse3": {
+ "description": "Support for SSE3 instructions",
+ "condition": "features.sse2 && tests.sse3",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_SSE3", "value": 1 }
+ ]
+ },
+ "ssse3": {
+ "description": "Support for SSSE3 instructions",
+ "condition": "features.sse3 && tests.ssse3",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_SSSE3", "value": 1 }
+ ]
+ },
+ "sse4_1": {
+ "description": "Support for SSE4.1 instructions",
+ "condition": "features.ssse3 && tests.sse4_1",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_SSE4_1", "value": 1 }
+ ]
+ },
+ "sse4_2": {
+ "description": "Support for SSE4.2 instructions",
+ "condition": "features.sse4_1 && tests.sse4_2",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_SSE4_2", "value": 1 }
+ ]
+ },
+ "avx": {
+ "description": "Support for AVX instructions",
+ "condition": "features.sse4_2 && tests.avx && tests.avx_apple_clang",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_AVX", "value": 1 }
+ ]
+ },
+ "avx2": {
+ "description": "Support for AVX2 instructions",
+ "condition": "features.avx && tests.avx2",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_AVX2", "value": 1 }
+ ]
+ },
+ "avx512f": {
+ "description": "Support for AVX 512F instructions",
+ "condition": "features.avx2 && tests.avx512f",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_AVX512F", "value": 1 }
+ ]
+ },
+ "avx512er": {
+ "description": "Support for AVX 512ER instructions",
+ "condition": "features.avx512f && tests.avx512er",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_AVX512ER", "value": 1 }
+ ]
+ },
+ "avx512cd": {
+ "description": "Support for AVX 512CD instructions",
+ "condition": "features.avx512f && tests.avx512cd",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_AVX512CD", "value": 1 }
+ ]
+ },
+ "avx512pf": {
+ "description": "Support for AVX 512PF instructions",
+ "condition": "features.avx512f && tests.avx512pf",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_AVX512PF", "value": 1 }
+ ]
+ },
+ "avx512dq": {
+ "description": "Support for AVX 512DQ instructions",
+ "condition": "features.avx512f && tests.avx512dq",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_AVX512DQ", "value": 1 }
+ ]
+ },
+ "avx512bw": {
+ "description": "Support for AVX 512BW instructions",
+ "condition": "features.avx512f && tests.avx512bw",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_AVX512BW", "value": 1 }
+ ]
+ },
+ "avx512vl": {
+ "description": "Support for AVX 512VL instructions",
+ "condition": "features.avx512f && tests.avx512vl",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_AVX512VL", "value": 1 }
+ ]
+ },
+ "avx512ifma": {
+ "description": "Support for AVX 512IFMA instructions",
+ "condition": "features.avx512f && tests.avx512ifma",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_AVX512IFMA", "value": 1 }
+ ]
+ },
+ "avx512vbmi": {
+ "description": "Support for AVX 512VBMI instructions",
+ "condition": "features.avx512f && tests.avx512vbmi",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_AVX512VBMI", "value": 1 }
+ ]
+ },
+ "mips_dsp": {
+ "description": "Support for MIPS DSP instructions",
+ "condition": "arch.mips && tests.mips_dsp",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_MIPS_DSP", "value": 1 }
+ ]
+ },
+ "mips_dspr2": {
+ "description": "Support for MIPS DSPr2 instructions",
+ "condition": "arch.mips && tests.mips_dspr2",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_MIPS_DSPR2", "value": 1 }
+ ]
+ },
+ "neon": {
+ "description": "Support for NEON instructions",
+ "condition": "(arch.arm || arch.arm64) && tests.neon",
+ "output": [
+ "privateConfig",
+ { "type": "define", "name": "QT_COMPILER_SUPPORTS_NEON", "value": 1 }
+ ]
+ },
+ "clock-gettime": {
+ "description": "clock_gettime()",
+ "condition": "tests.clock-gettime",
+ "output": [ "publicQtConfig" ]
+ },
+ "clock-monotonic": {
+ "description": "POSIX monotonic clock",
+ "condition": "features.clock-gettime && tests.clock-monotonic",
+ "output": [ "feature" ]
+ },
+ "alsa": {
+ "description": "ALSA",
+ "condition": "tests.alsa",
+ "output": [ "feature" ]
+ },
+ "evdev": {
+ "description": "evdev",
+ "condition": "tests.evdev",
+ "output": [ "privateFeature" ]
+ },
+ "eventfd": {
+ "description": "eventfd",
+ "condition": "tests.eventfd",
+ "output": [ "feature" ]
+ },
+ "gbm": {
+ "description": "GBM",
+ "condition": "tests.gbm",
+ "output": [ "publicQtConfig" ]
+ },
+ "getaddrinfo": {
+ "description": "getaddrinfo()",
+ "condition": "tests.getaddrinfo",
+ "output": [ "feature" ]
+ },
+ "getifaddrs": {
+ "description": "getifaddrs()",
+ "condition": "tests.getifaddrs",
+ "output": [ "feature" ]
+ },
+ "inotify": {
+ "description": "inotify",
+ "condition": "tests.inotify",
+ "output": [ "feature" ]
+ },
+ "ipv6ifname": {
+ "description": "IPv6 ifname",
+ "condition": "tests.ipv6ifname",
+ "output": [ "feature" ]
+ },
+ "libproxy": {
+ "description": "libproxy",
+ "autoDetect": false,
+ "condition": "tests.libproxy",
+ "output": [ "feature" ]
+ },
+ "linuxfb": {
+ "description": "LinuxFB",
+ "condition": "tests.linuxfb",
+ "output": [ "publicQtConfig" ]
+ },
+ "directfb": {
+ "description": "DirectFB",
+ "autoDetect": false,
+ "condition": "tests.directfb",
+ "output": [
+ "publicQtConfig",
+ { "type": "library", "test": "directfb" }
+ ]
+ },
+ "integrityfb": {
+ "description": "INTEGRITY framebuffer",
+ "condition": "config.integrity",
+ "output": [ "publicQtConfig" ]
+ },
+ "kms": {
+ "description": "KMS",
+ "condition": "tests.kms",
+ "output": [ "publicQtConfig" ]
+ },
+ "mirclient": {
+ "description": "Mir client",
+ "condition": "tests.mirclient",
+ "output": [ "publicQtConfig" ]
+ },
+ "mremap": {
+ "description": "mremap()",
+ "condition": "tests.mremap",
+ "output": [ "feature" ]
+ },
+ "mtdev": {
+ "description": "mtdev",
+ "condition": "tests.mtdev",
+ "output": [ "privateFeature" ]
+ },
+ "journald": {
+ "description": "journald",
+ "autoDetect": false,
+ "condition": "tests.journald",
+ "output": [ "privateConfig" ]
+ },
+ "posix_fallocate": {
+ "description": "POSIX fallocate()",
+ "condition": "tests.posix_fallocate",
+ "output": [ "feature" ]
+ },
+ "syslog": {
+ "description": "syslog",
+ "autoDetect": false,
+ "condition": "tests.syslog",
+ "output": [ "privateConfig" ]
+ },
+ "stack_protector_strong": {
+ "description": "stack protection",
+ "condition": "config.qnx && tests.stack_protector",
+ "output": [ "publicQtConfig" ]
+ },
+ "slog2": {
+ "description": "slog2",
+ "condition": "tests.slog2",
+ "emitIf": "config.qnx",
+ "output": [ "privateConfig" ]
+ },
+ "qqnx_imf": {
+ "description": "IMF",
+ "emitIf": "config.qnx",
+ "condition": "tests.imf",
+ "output": [ "privateConfig" ]
+ },
+ "qqnx_pps": {
+ "description": "PPS",
+ "emitIf": "config.qnx",
+ "condition": "tests.pps",
+ "output": [ "privateConfig" ]
+ },
+ "lgmon": {
+ "description": "lgmon",
+ "emitIf": "config.qnx",
+ "condition": "tests.lgmon",
+ "output": [ "privateConfig" ]
+ },
+ "poll_ppoll": {
+ "description": "Native ppoll()",
+ "condition": "tests.ppoll",
+ "output": [ "publicQtConfig" ]
+ },
+ "poll_pollts": {
+ "description": "Native pollts()",
+ "condition": "!features.poll_ppoll && tests.pollts",
+ "output": [ "publicQtConfig" ]
+ },
+ "poll_poll": {
+ "description": "Native poll()",
+ "condition": "!features.poll_ppoll && !features.poll_pollts && tests.poll",
+ "output": [ "publicQtConfig" ]
+ },
+ "poll_select": {
+ "description": "Emulated poll()",
+ "condition": "!features.poll_ppoll && !features.poll_pollts && !features.poll_poll",
+ "output": [
+ "publicQtConfig",
+ { "type": "define", "name": "QT_NO_NATIVE_POLL" }
+ ]
+ },
+ "ipc_posix": {
+ "description": "Using POSIX IPC",
+ "condition": "!tests.ipc_sysv && tests.ipc_posix",
+ "output": [ { "type": "define", "name": "QT_POSIX_IPC" } ]
+ },
+ "systemsemaphore": {
+ "description": "Enable QSystemSemaphore",
+ "condition": "config.android || config.win32 || tests.ipc_sysv || tests.ipc_posix",
+ "output": [ { "type": "define", "negative": true, "name": "QT_NO_SYSTEMSEMAPHORE" } ]
+ },
+ "sharedmemory": {
+ "description": "Enable QSharedMemory",
+ "condition": "config.android || config.win32 || tests.ipc_sysv || tests.ipc_posix",
+ "output": [ { "type": "define", "negative": true, "name": "QT_NO_SHAREDMEMORY" } ]
+ },
+ "threadsafe-cloexec": {
+ "description": "Threadsafe pipe creation",
+ "condition": "tests.cloexec",
+ "output": [
+ "publicQtConfig",
+ { "type": "define", "name": "QT_THREADSAFE_CLOEXEC", "value": 1 }
+ ]
+ },
+ "tslib": {
+ "description": "tslib",
+ "condition": "tests.tslib",
+ "output": [ "privateFeature" ]
+ },
+ "corewlan": {
+ "description": "CoreWLan",
+ "condition": "tests.corewlan",
+ "emitIf": "config.darwin",
+ "output": [ "feature" ]
+ },
+ "securetransport": {
+ "description": "SecureTransport",
+ "condition": "config.darwin && (input.openssl == '' || input.openssl == 'no')",
+ "output": [
+ "publicQtConfig",
+ { "type": "define", "name": "QT_SECURETRANSPORT" }
+ ]
+ },
+ "openssl": {
+ "description": "OpenSSL",
+ "condition": "!features.securetransport && tests.openssl",
+ "output": [
+ { "type": "publicQtConfig", "condition": "!features.openssl-linked" },
+ { "type": "define", "negative": true, "name": "QT_NO_OPENSSL" }
+ ]
+ },
+ "openssl-linked": {
+ "description": " Qt directly linked to OpenSSL",
+ "enable": "input.openssl == 'linked'",
+ "disable": "input.openssl != 'linked'",
+ "condition": "features.openssl && tests.openssl-libs",
+ "output": [
+ "publicQtConfig",
+ { "type": "varAssign", "name": "OPENSSL_LIBS", "value": "tests.openssl-libs.libs" },
+ { "type": "define", "name": "QT_LINKED_OPENSSL" }
+ ]
+ },
+ "ssl": {
+ "description": "SSL",
+ "condition": "features.securetransport || features.openssl",
+ "output": [ "feature" ]
+ },
+ "accessibility": {
+ "description": "Accessibility",
+ "output": [ "feature" ]
+ },
+ "accessibility-atspi-bridge": {
+ "description": "ATSPI Bridge",
+ "emitIf": "features.accessibility && features.xcb",
+ "condition": "features.dbus",
+ "output": [ "feature" ]
+ },
+ "glib": {
+ "description": "GLib",
+ "condition": "tests.glib",
+ "output": [
+ "feature",
+ { "type": "library", "test": "glib" }
+ ]
+ },
+ "gtk3": {
+ "description": "GTK+",
+ "autoDetect": "!config.darwin",
+ "condition": "features.glib && tests.gtk",
+ "output": [
+ "publicQtConfig",
+ { "type": "library", "test": "gtk" }
+ ]
+ },
+ "icu": {
+ "description": "ICU",
+ "autoDetect": "!config.win32",
+ "condition": "tests.icu",
+ "output": [ "publicQtConfig" ]
+ },
+ "pulseaudio": {
+ "description": "PulseAudio",
+ "condition": "tests.pulseaudio",
+ "output": [
+ "feature",
+ { "type": "library", "test": "pulseaudio" }
+ ]
+ },
+ "cups": {
+ "description": "CUPS",
+ "condition": "tests.cups",
+ "output": [ "feature" ]
+ },
+ "jpeg": {
+ "description": "JPEG",
+ "disable": "input.libjpeg == 'no'",
+ "output": [
+ "publicQtConfig",
+ { "type": "define", "negative": true, "name": "QT_NO_IMAGEFORMAT_JPEG" }
+ ]
+ },
+ "system-jpeg": {
+ "description": " Using system libjpeg",
+ "disable": "input.libjpeg == 'qt'",
+ "enable": "input.libjpeg == 'system'",
+ "condition": "features.jpeg && tests.libjpeg",
+ "output": [ "publicQtConfig" ]
+ },
+ "gif": {
+ "description": "GIF",
+ "output": [
+ "publicQtConfig",
+ { "type": "define", "negative": true, "name": "QT_NO_IMAGEFORMAT_GIF" }
+ ]
+ },
+ "png": {
+ "description": "PNG",
+ "disable": "input.libpng == 'no'",
+ "output": [
+ "publicQtConfig",
+ { "type": "define", "negative": true, "name": "QT_NO_IMAGEFORMAT_PNG" }
+ ]
+ },
+ "system-png": {
+ "description": " Using system libpng",
+ "disable": "input.libpng == 'qt'",
+ "enable": "input.libpng == 'system'",
+ "condition": "features.png && tests.libpng",
+ "output": [ "publicQtConfig" ]
+ },
+ "system-zlib": {
+ "description": "Using system zlib",
+ "condition": "config.darwin || tests.zlib",
+ "output": [ "publicQtConfig" ]
+ },
+ "iconv": {
+ "description": "iconv",
+ "condition": "!config.win32 && (tests.posix-iconv || features.sun-libiconv || features.gnu-libiconv)",
+ "output": [ "feature" ]
+ },
+ "sun-libiconv": {
+ "description": "SUN iconv",
+ "condition": "!config.win32 && !tests.posix-iconv && tests.sun-iconv",
+ "output": [ "publicQtConfig" ]
+ },
+ "gnu-libiconv": {
+ "description": "GNU iconv",
+ "condition": "!config.win32 && !tests.posix-iconv && !tests.sun-iconv && tests.gnu-iconv",
+ "output": [ "publicQtConfig" ]
+ },
+ "freetype": {
+ "description": "FreeType",
+ "output": [ "feature" ]
+ },
+ "system-freetype": {
+ "description": " Using system FreeType",
+ "enable": "input.freetype == 'system'",
+ "disable": "input.freetype == 'qt'",
+ "autoDetect": "!config.win32",
+ "condition": "features.freetype && tests.freetype",
+ "output": [ "publicQtConfig" ]
+ },
+ "fontconfig": {
+ "description": "Fontconfig",
+ "condition": "features.system-freetype && tests.fontconfig",
+ "output": [
+ "feature",
+ { "type": "library", "test": "fontconfig" }
+ ]
+ },
+ "harfbuzz": {
+ "description": "HarfBuzz",
+ "output": [ "feature" ]
+ },
+ "system-harfbuzz": {
+ "description": " Using system HarfBuzz",
+ "enable": "input.harfbuzz == 'system'",
+ "disable": "input.harfbuzz == 'qt'",
+ "autoDetect": "!config.darwin",
+ "condition": "features.harfbuzz && tests.harfbuzz",
+ "output": [ "publicQtConfig" ]
+ },
+ "concurrent": {
+ "description": "Qt Concurrent",
+ "output": [ "feature" ]
+ },
+ "dbus": {
+ "description": "Qt D-Bus",
+ "autoDetect": "!config.android",
+ "output": [ "feature" ]
+ },
+ "dbus-linked": {
+ "description": "Qt D-Bus directly linked to libdbus",
+ "enable": "input.dbus == 'linked'",
+ "disable": "input.dbus == 'runtime' || input.dbus == 'no'",
+ "autoDetect": "!config.android",
+ "condition": "tests.dbus",
+ "output": [
+ "publicQtConfig",
+ { "type": "library", "feature": "dbus", "test": "dbus" }
+ ]
+ },
+ "host-dbus": {
+ "description": "Qt D-Bus (Host)",
+ "autoDetect": "!config.android",
+ "condition": "tests.host-dbus",
+ "output": [ { "type": "varAppend", "name": "QT_HOST_CFLAGS_DBUS", "value": "tests.host-dbus.cflags" } ]
+ },
+ "skip_modules": {
+ "output": [ { "type": "varAssign", "name": "QT_SKIP_MODULES", "value": "input.skip_modules" } ]
+ },
+ "qt_build_parts": {
+ "description": "Qt build parts",
+ "output": [ { "type": "varAppend", "name": "QT_BUILD_PARTS", "value": "input.qt_build_parts" } ]
+ },
+ "qreal": {
+ "description": "Type for qreal",
+ "output": [ "qreal" ]
+ },
+ "gui": {
+ "description": "Qt Gui",
+ "output": [ { "type": "publicQtConfig", "negative": true } ]
+ },
+ "widgets": {
+ "description": "Qt Widgets",
+ "condition": "features.gui && !config.tvos",
+ "output": [
+ { "type": "define", "negative": true, "name": "QT_NO_WIDGETS" },
+ { "type": "publicQtConfig", "negative": true }
+ ]
+ },
+ "system-proxies": {
+ "description": "Use system proxies",
+ "output": [ "publicQtConfig" ]
+ },
+ "egl": {
+ "description": "EGL",
+ "condition": "features.opengl && tests.egl",
+ "output": [
+ "feature",
+ { "type": "library", "test": "egl" }
+ ]
+ },
+ "egl_x11": {
+ "description": "EGL on X11",
+ "condition": "features.egl && tests.egl-x11",
+ "output": [ "feature" ]
+ },
+ "eglfs": {
+ "description": "EGLFS",
+ "autoDetect": "!config.android",
+ "condition": "features.egl",
+ "output": [ "feature" ]
+ },
+ "eglfs-brcm": {
+ "description": "EGLFS Rasberry Pi",
+ "condition": "features.eglfs && tests.eglfs-brcm",
+ "output": [ "publicQtConfig" ]
+ },
+ "eglfs-egldevice": {
+ "description": "EGLFS EGLDevice",
+ "condition": "features.eglfs && tests.eglfs-egldevice",
+ "output": [ "publicQtConfig" ]
+ },
+ "eglfs-gbm": {
+ "description": "EGLFS GBM",
+ "condition": "features.eglfs && features.gbm && features.kms",
+ "output": [ "publicQtConfig" ]
+ },
+ "eglfs-mali": {
+ "description": "EGLFS Mali",
+ "condition": "features.eglfs && tests.eglfs-mali",
+ "output": [ "publicQtConfig" ]
+ },
+ "eglfs-viv": {
+ "description": "EGLFS i.Mx6",
+ "condition": "features.eglfs && tests.eglfs-viv",
+ "output": [ "publicQtConfig" ]
+ },
+ "eglfs-viv-wl": {
+ "description": "EGLFS i.Mx6 Wayland",
+ "condition": "features.eglfs-viv && tests.wayland-server",
+ "output": [ "publicQtConfig" ]
+ },
+ "libudev": {
+ "description": "udev",
+ "condition": "tests.libudev",
+ "output": [
+ "privateFeature",
+ { "type": "library", "test": "libudev" }
+ ]
+ },
+ "libinput": {
+ "description": "libinput",
+ "condition": "features.libudev && tests.libinput",
+ "output": [
+ "privateFeature",
+ { "type": "library", "test": "libinput" }
+ ]
+ },
+ "xkbcommon-evdev": {
+ "description": "xkbcommon-evdev",
+ "condition": "tests.xkbcommon",
+ "output": [
+ "publicQtConfig",
+ { "type": "library", "test": "xkbcommon" }
+ ]
+ },
+ "xkbcommon-system": {
+ "description": "Using system-provided xkbcommon",
+ "emitIf": "features.xcb",
+ "condition": "tests.xkbcommon-x11",
+ "disable": "input.xkbcommon == 'qt'",
+ "output": [
+ { "type": "publicQtConfig", "negative": true, "name": "xkbcommon-qt" },
+ { "type": "library", "name": "xkbcommon", "test": "xkbcommon-x11" }
+ ]
+ },
+ "xkb-config-root": {
+ "description": "XKB config root",
+ "emitIf": "features.xcb",
+ "condition": "features.xcb && !features.xkbcommon-system && tests.xkbconfigroot",
+ "output": [ { "type": "varAssign", "name": "QMAKE_XKB_CONFIG_ROOT", "value": "tests.xkbconfigroot.value"} ]
+ },
+ "xinput2": {
+ "description": "Xinput2",
+ "condition": "tests.xinput2",
+ "output": [
+ "publicQtConfig",
+ { "type": "library", "test": "xinput2" }
+ ]
+ },
+ "doubleconversion": {
+ "description": "DoubleConversion",
+ "output": [ "feature" ]
+ },
+ "system-doubleconversion": {
+ "description": " Using system DoubleConversion",
+ "enable": "input.doubleconversion == 'system'",
+ "disable": "input.doubleconversion == 'qt'",
+ "condition": "features.doubleconversion && tests.doubleconversion",
+ "output": [ "publicQtConfig" ]
+ },
+ "system-pcre": {
+ "description": "Using system PCRE",
+ "disable": "input.pcre == 'qt'",
+ "enable": "input.pcre == 'system'",
+ "condition": "tests.pcre",
+ "output": [ { "type": "privateConfig", "negative": true, "name": "pcre" } ]
+ },
+ "gstreamer-1_0": {
+ "description": "GStreamer 1.0",
+ "disable": "input.gstreamer == '0.10' || input.gstreamer == 'no'",
+ "enable": "input.gstreamer == '1.0'",
+ "condition": "tests.gstreamer-1_0",
+ "output": [ { "type": "publicQtConfig", "name": "gstreamer-1.0" } ]
+ },
+ "gstreamer-0_10": {
+ "description": "GStreamer 0.10",
+ "disable": "input.gstreamer == 'no'",
+ "enable": "input.gstreamer == '0.10'",
+ "condition": "!features.gstreamer-1_0 && tests.gstreamer-0_10",
+ "output": [ { "type": "publicQtConfig", "name": "gstreamer-0.10" } ]
+ },
+ "xcb": {
+ "description": "XCB",
+ "autoDetect": "!config.darwin",
+ "condition": "tests.xcb",
+ "output": [
+ "publicQtConfig",
+ { "type": "publicQtConfig", "name": "xcb-qt", "condition": "!features.system-xcb" },
+ { "type": "publicQtConfig", "name": "xcb-plugin" },
+ { "type": "library", "test": "xcb", "condition": "!features.system-xcb" },
+ { "type": "library", "test": "xcb-syslibs", "condition": "features.system-xcb" }
+ ]
+ },
+ "system-xcb": {
+ "description": "Using system provided XCB libraries",
+ "enable": "input.xcb == 'system' || input.xcb == 'yes'",
+ "disable": "input.xcb == 'qt' || input.xcb == 'no'",
+ "autoDetect": "!config.darwin",
+ "condition": "tests.xcb && tests.xcb-syslibs"
+ },
+ "xcb-render": {
+ "description": "XCB render",
+ "emitIf": "features.system-xcb",
+ "condition": "tests.xcb-render",
+ "output": [
+ "publicQtConfig",
+ { "type": "library", "test": "xcb-render" }
+ ]
+ },
+ "xcb-glx": {
+ "description": "XCB GLX",
+ "emitIf": "features.xcb",
+ "condition": "tests.xcb-glx",
+ "output": [
+ "publicQtConfig",
+ { "type": "library", "test": "xcb-glx" }
+ ]
+ },
+ "xcb-xlib": {
+ "description": "XCB Xlib",
+ "emitIf": "features.xcb",
+ "condition": "tests.xcb-xlib",
+ "output": [ "publicQtConfig" ]
+ },
+ "xcb-sm": {
+ "description": "xcb-sm",
+ "emitIf": "features.xcb",
+ "condition": "features.sessionmanager && tests.x11-sm",
+ "output": [ "publicQtConfig" ]
+ },
+ "xkb": {
+ "description": "XCB XKB",
+ "condition": "features.system-xcb && tests.xcb-xkb",
+ "output": [
+ "privateFeature",
+ { "type": "library", "test": "xcb-xkb" }
+ ]
+ },
+ "xlib": {
+ "description": "XLib",
+ "condition": "tests.xlib",
+ "output": [ "publicQtConfig" ]
+ },
+ "xrender": {
+ "description": "Xrender",
+ "condition": "tests.xrender",
+ "output": [ "feature" ]
+ },
+ "x11-prefix": {
+ "description": "X11 prefix",
+ "emitIf": "features.xcb",
+ "output": [ { "type": "varAssign", "name": "QMAKE_X11_PREFIX", "value": "tests.x11prefix.value" } ]
+ },
+ "opengles2": {
+ "description": "OpenGL ES 2.0",
+ "disable": "input.opengl == 'desktop' || input.opengl == 'no'",
+ "condition": "!features.opengl-desktop && tests.opengles2",
+ "output": [
+ "publicQtConfig",
+ { "type": "define", "name": "QT_OPENGL_ES" },
+ { "type": "define", "name": "QT_OPENGL_ES_2" },
+ { "type": "library", "name": "OPENGL_ES2", "test": "opengles2" }
+ ]
+ },
+ "opengles3": {
+ "description": "OpenGL ES 3.0",
+ "condition": "features.opengles2 && tests.opengles3",
+ "output": [ { "type": "define", "name": "QT_OPENGL_ES_3" } ]
+ },
+ "opengles31": {
+ "description": "OpenGL ES 3.1",
+ "condition": "features.opengles3 && tests.opengles31",
+ "output": [ { "type": "define", "name": "QT_OPENGL_ES_3_1" } ]
+ },
+ "opengl-desktop": {
+ "description": "Desktop OpenGL",
+ "disable": "input.opengl == 'es2' || input.opengl == 'no'",
+ "condition": "(config.win32 && tests.opengl-mingw) || (!config.win32 && tests.opengl-desktop)",
+ "output": [ { "type": "library", "name": "OPENGL", "test": "opengl-desktop", "condition": "!config.win32" } ]
+ },
+ "opengl": {
+ "description": "OpenGL",
+ "condition": "features.opengl-desktop || features.opengles2",
+ "output": [ "feature" ]
+ },
+ "db2": {
+ "description": "DB2 (IBM)",
+ "condition": "tests.db2",
+ "output": [ "sqldriver" ]
+ },
+ "ibase": {
+ "description": "InterBase",
+ "condition": "tests.ibase",
+ "output": [ "sqldriver" ]
+ },
+ "mysql": {
+ "description": "MySql",
+ "condition": "tests.mysql",
+ "output": [
+ "sqldriver",
+ { "type": "library", "test": "mysql", "condition": "!features.use_libmysqlclient_r" },
+ { "type": "library", "test": "mysql_r", "condition": "features.use_libmysqlclient_r" }
+ ]
+ },
+ "use_libmysqlclient_r": {
+ "description": "MySql (threadsafe)",
+ "condition": "features.mysql && tests.mysql_r",
+ "output": [ "privateConfig" ]
+ },
+ "oci": {
+ "description": "OCI (Oracle)",
+ "condition": "tests.oci",
+ "output": [ "sqldriver" ]
+ },
+ "odbc": {
+ "description": "ODBC",
+ "condition": "(!config.darwin && tests.odbc) || tests.iodbc",
+ "output": [
+ "sqldriver",
+ { "type": "library", "test": "odbc", "condition": "!config.darwin && tests.odbc" },
+ { "type": "library", "test": "iodbc", "condition": "config.darwin || !tests.odbc" }
+ ]
+ },
+ "psql": {
+ "description": "PostgreSQL",
+ "condition": "tests.psql",
+ "output": [
+ "sqldriver",
+ { "type": "library", "test": "psql" }
+ ]
+ },
+ "sqlite2": {
+ "description": "SQLite2",
+ "condition": "tests.sqlite2",
+ "output": [ "sqldriver" ]
+ },
+ "sqlite": {
+ "description": "SQLite",
+ "output": [ "sqldriver" ]
+ },
+ "system-sqlite": {
+ "description": " Using system provided SQLite",
+ "autoDetect": false,
+ "condition": "features.sqlite && tests.sqlite",
+ "output": [
+ "publicQtConfig",
+ { "type": "library", "test": "sqlite" }
+ ]
+ },
+ "tds": {
+ "description": "TDS (Sybase)",
+ "condition": "tests.tds",
+ "output": [
+ "sqldriver",
+ { "type": "library", "test": "tds" }
+ ]
+ },
+ "fusion-style": {
+ "description": "Fusion Style",
+ "output": [ "styles" ]
+ },
+ "mac-style": {
+ "description": "Mac Style",
+ "output": [ "styles" ]
+ },
+ "windows-style": {
+ "description": "Windows Style",
+ "output": [ "styles" ]
+ },
+ "windowsxp-style": {
+ "description": "Windows XP Style",
+ "condition": "config.win32",
+ "output": [ "styles" ]
+ },
+ "windowsvista-style": {
+ "description": "Windows Vista Style",
+ "condition": "config.win32",
+ "output": [ "styles" ]
+ },
+ "android-style": {
+ "description": "Android Style",
+ "condition": "config.android",
+ "output": [ "styles" ]
+ },
+ "android-style-assets": {
+ "description": "Android Style Assets",
+ "condition": "features.android-style",
+ "output": [ "privateConfig" ]
+ },
+ "audio-backend": {
+ "description": "Audio backend",
+ "output": [ "publicQtConfig" ]
+ },
+ "directwrite": {
+ "description": "DirectWrite",
+ "autoDetect": false,
+ "emitIf": "config.win32",
+ "output": [ "publicQtConfig" ]
+ },
+ "directwrite2": {
+ "description": "DirectWrite 2",
+ "emitIf": "config.win32",
+ "condition": "features.directwrite && tests.directwrite2",
+ "output": [ "publicQtConfig" ]
+ },
+ "sessionmanager": {
+ "description": "Session Management",
+ "output": [ "feature" ]
+ },
+ "qml-debug": {
+ "description": "QML debugging",
+ "output": [ { "type": "publicQtConfig", "negative": true } ]
+ },
+ "compile_examples": {
+ "description": "Compile examples",
+ "output": [ "privateConfig" ]
+ },
+ "qpa_default_platform": {
+ "description": "QPA default platform",
+ "condition": "features.gui",
+ "output": [
+ { "type": "define", "name": "QT_QPA_DEFAULT_PLATFORM_NAME", "value": "tests.qpa_default_platform.name" },
+ { "type": "varAssign", "public": true, "name": "QT_DEFAULT_QPA_PLUGIN", "value": "tests.qpa_default_platform.plugin",
+ "condition": "!features.shared" }
+ ]
+ },
+ "extra_features": {
+ "comment": "### remove, once qfeatures.txt is ported to the new system",
+ "output": [ "extraFeatures" ]
+ }
+ },
+
+ "earlyReport": [
+ {
+ "type": "warning",
+ "condition": "input.debug_and_release == 'yes' && !config.darwin && !config.win32",
+ "message": "-debug-and-release is only supported on Darwin and Windows platforms.
+Qt can be built in release mode with separate debug information, so
+-debug-and-release is no longer necessary."
+ },
+ {
+ "type": "error",
+ "condition": "features.framework && features.debug && !features.debug_and_release",
+ "message": "debug-only framework builds are not supported. Configure with -no-framework if you want a pure debug build."
+ },
+ {
+ "type": "error",
+ "condition": "input.xcb != '' && input.xcb != 'no' && input.xkbcommon == 'no'",
+ "message": "XCB plugin requires libxkbcommon. See -qt-xkbcommon-x11 and -system-xkbcommon-x11."
+ }
+ ],
+
+ "report": [
+ {
+ "type": "note",
+ "condition": "!features.shared",
+ "message": "Using static linking will disable the use of dynamically
+loaded plugins. Make sure to import all needed static plugins,
+or compile needed modules into the library."
+ },
+ {
+ "type": "note",
+ "condition": "features.journald || features.syslog || (config.qnx && features.slog2)",
+ "message": "journald, syslog or slog2 integration is enabled.
+If your users intend to develop applications against this build,
+ensure that the IDEs they use either set QT_LOGGING_TO_CONSOLE to 1
+or are able to read the logged output from journald, syslog or slog2."
+ },
+ {
+ "type": "note",
+ "condition": "features.release_tools && (!features.debug || features.debug_and_release)",
+ "message": "-optimized-tools is not useful in -release mode."
+ },
+ {
+ "type": "warning",
+ "condition": "features.gui && config.linux && !features.xcb && !features.eglfs && !features.directfb && !features.linuxfb && !features.mirclient",
+ "message": "No QPA platform plugin enabled! This will
+produce a Qt that cannot run GUI applications.
+The dependencies needed for xcb to build are listed in
+src/plugins/platforms/xcb/README"
+ },
+ {
+ "type": "note",
+ "condition": "input.qreal == 'double' && arch.arm",
+ "message": "Qt is using double for qreal on this system. This is binary-incompatible against Qt 5.1.
+Configure with '-qreal float' to create a build that is binary-compatible with 5.1."
+ },
+ {
+ "type": "warning",
+ "condition": "features.xcb && !features.xkbcommon-system && !features.xkb-config-root",
+ "message": "Could not find XKB config root, use -xkb-config-root to set a path to
+XKB configuration data. This is required for keyboard input support."
+ },
+ {
+ "type": "note",
+ "condition": "features.openssl-linked && tests.openssl-libs.showNote",
+ "message": "When linking against OpenSSL, you can override the default
+library names through OPENSSL_LIBS.
+For example:
+ OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
+ },
+ {
+ "type": "warning",
+ "condition": "input.qpa-platform-guard != ''",
+ "message": "The [-no]-qpa-platform-guard argument is deprecated and has no effect."
+ },
+ {
+ "type": "warning",
+ "condition": "!features.accessibility",
+ "message": "Accessibility disabled. This configuration of Qt is unsupported."
+ },
+ {
+ "type": "note",
+ "condition": "features.accessibility && features.xcb && !features.accessibility-atspi-bridge",
+ "message": "Disabling Linux Accessibility Bridge: D-Bus is missing."
+ },
+ {
+ "type": "warning",
+ "condition": "config.darwin && features.system-harfbuzz",
+ "message": "On OS X, AAT is supported only with -qt-harfbuzz."
+ },
+ {
+ "type": "error",
+ "condition": "features.gui && input.opengl != 'no' && !features.opengl-desktop && !features.opengles2",
+ "message": "The OpenGL functionality tests failed!
+You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
+QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform."
+ },
+ {
+ "type": "error",
+ "condition": "input.doubleconversion == 'no' && !tests.xlocalescanprint",
+ "message": "Your C library does not provide sscanf_l or snprintf_l.
+You need to use libdouble-conversion for double/string conversion."
+ },
+ {
+ "type": "error",
+ "condition": "!tests.atomicfptr",
+ "message": "detected a std::atomic implementation that fails for function pointers.
+Please apply the patch corresponding to your Standard Library vendor, found in
+ qtbase/config.tests/common/atomicfptr"
+ },
+ {
+ "type": "error",
+ "condition": "!features.stl",
+ "message": "Qt requires a compliant STL library."
+ },
+ {
+ "type": "error",
+ "condition": "!features.c++11",
+ "message": "Qt requires a C++11 compiler."
+ }
+ ],
+
+ "summary": [
+ {
+ "type": "buildTypeAndConfig"
+ },
+ {
+ "section": "Build options",
+ "entries": [
+ {
+ "message": "Mode",
+ "type": "buildMode"
+ },
+ "shared",
+ {
+ "message": "Using C++ standard",
+ "type": "firstAvailableFeature",
+ "args": "c++1z c++14 c++11"
+ },
+ "use_gold_linker",
+ "enable_new_dtags",
+ "precompile_header",
+ "ltcg",
+ {
+ "section": "Target compiler supports",
+ "entries": [
+ {
+ "message": "SSE",
+ "type": "featureList",
+ "args": "sse2 sse3 ssse3 sse4_1 sse4_2",
+ "condition": "(arch.i386 || arch.x86_64)"
+ },
+ {
+ "message": "AVX",
+ "type": "featureList",
+ "args": "avx avx2",
+ "condition": "(arch.i386 || arch.x86_64)"
+ },
+ {
+ "message": "AVX512",
+ "type": "featureList",
+ "args": "avx512f avx512er avx512cd avx512pf avx512dq avx512bw avx512vl avx512ifma avx512vbmi",
+ "condition": "(arch.i386 || arch.x86_64)"
+ },
+ {
+ "message": "NEON",
+ "type": "feature",
+ "args": "neon",
+ "condition": "arch.arm || arch.arm64"
+ },
+ {
+ "message": "DSP",
+ "type": "feature",
+ "args": "mips_dsp",
+ "condition": "arch.mips"
+ },
+ {
+ "message": "DSPr2",
+ "type": "feature",
+ "args": "mips_dspr2",
+ "condition": "arch.mips"
+ }
+ ]
+ },
+ {
+ "section": "Sanitizers",
+ "condition": "features.sanitizer",
+ "entries": [ "sanitize_address", "sanitize_thread", "sanitize_memory", "sanitize_undefined" ]
+ },
+ {
+ "message": "Build parts",
+ "type": "buildParts"
+ }
+ ]
+ }, {
+ "section": "Qt modules and options",
+ "entries": [
+ "concurrent",
+ "dbus",
+ "dbus-linked",
+ "gui",
+ "widgets"
+ ]
+ }, {
+ "section": "Support enabled for",
+ "entries": [
+ "accessibility",
+ "alsa",
+ "cups",
+ {
+ "message": "DirectWrite",
+ "type": "feature",
+ "args": "directwrite",
+ "condition": "config.win32"
+ },
+ "doubleconversion",
+ "system-doubleconversion",
+ "evdev",
+ "fontconfig",
+ "freetype",
+ "system-freetype",
+ "glib",
+ "gstreamer-0_10",
+ "gstreamer-1_0",
+ "gtk3",
+ "harfbuzz",
+ "system-harfbuzz",
+ "icu",
+ "iconv",
+ {
+ "section": "Image formats",
+ "entries": [
+ "gif", "jpeg", "system-jpeg", "png", "system-png"
+ ]
+ },
+ {
+ "section": "Logging backends",
+ "entries": [
+ "journald", "syslog"
+ ]
+ },
+ "libinput",
+ "mtdev",
+ {
+ "section": "Networking",
+ "entries": [
+ {
+ "message": "CoreWLan",
+ "type": "feature",
+ "args": "corewlan",
+ "condition": "config.darwin"
+ },
+ "getaddrinfo", "getifaddrs", "ipv6ifname", "libproxy",
+ {
+ "message": "SecureTransport",
+ "type": "feature",
+ "args": "securetransport",
+ "condition": "config.darwin"
+ },
+ "openssl",
+ "openssl-linked",
+ "system-proxies"
+ ]
+ },
+ {
+ "section": "OpenGL",
+ "entries": [
+ "egl",
+ "opengl-desktop",
+ "opengles2",
+ "opengles3",
+ "opengles31"
+ ]
+ },
+ "pkg-config",
+ "system-pcre",
+ "pulseaudio",
+ "qml-debug",
+ {
+ "section": "QNX specific",
+ "condition": "config.qnx",
+ "entries": [
+ "slog2", "qqnx_imf", "qqnx_pps", "lgmon"
+ ]
+ },
+ {
+ "section": "QPA backends",
+ "entries": [
+ "directfb", "eglfs",
+ {
+ "section": "EGLFS details",
+ "condition": "features.eglfs",
+ "entries": [
+ "eglfs-viv", "eglfs-viv-wl", "eglfs-egldevice", "eglfs-gbm", "eglfs-mali", "egl_x11"
+ ]
+ },
+ "linuxfb", "mirclient",
+ {
+ "message": "INTEGRITY framebuffer",
+ "condition": "config.integrity",
+ "args": "integrityfb"
+ }
+ ]
+ },
+ "sessionmanager",
+ {
+ "section": "SQL drivers",
+ "entries": [
+ "db2", "ibase", "mysql", "oci", "odbc", "psql", "sqlite2", "sqlite", "system-sqlite", "tds"
+ ]
+ },
+ "tslib",
+ "libudev",
+ {
+ "section": "X11",
+ "condition": "features.xcb",
+ "entries": [
+ "system-xcb", "egl_x11", "xinput2", "xkb", "xlib", "xrender", "xcb-render", "xcb-glx", "xcb-xlib", "xkbcommon-system"
+ ]
+ },
+ "xkbcommon-evdev",
+ "system-zlib"
+ ]
+ }
+ ]
+
+}
diff --git a/configure.pri b/configure.pri
new file mode 100644
index 0000000000..9dd2f053ff
--- /dev/null
+++ b/configure.pri
@@ -0,0 +1,629 @@
+# custom command line handling
+
+defineTest(qtConfCommandline_cxxstd) {
+ arg = $${1}
+ val = $${2}
+ isEmpty(val): val = $$qtConfGetNextCommandlineArg()
+ message("setting c++std: $$arg/$$val")
+ !contains(val, "^-.*"):!isEmpty(val) {
+ contains(val, "(c\+\+)?11") {
+ qtConfCommandlineSetInput("c++14", "no")
+ } else: contains(val, "(c\+\+)?(14|1y)") {
+ qtConfCommandlineSetInput("c++14", "yes")
+ qtConfCommandlineSetInput("c++1z", "no")
+ } else: contains(val, "(c\+\+)?(1z)") {
+ qtConfCommandlineSetInput("c++14", "yes")
+ qtConfCommandlineSetInput("c++1z", "yes")
+ } else {
+ error("Invalid argument $$val to command line parameter $$arg")
+ }
+ } else {
+ error("Missing argument to command line parameter $$arg")
+ }
+}
+
+defineTest(qtConfCommandline_sanitize) {
+ arg = $${1}
+ val = $${2}
+ isEmpty(val): val = $$qtConfGetNextCommandlineArg()
+ !contains(val, "^-.*"):!isEmpty(val) {
+ equals(val, "address") {
+ qtConfCommandlineSetInput("sanitize_address", "yes")
+ } else: equals(val, "thread") {
+ qtConfCommandlineSetInput("sanitize_thread", "yes")
+ } else: equals(val, "memory") {
+ qtConfCommandlineSetInput("sanitize_memory", "yes")
+ } else: equals(val, "undefined") {
+ qtConfCommandlineSetInput("sanitize_undefined", "yes")
+ } else {
+ error("Invalid argument $$val to command line parameter $$arg")
+ }
+ } else {
+ error("Missing argument to command line parameter $$arg")
+ }
+}
+
+# callbacks
+
+defineReplace(qtConfFunc_crossCompile) {
+ spec = $$[QMAKE_SPEC]
+ !equals(spec, $$[QMAKE_XSPEC]): return(true)
+ return(false)
+}
+
+# custom tests
+
+defineTest(qtConfTest_avx_test_apple_clang) {
+ !*g++*:!*-clang*: return(true)
+
+ compiler = $$system("$$QMAKE_CXX --version")
+ contains(compiler, "Apple clang version [23]") {
+ # Some clang versions produce internal compiler errors compiling Qt AVX code
+ return(false)
+ } else {
+ return(true)
+ }
+}
+
+defineTest(qtConfTest_gnumake) {
+ make = $$qtConfFindInPath("gmake")
+ isEmpty(make): make = $$qtConfFindInPath("make")
+ !isEmpty(make) {
+ version = $$system("$$make -v", blob)
+ contains(version, "^GNU Make.*"): return(true)
+ }
+ return(false)
+}
+
+defineTest(qtConfTest_detectPkgConfig) {
+ pkgConfig = $$getenv("PKG_CONFIG")
+ !isEmpty(pkgConfig): {
+ qtLog("Found pkg-config from environment variable: $$pkgConfig")
+ } else {
+ pkgConfig = $$PKG_CONFIG
+
+ !isEmpty(pkgConfig) {
+ qtLog("Found pkg-config from mkspec: $$pkgConfig")
+ } else {
+ pkgConfig = $$qtConfFindInPath("pkg-config")
+
+ isEmpty(pkgConfig): \
+ return(false)
+
+ qtLog("Found pkg-config from path: $$pkgConfig")
+ }
+ }
+
+ $$qtConfEvaluate("features.cross_compile") {
+ # cross compiling, check that pkg-config is set up sanely
+ sysroot = $$config.input.sysroot
+
+ pkgConfigLibdir = $$getenv("PKG_CONFIG_LIBDIR")
+ isEmpty(pkgConfigLibdir) {
+ isEmpty(sysroot) {
+ qtConfAddWarning("Cross compiling without sysroot. Disabling pkg-config")
+ return(false)
+ }
+ !exists("$$sysroot/usr/lib/pkgconfig") {
+ qtConfAddWarning( \
+ "Disabling pkg-config since PKG_CONFIG_LIBDIR is not set and" \
+ "the host's .pc files would be used (even if you set PKG_CONFIG_PATH)." \
+ "Set this variable to the directory that contains target .pc files" \
+ "for pkg-config to function correctly when cross-compiling or" \
+ "use -pkg-config to override this test.")
+ return(false)
+ }
+
+ pkgConfigLibdir = $$sysroot/usr/lib/pkgconfig:$$sysroot/usr/share/pkgconfig
+ gcc {
+ gccMachineDump = $$system("$$QMAKE_CXX -dumpmachine")
+ !isEmpty(gccMachineDump): \
+ pkgConfigLibdir = "$$pkgConfigLibdir:$$sysroot/usr/lib/$$gccMachineDump/pkgconfig"
+ }
+
+ qtConfAddNote("PKG_CONFIG_LIBDIR automatically set to $$pkgConfigLibdir")
+ }
+ pkgConfigSysrootDir = $$getenv("PKG_CONFIG_SYSROOT_DIR")
+ isEmpty(pkgConfigSysrootDir) {
+ isEmpty(sysroot) {
+ qtConfAddWarning( \
+ "Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set." \
+ "Set this variable to your sysroot for pkg-config to function correctly when" \
+ "cross-compiling or use -pkg-config to override this test.")
+ return(false)
+ }
+
+ pkgConfigSysrootDir = $$sysroot
+ qtConfAddNote("PKG_CONFIG_SYSROOT_DIR automatically set to $$pkgConfigSysrootDir")
+ }
+ $${1}.pkgConfigLibdir = $$pkgConfigLibdir
+ export($${1}.pkgConfigLibdir)
+ $${1}.pkgConfigSysrootDir = $$pkgConfigSysrootDir
+ export($${1}.pkgConfigSysrootDir)
+ }
+ $${1}.pkgConfig = $$pkgConfig
+ export($${1}.pkgConfig)
+
+ PKG_CONFIG = $$pkgConfig
+ export(PKG_CONFIG)
+
+ return(true)
+}
+
+defineTest(qtConfTest_neon) {
+ contains(config.input.cpufeatures, "neon"): return(true)
+ return(false)
+}
+
+defineTest(qtConfTest_openssl) {
+ libs = $$getenv("OPENSSL_LIBS")
+
+ !isEmpty(libs) {
+ $${1}.libs = $$libs
+ export($${1}.libs)
+ }
+
+ $${1}.showNote = false
+ isEmpty(libs): $${1}.showNote = true
+ export($${1}.showNote)
+
+ return(true)
+}
+
+defineTest(qtConfTest_checkCompiler) {
+ contains(QMAKE_CXX, ".*clang.*") {
+ versionstr = "$$system($$QMAKE_CXX -v 2>&1)"
+ contains(versionstr, "^Apple (clang|LLVM) version .*") {
+ $${1}.compilerDescription = "Apple Clang"
+ $${1}.compilerId = "apple_clang"
+ $${1}.compilerVersion = $$replace(versionstr, "^Apple (clang|LLVM) version ([0-9.]+).*$", "\\1")
+ } else: contains(versionstr, ".*clang version.*") {
+ $${1}.compilerDescription = "Clang"
+ $${1}.compilerId = "clang"
+ $${1}.compilerVersion = $$replace(versionstr, "^.*clang version ([0-9.]+).*", "\\1")
+ } else {
+ return(false)
+ }
+ } else: contains(QMAKE_CXX, ".*g\\+\\+.*") {
+ $${1}.compilerDescription = "GCC"
+ $${1}.compilerId = "gcc"
+ $${1}.compilerVersion = $$system($$QMAKE_CXX -dumpversion)
+ } else: contains(QMAKE_CXX, ".*icpc" ) {
+ $${1}.compilerDescription = "ICC"
+ $${1}.compilerId = "icc"
+ version = "$$system($$QMAKE_CXX -v)"
+ $${1}.compilerVersion = $$replace(version, "icpc version ([0-9.]+).*", "\\1")
+ } else {
+ return(false)
+ }
+ $${1}.compilerDescription += $$eval($${1}.compilerVersion)
+ export($${1}.compilerDescription)
+ export($${1}.compilerId)
+ export($${1}.compilerVersion)
+ return(true)
+}
+
+defineReplace(filterLibraryPath) {
+ str = $${1}
+ for (l, QMAKE_DEFAULT_LIBDIRS): \
+ str -= "-L$$l"
+
+ return($$str)
+}
+
+defineTest(qtConfTest_psqlCompile) {
+ pg_config = $$config.input.psql_config
+ isEmpty(pg_config): \
+ pg_config = $$qtConfFindInPath("pg_config")
+ !win32:!isEmpty(pg_config) {
+ libdir = $$system("$$pg_config --libdir")
+ libdir -= $$QMAKE_DEFAULT_LIBDIRS
+ !isEmpty(libdir): libs = "-L$$libdir"
+ libs += "-lpq"
+ $${1}.libs = $$libs
+ $${1}.includedir = $$system("$$pg_config --includedir")
+ $${1}.includedir -= $$QMAKE_DEFAULT_INCDIRS
+ !isEmpty($${1}.includedir): \
+ $${1}.cflags = "-I$$eval($${1}.includedir)"
+ }
+
+ # Respect PSQL_LIBS if set
+ PSQL_LIBS = $$getenv(PSQL_LIBS)
+ !isEmpty($$PSQL_LIBS): $${1}.libs = $$PSQL_LIBS
+
+ export($${1}.libs)
+ export($${1}.includedir)
+ export($${1}.cflags)
+
+ qtConfTest_compile($${1}): return(true)
+ return(false)
+}
+
+defineTest(qtConfTest_mysqlCompile) {
+ mysql_config = $$config.input.mysql_config
+ isEmpty(mysql_config): \
+ mysql_config = $$qtConfFindInPath("mysql_config")
+ !isEmpty(mysql_config) {
+ version = $$system("$$mysql_config --version")
+ version = $$split(version, '.')
+ version = $$first(version)
+ isEmpty(version)|lessThan(version, 4): return(false)]
+
+ # query is either --libs or --libs_r
+ query = $$eval($${1}.query)
+ $${1}.libs = $$filterLibraryPath($$system("$$mysql_config $$query"))
+ # -rdynamic should not be returned by mysql_config, but is on RHEL 6.6
+ $${1}.libs -= -rdynamic
+ includedir = $$system("$$mysql_config --include")
+ includedir ~= s/^-I//g
+ includedir -= $$QMAKE_DEFAULT_INCDIRS
+ $${1}.includedir = $$includedir
+ !isEmpty($${1}.includedir): \
+ $${1}.cflags = "-I$$eval($${1}.includedir)"
+ export($${1}.libs)
+ export($${1}.includedir)
+ export($${1}.cflags)
+ }
+
+ qtConfTest_compile($${1}): return(true)
+ return(false)
+}
+
+defineTest(qtConfTest_tdsCompile) {
+ sybase = $$getenv(SYBASE)
+ !isEmpty(sybase): \
+ $${1}.libs = "-L$${sybase}/lib"
+ $${1}.libs += $$getenv(SYBASE_LIBS)
+ export($${1}.libs)
+
+ qtConfTest_compile($${1}): return(true)
+ return(false)
+}
+
+
+defineTest(qtConfTest_xkbConfigRoot) {
+ qtConfTest_getPkgConfigVariable($${1}): return(true)
+
+ for (dir, $$list("/usr/share/X11/xkb", "/usr/local/share/X11/xkb")) {
+ exists($$dir) {
+ $${1}.value = $$dir
+ export($${1}.value)
+ return(true)
+ }
+ }
+ return(false)
+}
+
+defineTest(qtConfTest_qpaDefaultPlatform) {
+ name =
+ !isEmpty(config.input.qpa_default_platform): name = $$config.input.qpa_default_platform
+ else: !isEmpty(QT_QPA_DEFAULT_PLATFORM): name = $$QT_QPA_DEFAULT_PLATFORM
+ else: win32: name = windows
+ else: android: name = android
+ else: osx: name = cocoa
+ else: ios: name = ios
+ else: qnx: name = qnx
+ else: integrity: name = integrityfb
+ else: name = xcb
+
+ $${1}.value = $$name
+ $${1}.plugin = q$$name
+ $${1}.name = "\"$$name\""
+ export($${1}.value)
+ export($${1}.plugin)
+ export($${1}.name)
+ return(true)
+}
+
+
+# custom outputs
+
+defineTest(qtConfOutput_shared) {
+ !$${2}: return()
+
+ # export this here, so later tests can use it
+ CONFIG += shared
+ export(CONFIG)
+}
+
+defineTest(qtConfOutput_verbose) {
+ !$${2}: return()
+
+ qtConfOutputVar(assign, "privatePro", "QMAKE_CONFIG_VERBOSE", true)
+
+ # export this here, so we can get verbose logging
+ QMAKE_CONFIG_VERBOSE = true
+ export(QMAKE_CONFIG_VERBOSE)
+}
+
+defineTest(qtConfOutput_styles) {
+ !$${2}: return()
+
+ style = $$replace($${1}.feature, "-style", "")
+ qtConfOutputVar(append, "privatePro", "styles", $$style)
+}
+
+defineTest(qtConfOutput_sqldriver) {
+ $${2}: qtConfOutputVar(append, "privatePro", "sql-drivers", $$eval($${1}.feature))
+}
+
+defineTest(qtConfOutput_qreal) {
+ qreal = $$config.input.qreal
+ isEmpty(qreal): qreal = "double"
+ qreal_string = $$replace(qreal, [^a-zA-Z0-9], "_")
+ qtConfOutputVar(assign, "privatePro", "QT_COORD_TYPE", $$qreal)
+ !equals(qreal, "double") {
+ qtConfOutputSetDefine("publicHeader", "QT_COORD_TYPE", $$qreal)
+ qtConfOutputSetDefine("publicHeader", "QT_COORD_TYPE_STRING", "\"$$qreal_string\"")
+ }
+}
+
+defineTest(qtConfOutput_pkgConfig) {
+ !$${2}: return()
+
+ # this method also exports PKG_CONFIG_(LIB|SYSROOT)DIR, so that tests using pkgConfig will work correctly
+ PKG_CONFIG_SYSROOT_DIR = $$eval(config.tests.pkg-config.pkgConfigSysrootDir)
+ !isEmpty(PKG_CONFIG_SYSROOT_DIR) {
+ qtConfOutputVar(assign, "publicPro", "PKG_CONFIG_SYSROOT_DIR", $$PKG_CONFIG_SYSROOT_DIR)
+ export(PKG_CONFIG_SYSROOT_DIR)
+ }
+ PKG_CONFIG_LIBDIR = $$eval(config.tests.pkg-config.pkgConfigLibdir)
+ !isEmpty(PKG_CONFIG_LIBDIR) {
+ qtConfOutputVar(assign, "publicPro", "PKG_CONFIG_LIBDIR", $$PKG_CONFIG_LIBDIR)
+ export(PKG_CONFIG_LIBDIR)
+ }
+}
+
+defineTest(qtConfOutput_useGoldLinker) {
+ !$${2}: return()
+
+ # We need to preempt the output here, so that qtConfTest_linkerSupportsFlag can work properly in qtbase
+ CONFIG += use_gold_linker
+ export(CONFIG)
+}
+
+defineTest(qtConfOutput_debugAndRelease) {
+ $$qtConfEvaluate("features.debug") {
+ qtConfOutputVar(append, "publicPro", "CONFIG", "debug")
+ $${2}: qtConfOutputVar(append, "publicPro", "QT_CONFIG", "release")
+ qtConfOutputVar(append, "publicPro", "QT_CONFIG", "debug")
+ } else {
+ qtConfOutputVar(append, "publicPro", "CONFIG", "release")
+ $${2}: qtConfOutputVar(append, "publicPro", "QT_CONFIG", "debug")
+ qtConfOutputVar(append, "publicPro", "QT_CONFIG", "release")
+ }
+}
+
+defineTest(qtConfOutput_compilerVersion) {
+ !$${2}: return()
+
+ name = $$upper($$config.tests.compiler.compilerId)
+ version = $$config.tests.compiler.compilerVersion
+ major = $$section(version, '.', 0, 0)
+ minor = $$section(version, '.', 1, 1)
+ patch = $$section(version, '.', 2, 2)
+ isEmpty(minor): minor = 0
+ isEmpty(patch): patch = 0
+
+ config.output.publicPro += \
+ "QT_$${name}_MAJOR_VERSION = $$major" \
+ "QT_$${name}_MINOR_VERSION = $$minor" \
+ "QT_$${name}_PATCH_VERSION = $$patch"
+
+ export(config.output.publicPro)
+}
+
+# should go away when qfeatures.txt is ported
+defineTest(qtConfOutput_extraFeatures) {
+ isEmpty(config.input.extra_features): return()
+
+ # write to qconfig.pri
+ config.output.publicPro += "$${LITERAL_HASH}ifndef QT_BOOTSTRAPPED"
+ for (f, config.input.extra_features) {
+ feature = $$replace(f, "^no-", "")
+ FEATURE = $$upper($$replace(feature, -, _))
+ contains(f, "^no-.*") {
+ config.output.publicPro += \
+ "$${LITERAL_HASH}ifndef QT_NO_$$FEATURE" \
+ "$${LITERAL_HASH}define QT_NO_$$FEATURE" \
+ "$${LITERAL_HASH}endif"
+ } else {
+ config.output.publicPro += \
+ "$${LITERAL_HASH}if defined(QT_$$FEATURE) && defined(QT_NO_$$FEATURE)" \
+ "$${LITERAL_HASH}undef QT_$$FEATURE" \
+ "$${LITERAL_HASH}elif !defined(QT_$$FEATURE) && !defined(QT_NO_$$FEATURE)" \
+ "$${LITERAL_HASH}define QT_$$FEATURE" \
+ "$${LITERAL_HASH}endif"
+ }
+ }
+ config.output.publicPro += "$${LITERAL_HASH}endif"
+ export(config.output.publicPro)
+
+ # write to qmodule.pri
+ disabled_features =
+ for (f, config.input.extra_features) {
+ feature = $$replace(f, "^no-", "")
+ FEATURE = $$upper($$replace(feature, -, _))
+ contains(f, "^no-.*"): disabled_features += $$FEATURE
+ }
+ !isEmpty(disabled_features): qtConfOutputVar(assign, "privatePro", QT_NO_DEFINES, $$disabled_features)
+}
+
+
+defineTest(qtConfOutputPostProcess_privatePro) {
+ output = \
+ "host_build {" \
+ " QT_CPU_FEATURES.$$QT_HOST_ARCH = $$config.input.host_cpufeatures" \
+ "} else {" \
+ " QT_CPU_FEATURES.$$QT_ARCH = $$config.input.cpufeatures" \
+ "}"
+
+ output += $$cat($$OUT_PWD/.qmake.vars, lines)
+
+ config.output.privatePro += $$output
+ export(config.output.privatePro)
+}
+
+defineTest(qtConfOutput_compilerFlags) {
+ # this output also exports the variables locally, so that subsequent compiler tests can use them
+
+ output =
+ !isEmpty(config.input.wflags) {
+ wflags = $$join(config.input.wflags, " -W", "-W")
+ QMAKE_CFLAGS_WARN_ON += $$wflags
+ QMAKE_CXXFLAGS_WARN_ON += $$wflags
+ export(QMAKE_CFLAGS_WARN_ON)
+ export(QMAKE_CXXFLAGS_WARN_ON)
+ output += \
+ "QMAKE_CFLAGS_WARN_ON += $$wflags" \
+ "QMAKE_CXXFLAGS_WARN_ON += $$wflags"
+ }
+ !isEmpty(config.input.defines) {
+ EXTRA_DEFINES += $$config.input.defines
+ export(EXTRA_DEFINES)
+ output += "EXTRA_DEFINES += $$config.input.defines"
+ }
+ !isEmpty(config.input.includes) {
+ EXTRA_INCLUDEPATH += $$config.input.includes
+ export(EXTRA_INCLUDEPATH)
+ output += "EXTRA_INCLUDEPATH += $$config.input.includes"
+ }
+
+ libs = $$join(config.input.lpaths, " -L", "-L")
+ libs += $$join(config.input.libs, " -l", "-l")
+
+ darwin {
+ libs += $$join(config.input.fpaths, " -F", "-F")
+ libs += $$join(config.input.frameworks, " -framework ", "-framework ")
+ }
+
+ !isEmpty(libs) {
+ EXTRA_LIBS += $$libs
+ export(EXTRA_LIBS)
+
+ output += "EXTRA_LIBS += $$libs"
+ }
+
+ config.output.privatePro += $$output
+ export(config.output.privatePro)
+}
+
+defineTest(qtConfOutput_gccSysroot) {
+ !$${2}: return()
+
+ # This variable also needs to be exported immediately, so the compilation tests
+ # can pick it up.
+ EXTRA_QMAKE_ARGS = \
+ "\"QMAKE_CFLAGS += --sysroot=$$config.input.sysroot\"" \
+ "\"QMAKE_CXXFLAGS += --sysroot=$$config.input.sysroot\"" \
+ "\"QMAKE_LFLAGS += --sysroot=$$config.input.sysroot\""
+ export(EXTRA_QMAKE_ARGS)
+
+ output = \
+ "!host_build {" \
+ " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]" \
+ " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]" \
+ " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]" \
+ "}"
+ config.output.publicPro += $$output
+ export(config.output.publicPro)
+}
+
+defineTest(qtConfOutputPostProcess_publicPro) {
+ qt_version = $$[QT_VERSION]
+ output = \
+ "QT_VERSION = $$qt_version" \
+ "QT_MAJOR_VERSION = $$section(qt_version, '.', 0, 0)" \
+ "QT_MINOR_VERSION = $$section(qt_version, '.', 1, 1)" \
+ "QT_PATCH_VERSION = $$section(qt_version, '.', 2, 2)" \
+ \
+ "host_build {" \
+ " QT_ARCH = $$QT_HOST_ARCH" \
+ " QT_TARGET_ARCH = $$QT_ARCH" \
+ "} else {" \
+ " QT_ARCH = $$QT_ARCH" \
+ "}"
+
+ #libinfix and namespace
+ !isEmpty(config.input.qt_libinfix): output += "QT_LIBINFIX = $$config.input.qt_libinfix"
+ !isEmpty(config.input.qt_namespace): output += "QT_NAMESPACE = $$config.input.qt_namespace"
+
+ output += "QT_EDITION = $$config.input.qt_edition"
+ !contains(config.input.qt_edition, "(OpenSource|Preview)") {
+ output += \
+ "QT_LICHECK = $$config.input.qt_licheck" \
+ "QT_RELEASE_DATE = $$config.input.qt_release_date"
+ }
+
+ config.output.publicPro += $$output
+ export(config.output.publicPro)
+}
+
+defineTest(qtConfOutputPostProcess_publicHeader) {
+ qt_version = $$[QT_VERSION]
+ output = \
+ "$${LITERAL_HASH}define QT_VERSION_STR \"$$qt_version\"" \
+ "$${LITERAL_HASH}define QT_VERSION_MAJOR $$section(qt_version, '.', 0, 0)" \
+ "$${LITERAL_HASH}define QT_VERSION_MINOR $$section(qt_version, '.', 1, 1)" \
+ "$${LITERAL_HASH}define QT_VERSION_PATCH $$section(qt_version, '.', 2, 2)"
+
+ !$$qtConfEvaluate("features.shared") {
+ output += \
+ "/* Qt was configured for a static build */" \
+ "$${LITERAL_HASH}if !defined(QT_SHARED) && !defined(QT_STATIC)" \
+ "$${LITERAL_HASH} define QT_STATIC" \
+ "$${LITERAL_HASH}endif"
+ }
+
+ !isEmpty(config.input.qt_libinfix): \
+ output += "$${LITERAL_HASH}define QT_LIBINFIX \"$$eval(config.input.qt_libinfix)\""
+
+ config.output.publicHeader += $$output
+ export(config.output.publicHeader)
+}
+
+
+# custom reporting
+
+defineTest(qtConfReport_buildParts) {
+ qtConfReportPadded($${1}, $$config.input.qt_build_parts)
+}
+
+defineTest(qtConfReport_buildTypeAndConfig) {
+ equals(QT_ARCH, $$QT_HOST_ARCH) {
+ qtConfAddReport("Build type: $$QT_ARCH")
+ } else {
+ qtConfAddReport("Building on: $$QT_HOST_ARCH")
+ qtConfAddReport("Building for: $$QT_ARCH")
+ }
+ qtConfAddReport()
+ qtConfAddReport("Configuration: $$config.output.privatePro.append.CONFIG $$config.output.publicPro.append.QT_CONFIG")
+ qtConfAddReport()
+}
+
+defineTest(qtConfReport_buildMode) {
+ $$qtConfEvaluate("features.force_debug_info"): \
+ release = "release (with debug info)"
+ else: \
+ release = "release"
+
+ $$qtConfEvaluate("features.debug"): \
+ build_mode = "debug"
+ else: \
+ build_mode = $$release
+
+ $$qtConfEvaluate("features.debug_and_release"): \
+ build_mode = "debug and $$release; default link: $$build_mode"
+
+ $$qtConfEvaluate("features.release_tools"): \
+ build_mode = "$$build_mode; optimized tools"
+
+ qtConfReportPadded($$1, $$build_mode)
+}
+
+# load and process input from configure
+exists("$$OUT_PWD/config.tests/configure.cfg") {
+ include("$$OUT_PWD/config.tests/configure.cfg")
+}
+
+load(qt_configure)
diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf
index c772a3407a..e1040d250e 100644
--- a/mkspecs/features/configure.prf
+++ b/mkspecs/features/configure.prf
@@ -1,30 +1,4 @@
-QMAKE_MAKE = $$(MAKE)
-!isEmpty(QMAKE_MAKE) {
- # We were called recursively. Use the right make, as MAKEFLAGS may be set as well.
-} else:if(equals(MAKEFILE_GENERATOR, UNIX)|equals(MAKEFILE_GENERATOR, MINGW)) {
- !equals(QMAKE_HOST.os, Windows): \
- QMAKE_MAKE = make
- else: \
- QMAKE_MAKE = mingw32-make
-} else:if(equals(MAKEFILE_GENERATOR, MSVC.NET)|equals(MAKEFILE_GENERATOR, MSBUILD)) {
- QMAKE_MAKE = nmake
-} else {
- error("Configure tests are not supported with the $$MAKEFILE_GENERATOR Makefile generator.")
-}
-
-# Ensure that a cache is present. If none was found on startup, this will create
-# one in the build directory of the project which loads this feature.
-cache()
-
-QMAKE_CONFIG_LOG = $$dirname(_QMAKE_CACHE_)/config.log
-QMAKE_CONFIG_TESTS_DIR = $$_PRO_FILE_PWD_/config.tests
-
-defineTest(qtRunLoggedCommand) {
- msg = "+ $$1"
- write_file($$QMAKE_CONFIG_LOG, msg, append)
- system("$$1 >> \"$$QMAKE_CONFIG_LOG\" 2>&1")|return(false)
- return(true)
-}
+load(configure_base)
# Try to build the test project in $$QMAKE_CONFIG_TESTS_DIR/$$1
# ($$_PRO_FILE_PWD_/config.tests/$$1 by default).
diff --git a/mkspecs/features/configure_base.prf b/mkspecs/features/configure_base.prf
new file mode 100644
index 0000000000..ed2f599bb0
--- /dev/null
+++ b/mkspecs/features/configure_base.prf
@@ -0,0 +1,44 @@
+QMAKE_MAKE = $$(MAKE)
+!isEmpty(QMAKE_MAKE) {
+ # We were called recursively. Use the right make, as MAKEFLAGS may be set as well.
+} else: if(equals(MAKEFILE_GENERATOR, UNIX)|equals(MAKEFILE_GENERATOR, MINGW)) {
+ !equals(QMAKE_HOST.os, Windows): \
+ QMAKE_MAKE = make
+ else: \
+ QMAKE_MAKE = mingw32-make
+} else: if(equals(MAKEFILE_GENERATOR, MSVC.NET)|equals(MAKEFILE_GENERATOR, MSBUILD)) {
+ QMAKE_MAKE = nmake
+} else {
+ error("Configure tests are not supported with the $$MAKEFILE_GENERATOR Makefile generator.")
+}
+
+isEmpty(QMAKE_CONFIG_VERBOSE): QMAKE_CONFIG_VERBOSE = false
+
+defineTest(qtLog) {
+ msg = "+ $$1"
+ write_file($$QMAKE_CONFIG_LOG, msg, append)
+ $$QMAKE_CONFIG_VERBOSE: log("$$msg$$escape_expand(\\n)")
+}
+
+defineTest(qtRunLoggedCommand) {
+ qtLog($$1)
+ write_file($${QMAKE_CONFIG_LOG}.part, "")
+ result = false
+ system("$$1 > \"$${QMAKE_CONFIG_LOG}.part\" 2>&1"): result = true
+
+ output = $$cat($${QMAKE_CONFIG_LOG}.part, blob)
+
+ write_file($${QMAKE_CONFIG_LOG}, output, append)
+ $$QMAKE_CONFIG_VERBOSE: log($$output)
+
+ return($$result)
+}
+
+isEmpty(QMAKE_CONFIG_TESTS_DIR): QMAKE_CONFIG_TESTS_DIR = $$_PRO_FILE_PWD_/config.tests
+
+# Ensure that a cache is present. If none was found on startup, this will create
+# one in the build directory of the project which loads this feature.
+cache()
+
+QMAKE_CONFIG_LOG = $$dirname(_QMAKE_CACHE_)/config.log
+write_file($$QMAKE_CONFIG_LOG, "")
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
new file mode 100644
index 0000000000..cae6dd13f0
--- /dev/null
+++ b/mkspecs/features/qt_configure.prf
@@ -0,0 +1,1170 @@
+CONFIG -= qt debug_and_release
+load(configure_base)
+
+QT_CONFIGURE_REPORT =
+QT_CONFIGURE_NOTES =
+QT_CONFIGURE_WARNINGS =
+QT_CONFIGURE_ERRORS =
+
+defineTest(qtConfAddReport) {
+ QT_CONFIGURE_REPORT += "$$join(1, $$escape_expand(\\n))"
+ export(QT_CONFIGURE_REPORT)
+}
+
+defineTest(qtConfAddNote) {
+ QT_CONFIGURE_NOTES += "Note: $$join(1, $$escape_expand(\\n))"
+ export(QT_CONFIGURE_NOTES)
+}
+
+defineTest(qtConfAddWarning) {
+ QT_CONFIGURE_WARNINGS += "WARNING: $$join(1, $$escape_expand(\\n))"
+ export(QT_CONFIGURE_WARNINGS)
+}
+
+defineTest(qtConfAddError) {
+ QT_CONFIGURE_ERRORS += "ERROR: $$join(1, $$escape_expand(\\n))"
+ export(QT_CONFIGURE_ERRORS)
+}
+
+defineTest(qtConfCommandlineSetInput) {
+ arg = $${1}
+ val = $${2}
+ !isEmpty(config.commandline.options.$${arg}.name): \
+ arg = $$eval(config.commandline.options.$${arg}.name)
+
+ config.input.$$arg = $$val
+ export(config.input.$$arg)
+}
+
+defineReplace(qtConfGetNextCommandlineArg) {
+ c = $$take_first(QMAKE_EXTRA_ARGS)
+ export(QMAKE_EXTRA_ARGS)
+ return($$c)
+}
+
+defineReplace(qtConfPeekNextCommandlineArg) {
+ return($$first(QMAKE_EXTRA_ARGS))
+}
+
+defineTest(qtConfCommandline_boolean) {
+ opt = $${1}
+ val = $${2}
+ isEmpty(val): val = yes
+
+ !equals(val, yes):!equals(val, no) {
+ qtConfAddError("Invalid value given for boolean command line option '$$opt'.")
+ return()
+ }
+
+ qtConfCommandlineSetInput($$opt, $$val)
+}
+
+defineTest(qtConfCommandline_void) {
+ opt = $${1}
+ val = $${2}
+ !isEmpty(val) {
+ qtConfAddError("Command line option $$opt expects no argument ('$$val' given).")
+ return()
+ }
+
+ val = $$eval(config.commandline.options.$${opt}.value)
+ isEmpty(val): val = yes
+
+ qtConfCommandlineSetInput($$opt, $$val)
+}
+
+defineTest(qtConfCommandline_enum) {
+ opt = $${1}
+ val = $${2}
+ isEmpty(val): val = yes
+
+ # validate and map value
+ mapped = $$eval(config.commandline.options.$${opt}.values.$${val})
+ isEmpty(mapped) {
+ # just a list of allowed values
+ for (i, config.commandline.options.$${opt}.values._KEYS_) {
+ equals(config.commandline.options.$${opt}.values.$${i}, $$val) {
+ mapped = $$val
+ break()
+ }
+ }
+ }
+ isEmpty(mapped) {
+ qtConfAddError("Invalid value '$$val' supplied to command line option '$$opt'.")
+ return()
+ }
+
+ qtConfCommandlineSetInput($$opt, $$mapped)
+}
+
+defineTest(qtConfValidateValue) {
+ opt = $${1}
+ val = $${2}
+
+ validValues = $$eval(config.commandline.options.$${opt}.values._KEYS_)
+ isEmpty(validValues): \
+ return(true)
+
+ for (i, validValues) {
+ equals(config.commandline.options.$${opt}.values.$${i}, $$val): \
+ return(true)
+ }
+
+ qtConfAddError("Invalid value $$val supplied to command line option '$$opt'.")
+ return(false)
+}
+
+defineTest(qtConfCommandline_string) {
+ opt = $${1}
+ val = $${2}
+ isEmpty(val): val = $$qtConfGetNextCommandlineArg()
+
+ contains(val, "^-.*")|isEmpty(val) {
+ qtConfAddError("No value supplied to command line option $$opt")
+ return()
+ }
+
+ !qtConfValidateValue($$opt, $$val): \
+ return()
+
+ qtConfCommandlineSetInput($$opt, $$val)
+}
+
+defineTest(qtConfCommandline_optionalString) {
+ opt = $${1}
+ val = $${2}
+ isEmpty(val) {
+ v = $$qtConfPeekNextCommandlineArg()
+ contains(v, "^-.*")|isEmpty(v): \
+ val = "yes"
+ else: \
+ val = $$qtConfGetNextCommandlineArg()
+ }
+
+ !qtConfValidateValue($$opt, $$val): \
+ return()
+
+ qtConfCommandlineSetInput($$opt, $$val)
+}
+
+
+defineTest(qtConfCommandline_addString) {
+ opt = $${1}
+ val = $${2}
+ isEmpty(val): val = $$qtConfGetNextCommandlineArg()
+
+ contains(val, "^-.*")|isEmpty(val) {
+ qtConfAddError("No value supplied to command line option $$opt")
+ return()
+ }
+
+ !qtConfValidateValue($$opt, $$val): \
+ return()
+
+ !isEmpty(config.commandline.options.$${opt}.name): \
+ opt = $$eval(config.commandline.options.$${opt}.name)
+
+ config.input.$$opt += $$val
+ export(config.input.$$opt)
+}
+
+defineTest(qtConfParseCommandLine) {
+ for (ever) {
+ c = $$qtConfGetNextCommandlineArg()
+ isEmpty(c): break()
+
+ # parse out opt and val
+ contains(c, "^--?enable-(.*)") {
+ opt = $$replace(c, "^--?enable-(.*)", "\\1")
+ val = yes
+ } else: contains(c, "^--?(disable|no)-(.*)") {
+ opt = $$replace(c, "^--?(disable|no)-(.*)", "\\2")
+ val = no
+ } else: contains(c, "^--?qt-(.*)") {
+ opt = $$replace(c, "^--?qt-(.*)", "\\1")
+ val = qt
+ } else: contains(c, "^--?system-(.*)") {
+ opt = $$replace(c, "^--?system-(.*)", "\\1")
+ val = system
+ } else: contains(c, "^--?(.*)=(.*)") {
+ opt = $$replace(c, "^--?(.*)=(.*)", "\\1")
+ val = $$replace(c, "^--?(.*)=(.*)", "\\2")
+ } else: contains(c, "^--?(.*)") {
+ opt = $$replace(c, "^--?(.*)", "\\1")
+ val =
+ } else {
+ error("Invalid command line parameter $$c")
+ }
+
+ type = $$eval(config.commandline.options.$${opt})
+ isEmpty(type): \
+ type = $$eval(config.commandline.options.$${opt}.type)
+ isEmpty(type) {
+ # no match in the regular options, try matching the prefixes
+ for (p, config.commandline.prefix._KEYS_) {
+ e = "^-$${p}(.*)"
+ contains(c, $$e) {
+ opt = $$eval(config.commandline.prefix.$${p})
+ val = $$replace(c, $$e, "\\1")
+ type = "addString"
+ break()
+ }
+ }
+ }
+ # handle builtin [-no]-feature-xxx
+ isEmpty(type):contains(opt, "feature-(.*)") {
+ # simply skip for now
+ next()
+ }
+
+ isEmpty(type): \
+ error("Unknown command line option $$c")
+
+ call = "qtConfCommandline_$${type}"
+ !defined($$call, test): \
+ error("Command line option '$$c' has unknown type '$$type'.")
+
+ # now that we have opt and value, process it
+ $${call}($$opt, $$val)
+ }
+}
+
+defineTest(qtConfTest_shell) {
+ test = $$eval($${1}.test)
+ dir = $$replace(test, [^/]*$, "")
+ test = $$replace(test, ([^/]*/)*, "")
+ args = $$eval($${1}.args)
+ # replace any things like $$QMAKE_CXX by their values
+ eval(args = $$args)
+
+ test_dir = $$QMAKE_CONFIG_TESTS_DIR/$$dir
+ test_out_dir = $$shadowed($$test_dir)
+ test_cmd_base = "cd $$system_quote($$system_path($$test_out_dir)) &&"
+
+ mkpath($$test_out_dir)|error("Aborting.")
+
+ qtRunLoggedCommand("$$test_cmd_base $$test_dir/$${test} $${args}"): \
+ return(false)
+ return(true)
+}
+
+defineReplace(qtConfToolchainSupportsFlag) {
+ test_out_dir = $$shadowed($$QMAKE_CONFIG_TESTS_DIR)
+ test_cmd_base = "cd $$system_quote($$system_path($$test_out_dir)) &&"
+
+ conftest = "int main() { return 0; }"
+ write_file("$$test_out_dir/conftest.cpp", conftest)|error("Aborting.")
+
+ qtRunLoggedCommand("$$test_cmd_base $$QMAKE_CXX $${1} -o conftest-out conftest.cpp"): \
+ return(true)
+ return(false)
+}
+
+defineTest(qtConfTest_compilerSupportsFlag) {
+ flag = $$eval($${1}.flag)
+
+ return($$qtConfToolchainSupportsFlag($$flag))
+}
+
+defineTest(qtConfTest_linkerSupportsFlag) {
+ flag = $$eval($${1}.flag)
+
+ use_gold_linker: \
+ LFLAGS = -fuse-ld=gold
+
+ return($$qtConfToolchainSupportsFlag($$LFLAGS -Wl,$$flag))
+}
+
+defineReplace(qtConfFindInPath) {
+ ensurePathEnv()
+ for (dir, QMAKE_PATH_ENV) {
+ exists("$$dir/$${1}"): \
+ return("$$dir/$${1}")
+ }
+ return()
+}
+
+defineReplace(qtConfPkgConfigEnv) {
+ equals(QMAKE_HOST.os, Windows) {
+ pfx = "set "
+ sfx = "&"
+ } else {
+ pfx =
+ sfx =
+ }
+ env =
+ !isEmpty(PKG_CONFIG_SYSROOT_DIR): env += "$${pfx}PKG_CONFIG_SYSROOT_DIR=$${PKG_CONFIG_SYSROOT_DIR}$${sfx}"
+ !isEmpty(PKG_CONFIG_LIBDIR): env += "$${pfx}PKG_CONFIG_LIBDIR=$${PKG_CONFIG_LIBDIR}$${sfx}"
+ return($$env)
+}
+
+defineReplace(qtConfPkgConfig) {
+ host = $$1
+ isEmpty(host): host = false
+
+ $$host {
+ pkg_config = $$qtConfFindInPath("pkg-config")
+ isEmpty(pkg_config): \
+ return(false)
+ } else {
+ pkg_config = "$$qtConfPkgConfigEnv() $$PKG_CONFIG"
+ }
+
+ return($$pkg_config)
+}
+
+defineTest(qtConfPkgConfigPackageExists) {
+ isEmpty(1)|isEmpty(2): \
+ return(false)
+
+ !qtRunLoggedCommand("$${1} --exists --silence-errors $${2}"): \
+ return(false)
+
+ return(true)
+}
+
+defineReplace(qtConfPrepareArgs) {
+ arglist = $$split(1)
+ args =
+ for (a, arglist): \
+ args += $$system_quote($$a)
+ return($$args)
+}
+
+defineTest(qtConfTest_pkgConfig) {
+ pkg_config = $$qtConfPkgConfig($$eval($${1}.host))
+ args = $$qtConfPrepareArgs($$eval($${1}.pkg-config-args))
+
+ !qtConfPkgConfigPackageExists($$pkg_config, $$args): \
+ return(false)
+
+ $${1}.libs = $$system("$$pkg_config --libs $$args")
+ $${1}.cflags = $$system("$$pkg_config --cflags $$args")
+ includes = $$system("$$pkg_config --cflags-only-I $$args")
+ includes ~= s/^-I//g
+ $${1}.includedir = $$includes
+ version = $$system("$$pkg_config --modversion $$args")
+ $${1}.version = $$first(version)
+ export($${1}.libs)
+ export($${1}.cflags)
+ export($${1}.includedir)
+ export($${1}.version)
+ return(true)
+}
+
+defineTest(qtConfTest_getPkgConfigVariable) {
+ pkg_config = $$qtConfPkgConfig($$eval($${1}.host))
+ args = $$qtConfPrepareArgs($$eval($${1}.pkg-config-args))
+
+ !qtConfPkgConfigPackageExists($$pkg_config, $$args): \
+ return(false)
+
+ variable = $$eval($${1}.pkg-config-variable)
+ $${1}.value = $$system("$$pkg_config --variable=$$variable $$args")
+ export($${1}.value)
+ return(true)
+}
+
+defineTest(qtConfTest_compile) {
+ test = $$eval($${1}.test)
+
+ # get package config information
+ qtConfTest_pkgConfig($${1})
+
+ test_dir = $$QMAKE_CONFIG_TESTS_DIR/$$test
+ test_out_dir = $$shadowed($$test_dir)
+ test_cmd_base = "cd $$system_quote($$system_path($$test_out_dir)) &&"
+
+ # Disable qmake features which are typically counterproductive for tests
+ qmake_configs = "\"CONFIG -= qt debug_and_release app_bundle lib_bundle\""
+
+ # allow tests to behave differently depending on the type of library
+ # being built (shared/static). e.g. see config.tests/unix/icu
+ shared: \
+ qmake_configs += "\"CONFIG += shared\""
+ else: \
+ qmake_configs += "\"CONFIG += static\""
+
+ # On WinRT we need to change the entry point as we cannot create windows
+ # applications
+ winrt: \
+ qmake_configs += " \"QMAKE_LFLAGS += /ENTRY:main\""
+
+ # add compiler flags
+ !isEmpty(EXTRA_DEFINES): \
+ qmake_configs += "\"DEFINES += $$EXTRA_DEFINES\""
+ !isEmpty(EXTRA_LIBS) \
+ qmake_configs += "\"LIBS += $$EXTRA_LIBS\""
+ !isEmpty(EXTRA_INCLUDEPATH): \
+ qmake_configs += "\"INCLUDEPATH += $$EXTRA_INCLUDEPATH\""
+
+ libs = $$eval($${1}.libs)
+ !isEmpty(libs): \
+ qmake_configs += "\"LIBS += $$libs\""
+
+ includedir = $$eval($${1}.includedir)
+ !isEmpty(includedir): \
+ qmake_configs += "\"INCLUDEPATH *= $$includedir\""
+
+ qmake_configs += $$EXTRA_QMAKE_ARGS
+
+ # Clean up after previous run
+ exists($$test_out_dir/Makefile): qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE distclean")
+
+ mkpath($$test_out_dir)|error("Aborting.")
+
+ !isEmpty(QMAKE_QTCONF): qtconfarg = -qtconf $$QMAKE_QTCONF
+
+ # add possible command line args
+ qmake_configs += $$qtConfPrepareArgs($$eval($${1}.args))
+
+ qtRunLoggedCommand("$$test_cmd_base $$system_quote($$system_path($$QMAKE_QMAKE)) $$qtconfarg $$qmake_configs $$shell_quote($$test_dir)") {
+ qtRunLoggedCommand("$$test_cmd_base $$QMAKE_MAKE"): \
+ return(true)
+ }
+
+ return(false)
+}
+
+defineTest(logn) {
+ log("$${1}$$escape_expand(\\n)")
+}
+
+defineTest(qtLogTestResult) {
+ !isEmpty($${1}.log) {
+ field = $$eval($${1}.log)
+ log_msg = $$eval($${1}.$$field)
+ msg = "test $$1 gave result $$log_msg"
+ } else: $${2} {
+ log_msg = yes
+ msg = "test $$1 succeeded"
+ } else {
+ log_msg = no
+ msg = "test $$1 FAILED"
+ }
+ $$QMAKE_CONFIG_VERBOSE: log_msg = $$msg
+ logn("$$log_msg")
+ write_file($$QMAKE_CONFIG_LOG, msg, append)
+}
+
+defineTest(qtConfIsBoolean) {
+ equals(1, "true")|equals(1, "false"): \
+ return(true)
+ return(false)
+}
+
+defineTest(qtRunSingleTest) {
+ tpfx = config.tests.$${1}
+ defined($${tpfx}.result, var): \
+ return()
+
+ type = $$eval($${tpfx}.type)
+ call = "qtConfTest_$$type"
+ !defined($$call, test): \
+ error("Configure test $${1} refers to nonexistent type $$type")
+
+ description = $$eval($${tpfx}.description)
+ !isEmpty(description) {
+ msg = "checking for $${description}... "
+ log($$msg)
+ $$QMAKE_CONFIG_VERBOSE: log("$$escape_expand(\\n)")
+ write_file($$QMAKE_CONFIG_LOG, msg, append)
+ }
+
+ msg = "executing config test $${1}")
+ write_file($$QMAKE_CONFIG_LOG, msg, append)
+
+ result = false
+ $${call}($${tpfx}): result = true
+
+ !isEmpty(description): qtLogTestResult($${tpfx}, $$result)
+ $${tpfx}.result = $$result
+ export($${tpfx}.result)
+}
+
+defineReplace(qtConfEvaluate) {
+ isEmpty(1): return(true)
+
+ expr = $${1}
+ expr ~= s/&&/ && /g
+ expr ~= s/\|\|/ || /g
+ expr ~= s/!/ ! /g
+ expr ~= s/\\(/ ( /g
+ expr ~= s/\\)/ ) /g
+ expr ~= s/ *== */==/g
+ expr ~= s/ *! = */!=/g
+ expr_list = $$eval($$list($$expr))
+ return($$qtConfEvaluateSubExpression($${1}, $$expr_list, 0))
+}
+
+defineReplace(qtConfEvaluateSingleExpression) {
+ e = $${2}
+
+ equals(e, true) {
+ result = true
+ } else: equals(e, false) {
+ result = false
+ } else: contains(e, "^[0-9]+$") {
+ # numbers
+ result = $$e
+ } else: contains(e, "^'.*'$") {
+ # quoted literals
+ result = $$replace(e, "^'(.*)'$", "\\1")
+ } else: contains(e, "^tests\..*") {
+ !qt_conf_tests_allowed: \
+ error("Expression '$${1}' refers to a test, which is not allowed at this stage of configuring.")
+ test = $$section(e, ".", 1, 1)
+ var = $$section(e, ".", 2, -1)
+ isEmpty(var): \
+ var = result
+ !contains(config.tests._KEYS_, $$test): \
+ error("Unknown test object $${test} in expression '$${1}'.")
+ qtRunSingleTest($$test)
+ result = $$eval(config.tests.$${test}.$${var})
+ } else: contains(e, "^features\..*") {
+ feature = $$section(e, ".", 1, 1)
+ var = $$section(e, ".", 2, -1)
+ isEmpty(var): \
+ var = available
+ !contains(config.features._KEYS_, $$feature): \
+ error("Unknown feature object $${feature} in expression '$${1}'.")
+ !qtConfCheckFeature($$feature): \
+ error("Expression '$$1' is accessing non-emitted feature $${feature}.")
+ result = $$eval(config.features.$${feature}.$${var})
+ } else: contains(e, "^config\..*") {
+ var = $$replace(e, "^config\.", "")
+ result = false
+ contains(CONFIG, $$var): result = true
+ } else: contains(e, "^arch\..*") {
+ var = $$replace(e, "^arch\.", "")
+ result = false
+ contains(QT_ARCH, $$var): result = true
+ } else: contains(e, "^input\..*") {
+ result = $$eval(config.$$e)
+ } else: contains(e, "^var\..*") {
+ var = $$replace(e, "^var\.", "")
+ result = $$eval($$var)
+ } else: contains(e, "^call\..*") {
+ call = $$replace(e, "^call\.", "qtConfFunc_")
+ !defined($$call, replace): \
+ error("Call $$call referenced in expression '$${1}' does not exist")
+ eval(result = \$\$"$$call"())
+ } else {
+ error("Unrecognized token $$e in expression '$${1}'")
+ }
+ return($$result)
+}
+
+defineReplace(qtConfEvaluateSubExpression) {
+ expr_list = $${2}
+ result = true
+ negate = false
+ runSubExpression = false
+ nesting_level = 0
+ for (n, $${3}..$$num_add($$size(expr_list), -1)) {
+ e = $$member(expr_list, $$n)
+ $$runSubExpression {
+ runSubExpression = false
+ result = $$qtConfEvaluateSubExpression($${1}, $$expr_list, $$n)
+ } else: isEqual(e, "(") {
+ isEqual(nesting_level, 0): runSubExpression = true
+ nesting_level = $$num_add($$nesting_level, 1)
+ next()
+ } else: isEqual(e, ")") {
+ nesting_level = $$num_add($$nesting_level, -1)
+ lessThan(nesting_level, 0): break()
+ next()
+ } else: greaterThan(nesting_level, 0) {
+ next()
+ } else: isEqual(e, "!") {
+ negate = true
+ next()
+ } else: isEqual(e, "&&") {
+ !qtConfIsBoolean($$result): \
+ error("Left hand side of && is non-boolean value '$$result' in expression '$${1}'")
+ !$$result: return(false)
+ } else: isEqual(e, "||") {
+ !qtConfIsBoolean($$result): \
+ error("Left hand side of || is non-boolean value '$$result' in expression '$${1}'")
+ $$result: return(true)
+ } else {
+ contains(e, ".*==.*") {
+ lhs = $$qtConfEvaluateSingleExpression($${1}, $$replace(e, "==.*", ""))
+ rhs = $$qtConfEvaluateSingleExpression($${1}, $$replace(e, ".*==", ""))
+ result = false
+ equals(lhs, $$rhs): result = true
+ } else: contains(e, ".*!=.*") {
+ lhs = $$qtConfEvaluateSingleExpression($${1}, $$replace(e, "!=.*", ""))
+ rhs = $$qtConfEvaluateSingleExpression($${1}, $$replace(e, ".*!=", ""))
+ result = false
+ !equals(lhs, $$rhs): result = true
+ } else {
+ result = $$qtConfEvaluateSingleExpression($${1}, $$e)
+ }
+ }
+ $$negate {
+ !qtConfIsBoolean($$result): \
+ error("Attempting to negate a non-boolean value '$$result' in expression '$${1}'")
+ $$result: \
+ result = false
+ else: \
+ result = true
+ negate = false
+ }
+ }
+ return($$result)
+}
+
+defineReplace(qtIsFeatureEnabled) {
+ enable = $$eval(config.features.$${1}.enable)
+ !isEmpty(enable) {
+ $$qtConfEvaluate($$enable): \
+ return(true)
+ } else {
+ equals(config.input.$${1}, "yes"): \
+ return(true)
+ }
+
+ return(false)
+}
+
+defineReplace(qtIsFeatureDisabled) {
+ disable = $$eval(config.features.$${1}.disable)
+ !isEmpty(disable) {
+ $$qtConfEvaluate($$disable): \
+ return(true)
+ } else {
+ equals(config.input.$${1}, "no"): \
+ return(true)
+ }
+
+ return(false)
+}
+
+defineReplace(qtConfCheckSingleCondition) {
+ result = $$qtConfEvaluate($$2)
+
+ !qtConfIsBoolean($$result): \
+ error("Evaluation of condition '$$2' yielded non-boolean value '$$result' in feature '$${1}'.")
+
+ !$$result {
+ $${3} {
+ qtConfAddError("Feature '$${1}' was enabled, but the pre-condition '$$2' failed.")
+ $$result = true
+ }
+ }
+ return($$result)
+}
+
+defineTest(qtConfCheckFeature) {
+ fpfx = config.features.$${1}
+
+ available = $$eval($${fpfx}.available)
+ !isEmpty(available): return(true)
+
+ # skip features that will not get emitted anyway
+ emitIf = $$qtConfEvaluate($$eval($${fpfx}.emitIf))
+ enabled = $$qtIsFeatureEnabled($$1)
+ disabled = $$qtIsFeatureDisabled($$1)
+
+ !$$emitIf {
+ $$enabled|$$disabled: \
+ qtConfAddWarning("Feature $${1} is insignificant in this configuration, ignoring related command line option(s).")
+ return(false)
+ }
+
+ $$disabled {
+ result = false
+ } else: !$$enabled:!$$qtConfEvaluate($$eval($${fpfx}.autoDetect)) {
+ # feature not auto-detected and not explicitly enabled
+ result = false
+ } else {
+ condition = $$eval($${fpfx}.condition)
+ !isEmpty(condition) {
+ result = $$qtConfCheckSingleCondition($$1, $$condition, $$enabled)
+ } else {
+ result = true
+ # check whether we have an array of conditions
+ for (i, $${fpfx}.condition._KEYS_) {
+ condition = $$eval($${fpfx}.condition.$$i)
+ result = $$qtConfCheckSingleCondition($$1, $$condition, $$enabled)
+ !$$result: break()
+ }
+ }
+ }
+ $${fpfx}.available = $$result
+ export($${fpfx}.available)
+
+ for (i, config.features.$${feature}.output._KEYS_): \
+ qtConfProcessOneOutput($$feature, $$i)
+
+ return(true)
+}
+
+
+defineTest(qtConfProcessFeatures) {
+ priorities = 0
+ for (feature, config.features._KEYS_): \
+ priorities += $$eval(config.features.$${feature}.priority)
+ priorities = $$unique(priorities)
+
+ for (p, priorities): \
+ opriorities += $$format_number($$num_add($$p, 10000), width=5 zeropad)
+ opriorities = $$sorted(opriorities)
+
+ priorities =
+ for (op, opriorities): \
+ priorities += $$num_add($$op, -10000)
+
+ for (priority, priorities) {
+ for (feature, config.features._KEYS_) {
+ p = $$eval(config.features.$${feature}.priority)
+ isEmpty(p): p = 0
+ equals(p, $$priority): \
+ qtConfCheckFeature($$feature)
+ }
+ }
+}
+
+#
+# reporting
+#
+
+QT_CONF_REPORT_PADDING = "........................................"
+
+defineTest(qtConfReportPadded) {
+ pad = $$num_add($$str_size($$QT_CONF_REPORT_PADDING), -$$str_size($${1}))
+ lessThan(pad, 0): pad = 0
+ str = "$$1 $$str_member($$QT_CONF_REPORT_PADDING, 0, $$pad)"
+
+ qtConfAddReport("$$str $${2}")
+}
+
+defineReplace(qtConfCollectFeatures) {
+ l =
+ for (feature, $$list($${1})) {
+ $$eval(config.features.$${feature}.available): \
+ l += $$feature
+ }
+
+ isEmpty(l): return("<none>")
+ return($$join(l, ' '))
+}
+
+defineTest(qtConfReport_featureList) {
+ qtConfReportPadded($${1}, $$qtConfCollectFeatures($${2}))
+}
+
+defineReplace(qtConfFindFirstAvailableFeature) {
+ for (feature, $$list($${1})) {
+ isEmpty(config.features.$${feature}._KEYS_): \
+ error("Asking for a report on undefined feature $${2}.")
+ $$eval(config.features.$${feature}.available): \
+ return($$feature)
+ }
+
+ return("<none>")
+}
+
+defineTest(qtConfReport_firstAvailableFeature) {
+ qtConfReportPadded($${1}, $$qtConfFindFirstAvailableFeature($${2}))
+}
+
+defineTest(qtConfReport_feature) {
+ !contains(config.features._KEYS_, $$2): \
+ error("Asking for a report on undefined feature $${2}.")
+
+ # hide report for not emitted features
+ isEmpty(config.features.$${2}.available): \
+ return()
+
+ $$eval(config.features.$${2}.available) {
+ result = "yes"
+ !isEmpty(3): result = "$${3}"
+ } else {
+ result = "no"
+ !isEmpty(4): result = "$${4}"
+ }
+
+ qtConfReportPadded($${1}, $$result)
+}
+
+defineTest(qtConfReport_note) {
+ qtConfAddNote($${1})
+}
+
+defineTest(qtConfReport_warning) {
+ qtConfAddWarning($${1})
+}
+
+defineTest(qtConfReport_error) {
+ qtConfAddError($${1})
+}
+
+defineTest(qtConfCreateReportRecurse) {
+ equals(2, false) {
+ indent = ""
+ recurse = false
+ } else {
+ indent = $${2}
+ recurse = true
+ }
+
+ keys = $$eval($${1}._KEYS_)
+ for (n, keys) {
+ entry = $${1}.$$n
+ subKeys = $$eval($${entry}._KEYS_)
+ contains(subKeys, condition) {
+ condition = $$eval($${entry}.condition)
+ r = $$qtConfEvaluate($$condition)
+ !qtConfIsBoolean($$r): \
+ error("Evaluation of condition '$$condition' in report entry $${entry} yielded non-boolean value '$$r'.")
+ !$$r: next()
+ }
+ contains(subKeys, "section") {
+ !$$recurse: \
+ error("Report type 'section' is not allowed in '$$1'.")
+ section = $$eval($${entry}.section)
+ qtConfAddReport("$$indent$$section:")
+ qtConfCreateReportRecurse("$${entry}.entries", "$$indent ")
+ } else: !isEmpty($${entry}) {
+ feature = $$eval($${entry})
+ text = $$eval(config.features.$${feature}.description)
+ qtConfReport_feature($$indent$$text, $$feature)
+ } else {
+ text = $$eval($${entry}.message)
+ isEmpty($${entry}.type): \
+ error("Report entry $${entry} doesn't define a type.")
+ r = "qtConfReport_$$eval($${entry}.type)"
+ !defined($$r, test): \
+ error("Undefined report type $$eval($${entry}.type) used in report entry $${entry}.")
+ args = $$eval($${entry}.args)
+ $${r}($$indent$${text}, $$args)
+ }
+ }
+}
+
+defineTest(qtConfProcessEarlyChecks) {
+ qtConfCreateReportRecurse(config.earlyReport, false)
+ qtConfCheckErrors()
+}
+
+
+defineTest(qtConfCreateReport) {
+ qtConfAddReport(" ")
+ qtConfCreateReportRecurse(config.report, false)
+}
+
+defineTest(qtConfCreateSummary) {
+ qtConfCreateReportRecurse(config.summary, "")
+}
+
+defineTest(qtConfPrintReport) {
+ for (n, QT_CONFIGURE_REPORT): \
+ logn($$n)
+ logn(" ")
+
+ !isEmpty(QT_CONFIGURE_NOTES) {
+ for (n, QT_CONFIGURE_NOTES): \
+ logn($$n)
+ logn(" ")
+ }
+
+ !isEmpty(QT_CONFIGURE_WARNINGS) {
+ for (w, QT_CONFIGURE_WARNINGS): \
+ logn($$w)
+ logn(" ")
+ }
+
+ !isEmpty(QT_CONFIGURE_ERRORS) {
+ for (e, QT_CONFIGURE_ERRORS): \
+ logn($$e)
+ !$$QMAKE_CONFIG_VERBOSE: logn("Check config.log for details.")
+ logn(" ")
+
+ !equals(config.input.continue, yes): \
+ error("Aborting.")
+ }
+}
+
+defineTest(qtConfCheckErrors) {
+ !isEmpty(QT_CONFIGURE_ERRORS):!equals(config.input.continue, yes): \
+ qtConfPrintReport()
+}
+
+#
+# output generation
+#
+
+defineReplace(qtConfOutputSelectProFile) {
+ !isEmpty($${1}.public) {
+ $$eval($${1}.public): \
+ return(publicPro)
+ }
+ return(privatePro)
+}
+
+
+# qtConfOutputVar(modifier, output, name, value)
+defineTest(qtConfOutputVar) {
+ modifier = $$1
+ output = $$2
+ name = $$3
+ value = $$val_escape(4)
+
+ !isEmpty(config.output.$${output}.assign.$${name}): \
+ error("Trying to overwrite assigned variable '$$name' in '$$output' using modifier '$$modifier'.")
+
+ equals(modifier, assign) {
+ !isEmpty(config.output.$${output}.append.$${name})|!isEmpty(config.output.$${output}.remove.$${name}): \
+ error("Trying to assign variable '$$name' in '$$output', which has already appended or removed parts.")
+ config.output.$${output}.$${modifier}.$${name} = $$value
+ } else: equals(modifier, append) {
+ contains(config.output.$${output}.remove.$${name}, $$value): \
+ error("Trying to append removed '$$value' to variable '$$name' in '$$output'.")
+ config.output.$${output}.$${modifier}.$${name} += $$value
+ } else: equals(modifier, remove) {
+ contains(config.output.$${output}.append.$${name}, $$value): \
+ error("Trying to remove appended '$$value' to variable '$$name' in '$$output'.")
+ config.output.$${output}.$${modifier}.$${name} += $$value
+ } else {
+ error("Invalid modifier '$$modifier' passed to qtConfOutputVar.")
+ }
+ config.output.$${output}.$${modifier}._KEYS_ *= $${name}
+ export(config.output.$${output}.$${modifier}.$${name})
+ export(config.output.$${output}.$${modifier}._KEYS_)
+}
+
+defineTest(qtConfOutputVarHelper) {
+ negative = $$eval($${2}.negative)
+ isEmpty(negative): negative = false
+ !$${3}:!$$negative: return()
+ $${3}:$$negative: return()
+
+ output = $$qtConfOutputSelectProFile($${2})
+ name = $$eval($${2}.name)
+ isEmpty(name): \
+ error("Output type 'var$$title($$1)' used in feature '$$eval($${2}.feature)' without a 'name' entry.")
+
+ value = $$qtConfEvaluate($$eval($${2}.value))
+ qtConfOutputVar($$1, $$output, $$name, $$value)
+}
+
+defineTest(qtConfOutput_varAssign) {
+ qtConfOutputVarHelper(assign, $$1, $$2)
+}
+
+defineTest(qtConfOutput_varAppend) {
+ qtConfOutputVarHelper(append, $$1, $$2)
+}
+
+defineTest(qtConfOutput_varRemove) {
+ qtConfOutputVarHelper(remove, $$1, $$2)
+}
+
+defineTest(qtConfOutputConfigVar) {
+ pro = $$3
+ var = $$4
+ negative = $$eval($${1}.negative)
+ isEmpty(negative): negative = false
+
+ val = $$eval($${1}.name)
+ isEmpty(val) {
+ val = $$eval($${1}.feature)
+ $$negative: val = no-$$val
+ }
+
+ $${2} {
+ !$$negative: qtConfOutputVar(append, $$pro, $$var, $$val)
+ } else {
+ $$negative: qtConfOutputVar(append, $$pro, $$var, $$val)
+ }
+}
+
+defineTest(qtConfOutput_publicQtConfig) {
+ qtConfOutputConfigVar($$1, $$2, "publicPro", "QT_CONFIG")
+}
+
+defineTest(qtConfOutput_publicConfig) {
+ qtConfOutputConfigVar($$1, $$2, "publicPro", "CONFIG")
+}
+
+defineTest(qtConfOutput_privateConfig) {
+ qtConfOutputConfigVar($$1, $$2, "privatePro", "CONFIG")
+}
+
+defineTest(qtConfOutputSetDefine) {
+ config.output.$${1}.$${2} = $${3}
+ config.output.$${1}._KEYS_ *= $${2}
+ export(config.output.$${1}.$${2})
+ export(config.output.$${1}._KEYS_)
+}
+
+defineTest(qtConfOutput_define) {
+ output = publicHeader
+ define = $$eval($${1}.name)
+ value = $$qtConfEvaluate($$eval($${1}.value))
+ isEmpty(define): \
+ error("Output type 'define' used in feature '$$eval($${1}.feature)' without a 'name' entry.")
+
+ negative = $$eval($${1}.negative)
+ isEmpty(negative): negative = false
+
+ $${2} {
+ !$$negative: qtConfOutputSetDefine($$output, $$define, $$value)
+ } else {
+ $$negative: qtConfOutputSetDefine($$output, $$define, $$value)
+ }
+}
+
+defineTest(qtConfOutput_feature) {
+ name = "$$eval($${1}.name)"
+ isEmpty(name): \
+ name = $$eval($${1}.feature)
+
+ $${2} {
+ qtConfOutputVar(append, "publicPro", "QT_CONFIG", $$name)
+ } else {
+ f = $$upper($$replace(name, -, _))
+ qtConfOutputSetDefine("publicHeader", "QT_NO_$$f")
+ }
+}
+
+# currently this is somewhat inconsistent, as the feature is output to the public pro file,
+# whereas the define is being added to the private pro file.
+# This should get cleaned up to add to the private pro and header instead.
+defineTest(qtConfOutput_privateFeature) {
+ name = "$$eval($${1}.name)"
+ isEmpty(name): \
+ name = $$eval($${1}.feature)
+
+ $${2} {
+ qtConfOutputVar(append, "publicPro", "QT_CONFIG", $$name)
+ } else {
+ f = $$upper($$replace(name, -, _))
+ qtConfOutputVar(append, "privatePro", "DEFINES", "QT_NO_$$f")
+ }
+}
+
+
+defineTest(qtConfOutput_library) {
+ !$${2}: return()
+
+ output = privatePro
+ name = "$$eval($${1}.name)"
+ isEmpty(name): \
+ name = $$eval($${1}.feature)
+ NAME = $$upper($$replace(name, [-.], _))
+
+ lookup = "config.tests.$$eval($${1}.test)"
+ isEmpty(lookup): \
+ error("Output type 'library' used in feature '$$eval($${1}.feature)' without a 'test' entry.")
+
+ libs = $$eval($${lookup}.libs)
+ cflags = $$eval($${lookup}.cflags)
+ includes = $$eval($${lookup}.includedir)
+ version = $$split($${lookup}.version, '.')
+
+ !isEmpty(libs): qtConfOutputVar(assign, $$output, QMAKE_LIBS_$$NAME, $$libs)
+ !isEmpty(cflags): qtConfOutputVar(assign, $$output, QMAKE_CFLAGS_$$NAME, $$cflags)
+ !isEmpty(includes): qtConfOutputVar(assign, $$output, QMAKE_INCDIR_$$NAME, $$includes)
+ !isEmpty(version) {
+ qtConfOutputVar(assign, $$output, QMAKE_$${NAME}_VERSION_MAJOR, $$first(version))
+ qtConfOutputVar(assign, $$output, QMAKE_$${NAME}_VERSION_MINOR, $$member(version, 1))
+ qtConfOutputVar(assign, $$output, QMAKE_$${NAME}_VERSION_PATCH, $$member(version, 2))
+ }
+ export(config.output.$${output})
+}
+
+defineTest(qtConfProcessOneOutput) {
+ feature = $${1}
+ fpfx = config.features.$${feature}
+ opfx = $${fpfx}.output.$${2}
+
+ condition = $$eval($${opfx}.condition)
+ !isEmpty(condition):!$$qtConfEvaluate($$condition): \
+ return()
+
+ call = $$eval($${opfx}.type)
+ isEmpty(call) {
+ # output is just a string, not an object
+ call = $$eval($$opfx)
+ }
+ !defined("qtConfOutput_$$call", test): \
+ error("Undefined type '$$call' in output '$$2' of feature '$$feature'.")
+
+ isEmpty($${opfx}.feature): \
+ $${opfx}.feature = $$feature
+
+ condition = $$eval($${opfx}.condition)
+ !isEmpty(condition) {
+ !$$qtConfEvaluate($$condition): \
+ return(false)
+ }
+
+ qtConfOutput_$${call}($$opfx, $$eval($${fpfx}.available))
+}
+
+defineTest(qtConfProcessOutput) {
+ # write it to the output files
+ for (type, config.files._KEYS_) {
+ file = $$OUT_PWD/$$eval(config.files.$${type})
+ contains(type, ".*Pro") {
+ for (k, config.output.$${type}.assign._KEYS_): \
+ config.output.$$type += "$$k = $$eval(config.output.$${type}.assign.$$k)"
+ for (k, config.output.$${type}.remove._KEYS_): \
+ config.output.$$type += "$$k -= $$eval(config.output.$${type}.remove.$$k)"
+ for (k, config.output.$${type}.append._KEYS_): \
+ config.output.$$type += "$$k += $$eval(config.output.$${type}.append.$$k)"
+ } else {
+ for (define, config.output.$${type}._KEYS_) {
+ value = $$eval(config.output.$${type}.$${define})
+ config.output.$$type += "$${LITERAL_HASH}ifndef $$define"
+ config.output.$$type += "$${LITERAL_HASH}define $$define $$value"
+ config.output.$$type += "$${LITERAL_HASH}endif"
+ }
+ }
+ defined(qtConfOutputPostProcess_$${type}, test): \
+ qtConfOutputPostProcess_$${type}()
+
+ write_file($$file, config.output.$${type})|error("Aborting.")
+ }
+}
+
+#
+# tie it all together
+#
+
+defineTest(qtConfigure) {
+ # load configuration data
+ configure_data = $$cat($${1}, blob)
+ !parseJson(configure_data, config): \
+ error("Invalid or non-existent file $${1}.")
+
+ qtConfParseCommandLine()
+
+ # do early checks, mainly to validate the command line
+ qtConfProcessEarlyChecks()
+
+ CONFIG += qt_conf_tests_allowed
+ logn(" ")
+ logn("Running configuration tests...")
+
+ # process all features
+ qtConfProcessFeatures()
+
+ # generate files and reports
+ qtConfProcessOutput()
+ qtConfCreateReport()
+ qtConfCreateSummary()
+
+ logn("Done running configuration tests.")
+ logn(" ")
+}
+
+qtConfigure($$_PRO_FILE_PWD_/configure.json)
+
+logn("Configure summary:")
+logn(" ")
+
+qtConfPrintReport()