[vlc-commits] commit: XCB: use automake conditional ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Sun Oct 31 12:09:21 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 31 13:08:59 2010 +0200| [8924960324d87645d305e36bd7f740e2bc69878a] | committer: Rémi Denis-Courmont 

XCB: use automake conditional

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

 configure.ac                          |    5 +++--
 modules/access/Modules.am             |    8 +++++---
 modules/misc/Modules.am               |   16 ++++++++++++++--
 modules/services_discovery/Modules.am |    9 +++++----
 modules/video_output/Modules.am       |   13 +++++++------
 5 files changed, 34 insertions(+), 17 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0cc9ac7..6f2f3a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3187,11 +3187,12 @@ AC_ARG_ENABLE(xvideo,
 ])
 
 need_xid_provider="no"
+have_xcb="no"
 AS_IF([test "${enable_xcb}" != "no"], [
   dnl libxcb
   PKG_CHECK_MODULES(XCB, [xcb])
+  have_xcb="yes"
   PKG_CHECK_MODULES(XCB_SHM, [xcb-shm])
-  VLC_ADD_PLUGIN([xscreensaver xcb_x11 xcb_window xcb_screen xcb_apps])
 
   AS_IF([test "${enable_xvideo}" != "no"], [
     PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [
@@ -3233,8 +3234,8 @@ AS_IF([test "${enable_xcb}" != "no"], [
     VLC_ADD_LIBS([globalhotkeys], [${XCB_KEYSYMS_LIBS} ${XCB_LIBS}])
     VLC_ADD_CFLAGS([xcb_window], [-DHAVE_XCB_KEYSYMS])
   ])
-  VLC_ADD_PLUGIN([xdg_screensaver])
 ])
+AM_CONDITIONAL([HAVE_XCB], [test "${have_xcb}" = "yes"])
 
 AC_ARG_ENABLE(glx,
   [  --enable-glx            X11 OpenGL (GLX) support (default enabled)],, [
diff --git a/modules/access/Modules.am b/modules/access/Modules.am
index db45a5f..e7af171 100644
--- a/modules/access/Modules.am
+++ b/modules/access/Modules.am
@@ -94,7 +94,9 @@ libxcb_screen_plugin_la_CFLAGS = $(AM_CFLAGS) \
 libxcb_screen_plugin_la_LIBADD = $(AM_LIBADD) \
 	$(XCB_LIBS)
 libxcb_screen_plugin_la_DEPENDENCIES =
+if HAVE_XCB
+libvlc_LTLIBRARIES += libxcb_screen_plugin.la
+endif
+
 EXTRA_LTLIBRARIES += \
-	libaccess_rtmp_plugin.la \
-	libxcb_screen_plugin.la
-libvlc_LTLIBRARIES += $(LTLIBxcb_screen)
+	libaccess_rtmp_plugin.la
diff --git a/modules/misc/Modules.am b/modules/misc/Modules.am
index f1bb659..a6e53ac 100644
--- a/modules/misc/Modules.am
+++ b/modules/misc/Modules.am
@@ -19,8 +19,20 @@ SOURCES_audioscrobbler = audioscrobbler.c
 SOURCES_inhibit = inhibit.c
 SOURCES_sqlite = sqlite.c
 
-SOURCES_xscreensaver = inhibit/xscreensaver.c
-SOURCES_xdg_screensaver = inhibit/xdg.c
+libxdg_screensaver_plugin_la_SOURCES = inhibit/xdg.c
+libxdg_screensaver_plugin_la_CFLAGS = $(AM_CFLAGS)
+libxdg_screensaver_plugin_la_LIBADD = $(AM_LIBADD)
+libxdg_screensaver_plugin_la_DEPENDENCIES =
+libxscreensaver_plugin_la_SOURCES = inhibit/xscreensaver.c
+libxscreensaver_plugin_la_CFLAGS = $(AM_CFLAGS)
+libxscreensaver_plugin_la_LIBADD = $(AM_LIBADD)
+libxscreensaver_plugin_la_DEPENDENCIES =
+if HAVE_XCB
+libvlc_LTLIBRARIES += \
+	libxdg_screensaver_plugin.la \
+	libxscreensaver_plugin.la
+endif
+
 SOURCES_osso_screensaver = inhibit/osso.c
 
 libvlc_LTLIBRARIES += \
diff --git a/modules/services_discovery/Modules.am b/modules/services_discovery/Modules.am
index 25ade2f..ed17718 100644
--- a/modules/services_discovery/Modules.am
+++ b/modules/services_discovery/Modules.am
@@ -20,13 +20,14 @@ libxcb_apps_plugin_la_CFLAGS = $(AM_CFLAGS) \
 libxcb_apps_plugin_la_LIBADD = $(AM_LIBADD) \
 	$(XCB_LIBS)
 libxcb_apps_plugin_la_DEPENDENCIES =
+if HAVE_XCB
+libvlc_LTLIBRARIES += libxcb_apps_plugin.la
+endif
 
 EXTRA_LTLIBRARIES += \
-	libudev_plugin.la \
-	libxcb_apps_plugin.la
+	libudev_plugin.la
 libvlc_LTLIBRARIES += \
 	libmediadirs_plugin.la \
 	libpodcast_plugin.la \
 	libsap_plugin.la \
-	$(LTLIBudev) \
-	$(LTLIBxcb_apps)
+	$(LTLIBudev)
diff --git a/modules/video_output/Modules.am b/modules/video_output/Modules.am
index 43fe314..bcbae13 100644
--- a/modules/video_output/Modules.am
+++ b/modules/video_output/Modules.am
@@ -58,16 +58,17 @@ libxcb_window_plugin_la_LIBADD = $(AM_LIBADD) \
 	$(XCB_KEYSYMS_LIBS)
 libxcb_window_plugin_la_DEPENDENCIES =
 
-EXTRA_LTLIBRARIES += \
+if HAVE_XCB
+libvlc_LTLIBRARIES += \
 	libxcb_x11_plugin.la \
-	libxcb_xv_plugin.la \
-	libxcb_glx_plugin.la \
 	libxcb_window_plugin.la
+endif
+EXTRA_LTLIBRARIES += \
+	libxcb_xv_plugin.la \
+	libxcb_glx_plugin.la
 libvlc_LTLIBRARIES += \
-	$(LTLIBxcb_x11) \
 	$(LTLIBxcb_xv) \
-	$(LTLIBxcb_glx) \
-	$(LTLIBxcb_window)
+	$(LTLIBxcb_glx)
 
 # XXX: do we need yet another modules/ subdirectory?
 libdrawable_plugin_la_SOURCES = drawable.c



More information about the vlc-commits mailing list