ref: 06d30f9c3cbd7eed26f63b128082ca9a4e288b29
parent: c423c3db7ef97947bec4b652c7224ca7da12f279
author: Paul Brossier <piem@piem.org>
date: Fri Sep 25 00:16:45 EDT 2009
wscript: add option to switch from single to double precision
--- a/wscript
+++ b/wscript
@@ -18,6 +18,8 @@
pass
def set_options(opt):
+ opt.add_option('--enable-double', action='store_true', default=False,
+ help='compile aubio in double precision mode')
opt.add_option('--disable-fftw3f', action='store_true', default=False,
help='compile with fftw3 instead of fftw3f')
opt.add_option('--disable-complex', action='store_true', default=False,
@@ -66,13 +68,24 @@
conf.check_cfg(package = 'samplerate', atleast_version = '0.0.15',
args = '--cflags --libs')
+ # double precision mode
+ if (Options.options.enable_double == True):
+ conf.define('HAVE_AUBIO_DOUBLE', 1)
+ else:
+ conf.define('HAVE_AUBIO_DOUBLE', 0)
+
# one of fftwf or fftw3f
if (Options.options.disable_fftw3f == True):
conf.check_cfg(package = 'fftw3', atleast_version = '3.0.0',
- args = '--cflags --libs')
+ args = '--cflags --libs')
else:
- conf.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',
- args = '--cflags --libs')
+ # fftw3f not disabled, take most sensible one according to enable_double
+ if (Options.options.enable_double == True):
+ conf.check_cfg(package = 'fftw3', atleast_version = '3.0.0',
+ args = '--cflags --libs')
+ else:
+ conf.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',
+ args = '--cflags --libs')
# optional dependancies
if (Options.options.disable_jack == False):