diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 12af400800..3f2c31e52f 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -1,10 +1,9 @@ #!/usr/bin/env python from waflib.extras import autowaf as autowaf +from waflib import Options, TaskGen import waflib.Logs as Logs, waflib.Utils as Utils import os -import Options import sys -import TaskGen import re # Version of this package (even if built as a child) @@ -238,12 +237,12 @@ def options(opt): def configure(conf): conf.load('misc') + conf.load('compiler_cxx') autowaf.build_version_files( path_prefix + 'version.h', path_prefix + 'version.cc', 'gtk2_ardour', MAJOR, MINOR, MICRO) autowaf.configure(conf) - conf.check_tool('compiler_cxx') if re.search ("linux", sys.platform) != None: autowaf.check_pkg(conf, 'alsa', uselib_store='ALSA') @@ -252,7 +251,7 @@ def configure(conf): autowaf.check_pkg(conf, 'flac', uselib_store='FLAC', atleast_version='1.2.1') - autowaf.check_pkg(conf, 'gthread', uselib_store='GTHREAD', + autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', atleast_version='2.10.1') autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK', atleast_version='2.18') @@ -269,7 +268,7 @@ def configure(conf): autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp') # Add a waf `feature' to allow compilation of things using winegcc -from TaskGen import feature +from waflib.TaskGen import feature @feature("wine") def set_winegcc(self): self.env.LINK_CXX = self.env.LINK_CC = 'wineg++' diff --git a/libs/ardour/wscript b/libs/ardour/wscript index 45ef1a5ff8..096a0bd204 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -1,7 +1,7 @@ #!/usr/bin/env python from waflib.extras import autowaf as autowaf +from waflib import Options import os -import Options import re import subprocess @@ -236,12 +236,13 @@ def options(opt): autowaf.set_options(opt) def configure(conf): + conf.load('compiler_cxx') + conf.load('gas') autowaf.build_version_files( path_prefix + 'ardour/version.h', path_prefix + 'version.cc', 'libardour3', MAJOR, MINOR, MICRO) autowaf.configure(conf) - conf.check_tool('compiler_cxx gas') autowaf.check_pkg(conf, 'aubio', uselib_store='AUBIO', atleast_version='0.3.2') autowaf.check_pkg(conf, 'jack', uselib_store='JACK', diff --git a/libs/audiographer/wscript b/libs/audiographer/wscript index 1c651e834a..996329777f 100644 --- a/libs/audiographer/wscript +++ b/libs/audiographer/wscript @@ -26,10 +26,9 @@ def options(opt): autowaf.set_options(opt) def configure(conf): + conf.load('compiler_cxx') autowaf.configure(conf) - conf.check_tool('compiler_cxx') - autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT', atleast_version='1.12.0', mandatory=False) autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0', mandatory=False) autowaf.check_pkg(conf, 'glib-2.0', uselib_store='GLIB', atleast_version='2.2', mandatory=False) @@ -62,7 +61,7 @@ def build(bld): src/general/broadcast_info.cc ''' - if bld.env['HAVE_SAMPLERATE']: + if bld.is_defined('HAVE_SAMPLERATE'): audiographer.source += ''' src/general/sr_converter.cc ''' @@ -77,7 +76,7 @@ def build(bld): audiographer.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3') - if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']: + if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'): # Unit tests obj = bld(features = 'cxx cxxprogram') obj.source = ''' @@ -99,12 +98,12 @@ def build(bld): tests/general/threader_test.cc ''' - if bld.env['HAVE_SNDFILE']: + if bld.is_defined('HAVE_SNDFILE'): obj.source += ''' tests/sndfile/tmp_file_test.cc ''' - if bld.env['HAVE_SAMPLERATE']: + if bld.is_defined('HAVE_SAMPLERATE'): obj.source += ''' tests/general/sr_converter_test.cc ''' diff --git a/libs/clearlooks-newer/wscript b/libs/clearlooks-newer/wscript index d446275d49..77936ba12b 100644 --- a/libs/clearlooks-newer/wscript +++ b/libs/clearlooks-newer/wscript @@ -12,8 +12,8 @@ def options(opt): autowaf.set_options(opt) def configure(conf): + conf.load('compiler_c') autowaf.configure(conf) - conf.check_tool('compiler_cc') def build(bld): obj = bld(features = 'c cshlib') diff --git a/libs/evoral/wscript b/libs/evoral/wscript index 24a5f4dd1f..11cb749a99 100644 --- a/libs/evoral/wscript +++ b/libs/evoral/wscript @@ -1,6 +1,6 @@ #!/usr/bin/env python from waflib.extras import autowaf as autowaf -import Options +from waflib import Options import os # Version of this package (even if built as a child) @@ -28,10 +28,10 @@ def options(opt): help="Build unit tests") def configure(conf): + conf.load('compiler_cxx') autowaf.configure(conf) #autowaf.display_header('Evoral Configuration') - conf.check_tool('compiler_cxx') autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT', atleast_version='1.12.0', mandatory=False) 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') diff --git a/libs/gnomecanvas/wscript b/libs/gnomecanvas/wscript index 64ade4a189..0ab45977b9 100644 --- a/libs/gnomecanvas/wscript +++ b/libs/gnomecanvas/wscript @@ -45,8 +45,8 @@ def options(opt): autowaf.set_options(opt) def configure(conf): + conf.load('compiler_c') autowaf.configure(conf) - conf.check_tool('compiler_cc') autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK', atleast_version='2.18') autowaf.check_pkg(conf, 'libart-2.0', uselib_store='LIBART', atleast_version='2.3') diff --git a/libs/gtkmm2ext/wscript b/libs/gtkmm2ext/wscript index 3103ebd9b8..64f19e2d02 100644 --- a/libs/gtkmm2ext/wscript +++ b/libs/gtkmm2ext/wscript @@ -68,10 +68,10 @@ def options(opt): autowaf.set_options(opt) def configure(conf): + conf.load('compiler_cxx') autowaf.build_version_files(path_prefix+'gtkmm2ext/version.h', path_prefix+'version.cc', 'libgtkmm2ext', MAJOR, MINOR, MICRO) autowaf.configure(conf) - conf.check_tool('compiler_cxx') autowaf.check_pkg(conf, 'gtkmm-2.4', uselib_store='GTKMM', atleast_version='2.8') autowaf.check_pkg(conf, 'gtk+-2.0', uselib_store='GTK', atleast_version='2.12.1') diff --git a/libs/midi++2/wscript b/libs/midi++2/wscript index e4dbf1eab6..b810bdc802 100644 --- a/libs/midi++2/wscript +++ b/libs/midi++2/wscript @@ -29,10 +29,10 @@ def options(opt): autowaf.set_options(opt) def configure(conf): + conf.load('compiler_cxx') autowaf.build_version_files(path_prefix+'midi++/version.h', path_prefix+'version.cc', 'midipp', MAJOR, MINOR, MICRO) autowaf.configure(conf) - conf.check_tool('compiler_cxx') autowaf.check_pkg(conf, 'jack', uselib_store='JACK', atleast_version='0.118.2') autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML') autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0') diff --git a/libs/panners/wscript b/libs/panners/wscript index 76f14e6fa1..aec57eb40f 100644 --- a/libs/panners/wscript +++ b/libs/panners/wscript @@ -12,7 +12,7 @@ def options(opt): autowaf.set_options(opt) def sub_config_and_use(conf, name, has_objects = True): - conf.sub_config(name) + conf.recurse(name) autowaf.set_local_lib(conf, name, has_objects) def configure(conf): @@ -24,4 +24,4 @@ def configure(conf): def build(bld): for i in panners: - bld.add_subdirs(i) + bld.recurse(i) diff --git a/libs/pbd/wscript b/libs/pbd/wscript index c2be9849a9..51dda6d7ce 100644 --- a/libs/pbd/wscript +++ b/libs/pbd/wscript @@ -1,8 +1,8 @@ #!/usr/bin/env python from waflib.extras import autowaf as autowaf +from waflib import TaskGen import os import sys -import TaskGen # Version of this package (even if built as a child) MAJOR = '4' @@ -30,10 +30,10 @@ def options(opt): autowaf.set_options(opt) def configure(conf): + conf.load('compiler_cxx') autowaf.build_version_files(path_prefix+'pbd/version.h', path_prefix+'version.cc', 'libpbd', MAJOR, MINOR, MICRO) autowaf.configure(conf) - conf.check_tool('compiler_cxx') autowaf.check_pkg(conf, 'libxml-2.0', uselib_store='XML') autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0') if sys.platform != 'darwin': diff --git a/libs/qm-dsp/wscript b/libs/qm-dsp/wscript index db759c69db..fb25d6dbaf 100644 --- a/libs/qm-dsp/wscript +++ b/libs/qm-dsp/wscript @@ -23,8 +23,8 @@ def options(opt): autowaf.set_options(opt) def configure(conf): + conf.load('compiler_cxx') autowaf.configure(conf) - conf.check_tool('compiler_cxx') def build(bld): # Host Library diff --git a/libs/rubberband/wscript b/libs/rubberband/wscript index 15fb9b2ade..7e9ca0250c 100644 --- a/libs/rubberband/wscript +++ b/libs/rubberband/wscript @@ -24,8 +24,8 @@ def options(opt): autowaf.set_options(opt) def configure(conf): + conf.load('compiler_cxx') autowaf.configure(conf) - conf.check_tool('compiler_cxx') def build(bld): # Library diff --git a/libs/surfaces/wscript b/libs/surfaces/wscript index 9f5c4749e7..034b588248 100644 --- a/libs/surfaces/wscript +++ b/libs/surfaces/wscript @@ -1,6 +1,6 @@ #!/usr/bin/env python from waflib.extras import autowaf as autowaf -import Options +from waflib import Options # Version of this package (even if built as a child) LIBSURFACES_VERSION = '4.1.0' @@ -34,7 +34,7 @@ def options(opt): autowaf.set_options(opt) def sub_config_and_use(conf, name, has_objects = True): - conf.sub_config(name) + conf.recurse(name) autowaf.set_local_lib(conf, name, has_objects) def configure(conf): @@ -64,9 +64,9 @@ def configure(conf): conf.define ('BUILD_WIIMOTE', 1) def build(bld): - bld.add_subdirs('control_protocol') - bld.add_subdirs('generic_midi') - bld.add_subdirs('mackie') + bld.recurse('control_protocol') + bld.recurse('generic_midi') + bld.recurse('mackie') if bld.env['BUILD_OSC']: bld.add_subdirs('osc') if bld.env['BUILD_POWERMATE']: diff --git a/libs/taglib/wscript b/libs/taglib/wscript index 986f8302ab..a6994d6391 100644 --- a/libs/taglib/wscript +++ b/libs/taglib/wscript @@ -24,8 +24,8 @@ def options(opt): autowaf.set_options(opt) def configure(conf): + conf.load('compiler_cxx') autowaf.configure(conf) - conf.check_tool('compiler_cxx') def build(bld): # Library diff --git a/libs/timecode/wscript b/libs/timecode/wscript index f919649e25..034292b1dd 100644 --- a/libs/timecode/wscript +++ b/libs/timecode/wscript @@ -1,6 +1,6 @@ #!/usr/bin/env python from waflib.extras import autowaf as autowaf -import Options +from waflib import Options import os # Version of this package (even if built as a child) @@ -26,10 +26,9 @@ def options(opt): autowaf.set_options(opt) def configure(conf): + conf.load('compiler_cxx') autowaf.configure(conf) - conf.check_tool('compiler_cxx') - def build(bld): # Library obj = bld(features = 'cxx cxxshlib') diff --git a/libs/vamp-plugins/wscript b/libs/vamp-plugins/wscript index 4ec6c198b3..59823b0b2f 100644 --- a/libs/vamp-plugins/wscript +++ b/libs/vamp-plugins/wscript @@ -23,8 +23,8 @@ def options(opt): autowaf.set_options(opt) def configure(conf): + conf.load('compiler_cxx') autowaf.configure(conf) - conf.check_tool('compiler_cxx') autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW3F', mandatory=True) autowaf.check_pkg(conf, 'aubio', uselib_store='AUBIO', mandatory=False) conf.write_config_header('libvampplugins-config.h', remove=False) diff --git a/libs/vamp-sdk/wscript b/libs/vamp-sdk/wscript index aabac61ea1..aa4dfdc1da 100644 --- a/libs/vamp-sdk/wscript +++ b/libs/vamp-sdk/wscript @@ -23,8 +23,8 @@ def options(opt): autowaf.set_options(opt) def configure(conf): + conf.load('compiler_cxx') autowaf.configure(conf) - conf.check_tool('compiler_cxx') autowaf.check_pkg(conf, 'fftw3', uselib_store='FFTW3', mandatory=True) autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW3F', mandatory=True) conf.env.append_value('CXXFLAGS', '-DHAVE_FFTW3') diff --git a/tools/sanity_check/wscript b/tools/sanity_check/wscript index fdfd7cfc2c..6bb2274f3f 100644 --- a/tools/sanity_check/wscript +++ b/tools/sanity_check/wscript @@ -1,6 +1,6 @@ #!/usr/bin/env python from waflib.extras import autowaf as autowaf -import Options +from waflib import Options import os # Mandatory variables @@ -11,8 +11,8 @@ def options(opt): autowaf.set_options(opt) def configure(conf): - autowaf.configure (conf) - conf.check_tool('compiler_cxx') + conf.load('compiler_cxx') + autowaf.configure(conf) def build(bld): obj = bld(features = 'cxx cxxprogram') diff --git a/waf b/waf index c71880baa0..72d68665cc 100755 Binary files a/waf and b/waf differ diff --git a/wscript b/wscript index 0b4fd56282..3e39f8992b 100644 --- a/wscript +++ b/wscript @@ -1,6 +1,6 @@ #!/usr/bin/env python from waflib.extras import autowaf as autowaf -import Options +from waflib import Options import os import re import string @@ -404,10 +404,10 @@ def options(opt): opt.add_option('--noconfirm', action='store_true', default=False, dest='noconfirm', help='Do not ask questions that require confirmation during the build') for i in children: - opt.sub_options(i) + opt.recurse(i) def sub_config_and_use(conf, name, has_objects = True): - conf.sub_config(name) + conf.recurse(name) autowaf.set_local_lib(conf, name, has_objects) def configure(conf): @@ -583,26 +583,26 @@ const char* const ardour_config_info = "\\n\\ write_config_text('Strict compiler flags', conf.env['STRICT']) write_config_text('Architecture flags', opts.arch) - write_config_text('Aubio', bool(conf.env['HAVE_AUBIO'])) + write_config_text('Aubio', conf.is_defined('HAVE_AUBIO')) write_config_text('Build target', conf.env['build_target']) - write_config_text('CoreAudio', bool(conf.env['HAVE_COREAUDIO'])) - write_config_text('FLAC', bool(conf.env['HAVE_FLAC'])) + write_config_text('CoreAudio', conf.is_defined('HAVE_COREAUDIO')) + write_config_text('FLAC', conf.is_defined('HAVE_FLAC')) write_config_text('FPU optimization', opts.fpu_optimization) write_config_text('Freedesktop files', opts.freedesktop) write_config_text('Freesound', opts.freesound) - write_config_text('JACK session support', bool(conf.env['JACK_SESSION'])) - write_config_text('LV2 UI embedding', bool(conf.env['HAVE_SUIL'])) - write_config_text('LV2 support', bool(conf.env['LV2_SUPPORT'])) - write_config_text('LXVST support', bool(conf.env['LXVST_SUPPORT'])) - write_config_text('OGG', bool(conf.env['HAVE_OGG'])) - write_config_text('Phone home', bool(conf.env['PHONE_HOME'])) + write_config_text('JACK session support', conf.is_defined('JACK_SESSION')) + write_config_text('LV2 UI embedding', conf.is_defined('HAVE_SUIL')) + write_config_text('LV2 support', conf.is_defined('LV2_SUPPORT')) + write_config_text('LXVST support', conf.is_defined('LXVST_SUPPORT')) + write_config_text('OGG', conf.is_defined('HAVE_OGG')) + write_config_text('Phone home', conf.is_defined('PHONE_HOME')) write_config_text('Program name', opts.program_name) - write_config_text('Rubberband', bool(conf.env['HAVE_RUBBERBAND'])) - write_config_text('Samplerate', bool(conf.env['HAVE_SAMPLERATE'])) - write_config_text('Soundtouch', bool(conf.env['HAVE_SOUNDTOUCH'])) + write_config_text('Rubberband', conf.is_defined('HAVE_RUBBERBAND')) + write_config_text('Samplerate', conf.is_defined('HAVE_SAMPLERATE')) + write_config_text('Soundtouch', conf.is_defined('HAVE_SOUNDTOUCH')) write_config_text('Translation', opts.nls) write_config_text('Tranzport', opts.tranzport) - write_config_text('Unit tests', bool(conf.env['BUILD_TESTS'])) + write_config_text('Unit tests', conf.is_defined('BUILD_TESTS')) write_config_text('Universal binary', opts.universal) write_config_text('VST support', opts.vst) write_config_text('Wiimote support', opts.wiimote) @@ -632,7 +632,7 @@ def build(bld): if sys.platform == 'darwin': bld.add_subdirs('libs/appleutility') for i in children: - bld.add_subdirs(i) + bld.recurse(i) # ideally, we'd like to use the OS-provided MIDI API # for default ports. that doesn't work on at least