]> git.sesse.net Git - ffmpeg/blobdiff - configure
unknown format char
[ffmpeg] / configure
index b99534ad98e2ae8995a963fa2ee20d9585889415..700de7460d30b419106c46ce3eb5e9c8ef267294 100755 (executable)
--- a/configure
+++ b/configure
@@ -29,6 +29,7 @@ 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 "  --enable-pthreads        use pthreads [default=no]"
 echo ""
 echo "Advanced options (experts only):"
 echo "  --source-path=PATH       path of source code [$source_path]"
@@ -148,6 +149,7 @@ debug="yes"
 extralibs="-lm"
 simpleidct="yes"
 bigendian="no"
+inttypes="yes"
 emu_fast_int="no"
 vhook="default"
 dlfcn="no"
@@ -170,6 +172,7 @@ amr_nb="no"
 amr_wb="no"
 amr_nb_fixed="no"
 sunmlib="no"
+pthreads="no"
 
 # OS specific
 targetos=`uname -s`
@@ -414,6 +417,8 @@ for opt do
   ;; 
   --enable-sunmlib) sunmlib="yes"
   ;;
+  --enable-pthreads) pthreads="yes"
+  ;;
   esac
 done
 
@@ -430,21 +435,21 @@ fi
 needmdynamicnopic="no"
 if test $targetos = Darwin; then
     if test -n "`$cc -v 2>&1 | grep xlc`"; then
-       CFLAGS="-qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
+       CFLAGS="$CFLAGS -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
     else
        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"
+               CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
                ;;
            *3.*)
-               CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare"
+               CFLAGS="$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"
+               CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
                if test "$lshared" = no; then
                   needmdynamicnopic="yes"
                fi
@@ -633,6 +638,17 @@ 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
@@ -691,7 +707,7 @@ if (zlibVersion() != ZLIB_VERSION)
 return 0;
 }
 EOF
-$cc -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
+$cc $CFLAGS -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
 # $TMPE 2> /dev/null > /dev/null || zlib="no"
 # XXX: more tests needed - runtime test
 fi
@@ -839,7 +855,7 @@ if test "$sdl" = "no" ; then
 fi
 
 if test "$debug" = "yes"; then
-       CFLAGS="$CFLAGS -g"
+       CFLAGS="-g $CFLAGS"
 fi
 
 if test "$optimize" = "small"; then
@@ -852,7 +868,7 @@ if test "$optimize" = "yes"; then
        CFLAGS="$CFLAGS -O5"
        LDFLAGS="$LDFLAGS -O5"
     else
-       CFLAGS="$CFLAGS -O3"
+       CFLAGS="-O3 $CFLAGS"
     fi
 fi
 
@@ -870,6 +886,7 @@ 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"
@@ -906,6 +923,7 @@ echo "Imlib2 support   $imlib2"
 echo "freetype support $freetype2"
 fi
 echo "Sun medialib support"  $sunmlib
+echo "pthreads support"      $pthreads
 echo "AMR-NB float support"  $amr_nb
 echo "AMR-NB fixed support"  $amr_nb_fixed
 echo "AMR-WB float support"  $amr_wb
@@ -972,6 +990,9 @@ 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
@@ -1017,6 +1038,11 @@ if test "$sunmlib" = "yes" ; then
   echo "#define HAVE_MLIB 1" >> $TMPH
   extralibs="$extralibs -lmlib"
 fi
+if test "$pthreads" = "yes" ; then
+  echo "HAVE_PTHREADS=yes" >> config.mak
+  echo "#define HAVE_PTHREADS 1" >> $TMPH
+  extralibs="$extralibs -lpthread"
+fi
 if test "$sdl" = "yes" ; then
   echo "CONFIG_SDL=yes" >> config.mak
   echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
@@ -1139,6 +1165,8 @@ fi
 if test "$mingw32" = "yes" ; then
   echo "#define CONFIG_WIN32 1" >> $TMPH
   echo "CONFIG_WIN32=yes" >> config.mak
+  echo "HAVE_W32THREADS=yes" >> config.mak
+  echo "#define HAVE_W32THREADS 1" >> $TMPH
   echo "#ifndef __MINGW32__" >> $TMPH
   echo "#define __MINGW32__ 1" >> $TMPH
   echo "#endif" >> $TMPH
@@ -1243,6 +1271,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