Replace use of PBD::sys::path in AudioRegionImporter
[ardour.git] / libs / ardour / wscript
index df46d8cc86cbf9678dece12a06439a5c06610c35..65466df09f568ec49cf95514278d5fa9f090e599 100644 (file)
@@ -105,6 +105,7 @@ libardour_sources = [
         'graph.cc',
         'graphnode.cc',
         'import.cc',
+        'instrument_info.cc',
         'internal_return.cc',
         'internal_send.cc',
         'interpolation.cc',
@@ -256,11 +257,19 @@ def configure(conf):
     autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP',
                       atleast_version='2.0')
     if Options.options.lv2:
+        autowaf.check_pkg(conf, 'lv2', uselib_store='LV2',
+                          atleast_version='1.0.0', mandatory=True)
+        autowaf.check_pkg(conf, 'serd-0', uselib_store='SERD',
+                          atleast_version='0.14.0', mandatory=True)
+        autowaf.check_pkg(conf, 'sord-0', uselib_store='SORD',
+                          atleast_version='0.8.0', mandatory=True)
+        autowaf.check_pkg(conf, 'sratom-0', uselib_store='SRATOM',
+                          atleast_version='0.2.0', mandatory=True)
         autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV',
-                          atleast_version='0.14.0', mandatory=False)
-        if conf.is_defined('HAVE_LILV'):
-            autowaf.check_pkg(conf, 'suil-0', uselib_store='SUIL',
-                              atleast_version='0.6.0', mandatory=False)
+                          atleast_version='0.14.0', mandatory=True)
+        autowaf.check_pkg(conf, 'suil-0', uselib_store='SUIL',
+                          atleast_version='0.6.0', mandatory=False)
+        conf.define ('LV2_SUPPORT', 1)
 
 #    autowaf.check_pkg(conf, 'soundtouch-1.0', uselib_store='SOUNDTOUCH',
 #                      mandatory=False)
@@ -280,6 +289,7 @@ def configure(conf):
     conf.define('CURRENT_SESSION_FILE_VERSION', CURRENT_SESSION_FILE_VERSION)
 
     conf.check(header_name='sys/vfs.h', define_name='HAVE_SYS_VFS_H',mandatory=False)
+    conf.check(header_name='sys/statvfs.h', define_name='HAVE_SYS_STATVFS_H',mandatory=False)
 
     conf.check(header_name='jack/session.h', uselib = [ 'JACK' ],
                define_name='HAVE_JACK_SESSION')
