]> git.sesse.net Git - ffmpeg/blobdiff - configure
-target option patch by (Vidar Madsen <vidar at prosalg dot no>)
[ffmpeg] / configure
index b85862b1037b24eef8623506efae5668a0d9db9e..3a24202c443fed0c78ddb018eea8256d407b08a6 100755 (executable)
--- a/configure
+++ b/configure
@@ -147,6 +147,7 @@ debug="yes"
 extralibs="-lm"
 simpleidct="yes"
 bigendian="no"
+emu_fast_int="no"
 vhook="default"
 dlfcn="no"
 dlopen="no"
@@ -177,7 +178,7 @@ prefix="/boot/home/config"
 # helps building libavcodec
 CFLAGS="-DPIC -fomit-frame-pointer"
 # 3 gcc releases known for BeOS, each with ugly bugs
-gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
+gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
 case "$gcc_version" in
 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
 mmx="no"
@@ -258,6 +259,12 @@ echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
 Linux)
 LDFLAGS="$LDFLAGS -rdynamic"
 ;;
+IRIX*)
+ranlib="echo ignoring ranlib"
+v4l="no"
+audio_oss="no"
+make="gmake"
+;;
 OS/2)
 TMPE=$TMPE".exe"
 ar="emxomfar -p64"
@@ -418,10 +425,10 @@ fi
 
 #Darwin CC versions
 if test $targetos = Darwin; then
-    if test -n "$($cc -v 2>&1 | grep xlc)"; then
+    if test -n "`$cc -v 2>&1 | grep xlc`"; then
        CFLAGS="-qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
     else
-       gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
+       gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
        case "$gcc_version" in
            *2.95*) 
                CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer"
@@ -510,7 +517,7 @@ fi
 # AltiVec flags: The FSF version of GCC differs from the Apple version 
 if test $cpu = "powerpc"; then
     if test $altivec = "yes"; then
-        if test -n "$($cc -v 2>&1 | grep version | grep Apple)"; then
+        if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
             CFLAGS="$CFLAGS -faltivec"
         else
             CFLAGS="$CFLAGS -maltivec -mabi=altivec"
@@ -619,6 +626,18 @@ fi
 
 fi
 
+# ---
+# *int_fast* test
+cat > $TMPC << EOF
+#include <inttypes.h>
+int main(int argc, char ** argv){
+       volatile uint_fast64_t i=0x01234567;
+       return 0;
+}
+EOF
+
+$cc -o $TMPE $TMPC 2>/dev/null || emu_fast_int="yes"
+
 # ---
 # check availability of some header files
 
@@ -800,7 +819,7 @@ sdl=yes
 fi
 fi
 
-case "$($cc -v 2>&1 | grep version)" in
+case "`$cc -v 2>&1 | grep version`" in
     *gcc*)
        CFLAGS="-Wall $CFLAGS"
        ;;
@@ -822,7 +841,7 @@ if test "$optimize" = "small"; then
 fi
 
 if test "$optimize" = "yes"; then
-    if test -n "$($cc -v 2>&1 | grep xlc)"; then
+    if test -n "`$cc -v 2>&1 | grep xlc`"; then
        CFLAGS="$CFLAGS -O5"
        LDFLAGS="$LDFLAGS -O5"
     else
@@ -844,6 +863,7 @@ echo "C compiler       $cc"
 echo "make             $make"
 echo "CPU              $cpu ($tune)"
 echo "Big Endian       $bigendian"
+echo "broken inttypes.h $emu_fast_int"
 if test $cpu = "x86"; then
 echo "MMX enabled      $mmx"
 echo "Vector Builtins  $builtin_vector"
@@ -936,6 +956,15 @@ if test "$bigendian" = "yes" ; then
   echo "WORDS_BIGENDIAN=yes" >> config.mak
   echo "#define WORDS_BIGENDIAN 1" >> $TMPH
 fi
+if test "$emu_fast_int" = "yes" ; then
+#note, we dont try to emulate fast64
+  echo "typedef signed char int_fast8_t;" >> $TMPH
+  echo "typedef signed int  int_fast16_t;" >> $TMPH
+  echo "typedef signed int  int_fast32_t;" >> $TMPH
+  echo "typedef unsigned char uint_fast8_t;" >> $TMPH
+  echo "typedef unsigned int  uint_fast16_t;" >> $TMPH
+  echo "typedef unsigned int  uint_fast32_t;" >> $TMPH
+fi
 if test "$mmx" = "yes" ; then
   echo "TARGET_MMX=yes" >> config.mak
   echo "#define HAVE_MMX 1" >> $TMPH