diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-02-25 13:18:59 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-01 14:50:28 (GMT) |
commit | 1fb11ed3532a0e47c8a4539600973e880b4cb78f (patch) | |
tree | 4469ad016e4831997cecc6963c994d90d4bec9f2 | |
parent | 2fd65bf3f5015fc9ff830b4a8709fe65d9644f17 (diff) | |
download | Qt-1fb11ed3532a0e47c8a4539600973e880b4cb78f.zip Qt-1fb11ed3532a0e47c8a4539600973e880b4cb78f.tar.gz Qt-1fb11ed3532a0e47c8a4539600973e880b4cb78f.tar.bz2 |
Introduce compileTest function.
This avoids the enormous duplication of identical command line
arguments passed down to compile.test.
This necessitates the addition of a -config parameter to compile.test,
as QMAKE_CONFIG needs to be extended in some cases.
Backport of qtbase commit ca4823505bee3674a8d65cd1bdd45ea93546114b.
Change-Id: I22aa0336443d330e49e674e5484f08c43c913d31
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
-rwxr-xr-x | config.tests/unix/compile.test | 4 | ||||
-rwxr-xr-x | configure | 215 |
2 files changed, 116 insertions, 103 deletions
diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test index b8f6743..f484f03 100755 --- a/config.tests/unix/compile.test +++ b/config.tests/unix/compile.test @@ -19,6 +19,10 @@ MAC_ARCH_LFLAGS="" while [ "$#" -gt 0 ]; do PARAM=$1 case $PARAM in + -config) + QMAKE_CONFIG="$QMAKE_CONFIG $2" + shift + ;; -framework) LFLAGS="$LFLAGS -framework \"$2\"" shift @@ -5134,8 +5134,17 @@ fi # tests that need qmake #------------------------------------------------------------------------------- +# parameters: path, name, extra args +compileTest() +{ + path=config.tests/$1 + name=$2 + shift 2 + "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "$path" "$name" $I_FLAGS $L_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE "$@" +} + # detect availability of float math.h functions -if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/floatmath "floatmath" $L_FLAGS $I_FLAGS $l_FLAGS; then +if compileTest unix/floatmath "floatmath"; then CFG_USE_FLOATMATH=yes else CFG_USE_FLOATMATH=no @@ -5143,7 +5152,7 @@ fi # detect mmx support if [ "${CFG_MMX}" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mmx "mmx" $L_FLAGS $I_FLAGS $l_FLAGS "-mmmx"; then + if compileTest unix/mmx "mmx" "-mmmx"; then CFG_MMX=yes else CFG_MMX=no @@ -5152,7 +5161,7 @@ fi # detect 3dnow support if [ "${CFG_3DNOW}" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/3dnow "3dnow" $L_FLAGS $I_FLAGS $l_FLAGS "-m3dnow"; then + if compileTest unix/3dnow "3dnow" "-m3dnow"; then CFG_3DNOW=yes else CFG_3DNOW=no @@ -5161,7 +5170,7 @@ fi # detect sse support if [ "${CFG_SSE}" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse "sse" $L_FLAGS $I_FLAGS $l_FLAGS "-msse"; then + if compileTest unix/sse "sse" "-msse"; then CFG_SSE=yes else CFG_SSE=no @@ -5170,7 +5179,7 @@ fi # detect sse2 support if [ "${CFG_SSE2}" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse2 "sse2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse2"; then + if compileTest unix/sse2 "sse2" "-msse2"; then CFG_SSE2=yes else CFG_SSE2=no @@ -5179,7 +5188,7 @@ fi # detect sse3 support if [ "${CFG_SSE3}" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse3 "sse3" $L_FLAGS $I_FLAGS $l_FLAGS "-msse3"; then + if compileTest unix/sse3 "sse3" "-msse3"; then CFG_SSE3=yes else CFG_SSE3=no @@ -5188,7 +5197,7 @@ fi # detect ssse3 support if [ "${CFG_SSSE3}" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ssse3 "ssse3" $L_FLAGS $I_FLAGS $l_FLAGS "-mssse3"; then + if compileTest unix/ssse3 "ssse3" "-mssse3"; then CFG_SSSE3=yes else CFG_SSSE3=no @@ -5197,7 +5206,7 @@ fi # detect sse4.1 support if [ "${CFG_SSE4_1}" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse4_1 "sse4_1" $L_FLAGS $I_FLAGS $l_FLAGS "-msse4.1"; then + if compileTest unix/sse4_1 "sse4_1" "-msse4.1"; then CFG_SSE4_1=yes else CFG_SSE4_1=no @@ -5206,7 +5215,7 @@ fi # detect sse4.2 support if [ "${CFG_SSE4_2}" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sse4_2 "sse4_2" $L_FLAGS $I_FLAGS $l_FLAGS "-msse4.2"; then + if compileTest unix/sse4_2 "sse4_2" "-msse4.2"; then CFG_SSE4_2=yes else CFG_SSE4_2=no @@ -5215,7 +5224,7 @@ fi # detect avx support if [ "${CFG_AVX}" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/avx "avx" $L_FLAGS $I_FLAGS $l_FLAGS "-mavx"; then + if compileTest unix/avx "avx" "-mavx"; then CFG_AVX=yes else CFG_AVX=no @@ -5224,7 +5233,7 @@ fi # check iWMMXt support if [ "$CFG_IWMMXT" = "yes" ]; then - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iwmmxt "iwmmxt" $L_FLAGS $I_FLAGS $l_FLAGS "-mcpu=iwmmxt" + compileTest unix/iwmmxt "iwmmxt" "-mcpu=iwmmxt" if [ $? != "0" ]; then echo "The iWMMXt functionality test failed!" echo " Please make sure your compiler supports iWMMXt intrinsics!" @@ -5234,7 +5243,7 @@ fi # detect neon support if [ "$CFG_ARCH" = "arm" ] && [ "${CFG_NEON}" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/neon "neon" $L_FLAGS $I_FLAGS $l_FLAGS "-mfpu=neon"; then + if compileTest unix/neon "neon" "-mfpu=neon"; then CFG_NEON=yes else CFG_NEON=no @@ -5313,9 +5322,9 @@ fi # check IPC support if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then # Raptor does not support configure tests. - if ! "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipc_sysv "ipc_sysv" $L_FLAGS $I_FLAGS $l_FLAGS ; then + if ! compileTest unix/ipc_sysv "ipc_sysv" ; then # SYSV IPC is not supported - check POSIX IPC - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipc_posix "ipc_posix" $L_FLAGS $I_FLAGS $l_FLAGS ; then + if compileTest unix/ipc_posix "ipc_posix" ; then QCONFIG_FLAGS="$QCONFIG_FLAGS QT_POSIX_IPC" else QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SYSTEMSEMAPHORE QT_NO_SHAREDMEMORY" @@ -5341,7 +5350,7 @@ if [ "$CFG_ZLIB" = "no" ]; then ZLIB_FORCED=yes fi if [ "$CFG_ZLIB" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/zlib "zlib" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/zlib "zlib"; then CFG_ZLIB=system else CFG_ZLIB=yes @@ -5350,7 +5359,7 @@ fi if [ "$XPLATFORM_QNX" = "yes" ]; then if [ "$CFG_SLOG2" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/slog2 "slog2" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/slog2 "slog2"; then CFG_SLOG2=yes QMAKE_CONFIG="$QMAKE_CONFIG slog2" else @@ -5400,7 +5409,7 @@ if [ "$CFG_JPEG" = "auto" ]; then fi # detect jpeg if [ "$CFG_LIBJPEG" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libjpeg "libjpeg" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/libjpeg "libjpeg"; then CFG_LIBJPEG=system else CFG_LIBJPEG=qt @@ -5427,7 +5436,7 @@ fi # detect tiff if [ "$CFG_LIBTIFF" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libtiff "libtiff" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/libtiff "libtiff"; then CFG_LIBTIFF=system else CFG_LIBTIFF=qt @@ -5444,7 +5453,7 @@ if [ "$CFG_MNG" = "auto" ]; then fi # detect mng if [ "$CFG_LIBMNG" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libmng "libmng" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/libmng "libmng"; then CFG_LIBMNG=system else CFG_LIBMNG=qt @@ -5453,7 +5462,7 @@ fi # detect png if [ "$CFG_LIBPNG" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/libpng "libpng" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/libpng "libpng"; then CFG_LIBPNG=system else CFG_LIBPNG=qt @@ -5497,13 +5506,13 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do QT_CFLAGS_MYSQL="" fi else - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mysql_r "MySQL (thread-safe)" $QT_LFLAGS_MYSQL_R $L_FLAGS $QT_CFLAGS_MYSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/mysql_r "MySQL (thread-safe)" $QT_LFLAGS_MYSQL_R $QT_CFLAGS_MYSQL; then QMakeVar add CONFIG use_libmysqlclient_r if [ "$CFG_SQL_mysql" = "auto" ]; then CFG_SQL_mysql=plugin fi QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R" - elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mysql "MySQL (thread-unsafe)" $QT_LFLAGS_MYSQL $L_FLAGS $QT_CFLAGS_MYSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + elif compileTest unix/mysql "MySQL (thread-unsafe)" $QT_LFLAGS_MYSQL $QT_CFLAGS_MYSQL; then if [ "$CFG_SQL_mysql" = "auto" ]; then CFG_SQL_mysql=plugin fi @@ -5535,7 +5544,7 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL" # But, respect PSQL_LIBS if set [ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS" - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/psql "PostgreSQL" $QT_LFLAGS_PSQL $L_FLAGS $QT_CFLAGS_PSQL $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/psql "PostgreSQL" $QT_LFLAGS_PSQL $QT_CFLAGS_PSQL; then if [ "$CFG_SQL_psql" = "auto" ]; then CFG_SQL_psql=plugin fi @@ -5556,12 +5565,12 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do ;; odbc) if [ "$CFG_SQL_odbc" != "no" ]; then - if ( [ "$PLATFORM_MAC" != "yes" ] || [ "$XPLATFORM_MINGW" = "yes" ] ) && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/odbc "ODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if ( [ "$PLATFORM_MAC" != "yes" ] || [ "$XPLATFORM_MINGW" = "yes" ] ) && compileTest unix/odbc "ODBC"; then if [ "$CFG_SQL_odbc" = "auto" ]; then CFG_SQL_odbc=plugin fi else - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/iodbc "iODBC" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/iodbc "iODBC"; then QT_LFLAGS_ODBC="-liodbc" if [ "$CFG_SQL_odbc" = "auto" ]; then CFG_SQL_odbc=plugin @@ -5582,7 +5591,7 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do ;; oci) if [ "$CFG_SQL_oci" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/oci "OCI" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/oci "OCI"; then if [ "$CFG_SQL_oci" = "auto" ]; then CFG_SQL_oci=plugin fi @@ -5603,7 +5612,7 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do if [ "$CFG_SQL_tds" != "no" ]; then [ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib" [ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS" - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tds "TDS" $QT_LFLAGS_TDS $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/tds "TDS" $QT_LFLAGS_TDS; then if [ "$CFG_SQL_tds" = "auto" ]; then CFG_SQL_tds=plugin fi @@ -5622,7 +5631,7 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do ;; db2) if [ "$CFG_SQL_db2" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/db2 "DB2" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/db2 "DB2"; then if [ "$CFG_SQL_db2" = "auto" ]; then CFG_SQL_db2=plugin fi @@ -5641,7 +5650,7 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do ;; ibase) if [ "$CFG_SQL_ibase" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ibase "InterBase" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/ibase "InterBase"; then if [ "$CFG_SQL_ibase" = "auto" ]; then CFG_SQL_ibase=plugin fi @@ -5660,7 +5669,7 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do ;; sqlite2) if [ "$CFG_SQL_sqlite2" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite2 "SQLite2" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/sqlite2 "SQLite2"; then if [ "$CFG_SQL_sqlite2" = "auto" ]; then CFG_SQL_sqlite2=plugin fi @@ -5697,7 +5706,7 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do QT_CFLAGS_SQLITE= QT_LFLAGS_SQLITE="-lsqlite3 -lz" fi - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/sqlite "SQLite" $QT_LFLAGS_SQLITE $L_FLAGS $QT_CFLAGS_SQLITE $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/sqlite "SQLite" $QT_LFLAGS_SQLITE $QT_CFLAGS_SQLITE; then if [ "$CFG_SQL_sqlite" = "auto" ]; then CFG_SQL_sqlite=plugin fi @@ -5734,7 +5743,7 @@ done # auto-detect NIS support if [ "$CFG_NIS" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/nis "NIS" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/nis "NIS"; then CFG_NIS=yes else if [ "$CFG_NIS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then @@ -5751,7 +5760,7 @@ fi # auto-detect CUPS support if [ "$CFG_CUPS" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/cups "Cups" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/cups "Cups"; then CFG_CUPS=yes else if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then @@ -5770,11 +5779,11 @@ fi if [ "$CFG_ICONV" != "no" ]; then if [ "$PLATFORM_QWS" = "yes" ] || [ "$PLATFORM_QPA" = "yes" -a "$CFG_ICONV" = "auto" ]; then CFG_ICONV=no - elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/iconv" "POSIX iconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + elif compileTest "unix/iconv" "POSIX iconv"; then CFG_ICONV=yes - elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/sun-libiconv" "SUN libiconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + elif compileTest "unix/sun-libiconv" "SUN libiconv"; then CFG_ICONV=sun - elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/gnu-libiconv" "GNU libiconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + elif compileTest "unix/gnu-libiconv" "GNU libiconv"; then CFG_ICONV=gnu else if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then @@ -5795,7 +5804,7 @@ if [ "$CFG_DBUS" != "no" ]; then QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null` QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null` fi - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/dbus "D-Bus" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_DBUS $QT_LIBS_DBUS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/dbus "D-Bus" $QT_CFLAGS_DBUS $QT_LIBS_DBUS; then [ "$CFG_DBUS" = "auto" ] && CFG_DBUS=yes QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS" QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS" @@ -5839,7 +5848,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "ye QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null` QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null` fi - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/glib "Glib" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GLIB $QT_LIBS_GLIB $X11TESTS_FLAGS ; then + if compileTest unix/glib "Glib" $QT_CFLAGS_GLIB $QT_LIBS_GLIB $X11TESTS_FLAGS ; then CFG_GLIB=yes QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB" QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB" @@ -5874,7 +5883,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "ye QT_CFLAGS_GSTREAMER=`$PKG_CONFIG --cflags gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null` QT_LIBS_GSTREAMER=`$PKG_CONFIG --libs gstreamer-0.10 gstreamer-plugins-base-0.10 2>/dev/null` fi - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/gstreamer "GStreamer" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER $X11TESTS_FLAGS; then + if compileTest unix/gstreamer "GStreamer" $QT_CFLAGS_GSTREAMER $QT_LIBS_GSTREAMER $X11TESTS_FLAGS; then CFG_GSTREAMER=yes QMakeVar set QT_CFLAGS_GSTREAMER "$QT_CFLAGS_GSTREAMER" QMakeVar set QT_LIBS_GSTREAMER "$QT_LIBS_GSTREAMER" @@ -5922,7 +5931,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "ye QT_CFLAGS_CONNSETTINGS=`$PKG_CONFIG --cflags connsettings icd2 2>/dev/null` QT_LIBS_CONNSETTINGS=`$PKG_CONFIG --libs connsettings icd2 2>/dev/null` fi - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icd "ICD" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_CONNSETTINGS $QT_LIBS_CONNSETTINGS; then + if compileTest unix/icd "ICD" $QT_CFLAGS_CONNSETTINGS $QT_LIBS_CONNSETTINGS; then [ "$CFG_ICD" = "auto" ] && CFG_ICD=yes QMakeVar set QT_CFLAGS_CONNSETTINGS "$QT_CFLAGS_CONNSETTINGS" QMakeVar set QT_LIBS_CONNSETTINGS "$QT_LIBS_CONNSETTINGS" @@ -5945,7 +5954,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "ye # auto-detect libicu support if [ "$CFG_ICU" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/icu "ICU" $L_FLAGS $I_FLAGS $l_FLAGS; then + if compileTest unix/icu "ICU"; then [ "$CFG_ICU" = "auto" ] && CFG_ICU=yes else if [ "$CFG_ICU" = "auto" ]; then @@ -5968,7 +5977,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "ye QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null` QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null` fi - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/pulseaudio "PulseAudio" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_PULSEAUDIO $QT_LIBS_PULSEAUDIO $X11TESTS_FLAGS; then + if compileTest unix/pulseaudio "PulseAudio" $QT_CFLAGS_PULSEAUDIO $QT_LIBS_PULSEAUDIO $X11TESTS_FLAGS; then CFG_PULSEAUDIO=yes QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO" QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO" @@ -6000,7 +6009,7 @@ if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then fi # Check we actually have X11 :-) - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS + compileTest x11/xlib "XLib" $X11TESTS_FLAGS if [ $? != "0" ]; then echo "Basic XLib functionality test failed!" echo " You might need to modify the include and library search paths by editing" @@ -6023,14 +6032,14 @@ if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" -o "$XPLATFORM_SYMBIA fi fi if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then + if compileTest x11/opengl "OpenGL" $X11TESTS_FLAGS; then CFG_OPENGL=desktop - elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then + elif compileTest unix/opengles2 "OpenGL ES 2.x"; then CFG_OPENGL=es2 if [ "$CFG_EGL" = "no" ]; then CFG_EGL=auto fi - elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then + elif compileTest unix/opengles1 "OpenGL ES 1.x"; then CFG_OPENGL=es1 if [ "$CFG_EGL" = "no" ]; then CFG_EGL=auto @@ -6049,7 +6058,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" -o "$XPLATFORM_SYMBIA hpux*) # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct. if [ "$CFG_OPENGL" = "desktop" ]; then - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS + compileTest x11/glxfbconfig "OpenGL" $X11TESTS_FLAGS if [ $? != "0" ]; then QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT fi @@ -6060,7 +6069,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" -o "$XPLATFORM_SYMBIA esac elif [ "$CFG_OPENGL" = "es1" ]; then # OpenGL ES 1.x - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS + compileTest unix/opengles1 "OpenGL ES 1.x" if [ $? != "0" ]; then echo "The OpenGL ES 1.x functionality test failed!" echo " You might need to modify the include and library search paths by editing" @@ -6072,7 +6081,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" -o "$XPLATFORM_SYMBIA #OpenGL ES 2.x if [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then # Raptor does not support configure tests. - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS + compileTest unix/opengles2 "OpenGL ES 2.x" if [ $? != "0" ]; then echo "The OpenGL ES 2.0 functionality test failed!" echo " You might need to modify the include and library search paths by editing" @@ -6083,7 +6092,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" -o "$XPLATFORM_SYMBIA fi elif [ "$CFG_OPENGL" = "desktop" ]; then # Desktop OpenGL support - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/opengl "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS + compileTest x11/opengl "OpenGL" $X11TESTS_FLAGS if [ $? != "0" ]; then echo "The OpenGL functionality test failed!" echo " You might need to modify the include and library search paths by editing" @@ -6094,7 +6103,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$XPLATFORM_MINGW" = "yes" -o "$XPLATFORM_SYMBIA case "$PLATFORM" in hpux*) # HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct. - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/glxfbconfig "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS + compileTest x11/glxfbconfig "OpenGL" $X11TESTS_FLAGS if [ $? != "0" ]; then QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT fi @@ -6115,7 +6124,7 @@ fi # X11/MINGW OpenGL if [ "$PLATFORM_X11" = "yes" ]; then # auto-detect Xcursor support if [ "$CFG_XCURSOR" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xcursor "Xcursor" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then + if compileTest x11/xcursor "Xcursor" $X11TESTS_FLAGS; then if [ "$CFG_XCURSOR" != "runtime" ]; then CFG_XCURSOR=yes; fi @@ -6134,7 +6143,7 @@ if [ "$PLATFORM_X11" = "yes" ]; then # auto-detect Xfixes support if [ "$CFG_XFIXES" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xfixes "Xfixes" $L_FLAGS $I_FLAGS $X11TESTS_FLAGS; then + if compileTest x11/xfixes "Xfixes" $X11TESTS_FLAGS; then if [ "$CFG_XFIXES" != "runtime" ]; then CFG_XFIXES=yes; fi @@ -6153,7 +6162,7 @@ if [ "$PLATFORM_X11" = "yes" ]; then # auto-detect Xrandr support (resize and rotate extension) if [ "$CFG_XRANDR" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrandr "Xrandr" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then + if compileTest x11/xrandr "Xrandr" $X11TESTS_FLAGS; then if [ "$CFG_XRANDR" != "runtime" ]; then CFG_XRANDR=yes fi @@ -6172,7 +6181,7 @@ if [ "$PLATFORM_X11" = "yes" ]; then # auto-detect Xrender support if [ "$CFG_XRENDER" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xrender "Xrender" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then + if compileTest x11/xrender "Xrender" $X11TESTS_FLAGS; then CFG_XRENDER=yes else if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then @@ -6195,7 +6204,7 @@ if [ "$PLATFORM_X11" = "yes" ]; then # auto-detect MIT-SHM support if [ "$CFG_MITSHM" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/mitshm "mitshm" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then + if compileTest x11/mitshm "mitshm" $X11TESTS_FLAGS; then CFG_MITSHM=yes else if [ "$CFG_MITSHM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then @@ -6219,7 +6228,7 @@ if [ "$PLATFORM_X11" = "yes" ]; then QT_CFLAGS_FONTCONFIG= QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig" fi - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then + if compileTest x11/fontconfig "FontConfig" $X11TESTS_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then CFG_FONTCONFIG=yes QMakeVar set QMAKE_CFLAGS_X11 "$QT_CFLAGS_FONTCONFIG \$\$QMAKE_CFLAGS_X11" QMakeVar set QMAKE_LIBS_X11 "$QT_LIBS_FONTCONFIG \$\$QMAKE_LIBS_X11" @@ -6239,7 +6248,7 @@ if [ "$PLATFORM_X11" = "yes" ]; then # auto-detect Session Management support if [ "$CFG_SM" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/sm "Session Management" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then + if compileTest x11/sm "Session Management" $X11TESTS_FLAGS; then CFG_SM=yes else if [ "$CFG_SM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then @@ -6256,7 +6265,7 @@ if [ "$PLATFORM_X11" = "yes" ]; then # auto-detect SHAPE support if [ "$CFG_XSHAPE" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xshape "XShape" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then + if compileTest x11/xshape "XShape" $X11TESTS_FLAGS; then CFG_XSHAPE=yes else if [ "$CFG_XSHAPE" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then @@ -6273,7 +6282,7 @@ if [ "$PLATFORM_X11" = "yes" ]; then # auto-detect XVideo support if [ "$CFG_XVIDEO" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xvideo "XVideo" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then + if compileTest x11/xvideo "XVideo" $X11TESTS_FLAGS; then CFG_XVIDEO=yes else if [ "$CFG_XVIDEO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then @@ -6290,7 +6299,7 @@ if [ "$PLATFORM_X11" = "yes" ]; then # auto-detect XSync support if [ "$CFG_XSYNC" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xsync "XSync" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then + if compileTest x11/xsync "XSync" $X11TESTS_FLAGS; then CFG_XSYNC=yes else if [ "$CFG_XSYNC" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then @@ -6307,7 +6316,7 @@ if [ "$PLATFORM_X11" = "yes" ]; then # auto-detect Xinerama support if [ "$CFG_XINERAMA" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinerama "Xinerama" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then + if compileTest x11/xinerama "Xinerama" $X11TESTS_FLAGS; then if [ "$CFG_XINERAMA" != "runtime" ]; then CFG_XINERAMA=yes fi @@ -6326,7 +6335,7 @@ if [ "$PLATFORM_X11" = "yes" ]; then # auto-detect Xinput support if [ "$CFG_XINPUT" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput "XInput" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then + if compileTest x11/xinput "XInput" $X11TESTS_FLAGS; then if [ "$CFG_XINPUT" != "runtime" ]; then CFG_XINPUT=yes fi @@ -6345,7 +6354,7 @@ if [ "$PLATFORM_X11" = "yes" ]; then # auto-detect XKB support if [ "$CFG_XKB" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xkb "XKB" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then + if compileTest x11/xkb "XKB" $X11TESTS_FLAGS; then CFG_XKB=yes else if [ "$CFG_XKB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then @@ -6393,7 +6402,7 @@ if [ "$PLATFORM_MAC" = "yes" ]; then fi if [ "$CFG_COREWLAN" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/mac/corewlan "CoreWlan" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest mac/corewlan "CoreWlan"; then CFG_COREWLAN=yes else CFG_COREWLAN=no @@ -6405,11 +6414,11 @@ fi if [ "$PLATFORM_QPA" = "yes" ]; then # auto-detect OpenGL support (es1 = OpenGL ES 1.x Common, es2 = OpenGL ES 2.x) if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then + if compileTest unix/opengldesktop "OpenGL" $X11TESTS_FLAGS; then CFG_OPENGL=desktop - elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then + elif compileTest unix/opengles2 "OpenGL ES 2.x"; then CFG_OPENGL=es2 - elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then + elif compileTest unix/opengles1 "OpenGL ES 1.x"; then CFG_OPENGL=es1 else if [ "$CFG_OPENGL" = "yes" ]; then @@ -6423,7 +6432,7 @@ if [ "$PLATFORM_QPA" = "yes" ]; then fi elif [ "$CFG_OPENGL" = "es1" ]; then # OpenGL ES 1.x - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS + compileTest unix/opengles1 "OpenGL ES 1.x" if [ $? != "0" ]; then echo "The OpenGL ES 1.x functionality test failed!" echo " You might need to modify the include and library search paths by editing" @@ -6443,7 +6452,7 @@ if [ "$PLATFORM_QPA" = "yes" ]; then QMakeVar set QMAKE_LIBS_OPENGL_ES2 "$QMAKE_LIBS_OPENGL_ES2" fi - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2 + compileTest unix/opengles2 "OpenGL ES 2.x" $QMAKE_LIBS_OPENGL_ES2 $QMAKE_CFLAGS_OPENGL_ES2 if [ $? != "0" ]; then echo "The OpenGL ES 2.0 functionality test failed!" echo " You might need to modify the include and library search paths by editing" @@ -6453,7 +6462,7 @@ if [ "$PLATFORM_QPA" = "yes" ]; then fi elif [ "$CFG_OPENGL" = "desktop" ]; then # Desktop OpenGL support - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengldesktop "OpenGL" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS + compileTest unix/opengldesktop "OpenGL" $X11TESTS_FLAGS if [ $? != "0" ]; then echo "The OpenGL functionality test failed!" echo " You might need to modify the include and library search paths by editing" @@ -6472,7 +6481,7 @@ if [ "$PLATFORM_QPA" = "yes" ]; then QT_CFLAGS_FONTCONFIG= QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig" fi - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/fontconfig "FontConfig" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then + if compileTest x11/fontconfig "FontConfig" $X11TESTS_FLAGS $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then QT_CONFIG="$QT_CONFIG fontconfig" QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG" QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG" @@ -6504,7 +6513,7 @@ if [ "$PLATFORM_QPA" = "yes" ]; then QMakeVar set QMAKE_DEFINES_WAYLAND " $QMAKE_DEFINES_WAYLAND" fi - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qpa/wayland "Wayland" $L_FLAGS $I_FLAGS $l_FLAGS $QMAKE_CFLAGS_WAYLAND $QMAKE_LIBS_WAYLAND; then + if compileTest qpa/wayland "Wayland" $QMAKE_CFLAGS_WAYLAND $QMAKE_LIBS_WAYLAND; then QT_CONFIG="$QT_CONFIG wayland" fi @@ -6527,9 +6536,9 @@ if [ "$PLATFORM_QWS" = "yes" ]; then fi if [ "$CFG_OPENGL" = "yes" ]; then CFG_EGL=auto - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS; then + if compileTest unix/opengles2 "OpenGL ES 2.x"; then CFG_OPENGL=es2 - elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS; then + elif compileTest unix/opengles1 "OpenGL ES 1.x"; then CFG_OPENGL=es1 else echo "All the OpenGL ES functionality tests failed!" @@ -6540,7 +6549,7 @@ if [ "$PLATFORM_QWS" = "yes" ]; then fi elif [ "$CFG_OPENGL" = "es1" ]; then # OpenGL ES 1.x - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles1 "OpenGL ES 1.x" $L_FLAGS $I_FLAGS $l_FLAGS + compileTest unix/opengles1 "OpenGL ES 1.x" if [ $? != "0" ]; then echo "The OpenGL ES 1.x functionality test failed!" echo " You might need to modify the include and library search paths by editing" @@ -6551,7 +6560,7 @@ if [ "$PLATFORM_QWS" = "yes" ]; then CFG_EGL=yes elif [ "$CFG_OPENGL" = "es2" ]; then #OpenGL ES 2.x - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/opengles2 "OpenGL ES 2.x" $L_FLAGS $I_FLAGS $l_FLAGS + compileTest unix/opengles2 "OpenGL ES 2.x" if [ $? != "0" ]; then echo "The OpenGL ES 2.0 functionality test failed!" echo " You might need to modify the include and library search paths by editing" @@ -6572,7 +6581,7 @@ if [ "$PLATFORM_QWS" = "yes" ]; then # screen drivers for screen in ${CFG_GFX_ON} ${CFG_GFX_PLUGIN}; do if [ "${screen}" = "ahi" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/ahi "Ahi" $L_FLAGS $I_FLAGS $l_FLAGS + compileTest qws/ahi "Ahi" if [ $? != "0" ]; then echo "The Ahi screen driver functionality test failed!" echo " You might need to modify the include and library search paths by editing" @@ -6583,7 +6592,7 @@ if [ "$PLATFORM_QWS" = "yes" ]; then fi if [ "${screen}" = "svgalib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/svgalib "SVGAlib" $L_FLAGS $I_FLAGS $l_FLAGS + compileTest qws/svgalib "SVGAlib" if [ $? != "0" ]; then echo "The SVGAlib screen driver functionality test failed!" echo " You might need to modify the include and library search paths by editing" @@ -6611,7 +6620,7 @@ if [ "$PLATFORM_QWS" = "yes" ]; then QMakeVar set QT_DEFINES_DIRECTFB "QT3_SUPPORT" fi - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/directfb "DirectFB" $L_FLAGS $I_FLAGS $l_FLAGS $QT_CFLAGS_DIRECTFB $QT_LIBS_DIRECTFB + compileTest qws/directfb "DirectFB" $QT_CFLAGS_DIRECTFB $QT_LIBS_DIRECTFB if [ $? != "0" ]; then echo "The DirectFB screen driver functionality test failed!" echo " You might need to modify the include and library search paths by editing" @@ -6626,7 +6635,7 @@ if [ "$PLATFORM_QWS" = "yes" ]; then # mouse drivers for mouse in ${CFG_MOUSE_ON} ${CFG_MOUSE_PLUGIN}; do if [ "${mouse}" = "tslib" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/tslib "tslib" $L_FLAGS $I_FLAGS $l_FLAGS + compileTest unix/tslib "tslib" if [ $? != "0" ]; then echo "The tslib functionality test failed!" echo " You might need to modify the include and library search paths by editing" @@ -6640,7 +6649,7 @@ if [ "$PLATFORM_QWS" = "yes" ]; then CFG_QGTKSTYLE=no # sound - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/qws/sound "sound" $L_FLAGS $I_FLAGS $l_FLAGS + compileTest qws/sound "sound" if [ $? != "0" ]; then QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SOUND" fi @@ -6652,7 +6661,7 @@ EGL_VARIANT=none if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then if [ "$CFG_EGL" != "no" ]; then # detect EGL support - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl" "EGL (EGL/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then + if compileTest "unix/egl" "EGL (EGL/egl.h)"; then # EGL specified by QMAKE_*_EGL, included with <EGL/egl.h> EGL_VARIANT=regular CFG_EGL=yes @@ -6660,7 +6669,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then # Prefer this variant for ES1 if [ "$CFG_OPENGL" = "es1" -o "$EGL_VARIANT" = "none" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl4gles1" "EGL (GLES/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then + if compileTest "unix/egl4gles1" "EGL (GLES/egl.h)"; then # EGL specified by QMAKE_*_EGL, included with <GLES/egl.h> EGL_VARIANT=gles CFG_EGL=yes @@ -6693,7 +6702,7 @@ fi [ "x$PLATFORM_MAC" = "xyes" ] && CFG_LIBFREETYPE=no [ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_LIBFREETYPE" = "auto" ] && CFG_LIBFREETYPE=no if [ "$CFG_LIBFREETYPE" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/freetype "FreeType" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/freetype "FreeType"; then CFG_LIBFREETYPE=system else CFG_LIBFREETYPE=yes @@ -6792,7 +6801,7 @@ if [ "$CFG_DOUBLEFORMAT" = "auto" ]; then fi HAVE_STL=no -if [ "$XPLATFORM_SYMBIAN" = "yes" ] || [ "$XPLATFORM_INTEGRITY" = "yes" ] || "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stl "STL" $L_FLAGS $I_FLAGS $l_FLAGS; then +if [ "$XPLATFORM_SYMBIAN" = "yes" ] || [ "$XPLATFORM_INTEGRITY" = "yes" ] || compileTest unix/stl "STL"; then HAVE_STL=yes fi @@ -6817,7 +6826,7 @@ if [ "$CFG_IPV6" != "no" ]; then if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then #IPV6 should always be enabled for Symbian release CFG_IPV6=yes - elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6 "IPv6" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + elif compileTest unix/ipv6 "IPv6"; then CFG_IPV6=yes else if [ "$CFG_IPV6" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then @@ -6834,7 +6843,7 @@ fi # detect POSIX clock_gettime() if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-gettime "POSIX clock_gettime()" $L_FLAGS $I_FLAGS $l_FLAGS; then + if compileTest unix/clock-gettime "POSIX clock_gettime()"; then CFG_CLOCK_GETTIME=yes else CFG_CLOCK_GETTIME=no @@ -6843,7 +6852,7 @@ fi # detect POSIX monotonic clocks if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/clock-monotonic "POSIX Monotonic Clock" $L_FLAGS $I_FLAGS $l_FLAGS; then + if compileTest unix/clock-monotonic "POSIX Monotonic Clock"; then CFG_CLOCK_MONOTONIC=yes else CFG_CLOCK_MONOTONIC=no @@ -6854,7 +6863,7 @@ fi # detect mremap if [ "$CFG_MREMAP" = "auto" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mremap "mremap" $L_FLAGS $I_FLAGS $l_FLAGS; then + if compileTest unix/mremap "mremap"; then CFG_MREMAP=yes else CFG_MREMAP=no @@ -6863,7 +6872,7 @@ fi # find if the platform provides getaddrinfo (ipv6 dns lookups) if [ "$CFG_GETADDRINFO" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getaddrinfo "getaddrinfo" $L_FLAGS $I_FLAGS $l_FLAGS; then + if compileTest unix/getaddrinfo "getaddrinfo"; then CFG_GETADDRINFO=yes else if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then @@ -6880,7 +6889,7 @@ fi # find if the platform provides inotify if [ "$CFG_INOTIFY" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/inotify "inotify" $L_FLAGS $I_FLAGS $l_FLAGS; then + if compileTest unix/inotify "inotify"; then CFG_INOTIFY=yes else if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then @@ -6897,7 +6906,7 @@ fi # find if the platform provides if_nametoindex (ipv6 interface name support) if [ "$CFG_IPV6IFNAME" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/ipv6ifname "IPv6 interface name" $L_FLAGS $I_FLAGS $l_FLAGS; then + if compileTest unix/ipv6ifname "IPv6 interface name"; then CFG_IPV6IFNAME=yes else if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then @@ -6914,7 +6923,7 @@ fi # find if the platform provides getifaddrs (network interface enumeration) if [ "$CFG_GETIFADDRS" != "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/getifaddrs "getifaddrs" $L_FLAGS $I_FLAGS $l_FLAGS; then + if compileTest unix/getifaddrs "getifaddrs"; then CFG_GETIFADDRS=yes else if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then @@ -6931,7 +6940,7 @@ fi # detect OpenSSL if [ "$CFG_OPENSSL" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/openssl "OpenSSL" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then + if compileTest unix/openssl "OpenSSL"; then if [ "$CFG_OPENSSL" = "auto" ]; then CFG_OPENSSL=yes fi @@ -6955,21 +6964,21 @@ fi # detect OpenVG support if [ "$CFG_OPENVG" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then + if compileTest "unix/openvg" "OpenVG"; then if [ "$CFG_OPENVG" = "auto" ]; then CFG_OPENVG=yes fi - elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then + elif compileTest unix/openvg "OpenVG" -config openvg_on_opengl; then if [ "$CFG_OPENVG" = "auto" ]; then CFG_OPENVG=yes fi CFG_OPENVG_ON_OPENGL=yes - elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG lower_case_includes" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG (lc includes)" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then + elif compileTest unix/openvg "OpenVG (lc includes)" -config lower_case_includes; then if [ "$CFG_OPENVG" = "auto" ]; then CFG_OPENVG=yes fi CFG_OPENVG_LC_INCLUDES=yes - elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl lower_case_includes" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG (lc includes)" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then + elif compileTest unix/openvg "OpenVG (lc includes)" -config "openvg_on_opengl lower_case_includes"; then if [ "$CFG_OPENVG" = "auto" ]; then CFG_OPENVG=yes fi @@ -6986,7 +6995,7 @@ if [ "$CFG_OPENVG" != "no" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then CFG_OPENVG=no fi fi - if [ "$CFG_OPENVG" = "yes" ] && "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/shivavg" "ShivaVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then + if [ "$CFG_OPENVG" = "yes" ] && compileTest "unix/shivavg" "ShivaVG" $CONFIG_ARG; then CFG_OPENVG_SHIVA=yes fi fi @@ -7012,7 +7021,7 @@ if [ "$CFG_PTMALLOC" != "no" ]; then fi if [ "$CFG_ALSA" = "auto" ] && [ "$XPLATFORM_SYMBIAN_SBSV2" = "no" ]; then - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/alsa "alsa" $L_FLAGS $I_FLAGS $l_FLAGS; then + if compileTest unix/alsa "alsa"; then CFG_ALSA=yes else CFG_ALSA=no @@ -7024,7 +7033,7 @@ fi if [ "$CFG_JAVASCRIPTCORE_JIT" = "yes" ] || [ "$CFG_JAVASCRIPTCORE_JIT" = "auto" ]; then if [ "$CFG_ARCH" = "arm" ]; then - "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/javascriptcore-jit "javascriptcore-jit" $L_FLAGS $I_FLAGS $l_FLAGS + compileTest unix/javascriptcore-jit "javascriptcore-jit" if [ $? != "0" ]; then CFG_JAVASCRIPTCORE_JIT=no fi @@ -7647,7 +7656,7 @@ canBuildQtScript="$HAVE_STL" canBuildQtConcurrent="yes" # WebKit and QtScript require stdint.h -"$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/stdint "Stdint" $L_FLAGS $I_FLAGS $l_FLAGS +compileTest unix/stdint "Stdint" if [ $? != "0" ]; then canBuildWebKit="no" canBuildQtScript="no" |