Bug 646489 - Require yasm 1.0.1 instead of yasm 1.1.0 for libjpeg-turbo on Linux. r=khuey
authorJustin Lebar <justin.lebar@gmail.com>
Sat, 09 Apr 2011 16:14:30 -0700
changeset 67788 028a07f2fae2d706e00e1d0e2db5e60f5e37d958
parent 67787 2a2330ab6a2998746b465aba7cdafbd21ba4cda1
child 67789 a8449b5e644016c651b590fa9ca5b569bc3c52d5
push idunknown
push userunknown
push dateunknown
reviewerskhuey
bugs646489
milestone2.2a1pre
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 646489 - Require yasm 1.0.1 instead of yasm 1.1.0 for libjpeg-turbo on Linux. r=khuey
configure.in
--- a/configure.in
+++ b/configure.in
@@ -1,10 +1,10 @@
 dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; -*-
-dnl vi: set tabstop=4 shiftwidth=4 expandtab:
+dnl vi: set tabstop=4 shiftwidth=4 expandtab syntax=m4:
 dnl ***** BEGIN LICENSE BLOCK *****
 dnl Version: MPL 1.1/GPL 2.0/LGPL 2.1
 dnl
 dnl The contents of this file are subject to the Mozilla Public License Version
 dnl 1.1 (the "License"); you may not use this file except in compliance with
 dnl the License. You may obtain a copy of the License at
 dnl http://www.mozilla.org/MPL/
 dnl
@@ -6416,19 +6416,26 @@ dnl doesn't exist or we have too old of 
 if test -n "$LIBJPEG_TURBO_X86_ASM" -o -n "$LIBJPEG_TURBO_X64_ASM" ; then
     AC_MSG_CHECKING([for YASM assembler])
     AC_CHECK_PROGS(LIBJPEG_TURBO_AS, yasm, "")
 
     if test -z "$LIBJPEG_TURBO_AS" ; then
         AC_MSG_ERROR([yasm is required to build with libjpeg-turbo's optimized JPEG decoding routines, but you do not appear to have yasm installed.  Either install it or configure with --disable-libjpeg-turbo to use the pure C JPEG decoder.  See https://developer.mozilla.org/en/YASM for more details.])
     fi
 
-    dnl Check for yasm 1.1 or greater.
-    if test "$_YASM_MAJOR_VERSION" -lt "1" -o \( "$_YASM_MAJOR_VERSION" -eq "1" -a "$_YASM_MINOR_VERSION" -lt "1" \) ; then
-        AC_MSG_ERROR([yasm 1.1 or greater is required to build with libjpeg-turbo's optimized JPEG decoding routines, but you appear to have version $_YASM_MAJOR_VERSION.$_YASM_MINOR_VERSION.  Upgrade to the newest version or configure with --disable-libjpeg-turbo to use the pure C JPEG decoder.  See https://developer.mozilla.org/en/YASM for more details.])
+    dnl Check that we have the right yasm version.  We require 1.0.1 or newer
+    dnl on Linux and 1.1 or newer everywhere else.
+    if test "$OS_ARCH" = "Linux" ; then
+        if test "$_YASM_MAJOR_VERSION" -lt "1" -o \( "$_YASM_MAJOR_VERSION" -eq "1" -a "$_YASM_MINOR_VERSION" -eq "0" -a "$_YASM_RELEASE" -lt "1" \) ; then
+            AC_MSG_ERROR([yasm 1.0.1 or greater is required to build with libjpeg-turbo's optimized JPEG decoding routines, but you appear to have version $_YASM_MAJOR_VERSION.$_YASM_MINOR_VERSION.$_YASM_MINOR_VERSION.  Upgrade to the newest version or configure with --disable-libjpeg-turbo to use the pure C JPEG decoder.  See https://developer.mozilla.org/en/YASM for more details.])
+        fi
+    else
+        if test "$_YASM_MAJOR_VERSION" -lt "1" -o \( "$_YASM_MAJOR_VERSION" -eq "1" -a "$_YASM_MINOR_VERSION" -lt "1" \) ; then
+            AC_MSG_ERROR([yasm 1.1 or greater is required to build with libjpeg-turbo's optimized JPEG decoding routines, but you appear to have version $_YASM_MAJOR_VERSION.$_YASM_MINOR_VERSION.  Upgrade to the newest version or configure with --disable-libjpeg-turbo to use the pure C JPEG decoder.  See https://developer.mozilla.org/en/YASM for more details.])
+        fi
     fi
 fi
 
 if test -n "$LIBJPEG_TURBO_X86_ASM"; then
     AC_DEFINE(LIBJPEG_TURBO_X86_ASM)
 elif test -n "$LIBJPEG_TURBO_X64_ASM"; then
     AC_DEFINE(LIBJPEG_TURBO_X64_ASM)
 elif test -n "$MOZ_LIBJPEG_TURBO"; then