From 20d1fc132e7226b2c9d313d51c6c56b1c12a7e7b Mon Sep 17 00:00:00 2001 From: bugmen0t <@> Date: Sat, 7 Dec 2013 16:58:22 +0100 Subject: build: prefer 4Front OSS to native implementations If sys/soundcard.h is actually linux/soundcard.h then it supports only OSSv3 API. This may happen when OSSLIBDIR == /usr while forgetting to replace sys/soundcard.h from glibc. However, after fa620ff waf prefers native implementation which is inferior on Linux. To fix try making waf prefer oss-audio-4front. It's quite unusual to have 4Front OSS installed where native implementation is superior, anyway. Signed-off-by: bugmen0t <@> Make the false positives path also undef the 4Front define. Signed-off-by: Stefano Pigozzi Fixes #396 --- waftools/checks/custom.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'waftools') diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py index 09a5c01018..1b698ec086 100644 --- a/waftools/checks/custom.py +++ b/waftools/checks/custom.py @@ -1,3 +1,4 @@ +from waftools.inflectors import DependencyInflector from waftools.checks.generic import * from waflib import Utils import os @@ -84,6 +85,12 @@ def __get_osslibdir(): def check_oss_4front(ctx, dependency_identifier): oss_libdir = __get_osslibdir() + # avoid false positive from native sys/soundcard.h + if not oss_libdir: + defkey = DependencyInflector(dependency_identifier).define_key() + ctx.undefine(defkey) + return False + soundcard_h = os.path.join(oss_libdir, "include/sys/soundcard.h") include_dir = os.path.join(oss_libdir, "include") -- cgit v1.2.3