Fix build --with-sound on NetBSD and OpenBSD

* configure.ac: Use ossaudio by default on *BSD systems.
(Bug#64698)

* etc/NEWS: Announce the change.
This commit is contained in:
Valtteri Vuorikoski 2023-07-22 20:08:42 +03:00 committed by Eli Zaretskii
parent 04a930a08c
commit 3449ff5b65
2 changed files with 16 additions and 3 deletions

View file

@ -1800,12 +1800,15 @@ if test "${with_sound}" != "no"; then
AC_MSG_ERROR([OSS sound support requested but not found.])
if test "${with_sound}" = "bsd-ossaudio" || test "${with_sound}" = "yes"; then
# Emulation library used on NetBSD.
# OSS emulation library used on NetBSD and OpenBSD.
AC_CHECK_LIB([ossaudio], [_oss_ioctl], [LIBSOUND=-lossaudio], [LIBSOUND=])
test "${with_sound}" = "bsd-ossaudio" && test -z "$LIBSOUND" && \
AC_MSG_ERROR([bsd-ossaudio sound support requested but not found.])
dnl FIXME? If we did find ossaudio, should we set with_sound=bsd-ossaudio?
dnl Traditionally, we go on to check for alsa too. Does that make sense?
# On {Net,Open}BSD use the system audio library instead of
# potentially switching to ALSA below, as ALSA on these appears to
# just wrap system libraries.
test "${with_sound}" = "yes" && test "$LIBSOUND" = "-lossaudio" && \
with_sound="bsd-ossaudio"
fi
AC_SUBST([LIBSOUND])

View file

@ -24,6 +24,16 @@ applies, and please also update docstrings as needed.
* Installation Changes in Emacs 30.1
---
** Emacs now defaults to ossaudio library for sound on NetBSD and OpenBSD.
Previously configure used ALSA libraries if installed on the
system when configured '--with-sound=yes' (which is the default), with
fallback to libossaudio. The libossaudio library included with the
base system is now used even if ALSA is found to avoid relying on
external packages and to resolve potential incompatibilities between
Linux and BSD versions of ALSA. Use '--with-sound=alsa' to build with
ALSA on these operating systems instead.
* Startup Changes in Emacs 30.1