summaryrefslogtreecommitdiffstats
path: root/tools/configure
diff options
context:
space:
mode:
authorThomas Zander <t.zander@nokia.com>2010-09-28 11:44:45 (GMT)
committerThomas Zander <t.zander@nokia.com>2010-09-28 11:44:45 (GMT)
commit5c08412285f14d89174aef1190a1de1c35fd62bd (patch)
tree2e9bef2fdf0af18db76b011cd9c4ed4b456f507c /tools/configure
parent2645784f05db7b1e631621c511e94c88fc5cd211 (diff)
parent2868302626b8a31f44df1068514485a89ec27171 (diff)
downloadQt-5c08412285f14d89174aef1190a1de1c35fd62bd.zip
Qt-5c08412285f14d89174aef1190a1de1c35fd62bd.tar.gz
Qt-5c08412285f14d89174aef1190a1de1c35fd62bd.tar.bz2
Merge commit 'origin/master' into fileEnginesOn47
Conflicts: qmake/Makefile.win32 qmake/qmake.pri src/corelib/io/qdir.cpp src/corelib/io/qfileinfo.cpp src/corelib/io/qfileinfo_p.h src/corelib/io/qfsfileengine_win.cpp src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtCoreu.def src/s60installs/eabi/QtGuiu.def src/tools/bootstrap/bootstrap.pro tests/auto/qfileinfo/tst_qfileinfo.cpp
Diffstat (limited to 'tools/configure')
-rw-r--r--tools/configure/configure.pro3
-rw-r--r--tools/configure/configureapp.cpp83
-rw-r--r--tools/configure/environment.cpp7
-rw-r--r--tools/configure/tools.cpp10
4 files changed, 72 insertions, 31 deletions
diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro
index 6450038..5b9d223 100644
--- a/tools/configure/configure.pro
+++ b/tools/configure/configure.pro
@@ -28,7 +28,7 @@ INCLUDEPATH += \
$$QT_SOURCE_TREE/src/corelib/global \
$$QT_BUILD_TREE/include \
$$QT_BUILD_TREE/include/QtCore \
- $$QT_BUILD_TREE/tools/shared
+ $$QT_SOURCE_TREE/tools/shared
HEADERS = configureapp.h environment.h tools.h\
$$QT_SOURCE_TREE/src/corelib/tools/qbytearray.h \
@@ -100,6 +100,7 @@ SOURCES = main.cpp configureapp.cpp environment.cpp tools.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qiodevice.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qtextstream.cpp \
$$QT_SOURCE_TREE/src/corelib/io/qtemporaryfile.cpp \
+ $$QT_SOURCE_TREE/src/corelib/plugin/qsystemlibrary.cpp \
$$QT_SOURCE_TREE/src/corelib/tools/qbitarray.cpp \
$$QT_SOURCE_TREE/src/corelib/tools/qdatetime.cpp \
$$QT_SOURCE_TREE/src/corelib/tools/qmap.cpp \
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";
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp
index 5d9851f..9446864 100644
--- a/tools/configure/environment.cpp
+++ b/tools/configure/environment.cpp
@@ -271,8 +271,7 @@ static QByteArray qt_create_environment(const QStringList &environment)
pos += tmpSize;
}
// add the user environment
- for (QStringList::ConstIterator it = environment.begin(); it != environment.end(); it++ ) {
- QString tmp = *it;
+ foreach (const QString &tmp, environment) {
uint tmpSize = sizeof(wchar_t) * (tmp.length() + 1);
envlist.resize(envlist.size() + tmpSize);
memcpy(envlist.data() + pos, tmp.utf16(), tmpSize);
@@ -376,7 +375,7 @@ int Environment::execute(QStringList arguments, const QStringList &additionalEnv
switch(GetLastError()) {
case E2BIG:
cerr << "execute: Argument list exceeds 1024 bytes" << endl;
- foreach(QString arg, arguments)
+ foreach (const QString &arg, arguments)
cerr << " (" << arg.toLocal8Bit().constData() << ")" << endl;
break;
case ENOENT:
@@ -390,7 +389,7 @@ int Environment::execute(QStringList arguments, const QStringList &additionalEnv
break;
default:
cerr << "execute: Unknown error" << endl;
- foreach(QString arg, arguments)
+ foreach (const QString &arg, arguments)
cerr << " (" << arg.toLocal8Bit().constData() << ")" << endl;
break;
}
diff --git a/tools/configure/tools.cpp b/tools/configure/tools.cpp
index c4625af..c91f048 100644
--- a/tools/configure/tools.cpp
+++ b/tools/configure/tools.cpp
@@ -91,8 +91,8 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
QStringList components = buffer.split( '=' );
if ( components.size() >= 2 ) {
QStringList::Iterator it = components.begin();
- QString key = (*it++).trimmed().replace( "\"", QString() ).toUpper();
- QString value = (*it++).trimmed().replace( "\"", QString() );
+ QString key = (*it++).trimmed().remove('"').toUpper();
+ QString value = (*it++).trimmed().remove('"');
licenseInfo[ key ] = value;
}
}
@@ -111,7 +111,7 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
// Verify license info...
QString licenseKey = licenseInfo["LICENSEKEYEXT"];
QByteArray clicenseKey = licenseKey.toLatin1();
- //We check the licence
+ //We check the license
static const char * const SEP = "-";
char *licenseParts[NUMBER_OF_PARTS];
int partNumber = 0;
@@ -218,7 +218,7 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
if (QFile::exists(dictionary["QT_SOURCE_TREE"] + "/.LICENSE")) {
// Generic, no-suffix license
- dictionary["LICENSE_EXTENSION"] = QString();
+ dictionary["LICENSE_EXTENSION"].clear();
} else if (dictionary["LICENSE_EXTENSION"].isEmpty()) {
cout << "License file does not contain proper license key." << endl;
dictionary["DONE"] = "error";
@@ -239,7 +239,7 @@ void Tools::checkLicense(QMap<QString,QString> &dictionary, QMap<QString,QString
fromLicenseFile += "-US";
if (!CopyFile((wchar_t*)QDir::toNativeSeparators(fromLicenseFile).utf16(),
- (wchar_t*)QDir::toNativeSeparators(toLicenseFile).utf16(), FALSE)) {
+ (wchar_t*)QDir::toNativeSeparators(toLicenseFile).utf16(), false)) {
cout << "Failed to copy license file (" << fromLicenseFile << ")";
dictionary["DONE"] = "error";
return;