Debian Codegraph @

m4/oss.m4

raw
1 dnl Usage:
2 dnl AC_CHECK_OSS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
3 dnl Test for OSS audio interface, and defines
4 dnl prerequisites:
5
6 AC_DEFUN([AC_CHECK_OSS],
7 [
8 AC_ARG_ENABLE(oss, [ --enable-oss support the OSS audio API. [[autodetect]]],
9 [], enable_oss=yes)
10 if test x$enable_oss = xyes; then
11 AC_CACHE_CHECK([for OSS audio support], ac_cv_val_have_oss_audio,
12 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
13 #ifdef __NetBSD__
14 #include <sys/ioccom.h>
15 #include <soundcard.h>
16 #else
17 #include <sys/soundcard.h>
18 #endif
19 ]], [[ int arg = SNDCTL_DSP_SETFRAGMENT; ]])],[ ac_cv_val_have_oss_audio=yes ],[ ac_cv_val_have_oss_audio=no ])
20 ])
21 enable_oss=$ac_cv_val_have_oss_audio
22 fi
23
24 if test x$enable_oss = xyes; then
25 AC_CHECK_LIB([ossaudio], [_oss_ioctl])
26 ifelse([$1], , :, [$1])
27 else
28 ifelse([$2], , :, [$2])
29 fi
30 ])
31