Fix bad initialization.
[ardour.git] / libs / rubberband / wscript
1 #!/usr/bin/env python
2 import autowaf
3 import glob
4
5 # Version of this package (even if built as a child)
6 LIBRUBBERBAND_VERSION = '0.0.0'
7
8 # Library version (UNIX style major, minor, micro)
9 # major increment <=> incompatible changes
10 # minor increment <=> compatible changes (additions)
11 # micro increment <=> no interface changes
12 LIBRUBBERBAND_LIB_VERSION = '4.1.0'
13
14 # Variables for 'waf dist'
15 APPNAME = 'librubberband'
16 VERSION = LIBRUBBERBAND_VERSION
17
18 # Mandatory variables
19 srcdir = '.'
20 blddir = 'build'
21
22 def set_options(opt):
23         autowaf.set_options(opt)
24
25 def configure(conf):
26         autowaf.configure(conf)
27         autowaf.check_tool(conf, 'compiler_cxx')
28         autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
29         autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
30         autowaf.check_pkg(conf, 'uuid', uselib_store='UUID')
31
32         conf.check(function_name='getmntent', header_name='mntent.h', define_name='HAVE_GETMNTENT')
33
34         # This must be defined for librubberband only, it breaks ardour
35         conf.check(header_name='execinfo.h', define_name='PBD_HAVE_EXECINFO')
36
37         conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
38         conf.write_config_header('wafconfig.h')
39
40         # Boost headers
41         autowaf.check_header(conf, 'boost/shared_ptr.hpp')
42         autowaf.check_header(conf, 'boost/weak_ptr.hpp')
43
44 def build(bld):
45         # Library
46         obj = bld.new_task_gen('cxx', 'shlib')
47         prefix = 'libs/rubberband/'
48         sources = glob.glob(prefix + 'src/*.cpp')
49         obj.source = [ ]
50         for i in sources:
51                 obj.source += [ i.replace(prefix, '') ]
52         obj.export_incdirs = ['.']
53         obj.includes     = ['.', 'rubberband']
54         obj.name         = 'librubberband'
55         obj.target       = 'rubberband'
56         obj.uselib       = 'FFTW3 FFTW3F SAMPLERATE SNDFILE'
57         obj.uselib_local = 'libvamphost'
58         obj.vnum         = LIBRUBBERBAND_LIB_VERSION
59         obj.install_path = ''
60         obj.cxxflags     = '-DPACKAGE=\\\"librubberband\\\"'
61         
62 def shutdown():
63         autowaf.shutdown()
64