diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2016-04-06 10:15:14 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@theqtcompany.com> | 2016-04-07 09:08:41 +0000 |
commit | 00ca784be60cb38dcb342755f602edc929805ce4 (patch) | |
tree | 4d7703dc270345a7e65f9d97ddf197f43b756681 /configure | |
parent | 4701af32df5e74c0b273a158c17d5cd2ac5cd2a6 (diff) |
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>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 82 |
1 files changed, 10 insertions, 72 deletions
@@ -627,10 +627,10 @@ CFG_MTDEV=auto CFG_JOURNALD=no CFG_SYSLOG=no CFG_SQLITE=qt -CFG_GIF=auto +CFG_GIF=yes CFG_PNG=yes CFG_LIBPNG=auto -CFG_JPEG=auto +CFG_JPEG=yes CFG_LIBJPEG=auto CFG_XCURSOR=runtime CFG_XRANDR=runtime @@ -861,16 +861,6 @@ if [ -d "$relpath/src/plugins/sqldrivers" ]; then done 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 #------------------------------------------------------------------------------- @@ -2082,7 +2072,7 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; - sql-*|imageformat-*) + sql-*) # 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" [ "$VAL" = "yes" ] && VAL=qt @@ -2095,27 +2085,9 @@ while [ "$#" -gt 0 ]; do VAL=`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. found=no - for d in $avail; do + for d in $CFG_SQL_AVAILABLE; do if [ "$VAL" = "$d" ]; then found=yes break @@ -2127,19 +2099,8 @@ while [ "$#" -gt 0 ]; do continue fi - if [ "$VAR" = "sql" ]; then - # set the CFG_SQL_driver - 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 + # set the CFG_SQL_driver + eval "CFG_SQL_$VAL=\$OPT" ;; v|verbose) if [ "$VAL" = "yes" ]; then @@ -4724,14 +4685,6 @@ if [ "$CFG_GUI" = "no" ]; then QPA_PLATFORM_GUARD=no 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 if [ "$CFG_LIBJPEG" = "auto" ]; then if compileTest unix/libjpeg "libjpeg"; then @@ -4741,15 +4694,6 @@ if [ "$CFG_LIBJPEG" = "auto" ]; then 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 if [ "$CFG_LIBPNG" = "auto" ]; then if compileTest unix/libpng "libpng"; then @@ -6371,9 +6315,7 @@ if [ "$CFG_LIBJPEG" = "no" ]; then elif [ "$CFG_LIBJPEG" = "system" ]; then QT_CONFIG="$QT_CONFIG system-jpeg" fi -if [ "$CFG_JPEG" = "no" ]; then - QT_CONFIG="$QT_CONFIG no-jpeg" -elif [ "$CFG_JPEG" = "yes" ]; then +if [ "$CFG_JPEG" = "yes" ]; then QT_CONFIG="$QT_CONFIG jpeg" fi if [ "$CFG_LIBPNG" = "no" ]; then @@ -6382,14 +6324,10 @@ fi if [ "$CFG_LIBPNG" = "system" ]; then QT_CONFIG="$QT_CONFIG system-png" fi -if [ "$CFG_PNG" = "no" ]; then - QT_CONFIG="$QT_CONFIG no-png" -elif [ "$CFG_PNG" = "yes" ]; then +if [ "$CFG_PNG" = "yes" ]; then QT_CONFIG="$QT_CONFIG png" fi -if [ "$CFG_GIF" = "no" ]; then - QT_CONFIG="$QT_CONFIG no-gif" -elif [ "$CFG_GIF" = "yes" ]; then +if [ "$CFG_GIF" = "yes" ]; then QT_CONFIG="$QT_CONFIG gif" fi if [ "$CFG_DOUBLECONVERSION" = "no" ]; then @@ -6714,7 +6652,7 @@ QMakeVar set sql-drivers "$SQL_DRIVERS" QMakeVar set sql-plugins "$SQL_PLUGINS" # 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_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG" [ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS" |