Merge remote-tracking branch 'origin/dev-python/exam'
[wtk-overlay.git] / media-libs / aubio / files / aubio-9999-0002-wscript-Consolidate-fftw3-and-fftw3f-options.patch
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
8
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
11 this configuration?
12 ---
13  wscript | 31 ++++++++-----------------------
14  1 file changed, 8 insertions(+), 23 deletions(-)
15
16 diff --git a/wscript b/wscript
17 index ce6ee8b..4667fb9 100644
18 --- a/wscript
19 +++ b/wscript
20 @@ -36,17 +36,10 @@ def options(ctx):
21    ctx.add_option('--disable-double', dest='enable_double',
22        action='store_false',
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',
31        action='store_false',
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)
41  
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!')
50 -    else:
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)
55 -      else:
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
60 +    package = 'fftw3'
61 +    if not Options.options.enable_double:
62 +      package = 'fftw3f'
63 +    ctx.check_cfg(package = package, atleast_version = '3.0.0',
64 +        args = '--cflags --libs', mandatory = False)
65      ctx.define('HAVE_FFTW3', 1)
66    else:
67      # fftw disabled, use ooura
68 -- 
69 1.8.2
70