]> git.sesse.net Git - ffmpeg/blobdiff - configure
Check return value of posix_memalign and explicitly set pointer to NULL if it
[ffmpeg] / configure
index 89f9bbc99f2b3d02fbefcc2c4a4e8e0fc31ae9f4..4219cc03a56e9a9757c427f679e6f0a8a3edd492 100755 (executable)
--- a/configure
+++ b/configure
@@ -91,7 +91,6 @@ show_help(){
   echo "  --enable-w32threads      use Win32 threads [no]"
   echo "  --enable-x11grab         enable X11 grabbing [no]"
   echo "  --enable-vdpau           enable VDPAU support [no]"
-  echo "  --enable-xvmc            enable XvMC support [no]"
   echo "  --disable-network        disable network support [no]"
   echo "  --disable-ipv6           disable IPv6 support [no]"
   echo "  --disable-mpegaudio-hp   faster (but less accurate) MPEG audio decoding [no]"
@@ -159,6 +158,7 @@ show_help(){
   echo "  --enable-libmp3lame      enable MP3 encoding via libmp3lame [no]"
   echo "  --enable-libnut          enable NUT (de)muxing via libnut,"
   echo "                           native (de)muxer exists [no]"
+  echo "  --enable-libopenjpeg     enable JPEG 2000 decoding via OpenJPEG [no]"
   echo "  --enable-libschroedinger enable Dirac support via libschroedinger [no]"
   echo "  --enable-libspeex        enable Speex decoding via libspeex [no]"
   echo "  --enable-libtheora       enable Theora encoding via libtheora [no]"
@@ -195,6 +195,7 @@ show_help(){
   echo "                           (requires enabling PMC)"
   echo "  --disable-altivec        disable AltiVec optimizations"
   echo "  --disable-amd3dnow       disable 3DNow! optimizations"
+  echo "  --disable-amd3dnowext    disable 3DNow! extended optimizations"
   echo "  --disable-mmx            disable MMX optimizations"
   echo "  --disable-mmx2           disable MMX2 optimizations"
   echo "  --disable-sse            disable SSE optimizations"
@@ -207,6 +208,7 @@ show_help(){
   echo "  --disable-mmi            disable MMI optimizations"
   echo "  --disable-neon           disable neon optimizations"
   echo "  --disable-vis            disable VIS optimizations"
+  echo "  --disable-yasm           disable use of yasm assembler"
   echo
   echo "Developer options (useful when working on FFmpeg itself):"
   echo "  --disable-debug          disable debugging symbols"
@@ -768,6 +770,7 @@ CONFIG_LIST="
     libgsm
     libmp3lame
     libnut
+    libopenjpeg
     libschroedinger
     libspeex
     libtheora
@@ -790,7 +793,6 @@ CONFIG_LIST="
     vdpau
     vhook
     x11grab
-    xvmc
     zlib
 "
 
@@ -822,6 +824,7 @@ ARCH_LIST='
 ARCH_EXT_LIST='
     altivec
     amd3dnow
+    amd3dnowext
     armv5te
     armv6
     armv6t2
@@ -895,6 +898,7 @@ HAVE_LIST="
     sys_select_h
     sys_soundcard_h
     sys_videoio_h
+    ten_operands
     termios_h
     threads
     truncf
@@ -904,7 +908,6 @@ HAVE_LIST="
 
 # options emitted with CONFIG_ prefix but not available on command line
 CONFIG_EXTRA="
-    fft_mmx
     oldscaler
 "
 
@@ -918,6 +921,7 @@ CMDLINE_SELECT="
     logging
     optimizations
     stripping
+    yasm
 "
 
 PATHS_LIST='
@@ -955,6 +959,7 @@ CMDLINE_SET="
 # architecture extensions
 altivec_deps="ppc"
 amd3dnow_deps="mmx"
+amd3dnowext_deps="amd3dnow"
 armv5te_deps="arm"
 armv6_deps="arm"
 armv6t2_deps="arm"
@@ -970,8 +975,6 @@ ssse3_deps="sse"
 vis_deps="sparc"
 
 # common features
-fft_suggest="fft_mmx"
-fft_mmx_deps="mmx yasm"
 oldscaler_deps="!swscale"
 
 # decoders / encoders
@@ -988,6 +991,7 @@ dxa_decoder_select="zlib"
 eac3_decoder_deps="gpl"
 eac3_decoder_select="fft mdct"
 eatgq_decoder_select="aandct"
+eatqi_decoder_select="aandct"
 ffv1_decoder_select="golomb"
 flac_decoder_select="golomb"
 flac_encoder_select="golomb"
@@ -1010,7 +1014,7 @@ mpeg2video_encoder_select="aandct"
 mpeg4_encoder_select="aandct"
 mpeg_vdpau_decoder_deps="vdpau"
 mpeg1_vdpau_decoder_deps="vdpau"
-mpeg_xvmc_decoder_deps="xvmc X11_extensions_XvMClib_h"
+mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h"
 msmpeg4v1_encoder_select="aandct"
 msmpeg4v2_encoder_select="aandct"
 msmpeg4v3_encoder_select="aandct"
@@ -1021,6 +1025,8 @@ png_encoder_select="zlib"
 qdm2_decoder_select="fft mdct rdft"
 rv10_encoder_select="aandct"
 rv20_encoder_select="aandct"
+rv30_decoder_select="golomb"
+rv40_decoder_select="golomb"
 shorten_decoder_select="golomb"
 sonic_decoder_select="golomb"
 sonic_encoder_select="golomb"
@@ -1060,6 +1066,7 @@ libgsm_encoder_deps="libgsm"
 libgsm_ms_decoder_deps="libgsm"
 libgsm_ms_encoder_deps="libgsm"
 libmp3lame_encoder_deps="libmp3lame"
+libopenjpeg_decoder_deps="libopenjpeg"
 libschroedinger_decoder_deps="libschroedinger"
 libschroedinger_encoder_deps="libschroedinger"
 libspeex_decoder_deps="libspeex"
@@ -1104,6 +1111,7 @@ x11_grab_device_demuxer_deps="x11grab XShmCreateImage"
 x11_grab_device_demuxer_extralibs="-lX11 -lXext"
 
 # protocols
+gopher_protocol_deps="network"
 http_protocol_deps="network"
 rtp_protocol_deps="udp_protocol"
 tcp_protocol_deps="network"
@@ -1188,7 +1196,7 @@ target_path='.'
 
 # gcc stupidly only outputs the basename of targets with -MM, but we need the
 # full relative path for objects in subdirectories for non-recursive Make.
-DEPEND_CMD='$(CC) $(CFLAGS) -MM -MG $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o," -e "s,\\([[:space:]]\\)\\(version\\.h\\),\\1\$$(BUILD_ROOT_REL)/\\2,"'
+DEPEND_CMD='$(CC) $(CFLAGS) -MM $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o,"'
 
 # find source path
 source_path="`dirname \"$0\"`"
@@ -1312,6 +1320,10 @@ set_default cc nm
 enabled cross_compile || host_cc_default=$cc
 set_default host_cc
 
+case $target_os in
+    mingw32*|cygwin*|*-dos|freedos|opendos|os/2*) EXESUF=.exe ;;
+esac
+
 # set temporary file name
 : ${TMPDIR:=$TEMPDIR}
 : ${TMPDIR:=$TMP}
@@ -1354,37 +1366,25 @@ fi
 check_cflags -std=c99
 
 case "$arch" in
-    i386|i486|i586|i686|i86pc|BePC)
-        arch="x86"
-        subarch="x86_32"
-        enable fast_unaligned
-    ;;
-    x86_64|amd64)
-        arch="x86"
-        subarch="x86_32"
-        enable cmov
-        enable fast_cmov
-        enable fast_unaligned
-        check_cc <<EOF && enable fast_64bit && subarch="x86_64"
-        int test[sizeof(char*) - 7];
-EOF
-    ;;
-    arm|armv[4567]*l)
-        arch="arm"
-    ;;
     alpha)
         arch="alpha"
         enable fast_64bit
         check_cflags -mieee
     ;;
