Enable ALSA driver in non-linux X11 when available

This commit is contained in:
eska 2016-01-10 17:24:23 +01:00
parent cc34e0dee9
commit 56e65f9e29

View file

@ -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...