From 4a6f026c9395491ecd001be9a0cbdde792888b98 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Mon, 27 Apr 2015 10:47:46 +1000 Subject: [PATCH 1/3] Fix check for mmsystem.h when building with --winmme option The mmsystem.h header check didn't include windows.h so check fails even though mmsystem.h was present. --- wscript | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/wscript b/wscript index e1ffd641..7694738a 100644 --- a/wscript +++ b/wscript @@ -400,6 +400,21 @@ def check_for_readline(conf): def check_for_readline_error(conf): print_error('--readline requires the readline/readline.h header, but it cannot be found.') +def check_for_mmsystem(conf): + try: + conf.check_cc(fragment=''' + #include + #include + int main(void) { return 0; }''', + execute=False, + msg='Checking for header mmsystem.h') + return True + except conf.errors.ConfigurationError: + return False + +def check_for_mmsystem_error(conf): + print_error('--winmme requires the mmsystem.h header, but it cannot be found.') + def options(opt): # options provided by the modules opt.tool_options('compiler_cxx') @@ -440,8 +455,7 @@ def options(opt): portaudio.add_header('windows.h') # only build portaudio on windows portaudio.add_package('portaudio-2.0', uselib_store='PORTAUDIO', atleast_version='19') winmme = add_auto_option(opt, 'winmme', help='Enable WinMME driver', conf_dest='BUILD_DRIVER_WINMME') - winmme.add_header('mmsystem.h') - winmme.add_header('windows.h') + winmme.set_check_hook(check_for_mmsystem, check_for_mmsystem_error) celt = add_auto_option(opt, 'celt', help='Build with CELT') celt.set_check_hook(check_for_celt, check_for_celt_error) From 40587b73451d1c10de2f79b33a56930f97dccf15 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Mon, 27 Apr 2015 11:44:31 +1000 Subject: [PATCH 2/3] Fix transport example client for waf/mingw build --- example-clients/transport.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/example-clients/transport.c b/example-clients/transport.c index a3939368..4847c1b8 100644 --- a/example-clients/transport.c +++ b/example-clients/transport.c @@ -459,9 +459,11 @@ int main(int argc, char *argv[]) return 1; } +#ifndef WIN32 signal(SIGQUIT, signal_handler); - signal(SIGTERM, signal_handler); signal(SIGHUP, signal_handler); +#endif + signal(SIGTERM, signal_handler); signal(SIGINT, signal_handler); jack_on_shutdown(client, jack_shutdown, 0); From ae66d7464af9b8689e60792a89c90ceb77607885 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Mon, 27 Apr 2015 11:49:11 +1000 Subject: [PATCH 3/3] Fix windows mingw/waf build when readline is used/present --- example-clients/wscript | 2 ++ 1 file changed, 2 insertions(+) diff --git a/example-clients/wscript b/example-clients/wscript index cee04cc2..ba67614e 100644 --- a/example-clients/wscript +++ b/example-clients/wscript @@ -93,6 +93,8 @@ def build(bld): prog.use += ['RT', 'READLINE'] if bld.env['IS_MACOSX']: prog.use += ['READLINE'] + if bld.env['IS_WINDOWS']: + prog.use += ['READLINE'] prog.target = 'jack_transport' if bld.env['BUILD_EXAMPLE_CLIENT_REC']: