Changeset 06d30f9


Ignore:
Timestamp:
Sep 25, 2009, 4:16:45 AM (12 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
e4284c9
Parents:
c423c3d
Message:

wscript: add option to switch from single to double precision

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    rc423c3d r06d30f9  
    1919
    2020def set_options(opt):
     21  opt.add_option('--enable-double', action='store_true', default=False,
     22      help='compile aubio in double precision mode')
    2123  opt.add_option('--disable-fftw3f', action='store_true', default=False,
    2224      help='compile with fftw3 instead of fftw3f')
     
    6769    args = '--cflags --libs')
    6870
     71  # double precision mode
     72  if (Options.options.enable_double == True):
     73    conf.define('HAVE_AUBIO_DOUBLE', 1)
     74  else:
     75    conf.define('HAVE_AUBIO_DOUBLE', 0)
     76
    6977  # one of fftwf or fftw3f
    7078  if (Options.options.disable_fftw3f == True):
    7179    conf.check_cfg(package = 'fftw3', atleast_version = '3.0.0',
    72     args = '--cflags --libs')
     80        args = '--cflags --libs')
    7381  else:
    74     conf.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',
    75     args = '--cflags --libs')
     82    # fftw3f not disabled, take most sensible one according to enable_double
     83    if (Options.options.enable_double == True):
     84      conf.check_cfg(package = 'fftw3', atleast_version = '3.0.0',
     85          args = '--cflags --libs')
     86    else:
     87      conf.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',
     88          args = '--cflags --libs')
    7689
    7790  # optional dependancies
Note: See TracChangeset for help on using the changeset viewer.