From 09f82fa6eaa4dac6dd1743724b82a99906e64861 Mon Sep 17 00:00:00 2001 From: Hein-Pieter van Braam-Stewart Date: Tue, 16 Feb 2021 16:19:03 +0100 Subject: 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 --- platform/linuxbsd/detect.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'platform/linuxbsd/detect.py') 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") -- cgit v1.2.3