mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
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
This commit is contained in:
parent
c1ef7b14a3
commit
4ffe8418e3
8 changed files with 23 additions and 21 deletions
|
|
@ -370,10 +370,10 @@ def build(bld):
|
||||||
]
|
]
|
||||||
obj.includes += ['../libs']
|
obj.includes += ['../libs']
|
||||||
|
|
||||||
if bld.env['HAVE_SUIL']:
|
if bld.is_defined('HAVE_SUIL'):
|
||||||
obj.source += [ 'lv2_plugin_ui.cc' ]
|
obj.source += [ 'lv2_plugin_ui.cc' ]
|
||||||
obj.uselib += ' SUIL '
|
obj.uselib += ' SUIL '
|
||||||
elif bld.env['HAVE_SLV2']:
|
elif bld.is_defined('HAVE_SLV2'):
|
||||||
obj.source += [ 'lv2_plugin_ui.cc' ]
|
obj.source += [ 'lv2_plugin_ui.cc' ]
|
||||||
obj.uselib += ' SLV2 '
|
obj.uselib += ' SLV2 '
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -256,13 +256,13 @@ def configure(conf):
|
||||||
atleast_version='2.0')
|
atleast_version='2.0')
|
||||||
autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV',
|
autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV',
|
||||||
atleast_version='0.0.0', mandatory=False)
|
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',
|
autowaf.check_pkg(conf, 'suil-0', uselib_store='SUIL',
|
||||||
atleast_version='0.2.0', mandatory=False)
|
atleast_version='0.2.0', mandatory=False)
|
||||||
else:
|
else:
|
||||||
autowaf.check_pkg(conf, 'slv2', uselib_store='SLV2',
|
autowaf.check_pkg(conf, 'slv2', uselib_store='SLV2',
|
||||||
atleast_version='0.6.4', mandatory=False)
|
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',
|
autowaf.check_pkg(conf, 'rasqal', uselib_store='RASQAL',
|
||||||
atleast_version='0.9.14', mandatory=False)
|
atleast_version='0.9.14', mandatory=False)
|
||||||
autowaf.check_pkg(conf, 'soundtouch-1.0', uselib_store='SOUNDTOUCH',
|
autowaf.check_pkg(conf, 'soundtouch-1.0', uselib_store='SOUNDTOUCH',
|
||||||
|
|
@ -338,7 +338,7 @@ int main(int argc, char **argv) {
|
||||||
if ogg_supported():
|
if ogg_supported():
|
||||||
conf.define ('HAVE_OGG', 1)
|
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.define ('LV2_SUPPORT', 1)
|
||||||
|
|
||||||
conf.write_config_header('libardour-config.h', remove=False)
|
conf.write_config_header('libardour-config.h', remove=False)
|
||||||
|
|
@ -382,13 +382,13 @@ def build(bld):
|
||||||
#obj.uselib += ' SOUNDTOUCH '
|
#obj.uselib += ' SOUNDTOUCH '
|
||||||
#obj.add_objects = 'default/libs/surfaces/control_protocol/smpte_1.o'
|
#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',
|
obj.source += [ 'lv2_plugin_lilv.cc', 'lv2_event_buffer.cc',
|
||||||
'uri_map.cc', 'rdff.c' ]
|
'uri_map.cc', 'rdff.c' ]
|
||||||
obj.uselib += ['LILV']
|
obj.uselib += ['LILV']
|
||||||
if bld.env['HAVE_SUIL']:
|
if bld.is_defined('HAVE_SUIL'):
|
||||||
obj.uselib += ['SUIL']
|
obj.uselib += ['SUIL']
|
||||||
elif bld.env['HAVE_SLV2']:
|
elif bld.is_defined('HAVE_SLV2'):
|
||||||
obj.source += [ 'lv2_plugin.cc', 'lv2_event_buffer.cc',
|
obj.source += [ 'lv2_plugin.cc', 'lv2_event_buffer.cc',
|
||||||
'uri_map.cc', 'rdff.c' ]
|
'uri_map.cc', 'rdff.c' ]
|
||||||
obj.uselib += ['SLV2','RASQAL']
|
obj.uselib += ['SLV2','RASQAL']
|
||||||
|
|
@ -424,7 +424,7 @@ def build(bld):
|
||||||
lang, 'LC_MESSAGES', 'libardour3.mo'),
|
lang, 'LC_MESSAGES', 'libardour3.mo'),
|
||||||
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
|
# Unit tests
|
||||||
testobj = bld(features = 'cxx cxxprogram')
|
testobj = bld(features = 'cxx cxxprogram')
|
||||||
testobj.source = '''
|
testobj.source = '''
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,9 @@ def build(bld):
|
||||||
#bld.install_files('${INCLUDEDIR}/audiographer/utils', 'audiographer/utils/*.h')
|
#bld.install_files('${INCLUDEDIR}/audiographer/utils', 'audiographer/utils/*.h')
|
||||||
|
|
||||||
#bld.env['BUILD_TESTS'] = True
|
#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 = bld(features = 'cxx cxxshlib')
|
||||||
audiographer.source = '''
|
audiographer.source = '''
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ def build(bld):
|
||||||
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
|
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
|
||||||
obj.defines = ['PACKAGE="libevoral"' ]
|
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)
|
# Static library (for unit test code coverage)
|
||||||
obj = bld(features = 'cxx cstlib')
|
obj = bld(features = 'cxx cstlib')
|
||||||
obj.source = lib_source
|
obj.source = lib_source
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ def build(bld):
|
||||||
if bld.env['build_target'] == 'x86_64':
|
if bld.env['build_target'] == 'x86_64':
|
||||||
obj.cxxflags += [ '-DUSE_X86_64_ASM' ]
|
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
|
# Unit tests
|
||||||
testobj = bld(features = 'cxx cxxprogram')
|
testobj = bld(features = 'cxx cxxprogram')
|
||||||
testobj.source = '''
|
testobj.source = '''
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ def configure(conf):
|
||||||
sub_config_and_use(conf, i)
|
sub_config_and_use(conf, i)
|
||||||
|
|
||||||
autowaf.check_pkg(conf, 'libusb-1.0', uselib_store='USB', mandatory=False)
|
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.define('BUILD_TRANZPORT', 1)
|
||||||
|
|
||||||
#conf.check_cc (lib='libusb', header_name='libusb.h', function_name='usb_interrupt_write', define_name='BUILD_TRANZPORT')
|
#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')
|
conf.check_cc (lib='lo', header_name='lo/lo.h', function_name='lo_server_new', define_name='BUILD_OSC')
|
||||||
|
|
||||||
if Options.options.wiimote:
|
if Options.options.wiimote:
|
||||||
conf.check_cc (header_name='cwiid.h',define_name='HAVE_CWIID_H')
|
conf.check_cc (header_name='cwiid.h', define_name='HAVE_CWIID_H')
|
||||||
if not conf.env['HAVE_CWIID_H']:
|
if not conf.is_defined('HAVE_CWIID_H'):
|
||||||
print('WIIMOTE configured but you are missing libcwiid!')
|
print('WIIMOTE configured but you are missing libcwiid!')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
conf.check_cc (header_name='bluetooth/bluetooth.h',define_name='HAVE_BLUETOOTH_H')
|
conf.check_cc (header_name='bluetooth/bluetooth.h', define_name='HAVE_BLUETOOTH_H')
|
||||||
if not conf.env['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!')
|
print('WIIMOTE configured but you are missing the libbluetooth headers needed to compile wiimote support!')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
conf.define ('BUILD_WIIMOTE', 1)
|
conf.define ('BUILD_WIIMOTE', 1)
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ def build(bld):
|
||||||
obj.target = 'ardourvampplugins'
|
obj.target = 'ardourvampplugins'
|
||||||
obj.uselib = 'FFTW3F'
|
obj.uselib = 'FFTW3F'
|
||||||
obj.use = 'libvampplugin libqmdsp'
|
obj.use = 'libvampplugin libqmdsp'
|
||||||
if bld.env['HAVE_AUBIO']:
|
if bld.is_defined('HAVE_AUBIO'):
|
||||||
obj.source += ' Onset.cpp '
|
obj.source += ' Onset.cpp '
|
||||||
obj.uselib += ' AUBIO '
|
obj.uselib += ' AUBIO '
|
||||||
obj.vnum = LIBARDOURVAMPPLUGINS_LIB_VERSION
|
obj.vnum = LIBARDOURVAMPPLUGINS_LIB_VERSION
|
||||||
|
|
|
||||||
6
wscript
6
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)")
|
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
|
# 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")
|
optimization_flags.append("-DNO_POSIX_MEMALIGN")
|
||||||
|
|
||||||
# end optimization section
|
# end optimization section
|
||||||
|
|
@ -552,7 +552,7 @@ def configure(conf):
|
||||||
conf.define('LXVST_SUPPORT', 1)
|
conf.define('LXVST_SUPPORT', 1)
|
||||||
conf.env['LXVST_SUPPORT'] = True
|
conf.env['LXVST_SUPPORT'] = True
|
||||||
if bool(conf.env['JACK_SESSION']):
|
if bool(conf.env['JACK_SESSION']):
|
||||||
conf.define ('HAVE_JACK_SESSION', 1)
|
conf.define('HAVE_JACK_SESSION', 1)
|
||||||
if opts.wiimote:
|
if opts.wiimote:
|
||||||
conf.define('WIIMOTE', 1)
|
conf.define('WIIMOTE', 1)
|
||||||
conf.env['WIIMOTE'] = True
|
conf.env['WIIMOTE'] = True
|
||||||
|
|
@ -560,7 +560,7 @@ def configure(conf):
|
||||||
conf.env['PROGRAM_NAME'] = opts.program_name
|
conf.env['PROGRAM_NAME'] = opts.program_name
|
||||||
if opts.rt_alloc_debug:
|
if opts.rt_alloc_debug:
|
||||||
conf.define('DEBUG_RT_ALLOC', 1)
|
conf.define('DEBUG_RT_ALLOC', 1)
|
||||||
if not conf.env['HAVE_CPPUNIT']:
|
if not conf.is_defined('HAVE_CPPUNIT'):
|
||||||
conf.env['BUILD_TESTS'] = False
|
conf.env['BUILD_TESTS'] = False
|
||||||
|
|
||||||
set_compiler_flags (conf, Options.options)
|
set_compiler_flags (conf, Options.options)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue