diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-03-17 06:59:31 +0000 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-03-17 06:59:31 +0000 |
commit | 2fa61afb4e8d575c3d5facf4072e91187945e163 (patch) | |
tree | ad36239fc1d157696a11ccf98915cad1fa56af58 /configure.ac | |
parent | 75fd3688f52f3d9574cf7204fd74c9eb9f2a639b (diff) | |
download | xine-lib-2fa61afb4e8d575c3d5facf4072e91187945e163.tar.gz xine-lib-2fa61afb4e8d575c3d5facf4072e91187945e163.tar.bz2 |
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
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 38 |
1 files changed, 18 insertions, 20 deletions
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 <soundcard.h> - #else - #include <sys/soundcard.h> - #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 <sys/soundcard.h> + #endif + #ifdef HAVE_MACHINE_SOUNDCARD_H + # include <sys/soundcard.h> + #endif + #ifdef HAVE_SOUNDCARD_H + # include <soundcard.h> + #endif + ]) + + AC_IOCTL_REQUEST fi + AM_CONDITIONAL(HAVE_OSS, test "x$have_ossaudio" = "xyes") |