@@ -332,9 +342,6 @@ int main(int argc, char **argv) {
     if ogg_supported():
         conf.define ('HAVE_OGG', 1)
 
-    if Options.options.lv2 and conf.is_defined('HAVE_LILV'):
-        conf.define ('LV2_SUPPORT', 1)
-
     conf.write_config_header('libardour-config.h', remove=False)
 
     # Boost headers
@@ -364,11 +371,7 @@ def build(bld):
         'PACKAGE="' + I18N_PACKAGE + '"',
         'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
         'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
-        'MODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"',
-        'LOCALEDIR="' + os.path.join(
-            os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
-        'VAMP_DIR="' + os.path.join(
-            os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"',
+        'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
         'PROGRAM_NAME="' + bld.env['PROGRAM_NAME'] + '"'
         ]
 
@@ -421,10 +424,12 @@ def build(bld):
         testobj              = bld(features = 'cxx cxxprogram')
         testobj.source       = '''
                 test/dummy_lxvst.cc
+                test/test_util.cc
                 test/test_needing_session.cc
-                test/test_needing_playlist_and_regions.cc
-                test/test_globals.cc
                 test/audio_region_test.cc
+                test/test_globals.cc
+                test/audio_region_read_test.cc
+                test/automation_list_property_test.cc
                 test/bbt_test.cc
                 test/tempo_test.cc
                 test/interpolation_test.cc
@@ -435,7 +440,11 @@ def build(bld):
                 test/framepos_minus_beats_test.cc
                 test/playlist_layering_test.cc
                 test/playlist_read_test.cc
+                test/playlist_equivalent_regions_test.cc
                 test/control_surfaces_test.cc
+                test/combine_regions_test.cc
+                test/region_naming_test.cc
+                test/mtdm_test.cc
                 test/testrunner.cc
         '''.split()
 
@@ -453,7 +462,6 @@ def build(bld):
             'PACKAGE="libardour3test"',
             'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
             'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
-            'MODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"',
             'LOCALEDIR="' + os.path.join(
                 os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
             'VAMP_DIR="' + os.path.join(
@@ -467,37 +475,73 @@ def build(bld):
             elif bld.env['build_target'] == 'x86_64':
                 testobj.source += [ 'sse_functions_64bit.s' ]
 
-        # Profiling
-        profilingobj = bld(features = 'cxx cxxprogram')
-        profilingobj.source = '''
-                test/dummy_lxvst.cc
-                test/profiling/runpc.cc
-        '''.split()
-
-        profilingobj.includes  = obj.includes
-        profilingobj.uselib    = ['CPPUNIT','SIGCPP','JACK','GLIBMM','GTHREAD',
+        # Tester to just load a session
+        session_load_tester = bld(features = 'cxx cxxprogram')
+        session_load_tester.source = '''
+                    test/test_util.cc
+                    test/load_session.cc
+                    test/dummy_lxvst.cc
+            '''.split()
+
+        session_load_tester.includes  = obj.includes
+        session_load_tester.includes.append ('test')
+        session_load_tester.uselib    = ['CPPUNIT','SIGCPP','JACK','GLIBMM','GTHREAD',
                              'SAMPLERATE','XML','LRDF','COREAUDIO']
-        profilingobj.use       = ['libpbd','libmidipp','libardour']
-        profilingobj.name      = 'libardour-profiling'
-        profilingobj.target    = 'run-profiling'
-        profilingobj.install_path = ''
-        profilingobj.defines      = [
+        session_load_tester.use       = ['libpbd','libmidipp','libardour']
+        session_load_tester.name      = 'libardour-session-load-tester'
+        session_load_tester.target    = 'load-session'
+        session_load_tester.install_path = ''
+        session_load_tester.defines      = [
             'PACKAGE="libardour3profile"',
             'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
             'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
-            'MODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"',
             'LOCALEDIR="' + os.path.join(
                 os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
             'VAMP_DIR="' + os.path.join(
                 os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"'
             ]
         if bld.env['FPU_OPTIMIZATION']:
-            profilingobj.source += [ 'sse_functions_xmm.cc' ]
+            session_load_tester.source += [ 'sse_functions_xmm.cc' ]
             if (bld.env['build_target'] == 'i386'
                 or bld.env['build_target'] == 'i686'):
-                profilingobj.source += [ 'sse_functions.s' ]
+                session_load_tester.source += [ 'sse_functions.s' ]
             elif bld.env['build_target'] == 'x86_64':
-                profilingobj.source += [ 'sse_functions_64bit.s' ]
+                session_load_tester.source += [ 'sse_functions_64bit.s' ]
+
+        # Profiling
+        for p in ['runpc', 'lots_of_regions', 'load_session']:
+            profilingobj = bld(features = 'cxx cxxprogram')
+            profilingobj.source = '''
+                    test/dummy_lxvst.cc
+                    test/test_util.cc
+            '''.split()
+
+            profilingobj.source.append('test/profiling/%s.cc' % p)
+
+            profilingobj.includes  = obj.includes
+            profilingobj.includes.append ('test')
+            profilingobj.uselib    = ['CPPUNIT','SIGCPP','JACK','GLIBMM','GTHREAD',
+                             'SAMPLERATE','XML','LRDF','COREAUDIO']
+            profilingobj.use       = ['libpbd','libmidipp','libardour']
+            profilingobj.name      = 'libardour-profiling'
+            profilingobj.target    = p
+            profilingobj.install_path = ''
+            profilingobj.defines      = [
+                'PACKAGE="libardour3profile"',
+                'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
+                'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
+                'LOCALEDIR="' + os.path.join(
+                    os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
+                'VAMP_DIR="' + os.path.join(
+                    os.path.normpath(bld.env['LIBDIR']), 'ardour3', 'vamp') + '"'
+                ]
+            if bld.env['FPU_OPTIMIZATION']:
+                profilingobj.source += [ 'sse_functions_xmm.cc' ]
+                if (bld.env['build_target'] == 'i386'
+                    or bld.env['build_target'] == 'i686'):
+                    profilingobj.source += [ 'sse_functions.s' ]
+                elif bld.env['build_target'] == 'x86_64':
+                    profilingobj.source += [ 'sse_functions_64bit.s' ]
 
 def shutdown():
     autowaf.shutdown()