summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-09-29 20:29:06 +0000
committerDavid Robillard <d@drobilla.net>2011-09-29 20:29:06 +0000
commit4ffe8418e3d3e2b9835f37e96bc9521f48b6b774 (patch)
tree9a050125b4f82ffcddeb1d9076f5c01df61beb33
parentc1ef7b14a3e1200817180cfaf6425e9bdf0eb51b (diff)
Use is_defined to check for HAVE_* variables set by checks.
Note that conf.define('FOO', 1) will NOT set conf.env['FOO']. git-svn-id: svn://localhost/ardour2/branches/3.0@10164 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/wscript4
-rw-r--r--libs/ardour/wscript14
-rw-r--r--libs/audiographer/wscript4
-rw-r--r--libs/evoral/wscript2
-rw-r--r--libs/pbd/wscript2
-rw-r--r--libs/surfaces/wscript10
-rw-r--r--libs/vamp-plugins/wscript2
-rw-r--r--wscript6
8 files changed, 23 insertions, 21 deletions
diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript
index 3f2c31e52f..e28f7cfded 100644
--- a/gtk2_ardour/wscript
+++ b/gtk2_ardour/wscript
@@ -370,10 +370,10 @@ def build(bld):
]
obj.includes += ['../libs']
- if bld.env['HAVE_SUIL']:
+ if bld.is_defined('HAVE_SUIL'):
obj.source += [ 'lv2_plugin_ui.cc' ]
obj.uselib += ' SUIL '
- elif bld.env['HAVE_SLV2']:
+ elif bld.is_defined('HAVE_SLV2'):
obj.source += [ 'lv2_plugin_ui.cc' ]
obj.uselib += ' SLV2 '
diff --git a/libs/ardour/wscript b/libs/ardour/wscript
index 096a0bd204..5b0a878278 100644
--- a/libs/ardour/wscript
+++ b/libs/ardour/wscript
@@ -256,13 +256,13 @@ def configure(conf):
atleast_version='2.0')
autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV',
atleast_version='0.0.0', mandatory=False)
- if conf.env['HAVE_LILV']:
+ if conf.is_defined('HAVE_LILV'):
autowaf.check_pkg(conf, 'suil-0', uselib_store='SUIL',
atleast_version='0.2.0', mandatory=False)
else:
autowaf.check_pkg(conf, 'slv2', uselib_store='SLV2',
atleast_version='0.6.4', mandatory=False)
- if conf.env['HAVE_SLV2']:
+ if conf.is_defined('HAVE_SLV2'):
autowaf.check_pkg(conf, 'rasqal', uselib_store='RASQAL',
atleast_version='0.9.14', mandatory=False)
autowaf.check_pkg(conf, 'soundtouch-1.0', uselib_store='SOUNDTOUCH',
@@ -338,7 +338,7 @@ int main(int argc, char **argv) {
if ogg_supported():
conf.define ('HAVE_OGG', 1)
- if conf.env['HAVE_LILV'] or conf.env['HAVE_SLV2']:
+ if conf.is_defined('HAVE_LILV') or conf.is_defined('HAVE_SLV2'):
conf.define ('LV2_SUPPORT', 1)
conf.write_config_header('libardour-config.h', remove=False)
@@ -382,13 +382,13 @@ def build(bld):
#obj.uselib += ' SOUNDTOUCH '
#obj.add_objects = 'default/libs/surfaces/control_protocol/smpte_1.o'
- if bld.env['HAVE_LILV']:
+ if bld.is_defined('HAVE_LILV') :
obj.source += [ 'lv2_plugin_lilv.cc', 'lv2_event_buffer.cc',
'uri_map.cc', 'rdff.c' ]
obj.uselib += ['LILV']
- if bld.env['HAVE_SUIL']:
+ if bld.is_defined('HAVE_SUIL'):
obj.uselib += ['SUIL']
- elif bld.env['HAVE_SLV2']:
+ elif bld.is_defined('HAVE_SLV2'):
obj.source += [ 'lv2_plugin.cc', 'lv2_event_buffer.cc',
'uri_map.cc', 'rdff.c' ]
obj.uselib += ['SLV2','RASQAL']
@@ -424,7 +424,7 @@ def build(bld):
lang, 'LC_MESSAGES', 'libardour3.mo'),
mo)
- if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']:
+ if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'):
# Unit tests
testobj = bld(features = 'cxx cxxprogram')
testobj.source = '''
diff --git a/libs/audiographer/wscript b/libs/audiographer/wscript
index 996329777f..de22a73a37 100644
--- a/libs/audiographer/wscript
+++ b/libs/audiographer/wscript
@@ -50,7 +50,9 @@ def build(bld):
#bld.install_files('${INCLUDEDIR}/audiographer/utils', 'audiographer/utils/*.h')
#bld.env['BUILD_TESTS'] = True
- bld.env['HAVE_ALL_GTHREAD'] = bld.env['HAVE_GLIB'] and bld.env['HAVE_GLIBMM'] and bld.env['HAVE_GTHREAD']
+ bld.env['HAVE_ALL_GTHREAD'] = (bld.is_defined('HAVE_GLIB')
+ and bld.is_defined('HAVE_GLIBMM')
+ and bld.is_defined('HAVE_GTHREAD'))
audiographer = bld(features = 'cxx cxxshlib')
audiographer.source = '''
diff --git a/libs/evoral/wscript b/libs/evoral/wscript
index 11cb749a99..a98573a68b 100644
--- a/libs/evoral/wscript
+++ b/libs/evoral/wscript
@@ -97,7 +97,7 @@ def build(bld):
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
obj.defines = ['PACKAGE="libevoral"' ]
- if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']:
+ if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'):
# Static library (for unit test code coverage)
obj = bld(features = 'cxx cstlib')
obj.source = lib_source
diff --git a/libs/pbd/wscript b/libs/pbd/wscript
index 51dda6d7ce..32ce830306 100644
--- a/libs/pbd/wscript
+++ b/libs/pbd/wscript
@@ -127,7 +127,7 @@ def build(bld):
if bld.env['build_target'] == 'x86_64':
obj.cxxflags += [ '-DUSE_X86_64_ASM' ]
- if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']:
+ if bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'):
# Unit tests
testobj = bld(features = 'cxx cxxprogram')
testobj.source = '''
diff --git a/libs/surfaces/wscript b/libs/surfaces/wscript
index 034b588248..31ab783e48 100644
--- a/libs/surfaces/wscript
+++ b/libs/surfaces/wscript
@@ -45,7 +45,7 @@ def configure(conf):
sub_config_and_use(conf, i)
autowaf.check_pkg(conf, 'libusb-1.0', uselib_store='USB', mandatory=False)
- if conf.env['HAVE_USB']:
+ if conf.is_defined('HAVE_USB'):
conf.define('BUILD_TRANZPORT', 1)
#conf.check_cc (lib='libusb', header_name='libusb.h', function_name='usb_interrupt_write', define_name='BUILD_TRANZPORT')
@@ -53,12 +53,12 @@ def configure(conf):
conf.check_cc (lib='lo', header_name='lo/lo.h', function_name='lo_server_new', define_name='BUILD_OSC')
if Options.options.wiimote:
- conf.check_cc (header_name='cwiid.h',define_name='HAVE_CWIID_H')
- if not conf.env['HAVE_CWIID_H']:
+ conf.check_cc (header_name='cwiid.h', define_name='HAVE_CWIID_H')
+ if not conf.is_defined('HAVE_CWIID_H'):
print('WIIMOTE configured but you are missing libcwiid!')
sys.exit(1)
- conf.check_cc (header_name='bluetooth/bluetooth.h',define_name='HAVE_BLUETOOTH_H')
- if not conf.env['HAVE_BLUETOOTH_H']:
+ conf.check_cc (header_name='bluetooth/bluetooth.h', define_name='HAVE_BLUETOOTH_H')
+ if not conf.is_defined('HAVE_BLUETOOTH_H'):
print('WIIMOTE configured but you are missing the libbluetooth headers needed to compile wiimote support!')
sys.exit(1)
conf.define ('BUILD_WIIMOTE', 1)
diff --git a/libs/vamp-plugins/wscript b/libs/vamp-plugins/wscript
index 59823b0b2f..46198cc18e 100644
--- a/libs/vamp-plugins/wscript
+++ b/libs/vamp-plugins/wscript
@@ -46,7 +46,7 @@ def build(bld):
obj.target = 'ardourvampplugins'
obj.uselib = 'FFTW3F'
obj.use = 'libvampplugin libqmdsp'
- if bld.env['HAVE_AUBIO']:
+ if bld.is_defined('HAVE_AUBIO'):
obj.source += ' Onset.cpp '
obj.uselib += ' AUBIO '
obj.vnum = LIBARDOURVAMPPLUGINS_LIB_VERSION
diff --git a/wscript b/wscript
index 3e39f8992b..bd1bccf2b5 100644
--- a/wscript
+++ b/wscript
@@ -230,7 +230,7 @@ def set_compiler_flags (conf,opt):
print("\nWarning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be an error, especially if you are a package maintainer)")
# check this even if we aren't using FPU optimization
- if not conf.env['HAVE_POSIX_MEMALIGN']:
+ if not conf.is_defined('HAVE_POSIX_MEMALIGN'):
optimization_flags.append("-DNO_POSIX_MEMALIGN")
# end optimization section
@@ -552,7 +552,7 @@ def configure(conf):
conf.define('LXVST_SUPPORT', 1)
conf.env['LXVST_SUPPORT'] = True
if bool(conf.env['JACK_SESSION']):
- conf.define ('HAVE_JACK_SESSION', 1)
+ conf.define('HAVE_JACK_SESSION', 1)
if opts.wiimote:
conf.define('WIIMOTE', 1)
conf.env['WIIMOTE'] = True
@@ -560,7 +560,7 @@ def configure(conf):
conf.env['PROGRAM_NAME'] = opts.program_name
if opts.rt_alloc_debug:
conf.define('DEBUG_RT_ALLOC', 1)
- if not conf.env['HAVE_CPPUNIT']:
+ if not conf.is_defined('HAVE_CPPUNIT'):
conf.env['BUILD_TESTS'] = False
set_compiler_flags (conf, Options.options)