1 From aa9e6df149c79d53ed8a5f2c1910cada8bae325e Mon Sep 17 00:00:00 2001
2 Message-Id: <aa9e6df149c79d53ed8a5f2c1910cada8bae325e.1366316250.git.wking@tremily.us>
3 In-Reply-To: <427f2798b99922faa0c50110f50e16e031c0ca6d.1366316250.git.wking@tremily.us>
4 References: <427f2798b99922faa0c50110f50e16e031c0ca6d.1366316250.git.wking@tremily.us>
5 From: "W. Trevor King" <wking@tremily.us>
6 Date: Thu, 18 Apr 2013 10:23:18 -0400
7 Subject: [PATCH 2/3] wscript: Consolidate fftw3 and fftw3f options
9 I find it very unlikely that users would choose to link aubio and FFTW
10 libraries with different precision. Is it actually worth supporting
13 wscript | 31 ++++++++-----------------------
14 1 file changed, 8 insertions(+), 23 deletions(-)
16 diff --git a/wscript b/wscript
17 index ce6ee8b..4667fb9 100644
20 @@ -36,17 +36,10 @@ def options(ctx):
21 ctx.add_option('--disable-double', dest='enable_double',
23 help='compile aubio in single precision mode')
24 - ctx.add_option('--enable-fftw3f', action='store_true', default=False,
25 - help='compile with fftw3f instead of ooura (recommended)')
26 - ctx.add_option('--disable-fftw3f', dest='enable_fftw3f',
27 - ctx.add_option('--enable-fftw3', action='store_true', default=None,
28 + ctx.add_option('--enable-fftw3', action='store_true', default=False,
29 help='compile with fftw3 instead of ooura (recommended)')
30 ctx.add_option('--disable-fftw3', dest='enable_fftw3',
32 - help='compile with ooura instead of fftw3f')
33 - ctx.add_option('--enable-fftw3', action='store_true', default=False,
34 - help='compile with fftw3 instead of ooura (recommended in double precision)')
35 - ctx.add_option('--disable-fftw3', dest='enable-fftw3', action='store_false'.
36 help='compile with ooura instead of fftw3')
37 ctx.add_option('--enable-complex', action='store_true', default=False,
38 help='compile with C99 complex')
39 @@ -146,21 +139,13 @@ def configure(ctx):
40 ctx.define('HAVE_AUBIO_DOUBLE', 0)
42 # optional dependancies using pkg-config
43 - if (Options.options.enable_fftw3 != False or Options.options.enable_fftw3f != False):
44 - # one of fftwf or fftw3f
45 - if (Options.options.enable_fftw3f != False):
46 - ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',
47 - args = '--cflags --libs', mandatory = False)
48 - if (Options.options.enable_double == True):
49 - ctx.msg('Warning', 'fftw3f enabled, but aubio compiled in double precision!')
51 - # fftw3f not enabled, take most sensible one according to enable_double
52 - if (Options.options.enable_double == True):
53 - ctx.check_cfg(package = 'fftw3', atleast_version = '3.0.0',
54 - args = '--cflags --libs', mandatory = False)
56 - ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',
57 - args = '--cflags --libs', mandatory = False)
58 + if (Options.options.enable_fftw3 != False):
59 + # fftw3f not enabled, take most sensible one according to enable_double
61 + if not Options.options.enable_double:
63 + ctx.check_cfg(package = package, atleast_version = '3.0.0',
64 + args = '--cflags --libs', mandatory = False)
65 ctx.define('HAVE_FFTW3', 1)
67 # fftw disabled, use ooura