summaryrefslogtreecommitdiffstats
path: root/config.tests
diff options
context:
space:
mode:
Diffstat (limited to 'config.tests')
-rw-r--r--config.tests/.gitignore2
-rw-r--r--config.tests/mac/coreservices/coreservices.mm48
-rw-r--r--config.tests/mac/coreservices/coreservices.pro3
-rw-r--r--config.tests/mac/corewlan/corewlan.pro3
-rw-r--r--config.tests/mac/corewlan/corewlantest.mm49
-rwxr-xr-xconfig.tests/mac/crc.test71
-rw-r--r--config.tests/mac/crc/crc.pro2
-rw-r--r--config.tests/mac/crc/main.cpp108
-rwxr-xr-xconfig.tests/mac/defaultarch.test33
-rwxr-xr-xconfig.tests/mac/dwarf2.test42
-rwxr-xr-xconfig.tests/mac/xarch.test26
-rw-r--r--config.tests/mac/xcodeversion.cpp99
-rw-r--r--config.tests/qpa/wayland/wayland.cpp46
-rw-r--r--config.tests/qpa/wayland/wayland.pro4
-rw-r--r--config.tests/qws/ahi/ahi.cpp50
-rw-r--r--config.tests/qws/ahi/ahi.pro3
-rw-r--r--config.tests/qws/directfb/directfb.cpp50
-rw-r--r--config.tests/qws/directfb/directfb.pro5
-rw-r--r--config.tests/qws/sound/sound.cpp49
-rw-r--r--config.tests/qws/sound/sound.pro2
-rw-r--r--config.tests/qws/svgalib/svgalib.cpp51
-rw-r--r--config.tests/qws/svgalib/svgalib.pro3
-rw-r--r--config.tests/symbian/audio/.gitignore2
-rw-r--r--config.tests/symbian/audio/audio.cpp47
-rw-r--r--config.tests/symbian/audio/audio.pro10
-rwxr-xr-xconfig.tests/symbian/compile.test46
-rw-r--r--config.tests/symbian/simple/main.cpp46
-rw-r--r--config.tests/symbian/simple/simple.pro5
-rw-r--r--config.tests/unix/3dnow/3dnow.cpp51
-rw-r--r--config.tests/unix/3dnow/3dnow.pro3
-rw-r--r--config.tests/unix/alsa/alsa.pro4
-rw-r--r--config.tests/unix/alsa/alsatest.cpp50
-rw-r--r--config.tests/unix/avx/avx.cpp51
-rw-r--r--config.tests/unix/avx/avx.pro3
-rwxr-xr-xconfig.tests/unix/bsymbolic_functions.test22
-rw-r--r--config.tests/unix/clock-gettime/clock-gettime.cpp57
-rw-r--r--config.tests/unix/clock-gettime/clock-gettime.pri2
-rw-r--r--config.tests/unix/clock-gettime/clock-gettime.pro4
-rw-r--r--config.tests/unix/clock-monotonic/clock-monotonic.cpp57
-rw-r--r--config.tests/unix/clock-monotonic/clock-monotonic.pro4
-rwxr-xr-xconfig.tests/unix/compile.test88
-rw-r--r--config.tests/unix/cups/cups.cpp49
-rw-r--r--config.tests/unix/cups/cups.pro4
-rw-r--r--config.tests/unix/db2/db2.cpp48
-rw-r--r--config.tests/unix/db2/db2.pro4
-rw-r--r--config.tests/unix/dbus/dbus.cpp53
-rw-r--r--config.tests/unix/dbus/dbus.pro3
-rwxr-xr-xconfig.tests/unix/doubleformat.test63
-rw-r--r--config.tests/unix/doubleformat/doubleformattest.cpp66
-rw-r--r--config.tests/unix/doubleformat/doubleformattest.pro3
-rw-r--r--config.tests/unix/egl/egl.cpp51
-rw-r--r--config.tests/unix/egl/egl.pro10
-rw-r--r--config.tests/unix/egl4gles1/egl4gles1.cpp51
-rw-r--r--config.tests/unix/egl4gles1/egl4gles1.pro10
-rwxr-xr-xconfig.tests/unix/endian.test55
-rw-r--r--config.tests/unix/endian/endiantest.cpp56
-rw-r--r--config.tests/unix/endian/endiantest.pro3
-rw-r--r--config.tests/unix/floatmath/floatmath.cpp58
-rw-r--r--config.tests/unix/floatmath/floatmath.pro3
-rw-r--r--config.tests/unix/freetype/freetype.cpp54
-rw-r--r--config.tests/unix/freetype/freetype.pri9
-rw-r--r--config.tests/unix/freetype/freetype.pro5
-rwxr-xr-xconfig.tests/unix/fvisibility.test73
-rw-r--r--config.tests/unix/getaddrinfo/getaddrinfo.pro4
-rw-r--r--config.tests/unix/getaddrinfo/getaddrinfotest.cpp64
-rw-r--r--config.tests/unix/getifaddrs/getifaddrs.cpp60
-rw-r--r--config.tests/unix/getifaddrs/getifaddrs.pro5
-rw-r--r--config.tests/unix/glib/glib.cpp57
-rw-r--r--config.tests/unix/glib/glib.pro2
-rw-r--r--config.tests/unix/gnu-libiconv/gnu-libiconv.cpp60
-rw-r--r--config.tests/unix/gnu-libiconv/gnu-libiconv.pro4
-rw-r--r--config.tests/unix/gstreamer/gstreamer.cpp55
-rw-r--r--config.tests/unix/gstreamer/gstreamer.pro3
-rw-r--r--config.tests/unix/ibase/ibase.cpp47
-rw-r--r--config.tests/unix/ibase/ibase.pro4
-rw-r--r--config.tests/unix/icd/icd.cpp55
-rw-r--r--config.tests/unix/icd/icd.pro3
-rw-r--r--config.tests/unix/iconv/iconv.cpp60
-rw-r--r--config.tests/unix/iconv/iconv.pro3
-rw-r--r--config.tests/unix/icu/icu.cpp54
-rw-r--r--config.tests/unix/icu/icu.pro4
-rw-r--r--config.tests/unix/inotify/inotify.pro3
-rw-r--r--config.tests/unix/inotify/inotifytest.cpp50
-rw-r--r--config.tests/unix/iodbc/iodbc.cpp48
-rw-r--r--config.tests/unix/iodbc/iodbc.pro4
-rw-r--r--config.tests/unix/ipv6/ipv6.pro3
-rw-r--r--config.tests/unix/ipv6/ipv6test.cpp69
-rw-r--r--config.tests/unix/ipv6ifname/ipv6ifname.cpp59
-rw-r--r--config.tests/unix/ipv6ifname/ipv6ifname.pro5
-rw-r--r--config.tests/unix/iwmmxt/iwmmxt.cpp48
-rw-r--r--config.tests/unix/iwmmxt/iwmmxt.pro3
-rw-r--r--config.tests/unix/javascriptcore-jit/hwcap_test.cpp46
-rw-r--r--config.tests/unix/javascriptcore-jit/javascriptcore-jit.pro2
-rw-r--r--config.tests/unix/libjpeg/libjpeg.cpp53
-rw-r--r--config.tests/unix/libjpeg/libjpeg.pro4
-rw-r--r--config.tests/unix/libmng/libmng.cpp54
-rw-r--r--config.tests/unix/libmng/libmng.pro4
-rw-r--r--config.tests/unix/libpng/libpng.cpp53
-rw-r--r--config.tests/unix/libpng/libpng.pro4
-rw-r--r--config.tests/unix/libtiff/libtiff.cpp65
-rw-r--r--config.tests/unix/libtiff/libtiff.pro4
-rwxr-xr-xconfig.tests/unix/makeabs25
-rw-r--r--config.tests/unix/mmx/mmx.cpp51
-rw-r--r--config.tests/unix/mmx/mmx.pro3
-rw-r--r--config.tests/unix/mremap/mremap.cpp51
-rw-r--r--config.tests/unix/mremap/mremap.pro3
-rw-r--r--config.tests/unix/mysql/mysql.cpp47
-rw-r--r--config.tests/unix/mysql/mysql.pro4
-rw-r--r--config.tests/unix/mysql_r/mysql_r.pro4
-rw-r--r--config.tests/unix/neon/neon.cpp51
-rw-r--r--config.tests/unix/neon/neon.pro2
-rw-r--r--config.tests/unix/nis/nis.cpp52
-rw-r--r--config.tests/unix/nis/nis.pro5
-rwxr-xr-xconfig.tests/unix/objcopy.test29
-rw-r--r--config.tests/unix/oci/oci.cpp47
-rw-r--r--config.tests/unix/oci/oci.pro4
-rw-r--r--config.tests/unix/odbc/odbc.cpp51
-rw-r--r--config.tests/unix/odbc/odbc.pro5
-rw-r--r--config.tests/unix/opengldesktop/opengldesktop.cpp52
-rw-r--r--config.tests/unix/opengldesktop/opengldesktop.pro9
-rw-r--r--config.tests/unix/opengles1/opengles1.cpp55
-rw-r--r--config.tests/unix/opengles1/opengles1.pro13
-rw-r--r--config.tests/unix/opengles2/opengles2.cpp54
-rw-r--r--config.tests/unix/opengles2/opengles2.pro13
-rw-r--r--config.tests/unix/openssl/openssl.cpp50
-rw-r--r--config.tests/unix/openssl/openssl.pri10
-rw-r--r--config.tests/unix/openssl/openssl.pro4
-rw-r--r--config.tests/unix/openvg/openvg.cpp57
-rw-r--r--config.tests/unix/openvg/openvg.pro19
-rwxr-xr-xconfig.tests/unix/padstring22
-rwxr-xr-xconfig.tests/unix/precomp.test54
-rw-r--r--config.tests/unix/psql/psql.cpp49
-rw-r--r--config.tests/unix/psql/psql.pro4
-rwxr-xr-xconfig.tests/unix/ptrsize.test32
-rw-r--r--config.tests/unix/ptrsize/ptrsizetest.cpp61
-rw-r--r--config.tests/unix/ptrsize/ptrsizetest.pro3
-rw-r--r--config.tests/unix/pulseaudio/pulseaudio.cpp58
-rw-r--r--config.tests/unix/pulseaudio/pulseaudio.pro3
-rw-r--r--config.tests/unix/shivavg/shivavg.cpp51
-rw-r--r--config.tests/unix/shivavg/shivavg.pro11
-rw-r--r--config.tests/unix/sqlite/sqlite.cpp47
-rw-r--r--config.tests/unix/sqlite/sqlite.pro3
-rw-r--r--config.tests/unix/sqlite2/sqlite2.cpp47
-rw-r--r--config.tests/unix/sqlite2/sqlite2.pro4
-rw-r--r--config.tests/unix/sse/sse.cpp52
-rw-r--r--config.tests/unix/sse/sse.pro3
-rw-r--r--config.tests/unix/sse2/sse2.cpp52
-rw-r--r--config.tests/unix/sse2/sse2.pro3
-rw-r--r--config.tests/unix/sse3/sse3.cpp51
-rw-r--r--config.tests/unix/sse3/sse3.pro3
-rw-r--r--config.tests/unix/sse4_1/sse4_1.cpp51
-rw-r--r--config.tests/unix/sse4_1/sse4_1.pro3
-rw-r--r--config.tests/unix/sse4_2/sse4_2.cpp51
-rw-r--r--config.tests/unix/sse4_2/sse4_2.pro3
-rw-r--r--config.tests/unix/ssse3/ssse3.cpp51
-rw-r--r--config.tests/unix/ssse3/ssse3.pro3
-rw-r--r--config.tests/unix/stdint/main.cpp49
-rw-r--r--config.tests/unix/stdint/stdint.pro4
-rw-r--r--config.tests/unix/stl/stl.pro3
-rw-r--r--config.tests/unix/stl/stltest.cpp150
-rw-r--r--config.tests/unix/sun-libiconv/sun-libiconv.pro2
-rw-r--r--config.tests/unix/tds/tds.cpp48
-rw-r--r--config.tests/unix/tds/tds.pro4
-rw-r--r--config.tests/unix/tslib/tslib.cpp48
-rw-r--r--config.tests/unix/tslib/tslib.pro3
-rwxr-xr-xconfig.tests/unix/which.test39
-rw-r--r--config.tests/unix/zlib/zlib.cpp54
-rw-r--r--config.tests/unix/zlib/zlib.pro4
-rw-r--r--config.tests/x11/fontconfig/fontconfig.cpp61
-rw-r--r--config.tests/x11/fontconfig/fontconfig.pro5
-rw-r--r--config.tests/x11/glxfbconfig/glxfbconfig.cpp51
-rw-r--r--config.tests/x11/glxfbconfig/glxfbconfig.pro10
-rw-r--r--config.tests/x11/mitshm/mitshm.cpp63
-rw-r--r--config.tests/x11/mitshm/mitshm.pro5
-rwxr-xr-xconfig.tests/x11/notype.test49
-rw-r--r--config.tests/x11/notype/notypetest.cpp52
-rw-r--r--config.tests/x11/notype/notypetest.pro5
-rw-r--r--config.tests/x11/opengl/opengl.cpp49
-rw-r--r--config.tests/x11/opengl/opengl.pro11
-rw-r--r--config.tests/x11/sm/sm.cpp49
-rw-r--r--config.tests/x11/sm/sm.pro4
-rw-r--r--config.tests/x11/xcursor/xcursor.cpp66
-rw-r--r--config.tests/x11/xcursor/xcursor.pro4
-rw-r--r--config.tests/x11/xfixes/xfixes.cpp55
-rw-r--r--config.tests/x11/xfixes/xfixes.pro3
-rw-r--r--config.tests/x11/xinerama/xinerama.cpp50
-rw-r--r--config.tests/x11/xinerama/xinerama.pro4
-rw-r--r--config.tests/x11/xinput/xinput.cpp59
-rw-r--r--config.tests/x11/xinput/xinput.pro6
-rw-r--r--config.tests/x11/xkb/xkb.cpp71
-rw-r--r--config.tests/x11/xkb/xkb.pro3
-rw-r--r--config.tests/x11/xlib/xlib.cpp50
-rw-r--r--config.tests/x11/xlib/xlib.pro3
-rw-r--r--config.tests/x11/xrandr/xrandr.cpp54
-rw-r--r--config.tests/x11/xrandr/xrandr.pro4
-rw-r--r--config.tests/x11/xrender/xrender.cpp54
-rw-r--r--config.tests/x11/xrender/xrender.pro4
-rw-r--r--config.tests/x11/xshape/xshape.cpp51
-rw-r--r--config.tests/x11/xshape/xshape.pro3
-rw-r--r--config.tests/x11/xsync/xsync.cpp56
-rw-r--r--config.tests/x11/xsync/xsync.pro3
-rw-r--r--config.tests/x11/xvideo/xvideo.cpp52
-rw-r--r--config.tests/x11/xvideo/xvideo.pro4
203 files changed, 6183 insertions, 0 deletions
diff --git a/config.tests/.gitignore b/config.tests/.gitignore
new file mode 100644
index 0000000000..bd76520b05
--- /dev/null
+++ b/config.tests/.gitignore
@@ -0,0 +1,2 @@
+*.rpp
+*.rsg
diff --git a/config.tests/mac/coreservices/coreservices.mm b/config.tests/mac/coreservices/coreservices.mm
new file mode 100644
index 0000000000..c70802c725
--- /dev/null
+++ b/config.tests/mac/coreservices/coreservices.mm
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <CoreServices/CoreServices.h>
+
+int main()
+{
+ FSRef ref;
+ return 0;
+}
diff --git a/config.tests/mac/coreservices/coreservices.pro b/config.tests/mac/coreservices/coreservices.pro
new file mode 100644
index 0000000000..c9bf8eccd7
--- /dev/null
+++ b/config.tests/mac/coreservices/coreservices.pro
@@ -0,0 +1,3 @@
+SOURCES = coreservices.mm
+LIBS += -framework CoreServices
+CONFIG -= app_bundle qt
diff --git a/config.tests/mac/corewlan/corewlan.pro b/config.tests/mac/corewlan/corewlan.pro
new file mode 100644
index 0000000000..a9c256043c
--- /dev/null
+++ b/config.tests/mac/corewlan/corewlan.pro
@@ -0,0 +1,3 @@
+OBJECTIVE_SOURCES = corewlantest.mm
+LIBS += -framework CoreWLAN -framework Foundation
+CONFIG -= app_bundle qt
diff --git a/config.tests/mac/corewlan/corewlantest.mm b/config.tests/mac/corewlan/corewlantest.mm
new file mode 100644
index 0000000000..3b63607c8f
--- /dev/null
+++ b/config.tests/mac/corewlan/corewlantest.mm
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <CoreWLAN/CoreWLAN.h>
+#include <CoreWLAN/CWInterface.h>
+
+int main()
+{
+ [CWInterface interfaceWithName:@"en2"];
+ return 0;
+}
diff --git a/config.tests/mac/crc.test b/config.tests/mac/crc.test
new file mode 100755
index 0000000000..9cbe7bad94
--- /dev/null
+++ b/config.tests/mac/crc.test
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+SUCCESS=no
+QMKSPEC=$1
+XPLATFORM=`basename "$1"`
+QMAKE_CONFIG=$2
+VERBOSE=$3
+SRCDIR=$4
+OUTDIR=$5
+TEST=$6
+EXE=`basename "$6"`
+ARG=$7
+shift 7
+LFLAGS=""
+INCLUDEPATH=""
+CXXFLAGS=""
+while [ "$#" -gt 0 ]; do
+ PARAM=$1
+ case $PARAM in
+ -framework)
+ LFLAGS="$LFLAGS -framework \"$2\""
+ shift
+ ;;
+ -F*|-m*|-x*)
+ LFLAGS="$LFLAGS $PARAM"
+ CXXFLAGS="$CXXFLAGS $PARAM"
+ ;;
+ -L*|-l*|-pthread)
+ LFLAGS="$LFLAGS $PARAM"
+ ;;
+ -I*)
+ INC=`echo $PARAM | sed -e 's/^-I//'`
+ INCLUDEPATH="$INCLUDEPATH $INC"
+ ;;
+ -f*|-D*)
+ CXXFLAGS="$CXXFLAGS $PARAM"
+ ;;
+ -Qoption)
+ # Two-argument form for the Sun Compiler
+ CXXFLAGS="$CXXFLAGS $PARAM \"$2\""
+ shift
+ ;;
+ *) ;;
+ esac
+ shift
+done
+
+# debuggery
+[ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION auto-detection... ($*)"
+
+test -d "$OUTDIR/$TEST" || mkdir -p "$OUTDIR/$TEST"
+
+cd "$OUTDIR/$TEST"
+
+$MAKE distclean >/dev/null 2>&1
+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "LIBS*=$LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
+
+if [ "$VERBOSE" = "yes" ]; then
+ $MAKE
+else
+ $MAKE >/dev/null 2>&1
+fi
+
+
+if [ -x "$EXE" ]; then
+ foo=`$OUTDIR/$TEST/$EXE $ARG`
+ echo "$foo"
+else
+ echo "'CUTE'" #1129665605 # == 'CUTE'
+fi
+
diff --git a/config.tests/mac/crc/crc.pro b/config.tests/mac/crc/crc.pro
new file mode 100644
index 0000000000..c3abf15759
--- /dev/null
+++ b/config.tests/mac/crc/crc.pro
@@ -0,0 +1,2 @@
+SOURCES = main.cpp
+CONFIG -= app_bundle qt
diff --git a/config.tests/mac/crc/main.cpp b/config.tests/mac/crc/main.cpp
new file mode 100644
index 0000000000..8d44e0afa5
--- /dev/null
+++ b/config.tests/mac/crc/main.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <iostream>
+#include <cstdlib>
+#include <cstring>
+
+
+class CCRC32
+{
+public:
+ CCRC32() { initialize(); }
+
+ unsigned long FullCRC(const unsigned char *sData, unsigned long ulDataLength)
+ {
+ unsigned long ulCRC = 0xffffffff;
+ PartialCRC(&ulCRC, sData, ulDataLength);
+ return(ulCRC ^ 0xffffffff);
+ }
+
+ void PartialCRC(unsigned long *ulCRC, const unsigned char *sData, unsigned long ulDataLength)
+ {
+ while(ulDataLength--) {
+ *ulCRC = (*ulCRC >> 8) ^ ulTable[(*ulCRC & 0xFF) ^ *sData++];
+ }
+ }
+
+private:
+ void initialize(void)
+ {
+ unsigned long ulPolynomial = 0x04C11DB7;
+ memset(&ulTable, 0, sizeof(ulTable));
+ for(int iCodes = 0; iCodes <= 0xFF; iCodes++) {
+ ulTable[iCodes] = Reflect(iCodes, 8) << 24;
+ for(int iPos = 0; iPos < 8; iPos++) {
+ ulTable[iCodes] = ((ulTable[iCodes] << 1) & 0xffffffff)
+ ^ ((ulTable[iCodes] & (1 << 31)) ? ulPolynomial : 0);
+ }
+
+ ulTable[iCodes] = Reflect(ulTable[iCodes], 32);
+ }
+ }
+ unsigned long Reflect(unsigned long ulReflect, const char cChar)
+ {
+ unsigned long ulValue = 0;
+ // Swap bit 0 for bit 7, bit 1 For bit 6, etc....
+ for(int iPos = 1; iPos < (cChar + 1); iPos++) {
+ if(ulReflect & 1) {
+ ulValue |= (1ul << (cChar - iPos));
+ }
+ ulReflect >>= 1;
+ }
+ return ulValue;
+ }
+ unsigned long ulTable[256]; // CRC lookup table array.
+};
+
+
+int main(int argc, char **argv)
+{
+ CCRC32 crc;
+ char *name;
+ if (argc < 2) {
+ std::cerr << "usage: crc <string>\n";
+ return 0;
+ } else {
+ name = argv[1];
+ }
+ std::cout << crc.FullCRC((unsigned char *)name, strlen(name)) << std::endl;
+}
diff --git a/config.tests/mac/defaultarch.test b/config.tests/mac/defaultarch.test
new file mode 100755
index 0000000000..80f244a8bb
--- /dev/null
+++ b/config.tests/mac/defaultarch.test
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+COMPILER=$1
+VERBOSE=$2
+WORKDIR=$3
+QT_MAC_DEFAULT_ARCH=
+
+touch defaultarch.c
+
+# compile something and run 'file' on it.
+if "$COMPILER" -c defaultarch.c 2>/dev/null 1>&2; then
+ FIlE_OUTPUT=`file defaultarch.o`
+ [ "$VERBOSE" = "yes" ] && echo "'file' reports compiler ($COMPILER) default architechture as: $FIlE_OUTPUT"
+
+fi
+rm -f defaultarch.c defaultarch.o
+
+# detect our known archs.
+if echo "$FIlE_OUTPUT" | grep '\<i386\>' > /dev/null 2>&1; then
+ QT_MAC_DEFAULT_ARCH=x86 # configure knows it as "x86" not "i386"
+fi
+if echo "$FIlE_OUTPUT" | grep '\<x86_64\>' > /dev/null 2>&1; then
+ QT_MAC_DEFAULT_ARCH=x86_64
+fi
+if echo "$FIlE_OUTPUT" | grep '\<ppc\>' > /dev/null 2>&1; then
+ QT_MAC_DEFAULT_ARCH=ppc
+fi
+if echo "$FIlE_OUTPUT" | grep '\<ppc64\>' > /dev/null 2>&1; then
+ QT_MAC_DEFAULT_ARCH=ppc64
+fi
+
+[ "$VERBOSE" = "yes" ] && echo "setting QT_MAC_DEFAULT_ARCH to \"$QT_MAC_DEFAULT_ARCH\""
+export QT_MAC_DEFAULT_ARCH
diff --git a/config.tests/mac/dwarf2.test b/config.tests/mac/dwarf2.test
new file mode 100755
index 0000000000..a640b113de
--- /dev/null
+++ b/config.tests/mac/dwarf2.test
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+DWARF2_SUPPORT=no
+DWARF2_SUPPORT_BROKEN=no
+COMPILER=$1
+VERBOSE=$2
+WORKDIR=$3
+
+touch dwarf2.c
+
+if "$COMPILER" -c dwarf2.c -Werror -gdwarf-2 2>/dev/null 1>&2; then
+ if "$COMPILER" -c dwarf2.c -Werror -gdwarf-2 2>&1 | grep "unsupported" >/dev/null ; then
+ true
+ else
+ DWARF2_SUPPORT=yes
+ fi
+fi
+rm -f dwarf2.c dwarf2.o
+
+# Test for xcode 2.4.0, which has a broken implementation of DWARF
+"$COMPILER" $WORKDIR/xcodeversion.cpp -o xcodeversion -framework Carbon;
+./xcodeversion
+
+if [ "$?" == "1" ]; then
+ DWARF2_SUPPORT_BROKEN=yes
+fi
+
+rm xcodeversion
+
+# done
+if [ "$DWARF2_SUPPORT" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols disabled."
+ exit 0
+else
+ if [ "$DWARF2_SUPPORT_BROKEN" == "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols disabled."
+ exit 0
+ else
+ [ "$VERBOSE" = "yes" ] && echo "DWARF2 debug symbols enabled."
+ exit 1
+ fi
+fi
diff --git a/config.tests/mac/xarch.test b/config.tests/mac/xarch.test
new file mode 100755
index 0000000000..08322a96cf
--- /dev/null
+++ b/config.tests/mac/xarch.test
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+XARCH_SUPPORT=no
+COMPILER=$1
+VERBOSE=$2
+WORKDIR=$3
+
+touch xarch.c
+
+if "$COMPILER" -c xarch.c -Xarch_i386 -mmmx 2>/dev/null 1>&2; then
+ if "$COMPILER" -c xarch.c -Xarch_i386 -mmmx 2>&1 | grep "unrecognized" >/dev/null ; then
+ true
+ else
+ XARCH_SUPPORT=yes
+ fi
+fi
+rm -f xarch.c xarch.o
+
+# done
+if [ "$XARCH_SUPPORT" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Xarch is not supported"
+ exit 0
+else
+ [ "$VERBOSE" = "yes" ] && echo "Xarch support detected"
+ exit 1
+fi
diff --git a/config.tests/mac/xcodeversion.cpp b/config.tests/mac/xcodeversion.cpp
new file mode 100644
index 0000000000..dc7e5fc104
--- /dev/null
+++ b/config.tests/mac/xcodeversion.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <Carbon/Carbon.h>
+
+int success = 0;
+int fail = 1;
+int internal_error = success; // enable dwarf on internal errors
+
+int main(int argc, const char **argv)
+{
+ CFURLRef cfurl;
+ OSStatus err = LSFindApplicationForInfo(0, CFSTR("com.apple.Xcode"), 0, 0, &cfurl);
+ if (err != noErr)
+ return internal_error;
+
+ CFBundleRef bundle = CFBundleCreate(0, cfurl);
+ if (bundle == 0)
+ return internal_error;
+
+ CFStringRef str = CFStringRef(CFBundleGetValueForInfoDictionaryKey(bundle, CFSTR("CFBundleShortVersionString")));
+ const char * ptr = CFStringGetCStringPtr(str, 0);
+ if (ptr == 0)
+ return internal_error;
+
+ // self-test
+ const char * fail1 = "2.4";
+ const char * fail2 = "2.4.0";
+ const char * fail3 ="2.3";
+ const char * ok1 = "2.4.1";
+ const char * ok2 ="2.5";
+ const char * ok3 ="3.0";
+// ptr = fail1;
+// printf ("string: %s\n", ptr);
+
+ int length = strlen(ptr);
+ if (length < 3) // expect "x.y" at least
+ return internal_error;
+
+ // fail on 2.4 and below (2.4.1 is ok)
+
+ if (ptr[0] < '2')
+ return fail;
+
+ if (ptr[0] >= '3')
+ return success;
+
+ if (ptr[2] < '4')
+ return fail;
+
+ if (length < 5)
+ return fail;
+
+ if (ptr[4] < '1')
+ return fail;
+
+ return success;
+} \ No newline at end of file
diff --git a/config.tests/qpa/wayland/wayland.cpp b/config.tests/qpa/wayland/wayland.cpp
new file mode 100644
index 0000000000..09f72c6d99
--- /dev/null
+++ b/config.tests/qpa/wayland/wayland.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <wayland-client.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/qpa/wayland/wayland.pro b/config.tests/qpa/wayland/wayland.pro
new file mode 100644
index 0000000000..0c2b8991bd
--- /dev/null
+++ b/config.tests/qpa/wayland/wayland.pro
@@ -0,0 +1,4 @@
+SOURCES = wayland.cpp
+CONFIG -= qt
+INCLUDEPATH += $$QMAKE_INCDIR_WAYLAND
+LIBS += $$QMAKE_LIBS_WAYLAND
diff --git a/config.tests/qws/ahi/ahi.cpp b/config.tests/qws/ahi/ahi.cpp
new file mode 100644
index 0000000000..330d28bb1b
--- /dev/null
+++ b/config.tests/qws/ahi/ahi.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <ahi.h>
+
+int main(int, char **)
+{
+ AhiInit(0);
+ AhiTerm();
+
+ return 0;
+}
diff --git a/config.tests/qws/ahi/ahi.pro b/config.tests/qws/ahi/ahi.pro
new file mode 100644
index 0000000000..532a565bc4
--- /dev/null
+++ b/config.tests/qws/ahi/ahi.pro
@@ -0,0 +1,3 @@
+SOURCES = ahi.cpp
+CONFIG -= qt
+LIBS += -lahi -lahioem
diff --git a/config.tests/qws/directfb/directfb.cpp b/config.tests/qws/directfb/directfb.cpp
new file mode 100644
index 0000000000..df6576b9f4
--- /dev/null
+++ b/config.tests/qws/directfb/directfb.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <directfb.h>
+
+int main(int, char **)
+{
+ DFBResult result = DFB_OK;
+ result = DirectFBInit(0, 0);
+
+ return (result == DFB_OK);
+}
diff --git a/config.tests/qws/directfb/directfb.pro b/config.tests/qws/directfb/directfb.pro
new file mode 100644
index 0000000000..db14d3ba48
--- /dev/null
+++ b/config.tests/qws/directfb/directfb.pro
@@ -0,0 +1,5 @@
+SOURCES = directfb.cpp
+CONFIG -= qt
+
+QMAKE_CXXFLAGS += $$QT_CFLAGS_DIRECTFB
+LIBS += $$QT_LIBS_DIRECTFB
diff --git a/config.tests/qws/sound/sound.cpp b/config.tests/qws/sound/sound.cpp
new file mode 100644
index 0000000000..2a5d24d981
--- /dev/null
+++ b/config.tests/qws/sound/sound.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <sys/soundcard.h>
+
+int main(int, char **)
+{
+ audio_buf_info info;
+
+ return 0;
+}
diff --git a/config.tests/qws/sound/sound.pro b/config.tests/qws/sound/sound.pro
new file mode 100644
index 0000000000..4ad3376dca
--- /dev/null
+++ b/config.tests/qws/sound/sound.pro
@@ -0,0 +1,2 @@
+SOURCES = sound.cpp
+CONFIG -= qt
diff --git a/config.tests/qws/svgalib/svgalib.cpp b/config.tests/qws/svgalib/svgalib.cpp
new file mode 100644
index 0000000000..985c9ae958
--- /dev/null
+++ b/config.tests/qws/svgalib/svgalib.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <vga.h>
+#include <vgagl.h>
+
+int main(int, char **)
+{
+ int mode = vga_getdefaultmode();
+ gl_setcontextvga(mode);
+
+ return 0;
+}
diff --git a/config.tests/qws/svgalib/svgalib.pro b/config.tests/qws/svgalib/svgalib.pro
new file mode 100644
index 0000000000..169065239b
--- /dev/null
+++ b/config.tests/qws/svgalib/svgalib.pro
@@ -0,0 +1,3 @@
+SOURCES = svgalib.cpp
+CONFIG -= qt
+LIBS += -lvgagl -lvga
diff --git a/config.tests/symbian/audio/.gitignore b/config.tests/symbian/audio/.gitignore
new file mode 100644
index 0000000000..87a251c68a
--- /dev/null
+++ b/config.tests/symbian/audio/.gitignore
@@ -0,0 +1,2 @@
+audio.rpp
+audio.rsg
diff --git a/config.tests/symbian/audio/audio.cpp b/config.tests/symbian/audio/audio.cpp
new file mode 100644
index 0000000000..c749bbee3a
--- /dev/null
+++ b/config.tests/symbian/audio/audio.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <sounddevice.h>
+
+int main(int argc, char **argv)
+{
+ return 0;
+}
diff --git a/config.tests/symbian/audio/audio.pro b/config.tests/symbian/audio/audio.pro
new file mode 100644
index 0000000000..b496341a36
--- /dev/null
+++ b/config.tests/symbian/audio/audio.pro
@@ -0,0 +1,10 @@
+TARGET = audio
+SOURCES = audio.cpp
+
+INCLUDEPATH += $${EPOCROOT}epoc32/include/mmf/server
+INCLUDEPATH += $${EPOCROOT}epoc32/include/mmf/common
+INCLUDEPATH += $${EPOCROOT}epoc32/include/platform
+
+LIBS += -lmmfdevsound
+CONFIG -= qt
+QT =
diff --git a/config.tests/symbian/compile.test b/config.tests/symbian/compile.test
new file mode 100755
index 0000000000..ab858191f7
--- /dev/null
+++ b/config.tests/symbian/compile.test
@@ -0,0 +1,46 @@
+#!/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
+shift 7
+LFLAGS=""
+INCLUDEPATH=""
+CXXFLAGS=""
+MAC_ARCH_CXXFLAGS=""
+MAC_ARCH_LFLAGS=""
+
+# debuggery
+[ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION auto-detection... ($*)"
+
+test -d "$OUTDIR/$TEST" || mkdir -p "$OUTDIR/$TEST"
+
+cd "$OUTDIR/$TEST"
+
+test -r Makefile && $MAKE distclean >/dev/null 2>&1
+
+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
+
+if [ "$VERBOSE" = "yes" ]; then
+ $MAKE
+else
+ $MAKE >/dev/null 2>&1
+fi
+
+[ -x "$EXE.exe" ] && SUCCESS=yes
+
+# done
+if [ "$SUCCESS" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION disabled."
+ exit 1
+else
+ [ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION enabled."
+ exit 0
+fi
diff --git a/config.tests/symbian/simple/main.cpp b/config.tests/symbian/simple/main.cpp
new file mode 100644
index 0000000000..d2f35f324f
--- /dev/null
+++ b/config.tests/symbian/simple/main.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <stdio.h>
+
+int main(int, char **) {
+ printf("test\n");
+ return 0;
+}
diff --git a/config.tests/symbian/simple/simple.pro b/config.tests/symbian/simple/simple.pro
new file mode 100644
index 0000000000..9c60d622f2
--- /dev/null
+++ b/config.tests/symbian/simple/simple.pro
@@ -0,0 +1,5 @@
+TEMPLATE = app
+CONFIG -= qt
+QT =
+SOURCES += main.cpp
+
diff --git a/config.tests/unix/3dnow/3dnow.cpp b/config.tests/unix/3dnow/3dnow.cpp
new file mode 100644
index 0000000000..a56e20947f
--- /dev/null
+++ b/config.tests/unix/3dnow/3dnow.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <mm3dnow.h>
+#if defined(__GNUC__) && __GNUC__ < 4 && __GNUC_MINOR__ < 3
+#error GCC < 3.2 is known to create internal compiler errors with our MMX code
+#endif
+
+int main(int, char**)
+{
+ _m_femms();
+ return 0;
+}
diff --git a/config.tests/unix/3dnow/3dnow.pro b/config.tests/unix/3dnow/3dnow.pro
new file mode 100644
index 0000000000..90a8a191dc
--- /dev/null
+++ b/config.tests/unix/3dnow/3dnow.pro
@@ -0,0 +1,3 @@
+SOURCES = 3dnow.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/alsa/alsa.pro b/config.tests/unix/alsa/alsa.pro
new file mode 100644
index 0000000000..4931d38ea8
--- /dev/null
+++ b/config.tests/unix/alsa/alsa.pro
@@ -0,0 +1,4 @@
+SOURCES = alsatest.cpp
+LIBS+=-lasound
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/alsa/alsatest.cpp b/config.tests/unix/alsa/alsatest.cpp
new file mode 100644
index 0000000000..d3292f6aaa
--- /dev/null
+++ b/config.tests/unix/alsa/alsatest.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <alsa/asoundlib.h>
+#if(!(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 10))
+#error "Alsa version found too old, require >= 1.0.10"
+#endif
+
+int main(int argc,char **argv)
+{
+}
+
diff --git a/config.tests/unix/avx/avx.cpp b/config.tests/unix/avx/avx.cpp
new file mode 100644
index 0000000000..9ff139caf6
--- /dev/null
+++ b/config.tests/unix/avx/avx.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <immintrin.h>
+
+int main(int, char**)
+{
+ volatile __m256d a = _mm256_setzero_pd();
+ volatile __m256d b = _mm256_set1_pd(42.42);
+ volatile __m256d result = _mm256_add_pd(a, b);
+ (void)result;
+ return 0;
+}
diff --git a/config.tests/unix/avx/avx.pro b/config.tests/unix/avx/avx.pro
new file mode 100644
index 0000000000..00a05500eb
--- /dev/null
+++ b/config.tests/unix/avx/avx.pro
@@ -0,0 +1,3 @@
+SOURCES = avx.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/bsymbolic_functions.test b/config.tests/unix/bsymbolic_functions.test
new file mode 100755
index 0000000000..6c3489591b
--- /dev/null
+++ b/config.tests/unix/bsymbolic_functions.test
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+BSYMBOLIC_FUNCTIONS_SUPPORT=no
+COMPILER=$1
+VERBOSE=$2
+
+
+cat >>bsymbolic_functions.c << EOF
+int main() { return 0; }
+EOF
+
+$COMPILER -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c >/dev/null 2>&1 && BSYMBOLIC_FUNCTIONS_SUPPORT=yes
+rm -f bsymbolic_functions.c libtest.so
+
+# done
+if [ "$BSYMBOLIC_FUNCTIONS_SUPPORT" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Symbolic function binding disabled."
+ exit 0
+else
+ [ "$VERBOSE" = "yes" ] && echo "Symbolic function binding enabled."
+ exit 1
+fi
diff --git a/config.tests/unix/clock-gettime/clock-gettime.cpp b/config.tests/unix/clock-gettime/clock-gettime.cpp
new file mode 100644
index 0000000000..52696f182e
--- /dev/null
+++ b/config.tests/unix/clock-gettime/clock-gettime.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <unistd.h>
+#include <time.h>
+
+int main(int, char **)
+{
+#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0)
+ timespec ts;
+ clock_gettime(CLOCK_REALTIME, &ts);
+#else
+# error "Feature _POSIX_TIMERS not available"
+ // MIPSpro doesn't understand #error, so force a compiler error
+ force_compiler_error = true;
+#endif
+ return 0;
+}
+
diff --git a/config.tests/unix/clock-gettime/clock-gettime.pri b/config.tests/unix/clock-gettime/clock-gettime.pri
new file mode 100644
index 0000000000..65b49fb8b4
--- /dev/null
+++ b/config.tests/unix/clock-gettime/clock-gettime.pri
@@ -0,0 +1,2 @@
+# clock_gettime() is implemented in librt on these systems
+linux-*|hpux-*|solaris-*:LIBS_PRIVATE *= -lrt
diff --git a/config.tests/unix/clock-gettime/clock-gettime.pro b/config.tests/unix/clock-gettime/clock-gettime.pro
new file mode 100644
index 0000000000..c527535183
--- /dev/null
+++ b/config.tests/unix/clock-gettime/clock-gettime.pro
@@ -0,0 +1,4 @@
+SOURCES = clock-gettime.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+include(clock-gettime.pri)
diff --git a/config.tests/unix/clock-monotonic/clock-monotonic.cpp b/config.tests/unix/clock-monotonic/clock-monotonic.cpp
new file mode 100644
index 0000000000..ec045aa80d
--- /dev/null
+++ b/config.tests/unix/clock-monotonic/clock-monotonic.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <unistd.h>
+#include <time.h>
+
+int main(int, char **)
+{
+#if defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK-0 >= 0)
+ timespec ts;
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+#else
+# error "Feature _POSIX_MONOTONIC_CLOCK not available"
+ // MIPSpro doesn't understand #error, so force a compiler error
+ force_compiler_error = true;
+#endif
+ return 0;
+}
+
diff --git a/config.tests/unix/clock-monotonic/clock-monotonic.pro b/config.tests/unix/clock-monotonic/clock-monotonic.pro
new file mode 100644
index 0000000000..961e3a848d
--- /dev/null
+++ b/config.tests/unix/clock-monotonic/clock-monotonic.pro
@@ -0,0 +1,4 @@
+SOURCES = clock-monotonic.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+include(../clock-gettime/clock-gettime.pri)
diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test
new file mode 100755
index 0000000000..f4a7f29b1a
--- /dev/null
+++ b/config.tests/unix/compile.test
@@ -0,0 +1,88 @@
+#!/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
+shift 7
+LFLAGS="$SYSROOT_FLAG"
+INCLUDEPATH=""
+CXXFLAGS="$SYSROOT_FLAG"
+MAC_ARCH_CXXFLAGS=""
+MAC_ARCH_LFLAGS=""
+while [ "$#" -gt 0 ]; do
+ PARAM=$1
+ case $PARAM in
+ -framework)
+ LFLAGS="$LFLAGS -framework \"$2\""
+ shift
+ ;;
+ -arch)
+ MAC_ARCH_CXXFLAGS="$MAC_ARCH_CXXFLAGS -arch $2"
+ MAC_ARCH_LFLAGS="$MAC_ARCH_LFLAGS -arch $2"
+ shift
+ ;;
+ -sdk)
+ LFLAGS="$LFLAGS -Wl,-syslibroot,$2"
+ CXXFLAGS="$CXXFLAGS -isysroot $2"
+ shift
+ ;;
+ -F*|-m*|-x*)
+ LFLAGS="$LFLAGS $PARAM"
+ CXXFLAGS="$CXXFLAGS $PARAM"
+ ;;
+ -L*|-l*|-pthread)
+ LFLAGS="$LFLAGS $PARAM"
+ ;;
+ -I*)
+ INC=`echo $PARAM | sed -e 's/^-I//'`
+ INCLUDEPATH="$INCLUDEPATH $INC"
+ ;;
+ -f*|-D*)
+ CXXFLAGS="$CXXFLAGS $PARAM"
+ ;;
+ -Qoption)
+ # Two-argument form for the Sun Compiler
+ CXXFLAGS="$CXXFLAGS $PARAM \"$2\""
+ shift
+ ;;
+ *) ;;
+ esac
+ shift
+done
+
+# debuggery
+[ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION auto-detection... ($*)"
+
+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"
+
+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
+
+if [ "$VERBOSE" = "yes" ]; then
+ $MAKE
+else
+ $MAKE >/dev/null 2>&1
+fi
+
+( [ -x "$EXE" ] || [ -x "${EXE}.exe" ] ) && SUCCESS=yes
+
+# done
+if [ "$SUCCESS" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION disabled."
+ exit 1
+else
+ [ "$VERBOSE" = "yes" ] && echo "$DESCRIPTION enabled."
+ exit 0
+fi
diff --git a/config.tests/unix/cups/cups.cpp b/config.tests/unix/cups/cups.cpp
new file mode 100644
index 0000000000..09b8edfd4a
--- /dev/null
+++ b/config.tests/unix/cups/cups.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <cups/cups.h>
+
+int main(int, char **)
+{
+ cups_dest_t *d;
+ cupsGetDests(&d);
+ return 0;
+}
diff --git a/config.tests/unix/cups/cups.pro b/config.tests/unix/cups/cups.pro
new file mode 100644
index 0000000000..d7b78c877f
--- /dev/null
+++ b/config.tests/unix/cups/cups.pro
@@ -0,0 +1,4 @@
+SOURCES = cups.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lcups
diff --git a/config.tests/unix/db2/db2.cpp b/config.tests/unix/db2/db2.cpp
new file mode 100644
index 0000000000..e03712c8b1
--- /dev/null
+++ b/config.tests/unix/db2/db2.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <sqlcli.h>
+#include <sqlcli1.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/db2/db2.pro b/config.tests/unix/db2/db2.pro
new file mode 100644
index 0000000000..0fa39a8242
--- /dev/null
+++ b/config.tests/unix/db2/db2.pro
@@ -0,0 +1,4 @@
+SOURCES = db2.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -ldb2
diff --git a/config.tests/unix/dbus/dbus.cpp b/config.tests/unix/dbus/dbus.cpp
new file mode 100644
index 0000000000..88e8a5ea29
--- /dev/null
+++ b/config.tests/unix/dbus/dbus.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#define DBUS_API_SUBJECT_TO_CHANGE
+#include <dbus/dbus.h>
+
+#if DBUS_MAJOR_PROTOCOL_VERSION < 1
+#error Needs at least dbus version 1
+#endif
+
+int main(int, char **)
+{
+ dbus_shutdown();
+ return 0;
+}
diff --git a/config.tests/unix/dbus/dbus.pro b/config.tests/unix/dbus/dbus.pro
new file mode 100644
index 0000000000..1e4aea73e4
--- /dev/null
+++ b/config.tests/unix/dbus/dbus.pro
@@ -0,0 +1,3 @@
+SOURCES = dbus.cpp
+CONFIG -= qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/doubleformat.test b/config.tests/unix/doubleformat.test
new file mode 100755
index 0000000000..996855372b
--- /dev/null
+++ b/config.tests/unix/doubleformat.test
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+QMKSPEC=$1
+VERBOSE=$2
+SRCDIR=$3
+OUTDIR=$4
+
+# debuggery
+[ "$VERBOSE" = "yes" ] && echo "Determining floating point word-order... ($*)"
+
+# build and run a test program
+test -d "$OUTDIR/config.tests/unix/doubleformat" || mkdir -p "$OUTDIR/config.tests/unix/doubleformat"
+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/config.tests/unix/doubleformat/doubleformattest.pro" -o "$OUTDIR/config.tests/unix/doubleformat/Makefile" >/dev/null 2>&1
+cd "$OUTDIR/config.tests/unix/doubleformat"
+
+DOUBLEFORMAT="UNKNOWN"
+[ "$VERBOSE" = "yes" ] && $MAKE || $MAKE >/dev/null 2>&1
+
+if [ -f ./doubleformattest ]; then
+ : # nop
+else
+ [ "$VERBOSE" = "yes" ] && echo "Unknown floating point format!"
+ exit 2
+fi
+
+# LE: strings | grep 0123ABCD0123ABCD
+# BE: strings | grep DCBA3210DCBA3210
+#
+# LE arm-swapped-dword-order: strings | grep ABCD0123ABCD0123
+# BE arm-swapped-dword-order: strings | grep 3210DCBA3210DCBA (untested)
+
+
+if strings ./doubleformattest | grep "0123ABCD0123ABCD" >/dev/null 2>&1; then
+ [ "$VERBOSE" = "yes" ] && echo " Normal little endian format"
+ DOUBLEFORMAT="LITTLE"
+elif strings ./doubleformattest | grep "ABCD0123ABCD0123" >/dev/null 2>&1; then
+ [ "$VERBOSE" = "yes" ] && echo " Swapped little endian format"
+ DOUBLEFORMAT="LITTLESWAPPED"
+elif strings ./doubleformattest | grep "DCBA3210DCBA3210" >/dev/null 2>&1; then
+ [ "$VERBOSE" = "yes" ] && echo " Normal big endian format"
+ DOUBLEFORMAT="BIG"
+elif strings ./doubleformattest | grep "3210DCBA3210DCBA" >/dev/null 2>&1; then
+ [ "$VERBOSE" = "yes" ] && echo " Swapped big endian format"
+ DOUBLEFORMAT="BIGSWAPPED"
+fi
+
+# done
+if [ "$DOUBLEFORMAT" = "LITTLE" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Using little endian."
+ exit 10
+elif [ "$DOUBLEFORMAT" = "BIG" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Using big endian."
+ exit 11
+elif [ "$DOUBLEFORMAT" = "LITTLESWAPPED" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Using swapped little endian."
+ exit 12
+elif [ "$DOUBLEFORMAT" = "BIGSWAPPED" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Using swapped big endian."
+ exit 13
+else
+ [ "$VERBOSE" = "yes" ] && echo "Unknown floating point format!"
+ exit 99
+fi
diff --git a/config.tests/unix/doubleformat/doubleformattest.cpp b/config.tests/unix/doubleformat/doubleformattest.cpp
new file mode 100644
index 0000000000..b906e00af0
--- /dev/null
+++ b/config.tests/unix/doubleformat/doubleformattest.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+
+LE: strings | grep 0123ABCD0123ABCD
+BE: strings | grep DCBA3210DCBA3210
+
+LE arm-swapped-dword-order: strings | grep ABCD0123ABCD0123
+BE arm-swapped-dword-order: strings | grep 3210DCBA3210DCBA (untested)
+
+tested on x86, arm-le (gp), aix
+
+*/
+
+#include <stdlib.h>
+
+// equals static char c [] = "0123ABCD0123ABCD\0\0\0\0\0\0\0"
+static double d [] = { 710524581542275055616.0, 710524581542275055616.0, 0.0 };
+
+int main(int argc, char **argv)
+{
+ // make sure the linker doesn't throw away the arrays
+ double *d2 = (double *) d;
+ if (argc > 3)
+ d[1] += 1;
+ return d2[0] + d[2] + atof(argv[1]);
+}
diff --git a/config.tests/unix/doubleformat/doubleformattest.pro b/config.tests/unix/doubleformat/doubleformattest.pro
new file mode 100644
index 0000000000..7e51deade5
--- /dev/null
+++ b/config.tests/unix/doubleformat/doubleformattest.pro
@@ -0,0 +1,3 @@
+SOURCES = doubleformattest.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/egl/egl.cpp b/config.tests/unix/egl/egl.cpp
new file mode 100644
index 0000000000..db6956ab22
--- /dev/null
+++ b/config.tests/unix/egl/egl.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <EGL/egl.h>
+
+int main(int, char **)
+{
+ EGLint x = 0;
+ EGLDisplay dpy = 0;
+ EGLContext ctx = 0;
+ eglDestroyContext(dpy, ctx);
+ return 0;
+}
diff --git a/config.tests/unix/egl/egl.pro b/config.tests/unix/egl/egl.pro
new file mode 100644
index 0000000000..f04d053543
--- /dev/null
+++ b/config.tests/unix/egl/egl.pro
@@ -0,0 +1,10 @@
+SOURCES = egl.cpp
+
+for(p, QMAKE_LIBDIR_EGL) {
+ exists($$p):LIBS += -L$$p
+}
+
+!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL
+!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
+
+CONFIG -= qt
diff --git a/config.tests/unix/egl4gles1/egl4gles1.cpp b/config.tests/unix/egl4gles1/egl4gles1.cpp
new file mode 100644
index 0000000000..e146680531
--- /dev/null
+++ b/config.tests/unix/egl4gles1/egl4gles1.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <GLES/egl.h>
+
+int main(int, char **)
+{
+ EGLint x = 0;
+ EGLDisplay dpy = 0;
+ EGLContext ctx = 0;
+ eglDestroyContext(dpy, ctx);
+ return 0;
+}
diff --git a/config.tests/unix/egl4gles1/egl4gles1.pro b/config.tests/unix/egl4gles1/egl4gles1.pro
new file mode 100644
index 0000000000..667ea8e3ac
--- /dev/null
+++ b/config.tests/unix/egl4gles1/egl4gles1.pro
@@ -0,0 +1,10 @@
+SOURCES = egl4gles1.cpp
+
+for(p, QMAKE_LIBDIR_EGL) {
+ exists($$p):LIBS += -L$$p
+}
+
+!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL
+!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
+
+CONFIG -= qt
diff --git a/config.tests/unix/endian.test b/config.tests/unix/endian.test
new file mode 100755
index 0000000000..d0fb6ce785
--- /dev/null
+++ b/config.tests/unix/endian.test
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+QMKSPEC=$1
+VERBOSE=$2
+SRCDIR=$3
+OUTDIR=$4
+
+# debuggery
+[ "$VERBOSE" = "yes" ] && echo "Determining machine byte-order... ($*)"
+
+# build and run a test program
+test -d "$OUTDIR/config.tests/unix/endian" || mkdir -p "$OUTDIR/config.tests/unix/endian"
+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/config.tests/unix/endian/endiantest.pro" -o "$OUTDIR/config.tests/unix/endian/Makefile" >/dev/null 2>&1
+cd "$OUTDIR/config.tests/unix/endian"
+
+
+ENDIAN="UNKNOWN"
+[ "$VERBOSE" = "yes" ] && $MAKE || $MAKE >/dev/null 2>&1
+
+if [ -f ./endiantest.exe ]; then
+ binary=./endiantest.exe
+else
+ binary=./endiantest
+fi
+
+
+if [ -f $binary ]; then
+ : # nop
+else
+ [ "$VERBOSE" = "yes" ] && echo "Unknown byte order!"
+ exit 2
+fi
+
+if strings $binary | grep LeastSignificantByteFirst >/dev/null 2>&1; then
+ [ "$VERBOSE" = "yes" ] && echo " Found 'LeastSignificantByteFirst' in binary"
+ ENDIAN="LITTLE"
+elif strings $binary | grep MostSignificantByteFirst >/dev/null 2>&1; then
+ [ "$VERBOSE" = "yes" ] && echo " Found 'MostSignificantByteFirst' in binary"
+ ENDIAN="BIG"
+fi
+
+# make clean as this tests is compiled for both the host and the target
+$MAKE distclean
+
+# done
+if [ "$ENDIAN" = "LITTLE" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Using little endian."
+ exit 0
+elif [ "$ENDIAN" = "BIG" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Using big endian."
+ exit 1
+else
+ [ "$VERBOSE" = "yes" ] && echo "Unknown byte order!"
+ exit 2
+fi
diff --git a/config.tests/unix/endian/endiantest.cpp b/config.tests/unix/endian/endiantest.cpp
new file mode 100644
index 0000000000..40b2c3862d
--- /dev/null
+++ b/config.tests/unix/endian/endiantest.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// "MostSignificantByteFirst"
+short msb_bigendian[] = { 0x0000, 0x4d6f, 0x7374, 0x5369, 0x676e, 0x6966, 0x6963, 0x616e, 0x7442, 0x7974, 0x6546, 0x6972, 0x7374, 0x0000 };
+
+// "LeastSignificantByteFirst"
+short lsb_littleendian[] = { 0x0000, 0x654c, 0x7361, 0x5374, 0x6769, 0x696e, 0x6966, 0x6163, 0x746e, 0x7942, 0x6574, 0x6946, 0x7372, 0x0074, 0x0000 };
+
+int main(int, char **)
+{
+ // make sure the linker doesn't throw away the arrays
+ void (*msb_bigendian_string)() = (void (*)())msb_bigendian;
+ void (*lsb_littleendian_string)() = (void (*)())lsb_littleendian;
+ (void)msb_bigendian_string();
+ (void)lsb_littleendian_string();
+ return msb_bigendian[1] == lsb_littleendian[1];
+}
diff --git a/config.tests/unix/endian/endiantest.pro b/config.tests/unix/endian/endiantest.pro
new file mode 100644
index 0000000000..7b739eb3f2
--- /dev/null
+++ b/config.tests/unix/endian/endiantest.pro
@@ -0,0 +1,3 @@
+SOURCES = endiantest.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/floatmath/floatmath.cpp b/config.tests/unix/floatmath/floatmath.cpp
new file mode 100644
index 0000000000..e076a5c6ab
--- /dev/null
+++ b/config.tests/unix/floatmath/floatmath.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <math.h>
+
+int main(int argc, char **argv)
+{
+ float c = ceilf(1.3f);
+ float f = floorf(1.7f);
+ float s = sinf(3.8);
+ float t = cosf(7.3);
+ float u = sqrtf(8.4);
+ float l = logf(9.2);
+
+ if (c == 1.0f && f == 2.0f && s == 3.0f && t == 4.0f && u == 5.0f && l == 6.0f)
+ return 0;
+ else
+ return 1;
+}
+
diff --git a/config.tests/unix/floatmath/floatmath.pro b/config.tests/unix/floatmath/floatmath.pro
new file mode 100644
index 0000000000..4c785638b2
--- /dev/null
+++ b/config.tests/unix/floatmath/floatmath.pro
@@ -0,0 +1,3 @@
+SOURCES = floatmath.cpp
+CONFIG -= x11 qt
+
diff --git a/config.tests/unix/freetype/freetype.cpp b/config.tests/unix/freetype/freetype.cpp
new file mode 100644
index 0000000000..3c157e138c
--- /dev/null
+++ b/config.tests/unix/freetype/freetype.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#if ((FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) < 20103)
+# error "This version of freetype is too old."
+#endif
+
+int main(int, char **)
+{
+ FT_Face face;
+ face = 0;
+ return 0;
+}
diff --git a/config.tests/unix/freetype/freetype.pri b/config.tests/unix/freetype/freetype.pri
new file mode 100644
index 0000000000..7ef1cf93b1
--- /dev/null
+++ b/config.tests/unix/freetype/freetype.pri
@@ -0,0 +1,9 @@
+!cross_compile {
+ TRY_INCLUDEPATHS = /include /usr/include $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
+ # LSB doesn't allow using headers from /include or /usr/include
+ linux-lsb-g++:TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
+ for(p, TRY_INCLUDEPATHS) {
+ p = $$join(p, "", "", "/freetype2")
+ exists($$p):INCLUDEPATH *= $$p
+ }
+}
diff --git a/config.tests/unix/freetype/freetype.pro b/config.tests/unix/freetype/freetype.pro
new file mode 100644
index 0000000000..e84158e25a
--- /dev/null
+++ b/config.tests/unix/freetype/freetype.pro
@@ -0,0 +1,5 @@
+SOURCES = freetype.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lfreetype
+include(freetype.pri)
diff --git a/config.tests/unix/fvisibility.test b/config.tests/unix/fvisibility.test
new file mode 100755
index 0000000000..27c6841082
--- /dev/null
+++ b/config.tests/unix/fvisibility.test
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+FVISIBILITY_SUPPORT=no
+COMPILER=$1
+VERBOSE=$2
+
+CMDLINE=
+
+
+RunCompileTest() {
+ cat >>fvisibility.c << EOF
+#if defined(__GNUC__)
+# if (__GNUC__ < 4)
+# error "GCC3 with backported visibility patch is known to miscompile Qt"
+# endif
+__attribute((visibility("default"))) void blah();
+#elif defined(__SUNPRO_CC)
+# if (__SUNPRO_CC < 0x0550)
+# error "SunStudio 8 or later is required for ELF visibility"
+# endif
+__global void blah();
+#else
+# error "GCC4+ or SunStudio 8+ are required to support ELF visibility"
+#endif
+EOF
+
+ if [ "$VERBOSE" = "yes" ] ; then
+ "$COMPILER" -c $CMDLINE fvisibility.c && FVISIBILITY_SUPPORT=yes
+ else
+ "$COMPILER" -c $CMDLINE fvisibility.c >/dev/null 2>&1 && FVISIBILITY_SUPPORT=yes
+ fi
+ rm -f fvisibility.c fvisibility.o
+}
+
+
+case "$COMPILER" in
+*g++*|*c++*)
+ CMDLINE="-fvisibility=hidden"
+ RunCompileTest
+ ;;
+
+aCC*)
+ ;;
+
+icpc)
+ ICPC_VERSION=`icpc -dumpversion`
+ case "$ICPC_VERSION" in
+ 8.*|9.*|10.0)
+ # 8.x, 9.x, and 10.0 don't support symbol visibility
+ ;;
+ *)
+ # the compile test works for the intel compiler because it mimics gcc's behavior
+ CMDLINE="-fvisibility=hidden"
+ RunCompileTest
+ ;;
+ esac
+ ;;
+
+CC)
+ # This should be SunStudio. If not, it'll get caught.
+ CMDLINE="-xldscope=hidden"
+ RunCompileTest
+ ;;
+esac
+
+# done
+if [ "$FVISIBILITY_SUPPORT" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Symbol visibility control disabled."
+ exit 0
+else
+ [ "$VERBOSE" = "yes" ] && echo "Symbol visibility control enabled."
+ exit 1
+fi
diff --git a/config.tests/unix/getaddrinfo/getaddrinfo.pro b/config.tests/unix/getaddrinfo/getaddrinfo.pro
new file mode 100644
index 0000000000..c9121db9b4
--- /dev/null
+++ b/config.tests/unix/getaddrinfo/getaddrinfo.pro
@@ -0,0 +1,4 @@
+SOURCES = getaddrinfotest.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += $$QMAKE_LIBS_NETWORK
diff --git a/config.tests/unix/getaddrinfo/getaddrinfotest.cpp b/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
new file mode 100644
index 0000000000..4b97dc99e5
--- /dev/null
+++ b/config.tests/unix/getaddrinfo/getaddrinfotest.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/* Sample program for configure to test for getaddrinfo on the unix
+ platform. we check for all structures and functions required. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef __MINGW32__
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#endif
+
+int main()
+{
+ addrinfo *res = 0;
+ if (getaddrinfo("foo", 0, 0, &res) == 0)
+ freeaddrinfo(res);
+ gai_strerror(0);
+
+ return 0;
+}
diff --git a/config.tests/unix/getifaddrs/getifaddrs.cpp b/config.tests/unix/getifaddrs/getifaddrs.cpp
new file mode 100644
index 0000000000..f8cdf0a3fc
--- /dev/null
+++ b/config.tests/unix/getifaddrs/getifaddrs.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/* Sample program for configure to test for if_nametoindex support
+on target platforms. */
+
+#if defined(__hpux)
+#define _HPUX_SOURCE
+#endif
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#include <ifaddrs.h>
+
+int main()
+{
+ ifaddrs *list;
+ getifaddrs(&list);
+ freeifaddrs(list);
+ return 0;
+}
diff --git a/config.tests/unix/getifaddrs/getifaddrs.pro b/config.tests/unix/getifaddrs/getifaddrs.pro
new file mode 100644
index 0000000000..c3fead6354
--- /dev/null
+++ b/config.tests/unix/getifaddrs/getifaddrs.pro
@@ -0,0 +1,5 @@
+SOURCES = getifaddrs.cpp
+CONFIG -= qt
+mac:CONFIG -= app_bundle
+QT =
+LIBS += $$QMAKE_LIBS_NETWORK
diff --git a/config.tests/unix/glib/glib.cpp b/config.tests/unix/glib/glib.cpp
new file mode 100644
index 0000000000..6784454f51
--- /dev/null
+++ b/config.tests/unix/glib/glib.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+typedef struct _GMainContext GMainContext;
+
+#include <glib.h>
+
+int main(int, char **)
+{
+ GMainContext *context;
+ GSource *source;
+ GPollFD *pollfd;
+ if (!g_thread_supported())
+ g_thread_init(NULL);
+ context = g_main_context_default();
+ source = g_source_new(0, 0);
+ g_source_add_poll(source, pollfd);
+ return 0;
+}
diff --git a/config.tests/unix/glib/glib.pro b/config.tests/unix/glib/glib.pro
new file mode 100644
index 0000000000..15d059df77
--- /dev/null
+++ b/config.tests/unix/glib/glib.pro
@@ -0,0 +1,2 @@
+SOURCES = glib.cpp
+CONFIG -= qt
diff --git a/config.tests/unix/gnu-libiconv/gnu-libiconv.cpp b/config.tests/unix/gnu-libiconv/gnu-libiconv.cpp
new file mode 100644
index 0000000000..722522d04e
--- /dev/null
+++ b/config.tests/unix/gnu-libiconv/gnu-libiconv.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#if defined(__sgi)
+#error "iconv not supported on IRIX"
+#else
+#include <iconv.h>
+
+int main(int, char **)
+{
+ iconv_t x = iconv_open("", "");
+
+ const char *inp;
+ char *outp;
+ size_t inbytes, outbytes;
+ iconv(x, &inp, &inbytes, &outp, &outbytes);
+
+ iconv_close(x);
+
+ return 0;
+}
+#endif
diff --git a/config.tests/unix/gnu-libiconv/gnu-libiconv.pro b/config.tests/unix/gnu-libiconv/gnu-libiconv.pro
new file mode 100644
index 0000000000..d879b205f1
--- /dev/null
+++ b/config.tests/unix/gnu-libiconv/gnu-libiconv.pro
@@ -0,0 +1,4 @@
+SOURCES = gnu-libiconv.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -liconv
diff --git a/config.tests/unix/gstreamer/gstreamer.cpp b/config.tests/unix/gstreamer/gstreamer.cpp
new file mode 100644
index 0000000000..43d9b98366
--- /dev/null
+++ b/config.tests/unix/gstreamer/gstreamer.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <gst/gst.h>
+#include <gst/interfaces/propertyprobe.h>
+#include <gst/interfaces/xoverlay.h>
+
+#if !defined(GST_VERSION_MAJOR) \
+ || !defined(GST_VERSION_MINOR)
+# error "No GST_VERSION_* macros"
+#elif GST_VERION_MAJOR != 0 && GST_VERSION_MINOR != 10
+# error "Incompatible version of GStreamer found (Version 0.10.x is required)."
+#endif
+
+int main(int argc, char **argv)
+{
+}
diff --git a/config.tests/unix/gstreamer/gstreamer.pro b/config.tests/unix/gstreamer/gstreamer.pro
new file mode 100644
index 0000000000..7d4aa8e2e5
--- /dev/null
+++ b/config.tests/unix/gstreamer/gstreamer.pro
@@ -0,0 +1,3 @@
+SOURCES = gstreamer.cpp
+CONFIG -= qt
+LIBS += -lgstinterfaces-0.10 -lgstvideo-0.10 -lgstbase-0.10
diff --git a/config.tests/unix/ibase/ibase.cpp b/config.tests/unix/ibase/ibase.cpp
new file mode 100644
index 0000000000..aaba0f946d
--- /dev/null
+++ b/config.tests/unix/ibase/ibase.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <ibase.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/ibase/ibase.pro b/config.tests/unix/ibase/ibase.pro
new file mode 100644
index 0000000000..01e7429733
--- /dev/null
+++ b/config.tests/unix/ibase/ibase.pro
@@ -0,0 +1,4 @@
+SOURCES = ibase.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lgds
diff --git a/config.tests/unix/icd/icd.cpp b/config.tests/unix/icd/icd.cpp
new file mode 100644
index 0000000000..593540f92d
--- /dev/null
+++ b/config.tests/unix/icd/icd.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <wlancond.h>
+
+#include <icd/dbus_api.h>
+#include <icd/network_api_defines.h>
+
+#include <icd/osso-ic.h>
+#include <icd/osso-ic-dbus.h>
+
+#include <conn_settings.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/icd/icd.pro b/config.tests/unix/icd/icd.pro
new file mode 100644
index 0000000000..d736b4142f
--- /dev/null
+++ b/config.tests/unix/icd/icd.pro
@@ -0,0 +1,3 @@
+SOURCES = icd.cpp
+CONFIG -= qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/iconv/iconv.cpp b/config.tests/unix/iconv/iconv.cpp
new file mode 100644
index 0000000000..568b6bd2e2
--- /dev/null
+++ b/config.tests/unix/iconv/iconv.cpp
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#if defined(__sgi)
+#error "iconv not supported on IRIX"
+#else
+#include <iconv.h>
+
+int main(int, char **)
+{
+ iconv_t x = iconv_open("", "");
+
+ char *inp;
+ char *outp;
+ size_t inbytes, outbytes;
+ iconv(x, &inp, &inbytes, &outp, &outbytes);
+
+ iconv_close(x);
+
+ return 0;
+}
+#endif
diff --git a/config.tests/unix/iconv/iconv.pro b/config.tests/unix/iconv/iconv.pro
new file mode 100644
index 0000000000..d642da2f2b
--- /dev/null
+++ b/config.tests/unix/iconv/iconv.pro
@@ -0,0 +1,3 @@
+SOURCES = iconv.cpp
+CONFIG -= qt dylib app_bundle
+mac|win32-g++*:LIBS += -liconv
diff --git a/config.tests/unix/icu/icu.cpp b/config.tests/unix/icu/icu.cpp
new file mode 100644
index 0000000000..f03b1608f1
--- /dev/null
+++ b/config.tests/unix/icu/icu.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <unicode/utypes.h>
+#include <unicode/ucol.h>
+#include <unicode/ustring.h>
+
+int main(int, char **)
+{
+ UErrorCode status = U_ZERO_ERROR;
+ UCollator *collator = ucol_open("ru_RU", &status);
+ if (U_FAILURE(status))
+ return 0;
+ ucol_close(collator);
+ return 0;
+}
diff --git a/config.tests/unix/icu/icu.pro b/config.tests/unix/icu/icu.pro
new file mode 100644
index 0000000000..8e583348bb
--- /dev/null
+++ b/config.tests/unix/icu/icu.pro
@@ -0,0 +1,4 @@
+SOURCES = icu.cpp
+CONFIG -= qt dylib app_bundle
+unix:LIBS += -licuuc -licui18n
+win32:LIBS += -licuin
diff --git a/config.tests/unix/inotify/inotify.pro b/config.tests/unix/inotify/inotify.pro
new file mode 100644
index 0000000000..e2e1560a47
--- /dev/null
+++ b/config.tests/unix/inotify/inotify.pro
@@ -0,0 +1,3 @@
+SOURCES = inotifytest.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/inotify/inotifytest.cpp b/config.tests/unix/inotify/inotifytest.cpp
new file mode 100644
index 0000000000..a08df3f27d
--- /dev/null
+++ b/config.tests/unix/inotify/inotifytest.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <sys/inotify.h>
+
+int main()
+{
+ inotify_init();
+ inotify_add_watch(0, "foobar", IN_ACCESS);
+ inotify_rm_watch(0, 1);
+ return 0;
+}
diff --git a/config.tests/unix/iodbc/iodbc.cpp b/config.tests/unix/iodbc/iodbc.cpp
new file mode 100644
index 0000000000..6b4cc3dba5
--- /dev/null
+++ b/config.tests/unix/iodbc/iodbc.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <sql.h>
+#include <sqlext.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/iodbc/iodbc.pro b/config.tests/unix/iodbc/iodbc.pro
new file mode 100644
index 0000000000..465a9a7a1b
--- /dev/null
+++ b/config.tests/unix/iodbc/iodbc.pro
@@ -0,0 +1,4 @@
+SOURCES = iodbc.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -liodbc
diff --git a/config.tests/unix/ipv6/ipv6.pro b/config.tests/unix/ipv6/ipv6.pro
new file mode 100644
index 0000000000..c51e61bc8b
--- /dev/null
+++ b/config.tests/unix/ipv6/ipv6.pro
@@ -0,0 +1,3 @@
+SOURCES = ipv6test.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/ipv6/ipv6test.cpp b/config.tests/unix/ipv6/ipv6test.cpp
new file mode 100644
index 0000000000..d33c53427d
--- /dev/null
+++ b/config.tests/unix/ipv6/ipv6test.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/* Sample program for configure to test IPv6 support on target
+platforms. We check for the required IPv6 data structures. */
+
+#if defined(__hpux)
+#define _HPUX_SOURCE
+#endif
+
+#ifdef __MINGW32__
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#endif
+
+int main()
+{
+ sockaddr_in6 tmp;
+ sockaddr_storage tmp2;
+ (void)tmp.sin6_addr.s6_addr;
+ (void)tmp.sin6_port;
+ (void)tmp.sin6_family;
+ (void)tmp.sin6_scope_id;
+ (void)tmp2;
+
+ return 0;
+}
diff --git a/config.tests/unix/ipv6ifname/ipv6ifname.cpp b/config.tests/unix/ipv6ifname/ipv6ifname.cpp
new file mode 100644
index 0000000000..7bde426ed1
--- /dev/null
+++ b/config.tests/unix/ipv6ifname/ipv6ifname.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/* Sample program for configure to test for if_nametoindex support
+on target platforms. */
+
+#if defined(__hpux)
+#define _HPUX_SOURCE
+#endif
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <net/if.h>
+
+int main()
+{
+ char buf[IFNAMSIZ];
+ if_nametoindex("eth0");
+ if_indextoname(1, buf);
+ return 0;
+}
diff --git a/config.tests/unix/ipv6ifname/ipv6ifname.pro b/config.tests/unix/ipv6ifname/ipv6ifname.pro
new file mode 100644
index 0000000000..ed62869cb9
--- /dev/null
+++ b/config.tests/unix/ipv6ifname/ipv6ifname.pro
@@ -0,0 +1,5 @@
+SOURCES = ipv6ifname.cpp
+CONFIG -= qt
+mac:CONFIG -= app_bundle
+QT =
+LIBS += $$QMAKE_LIBS_NETWORK
diff --git a/config.tests/unix/iwmmxt/iwmmxt.cpp b/config.tests/unix/iwmmxt/iwmmxt.cpp
new file mode 100644
index 0000000000..25d042a6bb
--- /dev/null
+++ b/config.tests/unix/iwmmxt/iwmmxt.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <mmintrin.h>
+
+int main(int, char**)
+{
+ _mm_unpackhi_pi16(_mm_setzero_si64(), _mm_setzero_si64());
+ return 0;
+}
diff --git a/config.tests/unix/iwmmxt/iwmmxt.pro b/config.tests/unix/iwmmxt/iwmmxt.pro
new file mode 100644
index 0000000000..20a5f1a546
--- /dev/null
+++ b/config.tests/unix/iwmmxt/iwmmxt.pro
@@ -0,0 +1,3 @@
+SOURCES = iwmmxt.cpp
+CONFIG -= x11 qt
+
diff --git a/config.tests/unix/javascriptcore-jit/hwcap_test.cpp b/config.tests/unix/javascriptcore-jit/hwcap_test.cpp
new file mode 100644
index 0000000000..0ee717a590
--- /dev/null
+++ b/config.tests/unix/javascriptcore-jit/hwcap_test.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <asm/hwcap.h>
+
+int main (int argc, char **argv)
+{
+ return 0;
+}
diff --git a/config.tests/unix/javascriptcore-jit/javascriptcore-jit.pro b/config.tests/unix/javascriptcore-jit/javascriptcore-jit.pro
new file mode 100644
index 0000000000..0d5a20d7f3
--- /dev/null
+++ b/config.tests/unix/javascriptcore-jit/javascriptcore-jit.pro
@@ -0,0 +1,2 @@
+SOURCES = hwcap_test.cpp
+CONFIG -= qt dylib
diff --git a/config.tests/unix/libjpeg/libjpeg.cpp b/config.tests/unix/libjpeg/libjpeg.cpp
new file mode 100644
index 0000000000..efff11c98d
--- /dev/null
+++ b/config.tests/unix/libjpeg/libjpeg.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <sys/types.h>
+#include <stdio.h>
+extern "C" {
+#include <jpeglib.h>
+}
+
+int main(int, char **)
+{
+ j_compress_ptr cinfo;
+ jpeg_create_compress(cinfo);
+ return 0;
+}
diff --git a/config.tests/unix/libjpeg/libjpeg.pro b/config.tests/unix/libjpeg/libjpeg.pro
new file mode 100644
index 0000000000..d06888c57d
--- /dev/null
+++ b/config.tests/unix/libjpeg/libjpeg.pro
@@ -0,0 +1,4 @@
+SOURCES = libjpeg.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -ljpeg
diff --git a/config.tests/unix/libmng/libmng.cpp b/config.tests/unix/libmng/libmng.cpp
new file mode 100644
index 0000000000..d3c0f68c52
--- /dev/null
+++ b/config.tests/unix/libmng/libmng.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <libmng.h>
+
+int main(int, char **)
+{
+ mng_handle hMNG;
+ mng_cleanup(&hMNG);
+
+#if MNG_VERSION_MAJOR < 1 || (MNG_VERSION_MAJOR == 1 && MNG_VERSION_MINOR == 0 && MNG_VERSION_RELEASE < 9)
+#error System libmng version is less than 1.0.9; using built-in version instead.
+#endif
+
+ return 0;
+}
diff --git a/config.tests/unix/libmng/libmng.pro b/config.tests/unix/libmng/libmng.pro
new file mode 100644
index 0000000000..ee57ecd640
--- /dev/null
+++ b/config.tests/unix/libmng/libmng.pro
@@ -0,0 +1,4 @@
+SOURCES = libmng.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lmng
diff --git a/config.tests/unix/libpng/libpng.cpp b/config.tests/unix/libpng/libpng.cpp
new file mode 100644
index 0000000000..835e99fcaa
--- /dev/null
+++ b/config.tests/unix/libpng/libpng.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <png.h>
+
+#if !defined(PNG_LIBPNG_VER) || PNG_LIBPNG_VER < 10017
+# error "Required libpng version 1.0.17 not found."
+#endif
+
+int main(int, char **)
+{
+ png_structp png_ptr;
+ png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,0,0,0);
+ return 0;
+}
diff --git a/config.tests/unix/libpng/libpng.pro b/config.tests/unix/libpng/libpng.pro
new file mode 100644
index 0000000000..f03838663e
--- /dev/null
+++ b/config.tests/unix/libpng/libpng.pro
@@ -0,0 +1,4 @@
+SOURCES = libpng.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lpng
diff --git a/config.tests/unix/libtiff/libtiff.cpp b/config.tests/unix/libtiff/libtiff.cpp
new file mode 100644
index 0000000000..cad731d357
--- /dev/null
+++ b/config.tests/unix/libtiff/libtiff.cpp
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <tiffio.h>
+
+#if !defined(TIFF_VERSION) && defined(TIFF_VERSION_CLASSIC)
+// libtiff 4.0 splits it into TIFF_VERSION_CLASSIC and TIFF_VERSION_BIG
+# define TIFF_VERSION TIFF_VERSION_CLASSIC
+#endif
+
+#if !defined(TIFF_VERSION)
+# error "Required libtiff not found"
+#elif TIFF_VERSION < 42
+# error "unsupported tiff version"
+#endif
+
+int main(int, char **)
+{
+ tdata_t buffer = _TIFFmalloc(128);
+ _TIFFfree(buffer);
+
+ // some libtiff implementations where TIFF_VERSION >= 42 do not
+ // have TIFFReadRGBAImageOriented(), so let's check for it
+ TIFFReadRGBAImageOriented(0, 0, 0, 0, 0, 0);
+
+ return 0;
+}
diff --git a/config.tests/unix/libtiff/libtiff.pro b/config.tests/unix/libtiff/libtiff.pro
new file mode 100644
index 0000000000..60ba7d11d2
--- /dev/null
+++ b/config.tests/unix/libtiff/libtiff.pro
@@ -0,0 +1,4 @@
+SOURCES = libtiff.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -ltiff
diff --git a/config.tests/unix/makeabs b/config.tests/unix/makeabs
new file mode 100755
index 0000000000..c415cc7bda
--- /dev/null
+++ b/config.tests/unix/makeabs
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+FILE="$1"
+RES="$FILE"
+
+CUT_ARG="-b1"
+if [ `uname -s` = "QNX" ]; then
+ # QNX does not understand "-b1"
+ CUT_ARG="-c1"
+fi
+
+if [ `echo $FILE | cut $CUT_ARG` = "/" ]; then
+ true
+else
+ RES="$PWD/$FILE"
+ test -d "$RES" && RES="$RES/"
+ RES=`echo "$RES" | sed "s,/\(\./\)*,/,g"`
+
+# note: this will only strip 1 /path/../ from RES, i.e. given /a/b/c/../../../, it returns /a/b/../../
+ RES=`echo "$RES" | sed "s,\(/[^/]*/\)\.\./,/,g"`
+
+ RES=`echo "$RES" | sed "s,//,/,g" | sed "s,/$,,"`
+fi
+echo $RES #return
+
diff --git a/config.tests/unix/mmx/mmx.cpp b/config.tests/unix/mmx/mmx.cpp
new file mode 100644
index 0000000000..25dc64d2e1
--- /dev/null
+++ b/config.tests/unix/mmx/mmx.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <mmintrin.h>
+#if defined(__GNUC__) && __GNUC__ < 4 && __GNUC_MINOR__ < 3
+#error GCC < 3.2 is known to create internal compiler errors with our MMX code
+#endif
+
+int main(int, char**)
+{
+ _mm_empty();
+ return 0;
+}
diff --git a/config.tests/unix/mmx/mmx.pro b/config.tests/unix/mmx/mmx.pro
new file mode 100644
index 0000000000..d2fea7f7c9
--- /dev/null
+++ b/config.tests/unix/mmx/mmx.pro
@@ -0,0 +1,3 @@
+SOURCES = mmx.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/mremap/mremap.cpp b/config.tests/unix/mremap/mremap.cpp
new file mode 100644
index 0000000000..8fdc9a42e6
--- /dev/null
+++ b/config.tests/unix/mremap/mremap.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <unistd.h>
+#include <sys/mman.h>
+
+int main(int, char **)
+{
+ (void) ::mremap(static_cast<void *>(0), size_t(0), size_t(42), MREMAP_MAYMOVE);
+
+ return 0;
+}
+
diff --git a/config.tests/unix/mremap/mremap.pro b/config.tests/unix/mremap/mremap.pro
new file mode 100644
index 0000000000..a36d756db3
--- /dev/null
+++ b/config.tests/unix/mremap/mremap.pro
@@ -0,0 +1,3 @@
+SOURCES = mremap.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/mysql/mysql.cpp b/config.tests/unix/mysql/mysql.cpp
new file mode 100644
index 0000000000..457f93dcb1
--- /dev/null
+++ b/config.tests/unix/mysql/mysql.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mysql.h"
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/mysql/mysql.pro b/config.tests/unix/mysql/mysql.pro
new file mode 100644
index 0000000000..a22579e1bd
--- /dev/null
+++ b/config.tests/unix/mysql/mysql.pro
@@ -0,0 +1,4 @@
+SOURCES = mysql.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lmysqlclient
diff --git a/config.tests/unix/mysql_r/mysql_r.pro b/config.tests/unix/mysql_r/mysql_r.pro
new file mode 100644
index 0000000000..8c06067305
--- /dev/null
+++ b/config.tests/unix/mysql_r/mysql_r.pro
@@ -0,0 +1,4 @@
+SOURCES = ../mysql/mysql.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lmysqlclient_r
diff --git a/config.tests/unix/neon/neon.cpp b/config.tests/unix/neon/neon.cpp
new file mode 100644
index 0000000000..d868197e90
--- /dev/null
+++ b/config.tests/unix/neon/neon.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <arm_neon.h>
+
+int main(int, char**)
+{
+ int32x4_t null = vdupq_n_s32(0x0);
+
+ int result;
+ vst1q_lane_s32(&result, null, 0);
+ return result;
+}
diff --git a/config.tests/unix/neon/neon.pro b/config.tests/unix/neon/neon.pro
new file mode 100644
index 0000000000..de20c4e0ab
--- /dev/null
+++ b/config.tests/unix/neon/neon.pro
@@ -0,0 +1,2 @@
+SOURCES = neon.cpp
+CONFIG -= x11 qt
diff --git a/config.tests/unix/nis/nis.cpp b/config.tests/unix/nis/nis.cpp
new file mode 100644
index 0000000000..ccbd88b976
--- /dev/null
+++ b/config.tests/unix/nis/nis.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <sys/types.h>
+#include <rpc/rpc.h>
+#include <rpcsvc/ypclnt.h>
+#include <rpcsvc/yp_prot.h>
+
+int main(int, char **)
+{
+ char *d;
+ yp_get_default_domain(&d);
+ return 0;
+}
diff --git a/config.tests/unix/nis/nis.pro b/config.tests/unix/nis/nis.pro
new file mode 100644
index 0000000000..1f985b2049
--- /dev/null
+++ b/config.tests/unix/nis/nis.pro
@@ -0,0 +1,5 @@
+SOURCES = nis.cpp
+CONFIG -= qt dylib
+mac: CONFIG -= app_bundle
+solaris-*:LIBS += -lnsl
+else:LIBS += $$QMAKE_LIBS_NIS
diff --git a/config.tests/unix/objcopy.test b/config.tests/unix/objcopy.test
new file mode 100755
index 0000000000..e2051a7823
--- /dev/null
+++ b/config.tests/unix/objcopy.test
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+TEST_PATH=`dirname "$0"`
+SEP_DEBUG_SUPPORT=no
+COMPILER=$1
+QMAKE_OBJCOPY=$2
+VERBOSE=$3
+
+if [ -n "$QMAKE_OBJCOPY" ]; then
+ echo "int main() { return 0; }" > objcopy_test.cpp
+ if $TEST_PATH/which.test "$QMAKE_OBJCOPY" >/dev/null 2>&1 && $COMPILER -g -o objcopy_test objcopy_test.cpp >/dev/null 2>&1; then
+ "$QMAKE_OBJCOPY" --only-keep-debug objcopy_test objcopy_test.debug >/dev/null 2>&1 \
+ && "$QMAKE_OBJCOPY" --strip-debug objcopy_test >/dev/null 2>&1 \
+ && "$QMAKE_OBJCOPY" --add-gnu-debuglink=objcopy_test.debug objcopy_test >/dev/null 2>&1 \
+ && SEP_DEBUG_SUPPORT=yes
+ fi
+ rm -f objcopy_test objcopy_test.debug objcopy_test.cpp
+else
+ [ "$VERBOSE" = "yes" ] && echo "Separate debug info check skipped, QMAKE_OBJCOPY is unset.";
+fi
+
+# done
+if [ "$SEP_DEBUG_SUPPORT" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Separate debug info support disabled."
+ exit 0
+else
+ [ "$VERBOSE" = "yes" ] && echo "Separate debug info support enabled."
+ exit 1
+fi
diff --git a/config.tests/unix/oci/oci.cpp b/config.tests/unix/oci/oci.cpp
new file mode 100644
index 0000000000..37821a298d
--- /dev/null
+++ b/config.tests/unix/oci/oci.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <oci.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/oci/oci.pro b/config.tests/unix/oci/oci.pro
new file mode 100644
index 0000000000..4add225f5d
--- /dev/null
+++ b/config.tests/unix/oci/oci.pro
@@ -0,0 +1,4 @@
+SOURCES = oci.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lclntsh
diff --git a/config.tests/unix/odbc/odbc.cpp b/config.tests/unix/odbc/odbc.cpp
new file mode 100644
index 0000000000..32c1dcc40c
--- /dev/null
+++ b/config.tests/unix/odbc/odbc.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifdef __MINGW32__
+#include <windows.h>
+#endif
+#include <sql.h>
+#include <sqlext.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/odbc/odbc.pro b/config.tests/unix/odbc/odbc.pro
new file mode 100644
index 0000000000..06a548fd71
--- /dev/null
+++ b/config.tests/unix/odbc/odbc.pro
@@ -0,0 +1,5 @@
+SOURCES = odbc.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+win32-g++*:LIBS += -lodbc32
+else:LIBS += -lodbc
diff --git a/config.tests/unix/opengldesktop/opengldesktop.cpp b/config.tests/unix/opengldesktop/opengldesktop.cpp
new file mode 100644
index 0000000000..a3d8548212
--- /dev/null
+++ b/config.tests/unix/opengldesktop/opengldesktop.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <GL/gl.h>
+
+int main(int, char **)
+{
+ glBegin(GL_TRIANGLES);
+ glVertex2f(20.0f, 10.0f);
+ glVertex2f(10.0f, 30.0f);
+ glVertex2f(20.0f, 50.0f);
+ glEnd();
+ return 0;
+}
diff --git a/config.tests/unix/opengldesktop/opengldesktop.pro b/config.tests/unix/opengldesktop/opengldesktop.pro
new file mode 100644
index 0000000000..ac70ca34ef
--- /dev/null
+++ b/config.tests/unix/opengldesktop/opengldesktop.pro
@@ -0,0 +1,9 @@
+SOURCES = opengldesktop.cpp
+INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+
+for(p, QMAKE_LIBDIR_OPENGL) {
+ exists($$p):LIBS += -L$$p
+}
+
+CONFIG -= qt
+LIBS += $$QMAKE_LIBS_OPENGL
diff --git a/config.tests/unix/opengles1/opengles1.cpp b/config.tests/unix/opengles1/opengles1.cpp
new file mode 100644
index 0000000000..ec16fc0c1e
--- /dev/null
+++ b/config.tests/unix/opengles1/opengles1.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifdef BUILD_ON_MAC
+ #include <OpenGLES/ES1/gl.h>
+#else
+ #include <GLES/gl.h>
+#endif
+
+int main(int, char **)
+{
+ GLfloat a = 1.0f;
+ glColor4f(a, a, a, a);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ return 0;
+}
diff --git a/config.tests/unix/opengles1/opengles1.pro b/config.tests/unix/opengles1/opengles1.pro
new file mode 100644
index 0000000000..9e6012474d
--- /dev/null
+++ b/config.tests/unix/opengles1/opengles1.pro
@@ -0,0 +1,13 @@
+SOURCES = opengles1.cpp
+INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES1
+
+for(p, QMAKE_LIBDIR_OPENGL_ES1) {
+ exists($$p):LIBS += -L$$p
+}
+
+CONFIG -= qt
+LIBS += $$QMAKE_LIBS_OPENGL_ES1
+mac {
+ DEFINES += BUILD_ON_MAC
+ CONFIG -= app_bundle
+}
diff --git a/config.tests/unix/opengles2/opengles2.cpp b/config.tests/unix/opengles2/opengles2.cpp
new file mode 100644
index 0000000000..39c6fa7b4f
--- /dev/null
+++ b/config.tests/unix/opengles2/opengles2.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifdef BUILD_ON_MAC
+ #include <OpenGLES/ES2/gl.h>
+#else
+ #include <GLES2/gl2.h>
+#endif
+
+int main(int, char **)
+{
+ glUniform1f(1, GLfloat(1.0));
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ return 0;
+}
diff --git a/config.tests/unix/opengles2/opengles2.pro b/config.tests/unix/opengles2/opengles2.pro
new file mode 100644
index 0000000000..34d77371b4
--- /dev/null
+++ b/config.tests/unix/opengles2/opengles2.pro
@@ -0,0 +1,13 @@
+SOURCES = opengles2.cpp
+INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2
+
+for(p, QMAKE_LIBDIR_OPENGL_ES2) {
+ exists($$p):LIBS += -L$$p
+}
+
+CONFIG -= qt
+LIBS += $$QMAKE_LIBS_OPENGL_ES2
+mac {
+ DEFINES += BUILD_ON_MAC
+ CONFIG -= app_bundle
+}
diff --git a/config.tests/unix/openssl/openssl.cpp b/config.tests/unix/openssl/openssl.cpp
new file mode 100644
index 0000000000..39f59b226b
--- /dev/null
+++ b/config.tests/unix/openssl/openssl.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <openssl/opensslv.h>
+
+#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x0090700fL
+# error "OpenSSL >= 0.9.7 is required"
+#endif
+
+int main()
+{
+}
diff --git a/config.tests/unix/openssl/openssl.pri b/config.tests/unix/openssl/openssl.pri
new file mode 100644
index 0000000000..377d6307c8
--- /dev/null
+++ b/config.tests/unix/openssl/openssl.pri
@@ -0,0 +1,10 @@
+# Empty file since Qt 4.6
+# I'm too lazy to find all places where this file is included
+
+symbian{
+ TRY_INCLUDEPATHS = $${EPOCROOT}epoc32 $${EPOCROOT}epoc32/include $${EPOCROOT}epoc32/include/stdapis $${EPOCROOT}epoc32/include/stdapis/sys $$OS_LAYER_LIBC_SYSTEMINCLUDE $$QMAKE_INCDIR $$INCLUDEPATH
+ for(p, TRY_INCLUDEPATHS) {
+ pp = $$join(p, "", "", "/openssl")
+ exists($$pp):INCLUDEPATH *= $$pp
+ }
+}
diff --git a/config.tests/unix/openssl/openssl.pro b/config.tests/unix/openssl/openssl.pro
new file mode 100644
index 0000000000..6891e7832f
--- /dev/null
+++ b/config.tests/unix/openssl/openssl.pro
@@ -0,0 +1,4 @@
+SOURCES = openssl.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
+include(openssl.pri)
diff --git a/config.tests/unix/openvg/openvg.cpp b/config.tests/unix/openvg/openvg.cpp
new file mode 100644
index 0000000000..6cf04727ad
--- /dev/null
+++ b/config.tests/unix/openvg/openvg.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// There is some variation in OpenVG engines as to what case
+// the VG includes use. The Khronos reference implementation
+// for OpenVG 1.1 uses upper case, so we treat that as canonical.
+#if defined(QT_LOWER_CASE_VG_INCLUDES)
+#include <vg/openvg.h>
+#else
+#include <VG/openvg.h>
+#endif
+
+int main(int, char **)
+{
+ VGint i;
+ i = 2;
+ vgFlush();
+ return 0;
+}
diff --git a/config.tests/unix/openvg/openvg.pro b/config.tests/unix/openvg/openvg.pro
new file mode 100644
index 0000000000..4bbde99230
--- /dev/null
+++ b/config.tests/unix/openvg/openvg.pro
@@ -0,0 +1,19 @@
+SOURCES += openvg.cpp
+
+!isEmpty(QMAKE_INCDIR_OPENVG): INCLUDEPATH += $$QMAKE_INCDIR_OPENVG
+!isEmpty(QMAKE_LIBDIR_OPENVG): LIBS += -L$$QMAKE_LIBDIR_OPENVG
+!isEmpty(QMAKE_LIBS_OPENVG): LIBS += $$QMAKE_LIBS_OPENVG
+
+# Some OpenVG engines (e.g. ShivaVG) are implemented on top of OpenGL.
+# Add the extra includes and libraries for that case.
+openvg_on_opengl {
+ !isEmpty(QMAKE_INCDIR_OPENGL): INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+ !isEmpty(QMAKE_LIBDIR_OPENGL): LIBS += -L$$QMAKE_LIBDIR_OPENGL
+ !isEmpty(QMAKE_LIBS_OPENGL): LIBS += $$QMAKE_LIBS_OPENGL
+}
+
+lower_case_includes {
+ DEFINES += QT_LOWER_CASE_VG_INCLUDES
+}
+
+CONFIG -= qt
diff --git a/config.tests/unix/padstring b/config.tests/unix/padstring
new file mode 100755
index 0000000000..283475d071
--- /dev/null
+++ b/config.tests/unix/padstring
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+LEN="$1"
+STR="$2"
+PAD='\0'
+STRLEN=`echo $STR | wc -c`
+RES="$STR"
+
+EXTRALEN=`expr $LEN - $STRLEN`
+while [ "$EXTRALEN" -gt 32 ]; do
+ RES="$RES$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD$PAD"
+ EXTRALEN=`expr $EXTRALEN - 32`
+done
+while [ "$EXTRALEN" -gt 0 ]; do
+ RES="$RES$PAD"
+ EXTRALEN=`expr $EXTRALEN - 1`
+done
+cat <<EOF
+$RES
+EOF
+
+
diff --git a/config.tests/unix/precomp.test b/config.tests/unix/precomp.test
new file mode 100755
index 0000000000..f7c5a0275c
--- /dev/null
+++ b/config.tests/unix/precomp.test
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+PRECOMP_SUPPORT=no
+COMPILER=$1
+VERBOSE=$2
+
+case "$COMPILER" in
+icpc)
+ cat >header.h <<EOF
+#define HEADER_H
+
+EOF
+ >header.cpp
+ cat >source.cpp <<EOF
+#ifndef HEADER_H
+#error no go
+#endif
+
+EOF
+
+ rm -f header.pchi
+ $COMPILER -pch-create header.pchi -include header.h -c header.cpp -o header.o >/dev/null 2>&1 \
+ && $COMPILER -pch-use header.pchi -include header.h -c source.cpp -o source.o >/dev/null 2>&1 \
+ && PRECOMP_SUPPORT=yes
+
+ rm -f header.h header.cpp source.cpp
+ rm -f header.pchi header.o source.o
+ ;;
+
+*g++*|c++)
+ case `"$COMPILER" -dumpversion 2>/dev/null` in
+ 3.*)
+ ;;
+ *)
+
+ >precomp_header.h
+ if $COMPILER -x c-header precomp_header.h >/dev/null 2>&1; then
+ $COMPILER -x c++-header precomp_header.h && PRECOMP_SUPPORT=yes
+ fi
+ rm -f precomp_header.h precomp_header.h.gch
+ ;;
+ esac
+ ;;
+esac
+
+
+# done
+if [ "$PRECOMP_SUPPORT" != "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Precompiled-headers support disabled."
+ exit 0
+else
+ [ "$VERBOSE" = "yes" ] && echo "Precompiled-headers support enabled."
+ exit 1
+fi
diff --git a/config.tests/unix/psql/psql.cpp b/config.tests/unix/psql/psql.cpp
new file mode 100644
index 0000000000..3292442523
--- /dev/null
+++ b/config.tests/unix/psql/psql.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "libpq-fe.h"
+
+int main(int, char **)
+{
+ PQescapeBytea(0, 0, 0);
+ PQunescapeBytea(0, 0);
+ return 0;
+}
diff --git a/config.tests/unix/psql/psql.pro b/config.tests/unix/psql/psql.pro
new file mode 100644
index 0000000000..38bfb3ed70
--- /dev/null
+++ b/config.tests/unix/psql/psql.pro
@@ -0,0 +1,4 @@
+SOURCES = psql.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS *= -lpq
diff --git a/config.tests/unix/ptrsize.test b/config.tests/unix/ptrsize.test
new file mode 100755
index 0000000000..c78c73f7a2
--- /dev/null
+++ b/config.tests/unix/ptrsize.test
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+QMKSPEC=$1
+VERBOSE=$2
+SRCDIR=$3
+OUTDIR=$4
+
+# debuggery
+[ "$VERBOSE" = "yes" ] && echo "Testing size of pointers ... ($*)"
+
+# build and run a test program
+test -d "$OUTDIR/config.tests/unix/ptrsize" || mkdir -p "$OUTDIR/config.tests/unix/ptrsize"
+"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/config.tests/unix/ptrsize/ptrsizetest.pro" -o "$OUTDIR/config.tests/unix/ptrsize/Makefile" >/dev/null 2>&1
+cd "$OUTDIR/config.tests/unix/ptrsize"
+
+if [ "$VERBOSE" = "yes" ]; then
+ ($MAKE clean && $MAKE)
+else
+ ($MAKE clean && $MAKE) >/dev/null 2>&1
+fi
+RETVAL=$?
+
+if [ "$RETVAL" -ne 0 ]; then
+ PTRSIZE=4
+else
+ PTRSIZE=8
+fi
+
+
+# done
+[ "$VERBOSE" = "yes" ] && echo "Pointer size: $PTRSIZE"
+exit $PTRSIZE
diff --git a/config.tests/unix/ptrsize/ptrsizetest.cpp b/config.tests/unix/ptrsize/ptrsizetest.cpp
new file mode 100644
index 0000000000..d24799d976
--- /dev/null
+++ b/config.tests/unix/ptrsize/ptrsizetest.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/* Sample program for configure to test pointer size on target
+platforms.
+*/
+
+template<int>
+struct QPointerSizeTest
+{
+};
+
+template<>
+struct QPointerSizeTest<8>
+{
+ enum { PointerSize = 8 };
+};
+
+int main( int, char ** )
+{
+ return QPointerSizeTest<sizeof(void*)>::PointerSize;
+}
+
diff --git a/config.tests/unix/ptrsize/ptrsizetest.pro b/config.tests/unix/ptrsize/ptrsizetest.pro
new file mode 100644
index 0000000000..41aba86dd9
--- /dev/null
+++ b/config.tests/unix/ptrsize/ptrsizetest.pro
@@ -0,0 +1,3 @@
+SOURCES = ptrsizetest.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/pulseaudio/pulseaudio.cpp b/config.tests/unix/pulseaudio/pulseaudio.cpp
new file mode 100644
index 0000000000..b8d5ef5483
--- /dev/null
+++ b/config.tests/unix/pulseaudio/pulseaudio.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <pulse/pulseaudio.h>
+#include <pulse/glib-mainloop.h>
+
+#if !defined(PA_API_VERSION) || PA_API_VERSION-0 != 12
+# error "Incompatible PulseAudio API version"
+#endif
+#if !PA_CHECK_VERSION(0,9,0)
+# error "PulseAudio version too old"
+#endif
+
+int main(int, char **)
+{
+ const char *headers = pa_get_headers_version();
+ const char *library = pa_get_library_version();
+ pa_glib_mainloop_new(0);
+ return (headers - library) * 0;
+}
diff --git a/config.tests/unix/pulseaudio/pulseaudio.pro b/config.tests/unix/pulseaudio/pulseaudio.pro
new file mode 100644
index 0000000000..d75b16f41e
--- /dev/null
+++ b/config.tests/unix/pulseaudio/pulseaudio.pro
@@ -0,0 +1,3 @@
+SOURCES = pulseaudio.cpp
+CONFIG -= qt
+LIBS +=
diff --git a/config.tests/unix/shivavg/shivavg.cpp b/config.tests/unix/shivavg/shivavg.cpp
new file mode 100644
index 0000000000..65c0feefd3
--- /dev/null
+++ b/config.tests/unix/shivavg/shivavg.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <vg/openvg.h>
+
+int main(int, char **)
+{
+ VGint i;
+ i = 2;
+ vgFlush();
+ vgDestroyContextSH();
+ return 0;
+}
diff --git a/config.tests/unix/shivavg/shivavg.pro b/config.tests/unix/shivavg/shivavg.pro
new file mode 100644
index 0000000000..39d7bcc78a
--- /dev/null
+++ b/config.tests/unix/shivavg/shivavg.pro
@@ -0,0 +1,11 @@
+SOURCES += shivavg.cpp
+
+!isEmpty(QMAKE_INCDIR_OPENVG): INCLUDEPATH += $$QMAKE_INCDIR_OPENVG
+!isEmpty(QMAKE_LIBDIR_OPENVG): LIBS += -L$$QMAKE_LIBDIR_OPENVG
+!isEmpty(QMAKE_LIBS_OPENVG): LIBS += $$QMAKE_LIBS_OPENVG
+
+!isEmpty(QMAKE_INCDIR_OPENGL): INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+!isEmpty(QMAKE_LIBDIR_OPENGL): LIBS += -L$$QMAKE_LIBDIR_OPENGL
+!isEmpty(QMAKE_LIBS_OPENGL): LIBS += $$QMAKE_LIBS_OPENGL
+
+CONFIG -= qt
diff --git a/config.tests/unix/sqlite/sqlite.cpp b/config.tests/unix/sqlite/sqlite.cpp
new file mode 100644
index 0000000000..ac350017a5
--- /dev/null
+++ b/config.tests/unix/sqlite/sqlite.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <sqlite3.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/sqlite/sqlite.pro b/config.tests/unix/sqlite/sqlite.pro
new file mode 100644
index 0000000000..ba2cac1465
--- /dev/null
+++ b/config.tests/unix/sqlite/sqlite.pro
@@ -0,0 +1,3 @@
+SOURCES = sqlite.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/sqlite2/sqlite2.cpp b/config.tests/unix/sqlite2/sqlite2.cpp
new file mode 100644
index 0000000000..e5d9d047d4
--- /dev/null
+++ b/config.tests/unix/sqlite2/sqlite2.cpp
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <sqlite.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/sqlite2/sqlite2.pro b/config.tests/unix/sqlite2/sqlite2.pro
new file mode 100644
index 0000000000..14a64d5db9
--- /dev/null
+++ b/config.tests/unix/sqlite2/sqlite2.pro
@@ -0,0 +1,4 @@
+SOURCES = sqlite2.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lsqlite
diff --git a/config.tests/unix/sse/sse.cpp b/config.tests/unix/sse/sse.cpp
new file mode 100644
index 0000000000..e130a830f3
--- /dev/null
+++ b/config.tests/unix/sse/sse.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <xmmintrin.h>
+#if defined(__GNUC__) && __GNUC__ < 4 && __GNUC_MINOR__ < 3
+#error GCC < 3.2 is known to create internal compiler errors with our MMX code
+#endif
+
+int main(int, char**)
+{
+ __m64 a = _mm_setzero_si64();
+ a = _mm_shuffle_pi16(a, 0);
+ return _m_to_int(a);
+}
diff --git a/config.tests/unix/sse/sse.pro b/config.tests/unix/sse/sse.pro
new file mode 100644
index 0000000000..4cc34a79d1
--- /dev/null
+++ b/config.tests/unix/sse/sse.pro
@@ -0,0 +1,3 @@
+SOURCES = sse.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/sse2/sse2.cpp b/config.tests/unix/sse2/sse2.cpp
new file mode 100644
index 0000000000..255854ff16
--- /dev/null
+++ b/config.tests/unix/sse2/sse2.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <emmintrin.h>
+#if defined(__GNUC__) && __GNUC__ < 4 && __GNUC_MINOR__ < 3
+#error GCC < 3.2 is known to create internal compiler errors with our MMX code
+#endif
+
+int main(int, char**)
+{
+ __m128i a = _mm_setzero_si128();
+ _mm_maskmoveu_si128(a, _mm_setzero_si128(), 0);
+ return 0;
+}
diff --git a/config.tests/unix/sse2/sse2.pro b/config.tests/unix/sse2/sse2.pro
new file mode 100644
index 0000000000..d4a21aad1a
--- /dev/null
+++ b/config.tests/unix/sse2/sse2.pro
@@ -0,0 +1,3 @@
+SOURCES = sse2.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/sse3/sse3.cpp b/config.tests/unix/sse3/sse3.cpp
new file mode 100644
index 0000000000..a28981c655
--- /dev/null
+++ b/config.tests/unix/sse3/sse3.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <pmmintrin.h>
+
+int main(int, char**)
+{
+ volatile __m128d a = _mm_set1_pd(6.28);
+ volatile __m128d b = _mm_set1_pd(3.14);
+ volatile __m128d result = _mm_addsub_pd(a, b);
+ result = _mm_movedup_pd(result);
+ return 0;
+}
diff --git a/config.tests/unix/sse3/sse3.pro b/config.tests/unix/sse3/sse3.pro
new file mode 100644
index 0000000000..009fea230a
--- /dev/null
+++ b/config.tests/unix/sse3/sse3.pro
@@ -0,0 +1,3 @@
+SOURCES = sse3.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/sse4_1/sse4_1.cpp b/config.tests/unix/sse4_1/sse4_1.cpp
new file mode 100644
index 0000000000..b5928d935f
--- /dev/null
+++ b/config.tests/unix/sse4_1/sse4_1.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <smmintrin.h>
+
+int main(int, char**)
+{
+ volatile __m128 a = _mm_setzero_ps();
+ _mm_ceil_ps(a);
+ volatile __m128i result = _mm_mullo_epi32(_mm_set1_epi32(42), _mm_set1_epi32(64));
+ (void)result;
+ return 0;
+}
diff --git a/config.tests/unix/sse4_1/sse4_1.pro b/config.tests/unix/sse4_1/sse4_1.pro
new file mode 100644
index 0000000000..c6c4746026
--- /dev/null
+++ b/config.tests/unix/sse4_1/sse4_1.pro
@@ -0,0 +1,3 @@
+SOURCES = sse4_1.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/sse4_2/sse4_2.cpp b/config.tests/unix/sse4_2/sse4_2.cpp
new file mode 100644
index 0000000000..733f1a51b8
--- /dev/null
+++ b/config.tests/unix/sse4_2/sse4_2.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <smmintrin.h>
+
+int main(int, char**)
+{
+ volatile __m128i a = _mm_setzero_si128();
+ volatile __m128i b = _mm_set1_epi32(42);
+ volatile __m128i result = _mm_cmpestrm(a, 16, b, 16, 0);
+ (void)result;
+ return 0;
+}
diff --git a/config.tests/unix/sse4_2/sse4_2.pro b/config.tests/unix/sse4_2/sse4_2.pro
new file mode 100644
index 0000000000..cab171114d
--- /dev/null
+++ b/config.tests/unix/sse4_2/sse4_2.pro
@@ -0,0 +1,3 @@
+SOURCES = sse4_2.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/ssse3/ssse3.cpp b/config.tests/unix/ssse3/ssse3.cpp
new file mode 100644
index 0000000000..fbfe793ce3
--- /dev/null
+++ b/config.tests/unix/ssse3/ssse3.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <tmmintrin.h>
+
+int main(int, char**)
+{
+ volatile __m128i a = _mm_set1_epi32(42);
+ _mm_abs_epi8(a);
+ volatile __m128i result = _mm_sign_epi16(a, _mm_set1_epi32(64));
+ (void)result;
+ return 0;
+}
diff --git a/config.tests/unix/ssse3/ssse3.pro b/config.tests/unix/ssse3/ssse3.pro
new file mode 100644
index 0000000000..4864267c8f
--- /dev/null
+++ b/config.tests/unix/ssse3/ssse3.pro
@@ -0,0 +1,3 @@
+SOURCES = ssse3.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/stdint/main.cpp b/config.tests/unix/stdint/main.cpp
new file mode 100644
index 0000000000..eeaa814160
--- /dev/null
+++ b/config.tests/unix/stdint/main.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/* Check for the presence of stdint.h */
+#include <stdint.h>
+
+int main()
+{
+ return 0;
+}
+
diff --git a/config.tests/unix/stdint/stdint.pro b/config.tests/unix/stdint/stdint.pro
new file mode 100644
index 0000000000..79a0d9cd3a
--- /dev/null
+++ b/config.tests/unix/stdint/stdint.pro
@@ -0,0 +1,4 @@
+SOURCES = main.cpp
+CONFIG -= x11 qt
+mac:CONFIG -= app_bundle
+
diff --git a/config.tests/unix/stl/stl.pro b/config.tests/unix/stl/stl.pro
new file mode 100644
index 0000000000..a2feab431c
--- /dev/null
+++ b/config.tests/unix/stl/stl.pro
@@ -0,0 +1,3 @@
+SOURCES = stltest.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/stl/stltest.cpp b/config.tests/unix/stl/stltest.cpp
new file mode 100644
index 0000000000..597f7d0525
--- /dev/null
+++ b/config.tests/unix/stl/stltest.cpp
@@ -0,0 +1,150 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/* Sample program for configure to test STL support on target
+platforms. We are mainly concerned with being able to instantiate
+templates for common STL container classes.
+*/
+
+#include <iterator>
+#include <map>
+#include <vector>
+#include <algorithm>
+#include <iostream>
+
+// something mean to see if the compiler and C++ standard lib are good enough
+template<class K, class T>
+class DummyClass
+{
+ // everything in std namespace ?
+ typedef std::bidirectional_iterator_tag i;
+ typedef std::ptrdiff_t d;
+ // typename implemented ?
+ typedef typename std::map<K,T>::iterator MyIterator;
+};
+
+// extracted from QVector's strict iterator
+template<class T>
+class DummyIterator
+{
+ typedef DummyIterator<int> iterator;
+public:
+ T *i;
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef std::ptrdiff_t difference_type;
+ typedef T value_type;
+ typedef T *pointer;
+ typedef T &reference;
+
+ inline DummyIterator() : i(0) {}
+ inline DummyIterator(T *n) : i(n) {}
+ inline DummyIterator(const DummyIterator &o): i(o.i){}
+ inline T &operator*() const { return *i; }
+ inline T *operator->() const { return i; }
+ inline T &operator[](int j) const { return *(i + j); }
+ inline bool operator==(const DummyIterator &o) const { return i == o.i; }
+ inline bool operator!=(const DummyIterator &o) const { return i != o.i; }
+ inline bool operator<(const DummyIterator& other) const { return i < other.i; }
+ inline bool operator<=(const DummyIterator& other) const { return i <= other.i; }
+ inline bool operator>(const DummyIterator& other) const { return i > other.i; }
+ inline bool operator>=(const DummyIterator& other) const { return i >= other.i; }
+ inline DummyIterator &operator++() { ++i; return *this; }
+ inline DummyIterator operator++(int) { T *n = i; ++i; return n; }
+ inline DummyIterator &operator--() { i--; return *this; }
+ inline DummyIterator operator--(int) { T *n = i; i--; return n; }
+ inline DummyIterator &operator+=(int j) { i+=j; return *this; }
+ inline DummyIterator &operator-=(int j) { i-=j; return *this; }
+ inline DummyIterator operator+(int j) const { return DummyIterator(i+j); }
+ inline DummyIterator operator-(int j) const { return DummyIterator(i-j); }
+ inline int operator-(DummyIterator j) const { return i - j.i; }
+};
+
+int main()
+{
+ std::vector<int> v1;
+ v1.push_back( 0 );
+ v1.push_back( 1 );
+ v1.push_back( 2 );
+ v1.push_back( 3 );
+ v1.push_back( 4 );
+ int v1size = v1.size();
+ v1size = 0;
+ int v1capacity = v1.capacity();
+ v1capacity = 0;
+
+ std::vector<int>::iterator v1it = std::find( v1.begin(), v1.end(), 99 );
+ bool v1notfound = (v1it == v1.end());
+ v1notfound = false;
+
+ v1it = std::find( v1.begin(), v1.end(), 3 );
+ bool v1found = (v1it != v1.end());
+ v1found = false;
+
+ std::vector<int> v2;
+ std::copy( v1.begin(), v1it, std::back_inserter( v2 ) );
+ int v2size = v2.size();
+ v2size = 0;
+
+ std::map<int, double> m1;
+ m1.insert( std::make_pair( 1, 2.0 ) );
+ m1.insert( std::make_pair( 3, 2.0 ) );
+ m1.insert( std::make_pair( 5, 2.0 ) );
+ m1.insert( std::make_pair( 7, 2.0 ) );
+ int m1size = m1.size();
+ m1size = 0;
+ std::map<int,double>::iterator m1it = m1.begin();
+ for ( ; m1it != m1.end(); ++m1it ) {
+ int first = (*m1it).first;
+ first = 0;
+ double second = (*m1it).second;
+ second = 0.0;
+ }
+ std::map< int, double > m2( m1 );
+ int m2size = m2.size();
+ m2size = 0;
+
+ DummyIterator<int> it1, it2;
+ int n = std::distance(it1, it2);
+ std::advance(it1, 3);
+
+ return 0;
+}
+
diff --git a/config.tests/unix/sun-libiconv/sun-libiconv.pro b/config.tests/unix/sun-libiconv/sun-libiconv.pro
new file mode 100644
index 0000000000..00df8653c8
--- /dev/null
+++ b/config.tests/unix/sun-libiconv/sun-libiconv.pro
@@ -0,0 +1,2 @@
+SOURCES = ../gnu-libiconv/gnu-libiconv.cpp
+CONFIG -= qt dylib app_bundle
diff --git a/config.tests/unix/tds/tds.cpp b/config.tests/unix/tds/tds.cpp
new file mode 100644
index 0000000000..4705e28ff6
--- /dev/null
+++ b/config.tests/unix/tds/tds.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <sybfront.h>
+#include <sybdb.h>
+
+int main(int, char **)
+{
+ return 0;
+}
diff --git a/config.tests/unix/tds/tds.pro b/config.tests/unix/tds/tds.pro
new file mode 100644
index 0000000000..5516a14c8f
--- /dev/null
+++ b/config.tests/unix/tds/tds.pro
@@ -0,0 +1,4 @@
+SOURCES = tds.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lsybdb
diff --git a/config.tests/unix/tslib/tslib.cpp b/config.tests/unix/tslib/tslib.cpp
new file mode 100644
index 0000000000..1aecf651df
--- /dev/null
+++ b/config.tests/unix/tslib/tslib.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <tslib.h>
+
+int main()
+{
+ ts_open("foo", 0);
+ return 0;
+}
diff --git a/config.tests/unix/tslib/tslib.pro b/config.tests/unix/tslib/tslib.pro
new file mode 100644
index 0000000000..1191120b89
--- /dev/null
+++ b/config.tests/unix/tslib/tslib.pro
@@ -0,0 +1,3 @@
+SOURCES = tslib.cpp
+CONFIG -= qt
+LIBS += -lts
diff --git a/config.tests/unix/which.test b/config.tests/unix/which.test
new file mode 100755
index 0000000000..37c858c2f7
--- /dev/null
+++ b/config.tests/unix/which.test
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+HOME=/dev/null
+export HOME
+
+unset which
+
+WHICH=`which which 2>/dev/null`
+if echo $WHICH | grep 'shell built-in command' >/dev/null 2>&1; then
+ WHICH=which
+elif [ -z "$WHICH" ]; then
+ if which which >/dev/null 2>&1; then
+ WHICH=which
+ else
+ for a in /usr/ucb /usr/bin /bin /usr/local/bin; do
+ if [ -x $a/which ]; then
+ WHICH=$a/which
+ break;
+ fi
+ done
+ fi
+fi
+
+if [ -z "$WHICH" ]; then
+ IFS=:
+ for a in $PATH; do
+ if [ -x $a/$1 ]; then
+ echo "$a/$1"
+ exit 0
+ fi
+ done
+else
+ a=`"$WHICH" "$1" 2>/dev/null`
+ if [ ! -z "$a" -a -x "$a" ]; then
+ echo "$a"
+ exit 0
+ fi
+fi
+exit 1
diff --git a/config.tests/unix/zlib/zlib.cpp b/config.tests/unix/zlib/zlib.cpp
new file mode 100644
index 0000000000..c4dc663578
--- /dev/null
+++ b/config.tests/unix/zlib/zlib.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <zlib.h>
+
+int main(int, char **)
+{
+ z_streamp stream;
+ stream = 0;
+ const char *ver = zlibVersion();
+ ver = 0;
+ // compress2 was added in zlib version 1.0.8
+ int res = compress2(0, 0, 0, 0, 1);
+ res = 0;
+ return 0;
+}
diff --git a/config.tests/unix/zlib/zlib.pro b/config.tests/unix/zlib/zlib.pro
new file mode 100644
index 0000000000..67cc870516
--- /dev/null
+++ b/config.tests/unix/zlib/zlib.pro
@@ -0,0 +1,4 @@
+SOURCES = zlib.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
+LIBS += -lz
diff --git a/config.tests/x11/fontconfig/fontconfig.cpp b/config.tests/x11/fontconfig/fontconfig.cpp
new file mode 100644
index 0000000000..0e856de533
--- /dev/null
+++ b/config.tests/x11/fontconfig/fontconfig.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include <fontconfig/fontconfig.h>
+
+#ifndef FC_RGBA_UNKNOWN
+# error "This version of fontconfig is tool old, it is missing the FC_RGBA_UNKNOWN define"
+#endif
+
+#if ((FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) < 20103)
+# error "This version of freetype is too old."
+#endif
+
+int main(int, char **)
+{
+ FT_Face face;
+ face = 0;
+ FcPattern *pattern;
+ pattern = 0;
+ return 0;
+}
diff --git a/config.tests/x11/fontconfig/fontconfig.pro b/config.tests/x11/fontconfig/fontconfig.pro
new file mode 100644
index 0000000000..718a8204bc
--- /dev/null
+++ b/config.tests/x11/fontconfig/fontconfig.pro
@@ -0,0 +1,5 @@
+SOURCES = fontconfig.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lfreetype -lfontconfig
+include(../../unix/freetype/freetype.pri)
diff --git a/config.tests/x11/glxfbconfig/glxfbconfig.cpp b/config.tests/x11/glxfbconfig/glxfbconfig.cpp
new file mode 100644
index 0000000000..f111784776
--- /dev/null
+++ b/config.tests/x11/glxfbconfig/glxfbconfig.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <GL/gl.h>
+#include <GL/glx.h>
+
+int main(int, char **)
+{
+ GLXFBConfig config;
+ config = 0;
+
+ return 0;
+}
diff --git a/config.tests/x11/glxfbconfig/glxfbconfig.pro b/config.tests/x11/glxfbconfig/glxfbconfig.pro
new file mode 100644
index 0000000000..65f855a5f2
--- /dev/null
+++ b/config.tests/x11/glxfbconfig/glxfbconfig.pro
@@ -0,0 +1,10 @@
+SOURCES = glxfbconfig.cpp
+CONFIG += x11
+INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+
+for(p, QMAKE_LIBDIR_OPENGL) {
+ exists($$p):LIBS += -L$$p
+}
+
+CONFIG -= qt
+LIBS += -lGL
diff --git a/config.tests/x11/mitshm/mitshm.cpp b/config.tests/x11/mitshm/mitshm.cpp
new file mode 100644
index 0000000000..de80e3a93d
--- /dev/null
+++ b/config.tests/x11/mitshm/mitshm.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifdef Q_OS_HPUX
+#error "MITSHM not supported on HP-UX."
+#else
+#include <X11/Xlib.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <X11/extensions/XShm.h>
+
+int main(int, char **)
+{
+ Display *dpy = 0;
+ int minor;
+ int major;
+ int pixmaps;
+ if (dpy && XShmQueryVersion(dpy, &major, &minor, &pixmaps)) {
+ minor = 0;
+ major = 0;
+ pixmaps = 0;
+ }
+ return 0;
+}
+#endif
diff --git a/config.tests/x11/mitshm/mitshm.pro b/config.tests/x11/mitshm/mitshm.pro
new file mode 100644
index 0000000000..8a40317d97
--- /dev/null
+++ b/config.tests/x11/mitshm/mitshm.pro
@@ -0,0 +1,5 @@
+SOURCES = mitshm.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXext
+hpux*:DEFINES+=Q_OS_HPUX
diff --git a/config.tests/x11/notype.test b/config.tests/x11/notype.test
new file mode 100755
index 0000000000..1b534c8cb7
--- /dev/null
+++ b/config.tests/x11/notype.test
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+QMKSPEC=$1
+XPLATFORM=`basename $1`
+VERBOSE=$2
+SRCDIR=$3
+OUTDIR=$4
+
+# debuggery
+[ "$VERBOSE" = "yes" ] && echo "Detecting broken X11 headers... ($*)"
+
+# Detect broken X11 headers when using GCC 2.95 or later
+# Xsun on Solaris 2.5.1:
+# Patches are available for Solaris 2.6, 7, and 8 but
+# not for Solaris 2.5.1.
+# HP-UX:
+# Patches are available for HP-UX 10.20, 11.00, and 11.11.
+# AIX 4.3.3 and AIX 5.1:
+# Headers are clearly broken on all AIX versions, and we
+# don't know of any patches. The strange thing is that we
+# did not get any reports about this issue until very
+# recently, long after gcc 3.0.x was released. It seems to
+# work for us with gcc 2.95.2.
+NOTYPE=no
+
+if [ $XPLATFORM = "solaris-g++" -o $XPLATFORM = "hpux-g++" -o $XPLATFORM = "aix-g++" -o $XPLATFORM = "aix-g++-64" ]; then
+ NOTYPE=yes
+
+ test -d "$OUTDIR/config.tests/x11/notype" || mkdir -p "$OUTDIR/config.tests/x11/notype"
+ "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/config.tests/x11/notype/notypetest.pro" -o "$OUTDIR/config.tests/x11/notype/Makefile" >/dev/null 2>&1
+ cd "$OUTDIR/config.tests/x11/notype"
+
+ if [ "$VERBOSE" = "yes" ]; then
+ $MAKE
+ else
+ $MAKE >/dev/null 2>&1
+ fi
+
+ [ -x notypetest ] && NOTYPE=no
+fi
+
+# done
+if [ "$NOTYPE" = "yes" ]; then
+ [ "$VERBOSE" = "yes" ] && echo "Broken X11 headers detected."
+ exit 0
+else
+ [ "$VERBOSE" = "yes" ] && echo "X11 headers look good."
+ exit 1
+fi
diff --git a/config.tests/x11/notype/notypetest.cpp b/config.tests/x11/notype/notypetest.cpp
new file mode 100644
index 0000000000..40023134cf
--- /dev/null
+++ b/config.tests/x11/notype/notypetest.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/* Sample program for configure to test for broken X11 headers that
+confuse gcc 2.95 and better on target platforms such as Solaris.
+*/
+
+#include <X11/Xlib.h>
+#include <X11/ICE/ICElib.h>
+
+int main()
+{
+ return 0;
+}
diff --git a/config.tests/x11/notype/notypetest.pro b/config.tests/x11/notype/notypetest.pro
new file mode 100644
index 0000000000..6ce2c62619
--- /dev/null
+++ b/config.tests/x11/notype/notypetest.pro
@@ -0,0 +1,5 @@
+TEMPLATE=app
+TARGET=notypetest
+CONFIG-=qt
+CONFIG+=x11
+SOURCES=notypetest.cpp
diff --git a/config.tests/x11/opengl/opengl.cpp b/config.tests/x11/opengl/opengl.cpp
new file mode 100644
index 0000000000..71e52cf5c7
--- /dev/null
+++ b/config.tests/x11/opengl/opengl.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <GL/gl.h>
+
+int main(int, char **)
+{
+ GLuint x;
+ x = 0;
+ return 0;
+}
diff --git a/config.tests/x11/opengl/opengl.pro b/config.tests/x11/opengl/opengl.pro
new file mode 100644
index 0000000000..5c3a1c50cb
--- /dev/null
+++ b/config.tests/x11/opengl/opengl.pro
@@ -0,0 +1,11 @@
+SOURCES = opengl.cpp
+CONFIG += x11
+INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+
+for(p, QMAKE_LIBDIR_OPENGL) {
+ exists($$p):LIBS += -L$$p
+}
+
+CONFIG -= qt
+win32-g++*:LIBS += -lopengl32
+else:LIBS += -lGL
diff --git a/config.tests/x11/sm/sm.cpp b/config.tests/x11/sm/sm.cpp
new file mode 100644
index 0000000000..6dd81832dc
--- /dev/null
+++ b/config.tests/x11/sm/sm.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <X11/SM/SMlib.h>
+
+int main(int, char **)
+{
+ SmPointer pointer;
+ pointer = 0;
+ return 0;
+}
diff --git a/config.tests/x11/sm/sm.pro b/config.tests/x11/sm/sm.pro
new file mode 100644
index 0000000000..9be43d8aa2
--- /dev/null
+++ b/config.tests/x11/sm/sm.pro
@@ -0,0 +1,4 @@
+SOURCES += sm.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += $$QMAKE_LIBS_X11SM
diff --git a/config.tests/x11/xcursor/xcursor.cpp b/config.tests/x11/xcursor/xcursor.cpp
new file mode 100644
index 0000000000..f979b7bc70
--- /dev/null
+++ b/config.tests/x11/xcursor/xcursor.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <X11/Xlib.h>
+#include <X11/Xcursor/Xcursor.h>
+
+#if !defined(XCURSOR_LIB_MAJOR)
+# define XCURSOR_LIB_MAJOR XCURSOR_MAJOR
+#endif
+#if !defined(XCURSOR_LIB_MINOR)
+# define XCURSOR_LIB_MINOR XCURSOR_MINOR
+#endif
+
+#if XCURSOR_LIB_MAJOR == 1 && XCURSOR_LIB_MINOR >= 0
+# define XCURSOR_FOUND
+#else
+# define
+# error "Required Xcursor version 1.0 not found."
+#endif
+
+int main(int, char **)
+{
+ XcursorImage *image;
+ image = 0;
+ XcursorCursors *cursors;
+ cursors = 0;
+ return 0;
+}
diff --git a/config.tests/x11/xcursor/xcursor.pro b/config.tests/x11/xcursor/xcursor.pro
new file mode 100644
index 0000000000..b1e69be29a
--- /dev/null
+++ b/config.tests/x11/xcursor/xcursor.pro
@@ -0,0 +1,4 @@
+SOURCES = xcursor.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXcursor
diff --git a/config.tests/x11/xfixes/xfixes.cpp b/config.tests/x11/xfixes/xfixes.cpp
new file mode 100644
index 0000000000..afa54bd42e
--- /dev/null
+++ b/config.tests/x11/xfixes/xfixes.cpp
@@ -0,0 +1,55 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <X11/Xlib.h>
+#include <X11/extensions/Xfixes.h>
+
+#if XFIXES_MAJOR < 2
+# error "Required Xfixes version 2.0 not found."
+#endif
+
+int main(int, char **)
+{
+ XFixesSelectionNotifyEvent event;
+ event.type = 0;
+ return 0;
+}
+
diff --git a/config.tests/x11/xfixes/xfixes.pro b/config.tests/x11/xfixes/xfixes.pro
new file mode 100644
index 0000000000..cc94a11bc2
--- /dev/null
+++ b/config.tests/x11/xfixes/xfixes.pro
@@ -0,0 +1,3 @@
+CONFIG += x11
+CONFIG -= qt
+SOURCES = xfixes.cpp
diff --git a/config.tests/x11/xinerama/xinerama.cpp b/config.tests/x11/xinerama/xinerama.cpp
new file mode 100644
index 0000000000..d686d99cbc
--- /dev/null
+++ b/config.tests/x11/xinerama/xinerama.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <X11/Xlib.h>
+#include <X11/extensions/Xinerama.h>
+
+int main(int, char **)
+{
+ XineramaScreenInfo *info;
+ info = 0;
+ return 0;
+}
diff --git a/config.tests/x11/xinerama/xinerama.pro b/config.tests/x11/xinerama/xinerama.pro
new file mode 100644
index 0000000000..54d1af031b
--- /dev/null
+++ b/config.tests/x11/xinerama/xinerama.pro
@@ -0,0 +1,4 @@
+SOURCES = xinerama.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXinerama
diff --git a/config.tests/x11/xinput/xinput.cpp b/config.tests/x11/xinput/xinput.cpp
new file mode 100644
index 0000000000..92a3d4146c
--- /dev/null
+++ b/config.tests/x11/xinput/xinput.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifdef Q_OS_SOLARIS
+#error "Not supported."
+#else
+
+#include <X11/Xlib.h>
+#include <X11/extensions/XInput.h>
+
+#ifdef Q_OS_IRIX
+# include <wacom.h>
+#endif
+
+int main(int, char **)
+{
+ XDeviceButtonEvent *event;
+ event = 0;
+ return 0;
+}
+#endif
diff --git a/config.tests/x11/xinput/xinput.pro b/config.tests/x11/xinput/xinput.pro
new file mode 100644
index 0000000000..8acaede355
--- /dev/null
+++ b/config.tests/x11/xinput/xinput.pro
@@ -0,0 +1,6 @@
+SOURCES = xinput.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXi
+irix-*:DEFINES+=Q_OS_IRIX
+solaris-*:DEFINES+=Q_OS_SOLARIS
diff --git a/config.tests/x11/xkb/xkb.cpp b/config.tests/x11/xkb/xkb.cpp
new file mode 100644
index 0000000000..84e272e055
--- /dev/null
+++ b/config.tests/x11/xkb/xkb.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <X11/Xlib.h>
+#include <X11/XKBlib.h>
+
+int main(int, char **)
+{
+ Display *display = 0;
+
+ int opcode = -1;
+ int xkbEventBase = -1;
+ int xkbErrorBase = -1;
+ int xkblibMajor = XkbMajorVersion;
+ int xkblibMinor = XkbMinorVersion;
+ XkbQueryExtension(display, &opcode, &xkbEventBase, &xkbErrorBase, &xkblibMajor, &xkblibMinor);
+
+ int keycode = 0;
+ unsigned int state = 0;
+ KeySym keySym;
+ unsigned int consumedModifiers;
+ XkbLookupKeySym(display, keycode, state, &consumedModifiers, &keySym);
+
+ XkbDescPtr xkbDesc = XkbGetMap(display, XkbAllClientInfoMask, XkbUseCoreKbd);
+ int w = XkbKeyGroupsWidth(xkbDesc, keycode);
+ keySym = XkbKeySym(xkbDesc, keycode, w-1);
+ XkbFreeClientMap(xkbDesc, XkbAllClientInfoMask, true);
+
+ state = XkbPCF_GrabsUseXKBStateMask;
+ (void) XkbSetPerClientControls(display, state, &state);
+
+ return 0;
+}
diff --git a/config.tests/x11/xkb/xkb.pro b/config.tests/x11/xkb/xkb.pro
new file mode 100644
index 0000000000..d4ec2223df
--- /dev/null
+++ b/config.tests/x11/xkb/xkb.pro
@@ -0,0 +1,3 @@
+SOURCES = xkb.cpp
+CONFIG += x11
+CONFIG -= qt
diff --git a/config.tests/x11/xlib/xlib.cpp b/config.tests/x11/xlib/xlib.cpp
new file mode 100644
index 0000000000..234b2216b1
--- /dev/null
+++ b/config.tests/x11/xlib/xlib.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <X11/Xlib.h>
+
+int main(int, char **)
+{
+ Display *d = XOpenDisplay(NULL);
+ XCloseDisplay(d);
+ return 0;
+}
+
diff --git a/config.tests/x11/xlib/xlib.pro b/config.tests/x11/xlib/xlib.pro
new file mode 100644
index 0000000000..658161ed9d
--- /dev/null
+++ b/config.tests/x11/xlib/xlib.pro
@@ -0,0 +1,3 @@
+CONFIG += x11
+CONFIG -= qt
+SOURCES = xlib.cpp
diff --git a/config.tests/x11/xrandr/xrandr.cpp b/config.tests/x11/xrandr/xrandr.cpp
new file mode 100644
index 0000000000..0c93f01797
--- /dev/null
+++ b/config.tests/x11/xrandr/xrandr.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <X11/Xlib.h>
+#include <X11/extensions/Xrandr.h>
+
+#if RANDR_MAJOR != 1 || RANDR_MINOR < 1
+# error "Requried Xrandr version 1.1 not found."
+#endif
+
+int main(int, char **)
+{
+ XRRScreenSize *size;
+ size = 0;
+ return 0;
+}
diff --git a/config.tests/x11/xrandr/xrandr.pro b/config.tests/x11/xrandr/xrandr.pro
new file mode 100644
index 0000000000..3fb2910b5e
--- /dev/null
+++ b/config.tests/x11/xrandr/xrandr.pro
@@ -0,0 +1,4 @@
+SOURCES = xrandr.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXrender -lXrandr
diff --git a/config.tests/x11/xrender/xrender.cpp b/config.tests/x11/xrender/xrender.cpp
new file mode 100644
index 0000000000..d99f9c2a6e
--- /dev/null
+++ b/config.tests/x11/xrender/xrender.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <X11/Xlib.h>
+#include <X11/extensions/Xrender.h>
+
+#if RENDER_MAJOR == 0 && RENDER_MINOR < 5
+# error "Required Xrender version 0.6 not found."
+#else
+int main(int, char **)
+{
+ XRenderPictFormat *format;
+ format = 0;
+ return 0;
+}
+#endif
diff --git a/config.tests/x11/xrender/xrender.pro b/config.tests/x11/xrender/xrender.pro
new file mode 100644
index 0000000000..e7786420fa
--- /dev/null
+++ b/config.tests/x11/xrender/xrender.pro
@@ -0,0 +1,4 @@
+SOURCES = xrender.cpp
+CONFIG += x11
+CONFIG -= qt
+LIBS += -lXrender
diff --git a/config.tests/x11/xshape/xshape.cpp b/config.tests/x11/xshape/xshape.cpp
new file mode 100644
index 0000000000..1b3972c8bb
--- /dev/null
+++ b/config.tests/x11/xshape/xshape.cpp
@@ -0,0 +1,51 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/extensions/shape.h>
+
+int main(int, char **)
+{
+ XShapeEvent shapeevent;
+ shapeevent.type = 0;
+ return 0;
+}
diff --git a/config.tests/x11/xshape/xshape.pro b/config.tests/x11/xshape/xshape.pro
new file mode 100644
index 0000000000..611c048e39
--- /dev/null
+++ b/config.tests/x11/xshape/xshape.pro
@@ -0,0 +1,3 @@
+CONFIG += x11
+CONFIG -= qt
+SOURCES = xshape.cpp
diff --git a/config.tests/x11/xsync/xsync.cpp b/config.tests/x11/xsync/xsync.cpp
new file mode 100644
index 0000000000..795eef213a
--- /dev/null
+++ b/config.tests/x11/xsync/xsync.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+extern "C" {
+#include <X11/extensions/sync.h>
+}
+
+int main(int, char **)
+{
+ XSyncValue value;
+ (void*)&XSyncIntToValue;
+ (void*)&XSyncCreateCounter;
+ int a, b;
+ Status ret = XSyncInitialize(NULL, &a, &b);
+ return ret;
+}
diff --git a/config.tests/x11/xsync/xsync.pro b/config.tests/x11/xsync/xsync.pro
new file mode 100644
index 0000000000..58b82383ea
--- /dev/null
+++ b/config.tests/x11/xsync/xsync.pro
@@ -0,0 +1,3 @@
+CONFIG += x11
+CONFIG -= qt
+SOURCES = xsync.cpp
diff --git a/config.tests/x11/xvideo/xvideo.cpp b/config.tests/x11/xvideo/xvideo.cpp
new file mode 100644
index 0000000000..9cf0662cf3
--- /dev/null
+++ b/config.tests/x11/xvideo/xvideo.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <X11/Xlib.h>
+#include <X11/extensions/Xv.h>
+#include <X11/extensions/Xvlib.h>
+
+int main(int argc, char** argv)
+{
+ unsigned int count = 0;
+ XvAdaptorInfo *adaptors = 0;
+ XvQueryAdaptors(0, 0, &count, &adaptors);
+ return 0;
+}
diff --git a/config.tests/x11/xvideo/xvideo.pro b/config.tests/x11/xvideo/xvideo.pro
new file mode 100644
index 0000000000..d4c63a0158
--- /dev/null
+++ b/config.tests/x11/xvideo/xvideo.pro
@@ -0,0 +1,4 @@
+CONFIG += x11
+CONFIG -= qt
+SOURCES = xvideo.cpp
+LIBS += -lXv