(Source List) Revert to displaying whole-file Regions instead of Sources.
[ardour.git] / wscript
diff --git a/wscript b/wscript
index c3465c076b0c1324b46650a6ee3c57362f7aceac..3a90652701f34b27efb8479664365c0adc28979c 100644 (file)
--- a/wscript
+++ b/wscript
@@ -236,6 +236,7 @@ children = [
         'libs/qm-dsp',
         'libs/vamp-plugins',
         'libs/zita-resampler',
+        'libs/zita-convolver',
         # core ardour libraries
         'libs/pbd',
         'libs/midi++2',
@@ -669,15 +670,13 @@ int main() { return 0; }''',
         ('-D__STDC_LIMIT_MACROS', '-D__STDC_FORMAT_MACROS',
          '-DCANVAS_COMPATIBILITY', '-DCANVAS_DEBUG'))
 
-    if opt.nls:
-        compiler_flags.append('-DENABLE_NLS')
-
     # use sparingly, prefer runtime profile
-    if Options.options.program_name.lower() == "mixbus":
+    if Options.options.program_name.lower().startswith('mixbus'):
         compiler_flags.append ('-DMIXBUS')
+        conf.define('MIXBUS', 1)
 
     if Options.options.program_name.lower() == "mixbus32c":
-        compiler_flags.append ('-DMIXBUS')
+        conf.define('MIXBUS32C', 1)
         compiler_flags.append ('-DMIXBUS32C')
 
     compiler_flags.append ('-DPROGRAM_NAME="' + Options.options.program_name + '"')
@@ -769,10 +768,6 @@ def options(opt):
                     help='Compile libcanvas test GUI')
     opt.add_option('--beatbox', action='store_true', default=False, dest='beatbox',
                     help='Compile beatbox test app')
-    opt.add_option('--lv2', action='store_true', default=True, dest='lv2',
-                    help='Compile with support for LV2 (if Lilv+Suil is available)')
-    opt.add_option('--no-lv2', action='store_false', dest='lv2',
-                    help='Do not compile with support for LV2')
     opt.add_option('--lv2dir', type='string', help="install destination for builtin LV2 bundles [Default: LIBDIR/lv2]")
     opt.add_option('--lxvst', action='store_true', default=True, dest='lxvst',
                     help='Compile with support for linuxVST plugins')
@@ -1049,6 +1044,9 @@ def configure(conf):
     if re.search ("linux", sys.platform) != None and Options.options.dist_target != 'mingw':
         autowaf.check_pkg(conf, 'alsa', uselib_store='ALSA')
 
+    if re.search ("linux", sys.platform) != None and Options.options.dist_target != 'mingw':
+        autowaf.check_pkg(conf, 'libpulse', uselib_store='PULSEAUDIO', atleast_version='10.0', mandatory=False)
+
     if re.search ("openbsd", sys.platform) != None:
         conf.env.append_value('LDFLAGS', '-L/usr/X11R6/lib')
 
@@ -1097,6 +1095,9 @@ int main () { int x = SFC_RF64_AUTO_DOWNGRADE; return 0; }
         conf.check_cc(function_name='htonl', header_name='winsock2.h', lib='ws2_32')
         conf.env.append_value('LIB', 'ws2_32')
         conf.env.append_value('LIB', 'winmm')
+        if Options.options.program_name.lower().startswith('mixbus'):
+            conf.env.append_value('LIB', 'ole32')
+            conf.env.append_value('LIB', 'uuid')
         # needed for mingw64 packages, not harmful on normal mingw build
         conf.env.append_value('LIB', 'intl')
         conf.check_cc(function_name='regcomp', header_name='regex.h',
@@ -1173,6 +1174,9 @@ int main () { return 0; }
     if opts.nls:
         conf.define('ENABLE_NLS', 1)
         conf.env['ENABLE_NLS'] = True
+    else:
+        conf.define('ENABLE_NLS', 0)
+        conf.env['ENABLE_NLS'] = False
     if opts.build_tests:
         conf.env['BUILD_TESTS'] = True
         conf.env['RUN_TESTS'] = opts.run_tests
@@ -1228,6 +1232,7 @@ int main () { return 0; }
     conf.env['BUILD_DUMMYBACKEND'] = any('dummy' in b for b in backends)
     conf.env['BUILD_PABACKEND'] = any('portaudio' in b for b in backends)
     conf.env['BUILD_CORECRAPPITA'] = any('coreaudio' in b for b in backends)
+    conf.env['BUILD_PULSEAUDIO'] = any('pulseaudio' in b for b in backends)
 
     if re.search ("linux", sys.platform) != None and Options.options.dist_target != 'mingw' and conf.env['BUILD_PABACKEND']:
         print("PortAudio Backend is not for Linux")
@@ -1241,6 +1246,14 @@ int main () { return 0; }
         print("ALSA Backend is only available on Linux")
         sys.exit(1)
 
+    if re.search ("linux", sys.platform) == None and conf.env['BUILD_PULSEAUDIO']:
+        print("Pulseaudio Backend is only available on Linux")
+        sys.exit(1)
+
+    if conf.env['BUILD_PULSEAUDIO'] and not conf.is_defined('HAVE_PULSEAUDIO'):
+        print("Pulseaudio Backend requires libpulse-dev")
+        sys.exit(1)
+
     set_compiler_flags (conf, Options.options)
 
     if sys.platform == 'darwin':
@@ -1326,6 +1339,7 @@ const char* const ardour_config_info = "\\n\\
     write_config_text('ALSA Backend',          conf.env['BUILD_ALSABACKEND'])
     write_config_text('Dummy backend',         conf.env['BUILD_DUMMYBACKEND'])
     write_config_text('JACK Backend',          conf.env['BUILD_JACKBACKEND'])
+    write_config_text('Pulseaudio Backend',    conf.env['BUILD_PULSEAUDIO'])
     config_text.write("\\n\\\n")
     write_config_text('Buildstack', conf.env['DEPSTACK_REV'])
     write_config_text('Mac i386 Architecture', opts.generic)