allow zero-latency sessions
[ardour.git] / wscript
diff --git a/wscript b/wscript
index 68054f54d3699264528ac16b7c7c097b1b534d52..66b420e11c4d267773acc1e0534bb9dbc7b2ed87 100644 (file)
--- a/wscript
+++ b/wscript
@@ -7,6 +7,7 @@ import string
 import subprocess
 import sys
 import platform as PLATFORM
+from waflib.Tools import winres
 
 def fetch_git_revision ():
     cmd = "git describe HEAD"
@@ -43,12 +44,8 @@ else:
     MICRO = '0'
 
 V = MAJOR + '.' + MINOR + '.' + MICRO
-#
-# it is important that VERSION *not* be unicode string
-# because if it is, it breaks waf somehow.
-#
-VERSION = V.encode ('ascii', 'ignore')
-PROGRAM_VERSION = MAJOR.encode ('ascii', 'ignore')
+VERSION = V
+PROGRAM_VERSION = MAJOR
 
 # Mandatory variables
 top = '.'
@@ -210,8 +207,11 @@ def set_compiler_flags (conf,opt):
         conf.check_cxx(cxxflags=["-std=c++11"])
         cxx_flags.append('-std=c++11')
         if platform == "darwin":
-            cxx_flags.append('-stdlib=libc++')
-            linker_flags.append('-lc++')
+            cxx_flags.append('--stdlib=libstdc++')
+            # Mavericks and later changed the syntax to be used when including Carbon headers,
+            # from requiring a full path to requiring just the header name.
+            cxx_flags.append('-DCARBON_FLAT_HEADERS')
+            linker_flags.append('--stdlib=libstdc++')
             # Prevents visibility issues in standard headers
             conf.define("_DARWIN_C_SOURCE", 1)
 
@@ -359,7 +359,7 @@ def set_compiler_flags (conf,opt):
     #
 
     compiler_flags.extend(
-            ('-Wall', '-Wpointer-arith', '-Wcast-qual', '-Wcast-align'))
+            ('-Wall', '-Wpointer-arith', '-Wcast-qual', '-Wcast-align', '-Wno-unused-parameter'))
 
     c_flags.extend(('-Wstrict-prototypes', '-Wmissing-prototypes'))
     cxx_flags.append('-Woverloaded-virtual')
@@ -417,6 +417,8 @@ def options(opt):
                    help='Build the dummy backend (no audio/MIDI I/O, useful for profiling)')
     opt.add_option('--with-alsabackend', action='store_true', default=False, dest='build_alsabackend',
                    help='Build the ALSA backend')
+    opt.add_option('--with-wavesbackend', action='store_true', default=False, dest='build_wavesbackend',
+                   help='Build the Waves/Portaudio backend')
     opt.add_option('--backtrace', action='store_true', default=True, dest='backtrace',
                     help='Compile with -rdynamic -- allow obtaining backtraces from within Ardour')
     opt.add_option('--no-carbon', action='store_true', default=False, dest='nocarbon',
@@ -452,6 +454,8 @@ def options(opt):
     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')
+    opt.add_option('--no-lxvst', action='store_false', dest='lxvst',
+                    help='Compile without support for linuxVST plugins')
     opt.add_option('--nls', action='store_true', default=True, dest='nls',
                     help='Enable i18n (native language support) (default)')
     opt.add_option('--no-nls', action='store_false', dest='nls')
@@ -508,6 +512,9 @@ def sub_config_and_use(conf, name, has_objects = True):
 def configure(conf):
     conf.load('compiler_c')
     conf.load('compiler_cxx')
+    if Options.options.dist_target == 'mingw':
+        conf.load('winres')
+
     conf.env['VERSION'] = VERSION
     conf.env['MAJOR'] = MAJOR
     conf.env['MINOR'] = MINOR
@@ -756,6 +763,8 @@ def configure(conf):
         conf.env['BUILD_ALSABACKEND'] = True
     if opts.build_dummy:
         conf.env['BUILD_DUMMYBACKEND'] = True
+    if opts.build_wavesbackend:
+        conf.env['BUILD_WAVESBACKEND'] = True
 
     set_compiler_flags (conf, Options.options)
 
@@ -764,8 +773,7 @@ def configure(conf):
     elif Options.options.dist_target != 'mingw':
         sub_config_and_use(conf, 'tools/sanity_check')
 
-    if Options.options.dist_target != 'mingw':
-        sub_config_and_use(conf, 'libs/clearlooks-newer')
+    sub_config_and_use(conf, 'libs/clearlooks-newer')
 
     for i in children:
         sub_config_and_use(conf, i)
@@ -822,6 +830,7 @@ const char* const ardour_config_info = "\\n\\
 #    write_config_text('Tranzport',             opts.tranzport)
     write_config_text('Unit tests',            conf.env['BUILD_TESTS'])
     write_config_text('Generic x86 CPU',       opts.generic)
+    write_config_text('Waves Backend',         opts.build_wavesbackend)
     write_config_text('Windows VST support',   opts.windows_vst)
     write_config_text('Wiimote support',       conf.is_defined('BUILD_WIIMOTE'))
     write_config_text('Windows key',           opts.windows_key)
@@ -869,13 +878,12 @@ def build(bld):
     elif bld.env['build_target'] != 'mingw':
         bld.recurse('tools/sanity_check')
 
-    if bld.env['build_target'] != 'mingw':
-        bld.recurse('libs/clearlooks-newer')
+    bld.recurse('libs/clearlooks-newer')
 
     for i in children:
         bld.recurse(i)
 
-    bld.install_files (bld.env['CONFDIR'], 'ardour_system.rc')
+    bld.install_files (bld.env['CONFDIR'], 'system_config')
 
     if bld.env['RUN_TESTS']:
         bld.add_post_fun(test)