jack2 codebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.7KB

  1. #! /usr/bin/env python
  2. # encoding: utf-8
  3. import Constants
  4. import Params
  5. from Configure import g_maxlen
  6. #g_maxlen = 40
  7. def display_msg(msg, status = None, color = None):
  8. sr = msg
  9. global g_maxlen
  10. g_maxlen = max(g_maxlen, len(msg))
  11. if status:
  12. print "%s :" % msg.ljust(g_maxlen),
  13. Params.pprint(color, status)
  14. else:
  15. print "%s" % msg.ljust(g_maxlen)
  16. def display_feature(msg, build):
  17. if build:
  18. display_msg(msg, "yes", 'GREEN')
  19. else:
  20. display_msg(msg, "no", 'YELLOW')
  21. def configure(conf):
  22. conf.check_pkg('dbus-1')
  23. e = conf.create_header_configurator()
  24. e.name = 'expat.h'
  25. e.define = 'HAVE_EXPAT'
  26. e.run()
  27. if conf.is_defined('HAVE_EXPAT'):
  28. conf.env['LIB_EXPAT'] = ['expat']
  29. build_jackdbus = False;
  30. if conf.is_defined('HAVE_EXPAT') and conf.is_defined('HAVE_DBUS_1'):
  31. build_jackdbus = True
  32. conf.env['BUILD_JACKDBUS'] = build_jackdbus
  33. display_feature('Build D-Bus JACK (jackdbus)', build_jackdbus)
  34. def build(bld):
  35. if bld.env()["BUILD_JACKDBUS"] != True:
  36. return
  37. obj = bld.create_obj('cc', 'program')
  38. obj.includes = ['.', '../../common', '../../common/jack']
  39. obj.source = [
  40. 'jackdbus.c',
  41. 'controller.c',
  42. 'controller_iface_configure.c',
  43. 'controller_iface_control.c',
  44. 'controller_iface_introspectable.c',
  45. 'controller_iface_patchbay.c',
  46. 'controller_iface_transport.c',
  47. 'xml.c',
  48. 'xml_expat.c',
  49. #'xml_libxml.c',
  50. #'xml_nop.c',
  51. 'xml_write_raw.c',
  52. 'sigsegv.c',
  53. ]
  54. obj.uselib = 'PTHREAD DL RT DBUS-1 EXPAT'
  55. obj.uselib_local = 'serverlib'
  56. obj.target = 'jackdbus'