[vlc-commits] commit: Move most alsa-lib logic to Makefiles ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Sat Jul 17 19:30:09 CEST 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jul 17 19:37:31 2010 +0300| [483379cdc00fc5ac61c2f2f2ea2af3c31aad4a6b] | committer: Rémi Denis-Courmont 

Move most alsa-lib logic to Makefiles

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=483379cdc00fc5ac61c2f2f2ea2af3c31aad4a6b
---

 configure.ac                    |   14 +++++++++++++-
 modules/access/Modules.am       |    9 ++++++++-
 modules/audio_output/Modules.am |    9 ++++++++-
 3 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 47bae36..3aad1b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3681,7 +3681,19 @@ PKG_ENABLE_MODULES_VLC([PORTAUDIO], [], [portaudio-2.0], [Portaudio library supp
 dnl
 dnl  ALSA module
 dnl
-PKG_ENABLE_MODULES_VLC([ALSA], [alsa access_alsa], [alsa >= 1.0.0], [Alsa sound support for linux], [auto])
+AC_ARG_ENABLE(alsa,
+  [  --enable-alsa           Advanced Linux Sound Architecture (default auto)])
+have_alsa="no"
+AS_IF([test "${enable_alsa}" != "no"], [
+  PKG_CHECK_MODULES([ALSA], [alsa >= 1.0.0], [
+    have_alsa="yes"
+  ], [
+    AS_IF([test "x${enable_alsa}" != "x"], [
+      AC_MSG_ERROR([alsa-lib not found])
+    ])
+  ])
+])
+AM_CONDITIONAL([HAVE_ALSA], [test "${have_alsa}" = "yes"])
 
 dnl
 dnl  win32 waveOut plugin
diff --git a/modules/access/Modules.am b/modules/access/Modules.am
index d5c9549..12f8ebb 100644
--- a/modules/access/Modules.am
+++ b/modules/access/Modules.am
@@ -45,7 +45,6 @@ SOURCES_cdda = \
         vcd/cdrom_internals.h \
         $(NULL)
 SOURCES_access_jack = jack.c
-SOURCES_access_alsa = alsa.c
 SOURCES_access_oss = oss.c
 SOURCES_access_mtp = mtp.c
 SOURCES_access_sftp = sftp.c
@@ -78,6 +77,14 @@ libvlc_LTLIBRARIES += \
 	libstream_filter_rar_plugin.la \
 	$(NULL)
 
+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)
+libaccess_alsa_plugin_la_DEPENDENCIES =
+if HAVE_ALSA
+libvlc_LTLIBRARIES += libaccess_alsa_plugin.la
+endif
+
 libxcb_screen_plugin_la_SOURCES = screen/xcb.c
 libxcb_screen_plugin_la_CFLAGS = $(AM_CFLAGS) \
 	$(XCB_CFLAGS)
diff --git a/modules/audio_output/Modules.am b/modules/audio_output/Modules.am
index 5a2aac9..f9df5bd 100644
--- a/modules/audio_output/Modules.am
+++ b/modules/audio_output/Modules.am
@@ -1,4 +1,3 @@
-SOURCES_alsa = alsa.c
 SOURCES_aout_directx = directx.c windows_audio_common.h
 SOURCES_aout_file = file.c
 SOURCES_oss = oss.c
@@ -11,3 +10,11 @@ SOURCES_jack = jack.c
 SOURCES_pulse = pulse.c
 
 libvlc_LTLIBRARIES += libaout_file_plugin.la
+
+libalsa_plugin_la_SOURCES = alsa.c
+libalsa_plugin_la_CFLAGS = $(AM_CFLAGS) $(ALSA_CFLAGS)
+libalsa_plugin_la_LIBADD = $(AM_LIBADD) $(ALSA_LIBS)
+libalsa_plugin_la_DEPENDENCIES =
+if HAVE_ALSA
+libvlc_LTLIBRARIES += libalsa_plugin.la
+endif



More information about the vlc-commits mailing list