diff options
| author | Ken Raeburn | 2000-07-05 19:33:00 +0000 |
|---|---|---|
| committer | Ken Raeburn | 2000-07-05 19:33:00 +0000 |
| commit | 80fcd514bbc519721a2c11e479c6fd1f0f6efb96 (patch) | |
| tree | 11be53ea9730804c895ec42b6487dec66a8d0b1a /src | |
| parent | b192d653daad26b27e58f9a1a37593a9ce5a6bca (diff) | |
| download | emacs-80fcd514bbc519721a2c11e479c6fd1f0f6efb96.tar.gz emacs-80fcd514bbc519721a2c11e479c6fd1f0f6efb96.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 14 | ||||
| -rw-r--r-- | src/Makefile.in | 5 | ||||
| -rw-r--r-- | src/config.in | 4 | ||||
| -rw-r--r-- | src/s/netbsd.h | 2 | ||||
| -rw-r--r-- | src/sound.c | 10 |
5 files changed, 33 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2272fac3bf9..5eb68cd9390 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,17 @@ | |||
| 1 | 2000-07-05 Ken Raeburn <raeburn@gnu.org> | ||
| 2 | |||
| 3 | Sound support for NetBSD through "Linux emulation" support: | ||
| 4 | * config.in (HAVE_SOUNDCARD_H): Undef. | ||
| 5 | (HAVE_SOUND): Define if HAVE_SOUNDCARD_H. | ||
| 6 | * Makefile.in (LIBSOUND): New variable. | ||
| 7 | (LIBES): Include it. | ||
| 8 | * sound.c [HAVE_SOUNDCARD_H]: Include <sys/ioctl.h> and | ||
| 9 | <soundcard.h>. | ||
| 10 | (DEFAULT_SOUND_DEVICE): Define to "/dev/dsp" if not defined | ||
| 11 | elsewhere. | ||
| 12 | (vox_open): Use DEFAULT_SOUND_DEVICE. | ||
| 13 | * s/netbsd.h (DEFAULT_SOUND_DEVICE): Define to /dev/audio. | ||
| 14 | |||
| 1 | 2000-07-05 Gerd Moellmann <gerd@gnu.org> | 15 | 2000-07-05 Gerd Moellmann <gerd@gnu.org> |
| 2 | 16 | ||
| 3 | * print.c (print_error_message): If Vsignaling_function is set, | 17 | * print.c (print_error_message): If Vsignaling_function is set, |
diff --git a/src/Makefile.in b/src/Makefile.in index fce7a652a59..58113d3441e 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -417,6 +417,8 @@ LIBX= $(LIBXMENU) LD_SWITCH_X_SITE -lX10 LIBX10_MACHINE LIBX10_SYSTEM | |||
| 417 | #endif /* not HAVE_X11 */ | 417 | #endif /* not HAVE_X11 */ |
| 418 | #endif /* not HAVE_X_WINDOWS */ | 418 | #endif /* not HAVE_X_WINDOWS */ |
| 419 | 419 | ||
| 420 | LIBSOUND= @LIBSOUND@ | ||
| 421 | |||
| 420 | #ifndef ORDINARY_LINK | 422 | #ifndef ORDINARY_LINK |
| 421 | /* Fix linking if compiled with GCC. */ | 423 | /* Fix linking if compiled with GCC. */ |
| 422 | #ifdef __GNUC__ | 424 | #ifdef __GNUC__ |
| @@ -794,7 +796,8 @@ SOME_MACHINE_LISP = ${dotdot}/lisp/menu-bar.elc ${dotdot}/lisp/mouse.elc \ | |||
| 794 | Note that SunOS needs -lm to come before -lc; otherwise, you get | 796 | Note that SunOS needs -lm to come before -lc; otherwise, you get |
| 795 | duplicated symbols. If the standard libraries were compiled | 797 | duplicated symbols. If the standard libraries were compiled |
| 796 | with GCC, we might need gnulib again after them. */ | 798 | with GCC, we might need gnulib again after them. */ |
| 797 | LIBES = $(LOADLIBES) $(LIBS) $(LIBX) LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \ | 799 | LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) \ |
| 800 | LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \ | ||
| 798 | LIBS_DEBUG $(GETLOADAVG_LIBS) $(GNULIB_VAR) LIB_MATH LIB_STANDARD \ | 801 | LIBS_DEBUG $(GETLOADAVG_LIBS) $(GNULIB_VAR) LIB_MATH LIB_STANDARD \ |
| 799 | $(GNULIB_VAR) | 802 | $(GNULIB_VAR) |
| 800 | 803 | ||
diff --git a/src/config.in b/src/config.in index 6530987ca1c..10a7080416e 100644 --- a/src/config.in +++ b/src/config.in | |||
| @@ -136,6 +136,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 136 | /* Header for Voxware or PCM sound card driver. */ | 136 | /* Header for Voxware or PCM sound card driver. */ |
| 137 | #undef HAVE_MACHINE_SOUNDCARD_H | 137 | #undef HAVE_MACHINE_SOUNDCARD_H |
| 138 | #undef HAVE_SYS_SOUNDCARD_H | 138 | #undef HAVE_SYS_SOUNDCARD_H |
| 139 | #undef HAVE_SOUNDCARD_H | ||
| 139 | 140 | ||
| 140 | /* Define HAVE_SOUND if we have sound support. */ | 141 | /* Define HAVE_SOUND if we have sound support. */ |
| 141 | #ifdef HAVE_MACHINE_SOUNDCARD_H | 142 | #ifdef HAVE_MACHINE_SOUNDCARD_H |
| @@ -144,6 +145,9 @@ Boston, MA 02111-1307, USA. */ | |||
| 144 | #ifdef HAVE_SYS_SOUNDCARD_H | 145 | #ifdef HAVE_SYS_SOUNDCARD_H |
| 145 | #define HAVE_SOUND 1 | 146 | #define HAVE_SOUND 1 |
| 146 | #endif | 147 | #endif |
| 148 | #ifdef HAVE_SOUNDCARD_H | ||
| 149 | #define HAVE_SOUND 1 | ||
| 150 | #endif | ||
| 147 | 151 | ||
| 148 | /* Some things figured out by the configure script, grouped as they are in | 152 | /* Some things figured out by the configure script, grouped as they are in |
| 149 | configure.in. */ | 153 | configure.in. */ |
diff --git a/src/s/netbsd.h b/src/s/netbsd.h index 4209fc947ef..79d738991fc 100644 --- a/src/s/netbsd.h +++ b/src/s/netbsd.h | |||
| @@ -87,3 +87,5 @@ | |||
| 87 | #define LINKER $(CC) -nostartfiles | 87 | #define LINKER $(CC) -nostartfiles |
| 88 | 88 | ||
| 89 | #define NARROWPROTO 1 | 89 | #define NARROWPROTO 1 |
| 90 | |||
| 91 | #define DEFAULT_SOUND_DEVICE "/dev/audio" | ||
diff --git a/src/sound.c b/src/sound.c index 965285a9c5f..a3a44ccefca 100644 --- a/src/sound.c +++ b/src/sound.c | |||
| @@ -41,6 +41,14 @@ Boston, MA 02111-1307, USA. */ | |||
| 41 | #ifdef HAVE_SYS_SOUNDCARD_H | 41 | #ifdef HAVE_SYS_SOUNDCARD_H |
| 42 | #include <sys/soundcard.h> | 42 | #include <sys/soundcard.h> |
| 43 | #endif | 43 | #endif |
| 44 | #ifdef HAVE_SOUNDCARD_H | ||
| 45 | #include <sys/ioctl.h> | ||
| 46 | #include <soundcard.h> | ||
| 47 | #endif | ||
| 48 | |||
| 49 | #ifndef DEFAULT_SOUND_DEVICE | ||
| 50 | #define DEFAULT_SOUND_DEVICE "/dev/dsp" | ||
| 51 | #endif | ||
| 44 | 52 | ||
| 45 | #define max(X, Y) ((X) > (Y) ? (X) : (Y)) | 53 | #define max(X, Y) ((X) > (Y) ? (X) : (Y)) |
| 46 | #define min(X, Y) ((X) < (Y) ? (X) : (Y)) | 54 | #define min(X, Y) ((X) < (Y) ? (X) : (Y)) |
| @@ -736,7 +744,7 @@ vox_open (sd) | |||
| 736 | if (sd->file) | 744 | if (sd->file) |
| 737 | file = sd->file; | 745 | file = sd->file; |
| 738 | else | 746 | else |
| 739 | file = "/dev/dsp"; | 747 | file = DEFAULT_SOUND_DEVICE; |
| 740 | 748 | ||
| 741 | sd->fd = emacs_open (file, O_WRONLY, 0); | 749 | sd->fd = emacs_open (file, O_WRONLY, 0); |
| 742 | if (sd->fd < 0) | 750 | if (sd->fd < 0) |