summaryrefslogtreecommitdiff
path: root/platform/x11/detect.py
diff options
context:
space:
mode:
authoreska <eska@eska.me>2016-01-10 17:24:23 +0100
committereska <eska@eska.me>2016-01-10 17:52:15 +0100
commit56e65f9e29f3cdf988c19c8534eec7fb88e785ec (patch)
tree28e71bb3a76f4001bc39bea34ee9792599f6621b /platform/x11/detect.py
parentcc34e0dee9e92468f9493d0001a296aa6bd08e6d (diff)
Enable ALSA driver in non-linux X11 when available
Diffstat (limited to 'platform/x11/detect.py')
-rw-r--r--platform/x11/detect.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 344545ab81..e035c72993 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -147,9 +147,13 @@ def configure(env):
env.Append(CPPFLAGS=['-DOPENGL_ENABLED','-DGLEW_ENABLED'])
- if platform.system() == 'Linux':
+
+ if os.system("pkg-config --exists alsa")==0:
+ print("Enabling ALSA")
env.Append(CPPFLAGS=["-DALSA_ENABLED"])
env.Append(LIBS=['asound'])
+ else:
+ print("ALSA libraries not found, disabling driver")
if (env["gamepad"]=="yes" and platform.system() == "Linux"):
# pkg-config returns 0 when the lib exists...