fix MTC generator
[ardour.git] / wscript
diff --git a/wscript b/wscript
index 6d48d8ef3dec57153c5929443f993d670bdcc8bc..78f9e288de7ccc9d000bdd50260510bdb7ed0884 100644 (file)
--- a/wscript
+++ b/wscript
@@ -23,6 +23,7 @@ children = [
         'libs/qm-dsp',
         'libs/vamp-plugins',
         'libs/taglib',
+        'libs/libltc',
         'libs/rubberband',
         'libs/surfaces',
         'libs/panners',
@@ -45,17 +46,20 @@ i18n_children = [
         'libs/gtkmm2ext',
 ]
 
-if sys.platform != 'darwin':
+if sys.platform == 'linux2':
     children += [ 'tools/sanity_check' ]
     lxvst_default = True
-else:
+elif sys.platform == 'darwin':
     children += [ 'libs/appleutility' ]
     lxvst_default = False
+else:
+    lxvst_default = False
 
 # Version stuff
 
 def fetch_svn_revision (path):
-    cmd = "LANG= svn info " + path + " | awk '/^Revision:/ { print $2}'"
+    # the fifth line has the revision number. we can't grep because of i18n issues changing the string
+    cmd = "svn info " + path + " | sed -n '5s/^[^:]*:[ \t][ \t]*//p'"
     return subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines()
 
 def fetch_gcc_version (CC):
@@ -435,8 +439,6 @@ def options(opt):
                     help='Add revision information to executable name inside the build directory')
     opt.add_option('--windows-vst', action='store_true', default=False, dest='windows_vst',
                     help='Compile with support for Windows VST')
-    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 \'><\'')
@@ -599,7 +601,7 @@ def configure(conf):
     autowaf.check_pkg(conf, 'giomm-2.4', uselib_store='GIOMM', atleast_version='2.2')
     autowaf.check_pkg(conf, 'libcurl', uselib_store='CURL', atleast_version='7.0.0')
 
-    conf.check_cc(function_name='dlopen', header_name='dlfcn.h', linkflags='-ldl', uselib_store='DL')
+    conf.check_cc(function_name='dlopen', header_name='dlfcn.h', lib='dl', uselib_store='DL')
 
     # Tell everyone that this is a waf build
 
@@ -635,9 +637,6 @@ def configure(conf):
         conf.env['LXVST_SUPPORT'] = True
     if bool(conf.env['JACK_SESSION']):
         conf.define('HAVE_JACK_SESSION', 1)
-    if opts.wiimote:
-        conf.define('WIIMOTE', 1)
-        conf.env['WIIMOTE'] = True
     conf.define('WINDOWS_KEY', opts.windows_key)
     conf.env['PROGRAM_NAME'] = opts.program_name
     if opts.rt_alloc_debug:
@@ -706,7 +705,7 @@ const char* const ardour_config_info = "\\n\\
     write_config_text('Universal binary',      opts.universal)
     write_config_text('Generic x86 CPU',       opts.generic)
     write_config_text('Windows VST support',   opts.windows_vst)
-    write_config_text('Wiimote support',       opts.wiimote)
+    write_config_text('Wiimote support',       conf.is_defined('BUILD_WIIMOTE'))
     write_config_text('Windows key',           opts.windows_key)
 
     write_config_text('C compiler flags',      conf.env['CFLAGS'])
@@ -726,6 +725,7 @@ def build(bld):
     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/libltc/ltc')
     bld.path.find_dir ('libs/rubberband/rubberband')
     bld.path.find_dir ('libs/gtkmm2ext/gtkmm2ext')
     bld.path.find_dir ('libs/ardour/ardour')