Disable OSS and BSD audio targets on OpenBSD.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 08 Jul 2013 13:26:59 -0400
changeset 7380 e5830832d3f0
parent 7379 b27c778a2bdb
child 7381 aa0d6c66e3fa
Disable OSS and BSD audio targets on OpenBSD.
configure.in
--- a/configure.in	Mon Jul 08 09:21:54 2013 -0700
+++ b/configure.in	Mon Jul 08 13:26:59 2013 -0400
@@ -646,8 +646,19 @@
 CheckOSS()
 {
     AC_ARG_ENABLE(oss,
-AC_HELP_STRING([--enable-oss], [support the OSS audio API [[default=yes]]]),
-                  , enable_oss=yes)
+AC_HELP_STRING([--enable-oss], [support the OSS audio API [[default=maybe]]]),
+                  , enable_oss=maybe)
+
+    # OpenBSD "has" OSS, but it's not really for app use. They want you to
+    #  use sndio instead. So on there, we default to disabled. You can force
+    #  it on if you really want, though.
+    if test x$enable_oss = xmaybe; then
+        enable_oss=yes
+        case "$host" in
+            *-*-openbsd*)
+                enable_oss=no;;
+    fi
+
     if test x$enable_audio = xyes -a x$enable_oss = xyes; then
         AC_MSG_CHECKING(for OSS audio support)
         have_oss=no
@@ -2334,7 +2345,7 @@
                 SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
                 have_audio=yes
             ;;
-            netbsd|openbsd)
+            netbsd)  # Don't use this on OpenBSD, it's busted.
                 AC_DEFINE(SDL_AUDIO_DRIVER_BSD, 1, [ ])
                 SOURCES="$SOURCES $srcdir/src/audio/bsd/*.c"
                 have_audio=yes