[FFmpeg-cvslog] r19485 - trunk/configure
mru
subversion
Wed Jul 22 18:05:24 CEST 2009
Author: mru
Date: Wed Jul 22 18:05:24 2009
New Revision: 19485
Log:
configure: group all cpu-specific tests together
Modified:
trunk/configure
Modified: trunk/configure
==============================================================================
--- trunk/configure Wed Jul 22 17:11:00 2009 (r19484)
+++ trunk/configure Wed Jul 22 18:05:24 2009 (r19485)
@@ -1996,7 +1996,55 @@ check_cc <<EOF && enable inline_asm
void foo(void) { __asm__ volatile ("" ::); }
EOF
-if enabled x86; then
+if enabled arm; then
+ check_ld <<EOF && enable vfp_args
+__asm__ (".eabi_attribute 28, 1");
+int main(void) { return 0; }
+EOF
+
+ # We have to check if pld is a nop and disable it.
+ check_asm pld '"pld [r0]"'
+
+ enabled armv5te && check_asm armv5te '"qadd r0, r0, r0"'
+ enabled armv6 && check_asm armv6 '"sadd16 r0, r0, r0"'
+ enabled armv6t2 && check_asm armv6t2 '"movt r0, #0"'
+ enabled armvfp && check_asm armvfp '"fadds s0, s0, s0"'
+ enabled iwmmxt && check_asm iwmmxt '"wunpckelub wr6, wr4"'
+ enabled neon && check_asm neon '"vadd.i16 q0, q0, q0"'
+elif enabled mips; then
+ check_asm loongson '"dmult.g $1, $2, $3"'
+ enabled mmi && check_asm mmi '"lq $2, 0($2)"'
+elif enabled ppc; then
+ check_asm dcbzl '"dcbzl 0, 1"'
+ check_asm ppc4xx '"maclhw r10, r11, r12"'
+ check_asm xform_asm '"lwzx 0, %y0" :: "Z"(*(int*)0)'
+
+ # AltiVec flags: The FSF version of GCC differs from the Apple version
+ if enabled altivec; then
+ check_cflags -maltivec -mabi=altivec &&
+ { check_header altivec.h && inc_altivec_h="#include <altivec.h>" ; } ||
+ check_cflags -faltivec
+
+ # check if our compiler supports Motorola AltiVec C API
+ check_cc <<EOF || disable altivec
+$inc_altivec_h
+int main(void) {
+ vector signed int v1, v2, v3;
+ v1 = vec_add(v2,v3);
+ return 0;
+}
+EOF
+
+ # check if our compiler supports braces for vector declarations
+ check_cc <<EOF || die "You need a compiler that supports {} in AltiVec vector declarations."
+$inc_altivec_h
+int main (void) { (vector int) {1}; return 0; }
+EOF
+ fi
+elif enabled sparc; then
+ enabled vis && check_asm vis '"pdist %f0, %f0, %f0"' -mcpu=ultrasparc &&
+ add_cflags -mcpu=ultrasparc -mtune=ultrasparc
+elif enabled x86; then
# check whether EBP is available on x86
# As 'i' is stored on the stack, this program will crash
# if the base pointer is used to access it because the
@@ -2041,57 +2089,6 @@ EOF
disabled yasm || { check_yasm "pabsw xmm0, xmm0" && enable yasm; }
fi
-# check for assembler specific support
-
-enabled arm && check_ld <<EOF && enable vfp_args
-__asm__ (".eabi_attribute 28, 1");
-int main(void) { return 0; }
-EOF
-
-enabled mips && check_asm loongson '"dmult.g $1, $2, $3"'
-
-enabled ppc && check_asm dcbzl '"dcbzl 0, 1"'
-enabled ppc && check_asm ppc4xx '"maclhw r10, r11, r12"'
-enabled ppc && check_asm xform_asm '"lwzx 0, %y0" :: "Z"(*(int*)0)'
-
-# check for SIMD availability
-
-# AltiVec flags: The FSF version of GCC differs from the Apple version
-if enabled altivec; then
- check_cflags -maltivec -mabi=altivec &&
- { check_header altivec.h && inc_altivec_h="#include <altivec.h>" ; } ||
- check_cflags -faltivec
-
- # check if our compiler supports Motorola AltiVec C API
- check_cc <<EOF || disable altivec
-$inc_altivec_h
-int main(void) {
- vector signed int v1, v2, v3;
- v1 = vec_add(v2,v3);
- return 0;
-}
-EOF
-
- # check if our compiler supports braces for vector declarations
- check_cc <<EOF || die "You need a compiler that supports {} in AltiVec vector declarations."
-$inc_altivec_h
-int main (void) { (vector int) {1}; return 0; }
-EOF
-fi
-
-# We have to check if pld is a nop and disable it.
-enabled arm && check_asm pld '"pld [r0]"'
-enabled armv5te && check_asm armv5te '"qadd r0, r0, r0"'
-enabled armv6 && check_asm armv6 '"sadd16 r0, r0, r0"'
-enabled armv6t2 && check_asm armv6t2 '"movt r0, #0"'
-enabled armvfp && check_asm armvfp '"fadds s0, s0, s0"'
-enabled iwmmxt && check_asm iwmmxt '"wunpckelub wr6, wr4"'
-enabled mmi && check_asm mmi '"lq $2, 0($2)"'
-enabled neon && check_asm neon '"vadd.i16 q0, q0, q0"'
-enabled vis && check_asm vis '"pdist %f0, %f0, %f0"' -mcpu=ultrasparc
-
-enabled vis && add_cflags -mcpu=ultrasparc -mtune=ultrasparc
-
check_cc <<EOF || die "endian test failed"
unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
EOF
More information about the ffmpeg-cvslog
mailing list