[vlc-devel] commit: XCB: allow building without xcb-utils ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sun Oct 25 14:49:10 CET 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 25 15:44:31 2009 +0200| [548b93d056c2a329ad9bbef2d76d90ab4dacae02] | committer: Rémi Denis-Courmont
XCB: allow building without xcb-utils
Of xcb-utils, we only use xcb-keysms at the moment. xcb-keysyms is only
needed for the globalhotkeys and xcb_window plugins. If there is another
window provider plugin, we can do without them so long as the user does
not set --no-embedded-video.
Note: xcb-utils is still needed for the LibVLC embedded video as it
depends on xcb_window. We could #ifdef the key press support in
xcb_window if this is an issue (I didn't bother).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=548b93d056c2a329ad9bbef2d76d90ab4dacae02
---
configure.ac | 37 ++++++++++++++++++++++++++++---------
1 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/configure.ac b/configure.ac
index 344549f..4f1aac6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3646,6 +3646,7 @@ AC_ARG_ENABLE(xvideo,
enable_xvideo="$enable_xcb"
])
+need_xid_provider="no"
AS_IF([test "${enable_xcb}" != "no"], [
PKG_CHECK_MODULES(XPROTO, [xproto])
@@ -3674,16 +3675,24 @@ AS_IF([test "${enable_xcb}" != "no"], [
], [true])
dnl xcb-utils
- PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms >= 0.3.4],
- [true],
- [PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms])
- VLC_ADD_CFLAGS([globalhotkeys], [-DXCB_KEYSYM_OLD_API])]
- )
+ PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms >= 0.3.4], [
+ have_xcb_keysyms="yes"
+ ], [
+ PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms], [
+ have_xcb_keysyms="yes"
+ VLC_ADD_CFLAGS([globalhotkeys], [-DXCB_KEYSYM_OLD_API])
+ ], [
+ have_xcb_keysyms="no"
+ need_xid_provider="yes"
+ ])
+ ])
- VLC_ADD_PLUGIN([xcb_window])
- VLC_ADD_PLUGIN([globalhotkeys])
- VLC_ADD_CFLAGS([globalhotkeys],[${XCB_KEYSYMS_CFLAGS} ${XCB_CFLAGS}] )
- VLC_ADD_LIBS([globalhotkeys],[${XCB_KEYSYMS_LIBS} ${XCB_LIBS}] )
+ AS_IF([test "${have_xcb_keysyms}" = "yes"], [
+ VLC_ADD_PLUGIN([xcb_window])
+ VLC_ADD_PLUGIN([globalhotkeys])
+ VLC_ADD_CFLAGS([globalhotkeys], [${XCB_KEYSYMS_CFLAGS} ${XCB_CFLAGS}])
+ VLC_ADD_LIBS([globalhotkeys], [${XCB_KEYSYMS_LIBS} ${XCB_LIBS}])
+ ])
VLC_ADD_PLUGIN([xdg_screensaver])
])
@@ -4320,6 +4329,7 @@ if test "${enable_skins2}" = "yes" ||
VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 ${X_CFLAGS} -DX11_SKINS])
VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} -lXext -lX11])
+ need_xid_provider="no"
fi fi fi
fi
AM_CONDITIONAL(BUILD_SKINS, [test "${enable_skins2}" = "yes" ||
@@ -4337,6 +4347,7 @@ AS_IF([test "${enable_hildon}" = "yes"], [
VLC_ADD_LIBS([hildon],[${HILDON_LIBS}])
VLC_ADD_PLUGIN([hildon])
ALIASES="${ALIASES} mvlc"
+ need_xid_provider="no"
], [
AS_IF([test "${enable_hildon}" = "yes"],[
AC_MSG_ERROR([Hildon libraries not found])
@@ -4359,6 +4370,7 @@ AS_IF([test "${enable_qt4}" != "no"], [
ALIASES="${ALIASES} qvlc"
AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "darwin"], [
VLC_ADD_LIBS([qt4],[$QT4_LIBS -lX11])
+ need_xid_provider="no"
], [
VLC_ADD_LIBS([qt4],[$QT4_LIBS -lole32])
])
@@ -4553,6 +4565,13 @@ then
fi
dnl
+dnl Post-interface configuration checks
+dnl
+AS_IF([test "$need_xid_provider" = "yes"], [
+ AC_MSG_ERROR([X11 video outputs need a window provider (Qt4, Skins2, Hildon or xcb-utils), but none were found. Please install xcb-keysyms.])
+])
+
+dnl
dnl Visualisation plugin
dnl
AC_ARG_ENABLE(visual,
More information about the vlc-devel
mailing list