X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure;h=cf1b96097ffd9b004dfe15d8577a10887829ae00;hb=5f47bfd50ac46fb18b23a212a53bea0feacc1bb0;hp=faea24347e025aa9410c62eeb3f943d03a779927;hpb=0279cb4f6985bc0079815bd2149256d622efbbb6;p=ffmpeg diff --git a/configure b/configure index faea24347e0..cf1b96097ff 100755 --- a/configure +++ b/configure @@ -218,6 +218,7 @@ External library support: --enable-jni enable JNI support [no] --enable-ladspa enable LADSPA audio filtering [no] --enable-libaom enable AV1 video encoding/decoding via libaom [no] + --enable-libaribb24 enable ARIB text and caption decoding via libaribb24 [no] --enable-libass enable libass subtitles rendering, needed for subtitles and ass filter [no] --enable-libbluray enable BluRay reading using libbluray [no] @@ -320,6 +321,7 @@ External library support: The following libraries provide various hardware acceleration features: --disable-amf disable AMF video encoding code [autodetect] --disable-audiotoolbox disable Apple AudioToolbox code [autodetect] + --enable-cuda-nvcc enable Nvidia CUDA compiler [no] --enable-cuda-sdk enable CUDA features that require the CUDA SDK [no] --disable-cuvid disable Nvidia CUVID support [autodetect] --disable-d3d11va disable Microsoft Direct3D 11 video acceleration code [autodetect] @@ -380,7 +382,7 @@ Toolchain options: --host-cppflags=HCPPFLAGS use HCPPFLAGS when compiling for host --host-ld=HOSTLD use host linker HOSTLD --host-ldflags=HLDFLAGS use HLDFLAGS when linking for host - --host-libs=HLIBS use libs HLIBS when linking for host + --host-extralibs=HLIBS use libs HLIBS when linking for host --host-os=OS compiler host OS [$target_os] --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS] --extra-cxxflags=ECFLAGS add ECFLAGS to CXXFLAGS [$CXXFLAGS] @@ -473,7 +475,7 @@ Developer options (useful when working on FFmpeg itself): --random-seed=VALUE seed value for --enable/disable-random --disable-valgrind-backtrace do not print a backtrace under Valgrind (only applies to --disable-optimizations builds) - --enable-osfuzz Enable building fuzzer tool + --enable-ossfuzz Enable building fuzzer tool --libfuzzer=PATH path to libfuzzer --ignore-tests=TESTS comma-separated list (without "fate-" prefix in the name) of tests whose result is ignored @@ -648,6 +650,12 @@ request(){ done } +warn_if_gets_disabled(){ + for var in $*; do + WARN_IF_GETS_DISABLED_LIST="$WARN_IF_GETS_DISABLED_LIST $var" + done +} + enable(){ set_all yes $* } @@ -656,6 +664,14 @@ disable(){ set_all no $* } +disable_with_reason(){ + disable $1 + eval "${1}_disable_reason=\"$2\"" + if requested $1; then + die "ERROR: $1 requested, but $2" + fi +} + enable_weak(){ set_weak yes $* } @@ -784,10 +800,10 @@ check_deps(){ [ -n "$dep_ifa" ] && { enabled_all $dep_ifa && enable_weak $cfg; } [ -n "$dep_ifn" ] && { enabled_any $dep_ifn && enable_weak $cfg; } - enabled_all $dep_all || { disable $cfg && requested $cfg && die "ERROR: $cfg requested, but not all dependencies are satisfied: $dep_all"; } - enabled_any $dep_any || { disable $cfg && requested $cfg && die "ERROR: $cfg requested, but not any dependency is satisfied: $dep_any"; } - disabled_all $dep_con || { disable $cfg && requested $cfg && die "ERROR: $cfg requested, but some conflicting dependencies are unsatisfied: $dep_con"; } - disabled_any $dep_sel && { disable $cfg && requested $cfg && die "ERROR: $cfg requested, but some selected dependency is unsatisfied: $dep_sel"; } + enabled_all $dep_all || { disable_with_reason $cfg "not all dependencies are satisfied: $dep_all"; } + enabled_any $dep_any || { disable_with_reason $cfg "not any dependency is satisfied: $dep_any"; } + disabled_all $dep_con || { disable_with_reason $cfg "some conflicting dependencies are unsatisfied: $dep_con"; } + disabled_any $dep_sel && { disable_with_reason $cfg "some selected dependency is unsatisfied: $dep_sel"; } enabled $cfg && enable_deep_weak $dep_sel $dep_sgs @@ -986,6 +1002,10 @@ hostcc_o(){ eval printf '%s\\n' $HOSTCC_O } +nvcc_o(){ + eval printf '%s\\n' $NVCC_O +} + test_cc(){ log test_cc "$@" cat > $TMPC @@ -1007,6 +1027,22 @@ test_objcc(){ test_cmd $objcc -Werror=missing-prototypes $CPPFLAGS $CFLAGS $OBJCFLAGS "$@" $OBJCC_C $(cc_o $TMPO) $TMPM } +test_nvcc(){ + log test_nvcc "$@" + cat > $TMPCU + log_file $TMPCU + test_cmd $nvcc -ptx $NVCCFLAGS "$@" $NVCC_C $(nvcc_o $TMPO) $TMPCU +} + +check_nvcc() { + log check_nvcc "$@" + test_nvcc < $TMPC @@ -1683,6 +1719,7 @@ EXTERNAL_LIBRARY_NONFREE_LIST=" EXTERNAL_LIBRARY_VERSION3_LIST=" gmp + libaribb24 liblensfun libopencore_amrnb libopencore_amrwb @@ -1790,6 +1827,7 @@ EXTRALIBS_LIST=" " HWACCEL_LIBRARY_NONFREE_LIST=" + cuda_nvcc cuda_sdk libnpp " @@ -2436,6 +2474,7 @@ CMDLINE_SET=" tempprefix toolchain valgrind + windres x86asmexe " @@ -2662,6 +2701,7 @@ hap_encoder_select="texturedspenc" hevc_decoder_select="bswapdsp cabac golomb hevcparse videodsp" huffyuv_decoder_select="bswapdsp huffyuvdsp llviddsp" huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp llvidencdsp" +hymt_decoder_select="huffyuv_decoder" iac_decoder_select="imc_decoder" imc_decoder_select="bswapdsp fft mdct sinewin" indeo3_decoder_select="hpeldsp" @@ -2681,7 +2721,7 @@ mjpeg_decoder_select="blockdsp hpeldsp exif idctdsp jpegtables" mjpeg_encoder_select="jpegtables mpegvideoenc" mjpegb_decoder_select="mjpeg_decoder" mlp_decoder_select="mlp_parser" -mlp_encoder_select="lpc" +mlp_encoder_select="lpc audio_frame_queue" motionpixels_decoder_select="bswapdsp" mp1_decoder_select="mpegaudio" mp1float_decoder_select="mpegaudio" @@ -2763,7 +2803,7 @@ thp_decoder_select="mjpeg_decoder" tiff_decoder_suggest="zlib lzma" tiff_encoder_suggest="zlib" truehd_decoder_select="mlp_parser" -truehd_encoder_select="lpc" +truehd_encoder_select="lpc audio_frame_queue" truemotion2_decoder_select="bswapdsp" truespeech_decoder_select="bswapdsp" tscc_decoder_deps="zlib" @@ -3092,6 +3132,7 @@ hevc_videotoolbox_encoder_select="videotoolbox_encoder" libaom_av1_decoder_deps="libaom" libaom_av1_encoder_deps="libaom" libaom_av1_encoder_select="extract_extradata_bsf" +libaribb24_decoder_deps="libaribb24" libcelt_decoder_deps="libcelt" libcodec2_decoder_deps="libcodec2" libcodec2_encoder_deps="libcodec2" @@ -3480,6 +3521,8 @@ tinterlace_merge_test_deps="tinterlace_filter" tinterlace_pad_test_deps="tinterlace_filter" tonemap_filter_deps="const_nan" tonemap_opencl_filter_deps="opencl const_nan" +transpose_opencl_filter_deps="opencl" +transpose_vaapi_filter_deps="vaapi VAProcPipelineCaps_rotation_flags" unsharp_opencl_filter_deps="opencl" uspp_filter_deps="gpl avcodec" vaguedenoiser_filter_deps="gpl" @@ -3543,7 +3586,7 @@ swresample_suggest="libm libsoxr" swscale_deps="avutil" swscale_suggest="libm" -avcodec_extralibs="pthreads_extralibs iconv_extralibs" +avcodec_extralibs="pthreads_extralibs iconv_extralibs dxva2_extralibs" avfilter_extralibs="pthreads_extralibs" avutil_extralibs="d3d11va_extralibs nanosleep_extralibs pthreads_extralibs vaapi_drm_extralibs vaapi_x11_extralibs vdpau_x11_extralibs" @@ -3608,6 +3651,7 @@ host_os=$target_os_default if test "$target_os_default" = aix; then arch_default=$(uname -p) strip_default="strip -X32_64" + nm_default="nm -g -X32_64" else arch_default=$(uname -m) fi @@ -3724,8 +3768,7 @@ find_things_extern(){ find_filters_extern(){ file=$source_path/$1 - #sed -n "s/^extern AVFilter ff_\([avfsinkrc]\{2,5\}\)_\(\w\+\);/\2_filter/p" $file - sed -E -n "s/^extern AVFilter ff_([avfsinkrc]{2,5})_([a-zA-Z0-9_]+);/\2_filter/p" $file + sed -n 's/^extern AVFilter ff_[avfsinkrc]\{2,5\}_\([[:alnum:]_]\{1,\}\);/\1_filter/p' $file } FILTER_LIST=$(find_filters_extern libavfilter/allfilters.c) @@ -3876,6 +3919,7 @@ for opt do name=$(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing} list=$(filter "$name" $list) [ "$list" = "" ] && warn "Option $opt did not match anything" + test $action = enable && warn_if_gets_disabled $list $action $list ;; --enable-yasm|--disable-yasm) @@ -4128,6 +4172,11 @@ if test -n "$cross_prefix"; then enable cross_compile fi +set_default target_os +if test "$target_os" = android; then + cc_default="clang" +fi + ar_default="${cross_prefix}${ar_default}" cc_default="${cross_prefix}${cc_default}" cxx_default="${cross_prefix}${cxx_default}" @@ -4144,7 +4193,7 @@ windres_default="${cross_prefix}${windres_default}" sysinclude_default="${sysroot}/usr/include" set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \ - target_exec target_os x86asmexe nvcc + target_exec x86asmexe nvcc enabled cross_compile || host_cc_default=$cc set_default host_cc @@ -4211,6 +4260,7 @@ tmpfile TMPCPP .cpp tmpfile TMPE $EXESUF tmpfile TMPH .h tmpfile TMPM .m +tmpfile TMPCU .cu tmpfile TMPO .o tmpfile TMPS .S tmpfile TMPSH .sh @@ -4848,7 +4898,6 @@ elif enabled mips; then enable fast_cmov enable fast_unaligned disable aligned_stack - disable mipsfpu disable mipsdsp disable mipsdspr2 # When gcc version less than 5.3.0, add -fno-expensive-optimizations flag. @@ -5143,6 +5192,7 @@ case $target_os in echo "hwcap_1 = OVERRIDE;" > mapfile && add_ldflags -Wl,-M,mapfile nm_default='nm -P -g' + striptype="" version_script='-M' VERSION_SCRIPT_POSTPROCESS_CMD='perl $(SRC_PATH)/compat/solaris/make_sunver.pl - $(OBJS)' ;; @@ -5296,7 +5346,6 @@ case $target_os in network_extralibs="-lsocket" objformat="coff" enable dos_paths - add_cppflags -U__STRICT_ANSI__ ;; linux) enable section_data_rel_ro @@ -5465,6 +5514,11 @@ EOF elif test_${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 + elif test_${pfx}cpp_condition sys/version.h "defined __DJGPP__"; then + eval ${pfx}libc_type=djgpp + add_cppflags -U__STRICT_ANSI__ + add_cflags "-include $source_path/compat/djgpp/math.h" + add_compat djgpp/math.o fi test_${pfx}cc < @@ -5974,6 +6028,7 @@ check_type "d3d9.h dxva2api.h" DXVA2_ConfigPictureDecode -D_WIN32_WINNT=0x0602 check_type "va/va.h va/va_dec_hevc.h" "VAPictureParameterBufferHEVC" check_struct "va/va.h" "VADecPictureParameterBufferVP9" bit_depth +check_struct "va/va.h va/va_vpp.h" "VAProcPipelineCaps" rotation_flags check_type "va/va.h va/va_enc_hevc.h" "VAEncPictureParameterBufferHEVC" check_type "va/va.h va/va_enc_jpeg.h" "VAEncPictureParameterBufferJPEG" check_type "va/va.h va/va_enc_vp8.h" "VAEncPictureParameterBufferVP8" @@ -6055,17 +6110,21 @@ for func in $COMPLEX_FUNCS; do done # these are off by default, so fail if requested and not available +enabled cuda_nvcc && { check_nvcc || die "ERROR: failed checking for nvcc."; } enabled cuda_sdk && require cuda_sdk cuda.h cuCtxCreate -lcuda enabled chromaprint && require chromaprint chromaprint.h chromaprint_get_version -lchromaprint enabled decklink && { require_headers DeckLinkAPI.h && { test_cpp_condition DeckLinkAPIVersion.h "BLACKMAGIC_DECKLINK_API_VERSION >= 0x0a090500" || die "ERROR: Decklink API version must be >= 10.9.5."; } } enabled libndi_newtek && require_headers Processing.NDI.Lib.h -enabled frei0r && require_headers frei0r.h +enabled frei0r && require_headers "frei0r.h dlfcn.h" enabled gmp && require gmp gmp.h mpz_export -lgmp enabled gnutls && require_pkg_config gnutls gnutls gnutls/gnutls.h gnutls_global_init enabled jni && { [ $target_os = "android" ] && check_headers jni.h && enabled pthreads || die "ERROR: jni not found"; } -enabled ladspa && require_headers ladspa.h +enabled ladspa && require_headers "ladspa.h dlfcn.h" enabled libaom && require_pkg_config libaom "aom >= 1.0.0" aom/aom_codec.h aom_codec_version +enabled libaribb24 && { check_pkg_config libaribb24 "aribb24 > 1.0.3" "aribb24/aribb24.h" arib_instance_new || + { enabled gpl && require_pkg_config libaribb24 aribb24 "aribb24/aribb24.h" arib_instance_new; } || + die "ERROR: libaribb24 requires version higher than 1.0.3 or --enable-gpl."; } enabled lv2 && require_pkg_config lv2 lilv-0 "lilv/lilv.h" lilv_world_new enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883 enabled libass && require_pkg_config libass libass ass/ass.h ass_library_init @@ -6076,8 +6135,8 @@ enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 && die "ERROR: libcelt must be installed and version must be >= 0.11.0."; } enabled libcaca && require_pkg_config libcaca caca caca.h caca_create_canvas enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create -lcodec2 -enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.0.1" "dav1d/dav1d.h" dav1d_version -enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.5.115" davs2.h davs2_decoder_open +enabled libdav1d && require_pkg_config libdav1d "dav1d >= 0.1.0" "dav1d/dav1d.h" dav1d_version +enabled libdavs2 && require_pkg_config libdavs2 "davs2 >= 1.6.0" davs2.h davs2_decoder_open enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 dc1394/dc1394.h dc1394_new enabled libdrm && require_pkg_config libdrm libdrm xf86drm.h drmGetVersion enabled libfdk_aac && { check_pkg_config libfdk_aac fdk-aac "fdk-aac/aacenc_lib.h" aacEncOpen || @@ -6508,6 +6567,7 @@ check_disable_warning -Wno-format-zero-length check_disable_warning -Wno-pointer-sign check_disable_warning -Wno-unused-const-variable check_disable_warning -Wno-bool-operation +check_disable_warning -Wno-char-subscripts check_disable_warning_headers(){ warning_flag=-W${1#-Wno-} @@ -6523,7 +6583,7 @@ EOF # add some linker flags check_ldflags -Wl,--warn-common -check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample +check_ldflags -Wl,-rpath-link=:libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample enabled rpath && add_ldexeflags -Wl,-rpath,$libdir && add_ldsoflags -Wl,-rpath,$libdir test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic @@ -6790,10 +6850,17 @@ check_deps $CONFIG_LIST \ 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 avresample && warn "Building with deprecated library libavresample" -if test $target_os = "haiku"; then +case $target_os in +haiku) disable memalign disable posix_memalign -fi + ;; +*-dos|freedos|opendos) + if test_cpp_condition sys/version.h "defined(__DJGPP__) && __DJGPP__ == 2 && __DJGPP_MINOR__ == 5"; then + disable memalign + fi + ;; +esac flatten_extralibs(){ nested_entries= @@ -7081,6 +7148,15 @@ echo "License: $license" fi # test "$quiet" != "yes" +if test -n "$WARN_IF_GETS_DISABLED_LIST"; then + for cfg in $WARN_IF_GETS_DISABLED_LIST; do + if disabled $cfg; then + varname=${cfg}_disable_reason + eval "warn \"Disabled $cfg because \$$varname\"" + fi + done +fi + if test -n "$WARNINGS"; then printf "\n%s%s$WARNINGS%s" "$warn_color" "$bold_color" "$reset_color" enabled fatal_warnings && exit 1 @@ -7251,7 +7327,7 @@ cat > $TMPH <