summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRafael Roquetto <rafael.roquetto.qnx@kdab.com>2012-05-27 22:25:22 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-16 22:30:11 +0200
commit65bd0bd1f047f6db6d67a8f089a9a409354b95a1 (patch)
tree8423dcf11c6e45df9b0f476255b75457421d88d3 /tools
parentda98ea1758a01c38b5cd0a62ecf201e16df89e5b (diff)
New command line switches for configure.exe
Adds support for the following command line switches to configure.exe tool: * -qpa * -nis (-no-nis) * -neon (-no-neon) * -largefile * -little-endian (-big-endian) * -fontconfig (-no-fontconfig) * -system-freetype * -gnu-iconv * -sun-iconv * -posix-ipc based on qt5/qtbase: 1838a6c2fb5e3b4368c871aa330d028b255b83af Change-Id: I4a5adf09e4c0e312372b96dceb87ff3310e26ba6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp186
1 files changed, 184 insertions, 2 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index bc594df45b..cbf20f4e32 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -283,6 +283,13 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "DECLARATIVE_DEBUG" ]= "yes";
dictionary[ "PLUGIN_MANIFESTS" ] = "yes";
dictionary[ "DIRECTWRITE" ] = "no";
+ dictionary[ "QPA" ] = "no";
+ dictionary[ "NIS" ] = "no";
+ dictionary[ "NEON" ] = "no";
+ dictionary[ "LARGE_FILE" ] = "no";
+ dictionary[ "LITTLE_ENDIAN" ] = "yes";
+ dictionary[ "FONT_CONFIG" ] = "no";
+ dictionary[ "POSIX_IPC" ] = "no";
QString version;
QFile qglobal_h(sourcePath + "/src/corelib/global/qglobal.h");
@@ -634,6 +641,8 @@ void Configure::parseCmdLine()
dictionary[ "FREETYPE" ] = "no";
else if (configCmdLine.at(i) == "-qt-freetype")
dictionary[ "FREETYPE" ] = "yes";
+ else if (configCmdLine.at(i) == "-system-freetype")
+ dictionary[ "FREETYPE" ] = "system";
// CE- C runtime --------------------------------------------
else if (configCmdLine.at(i) == "-crt") {
@@ -1236,6 +1245,58 @@ void Configure::parseCmdLine()
dictionary["DIRECTWRITE"] = "no";
}
+ else if (configCmdLine.at(i) == "-nis") {
+ dictionary["NIS"] = "yes";
+ } else if (configCmdLine.at(i) == "-no-nis") {
+ dictionary["NIS"] = "no";
+ }
+
+ else if (configCmdLine.at(i) == "-qpa") {
+ dictionary["QPA"] = "yes";
+ }
+
+ else if (configCmdLine.at(i) == "-cups") {
+ dictionary["QT_CUPS"] = "yes";
+ } else if (configCmdLine.at(i) == "-no-cups") {
+ dictionary["QT_CUPS"] = "no";
+ }
+
+ else if (configCmdLine.at(i) == "-iconv") {
+ dictionary["QT_ICONV"] = "yes";
+ } else if (configCmdLine.at(i) == "-no-iconv") {
+ dictionary["QT_ICONV"] = "no";
+ }
+
+ else if (configCmdLine.at(i) == "-neon") {
+ dictionary["NEON"] = "yes";
+ } else if (configCmdLine.at(i) == "-no-neon") {
+ dictionary["NEON"] = "no";
+ }
+
+ else if (configCmdLine.at(i) == "-largefile") {
+ dictionary["LARGE_FILE"] = "yes";
+ }
+
+ else if (configCmdLine.at(i) == "-little-endian") {
+ dictionary["LITTLE_ENDIAN"] = "yes";
+ }
+
+ else if (configCmdLine.at(i) == "-big-endian") {
+ dictionary["LITTLE_ENDIAN"] = "no";
+ }
+
+ else if (configCmdLine.at(i) == "-fontconfig") {
+ dictionary["FONT_CONFIG"] = "yes";
+ }
+
+ else if (configCmdLine.at(i) == "-no-fontconfig") {
+ dictionary["FONT_CONFIG"] = "no";
+ }
+
+ else if (configCmdLine.at(i) == "-posix-ipc") {
+ dictionary["POSIX_IPC"] = "yes";
+ }
+
else {
dictionary[ "HELP" ] = "yes";
cout << "Unknown option " << configCmdLine.at(i) << endl;
@@ -1520,6 +1581,11 @@ void Configure::desc(const char *mark_option, const char *mark, const char *opti
*/
void Configure::applySpecSpecifics()
{
+ if (!dictionary[ "XQMAKESPEC" ].isEmpty()) {
+ //Disable building tools, docs and translations when cross compiling.
+ disabledBuildParts << "docs" << "translations" << "tools";
+ }
+
if (dictionary[ "XQMAKESPEC" ].startsWith("wince")) {
dictionary[ "STYLE_WINDOWSXP" ] = "no";
dictionary[ "STYLE_WINDOWSVISTA" ] = "no";
@@ -1700,7 +1766,10 @@ bool Configure::displayHelp()
"[-no-script] [-script] [-no-scripttools] [-scripttools]\n"
"[-no-webkit] [-webkit] [-webkit-debug]\n"
"[-graphicssystem raster|opengl|openvg]\n"
- "[-no-directwrite] [-directwrite]\n\n", 0, 7);
+ "[-no-directwrite] [-directwrite] [-no-nis] [-nis] [-qpa]\n"
+ "[-no-cups] [-cups] [-no-iconv] [-iconv] [-sun-iconv] [-gnu-iconv]\n"
+ "[-neon] [-no-neon] [-largefile] [-little-endian] [-big-endian]\n"
+ "[-font-config] [-no-fontconfig] [-posix-ipc]\n\n", 0, 7);
desc("Installation options:\n\n");
@@ -1798,6 +1867,29 @@ bool Configure::displayHelp()
desc( "-xplatform <spec>", "The operating system and compiler you are cross compiling to.\n");
desc( "", "See the README file for a list of supported operating systems and compilers.\n", false, ' ');
+ desc("NIS", "no", "-no-nis", "Do not build NIS support.");
+ desc("NIS", "yes", "-nis", "Build NIS support.");
+
+ desc("QPA", "yes", "-qpa", "Enable the QPA build. QPA is a window system agnostic implementation of Qt.");
+
+ desc("NEON", "yes", "-neon", "Enable the use of NEON instructions.");
+ desc("NEON", "no", "-no-neon", "Do not enable the use of NEON instructions.");
+
+ desc("QT_ICONV", "disable", "-no-iconv", "Do not enable support for iconv(3).");
+ desc("QT_ICONV", "yes", "-iconv", "Enable support for iconv(3).");
+ desc("QT_ICONV", "yes", "-sun-iconv", "Enable support for iconv(3) using sun-iconv.");
+ desc("QT_ICONV", "yes", "-gnu-iconv", "Enable support for iconv(3) using gnu-libiconv");
+
+ desc("LARGE_FILE", "yes", "-largefile", "Enables Qt to access files larger than 4 GB.");
+
+ desc("LITTLE_ENDIAN", "yes", "-little-endian","Target platform is little endian (LSB first).");
+ desc("LITTLE_ENDIAN", "no", "-big-endian", "Target platform is big endian (MSB first).");
+
+ desc("FONT_CONFIG", "yes", "-fontconfig", "Build with FontConfig support.");
+ desc("FONT_CONFIG", "no", "-no-fontconfig","Do not build with FontConfig support.");
+
+ desc("POSIX_IPC", "yes", "-posix-ipc", "Enable POSIX IPC.");
+
#if !defined(EVAL)
desc( "-qtnamespace <namespace>", "Wraps all Qt library code in 'namespace name {...}");
desc( "-qtlibinfix <infix>", "Renames all Qt* libs to Qt*<infix>\n");
@@ -1955,6 +2047,7 @@ bool Configure::displayHelp()
desc("Qt for Symbian OS only:\n\n");
desc("FREETYPE", "no", "-no-freetype", "Do not compile in Freetype2 support.");
desc("FREETYPE", "yes", "-qt-freetype", "Use the libfreetype bundled with Qt.");
+ desc("FREETYPE", "yes", "-system-freetype", "Use the libfreetype provided by the system.");
desc( "-fpu <flags>", "VFP type on ARM, supported options: softvfp(default) | vfpv2 | softvfp+vfpv2");
desc("S60", "no", "-no-s60", "Do not compile in S60 support.");
desc("S60", "yes", "-s60", "Compile with support for the S60 UI Framework");
@@ -2436,6 +2529,17 @@ bool Configure::verifyConfiguration()
exit(0); // Exit cleanly for Ctrl+C
}
+ if (dictionary["QPA"] == "yes") {
+ if (dictionary["QT3SUPPORT"] == "yes") {
+ dictionary["QT3SUPPORT"] = "no";
+
+ cout << "WARNING: Qt3 compatibility is not compatible with QPA builds." << endl
+ << "Qt3 compatibility (Qt3Support) will be disabled." << endl
+ << "(Press any key to continue..)";
+ if (_getch() == 3) // _Any_ keypress w/no echo(eat <Enter> for stdout)
+ exit(0); // Exit cleanly for Ctrl+C
+ }
+ }
return true;
}
@@ -2589,6 +2693,8 @@ void Configure::generateOutputVars()
// Text rendering --------------------------------------------------
if (dictionary[ "FREETYPE" ] == "yes")
qtConfig += "freetype";
+ else if (dictionary[ "FREETYPE" ] == "system")
+ qtConfig += "system-freetype";
// Styles -------------------------------------------------------
if (dictionary[ "STYLE_WINDOWS" ] == "yes")
@@ -2801,6 +2907,34 @@ void Configure::generateOutputVars()
if (dictionary[ "NATIVE_GESTURES" ] == "yes")
qtConfig += "native-gestures";
+ if (dictionary["QPA"] == "yes")
+ qtConfig += "qpa";
+
+ if (dictionary["NIS"] == "yes")
+ qtConfig += "nis";
+
+ if (dictionary["CUPS"] == "yes")
+ qtConfig += "cups";
+
+ if (dictionary["QT_ICONV"] == "yes")
+ qtConfig += "iconv";
+ else if (dictionary["QT_ICONV"] == "sun")
+ qtConfig += "sun-libiconv";
+ else if (dictionary["QT_ICONV"] == "gnu")
+ qtConfig += "gnu-libiconv";
+
+ if (dictionary["NEON"] == "yes")
+ qtConfig += "neon";
+
+ if (dictionary["LARGE_FILE"] == "yes")
+ qtConfig += "largefile";
+
+ if (dictionary["FONT_CONFIG"] == "yes") {
+ qtConfig += "fontconfig";
+ qmakeVars += "QMAKE_CFLAGS_FONTCONFIG =";
+ qmakeVars += "QMAKE_LIBS_FONTCONFIG = -lfreetype -lfontconfig";
+ }
+
// We currently have no switch for QtSvg, so add it unconditionally.
qtConfig += "svg";
// We currently have no switch for QtConcurrent, so add it unconditionally.
@@ -3021,6 +3155,28 @@ void Configure::generateCachefile()
configStream << " incredibuild_xge";
if (dictionary["PLUGIN_MANIFESTS"] == "no")
configStream << " no_plugin_manifest";
+ if (dictionary["QPA"] == "yes")
+ configStream << " qpa";
+ if (dictionary["NIS"] == "yes")
+ configStream << " nis";
+ if (dictionary["QT_CUPS"] == "yes")
+ configStream << " cups";
+
+ if (dictionary["QT_ICONV"] == "yes")
+ configStream << " iconv";
+ else if (dictionary["QT_ICONV"] == "sun")
+ configStream << " sun-libiconv";
+ else if (dictionary["QT_ICONV"] == "gnu")
+ configStream << " gnu-libiconv";
+
+ if (dictionary["NEON"] == "yes")
+ configStream << " neon";
+
+ if (dictionary["LARGE_FILE"] == "yes")
+ configStream << " largefile";
+
+ if (dictionary["FONT_CONFIG"] == "yes")
+ configStream << " fontconfig";
if (dictionary.contains("SYMBIAN_DEFFILES")) {
if (dictionary["SYMBIAN_DEFFILES"] == "yes") {
@@ -3158,7 +3314,11 @@ void Configure::generateConfigfiles()
tmpStream << "/* Machine byte-order */" << endl;
tmpStream << "#define Q_BIG_ENDIAN 4321" << endl;
tmpStream << "#define Q_LITTLE_ENDIAN 1234" << endl;
- tmpStream << "#define Q_BYTE_ORDER Q_LITTLE_ENDIAN" << endl;
+
+ if (dictionary["LITTLE_ENDIAN"] == "yes")
+ tmpStream << "#define Q_BYTE_ORDER Q_LITTLE_ENDIAN" << endl;
+ else
+ tmpStream << "#define Q_BYTE_ORDER Q_BIG_ENDIAN" << endl;
tmpStream << endl << "// Compile time features" << endl;
tmpStream << "#define QT_ARCH_" << dictionary["ARCHITECTURE"].toUpper() << endl;
@@ -3234,6 +3394,22 @@ void Configure::generateConfigfiles()
if (dictionary["GRAPHICS_SYSTEM"] == "raster") qconfigList += "QT_GRAPHICSSYSTEM_RASTER";
if (dictionary["GRAPHICS_SYSTEM"] == "runtime") qconfigList += "QT_GRAPHICSSYSTEM_RUNTIME";
+ if (dictionary["POSIX_IPC"] == "yes") qconfigList += "QT_POSIX_IPC";
+
+ if (dictionary["QPA"] == "yes")
+ qconfigList << "Q_WS_QPA" << "QT_NO_QWS_QPF" << "QT_NO_QWS_QPF2";
+
+ if (dictionary["NIS"] == "yes")
+ qconfigList << "QT_NIS";
+ else
+ qconfigList << "QT_NO_NIS";
+
+ if (dictionary["LARGE_FILE"] == "yes")
+ tmpStream << "#define QT_LARGEFILE_SUPPORT 64" << endl;
+
+ if (dictionary["FONT_CONFIG"] == "no")
+ qconfigList << "QT_NO_FONTCONFIG";
+
if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) {
// These features are not ported to Symbian (yet)
qconfigList += "QT_NO_CRASHHANDLER";
@@ -3477,6 +3653,7 @@ void Configure::displayConfig()
cout << "SSE support................." << dictionary[ "SSE" ] << endl;
cout << "SSE2 support................" << dictionary[ "SSE2" ] << endl;
cout << "IWMMXT support.............." << dictionary[ "IWMMXT" ] << endl;
+ cout << "NEON support................" << dictionary[ "NEON" ] << endl;
cout << "OpenGL support.............." << dictionary[ "OPENGL" ] << endl;
cout << "OpenVG support.............." << dictionary[ "OPENVG" ] << endl;
cout << "OpenSSL support............." << dictionary[ "OPENSSL" ] << endl;
@@ -3484,6 +3661,9 @@ void Configure::displayConfig()
cout << "QtXmlPatterns support......." << dictionary[ "XMLPATTERNS" ] << endl;
cout << "Phonon support.............." << dictionary[ "PHONON" ] << endl;
cout << "QtMultimedia support........" << dictionary[ "MULTIMEDIA" ] << endl;
+ cout << "Large File support.........." << dictionary[ "LARGE_FILE" ] << endl;
+ cout << "NIS support................." << dictionary[ "NIS" ] << endl;
+ cout << "Iconv support..............." << dictionary[ "QT_ICONV" ] << endl;
{
QString webkit = dictionary[ "WEBKIT" ];
if (webkit == "debug")
@@ -4085,6 +4265,8 @@ void Configure::readLicense()
dictionary["PLATFORM NAME"] = "Qt for Windows CE";
else if (dictionary.value("XQMAKESPEC").startsWith("symbian"))
dictionary["PLATFORM NAME"] = "Qt for Symbian";
+ else if (dictionary["QPA"] == "yes")
+ dictionary["PLATFORM NAME"] = "Qt for QPA";
else
dictionary["PLATFORM NAME"] = "Qt for Windows";
dictionary["LICENSE FILE"] = sourcePath;