Commit 87ea4084 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

OSS: define HAVE_OSS, and disable on Linux by default

In many cases, OSS was used when the builder forgot to install the
alsa-lib development headers. This should not be an issue anymore, as
ALSA is now required on Linux by default.

I believe the fallback to OSS from ALSA and PulseAudio is causing more
confusion than it solves problem. Besides, the OSS emulation by ALSA
cannot mix, so OSS is almost completely useless on Linux, unless OSSv4
was specifically installed.

Moreover, Linux distributions have started dropping OSS completely.
parent 7e95f9a7
......@@ -8,7 +8,9 @@ Important changes for packagers:
Non-UTF-8 file systems support will be removed in future versions.
* The VLC plugins path can be overriden with the VLC_PLUGIN_PATH environment
variable. The --plugin-path command line option was removed.
* The default tarballs are now .tar.xz
* The default tarballs are now compressed with XZ/LZMA: .tar.xz
* OSS support is not compiled on Linux by default, pass --enable-oss to the
configure script if you use OSSv4 or really want to use OSS emulation.
* The NPAPI webplugin has moved to git://git.videolan.org/npapi-vlc.git
* The ActiveX webplugin has moved to git://git.videolan.org/activex-vlc.git
......
......@@ -3460,22 +3460,6 @@ dnl
EXTEND_HELP_STRING([Audio plugins:])
dnl
dnl OSS /dev/dsp module (enabled by default except on win32)
dnl
AC_ARG_ENABLE(oss,
[ --enable-oss Open Sound System OSS support (default enabled)])
if test "${enable_oss}" != "no" &&
(test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
test "${enable_oss}" = "yes")
then
AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [
VLC_ADD_PLUGIN([oss access_oss])
AC_CHECK_LIB(ossaudio,main,[VLC_ADD_LIBS([oss access_oss],[-lossaudio])])
])
fi
dnl
dnl Pulseaudio module
dnl
......@@ -3516,6 +3500,29 @@ AS_IF([test "${enable_alsa}" != "no"], [
])
AM_CONDITIONAL([HAVE_ALSA], [test "${have_alsa}" = "yes"])
dnl
dnl Open Sound System module
dnl
AC_ARG_ENABLE(oss,
[AS_HELP_STRING([--enable-oss],
[support the Open Sound System OSS (default enabled on BSD)])],, [
AS_IF([test "$SYS" = "mingw32" -o "$SYS" = "mingwce" -o "$SYS" = "linux"], [
enable_oss="no"
])
])
have_oss="no"
OSS_LIBS=""
AS_IF([test "$enable_oss" != "no"], [
AC_CHECK_HEADERS([soundcard.h sys/soundcard.h], [
have_oss="yes"
AC_CHECK_LIB(ossaudio, main, [
OSS_LIBS="-lossaudio"
])
])
])
AC_SUBST(OSS_LIBS)
AM_CONDITIONAL([HAVE_OSS], [test "${have_oss}" = "yes"])
dnl
dnl Portaudio module
dnl
......
......@@ -54,7 +54,6 @@ SOURCES_cdda = \
vcd/cdrom_internals.h \
$(NULL)
SOURCES_access_jack = jack.c
SOURCES_access_oss = oss.c
SOURCES_access_mtp = mtp.c
SOURCES_access_sftp = sftp.c
SOURCES_access_imem = imem.c
......@@ -93,6 +92,13 @@ libvlc_LTLIBRARIES += \
libaccess_vdr_plugin.la \
$(NULL)
libaccess_oss_plugin_la = oss.c
libaccess_oss_plugin_la_LIBADD = $(AM_LIBADD) $(OSS_LIBS)
libaccess_oss_plugin_la_DEPENDENCIES =
if HAVE_OSS
libvlc_LTLIBRARIES += libaccess_oss_plugin.la
endif
libaccess_alsa_plugin_la_SOURCES = alsa.c
libaccess_alsa_plugin_la_CFLAGS = $(AM_CFLAGS) $(ALSA_CFLAGS)
libaccess_alsa_plugin_la_LIBADD = $(AM_LIBADD) $(ALSA_LIBS)
......
SOURCES_aout_directx = directx.c windows_audio_common.h
SOURCES_aout_file = file.c
SOURCES_oss = oss.c
SOURCES_aout_sdl = sdl.c
SOURCES_waveout = waveout.c windows_audio_common.h
SOURCES_portaudio = portaudio.c
......@@ -10,6 +9,13 @@ SOURCES_audioqueue = audioqueue.c
libvlc_LTLIBRARIES += libaout_file_plugin.la
liboss_plugin_la = oss.c
liboss_plugin_la_LIBADD = $(AM_LIBADD) $(OSS_LIBS)
liboss_plugin_la_DEPENDENCIES =
if HAVE_OSS
libvlc_LTLIBRARIES += liboss_plugin.la
endif
libalsa_plugin_la_SOURCES = alsa.c
libalsa_plugin_la_CFLAGS = $(AM_CFLAGS) $(ALSA_CFLAGS)
libalsa_plugin_la_LIBADD = $(AM_LIBADD) $(ALSA_LIBS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment