Bug 591145 - Remove configure checks for encoders. r=khuey a=bsmedberg
authorJory A. Pratt <anarchy@gentoo.org>
Fri, 05 Nov 2010 18:23:05 +0100
changeset 56938 a6246fce5cc2f9a29ad080e9de11e61599825241
parent 56937 76f5f4bfdf6374664842b915599a243931760be8
child 56939 535de221a8ba0d913a6d9c91e35e420228c1bc89
push idunknown
push userunknown
push dateunknown
reviewerskhuey, bsmedberg
bugs591145
milestone2.0b8pre
Bug 591145 - Remove configure checks for encoders. r=khuey a=bsmedberg
config/autoconf.mk.in
configure.in
jpeg/Makefile.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/encoders/Makefile.in
modules/libpr0n/encoders/png/Makefile.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -96,17 +96,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_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_PROFILING   = @MOZ_PROFILING@
 MOZ_JPROF       = @MOZ_JPROF@
 MOZ_SHARK       = @MOZ_SHARK@
--- a/configure.in
+++ b/configure.in
@@ -4937,17 +4937,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_ENCODERS_DEFAULT="png jpeg"
 MOZ_INSTALLER=1
 MOZ_IPC=1
 MOZ_JAVAXPCOM=
 MOZ_JSDEBUGGER=1
 MOZ_JSLOADER=1
 MOZ_MATHML=1
 MOZ_MORK=
 MOZ_MORKREADER=1
@@ -6414,43 +6413,16 @@ dnl Ensure every extension exists, to av
 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 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
-        addencoder="$MOZ_IMG_ENCODERS_DEFAULT"
-    elif test "$option" = "no" -o "$option" = "none"; then
-        MOZ_IMG_ENCODERS=""
-        addencoder=""
-    elif test "$option" = "default"; then
-        addencoder="$MOZ_IMG_ENCODERS_DEFAULT"
-    elif test `echo "$option" | grep -c \^-` != 0; then
-        option=`echo $option | sed 's/^-//'`
-        addencoder=`echo "$MOZ_IMG_ENCODERS" | sed "s/ ${option}//"`
-    else
-        addencoder="$option"
-    fi
-    MOZ_IMG_ENCODERS="$MOZ_IMG_ENCODERS $addencoder"
-done],
-    MOZ_IMG_ENCODERS="$MOZ_IMG_ENCODERS_DEFAULT")
-
-dnl Remove dupes
-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=,
     MOZ_MATHML=1 )
 if test "$MOZ_MATHML"; then
   AC_DEFINE(MOZ_MATHML)
@@ -8843,17 +8815,16 @@ AC_SUBST(MOZ_PSM)
 AC_SUBST(MOZ_DEBUG)
 AC_SUBST(MOZ_DEBUG_SYMBOLS)
 AC_SUBST(MOZ_DEBUG_ENABLE_DEFS)
 AC_SUBST(MOZ_DEBUG_DISABLE_DEFS)
 AC_SUBST(MOZ_DEBUG_FLAGS)
 AC_SUBST(MOZ_DEBUG_LDFLAGS)
 AC_SUBST(WARNINGS_AS_ERRORS)
 AC_SUBST(MOZ_EXTENSIONS)
-AC_SUBST(MOZ_IMG_ENCODERS)
 AC_SUBST(MOZ_JSDEBUGGER)
 AC_SUBST(MOZ_PLUGINS)
 AC_SUBST(MOZ_LOG_REFCNT)
 AC_SUBST(MOZ_LEAKY)
 AC_SUBST(MOZ_JPROF)
 AC_SUBST(MOZ_SHARK)
 AC_SUBST(MOZ_CALLGRIND)
 AC_SUBST(MOZ_VTUNE)
--- a/jpeg/Makefile.in
+++ b/jpeg/Makefile.in
@@ -94,18 +94,16 @@ EXPORTS		= \
 		jmorecfg.h \
 		jpeglib.h \
 		jpegint.h \
 		jwinfig.h \
 		jos2fig.h \
 		$(NULL)
 
 # These files enable support for writing JPEGs
-# (on certain platforms, or if JPEG image encoder support is required)
-ifneq (,$(filter os2 windows,$(MOZ_WIDGET_TOOLKIT))$(filter jpeg,$(MOZ_IMG_ENCODERS)))
 CSRCS		+= \
 		jcapimin.c \
 		jcparam.c \
 		jcapistd.c \
 		jcmarker.c \
 		jcinit.c \
 		jcmainct.c \
 		jchuff.c \
@@ -113,14 +111,12 @@ CSRCS		+= \
 		jcmaster.c \
 		jccoefct.c \
 		jccolor.c \
 		jcphuff.c \
 		jcdctmgr.c \
 		jcprepct.c \
 		$(NULL)
 
-endif
-
 # need static lib for some of the libimg componentry to link properly
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/rules.mk
--- a/js/src/config/autoconf.mk.in
+++ b/js/src/config/autoconf.mk.in
@@ -77,17 +77,16 @@ MOZ_SYNC_BUILD_FILES = @MOZ_SYNC_BUILD_F
 
 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_ENCODERS= @MOZ_IMG_ENCODERS@
 MOZ_JSDEBUGGER  = @MOZ_JSDEBUGGER@
 MOZ_LEAKY	= @MOZ_LEAKY@
 MOZ_MEMORY      = @MOZ_MEMORY@
 MOZ_PROFILING   = @MOZ_PROFILING@
 MOZ_JPROF       = @MOZ_JPROF@
 MOZ_SHARK       = @MOZ_SHARK@
 MOZ_CALLGRIND   = @MOZ_CALLGRIND@
 MOZ_VTUNE       = @MOZ_VTUNE@
