shithub: aubio

Download patch

ref: 3efb63178cb218bc56dfec9bc7e808aed8982f4c
parent: 6b84d815b7333e98b3b23ac0b80b9bd40648b93b
author: Paul Brossier <piem@piem.org>
date: Wed Dec 12 09:15:51 EST 2018

[waf] add vorbisenc detection

--- a/src/wscript_build
+++ b/src/wscript_build
@@ -11,6 +11,7 @@
 uselib += ['SWRESAMPLE']
 uselib += ['AVRESAMPLE']
 uselib += ['AVUTIL']
+uselib += ['VORBISENC']
 uselib += ['BLAS']
 
 source = ctx.path.ant_glob('*.c **/*.c')
--- a/wscript
+++ b/wscript
@@ -66,6 +66,9 @@
     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')
@@ -428,6 +431,13 @@
             elif 'HAVE_AVRESAMPLE' in ctx.env:
                 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)