move setup_outline_context() to a more sensible shared location
[ardour.git] / wscript
diff --git a/wscript b/wscript
index 9cb627d4834a3553615ec658c44d4808c3213c84..8bca24f28d8ffafd41558e135976677d34b3b8d3 100644 (file)
--- a/wscript
+++ b/wscript
@@ -15,8 +15,8 @@ if sys.platform == 'darwin':
     OSX_VERSION = '3.0beta6'
     VERSION = '3.0beta6'
 else:
-    LINUX_VERSION = '3.0'
-    VERSION = '3.0'
+    LINUX_VERSION = '3.1'
+    VERSION = '3.1'
 
 APPNAME = 'Ardour3'
 
@@ -41,8 +41,8 @@ children = [
         'libs/gtkmm2ext',
         'libs/clearlooks-newer',
         'libs/audiographer',
+        'libs/canvas',
         'gtk2_ardour',
-        'templates',
         'export',
         'midi_maps',
         'mcp',
@@ -84,22 +84,22 @@ def create_stored_revision():
     if os.path.exists('.git'):
         rev = fetch_git_revision();
         print("ardour.git version: " + rev + "\n")
-    elif os.path.exists('libs/ardour/svn_revision.cc'):
-        print("Using packaged svn revision")
+    elif os.path.exists('libs/ardour/revision.cc'):
+        print("Using packaged revision")
         return
     else:
-        print("Missing libs/ardour/svn_revision.cc.  Blame the packager.")
+        print("Missing libs/ardour/revision.cc.  Blame the packager.")
         sys.exit(-1)
 
     try:
-        text =  '#include "ardour/svn_revision.h"\n'
-        text += 'namespace ARDOUR { const char* svn_revision = \"%s\"; }\n' % rev
-        print('Writing revision info to libs/ardour/svn_revision.cc using ' + rev)
-        o = open('libs/ardour/svn_revision.cc', 'w')
+        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)
+        o = open('libs/ardour/revision.cc', 'w')
         o.write(text)
         o.close()
     except IOError:
-        print('Could not open libs/ardour/svn_revision.cc for writing\n')
+        print('Could not open libs/ardour/revision.cc for writing\n')
         sys.exit(-1)
 
 def set_compiler_flags (conf,opt):
@@ -370,6 +370,8 @@ def set_compiler_flags (conf,opt):
 
     conf.env.append_value('CXXFLAGS', '-D__STDC_LIMIT_MACROS')
     conf.env.append_value('CXXFLAGS', '-D__STDC_FORMAT_MACROS')
+    conf.env.append_value('CXXFLAGS', '-DCANVAS_COMPATIBILITY')
+    conf.env.append_value('CXXFLAGS', '-DCANVAS_DEBUG')
 
     if opt.nls:
         conf.env.append_value('CXXFLAGS', '-DENABLE_NLS')
@@ -406,6 +408,10 @@ def options(opt):
                     help='Do not build with Freesound database support')
     opt.add_option('--gprofile', action='store_true', default=False, dest='gprofile',
                     help='Compile for use with gprofile')
+    opt.add_option('--internal-shared-libs', action='store_true', default=True, dest='internal_shared_libs',
+                   help='Build internal libs as shared libraries')
+    opt.add_option('--internal-static-libs', action='store_false', dest='internal_shared_libs',
+                   help='Build internal libs as static libraries')
     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',
@@ -569,6 +575,10 @@ def configure(conf):
         else:
             print ('No Carbon support available for this build\n')
 
+
+    if Options.options.internal_shared_libs: 
+        conf.define('INTERNAL_SHARED_LIBS', 1)
+
     if Options.options.boost_include != '':
         conf.env.append_value('CXXFLAGS', '-I' + Options.options.boost_include)
 
@@ -597,6 +607,7 @@ def configure(conf):
     autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18')
     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')
+    autowaf.check_pkg(conf, 'liblo', uselib_store='LO', atleast_version='0.26')
 
     conf.check_cc(function_name='dlopen', header_name='dlfcn.h', lib='dl', uselib_store='DL')
 
@@ -671,6 +682,7 @@ const char* const ardour_config_info = "\\n\\
     write_config_text('Debuggable build',      conf.env['DEBUG'])
     write_config_text('Install prefix',        conf.env['PREFIX'])
     write_config_text('Strict compiler flags', conf.env['STRICT'])
+    write_config_text('Internal Shared Libraries', conf.is_defined('INTERNAL_SHARED_LIBS'))
 
     write_config_text('Architecture flags',    opts.arch)
     write_config_text('Aubio',                 conf.is_defined('HAVE_AUBIO'))