-    "Power Macintosh"|ppc|powerpc)
-        arch="ppc"
-        enable fast_unaligned
+    arm|armv[4567]*l)
+        arch="arm"
     ;;
-    ppc64)
-        arch="ppc"
+    avr32)
+    ;;
+    bfin)
+        arch="bfin"
+    ;;
+    ia64)
+        arch="ia64"
         enable fast_64bit
-        enable fast_unaligned
+    ;;
+    m68k)
+        arch="m68k"
     ;;
     mips|mipsel|IP*)
         arch="mips"
@@ -1393,17 +1393,6 @@ EOF
         arch="mips"
         enable fast_64bit
     ;;
-    sun4u|sparc64)
-        arch="sparc"
-        subarch="sparc64"
-        enable fast_64bit
-    ;;
-    sparc)
-        arch="sparc"
-    ;;
-    sh4|sh)
-        arch="sh4"
-    ;;
     parisc|hppa)
         arch="parisc"
     ;;
@@ -1411,18 +1400,43 @@ EOF
         arch="parisc"
         enable fast_64bit
     ;;
+    "Power Macintosh"|ppc|powerpc)
+        arch="ppc"
+        enable fast_unaligned
+    ;;
+    ppc64)
+        arch="ppc"
+        enable fast_64bit
+        enable fast_unaligned
+    ;;
     s390|s390x)
         arch="s390"
     ;;
-    m68k)
-        arch="m68k"
+    sh4|sh)
+        arch="sh4"
     ;;
-    ia64)
-        arch="ia64"
+    sparc)
+        arch="sparc"
+    ;;
+    sun4u|sparc64)
+        arch="sparc"
+        subarch="sparc64"
         enable fast_64bit
     ;;
