10 opt
.add_option('--enable-pkg-config-dbus-service-dir', action
='store_true', default
=False, help='force D-Bus service install dir to be one returned by pkg-config')
13 conf
.env
['BUILD_JACKDBUS'] = False
15 if not conf
.check_cfg(package
='dbus-1', atleast_version
='1.0.0', args
='--cflags --libs') or not conf
.is_defined('HAVE_DBUS_1'):
16 print(Logs
.colors
.RED
+ 'WARNING !! jackdbus will not be built because libdbus-dev is missing' + Logs
.colors
.NORMAL
)
19 dbus_dir
= conf
.check_cfg(package
='dbus-1', args
='--variable=session_bus_services_dir')
21 print(Logs
.colors
.RED
+ 'WARNING !! jackdbus will not be built because service dir is unknown' + Logs
.colors
.NORMAL
)
24 dbus_dir
= dbus_dir
.strip()
25 conf
.env
['DBUS_SERVICES_DIR_REAL'] = dbus_dir
27 if Options
.options
.enable_pkg_config_dbus_service_dir
:
28 conf
.env
['DBUS_SERVICES_DIR'] = dbus_dir
30 conf
.env
['DBUS_SERVICES_DIR'] = os
.path
.normpath(conf
.env
['PREFIX'] + '/share/dbus-1/services')
32 conf
.check(header_name
='expat.h', define_name
="HAVE_EXPAT")
34 if conf
.is_defined('HAVE_EXPAT'):
35 conf
.env
['LIB_EXPAT'] = ['expat']
37 print(Logs
.colors
.RED
+ 'WARNING !! jackdbus will not be built because of expat is missing' + Logs
.colors
.NORMAL
)
40 conf
.env
['BUILD_JACKDBUS'] = True
43 obj
= bld(features
= ['c', 'cprogram'], idx
=17)
44 if bld
.env
['IS_LINUX']:
45 sysdeps_dbus_include
= ['../linux', '../posix']
46 if bld
.env
['IS_MACOSX']:
47 sysdeps_dbus_include
= ['../macosx', '../posix']
49 obj
.includes
= sysdeps_dbus_include
+ ['.', '../', '../common', '../common/jack']
50 obj
.defines
= ['HAVE_CONFIG_H','SERVER_SIDE']
55 'controller_iface_configure.c',
56 'controller_iface_control.c',
57 'controller_iface_introspectable.c',
58 'controller_iface_patchbay.c',
59 'controller_iface_session_manager.c',
60 'controller_iface_transport.c',
68 obj
.use
= ['serverlib']
69 if bld
.env
['IS_LINUX']:
70 obj
.use
+= ['PTHREAD', 'DL', 'RT', 'DBUS-1', 'EXPAT']
71 if bld
.env
['IS_MACOSX']:
72 obj
.use
+= ['PTHREAD', 'DL', 'DBUS-1', 'EXPAT']
73 obj
.target
= 'jackdbus'
75 # process org.jackaudio.service.in -> org.jackaudio.service
78 source
= 'org.jackaudio.service.in',
79 target
= 'org.jackaudio.service',
80 install_path
= '${DBUS_SERVICES_DIR}/',
81 BINDIR
= bld
.env
['PREFIX'] + '/bin')