Changeset 0318cc1
- Timestamp:
- Mar 30, 2013, 6:35:11 AM (12 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 002563f
- Parents:
- c833f56
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/wscript_build
rc833f56 r0318cc1 7 7 includes = '../src', 8 8 source = ['utils.c', 'jackio.c'], 9 uselib = ['LASH', 'JACK'],10 9 target = 'utilsio') 11 10 … … 14 13 bld.program(features = 'c cprogram', 15 14 includes = '../src', 16 use = ['aubio', ' LASH', 'JACK', 'SNDFILE', 'utilsio'],15 use = ['aubio', 'FFTW3F', 'FFTW3', 'SNDFILE', 'JACK', 'LASH', 'SAMPLERATE', 'utilsio'], 17 16 source = str(source_file), 18 17 target = str(source_file).split('.')[0] -
src/wscript_build
rc833f56 r0318cc1 3 3 source = ctx.path.ant_glob('*.c **/*.c') 4 4 uselib = [] 5 uselib += ['FFTW3', 'FFTW3F'] 6 uselib += ['SAMPLERATE'] 7 uselib += ['SNDFILE'] 8 uselib += ['JACK'] 9 uselib += ['LASH'] 5 10 6 if 'HAVE_FFTW3' in conf.get_env():7 source.filter(lambda x: not x.endswith('ooura_fft8g.c'))8 uselib += ['FFTW3', 'FFTW3F']9 10 if 'HAVE_SAMPLERATE':11 uselib += ['SAMPLERATE']12 13 if 'HAVE_SNDFILE':14 uselib += ['SNDFILE']15 11 16 12 # build libaubio -
wscript
rc833f56 r0318cc1 34 34 ctx.add_option('--enable-double', action='store_true', default=False, 35 35 help='compile aubio in double precision mode') 36 ctx.add_option('--enable-fftw', action='store_true', default= False,36 ctx.add_option('--enable-fftw', action='store_true', default=None, 37 37 help='compile with ooura instead of fftw') 38 ctx.add_option('--enable-fftw3f', action='store_true', default= False,38 ctx.add_option('--enable-fftw3f', action='store_true', default=None, 39 39 help='compile with fftw3 instead of fftw3f') 40 40 ctx.add_option('--enable-complex', action='store_true', default=False, 41 41 help='compile with C99 complex') 42 ctx.add_option('--enable-jack', action='store_true', default= False,42 ctx.add_option('--enable-jack', action='store_true', default=None, 43 43 help='compile with jack support') 44 ctx.add_option('--enable-lash', action='store_true', default= False,44 ctx.add_option('--enable-lash', action='store_true', default=None, 45 45 help='compile with lash support') 46 ctx.add_option('--enable-sndfile', action='store_true', default= False,46 ctx.add_option('--enable-sndfile', action='store_true', default=None, 47 47 help='compile with libsndfile support') 48 ctx.add_option('--enable-samplerate', action='store_true', default= False,48 ctx.add_option('--enable-samplerate', action='store_true', default=None, 49 49 help='compile with libsamplerate support') 50 ctx.add_option('--enable-swig', action='store_true', default=False,51 help='compile with swig support (obsolete)')52 50 ctx.add_option('--with-target-platform', type='string', 53 51 help='set target platform for cross-compilation', dest='target_platform') … … 94 92 ctx.check(header_name='limits.h') 95 93 96 # optionally use complex.h97 if (Options.options.enable_complex == True):98 ctx.check(header_name='complex.h')99 100 # check dependencies101 if (Options.options.enable_sndfile == True):102 ctx.check_cfg(package = 'sndfile', atleast_version = '1.0.4',103 args = '--cflags --libs')104 if (Options.options.enable_samplerate == True):105 ctx.check_cfg(package = 'samplerate', atleast_version = '0.0.15',106 args = '--cflags --libs')107 108 # double precision mode109 if (Options.options.enable_double == True):110 ctx.define('HAVE_AUBIO_DOUBLE', 1)111 else:112 ctx.define('HAVE_AUBIO_DOUBLE', 0)113 114 # check if pkg-config is installed, optional115 try:116 ctx.find_program('pkg-config', var='PKGCONFIG')117 except ctx.errors.ConfigurationError:118 ctx.msg('Could not find pkg-config', 'disabling fftw, jack, and lash')119 ctx.msg('Could not find fftw', 'using ooura')120 121 # optional dependancies using pkg-config122 if ctx.env['PKGCONFIG']:123 124 if (Options.options.enable_fftw == True or Options.options.enable_fftw3f == True):125 # one of fftwf or fftw3f126 if (Options.options.enable_fftw3f == True):127 ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',128 args = '--cflags --libs')129 if (Options.options.enable_double == True):130 ctx.msg('Warning', 'fftw3f enabled, but aubio compiled in double precision!')131 else:132 # fftw3f not enabled, take most sensible one according to enable_double133 if (Options.options.enable_double == True):134 ctx.check_cfg(package = 'fftw3', atleast_version = '3.0.0',135 args = '--cflags --libs')136 else:137 ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',138 args = '--cflags --libs')139 ctx.define('HAVE_FFTW3', 1)140 else:141 # fftw disabled, use ooura142 ctx.msg('Checking for FFT implementation', 'ooura')143 pass144 145 if (Options.options.enable_jack == True):146 ctx.check_cfg(package = 'jack', atleast_version = '0.15.0',147 args = '--cflags --libs')148 149 if (Options.options.enable_lash == True):150 ctx.check_cfg(package = 'lash-1.0', atleast_version = '0.5.0',151 args = '--cflags --libs', uselib_store = 'LASH')152 153 # swig154 if (Options.options.enable_swig == True):155 try:156 ctx.find_program('swig', var='SWIG')157 except ctx.errors.ConfigurationError:158 ctx.to_log('swig was not found, not looking for (ignoring)')159 160 if ctx.env['SWIG']:161 ctx.check_tool('swig')162 ctx.check_swig_version()163 164 # python165 if ctx.find_program('python'):166 ctx.check_tool('python')167 ctx.check_python_version((2,4,2))168 ctx.check_python_headers()169 170 94 # check support for C99 __VA_ARGS__ macros 171 95 check_c99_varargs = ''' … … 177 101 msg = 'Checking for C99 __VA_ARGS__ macro'): 178 102 ctx.define('HAVE_C99_VARARGS_MACROS', 1) 103 104 # optionally use complex.h 105 if (Options.options.enable_complex == True): 106 ctx.check(header_name='complex.h') 107 108 # check dependencies 109 if (Options.options.enable_sndfile != False): 110 ctx.check_cfg(package = 'sndfile', atleast_version = '1.0.4', 111 args = '--cflags --libs', mandatory = False) 112 if (Options.options.enable_samplerate != False): 113 ctx.check_cfg(package = 'samplerate', atleast_version = '0.0.15', 114 args = '--cflags --libs', mandatory = False) 115 116 # double precision mode 117 if (Options.options.enable_double == True): 118 ctx.define('HAVE_AUBIO_DOUBLE', 1) 119 else: 120 ctx.define('HAVE_AUBIO_DOUBLE', 0) 121 122 # optional dependancies using pkg-config 123 if (Options.options.enable_fftw != False or Options.options.enable_fftw3f != False): 124 # one of fftwf or fftw3f 125 if (Options.options.enable_fftw3f != False): 126 ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0', 127 args = '--cflags --libs', mandatory = False) 128 if (Options.options.enable_double == True): 129 ctx.msg('Warning', 'fftw3f enabled, but aubio compiled in double precision!') 130 else: 131 # fftw3f not enabled, take most sensible one according to enable_double 132 if (Options.options.enable_double == True): 133 ctx.check_cfg(package = 'fftw3', atleast_version = '3.0.0', 134 args = '--cflags --libs', mandatory = False) 135 else: 136 ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0', 137 args = '--cflags --libs', mandatory = False) 138 ctx.define('HAVE_FFTW3', 1) 139 else: 140 # fftw disabled, use ooura 141 ctx.msg('Checking for FFT implementation', 'ooura') 142 pass 143 144 if (Options.options.enable_jack != False): 145 ctx.check_cfg(package = 'jack', atleast_version = '0.15.0', 146 args = '--cflags --libs', mandatory = False) 147 148 if (Options.options.enable_lash != False): 149 ctx.check_cfg(package = 'lash-1.0', atleast_version = '0.5.0', 150 args = '--cflags --libs', uselib_store = 'LASH', mandatory = False) 179 151 180 152 # write configuration header
Note: See TracChangeset
for help on using the changeset viewer.