Just call a template a template (as in the menu) rather than a mix template.
[ardour.git] / wscript
diff --git a/wscript b/wscript
index ada116a13854c640ff6d167a6c7dbe8def3d70ba..65297a27dc1cca7840ad6231a469dd69ee4bce71 100644 (file)
--- a/wscript
+++ b/wscript
@@ -25,11 +25,18 @@ children = [
        'libs/taglib',
        'libs/rubberband',
        'libs/surfaces',
+       'libs/panners',
+       'libs/timecode',
        'libs/ardour',
        'libs/gtkmm2ext',
        'libs/clearlooks-newer',
        'libs/audiographer',
-       'gtk2_ardour'
+       'libs/gnomecanvas',
+       'gtk2_ardour',
+       'templates',
+# this needs to be conditional at some point, since
+# we will not build it or use it on OS X
+        'tools/sanity_check'
 ]
 
 i18n_children = [
@@ -288,6 +295,11 @@ def set_compiler_flags (conf,opt):
        if opt.stl_debug:
                conf.env.append_value('CXXFLAGS', "-D_GLIBCXX_DEBUG")
 
+       if conf.env['DEBUG_RT_ALLOC']:
+               conf.env.append_value('CCFLAGS', '-DDEBUG_RT_ALLOC')
+               conf.env.append_value('CXXFLAGS', '-DDEBUG_RT_ALLOC')
+               conf.env.append_value('LINKFLAGS', '-ldl')
+
        if opt.universal:
                conf.env.append_value('CCFLAGS', "-arch i386 -arch ppc")
                conf.env.append_value('CXXFLAGS', "-arch i386 -arch ppc")
@@ -322,7 +334,6 @@ def set_compiler_flags (conf,opt):
                conf.env.append_value('CXXFLAGS', '-DENABLE_NLS')
                conf.env.append_value('CCFLAGS', '-DENABLE_NLS')
 
-
 #----------------------------------------------------------------
 
 # Waf stages
@@ -356,6 +367,8 @@ def set_options(opt):
        opt.add_option('--phone-home', action='store_false', default=True, dest='phone_home')
        opt.add_option('--stl-debug', action='store_true', default=False, dest='stl_debug',
                        help='Build with debugging for the STL')
+       opt.add_option('--rt-alloc-debug', action='store_true', default=False, dest='rt_alloc_debug',
+                       help='Build with debugging for memory allocation in the real-time thread')
        opt.add_option('--test', action='store_true', default=False, dest='build_tests', 
                        help="Build unit tests")
        opt.add_option('--tranzport', action='store_true', default=False, dest='tranzport',
@@ -369,10 +382,12 @@ def set_options(opt):
        opt.add_option('--wiimote', action='store_true', default=False, dest='wiimote',
                        help='Build the wiimote control surface')
        opt.add_option('--windows-key', type='string', action='store', dest='windows_key', default='Mod4><Super',
-                      help='X Modifier(s) (Mod1,Mod2, etc) for the Windows key (X11 builds only). ' +
-                      'Multiple modifiers must be separated by \'><\'')
-        opt.add_option('--boost-include', type='string', action='store', dest='boost_include', default='',
+                       help='X Modifier(s) (Mod1,Mod2, etc) for the Windows key (X11 builds only). ' +
+                       'Multiple modifiers must be separated by \'><\'')
+       opt.add_option('--boost-include', type='string', action='store', dest='boost_include', default='',
                        help='directory where Boost header files can be found')                
+       opt.add_option('--wine-include', type='string', action='store', dest='wine_include', default='/usr/include/wine/windows',
+                       help='directory where Wine\'s Windows header files can be found')                      
        for i in children:
                opt.sub_options(i)
 
@@ -452,9 +467,9 @@ def configure(conf):
        autowaf.check_header(conf, 'boost/signals2.hpp', mandatory = True)
 
        if Options.options.boost_sp_debug:
-               conf.env.append_value('CXXFLAGS_BOOST', '-DBOOST_SP_ENABLE_DEBUG_HOOKS')
+               conf.env.append_value('CXXFLAGS', '-DBOOST_SP_ENABLE_DEBUG_HOOKS')
 
-       autowaf.check_header(conf, 'jack/session.h', define="JACK_SESSION")
+       autowaf.check_header(conf, 'jack/session.h', define="JACK_SESSION", mandatory = False)
 
        conf.check_cc(fragment = "#include <boost/version.hpp>\nint main(void) { return (BOOST_VERSION >= 103900 ? 0 : 1); }\n",
                      execute = "1",
@@ -524,6 +539,8 @@ def configure(conf):
        autowaf.display_msg(conf, 'VST Support', opts.vst)
        if opts.vst:
                conf.define('VST_SUPPORT', 1)
+               conf.env.append_value('CPPPATH', Options.options.wine_include)
+               autowaf.check_header(conf, 'windows.h', mandatory = True)
        if bool(conf.env['JACK_SESSION']):
                conf.define ('HAVE_JACK_SESSION', 1)
        autowaf.display_msg(conf, 'Wiimote Support', opts.wiimote)
@@ -533,6 +550,8 @@ def configure(conf):
        autowaf.display_msg(conf, 'Windows Key', opts.windows_key)
        conf.env['PROGRAM_NAME'] = opts.program_name
        autowaf.display_msg(conf, 'Program Name', opts.program_name)
+       if opts.rt_alloc_debug:
+               conf.define('DEBUG_RT_ALLOC', 1)
 
        set_compiler_flags (conf, Options.options)
 
@@ -572,6 +591,18 @@ def configure(conf):
        config_text.close ()
 
 def build(bld):
+        # add directories that contain only headers, to workaround an issue with waf
+
+        bld.path.find_dir ('libs/evoral/evoral')
+        bld.path.find_dir ('libs/vamp-sdk/vamp-sdk')
+        bld.path.find_dir ('libs/surfaces/control_protocol/control_protocol')
+        bld.path.find_dir ('libs/timecode/timecode')
+        bld.path.find_dir ('libs/rubberband/rubberband')
+        bld.path.find_dir ('libs/gtkmm2ext/gtkmm2ext')
+        bld.path.find_dir ('libs/ardour/ardour')
+        bld.path.find_dir ('libs/taglib/taglib')
+        bld.path.find_dir ('libs/pbd/pbd')
+
        autowaf.set_recursive()
        if sys.platform == 'darwin':
                bld.add_subdirs('libs/appleutility')