]> git.sesse.net Git - ffmpeg/blobdiff - configure
new texinfo documentation - HTML version also included
[ffmpeg] / configure
index d56cd98c1f0a1f589916dee92d860ed02ca1bbc5..2029edcd96c996818f430a6150e28162a7fb10e1 100755 (executable)
--- a/configure
+++ b/configure
@@ -27,6 +27,7 @@ strip="strip"
 cpu=`uname -m`
 mmx="default"
 altivec="default"
+mmi="default"
 case "$cpu" in
   i386|i486|i586|i686|i86pc|BePC)
     cpu="x86"
@@ -40,6 +41,9 @@ case "$cpu" in
   "Power Macintosh"|ppc)
     cpu="powerpc"
   ;;
+  mips)
+    cpu="mips"
+  ;;
   *)
     cpu="unknown"
   ;;
@@ -226,6 +230,26 @@ EOF
 $cc -o $TMPO $TMPC -faltivec 2> /dev/null || altivec="no"
 fi
 
+# Can only do mmi on mips
+if test $mmi = "default"; then
+    if test $cpu = "mips"; then
+        mmi="yes"
+    else
+        mmi="no"
+    fi
+fi
+
+# See does our compiler support mmi
+if test $mmi = "yes"; then
+cat > $TMPC << EOF
+int main(void) {
+    __asm__ ("lq \$2, 0(\$2)");
+    return 0;
+}
+EOF
+$cc -o $TMPO $TMPC 2> /dev/null || mmi="no"
+fi
+
 # Checking for CFLAGS
 if test -z "$CFLAGS"; then
     CFLAGS="-O3"
@@ -243,6 +267,8 @@ ar="${cross_prefix}${ar}"
 ranlib="${cross_prefix}${ranlib}"
 strip="${cross_prefix}${strip}"
 
+if test -z "$cross_prefix" ; then
+
 # ---
 # big/little endian test
 cat > $TMPC << EOF
@@ -259,6 +285,15 @@ else
 echo big/little test failed
 fi
 
+else
+
+# if cross compiling, cannot launch a program, so make a static guess
+if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
+    bigendian="yes"
+fi
+
+fi
+
 # ---
 # check availability of some header files
 
@@ -371,8 +406,15 @@ echo "C compiler       $cc"
 echo "make             $make"
 echo "CPU              $cpu"
 echo "Big Endian       $bigendian"
+if test $cpu = "x86"; then
 echo "MMX enabled      $mmx"
+fi
+if test $cpu = "mips"; then
+echo "MMI enabled      $mmi"
+fi
+if test $cpu = "powerpc"; then
 echo "AltiVec enabled  $altivec"
+fi
 echo "gprof enabled    $gprof"
 echo "zlib enabled     $zlib"
 echo "mp3lame enabled  $mp3lame"
@@ -411,6 +453,9 @@ elif test "$cpu" = "alpha" ; then
 elif test "$cpu" = "powerpc" ; then
   echo "TARGET_ARCH_POWERPC=yes" >> config.mak
   echo "#define ARCH_POWERPC 1" >> $TMPH
+elif test "$cpu" = "mips" ; then
+  echo "TARGET_ARCH_MIPS=yes" >> config.mak
+  echo "#define ARCH_MIPS 1" >> $TMPH
 fi
 if test "$bigendian" = "yes" ; then
   echo "WORDS_BIGENDIAN=yes" >> config.mak
@@ -420,6 +465,10 @@ if test "$mmx" = "yes" ; then
   echo "TARGET_MMX=yes" >> config.mak
   echo "#define HAVE_MMX 1" >> $TMPH
 fi
+if test "$mmi" = "yes" ; then
+  echo "TARGET_MMI=yes" >> config.mak
+  echo "#define HAVE_MMI 1" >> $TMPH
+fi
 if test "$altivec" = "yes" ; then
   echo "TARGET_ALTIVEC=yes" >> config.mak
   echo "#define HAVE_ALTIVEC 1" >> $TMPH