add a real check for functioning JACK metadata API; remove configure time option for this
This commit is contained in:
parent
b13cedd56c
commit
f755185825
@ -118,7 +118,7 @@ JACKAudioBackend::get_port_name (PortHandle port) const
|
||||
int
|
||||
JACKAudioBackend::get_port_property (PortHandle port, const std::string& key, std::string& value, std::string& type) const
|
||||
{
|
||||
#ifndef NO_JACK_METADATA // really everyone ought to have this by now.
|
||||
#ifdef HAVE_JACK_METADATA // really everyone ought to have this by now.
|
||||
int rv = -1;
|
||||
char *cvalue = NULL;
|
||||
char *ctype = NULL;
|
||||
|
@ -155,7 +155,7 @@ int have_libjack(void);
|
||||
|
||||
#define jack_client_open WJACK_client_client_openXXX
|
||||
|
||||
#ifndef NO_JACK_METADATA
|
||||
#ifdef HAVE_JACK_METADATA
|
||||
/* <jack/metadata.h> */
|
||||
#define jack_get_uuid_for_client_name WJACK_get_uuid_for_client_name
|
||||
#define jack_get_client_name_by_uuid WJACK_get_client_name_by_uuid
|
||||
@ -181,7 +181,7 @@ int have_libjack(void);
|
||||
#include <jack/session.h>
|
||||
#include <jack/thread.h>
|
||||
|
||||
#ifndef NO_JACK_METADATA
|
||||
#ifdef HAVE_JACK_METADATA
|
||||
#include <jack/metadata.h>
|
||||
#endif
|
||||
|
||||
|
@ -37,10 +37,15 @@ def configure(conf):
|
||||
else:
|
||||
conf.env['libjack_link'] = "link"
|
||||
|
||||
if not Options.options.libjack_meta:
|
||||
conf.define ('NO_JACK_METADATA', 1)
|
||||
|
||||
|
||||
# Check that metadata API is available and working
|
||||
conf.check_cxx(fragment = "#include <jack/jack.h>\n#include <jack/metadata.h>\nint main(void) { jack_port_uuid(NULL); return 0; }\n",
|
||||
mandatory = False,
|
||||
msg = 'Checking for JACK metadata API',
|
||||
okmsg = 'ok',
|
||||
errmsg = 'not found (or broken). JACK metadata API will not be used',
|
||||
define_name = 'HAVE_JACK_METADATA',
|
||||
linkflags=['-ljack'])
|
||||
|
||||
def build(bld):
|
||||
obj = bld(features = 'c cxx cxxshlib')
|
||||
obj.source = [
|
||||
@ -64,6 +69,10 @@ def build(bld):
|
||||
obj.cxxflags = [ '-fPIC' ]
|
||||
obj.cflags = [ '-fPIC' ]
|
||||
|
||||
if bld.is_defined ('HAVE_JACK_METADATA'):
|
||||
obj.cxxflags += [ '-DHAVE_JACK_METADATA' ]
|
||||
obj.cflags += [ '-DHAVE_JACK_METADATA' ]
|
||||
|
||||
if (bld.env['build_target'] == 'mingw'):
|
||||
obj.uselib = [ 'PORTAUDIO' ]
|
||||
else:
|
||||
|
4
wscript
4
wscript
@ -615,8 +615,6 @@ def options(opt):
|
||||
help='Compile for use with gprofile')
|
||||
opt.add_option('--libjack', type='string', default="auto", dest='libjack_link',
|
||||
help='libjack link mode [auto|link|weak]')
|
||||
opt.add_option('--no-jack-metadata', action='store_false', default=True, dest='libjack_meta',
|
||||
help='disable support for jack metadata')
|
||||
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',
|
||||
@ -1059,7 +1057,7 @@ const char* const ardour_config_info = "\\n\\
|
||||
write_config_text('Freedesktop files', opts.freedesktop)
|
||||
write_config_text('JACK Backend', conf.env['BUILD_JACKBACKEND'])
|
||||
write_config_text('Libjack linking', conf.env['libjack_link'])
|
||||
write_config_text('Libjack metadata', not conf.is_defined('NO_JACK_METADATA'))
|
||||
write_config_text('Libjack metadata', conf.is_defined ('HAVE_JACK_METADATA'))
|
||||
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'))
|
||||
|
Loading…
Reference in New Issue
Block a user