Improved audio detection.
h3rald h3rald@h3rald.com
Fri, 31 Jul 2026 13:21:11 +0000
1 files changed,
3 insertions(+),
1 deletions(-)
jump to
M
Makefile
→
Makefile
@@ -6,7 +6,9 @@ SOURCES = xyw.c xywasm.c xywrun.c devices/system.c devices/terminal.c devices/clock.c devices/file.c devices/beeper.c
OBJS = xyw.o xywasm.o xywrun.o devices/system.o devices/terminal.o devices/clock.o devices/file.o devices/beeper.o UNAME_S := $(shell uname -s) -HAVE_ALSA := $(shell echo '\#include <alsa/asoundlib.h>' | $(CC) -E - >/dev/null 2>&1 && echo 1) +HAVE_ALSA := $(shell \ + printf 'int main(void){return 0;}\n' | \ + $(CC) -x c - -lasound -o /dev/null >/dev/null 2>&1 && echo 1) # beeper.c picks its audio backend at compile time via #ifdef, so the only # thing the Makefile needs to do is link the matching system library.