From: Paul Brossier Date: Wed, 12 Dec 2018 22:26:35 +0000 (+0100) Subject: [waf] add flac detection X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=1ba359ccc364a34b29b5e25f33f39ca6bebbb21f;p=aubio.git [waf] add flac detection --- diff --git a/src/wscript_build b/src/wscript_build index 17790b67..57d26e72 100644 --- a/src/wscript_build +++ b/src/wscript_build @@ -12,6 +12,7 @@ uselib += ['SWRESAMPLE'] uselib += ['AVRESAMPLE'] uselib += ['AVUTIL'] uselib += ['VORBISENC'] +uselib += ['FLAC'] uselib += ['BLAS'] source = ctx.path.ant_glob('*.c **/*.c') diff --git a/wscript b/wscript index 52bfe3b6..091a4dc3 100644 --- a/wscript +++ b/wscript @@ -69,6 +69,9 @@ def options(ctx): add_option_enable_disable(ctx, 'vorbis', default = None, help_str = 'compile with libvorbis (auto)', help_disable_str = 'disable libvorbis') + add_option_enable_disable(ctx, 'flac', default = None, + help_str = 'compile with libFLAC (auto)', + help_disable_str = 'disable libflac') add_option_enable_disable(ctx, 'samplerate', default = None, help_str = 'compile with samplerate (auto)', help_disable_str = 'disable samplerate') @@ -439,6 +442,13 @@ def configure(ctx): uselib_store = 'VORBISENC', mandatory = ctx.options.enable_vorbis) + # check for flac + if (ctx.options.enable_flac != False): + ctx.check_cfg(package = 'flac', + args = '--cflags --libs', + uselib_store = 'FLAC', + mandatory = ctx.options.enable_flac) + if (ctx.options.enable_wavread != False): ctx.define('HAVE_WAVREAD', 1) ctx.msg('Checking if using source_wavread',