]> git.sesse.net Git - ffmpeg/blobdiff - configure
fix 1/0 b frames + CBR bug
[ffmpeg] / configure
index 64b906fa648e44699a1ef3608d8d2c9ce5451116..a55362b7e319c63f83e5999468a308b809d10283 100755 (executable)
--- a/configure
+++ b/configure
@@ -347,6 +347,7 @@ cpu="generic"
 powerpc_perf="no"
 mmx="default"
 cmov="no"
+cmov_is_fast="no"
 armv5te="default"
 iwmmxt="default"
 altivec="default"
@@ -458,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"
@@ -617,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
@@ -1107,9 +1110,16 @@ if test $cpu != "generic"; then
             cmov="no"
         ;;
         # targets that do support conditional mov (cmov)
-        i686|pentiumpro|pentium[234]|pentium-m|prescott|athlon|athlon-tbird|athlon-4|athlon-[mx]p|nocona|athlon64|k8|opteron|athlon-fx)
+        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 "-mcpu=v9"
@@ -1128,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
@@ -1293,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
@@ -1510,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
@@ -1559,6 +1570,7 @@ 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"
@@ -1745,6 +1757,10 @@ 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