Expose sndio as a build option for any supporting system.

This commit is contained in:
Fedor 2019-12-25 15:45:11 +03:00
parent 36cbeb4bd1
commit a59ad20972
6 changed files with 23 additions and 3 deletions

View File

@ -215,6 +215,7 @@ def old_configure_options(*options):
'--enable-pref-extensions',
'--enable-private-build',
'--enable-pulseaudio',
'--enable-sndio',
'--enable-raw',
'--enable-readline',
'--enable-reflow-perf',

View File

@ -910,7 +910,9 @@ signal.h
SimpleGameSound.h
SIOUX.h
size_t.h
#ifdef MOZ_SNDIO
sndio.h
#endif
someincludefile.h
Sound.h
soundcard.h

View File

@ -39,7 +39,7 @@ if CONFIG['MOZ_JACK']:
]
DEFINES['USE_JACK'] = True
if CONFIG['OS_ARCH'] == 'OpenBSD':
if CONFIG['MOZ_SNDIO']:
SOURCES += [
'cubeb_sndio.c',
]

View File

@ -68,7 +68,7 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
'-framework CoreFoundation',
'-framework AudioToolbox',
]
elif CONFIG['OS_TARGET'] == 'OpenBSD':
elif CONFIG['MOZ_SNDIO']:
OS_LIBS += [
'sndio',
]

View File

@ -3153,6 +3153,23 @@ fi
AC_SUBST(MOZ_PULSEAUDIO)
dnl ========================================================
dnl = Enable sndio
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(sndio,
[ --enable-sndio Enable sndio support],
MOZ_SNDIO=1,
MOZ_SNDIO= )
if test -n "$MOZ_SNDIO"; then
AC_DEFINE(MOZ_SNDIO)
MOZ_CHECK_HEADER([sndio.h], [],
AC_MSG_ERROR(
[--enable-sndio specified but it requires sndio development headers]))
AC_DEFINE(MOZ_SNDIO)
fi
AC_SUBST(MOZ_SNDIO)
dnl ========================================================
dnl NegotiateAuth
dnl ========================================================

View File

@ -241,7 +241,7 @@ OS_LIBS += CONFIG['ICONV_LIBS']
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'uikit'):
OS_LIBS += CONFIG['TK_LIBS']
if CONFIG['OS_ARCH'] == 'OpenBSD':
if CONFIG['MOZ_SNDIO']:
OS_LIBS += [
'sndio',
]