SQL: Change in QSqlResultPrivate::positionalToNamedBinding()
[profile/ivi/qtbase.git] / configure
index 364e4da..f2251be 100755 (executable)
--- a/configure
+++ b/configure
@@ -224,28 +224,28 @@ getXQMakeConf()
     getQMakeConf3 "$1" "$xspecvals"
 }
 
-# relies on $TEST_COMPILER being set correctly
 compilerSupportsFlag()
 {
     cat >conftest.cpp <<EOF
 int main() { return 0; }
 EOF
-    "$TEST_COMPILER" "$@" -o conftest.o conftest.cpp
+    "$@" -o conftest-out.o conftest.cpp
     ret=$?
-    rm -f conftest.cpp conftest.o
+    rm -f conftest.cpp conftest-out.o
     return $ret
 }
 
-# relies on $TEST_COMPILER being set correctly
 linkerSupportsFlag()
 {
+    compiler=$1
+    shift
     lflags=-Wl
     for flag
     do
        safe_flag=`shellEscape "$flag"`
        lflags=$lflags,$safe_flag
     done
-    compilerSupportsFlag "$lflags" >/dev/null 2>&1
+    compilerSupportsFlag $compiler $lflags >/dev/null 2>&1
 }
 
 # $1: newline-separated list of default paths
@@ -727,7 +727,7 @@ mkdir -p "$outpath/config.tests"
 rm -f "$outpath/config.tests/.qmake.cache"
 cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
 
-QMakeVar add styles "cde mac motif plastique cleanlooks windows"
+QMakeVar add styles "mac fusion windows"
 
 # QTDIR may be set and point to an old or system-wide Qt installation
 unset QTDIR
@@ -783,6 +783,9 @@ CFG_V8SNAPSHOT=auto
 CFG_QML_DEBUG=yes
 CFG_JAVASCRIPTCORE_JIT=auto
 CFG_PKGCONFIG=auto
+CFG_STACK_PROTECTOR_STRONG=auto
+CFG_SLOG2=auto
+CFG_SYSTEM_PROXIES=no
 
 # Target architecture
 CFG_ARCH=
@@ -794,12 +797,11 @@ CFG_HOST_CPUFEATURES=
 OPT_OBSOLETE_HOST_ARG=no
 
 CFG_USE_GNUMAKE=no
-CFG_IM=yes
 CFG_XINPUT2=auto
 CFG_XINPUT=runtime
 CFG_XKB=auto
 CFG_XCB=auto
-CFG_XCB_LIMITED=yes
+CFG_XCB_GLX=no
 CFG_EGLFS=auto
 CFG_DIRECTFB=auto
 CFG_LINUXFB=auto
@@ -843,7 +845,6 @@ CFG_INOTIFY=auto
 CFG_RPATH=yes
 CFG_FRAMEWORK=auto
 CFG_MAC_HARFBUZZ=no
-CFG_PREFIX_INSTALL=yes
 CFG_SDK=
 DEFINES=
 D_FLAGS=
@@ -880,8 +881,11 @@ QT_INSTALL_DOCS=
 QT_INSTALL_HEADERS=
 QT_INSTALL_LIBS=
 QT_INSTALL_BINS=
+QT_INSTALL_LIBEXECS=
 QT_INSTALL_PLUGINS=
 QT_INSTALL_IMPORTS=
+QT_INSTALL_QML=
+QT_INSTALL_ARCHDATA=
 QT_INSTALL_DATA=
 QT_INSTALL_TRANSLATIONS=
 QT_INSTALL_SETTINGS=
@@ -990,7 +994,7 @@ while [ "$#" -gt 0 ]; do
         VAL=no
         ;;
     #Qt style options that pass an argument
-    -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig)
+    -prefix|-docdir|-headerdir|-plugindir|-importdir|-qmldir|-archdatadir|-datadir|-libdir|-bindir|-libexecdir|-translationdir|-sysconfdir|-examplesdir|-testsdir|-depths|-make|-nomake|-platform|-xplatform|-device|-device-option|-sdk|-arch|-host-arch|-mysql_config|-sysroot|-hostdatadir|-hostbindir|-qpa|-qconfig)
         VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
         shift
         VAL="$1"
@@ -1000,6 +1004,14 @@ 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,"`
@@ -1096,6 +1108,10 @@ while [ "$#" -gt 0 ]; do
             VAL=`echo $1 | sed 's,-R,,'`
         fi
         ;;
