diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-04-27 19:58:54 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-04-27 19:59:40 -0400 |
commit | c0673497a657e134fc958bea97a58d591cb7ed7d (patch) | |
tree | 9765ee82840a156eff83b43718f821f275aae894 /gtk2_ardour | |
parent | b961c1d8f286dafb732b814a450a835b82c779e0 (diff) |
add a new configure-time for Cocoa live resizing macros
These were added in 10.6 but we're trying to be nice and look for the feature,
not some version
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/wscript | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 4543bc022a..76992a25be 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -1,6 +1,7 @@ #!/usr/bin/env python from waflib.extras import autowaf as autowaf from waflib import Options, TaskGen +from waflib.ConfigSet import ConfigSet import waflib.Logs as Logs, waflib.Utils as Utils import os import shutil @@ -11,11 +12,18 @@ from waflib.Task import Task from waflib.Tools import winres import subprocess import glob +import copy # Mandatory variables top = '.' out = 'build' +from waflib import TaskGen +@TaskGen.extension('.m') +def m_hook(self, node): + """Alias .m files to be compiled the same as .c files, gcc will do the right thing.""" + return self.create_compiled_task('c', node) + path_prefix = 'gtk2_ardour/' gtk2_ardour_sources = [ @@ -322,6 +330,26 @@ def configure(conf): autowaf.check_pkg(conf, 'x11', uselib_store='X11', atleast_version='1.1', mandatory=False) autowaf.check_pkg(conf, 'fontconfig', uselib_store='FONTCONFIG') + + if sys.platform == 'darwin': + retval = conf.run_c_code (code='#include <AppKit/NSWindow.h>\n\ + int main(void) { (void) NSWindowWillStartLiveResizeNotification; return 0; }\n', + env = conf.env.derive (), + features = [ 'c' ], + compiler = 'cc', + compile_filename='test.m', + msg = 'Checking for Cocoa live resizing constants', + okmsg = 'ok', + errmsg = 'too old - AU plugin windows will be fixed size', + mandatory = False, + ) + + if retval == 0: + autowaf.display_msg (conf, 'Checking for Cocoa live resizing constants', 'ok') + conf.define ('HAVE_COCOA_LIVE_RESIZING', 1) + else: + autowaf.display_msg (conf, 'Checking for Cocoa live resizing constants', 'too old - AU plugin windows will be fixed size') + conf.write_config_header('gtk2ardour-config.h', remove=False) bak = conf.env['define_key'] |