Linux: Fix build with dbus=no or threads=no

This commit is contained in:
Rémi Verschelde 2025-05-08 16:56:13 +02:00
parent 8f78e7510d
commit e9e8ddc5be
No known key found for this signature in database
GPG key ID: C3336907360768E1
3 changed files with 8 additions and 4 deletions

View file

@ -336,7 +336,7 @@ def configure(env: "SConsEnvironment"):
else:
env.Append(CPPDEFINES=["PULSEAUDIO_ENABLED", "_REENTRANT"])
if env["dbus"]:
if env["dbus"] and env["threads"]: # D-Bus functionality expects threads.
if not env["use_sowrap"]:
if os.system("pkg-config --exists dbus-1") == 0: # 0 means found
env.ParseConfig("pkg-config dbus-1 --cflags --libs")