]> git.sesse.net Git - ffmpeg/blobdiff - configure
Fix some icc warnings by using enum PixelFormat instead of int where appropriate.
[ffmpeg] / configure
index fa20647481b942c9fd16498c6855a99000fa3371..b0b6229cc50b4a82ec07f1d80690798d553d5585 100755 (executable)
--- a/configure
+++ b/configure
@@ -2,11 +2,15 @@
 #
 # FFmpeg configure script
 #
-# Copyright (c) 2000, 2001, 2002 Fabrice Bellard
-# Copyright (c) 2005-2006 Diego Biurrun
-# Copyright (c) 2005-2006 Mans Rullgard
+# Copyright (c) 2000-2002 Fabrice Bellard
+# Copyright (c) 2005-2008 Diego Biurrun
+# Copyright (c) 2005-2008 Mans Rullgard
 #
 
+# Prevent locale nonsense from breaking basic text processing.
+LC_ALL=C
+export LC_ALL
+
 # make sure we are running under a compatible shell
 # try to make this part work with most shells
 
@@ -84,8 +88,6 @@ show_help(){
   echo
   echo "External library support:"
   echo "  --enable-mlib            use Sun medialib [default=no]"
-  echo "  --enable-liba52          enable GPLed liba52 support [default=no]"
-  echo "  --enable-liba52bin       open liba52.so.0 at runtime [default=no]"
   echo "  --enable-avisynth        allow reading AVISynth script files [default=no]"
   echo "  --enable-libamr-nb       enable libamr-nb floating point audio codec"
   echo "  --enable-libamr-wb       enable libamr-wb floating point audio codec"
@@ -167,6 +169,9 @@ show_help(){
   echo "  --disable-protocol=NAME  disables protocol NAME"
   echo "  --disable-protocols      disables all protocols"
   echo "  --disable-devices        disables all devices"
+  echo "  --enable-filter=NAME     enables filter NAME"
+  echo "  --disable-filter=NAME    disables filter NAME"
+  echo "  --disable-filters        disables all filters"
   echo "  --list-decoders          show all available decoders"
   echo "  --list-encoders          show all available encoders"
   echo "  --list-muxers            show all available muxers"
@@ -176,6 +181,7 @@ show_help(){
   echo "  --list-bsfs              show all available bitstream filters"
   echo "  --list-indevs            show all available input devices"
   echo "  --list-outdevs           show all available output devices"
+  echo "  --list-filters           show all available filters"
   echo
   echo "Developer options (useful when working on FFmpeg itself):"
   echo "  --disable-debug          disable debugging symbols"
@@ -186,7 +192,7 @@ show_help(){
   echo "  --disable-stripping      disable stripping of executables and shared libraries"
   echo ""
   echo "NOTE: Object files are built at the place where configure is launched."
-  exit 1
+  exit 0
 }
 
 log(){
@@ -522,6 +528,18 @@ int main(int argc, char **argv){
 EOF
 }
 
+check_cpp_condition(){
+    log check_cpp_condition "$@"
+    header=$1
+    condition=$2
+    check_cpp <<EOF
+#include <$header>
+#if !($condition)
+#error "unsatisfied condition: $condition"
+#endif
+EOF
+}
+
 check_lib(){
     log check_lib "$@"
     header="$1"
@@ -609,6 +627,14 @@ require2(){
     check_lib2 "$headers" $func "$@" || die "ERROR: $name not found"
 }
 
+require_cpp_condition(){
+    name="$1"
+    header="$2"
+    cpp_condition="$3"
+    shift 3
+    check_cpp_condition $header "$cpp_condition" || die "ERROR: $name does not satisfy CPP condition: $cpp_condition"
+}
+
 check_foo_config(){
     cfg=$1
     pkg=$2
@@ -663,8 +689,6 @@ CONFIG_LIST="
     gray
     hardcoded_tables
     ipv6
-    liba52
-    liba52bin
     libamr_nb
     libamr_wb
     libdc1394
@@ -739,7 +763,6 @@ HAVE_LIST="
     altivec_h
     arpa_inet_h
     bswap
-    byteswap_h
     closesocket
     cmov
     conio_h
@@ -751,6 +774,7 @@ HAVE_LIST="
     dev_video_bktr_ioctl_bt848_h
     dlfcn_h
     dlopen
+    dos_paths
     ebp_available
     ebx_available
     fast_64bit
@@ -845,11 +869,8 @@ neon_deps="armv4l"
 ssse3_deps="x86"
 vis_deps="sparc"
 
-# system headers and functions
-byteswap_h_deps="!armv4l"
-
 # decoders / encoders
-ac3_decoder_deps="gpl !liba52"
+ac3_decoder_deps="gpl"
 dxa_decoder_deps="zlib"
 eac3_decoder_deps="gpl"
 flashsv_decoder_deps="zlib"
@@ -862,8 +883,6 @@ zmbv_decoder_deps="zlib"
 zmbv_encoder_deps="zlib"
 
 # external libraries
-liba52_decoder_deps="liba52"
-liba52bin_decoder_extralibs='$ldl'
 libamr_nb_decoder_deps="libamr_nb"
 libamr_nb_encoder_deps="libamr_nb"
 libamr_wb_decoder_deps="libamr_wb"
@@ -1154,10 +1173,12 @@ EOF
     ;;
     "Power Macintosh"|ppc|powerpc)
         arch="powerpc"
+        enable fast_unaligned
     ;;
     ppc64)
         arch="powerpc"
         enable fast_64bit
+        enable fast_unaligned
     ;;
     mips|mipsel|IP*)
         arch="mips"
@@ -1294,6 +1315,7 @@ case $target_os in
         SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"'
         SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
         objformat="win32"
+        enable dos_paths
         ;;
     cygwin*)
         target_os=cygwin
@@ -1311,6 +1333,7 @@ case $target_os in
         SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
         SHFLAGS='-shared -Wl,--enable-auto-image-base'
         objformat="win32"
+        enable dos_paths
         ;;
     *-dos|freedos|opendos)
         disable ffplay ffserver vhook
@@ -1318,6 +1341,7 @@ case $target_os in
         network_extralibs="-lsocket"
         EXESUF=".exe"
         objformat="win32"
+        enable dos_paths
         ;;
     linux)
         enable dv1394
