shithub: aubio

Download patch

ref: 1ba359ccc364a34b29b5e25f33f39ca6bebbb21f
parent: 60314193c914cfbc84cde61faeec17c8c81876fd
author: Paul Brossier <piem@piem.org>
date: Wed Dec 12 18:26:35 EST 2018

[waf] add flac detection

--- a/src/wscript_build
+++ b/src/wscript_build
@@ -12,6 +12,7 @@
 uselib += ['AVRESAMPLE']
 uselib += ['AVUTIL']
 uselib += ['VORBISENC']
+uselib += ['FLAC']
 uselib += ['BLAS']
 
 source = ctx.path.ant_glob('*.c **/*.c')
--- a/wscript
+++ b/wscript
@@ -69,6 +69,9 @@
     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')
@@ -438,6 +441,13 @@
                 args = '--cflags --libs',
                 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)