Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tools/configure/configureapp.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the tools applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    117117
    118118    // Get the path to the executable
    119     QFileInfo sourcePathInfo;
    120     QT_WA({
    121         unsigned short module_name[256];
    122         GetModuleFileNameW(0, reinterpret_cast<wchar_t *>(module_name), sizeof(module_name));
    123         sourcePathInfo = QString::fromUtf16(module_name);
    124     }, {
    125         char module_name[256];
    126         GetModuleFileNameA(0, module_name, sizeof(module_name));
    127         sourcePathInfo = QString::fromLocal8Bit(module_name);
    128     });
     119    wchar_t module_name[MAX_PATH];
     120    GetModuleFileName(0, module_name, sizeof(module_name) / sizeof(wchar_t));
     121    QFileInfo sourcePathInfo = QString::fromWCharArray(module_name);
    129122    sourcePath = sourcePathInfo.absolutePath();
    130123    sourceDir = sourcePathInfo.dir();
     
    249242    dictionary[ "CETEST" ]          = "auto";
    250243    dictionary[ "CE_SIGNATURE" ]    = "no";
    251     dictionary[ "SCRIPTTOOLS" ]     = "yes";
     244    dictionary[ "SCRIPT" ]          = "auto";
     245    dictionary[ "SCRIPTTOOLS" ]     = "auto";
    252246    dictionary[ "XMLPATTERNS" ]     = "auto";
    253247    dictionary[ "PHONON" ]          = "auto";
    254248    dictionary[ "PHONON_BACKEND" ]  = "yes";
     249    dictionary[ "MULTIMEDIA" ]      = "yes";
     250    dictionary[ "AUDIO_BACKEND" ]   = "yes";
    255251    dictionary[ "DIRECTSHOW" ]      = "no";
    256252    dictionary[ "WEBKIT" ]          = "auto";
     253    dictionary[ "DECLARATIVE" ]     = "auto";
    257254    dictionary[ "PLUGIN_MANIFESTS" ] = "yes";
    258255
     
    311308    dictionary[ "LIBPNG" ]          = "auto";
    312309    dictionary[ "LIBMNG" ]          = "auto";
     310    dictionary[ "FREETYPE" ]        = "no";
    313311
    314312    dictionary[ "QT3SUPPORT" ]      = "yes";
    315313    dictionary[ "ACCESSIBILITY" ]   = "yes";
    316314    dictionary[ "OPENGL" ]          = "yes";
    317     dictionary[ "DIRECT3D" ]        = "auto";
     315    dictionary[ "OPENVG" ]          = "no";
    318316    dictionary[ "IPV6" ]            = "yes"; // Always, dynamicly loaded
    319317    dictionary[ "OPENSSL" ]         = "auto";
    320318    dictionary[ "DBUS" ]            = "auto";
     319    dictionary[ "S60" ]             = "yes";
    321320
    322321    dictionary[ "STYLE_WINDOWS" ]   = "yes";
     
    329328    dictionary[ "STYLE_MOTIF" ]     = "yes";
    330329    dictionary[ "STYLE_CDE" ]       = "yes";
     330    dictionary[ "STYLE_S60" ]       = "no";
    331331    dictionary[ "STYLE_GTK" ]       = "no";
    332332
     
    352352
    353353    dictionary[ "INCREDIBUILD_XGE" ] = "auto";
     354    dictionary[ "LTCG" ]            = "no";
     355    dictionary[ "NATIVE_GESTURES" ] = "yes";
    354356}
    355357
     
    436438
    437439    for( ; i<configCmdLine.size(); ++i ) {
    438         bool continueElse = false;
     440        bool continueElse[] = {false, false};
    439441        if( configCmdLine.at(i) == "-help"
    440442            || configCmdLine.at(i) == "-h"
     
    475477            dictionary[ "BUILDDEV" ] = "yes";
    476478        else if( configCmdLine.at(i) == "-nokia-developer" ) {
     479            cout << "Detected -nokia-developer option" << endl;
     480            cout << "Nokia employees and agents are allowed to use this software under" << endl;
     481            cout << "the authority of Nokia Corporation and/or its subsidiary(-ies)" << endl;
    477482            dictionary[ "BUILDNOKIA" ] = "yes";
    478483            dictionary[ "BUILDDEV" ] = "yes";
     
    484489        else if( configCmdLine.at(i) == "-commercial" ) {
    485490            dictionary[ "BUILDTYPE" ] = "commercial";
     491        }
     492        else if( configCmdLine.at(i) == "-ltcg" ) {
     493            dictionary[ "LTCG" ] = "yes";
     494        }
     495        else if( configCmdLine.at(i) == "-no-ltcg" ) {
     496            dictionary[ "LTCG" ] = "no";
    486497        }
    487498#endif
     
    578589            dictionary[ "LIBMNG" ] = "system";
    579590        }
     591
     592        // Text Rendering --------------------------------------------
     593        else if( configCmdLine.at(i) == "-no-freetype" )
     594            dictionary[ "FREETYPE" ] = "no";
     595        else if( configCmdLine.at(i) == "-qt-freetype" )
     596            dictionary[ "FREETYPE" ] = "yes";
     597
    580598        // CE- C runtime --------------------------------------------
    581599        else if( configCmdLine.at(i) == "-crt" ) {
     
    596614        else if (configCmdLine.at(i) == "-no-cetest") {
    597615            dictionary[ "CETEST" ] = "no";
     616            dictionary[ "CETEST_REQUESTED" ] = "no";
    598617        } else if (configCmdLine.at(i) == "-cetest") {
    599618            // although specified to use it, we stay at "auto" state
    600619            // this is because checkAvailability() adds variables
    601             // we need for crosscompilation
     620            // we need for crosscompilation; but remember if we asked
     621            // for it.
     622            dictionary[ "CETEST_REQUESTED" ] = "yes";
    602623        }
    603624        // Qt/CE - signing tool -------------------------------------
     
    657678            dictionary[ "STYLE_CDE" ] = "no";
    658679
     680        else if( configCmdLine.at(i) == "-qt-style-s60" )
     681            dictionary[ "STYLE_S60" ] = "yes";
     682        else if( configCmdLine.at(i) == "-no-style-s60" )
     683            dictionary[ "STYLE_S60" ] = "no";
     684
    659685        // Qt 3 Support ---------------------------------------------
    660686        else if( configCmdLine.at(i) == "-no-qt3support" )
     
    663689        // Work around compiler nesting limitation
    664690        else
    665             continueElse = true;
    666         if (!continueElse) {
     691            continueElse[1] = true;
     692        if (!continueElse[1]) {
    667693        }
    668694
     
    676702            dictionary[ "OPENGL" ]          = "yes";
    677703            dictionary[ "OPENGL_ES_CL" ]    = "yes";
    678         }
     704        } else if ( configCmdLine.at(i) == "-opengl-es-2" ) {
     705            dictionary[ "OPENGL" ]          = "yes";
     706            dictionary[ "OPENGL_ES_2" ]     = "yes";
     707        }
     708
     709        // OpenVG Support -------------------------------------------
     710        else if( configCmdLine.at(i) == "-openvg" ) {
     711            dictionary[ "OPENVG" ]    = "yes";
     712        } else if( configCmdLine.at(i) == "-no-openvg" ) {
     713            dictionary[ "OPENVG" ]    = "no";
     714        }
     715
    679716        // Databases ------------------------------------------------
    680717        else if( configCmdLine.at(i) == "-qt-sql-mysql" )
     
    762799        else if( configCmdLine.at(i) == "-incredibuild-xge" )
    763800            dictionary[ "INCREDIBUILD_XGE" ] = "yes";
     801        else if( configCmdLine.at(i) == "-native-gestures" )
     802            dictionary[ "NATIVE_GESTURES" ] = "yes";
     803        else if( configCmdLine.at(i) == "-no-native-gestures" )
     804            dictionary[ "NATIVE_GESTURES" ] = "no";
    764805#if !defined(EVAL)
    765806        // Others ---------------------------------------------------
     807        else if (configCmdLine.at(i) == "-fpu" )
     808        {
     809            ++i;
     810            if(i==argCount)
     811                break;
     812            dictionary[ "ARM_FPU_TYPE" ] = configCmdLine.at(i);
     813        }
     814
     815        // S60 Support -------------------------------------------
     816        else if( configCmdLine.at(i) == "-s60" )
     817            dictionary[ "S60" ]    = "yes";
     818        else if( configCmdLine.at(i) == "-no-s60" )
     819            dictionary[ "S60" ]    = "no";
     820
    766821        else if (configCmdLine.at(i) == "-fast" )
    767822            dictionary[ "FAST" ] = "yes";
     
    812867            dictionary[ "IWMMXT" ] = "yes";
    813868
    814         else if (configCmdLine.at(i) == "-no-direct3d") {
    815             dictionary["DIRECT3D"] = "no";
    816         }else if (configCmdLine.at(i) == "-direct3d") {
    817             dictionary["DIRECT3D"] = "auto"; // have to pass auto detection to enable Direct3D
    818         } else if( configCmdLine.at(i) == "-no-openssl" ) {
     869        else if( configCmdLine.at(i) == "-no-openssl" ) {
    819870              dictionary[ "OPENSSL"] = "no";
    820871        } else if( configCmdLine.at(i) == "-openssl" ) {
     
    832883        } else if( configCmdLine.at(i) == "-dbus-linked" ) {
    833884            dictionary[ "DBUS" ] = "linked";
     885        } else if( configCmdLine.at(i) == "-no-script" ) {
     886            dictionary[ "SCRIPT" ] = "no";
     887        } else if( configCmdLine.at(i) == "-script" ) {
     888            dictionary[ "SCRIPT" ] = "yes";
    834889        } else if( configCmdLine.at(i) == "-no-scripttools" ) {
    835890            dictionary[ "SCRIPTTOOLS" ] = "no";
     
    840895        } else if( configCmdLine.at(i) == "-xmlpatterns" ) {
    841896            dictionary[ "XMLPATTERNS" ] = "yes";
     897        } else if( configCmdLine.at(i) == "-no-multimedia" ) {
     898            dictionary[ "MULTIMEDIA" ] = "no";
     899        } else if( configCmdLine.at(i) == "-multimedia" ) {
     900            dictionary[ "MULTIMEDIA" ] = "yes";
     901        } else if( configCmdLine.at(i) == "-audio-backend" ) {
     902            dictionary[ "AUDIO_BACKEND" ] = "yes";
     903        } else if( configCmdLine.at(i) == "-no-audio-backend" ) {
     904            dictionary[ "AUDIO_BACKEND" ] = "no";
    842905        } else if( configCmdLine.at(i) == "-no-phonon" ) {
    843906            dictionary[ "PHONON" ] = "no";
     
    854917        } else if( configCmdLine.at(i) == "-webkit" ) {
    855918            dictionary[ "WEBKIT" ] = "yes";
     919        } else if( configCmdLine.at(i) == "-no-declarative" ) {
     920            dictionary[ "DECLARATIVE" ] = "no";
     921        } else if( configCmdLine.at(i) == "-declarative" ) {
     922            dictionary[ "DECLARATIVE" ] = "yes";
    856923        } else if( configCmdLine.at(i) == "-no-plugin-manifests" ) {
    857924            dictionary[ "PLUGIN_MANIFESTS" ] = "no";
    858925        } else if( configCmdLine.at(i) == "-plugin-manifests" ) {
    859926            dictionary[ "PLUGIN_MANIFESTS" ] = "yes";
     927        }
     928
     929        // Work around compiler nesting limitation
     930        else
     931            continueElse[0] = true;
     932        if (!continueElse[0]) {
    860933        }
    861934
     
    884957                break;
    885958            qmakeDefines += "QT_NAMESPACE="+configCmdLine.at(i);
     959        } else if( configCmdLine.at(i) == "-qtlibinfix" ) {
     960            ++i;
     961            if(i==argCount)
     962                break;
     963            dictionary[ "QT_LIBINFIX" ] = configCmdLine.at(i);
    886964        } else if( configCmdLine.at(i) == "-D" ) {
    887965            ++i;
     
    10291107                break;
    10301108            QString system = configCmdLine.at(i);
    1031             if (system == QLatin1String("raster") || system == QLatin1String("opengl"))
     1109            if (system == QLatin1String("raster")
     1110                || system == QLatin1String("opengl")
     1111                || system == QLatin1String("openvg"))
    10321112                dictionary["GRAPHICS_SYSTEM"] = configCmdLine.at(i);
    10331113        }
     
    10961176    }
    10971177
     1178    // Tell the user how to proceed building Qt after configure finished its job
     1179    dictionary["QTBUILDINSTRUCTION"] = dictionary["MAKE"];
     1180    if (dictionary.contains("XQMAKESPEC")) {
     1181        if (dictionary["XQMAKESPEC"].startsWith("symbian")) {
     1182            dictionary["QTBUILDINSTRUCTION"] = QString("make debug-winscw|debug-armv5|release-armv5");
     1183        } else if (dictionary["XQMAKESPEC"].startsWith("wince")) {
     1184            dictionary["QTBUILDINSTRUCTION"] =
     1185                QString("setcepaths.bat ") + dictionary["XQMAKESPEC"] + QString(" && ") + dictionary["MAKE"];
     1186        }
     1187    }
     1188
     1189    // Tell the user how to confclean before the next configure
     1190    dictionary["CONFCLEANINSTRUCTION"] = dictionary["MAKE"] + QString(" confclean");
     1191
    10981192    // Ensure that -spec (XQMAKESPEC) exists in the mkspecs folder as well
    10991193    if (dictionary.contains("XQMAKESPEC") &&
     
    11271221    useUnixSeparators = (dictionary["QMAKESPEC"] == "win32-g++");
    11281222
     1223    // Allow tests for private classes to be compiled against internal builds
     1224    if (dictionary["BUILDDEV"] == "yes")
     1225        qtConfig += "private_tests";
     1226
    11291227
    11301228#if !defined(EVAL)
     
    11491247void Configure::validateArgs()
    11501248{
    1151     QStringList configs;
    11521249    // Validate the specified config
    11531250
     1251    // Get all possible configurations from the file system.
    11541252    QDir dir;
    11551253    QStringList filters;
     
    11651263    allConfigs << "full";
    11661264
     1265    // Try internal configurations first.
     1266    QStringList possible_configs = QStringList()
     1267        << "minimal"
     1268        << "small"
     1269        << "medium"
     1270        << "large"
     1271        << "full";
     1272    int index = possible_configs.indexOf(dictionary["QCONFIG"]);
     1273    if (index >= 0) {
     1274        for (int c = 0; c <= index; c++) {
     1275            qmakeConfig += possible_configs[c] + "-config";
     1276        }
     1277        return;
     1278    }
     1279
     1280    // If the internal configurations failed, try others.
    11671281    QStringList::Iterator config;
    11681282    for( config = allConfigs.begin(); config != allConfigs.end(); ++config ) {
    1169         configs += (*config) + "-config";
    11701283        if( (*config) == dictionary[ "QCONFIG" ] )
    11711284            break;
     
    11761289    }
    11771290    else
    1178         qmakeConfig += configs;
     1291        qmakeConfig += (*config) + "-config";
    11791292}
    11801293#endif
     
    12971410        dictionary[ "STYLE_MOTIF" ]         = "no";
    12981411        dictionary[ "STYLE_CDE" ]           = "no";
     1412        dictionary[ "STYLE_S60" ]           = "no";
     1413        dictionary[ "FREETYPE" ]            = "no";
    12991414        dictionary[ "QT3SUPPORT" ]          = "no";
    13001415        dictionary[ "OPENGL" ]              = "no";
     
    13101425        dictionary[ "IWMMXT" ]              = "no";
    13111426        dictionary[ "CE_CRT" ]              = "yes";
    1312         dictionary[ "DIRECT3D" ]            = "no";
    13131427        dictionary[ "WEBKIT" ]              = "no";
    13141428        dictionary[ "PHONON" ]              = "yes";
     
    13221436        dictionary[ "QT_HOST_PREFIX" ]      = dictionary[ "QT_INSTALL_PREFIX" ];
    13231437        dictionary[ "QT_INSTALL_PREFIX" ]   = "";
     1438
     1439    } else if(dictionary[ "XQMAKESPEC" ].startsWith("symbian")) {
     1440        dictionary[ "ACCESSIBILITY" ]       = "no";
     1441        dictionary[ "STYLE_WINDOWSXP" ]     = "no";
     1442        dictionary[ "STYLE_WINDOWSVISTA" ]  = "no";
     1443        dictionary[ "STYLE_PLASTIQUE" ]     = "no";
     1444        dictionary[ "STYLE_CLEANLOOKS" ]    = "no";
     1445        dictionary[ "STYLE_WINDOWSCE" ]     = "no";
     1446        dictionary[ "STYLE_WINDOWSMOBILE" ] = "no";
     1447        dictionary[ "STYLE_MOTIF" ]         = "no";
     1448        dictionary[ "STYLE_CDE" ]           = "no";
     1449        dictionary[ "STYLE_S60" ]           = "yes";
     1450        dictionary[ "FREETYPE" ]            = "no";
     1451        dictionary[ "QT3SUPPORT" ]          = "no";
     1452        dictionary[ "OPENGL" ]              = "no";
     1453        dictionary[ "OPENSSL" ]             = "yes";
     1454        dictionary[ "STL" ]                 = "yes";
     1455        dictionary[ "EXCEPTIONS" ]          = "yes";
     1456        dictionary[ "RTTI" ]                = "yes";
     1457        dictionary[ "ARCHITECTURE" ]        = "symbian";
     1458        dictionary[ "3DNOW" ]               = "no";
     1459        dictionary[ "SSE" ]                 = "no";
     1460        dictionary[ "SSE2" ]                = "no";
     1461        dictionary[ "MMX" ]                 = "no";
     1462        dictionary[ "IWMMXT" ]              = "no";
     1463        dictionary[ "CE_CRT" ]              = "no";
     1464        dictionary[ "DIRECT3D" ]            = "no";
     1465        dictionary[ "WEBKIT" ]              = "yes";
     1466        dictionary[ "ASSISTANT_WEBKIT" ]    = "no";
     1467        dictionary[ "PHONON" ]              = "yes";
     1468        dictionary[ "XMLPATTERNS" ]         = "yes";
     1469        dictionary[ "QT_GLIB" ]             = "no";
     1470        dictionary[ "S60" ]                 = "yes";
     1471        // iconv makes makes apps start and run ridiculously slowly in symbian emulator (HW not tested)
     1472        // iconv_open seems to return -1 always, so something is probably missing from the platform.
     1473        dictionary[ "QT_ICONV" ]            = "no";
     1474        dictionary[ "SCRIPTTOOLS" ]         = "no";
     1475        dictionary[ "QT_HOST_PREFIX" ]      = dictionary[ "QT_INSTALL_PREFIX" ];
     1476        dictionary[ "QT_INSTALL_PREFIX" ]   = "";
     1477        dictionary[ "QT_INSTALL_PLUGINS" ]  = "\\resource\\qt\\plugins";
     1478        dictionary[ "ARM_FPU_TYPE" ]        = "softvfp";
     1479        dictionary[ "SQL_SQLITE" ]          = "yes";
     1480        dictionary[ "SQL_SQLITE_LIB" ]      = "system";
     1481
     1482        // Disable building docs and translations for now
     1483        disabledBuildParts << "docs" << "translations";
    13241484
    13251485    } else if(dictionary[ "XQMAKESPEC" ].startsWith("linux")) { //TODO actually wrong.
     
    14091569                    "[-no-libmng] [-qt-libmng] [-system-libmng] [-no-qt3support] [-mmx]\n"
    14101570                    "[-no-mmx] [-3dnow] [-no-3dnow] [-sse] [-no-sse] [-sse2] [-no-sse2]\n"
    1411                     "[-no-iwmmxt] [-iwmmxt] [-direct3d] [-openssl] [-openssl-linked]\n"
     1571                    "[-no-iwmmxt] [-iwmmxt] [-openssl] [-openssl-linked]\n"
    14121572                    "[-no-openssl] [-no-dbus] [-dbus] [-dbus-linked] [-platform <spec>]\n"
    1413                     "[-qtnamespace <namespace>] [-no-phonon] [-phonon]\n"
    1414                     "[-no-phonon-backend] [-phonon-backend]\n"
    1415                     "[-no-webkit] [-webkit]\n"
    1416                     "[-no-scripttools] [-scripttools]\n"
    1417                     "[-graphicssystem raster|opengl]\n\n", 0, 7);
     1573                    "[-qtnamespace <namespace>] [-qtlibinfix <infix>] [-no-phonon]\n"
     1574                    "[-phonon] [-no-phonon-backend] [-phonon-backend]\n"
     1575                    "[-no-multimedia] [-multimedia] [-no-audio-backend] [-audio-backend]\n"
     1576                    "[-no-script] [-script] [-no-scripttools] [-scripttools]\n"
     1577                    "[-no-webkit] [-webkit] [-graphicssystem raster|opengl|openvg]\n\n", 0, 7);
    14181578
    14191579        desc("Installation options:\n\n");
     
    14591619        desc("SHARED", "yes",   "-shared",              "Create and use shared Qt libraries.");
    14601620        desc("SHARED", "no",    "-static",              "Create and use static Qt libraries.\n");
     1621
     1622        desc("LTCG", "yes",   "-ltcg",                  "Use Link Time Code Generation. (Release builds only)");
     1623        desc("LTCG", "no",    "-no-ltcg",               "Do not use Link Time Code Generation.\n");
    14611624
    14621625        desc("FAST", "no",      "-no-fast",             "Configure Qt normally by generating Makefiles for all project files.");
     
    14941657        desc("OPENGL", "no","-no-opengl",               "Disables OpenGL functionality\n");
    14951658
     1659        desc("OPENVG", "no","-no-openvg",               "Disables OpenVG functionality\n");
     1660        desc("OPENVG", "yes","-openvg",                 "Enables OpenVG functionality");
     1661        desc(                   "",                     "Requires EGL support, typically supplied by an OpenGL", false, ' ');
     1662        desc(                   "",                     "or other graphics implementation\n", false, ' ');
     1663
    14961664#endif
    14971665        desc(                   "-platform <spec>",     "The operating system and compiler you are building on.\n(default %QMAKESPEC%)\n");
     
    15001668
    15011669#if !defined(EVAL)
    1502         desc(                   "-qtnamespace <namespace>", "Wraps all Qt library code in 'namespace name {...}\n");
     1670        desc(                   "-qtnamespace <namespace>", "Wraps all Qt library code in 'namespace name {...}");
     1671        desc(                   "-qtlibinfix <infix>",  "Renames all Qt* libs to Qt*<infix>\n");
    15031672        desc(                   "-D <define>",          "Add an explicit define to the preprocessor.");
    15041673        desc(                   "-I <includepath>",     "Add an explicit include path.");
     
    15091678                                "Available values for <sys>:");
    15101679        desc("GRAPHICS_SYSTEM", "raster", "", "  raster - Software rasterizer", ' ');
    1511         desc("GRAPHICS_SYSTEM", "opengl", "", "  opengl - Using OpenGL accelleration, experimental!", ' ');
     1680        desc("GRAPHICS_SYSTEM", "opengl", "", "  opengl - Using OpenGL acceleration, experimental!", ' ');
     1681        desc("GRAPHICS_SYSTEM", "openvg", "", "  openvg - Using OpenVG acceleration, experimental!", ' ');
    15121682
    15131683
     
    15731743        desc("SSE2", "no",      "-no-sse2",             "Do not compile with use of SSE2 instructions");
    15741744        desc("SSE2", "yes",      "-sse2",               "Compile with use of SSE2 instructions");
    1575         desc("DIRECT3D", "yes",  "-direct3d",           "Compile in Direct3D support (experimental - see INSTALL for more info)");
    15761745        desc("OPENSSL", "no",    "-no-openssl",         "Do not compile in OpenSSL support");
    15771746        desc("OPENSSL", "yes",   "-openssl",            "Compile in run-time OpenSSL support");
     
    15841753        desc("PHONON_BACKEND","no", "-no-phonon-backend","Do not compile the platform-specific Phonon backend-plugin");
    15851754        desc("PHONON_BACKEND","yes","-phonon-backend",  "Compile in the platform-specific Phonon backend-plugin");
     1755        desc("MULTIMEDIA", "no", "-no-multimedia",      "Do not compile the multimedia module");
     1756        desc("MULTIMEDIA", "yes","-multimedia",         "Compile in multimedia module");
     1757        desc("AUDIO_BACKEND", "no","-no-audio-backend", "Do not compile in the platform audio backend into QtMultimedia");
     1758        desc("AUDIO_BACKEND", "yes","-audio-backend",   "Compile in the platform audio backend into QtMultimedia");
    15861759        desc("WEBKIT", "no",    "-no-webkit",           "Do not compile in the WebKit module");
    15871760        desc("WEBKIT", "yes",   "-webkit",              "Compile in the WebKit module (WebKit is built if a decent C++ compiler is used.)");
     1761        desc("SCRIPT", "no",    "-no-script",           "Do not build the QtScript module.");
     1762        desc("SCRIPT", "yes",   "-script",              "Build the QtScript module.");
    15881763        desc("SCRIPTTOOLS", "no", "-no-scripttools",    "Do not build the QtScriptTools module.");
    15891764        desc("SCRIPTTOOLS", "yes", "-scripttools",      "Build the QtScriptTools module.");
     1765        desc("DECLARATIVE", "no",    "-no-declarative", "Do not build the declarative module");
     1766        desc("DECLARATIVE", "yes",   "-declarative",    "Build the declarative module");
    15901767
    15911768        desc(                   "-arch <arch>",         "Specify an architecture.\n"
     
    15931770        desc("ARCHITECTURE","windows",       "",        "  windows", ' ');
    15941771        desc("ARCHITECTURE","windowsce",     "",        "  windowsce", ' ');
     1772        desc("ARCHITECTURE","symbian",     "",          "  symbian", ' ');
    15951773        desc("ARCHITECTURE","boundschecker",     "",    "  boundschecker", ' ');
    15961774        desc("ARCHITECTURE","generic", "",              "  generic\n", ' ');
     
    16071785        desc("STYLE_CDE", "yes", "",                    "  cde", ' ');
    16081786        desc("STYLE_WINDOWSCE", "yes", "",              "  windowsce", ' ');
    1609         desc("STYLE_WINDOWSMOBILE" , "yes", "",         "  windowsmobile\n", ' ');
     1787        desc("STYLE_WINDOWSMOBILE" , "yes", "",         "  windowsmobile", ' ');
     1788        desc("STYLE_S60" , "yes", "",                   "  s60\n", ' ');
     1789        desc("NATIVE_GESTURES", "no", "-no-native-gestures", "Do not use native gestures on Windows 7.");
     1790        desc("NATIVE_GESTURES", "yes", "-native-gestures", "Use native gestures on Windows 7.");
    16101791
    16111792/*      We do not support -qconfig on Windows yet
     
    16331814        desc("OPENGL_ES_CM", "no", "-opengl-es-cm",        "Enable support for OpenGL ES Common");
    16341815        desc("OPENGL_ES_CL", "no", "-opengl-es-cl",        "Enable support for OpenGL ES Common Lite");
     1816        desc("OPENGL_ES_2",  "no", "-opengl-es-2",         "Enable support for OpenGL ES 2.0");
    16351817        desc("DIRECTSHOW", "no",   "-phonon-wince-ds9",    "Enable Phonon Direct Show 9 backend for Windows CE");
    16361818
     1819        // Qt\Symbian only options go below here -----------------------------------------------------------------------------
     1820        desc("Qt for Symbian OS only:\n\n");
     1821        desc("FREETYPE", "no",     "-no-freetype",         "Do not compile in Freetype2 support.");
     1822        desc("FREETYPE", "yes",    "-qt-freetype",         "Use the libfreetype bundled with Qt.");
     1823        desc(                      "-fpu <flags>",         "VFP type on ARM, supported options: softvfp(default) | vfpv2 | softvfp+vfpv2");
     1824        desc("S60", "no",          "-no-s60",              "Do not compile in S60 support.");
     1825        desc("S60", "yes",         "-s60",                 "Compile with support for the S60 UI Framework\n");
    16371826        return true;
    16381827    }
     
    16401829}
    16411830
    1642 bool Configure::findFileInPaths(const QString &fileName, const QStringList &paths)
    1643 {
    1644     QDir d;
    1645     for( QStringList::ConstIterator it = paths.begin(); it != paths.end(); ++it ) {
    1646         // Remove any leading or trailing ", this is commonly used in the environment
    1647         // variables
    1648         QString path = (*it);
    1649         if ( path.startsWith( "\"" ) )
    1650             path = path.right( path.length() - 1 );
    1651         if ( path.endsWith( "\"" ) )
    1652             path = path.left( path.length() - 1 );
    1653         if( d.exists( path + QDir::separator() + fileName ) )
    1654             return true;
    1655     }
    1656     return false;
    1657 }
    1658 
    1659 bool Configure::findFile( const QString &fileName )
    1660 {
    1661     QString file = fileName.toLower();
    1662     QStringList paths;
     1831QString Configure::findFileInPaths(const QString &fileName, const QString &paths)
     1832{
    16631833#if defined(Q_OS_WIN32)
    16641834    QRegExp splitReg("[;,]");
     
    16661836    QRegExp splitReg("[:]");
    16671837#endif
    1668     if (file.endsWith(".h"))
    1669         paths = QString::fromLocal8Bit(getenv("INCLUDE")).split(splitReg, QString::SkipEmptyParts);
    1670     else if ( file.endsWith( ".lib" ) )
    1671         paths = QString::fromLocal8Bit(getenv("LIB")).split(splitReg, QString::SkipEmptyParts);
    1672     else
    1673         paths = QString::fromLocal8Bit(getenv("PATH")).split(splitReg, QString::SkipEmptyParts);
    1674     return findFileInPaths(file, paths);
     1838    QStringList pathList = paths.split(splitReg, QString::SkipEmptyParts);
     1839    QDir d;
     1840    for( QStringList::ConstIterator it = pathList.begin(); it != pathList.end(); ++it ) {
     1841        // Remove any leading or trailing ", this is commonly used in the environment
     1842        // variables
     1843        QString path = (*it);
     1844        if ( path.startsWith( '\"' ) )
     1845            path = path.right( path.length() - 1 );
     1846        if ( path.endsWith( '\"' ) )
     1847            path = path.left( path.length() - 1 );
     1848        if( d.exists( path + QDir::separator() + fileName ) )
     1849            return path;
     1850    }
     1851    return QString();
     1852}
     1853
     1854bool Configure::findFile( const QString &fileName )
     1855{
     1856    const QString file = fileName.toLower();
     1857    const QString pathEnvVar = QString::fromLocal8Bit(getenv("PATH"));
     1858    const QString mingwPath = dictionary["QMAKESPEC"].endsWith("-g++") ?
     1859        findFileInPaths("mingw32-g++.exe", pathEnvVar) : QString();
     1860
     1861    QString paths;
     1862    if (file.endsWith(".h")) {
     1863        if (!mingwPath.isNull() && !findFileInPaths(file, mingwPath + QLatin1String("/../include")).isNull())
     1864                    return true;
     1865        paths = QString::fromLocal8Bit(getenv("INCLUDE"));
     1866    } else if ( file.endsWith( ".lib" ) ||  file.endsWith( ".a" ) ) {
     1867        if (!mingwPath.isNull() && !findFileInPaths(file, mingwPath + QLatin1String("/../lib")).isNull())
     1868                    return true;
     1869        paths = QString::fromLocal8Bit(getenv("LIB"));
     1870    } else {
     1871        paths = pathEnvVar;
     1872    }
     1873    return !findFileInPaths(file, paths).isNull();
    16751874}
    16761875
     
    17421941    bool available = false;
    17431942    if (part == "STYLE_WINDOWSXP")
    1744         available = (dictionary.value("QMAKESPEC") == "win32-g++" || findFile("uxtheme.h"));
     1943        available = (findFile("uxtheme.h"));
    17451944
    17461945    else if (part == "ZLIB")
     
    17681967        available = findFile("sqlcli.h") && findFile("sqlcli1.h") && findFile("db2cli.lib");
    17691968    else if (part == "SQL_SQLITE")
     1969        if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian"))
     1970            available = false; // In Symbian we only support system sqlite option
     1971        else
    17701972            available = true; // Built in, we have a fork
    17711973    else if (part == "SQL_SQLITE_LIB") {
    17721974        if (dictionary[ "SQL_SQLITE_LIB" ] == "system") {
    1773             available = findFile("sqlite3.h") && findFile("sqlite3.lib");
    1774             if (available)
    1775                 dictionary[ "QT_LFLAGS_SQLITE" ] += "sqlite3.lib";
     1975                    // Symbian has multiple .lib/.dll files we need to find
     1976            if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) {
     1977                            available = true; // There is sqlite_symbian plugin which exports the necessary stuff
     1978                            dictionary[ "QT_LFLAGS_SQLITE" ] += "-lsqlite3";
     1979                    } else {
     1980                            available = findFile("sqlite3.h") && findFile("sqlite3.lib");
     1981                            if (available)
     1982                                    dictionary[ "QT_LFLAGS_SQLITE" ] += "sqlite3.lib";
     1983                    }
    17761984        } else
    17771985            available = true;
     
    17851993        available = (dictionary[ "ARCHITECTURE" ]  == "windowsce");
    17861994    else if (part == "OPENGL_ES_CL")
     1995        available = (dictionary[ "ARCHITECTURE" ]  == "windowsce");
     1996    else if (part == "OPENGL_ES_2")
    17871997        available = (dictionary[ "ARCHITECTURE" ]  == "windowsce");
    17881998    else if (part == "DIRECTSHOW")
     
    18062016            dictionary[ "QT_CE_RAPI_LIB" ] += QLatin1String("\"") + rapiLib + QLatin1String("\"");
    18072017        }
     2018        else if (dictionary[ "CETEST_REQUESTED" ] == "yes") {
     2019            cout << "cetest could not be enabled: rapi.h and rapi.lib could not be found." << endl;
     2020            cout << "Make sure the environment is set up for compiling with ActiveSync." << endl;
     2021            dictionary[ "DONE" ] = "error";
     2022        }
    18082023    }
    18092024    else if (part == "INCREDIBUILD_XGE")
     
    18162031               && dictionary.value("QMAKESPEC") != "win32-msvc2002"
    18172032               && dictionary.value("EXCEPTIONS") == "yes";
    1818     } else if (part == "DIRECT3D") {
    1819         QString sdk_dir(QString::fromLocal8Bit(getenv("DXSDK_DIR")));
    1820         QDir dir;
    1821         bool has_d3d = false;
    1822 
    1823         if (!sdk_dir.isEmpty() && dir.exists(sdk_dir))
    1824             has_d3d = true;
    1825 
    1826         if (has_d3d && !QFile::exists(sdk_dir + QLatin1String("\\include\\d3d9.h"))) {
    1827             cout << "No Direct3D version 9 SDK found." << endl;
    1828            has_d3d = false;
    1829         }
    1830 
    1831         // find the first dxguid.lib in the current LIB paths, if it is NOT
    1832         // the D3D SDK one, we're most likely in trouble..
    1833         if (has_d3d) {
    1834             has_d3d = false;
    1835             QString env_lib(QString::fromLocal8Bit(getenv("LIB")));
    1836             QStringList lib_paths = env_lib.split(';');
    1837             for (int i=0; i<lib_paths.size(); ++i) {
    1838                QString lib_path = lib_paths.at(i);
    1839                 if (QFile::exists(lib_path + QLatin1String("\\dxguid.lib")))
    1840                 {
    1841                     if (lib_path.startsWith(sdk_dir)) {
    1842                         has_d3d = true;
    1843                     } else {
    1844                         cout << "Your D3D/Platform SDK library paths seem to appear in the wrong order." << endl;
    1845                     }
    1846                     break;
    1847                 }
    1848             }
    1849         }
    1850 
    1851         available = has_d3d;
    1852         if (!has_d3d) {
    1853             cout << "Setting Direct3D to NO, since the proper Direct3D SDK was not detected." << endl
    1854                  << "Make sure you have the Direct3D SDK installed, and that you have run" << endl
    1855                  << "the <path to SDK>\\Utilities\\Bin\\dx_setenv.cmd script." << endl
    1856                  << "The D3D SDK library path *needs* to appear before the Platform SDK library" << endl
    1857                  << "path in your LIB environment variable." << endl;
    1858         }
    18592033    } else if (part == "PHONON") {
    1860         available = findFile("vmr9.h") && findFile("dshow.h") && findFile("strmiids.lib") &&
    1861                         findFile("dmoguids.lib") && findFile("msdmo.lib") && findFile("d3d9.h");
     2034        available = findFile("vmr9.h") && findFile("dshow.h") && findFile("dmo.h") && findFile("dmodshow.h")
     2035            && (findFile("strmiids.lib") || findFile("libstrmiids.a"))
     2036            && (findFile("dmoguids.lib") || findFile("libdmoguids.a"))
     2037            && (findFile("msdmo.lib") || findFile("libmsdmo.a"))
     2038            && findFile("d3d9.h");
    18622039
    18632040        if (!available) {
    18642041            cout << "All the required DirectShow/Direct3D files couldn't be found." << endl
    1865                  << "Make sure you have either the platform SDK AND the DirectX SDK or the Windows SDK installed." << endl
    1866                  << "If you have the DirectX SDK installed, please make sure that you have run the <path to SDK>\\SetEnv.Cmd script." << endl;
    1867         }
     2042                 << "Make sure you have either the platform SDK AND the DirectShow SDK or the Windows SDK installed." << endl
     2043                 << "If you have the DirectShow SDK installed, please make sure that you have run the <path to SDK>\\SetEnv.Cmd script." << endl;
     2044            if (!findFile("vmr9.h"))  cout << "vmr9.h not found" << endl;
     2045            if (!findFile("dshow.h")) cout << "dshow.h not found" << endl;
     2046            if (!findFile("strmiids.lib")) cout << "strmiids.lib not found" << endl;
     2047            if (!findFile("dmoguids.lib")) cout << "dmoguids.lib not found" << endl;
     2048            if (!findFile("msdmo.lib")) cout << "msdmo.lib not found" << endl;
     2049            if (!findFile("d3d9.h")) cout << "d3d9.h not found" << endl;
     2050        }
     2051    } else if (part == "MULTIMEDIA" || part == "SCRIPT" || part == "SCRIPTTOOLS") {
     2052        available = true;
    18682053    } else if (part == "WEBKIT") {
    18692054        available = (dictionary.value("QMAKESPEC") == "win32-msvc2005") || (dictionary.value("QMAKESPEC") == "win32-msvc2008") || (dictionary.value("QMAKESPEC") == "win32-g++");
    1870     } else if (part == "SCRIPTTOOLS") {
    1871         available = true;
     2055    } else if (part == "DECLARATIVE") {
     2056        available = QFile::exists(sourcePath + "/src/declarative/qml/qmlcomponent.h");
    18722057    }
    18732058
     
    19462131    if (dictionary["DBUS"] == "auto")
    19472132        dictionary["DBUS"] = checkAvailability("DBUS") ? "yes" : "no";
     2133    if (dictionary["SCRIPT"] == "auto")
     2134        dictionary["SCRIPT"] = checkAvailability("SCRIPT") ? "yes" : "no";
    19482135    if (dictionary["SCRIPTTOOLS"] == "auto")
    19492136        dictionary["SCRIPTTOOLS"] = checkAvailability("SCRIPTTOOLS") ? "yes" : "no";
    19502137    if (dictionary["XMLPATTERNS"] == "auto")
    19512138        dictionary["XMLPATTERNS"] = checkAvailability("XMLPATTERNS") ? "yes" : "no";
    1952     if (dictionary["DIRECT3D"] == "auto")
    1953         dictionary["DIRECT3D"] = checkAvailability("DIRECT3D") ? "yes" : "no";
    19542139    if (dictionary["PHONON"] == "auto")
    19552140        dictionary["PHONON"] = checkAvailability("PHONON") ? "yes" : "no";
    19562141    if (dictionary["WEBKIT"] == "auto")
    19572142        dictionary["WEBKIT"] = checkAvailability("WEBKIT") ? "yes" : "no";
     2143    if (dictionary["DECLARATIVE"] == "auto")
     2144        dictionary["DECLARATIVE"] = checkAvailability("DECLARATIVE") ? "yes" : "no";
    19582145
    19592146    // Qt/WinCE remote test application
     
    19992186            exit(0);      // Exit cleanly for Ctrl+C
    20002187    }
     2188        if (0 != dictionary["ARM_FPU_TYPE"].size())
     2189        {
     2190                QStringList l= QStringList()
     2191                        << "softvfp"
     2192                        << "softvfp+vfpv2"
     2193                        << "vfpv2";
     2194                if (!(l.contains(dictionary["ARM_FPU_TYPE"])))
     2195                        cout << QString("WARNING: Using unsupported fpu flag: %1").arg(dictionary["ARM_FPU_TYPE"]) << endl;
     2196        }
    20012197
    20022198    return true;
     
    20212217     dll staticlib
    20222218
    2023      internal
    20242219     nocrosscompiler
    20252220     GNUmake
     
    20472242    if (!dictionary["QCONFIG"].isEmpty())
    20482243        build_options += dictionary["QCONFIG"] + "-config ";
    2049     if (dictionary["STL"] == "no")
    2050         build_options += "no-stl";
    20512244    build_options.sort();
    20522245
     
    21482341        qtConfig += "system-mng";
    21492342
     2343    // Text rendering --------------------------------------------------
     2344    if( dictionary[ "FREETYPE" ] == "yes" )
     2345        qtConfig += "freetype";
     2346
    21502347    // Styles -------------------------------------------------------
    21512348    if ( dictionary[ "STYLE_WINDOWS" ] == "yes" )
     
    21782375    if ( dictionary[ "STYLE_CDE" ] == "yes" )
    21792376        qmakeStyles += "cde";
     2377
     2378    if ( dictionary[ "STYLE_S60" ] == "yes" )
     2379        qmakeStyles += "s60";
    21802380
    21812381    // Databases ----------------------------------------------------
     
    22632463    if ( dictionary["OPENGL_ES_CM"] == "yes" ) {
    22642464        qtConfig += "opengles1";
     2465        qtConfig += "egl";
     2466    }
     2467
     2468    if ( dictionary["OPENGL_ES_2"] == "yes" ) {
     2469        qtConfig += "opengles2";
     2470        qtConfig += "egl";
    22652471    }
    22662472
    22672473    if ( dictionary["OPENGL_ES_CL"] == "yes" ) {
    22682474        qtConfig += "opengles1cl";
     2475        qtConfig += "egl";
     2476    }
     2477
     2478    if ( dictionary["OPENVG"] == "yes" ) {
     2479        qtConfig += "openvg";
     2480        qtConfig += "egl";
     2481    }
     2482
     2483    if ( dictionary["S60"] == "yes" ) {
     2484        qtConfig += "s60";
    22692485    }
    22702486
    22712487     if ( dictionary["DIRECTSHOW"] == "yes" )
    22722488        qtConfig += "directshow";
    2273 
    2274     if (dictionary[ "DIRECT3D" ] == "yes")
    2275         qtConfig += "direct3d";
    22762489
    22772490    if (dictionary[ "OPENSSL" ] == "yes")
     
    22932506        qtConfig += "cetest";
    22942507
    2295     if (dictionary[ "SCRIPTTOOLS" ] == "yes")
     2508    if (dictionary[ "SCRIPT" ] == "yes")
     2509        qtConfig += "script";
     2510
     2511    if (dictionary[ "SCRIPTTOOLS" ] == "yes") {
     2512        if (dictionary[ "SCRIPT" ] == "no") {
     2513            cout << "QtScriptTools was requested, but it can't be built due to QtScript being "
     2514                    "disabled." << endl;
     2515            dictionary[ "DONE" ] = "error";
     2516        }
    22962517        qtConfig += "scripttools";
     2518    }
    22972519
    22982520    if (dictionary[ "XMLPATTERNS" ] == "yes")
     
    23052527    }
    23062528
     2529    if (dictionary["MULTIMEDIA"] == "yes")
     2530        qtConfig += "multimedia";
     2531
    23072532    if (dictionary["WEBKIT"] == "yes")
    23082533        qtConfig += "webkit";
     2534
     2535    if (dictionary["DECLARATIVE"] == "yes")
     2536        qtConfig += "declarative";
     2537
     2538    if( dictionary[ "NATIVE_GESTURES" ] == "yes" )
     2539        qtConfig += "native-gestures";
    23092540
    23102541    // We currently have no switch for QtSvg, so add it unconditionally.
     
    23272558        }
    23282559    }
     2560
     2561    if (dictionary.contains("XQMAKESPEC") && ( dictionary["QMAKESPEC"] != dictionary["XQMAKESPEC"] ) )
     2562            qmakeConfig += "cross_compile";
    23292563
    23302564    // Directories and settings for .qmake.cache --------------------
     
    23682602    if (!opensslLibs.isEmpty())
    23692603        qmakeVars += opensslLibs;
    2370     else if (dictionary[ "OPENSSL" ] == "linked")
    2371         qmakeVars += QString("OPENSSL_LIBS    = -lssleay32 -llibeay32");
     2604    else if (dictionary[ "OPENSSL" ] == "linked") {
     2605        if(dictionary.contains("XQMAKESPEC") && dictionary[ "XQMAKESPEC" ].startsWith("symbian") )
     2606            qmakeVars += QString("OPENSSL_LIBS    = -llibssl -llibcrypto");
     2607        else
     2608            qmakeVars += QString("OPENSSL_LIBS    = -lssleay32 -llibeay32");
     2609        }
    23722610    if (!qmakeSql.isEmpty())
    23732611        qmakeVars += QString("sql-drivers    += ") + qmakeSql.join( " " );
     
    24822720            configStream << " static";
    24832721
     2722        if( dictionary[ "LTCG" ] == "yes" )
     2723            configStream << " ltcg";
    24842724        if( dictionary[ "STL" ] == "yes" )
    24852725            configStream << " stl";
     
    25262766
    25272767        if(!dictionary["QMAKE_RPATHDIR"].isEmpty())
    2528             configStream<<"QMAKE_RPATHDIR += "<<dictionary["QMAKE_RPATHDIR"];
     2768            configStream << "QMAKE_RPATHDIR += " << dictionary["QMAKE_RPATHDIR"] << endl;
     2769
     2770        if (!dictionary["QT_LIBINFIX"].isEmpty())
     2771            configStream << "QT_LIBINFIX = " << dictionary["QT_LIBINFIX"] << endl;
     2772
     2773        if(!dictionary["ARM_FPU_TYPE"].isEmpty()) {
     2774            configStream<<"QMAKE_CXXFLAGS.ARMCC += --fpu "<< dictionary["ARM_FPU_TYPE"];
     2775        }
    25292776
    25302777        configStream.flush();
     
    26362883        if(dictionary["STYLE_MOTIF"] != "yes")       qconfigList += "QT_NO_STYLE_MOTIF";
    26372884        if(dictionary["STYLE_CDE"] != "yes")         qconfigList += "QT_NO_STYLE_CDE";
     2885        if(dictionary["STYLE_S60"] != "yes")         qconfigList += "QT_NO_STYLE_S60";
    26382886        if(dictionary["STYLE_WINDOWSCE"] != "yes")   qconfigList += "QT_NO_STYLE_WINDOWSCE";
    26392887        if(dictionary["STYLE_WINDOWSMOBILE"] != "yes")   qconfigList += "QT_NO_STYLE_WINDOWSMOBILE";
     
    26502898        }
    26512899
    2652         if(dictionary["QT3SUPPORT"] == "no")        qconfigList += "QT_NO_QT3SUPPORT";
    26532900        if(dictionary["ACCESSIBILITY"] == "no")     qconfigList += "QT_NO_ACCESSIBILITY";
    26542901        if(dictionary["EXCEPTIONS"] == "no")        qconfigList += "QT_NO_EXCEPTIONS";
    26552902        if(dictionary["OPENGL"] == "no")            qconfigList += "QT_NO_OPENGL";
    2656         if(dictionary["DIRECT3D"] == "no")          qconfigList += "QT_NO_DIRECT3D";
     2903        if(dictionary["OPENVG"] == "no")            qconfigList += "QT_NO_OPENVG";
    26572904        if(dictionary["OPENSSL"] == "no")           qconfigList += "QT_NO_OPENSSL";
    26582905        if(dictionary["OPENSSL"] == "linked")       qconfigList += "QT_LINKED_OPENSSL";
     
    26602907        if(dictionary["IPV6"] == "no")              qconfigList += "QT_NO_IPV6";
    26612908        if(dictionary["WEBKIT"] == "no")            qconfigList += "QT_NO_WEBKIT";
     2909        if(dictionary["DECLARATIVE"] == "no")       qconfigList += "QT_NO_DECLARATIVE";
    26622910        if(dictionary["PHONON"] == "no")            qconfigList += "QT_NO_PHONON";
     2911        if(dictionary["MULTIMEDIA"] == "no")        qconfigList += "QT_NO_MULTIMEDIA";
    26632912        if(dictionary["XMLPATTERNS"] == "no")       qconfigList += "QT_NO_XMLPATTERNS";
     2913        if(dictionary["SCRIPT"] == "no")            qconfigList += "QT_NO_SCRIPT";
    26642914        if(dictionary["SCRIPTTOOLS"] == "no")       qconfigList += "QT_NO_SCRIPTTOOLS";
     2915        if(dictionary["FREETYPE"] == "no")          qconfigList += "QT_NO_FREETYPE";
     2916        if(dictionary["S60"] == "no")               qconfigList += "QT_NO_S60";
     2917        if(dictionary["NATIVE_GESTURES"] == "no")   qconfigList += "QT_NO_NATIVE_GESTURES";
    26652918
    26662919        if(dictionary["OPENGL_ES_CM"] == "yes" ||
    2667            dictionary["OPENGL_ES_CL"] == "yes")     qconfigList += "QT_OPENGL_ES";
     2920           dictionary["OPENGL_ES_CL"] == "yes" ||
     2921           dictionary["OPENGL_ES_2"]  == "yes")     qconfigList += "QT_OPENGL_ES";
    26682922
    26692923        if(dictionary["OPENGL_ES_CM"] == "yes")     qconfigList += "QT_OPENGL_ES_1";
     2924        if(dictionary["OPENGL_ES_2"]  == "yes")     qconfigList += "QT_OPENGL_ES_2";
    26702925        if(dictionary["OPENGL_ES_CL"] == "yes")     qconfigList += "QT_OPENGL_ES_1_CL";
    26712926
     
    26802935        if(dictionary["SQL_IBASE"] == "yes")        qconfigList += "QT_SQL_IBASE";
    26812936
     2937        if (dictionary["GRAPHICS_SYSTEM"] == "openvg") qconfigList += "QT_GRAPHICSSYSTEM_OPENVG";
    26822938        if (dictionary["GRAPHICS_SYSTEM"] == "opengl") qconfigList += "QT_GRAPHICSSYSTEM_OPENGL";
    26832939        if (dictionary["GRAPHICS_SYSTEM"] == "raster") qconfigList += "QT_GRAPHICSSYSTEM_RASTER";
     2940
     2941        if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) {
     2942            // These features are not ported to Symbian (yet)
     2943            qconfigList += "QT_NO_CONCURRENT";
     2944            qconfigList += "QT_NO_QFUTURE";
     2945            qconfigList += "QT_NO_CRASHHANDLER";
     2946            qconfigList += "QT_NO_PRINTER";
     2947            qconfigList += "QT_NO_SYSTEMTRAYICON";
     2948        }
    26842949
    26852950        qconfigList.sort();
     
    27433008
    27443009        // Replace old qconfig.h with new one
    2745         ::SetFileAttributesA(outName.toLocal8Bit(), FILE_ATTRIBUTE_NORMAL);
     3010        ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL);
    27463011        QFile::remove(outName);
    27473012        tmpFile.copy(outName);
     
    27793044
    27803045    outName = defSpec + "/qmake.conf";
    2781     ::SetFileAttributesA(outName.toLocal8Bit(), FILE_ATTRIBUTE_NORMAL );
     3046    ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL );
    27823047    QFile qmakeConfFile(outName);
    27833048    if (qmakeConfFile.open(QFile::Append | QFile::WriteOnly | QFile::Text)) {
     
    27983063        tmpStream << "/* Licensed */" << endl
    27993064                  << "static const char qt_configure_licensee_str          [512 + 12] = \"qt_lcnsuser=" << licenseInfo["LICENSEE"] << "\";" << endl
    2800                   << "static const char qt_configure_licensed_products_str [512 + 12] = \"qt_lcnsprod=" << dictionary["EDITION"] << "\";" << endl;
     3065                  << "static const char qt_configure_licensed_products_str [512 + 12] = \"qt_lcnsprod=" << dictionary["EDITION"] << "\";" << endl
     3066                  << endl
     3067                  << "/* Build date */" << endl
     3068                  << "static const char qt_configure_installation          [11  + 12] = \"qt_instdate=" << QDate::currentDate().toString(Qt::ISODate) << "\";" << endl
     3069                  << endl;
    28013070        if(!dictionary[ "QT_HOST_PREFIX" ].isNull())
    28023071            tmpStream << "#if !defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE)" << endl;
     
    28473116
    28483117        // Replace old qconfig.cpp with new one
    2849         ::SetFileAttributesA(outName.toLocal8Bit(), FILE_ATTRIBUTE_NORMAL );
     3118        ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL );
    28503119        QFile::remove( outName );
    28513120        tmpFile2.copy(outName);
    28523121        tmpFile2.close();
     3122    }
     3123
     3124    QTemporaryFile tmpFile3;
     3125    if (tmpFile3.open()) {
     3126        tmpStream.setDevice(&tmpFile3);
     3127        tmpStream << "/* Evaluation license key */" << endl
     3128                  << "static const char qt_eval_key_data              [512 + 12] = \"qt_qevalkey=" << licenseInfo["LICENSEKEYEXT"] << "\";" << endl;
     3129
     3130        tmpStream.flush();
     3131        tmpFile3.flush();
     3132
     3133        outName = buildPath + "/src/corelib/global/qconfig_eval.cpp";
     3134        ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL );
     3135        QFile::remove( outName );
     3136
     3137        if (dictionary["EDITION"] == "Evaluation" || qmakeDefines.contains("QT_EVAL"))
     3138            tmpFile3.copy(outName);
     3139        tmpFile3.close();
    28533140    }
    28543141}
     
    29023189    cout << "Maketool...................." << dictionary[ "MAKE" ] << endl;
    29033190    cout << "Debug symbols..............." << (dictionary[ "BUILD" ] == "debug" ? "yes" : "no") << endl;
     3191    cout << "Link Time Code Generation..." << dictionary[ "LTCG" ] << endl;
    29043192    cout << "Accessibility support......." << dictionary[ "ACCESSIBILITY" ] << endl;
    29053193    cout << "STL support................." << dictionary[ "STL" ] << endl;
     
    29123200    cout << "IWMMXT support.............." << dictionary[ "IWMMXT" ] << endl;
    29133201    cout << "OpenGL support.............." << dictionary[ "OPENGL" ] << endl;
    2914     cout << "Direct3D support............" << dictionary[ "DIRECT3D" ] << endl;
     3202    cout << "OpenVG support.............." << dictionary[ "OPENVG" ] << endl;
    29153203    cout << "OpenSSL support............." << dictionary[ "OPENSSL" ] << endl;
    29163204    cout << "QtDBus support.............." << dictionary[ "DBUS" ] << endl;
    29173205    cout << "QtXmlPatterns support......." << dictionary[ "XMLPATTERNS" ] << endl;
    29183206    cout << "Phonon support.............." << dictionary[ "PHONON" ] << endl;
     3207    cout << "QtMultimedia support........" << dictionary[ "MULTIMEDIA" ] << endl;
    29193208    cout << "WebKit support.............." << dictionary[ "WEBKIT" ] << endl;
     3209    cout << "Declarative support........." << dictionary[ "DECLARATIVE" ] << endl;
     3210    cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl;
    29203211    cout << "QtScriptTools support......." << dictionary[ "SCRIPTTOOLS" ] << endl;
    29213212    cout << "Graphics System............." << dictionary[ "GRAPHICS_SYSTEM" ] << endl;
     
    29283219    cout << "    JPEG support............" << dictionary[ "JPEG" ] << endl;
    29293220    cout << "    PNG support............." << dictionary[ "PNG" ] << endl;
    2930     cout << "    MNG support............." << dictionary[ "MNG" ] << endl << endl;
     3221    cout << "    MNG support............." << dictionary[ "MNG" ] << endl;
     3222    cout << "    FreeType support........" << dictionary[ "FREETYPE" ] << endl << endl;
    29313223
    29323224    cout << "Styles:" << endl;
     
    29393231    cout << "    CDE....................." << dictionary[ "STYLE_CDE" ] << endl;
    29403232    cout << "    Windows CE.............." << dictionary[ "STYLE_WINDOWSCE" ] << endl;
    2941     cout << "    Windows Mobile.........." << dictionary[ "STYLE_WINDOWSMOBILE" ] << endl << endl;
     3233    cout << "    Windows Mobile.........." << dictionary[ "STYLE_WINDOWSMOBILE" ] << endl;
     3234    cout << "    S60....................." << dictionary[ "STYLE_S60" ] << endl << endl;
    29423235
    29433236    cout << "Sql Drivers:" << endl;
     
    29693262        cout << "Cetest support.............." << dictionary[ "CETEST" ] << endl;
    29703263        cout << "Signature..................." << dictionary[ "CE_SIGNATURE"] << endl << endl;
     3264    }
     3265
     3266    if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith(QLatin1String("symbian"))) {
     3267        cout << "Support for S60............." << dictionary[ "S60" ] << endl;
    29713268    }
    29723269
     
    31043401void Configure::buildHostTools()
    31053402{
     3403    if (dictionary[ "NOPROCESS" ] == "yes")
     3404        dictionary[ "DONE" ] = "yes";
     3405
    31063406    if (!dictionary.contains("XQMAKESPEC"))
    31073407        return;
     
    31103410    QStringList hostToolsDirs;
    31113411    hostToolsDirs
    3112         << "src/tools/bootstrap"
    3113         << "src/tools/moc"
    3114         << "src/tools/rcc"
    3115         << "src/tools/uic"
    3116         << "tools/checksdk";
     3412        << "src/tools"
     3413        << "tools/linguist/lrelease";
     3414
     3415    if(dictionary["XQMAKESPEC"].startsWith("wince"))
     3416        hostToolsDirs << "tools/checksdk";
    31173417
    31183418    if (dictionary[ "CETEST" ] == "yes")
     
    33273627        cout << "Processing of project files have been disabled." << endl;
    33283628        cout << "Only use this option if you really know what you're doing." << endl << endl;
    3329         dictionary[ "DONE" ] = "yes";
    33303629        return;
    33313630    }
     
    33353634{
    33363635    QString make = dictionary[ "MAKE" ];
    3337     cout << endl << endl << "Qt is now configured for building. Just run " << qPrintable(make) << "." << endl;
    3338     cout << "To reconfigure, run " << qPrintable(make) << " confclean and configure." << endl << endl;
     3636    if (!dictionary.contains("XQMAKESPEC")) {
     3637        cout << endl << endl << "Qt is now configured for building. Just run " << qPrintable(make) << "." << endl;
     3638        cout << "To reconfigure, run " << qPrintable(make) << " confclean and configure." << endl << endl;
     3639    } else if(dictionary.value("QMAKESPEC").startsWith("wince")) {
     3640        // we are cross compiling for Windows CE
     3641        cout << endl << endl << "Qt is now configured for building. To start the build run:" << endl
     3642             << "\tsetcepaths " << dictionary.value("XQMAKESPEC") << endl
     3643             << "\t" << qPrintable(make) << endl
     3644             << "To reconfigure, run " << qPrintable(make) << " confclean and configure." << endl << endl;
     3645    } else { // Compiling for Symbian OS
     3646        cout << endl << endl << "Qt is now configured for building. To start the build run:" << qPrintable(dictionary["QTBUILDINSTRUCTION"]) << "." << endl
     3647        << "To reconfigure, run '" << qPrintable(dictionary["CONFCLEANINSTRUCTION"]) << "' and configure." << endl;
     3648    }
    33393649}
    33403650
     
    33783688    }
    33793689
     3690    bool haveGpl3 = false;
    33803691    QString licenseFile = orgLicenseFile;
    33813692    QString theLicense;
    33823693    if (dictionary["EDITION"] == "OpenSource" || dictionary["EDITION"] == "Snapshot") {
    3383         theLicense = "GNU General Public License (GPL) version 3 \nor the GNU Lesser General Public License (LGPL) version 2.1";
     3694        haveGpl3 = QFile::exists(orgLicenseFile + "/LICENSE.GPL3");
     3695        theLicense = "GNU Lesser General Public License (LGPL) version 2.1";
     3696        if (haveGpl3)
     3697            theLicense += "\nor the GNU General Public License (GPL) version 3";
    33843698    } else {
    33853699        // the first line of the license file tells us which license it is
     
    33983712             << endl;
    33993713        if (dictionary["EDITION"] == "OpenSource" || dictionary["EDITION"] == "Snapshot") {
    3400             cout << "Type '3' to view the GNU General Public License version 3 (GPLv3)." << endl;
     3714            if (haveGpl3)
     3715                cout << "Type '3' to view the GNU General Public License version 3 (GPLv3)." << endl;
    34013716            cout << "Type 'L' to view the Lesser GNU General Public License version 2.1 (LGPLv2.1)." << endl;
    34023717        } else {
     
    34523767void Configure::readLicense()
    34533768{
    3454     dictionary[ "PLATFORM NAME" ]   = (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/src/corelib/kernel/qfunctions_wince.h")
    3455                                       && (dictionary.value("QMAKESPEC").startsWith("wince") || dictionary.value("XQMAKESPEC").startsWith("wince")))
    3456                                         ? "Qt for Windows CE" : "Qt for Windows";
     3769   if (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/src/corelib/kernel/qfunctions_wince.h") &&
     3770       (dictionary.value("QMAKESPEC").startsWith("wince") || dictionary.value("XQMAKESPEC").startsWith("wince")))
     3771        dictionary["PLATFORM NAME"] = "Qt for Windows CE";
     3772    else if (dictionary.value("XQMAKESPEC").startsWith("symbian"))
     3773        dictionary["PLATFORM NAME"] = "Qt for Symbian";
     3774    else
     3775        dictionary["PLATFORM NAME"] = "Qt for Windows";
     3776    dictionary["LICENSE FILE"] = sourcePath;
     3777
    34573778    bool openSource = false;
     3779    bool hasOpenSource = QFile::exists(dictionary["LICENSE FILE"] + "/LICENSE.GPL3") || QFile::exists(dictionary["LICENSE FILE"] + "/LICENSE.LGPL");
    34583780    if (dictionary["BUILDNOKIA"] == "yes" || dictionary["BUILDTYPE"] == "commercial") {
    34593781        openSource = false;
    34603782    } else if (dictionary["BUILDTYPE"] == "opensource") {
    34613783        openSource = true;
    3462     } else {
     3784    } else if (hasOpenSource) { // No Open Source? Just display the commercial license right away
    34633785        forever {
    34643786            char accept = '?';
     
    34783800        }
    34793801    }
    3480     if (openSource) {
    3481         dictionary["LICENSE FILE"] = sourcePath;
    3482         if (QFile::exists(dictionary["LICENSE FILE"] + "/LICENSE.GPL3") || QFile::exists(dictionary["LICENSE FILE"] + "/LICENSE.LGPL")) {
    3483             cout << endl << "This is the " << dictionary["PLATFORM NAME"] << " Open Source Edition." << endl;
    3484             licenseInfo["LICENSEE"] = "Open Source";
    3485             dictionary["EDITION"] = "OpenSource";
    3486             dictionary["QT_EDITION"] = "QT_EDITION_OPENSOURCE";
    3487             cout << endl;
    3488             if (!showLicense(dictionary["LICENSE FILE"])) {
    3489                 cout << "Configuration aborted since license was not accepted";
    3490                 dictionary["DONE"] = "error";
    3491                 return;
    3492             }
     3802    if (hasOpenSource && openSource) {
     3803        cout << endl << "This is the " << dictionary["PLATFORM NAME"] << " Open Source Edition." << endl;
     3804        licenseInfo["LICENSEE"] = "Open Source";
     3805        dictionary["EDITION"] = "OpenSource";
     3806        dictionary["QT_EDITION"] = "QT_EDITION_OPENSOURCE";
     3807        cout << endl;
     3808        if (!showLicense(dictionary["LICENSE FILE"])) {
     3809            cout << "Configuration aborted since license was not accepted";
     3810            dictionary["DONE"] = "error";
    34933811            return;
    34943812        }
    3495 #ifndef COMMERCIAL_VERSION
     3813    } else if (openSource) {
     3814        cout << endl << "Cannot find the GPL license files! Please download the Open Source version of the library." << endl;
     3815        dictionary["DONE"] = "error";
     3816    }
     3817#ifdef COMMERCIAL_VERSION
    34963818    else {
    3497         cout << endl << "Cannot find the GPL license files!" << endl;
    3498         dictionary["DONE"] = "error";
    3499     }
    3500 #else
    3501     } else {
    35023819        Tools::checkLicense(dictionary, licenseInfo, firstLicensePath());
    3503         if (dictionary["DONE"] != "error") {
     3820        if (dictionary["DONE"] != "error" && dictionary["BUILDNOKIA"] != "yes") {
    35043821            // give the user some feedback, and prompt for license acceptance
    35053822            cout << endl << "This is the " << dictionary["PLATFORM NAME"] << " " << dictionary["EDITION"] << " Edition."<< endl << endl;
     
    35113828        }
    35123829    }
    3513 #endif // COMMERCIAL_VERSION
     3830#else // !COMMERCIAL_VERSION
     3831    else {
     3832        cout << endl << "Cannot build commercial edition from the open source version of the library." << endl;
     3833        dictionary["DONE"] = "error";
     3834    }
     3835#endif
    35143836}
    35153837
Note: See TracChangeset for help on using the changeset viewer.