diff options
-rwxr-xr-x | configure | 60 | ||||
-rw-r--r-- | src/corelib/tools/tools.pri | 6 | ||||
-rw-r--r-- | src/src.pro | 2 | ||||
-rw-r--r-- | src/tools/bootstrap/bootstrap.pro | 2 | ||||
-rw-r--r-- | tools/configure/configureapp.cpp | 55 |
5 files changed, 29 insertions, 96 deletions
@@ -622,7 +622,7 @@ CFG_SM=auto CFG_XSHAPE=auto CFG_XSYNC=auto CFG_XFIXES=runtime -CFG_ZLIB=auto +CFG_SYSTEM_ZLIB=auto CFG_MTDEV=auto CFG_JOURNALD=no CFG_SYSLOG=no @@ -1661,9 +1661,10 @@ while [ "$#" -gt 0 ]; do fi ;; zlib) - [ "$VAL" = "qt" ] && VAL=yes - if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then - CFG_ZLIB="$VAL" + if [ "$VAL" = "system" ]; then + CFG_SYSTEM_ZLIB="yes" + elif [ "$VAL" = "qt" ]; then + CFG_SYSTEM_ZLIB="no" else UNKNOWN_OPT=yes fi @@ -4637,21 +4638,6 @@ if ! compileTest unix/ipc_sysv "ipc_sysv" ; then fi fi -# detect zlib -if [ "$CFG_ZLIB" = "no" ]; then - # Note: Qt no longer support builds without zlib - # So we force a "no" to be "auto" here. - # 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 - - CFG_ZLIB=auto - ZLIB_FORCED=yes -fi - if [ "$XPLATFORM_QNX" = "yes" ]; then if [ "$CFG_SLOG2" != "no" ]; then if compileTest unix/slog2 "slog2"; then @@ -4688,11 +4674,12 @@ if [ "$XPLATFORM_QNX" = "yes" ]; then fi fi -if [ "$CFG_ZLIB" = "auto" ]; then +# detect zlib +if [ "$CFG_SYSTEM_ZLIB" = "auto" ]; then if compileTest unix/zlib "zlib"; then - CFG_ZLIB=system + CFG_SYSTEM_ZLIB=yes else - CFG_ZLIB=yes + CFG_SYSTEM_ZLIB=no fi fi @@ -6451,11 +6438,9 @@ fi if [ "$XPLATFORM_MAC" = "yes" ]; then #On Mac we implicitly link against libz, so we #never use the 3rdparty stuff. - [ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system" + CFG_SYSTEM_ZLIB=yes fi -if [ "$CFG_ZLIB" = "yes" ]; then - QT_CONFIG="$QT_CONFIG zlib" -elif [ "$CFG_ZLIB" = "system" ]; then +if [ "$CFG_SYSTEM_ZLIB" = "yes" ]; then QT_CONFIG="$QT_CONFIG system-zlib" fi @@ -6740,7 +6725,6 @@ QMakeVar set sql-plugins "$SQL_PLUGINS" [ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1" [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG" [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG" -[ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB" [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS" [ "$CFG_LIBPROXY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LIBPROXY" @@ -7288,7 +7272,7 @@ report_support " tslib .................." "$CFG_TSLIB" report_support " udev ..................." "$CFG_LIBUDEV" report_support " xkbcommon-x11..........." "$CFG_XKBCOMMON" system "system library" qt "bundled copy, XKB config root: $CFG_XKB_CONFIG_ROOT" report_support " xkbcommon-evdev........." "$CFG_XKBCOMMON_EVDEV" -report_support " zlib ..................." "$CFG_ZLIB" system "system library" yes "bundled copy" +report_support " zlib ..................." "$CFG_SYSTEM_ZLIB" yes "system library" no "bundled copy" echo @@ -7386,26 +7370,6 @@ EOF fi #------------------------------------------------------------------------------- -# check if the user passed the -no-zlib option, which is no longer supported -#------------------------------------------------------------------------------- -if [ -n "$ZLIB_FORCED" ]; then - which_zlib="supplied" - if [ "$CFG_ZLIB" = "system" ]; then - which_zlib="system" - fi - -cat <<EOF - - NOTICE: The -no-zlib option was supplied but is no longer - supported. - - Qt now requires zlib support in all builds, so the -no-zlib - option was ignored. Qt will be built using the $which_zlib - zlib. -EOF -fi - -#------------------------------------------------------------------------------- # check if the user passed the obsoleted -wayland or -no-wayland flag #------------------------------------------------------------------------------- if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri index 5cfeff5a4f..b87f234f40 100644 --- a/src/corelib/tools/tools.pri +++ b/src/corelib/tools/tools.pri @@ -150,10 +150,10 @@ else:win32 { } else:integrity:SOURCES += tools/qelapsedtimer_unix.cpp tools/qlocale_unix.cpp else:SOURCES += tools/qelapsedtimer_generic.cpp -contains(QT_CONFIG, zlib) { - include($$PWD/../../3rdparty/zlib.pri) -} else { +contains(QT_CONFIG, system-zlib) { include($$PWD/../../3rdparty/zlib_dependency.pri) +} else { + include($$PWD/../../3rdparty/zlib.pri) } contains(QT_CONFIG,icu) { diff --git a/src/src.pro b/src/src.pro index 167133859b..999fc2ce90 100644 --- a/src/src.pro +++ b/src/src.pro @@ -129,7 +129,7 @@ src_plugins.depends = src_sql src_xml src_network src_android.subdir = $$PWD/android # this order is important -contains(QT_CONFIG, zlib)|cross_compile: SUBDIRS += src_qtzlib +!contains(QT_CONFIG, system-zlib)|cross_compile: SUBDIRS += src_qtzlib SUBDIRS += src_tools_bootstrap src_tools_moc src_tools_rcc !contains(QT_DISABLED_FEATURES, regularexpression):pcre { SUBDIRS += src_3rdparty_pcre diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index 522e13b17b..a412689ddf 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -138,7 +138,7 @@ macx { ../../corelib/io/qstandardpaths_win.cpp } -if(contains(QT_CONFIG, zlib)|cross_compile):include(../../3rdparty/zlib.pri) +!contains(QT_CONFIG, system-zlib)|cross_compile:include(../../3rdparty/zlib.pri) else:include(../../3rdparty/zlib_dependency.pri) win32:LIBS += -luser32 -lole32 -ladvapi32 -lshell32 diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 82813a999f..b62331949c 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -243,7 +243,7 @@ Configure::Configure(int& argc, char** argv) : verbose(0) dictionary[ "STATIC_RUNTIME" ] = "no"; - dictionary[ "ZLIB" ] = "auto"; + dictionary[ "SYSTEM_ZLIB" ] = "auto"; dictionary[ "PCRE" ] = "auto"; @@ -560,24 +560,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") { @@ -1675,7 +1662,7 @@ void Configure::applySpecSpecifics() dictionary[ "SSL" ] = "yes"; dictionary[ "OPENSSL" ] = "no"; dictionary[ "DBUS" ] = "no"; - dictionary[ "ZLIB" ] = "qt"; + dictionary[ "SYSTEM_ZLIB" ] = "no"; dictionary[ "PCRE" ] = "qt"; dictionary[ "ICU" ] = "qt"; dictionary[ "CE_CRT" ] = "yes"; @@ -1935,8 +1922,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"); @@ -2110,8 +2097,7 @@ 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"; @@ -2243,7 +2229,7 @@ bool Configure::checkAvailability(const QString &part) else if (part == "ATOMIC64-LIBATOMIC") available = tryCompileProject("common/atomic64", "LIBS+=-latomic"); - else if (part == "ZLIB") + else if (part == "SYSTEM_ZLIB") available = findFile("zlib.h"); else if (part == "PCRE") @@ -2429,8 +2415,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") @@ -2796,9 +2782,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 --------------------------------------------------------- @@ -3732,10 +3716,6 @@ void Configure::generateConfigfiles() 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"; @@ -3917,7 +3897,7 @@ 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; @@ -4022,17 +4002,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 |