]> git.sesse.net Git - ffmpeg/blobdiff - configure
fix 1/0 b frames + CBR bug
[ffmpeg] / configure
index 56d022a5a773578033aa7735becd0a17fae63f9a..a55362b7e319c63f83e5999468a308b809d10283 100755 (executable)
--- a/configure
+++ b/configure
@@ -346,6 +346,8 @@ arch=`uname -m`
 cpu="generic"
 powerpc_perf="no"
 mmx="default"
+cmov="no"
+cmov_is_fast="no"
 armv5te="default"
 iwmmxt="default"
 altivec="default"
@@ -457,6 +459,7 @@ ffserver="yes"
 ffplay="yes"
 LIBOBJFLAGS=""
 FFLDFLAGS=-Wl,--warn-common
+LDLATEFLAGS='-Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
 FFSERVERLDFLAGS=-Wl,-E
 LDCONFIG="ldconfig"
 LIBPREF="lib"
@@ -616,6 +619,7 @@ SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)'
 SHFLAGS='-shared -Wl,--out-implib=lib$(NAME).dll.a'
 ;;
 Linux)
+LDLATEFLAGS="-Wl,--as-needed $LDLATEFLAGS"
 ;;
 IRIX*)
 targetos=IRIX
@@ -1051,60 +1055,74 @@ POWERPCMODE="32bits"
 if test $cpu != "generic"; then
     case $cpu in
         601|ppc601|PowerPC601)
-            add_cflags "-march=601"
+            add_cflags "-mcpu=601"
             if test $altivec = "yes"; then
                 echo "WARNING: Tuning for PPC601 but AltiVec enabled!";
             fi
             TUNECPU=ppc601
         ;;
         603*|ppc603*|PowerPC603*)
-            add_cflags "-march=603"
+            add_cflags "-mcpu=603"
             if test $altivec = "yes"; then
                 echo "WARNING: Tuning for PPC603 but AltiVec enabled!";
             fi
             TUNECPU=ppc603
         ;;
         604*|ppc604*|PowerPC604*)
-            add_cflags "-march=604"
+            add_cflags "-mcpu=604"
             if test $altivec = "yes"; then
                 echo "WARNING: Tuning for PPC604 but AltiVec enabled!";
             fi
             TUNECPU=ppc604
         ;;
         G3|g3|75*|ppc75*|PowerPC75*)
-            add_cflags "-march=750 -mpowerpc-gfxopt"
+            add_cflags "-mcpu=750 -mpowerpc-gfxopt"
             if test $altivec = "yes"; then
                 echo "WARNING: Tuning for PPC75x but AltiVec enabled!";
             fi
             TUNECPU=ppc750
         ;;
         G4|g4|745*|ppc745*|PowerPC745*)
-            add_cflags "-march=7450 -mpowerpc-gfxopt"
+            add_cflags "-mcpu=7450 -mpowerpc-gfxopt"
             if test $altivec = "no"; then
                 echo "WARNING: Tuning for PPC745x but AltiVec disabled!";
             fi
             TUNECPU=ppc7450
         ;;
         74*|ppc74*|PowerPC74*)
-            add_cflags "-march=7400 -mpowerpc-gfxopt"
+            add_cflags "-mcpu=7400 -mpowerpc-gfxopt"
             if test $altivec = "no"; then
                 echo "WARNING: Tuning for PPC74xx but AltiVec disabled!";
             fi
             TUNECPU=ppc7400
         ;;
         G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
-            add_cflags "-march=970 -mpowerpc-gfxopt -mpowerpc64"
+            add_cflags "-mcpu=970 -mpowerpc-gfxopt -mpowerpc64"
             if test $altivec = "no"; then
                 echo "WARNING: Tuning for PPC970 but AltiVec disabled!";
             fi
             TUNECPU=ppc970
             POWERPCMODE="64bits"
         ;;
-        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)
+        # targets that do NOT support conditional mov (cmov)
+        i[345]86|pentium|pentium-mmx|k6|k6-[23]|winchip-c6|winchip2|c3)
             add_cflags "-march=$cpu"
+            cmov="no"
+        ;;
+        # targets that do support conditional mov (cmov)
+        i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64|k8|opteron|athlon-fx)
+            add_cflags "-march=$cpu"
+            cmov="yes"
+            cmov_is_fast="yes"
+        ;;
+        # targets that do support conditional mov but on which it's slow
+        pentium4|prescott|nocona)
+            add_cflags "-march=$cpu"
+            cmov="yes"
+            cmov_is_fast="no"
         ;;
         sparc64)
-            add_cflags "-march=v9"
+            add_cflags "-mcpu=v9"
         ;;
         *)
         echo "WARNING: Unknown CPU \"$cpu\", ignored."
@@ -1120,7 +1138,8 @@ 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.
+variable to another directory and make sure that $TMPDIR1 is not mounted
+noexec.
 EOF
     die "Sanity test failed."
 fi
@@ -1285,9 +1304,9 @@ if enabled pthreads; then
 fi
 
 # these are off by default, so fail if requested and not available
-enabled dts     && require libdts dts.h dts_init -ldts
+enabled dts     && require libdts dts.h dts_init -ldts -lm
 enabled libgsm  && require libgsm gsm.h gsm_create -lgsm
-enabled mp3lame && require LAME lame/lame.h lame_init -lmp3lame
+enabled mp3lame && require LAME lame/lame.h lame_init -lmp3lame -lm
 enabled vorbis  && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbis -lvorbisenc -logg
 enabled libogg  && require libogg ogg/ogg.h ogg_sync_init -logg
 enabled xvid    && require XviD xvid.h xvid_global -lxvidcore
@@ -1502,7 +1521,7 @@ check_cflags -Wredundant-decls
 check_cflags -Winline
 
 # add some linker flags
-check_ldflags '-Wl,--as-needed' '-Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec' '-Wl,-rpath-link,\$(BUILD_ROOT)/libavformat' '-Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
+check_ldflags $LDLATEFLAGS
 
 # not all compilers support -Os
 test "$optimize" = "small" && check_cflags -Os
@@ -1550,6 +1569,8 @@ echo "inttypes.h       $inttypes"
 echo "broken inttypes.h $emu_fast_int"
 if test $arch = "x86" -o $arch = "x86_64"; then
     echo "MMX enabled      $mmx"
+    echo "CMOV enabled     $cmov"
+    echo "CMOV is fast     $cmov_is_fast"
 fi
 if test $arch = "armv4l"; then
     echo "ARMv5TE enabled  $armv5te"
@@ -1732,6 +1753,14 @@ if test "$mmx" = "yes" ; then
   echo "#define HAVE_MMX 1" >> $TMPH
   echo "#define __CPU__ 586" >> $TMPH
 fi
+if test "$cmov" = "yes" ; then
+  echo "TARGET_CMOV=yes" >> config.mak
+  echo "#define HAVE_CMOV 1" >> $TMPH
+fi
+if test "$cmov_is_fast" = "yes" ; then
+  echo "TARGET_CMOV_IS_FAST=yes" >> config.mak
+  echo "#define CMOV_IS_FAST 1" >> $TMPH
+fi
 if test "$armv5te" = "yes" ; then
   echo "TARGET_ARMV5TE=yes" >> config.mak
   echo "#define HAVE_ARMV5TE 1" >> $TMPH