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

Trent Piepho xyzzy at speakeasy.org
Thu Jan 20 09:34:11 CET 2005


Sorry, old verion of the patch, this one is correct.
-------------- 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:32:03 -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_xk='#define HAVE_XF86XK 1'
+else
+  _def_xk='#undef HAVE_XF86XK'
+fi
+echores "$_xf86xk"
 
 echocheck "DGA"
 # Version 2 is preferred to version 1 if available
@@ -7404,6 +7425,7 @@
 $_def_xv
 $_def_xvmc
 $_def_vm
+$_def_xk
 $_def_xinerama
 $_def_gl
 $_def_gl_win32
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:32:03 -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