X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=configure;h=bc010d5629b5147ccb8e26702ec212f45f436c01;hb=a57da850c0ae7a9cde8917bb0f30dcee30b43439;hp=f36d6f7f1328c24efc4324eb439390b55f43f30e;hpb=782d48c3c1260c1e78ee3b1d7be9142d1273f6f0;p=ffmpeg diff --git a/configure b/configure index f36d6f7f132..bc010d5629b 100755 --- a/configure +++ b/configure @@ -107,6 +107,7 @@ Configuration options: --disable-all disable building components, libraries and programs --enable-incompatible-libav-abi enable incompatible Libav fork ABI [no] --enable-incompatible-fork-abi enable incompatible Libav fork ABI (deprecated) [no] + --enable-raise-major increase major version numbers in sonames [no] Program options: --disable-programs do not build command line programs @@ -241,6 +242,7 @@ External library support: native implementation exists [no] --enable-libvpx enable VP8 and VP9 de/encoding via libvpx [no] --enable-libwavpack enable wavpack encoding via libwavpack [no] + --enable-libwebp enable WebP encoding via libwebp [no] --enable-libx264 enable H.264 encoding via x264 [no] --enable-libxavs enable AVS encoding via xavs [no] --enable-libxvid enable Xvid encoding via xvidcore, @@ -1290,6 +1292,7 @@ EXTERNAL_LIBRARY_LIST=" libvorbis libvpx libwavpack + libwebp libx264 libxavs libxvid @@ -1315,6 +1318,7 @@ HWACCEL_LIST=" vaapi vda vdpau + xvmc " LIBRARY_LIST=" @@ -1363,6 +1367,7 @@ CONFIG_LIST=" network nonfree pic + raise_major rdft runtime_cpudetect safe_bitstream_reader @@ -1820,6 +1825,13 @@ log2_deps="!libc_msvcrt" symver_if_any="symver_asm_label symver_gnu_asm" +# threading support +atomics_gcc_if="sync_val_compare_and_swap" +atomics_suncc_if="atomic_cas_ptr machine_rw_barrier" +atomics_win32_if="MemoryBarrier" +atomics_native_if_any="$ATOMICS_LIST" +threads_if_any="$THREADS_LIST" + # subsystems dct_select="rdft" error_resilience_select="dsputil" @@ -1853,6 +1865,7 @@ asv2_decoder_select="dsputil" asv2_encoder_select="dsputil" atrac1_decoder_select="mdct sinewin" atrac3_decoder_select="mdct" +atrac3p_decoder_select="mdct sinewin" avrn_decoder_select="exif" bink_decoder_select="dsputil hpeldsp" binkaudio_dct_decoder_select="mdct rdft dct sinewin" @@ -2028,6 +2041,7 @@ vaapi_deps="va_va_h" vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads" vda_extralibs="-framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore" vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h" +xvmc_deps="X11_extensions_XvMClib_h" h263_vaapi_hwaccel_deps="vaapi" h263_vaapi_hwaccel_select="h263_decoder" @@ -2048,10 +2062,14 @@ h264_vdpau_hwaccel_deps="vdpau" h264_vdpau_hwaccel_select="h264_decoder" mpeg_vdpau_decoder_deps="vdpau" mpeg_vdpau_decoder_select="mpeg2video_decoder" +mpeg_xvmc_hwaccel_deps="xvmc" +mpeg_xvmc_hwaccel_select="mpeg2video_decoder" mpeg1_vdpau_decoder_deps="vdpau" mpeg1_vdpau_decoder_select="mpeg1video_decoder" mpeg1_vdpau_hwaccel_deps="vdpau" mpeg1_vdpau_hwaccel_select="mpeg1video_decoder" +mpeg1_xvmc_hwaccel_deps="xvmc" +mpeg1_xvmc_hwaccel_select="mpeg1video_decoder" mpeg2_crystalhd_decoder_select="crystalhd" mpeg2_dxva2_hwaccel_deps="dxva2" mpeg2_dxva2_hwaccel_select="mpeg2video_decoder" @@ -2059,6 +2077,8 @@ mpeg2_vaapi_hwaccel_deps="vaapi" mpeg2_vaapi_hwaccel_select="mpeg2video_decoder" mpeg2_vdpau_hwaccel_deps="vdpau" mpeg2_vdpau_hwaccel_select="mpeg2video_decoder" +mpeg2_xvmc_hwaccel_deps="xvmc" +mpeg2_xvmc_hwaccel_select="mpeg2video_decoder" mpeg4_crystalhd_decoder_select="crystalhd" mpeg4_vaapi_hwaccel_deps="vaapi" mpeg4_vaapi_hwaccel_select="mpeg4_decoder" @@ -2138,6 +2158,7 @@ libvpx_vp8_encoder_deps="libvpx" libvpx_vp9_decoder_deps="libvpx" libvpx_vp9_encoder_deps="libvpx" libwavpack_encoder_deps="libwavpack" +libwebp_encoder_deps="libwebp" libx264_encoder_deps="libx264" libx264rgb_encoder_deps="libx264" libxavs_encoder_deps="libxavs" @@ -2442,7 +2463,7 @@ enable static enable swscale_alpha # Enable hwaccels by default. -enable dxva2 vaapi vdpau +enable dxva2 vaapi vdpau xvmc # build settings SHFLAGS='-shared -Wl,-soname,$$(@F)' @@ -2478,7 +2499,7 @@ HOSTCC_E='-E -o $@' HOSTCC_O='-o $@' HOSTLD_O='-o $@' -host_cflags='-O3 -g' +host_cflags='-O3' host_cppflags='-D_ISOC99_SOURCE' host_libs='-lm' host_cflags_filter=echo @@ -3836,6 +3857,7 @@ esac probe_libc(){ pfx=$1 + pfx_no_=${pfx%_} # uclibc defines __GLIBC__, so it needs to be checked before glibc. if check_${pfx}cpp_condition features.h "defined __UCLIBC__"; then eval ${pfx}libc_type=uclibc @@ -3855,12 +3877,17 @@ probe_libc(){ add_cflags "-include $source_path/compat/msvcrt/snprintf.h" fi add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 - elif check_${pfx}cpp_condition _mingw.h "defined __MINGW32_VERSION"; then + eval test \$${pfx_no_}cc_type = "gcc" && + add_${pfx}cppflags -D__printf__=__gnu_printf__ + elif check_${pfx}cpp_condition _mingw.h "defined __MINGW_VERSION" || + check_${pfx}cpp_condition _mingw.h "defined __MINGW32_VERSION"; then eval ${pfx}libc_type=mingw32 check_${pfx}cpp_condition _mingw.h "__MINGW32_MAJOR_VERSION > 3 || \ (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" || die "ERROR: MinGW32 runtime version must be >= 3.15." - add_${pfx}cppflags -U__STRICT_ANSI__ + add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 + eval test \$${pfx_no_}cc_type = "gcc" && + add_${pfx}cppflags -D__printf__=__gnu_printf__ elif check_${pfx}cpp_condition crtversion.h "defined _VC_CRT_MAJOR_VERSION"; then eval ${pfx}libc_type=msvcrt # The MSVC 2010 headers (Win 7.0 SDK) set _WIN32_WINNT to @@ -3875,7 +3902,7 @@ probe_libc(){ eval ${pfx}libc_type=klibc elif check_${pfx}cpp_condition sys/cdefs.h "defined __BIONIC__"; then eval ${pfx}libc_type=bionic - elif check_${pfx}cpp_condition sys/brand.h "defined SOLARIS_BRAND_NAME"; then + elif check_${pfx}cpp_condition sys/brand.h "defined LABELED_BRAND_NAME"; then eval ${pfx}libc_type=solaris add_${pfx}cppflags -D__EXTENSIONS__ -D_XOPEN_SOURCE=600 fi @@ -4310,20 +4337,16 @@ check_header windows.h check_header X11/extensions/XvMClib.h check_header asm/types.h -disabled zlib || check_lib zlib.h zlibVersion -lz || disable zlib -disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib - if ! disabled w32threads && ! enabled pthreads; then - check_func_headers "windows.h process.h" _beginthreadex && enable w32threads + check_func_headers "windows.h process.h" _beginthreadex && + enable w32threads || disable w32threads fi # check for some common methods of building with pthread support # do this before the optional library checks as some of them require pthreads if ! disabled pthreads && ! enabled w32threads && ! enabled os2threads; then enable pthreads - if check_func pthread_join && check_func pthread_create; then - : - elif check_func pthread_join -pthread && check_func pthread_create -pthread; then + if check_func pthread_join -pthread && check_func pthread_create -pthread; then add_cflags -pthread add_extralibs -pthread elif check_func pthread_join -pthreads && check_func pthread_create -pthreads; then @@ -4331,9 +4354,12 @@ if ! disabled pthreads && ! enabled w32threads && ! enabled os2threads; then add_extralibs -pthreads elif check_func pthread_join -lpthreadGC2 && check_func pthread_create -lpthreadGC2; then add_extralibs -lpthreadGC2 - elif ! check_lib pthread.h pthread_join -lpthread && ! check_lib pthread.h pthread_create -lpthread; then + elif check_lib pthread.h pthread_join -lpthread && check_lib pthread.h pthread_create -lpthread; then + : + elif ! check_func pthread_join && ! check_func pthread_create; then disable pthreads fi + check_code cc "pthread.h" "static pthread_mutex_t atomic_lock = PTHREAD_MUTEX_INITIALIZER" || disable pthreads fi for thread in $THREADS_LIST; do @@ -4348,9 +4374,8 @@ if enabled pthreads; then check_func pthread_cancel fi -enabled sync_val_compare_and_swap && enable atomics_gcc -enabled_all atomic_cas_ptr machine_rw_barrier && enable atomics_suncc -enabled MemoryBarrier && enable atomics_win32 +disabled zlib || check_lib zlib.h zlibVersion -lz || disable zlib +disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib check_lib math.h sin -lm && LIBM="-lm" disabled crystalhd || check_lib libcrystalhd/libcrystalhd_if.h DtsCrystalHDVersion -lcrystalhd || disable crystalhd @@ -4426,8 +4451,9 @@ enabled libvpx && { enabled libvpx_vp8_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VP8E_SET_MAX_INTRA_BITRATE_PCT" -lvpx || die "ERROR: libvpx encoder version must be >=0.9.7"; } enabled libvpx_vp9_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx" -lvpx || disable libvpx_vp9_decoder; } - enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx" -lvpx || disable libvpx_vp9_encoder; } } + enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VP9E_SET_SVC" -lvpx || disable libvpx_vp9_encoder; } } enabled libwavpack && require libwavpack wavpack/wavpack.h WavpackOpenFileOutput -lwavpack +enabled libwebp && require_pkg_config libwebp webp/encode.h WebPGetEncoderVersion enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 && { check_cpp_condition x264.h "X264_BUILD >= 118" || die "ERROR: libx264 must be installed and version must be >= 0.118."; } @@ -4741,10 +4767,6 @@ case $target_os in esac enable frame_thread_encoder -enabled_any $THREADS_LIST && enable threads -enabled_any $ATOMICS_LIST && enable atomics_native - -enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are on x86" enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; } @@ -4753,6 +4775,8 @@ check_deps $CONFIG_LIST \ $HAVE_LIST \ $ALL_COMPONENTS \ +enabled threads && ! enabled pthreads && ! enabled atomics_native && die "non pthread threading without atomics not supported, try adding --enable-pthreads or --cpu=i486 or higher if you are on x86" + if test $target_os = "haiku"; then disable memalign @@ -5019,6 +5043,7 @@ get_version(){ name=$(toupper $lcname) file=$source_path/$lcname/version.h eval $(awk "/#define ${name}_VERSION_M/ { print \$2 \"=\" \$3 }" "$file") + enabled raise_major && eval ${name}_VERSION_MAJOR=$((${name}_VERSION_MAJOR+100)) eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak @@ -5033,7 +5058,7 @@ cat > $TMPH <