From 4a1fd94f0d4de8a87b23668f33f2fd6cb012a854 Mon Sep 17 00:00:00 2001 From: Anton Yabchinskiy Date: Thu, 20 Nov 2014 00:09:39 +0300 Subject: Enable ALSA only for Linux --- platform/x11/detect.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'platform/x11/detect.py') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 1c8d231d4a..e2c84182b4 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -1,6 +1,7 @@ import os import sys +import platform def is_active(): @@ -113,9 +114,11 @@ def configure(env): env.Append(CPPFLAGS=['-DOPENGL_ENABLED','-DGLEW_ENABLED']) - env.Append(CPPFLAGS=["-DALSA_ENABLED"]) + if platform.platform() == 'Linux': + env.Append(CPPFLAGS=["-DALSA_ENABLED"]) + env.Append(LIBS=['asound']) env.Append(CPPFLAGS=['-DX11_ENABLED','-DUNIX_ENABLED','-DGLES2_ENABLED','-DGLES1_ENABLED','-DGLES_OVER_GL']) - env.Append(LIBS=['GL', 'GLU', 'pthread','asound','z']) #TODO detect linux/BSD! + env.Append(LIBS=['GL', 'GLU', 'pthread', 'z']) #env.Append(CPPFLAGS=['-DMPC_FIXED_POINT']) #host compiler is default.. -- cgit v1.2.3 From c26a1b9d7b9ad82d782c574087054b4c49b28821 Mon Sep 17 00:00:00 2001 From: Anton Yabchinskiy Date: Thu, 20 Nov 2014 03:15:45 +0300 Subject: Use libao driver on X11 platform --- platform/x11/detect.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'platform/x11/detect.py') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 1c8d231d4a..d879354f74 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -111,6 +111,11 @@ def configure(env): env.ParseConfig('pkg-config freetype2 --cflags --libs') env.Append(CCFLAGS=['-DFREETYPE_ENABLED']) + + if env['ao'] == 'yes': + env.ParseConfig('pkg-config ao --cflags --libs') + env.Append(CPPFLAGS=['-DAO_ENABLED']) + env.Append(CPPFLAGS=['-DOPENGL_ENABLED','-DGLEW_ENABLED']) env.Append(CPPFLAGS=["-DALSA_ENABLED"]) -- cgit v1.2.3