From: Paul Brossier Date: Fri, 6 Jan 2012 23:07:12 +0000 (-0600) Subject: wscript: factorise pkg-config detection X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=36f954aecd4f2cf973654c357308a1f3a7890561;p=aubio.git wscript: factorise pkg-config detection --- diff --git a/wscript b/wscript index 3f866ef5..060851a4 100644 --- a/wscript +++ b/wscript @@ -102,31 +102,34 @@ def configure(conf): except conf.errors.ConfigurationError: conf.to_log('pkg-config was not found, not looking for (ignoring)') - if (Options.options.disable_fftw == False) or not conf.env['PKGCONFIG']: - # one of fftwf or fftw3f - if (Options.options.disable_fftw3f == True): - conf.check_cfg(package = 'fftw3', atleast_version = '3.0.0', - args = '--cflags --libs') - else: - # fftw3f not disabled, take most sensible one according to enable_double - if (Options.options.enable_double == True): + # optional dependancies using pkg-config + if conf.env['PKGCONFIG']: + + if (Options.options.disable_fftw == False): + # one of fftwf or fftw3f + if (Options.options.disable_fftw3f == True): conf.check_cfg(package = 'fftw3', atleast_version = '3.0.0', args = '--cflags --libs') else: - conf.check_cfg(package = 'fftw3f', atleast_version = '3.0.0', - args = '--cflags --libs') - conf.define('HAVE_FFTW3', 1) - else: - # fftw disabled, use ooura - pass - - # optional dependancies - if (Options.options.enable_jack == True): - conf.check_cfg(package = 'jack', atleast_version = '0.15.0', - args = '--cflags --libs') - if (Options.options.enable_lash == True): - conf.check_cfg(package = 'lash-1.0', atleast_version = '0.5.0', - args = '--cflags --libs', uselib_store = 'LASH') + # 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') + else: + conf.check_cfg(package = 'fftw3f', atleast_version = '3.0.0', + args = '--cflags --libs') + conf.define('HAVE_FFTW3', 1) + else: + # fftw disabled, use ooura + pass + + if (Options.options.enable_jack == True): + conf.check_cfg(package = 'jack', atleast_version = '0.15.0', + args = '--cflags --libs') + + if (Options.options.enable_lash == True): + conf.check_cfg(package = 'lash-1.0', atleast_version = '0.5.0', + args = '--cflags --libs', uselib_store = 'LASH') # swig try: