summaryrefslogtreecommitdiffstats
path: root/waftools
diff options
context:
space:
mode:
authorJosh de Kock <josh@itanimul.li>2016-08-21 22:59:08 +0100
committerwm4 <wm4@nowhere>2016-09-21 12:43:14 +0200
commitaf6126adbe61fb2b6cc780025246d33df93072e6 (patch)
treeda06f8fb3eef6123f74645723e8c91a8d263d55a /waftools
parentd080851a3049174fc8a329f5930bc46272b448dc (diff)
downloadmpv-af6126adbe61fb2b6cc780025246d33df93072e6.tar.bz2
mpv-af6126adbe61fb2b6cc780025246d33df93072e6.tar.xz
ao_openal: enable building on OSX
Signed-off-by: Josh de Kock <josh@itanimul.li>
Diffstat (limited to 'waftools')
-rw-r--r--waftools/checks/custom.py13
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