From: Paul Brossier Date: Wed, 12 Dec 2018 13:15:51 +0000 (+0100) Subject: [waf] add vorbisenc detection X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=3efb63178cb218bc56dfec9bc7e808aed8982f4c;p=aubio.git [waf] add vorbisenc detection --- diff --git a/src/wscript_build b/src/wscript_build index 895c191f..17790b67 100644 --- a/src/wscript_build +++ b/src/wscript_build @@ -11,6 +11,7 @@ uselib += ['AVFORMAT'] uselib += ['SWRESAMPLE'] uselib += ['AVRESAMPLE'] uselib += ['AVUTIL'] +uselib += ['VORBISENC'] uselib += ['BLAS'] source = ctx.path.ant_glob('*.c **/*.c') diff --git a/wscript b/wscript index 86208cdf..52bfe3b6 100644 --- a/wscript +++ b/wscript @@ -66,6 +66,9 @@ def options(ctx): add_option_enable_disable(ctx, 'avcodec', default = None, help_str = 'compile with libavcodec (auto)', help_disable_str = 'disable libavcodec') + add_option_enable_disable(ctx, 'vorbis', default = None, + help_str = 'compile with libvorbis (auto)', + help_disable_str = 'disable libvorbis') add_option_enable_disable(ctx, 'samplerate', default = None, help_str = 'compile with samplerate (auto)', help_disable_str = 'disable samplerate') @@ -429,6 +432,13 @@ def configure(ctx): ctx.define('HAVE_AVRESAMPLE', 1) ctx.define('HAVE_LIBAV', 1) + # check for vorbisenc + if (ctx.options.enable_vorbis != False): + ctx.check_cfg(package = 'vorbisenc', + args = '--cflags --libs', + uselib_store = 'VORBISENC', + mandatory = ctx.options.enable_vorbis) + if (ctx.options.enable_wavread != False): ctx.define('HAVE_WAVREAD', 1) ctx.msg('Checking if using source_wavread',