diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-01-02 20:34:14 +0100 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2014-01-02 20:42:03 +0100 |
commit | fb2d418327bf152b9fd87424d44a7909db1e9330 (patch) | |
tree | e8facd63ed340da8f62f40f99d7bca30a01205c2 /waftools/checks/custom.py | |
parent | 52fa38079db796dd87e40ee6890b5d1005139a08 (diff) | |
download | mpv-fb2d418327bf152b9fd87424d44a7909db1e9330.tar.bz2 mpv-fb2d418327bf152b9fd87424d44a7909db1e9330.tar.xz |
build: fix cocoa configure check on OS X 10.7
It failed because the 10.7 SDK doesn't natively support array and dictionary
subscripting.
Diffstat (limited to 'waftools/checks/custom.py')
-rw-r--r-- | waftools/checks/custom.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py index 1b698ec086..16f876e4a2 100644 --- a/waftools/checks/custom.py +++ b/waftools/checks/custom.py @@ -3,7 +3,8 @@ from waftools.checks.generic import * from waflib import Utils import os -__all__ = ["check_pthreads", "check_iconv", "check_lua", "check_oss_4front"] +__all__ = ["check_pthreads", "check_iconv", "check_lua", "check_oss_4front", + "check_cocoa"] pthreads_program = load_fragment('pthreads.c') @@ -101,3 +102,13 @@ def check_oss_4front(ctx, dependency_identifier): fragment=load_fragment('oss_audio.c')) return fn(ctx, dependency_identifier) + +def check_cocoa(ctx, dependency_identifier): + fn = check_cc( + fragment = load_fragment('cocoa.m'), + compile_filename = 'test.m', + framework_name = ['Cocoa', 'IOKit', 'OpenGL'], + includes = ctx.srcnode.abspath(), + linkflags = '-fobjc-arc') + + return fn(ctx, dependency_identifier) |