[MPlayer-dev-eng] configure patch for xf86vm extension and XF86keysym

Trent Piepho xyzzy at speakeasy.org
Thu Jan 20 09:30:29 CET 2005


The configure script for mplayer bundled the check for the X11/XF86keysym.h
header file with the check for the xf86vm extension.  The X11/XF86keysym.h
file has keysyms for keyboards with various extended internet and audio keys. 
The xf86vm extension lets programs change video modes.

The two have nothing to do with each other, and XFree86 3.x has the vidmode
extension, but does not have the new XF86keysym.h file.  This patch creates a
separate check for the XF86keysym.h file, so that the vidmode extension will
be detected on XFree86 3.x, as it used to be with older versions of mplayer.

I've tested it with both 3.x and 4.x verions of XFree86.
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.953
diff -u -r1.953 configure
--- configure	16 Jan 2005 22:01:52 -0000	1.953
+++ configure	20 Jan 2005 08:22:53 -0000
@@ -3560,7 +3560,6 @@
   cat > $TMPC <<EOF
 #include <X11/Xlib.h>
 #include <X11/extensions/xf86vmode.h>
-#include <X11/XF86keysym.h>
 int main(void) { (void) XF86VidModeQueryExtension(0, 0, 0); return 0; }
 EOF
   _vm=no
@@ -3576,6 +3575,28 @@
 fi
 echores "$_vm"
 
+# Check for the presence of special keycodes, like audio control buttons
+# that XFree86 might have.  Used to be bundled with the xf86vm check, but
+# has nothing to do with xf86vm and XFree 3.x has xf86vm but does NOT 
+# have these new keycodes
+echocheck "XF86keysym"
+if test "$_x11" = yes ; then
+  cat > $TMPC <<EOF
+#include <X11/Xlib.h>
+#include <X11/XF86keysym.h>
+int main(void) { return XF86XK_AudioPause; }
+EOF
+  _xf86xk=no
+  cc_check $_inc_x11 $_ld_x11 && _xf86xk=yes
+else
+  _xf86xk=no
+fi
+if test "$_xf86xk" = yes ; then
+  _def_vm='#define HAVE_XF86XK 1'
+else
+  _def_vm='#undef HAVE_XF86XK'
+fi
+echores "$_xf86xk"
 
 echocheck "DGA"
 # Version 2 is preferred to version 1 if available
Index: libvo/x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.186
diff -u -r1.186 x11_common.c
--- libvo/x11_common.c	27 Dec 2004 11:09:49 -0000	1.186
+++ libvo/x11_common.c	20 Jan 2005 08:22:54 -0000
@@ -37,6 +37,9 @@
 
 #ifdef HAVE_XF86VM
 #include <X11/extensions/xf86vmode.h>
+#endif
+
+#ifdef HAVE_XF86XK
 #include <X11/XF86keysym.h>
 #endif
 


More information about the MPlayer-dev-eng mailing list