mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
wscript: allow linking with system-wide opus 1.6.1 which has a fix for custom modes
This commit is contained in:
8
wscript
8
wscript
@@ -528,7 +528,13 @@ int main(int argc, char **argv) { return opus_tagcompare(argv[0], argv[1]); }'''
|
||||
|
||||
# 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):
|
||||
have_opus = conf.check_cfg(package='opus', uselib_store='opus', args=['opus = 1.4', '--cflags', '--libs'], mandatory=False)
|
||||
|
||||
# 1.6.1 fixes them again
|
||||
if not have_opus:
|
||||
have_opus = conf.check_cfg(package='opus', uselib_store='opus', args=['opus >= 1.6.1', '--cflags', '--libs'], mandatory=False)
|
||||
|
||||
if have_opus:
|
||||
# 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); }'''
|
||||
|
||||
Reference in New Issue
Block a user