-    bfin)
-        arch="bfin"
+    i386|i486|i586|i686|i86pc|BePC)
+        arch="x86"
+        subarch="x86_32"
+        enable fast_unaligned
+    ;;
+    x86_64|amd64)
+        arch="x86"
+        subarch="x86_32"
+        enable cmov
+        enable fast_cmov
+        enable fast_unaligned
+        check_cc <<EOF && enable fast_64bit && subarch="x86_64"
+        int test[sizeof(char*) - 7];
+EOF
     ;;
     *)
         arch="unknown"
@@ -1513,7 +1527,6 @@ case $target_os in
         disable ffserver
         SLIBPREF=""
         SLIBSUF=".dll"
-        EXESUF=".exe"
         SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
         SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
         SLIB_EXTRA_CMD='-lib /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)'
@@ -1540,7 +1553,6 @@ case $target_os in
             VHOOKSHFLAGS="$VHOOKSHFLAGS -L\$(BUILD_ROOT)/libswscale"
             VHOOKLIBS="$VHOOKLIBS -lswscale\$(BUILDSUF)"
         fi
-        EXESUF=".exe"
         SLIBPREF="cyg"
         SLIBSUF=".dll"
         SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
@@ -1553,7 +1565,6 @@ case $target_os in
         disable ffplay ffserver vhook
         disable $INDEV_LIST $OUTDEV_LIST
         network_extralibs="-lsocket"
-        EXESUF=".exe"
         objformat="coff"
         enable dos_paths
         ;;
@@ -1567,7 +1578,6 @@ case $target_os in
     os/2*)
         strip="lxlite"
         ln_s="cp -f"
-        EXESUF=".exe"
         FFLDFLAGS="-Zomf -Zbin-files -Zargs-wild -Zmap"
         SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf'
         FFSERVERLDFLAGS=""
@@ -1773,6 +1783,18 @@ EOF
     # check wether EBX is available on x86
     check_asm ebx_available '"":::"%ebx"'
 
+    # check whether more than 10 operands are supported
+    check_cc <<EOF && enable ten_operands
+int main(void) {
+    int x=0;
+    __asm__ volatile(
+        ""
+        :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
+    );
+    return 0;
+}
+EOF
+
     # check whether binutils is new enough to compile SSSE3/MMX2
     enabled ssse3 && check_asm ssse3 '"pabsw %xmm0, %xmm0"'
     enabled mmx2  && check_asm mmx2  '"movss %xmm0, %xmm0"'
@@ -1787,7 +1809,7 @@ EOF
         macho64)              append YASMFLAGS "-DPIC -DPREFIX" ;;
         *)                    append YASMFLAGS "-DPREFIX"  ;;
     esac
-    check_yasm "pabsw xmm0, xmm0" && enable yasm
+    disabled yasm || { check_yasm "pabsw xmm0, xmm0" && enable yasm; }
 fi
 
 # check for assembler specific support
@@ -1926,6 +1948,7 @@ enabled libfaad    && require2 libfaad faad.h faacDecOpen -lfaad
 enabled libgsm     && require  libgsm gsm.h gsm_create -lgsm
 enabled libmp3lame && require  libmp3lame lame/lame.h lame_init -lmp3lame -lm
 enabled libnut     && require  libnut libnut.h nut_demuxer_init -lnut
+enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg
 enabled libschroedinger && add_cflags $(pkg-config --cflags schroedinger-1.0) &&
                            require libschroedinger schroedinger/schro.h schro_init $(pkg-config --libs schroedinger-1.0)
 enabled libspeex   && require  libspeex speex/speex.h speex_decoder_init -lspeex
@@ -2178,12 +2201,14 @@ if enabled x86; then
     echo "MMX enabled               ${mmx-no}"
     echo "MMX2 enabled              ${mmx2-no}"
     echo "3DNow! enabled            ${amd3dnow-no}"
+    echo "3DNow! extended enabled   ${amd3dnowext-no}"
     echo "SSE enabled               ${sse-no}"
     echo "SSSE3 enabled             ${ssse3-no}"
     echo "CMOV enabled              ${cmov-no}"
     echo "CMOV is fast              ${fast_cmov-no}"
     echo "EBX available             ${ebx_available-no}"
     echo "EBP available             ${ebp_available-no}"
+    echo "10 operands supported     ${ten_operands-no}"
 fi
 if enabled arm; then
     echo "ARMv5TE enabled           ${armv5te-no}"
@@ -2241,6 +2266,7 @@ echo "libfaad dlopened          ${libfaadbin-no}"
 echo "libgsm enabled            ${libgsm-no}"
 echo "libmp3lame enabled        ${libmp3lame-no}"
 echo "libnut enabled            ${libnut-no}"
+echo "libopenjpeg enabled       ${libopenjpeg-no}"
 echo "libschroedinger enabled   ${libschroedinger-no}"
 echo "libspeex enabled          ${libspeex-no}"
 echo "libtheora enabled         ${libtheora-no}"