mirror of https://github.com/snes9xgit/snes9x.git
unix: Support OSS audio on systems other than Linux.
This commit is contained in:
parent
666761c95a
commit
62501a2218
|
@ -7264,18 +7264,60 @@ fi
|
|||
|
||||
|
||||
if test "x$enable_sound" = "xyes"; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sound is supported on this platform" >&5
|
||||
printf %s "checking whether sound is supported on this platform... " >&6; }
|
||||
if test "x$snes9x_cv_linux_os" = "xyes"; then
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
printf "%s\n" "yes" >&6; }
|
||||
else
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
printf "%s\n" "no" >&6; }
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Your OS is not Linux. Build without sound support." >&5
|
||||
printf "%s\n" "$as_me: WARNING: Your OS is not Linux. Build without sound support." >&2;}
|
||||
ac_fn_cxx_check_header_compile "$LINENO" "sys/soundcard.h" "ac_cv_header_sys_soundcard_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_sys_soundcard_h" = xyes
|
||||
then :
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _oss_ioctl in -lossaudio" >&5
|
||||
printf %s "checking for _oss_ioctl in -lossaudio... " >&6; }
|
||||
if test ${ac_cv_lib_ossaudio__oss_ioctl+y}
|
||||
then :
|
||||
printf %s "(cached) " >&6
|
||||
else $as_nop
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lossaudio $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
namespace conftest {
|
||||
extern "C" int _oss_ioctl ();
|
||||
}
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
return conftest::_oss_ioctl ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_cxx_try_link "$LINENO"
|
||||
then :
|
||||
ac_cv_lib_ossaudio__oss_ioctl=yes
|
||||
else $as_nop
|
||||
ac_cv_lib_ossaudio__oss_ioctl=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
|
||||
printf "%s\n" "$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
|
||||
if test "x$ac_cv_lib_ossaudio__oss_ioctl" = xyes
|
||||
then :
|
||||
|
||||
S9XLIBS="$S9XLIBS -lossaudio"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
else $as_nop
|
||||
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Your OS does not have OSS. Build without sound support." >&5
|
||||
printf "%s\n" "$as_me: WARNING: Your OS does not have OSS. Build without sound support." >&2;}
|
||||
enable_sound="no"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test "x$enable_sound" = "xyes"; then
|
||||
|
|
|
@ -479,14 +479,16 @@ AC_ARG_ENABLE([sound],
|
|||
[], [enable_sound="yes"])
|
||||
|
||||
if test "x$enable_sound" = "xyes"; then
|
||||
AC_MSG_CHECKING([whether sound is supported on this platform])
|
||||
if test "x$snes9x_cv_linux_os" = "xyes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([Your OS is not Linux. Build without sound support.])
|
||||
AC_CHECK_HEADER([sys/soundcard.h],
|
||||
[
|
||||
AC_CHECK_LIB([ossaudio], [_oss_ioctl], [
|
||||
S9XLIBS="$S9XLIBS -lossaudio"
|
||||
], [], [])
|
||||
],
|
||||
[
|
||||
AC_MSG_WARN([Your OS does not have OSS. Build without sound support.])
|
||||
enable_sound="no"
|
||||
fi
|
||||
])
|
||||
fi
|
||||
|
||||
if test "x$enable_sound" = "xyes"; then
|
||||
|
|
Loading…
Reference in New Issue