Skip to content

Commit

Permalink
wscript: specifically look for opus 1.4, as 1.5 have broken custom modes
Browse files Browse the repository at this point in the history
Link to GitHub issue: xiph/opus#374
  • Loading branch information
a1batross committed Dec 2, 2024
1 parent c39d2e2 commit 7eba5a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,9 @@ def configure(conf):
if conf.check_cfg(package=i[0], uselib_store=i[1], args='--cflags --libs', mandatory=False):
conf.env['HAVE_SYSTEM_%s' % i[0].upper()] = True

# search for opus 1.4 or higher, it has fixes for custom modes
if conf.check_cfg(package='opus', uselib_store='opus', args='opus >= 1.4 --cflags --libs', mandatory=False):
# search for opus 1.4 only, it has fixes for custom modes
# 1.5 breaks custom modes: https://github.com/xiph/opus/issues/374
if conf.check_cfg(package='opus', uselib_store='opus', args='opus = 1.4 --cflags --libs', mandatory=False):
# now try to link with export that only exists with CUSTOM_MODES defined
frag='''#include <opus_custom.h>
int main(void) { return !opus_custom_encoder_init((OpusCustomEncoder *)1, (const OpusCustomMode *)1, 1); }'''
Expand Down

0 comments on commit 7eba5a9

Please sign in to comment.