@@ -1349,6 +1373,7 @@ case $target_os in
         SLIB_INSTALL_EXTRA_CMD='install -m 644 $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib "$(LIBDIR)"'
         SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.a "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.lib'
         disable vhook
+        enable dos_paths
         ;;
     interix)
         disable vhook
@@ -1404,7 +1429,6 @@ if ! enabled gpl; then
         enabled_any $@ && die "$name is under GPL and --enable-gpl is not specified."
     }
     die_gpl_disabled "The Postprocessing code" postproc
-    die_gpl_disabled "liba52"                  liba52
     die_gpl_disabled "libx264"                 libx264
     die_gpl_disabled "libxvidcore"             libxvid
     die_gpl_disabled "FAAD2"                   libfaad2
@@ -1494,7 +1518,11 @@ if test $cpu != "generic"; then
         sparc64)
             add_cflags "-mcpu=v9"
         ;;
-        arm*|cortex*)
+        arm11*|cortex*)
+            add_cflags "-mcpu=$cpu"
+            enable fast_unaligned
+        ;;
+        arm*)
             add_cflags "-mcpu=$cpu"
         ;;
         *)
@@ -1575,14 +1603,7 @@ fi
 # check for assembler specific support
 
 if test $arch = "powerpc"; then
-check_cc <<EOF && enable dcbzl
-int main(void) {
-    register long zero = 0;
-    char data[1024];
-    asm volatile("dcbzl %0, %1" : : "b" (data), "r" (zero));
-return 0;
-}
-EOF
+    check_asm dcbzl '"dcbzl 0, 1"'
 fi
 
 # check for SIMD availability
@@ -1646,7 +1667,6 @@ check_func  memalign
 check_func  mkstemp
 check_func_headers windows.h GetProcessTimes
 
-check_header byteswap.h
 check_header conio.h
 check_header dlfcn.h
 check_header malloc.h
@@ -1701,7 +1721,6 @@ done
 
 # these are off by default, so fail if requested and not available
 enabled avisynth   && require2 vfw32 "windows.h vfw.h" AVIFileInit -lvfw32
-enabled liba52     && require  liba52 a52dec/a52.h a52_init -la52
 enabled libamr_nb  && require  libamrnb amrnb/interf_dec.h Speech_Decode_Frame_init -lamrnb -lm
 enabled libamr_wb  && require  libamrwb amrwb/dec_if.h D_IF_init -lamrwb -lm
 enabled libdirac   && add_cflags "$(pkg-config --cflags dirac)" \
@@ -1716,7 +1735,8 @@ enabled libschroedinger && add_cflags $(pkg-config --cflags schroedinger-1.0) \
                         && require libschroedinger schroedinger/schro.h schro_init $(pkg-config --libs schroedinger-1.0)
 enabled libtheora  && require  libtheora theora/theora.h theora_info_init -ltheora -logg
 enabled libvorbis  && require  libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
-enabled libx264    && require  x264 x264.h x264_encoder_open -lx264 -lm
+enabled libx264    && require  x264 x264.h x264_encoder_open -lx264 -lm \
+                   && require_cpp_condition x264 x264.h "X264_BUILD >= 65"
 enabled libxvid    && require  Xvid xvid.h xvid_global -lxvidcore
 enabled mlib       && require  mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
 
@@ -1879,7 +1899,7 @@ check_cflags -fno-math-errno
 check_cflags -fno-signed-zeros
 
 # add some flags for Intel C Compiler
-if $cc --version | grep -q Intel; then
+if $cc --version 2> /dev/null | grep -q Intel; then
   # Just warnings, no remarks
   check_cflags -w1
   # -wd: Disable following warnings
@@ -2007,8 +2027,6 @@ if enabled sdl_too_old; then
 fi
 echo "Sun medialib support      ${mlib-no}"
 echo "AVISynth enabled          ${avisynth-no}"
-echo "liba52 support            ${liba52-no}"
-echo "liba52 dlopened           ${liba52bin-no}"
 echo "libamr-nb support         ${libamr_nb-no}"
 echo "libamr-wb support         ${libamr_wb-no}"
 echo "libdc1394 support         ${libdc1394-no}"
@@ -2251,7 +2269,7 @@ cat <<EOF > $name/$name-uninstalled.pc
 prefix=
 exec_prefix=
 libdir=\${pcfiledir}
-includedir=\${pcfiledir}/..
+includedir=${source_path}
 
 Name: $name
 Description: $comment