--- a/modules/libimg/png/Makefile.in
+++ b/modules/libimg/png/Makefile.in
@@ -61,38 +61,31 @@ CSRCS		= \
 		png.c \
 		pngerror.c \
 		pngget.c \
 		pngmem.c \
 		pngset.c \
 		pngtrans.c \
 		$(NULL)
 
-# These files enable support for reading PNGs
+# These files enable support for reading/writting PNGs
 CSRCS		+= \
 		pngpread.c \
 		pngread.c \
 		pngrio.c \
 		pngrtran.c \
 		pngrutil.c \
-		$(NULL)
-
-DEFINES		+= -DMOZ_PNG_READ
-
-# These files enable support for writing PNGs
-ifneq (,$(filter png,$(MOZ_IMG_ENCODERS)))
-CSRCS		+= \
 		pngwio.c \
 		pngwrite.c \
 		pngwtran.c \
 		pngwutil.c \
 		$(NULL)
 
-DEFINES		+= -DMOZ_PNG_WRITE
-endif
+DEFINES		+= -DMOZ_PNG_READ \
+		-DMOZ_PNG_WRITE
 
 EXPORTS		= png.h pngconf.h mozpngconf.h
 
 LOCAL_INCLUDES	= -I$(srcdir)
 
 FORCE_STATIC_LIB = 1
 # This library is used by other shared libs in a static build
 FORCE_USE_PIC = 1
--- 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 decoders
-
-ifdef MOZ_IMG_ENCODERS
-DIRS		+= encoders
-endif
+PARALLEL_DIRS		= public src decoders encoders
 
 ifdef ENABLE_TESTS
 DIRS  += test
 endif
 
 DIRS		+= build
 
 include $(topsrcdir)/config/rules.mk
--- a/modules/libpr0n/build/Makefile.in
+++ b/modules/libpr0n/build/Makefile.in
@@ -52,25 +52,25 @@ LIBXUL_LIBRARY = 1
 
 CPPSRCS = \
 		nsImageModule.cpp \
 		$(NULL)
 
 LOCAL_INCLUDES	= \
 		-I. \
 		-I$(srcdir)/../src \
-		$(foreach d,$(MOZ_IMG_ENCODERS), \
-			-I$(srcdir)/../encoders/${d}) \
+		-I$(srcdir)/../encoders/png \
+		-I$(srcdir)/../encoders/jpeg \
 		$(NULL)
 
 SHARED_LIBRARY_LIBS = \
 		../src/$(LIB_PREFIX)imglib2_s.$(LIB_SUFFIX) \
 		../decoders/$(LIB_PREFIX)imgdecoders_s.$(LIB_SUFFIX) \
-		$(foreach d,$(MOZ_IMG_ENCODERS), \
-			../encoders/${d}/$(LIB_PREFIX)img${d}e_s.$(LIB_SUFFIX))\
+		../encoders/png/$(LIB_PREFIX)imgpnge_s.$(LIB_SUFFIX)\
+		../encoders/jpeg/$(LIB_PREFIX)imgjpege_s.$(LIB_SUFFIX)\
 		$(NULL)
 
 EXTRA_DSO_LIBS	= \
 		gkgfx \
 		thebes \
 		$(NULL)
 
 EXTRA_DSO_LDOPTS = \
--- a/modules/libpr0n/decoders/Makefile.in
+++ b/modules/libpr0n/decoders/Makefile.in
@@ -55,20 +55,19 @@ CPPSRCS = nsPNGDecoder.cpp nsJPEGDecoder
 
 CSRCS   = iccjpeg.c \
           $(NULL)
 
 # Decoders need RasterImage.h
 LOCAL_INCLUDES += -I$(topsrcdir)/modules/libpr0n/src/
 
 # PNG read/write stuff
-ifneq (,$(filter png,$(MOZ_IMG_ENCODERS)))
-DEFINES		+= -DMOZ_PNG_WRITE
-endif
-DEFINES		+= -DMOZ_PNG_READ
+DEFINES		+= -DMOZ_PNG_WRITE \
+	-DMOZ_PNG_READ \
+	$(NULL)
 
 
 # The Icon Channel stuff really shouldn't live in decoders/icon, but we'll
 # fix that another time.
 ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT)))
 DIRS = icon/gtk icon
 endif
 ifneq (,$(filter qt,$(MOZ_WIDGET_TOOLKIT)))
--- a/modules/libpr0n/encoders/Makefile.in
+++ b/modules/libpr0n/encoders/Makefile.in
@@ -35,12 +35,14 @@
 
 DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DIRS += $(MOZ_IMG_ENCODERS)
+DIRS += png \
+	jpeg \
+	$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
--- a/modules/libpr0n/encoders/png/Makefile.in
+++ b/modules/libpr0n/encoders/png/Makefile.in
@@ -43,20 +43,17 @@ include $(DEPTH)/config/autoconf.mk
 MODULE		= imgpnge
 LIBRARY_NAME	= imgpnge_s
 FORCE_STATIC_LIB = 1
 MODULE_NAME	= imgEncoderPNGModule
 LIBXUL_LIBRARY = 1
 
 EXTRA_DSO_LIBS	= gkgfx
 
-
-ifneq (,$(filter png,$(MOZ_IMG_ENCODERS)))
-DEFINES		+= -DMOZ_PNG_WRITE
-endif
-
-DEFINES		+= -DMOZ_PNG_READ
+DEFINES		+= -DMOZ_PNG_WRITE \
+	-DMOZ_PNG_READ \
+	$(NULL)
 
 CPPSRCS		= nsPNGEncoder.cpp
 
 include $(topsrcdir)/config/rules.mk