Bug 675568 - SIMD of libjpeg turbo is disabled on Windows. r=khuey a=jpr
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 10 Aug 2011 11:46:31 +0900
changeset 73007 ddc2fd44b7fa91c692d308b7de817ac79092448e
parent 73006 9d4a445ca2354d68cb5c1d95f53bf2a2f71cb014
child 73008 7894b27a5a9ada2904ae06e9cd60ac12363ebc13
push idunknown
push userunknown
push dateunknown
reviewerskhuey, jpr
bugs675568
milestone7.0a2
Bug 675568 - SIMD of libjpeg turbo is disabled on Windows. r=khuey a=jpr
configure.in
--- a/configure.in
+++ b/configure.in
@@ -4594,21 +4594,16 @@ if test "$SYSTEM_JPEG" = 1; then
                      #include <sys/types.h>
                      #include <jpeglib.h> ],
                    [ #if JPEG_LIB_VERSION < $MOZJPEG
                      #error "Insufficient JPEG library version ($MOZJPEG required)."
                      #endif ],
                    SYSTEM_JPEG=1,
                    [SYSTEM_JPEG= JPEG_CFLAGS= JPEG_LIBS=]) 
 fi
-
-MOZ_LIBJPEG_TURBO=
-if test -z "$SYSTEM_JPEG"; then
-    MOZ_LIBJPEG_TURBO=1
-fi 
 CFLAGS=$_SAVE_CFLAGS
 LDFLAGS=$_SAVE_LDFLAGS
 LIBS=$_SAVE_LIBS
 
 if test -n "${JPEG_DIR}" -a -d "${JPEG_DIR}" -a "$SYSTEM_JPEG" = 1; then
     JPEG_CFLAGS="-I${JPEG_DIR}/include"
     JPEG_LIBS="-L${JPEG_DIR}/lib ${JPEG_LIBS}"
 fi
@@ -6201,22 +6196,30 @@ MOZ_ARG_WITH_STRING(crashreporter-enable
 if test -z "$MOZ_CRASHREPORTER_ENABLE_PERCENT"; then
    MOZ_CRASHREPORTER_ENABLE_PERCENT=100
 fi
 AC_DEFINE_UNQUOTED(MOZ_CRASHREPORTER_ENABLE_PERCENT, $MOZ_CRASHREPORTER_ENABLE_PERCENT)
 
 dnl ========================================================
 dnl = libjpeg-turbo configuration
 dnl ========================================================
+MOZ_LIBJPEG_TURBO=
+if test -z "$SYSTEM_JPEG"; then
+    MOZ_LIBJPEG_TURBO=1
+fi
 
 MOZ_ARG_DISABLE_BOOL(libjpeg_turbo,
 [ --disable-libjpeg-turbo  Disable optimized jpeg decoding routines],
     MOZ_LIBJPEG_TURBO=,
     MOZ_LIBJPEG_TURBO=1)
 
+if test "$SYSTEM_JPEG" = 1 -a "$MOZ_LIBJPEG_TURBO" = 1; then
+    AC_MSG_ERROR([cannot use --with-system-jpeg with --enable-libjpeg-turbo.])
+fi
+
 dnl Detect if we can use yasm to compile libjpeg-turbo's optimized assembly
 dnl files.
 
 if test -n "$MOZ_LIBJPEG_TURBO"; then
 
   dnl Do we support libjpeg-turbo on this platform?
   case "$OS_ARCH:$OS_TEST" in
   Linux:x86|Linux:i?86)