* config.in (HAVE_SOUNDCARD_H): Undef.
(HAVE_SOUND): Define if HAVE_SOUNDCARD_H.
* Makefile.in (LIBSOUND): New variable.
(LIBES): Include it.
* sound.c [HAVE_SOUNDCARD_H]: Include <sys/ioctl.h> and <soundcard.h>.
(DEFAULT_SOUND_DEVICE): Define to "/dev/dsp" if not defined elsewhere.
(vox_open): Use DEFAULT_SOUND_DEVICE.
* s/netbsd.h (DEFAULT_SOUND_DEVICE): Define to /dev/audio.
+2000-07-05 Ken Raeburn <raeburn@gnu.org>
+
+ Sound support for NetBSD through "Linux emulation" support:
+ * config.in (HAVE_SOUNDCARD_H): Undef.
+ (HAVE_SOUND): Define if HAVE_SOUNDCARD_H.
+ * Makefile.in (LIBSOUND): New variable.
+ (LIBES): Include it.
+ * sound.c [HAVE_SOUNDCARD_H]: Include <sys/ioctl.h> and
+ <soundcard.h>.
+ (DEFAULT_SOUND_DEVICE): Define to "/dev/dsp" if not defined
+ elsewhere.
+ (vox_open): Use DEFAULT_SOUND_DEVICE.
+ * s/netbsd.h (DEFAULT_SOUND_DEVICE): Define to /dev/audio.
+
2000-07-05 Gerd Moellmann <gerd@gnu.org>
* print.c (print_error_message): If Vsignaling_function is set,
#endif /* not HAVE_X11 */
#endif /* not HAVE_X_WINDOWS */
+LIBSOUND= @LIBSOUND@
+
#ifndef ORDINARY_LINK
/* Fix linking if compiled with GCC. */
#ifdef __GNUC__
Note that SunOS needs -lm to come before -lc; otherwise, you get
duplicated symbols. If the standard libraries were compiled
with GCC, we might need gnulib again after them. */
-LIBES = $(LOADLIBES) $(LIBS) $(LIBX) LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
+LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) \
+ LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
LIBS_DEBUG $(GETLOADAVG_LIBS) $(GNULIB_VAR) LIB_MATH LIB_STANDARD \
$(GNULIB_VAR)
/* Header for Voxware or PCM sound card driver. */
#undef HAVE_MACHINE_SOUNDCARD_H
#undef HAVE_SYS_SOUNDCARD_H
+#undef HAVE_SOUNDCARD_H
/* Define HAVE_SOUND if we have sound support. */
#ifdef HAVE_MACHINE_SOUNDCARD_H
#ifdef HAVE_SYS_SOUNDCARD_H
#define HAVE_SOUND 1
#endif
+#ifdef HAVE_SOUNDCARD_H
+#define HAVE_SOUND 1
+#endif
/* Some things figured out by the configure script, grouped as they are in
configure.in. */
#define LINKER $(CC) -nostartfiles
#define NARROWPROTO 1
+
+#define DEFAULT_SOUND_DEVICE "/dev/audio"
#ifdef HAVE_SYS_SOUNDCARD_H
#include <sys/soundcard.h>
#endif
+#ifdef HAVE_SOUNDCARD_H
+#include <sys/ioctl.h>
+#include <soundcard.h>
+#endif
+
+#ifndef DEFAULT_SOUND_DEVICE
+#define DEFAULT_SOUND_DEVICE "/dev/dsp"
+#endif
#define max(X, Y) ((X) > (Y) ? (X) : (Y))
#define min(X, Y) ((X) < (Y) ? (X) : (Y))
if (sd->file)
file = sd->file;
else
- file = "/dev/dsp";
+ file = DEFAULT_SOUND_DEVICE;
sd->fd = emacs_open (file, O_WRONLY, 0);
if (sd->fd < 0)