append CFLAGS $($cflags_filter "$@")
}
+add_cflags_headers(){
+ append CFLAGS_HEADERS $($cflags_filter "$@")
+}
+
add_asflags(){
append ASFLAGS $($asflags_filter "$@")
}
pkg_cflags=$($pkg_config --cflags $pkg_config_flags $pkg)
pkg_libs=$($pkg_config --libs $pkg_config_flags $pkg)
check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" &&
- set_safe "${pkg}_cflags" $pkg_cflags &&
- set_safe "${pkg}_libs" $pkg_libs
+ set_safe "${pkg}_cflags" $pkg_cflags &&
+ set_safe "${pkg}_extralibs" $pkg_libs
}
check_exec(){
pkg="${1%% *}"
check_pkg_config "$@" || die "ERROR: $pkg_version not found"
add_cflags $(get_safe "${pkg}_cflags")
- add_extralibs $(get_safe "${pkg}_libs")
+ add_extralibs $(get_safe "${pkg}_extralibs")
}
hostcc_e(){
h264parse
h264pred
h264qpel
+ hevc_ps
hpeldsp
huffman
huffyuvdsp
extra_version
host_cc
host_cflags
+ host_extralibs
host_ld
host_ldflags
- host_libs
host_os
ld
logfile
faandct_deps="faan fdctdsp"
faanidct_deps="faan idctdsp"
h264dsp_select="startcode"
+hevc_ps_select="golomb"
intrax8_select="blockdsp idctdsp"
mdct_select="fft"
rdft_select="fft"
eatgq_decoder_select="aandcttables idctdsp"
eatqi_decoder_select="aandcttables blockdsp bswapdsp idctdsp"
exr_decoder_deps="zlib"
-ffv1_decoder_select="golomb rangecoder"
+ffv1_decoder_select="rangecoder"
ffv1_encoder_select="rangecoder"
ffvhuff_decoder_select="huffyuv_decoder"
ffvhuff_encoder_select="huffyuv_encoder"
fic_decoder_select="golomb"
-flac_decoder_select="flacdsp golomb"
-flac_encoder_select="bswapdsp flacdsp golomb lpc"
+flac_decoder_select="flacdsp"
+flac_encoder_select="bswapdsp flacdsp lpc"
flashsv_decoder_deps="zlib"
flashsv_encoder_deps="zlib"
flashsv2_decoder_deps="zlib"
hap_decoder_select="snappy texturedsp"
hap_encoder_deps="libsnappy"
hap_encoder_select="texturedspenc"
-hevc_decoder_select="bswapdsp cabac golomb videodsp"
+hevc_decoder_select="bswapdsp cabac hevc_ps videodsp"
huffyuv_decoder_select="bswapdsp huffyuvdsp"
huffyuv_encoder_select="bswapdsp huffman huffyuvencdsp"
iac_decoder_select="imc_decoder"
indeo4_decoder_select="ividsp"
indeo5_decoder_select="ividsp"
interplay_video_decoder_select="hpeldsp"
-jpegls_decoder_select="golomb mjpeg_decoder"
-jpegls_encoder_select="golomb"
+jpegls_decoder_select="mjpeg_decoder"
jv_decoder_select="blockdsp"
lagarith_decoder_select="huffyuvdsp"
ljpeg_encoder_select="aandcttables idctdsp jpegtables"
-loco_decoder_select="golomb"
magicyuv_decoder_select="huffyuvdsp"
mdec_decoder_select="blockdsp idctdsp mpegvideo"
metasound_decoder_select="lsp mdct sinewin"
rv30_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpeg_er mpegvideo rv34dsp videodsp"
rv40_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpeg_er mpegvideo rv34dsp videodsp"
screenpresso_decoder_deps="zlib"
-shorten_decoder_select="golomb"
sipr_decoder_select="lsp"
sp5x_decoder_select="mjpeg_decoder"
svq1_decoder_select="hpeldsp"
vp6f_decoder_select="vp6_decoder"
vp7_decoder_select="h264pred videodsp vp8dsp"
vp8_decoder_select="h264pred videodsp vp8dsp"
-vp9_decoder_select="videodsp"
+vp9_decoder_select="videodsp vp9_superframe_split_bsf"
webp_decoder_select="vp8_decoder"
wmapro_decoder_select="mdct sinewin wma_freqs"
wmav1_decoder_select="mdct sinewin wma_freqs"
# hardware accelerators
d3d11va_deps="d3d11_h dxva_h ID3D11VideoDecoder"
dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode"
-vaapi_deps="va_va_h"
+dxva2_lib_deps="dxva2"
vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads"
vda_extralibs="-framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore"
-vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
h263_vaapi_hwaccel_deps="vaapi"
h263_vaapi_hwaccel_select="h263_decoder"
h264_vaapi_encoder_select="vaapi_encode golomb"
hevc_nvenc_encoder_deps="nvenc"
hevc_qsv_decoder_deps="libmfx"
-hevc_qsv_encoder_deps="libmfx"
hevc_qsv_decoder_select="hevc_mp4toannexb_bsf hevc_parser hevc_qsv_hwaccel qsvdec"
-hevc_qsv_encoder_select="qsvenc"
+hevc_qsv_encoder_deps="libmfx"
+hevc_qsv_encoder_select="hevc_ps qsvenc"
hevc_vaapi_encoder_deps="VAEncPictureParameterBufferHEVC"
hevc_vaapi_encoder_select="vaapi_encode golomb"
mjpeg_vaapi_encoder_deps="VAEncPictureParameterBufferJPEG"
vp8_qsv_decoder_deps="libmfx"
vp8_qsv_decoder_select="qsvdec vp8_qsv_hwaccel vp8_parser"
-nvenc_h264_encoder_deps="nvenc"
-nvenc_hevc_encoder_deps="nvenc"
+nvenc_h264_encoder_select="h264_nvenc_encoder"
+nvenc_hevc_encoder_select="hevc_nvenc_encoder"
# parsers
h264_parser_select="golomb h264dsp h264parse"
-hevc_parser_select="golomb"
+hevc_parser_select="hevc_ps"
mpegaudio_parser_select="mpegaudioheader"
mpegvideo_parser_select="mpegvideo"
mpeg4video_parser_select="error_resilience h263dsp mpegvideo qpeldsp"
xwma_demuxer_select="riffdec"
# indevs / outdevs
-alsa_indev_deps="alsa_asoundlib_h snd_pcm_htimestamp"
-alsa_outdev_deps="alsa_asoundlib_h"
+alsa_indev_deps="alsa"
+alsa_outdev_deps="alsa"
avfoundation_indev_deps="AVFoundation_AVFoundation_h objc_arc pthreads"
avfoundation_indev_extralibs="-framework Foundation -framework AVFoundation -framework CoreVideo -framework CoreMedia"
bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
dv1394_indev_deps="dv1394"
dv1394_indev_select="dv_demuxer"
fbdev_indev_deps="linux_fb_h"
-jack_indev_deps="jack_jack_h"
+jack_indev_deps="jack"
jack_indev_deps_any="sem_timedwait dispatch_dispatch_h"
libcdio_indev_deps="libcdio"
libdc1394_indev_deps="libdc1394"
oss_indev_deps_any="soundcard_h sys_soundcard_h"
oss_outdev_deps_any="soundcard_h sys_soundcard_h"
pulse_indev_deps="libpulse"
-sndio_indev_deps="sndio_h"
-sndio_outdev_deps="sndio_h"
+sndio_indev_deps="sndio"
+sndio_outdev_deps="sndio"
v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h"
vfwcap_indev_deps="capCreateCaptureWindow vfwcap_defines"
vfwcap_indev_extralibs="-lavicap32"
bs2b_filter_deps="libbs2b"
cropdetect_filter_deps="gpl"
deinterlace_qsv_filter_deps="libmfx"
+deinterlace_vaapi_filter_deps="vaapi"
delogo_filter_deps="gpl"
drawtext_filter_deps="libfreetype"
frei0r_filter_deps="frei0r dlopen"
# libraries, in linking order
avcodec_deps="avutil"
+avcodec_select="null_bsf"
avdevice_deps="avformat avcodec avutil"
avfilter_deps="avutil"
avformat_deps="avcodec avutil"
fps_filter null_filter resample_filter scale_filter
trim_filter"
avplay_deps="avcodec avfilter avformat avresample sdl"
-avplay_libs='$sdl_libs'
+avplay_extralibs='$sdl_extralibs'
avplay_select="rdft format_filter transpose_filter hflip_filter vflip_filter"
avprobe_deps="avcodec avformat"
HOSTCC_O='-o $@'
HOSTLD_O='-o $@'
-host_libs='-lm'
+host_extralibs='-lm'
host_cflags_filter=echo
host_ldflags_filter=echo
;;
*-tsan)
cc_default="${toolchain%-tsan}"
- add_cflags -fsanitize=thread -pie
+ add_cflags -fsanitize=thread -fPIE
add_ldflags -fsanitize=thread -pie
case "$toolchain" in
gcc-tsan)
haiku)
prefix_default="/boot/common"
network_extralibs="-lnetwork"
- host_libs=
+ host_extralibs=
;;
sunos)
SHFLAGS='-shared -Wl,-h,$$(@F)'
# MinGW headers can be installed on Cygwin, so check for newlib first.
elif check_${pfx}cpp_condition newlib.h "defined _NEWLIB_VERSION"; then
eval ${pfx}libc_type=newlib
- add_${pfx}cppflags -U__STRICT_ANSI__
+ add_${pfx}cppflags -U__STRICT_ANSI__ -D_XOPEN_SOURCE=600
# MinGW64 is backwards compatible with MinGW32, so check for it first.
elif check_${pfx}cpp_condition _mingw.h "defined __MINGW64_VERSION_MAJOR"; then
eval ${pfx}libc_type=mingw64
check_func mmap
check_func mprotect
# Solaris has nanosleep in -lrt, OpenSolaris no longer needs that
-check_func_headers time.h nanosleep || { check_func_headers time.h nanosleep -lrt && add_extralibs -lrt; }
+check_func_headers time.h nanosleep || check_lib time.h nanosleep -lrt
check_func sched_getaffinity
check_func setrlimit
check_func strerror_r
check_func_headers io.h setmode
check_func_headers stdlib.h getenv
-check_func_headers windows.h CoTaskMemFree -lole32
check_func_headers windows.h GetProcessAffinityMask
check_func_headers windows.h GetProcessTimes
check_func_headers windows.h GetSystemTimeAsFileTime
check_header sys/un.h
check_header unistd.h
check_header valgrind/valgrind.h
-check_header vdpau/vdpau.h
-check_header vdpau/vdpau_x11.h
check_header VideoDecodeAcceleration/VDADecoder.h
check_header windows.h
check_header X11/extensions/XvMClib.h
# do this before the optional library checks as some of them require pthreads
if ! disabled pthreads && ! enabled w32threads; then
enable pthreads
- if check_func pthread_join -pthread; then
+ if check_lib pthread.h pthread_join -pthread; then
add_cflags -pthread
- add_extralibs -pthread
- elif check_func pthread_join -pthreads; then
+ elif check_lib pthread.h pthread_join -pthreads; then
add_cflags -pthreads
- add_extralibs -pthreads
- elif check_func pthread_join -lpthreadGC2; then
- add_extralibs -lpthreadGC2
+ elif check_lib pthread.h pthread_join -lpthreadGC2; then
+ :
elif check_lib pthread.h pthread_join -lpthread; then
:
elif ! check_func pthread_join; then
# these are off by default, so fail if requested and not available
enabled avisynth && { check_header avisynth/avisynth_c.h || die "ERROR: avisynth/avisynth_c.h header not found"; }
enabled avxsynth && require avxsynth "avxsynth/avxsynth_c.h dlfcn.h" dlopen -ldl
-enabled cuda && check_lib cuda.h cuInit -lcuda
+enabled cuda && require cuda cuda.h cuInit -lcuda
enabled frei0r && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
enabled gnutls && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
enabled libbs2b && require_pkg_config libbs2b bs2b.h bs2b_open
enabled omx && { 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; }||
+ add_cflags $openssl_cflags && add_extralibs $openssl_extralibs; } ||
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
check_header dev/video/bktr/ioctl_bt848.h; } ||
check_header dev/ic/bt8xx.h
-check_header sndio.h
check_header sys/soundcard.h
check_header soundcard.h
} && enable libxcb_xfixes
add_cflags "$xcb_shape_cflags $xcb_shm_cflags $xcb_xfixes_cflags"
- add_extralibs "$xcb_shape_libs $xcb_shm_libs $xcb_xfixes_libs"
+ add_extralibs "$xcb_shape_extralibs $xcb_shm_extralibs $xcb_xfixes_extralibs"
fi
+enabled dxva2 &&
+ check_lib windows.h CoTaskMemFree -lole32 &&
+ enable dxva2_lib
+
enabled vaapi && require vaapi va/va.h vaInitialize -lva
enabled vaapi &&
check_disable_warning_headers(){
warning_flag=-W${1#-Wno-}
- test_cflags $warning_flag && append cflags_headers $1
+ test_cflags $warning_flag && add_cflags_headers $1
}
check_disable_warning_headers -Wno-deprecated-declarations
$HAVE_LIST \
$ALL_COMPONENTS \
-enabled_all dxva2 CoTaskMemFree &&
- prepend avconv_libs $($ldflags_filter "-lole32") &&
- enable dxva2_lib
-
map 'enabled $v && intrinsics=${v#intrinsics_}' $INTRINSICS_LIST
for thread in $THREADS_LIST; do
HOSTCPPFLAGS=$host_cppflags
HOSTEXESUF=$HOSTEXESUF
HOSTLDFLAGS=$host_ldflags
-HOSTLIBS=$host_libs
+HOSTEXTRALIBS=$host_extralibs
DEPHOSTCC=$host_cc
DEPHOSTCCFLAGS=$DEPHOSTCCFLAGS \$(HOSTCCFLAGS)
HOSTCCDEP=$HOSTCCDEP
TARGET_PATH=$target_path
TARGET_SAMPLES=${target_samples:-\$(SAMPLES)}
CFLAGS-avplay=$sdl_cflags
-CFLAGS_HEADERS=$cflags_headers
+CFLAGS_HEADERS=$CFLAGS_HEADERS
ZLIB=$($ldflags_filter -lz)
LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD
EXTRALIBS=$extralibs
map 'eval echo "${v}_FFLIBS=\$${v}_deps" >> config.mak' $LIBRARY_LIST
-print_program_libs(){
- eval "program_libs=\$${1}_libs"
- eval echo "LIBS-${1}=${program_libs}" >> config.mak
+print_program_extralibs(){
+ eval "program_extralibs=\$${1}_extralibs"
+ eval echo "EXTRALIBS-${1}=${program_extralibs}" >> config.mak
}
-map 'print_program_libs $v' $PROGRAM_LIST
+map 'print_program_extralibs $v' $PROGRAM_LIST
cat > $TMPH <<EOF
/* Automatically generated by configure - do not modify! */