+    -largefile)
+        VAR="largefile"
+        VAL="yes"
+        ;;
     -l?*|-l)
         VAR="add_link"
         if [ "$1" = "-l" ]; then
@@ -1197,6 +1213,12 @@ while [ "$#" -gt 0 ]; do
     importdir)
         QT_INSTALL_IMPORTS="$VAL"
         ;;
+    qmldir)
+        QT_INSTALL_QML="$VAL"
+        ;;
+    archdatadir)
+        QT_INSTALL_ARCHDATA="$VAL"
+        ;;
     datadir)
         QT_INSTALL_DATA="$VAL"
         ;;
@@ -1233,6 +1255,9 @@ while [ "$#" -gt 0 ]; do
     bindir)
         QT_INSTALL_BINS="$VAL"
         ;;
+    libexecdir)
+        QT_INSTALL_LIBEXECS="$VAL"
+        ;;
     sse)
         if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
             CFG_SSE="$VAL"
@@ -1265,6 +1290,7 @@ while [ "$#" -gt 0 ]; do
     sdk)
         if [ "$BUILD_ON_MAC" = "yes" ]; then
             CFG_SDK="$VAL"
+            DeviceVar set QMAKE_MAC_SDK "$VAL"
         else
             UNKNOWN_OPT=yes
         fi
@@ -1411,13 +1437,6 @@ while [ "$#" -gt 0 ]; do
             UNKNOWN_OPT=yes
         fi
         ;;
-    prefix-install)
-        if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
-           CFG_PREFIX_INSTALL="$VAL"
-        else
-            UNKNOWN_OPT=yes
-        fi
-       ;;
     debug)
         CFG_DEBUG="$VAL"
         ;;
@@ -1711,8 +1730,11 @@ while [ "$#" -gt 0 ]; do
         fi
         ;;
     xcb)
-        if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+        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
@@ -1783,6 +1805,13 @@ while [ "$#" -gt 0 ]; do
             UNKNOWN_OPT=yes
         fi
         ;;
+    slog2)
+        if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+            CFG_SLOG2="$VAL"
+        else
+            UNKNOWN_OPT=yes
+        fi
+        ;;
     gstreamer)
         if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
             CFG_GSTREAMER="$VAL"
@@ -1880,7 +1909,7 @@ while [ "$#" -gt 0 ]; do
         fi
         ;;
     javascript-jit)
-        if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then 
+        if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then
             CFG_JAVASCRIPTCORE_JIT="$VAL"
         else
             UNKNOWN_OPT=yes
@@ -2080,6 +2109,13 @@ while [ "$#" -gt 0 ]; do
             UNKNOWN_OPT=yes
         fi
         ;;
+    system-proxies)
+        if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
+            CFG_SYSTEM_PROXIES="$VAL"
+        else
+            UNKNOWN_OPT=yes
+        fi
+        ;;
     *)
         UNKNOWN_OPT=yes
         ;;
@@ -2191,7 +2227,7 @@ if [ "$OPT_SHADOW" = "yes" ]; then
     if [ -x "$relpath/bin/syncqt" ]; then
         mkdir -p "$outpath/bin"
         echo "#!/bin/sh" >"$outpath/bin/syncqt"
-        echo "perl \"$relpath/bin/syncqt\" -qtdir \"$outpath\" \"\$@\"" >>"$outpath/bin/syncqt"
+        echo "perl \"$relpath/bin/syncqt\" -mkspecsdir \"$outpath/mkspecs\" \"\$@\"" >>"$outpath/bin/syncqt"
         chmod 755 "$outpath/bin/syncqt"
     fi
 
