diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-11-29 09:01:14 +0100 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2013-11-29 23:11:12 +0100 |
commit | fa620ffc956953b39bb683abb2679bbbfc364915 (patch) | |
tree | 53814a8fb30e3a3984fafe98a198358e5b336809 /waftools/fragments | |
parent | 18345400c022ad644ff5dafe1383110c47e7d533 (diff) | |
download | mpv-fa620ffc956953b39bb683abb2679bbbfc364915.tar.bz2 mpv-fa620ffc956953b39bb683abb2679bbbfc364915.tar.xz |
build: reimplement the OSS checks using a more declarative approach
The OSS checks were a big mess and quite buggy. This reimplementes them using
a declarative approach and clearly distinguishing between the various OSS
implementations. The code should now almost be auto-documenting.
We currently support the following implementations of OSS:
* platform-specific (with `sys/soundcard.h`)
* SunAudio (default on NetBSD and useable on OpenBSD even if we have sndio
support there).
* 4Front (default on FreeBSD)
Since now each OSS check also checks for the appropriate soundcard header,
remove the old soundcard check.
Many thanks to @bugmen0t for in depth info about all the BSDs.
Check #380 and #359 for more info on this commit.
Diffstat (limited to 'waftools/fragments')
-rw-r--r-- | waftools/fragments/oss_audio.c | 6 | ||||
-rw-r--r-- | waftools/fragments/oss_audio_header.c | 13 | ||||
-rw-r--r-- | waftools/fragments/oss_audio_sunaudio.c | 6 |
3 files changed, 6 insertions, 19 deletions
diff --git a/waftools/fragments/oss_audio.c b/waftools/fragments/oss_audio.c index e23979da97..c1a5488f97 100644 --- a/waftools/fragments/oss_audio.c +++ b/waftools/fragments/oss_audio.c @@ -1,10 +1,4 @@ -#if HAVE_SOUNDCARD_H -#include <soundcard.h> -#endif - -#if HAVE_SYS_SOUNDCARD_H #include <sys/soundcard.h> -#endif int main(int argc, char **argv) { return SNDCTL_DSP_SETFRAGMENT; diff --git a/waftools/fragments/oss_audio_header.c b/waftools/fragments/oss_audio_header.c deleted file mode 100644 index 980eb69215..0000000000 --- a/waftools/fragments/oss_audio_header.c +++ /dev/null @@ -1,13 +0,0 @@ -#if HAVE_SOUNDCARD_H -#include <soundcard.h> -#endif - -#if HAVE_SYS_SOUNDCARD_H -#include <sys/soundcard.h> -#endif - -#ifdef OPEN_SOUND_SYSTEM -int main(void) {{ return 0; }} -#else -#error Not the real thing -#endif diff --git a/waftools/fragments/oss_audio_sunaudio.c b/waftools/fragments/oss_audio_sunaudio.c new file mode 100644 index 0000000000..d5208f558c --- /dev/null +++ b/waftools/fragments/oss_audio_sunaudio.c @@ -0,0 +1,6 @@ +#include <soundcard.h> + +int main(int argc, char **argv) { + return SNDCTL_DSP_SETFRAGMENT; +} + |