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.main
parent
485bb3565b
commit
f4e3af15a1
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
@ -21036,33 +21032,6 @@ _ACEOF
|
|||
if ac_fn_c_try_compile "$LINENO"
|
||||
then :
|
||||
have_oss=yes
|
||||
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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
|
16
configure.ac
16
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
|
||||
|
|
|
@ -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@
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue