# HG changeset patch # User Cristi Magherusan # Date 1183773246 -10800 # Node ID e49e02828f85160c9057e255983e8e884bf8dced # Parent 36cc5e56246e4a18615e73ff00bdddb0f51114f8 OSS4 VMIX-enabled fork of the OSS3 output plugin (just bypasses the mixer settings). Warning!!! The ALSA and OSS3 users will experience build failures because it's enabled by default. Anyway, now you have another reason to switch ;) diff -r 36cc5e56246e -r e49e02828f85 configure.ac --- a/configure.ac Fri Jul 06 17:37:21 2007 +0200 +++ b/configure.ac Sat Jul 07 04:54:06 2007 +0300 @@ -843,6 +843,76 @@ AC_SUBST(OSS_LIBS) + +dnl *** OSS4 output + +AC_ARG_ENABLE(oss4, + [ --disable-oss4 disable the OSS4 output plugin (default=enabled)], + [enable_oss4=$enableval], + [enable_oss4=yes] +) + +have_oss4=no +if test "$enable_oss4" = "yes"; then + AC_MSG_CHECKING(for OSS4 include dir) + OSS4_CFLAGS="" + if test -f "/etc/oss.conf" ; then + for i in `cat /etc/oss.conf`; do + t=`echo $i | sed -e 's/OSSLIBDIR=//'` + if test "$i" != "$t" ; then + if test -f "$t/include/sys/soundcard.h" -o -f "$i/include/soundcard.h" ; then + OSS4_CFLAGS="-I$t/include" + fi + fi + done + fi + if test -n "$OSS4_CFLAGS" ; then + AC_MSG_RESULT([$OSS4_CFLAGS]) + else + AC_MSG_RESULT([not found]) + fi + CFLAGS_save=$CFLAGS + CFLAGS="$CFLAGS $OSS4_CFLAGS" + AC_CHECK_HEADERS(soundcard.h) + AC_CHECK_HEADERS(sys/soundcard.h) + AC_CHECK_HEADERS(machine/soundcard.h) + CFLAGS=$CFLAGS_save + + if test "${ac_cv_header_soundcard_h}" = "yes" || test "${ac_cv_header_sys_soundcard_h}" = "yes" || test "${ac_cv_header_machine_soundcard_h}" = "yes"; then + have_oss4=yes + fi + + if test "${have_oss4}" = "yes"; then + AC_MSG_CHECKING(whether we need -lossaudio) + AC_TRY_LINK([ + #include + #ifdef HAVE_SYS_SOUNDCARD_H + #include + #else + #include + #endif + ], [ + int fd, value; + ioctl(fd, SOUND_MIXER_READ_VOLUME, &value); + ], AC_MSG_RESULT(no), [ + OSS_LIBS="-lossaudio" + AC_MSG_RESULT(yes) + ]) + fi +fi + +if test "$have_oss4" = "yes"; then + AC_DEFINE(HAVE_OSS4, 1, [Define if the OSS4 output plugin should be built]) +else + have_oss4=no +fi + +if test "$have_oss4" = "yes"; then + OUTPUT_PLUGINS="$OUTPUT_PLUGINS OSS4" +fi + +AC_SUBST(OSS_LIBS) + dnl *** ALSA output plugin AC_ARG_ENABLE(alsa,