shithub: aubio

Download patch

ref: f0ce36a16a6dfab2f181820447c4707a267f88fb
parent: 827267b981f8998c47f2da50dd80f91d59ec5d1b
author: Paul Brossier <piem@piem.org>
date: Sun Sep 6 06:46:31 EDT 2015

wscript: check if we find atlas/cblas.h

--- a/examples/wscript_build
+++ b/examples/wscript_build
@@ -9,6 +9,7 @@
 uselib += ['AVRESAMPLE']
 uselib += ['AVUTIL']
 uselib += ['JACK']
+uselib += ['BLAS']
 
 utils_source = ['utils.c', 'jackio.c']
 programs_source = ctx.path.ant_glob('*.c', excl = utils_source)
--- a/src/wscript_build
+++ b/src/wscript_build
@@ -8,6 +8,7 @@
 uselib += ['AVFORMAT']
 uselib += ['AVRESAMPLE']
 uselib += ['AVUTIL']
+uselib += ['BLAS']
 
 # build each source files
 source = ctx.path.ant_glob('*.c **/*.c')
--- a/tests/wscript_build
+++ b/tests/wscript_build
@@ -10,6 +10,7 @@
     uselib += ['AVRESAMPLE']
     uselib += ['AVUTIL']
     uselib += ['JACK']
+    uselib += ['BLAS']
     includes = ['../src', '.']
     extra_source = []
 
--- a/wscript
+++ b/wscript
@@ -81,6 +81,9 @@
     add_option_enable_disable(ctx, 'apple-audio', default = None,
             help_str = 'use CoreFoundation (darwin only) (auto)',
             help_disable_str = 'do not use CoreFoundation framework')
+    add_option_enable_disable(ctx, 'atlas', default = None,
+            help_str = 'use Atlas library (auto)',
+            help_disable_str = 'do not use Atlas library')
 
     ctx.add_option('--with-target-platform', type='string',
             help='set target platform for cross-compilation', dest='target_platform')
@@ -258,6 +261,12 @@
 
     ctx.define('HAVE_WAVREAD', 1)
     ctx.define('HAVE_WAVWRITE', 1)
+
+    # use ATLAS
+    if (ctx.options.enable_atlas != False):
+        ctx.check(header_name = 'atlas/cblas.h', mandatory = ctx.options.enable_atlas)
+        #ctx.check(lib = 'lapack', uselib_store = 'LAPACK', mandatory = ctx.options.enable_atlas)
+        ctx.check(lib = 'cblas', uselib_store = 'BLAS', mandatory = ctx.options.enable_atlas)
 
     # use memcpy hacks
     if (ctx.options.enable_memcpy == True):