diff options
author | Thomas Klausner <tk@giga.or.at> | 2014-05-18 22:29:28 +0300 |
---|---|---|
committer | Thomas Klausner <tk@giga.or.at> | 2014-05-18 22:29:28 +0300 |
commit | bd95c97791511a83b804e73ff989935731d7faac (patch) | |
tree | d9d67e68aafe68913d6ac8c91b30ad7ce0aa5743 | |
parent | 66f500e57bb65193d439d02e1058d1145f3ede6f (diff) | |
download | xine-lib-bd95c97791511a83b804e73ff989935731d7faac.tar.gz xine-lib-bd95c97791511a83b804e73ff989935731d7faac.tar.bz2 |
Add OSS audio support on NetBSD & OpenBSD
On NetBSD and OpenBSD, OSS support is handled by the libossaudio library.
Additionally, the NetBSD sys/soundcard.h needs sys/ioctl.h included beforehand.
-rw-r--r-- | m4/audio_out.m4 | 16 | ||||
-rw-r--r-- | src/audio_out/Makefile.am | 2 |
2 files changed, 16 insertions, 2 deletions
diff --git a/m4/audio_out.m4 b/m4/audio_out.m4 index 5041dfbba..e85799e4b 100644 --- a/m4/audio_out.m4 +++ b/m4/audio_out.m4 @@ -151,9 +151,22 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl OSS (Open Sound System) XINE_ARG_ENABLE([oss], [Enable OSS (Open Sound System) support]) if test x"$enable_oss" != x"no"; then + + case "$host" in + *-*-netbsd*|*-*-openbsd*) + OSS_LIBS="-lossaudio" + ;; + *) + OSS_LIBS="" + ;; + esac + AC_CHECK_HEADERS([sys/soundcard.h machine/soundcard.h soundcard.h], [break]) AC_CHECK_DECL([SNDCTL_DSP_SETFRAGMENT], [have_oss=yes], [have_oss=no], - [#ifdef HAVE_SYS_SOUNDCARD_H + [#ifdef __NetBSD__ + #include <sys/ioctl.h> + #endif + #ifdef HAVE_SYS_SOUNDCARD_H # include <sys/soundcard.h> #endif #ifdef HAVE_MACHINE_SOUNDCARD_H @@ -167,6 +180,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ fi fi AM_CONDITIONAL([ENABLE_OSS], [test x"$have_oss" = x"yes"]) + AC_SUBST(OSS_LIBS) dnl PulseAudio diff --git a/src/audio_out/Makefile.am b/src/audio_out/Makefile.am index 1f9c31276..c020f79c3 100644 --- a/src/audio_out/Makefile.am +++ b/src/audio_out/Makefile.am @@ -83,7 +83,7 @@ xineplug_ao_out_file_la_SOURCES = audio_file_out.c xineplug_ao_out_file_la_LIBADD = $(XINE_LIB) $(LTLIBINTL) xineplug_ao_out_oss_la_SOURCES = audio_oss_out.c -xineplug_ao_out_oss_la_LIBADD = $(XINE_LIB) $(LTLIBINTL) +xineplug_ao_out_oss_la_LIBADD = $(XINE_LIB) $(LTLIBINTL) $(OSS_LIBS) xineplug_ao_out_alsa_la_SOURCES = audio_alsa_out.c xineplug_ao_out_alsa_la_LIBADD = $(XINE_LIB) $(ALSA_LIBS) $(PTHREAD_LIBS) $(LTLIBINTL) |