aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-01-18 21:05:05 +0000
committerMåns Rullgård <mans@mansr.com>2010-01-18 21:05:05 +0000
commit343aef9b3358ce1c9dcaff0d483e9b557225fc7d (patch)
tree3eefc611c7a9e1041718fca082cd2ad399db8227 /configure
parente939cedd9d8513b09a767b9e4060adc03fd6a604 (diff)
downloadffmpeg-343aef9b3358ce1c9dcaff0d483e9b557225fc7d.tar.gz
configure: split $cpu handling by arch
Originally committed as revision 21296 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure53
1 files changed, 47 insertions, 6 deletions
diff --git a/configure b/configure
index 62f9bf2544..0221b95b65 100755
--- a/configure
+++ b/configure
@@ -1812,8 +1812,11 @@ case "$arch" in
esac
is_in $arch $ARCH_LIST || echo "WARNING: unknown arch $arch"
+enable $arch
# Add processor-specific flags
+if enabled ppc; then
+
case $cpu in
601|ppc601|PowerPC601)
cpuflags="-mcpu=601"
@@ -1840,6 +1843,11 @@ case $cpu in
cpuflags="-mcpu=cell"
enable ldbrx
;;
+esac
+
+elif enabled x86; then
+
+case $cpu in
i[345]86|pentium)
cpuflags="-march=$cpu"
disable mmx
@@ -1861,9 +1869,19 @@ case $cpu in
enable cmov
disable fast_cmov
;;
+esac
+
+elif enabled sparc; then
+
+case $cpu in
sparc64)
cpuflags="-mcpu=v9"
;;
+esac
+
+elif enabled arm; then
+
+case $cpu in
arm11*|cortex*)
cpuflags="-mcpu=$cpu"
;;
@@ -1876,15 +1894,35 @@ case $cpu in
arm*)
cpuflags="-mcpu=$cpu"
;;
+esac
+
+elif enabled alpha; then
+
+case $cpu in
ev4|ev45|ev5|ev56|pca56|ev6|ev67)
enabled ccc && cpuflags="-arch $cpu" || cpuflags="-mcpu=$cpu"
;;
+esac
+
+elif enabled bfin; then
+
+case $cpu in
bf*)
cpuflags="-mcpu=$cpu"
;;
+esac
+
+elif enabled mips; then
+
+case $cpu in
mips*|[45]k*|[237]4k*|m4k|r*000|loongson2[ef])
cpuflags="-march=$cpu"
;;
+esac
+
+elif enabled avr32; then
+
+case $cpu in
ap7[02]0[0-2])
subarch="avr32_ap"
cpuflags="-mpart=$cpu"
@@ -1901,13 +1939,16 @@ case $cpu in
subarch="avr32_uc"
cpuflags="-march=$cpu"
;;
- generic)
- ;;
- *)
- echo "WARNING: Unknown CPU \"$cpu\", ignored."
- ;;
esac
+else
+
+ if test "$cpu" != generic; then
+ echo "WARNING: Unknown CPU \"$cpu\", ignored."
+ fi
+
+fi
+
add_cflags $cpuflags
add_asflags $cpuflags
@@ -1950,7 +1991,7 @@ EOF
;;
esac
-enable $arch $subarch
+enable $subarch
enabled spic && enable pic
check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic