From 2fa61afb4e8d575c3d5facf4072e91187945e163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Sat, 17 Mar 2007 06:59:31 +0000 Subject: Clean up configure checks for OSS support. Check for the various soundcard.h headers, and then include the best one that has been found on the system. Check for definition of SNDCTL_DSP_SETFRAGMENT in those headers. Check for the correct request parameter type for ioctl(), as also modern Linux uses unsigned long. Don't list all the big endian machines (as they aren't reliable to list anyway, some of them might work with both endians), use WORDS_BIGENDIAN instead. CVS patchset: 8697 CVS date: 2007/03/17 06:59:31 --- configure.ac | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index b0bb4c3f1..f2ca16e17 100644 --- a/configure.ac +++ b/configure.ac @@ -1457,27 +1457,25 @@ dnl --------------------------------------------- dnl OSS style audio interface dnl --------------------------------------------- AC_ARG_ENABLE([oss], - AC_HELP_STRING([--disable-oss], [do not build OSS support]), - [with_oss=$enableval], [with_oss=yes]) - -if test "x$with_oss" = "xyes"; then - AC_MSG_CHECKING(for OSS audio support) - have_ossaudio=no - AC_TRY_COMPILE([ - #ifdef __NetBSD__ - #include - #else - #include - #endif - ],[ - int arg = SNDCTL_DSP_SETFRAGMENT; - ],[ - have_ossaudio=yes - ]) - AC_MSG_RESULT($have_ossaudio) -else - have_ossaudio=no + AS_HELP_STRING([--disable-oss], [Do not build OSS audio output support])) + +if test "x$enable_oss" != "xno"; then + AC_CHECK_HEADERS([sys/soundcard.h machine/soundcard.h soundcard.h], [break]) + AC_CHECK_DECL([SNDCTL_DSP_SETFRAGMENT], [have_ossaudio=yes], [], [ + #ifdef HAVE_SYS_SOUNDCARD_H + # include + #endif + #ifdef HAVE_MACHINE_SOUNDCARD_H + # include + #endif + #ifdef HAVE_SOUNDCARD_H + # include + #endif + ]) + + AC_IOCTL_REQUEST fi + AM_CONDITIONAL(HAVE_OSS, test "x$have_ossaudio" = "xyes") -- cgit v1.2.3