diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 366 |
1 files changed, 287 insertions, 79 deletions
@@ -643,6 +643,7 @@ CFG_XINPUT2=auto CFG_XINPUT=runtime CFG_XKB=auto CFG_XKBCOMMON=yes +CFG_XKBCOMMON_EVDEV=auto CFG_XKB_CONFIG_ROOT=auto CFG_XCB=auto CFG_XCB_XLIB=auto @@ -652,9 +653,10 @@ CFG_DIRECTFB=auto CFG_LINUXFB=auto CFG_KMS=auto CFG_LIBUDEV=auto +CFG_LIBINPUT=auto CFG_OBSOLETE_WAYLAND=no CFG_EVDEV=auto -CFG_TSLIB=no +CFG_TSLIB=auto CFG_NIS=auto CFG_CUPS=auto CFG_ICONV=auto @@ -705,6 +707,7 @@ XPLATFORM_IOS=no # Whether target platform is iOS XPLATFORM_ANDROID=no XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*) XPLATFORM_QNX=no +XPLATFORM_HAIKU=no PLATFORM=$QMAKESPEC QT_CROSS_COMPILE=no OPT_CONFIRM_LICENSE=no @@ -717,6 +720,11 @@ 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 QPA_PLATFORM_GUARD=yes CFG_CXX11=auto @@ -779,7 +787,7 @@ CFG_DEFAULT_ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT CFG_DEFAULT_ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT CFG_DEFAULT_ANDROID_PLATFORM=android-9 CFG_DEFAULT_ANDROID_TARGET_ARCH=armeabi-v7a -CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION=4.8 +CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION=4.9 CFG_DEFAULT_ANDROID_NDK_HOST=$ANDROID_NDK_HOST #------------------------------------------------------------------------------- @@ -888,6 +896,7 @@ while [ "$#" -gt 0 ]; do -qpa| \ -qconfig| \ -qreal| \ + -sanitize| \ -xkb-config-root| \ -android-sdk| \ -android-ndk| \ @@ -1159,6 +1168,25 @@ while [ "$#" -gt 0 ]; do 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" ;; @@ -1697,7 +1725,14 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; - xkbcommon) + 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 @@ -1759,6 +1794,13 @@ while [ "$#" -gt 0 ]; do 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" @@ -2335,74 +2377,77 @@ Configure options: Third Party Libraries: - -qt-zlib ........... Use the zlib bundled with Qt. - + -system-zlib ....... Use zlib from the operating system. - See http://www.gzip.org/zlib + -qt-zlib ............ Use the zlib bundled with Qt. + + -system-zlib ........ Use zlib from the operating system. + See http://www.gzip.org/zlib - -no-mtdev ......... Do not compile mtdev support. - + -mtdev ............. Enable mtdev support. + -no-mtdev ........... Do not compile mtdev support. + + -mtdev .............. Enable mtdev support. - + -no-journald ....... Do not send logging output to journald. - -journald .......... Send logging output to journald. + + -no-journald ........ Do not send logging output to journald. + -journald ........... Send logging output to journald. - -no-gif ............ Do not compile GIF reading support. + -no-gif ............. Do not compile GIF reading support. - -no-libpng ......... Do not compile PNG support. - -qt-libpng ......... Use the libpng bundled with Qt. - + -system-libpng ..... Use libpng from the operating system. - See http://www.libpng.org/pub/png + -no-libpng .......... Do not compile PNG support. + -qt-libpng .......... Use the libpng bundled with Qt. + + -system-libpng ...... Use libpng from the operating system. + See http://www.libpng.org/pub/png - -no-libjpeg ........ Do not compile JPEG support. - -qt-libjpeg ........ Use the libjpeg bundled with Qt. - + -system-libjpeg .... Use libjpeg from the operating system. - See http://www.ijg.org + -no-libjpeg ......... Do not compile JPEG support. + -qt-libjpeg ......... Use the libjpeg bundled with Qt. + + -system-libjpeg ..... Use libjpeg from the operating system. + See http://www.ijg.org - -no-freetype ....... Do not compile in Freetype2 support. - -qt-freetype ....... Use the libfreetype bundled with Qt. - + -system-freetype.... Use the libfreetype provided by the system (enabled if -fontconfig is active). - See http://www.freetype.org + -no-freetype ........ Do not compile in Freetype2 support. + -qt-freetype ........ Use the libfreetype bundled with Qt. + + -system-freetype..... Use the libfreetype provided by the system (enabled if -fontconfig is active). + See http://www.freetype.org - -no-harfbuzz ....... Do not compile HarfBuzz-NG support. - * -qt-harfbuzz ....... Use HarfBuzz-NG bundled with Qt to do text shaping. - It can still be disabled by setting - the QT_HARFBUZZ environment variable to "old". - -system-harfbuzz ... Use HarfBuzz-NG from the operating system - to do text shaping. It can still be disabled - by setting the QT_HARFBUZZ environment variable to "old". - See http://www.harfbuzz.org + -no-harfbuzz ........ Do not compile HarfBuzz-NG support. + * -qt-harfbuzz ........ Use HarfBuzz-NG bundled with Qt to do text shaping. + It can still be disabled by setting + the QT_HARFBUZZ environment variable to "old". + -system-harfbuzz .... Use HarfBuzz-NG from the operating system + to do text shaping. It can still be disabled + by setting the QT_HARFBUZZ environment variable to "old". + See http://www.harfbuzz.org - -no-openssl ........ Do not compile support for OpenSSL. - + -openssl ........... Enable run-time OpenSSL support. - -openssl-linked .... Enabled linked OpenSSL support. + -no-openssl ......... Do not compile support for OpenSSL. + + -openssl ............ Enable run-time OpenSSL support. + -openssl-linked ..... Enabled linked OpenSSL support. - -qt-pcre ........... Use the PCRE library bundled with Qt. - + -system-pcre ....... Use the PCRE library from the operating system. + -qt-pcre ............ Use the PCRE library bundled with Qt. + + -system-pcre ........ Use the PCRE library from the operating system. - -qt-xcb ............ Use xcb- libraries bundled with Qt. - (libxcb.so will still be used from operating system). - + -system-xcb ........ Use xcb- libraries from the operating system. + -qt-xcb ............. Use xcb- libraries bundled with Qt. + (libxcb.so will still be used from operating system). + + -system-xcb ......... Use xcb- libraries from the operating system. - -xkb-config-root ... Set default XKB config root. This option is used only together with -qt-xkbcommon. - -qt-xkbcommon ...... Use the xkbcommon library bundled with Qt. - + -system-xkbcommon .. Use the xkbcommon library from the operating system. + -xkb-config-root .... Set default XKB config root. This option is used only together with -qt-xkbcommon-x11. + -qt-xkbcommon-x11 ... Use the xkbcommon library bundled with Qt in combination with xcb. + + -system-xkbcommon-x11 Use the xkbcommon library from the operating system in combination with xcb. - -no-xinput2 ........ Do not compile XInput2 support. - * -xinput2 ........... Compile XInput2 support. + -no-xkbcommon-evdev . Do not use X-less xkbcommon when compiling libinput support. + * -xkbcommon-evdev .... Use X-less xkbcommon when compiling libinput support. - -no-xcb-xlib........ Do not compile Xcb-Xlib support. - * -xcb-xlib........... Compile Xcb-Xlib support. + -no-xinput2 ......... Do not compile XInput2 support. + * -xinput2 ............ Compile XInput2 support. - -no-glib ........... Do not compile Glib support. - + -glib .............. Compile Glib support. + -no-xcb-xlib......... Do not compile Xcb-Xlib support. + * -xcb-xlib............ Compile Xcb-Xlib support. - -no-pulseaudio ..... Do not compile PulseAudio support. - + -pulseaudio ........ Compile PulseAudio support. + -no-glib ............ Do not compile Glib support. + + -glib ............... Compile Glib support. - -no-alsa ........... Do not compile ALSA support. - + -alsa .............. Compile ALSA support. + -no-pulseaudio ...... Do not compile PulseAudio support. + + -pulseaudio ......... Compile PulseAudio support. - -no-gtkstyle ....... Do not compile GTK theme support. - + -gtkstyle .......... Compile GTK theme support. + -no-alsa ............ Do not compile ALSA support. + + -alsa ............... Compile ALSA support. + + -no-gtkstyle ........ Do not compile GTK theme support. + + -gtkstyle ........... Compile GTK theme support. Additional options: @@ -2454,6 +2499,9 @@ Additional options: -no-evdev .......... Do not compile support for evdev. * -evdev ............. Compile support for evdev. + -no-tslib .......... Do not compile support for tslib. + * -tslib ............. Compile support for tslib. + -no-icu ............ Do not compile support for ICU libraries. + -icu ............... Compile support for ICU libraries. @@ -2479,6 +2527,8 @@ Additional options: -force-asserts ........ Force Q_ASSERT to be enabled even in release builds. + -sanitize [address|thread|memory|undefined] Enables the specified compiler sanitizer. + -device <name> ............... Cross-compile for device <name> (experimental) -device-option <key=value> ... Add device specific options for the device mkspec (experimental) @@ -2524,6 +2574,9 @@ Additional options: OpenGL ES 2.0 and higher, or regular desktop OpenGL. Use es2 for <api> to override auto-detection. + -no-libinput ........ Do not support libinput. + * -libinput ........... Enable libinput support. + * -no-system-proxies .. Do not use system network proxies by default. -system-proxies ..... Use system network proxies by default. @@ -2573,7 +2626,8 @@ Android options: -android-ndk-host .............. Sets the android NDK host (linux-x86, linux-x86_64, etc.) (default \$ANDROID_NDK_HOST) - -android-arch .................. Sets the android architecture (armeabi, armeabi-v7a, x86, mips) + -android-arch .................. Sets the android architecture (armeabi, armeabi-v7a, x86, mips, + arm64-v8a, x86_64, mips64) (default $CFG_DEFAULT_ANDROID_TARGET_ARCH) -android-toolchain-version ..... Sets the android toolchain version @@ -2771,6 +2825,9 @@ case "$XPLATFORM" in *qnx-*|*blackberry-*) XPLATFORM_QNX=yes ;; + *haiku-*) + XPLATFORM_HAIKU=yes + ;; *ios*) XPLATFORM_MAC=yes XPLATFORM_IOS=yes @@ -2960,7 +3017,7 @@ if [ "$XPLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then fi if ( [ "$CFG_XCB" = "system" ] || [ "$CFG_XCB" = "qt" ] ) && [ "$CFG_XKBCOMMON" = "no" ]; then - echo "Error: -no-xkbcommon is not supported on XCB platform plugin." + echo "Error: -no-xkbcommon-x11 is not supported on XCB platform plugin." exit 101 fi @@ -3178,27 +3235,46 @@ 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=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_TOOLS_PREFIX-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST/bin/$ANDROID_NDK_TOOLS_PREFIX-g++ + 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" @@ -3778,17 +3854,21 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; EXEEXT= fi if [ "$BUILD_ON_MAC" = "yes" ]; then + echo "COCOA_LFLAGS =-framework Foundation -framework CoreServices" >>"$mkfile" echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile" echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile" + EXTRA_LFLAGS="$EXTRA_LFLAGS \$(COCOA_LFLAGS)" EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)" EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)" EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)" EXTRA_OBJS="$EXTRA_OBJS \ qsettings_mac.o \ - qcore_mac.o" + qcore_mac.o \ + qcore_mac_objc.o" EXTRA_SRCS="$EXTRA_SRCS \ \"\$(SOURCE_PATH)/src/corelib/io/qsettings_mac.cpp\" \ - \"\$(SOURCE_PATH)/src/corelib/kernel/qcore_mac.cpp\"" + \"\$(SOURCE_PATH)/src/corelib/kernel/qcore_mac.cpp\" \ + \"\$(SOURCE_PATH)/src/corelib/kernel/qcore_mac_objc.mm\"" fi if [ '!' -z "$D_FLAGS" ]; then EXTRA_CFLAGS="$EXTRA_CFLAGS $D_FLAGS" @@ -3831,7 +3911,22 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; fi done - (cd "$outpath/qmake"; "$MAKE") || exit 2 + if [ "$OPT_VERBOSE" = yes ]; then + # Show the output of make + (cd "$outpath/qmake"; "$MAKE") || exit 2 + else + # Hide the output of make + # Use bash to print dots, if we have it + if $WHICH bash > /dev/null 2>/dev/null; then + bash -c 'set -o pipefail + cd "$0/qmake"; "$1" | while read line; do + builtin echo -n . + done' "$outpath" "$MAKE" || exit 2 + else + (cd "$outpath/qmake"; "$MAKE" -s) || exit 2 + fi + echo "Done." + fi fi # Build qmake echo "Running configuration tests..." @@ -3966,6 +4061,46 @@ compileTest() "$unixtests/compile.test" "$XQMAKESPEC" "$test_config" $OPT_VERBOSE "$relpath" "$outpath" "$path" "$name" $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 #------------------------------------------------------------------------------- @@ -4184,6 +4319,18 @@ 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" ] ; then + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SYSTEMSEMAPHORE QT_NO_SHAREDMEMORY" + fi + fi +fi + # detect zlib if [ "$CFG_ZLIB" = "no" ]; then # Note: Qt no longer support builds without zlib @@ -4853,9 +5000,9 @@ fi # auto-detect OpenGL support (es2 = OpenGL ES 2.0 or higher) if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then - if compileTest unix/opengldesktop "OpenGL"; then + if compileTestWithPkgConfig gl unix/opengldesktop "OpenGL" OPENGL; then CFG_OPENGL=desktop - elif compileTest unix/opengles2 "OpenGL ES 2.0"; then + elif compileTestWithPkgConfig glesv2 unix/opengles2 "OpenGL ES 2.0" OPENGL_ES2; then CFG_OPENGL=es2 else if [ "$CFG_OPENGL" = "yes" ]; then @@ -4869,17 +5016,8 @@ if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then fi elif [ "$CFG_OPENGL" = "es2" ]; then #OpenGL ES 2.0 - if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists glesv2 2>/dev/null; then - QMAKE_INCDIR_OPENGL_ES2=`$PKG_CONFIG --cflags-only-I glesv2 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'` - QMAKE_LIBDIR_OPENGL_ES2=`$PKG_CONFIG --libs-only-L glesv2 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'` - QMAKE_LIBS_OPENGL_ES2=`$PKG_CONFIG --libs glesv2 2>/dev/null` - QMAKE_CFLAGS_OPENGL_ES2=`$PKG_CONFIG --cflags glesv2 2>/dev/null` - QMakeVar set QMAKE_INCDIR_OPENGL_ES2 "`shellArgumentListToQMakeList "$QMAKE_INCDIR_OPENGL_ES2"`" - QMakeVar set QMAKE_LIBDIR_OPENGL_ES2 "`shellArgumentListToQMakeList "$QMAKE_LIBDIR_OPENGL_ES2"`" - QMakeVar set QMAKE_LIBS_OPENGL_ES2 "`shellArgumentListToQMakeList "$QMAKE_LIBS_OPENGL_ES2"`" - fi - compileTest unix/opengles2 "OpenGL ES 2.0" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2 + 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 -force-pkg-config?" @@ -4890,7 +5028,7 @@ elif [ "$CFG_OPENGL" = "es2" ]; then fi elif [ "$CFG_OPENGL" = "desktop" ]; then # Desktop OpenGL support - compileTest unix/opengldesktop "OpenGL" + 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" @@ -4905,11 +5043,11 @@ fi # 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 compileTest unix/opengles3 "OpenGL ES 3.0" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_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 compileTest unix/opengles31 "OpenGL ES 3.1" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2; then + 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 @@ -4992,6 +5130,50 @@ if [ "$CFG_TSLIB" != "no" ]; then 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` + 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 +fi +if [ "$CFG_LIBINPUT" = "no" ]; then + QMakeVar add DEFINES QT_NO_LIBINPUT +fi # Check we actually have X11 :-) if compileTest x11/xlib "XLib"; then @@ -5321,7 +5503,7 @@ if [ "$CFG_KMS" = "yes" ]; then QT_CONFIG="$QT_CONFIG kms" fi -if [ "$XPLATFORM_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ] && [ "$XPLATFORM_ANDROID" = "no" ]; then +if [ "$XPLATFORM_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ] && [ "$XPLATFORM_ANDROID" = "no" ] && [ "$XPLATFORM_HAIKU" = "no" ]; then if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ] && [ "$CFG_LINUXFB" = "no" ] && [ "$CFG_KMS" = "no" ]; then if [ "$QPA_PLATFORM_GUARD" = "yes" ] && ( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] || [ "$ORIG_CFG_LINUXFB" = "auto" ] || [ "$ORIG_CFG_KMS" = "auto" ] ); then @@ -5865,6 +6047,27 @@ if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then QT_CONFIG="$QT_CONFIG force_asserts" 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 @@ -6013,7 +6216,7 @@ fi # ### Vestige if [ "$CFG_QML_DEBUG" = "no" ]; then - QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QML_NO_DEBUGGER" + QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_QML_DEBUGGER" fi case "$QMAKE_CONF_COMPILER" in @@ -6188,6 +6391,7 @@ QMakeVar set sql-plugins "$SQL_PLUGINS" [ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL" [ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER" +[ "$CFG_TSLIB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_TSLIB" [ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR" [ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES" [ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG" @@ -6556,6 +6760,7 @@ else echo " Mode ................... $build_mode" fi unset build_mode release +echo " Using sanitizer(s)...... $CFG_SANITIZERS" echo " Using C++11 ............ $CFG_CXX11" echo " Using gold linker....... $CFG_USE_GOLD_LINKER" echo " Using PCH .............. $CFG_PRECOMPILE" @@ -6604,6 +6809,7 @@ 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 " journald ..............." "$CFG_JOURNALD" +report_support " libinput................" "$CFG_LIBINPUT" report_support " mtdev .................." "$CFG_MTDEV" yes "system library" report_support " Networking:" [ "$XPLATFORM_MAC" = "yes" ] && \ @@ -6664,8 +6870,10 @@ report_support " PostgreSQL ..........." "$CFG_SQL_psql" plugin "plugin" yes report_support " SQLite 2 ............." "$CFG_SQL_sqlite2" plugin "plugin" yes "built into QtSql" report_support_plugin " SQLite ..............." "$CFG_SQL_sqlite" "$CFG_SQLITE" QtSql report_support " TDS .................." "$CFG_SQL_tds" plugin "plugin" yes "built into QtSql" +report_support " tslib .................." "$CFG_TSLIB" report_support " udev ..................." "$CFG_LIBUDEV" -report_support " xkbcommon .............." "$CFG_XKBCOMMON" system "system library" qt "bundled copy, XKB config root: $CFG_XKB_CONFIG_ROOT" +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_ZLIB" system "system library" yes "bundled copy" echo |