@@ -2217,7 +2253,6 @@ if [ "$OPT_SHADOW" = "yes" ]; then
     mkdir -p "$outpath/mkspecs"
     rm -rf "$outpath"/mkspecs/*
     ln -s "$relpath"/mkspecs/* "$outpath/mkspecs"
-    rm -f "$outpath/mkspecs/default"
 
     ShadowMkspecs()
     {
@@ -2245,9 +2280,9 @@ if [ "$OPT_SHADOW" = "yes" ]; then
         mv "$outpath/mkspecs-modules-inst" "$outpath/mkspecs/modules-inst"
     fi
 
-    # symlink the doc directory
-    rm -rf "$outpath/doc"
-    ln -s "$relpath/doc" "$outpath/doc"
+    # Prepare doc directory
+    mkdir -p "$outpath/doc"
+    ln -f -s "$relpath"/doc/global "$outpath/doc"
 fi
 
 # symlink fonts to be able to run application from build directory
@@ -2302,12 +2337,10 @@ if [ -z "$PLATFORM" ]; then
             PLATFORM=macx-clang
          elif [ "$OSX_VERSION" -eq 11 ]; then
              # We're on Lion. Check if we have a supported Clang version
-             case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
-                 3.*)
+             if [ "$(clang -v 2>&1 | grep -Po '(?<=version )[\d]')" -ge 3 ]; then
                      PLATFORM=macx-clang
                      PLATFORM_NOTES="\n    - Also available for Mac OS X: macx-g++\n"
-                     ;;
-             esac
+             fi
          fi
          ;;
      AIX:*)
@@ -2660,6 +2693,17 @@ if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
     fi
 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
@@ -2744,79 +2788,59 @@ if [ -z "$QT_INSTALL_PREFIX" ]; then
 fi
 QT_INSTALL_PREFIX=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PREFIX"`
 
-if [ -z "$QT_INSTALL_DOCS" ]; then #default
-    if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-        if [ "$BUILD_ON_MAC" = "yes" ]; then
-            QT_INSTALL_DOCS="/Developer/Documentation/Qt"
-        fi
-    fi
-    [ -z "$QT_INSTALL_DOCS" ] && QT_INSTALL_DOCS="$QT_INSTALL_PREFIX/doc" #fallback
-
-fi
-QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
-
 if [ -z "$QT_INSTALL_HEADERS" ]; then #default
-    if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-        if [ "$BUILD_ON_MAC" = "yes" ]; then
-            if [ "$CFG_FRAMEWORK" = "yes" ]; then
-                QT_INSTALL_HEADERS=
-            fi
-        fi
-    fi
-    [ -z "$QT_INSTALL_HEADERS" ] && QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
-
+    QT_INSTALL_HEADERS="$QT_INSTALL_PREFIX/include"
 fi
 QT_INSTALL_HEADERS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_HEADERS"`
 
 if [ -z "$QT_INSTALL_LIBS" ]; then #default
-    if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-        if [ "$BUILD_ON_MAC" = "yes" ]; then
-            if [ "$CFG_FRAMEWORK" = "yes" ]; then
-                QT_INSTALL_LIBS="/Library/Frameworks"
-            fi
-        fi
-    fi
-    [ -z "$QT_INSTALL_LIBS" ] && QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
+    QT_INSTALL_LIBS="$QT_INSTALL_PREFIX/lib" #fallback
 fi
 QT_INSTALL_LIBS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBS"`
 
+if [ -z "$QT_INSTALL_ARCHDATA" ]; then #default
+    QT_INSTALL_ARCHDATA="$QT_INSTALL_PREFIX" #fallback
+fi
+QT_INSTALL_ARCHDATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_ARCHDATA"`
+
+if [ -z "$QT_INSTALL_DATA" ]; then #default
+    QT_INSTALL_DATA="$QT_INSTALL_PREFIX" #fallback
+fi
+QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
+
 if [ -z "$QT_INSTALL_BINS" ]; then #default
-    if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-        if [ "$BUILD_ON_MAC" = "yes" ]; then
-            QT_INSTALL_BINS="/Developer/Applications/Qt"
-        fi
-    fi
-    [ -z "$QT_INSTALL_BINS" ] && QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
+    QT_INSTALL_BINS="$QT_INSTALL_PREFIX/bin" #fallback
 fi
 QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
 
+if [ -z "$QT_INSTALL_LIBEXECS" ]; then #default
+    QT_INSTALL_LIBEXECS="$QT_INSTALL_ARCHDATA/libexec" #fallback
+fi
+QT_INSTALL_LIBEXECS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBEXECS"`
+
+if [ -z "$QT_INSTALL_DOCS" ]; then #default
+    QT_INSTALL_DOCS="$QT_INSTALL_DATA/doc" #fallback
+fi
+QT_INSTALL_DOCS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DOCS"`
+
 if [ -z "$QT_INSTALL_PLUGINS" ]; then #default
-    if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-        if [ "$BUILD_ON_MAC" = "yes" ]; then
-            QT_INSTALL_PLUGINS="/Developer/Applications/Qt/plugins"
-        fi
-    fi
-    [ -z "$QT_INSTALL_PLUGINS" ] && QT_INSTALL_PLUGINS="$QT_INSTALL_PREFIX/plugins" #fallback
+    QT_INSTALL_PLUGINS="$QT_INSTALL_ARCHDATA/plugins" #fallback
 fi
 QT_INSTALL_PLUGINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_PLUGINS"`
 
 if [ -z "$QT_INSTALL_IMPORTS" ]; then #default
-    if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-        if [ "$BUILD_ON_MAC" = "yes" ]; then
-            QT_INSTALL_IMPORTS="/Developer/Applications/Qt/imports"
-        fi
-    fi
-    [ -z "$QT_INSTALL_IMPORTS" ] && QT_INSTALL_IMPORTS="$QT_INSTALL_PREFIX/imports" #fallback
+    QT_INSTALL_IMPORTS="$QT_INSTALL_ARCHDATA/imports" #fallback
 fi
 QT_INSTALL_IMPORTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_IMPORTS"`
 
-if [ -z "$QT_INSTALL_DATA" ]; then #default
-    QT_INSTALL_DATA="$QT_INSTALL_PREFIX"
+#qml
+if [ -z "$QT_INSTALL_QML" ]; then #default
+    QT_INSTALL_QML="$QT_INSTALL_ARCHDATA/qml" #fallback
 fi
-QT_INSTALL_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DATA"`
+QT_INSTALL_QML=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_QML"`
 
 if [ -z "$QT_INSTALL_TRANSLATIONS" ]; then #default
-    QT_INSTALL_TRANSLATIONS="$QT_INSTALL_PREFIX/translations"
+    QT_INSTALL_TRANSLATIONS="$QT_INSTALL_DATA/translations" #fallback
 fi
 QT_INSTALL_TRANSLATIONS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TRANSLATIONS"`
 
@@ -2830,23 +2854,13 @@ fi
 QT_INSTALL_SETTINGS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_SETTINGS"`
 
 if [ -z "$QT_INSTALL_EXAMPLES" ]; then #default
-    if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-        if [ "$BUILD_ON_MAC" = "yes" ]; then
-            QT_INSTALL_EXAMPLES="/Developer/Examples/Qt"
-        fi
-    fi
-    [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
+    QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback
 fi
 QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"`
 
 #tests
 if [ -z "$QT_INSTALL_TESTS" ]; then #default
-    if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-        if [ "$BUILD_ON_MAC" = "yes" ]; then
-            QT_INSTALL_TESTS="/Developer/Tests/Qt"
-        fi
-    fi
-    [ -z "$QT_INSTALL_TESTS" ] && QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
+    QT_INSTALL_TESTS="$QT_INSTALL_PREFIX/tests" #fallback
 fi
 QT_INSTALL_TESTS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_TESTS"`
 
@@ -2862,12 +2876,7 @@ fi
 
 if [ -z "$QT_HOST_BINS" ]; then #default
     if $haveHpx; then
-        if [ "$CFG_PREFIX_INSTALL" = "no" ]; then
-            if [ "$BUILD_ON_MAC" = "yes" ]; then
-                QT_HOST_BINS="/Developer/Applications/Qt"
-            fi
-        fi
-        [ -z "$QT_HOST_BINS" ] && QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
+        QT_HOST_BINS="$QT_HOST_PREFIX/bin" #fallback
     else
         QT_HOST_BINS="$QT_INSTALL_BINS"
     fi
@@ -2878,7 +2887,7 @@ if [ -z "$QT_HOST_DATA" ]; then #default
     if $haveHpx; then
         QT_HOST_DATA="$QT_HOST_PREFIX"
     else
-        QT_HOST_DATA="$QT_INSTALL_DATA"
+        QT_HOST_DATA="$QT_INSTALL_ARCHDATA"
     fi
 else
     QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"`
@@ -3014,31 +3023,30 @@ Installation options:
                          not given, the current build directory will be used.
                          (default PREFIX)
 
-  * -prefix-install .... Force a sandboxed "local" installation of
-                         Qt. This will install into
-                         $QT_INSTALL_PREFIX, if this option is
-                         disabled then some platforms will attempt a
-                         "system" install by placing default values
-                         in a system location other than PREFIX.
-
  You may use these to separate different parts of the install:
 
-    -bindir <dir> ......... Executables will be installed to <dir>
+    -bindir <dir> ......... User executables will be installed to <dir>
                             (default PREFIX/bin)
-    -libdir <dir> ......... Libraries will be installed to <dir>
-                            (default PREFIX/lib)
-    -docdir <dir> ......... Documentation will be installed to <dir>
-                            (default PREFIX/doc)
     -headerdir <dir> ...... Headers will be installed to <dir>
                             (default PREFIX/include)
+    -libdir <dir> ......... Libraries will be installed to <dir>
+                            (default PREFIX/lib)
+    -archdatadir <dir>..... Arch-dependent data used by Qt will be installed to <dir>
+                            (default PREFIX)
     -plugindir <dir> ...... Plugins will be installed to <dir>
-                            (default PREFIX/plugins)
-    -importdir <dir> ...... Imports for QML will be installed to <dir>
-                            (default PREFIX/imports)
-    -datadir <dir> ........ Data used by Qt programs will be installed to <dir>
+                            (default ARCHDATADIR/plugins)
+    -libexecdir <dir> ..... Program executables will be installed to <dir>
+                            (default ARCHDATADIR/libexec)
+    -importdir <dir> ...... Imports for QML1 will be installed to <dir>
+                            (default ARCHDATADIR/imports)
+    -qmldir <dir> ......... Imports for QML2 will be installed to <dir>
+                            (default ARCHDATADIR/qml)
+    -datadir <dir> ........ Arch-independent data used by Qt will be installed to <dir>
                             (default PREFIX)
+    -docdir <dir> ......... Documentation will be installed to <dir>
+                            (default DATADIR/doc)
     -translationdir <dir> . Translations of Qt programs will be installed to <dir>
-                            (default PREFIX/translations)
+                            (default DATADIR/translations)
     -sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
                             (default PREFIX/etc/settings)
     -examplesdir <dir> .... Examples will be installed to <dir>
@@ -3168,12 +3176,22 @@ Third Party Libraries:
     -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.
+
 Additional options:
 
     -make <part> ....... Add part to the list of parts to be built at make time.
                          ($QT_DEFAULT_BUILD_PARTS)
     -nomake <part> ..... Exclude part from the list of parts to be built.
 
+    -no-gui ............ Don't build the QtGui library and dependencies.
+ +  -gui ............... Build the QtGui library and dependencies.
+
+    -no-widgets ........ Don't build the QtWidgets library and dependencies.
+ +  -widgets ........... Build the QtWidgets library and dependencies.
+
     -R <string> ........ Add an explicit runtime library path to the Qt
                          libraries.
     -l <string> ........ Add an explicit library.
@@ -3195,8 +3213,6 @@ Additional options:
  *  -no-optimized-qmake ... Do not build qmake optimized.
     -optimized-qmake ...... Build qmake optimized.
 
-    -no-gui ............ Don't build the Qt GUI library
-
  $NSN  -no-nis ............ Do not compile NIS support.
  $NSY  -nis ............... Compile NIS support.
 
@@ -3231,7 +3247,7 @@ Additional options:
                                    (experimental)
 
  $SBN  -no-separate-debug-info . Do not store debug information in a separate file.
- $SBY  -separate-debug-info .... Strip debug information into a separate .debug file.
+ $SBY  -separate-debug-info .... Strip debug information into a separate file.
 
  $XCBN  -no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
  $XCBY  -xcb ............... Compile Xcb support.
@@ -3259,11 +3275,6 @@ Additional options:
     -feature-<feature> .. Compile in <feature>. The available features
                           are described in src/corelib/global/qfeatures.txt
 
-    -no-freetype ........ Do not compile in Freetype2 support.
-    -qt-freetype ........ Use the libfreetype bundled with Qt.
- *  -system-freetype .... Use libfreetype from the operating system.
-                          See http://www.freetype.org/
-
     -qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
                           default ($CFG_QCONFIG).
 
@@ -3273,6 +3284,9 @@ Additional options:
                           OpenGL ES 2, or regular desktop OpenGL.
                           Use es2 for <api> to override auto-detection.
 
+ *  -no-system-proxies .. Do not use system network proxies by default.
+    -system-proxies ..... Use system network proxies by default.
+
  $GBN  -no-glib ........... Do not compile Glib support.
  $GBY  -glib .............. Compile Glib support.
 EOF
@@ -3287,6 +3301,16 @@ EOF
 
 fi
 
+if [ "$XPLATFORM_QNX" = "yes" ]; then
+    cat << EOF
+
+    -no-slog2 .......... Do not compile with slog2 support.
+    -slog2 ............. Compile with slog2 support.
+
+EOF
+
+fi
+
 if [ "$BUILD_ON_MAC" = "yes" ]; then
     cat << EOF
 
@@ -3480,6 +3504,9 @@ esac
 #-------------------------------------------------------------------------------
 [ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
 
+shortxspec=`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`
+shortspec=`echo $QMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`
+
 cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
 /* License Info */
 static const char qt_configure_licensee_str          [256 + 12] = "qt_lcnsuser=$Licensee";
