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_tool('misc')
34 conf
.check(header_name
='expat.h', define_name
="HAVE_EXPAT")
36 if conf
.is_defined('HAVE_EXPAT'):
37 conf
.env
['LIB_EXPAT'] = ['expat']
39 print Logs
.colors
.RED
+ 'WARNING !! jackdbus will not be built because of expat is missing' + Logs
.colors
.NORMAL
42 conf
.env
['BUILD_JACKDBUS'] = True
45 obj
= bld
.new_task_gen('cc', 'program')
46 if bld
.env
['IS_LINUX']:
47 sysdeps_dbus_include
= ['../linux', '../posix']
48 if bld
.env
['IS_MACOSX']:
49 sysdeps_dbus_include
= ['../macosx', '../posix']
51 obj
.includes
= sysdeps_dbus_include
+ ['.', '../', '../common', '../common/jack']
55 'controller_iface_configure.c',
56 'controller_iface_control.c',
57 'controller_iface_introspectable.c',
58 'controller_iface_patchbay.c',
59 'controller_iface_transport.c',
68 if bld
.env
['IS_LINUX']:
69 obj
.uselib
= 'PTHREAD DL RT DBUS-1 EXPAT'
70 if bld
.env
['IS_MACOSX']:
71 obj
.uselib
= 'PTHREAD DL DBUS-1 EXPAT'
72 obj
.uselib_local
= 'serverlib'
73 obj
.target
= 'jackdbus'
75 # process org.jackaudio.service.in -> org.jackaudio.service
77 obj
= bld
.new_task_gen('subst')
78 obj
.source
= 'org.jackaudio.service.in'
79 obj
.target
= 'org.jackaudio.service'
80 obj
.dict = {'BINDIR': bld
.env
['PREFIX'] + '/bin'}
81 obj
.install_path
= '${DBUS_SERVICES_DIR}/'
82 obj
.fun
= misc
.subst_func