From 38be0d13830efd2d98281c645c3a60afe05ffece Mon Sep 17 00:00:00 2001 From: Qt by Nokia Date: Wed, 27 Apr 2011 12:05:43 +0200 Subject: Initial import from the monolithic Qt. This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12 --- config.tests/unix/3dnow/3dnow.cpp | 51 +++++++ config.tests/unix/3dnow/3dnow.pro | 3 + config.tests/unix/alsa/alsa.pro | 4 + config.tests/unix/alsa/alsatest.cpp | 50 +++++++ config.tests/unix/avx/avx.cpp | 51 +++++++ config.tests/unix/avx/avx.pro | 3 + config.tests/unix/bsymbolic_functions.test | 22 +++ config.tests/unix/clock-gettime/clock-gettime.cpp | 57 ++++++++ config.tests/unix/clock-gettime/clock-gettime.pri | 2 + config.tests/unix/clock-gettime/clock-gettime.pro | 4 + .../unix/clock-monotonic/clock-monotonic.cpp | 57 ++++++++ .../unix/clock-monotonic/clock-monotonic.pro | 4 + config.tests/unix/compile.test | 88 ++++++++++++ config.tests/unix/cups/cups.cpp | 49 +++++++ config.tests/unix/cups/cups.pro | 4 + config.tests/unix/db2/db2.cpp | 48 +++++++ config.tests/unix/db2/db2.pro | 4 + config.tests/unix/dbus/dbus.cpp | 53 ++++++++ config.tests/unix/dbus/dbus.pro | 3 + config.tests/unix/doubleformat.test | 63 +++++++++ .../unix/doubleformat/doubleformattest.cpp | 66 +++++++++ .../unix/doubleformat/doubleformattest.pro | 3 + config.tests/unix/egl/egl.cpp | 51 +++++++ config.tests/unix/egl/egl.pro | 10 ++ config.tests/unix/egl4gles1/egl4gles1.cpp | 51 +++++++ config.tests/unix/egl4gles1/egl4gles1.pro | 10 ++ config.tests/unix/endian.test | 55 ++++++++ config.tests/unix/endian/endiantest.cpp | 56 ++++++++ config.tests/unix/endian/endiantest.pro | 3 + config.tests/unix/floatmath/floatmath.cpp | 58 ++++++++ config.tests/unix/floatmath/floatmath.pro | 3 + config.tests/unix/freetype/freetype.cpp | 54 ++++++++ config.tests/unix/freetype/freetype.pri | 9 ++ config.tests/unix/freetype/freetype.pro | 5 + config.tests/unix/fvisibility.test | 73 ++++++++++ config.tests/unix/getaddrinfo/getaddrinfo.pro | 4 + config.tests/unix/getaddrinfo/getaddrinfotest.cpp | 64 +++++++++ config.tests/unix/getifaddrs/getifaddrs.cpp | 60 +++++++++ config.tests/unix/getifaddrs/getifaddrs.pro | 5 + config.tests/unix/glib/glib.cpp | 57 ++++++++ config.tests/unix/glib/glib.pro | 2 + config.tests/unix/gnu-libiconv/gnu-libiconv.cpp | 60 +++++++++ config.tests/unix/gnu-libiconv/gnu-libiconv.pro | 4 + config.tests/unix/gstreamer/gstreamer.cpp | 55 ++++++++ config.tests/unix/gstreamer/gstreamer.pro | 3 + config.tests/unix/ibase/ibase.cpp | 47 +++++++ config.tests/unix/ibase/ibase.pro | 4 + config.tests/unix/icd/icd.cpp | 55 ++++++++ config.tests/unix/icd/icd.pro | 3 + config.tests/unix/iconv/iconv.cpp | 60 +++++++++ config.tests/unix/iconv/iconv.pro | 3 + config.tests/unix/icu/icu.cpp | 54 ++++++++ config.tests/unix/icu/icu.pro | 4 + config.tests/unix/inotify/inotify.pro | 3 + config.tests/unix/inotify/inotifytest.cpp | 50 +++++++ config.tests/unix/iodbc/iodbc.cpp | 48 +++++++ config.tests/unix/iodbc/iodbc.pro | 4 + config.tests/unix/ipv6/ipv6.pro | 3 + config.tests/unix/ipv6/ipv6test.cpp | 69 ++++++++++ config.tests/unix/ipv6ifname/ipv6ifname.cpp | 59 ++++++++ config.tests/unix/ipv6ifname/ipv6ifname.pro | 5 + config.tests/unix/iwmmxt/iwmmxt.cpp | 48 +++++++ config.tests/unix/iwmmxt/iwmmxt.pro | 3 + .../unix/javascriptcore-jit/hwcap_test.cpp | 46 +++++++ .../unix/javascriptcore-jit/javascriptcore-jit.pro | 2 + config.tests/unix/libjpeg/libjpeg.cpp | 53 ++++++++ config.tests/unix/libjpeg/libjpeg.pro | 4 + config.tests/unix/libmng/libmng.cpp | 54 ++++++++ config.tests/unix/libmng/libmng.pro | 4 + config.tests/unix/libpng/libpng.cpp | 53 ++++++++ config.tests/unix/libpng/libpng.pro | 4 + config.tests/unix/libtiff/libtiff.cpp | 65 +++++++++ config.tests/unix/libtiff/libtiff.pro | 4 + config.tests/unix/makeabs | 25 ++++ config.tests/unix/mmx/mmx.cpp | 51 +++++++ config.tests/unix/mmx/mmx.pro | 3 + config.tests/unix/mremap/mremap.cpp | 51 +++++++ config.tests/unix/mremap/mremap.pro | 3 + config.tests/unix/mysql/mysql.cpp | 47 +++++++ config.tests/unix/mysql/mysql.pro | 4 + config.tests/unix/mysql_r/mysql_r.pro | 4 + config.tests/unix/neon/neon.cpp | 51 +++++++ config.tests/unix/neon/neon.pro | 2 + config.tests/unix/nis/nis.cpp | 52 +++++++ config.tests/unix/nis/nis.pro | 5 + config.tests/unix/objcopy.test | 29 ++++ config.tests/unix/oci/oci.cpp | 47 +++++++ config.tests/unix/oci/oci.pro | 4 + config.tests/unix/odbc/odbc.cpp | 51 +++++++ config.tests/unix/odbc/odbc.pro | 5 + config.tests/unix/opengldesktop/opengldesktop.cpp | 52 +++++++ config.tests/unix/opengldesktop/opengldesktop.pro | 9 ++ config.tests/unix/opengles1/opengles1.cpp | 55 ++++++++ config.tests/unix/opengles1/opengles1.pro | 13 ++ config.tests/unix/opengles2/opengles2.cpp | 54 ++++++++ config.tests/unix/opengles2/opengles2.pro | 13 ++ config.tests/unix/openssl/openssl.cpp | 50 +++++++ config.tests/unix/openssl/openssl.pri | 10 ++ config.tests/unix/openssl/openssl.pro | 4 + config.tests/unix/openvg/openvg.cpp | 57 ++++++++ config.tests/unix/openvg/openvg.pro | 19 +++ config.tests/unix/padstring | 22 +++ config.tests/unix/precomp.test | 54 ++++++++ config.tests/unix/psql/psql.cpp | 49 +++++++ config.tests/unix/psql/psql.pro | 4 + config.tests/unix/ptrsize.test | 32 +++++ config.tests/unix/ptrsize/ptrsizetest.cpp | 61 +++++++++ config.tests/unix/ptrsize/ptrsizetest.pro | 3 + config.tests/unix/pulseaudio/pulseaudio.cpp | 58 ++++++++ config.tests/unix/pulseaudio/pulseaudio.pro | 3 + config.tests/unix/shivavg/shivavg.cpp | 51 +++++++ config.tests/unix/shivavg/shivavg.pro | 11 ++ config.tests/unix/sqlite/sqlite.cpp | 47 +++++++ config.tests/unix/sqlite/sqlite.pro | 3 + config.tests/unix/sqlite2/sqlite2.cpp | 47 +++++++ config.tests/unix/sqlite2/sqlite2.pro | 4 + config.tests/unix/sse/sse.cpp | 52 +++++++ config.tests/unix/sse/sse.pro | 3 + config.tests/unix/sse2/sse2.cpp | 52 +++++++ config.tests/unix/sse2/sse2.pro | 3 + config.tests/unix/sse3/sse3.cpp | 51 +++++++ config.tests/unix/sse3/sse3.pro | 3 + config.tests/unix/sse4_1/sse4_1.cpp | 51 +++++++ config.tests/unix/sse4_1/sse4_1.pro | 3 + config.tests/unix/sse4_2/sse4_2.cpp | 51 +++++++ config.tests/unix/sse4_2/sse4_2.pro | 3 + config.tests/unix/ssse3/ssse3.cpp | 51 +++++++ config.tests/unix/ssse3/ssse3.pro | 3 + config.tests/unix/stdint/main.cpp | 49 +++++++ config.tests/unix/stdint/stdint.pro | 4 + config.tests/unix/stl/stl.pro | 3 + config.tests/unix/stl/stltest.cpp | 150 +++++++++++++++++++++ config.tests/unix/sun-libiconv/sun-libiconv.pro | 2 + config.tests/unix/tds/tds.cpp | 48 +++++++ config.tests/unix/tds/tds.pro | 4 + config.tests/unix/tslib/tslib.cpp | 48 +++++++ config.tests/unix/tslib/tslib.pro | 3 + config.tests/unix/which.test | 39 ++++++ config.tests/unix/zlib/zlib.cpp | 54 ++++++++ config.tests/unix/zlib/zlib.pro | 4 + 140 files changed, 4205 insertions(+) create mode 100644 config.tests/unix/3dnow/3dnow.cpp create mode 100644 config.tests/unix/3dnow/3dnow.pro create mode 100644 config.tests/unix/alsa/alsa.pro create mode 100644 config.tests/unix/alsa/alsatest.cpp create mode 100644 config.tests/unix/avx/avx.cpp create mode 100644 config.tests/unix/avx/avx.pro create mode 100755 config.tests/unix/bsymbolic_functions.test create mode 100644 config.tests/unix/clock-gettime/clock-gettime.cpp create mode 100644 config.tests/unix/clock-gettime/clock-gettime.pri create mode 100644 config.tests/unix/clock-gettime/clock-gettime.pro create mode 100644 config.tests/unix/clock-monotonic/clock-monotonic.cpp create mode 100644 config.tests/unix/clock-monotonic/clock-monotonic.pro create mode 100755 config.tests/unix/compile.test create mode 100644 config.tests/unix/cups/cups.cpp create mode 100644 config.tests/unix/cups/cups.pro create mode 100644 config.tests/unix/db2/db2.cpp create mode 100644 config.tests/unix/db2/db2.pro create mode 100644 config.tests/unix/dbus/dbus.cpp create mode 100644 config.tests/unix/dbus/dbus.pro create mode 100755 config.tests/unix/doubleformat.test create mode 100644 config.tests/unix/doubleformat/doubleformattest.cpp create mode 100644 config.tests/unix/doubleformat/doubleformattest.pro create mode 100644 config.tests/unix/egl/egl.cpp create mode 100644 config.tests/unix/egl/egl.pro create mode 100644 config.tests/unix/egl4gles1/egl4gles1.cpp create mode 100644 config.tests/unix/egl4gles1/egl4gles1.pro create mode 100755 config.tests/unix/endian.test create mode 100644 config.tests/unix/endian/endiantest.cpp create mode 100644 config.tests/unix/endian/endiantest.pro create mode 100644 config.tests/unix/floatmath/floatmath.cpp create mode 100644 config.tests/unix/floatmath/floatmath.pro create mode 100644 config.tests/unix/freetype/freetype.cpp create mode 100644 config.tests/unix/freetype/freetype.pri create mode 100644 config.tests/unix/freetype/freetype.pro create mode 100755 config.tests/unix/fvisibility.test create mode 100644 config.tests/unix/getaddrinfo/getaddrinfo.pro create mode 100644 config.tests/unix/getaddrinfo/getaddrinfotest.cpp create mode 100644 config.tests/unix/getifaddrs/getifaddrs.cpp create mode 100644 config.tests/unix/getifaddrs/getifaddrs.pro create mode 100644 config.tests/unix/glib/glib.cpp create mode 100644 config.tests/unix/glib/glib.pro create mode 100644 config.tests/unix/gnu-libiconv/gnu-libiconv.cpp create mode 100644 config.tests/unix/gnu-libiconv/gnu-libiconv.pro create mode 100644 config.tests/unix/gstreamer/gstreamer.cpp create mode 100644 config.tests/unix/gstreamer/gstreamer.pro create mode 100644 config.tests/unix/ibase/ibase.cpp create mode 100644 config.tests/unix/ibase/ibase.pro create mode 100644 config.tests/unix/icd/icd.cpp create mode 100644 config.tests/unix/icd/icd.pro create mode 100644 config.tests/unix/iconv/iconv.cpp create mode 100644 config.tests/unix/iconv/iconv.pro create mode 100644 config.tests/unix/icu/icu.cpp create mode 100644 config.tests/unix/icu/icu.pro create mode 100644 config.tests/unix/inotify/inotify.pro create mode 100644 config.tests/unix/inotify/inotifytest.cpp create mode 100644 config.tests/unix/iodbc/iodbc.cpp create mode 100644 config.tests/unix/iodbc/iodbc.pro create mode 100644 config.tests/unix/ipv6/ipv6.pro create mode 100644 config.tests/unix/ipv6/ipv6test.cpp create mode 100644 config.tests/unix/ipv6ifname/ipv6ifname.cpp create mode 100644 config.tests/unix/ipv6ifname/ipv6ifname.pro create mode 100644 config.tests/unix/iwmmxt/iwmmxt.cpp create mode 100644 config.tests/unix/iwmmxt/iwmmxt.pro create mode 100644 config.tests/unix/javascriptcore-jit/hwcap_test.cpp create mode 100644 config.tests/unix/javascriptcore-jit/javascriptcore-jit.pro create mode 100644 config.tests/unix/libjpeg/libjpeg.cpp create mode 100644 config.tests/unix/libjpeg/libjpeg.pro create mode 100644 config.tests/unix/libmng/libmng.cpp create mode 100644 config.tests/unix/libmng/libmng.pro create mode 100644 config.tests/unix/libpng/libpng.cpp create mode 100644 config.tests/unix/libpng/libpng.pro create mode 100644 config.tests/unix/libtiff/libtiff.cpp create mode 100644 config.tests/unix/libtiff/libtiff.pro create mode 100755 config.tests/unix/makeabs create mode 100644 config.tests/unix/mmx/mmx.cpp create mode 100644 config.tests/unix/mmx/mmx.pro create mode 100644 config.tests/unix/mremap/mremap.cpp create mode 100644 config.tests/unix/mremap/mremap.pro create mode 100644 config.tests/unix/mysql/mysql.cpp create mode 100644 config.tests/unix/mysql/mysql.pro create mode 100644 config.tests/unix/mysql_r/mysql_r.pro create mode 100644 config.tests/unix/neon/neon.cpp create mode 100644 config.tests/unix/neon/neon.pro create mode 100644 config.tests/unix/nis/nis.cpp create mode 100644 config.tests/unix/nis/nis.pro create mode 100755 config.tests/unix/objcopy.test create mode 100644 config.tests/unix/oci/oci.cpp create mode 100644 config.tests/unix/oci/oci.pro create mode 100644 config.tests/unix/odbc/odbc.cpp create mode 100644 config.tests/unix/odbc/odbc.pro create mode 100644 config.tests/unix/opengldesktop/opengldesktop.cpp create mode 100644 config.tests/unix/opengldesktop/opengldesktop.pro create mode 100644 config.tests/unix/opengles1/opengles1.cpp create mode 100644 config.tests/unix/opengles1/opengles1.pro create mode 100644 config.tests/unix/opengles2/opengles2.cpp create mode 100644 config.tests/unix/opengles2/opengles2.pro create mode 100644 config.tests/unix/openssl/openssl.cpp create mode 100644 config.tests/unix/openssl/openssl.pri create mode 100644 config.tests/unix/openssl/openssl.pro create mode 100644 config.tests/unix/openvg/openvg.cpp create mode 100644 config.tests/unix/openvg/openvg.pro create mode 100755 config.tests/unix/padstring create mode 100755 config.tests/unix/precomp.test create mode 100644 config.tests/unix/psql/psql.cpp create mode 100644 config.tests/unix/psql/psql.pro create mode 100755 config.tests/unix/ptrsize.test create mode 100644 config.tests/unix/ptrsize/ptrsizetest.cpp create mode 100644 config.tests/unix/ptrsize/ptrsizetest.pro create mode 100644 config.tests/unix/pulseaudio/pulseaudio.cpp create mode 100644 config.tests/unix/pulseaudio/pulseaudio.pro create mode 100644 config.tests/unix/shivavg/shivavg.cpp create mode 100644 config.tests/unix/shivavg/shivavg.pro create mode 100644 config.tests/unix/sqlite/sqlite.cpp create mode 100644 config.tests/unix/sqlite/sqlite.pro create mode 100644 config.tests/unix/sqlite2/sqlite2.cpp create mode 100644 config.tests/unix/sqlite2/sqlite2.pro create mode 100644 config.tests/unix/sse/sse.cpp create mode 100644 config.tests/unix/sse/sse.pro create mode 100644 config.tests/unix/sse2/sse2.cpp create mode 100644 config.tests/unix/sse2/sse2.pro create mode 100644 config.tests/unix/sse3/sse3.cpp create mode 100644 config.tests/unix/sse3/sse3.pro create mode 100644 config.tests/unix/sse4_1/sse4_1.cpp create mode 100644 config.tests/unix/sse4_1/sse4_1.pro create mode 100644 config.tests/unix/sse4_2/sse4_2.cpp create mode 100644 config.tests/unix/sse4_2/sse4_2.pro create mode 100644 config.tests/unix/ssse3/ssse3.cpp create mode 100644 config.tests/unix/ssse3/ssse3.pro create mode 100644 config.tests/unix/stdint/main.cpp create mode 100644 config.tests/unix/stdint/stdint.pro create mode 100644 config.tests/unix/stl/stl.pro create mode 100644 config.tests/unix/stl/stltest.cpp create mode 100644 config.tests/unix/sun-libiconv/sun-libiconv.pro create mode 100644 config.tests/unix/tds/tds.cpp create mode 100644 config.tests/unix/tds/tds.pro create mode 100644 config.tests/unix/tslib/tslib.cpp create mode 100644 config.tests/unix/tslib/tslib.pro create mode 100755 config.tests/unix/which.test create mode 100644 config.tests/unix/zlib/zlib.cpp create mode 100644 config.tests/unix/zlib/zlib.pro (limited to 'config.tests/unix') 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 +#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 +#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 + +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 +#include + +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 +#include + +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 + +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 +#include + +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 + +#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 + +// 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 + +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 + +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 + +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 +#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 +#include +#ifdef __MINGW32__ +#include +#include +#else +#include +#include +#include +#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 +#include +#include +#include + +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 + +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 + +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 +#include +#include + +#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 + +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 + +#include +#include + +#include +#include + +#include + +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 + +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 +#include +#include + +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 + +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 +#include + +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 +#include +#else +#include +#include +#include +#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 +#include +#include + +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 + +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 + +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 +#include +extern "C" { +#include +} + +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 + +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 + +#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 + +#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 +#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 +#include + +int main(int, char **) +{ + (void) ::mremap(static_cast(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 + +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 +#include +#include +#include + +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 + +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 +#endif +#include +#include + +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 + +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 +#else + #include +#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 +#else + #include +#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 + +#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 +#else +#include +#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 <header.h <header.cpp + cat >source.cpp </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 +struct QPointerSizeTest +{ +}; + +template<> +struct QPointerSizeTest<8> +{ + enum { PointerSize = 8 }; +}; + +int main( int, char ** ) +{ + return QPointerSizeTest::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 +#include + +#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 + +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 + +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 + +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 +#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 +#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 + +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 + +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 + +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 + +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 + +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 +#include +#include +#include +#include + +// something mean to see if the compiler and C++ standard lib are good enough +template +class DummyClass +{ + // everything in std namespace ? + typedef std::bidirectional_iterator_tag i; + typedef std::ptrdiff_t d; + // typename implemented ? + typedef typename std::map::iterator MyIterator; +}; + +// extracted from QVector's strict iterator +template +class DummyIterator +{ + typedef DummyIterator 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 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::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 v2; + std::copy( v1.begin(), v1it, std::back_inserter( v2 ) ); + int v2size = v2.size(); + v2size = 0; + + std::map 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::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 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 +#include + +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 + +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 + +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 -- cgit v1.2.3