diff options
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r-- | tools/configure/configureapp.cpp | 83 |
1 files changed, 62 insertions, 21 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 0ed16ed..6c12cc2 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -279,6 +279,7 @@ Configure::Configure(int& argc, char** argv) dictionary[ "DIRECTSHOW" ] = "no"; dictionary[ "WEBKIT" ] = "auto"; dictionary[ "DECLARATIVE" ] = "auto"; + dictionary[ "DECLARATIVE_DEBUG" ]= "yes"; dictionary[ "PLUGIN_MANIFESTS" ] = "yes"; QString version; @@ -341,7 +342,7 @@ Configure::Configure(int& argc, char** argv) dictionary[ "ACCESSIBILITY" ] = "yes"; dictionary[ "OPENGL" ] = "yes"; dictionary[ "OPENVG" ] = "no"; - dictionary[ "IPV6" ] = "yes"; // Always, dynamicly loaded + dictionary[ "IPV6" ] = "yes"; // Always, dynamically loaded dictionary[ "OPENSSL" ] = "auto"; dictionary[ "DBUS" ] = "auto"; dictionary[ "S60" ] = "yes"; @@ -381,6 +382,7 @@ Configure::Configure(int& argc, char** argv) dictionary[ "INCREDIBUILD_XGE" ] = "auto"; dictionary[ "LTCG" ] = "no"; dictionary[ "NATIVE_GESTURES" ] = "yes"; + dictionary[ "MSVC_MP" ] = "no"; } Configure::~Configure() @@ -534,6 +536,13 @@ void Configure::parseCmdLine() else if (configCmdLine.at(i) == "-no-ltcg") { dictionary[ "LTCG" ] = "no"; } + else if (configCmdLine.at(i) == "-mp") { + dictionary[ "MSVC_MP" ] = "yes"; + } + else if (configCmdLine.at(i) == "-no-mp") { + dictionary[ "MSVC_MP" ] = "no"; + } + #endif else if (configCmdLine.at(i) == "-platform") { @@ -949,10 +958,16 @@ void Configure::parseCmdLine() dictionary[ "WEBKIT" ] = "no"; } else if (configCmdLine.at(i) == "-webkit") { dictionary[ "WEBKIT" ] = "yes"; + } else if (configCmdLine.at(i) == "-webkit-debug") { + dictionary[ "WEBKIT" ] = "debug"; } else if (configCmdLine.at(i) == "-no-declarative") { dictionary[ "DECLARATIVE" ] = "no"; } else if (configCmdLine.at(i) == "-declarative") { dictionary[ "DECLARATIVE" ] = "yes"; + } else if (configCmdLine.at(i) == "-no-declarative-debug") { + dictionary[ "DECLARATIVE_DEBUG" ] = "no"; + } else if (configCmdLine.at(i) == "-declarative-debug") { + dictionary[ "DECLARATIVE_DEBUG" ] = "yes"; } else if (configCmdLine.at(i) == "-no-plugin-manifests") { dictionary[ "PLUGIN_MANIFESTS" ] = "no"; } else if (configCmdLine.at(i) == "-plugin-manifests") { @@ -1509,6 +1524,10 @@ void Configure::applySpecSpecifics() dictionary[ "QT3SUPPORT" ] = "no"; dictionary[ "OPENGL" ] = "no"; dictionary[ "OPENSSL" ] = "yes"; + // We accidently enabled IPv6 for Qt Symbian in 4.6.x. However the underlying OpenC does not fully support IPV6. + // Therefore for 4.7.1 and following we disable it until OpenC either supports it or we have the native Qt + // symbian socket engine. + dictionary[ "IPV6" ] = "no"; dictionary[ "STL" ] = "yes"; dictionary[ "EXCEPTIONS" ] = "yes"; dictionary[ "RTTI" ] = "yes"; @@ -1634,7 +1653,7 @@ bool Configure::displayHelp() "[-phonon] [-no-phonon-backend] [-phonon-backend]\n" "[-no-multimedia] [-multimedia] [-no-audio-backend] [-audio-backend]\n" "[-no-script] [-script] [-no-scripttools] [-scripttools]\n" - "[-no-webkit] [-webkit] [-graphicssystem raster|opengl|openvg]\n\n", 0, 7); + "[-no-webkit] [-webkit] [-webkit-debug] [-graphicssystem raster|opengl|openvg]\n\n", 0, 7); desc("Installation options:\n\n"); @@ -1818,12 +1837,15 @@ bool Configure::displayHelp() desc("AUDIO_BACKEND", "yes","-audio-backend", "Compile in the platform audio backend into QtMultimedia"); desc("WEBKIT", "no", "-no-webkit", "Do not compile in the WebKit module"); desc("WEBKIT", "yes", "-webkit", "Compile in the WebKit module (WebKit is built if a decent C++ compiler is used.)"); + desc("WEBKIT", "debug", "-webkit-debug", "Compile in the WebKit module with debug symbols."); desc("SCRIPT", "no", "-no-script", "Do not build the QtScript module."); desc("SCRIPT", "yes", "-script", "Build the QtScript module."); desc("SCRIPTTOOLS", "no", "-no-scripttools", "Do not build the QtScriptTools module."); desc("SCRIPTTOOLS", "yes", "-scripttools", "Build the QtScriptTools module."); desc("DECLARATIVE", "no", "-no-declarative", "Do not build the declarative module"); desc("DECLARATIVE", "yes", "-declarative", "Build the declarative module"); + desc("DECLARATIVE_DEBUG", "no", "-no-declarative-debug", "Do not build the declarative debugging support"); + desc("DECLARATIVE_DEBUG", "yes", "-declarative-debug", "Build the declarative debugging support"); desc( "-arch <arch>", "Specify an architecture.\n" "Available values for <arch>:"); @@ -1848,6 +1870,8 @@ bool Configure::displayHelp() desc("STYLE_S60" , "yes", "", " s60\n", ' '); desc("NATIVE_GESTURES", "no", "-no-native-gestures", "Do not use native gestures on Windows 7."); desc("NATIVE_GESTURES", "yes", "-native-gestures", "Use native gestures on Windows 7."); + desc("MSVC_MP", "no", "-no-mp", "Do not use multiple processors for compiling with MSVC"); + desc("MSVC_MP", "yes", "-mp", "Use multiple processors for compiling with MSVC (-MP)"); /* We do not support -qconfig on Windows yet @@ -2107,7 +2131,7 @@ bool Configure::checkAvailability(const QString &part) available = findFile("BuildConsole.exe") && findFile("xgConsole.exe"); else if (part == "XMLPATTERNS") available = dictionary.value("EXCEPTIONS") == "yes"; - } else if (part == "PHONON") { + else if (part == "PHONON") { if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) { available = true; } else { @@ -2164,7 +2188,7 @@ bool Configure::checkAvailability(const QString &part) available = (paths.size() == 0); if (!available) { - if (epocRoot.isNull() || epocRoot == "") + if (epocRoot.isEmpty()) epocRoot = "<empty string>"; cout << endl << "The QtMultimedia audio backend will not be built because required" << endl @@ -2274,6 +2298,8 @@ void Configure::autoDetection() dictionary["WEBKIT"] = checkAvailability("WEBKIT") ? "yes" : "no"; if (dictionary["DECLARATIVE"] == "auto") dictionary["DECLARATIVE"] = dictionary["SCRIPT"] == "yes" ? "yes" : "no"; + if (dictionary["DECLARATIVE_DEBUG"] == "auto") + dictionary["DECLARATIVE_DEBUG"] = dictionary["DECLARATIVE"] == "yes" ? "yes" : "no"; if (dictionary["AUDIO_BACKEND"] == "auto") dictionary["AUDIO_BACKEND"] = checkAvailability("AUDIO_BACKEND") ? "yes" : "no"; if (dictionary["WMSDK"] == "auto") @@ -2682,8 +2708,15 @@ void Configure::generateOutputVars() qtConfig += "audio-backend"; } - if (dictionary["WEBKIT"] == "yes") - qtConfig += "webkit"; + QString dst = buildPath + "/mkspecs/modules/qt_webkit_version.pri"; + QFile::remove(dst); + if (dictionary["WEBKIT"] != "no") { + // This include takes care of adding "webkit" to QT_CONFIG. + QString src = sourcePath + "/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri"; + QFile::copy(src, dst); + if (dictionary["WEBKIT"] == "debug") + qtConfig += "webkit-debug"; + } if (dictionary["DECLARATIVE"] == "yes") { if (dictionary[ "SCRIPT" ] == "no") { @@ -2710,7 +2743,7 @@ void Configure::generateOutputVars() QString set_config = dictionary["QCONFIG"]; if (possible_configs.contains(set_config)) { - foreach(QString cfg, possible_configs) { + foreach (const QString &cfg, possible_configs) { qtConfig += (cfg + "-config"); if (cfg == set_config) break; @@ -2832,11 +2865,11 @@ void Configure::generateCachefile() for (QStringList::Iterator var = qmakeVars.begin(); var != qmakeVars.end(); ++var) { cacheStream << (*var) << endl; } - cacheStream << "CONFIG += " << qmakeConfig.join(" ") << " incremental create_prl link_prl depend_includepath QTDIR_build" << endl; + cacheStream << "CONFIG += " << qmakeConfig.join(" ") << " incremental msvc_mp create_prl link_prl depend_includepath QTDIR_build" << endl; QStringList buildParts; buildParts << "libs" << "tools" << "examples" << "demos" << "docs" << "translations"; - foreach(QString item, disabledBuildParts) { + foreach (const QString &item, disabledBuildParts) { buildParts.removeAll(item); } cacheStream << "QT_BUILD_PARTS = " << buildParts.join(" ") << endl; @@ -2895,6 +2928,8 @@ void Configure::generateCachefile() if (dictionary[ "LTCG" ] == "yes") configStream << " ltcg"; + if (dictionary[ "MSVC_MP" ] == "yes") + configStream << " msvc_mp"; if (dictionary[ "STL" ] == "yes") configStream << " stl"; if (dictionary[ "EXCEPTIONS" ] == "yes") @@ -3050,10 +3085,7 @@ void Configure::generateConfigfiles() tmpStream << "/* Machine byte-order */" << endl; tmpStream << "#define Q_BIG_ENDIAN 4321" << endl; tmpStream << "#define Q_LITTLE_ENDIAN 1234" << endl; - if (QSysInfo::ByteOrder == QSysInfo::BigEndian) - tmpStream << "#define Q_BYTE_ORDER Q_BIG_ENDIAN" << endl; - else - tmpStream << "#define Q_BYTE_ORDER Q_LITTLE_ENDIAN" << endl; + tmpStream << "#define Q_BYTE_ORDER Q_LITTLE_ENDIAN" << endl; tmpStream << endl << "// Compile time features" << endl; tmpStream << "#define QT_ARCH_" << dictionary["ARCHITECTURE"].toUpper() << endl; @@ -3095,6 +3127,7 @@ void Configure::generateConfigfiles() if (dictionary["IPV6"] == "no") qconfigList += "QT_NO_IPV6"; if (dictionary["WEBKIT"] == "no") qconfigList += "QT_NO_WEBKIT"; if (dictionary["DECLARATIVE"] == "no") qconfigList += "QT_NO_DECLARATIVE"; + if (dictionary["DECLARATIVE_DEBUG"] == "no") qconfigList += "QDECLARATIVE_NO_DEBUG_PROTOCOL"; if (dictionary["PHONON"] == "no") qconfigList += "QT_NO_PHONON"; if (dictionary["MULTIMEDIA"] == "no") qconfigList += "QT_NO_MULTIMEDIA"; if (dictionary["XMLPATTERNS"] == "no") qconfigList += "QT_NO_XMLPATTERNS"; @@ -3149,7 +3182,7 @@ void Configure::generateConfigfiles() QStringList kbdDrivers = dictionary["KBD_DRIVERS"].split(" ");; QStringList allKbdDrivers; allKbdDrivers<<"tty"<<"usb"<<"sl5000"<<"yopy"<<"vr41xx"<<"qvfb"<<"um"; - foreach(QString kbd, allKbdDrivers) { + foreach (const QString &kbd, allKbdDrivers) { if (!kbdDrivers.contains(kbd)) tmpStream<<"#define QT_NO_QWS_KBD_"<<kbd.toUpper()<<endl; } @@ -3157,7 +3190,7 @@ void Configure::generateConfigfiles() QStringList mouseDrivers = dictionary["MOUSE_DRIVERS"].split(" "); QStringList allMouseDrivers; allMouseDrivers << "pc"<<"bus"<<"linuxtp"<<"yopy"<<"vr41xx"<<"tslib"<<"qvfb"; - foreach(QString mouse, allMouseDrivers) { + foreach (const QString &mouse, allMouseDrivers) { if (!mouseDrivers.contains(mouse)) tmpStream<<"#define QT_NO_QWS_MOUSE_"<<mouse.toUpper()<<endl; } @@ -3165,7 +3198,7 @@ void Configure::generateConfigfiles() QStringList gfxDrivers = dictionary["GFX_DRIVERS"].split(" "); QStringList allGfxDrivers; allGfxDrivers<<"linuxfb"<<"transformed"<<"qvfb"<<"vnc"<<"multiscreen"<<"ahi"; - foreach(QString gfx, allGfxDrivers) { + foreach (const QString &gfx, allGfxDrivers) { if (!gfxDrivers.contains(gfx)) tmpStream<<"#define QT_NO_QWS_"<<gfx.toUpper()<<endl; } @@ -3173,7 +3206,7 @@ void Configure::generateConfigfiles() tmpStream<<"#define Q_WS_QWS"<<endl; QStringList depths = dictionary[ "QT_QWS_DEPTH" ].split(" "); - foreach(QString depth, depths) + foreach (const QString &depth, depths) tmpStream<<"#define QT_QWS_DEPTH_"+depth<<endl; } @@ -3390,8 +3423,14 @@ void Configure::displayConfig() cout << "QtXmlPatterns support......." << dictionary[ "XMLPATTERNS" ] << endl; cout << "Phonon support.............." << dictionary[ "PHONON" ] << endl; cout << "QtMultimedia support........" << dictionary[ "MULTIMEDIA" ] << endl; - cout << "WebKit support.............." << dictionary[ "WEBKIT" ] << endl; + { + QString webkit = dictionary[ "WEBKIT" ]; + if (webkit == "debug") + webkit = "yes (debug)"; + cout << "WebKit support.............." << webkit; + } cout << "Declarative support........." << dictionary[ "DECLARATIVE" ] << endl; + cout << "Declarative debugging......." << dictionary[ "DECLARATIVE_DEBUG" ] << endl; cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl; cout << "QtScriptTools support......." << dictionary[ "SCRIPTTOOLS" ] << endl; cout << "Graphics System............." << dictionary[ "GRAPHICS_SYSTEM" ] << endl; @@ -3622,7 +3661,10 @@ void Configure::buildHostTools() // generate Makefile QStringList args; args << QDir::toNativeSeparators(buildPath + "/bin/qmake"); - args << "-spec" << dictionary["QMAKESPEC"] << "-r"; + // override .qmake.cache because we are not cross-building these. + // we need a full path so that a build with -prefix will still find it. + args << "-spec" << QDir::toNativeSeparators(buildPath + "/mkspecs/" + dictionary["QMAKESPEC"]); + args << "-r"; args << "-o" << QDir::toNativeSeparators(toolBuildPath + "/Makefile"); QDir().mkpath(toolBuildPath); @@ -3760,8 +3802,7 @@ void Configure::generateMakefiles() printf("Generating Makefiles...\n"); generate = false; // Now Makefiles will be done } - args << "-spec"; - args << spec; + // don't pass -spec - .qmake.cache has it already args << "-r"; args << (sourcePath + "/projects.pro"); args << "-o"; |