set_sanitized "${name}_extralibs" $pkg_libs
}
+test_pkg_config_cpp(){
+ log test_pkg_config_cpp "$@"
+ name="$1"
+ pkg_version="$2"
+ pkg="${2%% *}"
+ headers="$3"
+ cond="$4"
+ shift 4
+ disable $name
+ test_cmd $pkg_config --exists --print-errors $pkg_version || return
+ pkg_cflags=$($pkg_config --cflags $pkg_config_flags $pkg)
+ pkg_incdir=$($pkg_config --variable=includedir $pkg_config_flags $pkg)
+ test_cpp_condition "$pkg_incdir/$headers" "$cond" "$@" &&
+ enable $name &&
+ set_sanitized "${name}_cflags" $pkg_cflags
+}
+
check_pkg_config(){
log check_pkg_config "$@"
name="$1"
eval add_cflags \$${name}_cflags
}
+check_pkg_config_cpp(){
+ log check_pkg_config_cpp "$@"
+ name="$1"
+ test_pkg_config_cpp "$@" &&
+ eval add_cflags \$${name}_cflags
+}
+
test_exec(){
test_ld "cc" "$@" && { enabled cross_compile || $TMPE >> $logfile 2>&1; }
}
check_pkg_config "$@" || die "ERROR: $pkg_version not found using pkg-config$pkg_config_fail_message"
}
+require_pkg_config_cpp(){
+ log require_pkg_config_cpp "$@"
+ pkg_version="$2"
+ check_pkg_config_cpp "$@" || die "ERROR: $pkg_version not found using pkg-config$pkg_config_fail_message"
+}
+
test_host_cc(){
log test_host_cc "$@"
cat > $TMPC
vaapi_x11_deps="xlib"
videotoolbox_hwaccel_deps="videotoolbox pthreads"
videotoolbox_hwaccel_extralibs="-framework QuartzCore"
+vulkan_deps_any="libdl LoadLibrary"
xvmc_deps="X11_extensions_XvMClib_h"
av1_d3d11va_hwaccel_deps="d3d11va DXVA_PicParams_AV1"
atempo_filter_deps="avcodec"
atempo_filter_select="rdft"
avgblur_opencl_filter_deps="opencl"
-avgblur_vulkan_filter_deps="vulkan libglslang"
+avgblur_vulkan_filter_deps="vulkan_lib libglslang"
azmq_filter_deps="libzmq"
blackframe_filter_deps="gpl"
bm3d_filter_deps="avcodec"
boxblur_filter_deps="gpl"
boxblur_opencl_filter_deps="opencl gpl"
bs2b_filter_deps="libbs2b"
-chromaber_vulkan_filter_deps="vulkan libglslang"
+chromaber_vulkan_filter_deps="vulkan_lib libglslang"
colorkey_opencl_filter_deps="opencl"
colormatrix_filter_deps="gpl"
convolution_opencl_filter_deps="opencl"
overlay_opencl_filter_deps="opencl"
overlay_qsv_filter_deps="libmfx"
overlay_qsv_filter_select="qsvvpp"
-overlay_vulkan_filter_deps="vulkan libglslang"
+overlay_vulkan_filter_deps="vulkan_lib libglslang"
owdenoise_filter_deps="gpl"
pad_opencl_filter_deps="opencl"
pan_filter_deps="swresample"
zoompan_filter_deps="swscale"
zscale_filter_deps="libzimg const_nan"
scale_vaapi_filter_deps="vaapi"
-scale_vulkan_filter_deps="vulkan libglslang"
+scale_vulkan_filter_deps="vulkan_lib libglslang"
vpp_qsv_filter_deps="libmfx"
vpp_qsv_filter_select="qsvvpp"
xfade_opencl_filter_deps="opencl"
find_filters_extern(){
file=$source_path/$1
- sed -n 's/^extern AVFilter ff_[avfsinkrc]\{2,5\}_\([[:alnum:]_]\{1,\}\);/\1_filter/p' $file
+ sed -n 's/^extern const AVFilter ff_[avfsinkrc]\{2,5\}_\([[:alnum:]_]\{1,\}\);/\1_filter/p' $file
}
FILTER_LIST=$(find_filters_extern libavfilter/allfilters.c)
enabled crystalhd && check_lib crystalhd "stdint.h libcrystalhd/libcrystalhd_if.h" DtsCrystalHDVersion -lcrystalhd
-enabled vulkan &&
- require_pkg_config vulkan "vulkan >= 1.1.97" "vulkan/vulkan.h" vkCreateInstance
+if enabled vulkan; then
+ require_pkg_config_cpp vulkan "vulkan >= 1.1.97" "vulkan/vulkan.h" "defined VK_VERSION_1_1" ||
+ require_cpp_condition vulkan "vulkan/vulkan.h" "defined VK_VERSION_1_1"
+ # vulkan_lib should be removed once glslang filters are updated
+ check_pkg_config vulkan_lib "vulkan >= 1.1.97" "vulkan/vulkan.h" vkCreateInstance
+fi
if enabled x86; then
case $target_os in
# full_filter_name_foo=vf_foo
# full_filter_name_bar=asrc_bar
# ...
-eval "$(sed -n "s/^extern AVFilter ff_\([avfsinkrc]\{2,5\}\)_\(.*\);/full_filter_name_\2=\1_\2/p" $source_path/libavfilter/allfilters.c)"
+eval "$(sed -n "s/^extern const AVFilter ff_\([avfsinkrc]\{2,5\}\)_\(.*\);/full_filter_name_\2=\1_\2/p" $source_path/libavfilter/allfilters.c)"
# generate the lists of enabled components
print_enabled_components(){