Bug 627981 - [clang]: A lot of errors for libtheora; r=ted

This commit is contained in:
Timothy B. Terriberry 2011-03-17 09:03:00 -04:00
parent df5b0c2ac1
commit ced4cd8f3f
3 changed files with 25 additions and 0 deletions

View File

@ -385,6 +385,7 @@ GNU_LD = @GNU_LD@
GNU_CC = @GNU_CC@
GNU_CXX = @GNU_CXX@
HAVE_GCC3_ABI = @HAVE_GCC3_ABI@
HAVE_OLD_CLANG = @HAVE_OLD_CLANG@
INTEL_CC = @INTEL_CC@
INTEL_CXX = @INTEL_CXX@

View File

@ -1167,6 +1167,28 @@ fi
fi # COMPILE_ENVIRONMENT
dnl clang prior to 2.9 (including Xcode 4) does not support all the
dnl constructs required by the libtheora inline asm. This is used to
dnl detect and disable it
AC_LANG_SAVE
AC_LANG_C
AC_TRY_COMPILE([
#if defined(__clang__)
# if __clang_major__<2 || (__clang_major__==2 && __clang_minor__<9)
# error "clang older than 2.9 detected"
# endif
#endif
],
[],
result="yes",
result="no")
if test "$result" = "no"; then
AC_DEFINE(HAVE_OLD_CLANG)
HAVE_OLD_CLANG=1
fi
AC_LANG_RESTORE
AC_SUBST(HAVE_OLD_CLANG)
if test -n "$MAKE"; then
if test `echo $MAKE | grep -c make.py` != 1; then
NOT_PYMAKE=$MAKE

View File

@ -90,6 +90,7 @@ CSRCS += \
$(NULL)
endif
else
ifndef HAVE_OLD_CLANG
VPATH += $(srcdir)/x86
CSRCS += \
@ -102,6 +103,7 @@ CSRCS += \
$(NULL)
endif
endif
endif
ifdef GNU_AS
ifeq ($(findstring arm,$(OS_TEST)), arm)