From 9eeed841ca81c72cf4318832b2dcf87d3bdc9156 Mon Sep 17 00:00:00 2001 From: =?utf8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Sun, 17 Jun 2007 11:57:50 +0000 Subject: [PATCH] simplify simd extension checking Originally committed as revision 9351 to svn://svn.ffmpeg.org/ffmpeg/trunk --- configure | 79 ++++++++++++++++--------------------------------------- 1 file changed, 22 insertions(+), 57 deletions(-) diff --git a/configure b/configure index ac5effcbb8d..392539516c3 100755 --- a/configure +++ b/configure @@ -637,6 +637,7 @@ ARCH_EXT_LIST=' iwmmxt mmi mmx + ssse3 ' HAVE_LIST=" @@ -673,7 +674,6 @@ HAVE_LIST=" sdl sdl_video_size soundcard_h - ssse3 sys_poll_h sys_soundcard_h threads @@ -691,6 +691,15 @@ CMDLINE_SELECT=" # code dependency declarations +# architecture extensions +altivec_deps="powerpc" +armv5te_deps="armv4l" +armv6_deps="armv4l" +iwmmxt_deps="armv4l" +mmi_deps="mips" +mmx_deps="x86" +ssse3_deps="x86" + # decoders / encoders dxa_decoder_deps="zlib" flashsv_decoder_deps="zlib" @@ -806,16 +815,10 @@ asmalign_pot="unknown" arch=`uname -m` cpu="generic" powerpc_perf="no" -mmx="default" cmov="no" fast_cmov="no" fast_unaligned="no" -armv5te="default" -armv6="default" -iwmmxt="default" -altivec="default" dcbzl="no" -mmi="default" bigendian="no" # OS @@ -1090,6 +1093,10 @@ case "$arch" in ;; esac +enable $arch +enabled_any x86_32 x86_64 && enable x86 +enabled sparc64 && enable sparc + # OS specific osextralibs="-lm" case $targetos in @@ -1302,14 +1309,8 @@ if disabled gpl ; then die_gpl_disabled "The software scaler" swscaler fi -# compute MMX state -if test $mmx = "default"; then - if test $arch = "x86_32" -o $arch = "x86_64"; then - mmx="yes" - else - mmx="no" - fi -fi +enable $ARCH_EXT_LIST +check_deps $ARCH_EXT_LIST test -z "$need_memalign" && need_memalign="$mmx" @@ -1329,15 +1330,6 @@ enabled needmdynamicnopic && add_cflags -mdynamic-no-pic disabled optimize || add_cflags -fomit-frame-pointer -# Can only do AltiVec on PowerPC -if test $altivec = "default"; then - if test $arch = "powerpc"; then - altivec="yes" - else - altivec="no" - fi -fi - # Add processor-specific flags POWERPCMODE="32bits" if test $cpu != "generic"; then @@ -1447,7 +1439,7 @@ if test "$?" != 0; then die "C compiler test failed." fi -if test $arch = "x86_32" -o $arch = "x86_64"; then +if 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 @@ -1468,7 +1460,7 @@ int main(){ EOF # check whether binutils is new enough to compile SSSE3 - check_cc <&1 | grep version | grep Apple`"; then add_cflags "-faltivec" else add_cflags "-maltivec -mabi=altivec" fi - fi -fi check_header altivec.h # check if our compiler supports Motorola AltiVec C API -if enabled altivec; then if enabled altivec_h; then inc_altivec_h="#include " else @@ -1521,41 +1509,24 @@ EOF fi # check armv5te instructions support -if test $armv5te = "default" -a $arch = "armv4l"; then - armv5te=no - check_cc <> config.mak echo "SLIBSUF=\${BUILDSUF}$SLIBSUF" >> config.mak echo "EXESUF=\${BUILDSUF}$EXESUF" >> config.mak -enable $arch - -# special cases -enabled_any x86_32 x86_64 && enable x86 -enabled sparc64 && enable sparc - case "$arch" in powerpc) if test "$POWERPCMODE" = "64bits"; then -- 2.39.2