diff options
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r-- | tools/configure/configureapp.cpp | 350 |
1 files changed, 56 insertions, 294 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 395c4a0b54..dfd90ee97f 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -137,7 +137,6 @@ Configure::Configure(int& argc, char** argv) : verbose(0) dictionary[ "QMAKESPEC_FROM" ] = "env"; } - dictionary[ "QCONFIG" ] = "full"; dictionary[ "EMBEDDED" ] = "no"; dictionary[ "BUILD_QMAKE" ] = "yes"; dictionary[ "QMAKE_INTERNAL" ] = "no"; @@ -156,7 +155,6 @@ Configure::Configure(int& argc, char** argv) : verbose(0) dictionary[ "AVX2" ] = "auto"; dictionary[ "AVX512" ] = "auto"; dictionary[ "SYNCQT" ] = "auto"; - dictionary[ "AUDIO_BACKEND" ] = "auto"; dictionary[ "WMF_BACKEND" ] = "no"; dictionary[ "WMSDK" ] = "auto"; dictionary[ "QML_DEBUG" ] = "yes"; @@ -182,7 +180,7 @@ Configure::Configure(int& argc, char** argv) : verbose(0) dictionary[ "QNX_IMF" ] = "no"; dictionary[ "PPS" ] = "no"; dictionary[ "LGMON" ] = "no"; - dictionary[ "SYSTEM_PROXIES" ] = "no"; + dictionary[ "SYSTEM_PROXIES" ] = "yes"; dictionary[ "WERROR" ] = "auto"; dictionary[ "QREAL" ] = "double"; dictionary[ "ATOMIC64" ] = "auto"; @@ -241,7 +239,7 @@ Configure::Configure(int& argc, char** argv) : verbose(0) dictionary[ "STATIC_RUNTIME" ] = "no"; - dictionary[ "ZLIB" ] = "auto"; + dictionary[ "SYSTEM_ZLIB" ] = "auto"; dictionary[ "PCRE" ] = "auto"; @@ -250,9 +248,9 @@ Configure::Configure(int& argc, char** argv) : verbose(0) dictionary[ "ANGLE" ] = "auto"; dictionary[ "DYNAMICGL" ] = "auto"; - dictionary[ "GIF" ] = "auto"; - dictionary[ "JPEG" ] = "auto"; - dictionary[ "PNG" ] = "auto"; + dictionary[ "GIF" ] = "yes"; + dictionary[ "JPEG" ] = "yes"; + dictionary[ "PNG" ] = "yes"; dictionary[ "LIBJPEG" ] = "auto"; dictionary[ "LIBPNG" ] = "auto"; dictionary[ "DOUBLECONVERSION" ] = "auto"; @@ -263,10 +261,9 @@ Configure::Configure(int& argc, char** argv) : verbose(0) dictionary[ "ACCESSIBILITY" ] = "yes"; dictionary[ "OPENGL" ] = "yes"; dictionary[ "OPENGL_ES_2" ] = "yes"; - dictionary[ "OPENVG" ] = "no"; dictionary[ "SSL" ] = "auto"; dictionary[ "OPENSSL" ] = "auto"; - dictionary[ "LIBPROXY" ] = "auto"; + dictionary[ "LIBPROXY" ] = "no"; dictionary[ "DBUS" ] = "auto"; dictionary[ "STYLE_WINDOWS" ] = "yes"; @@ -365,7 +362,6 @@ void Configure::parseCmdLine() int argCount = configCmdLine.size(); int i = 0; - const QStringList imageFormats = QStringList() << "gif" << "png" << "jpeg"; if (argCount < 1) // skip rest if no arguments ; @@ -416,12 +412,6 @@ void Configure::parseCmdLine() ++verbose; } - else if (configCmdLine.at(i) == "-qconfig") { - ++i; - if (i == argCount) - break; - dictionary[ "QCONFIG" ] = configCmdLine.at(i); - } else if (configCmdLine.at(i) == "-qreal") { ++i; if (i == argCount) @@ -558,24 +548,11 @@ void Configure::parseCmdLine() devOpt.append("\n").append(option); else devOpt = option; - } - - else if (configCmdLine.at(i) == "-no-zlib") { - // No longer supported since Qt 4.4.0 - // But save the information for later so that we can print a warning - // - // If you REALLY really need no zlib support, you can still disable - // it by doing the following: - // add "no-zlib" to mkspecs/qconfig.pri - // #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h) - // - // There's no guarantee that Qt will build under those conditions - dictionary[ "ZLIB_FORCED" ] = "yes"; } else if (configCmdLine.at(i) == "-qt-zlib") { - dictionary[ "ZLIB" ] = "qt"; + dictionary[ "SYSTEM_ZLIB" ] = "no"; } else if (configCmdLine.at(i) == "-system-zlib") { - dictionary[ "ZLIB" ] = "system"; + dictionary[ "SYSTEM_ZLIB" ] = "yes"; } else if (configCmdLine.at(i) == "-qt-pcre") { @@ -701,89 +678,55 @@ void Configure::parseCmdLine() } } - // OpenVG Support ------------------------------------------- - else if (configCmdLine.at(i) == "-openvg") { - dictionary[ "OPENVG" ] = "yes"; - } else if (configCmdLine.at(i) == "-no-openvg") { - dictionary[ "OPENVG" ] = "no"; - } - // Databases ------------------------------------------------ - else if (configCmdLine.at(i) == "-qt-sql-mysql") + else if (configCmdLine.at(i) == "-sql-mysql" || configCmdLine.at(i) == "-plugin-sql-mysql") dictionary[ "SQL_MYSQL" ] = "yes"; - else if (configCmdLine.at(i) == "-plugin-sql-mysql") - dictionary[ "SQL_MYSQL" ] = "plugin"; else if (configCmdLine.at(i) == "-no-sql-mysql") dictionary[ "SQL_MYSQL" ] = "no"; - else if (configCmdLine.at(i) == "-qt-sql-odbc") + else if (configCmdLine.at(i) == "-sql-odbc" || configCmdLine.at(i) == "-plugin-sql-odbc") dictionary[ "SQL_ODBC" ] = "yes"; - else if (configCmdLine.at(i) == "-plugin-sql-odbc") - dictionary[ "SQL_ODBC" ] = "plugin"; else if (configCmdLine.at(i) == "-no-sql-odbc") dictionary[ "SQL_ODBC" ] = "no"; - else if (configCmdLine.at(i) == "-qt-sql-oci") + else if (configCmdLine.at(i) == "-sql-oci" || configCmdLine.at(i) == "-plugin-sql-oci") dictionary[ "SQL_OCI" ] = "yes"; - else if (configCmdLine.at(i) == "-plugin-sql-oci") - dictionary[ "SQL_OCI" ] = "plugin"; else if (configCmdLine.at(i) == "-no-sql-oci") dictionary[ "SQL_OCI" ] = "no"; - else if (configCmdLine.at(i) == "-qt-sql-psql") + else if (configCmdLine.at(i) == "-sql-psql" || configCmdLine.at(i) == "-plugin-sql-psql") dictionary[ "SQL_PSQL" ] = "yes"; - else if (configCmdLine.at(i) == "-plugin-sql-psql") - dictionary[ "SQL_PSQL" ] = "plugin"; else if (configCmdLine.at(i) == "-no-sql-psql") dictionary[ "SQL_PSQL" ] = "no"; - else if (configCmdLine.at(i) == "-qt-sql-tds") + else if (configCmdLine.at(i) == "-sql-tds" || configCmdLine.at(i) == "-plugin-sql-tds") dictionary[ "SQL_TDS" ] = "yes"; - else if (configCmdLine.at(i) == "-plugin-sql-tds") - dictionary[ "SQL_TDS" ] = "plugin"; else if (configCmdLine.at(i) == "-no-sql-tds") dictionary[ "SQL_TDS" ] = "no"; - else if (configCmdLine.at(i) == "-qt-sql-db2") + else if (configCmdLine.at(i) == "-sql-db2") dictionary[ "SQL_DB2" ] = "yes"; else if (configCmdLine.at(i) == "-plugin-sql-db2") dictionary[ "SQL_DB2" ] = "plugin"; else if (configCmdLine.at(i) == "-no-sql-db2") dictionary[ "SQL_DB2" ] = "no"; - else if (configCmdLine.at(i) == "-qt-sql-sqlite") + else if (configCmdLine.at(i) == "-sql-sqlite" || configCmdLine.at(i) == "-plugin-sql-sqlite") dictionary[ "SQL_SQLITE" ] = "yes"; - else if (configCmdLine.at(i) == "-plugin-sql-sqlite") - dictionary[ "SQL_SQLITE" ] = "plugin"; else if (configCmdLine.at(i) == "-no-sql-sqlite") dictionary[ "SQL_SQLITE" ] = "no"; else if (configCmdLine.at(i) == "-system-sqlite") dictionary[ "SQL_SQLITE_LIB" ] = "system"; - else if (configCmdLine.at(i) == "-qt-sql-sqlite2") + else if (configCmdLine.at(i) == "-sql-sqlite2" || configCmdLine.at(i) == "-plugin-sql-sqlite2") dictionary[ "SQL_SQLITE2" ] = "yes"; - else if (configCmdLine.at(i) == "-plugin-sql-sqlite2") - dictionary[ "SQL_SQLITE2" ] = "plugin"; else if (configCmdLine.at(i) == "-no-sql-sqlite2") dictionary[ "SQL_SQLITE2" ] = "no"; - else if (configCmdLine.at(i) == "-qt-sql-ibase") + else if (configCmdLine.at(i) == "-sql-ibase" || configCmdLine.at(i) == "-plugin-sql-ibase") dictionary[ "SQL_IBASE" ] = "yes"; - else if (configCmdLine.at(i) == "-plugin-sql-ibase") - dictionary[ "SQL_IBASE" ] = "plugin"; else if (configCmdLine.at(i) == "-no-sql-ibase") dictionary[ "SQL_IBASE" ] = "no"; - // Image formats -------------------------------------------- - else if (configCmdLine.at(i).startsWith("-qt-imageformat-") && - imageFormats.contains(configCmdLine.at(i).section('-', 3))) - dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "yes"; - else if (configCmdLine.at(i).startsWith("-plugin-imageformat-") && - imageFormats.contains(configCmdLine.at(i).section('-', 3))) - dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "plugin"; - else if (configCmdLine.at(i).startsWith("-no-imageformat-") && - imageFormats.contains(configCmdLine.at(i).section('-', 3))) - dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "no"; - else if (configCmdLine.at(i) == "-no-incredibuild-xge") dictionary[ "INCREDIBUILD_XGE" ] = "no"; else if (configCmdLine.at(i) == "-incredibuild-xge") @@ -886,10 +829,6 @@ void Configure::parseCmdLine() dictionary[ "DBUS" ] = "linked"; } else if (configCmdLine.at(i) == "-dbus-runtime") { dictionary[ "DBUS" ] = "runtime"; - } else if (configCmdLine.at(i) == "-audio-backend") { - dictionary[ "AUDIO_BACKEND" ] = "yes"; - } else if (configCmdLine.at(i) == "-no-audio-backend") { - dictionary[ "AUDIO_BACKEND" ] = "no"; } else if (configCmdLine.at(i) == "-wmf-backend") { dictionary[ "WMF_BACKEND" ] = "yes"; } else if (configCmdLine.at(i) == "-no-wmf-backend") { @@ -1286,10 +1225,6 @@ void Configure::parseCmdLine() dictionary["QT_INOTIFY"] = "no"; } - else if (configCmdLine.at(i) == "-largefile") { - dictionary["LARGE_FILE"] = "yes"; - } - else if (configCmdLine.at(i) == "-fontconfig") { dictionary["FONT_CONFIG"] = "yes"; } else if (configCmdLine.at(i) == "-no-fontconfig") { @@ -1473,35 +1408,6 @@ void Configure::parseCmdLine() void Configure::validateArgs() { - // Validate the specified config - QString cfgpath = sourcePath + "/src/corelib/global/qconfig-" + dictionary["QCONFIG"] + ".h"; - - // Try internal configurations first. - QStringList possible_configs = QStringList() - << "minimal" - << "small" - << "medium" - << "large" - << "full"; - int index = possible_configs.indexOf(dictionary["QCONFIG"]); - if (index >= 0) { - for (int c = 0; c <= index; c++) { - qtConfig += possible_configs[c] + "-config"; - } - if (dictionary["QCONFIG"] != "full") - dictionary["QCONFIG_PATH"] = cfgpath; - return; - } - - if (!QFileInfo::exists(cfgpath)) { - cfgpath = QFileInfo(dictionary["QCONFIG"]).absoluteFilePath(); - if (!QFileInfo::exists(cfgpath)) { - dictionary[ "DONE" ] = "error"; - cout << "No such configuration \"" << qPrintable(dictionary["QCONFIG"]) << "\"" << endl ; - return; - } - } - dictionary["QCONFIG_PATH"] = cfgpath; } // Output helper functions --------------------------------[ Start ]- @@ -1619,18 +1525,15 @@ void Configure::applySpecSpecifics() if (dictionary.value("XQMAKESPEC").startsWith("winphone") || dictionary.value("XQMAKESPEC").startsWith("winrt")) { dictionary[ "STYLE_WINDOWSXP" ] = "no"; dictionary[ "STYLE_WINDOWSVISTA" ] = "no"; - dictionary[ "GIF" ] = "qt"; - dictionary[ "JPEG" ] = "qt"; dictionary[ "LIBJPEG" ] = "qt"; dictionary[ "LIBPNG" ] = "qt"; dictionary[ "FREETYPE" ] = "yes"; dictionary[ "OPENGL" ] = "yes"; dictionary[ "OPENGL_ES_2" ] = "yes"; - dictionary[ "OPENVG" ] = "no"; dictionary[ "SSL" ] = "yes"; dictionary[ "OPENSSL" ] = "no"; dictionary[ "DBUS" ] = "no"; - dictionary[ "ZLIB" ] = "qt"; + dictionary[ "SYSTEM_ZLIB" ] = "no"; dictionary[ "PCRE" ] = "qt"; dictionary[ "ICU" ] = "qt"; dictionary[ "LARGE_FILE" ] = "no"; @@ -1810,8 +1713,6 @@ bool Configure::displayHelp() desc("", "no", "", " dynamic - Enable support for dynamically loaded OpenGL (either desktop or ES)", ' '); desc("OPENGL_ES_2", "yes", "", " es2 - Enable support for OpenGL ES 2.0\n", ' '); - desc("OPENVG", "no","-no-openvg", "Disables OpenVG functionality."); - desc("OPENVG", "yes","-openvg", "Enables OpenVG functionality.\n"); desc( "-force-asserts", "Activate asserts in release mode.\n"); desc( "-platform <spec>", "The operating system and compiler you are building on.\n(default %QMAKESPEC%)\n"); desc( "-xplatform <spec>", "The operating system and compiler you are cross compiling to.\n"); @@ -1846,8 +1747,6 @@ bool Configure::displayHelp() desc("QT_EVENTFD", "yes", "-eventfd", "Enable eventfd(7) support in the UNIX event loop."); desc("QT_EVENTFD", "no", "-no-eventfd", "Disable eventfd(7) support in the UNIX event loop.\n"); - desc("LARGE_FILE", "yes", "-largefile", "Enables Qt to access files larger than 4 GB.\n"); - desc("POSIX_IPC", "yes", "-posix-ipc", "Enable POSIX IPC.\n"); desc("QT_GLIB", "yes", "-glib", "Compile Glib support.\n"); @@ -1875,8 +1774,8 @@ bool Configure::displayHelp() // 3rd party stuff options go below here -------------------------------------------------------------------------------- desc("Third Party Libraries:\n\n"); - desc("ZLIB", "qt", "-qt-zlib", "Use the zlib bundled with Qt."); - desc("ZLIB", "system", "-system-zlib", "Use zlib from the operating system.\nSee http://www.gzip.org/zlib\n"); + desc("SYSTEM_ZLIB", "no", "-qt-zlib", "Use the zlib bundled with Qt."); + desc("SYSTEM_ZLIB", "yes", "-system-zlib", "Use zlib from the operating system.\nSee http://www.gzip.org/zlib\n"); desc("PCRE", "qt", "-qt-pcre", "Use the PCRE library bundled with Qt."); desc("PCRE", "system", "-system-pcre", "Use the PCRE library from the operating system.\nSee http://pcre.org/\n"); @@ -1972,8 +1871,6 @@ bool Configure::displayHelp() desc("DBUS", "no", "-no-dbus", "Do not compile in D-Bus support."); desc("DBUS", "linked", "-dbus-linked", "Compile in D-Bus support and link to libdbus-1.\n"); desc("DBUS", "runtime", "-dbus-runtime", "Compile in D-Bus support and load libdbus-1\ndynamically."); - desc("AUDIO_BACKEND", "no","-no-audio-backend", "Do not compile in the platform audio backend into\nQt Multimedia."); - desc("AUDIO_BACKEND", "yes","-audio-backend", "Compile in the platform audio backend into Qt Multimedia.\n"); desc("WMF_BACKEND", "no","-no-wmf-backend", "Do not compile in the windows media foundation backend\ninto Qt Multimedia."); desc("WMF_BACKEND", "yes","-wmf-backend", "Compile in the windows media foundation backend into Qt Multimedia.\n"); desc("QML_DEBUG", "no", "-no-qml-debug", "Do not build the in-process QML debugging support."); @@ -2039,16 +1936,11 @@ QString Configure::locateFile(const QString &fileName) const QString Configure::defaultTo(const QString &option) { // We prefer using the system version of the 3rd party libs - if (option == "ZLIB" - || option == "PCRE" + if (option == "PCRE" || option == "LIBJPEG" || option == "LIBPNG") return "system"; - // PNG is always built-in, never a plugin - if (option == "PNG") - return "yes"; - // These database drivers and image formats can be built-in or plugins. // Prefer plugins when Qt is shared. if (dictionary[ "SHARED" ] == "yes") { @@ -2061,10 +1953,8 @@ QString Configure::defaultTo(const QString &option) || option == "SQL_DB2" || option == "SQL_SQLITE" || option == "SQL_SQLITE2" - || option == "SQL_IBASE" - || option == "JPEG" - || option == "GIF") - return "plugin"; + || option == "SQL_IBASE") + return "yes"; } // By default we do not want to compile OCI driver when compiling with @@ -2175,7 +2065,7 @@ bool Configure::checkAvailability(const QString &part) else if (part == "ATOMICFPTR") available = tryCompileProject("common/atomicfptr"); - else if (part == "ZLIB") + else if (part == "SYSTEM_ZLIB") available = findFile("zlib.h"); else if (part == "PCRE") @@ -2213,11 +2103,11 @@ bool Configure::checkAvailability(const QString &part) if (dictionary[ "SQL_SQLITE_LIB" ] == "system") { if (platform() == QNX) { available = true; - dictionary[ "QT_LFLAGS_SQLITE" ] += "-lsqlite3 -lz"; + dictionary[ "QMAKE_LIBS_SQLITE" ] += "-lsqlite3 -lz"; } else { available = findFile("sqlite3.h") && findFile("sqlite3.lib"); if (available) - dictionary[ "QT_LFLAGS_SQLITE" ] += "sqlite3.lib"; + dictionary[ "QMAKE_LIBS_SQLITE" ] += "sqlite3.lib"; } } else { available = true; @@ -2251,8 +2141,6 @@ bool Configure::checkAvailability(const QString &part) && !QStandardPaths::findExecutable(QStringLiteral("xgConsole.exe")).isEmpty(); } else if (part == "WMSDK") { available = findFile("wmsdk.h"); - } else if (part == "AUDIO_BACKEND") { - available = true; } else if (part == "WMF_BACKEND") { available = findFile("mfapi.h") && findFile("mf.lib"); } else if (part == "DIRECTWRITE") { @@ -2321,22 +2209,6 @@ void Configure::autoDetection() } } - if (!dictionary["QMAKESPEC"].contains("msvc")) { - if (tryCompileProject("common/c++default", QString(), false)) { - QFile iiFile(buildPath + "/config.tests/common/c++default/c++default.ii"); - if (iiFile.open(QIODevice::ReadOnly)) { - QString content = QString::fromUtf8(iiFile.readAll()); - QRegExp expr("\\b([0-9]+)L\\b"); - if (expr.indexIn(content) != -1) - dictionary["CFG_STDCXX_DEFAULT"] = expr.cap(1); - } - } - if (dictionary["CFG_STDCXX_DEFAULT"].isEmpty()) { - cout << "Could not determine the C++ standard the compiler uses by default, assuming C++98." << endl; - dictionary["CFG_STDCXX_DEFAULT"] = "199711"; - } - } - if (dictionary["ATOMIC64"] == "auto") dictionary["ATOMIC64"] = checkAvailability("ATOMIC64") ? "yes" : checkAvailability("ATOMIC64-LIBATOMIC") ? "libatomic" : "no"; @@ -2357,8 +2229,8 @@ void Configure::autoDetection() dictionary["STYLE_WINDOWSVISTA"] = checkAvailability("STYLE_WINDOWSXP") ? defaultTo("STYLE_WINDOWSVISTA") : "no"; // Compression detection - if (dictionary["ZLIB"] == "auto") - dictionary["ZLIB"] = checkAvailability("ZLIB") ? defaultTo("ZLIB") : "qt"; + if (dictionary["SYSTEM_ZLIB"] == "auto") + dictionary["SYSTEM_ZLIB"] = checkAvailability("SYSTEM_ZLIB") ? "yes" : "no"; // PCRE detection if (dictionary["PCRE"] == "auto") @@ -2383,12 +2255,6 @@ void Configure::autoDetection() dictionary["DYNAMICGL"] = "no"; // Image format detection - if (dictionary["GIF"] == "auto") - dictionary["GIF"] = defaultTo("GIF"); - if (dictionary["JPEG"] == "auto") - dictionary["JPEG"] = defaultTo("JPEG"); - if (dictionary["PNG"] == "auto") - dictionary["PNG"] = defaultTo("PNG"); if (dictionary["LIBJPEG"] == "auto") dictionary["LIBJPEG"] = checkAvailability("LIBJPEG") ? defaultTo("LIBJPEG") : "qt"; if (dictionary["LIBPNG"] == "auto") @@ -2454,8 +2320,6 @@ void Configure::autoDetection() dictionary["DBUS"] = checkAvailability("DBUS") ? "linked" : "runtime"; if (dictionary["QML_DEBUG"] == "auto") dictionary["QML_DEBUG"] = dictionary["QML"] == "yes" ? "yes" : "no"; - if (dictionary["AUDIO_BACKEND"] == "auto") - dictionary["AUDIO_BACKEND"] = checkAvailability("AUDIO_BACKEND") ? "yes" : "no"; if (dictionary["WMF_BACKEND"] == "auto") dictionary["WMF_BACKEND"] = checkAvailability("WMF_BACKEND") ? "yes" : "no"; if (dictionary["WMSDK"] == "auto") @@ -2723,8 +2587,6 @@ void Configure::generateOutputVars() qtConfig += "c++11 c++14"; else if (dictionary[ "C++STD" ] == "c++1z") qtConfig += "c++11 c++14 c++1z"; - if (!dictionary[ "CFG_STDCXX_DEFAULT" ].isEmpty()) - qmakeVars += "QT_COMPILER_STDCXX = " + dictionary[ "CFG_STDCXX_DEFAULT" ]; if (dictionary[ "USE_GOLD_LINKER" ] == "yes") qmakeConfig += "use_gold_linker"; @@ -2749,9 +2611,7 @@ void Configure::generateOutputVars() qtConfig += "no-widgets"; // Compression -------------------------------------------------- - if (dictionary[ "ZLIB" ] == "qt") - qtConfig += "zlib"; - else if (dictionary[ "ZLIB" ] == "system") + if (dictionary[ "SYSTEM_ZLIB" ] == "yes") qtConfig += "system-zlib"; // PCRE --------------------------------------------------------- @@ -2773,42 +2633,34 @@ void Configure::generateOutputVars() } // Image formates ----------------------------------------------- - if (dictionary[ "GIF" ] == "no") - qtConfig += "no-gif"; - else if (dictionary[ "GIF" ] == "yes") + if (dictionary[ "GIF" ] == "yes") qtConfig += "gif"; - if (dictionary[ "JPEG" ] == "no") - qtConfig += "no-jpeg"; - else if (dictionary[ "JPEG" ] == "yes") + if (dictionary[ "JPEG" ] == "yes") qtConfig += "jpeg"; if (dictionary[ "LIBJPEG" ] == "system") qtConfig += "system-jpeg"; - if (dictionary[ "PNG" ] == "no") - qtConfig += "no-png"; - else if (dictionary[ "PNG" ] == "yes") + if (dictionary[ "PNG" ] == "yes") qtConfig += "png"; if (dictionary[ "LIBPNG" ] == "system") qtConfig += "system-png"; // Double conversion ----------------------------------------------- - if (dictionary[ "DOUBLECONVERSION" ] == "qt") + if (dictionary[ "DOUBLECONVERSION" ] != "no") qtConfig += "doubleconversion"; - else if (dictionary[ "DOUBLECONVERSION" ] == "system") + if (dictionary[ "DOUBLECONVERSION" ] == "system") qtConfig += "system-doubleconversion"; - else if (dictionary[ "DOUBLECONVERSION" ] == "no") - qtConfig += "no-doubleconversion"; // Text rendering -------------------------------------------------- - if (dictionary[ "FREETYPE" ] == "yes") + if (dictionary[ "FREETYPE" ] != "no") qtConfig += "freetype"; - else if (dictionary[ "FREETYPE" ] == "system") + if (dictionary[ "FREETYPE" ] == "system") qtConfig += "system-freetype"; - if (dictionary[ "HARFBUZZ" ] == "qt") + if (dictionary[ "HARFBUZZ" ] != "no") qtConfig += "harfbuzz"; - else if (dictionary[ "HARFBUZZ" ] == "system") + if (dictionary[ "HARFBUZZ" ] == "system") qtConfig += "system-harfbuzz"; // Styles ------------------------------------------------------- @@ -2830,52 +2682,26 @@ void Configure::generateOutputVars() // Databases ---------------------------------------------------- if (dictionary[ "SQL_MYSQL" ] == "yes") qmakeSql += "mysql"; - else if (dictionary[ "SQL_MYSQL" ] == "plugin") - qmakeSqlPlugins += "mysql"; - if (dictionary[ "SQL_ODBC" ] == "yes") qmakeSql += "odbc"; - else if (dictionary[ "SQL_ODBC" ] == "plugin") - qmakeSqlPlugins += "odbc"; - if (dictionary[ "SQL_OCI" ] == "yes") qmakeSql += "oci"; - else if (dictionary[ "SQL_OCI" ] == "plugin") - qmakeSqlPlugins += "oci"; - if (dictionary[ "SQL_PSQL" ] == "yes") qmakeSql += "psql"; - else if (dictionary[ "SQL_PSQL" ] == "plugin") - qmakeSqlPlugins += "psql"; - if (dictionary[ "SQL_TDS" ] == "yes") qmakeSql += "tds"; - else if (dictionary[ "SQL_TDS" ] == "plugin") - qmakeSqlPlugins += "tds"; - if (dictionary[ "SQL_DB2" ] == "yes") qmakeSql += "db2"; - else if (dictionary[ "SQL_DB2" ] == "plugin") - qmakeSqlPlugins += "db2"; - + if (dictionary[ "SQL_SQLITE2" ] == "yes") + qmakeSql += "sqlite2"; + if (dictionary[ "SQL_IBASE" ] == "yes") + qmakeSql += "ibase"; if (dictionary[ "SQL_SQLITE" ] == "yes") qmakeSql += "sqlite"; - else if (dictionary[ "SQL_SQLITE" ] == "plugin") - qmakeSqlPlugins += "sqlite"; if (dictionary[ "SQL_SQLITE_LIB" ] == "system") qmakeConfig += "system-sqlite"; - if (dictionary[ "SQL_SQLITE2" ] == "yes") - qmakeSql += "sqlite2"; - else if (dictionary[ "SQL_SQLITE2" ] == "plugin") - qmakeSqlPlugins += "sqlite2"; - - if (dictionary[ "SQL_IBASE" ] == "yes") - qmakeSql += "ibase"; - else if (dictionary[ "SQL_IBASE" ] == "plugin") - qmakeSqlPlugins += "ibase"; - // Other options ------------------------------------------------ if (dictionary[ "BUILDALL" ] == "yes") { qtConfig += "build_all"; @@ -2920,8 +2746,8 @@ void Configure::generateOutputVars() if (!qmakeLibs.isEmpty()) qmakeVars += "EXTRA_LIBS += " + formatPaths(qmakeLibs); - if (!dictionary["QT_LFLAGS_SQLITE"].isEmpty()) - qmakeVars += "QT_LFLAGS_SQLITE += " + dictionary["QT_LFLAGS_SQLITE"]; + if (!dictionary["QMAKE_LIBS_SQLITE"].isEmpty()) + qmakeVars += "QMAKE_LIBS_SQLITE += " + dictionary["QMAKE_LIBS_SQLITE"]; if (dictionary[ "OPENGL" ] == "yes") qtConfig += "opengl"; @@ -2931,11 +2757,6 @@ void Configure::generateOutputVars() qtConfig += "egl"; } - if (dictionary["OPENVG"] == "yes") { - qtConfig += "openvg"; - qtConfig += "egl"; - } - if (dictionary[ "SSL" ] == "yes") qtConfig += "ssl"; @@ -2952,10 +2773,6 @@ void Configure::generateOutputVars() else if (dictionary[ "DBUS" ] == "linked") qtConfig += "dbus dbus-linked"; - // ### Vestige - if (dictionary["AUDIO_BACKEND"] == "yes") - qtConfig += "audio-backend"; - if (dictionary["QML_DEBUG"] == "no") qtConfig += "no-qml-debug"; @@ -2982,9 +2799,9 @@ void Configure::generateOutputVars() if (dictionary["QT_CUPS"] == "yes") qtConfig += "cups"; - if (dictionary["QT_ICONV"] == "yes") + if (dictionary["QT_ICONV"] != "no") qtConfig += "iconv"; - else if (dictionary["QT_ICONV"] == "sun") + if (dictionary["QT_ICONV"] == "sun") qtConfig += "sun-libiconv"; else if (dictionary["QT_ICONV"] == "gnu") qtConfig += "gnu-libiconv"; @@ -3062,8 +2879,8 @@ void Configure::generateOutputVars() } if (dictionary[ "DBUS" ] == "linked") { if (!dbusPath.isEmpty()) { - qmakeVars += QString("QT_CFLAGS_DBUS = -I%1/include").arg(dbusPath); - qmakeVars += QString("QT_LIBS_DBUS = -L%1/lib").arg(dbusPath); + qmakeVars += QString("QMAKE_CFLAGS_DBUS = -I%1/include").arg(dbusPath); + qmakeVars += QString("QMAKE_LIBS_DBUS = -L%1/lib").arg(dbusPath); if (dbusHostPath.isEmpty()) qmakeVars += QString("QT_HOST_CFLAGS_DBUS = -I%1/include").arg(dbusPath); } @@ -3071,11 +2888,11 @@ void Configure::generateOutputVars() qmakeVars += QString("QT_HOST_CFLAGS_DBUS = -I%1/include").arg(dbusHostPath); } if (dictionary[ "SQL_MYSQL" ] != "no" && !mysqlPath.isEmpty()) { - qmakeVars += QString("QT_CFLAGS_MYSQL = -I%1/include").arg(mysqlPath); - qmakeVars += QString("QT_LFLAGS_MYSQL = -L%1/lib").arg(mysqlPath); + qmakeVars += QString("QMAKE_CFLAGS_MYSQL = -I%1/include").arg(mysqlPath); + qmakeVars += QString("QMAKE_LIBS_MYSQL = -L%1/lib").arg(mysqlPath); } if (!psqlLibs.isEmpty()) - qmakeVars += QString("QT_LFLAGS_PSQL=") + psqlLibs.section("=", 1); + qmakeVars += QString("QMAKE_LIBS_PSQL=") + psqlLibs.section("=", 1); if (!zlibLibs.isEmpty()) qmakeVars += zlibLibs; @@ -3086,13 +2903,11 @@ void Configure::generateOutputVars() if (!sybaseLibs.isEmpty()) lflagsTDS += sybaseLibs.section("=", 1); if (!lflagsTDS.isEmpty()) - qmakeVars += QString("QT_LFLAGS_TDS=") + lflagsTDS.join(' '); + qmakeVars += QString("QMAKE_LIBS_TDS=") + lflagsTDS.join(' '); } if (!qmakeSql.isEmpty()) qmakeVars += QString("sql-drivers += ") + qmakeSql.join(' '); - if (!qmakeSqlPlugins.isEmpty()) - qmakeVars += QString("sql-plugins += ") + qmakeSqlPlugins.join(' '); if (!qmakeStyles.isEmpty()) qmakeVars += QString("styles += ") + qmakeStyles.join(' '); if (!qmakeStylePlugins.isEmpty()) @@ -3126,11 +2941,6 @@ void Configure::generateCachefile() moduleStream << "QT_BUILD_PARTS += " << buildParts.join(' ') << endl; if (!skipModules.isEmpty()) moduleStream << "QT_SKIP_MODULES += " << skipModules.join(' ') << endl; - QString qcpath = dictionary["QCONFIG_PATH"]; - QString qlpath = sourcePath + "/src/corelib/global/"; - if (qcpath.startsWith(qlpath)) - qcpath.remove(0, qlpath.length()); - moduleStream << "QT_QCONFIG_PATH = " << qcpath << endl; moduleStream << endl; moduleStream << "host_build {" << endl; @@ -3614,18 +3424,6 @@ void Configure::generateConfigfiles() << "#define QT_VERSION_PATCH " << dictionary["VERSION_PATCH"] << endl << "#define QT_VERSION_STR \"" << dictionary["VERSION"] << "\"\n" << endl; - - if (dictionary[ "QCONFIG" ] == "full") { - tmpStream << "/* Everything */" << endl; - } else { - tmpStream << "#ifndef QT_BOOTSTRAPPED" << endl; - QFile inFile(dictionary["QCONFIG_PATH"]); - if (inFile.open(QFile::ReadOnly)) { - tmpStream << QTextStream(&inFile).readAll(); - inFile.close(); - } - tmpStream << "#endif // QT_BOOTSTRAPPED" << endl; - } tmpStream << endl; if (dictionary[ "SHARED" ] == "no") { @@ -3678,19 +3476,12 @@ void Configure::generateConfigfiles() qconfigList += "QT_NO_STYLE_WINDOWSXP"; if (dictionary["STYLE_WINDOWSVISTA"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSVISTA"; - if (dictionary["GIF"] == "yes") qconfigList += "QT_BUILTIN_GIF_READER=1"; if (dictionary["PNG"] != "yes") qconfigList += "QT_NO_IMAGEFORMAT_PNG"; - if (dictionary["JPEG"] != "yes") qconfigList += "QT_NO_IMAGEFORMAT_JPEG"; - if (dictionary["ZLIB"] == "no") { - qconfigList += "QT_NO_ZLIB"; - qconfigList += "QT_NO_COMPRESS"; - } if (dictionary["ACCESSIBILITY"] == "no") qconfigList += "QT_NO_ACCESSIBILITY"; if (dictionary["WIDGETS"] == "no") qconfigList += "QT_NO_WIDGETS"; if (dictionary["GUI"] == "no") qconfigList += "QT_NO_GUI"; if (dictionary["OPENGL"] == "no") qconfigList += "QT_NO_OPENGL"; - if (dictionary["OPENVG"] == "no") qconfigList += "QT_NO_OPENVG"; if (dictionary["SSL"] == "no") qconfigList += "QT_NO_SSL"; if (dictionary["OPENSSL"] == "no") qconfigList += "QT_NO_OPENSSL"; if (dictionary["OPENSSL"] == "linked") qconfigList += "QT_LINKED_OPENSSL"; @@ -3702,15 +3493,6 @@ void Configure::generateConfigfiles() if (dictionary["OPENGL_ES_2"] == "yes") qconfigList += "QT_OPENGL_ES"; if (dictionary["OPENGL_ES_2"] == "yes") qconfigList += "QT_OPENGL_ES_2"; if (dictionary["DYNAMICGL"] == "yes") qconfigList += "QT_OPENGL_DYNAMIC"; - if (dictionary["SQL_MYSQL"] == "yes") qconfigList += "QT_SQL_MYSQL"; - if (dictionary["SQL_ODBC"] == "yes") qconfigList += "QT_SQL_ODBC"; - if (dictionary["SQL_OCI"] == "yes") qconfigList += "QT_SQL_OCI"; - if (dictionary["SQL_PSQL"] == "yes") qconfigList += "QT_SQL_PSQL"; - if (dictionary["SQL_TDS"] == "yes") qconfigList += "QT_SQL_TDS"; - if (dictionary["SQL_DB2"] == "yes") qconfigList += "QT_SQL_DB2"; - if (dictionary["SQL_SQLITE"] == "yes") qconfigList += "QT_SQL_SQLITE"; - if (dictionary["SQL_SQLITE2"] == "yes") qconfigList += "QT_SQL_SQLITE2"; - if (dictionary["SQL_IBASE"] == "yes") qconfigList += "QT_SQL_IBASE"; if (dictionary["POSIX_IPC"] == "yes") qconfigList += "QT_POSIX_IPC"; @@ -3841,7 +3623,6 @@ void Configure::displayConfig() << (dictionary[ "AVX512" ].isEmpty() ? QString("<none>") : dictionary[ "AVX512" ].toUpper()) << endl; sout << "NEON support................" << dictionary[ "NEON" ] << endl; sout << "OpenGL support.............." << dictionary[ "OPENGL" ] << endl; - sout << "Large File support.........." << dictionary[ "LARGE_FILE" ] << endl; sout << "NIS support................." << dictionary[ "NIS" ] << endl; sout << "Iconv support..............." << dictionary[ "QT_ICONV" ] << endl; sout << "Evdev support..............." << dictionary[ "QT_EVDEV" ] << endl; @@ -3850,7 +3631,6 @@ void Configure::displayConfig() sout << "eventfd(7) support.........." << dictionary[ "QT_EVENTFD" ] << endl; sout << "Glib support................" << dictionary[ "QT_GLIB" ] << endl; sout << "CUPS support................" << dictionary[ "QT_CUPS" ] << endl; - sout << "OpenVG support.............." << dictionary[ "OPENVG" ] << endl; sout << "SSL support................." << dictionary[ "SSL" ] << endl; sout << "OpenSSL support............." << dictionary[ "OPENSSL" ] << endl; sout << "libproxy support............" << dictionary[ "LIBPROXY" ] << endl; @@ -3869,10 +3649,10 @@ void Configure::displayConfig() sout << endl; sout << "Third Party Libraries:" << endl; - sout << " ZLIB support............" << dictionary[ "ZLIB" ] << endl; + sout << " ZLIB support............" << (dictionary[ "SYSTEM_ZLIB" ] == QLatin1String("yes") ? QLatin1String("system") : QLatin1String("qt")) << endl; sout << " GIF support............." << dictionary[ "GIF" ] << endl; - sout << " JPEG support............" << dictionary[ "JPEG" ] << endl; - sout << " PNG support............." << dictionary[ "PNG" ] << endl; + sout << " JPEG support............" << dictionary[ "JPEG" ] << " (" << dictionary[ "LIBJPEG" ] << ")" << endl; + sout << " PNG support............." << dictionary[ "PNG" ] << " (" << dictionary[ "LIBPNG" ] << ")" << endl; sout << " DoubleConversion........" << dictionary[ "DOUBLECONVERSION" ] << endl; sout << " FreeType support........" << dictionary[ "FREETYPE" ] << endl; sout << " Fontconfig support......" << dictionary[ "FONT_CONFIG" ] << endl; @@ -3965,17 +3745,6 @@ void Configure::displayConfig() sout << " configure -openssl-linked OPENSSL_LIBS=\"-lssleay32 -llibeay32\"" << endl; } } - if (dictionary[ "ZLIB_FORCED" ] == "yes") { - QString which_zlib = "supplied"; - if (dictionary[ "ZLIB" ] == "system") - which_zlib = "system"; - - sout << "NOTE: The -no-zlib option was supplied but is no longer supported." << endl - << endl - << "Qt now requires zlib support in all builds, so the -no-zlib" << endl - << "option was ignored. Qt will be built using the " << which_zlib - << "zlib" << endl; - } if (dictionary["OBSOLETE_ARCH_ARG"] == "yes") { sout << endl << "NOTE: The -arch option is obsolete." << endl @@ -4203,11 +3972,7 @@ void Configure::generateQConfigCpp() // Generate the new qconfig.cpp file { FileWriter tmpStream(buildPath + "/src/corelib/global/qconfig.cpp"); - tmpStream << "/* Licensed */" << endl - << "static const char qt_configure_licensee_str [512 + 12] = \"qt_lcnsuser=" << dictionary["LICENSEE"] << "\";" << endl - << "static const char qt_configure_licensed_products_str [512 + 12] = \"qt_lcnsprod=" << dictionary["EDITION"] << "\";" << endl - << endl - << "/* Build date */" << endl + tmpStream << "/* Build date */" << endl << "static const char qt_configure_installation [11 + 12] = \"qt_instdate=2012-12-20\";" << endl << endl << "/* Installation Info */" << endl @@ -4235,9 +4000,6 @@ void Configure::generateQConfigCpp() << "#ifdef QT_BUILD_QMAKE\n" << "# define QT_CONFIGURE_SYSROOTIFY_PREFIX " << (sysrootifyPrefix ? "true" : "false") << endl << "#endif\n\n" - << "/* strlen( \"qt_lcnsxxxx\") == 12 */" << endl - << "#define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12" << endl - << "#define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12" << endl << endl << "#define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12\n" << "#ifdef QT_BUILD_QMAKE\n" |