summaryrefslogtreecommitdiff
path: root/platform/linuxbsd
diff options
context:
space:
mode:
authorHein-Pieter van Braam-Stewart <hp@tmm.cx>2021-02-16 16:19:03 +0100
committerHein-Pieter van Braam-Stewart <hp@tmm.cx>2021-02-16 20:31:49 +0100
commit09f82fa6eaa4dac6dd1743724b82a99906e64861 (patch)
treee24fc6d654afcb54eb1fce4e7088a20cf77a6570 /platform/linuxbsd
parentcb64f2d96ba25f516ecd6dfb3e80b7ddbb13971f (diff)
Dynamically load libpulse.so.0 and libasound.so.1 on Linux
By generating stubs using https://github.com/hpvb/dynload-wrapper we can dynamically load libpulse and libasound on systems where it is available. Both are still a build-time requirement but no longer a run-time dependency. For maintenance purposes the wrappers should not need to be re-generated unless we want to bump pulse or asound to an incompatible version. It is unlikely we will want to do this any time soon. This closes #20978
Diffstat (limited to 'platform/linuxbsd')
-rw-r--r--platform/linuxbsd/detect.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py
index 13d1fe3237..40d2078ebb 100644
--- a/platform/linuxbsd/detect.py
+++ b/platform/linuxbsd/detect.py
@@ -310,9 +310,8 @@ def configure(env):
if os.system("pkg-config --exists alsa") == 0: # 0 means found
print("Enabling ALSA")
+ env["alsa"] = True
env.Append(CPPDEFINES=["ALSA_ENABLED", "ALSAMIDI_ENABLED"])
- # Don't parse --cflags, we don't need to add /usr/include/alsa to include path
- env.ParseConfig("pkg-config alsa --libs")
else:
print("ALSA libraries not found, disabling driver")
@@ -320,7 +319,7 @@ def configure(env):
if os.system("pkg-config --exists libpulse") == 0: # 0 means found
print("Enabling PulseAudio")
env.Append(CPPDEFINES=["PULSEAUDIO_ENABLED"])
- env.ParseConfig("pkg-config --cflags --libs libpulse")
+ env.ParseConfig("pkg-config --cflags libpulse")
else:
print("PulseAudio development libraries not found, disabling driver")