- # 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')
+ ctx.define('HAVE_AUBIO_DOUBLE', 0)
+
+ # check if pkg-config is installed, optional
+ try:
+ ctx.find_program('pkg-config', var='PKGCONFIG')
+ except ctx.errors.ConfigurationError:
+ ctx.msg('Could not find pkg-config', 'disabling fftw, jack, and lash')
+ ctx.msg('Could not find fftw', 'using ooura')
+
+ # optional dependancies using pkg-config
+ if ctx.env['PKGCONFIG']:
+
+ if (Options.options.enable_fftw == True or Options.options.enable_fftw3f == True):
+ # one of fftwf or fftw3f
+ if (Options.options.enable_fftw3f == True):
+ ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',
+ args = '--cflags --libs')
+ 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')
+ else:
+ ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',
+ args = '--cflags --libs')
+ ctx.define('HAVE_FFTW3', 1)