Waf building of gtk2_ardour.
authorDavid Robillard <d@drobilla.net>
Wed, 25 Feb 2009 23:21:49 +0000 (23:21 +0000)
committerDavid Robillard <d@drobilla.net>
Wed, 25 Feb 2009 23:21:49 +0000 (23:21 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@4662 d708f5d6-7413-0410-9779-e7cbd77b26cf

autowaf.py
gtk2_ardour/logmeter.h
gtk2_ardour/sfdb_ui.cc
libs/ardour/wscript
libs/evoral/wscript
libs/midi++2/wscript
libs/pbd/wscript
libs/surfaces/wscript
libs/taglib/wscript
wscript

index 1015afdb9d753f6cdfce23b73d916a2b7de2ddec..b61a39f4bfac3a3cbd39c1c8e82d0b6b68a5ad1a 100644 (file)
@@ -95,6 +95,8 @@ def nameify(name):
        return name.replace('/', '_').replace('++', 'PP').replace('-', '_')
 
 def check_pkg(conf, name, **args):
+       if not 'mandatory' in args:
+               args['mandatory'] = True
        "Check for a package iff it hasn't been checked for yet"
        var_name = 'HAVE_' + nameify(args['uselib_store'])
        check = not var_name in conf.env
@@ -130,7 +132,7 @@ def configure(conf):
        def append_cxx_flags(val):
                conf.env.append_value('CCFLAGS', val)
                conf.env.append_value('CXXFLAGS', val)
-       conf.line_just = 42
+       conf.line_just = 43
        check_tool(conf, 'misc')
        check_tool(conf, 'compiler_cc')
        check_tool(conf, 'compiler_cxx')
index c9addec8f5109e2c49433d83dd7981c869f42b58..0bbce787b2b55706dfbdaa0de05980e89d9c2cb7 100644 (file)
 #define __ardour_gtk_log_meter_h__
 
 #if 1
-inline float
+static inline float
 _log_meter (float power, double lower_db, double upper_db, double non_linearity)
 {
        return (power < lower_db ? 0.0 : pow((power-lower_db)/(upper_db-lower_db), non_linearity));
 }
 
-inline float
+static inline float
 alt_log_meter (float power)
 {
        return _log_meter (power, -192.0, 0.0, 8.0);
index dcd041c44bab6954abf5d217a30914ae92665ede..91620becdba94ca7396ab4b1ef0e140fc4f497b4 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <gtkmm2ext/utils.h>
 
-#include "evoral/SMFReader.hpp"
+#include "evoral/SMF.hpp"
 
 #include "ardour/audio_library.h"
 #include "ardour/auditioner.h"
@@ -1100,7 +1100,8 @@ SoundFileOmega::check_info (const vector<ustring>& paths, bool& same_size, bool&
 
                } else if (SMFSource::safe_midi_file_extension (*i)) {
 
-                       Evoral::SMFReader reader(*i);
+                       Evoral::SMF reader;
+                       reader.open(*i);
                        if (reader.num_tracks() > 1) {
                                multichannel = true; // "channel" == track here...
                        }
index 39e9b5836ca647672ada28e1211c47c95780dc0d..99f72146bd45c2b7ab0e41d727e0074a9ddaff1f 100644 (file)
@@ -31,10 +31,14 @@ def check_header_and_define(conf, header, define):
 def configure(conf):
        autowaf.configure(conf)
        autowaf.check_tool(conf, 'compiler_cxx')
-       autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2', mandatory=True)
-       autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0', mandatory=True)
-       autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0', mandatory=True)
-       autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML', mandatory=True)
+       autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2')
+       autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0')
+       autowaf.check_pkg(conf, 'jack', uselib_store='JACK', atleast_version='0.109.0')
+       autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
+       autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
+       autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18')
+       autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18')
+       autowaf.check_pkg(conf, 'soundtouch-1.0', uselib_store='SOUNDTOUCH')
        
        check_header_and_define(conf, 'wordexp.h', 'HAVE_WORDEXP')
        check_header_and_define(conf, 'sys/vfs.h', 'HAVE_SYS_VFS_H')
@@ -46,8 +50,8 @@ def configure(conf):
        conf.write_config_header('wafconfig.h')
 
        # Boost headers
-       autowaf.check_header(conf, 'boost/shared_ptr.hpp', mandatory=True)
-       autowaf.check_header(conf, 'boost/weak_ptr.hpp', mandatory=True)
+       autowaf.check_header(conf, 'boost/shared_ptr.hpp')
+       autowaf.check_header(conf, 'boost/weak_ptr.hpp')
 
 def build(bld):
        # Library
@@ -198,7 +202,7 @@ def build(bld):
        obj.includes     = ['.', '../surfaces/control_protocol']
        obj.name         = 'libardour'
        obj.target       = 'ardour'
-       obj.uselib       = 'GLIBMM SIGCPP XML UUID'
+       obj.uselib       = 'GLIBMM SIGCPP XML UUID JACK SNDFILE'
        obj.uselib_local = 'libpbd libmidipp libevoral libvamp libtaglib'
        obj.vnum         = LIBARDOUR_LIB_VERSION
        obj.install_path = ''
@@ -210,6 +214,8 @@ def build(bld):
                        os.path.normpath(bld.env['DATADIRNAME']), 'locale') + '\\\"'
        obj.cxxflags     += ' -DVAMP_DIR=\\\"' + os.path.join(
                        os.path.normpath(bld.env['LIBDIRNAME']), 'ardour3', 'vamp') + '\\\"'
+       obj.source += ' st_stretch.cc st_pitch.cc '
+       obj.uselib += ' SOUNDTOUCH '
        
 def shutdown():
        autowaf.shutdown()
index 91577b95c0780ff3dc3e84d3c229916ba9135427..a06a3d4c0f32d6f8db23201061d7892da435e0a3 100644 (file)
@@ -26,14 +26,14 @@ def set_options(opt):
 def configure(conf):
        autowaf.configure(conf)
        autowaf.check_tool(conf, 'compiler_cxx')
-       autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2', mandatory=True)
-       autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0', mandatory=True)
-       autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', atleast_version='2.14.0', mandatory=True)
+       autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2')
+       autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0')
+       autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', atleast_version='2.14.0')
        autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT', atleast_version='1.12.0', mandatory=False)
 
        # Boost headers
-       autowaf.check_header(conf, 'boost/shared_ptr.hpp', mandatory=True)
-       autowaf.check_header(conf, 'boost/weak_ptr.hpp', mandatory=True)
+       autowaf.check_header(conf, 'boost/shared_ptr.hpp')
+       autowaf.check_header(conf, 'boost/weak_ptr.hpp')
 
 def build(bld):
        # Headers
index 3b5401b32711607debdc4c313bb62737566d8033..789daa43bca03837a0618162d758447a491279dd 100644 (file)
@@ -24,22 +24,22 @@ def set_options(opt):
 def configure(conf):
        autowaf.configure(conf)
        autowaf.check_tool(conf, 'compiler_cxx')
-       autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2', mandatory=True)
-       autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0', mandatory=True)
-       autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0', mandatory=True)
-       autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML', mandatory=True)
-       autowaf.check_pkg(conf, 'jack', uselib_store='JACK', atleast_version='0.109.0', mandatory=True)
+       autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2')
+       autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0')
+       autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
+       autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
+       autowaf.check_pkg(conf, 'jack', uselib_store='JACK', atleast_version='0.109.0')
 
        conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
        conf.write_config_header('wafconfig.h')
 
        # TODO
-       conf.env['SYSMIDI'] == 'JACK MIDI'
+       conf.env['SYSMIDI'] = 'JACK MIDI'
        conf.env.append_value('CXXFLAGS', '-DWITH_JACK_MIDI')
 
        # Boost headers
-       autowaf.check_header(conf, 'boost/shared_ptr.hpp', mandatory=True)
-       autowaf.check_header(conf, 'boost/weak_ptr.hpp', mandatory=True)
+       autowaf.check_header(conf, 'boost/shared_ptr.hpp')
+       autowaf.check_header(conf, 'boost/weak_ptr.hpp')
 
 def build(bld):
        # Library
index 12a3791b648e84ef4b089912a2c2c59528d3a0bb..278869ba6ce3a81d6c2952a5aa2bcb6308b5bd7b 100644 (file)
@@ -24,11 +24,11 @@ def set_options(opt):
 def configure(conf):
        autowaf.configure(conf)
        autowaf.check_tool(conf, 'compiler_cxx')
-       autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2', mandatory=True)
-       autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0', mandatory=True)
-       autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0', mandatory=True)
-       autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML', mandatory=True)
-       autowaf.check_pkg(conf, 'uuid', uselib_store='UUID', mandatory=True)
+       autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2')
+       autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0')
+       autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
+       autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
+       autowaf.check_pkg(conf, 'uuid', uselib_store='UUID')
 
        conf.check(function_name='getmntent', header_name='mntent.h', define_name='HAVE_GETMNTENT')
 
@@ -39,8 +39,8 @@ def configure(conf):
        conf.write_config_header('wafconfig.h')
 
        # Boost headers
-       autowaf.check_header(conf, 'boost/shared_ptr.hpp', mandatory=True)
-       autowaf.check_header(conf, 'boost/weak_ptr.hpp', mandatory=True)
+       autowaf.check_header(conf, 'boost/shared_ptr.hpp')
+       autowaf.check_header(conf, 'boost/weak_ptr.hpp')
 
 def build(bld):
        # Library
index 520dd7ff47714a1af621d0a55c026552c7d2b6dd..b0576ee7152f41a84c751f2d7e4a72ff397c1d67 100644 (file)
@@ -24,18 +24,18 @@ def set_options(opt):
 def configure(conf):
        autowaf.configure(conf)
        autowaf.check_tool(conf, 'compiler_cxx')
-       autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2', mandatory=True)
-       autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0', mandatory=True)
-       autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0', mandatory=True)
-       autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML', mandatory=True)
-       autowaf.check_pkg(conf, 'uuid', uselib_store='UUID', mandatory=True)
+       autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2')
+       autowaf.check_pkg(conf, 'glibmm-2.4', uselib_store='GLIBMM', atleast_version='2.14.0')
+       autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
+       autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML')
+       autowaf.check_pkg(conf, 'uuid', uselib_store='UUID')
 
        conf.env.append_value('CXXFLAGS', '-DHAVE_WAFCONFIG_H')
        conf.write_config_header('wafconfig.h')
 
        # Boost headers
-       autowaf.check_header(conf, 'boost/shared_ptr.hpp', mandatory=True)
-       autowaf.check_header(conf, 'boost/weak_ptr.hpp', mandatory=True)
+       autowaf.check_header(conf, 'boost/shared_ptr.hpp')
+       autowaf.check_header(conf, 'boost/weak_ptr.hpp')
 
 def build(bld):
        # Library
index 2aad178596762f01c5397a61739b86664ef16206..12a707ab32fb8d506d522e7b5b1df7402784f9bd 100644 (file)
@@ -31,7 +31,7 @@ def build(bld):
        obj = bld.new_task_gen('cxx', 'shlib')
        prefix = 'libs/taglib/'
        sources = glob.glob(prefix + 'taglib/*.cpp')
-       sources += glob.glob(prefix + 'libs//taglib/flac/*.cpp')
+       sources += glob.glob(prefix + 'taglib/flac/*.cpp')
        sources += glob.glob(prefix + 'taglib/mpc/*.cpp')
        sources += glob.glob(prefix + 'taglib/mpeg/*.cpp')
        sources += glob.glob(prefix + 'taglib/mpeg/id3v1/*.cpp')
diff --git a/wscript b/wscript
index 321e70f1cabc4eb6b75f869f3d9524f32fcf4bb1..ea00dae3e86bfcbb0e8b3482ace421d3f4ec2e8f 100644 (file)
--- a/wscript
+++ b/wscript
@@ -16,7 +16,9 @@ children = [
        'libs/vamp-sdk',
        'libs/taglib',
        'libs/surfaces',
-       'libs/ardour'
+       'libs/ardour',
+       'libs/gtkmm2ext',
+       'gtk2_ardour'
 ]
 
 def set_options(opt):