From 71f0a1806f58cfe9364e848b0941cf60f4718242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Lind=C3=A9n?= Date: Wed, 8 Apr 2015 22:05:37 +0200 Subject: [PATCH 1/6] reorder configuration options --- wscript | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/wscript b/wscript index 9d3d6c89..5d6de660 100644 --- a/wscript +++ b/wscript @@ -68,25 +68,34 @@ def options(opt): opt.tool_options('compiler_cxx') opt.tool_options('compiler_cc') + # install directories opt.add_option('--libdir', type='string', help="Library directory [Default: /lib]") opt.add_option('--libdir32', type='string', help="32bit Library directory [Default: /lib32]") opt.add_option('--mandir', type='string', help="Manpage directory [Default: /share/man/man1]") - opt.add_option('--dbus', action='store_true', default=False, help='Enable D-Bus JACK (jackdbus)') + + # options affecting binaries opt.add_option('--dist-target', type='string', default='auto', help='Specify the target for cross-compiling [auto,mingw]') + opt.add_option('--mixed', action='store_true', default=False, help='Build with 32/64 bits mixed mode') + opt.add_option('--debug', action='store_true', default=False, dest='debug', help='Build debuggable binaries') + + # options affecting general jack functionality opt.add_option('--classic', action='store_true', default=False, help='Force enable standard JACK (jackd) even if D-Bus JACK (jackdbus) is enabled too') - opt.add_option('--doxygen', action='store_true', default=False, help='Enable build of doxygen documentation') + opt.add_option('--dbus', action='store_true', default=False, help='Enable D-Bus JACK (jackdbus)') + opt.add_option('--autostart', type='string', default="default", help='Autostart method. Possible values: "default", "classic", "dbus", "none"') opt.add_option('--profile', action='store_true', default=False, help='Build with engine profiling') - opt.add_option('--mixed', action='store_true', default=False, help='Build with 32/64 bits mixed mode') opt.add_option('--clients', default=64, type="int", dest="clients", help='Maximum number of JACK clients') opt.add_option('--ports-per-application', default=768, type="int", dest="application_ports", help='Maximum number of ports per application') - opt.add_option('--debug', action='store_true', default=False, dest='debug', help='Build debuggable binaries') + + # options with third party dependencies + opt.add_option('--doxygen', action='store_true', default=False, help='Enable build of doxygen documentation') + opt.add_option('--alsa', action='store_true', default=False, help='Enable ALSA driver') opt.add_option('--firewire', action='store_true', default=False, help='Enable FireWire driver (FFADO)') opt.add_option('--freebob', action='store_true', default=False, help='Enable FreeBob driver') - opt.add_option('--alsa', action='store_true', default=False, help='Enable ALSA driver') opt.add_option('--iio', action='store_true', default=False, help='Enable IIO driver') - opt.add_option('--autostart', type='string', default="default", help='Autostart method. Possible values: "default", "classic", "dbus", "none"') opt.add_option('--portaudio', action='store_true', default=False, help='Enable Portaudio driver') opt.add_option('--winmme', action='store_true', default=False, help='Enable WinMME driver') + + # dbus options opt.sub_options('dbus') def configure(conf): From ca66dd1c901e364466cbb5b29b5a8ad1bb760bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Lind=C3=A9n?= Date: Wed, 8 Apr 2015 23:35:07 +0200 Subject: [PATCH 2/6] specify mandatory=False when checking for expat so that the expat error message can be reached if expat is not found --- dbus/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbus/wscript b/dbus/wscript index 2129bbf5..24a77729 100644 --- a/dbus/wscript +++ b/dbus/wscript @@ -29,7 +29,7 @@ def configure(conf): else: conf.env['DBUS_SERVICES_DIR'] = os.path.normpath(conf.env['PREFIX'] + '/share/dbus-1/services') - conf.check(header_name='expat.h', define_name="HAVE_EXPAT") + conf.check(header_name='expat.h', define_name="HAVE_EXPAT", mandatory=False) if conf.is_defined('HAVE_EXPAT'): conf.env['LIB_EXPAT'] = ['expat'] From f1c308e434082b1b08ea8e8b983aefd6bebe5e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Lind=C3=A9n?= Date: Wed, 8 Apr 2015 23:44:14 +0200 Subject: [PATCH 3/6] use pkg-config to find expat and drop explicit HAVE_EXPAT and LIB_EXPAT since they are set by check_cfg --- dbus/wscript | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dbus/wscript b/dbus/wscript index 24a77729..e9849218 100644 --- a/dbus/wscript +++ b/dbus/wscript @@ -29,11 +29,7 @@ def configure(conf): else: conf.env['DBUS_SERVICES_DIR'] = os.path.normpath(conf.env['PREFIX'] + '/share/dbus-1/services') - conf.check(header_name='expat.h', define_name="HAVE_EXPAT", mandatory=False) - - if conf.is_defined('HAVE_EXPAT'): - conf.env['LIB_EXPAT'] = ['expat'] - else: + if not conf.check_cfg(package='expat', args='--cflags --libs', mandatory=False): print(Logs.colors.RED + 'WARNING !! jackdbus will not be built because of expat is missing' + Logs.colors.NORMAL) return From 213f3ba20a5b4ccd85555ed21469981a817b7ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Lind=C3=A9n?= Date: Wed, 8 Apr 2015 23:48:48 +0200 Subject: [PATCH 4/6] drop unnecessary conf.is_defined('HAVE_DBUS_1') since it is the same as conf.check_cfg(package='dbus-1', ...) --- dbus/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbus/wscript b/dbus/wscript index e9849218..1ecfc54a 100644 --- a/dbus/wscript +++ b/dbus/wscript @@ -12,7 +12,7 @@ def options(opt): def configure(conf): conf.env['BUILD_JACKDBUS'] = False - if not conf.check_cfg(package='dbus-1', atleast_version='1.0.0', args='--cflags --libs') or not conf.is_defined('HAVE_DBUS_1'): + if not conf.check_cfg(package='dbus-1', atleast_version='1.0.0', args='--cflags --libs'): print(Logs.colors.RED + 'WARNING !! jackdbus will not be built because libdbus-dev is missing' + Logs.colors.NORMAL) return From 8accf6531a81f96bf850933d272d4a4bdb5616de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Lind=C3=A9n?= Date: Wed, 8 Apr 2015 23:51:49 +0200 Subject: [PATCH 5/6] add mandatory=False to dbus-1 check so that the custom error message is shown if dbus-1 is missing --- dbus/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbus/wscript b/dbus/wscript index 1ecfc54a..a2cb373e 100644 --- a/dbus/wscript +++ b/dbus/wscript @@ -12,7 +12,7 @@ def options(opt): def configure(conf): conf.env['BUILD_JACKDBUS'] = False - if not conf.check_cfg(package='dbus-1', atleast_version='1.0.0', args='--cflags --libs'): + if not conf.check_cfg(package='dbus-1', atleast_version='1.0.0', args='--cflags --libs', mandatory=False): print(Logs.colors.RED + 'WARNING !! jackdbus will not be built because libdbus-dev is missing' + Logs.colors.NORMAL) return From c412d8384f4f5e348136835917983579d2fae677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Lind=C3=A9n?= Date: Wed, 8 Apr 2015 23:53:54 +0200 Subject: [PATCH 6/6] replace WARNING with ERROR in configure messages --- dbus/wscript | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dbus/wscript b/dbus/wscript index a2cb373e..87f1ffa8 100644 --- a/dbus/wscript +++ b/dbus/wscript @@ -13,12 +13,12 @@ def configure(conf): conf.env['BUILD_JACKDBUS'] = False if not conf.check_cfg(package='dbus-1', atleast_version='1.0.0', args='--cflags --libs', mandatory=False): - print(Logs.colors.RED + 'WARNING !! jackdbus will not be built because libdbus-dev is missing' + Logs.colors.NORMAL) + print(Logs.colors.RED + 'ERROR !! jackdbus will not be built because libdbus-dev is missing' + Logs.colors.NORMAL) return dbus_dir = conf.check_cfg(package='dbus-1', args='--variable=session_bus_services_dir') if not dbus_dir: - print(Logs.colors.RED + 'WARNING !! jackdbus will not be built because service dir is unknown' + Logs.colors.NORMAL) + print(Logs.colors.RED + 'ERROR !! jackdbus will not be built because service dir is unknown' + Logs.colors.NORMAL) return dbus_dir = dbus_dir.strip() @@ -30,7 +30,7 @@ def configure(conf): conf.env['DBUS_SERVICES_DIR'] = os.path.normpath(conf.env['PREFIX'] + '/share/dbus-1/services') if not conf.check_cfg(package='expat', args='--cflags --libs', mandatory=False): - print(Logs.colors.RED + 'WARNING !! jackdbus will not be built because of expat is missing' + Logs.colors.NORMAL) + print(Logs.colors.RED + 'ERROR !! jackdbus will not be built because of expat is missing' + Logs.colors.NORMAL) return conf.env['BUILD_JACKDBUS'] = True