modules: Check for opus custom functions in addition to headers

This commit is contained in:
WalkerGriggs 2023-11-10 09:57:53 -08:00
parent 3baead9b0b
commit 03b1d9589b
No known key found for this signature in database
GPG key ID: 3F59872EBAFDD222

View file

@ -218,8 +218,10 @@ endif
summary({'ffado-driver': build_module_ffado_driver}, bool_yn: true, section: 'Optional Modules')
opus_custom_h = cc.has_header('opus/opus_custom.h', dependencies: opus_dep)
opus_custom_lib = cc.has_function('opus_custom_encoder_ctl', dependencies: opus_dep)
# One would imagine that opus_dep is a requirement but for some reason it's not, so we need to manually check that
if opus_dep.found() and opus_custom_h
if opus_dep.found() and opus_custom_h and opus_custom_lib
opus_custom_dep = declare_dependency(compile_args: ['-DHAVE_OPUS_CUSTOM'], dependencies: opus_dep)
else
opus_custom_dep = dependency('', required: false)