[SCM] x264 packaging branch, ubuntu, updated. debian/0.85.1448+git1a6d32-1-1-g00986c9

lool at users.alioth.debian.org lool at users.alioth.debian.org
Tue Mar 9 20:30:29 UTC 2010


The following commit has been merged in the ubuntu branch:
commit 00986c90da01b48b92b062bfeec0d5db6d235ea1
Author: Loïc Minier <lool at dooz.org>
Date:   Tue Mar 9 21:30:12 2010 +0100

    Add check_c() macro and use it for altivec check

diff --git a/debian/confflags b/debian/confflags
index 04fbfb1..94f0a9c 100644
--- a/debian/confflags
+++ b/debian/confflags
@@ -37,10 +37,11 @@ else
 CC := $(DEB_HOST_GNU_TYPE)-gcc
 endif
 
-# this outputs 0 or 1 depending on whether a piece of assembly can be compiled
-# with the *default* gcc flags; this is used to test the toolchain *default*
-# configuration
-check_asm = $(shell echo 'void foo(void) { __asm__ volatile("$(1)"); }' | $(CC) -x c -c - -o /dev/null 2>/dev/null && echo 1 || echo 0)
+# this outputs 0 or 1 depending on whether a piece of C or assembly can be
+# compiled with the *default* gcc flags; this is used to test the toolchain
+# *default* configuration
+check_c = $(shell echo 'int main(void) { $(1); }' | $(CC) -Werror $(2) -x c - -o /dev/null 2>/dev/null && echo 1 || echo 0)
+check_asm = $(call check_c, __asm__ volatile("$(1)"))
 
 do_opt := no
 
@@ -67,7 +68,8 @@ endif
 # -mabi=altivec by default
 # XXX upstream: --disable-asm should disable altivec
 ifneq (,$(filter powerpc powerpc64,$(DEB_HOST_GNU_CPU)))
-has_altivec := $(shell printf '#include <altivec.h>\nvoid foo(void) { vector signed int v1, v2, v3; v1 = vec_add(v2, v3); }\n' | $(CC) -x c -c - -o /dev/null 2>/dev/null && echo 1 || echo 0)
+altivec_c := vector signed int v1, v2, v3; v1 = vec_add(v2, v3)
+has_altivec := $(call check_c, $(altivec_c), -include altivec.h)
 ifneq ($(has_altivec),1)
 # build an Altivec optimized flavor
 do_opt := yes

-- 
x264 packaging



More information about the pkg-multimedia-commits mailing list