Session::request_locate() takes a tri-valued second argument for "roll-after-locate"
[ardour.git] / wscript
diff --git a/wscript b/wscript
index 2f7b62d2240ce337c68d1c2081db84393f9372f5..e9fb579dc9018b05cb9f88cd0556b109d1b7eb94 100644 (file)
--- a/wscript
+++ b/wscript
@@ -27,11 +27,6 @@ class i18n_mo(BuildContext):
         cmd = 'i18n_mo'
         fun = 'i18n_mo'
 
-def is_tracks_build(self, *k, **kw):
-        return self.env['PROGRAM_NAME'] == 'Tracks Live'
-
-Context.Context.is_tracks_build = is_tracks_build
-
 compiler_flags_dictionaries= {
     'gcc' : {
         # Flags required when building a debug build
@@ -135,7 +130,7 @@ clang_dict['sse'] = ''
 clang_dict['fpmath-sse'] = ''
 clang_dict['xmmintrinsics'] = ''
 clang_dict['silence-unused-arguments'] = '-Qunused-arguments'
-clang_dict['extra-cxx-warnings'] = [ '-Woverloaded-virtual', '-Wno-mismatched-tags', '-Wno-cast-align', '-Wno-unused-local-typedefs' ]
+clang_dict['extra-cxx-warnings'] = [ '-Woverloaded-virtual', '-Wno-mismatched-tags', '-Wno-cast-align', '-Wno-unused-local-typedefs', '-Wunneeded-internal-declaration' ]
 clang_dict['cxx-strict'] = [ '-ansi', '-Wnon-virtual-dtor', '-Woverloaded-virtual', '-fstrict-overflow' ]
 clang_dict['strict'] = ['-Wall', '-Wcast-align', '-Wextra', '-Wwrite-strings' ]
 clang_dict['generic-x86'] = [ '-arch', 'i386' ]
@@ -147,25 +142,35 @@ clang_darwin_dict['cxx-strict'] = [ '-ansi', '-Wnon-virtual-dtor', '-Woverloaded
 clang_darwin_dict['full-optimization'] = [ '-O3', '-ffast-math']
 compiler_flags_dictionaries['clang-darwin'] = clang_darwin_dict;
 
-def fetch_git_revision ():
-    cmd = "git describe HEAD | sed 's/^[A-Za-z0-9]*+//'"
-    output = subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines()
-    rev = output[0].decode ('utf-8')
-    return rev
+def fetch_git_revision_date ():
+    cmd = ["git", "describe", "HEAD"]
+    output = subprocess.Popen(cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines()
+    rev = re.sub(r"^[A-Za-z0-9]*\+", "", output[0].decode('utf-8'))
+
+    cmd = ["git", "log", "-1", "--pretty=format:%ci", "HEAD"]
+    output = subprocess.Popen(cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines()
+    date = output[0].decode('utf-8').split(None, 2)[0]
 
-def fetch_tarball_revision ():
+    return rev, date
+
+def fetch_tarball_revision_date():
     if not os.path.exists ('libs/ardour/revision.cc'):
         print ('This tarball was not created correctly - it is missing libs/ardour/revision.cc')
         sys.exit (1)
     with open('libs/ardour/revision.cc', 'rb') as f:
         content = f.readlines()
         remove_punctuation_map = dict((ord(char), None) for char in '";')
-        return content[1].decode('utf-8').strip().split(' ')[7].translate (remove_punctuation_map)
+
+        raw_line_tokens = content[1].decode('utf-8').strip().split(' ')
+        rev = raw_line_tokens[7].translate(remove_punctuation_map)
+        date = raw_line_tokens[12].translate(remove_punctuation_map)
+
+        return rev, date
 
 if os.path.isdir (os.path.join(os.getcwd(), '.git')):
-    rev = fetch_git_revision ()
+    rev, rev_date = fetch_git_revision_date()
 else:
-    rev = fetch_tarball_revision ()
+    rev, rev_date = fetch_tarball_revision_date()
 
 #
 # rev is now of the form MAJOR.MINOR[-rcX]-rev-commit
@@ -225,7 +230,9 @@ children = [
         'libs/ptformat',
         'libs/qm-dsp',
         'libs/vamp-plugins',
+        'libs/vamp-pyin',
         'libs/zita-resampler',
+        'libs/zita-convolver',
         # core ardour libraries
         'libs/pbd',
         'libs/midi++2',
@@ -233,7 +240,7 @@ children = [
         'libs/surfaces',
         'libs/panners',
         'libs/backends',
-        'libs/timecode',
+        'libs/temporal',
         'libs/ardour',
         'libs/gtkmm2ext',
         'libs/audiographer',
@@ -242,6 +249,7 @@ children = [
         'libs/waveview',
         'libs/plugins/reasonablesynth.lv2',
         'libs/plugins/a-comp.lv2',
+        'libs/plugins/a-exp.lv2',
         'libs/plugins/a-delay.lv2',
         'libs/plugins/a-eq.lv2',
         'libs/plugins/a-reverb.lv2',
@@ -252,6 +260,7 @@ children = [
         'mcp',
         'osc',
         'patchfiles',
+        'plugin_metadata',
         'scripts',
         'headless',
         'session_utils',
@@ -280,7 +289,7 @@ def fetch_gcc_version (CC):
 def create_stored_revision():
     rev = ""
     if os.path.exists('.git'):
-        rev = fetch_git_revision();
+        rev, rev_date = fetch_git_revision_date();
         print("Git version: " + rev + "\n")
     elif os.path.exists('libs/ardour/revision.cc'):
         print("Using packaged revision")
@@ -291,12 +300,15 @@ def create_stored_revision():
 
     try:
         #
-        # if you change the format of this, be sure to fix fetch_tarball_revision() above
-        # so that  it still works.
+        # if you change the format of this, be sure to fix fetch_tarball_revision_date()
+        # above so that  it still works.
         #
         text =  '#include "ardour/revision.h"\n'
-        text += 'namespace ARDOUR { const char* revision = \"%s\"; }\n' % rev
-        print('Writing revision info to libs/ardour/revision.cc using ' + rev)
+        text += (
+            'namespace ARDOUR { const char* revision = \"%s\"; '
+            'const char* date = \"%s\"; }\n'
+        ) % (rev, rev_date)
+        print('Writing revision info to libs/ardour/revision.cc using ' + rev + ', ' + rev_date)
         o = open('libs/ardour/revision.cc', 'w')
         o.write(text)
         o.close()
@@ -307,7 +319,7 @@ def create_stored_revision():
 def get_depstack_rev(depstack_root):
     try:
         with open(depstack_root + '/../.vers', 'r') as f:
-            return f.readline()
+            return f.readline().decode('utf-8').strip()[:7]
     except IOError:
         return '-unknown-';
 
@@ -372,6 +384,12 @@ int main() { return 0; }''',
         cxx_flags.append('-fno-omit-frame-pointer')
         linker_flags.append('-fsanitize=address')
 
+    if conf.options.tsan:
+        conf.check_cxx(cxxflags=["-fsanitize=thread", "-fno-omit-frame-pointer"], linkflags=["-fsanitize=thread"])
+        c_flags.extend(('-fsanitize=thread', '-fno-omit-frame-pointer'))
+        cxx_flags.extend(('-fsanitize=thread', '-fno-omit-frame-pointer'))
+        linker_flags.append('-fsanitize=thread')
+
     if opt.gprofile:
         debug_flags = [ flags_dict['gprofile'] ]
 
@@ -385,6 +403,12 @@ int main() { return 0; }''',
             conf.env['build_host'] = 'el_capitan'
         elif re.search ("^16[.]", version) != None:
             conf.env['build_host'] = 'sierra'
+        elif re.search ("^17[.]", version) != None:
+            conf.env['build_host'] = 'high_sierra'
+        elif re.search ("^18[.]", version) != None:
+            conf.env['build_host'] = 'mojave'
+        elif re.search ("^19[.]", version) != None:
+            conf.env['build_host'] = 'catalina'
         else:
             conf.env['build_host'] = 'irrelevant'
 
@@ -410,8 +434,14 @@ int main() { return 0; }''',
                 conf.env['build_target'] = 'yosemite'
             elif re.search ("^15[.]", version) != None:
                 conf.env['build_target'] = 'el_capitan'
-            else:
+            elif re.search ("^16[.]", version) != None:
                 conf.env['build_target'] = 'sierra'
+            elif re.search ("^17[.]", version) != None:
+                conf.env['build_target'] = 'high sierra'
+            elif re.search ("^18[.]", version) != None:
+                conf.env['build_target'] = 'mojave'
+            else:
+                conf.env['build_target'] = 'catalina'
         else:
             match = re.search(
                     "(?P<cpu>i[0-6]86|x86_64|powerpc|ppc|ppc64|arm|s390x?)",
@@ -432,11 +462,11 @@ int main() { return 0; }''',
         #
         compiler_flags.append ('-U__STRICT_ANSI__')
 
-    if opt.use_libcpp or conf.env['build_host'] in [ 'el_capitan', 'sierra' ]:
+    if opt.use_libcpp or conf.env['build_host'] in [ 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' ]:
        cxx_flags.append('--stdlib=libc++')
        linker_flags.append('--stdlib=libc++')
 
-    if conf.options.cxx11 or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra' ]:
+    if conf.options.cxx11 or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' ]:
         conf.check_cxx(cxxflags=["-std=c++11"])
         cxx_flags.append('-std=c++11')
         if platform == "darwin":
@@ -444,7 +474,7 @@ int main() { return 0; }''',
             # from requiring a full path to requiring just the header name.
             cxx_flags.append('-DCARBON_FLAT_HEADERS')
 
-            if not opt.use_libcpp and not conf.env['build_host'] in [ 'el_capitan', 'sierra' ]:
+            if not opt.use_libcpp and not conf.env['build_host'] in [ 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' ]:
                 cxx_flags.append('--stdlib=libstdc++')
                 linker_flags.append('--stdlib=libstdc++')
             # Prevents visibility issues in standard headers
@@ -453,7 +483,7 @@ int main() { return 0; }''',
             cxx_flags.append('-DBOOST_NO_AUTO_PTR')
 
 
-    if (is_clang and platform == "darwin") or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra' ]:
+    if (is_clang and platform == "darwin") or conf.env['build_host'] in [ 'mavericks', 'yosemite', 'el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' ]:
         # Silence warnings about the non-existing osx clang compiler flags
         # -compatibility_version and -current_version.  These are Waf
         # generated and not needed with clang
@@ -569,7 +599,7 @@ int main() { return 0; }''',
                 ("-DMAC_OS_X_VERSION_MAX_ALLOWED=1090",
                  "-mmacosx-version-min=10.8"))
 
-    elif conf.env['build_target'] in ['el_capitan', 'sierra' ]:
+    elif conf.env['build_target'] in ['el_capitan', 'sierra', 'high_sierra', 'mojave', 'catalina' ]:
         compiler_flags.extend(
                 ("-DMAC_OS_X_VERSION_MAX_ALLOWED=1090",
                  "-mmacosx-version-min=10.9"))
@@ -650,15 +680,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 + '"')
@@ -693,9 +721,6 @@ def create_resource_file(icon):
         print('Could not open gtk2_ardour/windows_icon.rc for writing\n')
         sys.exit(-1)
 
-def is_tracks_build (conf):
-        return conf.env['PROGRAM_NAME'] == 'Tracks Live'
-
 #----------------------------------------------------------------
 
 # Waf stages
@@ -750,10 +775,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')
@@ -784,6 +805,8 @@ def options(opt):
                     help="Build a single executable for each unit test")
     #opt.add_option('--tranzport', action='store_true', default=False, dest='tranzport',
     # help='Compile with support for Frontier Designs Tranzport (if libusb is available)')
+    opt.add_option('--maschine', action='store_true', default=False, dest='maschine',
+                    help='Compile with support for NI-Maschine')
     opt.add_option('--generic', action='store_true', default=False, dest='generic',
                     help='Compile with -arch i386 (OS X ONLY)')
     opt.add_option('--ppc', action='store_true', default=False, dest='ppc',
@@ -811,6 +834,8 @@ def options(opt):
                     help='use libc++ instead of default or auto-detected stdlib')
     opt.add_option('--address-sanitizer', action='store_true', default=False, dest='asan',
                     help='Turn on AddressSanitizer (requires GCC >= 4.8 or clang >= 3.1)')
+    opt.add_option('--thread-sanitizer', action='store_true', default=False, dest='tsan',
+                    help='Turn on ThreadSanitizer (requires GCC >= 4.8 or clang, and 64bit CPU)')
     opt.add_option('--ptformat', action='store_true', default=False, dest='ptformat',
                     help='Turn on PT session import option')
     opt.add_option('--no-threaded-waveviews', action='store_true', default=False, dest='no_threaded_waveviews',
@@ -819,6 +844,7 @@ def options(opt):
         '--qm-dsp-include', type='string', action='store',
         dest='qm_dsp_include', default='/usr/include/qm-dsp',
         help='directory where the header files of qm-dsp can be found')
+    opt.add_option ('--use-lld', action='store_true', default=False, dest='use_lld', help='Use LLD linker instead of ld (Linux only)')
 
     for i in children:
         opt.recurse(i)
@@ -853,8 +879,7 @@ def configure(conf):
         # but first make sure that all build-hosts (incl. OSX-10.5/PPC) have that python lib.
         # lazy approach: just use major version 2.X.X
         if itstool != "itstool" or version[0] < "2":
-            print("--freedesktop requires itstool > 2.0.0 to translate files.")
-            sys.exit(-1)
+            conf.fatal("--freedesktop requires itstool > 2.0.0 to translate files.")
 
     conf.env['VERSION'] = VERSION
     conf.env['MAJOR'] = MAJOR
@@ -872,7 +897,9 @@ def configure(conf):
     pkg_config_path = os.getenv('PKG_CONFIG_PATH')
     user_gtk_root = os.path.expanduser (Options.options.depstack_root + '/gtk/inst')
 
-    if pkg_config_path is not None and pkg_config_path.find (user_gtk_root) >= 0:
+    if os.getenv('DEPSTACK_ROOT') is not None and os.path.exists (os.getenv('DEPSTACK_ROOT') + '/lib'):
+        conf.env['DEPSTACK_REV'] = get_depstack_rev (os.getenv('DEPSTACK_ROOT') + '/lib')
+    elif pkg_config_path is not None and pkg_config_path.find (user_gtk_root) >= 0:
         # told to search user_gtk_root
         prefinclude = ''.join ([ '-I', user_gtk_root + '/include'])
         preflib = ''.join ([ '-L', user_gtk_root + '/lib'])
@@ -880,7 +907,7 @@ def configure(conf):
         conf.env.append_value('CXXFLAGS',  [prefinclude ])
         conf.env.append_value('LINKFLAGS', [ preflib ])
         autowaf.display_msg(conf, 'Will build against private GTK dependency stack in ' + user_gtk_root, 'yes')
-        conf.env['DEPSTACK_REV'] = get_depstack_rev (Options.options.depstack_root)
+        conf.env['DEPSTACK_REV'] = get_depstack_rev (user_gtk_root)
     else:
         autowaf.display_msg(conf, 'Will build against private GTK dependency stack', 'no')
         conf.env['DEPSTACK_REV'] = '-system-'
@@ -947,9 +974,6 @@ def configure(conf):
         #       off processor type.  Need to add in a check
         #       for that.
         #
-        conf.env.append_value('CXXFLAGS_OSX', '-F/System/Library/Frameworks')
-        conf.env.append_value('CXXFLAGS_OSX', '-F/Library/Frameworks')
-
         conf.env.append_value('LINKFLAGS_OSX', ['-framework', 'AppKit'])
         conf.env.append_value('LINKFLAGS_OSX', ['-framework', 'CoreAudio'])
         conf.env.append_value('LINKFLAGS_OSX', ['-framework', 'CoreAudioKit'])
@@ -1015,16 +1039,20 @@ def configure(conf):
                 conf.check_cc(function_name='dlopen', header_name='dlfcn.h', uselib_store='DL')
             else:
                 conf.check_cc(function_name='dlopen', header_name='dlfcn.h', lib='dl', uselib_store='DL')
-        conf.check_cxx(fragment = "#include <boost/version.hpp>\nint main(void) { return (BOOST_VERSION >= 103900 ? 0 : 1); }\n",
-                  execute = "1",
-                  mandatory = True,
-                  msg = 'Checking for boost library >= 1.39',
-                  okmsg = 'ok',
-                  errmsg = 'too old\nPlease install boost version 1.39 or higher.')
+
+    conf.check_cxx(fragment = "#include <boost/version.hpp>\n#if !defined (BOOST_VERSION) || BOOST_VERSION < 105600\n#error boost >= 1.56 is not available\n#endif\nint main(void) { return 0; }\n",
+              execute = False,
+              mandatory = True,
+              msg = 'Checking for boost library >= 1.56',
+              okmsg = 'ok',
+              errmsg = 'too old\nPlease install boost version 1.56 or higher.')
 
     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', mandatory=False)
+
     if re.search ("openbsd", sys.platform) != None:
         conf.env.append_value('LDFLAGS', '-L/usr/X11R6/lib')
 
@@ -1073,6 +1101,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',
@@ -1149,6 +1180,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
@@ -1195,8 +1229,7 @@ int main () { return 0; }
         backends += ['dummy']
 
     if not backends:
-        print("Must configure and build at least one backend")
-        sys.exit(1)
+        conf.fatal("Must configure and build at least one backend")
 
     conf.env['BACKENDS'] = backends
     conf.env['BUILD_JACKBACKEND'] = any('jack' in b for b in backends)
@@ -1204,21 +1237,39 @@ 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 (Options.options.use_lld):
+        if re.search ("linux", sys.platform) != None and Options.options.dist_target != 'mingw' and conf.env['BUILD_PABACKEND']:
+                conf.fatal("lld is only for Linux builds")
+        else:
+                conf.find_program ('lld')
+                conf.env.append_value('LINKFLAGS', '-fuse-ld=lld')
 
     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")
-        sys.exit(1)
+        conf.fatal("PortAudio Backend is not for Linux")
+
 
     if sys.platform != 'darwin' and conf.env['BUILD_CORECRAPPITA']:
-        print("Coreaudio backend is only available for OSX")
-        sys.exit(1)
+        conf.fatal("Coreaudio backend is only available for OSX")
 
     if re.search ("linux", sys.platform) == None and conf.env['BUILD_ALSABACKEND']:
-        print("ALSA Backend is only available on Linux")
-        sys.exit(1)
+        conf.fatal("ALSA Backend is only available on Linux")
+
+    if re.search ("linux", sys.platform) == None and conf.env['BUILD_PULSEAUDIO']:
+        conf.fatal("Pulseaudio Backend is only available on Linux")
+
+    if conf.env['BUILD_PULSEAUDIO'] and not conf.is_defined('HAVE_PULSEAUDIO'):
+        conf.fatal("Pulseaudio Backend requires libpulse-dev")
 
     set_compiler_flags (conf, Options.options)
 
+    if conf.env['build_host'] not in [ 'mojave', 'catalina']:
+           conf.env.append_value('CXXFLAGS_OSX', '-F/System/Library/Frameworks')
+           print("**** YES ADDING FRAMEWORKS")
+
+    conf.env.append_value('CXXFLAGS_OSX', '-F/Library/Frameworks')
+
     if sys.platform == 'darwin':
         sub_config_and_use(conf, 'libs/appleutility')
     elif re.search ("openbsd", sys.platform) != None:
@@ -1275,11 +1326,13 @@ const char* const ardour_config_info = "\\n\\
     write_config_text('Libjack linking',       conf.env['libjack_link'])
     write_config_text('Libjack metadata',      conf.is_defined ('HAVE_JACK_METADATA'))
     write_config_text('Lua Binding Doc',       conf.is_defined('LUABINDINGDOC'))
+    write_config_text('Lua Commandline Tool',  conf.is_defined('HAVE_READLINE') and not (conf.is_defined('WINDOWS_VST_SUPPORT') and conf.env['build_target'] != 'mingw'))
     write_config_text('LV2 UI embedding',      conf.is_defined('HAVE_SUIL'))
     write_config_text('LV2 support',           conf.is_defined('LV2_SUPPORT'))
     write_config_text('LV2 extensions',        conf.is_defined('LV2_EXTENDED'))
     write_config_text('LXVST support',         conf.is_defined('LXVST_SUPPORT'))
     write_config_text('Mac VST support',       conf.is_defined('MACVST_SUPPORT'))
+    write_config_text('NI-Maschine',           opts.maschine)
     write_config_text('OGG',                   conf.is_defined('HAVE_OGG'))
     write_config_text('Phone home',            conf.is_defined('PHONE_HOME'))
     write_config_text('Process thread timing', conf.is_defined('PT_TIMING'))
@@ -1292,6 +1345,7 @@ const char* const ardour_config_info = "\\n\\
     write_config_text('Translation',           opts.nls)
 #    write_config_text('Tranzport',             opts.tranzport)
     write_config_text('Unit tests',            conf.env['BUILD_TESTS'])
+    write_config_text('Use LLD linker',        opts.use_lld)
     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)
@@ -1301,8 +1355,9 @@ 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('Builstack', conf.env['DEPSTACK_REV'])
+    write_config_text('Buildstack', conf.env['DEPSTACK_REV'])
     write_config_text('Mac i386 Architecture', opts.generic)
     write_config_text('Mac ppc Architecture',  opts.ppc)
     config_text.write("\\n\\\n")
@@ -1320,13 +1375,15 @@ const char* const ardour_config_info = "\\n\\
 def build(bld):
     create_stored_revision()
 
+    bld.env['DATE'] = rev_date
+
     # add directories that contain only headers, to workaround an issue with waf
 
     if not bld.is_defined('USE_EXTERNAL_LIBS'):
         bld.path.find_dir ('libs/libltc/ltc')
     bld.path.find_dir ('libs/evoral/evoral')
     bld.path.find_dir ('libs/surfaces/control_protocol/control_protocol')
-    bld.path.find_dir ('libs/timecode/timecode')
+    bld.path.find_dir ('libs/temporal/temporal')
     bld.path.find_dir ('libs/gtkmm2ext/gtkmm2ext')
     bld.path.find_dir ('libs/ardour/ardour')
     bld.path.find_dir ('libs/pbd/pbd')
@@ -1334,11 +1391,6 @@ def build(bld):
     # set up target directories
     lwrcase_dirname = 'ardour' + bld.env['MAJOR']
 
-    if bld.is_tracks_build():
-        bld.env.append_value ('CXXFLAGS', '-DUSE_TRACKS_CODE_FEATURES')
-        bld.env.append_value ('CFLAGS', '-DUSE_TRACKS_CODE_FEATURES')
-        lwrcase_dirname = 'trx'
-
     # configuration files go here
     bld.env['CONFDIR'] = os.path.join(bld.env['SYSCONFDIR'], lwrcase_dirname)
     # data files loaded at run time go here
@@ -1366,7 +1418,7 @@ def build(bld):
 
     if bld.is_defined ('BEATBOX'):
         bld.recurse('tools/bb')
-            
+
     bld.install_files (bld.env['CONFDIR'], 'system_config')
 
     bld.install_files (os.path.join (bld.env['DATADIR'], 'templates'), bld.path.ant_glob ('templates/**'), cwd=bld.path.find_dir ('templates'), relative_trick=True)