Bug 513681 - part 2 - remove support for the MOZ_IMG_DECODERS build option.r=joe,khuey.a=blocker
authorBobby Holley <bobbyholley@gmail.com>
Wed, 11 Aug 2010 20:12:24 -0400
changeset 51192 bdaed1b28b382e62c433e5d08a64101ee092c52e
parent 51191 ba16605752098bfb2805bf1f26bfe6f2b8973c63
child 51193 724bf8e536e5dd3ad1063fece3da7f6591d6a3fb
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoe, blocker
bugs513681
milestone2.0b5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 513681 - part 2 - remove support for the MOZ_IMG_DECODERS build option.r=joe,khuey.a=blocker
config/autoconf.mk.in
configure.in
js/src/config/autoconf.mk.in
modules/libimg/png/Makefile.in
modules/libpr0n/Makefile.in
modules/libpr0n/build/Makefile.in
modules/libpr0n/decoders/Makefile.in
modules/libpr0n/decoders/png/Makefile.in
modules/libpr0n/encoders/png/Makefile.in
toolkit/library/libxul-config.mk
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -94,17 +94,16 @@ MOZ_JS_LIBS		   = @MOZ_JS_LIBS@
 
 MOZ_DEBUG	= @MOZ_DEBUG@
 MOZ_DEBUG_SYMBOLS = @MOZ_DEBUG_SYMBOLS@
 MOZ_DEBUG_ENABLE_DEFS		= @MOZ_DEBUG_ENABLE_DEFS@
 MOZ_DEBUG_DISABLE_DEFS	= @MOZ_DEBUG_DISABLE_DEFS@
 MOZ_DEBUG_FLAGS	= @MOZ_DEBUG_FLAGS@
 MOZ_DEBUG_LDFLAGS=@MOZ_DEBUG_LDFLAGS@
 MOZ_EXTENSIONS  = @MOZ_EXTENSIONS@
-MOZ_IMG_DECODERS= @MOZ_IMG_DECODERS@
 MOZ_IMG_ENCODERS= @MOZ_IMG_ENCODERS@
 MOZ_JSDEBUGGER  = @MOZ_JSDEBUGGER@
 MOZ_IPC 	= @MOZ_IPC@
 MOZ_IPDL_TESTS 	= @MOZ_IPDL_TESTS@
 MOZ_LEAKY	= @MOZ_LEAKY@
 MOZ_MEMORY      = @MOZ_MEMORY@
 MOZ_JPROF       = @MOZ_JPROF@
 MOZ_SHARK       = @MOZ_SHARK@
--- a/configure.in
+++ b/configure.in
@@ -4871,17 +4871,16 @@ dnl ====================================
 MOZ_ARG_HEADER(Application)
 
 BUILD_STATIC_LIBS=
 ENABLE_TESTS=1
 MOZ_ACTIVEX_SCRIPTING_SUPPORT=
 MOZ_BRANDING_DIRECTORY=
 MOZ_OFFICIAL_BRANDING=
 MOZ_FEEDS=1
-MOZ_IMG_DECODERS_DEFAULT="png gif jpeg bmp icon"
 MOZ_IMG_ENCODERS_DEFAULT="png jpeg"
 MOZ_INSTALLER=1
 MOZ_IPC=1
 MOZ_JAVAXPCOM=
 MOZ_JSDEBUGGER=1
 MOZ_JSLOADER=1
 MOZ_MATHML=1
 MOZ_MORK=
