Always build JPEG and GIF support as plugins

Our handling of plugins when Qt is build statically is
nowadays good enough, so we don't need to build the
JPEG and GIF support directly into Qt for static builds.
Let's simply always build them as plugins.

Also simplify the logic in configure, and get rid of the
no-gif, no-jpeg and no-png config variables.

[ChangelLog][Build system] JPEG and GIF image support is now
always built as a plugin. Removed -imageformat-[jpeg|gif]
arguments to configure.

Change-Id: Ic01559ff406c966807b3be8761252e8802adcdf7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
Lars Knoll 2016-04-06 10:15:14 +02:00
parent 4701af32df
commit 00ca784be6
19 changed files with 48 additions and 221 deletions

78
configure vendored
View File

@ -627,10 +627,10 @@ CFG_MTDEV=auto
CFG_JOURNALD=no CFG_JOURNALD=no
CFG_SYSLOG=no CFG_SYSLOG=no
CFG_SQLITE=qt CFG_SQLITE=qt
CFG_GIF=auto CFG_GIF=yes
CFG_PNG=yes CFG_PNG=yes
CFG_LIBPNG=auto CFG_LIBPNG=auto
CFG_JPEG=auto CFG_JPEG=yes
CFG_LIBJPEG=auto CFG_LIBJPEG=auto
CFG_XCURSOR=runtime CFG_XCURSOR=runtime
CFG_XRANDR=runtime CFG_XRANDR=runtime
@ -861,16 +861,6 @@ if [ -d "$relpath/src/plugins/sqldrivers" ]; then
done done
fi fi
CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
if [ -d "$relpath/src/plugins/imageformats" ]; then
for a in "$relpath/src/plugins/imageformats/"*; do
if [ -d "$a" ]; then
base_a=`basename "$a"`
CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
fi
done
fi
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# parse command line arguments # parse command line arguments
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
@ -2082,7 +2072,7 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes UNKNOWN_OPT=yes
fi fi
;; ;;
sql-*|imageformat-*) sql-*)
# if Qt style options were used, $VAL can be "no", "qt", or "plugin" # if Qt style options were used, $VAL can be "no", "qt", or "plugin"
# if autoconf style options were used, $VAL can be "yes" or "no" # if autoconf style options were used, $VAL can be "yes" or "no"
[ "$VAL" = "yes" ] && VAL=qt [ "$VAL" = "yes" ] && VAL=qt
@ -2095,27 +2085,9 @@ while [ "$#" -gt 0 ]; do
VAL=`echo $VAR | sed 's,^[^-]*-\([^-]*\).*,\1,'` VAL=`echo $VAR | sed 's,^[^-]*-\([^-]*\).*,\1,'`
VAR=`echo $VAR | sed 's,^\([^-]*\).*,\1,'` VAR=`echo $VAR | sed 's,^\([^-]*\).*,\1,'`
# Grab the available values
case "$VAR" in
sql)
avail="$CFG_SQL_AVAILABLE"
;;
imageformat)
avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
if [ "$OPT" != "plugin" ]; then
# png is always built in
avail="$avail png"
fi
;;
*)
avail=""
echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
;;
esac
# Check that that user's value is available. # Check that that user's value is available.
found=no found=no
for d in $avail; do for d in $CFG_SQL_AVAILABLE; do
if [ "$VAL" = "$d" ]; then if [ "$VAL" = "$d" ]; then
found=yes found=yes
break break
@ -2127,19 +2099,8 @@ while [ "$#" -gt 0 ]; do
continue continue
fi fi
if [ "$VAR" = "sql" ]; then
# set the CFG_SQL_driver # set the CFG_SQL_driver
eval "CFG_SQL_$VAL=\$OPT" eval "CFG_SQL_$VAL=\$OPT"
continue
elif [ "$VAR" = "imageformat" ]; then
[ "$OPT" = "qt" ] && OPT=yes
VAL="`echo $VAL |tr a-z A-Z`"
eval "CFG_$VAL=$OPT"
continue
else
echo "Internal error resolving command line arguments."
exit 1
fi
;; ;;
v|verbose) v|verbose)
if [ "$VAL" = "yes" ]; then if [ "$VAL" = "yes" ]; then
@ -4724,14 +4685,6 @@ if [ "$CFG_GUI" = "no" ]; then
QPA_PLATFORM_GUARD=no QPA_PLATFORM_GUARD=no
fi fi
# detect how jpeg should be built
if [ "$CFG_JPEG" = "auto" ]; then
if [ "$CFG_SHARED" = "yes" ]; then
CFG_JPEG=plugin
else
CFG_JPEG=yes
fi
fi
# detect jpeg # detect jpeg
if [ "$CFG_LIBJPEG" = "auto" ]; then if [ "$CFG_LIBJPEG" = "auto" ]; then
if compileTest unix/libjpeg "libjpeg"; then if compileTest unix/libjpeg "libjpeg"; then
@ -4741,15 +4694,6 @@ if [ "$CFG_LIBJPEG" = "auto" ]; then
fi fi
fi fi
# detect how gif should be built
if [ "$CFG_GIF" = "auto" ]; then
if [ "$CFG_SHARED" = "yes" ]; then
CFG_GIF=plugin
else
CFG_GIF=yes
fi
fi
# detect png # detect png
if [ "$CFG_LIBPNG" = "auto" ]; then if [ "$CFG_LIBPNG" = "auto" ]; then
if compileTest unix/libpng "libpng"; then if compileTest unix/libpng "libpng"; then
@ -6371,9 +6315,7 @@ if [ "$CFG_LIBJPEG" = "no" ]; then
elif [ "$CFG_LIBJPEG" = "system" ]; then elif [ "$CFG_LIBJPEG" = "system" ]; then
QT_CONFIG="$QT_CONFIG system-jpeg" QT_CONFIG="$QT_CONFIG system-jpeg"
fi fi
if [ "$CFG_JPEG" = "no" ]; then if [ "$CFG_JPEG" = "yes" ]; then
QT_CONFIG="$QT_CONFIG no-jpeg"
elif [ "$CFG_JPEG" = "yes" ]; then
QT_CONFIG="$QT_CONFIG jpeg" QT_CONFIG="$QT_CONFIG jpeg"
fi fi
if [ "$CFG_LIBPNG" = "no" ]; then if [ "$CFG_LIBPNG" = "no" ]; then
@ -6382,14 +6324,10 @@ fi
if [ "$CFG_LIBPNG" = "system" ]; then if [ "$CFG_LIBPNG" = "system" ]; then
QT_CONFIG="$QT_CONFIG system-png" QT_CONFIG="$QT_CONFIG system-png"
fi fi
if [ "$CFG_PNG" = "no" ]; then if [ "$CFG_PNG" = "yes" ]; then
QT_CONFIG="$QT_CONFIG no-png"
elif [ "$CFG_PNG" = "yes" ]; then
QT_CONFIG="$QT_CONFIG png" QT_CONFIG="$QT_CONFIG png"
fi fi
if [ "$CFG_GIF" = "no" ]; then if [ "$CFG_GIF" = "yes" ]; then
QT_CONFIG="$QT_CONFIG no-gif"
elif [ "$CFG_GIF" = "yes" ]; then
QT_CONFIG="$QT_CONFIG gif" QT_CONFIG="$QT_CONFIG gif"
fi fi
if [ "$CFG_DOUBLECONVERSION" = "no" ]; then if [ "$CFG_DOUBLECONVERSION" = "no" ]; then
@ -6714,7 +6652,7 @@ QMakeVar set sql-drivers "$SQL_DRIVERS"
QMakeVar set sql-plugins "$SQL_PLUGINS" QMakeVar set sql-plugins "$SQL_PLUGINS"
# Add other configuration options to the qconfig.h file # Add other configuration options to the qconfig.h file
[ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1" [ "$CFG_GIF" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_GIF"
[ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG" [ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
[ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG" [ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
[ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS" [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"

View File

@ -71,11 +71,11 @@ SOURCES += \
image/qxbmhandler.cpp \ image/qxbmhandler.cpp \
image/qxpmhandler.cpp image/qxpmhandler.cpp
!contains(QT_CONFIG, no-png):include($$PWD/qpnghandler.pri) contains(QT_CONFIG, png) {
else:DEFINES *= QT_NO_IMAGEFORMAT_PNG HEADERS += image/qpnghandler_p.h
SOURCES += image/qpnghandler.cpp
contains(QT_CONFIG, jpeg):include($$PWD/qjpeghandler.pri) include($$PWD/../../3rdparty/png_dependency.pri)
contains(QT_CONFIG, gif):include($$PWD/qgifhandler.pri) }
# SIMD # SIMD
SSE2_SOURCES += image/qimage_sse2.cpp SSE2_SOURCES += image/qimage_sse2.cpp

View File

@ -1,3 +0,0 @@
# common to plugin and built-in forms
HEADERS += $$PWD/qgifhandler_p.h
SOURCES += $$PWD/qgifhandler.cpp

View File

@ -155,12 +155,6 @@
#ifndef QT_NO_IMAGEFORMAT_PNG #ifndef QT_NO_IMAGEFORMAT_PNG
#include <private/qpnghandler_p.h> #include <private/qpnghandler_p.h>
#endif #endif
#ifndef QT_NO_IMAGEFORMAT_JPEG
#include <private/qjpeghandler_p.h>
#endif
#ifdef QT_BUILTIN_GIF_READER
#include <private/qgifhandler_p.h>
#endif
#include <algorithm> #include <algorithm>
@ -175,13 +169,6 @@ enum _qt_BuiltInFormatType {
#ifndef QT_NO_IMAGEFORMAT_PNG #ifndef QT_NO_IMAGEFORMAT_PNG
_qt_PngFormat, _qt_PngFormat,
#endif #endif
#ifndef QT_NO_IMAGEFORMAT_JPEG
_qt_JpgFormat,
_qt_JpegFormat,
#endif
#ifdef QT_BUILTIN_GIF_READER
_qt_GifFormat,
#endif
#ifndef QT_NO_IMAGEFORMAT_BMP #ifndef QT_NO_IMAGEFORMAT_BMP
_qt_BmpFormat, _qt_BmpFormat,
#endif #endif
@ -210,13 +197,6 @@ static const _qt_BuiltInFormatStruct _qt_BuiltInFormats[] = {
#ifndef QT_NO_IMAGEFORMAT_PNG #ifndef QT_NO_IMAGEFORMAT_PNG
{"png", "image/png"}, {"png", "image/png"},
#endif #endif
#ifndef QT_NO_IMAGEFORMAT_JPEG
{"jpg", "image/jpeg"},
{"jpeg", "image/jpeg"},
#endif
#ifdef QT_BUILTIN_GIF_READER
{"gif", "image/gif"},
#endif
#ifndef QT_NO_IMAGEFORMAT_BMP #ifndef QT_NO_IMAGEFORMAT_BMP
{"bmp", "image/bmp"}, {"bmp", "image/bmp"},
#endif #endif
@ -357,14 +337,6 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
} else if (testFormat == "png") { } else if (testFormat == "png") {
handler = new QPngHandler; handler = new QPngHandler;
#endif #endif
#ifndef QT_NO_IMAGEFORMAT_JPEG
} else if (testFormat == "jpg" || testFormat == "jpeg") {
handler = new QJpegHandler;
#endif
#ifdef QT_BUILTIN_GIF_READER
} else if (testFormat == "gif") {
handler = new QGifHandler;
#endif
#ifndef QT_NO_IMAGEFORMAT_BMP #ifndef QT_NO_IMAGEFORMAT_BMP
} else if (testFormat == "bmp") { } else if (testFormat == "bmp") {
handler = new QBmpHandler; handler = new QBmpHandler;
@ -442,19 +414,6 @@ static QImageIOHandler *createReadHandlerHelper(QIODevice *device,
handler = new QPngHandler; handler = new QPngHandler;
break; break;
#endif #endif
#ifndef QT_NO_IMAGEFORMAT_JPEG
case _qt_JpgFormat:
case _qt_JpegFormat:
if (QJpegHandler::canRead(device))
handler = new QJpegHandler;
break;
#endif
#ifdef QT_BUILTIN_GIF_READER
case _qt_GifFormat:
if (QGifHandler::canRead(device))
handler = new QGifHandler;
break;
#endif
#ifndef QT_NO_IMAGEFORMAT_BMP #ifndef QT_NO_IMAGEFORMAT_BMP
case _qt_BmpFormat: case _qt_BmpFormat:
if (QBmpHandler::canRead(device)) if (QBmpHandler::canRead(device))

View File

@ -115,12 +115,6 @@
#ifndef QT_NO_IMAGEFORMAT_PNG #ifndef QT_NO_IMAGEFORMAT_PNG
#include <private/qpnghandler_p.h> #include <private/qpnghandler_p.h>
#endif #endif
#ifndef QT_NO_IMAGEFORMAT_JPEG
#include <private/qjpeghandler_p.h>
#endif
#ifdef QT_BUILTIN_GIF_READER
#include <private/qgifhandler_p.h>
#endif
#include <algorithm> #include <algorithm>
@ -184,14 +178,6 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device,
} else if (testFormat == "png") { } else if (testFormat == "png") {
handler = new QPngHandler; handler = new QPngHandler;
#endif #endif
#ifndef QT_NO_IMAGEFORMAT_JPEG
} else if (testFormat == "jpg" || testFormat == "jpeg") {
handler = new QJpegHandler;
#endif
#ifdef QT_BUILTIN_GIF_READER
} else if (testFormat == "gif") {
handler = new QGifHandler;
#endif
#ifndef QT_NO_IMAGEFORMAT_BMP #ifndef QT_NO_IMAGEFORMAT_BMP
} else if (testFormat == "bmp") { } else if (testFormat == "bmp") {
handler = new QBmpHandler; handler = new QBmpHandler;
@ -910,9 +896,6 @@ QList<QByteArray> QImageWriter::supportedImageFormats()
#ifndef QT_NO_IMAGEFORMAT_PNG #ifndef QT_NO_IMAGEFORMAT_PNG
formats << "png"; formats << "png";
#endif #endif
#ifndef QT_NO_IMAGEFORMAT_JPEG
formats << "jpg" << "jpeg";
#endif
#ifndef QT_NO_IMAGEFORMATPLUGIN #ifndef QT_NO_IMAGEFORMATPLUGIN
supportedImageHandlerFormats(loader(), QImageIOPlugin::CanWrite, &formats); supportedImageHandlerFormats(loader(), QImageIOPlugin::CanWrite, &formats);
@ -951,9 +934,6 @@ QList<QByteArray> QImageWriter::supportedMimeTypes()
#ifndef QT_NO_IMAGEFORMAT_PNG #ifndef QT_NO_IMAGEFORMAT_PNG
mimeTypes << "image/png"; mimeTypes << "image/png";
#endif #endif
#ifndef QT_NO_IMAGEFORMAT_JPEG
mimeTypes << "image/jpeg";
#endif
#ifndef QT_NO_IMAGEFORMATPLUGIN #ifndef QT_NO_IMAGEFORMATPLUGIN
supportedImageHandlerMimeTypes(loader(), QImageIOPlugin::CanWrite, &mimeTypes); supportedImageHandlerMimeTypes(loader(), QImageIOPlugin::CanWrite, &mimeTypes);

View File

@ -1,11 +0,0 @@
# common to plugin and built-in forms
HEADERS += $$PWD/qjpeghandler_p.h
SOURCES += $$PWD/qjpeghandler.cpp
contains(QT_CONFIG, system-jpeg) {
msvc: \
LIBS += libjpeg.lib
else: \
LIBS += -ljpeg
} else {
include($$PWD/../../3rdparty/libjpeg.pri)
}

View File

@ -1,4 +0,0 @@
HEADERS += $$PWD/qpnghandler_p.h
SOURCES += $$PWD/qpnghandler.cpp
include($$PWD/../../3rdparty/png_dependency.pri)

View File

@ -1,9 +1,8 @@
TARGET = qgif TARGET = qgif
include(../../../gui/image/qgifhandler.pri) SOURCES += main.cpp qgifhandler.cpp
INCLUDEPATH += ../../../gui/image HEADERS += main.h qgifhandler_p.h
SOURCES += $$PWD/main.cpp
HEADERS += $$PWD/main.h
OTHER_FILES += gif.json OTHER_FILES += gif.json
PLUGIN_TYPE = imageformats PLUGIN_TYPE = imageformats

View File

@ -1,10 +1,7 @@
TARGET = qico TARGET = qico
QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-ico)" HEADERS += main.h qicohandler.h
SOURCES += main.cpp qicohandler.cpp
HEADERS += qicohandler.h main.h
SOURCES += main.cpp \
qicohandler.cpp
OTHER_FILES += ico.json OTHER_FILES += ico.json
PLUGIN_TYPE = imageformats PLUGIN_TYPE = imageformats

View File

@ -1,5 +1,5 @@
TEMPLATE = subdirs TEMPLATE = subdirs
!contains(QT_CONFIG, no-jpeg):!contains(QT_CONFIG, jpeg):SUBDIRS += jpeg
!contains(QT_CONFIG, no-gif):!contains(QT_CONFIG, gif):SUBDIRS += gif
!contains(QT_CONFIG, no-ico):SUBDIRS += ico !contains(QT_CONFIG, no-ico):SUBDIRS += ico
contains(QT_CONFIG, jpeg): SUBDIRS += jpeg
contains(QT_CONFIG, gif): SUBDIRS += gif

View File

@ -2,12 +2,18 @@ TARGET = qjpeg
QT += core-private QT += core-private
QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-jpeg)" SOURCES += main.cpp qjpeghandler.cpp
HEADERS += main.h qjpeghandler_p.h
contains(QT_CONFIG, system-jpeg) {
msvc: \
LIBS += libjpeg.lib
else: \
LIBS += -ljpeg
} else {
include($$PWD/../../../3rdparty/libjpeg.pri)
}
include(../../../gui/image/qjpeghandler.pri)
INCLUDEPATH += ../../../gui/image
SOURCES += main.cpp
HEADERS += main.h
OTHER_FILES += jpeg.json OTHER_FILES += jpeg.json
PLUGIN_TYPE = imageformats PLUGIN_TYPE = imageformats

View File

@ -5,8 +5,8 @@ qtHaveModule(widgets): QT += widgets
SOURCES += tst_qmovie.cpp SOURCES += tst_qmovie.cpp
MOC_DIR=tmp MOC_DIR=tmp
!contains(QT_CONFIG, no-gif):DEFINES += QTEST_HAVE_GIF contains(QT_CONFIG, gif):DEFINES += QTEST_HAVE_GIF
!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG contains(QT_CONFIG, jpeg):DEFINES += QTEST_HAVE_JPEG
RESOURCES += resources.qrc RESOURCES += resources.qrc
TESTDATA += animations/* TESTDATA += animations/*

View File

@ -3,6 +3,6 @@ TARGET = tst_bench_imageConversion
QT += testlib QT += testlib
SOURCES += tst_qimageconversion.cpp SOURCES += tst_qimageconversion.cpp
!contains(QT_CONFIG, no-gif):DEFINES += QTEST_HAVE_GIF contains(QT_CONFIG, gif):DEFINES += QTEST_HAVE_GIF
!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG contains(QT_CONFIG, jpeg):DEFINES += QTEST_HAVE_JPEG
contains(QT_CONFIG, c++11): CONFIG += c++11 contains(QT_CONFIG, c++11): CONFIG += c++11

View File

@ -5,6 +5,6 @@ TARGET = tst_bench_qimagereader
SOURCES += tst_qimagereader.cpp SOURCES += tst_qimagereader.cpp
!contains(QT_CONFIG, no-gif):DEFINES += QTEST_HAVE_GIF contains(QT_CONFIG, gif):DEFINES += QTEST_HAVE_GIF
!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG contains(QT_CONFIG, jpeg):DEFINES += QTEST_HAVE_JPEG
QT += network QT += network

View File

@ -248,9 +248,9 @@ Configure::Configure(int& argc, char** argv) : verbose(0)
dictionary[ "ANGLE" ] = "auto"; dictionary[ "ANGLE" ] = "auto";
dictionary[ "DYNAMICGL" ] = "auto"; dictionary[ "DYNAMICGL" ] = "auto";
dictionary[ "GIF" ] = "auto"; dictionary[ "GIF" ] = "yes";
dictionary[ "JPEG" ] = "auto"; dictionary[ "JPEG" ] = "yes";
dictionary[ "PNG" ] = "auto"; dictionary[ "PNG" ] = "yes";
dictionary[ "LIBJPEG" ] = "auto"; dictionary[ "LIBJPEG" ] = "auto";
dictionary[ "LIBPNG" ] = "auto"; dictionary[ "LIBPNG" ] = "auto";
dictionary[ "DOUBLECONVERSION" ] = "auto"; dictionary[ "DOUBLECONVERSION" ] = "auto";
@ -361,7 +361,6 @@ void Configure::parseCmdLine()
int argCount = configCmdLine.size(); int argCount = configCmdLine.size();
int i = 0; int i = 0;
const QStringList imageFormats = QStringList() << "gif" << "png" << "jpeg";
if (argCount < 1) // skip rest if no arguments if (argCount < 1) // skip rest if no arguments
; ;
@ -745,17 +744,6 @@ void Configure::parseCmdLine()
else if (configCmdLine.at(i) == "-no-sql-ibase") else if (configCmdLine.at(i) == "-no-sql-ibase")
dictionary[ "SQL_IBASE" ] = "no"; 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") else if (configCmdLine.at(i) == "-no-incredibuild-xge")
dictionary[ "INCREDIBUILD_XGE" ] = "no"; dictionary[ "INCREDIBUILD_XGE" ] = "no";
else if (configCmdLine.at(i) == "-incredibuild-xge") else if (configCmdLine.at(i) == "-incredibuild-xge")
@ -1586,8 +1574,6 @@ void Configure::applySpecSpecifics()
if (dictionary.value("XQMAKESPEC").startsWith("winphone") || dictionary.value("XQMAKESPEC").startsWith("winrt")) { if (dictionary.value("XQMAKESPEC").startsWith("winphone") || dictionary.value("XQMAKESPEC").startsWith("winrt")) {
dictionary[ "STYLE_WINDOWSXP" ] = "no"; dictionary[ "STYLE_WINDOWSXP" ] = "no";
dictionary[ "STYLE_WINDOWSVISTA" ] = "no"; dictionary[ "STYLE_WINDOWSVISTA" ] = "no";
dictionary[ "GIF" ] = "qt";
dictionary[ "JPEG" ] = "qt";
dictionary[ "LIBJPEG" ] = "qt"; dictionary[ "LIBJPEG" ] = "qt";
dictionary[ "LIBPNG" ] = "qt"; dictionary[ "LIBPNG" ] = "qt";
dictionary[ "FREETYPE" ] = "yes"; dictionary[ "FREETYPE" ] = "yes";
@ -2001,10 +1987,6 @@ QString Configure::defaultTo(const QString &option)
|| option == "LIBPNG") || option == "LIBPNG")
return "system"; 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. // These database drivers and image formats can be built-in or plugins.
// Prefer plugins when Qt is shared. // Prefer plugins when Qt is shared.
if (dictionary[ "SHARED" ] == "yes") { if (dictionary[ "SHARED" ] == "yes") {
@ -2017,9 +1999,7 @@ QString Configure::defaultTo(const QString &option)
|| option == "SQL_DB2" || option == "SQL_DB2"
|| option == "SQL_SQLITE" || option == "SQL_SQLITE"
|| option == "SQL_SQLITE2" || option == "SQL_SQLITE2"
|| option == "SQL_IBASE" || option == "SQL_IBASE")
|| option == "JPEG"
|| option == "GIF")
return "plugin"; return "plugin";
} }
@ -2309,12 +2289,6 @@ void Configure::autoDetection()
dictionary["DYNAMICGL"] = "no"; dictionary["DYNAMICGL"] = "no";
// Image format detection // 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") if (dictionary["LIBJPEG"] == "auto")
dictionary["LIBJPEG"] = checkAvailability("LIBJPEG") ? defaultTo("LIBJPEG") : "qt"; dictionary["LIBJPEG"] = checkAvailability("LIBJPEG") ? defaultTo("LIBJPEG") : "qt";
if (dictionary["LIBPNG"] == "auto") if (dictionary["LIBPNG"] == "auto")
@ -2666,21 +2640,15 @@ void Configure::generateOutputVars()
} }
// Image formates ----------------------------------------------- // Image formates -----------------------------------------------
if (dictionary[ "GIF" ] == "no") if (dictionary[ "GIF" ] == "yes")
qtConfig += "no-gif";
else if (dictionary[ "GIF" ] == "yes")
qtConfig += "gif"; qtConfig += "gif";
if (dictionary[ "JPEG" ] == "no") if (dictionary[ "JPEG" ] == "yes")
qtConfig += "no-jpeg";
else if (dictionary[ "JPEG" ] == "yes")
qtConfig += "jpeg"; qtConfig += "jpeg";
if (dictionary[ "LIBJPEG" ] == "system") if (dictionary[ "LIBJPEG" ] == "system")
qtConfig += "system-jpeg"; qtConfig += "system-jpeg";
if (dictionary[ "PNG" ] == "no") if (dictionary[ "PNG" ] == "yes")
qtConfig += "no-png";
else if (dictionary[ "PNG" ] == "yes")
qtConfig += "png"; qtConfig += "png";
if (dictionary[ "LIBPNG" ] == "system") if (dictionary[ "LIBPNG" ] == "system")
qtConfig += "system-png"; qtConfig += "system-png";
@ -3560,9 +3528,7 @@ void Configure::generateConfigfiles()
qconfigList += "QT_NO_STYLE_WINDOWSXP"; qconfigList += "QT_NO_STYLE_WINDOWSXP";
if (dictionary["STYLE_WINDOWSVISTA"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWSVISTA"; 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["PNG"] != "yes") qconfigList += "QT_NO_IMAGEFORMAT_PNG";
if (dictionary["JPEG"] != "yes") qconfigList += "QT_NO_IMAGEFORMAT_JPEG";
if (dictionary["ACCESSIBILITY"] == "no") qconfigList += "QT_NO_ACCESSIBILITY"; if (dictionary["ACCESSIBILITY"] == "no") qconfigList += "QT_NO_ACCESSIBILITY";
if (dictionary["WIDGETS"] == "no") qconfigList += "QT_NO_WIDGETS"; if (dictionary["WIDGETS"] == "no") qconfigList += "QT_NO_WIDGETS";
@ -3745,8 +3711,8 @@ void Configure::displayConfig()
sout << "Third Party Libraries:" << endl; sout << "Third Party Libraries:" << endl;
sout << " ZLIB support............" << (dictionary[ "SYSTEM_ZLIB" ] == QLatin1String("yes") ? QLatin1String("system") : QLatin1String("qt")) << endl; sout << " ZLIB support............" << (dictionary[ "SYSTEM_ZLIB" ] == QLatin1String("yes") ? QLatin1String("system") : QLatin1String("qt")) << endl;
sout << " GIF support............." << dictionary[ "GIF" ] << endl; sout << " GIF support............." << dictionary[ "GIF" ] << endl;
sout << " JPEG support............" << dictionary[ "JPEG" ] << endl; sout << " JPEG support............" << dictionary[ "JPEG" ] << " (" << dictionary[ "LIBJPEG" ] << ")" << endl;
sout << " PNG support............." << dictionary[ "PNG" ] << endl; sout << " PNG support............." << dictionary[ "PNG" ] << " (" << dictionary[ "LIBPNG" ] << ")" << endl;
sout << " DoubleConversion........" << dictionary[ "DOUBLECONVERSION" ] << endl; sout << " DoubleConversion........" << dictionary[ "DOUBLECONVERSION" ] << endl;
sout << " FreeType support........" << dictionary[ "FREETYPE" ] << endl; sout << " FreeType support........" << dictionary[ "FREETYPE" ] << endl;
sout << " Fontconfig support......" << dictionary[ "FONT_CONFIG" ] << endl; sout << " Fontconfig support......" << dictionary[ "FONT_CONFIG" ] << endl;