X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure;h=9264bb5a0ef2339538459d0b9d606c96414a985e;hb=6354957a95022864746180525680cca872ab0e0a;hp=e5f50464be1b3066b7d61b8f676b15c324859f11;hpb=159323897f545e7405fb9db234e0ba123e174376;p=ffmpeg diff --git a/configure b/configure index e5f50464be1..9264bb5a0ef 100755 --- a/configure +++ b/configure @@ -113,6 +113,8 @@ Program options: Component options: --disable-doc do not build documentation + --disable-pod2man do not build manual pages + --disable-texi2html do not build HTML documentation --disable-avdevice disable libavdevice build --disable-avcodec disable libavcodec build --disable-avformat disable libavformat build @@ -132,13 +134,6 @@ Component options: --disable-fft disable FFT code --disable-faan disable floating point AAN (I)DCT code -Hardware accelerators: - --enable-d3d11va enable D3D11VA code - --enable-dxva2 enable DXVA2 code - --enable-vaapi enable VAAPI code - --enable-vda enable VDA code - --enable-vdpau enable VDPAU code - Individual component options: --disable-everything disable all components listed below --disable-encoder=NAME disable encoder NAME @@ -177,57 +172,79 @@ Individual component options: --disable-filters disable all filters External library support: - --enable-avisynth enable reading of AviSynth script files [no] - --enable-bzlib enable bzlib [autodetect] - --enable-cuda enable dynamically linked CUDA [no] - --enable-frei0r enable frei0r video filtering - --enable-gnutls enable gnutls [no] - --enable-libbs2b enable bs2b DSP library [no] - --enable-libcdio enable audio CD grabbing with libcdio - --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394 - and libraw1394 [no] - --enable-libdcadec enable DCA decoding via libdcadec [no] - --enable-libfaac enable AAC encoding via libfaac [no] - --enable-libfdk-aac enable AAC de/encoding via libfdk-aac [no] - --enable-libfreetype enable libfreetype [no] - --enable-libgsm enable GSM de/encoding via libgsm [no] - --enable-libilbc enable iLBC de/encoding via libilbc [no] - --enable-libkvazaar enable HEVC encoding via libkvazaar [no] - --enable-libmfx enable HW acceleration through libmfx - --enable-libmp3lame enable MP3 encoding via libmp3lame [no] - --enable-libnpp enable NVIDIA Performance Primitives-based code [no] - --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no] - --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no] - --enable-libopencv enable video filtering via libopencv [no] - --enable-libopenh264 enable H.264 encoding via OpenH264 [no] - --enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no] - --enable-libopus enable Opus de/encoding via libopus [no] - --enable-libpulse enable Pulseaudio input via libpulse [no] - --enable-librtmp enable RTMP[E] support via librtmp [no] - --enable-libschroedinger enable Dirac de/encoding via libschroedinger [no] - --enable-libsnappy enable Snappy compression [no] - --enable-libspeex enable Speex de/encoding via libspeex [no] - --enable-libtheora enable Theora encoding via libtheora [no] - --enable-libtwolame enable MP2 encoding via libtwolame [no] - --enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no] - --enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no] - --enable-libvorbis enable Vorbis encoding via libvorbis [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-libx265 enable HEVC encoding via x265 [no] - --enable-libxavs enable AVS encoding via xavs [no] - --enable-libxcb enable X11 grabbing using XCB [no] - --enable-libxcb-shm enable X11 grabbing shm communication [auto] - --enable-libxcb-xfixes enable X11 grabbing mouse rendering [auto] - --enable-libxvid enable Xvid encoding via xvidcore, - native MPEG-4/Xvid encoder exists [no] - --enable-mmal enable decoding via MMAL [no] - --enable-nvenc enable encoding via NVENC [no] - --enable-openssl enable openssl [no] - --enable-x11grab enable X11 grabbing (legacy) [no] - --enable-zlib enable zlib [autodetect] + + Using any of the following switches will allow Libav to link to the + corresponding external library. All the components depending on that library + will become enabled, if all their other dependencies are met and they are not + explicitly disabled. E.g. --enable-libwavpack will enable linking to + libwavpack and allow the libwavpack encoder to be built, unless it is + specifically disabled with --disable-encoder=libwavpack. + + Note that only the system libraries are auto-detected. All the other external + libraries must be explicitly enabled. + + Also note that the following help text describes the purpose of the libraries + themselves, not all their features will necessarily be usable by Libav. + + --enable-avisynth video frameserver + --enable-bzlib bzip2 compression [autodetect] + --enable-frei0r video filtering plugins + --enable-gnutls crypto + --enable-libbs2b Bauer stereophonic-to-binaural DSP + --enable-libcdio audio CD input + --enable-libdc1394 IEEE 1394/Firewire camera input + --enable-libdcadec DCA audio decoding + --enable-libfaac AAC audio encoding + --enable-libfdk-aac AAC audio encoding/decoding + --enable-libfontconfig font configuration and management + --enable-libfreetype font rendering + --enable-libgsm GSM audio encoding/decoding + --enable-libhdcd HDCD decoding filter + --enable-libilbc ILBC audio encoding/decoding + --enable-libkvazaar HEVC video encoding + --enable-libmp3lame MP3 audio encoding + --enable-libopencore-amrnb AMR-NB audio encoding/decoding + --enable-libopencore-amrwb AMR-WB audio decoding + --enable-libopencv computer vision + --enable-libopenh264 H.264 video encoding/decoding + --enable-libopenjpeg JPEG 2000 image encoding/decoding + --enable-libopus Opus audio encoding/decoding + --enable-libpulse Pulseaudio sound server + --enable-librtmp RTMP streaming + --enable-libschroedinger Dirac video encoding/decoding + --enable-libsnappy snappy compression + --enable-libspeex Speex audio encoding/decoding + --enable-libtheora Theora video encoding/decoding + --enable-libtwolame MP2 audio encoding + --enable-libvo-aacenc AAC audio encoding + --enable-libvo-amrwbenc AMR-WB audio encoding + --enable-libvorbis Vorbis audio encoding/decoding + --enable-libvpx VP* video encoding/decoding + --enable-libwavpack Wavpack audio encoding/decoding + --enable-libwebp WebP image encoding/decoding + --enable-libx264 H.264 video encoding + --enable-libx265 HEVC video encoding + --enable-libxavs Chinese AVS video encoding + --enable-libxcb X window system protocol communication + --enable-libxcb-shm X11 shm communication [auto] + --enable-libxcb-xfixes X11 mouse rendering [auto] + --enable-libxvid MPEG-4 ASP video encoding + --enable-openssl crypto + --enable-zlib compression [autodetect] + + The following libraries provide various hardware acceleration features: + --enable-cuda Nvidia CUDA (dynamically linked) + --enable-d3d11va Microsoft Direct3D 11 video acceleration [auto] + --enable-dxva2 Microsoft DirectX 9 video acceleration [auto] + --enable-libmfx Intel MediaSDK (AKA Quick Sync Video) + --enable-libnpp Nvidia CUDA processing + --enable-mmal Broadcom Multi-Media Abstraction Layer (Raspberry Pi) + --enable-nvenc Nvidia video encoding + --enable-omx OpenMAX IL + --enable-omx-rpi OpenMAX IL for Raspberry Pi + --enable-vaapi Video Acceleration API (mainly Unix/Intel) + --enable-vda Apple Video Decode Acceleration [auto] + --enable-vdpau Nvidia Video Decode and Presentation API for Unix [auto] Toolchain options: --arch=ARCH select architecture [$arch] @@ -279,7 +296,6 @@ Advanced options (experts only): --disable-safe-bitstream-reader disable buffer boundary checking in bitreaders (faster, but may crash) - --enable-memalign-hack emulate memalign, interferes with memory debuggers --enable-sram allow use of on-chip SRAM Optimization options (experts only): @@ -666,7 +682,7 @@ print_enabled(){ suf=$1 shift for v; do - enabled $v && printf "%s\n" ${v%$suf}; + enabled $v && printf "%s\n" ${v%$suf} done } @@ -970,16 +986,21 @@ check_cpp_condition(){ EOF } -check_lib(){ - log check_lib "$@" - header="$1" - func="$2" +test_cflags_cpp(){ + log test_cflags_cpp "$@" + flags=$1 + condition=$2 shift 2 - check_header $header && check_func $func "$@" && add_extralibs "$@" + set -- $($cflags_filter "$flags") + check_cpp "$@" <&1 | grep -q Intel; then _type=icl _ident=$($_cc 2>&1 | head -n1) @@ -3208,7 +3283,19 @@ probe_cc(){ _flags='-nologo -Qdiag-error:4044,10157' # -Qvec- -Qsimd- to prevent miscompilation, -GS for consistency # with MSVC which enables it by default. - _cflags='-D_USE_MATH_DEFINES -Qms0 -Qvec- -Qsimd- -GS' + _cflags='-Qms0 -Qvec- -Qsimd- -GS' + elif $_cc -? 2>/dev/null | grep -q 'LLVM.*Linker'; then + # lld can emulate multiple different linkers; in ms link.exe mode, + # the -? parameter gives the help output which contains an identifyable + # string, while it gives an error in other modes. + _type=lld-link + # The link.exe mode doesn't have a switch for getting the version, + # but we can force it back to gnu mode and get the version from there. + _ident=$($_cc -flavor gnu --version) + _ld_o='-out:$@' + _flags_filter=msvc_flags + _ld_lib='lib%.a' + _ld_path='-libpath:' elif $_cc --version 2>/dev/null | grep -q ^cparser; then _type=cparser _ident=$($_cc --version | head -n1) @@ -3415,26 +3502,26 @@ elif enabled arm; then } probe_arm_arch() { - if check_arm_arch 4; then echo armv4; - elif check_arm_arch 4T; then echo armv4t; - elif check_arm_arch 5; then echo armv5; - elif check_arm_arch 5E; then echo armv5e; - elif check_arm_arch 5T; then echo armv5t; - elif check_arm_arch 5TE; then echo armv5te; - elif check_arm_arch 5TEJ; then echo armv5te; - elif check_arm_arch 6; then echo armv6; - elif check_arm_arch 6J; then echo armv6j; - elif check_arm_arch 6K; then echo armv6k; - elif check_arm_arch 6Z; then echo armv6z; - elif check_arm_arch 6ZK; then echo armv6zk; - elif check_arm_arch 6T2; then echo armv6t2; - elif check_arm_arch 7; then echo armv7; - elif check_arm_arch 7A 7_A; then echo armv7-a; - elif check_arm_arch 7S; then echo armv7-a; - elif check_arm_arch 7R 7_R; then echo armv7-r; - elif check_arm_arch 7M 7_M; then echo armv7-m; - elif check_arm_arch 7EM 7E_M; then echo armv7-m; - elif check_arm_arch 8A 8_A; then echo armv8-a; + if check_arm_arch 4; then echo armv4 + elif check_arm_arch 4T; then echo armv4t + elif check_arm_arch 5; then echo armv5 + elif check_arm_arch 5E; then echo armv5e + elif check_arm_arch 5T; then echo armv5t + elif check_arm_arch 5TE; then echo armv5te + elif check_arm_arch 5TEJ; then echo armv5te + elif check_arm_arch 6; then echo armv6 + elif check_arm_arch 6J; then echo armv6j + elif check_arm_arch 6K; then echo armv6k + elif check_arm_arch 6Z; then echo armv6z + elif check_arm_arch 6ZK; then echo armv6zk + elif check_arm_arch 6T2; then echo armv6t2 + elif check_arm_arch 7; then echo armv7 + elif check_arm_arch 7A 7_A; then echo armv7-a + elif check_arm_arch 7S; then echo armv7-a + elif check_arm_arch 7R 7_R; then echo armv7-r + elif check_arm_arch 7M 7_M; then echo armv7-m + elif check_arm_arch 7EM 7E_M; then echo armv7-m + elif check_arm_arch 8A 8_A; then echo armv8-a fi } @@ -3615,7 +3702,15 @@ if test "$?" != 0; then fi add_cppflags -D_ISOC99_SOURCE -check_cflags -std=c99 + +# some compilers silently accept -std=c11, so we also need to check that the +# version macro is defined properly +if test_cflags_cpp -std=c11 "__STDC_VERSION__ >= 201112L"; then + add_cflags -std=c11 +else + check_cflags -std=c99 +fi + check_cc -D_FILE_OFFSET_BITS=64 < EOF @@ -3703,7 +3798,8 @@ case $target_os in echo "hwcap_1 = OVERRIDE;" > mapfile && add_ldflags -Wl,-M,mapfile nm_default='nm -P -g' - SLIB_CREATE_DEF_CMD='$(Q)perl $(SRC_PATH)/compat/solaris/make_sunver.pl $$(filter %.ver,$$^) $(OBJS) | grep -v @ > $(SUBDIR)lib$(NAME).ver-sol2' + version_script='-M' + VERSION_SCRIPT_POSTPROCESS_CMD='perl $(SRC_PATH)/compat/solaris/make_sunver.pl - $(OBJS)' ;; netbsd) disable symver @@ -3738,9 +3834,11 @@ case $target_os in enabled x86_64 && objformat="macho64" enabled_any pic shared || { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; } + check_header dispatch/dispatch.h && + add_cppflags '-I\$(SRC_PATH)/compat/dispatch_semaphore' ;; msys*) - die "Native MSYS builds are discouraged, please use the MINGW environment."; + die "Native MSYS builds are discouraged, please use the MINGW environment." ;; mingw32*|mingw64*) if test $target_os = "mingw32ce"; then @@ -3918,6 +4016,8 @@ probe_libc(){ (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" || die "ERROR: MinGW32 runtime version must be >= 3.15." add_${pfx}cppflags -U__STRICT_ANSI__ -D__USE_MINGW_ANSI_STDIO=1 + check_${pfx}cpp_condition _mingw.h "__MSVCRT_VERSION__ < 0x0700__" && + add_${pfx}cppflags -D__MSVCRT_VERSION__=0x0700 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 @@ -3932,6 +4032,7 @@ probe_libc(){ vsnprintf=avpriv_vsnprintf fi fi + add_${pfx}cppflags -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS # The MSVC 2010 headers (Win 7.0 SDK) set _WIN32_WINNT to # 0x601 by default unless something else is set by the user. # This can easily lead to us detecting functions only present @@ -3951,6 +4052,9 @@ probe_libc(){ #endif #endif EOF + if [ "$pfx" = "" ]; then + check_func strtoll || add_cflags -Dstrtoll=_strtoi64 + fi elif check_${pfx}cpp_condition stddef.h "defined __KLIBC__"; then eval ${pfx}libc_type=klibc elif check_${pfx}cpp_condition sys/cdefs.h "defined __BIONIC__"; then @@ -4011,31 +4115,16 @@ Specify --enable-static to build the static libraries or --enable-shared to build the shared libraries as well. To only build the shared libraries specify --disable-static in addition to --enable-shared. EOF - exit 1; + exit 1 fi die_license_disabled() { - enabled $1 || { enabled $2 && die "$2 is $1 and --enable-$1 is not specified."; } + enabled $1 || { enabled $v && die "$v is $1 and --enable-$1 is not specified."; } } -die_license_disabled gpl libcdio -die_license_disabled gpl libx264 -die_license_disabled gpl libx265 -die_license_disabled gpl libxavs -die_license_disabled gpl libxvid -die_license_disabled gpl x11grab - -die_license_disabled nonfree cuda -die_license_disabled nonfree libfaac -die_license_disabled nonfree libfdk_aac -die_license_disabled nonfree libnpp -die_license_disabled nonfree nvenc -die_license_disabled nonfree openssl - -die_license_disabled version3 libopencore_amrnb -die_license_disabled version3 libopencore_amrwb -die_license_disabled version3 libvo_aacenc -die_license_disabled version3 libvo_amrwbenc +map "die_license_disabled gpl" $EXTERNAL_LIBRARY_GPL_LIST +map "die_license_disabled nonfree" $EXTERNAL_LIBRARY_NONFREE_LIST $HWACCEL_LIBRARY_NONFREE_LIST +map "die_license_disabled version3" $EXTERNAL_LIBRARY_VERSION3_LIST enabled version3 && { enabled gpl && enable gplv3 || enable lgplv3; } @@ -4188,6 +4277,9 @@ EOF check_as <= 0.8.1" kvazaar.h kvz_api_get enabled libmfx && require_pkg_config libmfx "mfx/mfxvideo.h" MFXInit @@ -4530,8 +4635,8 @@ enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb enabled libopencv && require_pkg_config opencv opencv/cv.h cvCreateImageHeader enabled libopenh264 && require_pkg_config openh264 wels/codec_api.h WelsGetCodecVersion -enabled libopenjpeg && { { check_header openjpeg.h && check_lib2 openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC; } || - { require_pkg_config libopenjpeg1 openjpeg.h opj_version -DOPJ_STATIC; } } +enabled libopenjpeg && { check_lib openjpeg.h opj_version -lopenjpeg -DOPJ_STATIC || + require_pkg_config libopenjpeg1 openjpeg.h opj_version -DOPJ_STATIC; } enabled libopus && require_pkg_config opus opus_multistream.h opus_multistream_decoder_create enabled libpulse && require_pkg_config libpulse-simple pulse/simple.h pa_simple_new enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket @@ -4574,7 +4679,7 @@ enabled libx264 && require_pkg_config x264 "stdint.h x264.h" x264_enco enabled libx265 && require_pkg_config x265 x265.h x265_api_get && { check_cpp_condition x265.h "X265_BUILD >= 57" || die "ERROR: libx265 version must be >= 57."; } -enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs +enabled libxavs && require libxavs "stdint.h xavs.h" xavs_encoder_encode -lxavs enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore enabled mmal && { check_lib interface/mmal/mmal.h mmal_port_connect -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host || { ! enabled cross_compile && { @@ -4583,7 +4688,15 @@ enabled mmal && { check_lib interface/mmal/mmal.h mmal_port_connect check_lib interface/mmal/mmal.h mmal_port_connect ; } check_lib interface/mmal/mmal.h mmal_port_connect ; } || die "ERROR: mmal not found"; } -enabled openssl && { check_pkg_config openssl openssl/ssl.h SSL_library_init && { +enabled mmal && check_func_headers interface/mmal/mmal.h "MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS" +enabled omx_rpi && enable omx +enabled omx && { check_header OMX_Core.h || + { ! enabled cross_compile && enabled omx_rpi && { + add_cflags -isystem/opt/vc/include/IL ; } + check_header OMX_Core.h ; } || + die "ERROR: OpenMAX IL headers not found"; } +enabled openssl && { { check_pkg_config openssl openssl/ssl.h OPENSSL_init_ssl || + check_pkg_config openssl openssl/ssl.h SSL_library_init; } && { add_cflags $openssl_cflags && add_extralibs $openssl_libs; }|| check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto || check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 || @@ -4591,7 +4704,7 @@ enabled openssl && { check_pkg_config openssl openssl/ssl.h SSL_librar die "ERROR: openssl not found"; } if enabled gnutls; then - { check_lib2 gmp.h mpz_export -lgmp && enable gmp; } || + { check_lib gmp.h mpz_export -lgmp && enable gmp; } || { check_lib gcrypt.h gcry_mpi_new -lgcrypt && enable gcrypt; } fi @@ -4605,10 +4718,9 @@ if enabled libdc1394; then fi if enabled nvenc; then - enabled cuda || check_header cuda.h || die "ERROR: cuda.h not found."; - check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found."; - check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 5" || - die "ERROR: NVENC API version 4 or older is not supported"; + check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found." + check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 6" || + die "ERROR: NVENC API version 5 or older is not supported" fi if check_pkg_config sdl SDL_events.h SDL_PollEvent; then @@ -4617,8 +4729,8 @@ if check_pkg_config sdl SDL_events.h SDL_PollEvent; then enable sdl fi -pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man -texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html +! disabled pod2man && check_cmd pod2man --help && enable pod2man || disable pod2man +! disabled texi2html && check_cmd texi2html -version && enable texi2html || disable texi2html check_header linux/fb.h check_header linux/videodev2.h @@ -4650,25 +4762,25 @@ check_header sys/soundcard.h check_header soundcard.h enabled_any alsa_indev alsa_outdev && - check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound + check_lib alsa/asoundlib.h snd_pcm_htimestamp -lasound -enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack && +enabled jack_indev && check_lib jack/jack.h jack_client_open -ljack && check_func jack_port_get_latency_range -ljack -enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio +enabled_any sndio_indev sndio_outdev && check_lib sndio.h sio_open -lsndio if enabled libcdio; then - check_lib2 "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio || - check_lib2 "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio || + check_lib "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio || + check_lib "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio || die "ERROR: No usable libcdio/cdparanoia found" fi check_lib X11/Xlib.h XOpenDisplay -lX11 && enable xlib -if enabled libxcb || enabled x11grab && ! disabled libxcb; then +if enabled libxcb; then check_pkg_config xcb-shape xcb/shape.h xcb_shape_rectangles || { enabled libxcb && die "ERROR: libxcb not found"; - } && disable x11grab && enable libxcb + } && enable libxcb disabled libxcb_shm || check_pkg_config xcb-shm xcb/shm.h xcb_shm_attach || { @@ -4680,31 +4792,31 @@ if enabled libxcb || enabled x11grab && ! disabled libxcb; then enabled libxcb_xfixes && die "ERROR: libxcb_xfixes not found"; } && enable libxcb_xfixes - add_cflags "$xcb_event_cflags $xcb_shm_cflags $xcb_xfixes_cflags" - add_extralibs "$xcb_event_libs $xcb_shm_libs $xcb_xfixes_libs" + add_cflags "$xcb_shape_cflags $xcb_event_cflags $xcb_shm_cflags $xcb_xfixes_cflags" + add_extralibs "$xcb_shape_libs $xcb_event_libs $xcb_shm_libs $xcb_xfixes_libs" fi -if enabled x11grab; then - enabled xlib || die "ERROR: Xlib not found" - require Xext X11/extensions/XShm.h XShmCreateImage -lXext - require Xfixes X11/extensions/Xfixes.h XFixesGetCursorImage -lXfixes -fi +enabled vaapi && require vaapi va/va.h vaInitialize -lva enabled vaapi && check_code cc "va/va.h" "vaCreateSurfaces(0, 0, 0, 0, 0, 0, 0, 0)" || disable vaapi -enabled vaapi && enabled xlib && - check_lib2 "va/va.h va/va_x11.h" vaGetDisplay -lva -lva-x11 && +if enabled vaapi ; then + enabled xlib && + check_lib "va/va.h va/va_x11.h" vaGetDisplay -lva -lva-x11 && enable vaapi_x11 + check_lib "va/va.h va/va_drm.h" vaGetDisplayDRM -lva -lva-drm && + enable vaapi_drm +fi + enabled vdpau && check_cpp_condition vdpau/vdpau.h "defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP" || disable vdpau enabled vdpau && enabled xlib && - check_func_headers "vdpau/vdpau.h vdpau/vdpau_x11.h" vdp_device_create_x11 -lvdpau && - prepend avconv_libs $($ldflags_filter "-lvdpau") && + check_lib "vdpau/vdpau.h vdpau/vdpau_x11.h" vdp_device_create_x11 -lvdpau && enable vdpau_x11 enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel" @@ -4751,6 +4863,10 @@ enabled neon_clobber_test && -Wl,--wrap,avcodec_encode_audio2 \ -Wl,--wrap,avcodec_encode_video2 \ -Wl,--wrap,avcodec_encode_subtitle \ + -Wl,--wrap,avcodec_send_packet \ + -Wl,--wrap,avcodec_receive_packet \ + -Wl,--wrap,avcodec_send_frame \ + -Wl,--wrap,avcodec_receive_frame \ -Wl,--wrap,avresample_convert || disable neon_clobber_test @@ -4762,25 +4878,34 @@ enabled xmm_clobber_test && -Wl,--wrap,avcodec_encode_audio2 \ -Wl,--wrap,avcodec_encode_video2 \ -Wl,--wrap,avcodec_encode_subtitle \ + -Wl,--wrap,avcodec_send_packet \ + -Wl,--wrap,avcodec_receive_packet \ + -Wl,--wrap,avcodec_send_frame \ + -Wl,--wrap,avcodec_receive_frame \ -Wl,--wrap,avresample_convert \ -Wl,--wrap,sws_scale || disable xmm_clobber_test -echo "X { local: *; };" > $TMPV -if test_ldflags -Wl,--version-script,$TMPV; then - append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver' -elif test_ldflags -Wl,-M,$TMPV; then - append SHFLAGS '-Wl,-M,\$(SUBDIR)lib\$(NAME).ver-sol2' -fi +check_ld < $TMPV + if test_ldflags -Wl,${version_script},$TMPV; then + append SHFLAGS '-Wl,${version_script},\$(SUBDIR)lib\$(NAME).ver' + check_cc <> $TMPH cp_if_changed $TMPH libavutil/avconfig.h +# generate the lists of enabled components +print_enabled_components(){ + file=$1 + struct_name=$2 + name=$3 + shift 3 + echo "static const $struct_name *$name[] = {" > $TMPH + for c in $*; do + enabled $c && printf " &ff_%s,\n" $c >> $TMPH + done + echo " NULL };" >> $TMPH + cp_if_changed $TMPH $file +} + +print_enabled_components libavcodec/bsf_list.c AVBitStreamFilter bitstream_filters $BSF_LIST +print_enabled_components libavformat/protocol_list.c URLProtocol url_protocols $PROTOCOL_LIST + test -n "$WARNINGS" && printf "\n$WARNINGS" # build pkg-config files