Simplify OSS test by removing OpenBSD specific location of the soundcard.h header OpenBSD has long since stopped using OSS. Remove checking for OpenBSD specific header.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index 3164530..c1100fd 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -59,21 +59,13 @@ macro(CheckOSS)
check_c_source_compiles("
#include <sys/soundcard.h>
int main(int argc, char **argv) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }" HAVE_OSS_SYS_SOUNDCARD_H)
- if(NOT HAVE_OSS_SYS_SOUNDCARD_H)
- check_c_source_compiles("
- #include <soundcard.h>
- int main(int argc, char **argv) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }" HAVE_OSS_SOUNDCARD_H)
- endif()
- if(HAVE_OSS_SYS_SOUNDCARD_H OR HAVE_OSS_SOUNDCARD_H)
+ if(HAVE_OSS_SYS_SOUNDCARD_H)
set(HAVE_OSS TRUE)
file(GLOB OSS_SOURCES ${SDL2_SOURCE_DIR}/src/audio/dsp/*.c)
- if(HAVE_OSS_SOUNDCARD_H)
- set(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H 1)
- endif()
set(SDL_AUDIO_DRIVER_OSS 1)
list(APPEND SOURCE_FILES ${OSS_SOURCES})
- if(NETBSD OR OPENBSD)
+ if(NETBSD)
list(APPEND EXTRA_LIBS ossaudio)
endif()
set(HAVE_SDL_AUDIO TRUE)
diff --git a/configure b/configure
index 8e139dd..b686dd0 100755
--- a/configure
+++ b/configure
@@ -21007,10 +21007,6 @@ fi
# it on if you really want, though.
if test x$enable_oss = xmaybe; then
enable_oss=yes
- case "$host" in
- *-*-openbsd*)
- enable_oss=no;;
- esac
fi
if test x$enable_audio = xyes -a x$enable_oss = xyes; then
@@ -21039,33 +21035,6 @@ then :
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
- if test x$have_oss != xyes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include <soundcard.h>
-
-int
-main (void)
-{
-
- int arg = SNDCTL_DSP_SETFRAGMENT;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"
-then :
-
- have_oss=yes
-
-printf "%s\n" "#define SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H 1" >>confdefs.h
-
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_oss" >&5
printf "%s\n" "$have_oss" >&6; }
if test x$have_oss = xyes; then
@@ -21078,7 +21047,7 @@ printf "%s\n" "#define SDL_AUDIO_DRIVER_OSS 1" >>confdefs.h
# We may need to link with ossaudio emulation library
case "$host" in
- *-*-openbsd*|*-*-netbsd*)
+ *-*-netbsd*)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lossaudio";;
esac
fi
@@ -32564,4 +32533,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
-
diff --git a/configure.ac b/configure.ac
index 2708c1f..612602f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -933,10 +933,6 @@ CheckOSS()
# it on if you really want, though.
if test x$enable_oss = xmaybe; then
enable_oss=yes
- case "$host" in
- *-*-openbsd*)
- enable_oss=no;;
- esac
fi
if test x$enable_audio = xyes -a x$enable_oss = xyes; then
@@ -949,16 +945,6 @@ CheckOSS()
int arg = SNDCTL_DSP_SETFRAGMENT;
]])], [have_oss=yes],[])
fi
- if test x$have_oss != xyes; then
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- #include <soundcard.h>
- ]], [[
- int arg = SNDCTL_DSP_SETFRAGMENT;
- ]])], [
- have_oss=yes
- AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H, 1, [ ])
- ],[])
- fi
AC_MSG_RESULT($have_oss)
if test x$have_oss = xyes; then
SUMMARY_audio="${SUMMARY_audio} oss"
@@ -968,7 +954,7 @@ CheckOSS()
# We may need to link with ossaudio emulation library
case "$host" in
- *-*-openbsd*|*-*-netbsd*)
+ *-*-netbsd*)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lossaudio";;
esac
fi
diff --git a/include/SDL_config.h.cmake b/include/SDL_config.h.cmake
index 6daeadf..c9ee9df 100644
--- a/include/SDL_config.h.cmake
+++ b/include/SDL_config.h.cmake
@@ -309,7 +309,6 @@
#cmakedefine SDL_AUDIO_DRIVER_NAS_DYNAMIC @SDL_AUDIO_DRIVER_NAS_DYNAMIC@
#cmakedefine SDL_AUDIO_DRIVER_NETBSD @SDL_AUDIO_DRIVER_NETBSD@
#cmakedefine SDL_AUDIO_DRIVER_OSS @SDL_AUDIO_DRIVER_OSS@
-#cmakedefine SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H @SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H@
#cmakedefine SDL_AUDIO_DRIVER_PAUDIO @SDL_AUDIO_DRIVER_PAUDIO@
#cmakedefine SDL_AUDIO_DRIVER_PIPEWIRE @SDL_AUDIO_DRIVER_PIPEWIRE@
#cmakedefine SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC @SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC@
diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in
index 56b5302..f6f2171 100644
--- a/include/SDL_config.h.in
+++ b/include/SDL_config.h.in
@@ -297,7 +297,6 @@
#undef SDL_AUDIO_DRIVER_NETBSD
#undef SDL_AUDIO_DRIVER_OPENSLES
#undef SDL_AUDIO_DRIVER_OSS
-#undef SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H
#undef SDL_AUDIO_DRIVER_PAUDIO
#undef SDL_AUDIO_DRIVER_PIPEWIRE
#undef SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC
diff --git a/src/audio/dsp/SDL_dspaudio.c b/src/audio/dsp/SDL_dspaudio.c
index 531612a..8734f79 100644
--- a/src/audio/dsp/SDL_dspaudio.c
+++ b/src/audio/dsp/SDL_dspaudio.c
@@ -34,13 +34,7 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
-#if SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H
-/* This is installed on some systems */
-#include <soundcard.h>
-#else
-/* This is recommended by OSS */
#include <sys/soundcard.h>
-#endif
#include "SDL_timer.h"
#include "SDL_audio.h"
diff --git a/test/configure b/test/configure
index c71abe4..f627d92 100755
--- a/test/configure
+++ b/test/configure
@@ -6103,4 +6103,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
-