From aa9e6df149c79d53ed8a5f2c1910cada8bae325e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 18 Apr 2013 10:23:18 -0400 Subject: [PATCH] wscript: Consolidate fftw3 and fftw3f options I find it very unlikely that users would choose to link aubio and FFTW libraries with different precision. Is it actually worth supporting this configuration? --- wscript | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/wscript b/wscript index ce6ee8bf..4667fb90 100644 --- a/wscript +++ b/wscript @@ -36,17 +36,10 @@ def options(ctx): ctx.add_option('--disable-double', dest='enable_double', action='store_false', help='compile aubio in single precision mode') - ctx.add_option('--enable-fftw3f', action='store_true', default=False, - help='compile with fftw3f instead of ooura (recommended)') - ctx.add_option('--disable-fftw3f', dest='enable_fftw3f', - ctx.add_option('--enable-fftw3', action='store_true', default=None, + ctx.add_option('--enable-fftw3', action='store_true', default=False, help='compile with fftw3 instead of ooura (recommended)') ctx.add_option('--disable-fftw3', dest='enable_fftw3', action='store_false', - help='compile with ooura instead of fftw3f') - ctx.add_option('--enable-fftw3', action='store_true', default=False, - help='compile with fftw3 instead of ooura (recommended in double precision)') - ctx.add_option('--disable-fftw3', dest='enable-fftw3', action='store_false'. help='compile with ooura instead of fftw3') ctx.add_option('--enable-complex', action='store_true', default=False, help='compile with C99 complex') @@ -146,21 +139,13 @@ def configure(ctx): ctx.define('HAVE_AUBIO_DOUBLE', 0) # optional dependancies using pkg-config - if (Options.options.enable_fftw3 != False or Options.options.enable_fftw3f != False): - # one of fftwf or fftw3f - if (Options.options.enable_fftw3f != False): - ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0', - args = '--cflags --libs', mandatory = False) - if (Options.options.enable_double == True): - ctx.msg('Warning', 'fftw3f enabled, but aubio compiled in double precision!') - else: - # fftw3f not enabled, take most sensible one according to enable_double - if (Options.options.enable_double == True): - ctx.check_cfg(package = 'fftw3', atleast_version = '3.0.0', - args = '--cflags --libs', mandatory = False) - else: - ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0', - args = '--cflags --libs', mandatory = False) + if (Options.options.enable_fftw3 != False): + # fftw3f not enabled, take most sensible one according to enable_double + package = 'fftw3' + if not Options.options.enable_double: + package = 'fftw3f' + ctx.check_cfg(package = package, atleast_version = '3.0.0', + args = '--cflags --libs', mandatory = False) ctx.define('HAVE_FFTW3', 1) else: # fftw disabled, use ooura -- 2.26.2