]> git.sesse.net Git - ffmpeg/blobdiff - configure
make lps_range a global table its constant anyway (saves 1 addition for accessing it)
[ffmpeg] / configure
index bddaf659fb1e802ea311887eb61d52e4286a3f01..88b24ee45ac8fb14a8004bc32ee3b45fb15457cb 100755 (executable)
--- a/configure
+++ b/configure
@@ -349,6 +349,7 @@ mmx="default"
 armv5te="default"
 iwmmxt="default"
 altivec="default"
+dcbzl="no"
 mmi="default"
 case "$cpu" in
   i386|i486|i586|i686|i86pc|BePC)
@@ -1004,26 +1005,6 @@ if test $mmx = "default"; then
     fi
 fi
 
-# check armv5te instructions support
-if test $armv5te = "default" -a $cpu = "armv4l"; then
-    armv5te=no
-    check_cc <<EOF && armv5te=yes
-        int main(void) {
-        __asm__ __volatile__ ("qadd r0, r0, r0");
-        }
-EOF
-fi
-
-# check iwmmxt support
-if test $iwmmxt = "default" -a $cpu = "armv4l"; then
-    iwmmxt=no
-    check_cc <<EOF && iwmmxt=yes
-        int main(void) {
-        __asm__ __volatile__ ("wunpckelub wr6, wr4");
-        }
-EOF
-fi
-
 #Darwin CC versions
 needmdynamicnopic="no"
 if test $targetos = Darwin; then
@@ -1049,9 +1030,10 @@ if test $targetos = Darwin; then
                 ;;
         esac
     fi
-    if test $optimize != "no"; then
-        add_cflags "-fomit-frame-pointer"
-    fi
+fi
+
+if test $optimize != "no"; then
+    add_cflags "-fomit-frame-pointer"
 fi
 
 # Can only do AltiVec on PowerPC
@@ -1118,7 +1100,7 @@ if test $tune != "generic"; then
             TUNECPU=ppc970
             POWERPCMODE="64bits"
         ;;
-        i[3456]86|pentium|pentiumpro|pentium-mmx|pentium[234]|prescott|k6|k6-[23]|athlon|athlon-tbird|athlon-4|athlon-[mx]p|winchip-c6|winchip2|c3|nocona|athlon64|k8|opteron|athlon-fx)
+        i[3456]86|pentium|pentiumpro|pentium-mmx|pentium[234]|pentium-m|prescott|k6|k6-[23]|athlon|athlon-tbird|athlon-4|athlon-[mx]p|winchip-c6|winchip2|c3|nocona|athlon64|k8|opteron|athlon-fx)
             add_cflags "-march=$tune"
         ;;
         sparc64)
@@ -1130,6 +1112,20 @@ if test $tune != "generic"; then
     esac
 fi
 
+# make sure we can execute files in $TMPDIR
+cat >$TMPE 2>>$logfile <<EOF
+#! /bin/sh
+EOF
+chmod +x $TMPE >>$logfile 2>&1
+if ! $TMPE >>$logfile 2>&1; then
+    cat <<EOF
+Unable to create and execute files in $TMPDIR1.  Set the TMPDIR environment
+variable to another directory.
+EOF
+    die "Sanity test failed."
+fi
+rm $TMPE
+
 # compiler sanity check
 check_exec <<EOF
 int main(){
@@ -1145,6 +1141,19 @@ if test "$?" != 0; then
     die "C compiler test failed."
 fi
 
+# check for assembler specific support
+
+if test $cpu = "powerpc"; then
+check_cc <<EOF && dcbzl=yes
+int main(void) {
+    register long zero = 0;
+    char data[1024];
+    asm volatile("dcbzl %0, %1" : : "b" (data), "r" (zero));
+return 0;
+}
+EOF
+fi
+
 # check for SIMD availability
 
 # AltiVec flags: The FSF version of GCC differs from the Apple version
@@ -1177,6 +1186,26 @@ int main(void) {
 EOF
 fi
 
+# check armv5te instructions support
+if test $armv5te = "default" -a $cpu = "armv4l"; then
+    armv5te=no
+    check_cc <<EOF && armv5te=yes
+        int main(void) {
+        __asm__ __volatile__ ("qadd r0, r0, r0");
+        }
+EOF
+fi
+
+# check iwmmxt support
+if test $iwmmxt = "default" -a $cpu = "armv4l"; then
+    iwmmxt=no
+    check_cc <<EOF && iwmmxt=yes
+        int main(void) {
+        __asm__ __volatile__ ("wunpckelub wr6, wr4");
+        }
+EOF
+fi
+
 # mmi only available on mips
 if test $mmi = "default"; then
     if test $cpu = "mips"; then
@@ -1558,6 +1587,7 @@ if test $cpu = "mips"; then
 fi
 if test $cpu = "powerpc"; then
     echo "AltiVec enabled  $altivec"
+    echo "dcbzl available  $dcbzl"
 fi
 echo "gprof enabled    $gprof"
 echo "zlib enabled     $zlib"
@@ -1749,11 +1779,16 @@ if test "$mmi" = "yes" ; then
   echo "TARGET_MMI=yes" >> config.mak
   echo "#define HAVE_MMI 1" >> $TMPH
 fi
+
+if test "$dcbzl" = "yes" ; then
+  echo "#define HAVE_DCBZL 1" >> $TMPH
+else
+  echo "#undef HAVE_DCBZL" >> $TMPH
+fi
+
 if test "$altivec" = "yes" ; then
   echo "TARGET_ALTIVEC=yes" >> config.mak
   echo "#define HAVE_ALTIVEC 1" >> $TMPH
-  echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
-  echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
   if test "$_altivec_h" = "yes" ; then
     echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
   else
@@ -2100,6 +2135,7 @@ if test "$source_path_used" = "yes" ; then
          libavcodec \
          libavcodec/alpha \
          libavcodec/armv4l \
+         libavcodec/bfin \
          libavcodec/i386 \
          libavcodec/sparc \
          libavcodec/mlib \