wscript: check if we find atlas/cblas.h
authorPaul Brossier <piem@piem.org>
Sun, 6 Sep 2015 08:46:31 +0000 (10:46 +0200)
committerPaul Brossier <piem@piem.org>
Sun, 6 Sep 2015 08:46:31 +0000 (10:46 +0200)
examples/wscript_build
src/wscript_build
tests/wscript_build
wscript

index 4a1ad39..2ef9709 100644 (file)
@@ -9,6 +9,7 @@ uselib += ['AVFORMAT']
 uselib += ['AVRESAMPLE']
 uselib += ['AVUTIL']
 uselib += ['JACK']
+uselib += ['BLAS']
 
 utils_source = ['utils.c', 'jackio.c']
 programs_source = ctx.path.ant_glob('*.c', excl = utils_source)
index a526671..a5030c3 100644 (file)
@@ -8,6 +8,7 @@ uselib += ['AVCODEC']
 uselib += ['AVFORMAT']
 uselib += ['AVRESAMPLE']
 uselib += ['AVUTIL']
+uselib += ['BLAS']
 
 # build each source files
 source = ctx.path.ant_glob('*.c **/*.c')
index 6aebad6..55dcbf2 100644 (file)
@@ -10,6 +10,7 @@ for target_name in ctx.path.ant_glob('src/**/*.c'):
     uselib += ['AVRESAMPLE']
     uselib += ['AVUTIL']
     uselib += ['JACK']
+    uselib += ['BLAS']
     includes = ['../src', '.']
     extra_source = []
 
diff --git a/wscript b/wscript
index 949fe7c..ff97de3 100644 (file)
--- a/wscript
+++ b/wscript
@@ -81,6 +81,9 @@ def options(ctx):
     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')
@@ -259,6 +262,12 @@ def configure(ctx):
     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):
         ctx.define('HAVE_MEMCPY_HACKS', 1)