From af6126adbe61fb2b6cc780025246d33df93072e6 Mon Sep 17 00:00:00 2001 From: Josh de Kock Date: Sun, 21 Aug 2016 22:59:08 +0100 Subject: ao_openal: enable building on OSX Signed-off-by: Josh de Kock --- waftools/checks/custom.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'waftools/checks') 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 -- cgit v1.2.3