]> git.sesse.net Git - ffmpeg/blobdiff - configure
oops
[ffmpeg] / configure
index 8b74021fdda6c2608361cb20bb3e25763306821a..585caa2daa147904b1b4f27e463a4ce8c9285611 100755 (executable)
--- a/configure
+++ b/configure
@@ -27,6 +27,7 @@ echo "  --enable-shared-pp       use libpostproc.so [default=no]"
 echo "  --enable-shared          build shared libraries [default=no]"
 echo "  --enable-amr_nb          enable amr_nb float audio codec"
 echo "  --enable-amr_nb-fixed    use fixed point for amr-nb codec"
+echo "  --enable-amr_wb          enable amr_wb float audio codec"
 echo "  --enable-sunmlib         use Sun medialib [default=no]"
 echo ""
 echo "Advanced options (experts only):"
@@ -147,6 +148,8 @@ debug="yes"
 extralibs="-lm"
 simpleidct="yes"
 bigendian="no"
+inttypes="yes"
+emu_fast_int="no"
 vhook="default"
 dlfcn="no"
 dlopen="no"
@@ -177,7 +180,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"
@@ -236,7 +239,7 @@ SHFLAGS="-dynamiclib"
 extralibs=""
 darwin="yes"
 strip="strip -x"
-LDFLAGS="-d"
+LDFLAGS="-Wl,-d"
 FFSLDFLAGS=-Wl,-bind_at_load
 ;;
 MINGW32*)
@@ -258,6 +261,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"
@@ -402,6 +411,8 @@ for opt do
   ;;
   --enable-amr_nb-fixed) amr_nb_fixed="yes"
   ;;
+  --enable-amr_wb) amr_wb="yes"
+  ;; 
   --enable-sunmlib) sunmlib="yes"
   ;;
   esac
@@ -417,20 +428,27 @@ if test $mmx = "default"; then
 fi
 
 #Darwin CC versions
+needmdynamicnopic="no"
 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"
                ;;
-           *3.3*)
-               CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic -force_cpusubtype_ALL -Wno-sign-compare"
+           *3.*)
+               CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare"
+               if test "$lshared" = no; then
+                  needmdynamicnopic="yes"
+               fi
                ;;
            *)
-               CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic"
+               CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer"
+               if test "$lshared" = no; then
+                  needmdynamicnopic="yes"
+               fi
                ;;
        esac
     fi
@@ -507,7 +525,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"
@@ -616,6 +634,29 @@ fi
 
 fi
 
+# ---
+# *inttypes.h* test
+cat > $TMPC << EOF
+#include <inttypes.h>
+int main(int argc, char ** argv){
+    return 0;
+}
+EOF
+
+$cc -o $TMPE $TMPC 2>/dev/null || inttypes="no"
+
+# ---
+# *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
 
@@ -797,7 +838,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"
        ;;
@@ -819,7 +860,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
@@ -841,6 +882,8 @@ echo "C compiler       $cc"
 echo "make             $make"
 echo "CPU              $cpu ($tune)"
 echo "Big Endian       $bigendian"
+echo "inttypes.h       $inttypes"
+echo "broken inttypes.h $emu_fast_int"
 if test $cpu = "x86"; then
 echo "MMX enabled      $mmx"
 echo "Vector Builtins  $builtin_vector"
@@ -893,7 +936,16 @@ echo "CC=$cc" >> config.mak
 echo "AR=$ar" >> config.mak
 echo "RANLIB=$ranlib" >> config.mak
 echo "STRIP=$strip" >> config.mak
+
+# SHCFLAGS is a copy of CFLAGS without -mdynamic-no-pic.  Used when building 
+# shared modules on OS/X (vhook/Makefile).
+SHCFLAGS=$CFLAGS
+if test "$needmdynamicnopic" = yes; then
+   CFLAGS="$CFLAGS -mdynamic-no-pic"
+fi
+
 echo "OPTFLAGS=$CFLAGS" >> config.mak
+echo "SHCFLAGS=$SHCFLAGS">>config.mak
 echo "LDFLAGS=$LDFLAGS" >> config.mak
 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
 echo "SHFLAGS=$SHFLAGS" >> config.mak
@@ -933,6 +985,12 @@ if test "$bigendian" = "yes" ; then
   echo "WORDS_BIGENDIAN=yes" >> config.mak
   echo "#define WORDS_BIGENDIAN 1" >> $TMPH
 fi
+if test "$inttypes" != "yes" ; then
+  echo "#define EMULATE_INTTYPES 1" >> $TMPH
+fi
+if test "$emu_fast_int" = "yes" ; then
+  echo "#define EMULATE_FAST_INT 1" >> $TMPH
+fi
 if test "$mmx" = "yes" ; then
   echo "TARGET_MMX=yes" >> config.mak
   echo "#define HAVE_MMX 1" >> $TMPH
@@ -1201,6 +1259,7 @@ else
   echo "REL-5 V5.1.0 from "
   echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip"
   echo "and extracted the source to libavcodec/amr_float"
+  echo "and if u try this on an alpha, u may need to change Word32 to int in amr/typedef.h"
   echo
 fi