]> git.sesse.net Git - ffmpeg/blobdiff - configure
fetch flv duration from file if it is set to 0 in metadata
[ffmpeg] / configure
index 8d53fb3f4e20de8f0c396f75c2cf70c4ab426212..efd16bbe033141c1e534fb4b6783e5e8701c1522 100755 (executable)
--- a/configure
+++ b/configure
@@ -208,6 +208,7 @@ Advanced options (experts only):
                            instruction selection, may crash on older CPUs)
   --enable-powerpc-perf    enable performance report on PPC
                            (requires enabling PMC)
+  --disable-asm            disable all assembler optimizations
   --disable-altivec        disable AltiVec optimizations
   --disable-amd3dnow       disable 3DNow! optimizations
   --disable-amd3dnowext    disable 3DNow! extended optimizations
@@ -830,6 +831,12 @@ apply(){
     "$@" < "$file" > "$file.tmp" && mv "$file.tmp" "$file" || rm "$file.tmp"
 }
 
+cp_if_changed(){
+    cmp -s "$1" "$2" &&
+        echo "$2 is unchanged" ||
+        cp -f "$1" "$2"
+}
+
 # CONFIG_LIST contains configurable options, while HAVE_LIST is for
 # system-dependent things.
 
@@ -956,14 +963,18 @@ ARCH_EXT_LIST='
     vis
 '
 
+HAVE_LIST_PUB='
+    bigendian
+'
+
 HAVE_LIST="
     $ARCH_EXT_LIST
+    $HAVE_LIST_PUB
     $THREADS_LIST
     alsa_asoundlib_h
     altivec_h
     arpa_inet_h
     attribute_packed
-    bigendian
     bswap
     closesocket
     cmov
@@ -1046,6 +1057,7 @@ CMDLINE_SELECT="
     $ARCH_EXT_LIST
     $CONFIG_LIST
     $THREADS_LIST
+    asm
     cross_compile
     debug
     extra_warnings
@@ -1368,6 +1380,7 @@ target_os=$(tolower $(uname -s))
 host_os=$target_os
 
 # configurable options
+enable asm
 enable debug
 enable doc
 enable fastdiv
@@ -2210,7 +2223,7 @@ enabled pic && enable_pic
 check_cc <<EOF || die "Symbol mangling check failed."
 int ff_extern;
 EOF
-sym=$($nm -P -g $TMPO | grep ff_extern)
+sym=$($nm -g $TMPO | awk '/ff_extern/{ print substr($0, match($0, /[^[:blank:]]*ff_extern/)) }')
 extern_prefix=${sym%%ff_extern*}
 
 check_cc <<EOF && enable inline_asm
@@ -2231,7 +2244,7 @@ EOF
 check_cc <<EOF || die "endian test failed"
 unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
 EOF
-od -A n -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
+od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
 
 if enabled alpha; then
 
@@ -2457,8 +2470,8 @@ enabled libspeex   && require  libspeex speex/speex.h speex_decoder_init -lspeex
 enabled libtheora  && require  libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
 enabled libvorbis  && require  libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
 enabled libx264    && require  libx264 x264.h x264_encoder_encode -lx264 -lm &&
-                      { check_cpp_condition x264.h "X264_BUILD >= 79" ||
-                        die "ERROR: libx264 version must be >= 0.79."; }
+                      { check_cpp_condition x264.h "X264_BUILD >= 83" ||
+                        die "ERROR: libx264 version must be >= 0.83."; }
 enabled libxvid    && require  libxvid xvid.h xvid_global -lxvidcore
 enabled mlib       && require  mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
 
@@ -2486,7 +2499,7 @@ texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html
 if enabled network; then
     check_type "sys/types.h sys/socket.h" socklen_t
     check_type netdb.h "struct addrinfo"
-    check_type sys/socket.h "struct sockaddr_storage"
+    check_type "sys/types.h sys/socket.h" "struct sockaddr_storage"
     # Prefer arpa/inet.h over winsock2
     if check_header arpa/inet.h ; then
         check_func closesocket
@@ -2663,6 +2676,8 @@ check_deps $CONFIG_LIST       \
            $OUTDEV_LIST       \
            $PROTOCOL_LIST     \
 
+enabled asm || disable $ARCH_LIST $ARCH_EXT_LIST
+
 echo "install prefix            $prefix"
 echo "source path               $source_path"
 echo "C compiler                $cc"
@@ -2772,6 +2787,44 @@ echo "License: $license"
 
 echo "Creating config.mak and config.h..."
 
+# build tree in object directory if source path is different from current one
+if enabled source_path_used; then
+    DIRS="
+        doc
+        libavcodec
+        libavcodec/$arch
+        libavdevice
+        libavfilter
+        libavformat
+        libavutil
+        libavutil/$arch
+        libpostproc
+        libswscale
+        libswscale/$arch
+        tests
+        tools
+    "
+    FILES="
+        Makefile
+        common.mak
+        subdir.mak
+        doc/texi2pod.pl
+        libavcodec/Makefile
+        libavdevice/Makefile
+        libavfilter/Makefile
+        libavformat/Makefile
+        libavutil/Makefile
+        libpostproc/Makefile
+        libswscale/Makefile
+    "
+    for dir in $DIRS ; do
+        mkdir -p $dir
+    done
+    for f in $FILES ; do
+        $ln_s "$source_path/$f" $f
+    done
+fi
+
 enabled stripping || strip="echo skipping strip"
 
 cat > config.mak <<EOF
@@ -2904,48 +2957,19 @@ echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH
 echo "endif # FFMPEG_CONFIG_MAK" >> config.mak
 
 # Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
-cmp -s $TMPH config.h &&
-    echo "config.h is unchanged" ||
-    mv -f $TMPH config.h
+cp_if_changed $TMPH config.h
 
-# build tree in object directory if source path is different from current one
-if enabled source_path_used; then
-    DIRS="
-        doc
-        libavcodec
-        libavcodec/$arch
-        libavdevice
-        libavfilter
-        libavformat
-        libavutil
-        libavutil/$arch
-        libpostproc
-        libswscale
-        libswscale/$arch
-        tests
-        tools
-    "
-    FILES="
-        Makefile
-        common.mak
-        subdir.mak
-        doc/texi2pod.pl
-        libavcodec/Makefile
-        libavdevice/Makefile
-        libavfilter/Makefile
-        libavformat/Makefile
-        libavutil/Makefile
-        libpostproc/Makefile
-        libswscale/Makefile
-    "
-    for dir in $DIRS ; do
-        mkdir -p $dir
-    done
-    for f in $FILES ; do
-        $ln_s "$source_path/$f" $f
-    done
-fi
+cat > $TMPH <<EOF
+/* Generated by ffconf */
+#ifndef AVUTIL_AVCONFIG_H
+#define AVUTIL_AVCONFIG_H
+EOF
+
+print_config AV_HAVE_ $TMPH /dev/null $HAVE_LIST_PUB
+
+echo "#endif /* AVUTIL_AVCONFIG_H */" >> $TMPH
 
+cp_if_changed $TMPH libavutil/avconfig.h
 
 # build pkg-config files