diff options
author | Josh de Kock <josh@itanimul.li> | 2016-08-21 22:59:08 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-21 12:43:14 +0200 |
commit | af6126adbe61fb2b6cc780025246d33df93072e6 (patch) | |
tree | da06f8fb3eef6123f74645723e8c91a8d263d55a /waftools/checks | |
parent | d080851a3049174fc8a329f5930bc46272b448dc (diff) |
ao_openal: enable building on OSX
Signed-off-by: Josh de Kock <josh@itanimul.li>
Diffstat (limited to 'waftools/checks')
-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 b570b4b836..50a16ce26a 100644 --- a/waftools/checks/custom.py +++ b/waftools/checks/custom.py @@ -4,7 +4,7 @@ from waflib import Utils import os __all__ = ["check_pthreads", "check_iconv", "check_lua", "check_oss_4front", - "check_cocoa"] + "check_cocoa", "check_openal"] pthreads_program = load_fragment('pthreads.c') @@ -116,3 +116,14 @@ def check_cocoa(ctx, dependency_identifier): linkflags = '-fobjc-arc') return fn(ctx, dependency_identifier) + +def check_openal(ctx, dependency_identifier): + checks = [ + check_pkg_config('openal', '>= 1.13'), + check_statement(['OpenAL/AL.h'], 'int i = AL_VERSION', framework='OpenAL') + ] + + for fn in checks: + if fn(ctx, dependency_identifier): + return True + return False |