зеркало из https://github.com/mozilla/pjs.git
Bug 646254 - configure should error out if yasm version is too low to assemble libjpeg-turbo. r=khuey
Will generate an error if yasm is not at least 1.1.0 unless --disable-libjepg-turbo is passed to configure.
This commit is contained in:
Родитель
af7b3fec47
Коммит
c4080f5760
45
configure.in
45
configure.in
|
@ -4971,6 +4971,7 @@ VPX_AS_CONVERSION=
|
|||
VPX_ASM_SUFFIX=
|
||||
VPX_X86_ASM=
|
||||
VPX_ARM_ASM=
|
||||
MOZ_LIBJPEG_TURBO=1
|
||||
LIBJPEG_TURBO_AS=
|
||||
LIBJPEG_TURBO_ASFLAGS=
|
||||
LIBJPEG_TURBO_X86_ASM=
|
||||
|
@ -6449,18 +6450,17 @@ dnl ========================================================
|
|||
dnl = libjpeg-turbo configuration
|
||||
dnl ========================================================
|
||||
|
||||
MOZ_ARG_DISABLE_BOOL(libjpeg_turbo,
|
||||
[ --disable-libjpeg-turbo Disable optimized jpeg decoding routines],
|
||||
MOZ_LIBJPEG_TURBO=,
|
||||
MOZ_LIBJPEG_TURBO=1)
|
||||
|
||||
dnl Detect if we can use yasm to compile libjpeg-turbo's optimized assembly
|
||||
dnl files.
|
||||
AC_MSG_CHECKING([for YASM assembler])
|
||||
AC_CHECK_PROGS(LIBJPEG_TURBO_AS, yasm, "")
|
||||
|
||||
dnl XXX jlebar -- need a yasm version check here.
|
||||
if test -n "$MOZ_LIBJPEG_TURBO"; then
|
||||
|
||||
if test -n "LIBJPEG_TURBO_AS"; then
|
||||
|
||||
LIBJPEG_TURBO_AS="yasm"
|
||||
|
||||
dnl We have YASM; see if we support it on this platform.
|
||||
dnl Do we support libjpeg-turbo on this platform?
|
||||
case "$OS_ARCH:$OS_TEST" in
|
||||
Linux:x86|Linux:i?86)
|
||||
LIBJPEG_TURBO_ASFLAGS="-f elf32 -rnasm -pnasm -DPIC -DELF"
|
||||
|
@ -6496,14 +6496,33 @@ if test -n "LIBJPEG_TURBO_AS"; then
|
|||
;;
|
||||
esac
|
||||
|
||||
fi # end have YASM
|
||||
fi
|
||||
|
||||
dnl If we're on a system which supports libjpeg-turbo's asm routines and
|
||||
dnl --disable-libjpeg-turbo wasn't passed, check for yasm, and error out if it
|
||||
dnl doesn't exist or we have too old of a version.
|
||||
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.])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$LIBJPEG_TURBO_X86_ASM"; then
|
||||
AC_DEFINE(LIBJPEG_TURBO_X86_ASM)
|
||||
AC_DEFINE(LIBJPEG_TURBO_X86_ASM)
|
||||
elif test -n "$LIBJPEG_TURBO_X64_ASM"; then
|
||||
AC_DEFINE(LIBJPEG_TURBO_X64_ASM)
|
||||
else
|
||||
AC_MSG_WARN([No assembler or assembly support for libjpeg-turbo. Using unoptimized C routines.])
|
||||
AC_DEFINE(LIBJPEG_TURBO_X64_ASM)
|
||||
elif test -n "$MOZ_LIBJPEG_TURBO"; then
|
||||
dnl Warn if we're not building the optimized routines, even though the user
|
||||
dnl didn't specify --disable-libjpeg-turbo.
|
||||
AC_MSG_WARN([No assembler or assembly support for libjpeg-turbo. Using unoptimized C routines.])
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
|
|
Загрузка…
Ссылка в новой задаче