]> git.sesse.net Git - vlc/commitdiff
OSS: define HAVE_OSS, and disable on Linux by default
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 1 May 2011 13:58:40 +0000 (16:58 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 1 May 2011 14:04:14 +0000 (17:04 +0300)
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.

NEWS
configure.ac
modules/access/Modules.am
modules/audio_output/Modules.am

diff --git a/NEWS b/NEWS
index 60f8a9370e3613f363f43535158558631492ab05..7a4ab5f7842611f87ee3eb662fe2c14c340ea68a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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
index 7b4ec919a79170f613b108f0b4a6d75000799af3..829a5df52c7f329daf41c604f2b866e36396c463 100644 (file)
@@ -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
index 8d7bdce117c83c3fbc54ad020bf5a0df6123759e..286288aadc1e1d3594c61efe36363784669ce3d0 100644 (file)
@@ -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)
index 9c2804b64734fc4aeda8f6b06e3376a0460c6ac9..e9c0275800815704d186d222ec1e88d9aa64f2a8 100644 (file)
@@ -1,6 +1,5 @@
 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)