@@ -3494,9 +3521,12 @@ static const char qt_configure_prefix_path_strs[][256 + 12] = {
     "qt_docspath=$QT_INSTALL_DOCS",
     "qt_hdrspath=$QT_INSTALL_HEADERS",
     "qt_libspath=$QT_INSTALL_LIBS",
+    "qt_lbexpath=$QT_INSTALL_LIBEXECS",
     "qt_binspath=$QT_INSTALL_BINS",
     "qt_plugpath=$QT_INSTALL_PLUGINS",
     "qt_impspath=$QT_INSTALL_IMPORTS",
+    "qt_qml2path=$QT_INSTALL_QML",
+    "qt_adatpath=$QT_INSTALL_ARCHDATA",
     "qt_datapath=$QT_INSTALL_DATA",
     "qt_trnspath=$QT_INSTALL_TRANSLATIONS",
     "qt_xmplpath=$QT_INSTALL_EXAMPLES",
@@ -3506,6 +3536,8 @@ static const char qt_configure_prefix_path_strs[][256 + 12] = {
     "qt_hpfxpath=$QT_HOST_PREFIX",
     "qt_hbinpath=$QT_HOST_BINS",
     "qt_hdatpath=$QT_HOST_DATA",
+    "qt_targspec=$shortxspec",
+    "qt_hostspec=$shortspec",
 #endif
 };
 static const char qt_configure_settings_path_str[256 + 12] = "qt_stngpath=$QT_INSTALL_SETTINGS";
@@ -3569,10 +3601,6 @@ setBootstrapVariable()
 if true; then ###[ '!' -f "$outpath/bin/qmake" ];
     echo "Creating qmake. Please wait..."
 
-    #mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
-    rm -rf mkspecs/default mkspecs/default-host
-    ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
-    ln -s `echo $QMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default-host
     mkdir -p "$outpath/qmake" || exit
     # fix makefiles
     for mkfile in GNUmakefile Makefile; do
@@ -3657,7 +3685,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
         fi
         QMAKE_BIN_DIR="$QT_INSTALL_BINS"
         [ -z "$QMAKE_BIN_DIR" ] && QMAKE_BIN_DIR="${QT_INSTALL_PREFIX}/bin"
-        QMAKE_DATA_DIR="$QT_INSTALL_DATA"
+        QMAKE_DATA_DIR="$QT_INSTALL_ARCHDATA"
         [ -z "$QMAKE_DATA_DIR" ] && QMAKE_DATA_DIR="${QT_INSTALL_PREFIX}"
         echo >>"$mkfile"
        adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
@@ -3993,6 +4021,18 @@ if [ "$CFG_ZLIB" = "no" ]; then
     CFG_ZLIB=auto
     ZLIB_FORCED=yes
 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
+fi
+
 if [ "$CFG_ZLIB" = "auto" ]; then
     if compileTest unix/zlib "zlib"; then
        CFG_ZLIB=system
@@ -4430,7 +4470,7 @@ fi
 # auto-detect GTK style support
 if [ "$CFG_GLIB" = "yes" -a "$CFG_QGTKSTYLE" != "no" ]; then
     if [ -n "$PKG_CONFIG" ]; then
-        QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.10 atk 2>/dev/null`
+        QT_CFLAGS_QGTKSTYLE=`$PKG_CONFIG --cflags gtk+-2.0 ">=" 2.18 atk 2>/dev/null`
         QT_LIBS_QGTKSTYLE=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
     fi
     if [ -n "$QT_CFLAGS_QGTKSTYLE" ] ; then
@@ -4742,18 +4782,37 @@ fi
 
 if [ "$CFG_XCB" != "no" ]; then
     if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
-        QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb xcb-image xcb-keysyms xcb-icccm xcb-sync xcb-xfixes xcb-randr 2>/dev/null`"
-        QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb xcb-image xcb-keysyms xcb-icccm xcb-sync xcb-xfixes xcb-randr 2>/dev/null`"
+        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
-        CFG_XCB=yes
-        if compileTest qpa/xcb-render "xcb-render" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
-            QT_CONFIG="$QT_CONFIG xcb-render"
-        fi
 
-        if compileTest qpa/xcb-poll-for-queued-event "xcb-poll-for-queued-event" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
-            CFG_XCB_LIMITED=no
-            QT_CONFIG="$QT_CONFIG xcb-poll-for-queued-event"
+        if [ "$CFG_XCB" = "qt" ]; then
+            QT_CONFIG="$QT_CONFIG xcb-qt"
+        else
+            CFG_XCB="system"
+
+            if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
+                XCB_PACKAGES="xcb xcb-shm xcb-sync xcb-xfixes xcb-randr xcb-image xcb-keysyms xcb-icccm"
+                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
+                if compileTest qpa/xcb-render "xcb-render" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
+                    QT_CONFIG="$QT_CONFIG xcb-render"
+                fi
+
+                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
+            else
+                echo "The test for linking against libxcb and support libraries failed!"
+                echo " You might need install dependency packages, or pass -qt-xcb."
+                echo " See src/plugins/platforms/xcb/README."
+                exit 1
+            fi
         fi
 
         if compileTest qpa/xcb-xlib "xcb-xlib" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
@@ -4778,9 +4837,9 @@ if [ "$CFG_XCB" != "no" ]; then
             fi
         fi
     else
-        if [ "$CFG_XCB" = "yes" ]; then
-            echo "The XCB test failed!"
-            echo " You might need to install dependency packages."
+        if [ "$CFG_XCB" != "auto" ]; then
+            echo "The test for linking against libxcb failed!"
+            echo " You might need to install dependency packages for libxcb."
             echo " See src/plugins/platforms/xcb/README."
             exit 1
         fi
@@ -4898,14 +4957,14 @@ if [ "$CFG_ACCESSIBILITY" != "no" ]; then
     if [ "$CFG_XCB" = "no" ]; then
         CFG_ACCESSIBILITY=yes
     else
-        # linux/xcb accessibility needs dbus and atspi-2
-        if [ "$CFG_DBUS" != "no" ] && [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "atspi-2" 2>/dev/null; then
+        # linux/xcb accessibility needs dbus
+        if [ "$CFG_DBUS" != "no" ] && [ -n "$PKG_CONFIG" ]; then
             CFG_ACCESSIBILITY=yes
         else
             if [ "$CFG_ACCESSIBILITY" = "auto" ]; then
                 CFG_ACCESSIBILITY=no
             else
-                echo "Accessibility support needs pkg-config and libatspi2."
+                echo "Accessibility support needs DBus."
                 exit 101
             fi
         fi
@@ -5166,7 +5225,7 @@ if [ "$CFG_ALSA" = "auto" ]; then
     fi
 fi
 
-if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then 
+if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then
     if [ "$CFG_ARCH" = "arm" ]; then
        compileTest unix/javascriptcore-jit "javascriptcore-jit"
         if [ $? != "0" ]; then
@@ -5274,7 +5333,6 @@ fi
 QMAKE_CONFIG="$QMAKE_CONFIG qpa"
 QT_CONFIG="$QT_CONFIG qpa"
 QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
-rm -f "src/.moc/$QMAKE_OUTDIR/allmoc.cpp" # needs remaking if config changes
 
 if [ "$XPLATFORM_MINGW" != "yes" ]; then
     # Do not set this here for Windows. Let qmake do it so
@@ -5292,6 +5350,7 @@ 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"
 [ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
@@ -5406,8 +5465,9 @@ fi
 [ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
 [ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
 [ "$CFG_MAC_HARFBUZZ" = "yes" ] && QT_CONFIG="$QT_CONFIG harfbuzz"
-[ "$CFG_XCB" = "yes" ] && QT_CONFIG="$QT_CONFIG xcb"
+[ "$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"
 
 [ '!' -z "$DEFINES" ] && QMakeVar add DEFINES "$DEFINES"
 [ '!' -z "$L_FLAGS" ] && QMakeVar add LIBS "$L_FLAGS"
@@ -5966,6 +6026,11 @@ QT_NAMESPACE = $QT_NAMESPACE
 
 EOF
 
+if [ "$CFG_SHARED" = "no" ]; then
+    echo "QT_DEFAULT_QPA_PLUGIN = $QT_QPA_DEFAULT_PLATFORM" >> "$QTCONFIG.tmp"
+    echo >> "$QTCONFIG.tmp"
+fi
+
 if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then
     echo "# pkgconfig" >> "$QTCONFIG.tmp"
     echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR" >> "$QTCONFIG.tmp"
@@ -6008,7 +6073,7 @@ fi
 #-------------------------------------------------------------------------------
 QTMODULE="$outpath/mkspecs/qmodule.pri"
 
-echo "CONFIG += $QMAKE_CONFIG create_prl link_prl" >> "$QTMODULE.tmp"
+echo "CONFIG += $QMAKE_CONFIG" >> "$QTMODULE.tmp"
 echo "QT_BUILD_PARTS += $CFG_BUILD_PARTS" >> "$QTMODULE.tmp"
 
 if [ -n "$QT_CFLAGS_PSQL" ]; then
@@ -6047,11 +6112,6 @@ elif [ "$CFG_OPENSSL" = "linked" ]; then
     echo "OPENSSL_LIBS = -lssl -lcrypto" >> "$QTMODULE.tmp"
 fi
 
-#dump in the SDK info
-if [ '!' -z "$CFG_SDK" ]; then
-   echo "QMAKE_MAC_SDK = $CFG_SDK" >> "$QTMODULE.tmp"
-fi
-
 # cmdline args
 cat "$QMAKE_VARS_FILE" >> "$QTMODULE.tmp"
 rm -f "$QMAKE_VARS_FILE" 2>/dev/null
@@ -6070,13 +6130,8 @@ fi
 CACHEFILE="$outpath/.qmake.cache"
 [ -f "$CACHEFILE.tmp" ] && rm -f "$CACHEFILE.tmp"
 cat >>"$CACHEFILE.tmp" <<EOF
-#paths
 QT_SOURCE_TREE = \$\$quote($relpath)
 QT_BUILD_TREE = \$\$quote($outpath)
-
-include(\$\$PWD/mkspecs/qmodule.pri)
-CONFIG += dylib fix_output_dirs no_private_qt_headers_warning QTDIR_build
-
 EOF
 
 # replace .qmake.cache if it differs from the newly created temp file
@@ -6187,6 +6242,11 @@ echo "zlib support ........... $CFG_ZLIB"
 echo "Session management ..... $CFG_SM"
 echo "libudev support ........ $CFG_LIBUDEV"
 
+if [ "$XPLATFORM_QNX" = "yes" ]; then
+    echo "SLOG2 support .......... $CFG_SLOG2"
+fi
+echo "Use system proxies ..... $CFG_SYSTEM_PROXIES"
+
 if [ "$CFG_OPENGL" = "desktop" ]; then
     echo "OpenGL support ......... yes (Desktop OpenGL)"
 elif [ "$CFG_OPENGL" = "es2" ]; then
@@ -6215,7 +6275,6 @@ echo "Xi2 support ............ $CFG_XINPUT2"
 echo "MIT-SHM support ........ $CFG_MITSHM"
 echo "FontConfig support ..... $CFG_FONTCONFIG"
 echo "XKB Support ............ $CFG_XKB"
-echo "immodule support ....... $CFG_IM"
 echo "GTK theme support ...... $CFG_QGTKSTYLE"
 
 [ "$CFG_SQL_mysql" != "no" ] && echo "MySQL support .......... $CFG_SQL_mysql"
@@ -6241,13 +6300,9 @@ if [ "$BUILD_ON_MAC" = "yes" ]; then
 fi
 echo "libICU support ......... $CFG_ICU"
 echo "PCRE support ........... $CFG_PCRE"
-if [ "$CFG_XCB_LIMITED" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
-    echo "Xcb support ............ limited (old version)"
-else
-    echo "Xcb support ............ $CFG_XCB"
-fi
+echo "Xcb support ............ $CFG_XCB"
 echo "Xrender support ........ $CFG_XRENDER"
-if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" = "yes" ]; then
+if [ "$XPLATFORM_MAEMO" = "yes" ] && [ "$CFG_XCB" != "no" ]; then
     echo "XInput2 support ........ $CFG_XINPUT2"
 fi
 echo "EGLFS support .......... $CFG_EGLFS"