From a009307a3df6c7a46fe4e5a229970cea726a1f37 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 13 Sep 2022 06:44:20 +0200 Subject: [PATCH] Detect rubberband 3.0.0 --- wscript | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/wscript b/wscript index 922d5889d3..f69918b8fa 100644 --- a/wscript +++ b/wscript @@ -1177,6 +1177,23 @@ def configure(conf): autowaf.check_pkg(conf, 'vamp-hostsdk', uselib_store='VAMPHOSTSDK', atleast_version='2.1', mandatory=True) autowaf.check_pkg(conf, 'rubberband', uselib_store='RUBBERBAND', mandatory=True) + # we cannot rely on pkg-config - https://lists.linuxaudio.org/archives/linux-audio-dev/2022-July/038395.html + conf.check_cc( + features = 'cxx', + mandatory = False, + execute = False, + msg = 'Checking for rubberband >= 3.0.0', + use = 'RUBBERBAND', + define_name= 'HAVE_RUBBERBAND_3_0_0', + fragment = ''' +#include +#if RUBBERBAND_API_MAJOR_VERSION >= 2 && RUBBERBAND_API_MINOR_VERSION >= 7 +int main () { return 0; } +#else +#error +#endif +''') + have_rf64_riff_support = conf.check_cc(fragment = ''' #include int main () { int x = SFC_RF64_AUTO_DOWNGRADE; return 0; }