If the user says they want to compile aubio with $x enabled, it should
be a critical failure if aubio can't do that. If the user only wants
to compile aubio with $x enabled if it's possible, then they shouldn't
be setting `--enable-$x`. With this change, aubio defaults to
"include $x if we find it", which the user can override with either
--enable-$x or --disable-$x.
ctx.add_option('--disable-double', dest='enable_double',
action='store_false',
help='compile aubio in single precision mode')
ctx.add_option('--disable-double', dest='enable_double',
action='store_false',
help='compile aubio in single precision mode')
- ctx.add_option('--enable-fftw3', action='store_true', default=False,
+ ctx.add_option('--enable-fftw3', action='store_true', default=None,
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 fftw3')
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 fftw3')
- ctx.add_option('--enable-complex', action='store_true', default=False,
+ ctx.add_option('--enable-complex', action='store_true', default=None,
help='compile with C99 complex')
ctx.add_option('--disable-complex', dest='enable_complex',
action='store_false',
help='compile with C99 complex')
ctx.add_option('--disable-complex', dest='enable_complex',
action='store_false',
# check dependencies
if (Options.options.enable_sndfile != False):
ctx.check_cfg(package = 'sndfile', atleast_version = '1.0.4',
# check dependencies
if (Options.options.enable_sndfile != False):
ctx.check_cfg(package = 'sndfile', atleast_version = '1.0.4',
- args = '--cflags --libs', mandatory = False)
+ args = '--cflags --libs', mandatory = Options.options.enable_sndfile)
if (Options.options.enable_samplerate != False):
ctx.check_cfg(package = 'samplerate', atleast_version = '0.0.15',
if (Options.options.enable_samplerate != False):
ctx.check_cfg(package = 'samplerate', atleast_version = '0.0.15',
- args = '--cflags --libs', mandatory = False)
+ args = '--cflags --libs',
+ mandatory = Options.options.enable_samplerate)
# double precision mode
if (Options.options.enable_double == True):
# double precision mode
if (Options.options.enable_double == True):
if not Options.options.enable_double:
package = 'fftw3f'
ctx.check_cfg(package = package, atleast_version = '3.0.0',
if not Options.options.enable_double:
package = 'fftw3f'
ctx.check_cfg(package = package, atleast_version = '3.0.0',
- args = '--cflags --libs', mandatory = False)
+ args = '--cflags --libs', mandatory = Options.options.enable_fftw3)
ctx.define('HAVE_FFTW3', 1)
else:
# fftw disabled, use ooura
ctx.define('HAVE_FFTW3', 1)
else:
# fftw disabled, use ooura
if (Options.options.enable_jack != False):
ctx.check_cfg(package = 'jack', atleast_version = '0.15.0',
if (Options.options.enable_jack != False):
ctx.check_cfg(package = 'jack', atleast_version = '0.15.0',
- args = '--cflags --libs', mandatory = False)
+ args = '--cflags --libs', mandatory = Options.options.enable_jack)
if (Options.options.enable_lash != False):
ctx.check_cfg(package = 'lash-1.0', atleast_version = '0.5.0',
if (Options.options.enable_lash != False):
ctx.check_cfg(package = 'lash-1.0', atleast_version = '0.5.0',
- args = '--cflags --libs', uselib_store = 'LASH', mandatory = False)
+ args = '--cflags --libs', uselib_store = 'LASH',
+ mandatory = Options.options.enable_lash)
# write configuration header
ctx.write_config_header('src/config.h')
# write configuration header
ctx.write_config_header('src/config.h')