From b662d95c2e64ef9c40d1a9293d86b94debe7e787 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Sat, 30 Nov 2024 17:21:18 -0500
Subject: [PATCH] Fix PulseAudio build option display

The macro was only define in the xpdev GNUmakefile, not in Common,
so bbslist.c did not know if it was enabled or not, and always
showed it as disabled.
---
 src/xpdev/Common.gmake | 11 +++++++++++
 src/xpdev/GNUmakefile  |  7 -------
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/xpdev/Common.gmake b/src/xpdev/Common.gmake
index 12c6fdb12b..f7e9b825e0 100644
--- a/src/xpdev/Common.gmake
+++ b/src/xpdev/Common.gmake
@@ -218,3 +218,14 @@ ifeq ($(shell if [ -f /usr/include/alsa/asoundlib.h ] ; then echo YES ; fi),YES)
  XPDEV-MT_LIBS += -ldl
  XPDEV_LIBS += -ldl
 endif
+
+ifndef NO_PULSEAUDIO
+ ifeq ($(shell command -v pkg-config > /dev/null && pkg-config --exists libpulse-simple && echo 'YES'),YES)
+  XPDEV-CFLAGS += -DWITH_PULSEAUDIO `pkg-config libpulse-simple --cflags`
+  XPDEV-MT_CFLAGS += -DWITH_PULSEAUDIO `pkg-config libpulse-simple --cflags`
+  ifeq ($(os),linux)
+   XPDEV-MT_LIBS += -ldl
+   XPDEV_LIBS += -ldl
+  endif
+ endif
+endif
diff --git a/src/xpdev/GNUmakefile b/src/xpdev/GNUmakefile
index 9788fbbc7a..16d7a036a0 100644
--- a/src/xpdev/GNUmakefile
+++ b/src/xpdev/GNUmakefile
@@ -8,13 +8,6 @@ ifndef win
  MTOBJS	+=	$(MTOBJODIR)$(DIRSEP)xpevent$(OFILE)
 endif
 
-ifndef NO_PULSEAUDIO
- ifeq ($(shell command -v pkg-config > /dev/null && pkg-config --exists libpulse-simple && echo 'YES'),YES)
-  CFLAGS += -DWITH_PULSEAUDIO `pkg-config libpulse-simple --cflags`
-  MT_CFLAGS += -DWITH_PULSEAUDIO `pkg-config libpulse-simple --cflags`
- endif
-endif
-
 CFLAGS +=  -I. $(XPDEV_CFLAGS)
 ifndef WITHOUT_ALSA_SOUND
 	ifeq ($(shell if [ -f /usr/include/alsa/asoundlib.h ] ; then echo YES ; fi),YES)
-- 
GitLab