From e4cc63a6dc231a8a2717a2e0f9b1be1603b2b1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikl=C4=81vs=20Ko=C4=BCes=C5=86ikovs?= <89q1r14hd@relay.firefox.com> Date: Mon, 26 Jun 2023 16:35:01 +0300 Subject: [PATCH] src/modules/meson: ensure Opus libs were actually found, too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The old way fails, if a distro has the header but not the library, which can happen on at least Gentoo with multilib deployments, where the shared header is present but non-native libraries might not. This could still fail, if a distro had some but not all libraries for some architectures but hopefully no one did that. In that case, a compile test would likely be required via cc.check_header() instead but let's try the faster fix first. Reported-by: Sam James Thanks-to: Barnabás Pőcze Thanks-to: Xavier Claessens Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com> --- src/modules/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/meson.build b/src/modules/meson.build index 342bd697b..970e04db9 100644 --- a/src/modules/meson.build +++ b/src/modules/meson.build @@ -203,7 +203,8 @@ 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) -if opus_custom_h +# 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 opus_custom_dep = declare_dependency(compile_args: ['-DHAVE_OPUS_CUSTOM'], dependencies: opus_dep) else opus_custom_dep = dependency('', required: false)