@@ -6304,51 +6303,16 @@ MOZ_EXTENSIONS=`${PERL} ${srcdir}/build/
 dnl Ensure every extension exists, to avoid mostly-inscrutable error messages
 dnl when trying to build a nonexistent extension.
 for extension in $MOZ_EXTENSIONS; do
     if test ! -d "${srcdir}/extensions/${extension}"; then
         AC_MSG_ERROR([Unrecognized extension provided to --enable-extensions: ${extension}.])
     fi
 done
 
-
-dnl ========================================================
-dnl Image decoders
-dnl ========================================================
-case "$MOZ_WIDGET_TOOLKIT" in
-beos|windows|os2|mac|cocoa)
-    ;;
-*)
-    if test -z "$MOZ_ENABLE_GTK2" -a -z "$MOZ_ENABLE_QT"; then
-       MOZ_IMG_DECODERS_DEFAULT=`echo $MOZ_IMG_DECODERS_DEFAULT | sed -e 's|icon||'`
-    fi
-    ;;
-esac
-
-MOZ_ARG_ENABLE_STRING(image-decoders,
-[  --enable-image-decoders[={mod1,mod2,default,all,none}]
-                          Enable specific image decoders],
-[ for option in `echo $enableval | sed 's/,/ /g'`; do
-    if test "$option" = "yes" -o "$option" = "all"; then
-        MOZ_IMG_DECODERS="$MOZ_IMG_DECODERS $MOZ_IMG_DECODERS_DEFAULT"
-    elif test "$option" = "no" -o "$option" = "none"; then
-        MOZ_IMG_DECODERS=""
-    elif test "$option" = "default"; then
-        MOZ_IMG_DECODERS="$MOZ_IMG_DECODERS $MOZ_IMG_DECODERS_DEFAULT"
-    elif test `echo "$option" | grep -c \^-` != 0; then
-        option=`echo $option | sed 's/^-//'`
-        MOZ_IMG_DECODERS=`echo "$MOZ_IMG_DECODERS" | sed "s/ ${option}//"`
-    else
-        MOZ_IMG_DECODERS="$MOZ_IMG_DECODERS $option"
-    fi
-done],
-    MOZ_IMG_DECODERS="$MOZ_IMG_DECODERS_DEFAULT")
-
-dnl Dupes are removed in the encoder section because it will also add decoders
-
 dnl ========================================================
 dnl Image encoders
 dnl ========================================================
 MOZ_ARG_ENABLE_STRING(image-encoders,
 [  --enable-image-encoders[={mod1,mod2,default,all,none}]
                           Enable specific image encoders],
 [ for option in `echo $enableval | sed 's/,/ /g'`; do
     if test "$option" = "yes" -o "$option" = "all"; then
@@ -6364,17 +6328,16 @@ MOZ_ARG_ENABLE_STRING(image-encoders,
     else
         addencoder="$option"
     fi
     MOZ_IMG_ENCODERS="$MOZ_IMG_ENCODERS $addencoder"
 done],
     MOZ_IMG_ENCODERS="$MOZ_IMG_ENCODERS_DEFAULT")
 
 dnl Remove dupes
-MOZ_IMG_DECODERS=`${PERL} ${srcdir}/build/unix/uniq.pl ${MOZ_IMG_DECODERS}`
 MOZ_IMG_ENCODERS=`${PERL} ${srcdir}/build/unix/uniq.pl ${MOZ_IMG_ENCODERS}`
 
 dnl ========================================================
 dnl MathML on by default
 dnl ========================================================
 MOZ_ARG_DISABLE_BOOL(mathml,
 [  --disable-mathml        Disable MathML support],
     MOZ_MATHML=,
@@ -8721,17 +8684,16 @@ AC_SUBST(MOZ_PSM)
 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_SHARK@
 MOZ_CALLGRIND   = @MOZ_CALLGRIND@
 MOZ_VTUNE       = @MOZ_VTUNE@
--- a/modules/libimg/png/Makefile.in
+++ b/modules/libimg/png/Makefile.in
@@ -62,27 +62,25 @@ CSRCS		= \
 		pngerror.c \
 		pngget.c \
 		pngmem.c \
 		pngset.c \
 		pngtrans.c \
 		$(NULL)
 
 # These files enable support for reading PNGs
-ifneq (,$(filter png,$(MOZ_IMG_DECODERS)))
 CSRCS		+= \
 		pngpread.c \
 		pngread.c \
 		pngrio.c \
 		pngrtran.c \
 		pngrutil.c \
 		$(NULL)
 
 DEFINES		+= -DMOZ_PNG_READ
-endif
 
 # These files enable support for writing PNGs
 ifneq (,$(filter png,$(MOZ_IMG_ENCODERS)))
 CSRCS		+= \
 		pngwio.c \
 		pngwrite.c \
 		pngwtran.c \
 		pngwutil.c \
--- a/modules/libpr0n/Makefile.in
+++ b/modules/libpr0n/Makefile.in
@@ -39,21 +39,17 @@ DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE		= imglib2
 
-DIRS		= public src 
-
-ifdef MOZ_IMG_DECODERS
-DIRS		+= decoders
-endif
+DIRS		= public src decoders
 
 ifdef MOZ_IMG_ENCODERS
 DIRS		+= encoders
 endif
 
 ifdef ENABLE_TESTS
 DIRS  += test
 endif
--- a/modules/libpr0n/build/Makefile.in
+++ b/modules/libpr0n/build/Makefile.in
@@ -45,33 +45,34 @@ include $(DEPTH)/config/autoconf.mk
 MODULE		= imglib2
 LIBRARY_NAME	= imglib2
 EXPORT_LIBRARY = 1
 IS_COMPONENT	= 1
 MODULE_NAME	= nsImageLib2Module
 GRE_MODULE	= 1
 LIBXUL_LIBRARY = 1
 
+DECODERS = png gif jpeg bmp
 
 CPPSRCS = \
 		nsImageModule.cpp \
 		$(NULL)
 
 LOCAL_INCLUDES	= \
 		-I. \
 		-I$(srcdir)/../src \
-		$(foreach d,$(filter-out icon,$(MOZ_IMG_DECODERS)), \
+		$(foreach d,$(filter-out icon,$(DECODERS)), \
 			-I$(srcdir)/../decoders/${d}) \
 		$(foreach d,$(MOZ_IMG_ENCODERS), \
 			-I$(srcdir)/../encoders/${d}) \
 		$(NULL)
 
 SHARED_LIBRARY_LIBS = \
 		../src/$(LIB_PREFIX)imglib2_s.$(LIB_SUFFIX) \
-		$(foreach d,$(filter-out icon,$(MOZ_IMG_DECODERS)), \
+		$(foreach d,$(filter-out icon,$(DECODERS)), \
 			../decoders/${d}/$(LIB_PREFIX)img${d}_s.$(LIB_SUFFIX))\
 		$(foreach d,$(MOZ_IMG_ENCODERS), \
 			../encoders/${d}/$(LIB_PREFIX)img${d}e_s.$(LIB_SUFFIX))\
 		$(NULL)
 
 EXTRA_DSO_LIBS	= \
 		gkgfx \
 		thebes \
@@ -87,17 +88,17 @@ EXTRA_DSO_LDOPTS = \
 		$(NULL)
 
 # Force a rebuild of nsImageModule when either of MOZ_IMG_{DE,EN}CODERS changes
 
 GARBAGE += _img_list nsImgBuildDefines.h
 
 export::
 	{ \
-	$(foreach d,$(filter-out icon,$(MOZ_IMG_DECODERS)), \
+	$(foreach d,$(filter-out icon,$(DECODERS)), \
 		echo "#define IMG_BUILD_DECODER_${d}" ; ) \
 	$(foreach d,$(MOZ_IMG_ENCODERS), \
 		echo "#define IMG_BUILD_ENCODER_${d}" ; ) \
 	} > nsImgBuildDefines.tmp
 	@if `cmp -s nsImgBuildDefines.h nsImgBuildDefines.tmp`; then \
 		rm -f nsImgBuildDefines.tmp; \
 	else \
 		rm -f nsImgBuildDefines.h; \
--- a/modules/libpr0n/decoders/Makefile.in
+++ b/modules/libpr0n/decoders/Makefile.in
@@ -37,17 +37,18 @@
 
 DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-ifneq (,$(filter icon,$(MOZ_IMG_DECODERS)))
+DECODERS = png gif jpeg bmp
+
 ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
 DIRS = icon/gtk icon
 endif
 ifneq (,$(filter qt,$(MOZ_WIDGET_TOOLKIT)))
 DIRS = icon/qt icon
 endif
 ifeq (,$(filter-out WINNT WINCE, $(OS_ARCH)))
 DIRS = icon/win icon
@@ -56,14 +57,13 @@ ifeq ($(OS_ARCH),OS2)
 DIRS = icon/os2 icon
 endif
 ifeq ($(OS_ARCH),BeOS)
 DIRS = icon/beos icon
 endif
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 DIRS = icon/mac icon
 endif
-endif # icon
 
-DIRS += $(filter-out icon,$(MOZ_IMG_DECODERS))
+DIRS += $(DECODERS)
 
 include $(topsrcdir)/config/rules.mk
 
--- a/modules/libpr0n/decoders/png/Makefile.in
+++ b/modules/libpr0n/decoders/png/Makefile.in
@@ -51,16 +51,14 @@ LIBXUL_LIBRARY = 1
 EXTRA_DSO_LIBS	= gkgfx
 
 CPPSRCS		= nsPNGDecoder.cpp
 
 ifneq (,$(filter png,$(MOZ_IMG_ENCODERS)))
 DEFINES		+= -DMOZ_PNG_WRITE
 endif
 
-ifneq (,$(filter png,$(MOZ_IMG_DECODERS)))
 DEFINES		+= -DMOZ_PNG_READ
-endif
 
 # nsPNGDecoder.cpp includes RasterImage.h
 LOCAL_INCLUDES += -I$(topsrcdir)/modules/libpr0n/src/
 
 include $(topsrcdir)/config/rules.mk
--- a/modules/libpr0n/encoders/png/Makefile.in
+++ b/modules/libpr0n/encoders/png/Makefile.in
@@ -48,17 +48,15 @@ LIBXUL_LIBRARY = 1
 
 EXTRA_DSO_LIBS	= gkgfx
 
 
 ifneq (,$(filter png,$(MOZ_IMG_ENCODERS)))
 DEFINES		+= -DMOZ_PNG_WRITE
 endif
 
-ifneq (,$(filter png,$(MOZ_IMG_DECODERS)))
 DEFINES		+= -DMOZ_PNG_READ
-endif
 
 CPPSRCS		= nsPNGEncoder.cpp
 
 include $(topsrcdir)/config/rules.mk
 
 
--- a/toolkit/library/libxul-config.mk
+++ b/toolkit/library/libxul-config.mk
@@ -288,17 +288,18 @@ endif
 endif
 
 ifdef MOZ_ENABLE_GTK2
 ifdef MOZ_X11
 STATIC_LIBS += gtkxtbin
 endif
 endif
 
-ifneq (,$(filter icon,$(MOZ_IMG_DECODERS)))
+# Platform-specific icon channel stuff - supported mostly-everywhere
+ifneq (,$(filter beos windows os2 mac cocoa gtk2 qt,$(MOZ_WIDGET_TOOLKIT)))
 DEFINES += -DICON_DECODER
 COMPONENT_LIBS += imgicon
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
 COMPONENT_LIBS += widget_android
 endif