changeset 27377:d58d06eafe83

Change a bunch of X11-specific preprocessor directives. Switch from a HAVE_ prefix to a CONFIG_ prefix.
author diego
date Mon, 04 Aug 2008 06:16:23 +0000
parents d1192f8e7df4
children ea586e46da1c
files cfg-mplayer.h configure gui/skin/skin.c gui/wm/ws.c gui/wm/ws.h libvo/mga_common.c libvo/video_out.c libvo/vo_dga.c libvo/vo_dxr3.c libvo/vo_sdl.c libvo/vo_x11.c libvo/vo_xmga.c libvo/vo_xover.c libvo/vo_xv.c libvo/vo_xvidix.c libvo/vo_xvmc.c libvo/x11_common.c libvo/x11_common.h mplayer.c vidix/radeon_vid.c
diffstat 20 files changed, 126 insertions(+), 126 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-mplayer.h	Sun Aug 03 20:17:46 2008 +0000
+++ b/cfg-mplayer.h	Mon Aug 04 06:16:23 2008 +0000
@@ -123,7 +123,7 @@
             CONF_TYPE_PRINT, 0, 0, 0, NULL},
 	{"edlout", &edl_output_filename,  CONF_TYPE_STRING, 0, 0, 0, NULL}, 
 
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
 	{"display", &mDisplayName, CONF_TYPE_STRING, 0, 0, 0, NULL},
 #endif
 
@@ -199,7 +199,7 @@
     {"adapter", &vo_adapter_num, CONF_TYPE_INT, CONF_RANGE, 0, 5, NULL},
     {"refreshrate",&vo_refresh_rate,CONF_TYPE_INT,CONF_RANGE, 0,100, NULL},
 	{"wid", &WinID, CONF_TYPE_INT, 0, 0, 0, NULL},
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
 	// x11,xv,xmga,xvidix
 	{"icelayer", "-icelayer has been removed. Use -fstype layer:<number> instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
 	{"stop-xscreensaver", &stop_xscreensaver, CONF_TYPE_FLAG, 0, 0, 1, NULL},
--- a/configure	Sun Aug 03 20:17:46 2008 +0000
+++ b/configure	Mon Aug 04 06:16:23 2008 +0000
@@ -3971,12 +3971,12 @@
   done
 fi
 if test "$_x11" = yes ; then
-  _def_x11='#define HAVE_X11 1'
+  _def_x11='#define CONFIG_X11 1'
   _vosrc="$_vosrc x11_common.c vo_x11.c vo_xover.c"
   _vomodules="x11 xover $_vomodules"
 else
   _x11=no
-  _def_x11='#undef HAVE_X11'
+  _def_x11='#undef CONFIG_X11'
   _novomodules="x11 $_novomodules"
   _res_comment="check if the dev(el) packages are installed"
   # disable stuff that depends on X
@@ -3995,10 +3995,10 @@
   cc_check -lXss && _xss=yes
 fi
 if test "$_xss" = yes ; then
-  _def_xss='#define HAVE_XSS 1'
+  _def_xss='#define CONFIG_XSS 1'
   _libs_mplayer="$_libs_mplayer -lXss"
 else
-  _def_xss='#undef HAVE_XSS'
+  _def_xss='#undef CONFIG_XSS'
 fi
 echores "$_xss"
 
@@ -4023,16 +4023,16 @@
   cc_check -lXext && _xdpms4=yes
 fi
 if test "$_xdpms4" = yes ; then
-  _def_xdpms='#define HAVE_XDPMS 1'
+  _def_xdpms='#define CONFIG_XDPMS 1'
   _res_comment="using Xdpms 4"
   echores "yes"
 elif test "$_xdpms3" = yes ; then
-  _def_xdpms='#define HAVE_XDPMS 1'
+  _def_xdpms='#define CONFIG_XDPMS 1'
   _libs_mplayer="$_libs_mplayer -lXdpms"
   _res_comment="using Xdpms 3"
   echores "yes"
 else
-  _def_xdpms='#undef HAVE_XDPMS'
+  _def_xdpms='#undef CONFIG_XDPMS'
   echores "no"
 fi
 
@@ -4052,12 +4052,12 @@
 fi
 
 if test "$_xv" = yes ; then
-  _def_xv='#define HAVE_XV 1'
+  _def_xv='#define CONFIG_XV 1'
   _libs_mplayer="$_libs_mplayer -lXv"
   _vosrc="$_vosrc vo_xv.c"
   _vomodules="xv $_vomodules"
 else
-  _def_xv='#undef HAVE_XV'
+  _def_xv='#undef CONFIG_XV'
   _novomodules="xv $_novomodules"
 fi
 echores "$_xv"
@@ -4105,10 +4105,10 @@
 fi
 
 if test "$_xinerama" = yes ; then
-  _def_xinerama='#define HAVE_XINERAMA 1'
+  _def_xinerama='#define CONFIG_XINERAMA 1'
   _libs_mplayer="$_libs_mplayer -lXinerama"
 else
-  _def_xinerama='#undef HAVE_XINERAMA'
+  _def_xinerama='#undef CONFIG_XINERAMA'
 fi
 echores "$_xinerama"
 
@@ -4129,10 +4129,10 @@
   cc_check -lXxf86vm && _vm=yes
 fi
 if test "$_vm" = yes ; then
-  _def_vm='#define HAVE_XF86VM 1'
+  _def_vm='#define CONFIG_XF86VM 1'
   _libs_mplayer="$_libs_mplayer -lXxf86vm"
 else
-  _def_vm='#undef HAVE_XF86VM'
+  _def_vm='#undef CONFIG_XF86VM'
 fi
 echores "$_vm"
 
@@ -4151,9 +4151,9 @@
   cc_check && _xf86keysym=yes
 fi
 if test "$_xf86keysym" = yes ; then
-  _def_xf86keysym='#define HAVE_XF86XK 1'
-else
-  _def_xf86keysym='#undef HAVE_XF86XK'
+  _def_xf86keysym='#define CONFIG_XF86XK 1'
+else
+  _def_xf86keysym='#undef CONFIG_XF86XK'
 fi
 echores "$_xf86keysym"
 
@@ -4178,20 +4178,20 @@
 fi
 
 _dga=no
-_def_dga='#undef HAVE_DGA'
-_def_dga1='#undef HAVE_DGA1'
-_def_dga2='#undef HAVE_DGA2'
+_def_dga='#undef CONFIG_DGA'
+_def_dga1='#undef CONFIG_DGA1'
+_def_dga2='#undef CONFIG_DGA2'
 if test "$_dga1" = yes ; then
   _dga=yes
-  _def_dga1='#define HAVE_DGA1 1'
+  _def_dga1='#define CONFIG_DGA1 1'
   _res_comment="using DGA 1.0"
 elif test "$_dga2" = yes ; then
   _dga=yes
-  _def_dga2='#define HAVE_DGA2 1'
+  _def_dga2='#define CONFIG_DGA2 1'
   _res_comment="using DGA 2.0"
 fi
 if test "$_dga" = yes ; then
-  _def_dga='#define HAVE_DGA 1'
+  _def_dga='#define CONFIG_DGA 1'
   _libs_mplayer="$_libs_mplayer -lXxf86dga"
   _vosrc="$_vosrc vo_dga.c"
   _vomodules="dga $_vomodules"
@@ -7404,7 +7404,7 @@
     cc_check -lXext && _xshape=yes
   fi
   if test "$_xshape" = yes ; then
-    _def_xshape='#define HAVE_XSHAPE 1'
+    _def_xshape='#define CONFIG_XSHAPE 1'
   else
     die "The GUI requires the X11 extension XShape (which was not found)."
   fi
@@ -8706,7 +8706,7 @@
 /* used by GUI: */
 $_def_xshape
 
-#if defined(CONFIG_GL) || defined(HAVE_X11) || defined(HAVE_XV)
+#if defined(CONFIG_GL) || defined(CONFIG_X11) || defined(CONFIG_XV)
 #define X11_FULLSCREEN 1
 #endif
 
--- a/gui/skin/skin.c	Sun Aug 03 20:17:46 2008 +0000
+++ b/gui/skin/skin.c	Mon Aug 04 06:16:23 2008 +0000
@@ -169,7 +169,7 @@
    if ( skinBPRead( tmp,&defList->main.Bitmap ) ) return 1;
    defList->main.width=defList->main.Bitmap.Width;
    defList->main.height=defList->main.Bitmap.Height;
-#ifdef HAVE_XSHAPE
+#ifdef CONFIG_XSHAPE
     Convert32to1( &defList->main.Bitmap,&defList->main.Mask,0x00ff00ff );
     mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin]  mask: %dx%d\n",defList->main.Mask.Width,defList->main.Mask.Height );
 #else
@@ -201,7 +201,7 @@
    if ( skinBPRead( tmp,&defList->menuBase.Bitmap ) ) return 1;
    defList->menuBase.width=defList->menuBase.Bitmap.Width;
    defList->menuBase.height=defList->menuBase.Bitmap.Height;
-#ifdef HAVE_XSHAPE
+#ifdef CONFIG_XSHAPE
     Convert32to1( &defList->menuBase.Bitmap,&defList->menuBase.Mask,0x00ff00ff );
     mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin]  mask: %dx%d\n",defList->menuBase.Mask.Width,defList->menuBase.Mask.Height );
 #else
@@ -219,7 +219,7 @@
    if ( skinBPRead( tmp,&defList->bar.Bitmap ) ) return 1;
    defList->bar.width=defList->bar.Bitmap.Width;
    defList->bar.height=defList->bar.Bitmap.Height;
-#ifdef HAVE_XSHAPE
+#ifdef CONFIG_XSHAPE
     Convert32to1( &defList->bar.Bitmap,&defList->bar.Mask,0x00ff00ff );
     mp_dbg( MSGT_GPLAYER,MSGL_DBG2,"[skin]  mask: %dx%d\n",defList->bar.Mask.Width,defList->bar.Mask.Height );
 #else
--- a/gui/wm/ws.c	Sun Aug 03 20:17:46 2008 +0000
+++ b/gui/wm/ws.c	Mon Aug 04 06:16:23 2008 +0000
@@ -48,15 +48,15 @@
 #include "wsxdnd.h"
 
 #include <X11/extensions/XShm.h>
-#ifdef HAVE_XSHAPE
+#ifdef CONFIG_XSHAPE
 #include <X11/extensions/shape.h>
 #endif
 
-#ifdef HAVE_XINERAMA
+#ifdef CONFIG_XINERAMA
 #include <X11/extensions/Xinerama.h>
 #endif
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
 #include <X11/extensions/xf86vmode.h>
 #endif
 
@@ -235,7 +235,7 @@
    mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_WS_NoXshm );
    wsUseXShm=0;
   }
-#ifdef HAVE_XSHAPE
+#ifdef CONFIG_XSHAPE
   if ( !XShapeQueryExtension( wsDisplay,&eventbase,&errorbase ) )
    {
     mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_WS_NoXshape );
@@ -249,7 +249,7 @@
 
  wsScreen=DefaultScreen( wsDisplay );
  wsRootWin=RootWindow( wsDisplay,wsScreen );
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
     {
       int clock;
       XF86VidModeModeLine modeline;
@@ -278,7 +278,7 @@
    int minor,major,shp;
    mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[ws] Screen depth: %d\n",wsDepthOnScreen );
    mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[ws]  size: %dx%d\n",wsMaxX,wsMaxY );
-#ifdef HAVE_XINERAMA
+#ifdef CONFIG_XINERAMA
    mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[ws]  origin: +%d+%d\n",wsOrgX,wsOrgY );
 #endif
    mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[ws]  red mask: 0x%x\n",wsRedMask );
@@ -289,7 +289,7 @@
      XShmQueryVersion( wsDisplay,&major,&minor,&shp );
      mp_msg( MSGT_GPLAYER,MSGL_DBG2,"[ws] XShm version is %d.%d\n",major,minor );
     }
-   #ifdef HAVE_XSHAPE
+   #ifdef CONFIG_XSHAPE
     if ( wsUseXShape )
      {
       XShapeQueryVersion( wsDisplay,&major,&minor );
@@ -1220,7 +1220,7 @@
 void wsScreenSaverOn( Display *mDisplay )
 {
  int nothing;
-#ifdef HAVE_XDPMS
+#ifdef CONFIG_XDPMS
  if ( dpms_disabled )
   {
    if ( DPMSQueryExtension( mDisplay,&nothing,&nothing ) )
@@ -1250,7 +1250,7 @@
 void wsScreenSaverOff( Display * mDisplay )
 {
  int interval,prefer_blank,allow_exp,nothing;
-#ifdef HAVE_XDPMS
+#ifdef CONFIG_XDPMS
  if ( DPMSQueryExtension( mDisplay,&nothing,&nothing ) )
   {
    BOOL onoff;
@@ -1273,7 +1273,7 @@
 
 void wsSetShape( wsTWindow * win,char * data )
 {
-#ifdef HAVE_XSHAPE
+#ifdef CONFIG_XSHAPE
  if ( !wsUseXShape ) return;
  if ( data )
   {
--- a/gui/wm/ws.h	Sun Aug 03 20:17:46 2008 +0000
+++ b/gui/wm/ws.h	Mon Aug 04 06:16:23 2008 +0000
@@ -27,7 +27,7 @@
 #include <X11/keysym.h>
 #include <X11/Xatom.h>
 #include <X11/extensions/XShm.h>
-#ifdef HAVE_XDPMS
+#ifdef CONFIG_XDPMS
 #include <X11/extensions/dpms.h>
 #endif
 
--- a/libvo/mga_common.c	Sun Aug 03 20:17:46 2008 +0000
+++ b/libvo/mga_common.c	Mon Aug 04 06:16:23 2008 +0000
@@ -512,7 +512,7 @@
 	 vo_dwidth=drwWidth; vo_dheight=drwHeight;
 
 #ifdef VO_XMGA
-#ifdef HAVE_XINERAMA
+#ifdef CONFIG_XINERAMA
 		 if(XineramaIsActive(mDisplay))
 		 {
 		 	XineramaScreenInfo *screens;
--- a/libvo/video_out.c	Sun Aug 03 20:17:46 2008 +0000
+++ b/libvo/video_out.c	Mon Aug 04 06:16:23 2008 +0000
@@ -149,10 +149,10 @@
 #ifdef CONFIG_3DFX
         &video_out_3dfx,
 #endif
-#ifdef HAVE_XV
+#ifdef CONFIG_XV
         &video_out_xv,
 #endif
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
         &video_out_x11,
         &video_out_xover,
 #endif
@@ -160,7 +160,7 @@
 	        &video_out_gl,
         &video_out_gl2,
 #endif
-#ifdef HAVE_DGA
+#ifdef CONFIG_DGA
         &video_out_dga,
 #endif
 #ifdef CONFIG_SDL
@@ -211,7 +211,7 @@
         &video_out_dfbmga,
 #endif
 #ifdef CONFIG_VIDIX
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
 	&video_out_xvidix,
 #endif
 #ifdef WIN32
--- a/libvo/vo_dga.c	Sun Aug 03 20:17:46 2008 +0000
+++ b/libvo/vo_dga.c	Mon Aug 04 06:16:23 2008 +0000
@@ -37,15 +37,15 @@
 #include <X11/Xlib.h>
 #include <X11/extensions/xf86dga.h>
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
 #include <X11/extensions/xf86vmode.h>
 #endif
 
 static const vo_info_t info = {
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
     "DGA ( Direct Graphic Access V2.0 )",
 #else
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
     "DGA ( Direct Graphic Access V1.0+XF86VidModeExt. )",
 #else
     "DGA ( Direct Graphic Access V1.0 )",
@@ -186,7 +186,7 @@
 
 //-----------------------------------------------------------------
 
-#if defined(HAVE_XF86VM) && !defined(HAVE_DGA2)
+#if defined(CONFIG_XF86VM) && !defined(CONFIG_DGA2)
 static XF86VidModeModeInfo **vo_dga_vidmodes = NULL;
 #endif
 
@@ -213,7 +213,7 @@
                                          // codec
 static int vo_dga_XServer_mode = 0;     // index in mode list for resolution
 
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
 static XDGAMode *vo_modelines;
 static int vo_modecount;
 #endif
@@ -350,7 +350,7 @@
 {
     if (1 < vo_dga_nr_video_buffers)
     {
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
         XDGASetViewport(mDisplay, mScreen,
                         0, CURRENT_VIDEO_BUFFER.y, XDGAFlipRetrace);
 #else
@@ -387,7 +387,7 @@
 static void uninit(void)
 {
 
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
     XDGADevice *dgadevice;
 #endif
 
@@ -401,7 +401,7 @@
         if (vo_grabpointer)
             XUngrabPointer(mDisplay, CurrentTime);
         XUngrabKeyboard(mDisplay, CurrentTime);
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
         XDGACloseFramebuffer(mDisplay, mScreen);
         dgadevice = XDGASetMode(mDisplay, mScreen, 0);
         if (dgadevice != NULL)
@@ -411,7 +411,7 @@
 #else
         XF86DGADirectVideo(mDisplay, mScreen, 0);
         // first disable DirectVideo and then switch mode back!     
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
         if (vo_dga_vidmodes != NULL)
         {
             int screen;
@@ -537,7 +537,7 @@
     static unsigned char *vo_dga_base;
     static int prev_width, prev_height;
 
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
     // needed to change DGA video mode
     int mX = VO_DGA_INVALID_RES, mY = VO_DGA_INVALID_RES, mVBI =
         100000, mMaxY = 0, i, j = 0;
@@ -545,7 +545,7 @@
     XDGAMode *modeline;
     XDGADevice *dgadevice;
 #else
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
     unsigned int vm_event, vm_error;
     unsigned int vm_ver, vm_rev;
     int i, j = 0, have_vm = 0;
@@ -591,7 +591,7 @@
 
 // choose a suitable mode ...
 
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
 // Code to change the video mode added by Michael Graffam
 // mgraffam@idsi.net
 
@@ -664,7 +664,7 @@
 
 #else
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
 
     mp_msg(MSGT_VO, MSGL_INFO,
            "vo_dga: DGA 1.0 compatibility code: Using XF86VidMode for mode switching!\n");
@@ -738,8 +738,8 @@
         mp_msg(MSGT_VO, MSGL_ERR,
                "vo_dga: Sorry, video larger than viewport is not yet supported!\n");
         // ugly, do something nicer in the future ...
-#ifndef HAVE_DGA2
-#ifdef HAVE_XF86VM
+#ifndef CONFIG_DGA2
+#ifdef CONFIG_XF86VM
         if (vo_dga_vidmodes)
         {
             XFree(vo_dga_vidmodes);
@@ -756,8 +756,8 @@
                "vo_dga: Something is wrong with your DGA. There doesn't seem to be a\n"
                "         single suitable mode!\n"
                "         Please file a bug report (see DOCS/HTML/en/bugreports.html)\n");
-#ifndef HAVE_DGA2
-#ifdef HAVE_XF86VM
+#ifndef CONFIG_DGA2
+#ifdef CONFIG_XF86VM
         if (vo_dga_vidmodes)
         {
             XFree(vo_dga_vidmodes);
@@ -771,7 +771,7 @@
 
     if (!vo_config_count || width != prev_width || height != prev_height)
     {
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
 
         if (!XDGAOpenFramebuffer(mDisplay, mScreen))
         {
@@ -790,7 +790,7 @@
 
 #else
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
         if (have_vm)
         {
             XF86VidModeLockModeSwitch(mDisplay, mScreen, 0);
@@ -853,7 +853,7 @@
         init_video_buffers(vo_dga_base,
                            vo_dga_vp_height,
                            vo_dga_width * HW_MODE.vdm_bytespp,
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
                            modeline->maxViewportY,
 #else
                            vo_dga_vp_height,
@@ -892,7 +892,7 @@
 
         if (vo_dga_XServer_mode == 0)
         {
-#ifndef HAVE_DGA2
+#ifndef CONFIG_DGA2
             mp_msg(MSGT_VO, MSGL_ERR,
                    "vo_dga: Your X-Server is not running in a ");
             mp_msg(MSGT_VO, MSGL_ERR,
@@ -903,7 +903,7 @@
         //            vd_GetModeString(vo_dga_XServer_mode));
         //}                                
 
-#ifdef HAVE_DGA2
+#ifdef CONFIG_DGA2
         vo_modelines = XDGAQueryModes(mDisplay, mScreen, &vo_modecount);
         if (vo_modelines)
         {
--- a/libvo/vo_dxr3.c	Sun Aug 03 20:17:46 2008 +0000
+++ b/libvo/vo_dxr3.c	Mon Aug 04 06:16:23 2008 +0000
@@ -35,7 +35,7 @@
 #ifdef CONFIG_GUI
 #include "gui/interface.h"
 #endif
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
 #include "x11_common.h"
 #endif
 #include "libavutil/avstring.h"
@@ -152,7 +152,7 @@
 /* End overlay.h */
 
 
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
 #define KEY_COLOR 0x80a040
 static XWindowAttributes xwin_attribs;
 static overlay_t *overlay_data;
@@ -178,7 +178,7 @@
 			return VO_ERROR;
 		}
 		return VO_TRUE;
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
 	case VOCTRL_ONTOP:
 		vo_x11_ontop();
 		return VO_TRUE;
@@ -469,7 +469,7 @@
 
 #endif
 
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
 	if (dxr3_overlay) {
 		XVisualInfo vinfo;
 		XSetWindowAttributes xswa;
@@ -645,7 +645,7 @@
 
 static void flip_page(void)
 {
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
 	if (dxr3_overlay) {
 		int event = vo_x11_check_events(mDisplay);
 		if (event & VO_EVENT_RESIZE) {
@@ -699,7 +699,7 @@
 static void uninit(void)
 {
 	mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_Uninitializing);
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
 	if (dxr3_overlay) {
 		overlay_set_mode(overlay_data, EM8300_OVERLAY_MODE_OFF);
 		overlay_release(overlay_data);
@@ -757,7 +757,7 @@
 			mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_UsingNewSyncEngine);
 			dxr3_newsync = 1;
 		} else if (!strncmp("overlay", arg, 7) && !dxr3_overlay) {
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
 			mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_DXR3_UsingOverlay);
 			dxr3_overlay = 1;
 #else
@@ -857,7 +857,7 @@
 	}
 	strcpy(fds_name, devname);
 	
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
 	if (dxr3_overlay) {
 	
 		/* Fucked up hack needed to enable overlay.
--- a/libvo/vo_sdl.c	Sun Aug 03 20:17:46 2008 +0000
+++ b/libvo/vo_sdl.c	Mon Aug 04 06:16:23 2008 +0000
@@ -70,7 +70,7 @@
 #include "aspect.h"
 #include "libmpcodecs/vfcap.h"
 
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
 #include <X11/Xlib.h>
 #include "x11_common.h"
 #endif
@@ -1189,7 +1189,7 @@
 				}
 
 				else if ( keypressed == SDLK_n ) {
-#ifdef HAVE_X11					
+#ifdef CONFIG_X11
 					aspect(&priv->dstwidth, &priv->dstheight,A_NOZOOM);
 #endif					
 					if (priv->surface->w != priv->dstwidth || priv->surface->h != priv->dstheight) {
@@ -1523,7 +1523,7 @@
 static void
 uninit(void)
 {
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
     struct sdl_priv_s *priv = &sdl_priv;
     if(priv->X) {
 		if( mp_msg_test(MSGT_VO,MSGL_V) ) {
@@ -1599,7 +1599,7 @@
     mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SDL_UsingDriver, priv->driver);
 
     priv->X = 0;
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
     if(vo_init()) {
 		if( mp_msg_test(MSGT_VO,MSGL_V) ) {
 			mp_msg(MSGT_VO,MSGL_V, "SDL: deactivating XScreensaver/DPMS\n"); }
--- a/libvo/vo_x11.c	Sun Aug 03 20:17:46 2008 +0000
+++ b/libvo/vo_x11.c	Mon Aug 04 06:16:23 2008 +0000
@@ -11,7 +11,7 @@
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
 #include <X11/extensions/xf86vmode.h>
 #endif
 #include <errno.h>
@@ -317,7 +317,7 @@
     unsigned long xswamask;
     const struct fmt2Xfmtentry_s *fmte = fmt2Xfmt;
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
     unsigned int modeline_width, modeline_height;
     static uint32_t vm_width;
     static uint32_t vm_height;
@@ -375,7 +375,7 @@
     else
 #endif
     {
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
         if (vm)
         {
             if ((d_width == 0) && (d_height == 0))
@@ -405,7 +405,7 @@
         xswa.colormap = theCmap;
         xswamask = CWBackPixel | CWBorderPixel | CWColormap;
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
         if (vm)
         {
             xswa.override_redirect = True;
@@ -452,7 +452,7 @@
                                                ButtonReleaseMask |
                                                PointerMotionMask)));
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
         if (vm)
         {
             /* Grab the mouse pointer in our window */
@@ -725,7 +725,7 @@
 
     freeMyXImage();
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
     vo_vm_close(mDisplay);
 #endif
 
--- a/libvo/vo_xmga.c	Sun Aug 03 20:17:46 2008 +0000
+++ b/libvo/vo_xmga.c	Mon Aug 04 06:16:23 2008 +0000
@@ -29,7 +29,7 @@
 #include <X11/Xutil.h>
 #include <errno.h>
 
-#ifdef HAVE_XINERAMA
+#ifdef CONFIG_XINERAMA
 #include <X11/extensions/Xinerama.h>
 #endif
 
--- a/libvo/vo_xover.c	Sun Aug 03 20:17:46 2008 +0000
+++ b/libvo/vo_xover.c	Mon Aug 04 06:16:23 2008 +0000
@@ -24,7 +24,7 @@
 #include <X11/Xutil.h>
 //#include <X11/keysym.h>
 
-#ifdef HAVE_XINERAMA
+#ifdef CONFIG_XINERAMA
 #include <X11/extensions/Xinerama.h>
 #endif
 
@@ -111,7 +111,7 @@
 
   vo_dwidth=drwWidth; vo_dheight=drwHeight;
 
-#ifdef HAVE_XINERAMA
+#ifdef CONFIG_XINERAMA
   if (XineramaIsActive(mDisplay))
     {
       XineramaScreenInfo *screens;
--- a/libvo/vo_xv.c	Sun Aug 03 20:17:46 2008 +0000
+++ b/libvo/vo_xv.c	Mon Aug 04 06:16:23 2008 +0000
@@ -174,7 +174,7 @@
     unsigned long xswamask;
     int depth;
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
     int vm = 0;
     unsigned int modeline_width, modeline_height;
     static uint32_t vm_width;
@@ -198,7 +198,7 @@
     int_pause = 0;
     visible_buf = -1;
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
     if (flags & VOFLAG_MODESWITCHING)
         vm = 1;
 #endif
@@ -234,7 +234,7 @@
         hint.y = vo_dy;
         hint.width = d_width;
         hint.height = d_height;
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
         if (vm)
         {
             if ((d_width == 0) && (d_height == 0))
@@ -308,7 +308,7 @@
             XFreeGC(mDisplay, vo_gc);
         vo_gc = XCreateGC(mDisplay, vo_window, 0L, &xgcv);
         XSync(mDisplay, False);
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
         if (vm)
         {
             /* Grab the mouse pointer in our window */
@@ -710,7 +710,7 @@
     }
     for (i = 0; i < num_buffers; i++)
         deallocate_xvimage(i);
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
     vo_vm_close(mDisplay);
 #endif
     mp_input_rm_event_fd(ConnectionNumber(mDisplay));
--- a/libvo/vo_xvidix.c	Sun Aug 03 20:17:46 2008 +0000
+++ b/libvo/vo_xvidix.c	Mon Aug 04 06:16:23 2008 +0000
@@ -22,7 +22,7 @@
 #include <X11/Xutil.h>
 //#include <X11/keysym.h>
 
-#ifdef HAVE_XINERAMA
+#ifdef CONFIG_XINERAMA
 #include <X11/extensions/Xinerama.h>
 #endif
 
@@ -124,7 +124,7 @@
     vo_dwidth = drwWidth;
     vo_dheight = drwHeight;
 
-#ifdef HAVE_XINERAMA
+#ifdef CONFIG_XINERAMA
     if (XineramaIsActive(mDisplay))
     {
         XineramaScreenInfo *screens;
--- a/libvo/vo_xvmc.c	Sun Aug 03 20:17:46 2008 +0000
+++ b/libvo/vo_xvmc.c	Mon Aug 04 06:16:23 2008 +0000
@@ -38,7 +38,7 @@
 #include "libavutil/common.h"
 
 //no chance for xinerama to be supported in the near future
-#undef HAVE_XINERAMA
+#undef CONFIG_XINERAMA
 
 #undef NDEBUG 
 #include <assert.h>
@@ -463,7 +463,7 @@
 XWindowAttributes attribs;
 unsigned long xswamask;
 int depth;
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
 int vm=0;
 unsigned int modeline_width, modeline_height;
 static uint32_t vm_width;
@@ -641,7 +641,7 @@
 
    vo_mouse_autohide = 1;
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
    if( flags&VOFLAG_MODESWITCHING ) vm = 1;
 #endif
 
@@ -655,7 +655,7 @@
       hint.y = vo_dy;
       hint.width = d_width;
       hint.height = d_height;
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
       if ( vm )
       {
 	 if ((d_width==0) && (d_height==0))
@@ -707,7 +707,7 @@
       if ( vo_gc != None ) XFreeGC( mDisplay,vo_gc );
       vo_gc = XCreateGC(mDisplay, vo_window, GCForeground, &xgcv);
       XSync(mDisplay, False);
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
       if ( vm )
       {
       /* Grab the mouse pointer in our window */
@@ -1153,7 +1153,7 @@
       printf("vo_xvmc: uninit called\n"); }
    xvmc_free();
  //from vo_xv
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
    vo_vm_close(mDisplay);
 #endif
    vo_x11_uninit();
--- a/libvo/x11_common.c	Sun Aug 03 20:17:46 2008 +0000
+++ b/libvo/x11_common.c	Mon Aug 04 06:16:23 2008 +0000
@@ -26,27 +26,27 @@
 #include <X11/Xutil.h>
 #include <X11/Xatom.h>
 
-#ifdef HAVE_XSS
+#ifdef CONFIG_XSS
 #include <X11/extensions/scrnsaver.h>
 #endif
 
-#ifdef HAVE_XDPMS
+#ifdef CONFIG_XDPMS
 #include <X11/extensions/dpms.h>
 #endif
 
-#ifdef HAVE_XINERAMA
+#ifdef CONFIG_XINERAMA
 #include <X11/extensions/Xinerama.h>
 #endif
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
 #include <X11/extensions/xf86vmode.h>
 #endif
 
-#ifdef HAVE_XF86XK
+#ifdef CONFIG_XF86XK
 #include <X11/XF86keysym.h>
 #endif
 
-#ifdef HAVE_XV
+#ifdef CONFIG_XV
 #include <X11/extensions/Xv.h>
 #include <X11/extensions/Xvlib.h>
 
@@ -112,7 +112,7 @@
 static int vo_old_width = 0;
 static int vo_old_height = 0;
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
 XF86VidModeModeInfo **vidmodes = NULL;
 XF86VidModeModeLine modeline;
 #endif
@@ -369,7 +369,7 @@
 void update_xinerama_info(void) {
     int screen = xinerama_screen;
     xinerama_x = xinerama_y = 0;
-#ifdef HAVE_XINERAMA
+#ifdef CONFIG_XINERAMA
     if (screen >= -1 && XineramaIsActive(mDisplay))
     {
         XineramaScreenInfo *screens;
@@ -450,7 +450,7 @@
 
     init_atoms();
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
     {
         int clock;
 
@@ -1615,7 +1615,7 @@
 
 static int xss_suspend(Bool suspend)
 {
-#ifndef HAVE_XSS
+#ifndef CONFIG_XSS
     return 0;
 #else
     int event, error, major, minor;
@@ -1641,7 +1641,7 @@
     screensaver_off = 0;
     if (xss_suspend(False))
         return;
-#ifdef HAVE_XDPMS
+#ifdef CONFIG_XDPMS
     if (dpms_disabled)
     {
         int nothing;
@@ -1682,7 +1682,7 @@
     screensaver_off = 1;
     if (xss_suspend(True))
         return;
-#ifdef HAVE_XDPMS
+#ifdef CONFIG_XDPMS
     if (DPMSQueryExtension(mDisplay, &nothing, &nothing))
     {
         BOOL onoff;
@@ -1754,7 +1754,7 @@
     }
 }
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
 void vo_vm_switch(uint32_t X, uint32_t Y, int *modeline_width,
                   int *modeline_height)
 {
@@ -2044,7 +2044,7 @@
     return VO_TRUE;
 }
 
-#ifdef HAVE_XV
+#ifdef CONFIG_XV
 int vo_xv_set_eq(uint32_t xv_port, char *name, int value)
 {
     XvAttribute *attributes;
--- a/libvo/x11_common.h	Sun Aug 03 20:17:46 2008 +0000
+++ b/libvo/x11_common.h	Mon Aug 04 06:16:23 2008 +0000
@@ -70,7 +70,7 @@
 extern GC         vo_gc;
 extern XSizeHints vo_hint;
 
-#ifdef HAVE_XV
+#ifdef CONFIG_XV
 //XvPortID xv_port;
 extern unsigned int xv_port;
 
@@ -114,7 +114,7 @@
 void saver_off( Display * );
 void saver_on( Display * );
 
-#ifdef HAVE_XF86VM
+#ifdef CONFIG_XF86VM
 void vo_vm_switch(uint32_t, uint32_t, int*, int*);
 void vo_vm_close(Display*);
 #endif
--- a/mplayer.c	Sun Aug 03 20:17:46 2008 +0000
+++ b/mplayer.c	Mon Aug 04 06:16:23 2008 +0000
@@ -58,7 +58,7 @@
 #include "libvo/font_load.h"
 #include "libvo/sub.h"
 
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
 #include "libvo/x11_common.h"
 #endif
 
@@ -691,7 +691,7 @@
 #ifdef WIN32
   timeEndPeriod(1);
 #endif
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
 #ifdef CONFIG_GUI
   if ( !use_gui )
 #endif
@@ -2734,7 +2734,7 @@
       printf("\n");
       opt_exit = 1;
     }
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
     if(vo_fstype_list && strcmp(vo_fstype_list[0],"help")==0){
       fstype_help();
       mp_msg(MSGT_FIXME, MSGL_FIXME, "\n");
@@ -3745,7 +3745,7 @@
     current_module="vo_check_events";
     if (vo_config_count) mpctx->video_out->check_events();
 
-#ifdef HAVE_X11
+#ifdef CONFIG_X11
     if (stop_xscreensaver) {
 	current_module = "stop_xscreensaver";
 	xscreensaver_heartbeat();
--- a/vidix/radeon_vid.c	Sun Aug 03 20:17:46 2008 +0000
+++ b/vidix/radeon_vid.c	Mon Aug 04 06:16:23 2008 +0000
@@ -41,7 +41,7 @@
 #include "dha.h"
 #include "radeon.h"
 
-#if !defined(RAGE128) && defined(HAVE_X11)
+#if !defined(RAGE128) && defined(CONFIG_X11)
 #include <X11/Xlib.h>
 static uint32_t firegl_shift = 0;
 #endif
@@ -1168,7 +1168,7 @@
     { 0, 0, 0, 0}
 };
 
-#if !defined(RAGE128) && defined(HAVE_X11)
+#if !defined(RAGE128) && defined(CONFIG_X11)
 static void probe_fireGL_driver(void) {
   Display *dp = XOpenDisplay ((void*)0);
   int n = 0;
@@ -1243,7 +1243,7 @@
 #endif
 	    besr.chip_flags=R_100|R_OVL_SHIFT;
 	}
-#if !defined(RAGE128) && defined(HAVE_X11)
+#if !defined(RAGE128) && defined(CONFIG_X11)
         probe_fireGL_driver();
 #endif
 	if(idx != -1) besr.chip_flags=ati_card_ids[idx].flags;
@@ -3098,7 +3098,7 @@
   for(;nfr>0; nfr--)
   {
       radeon_overlay_off = radeon_video_size - info->frame_size*nfr;
-#if !defined (RAGE128) && defined(HAVE_X11)
+#if !defined (RAGE128) && defined(CONFIG_X11)
       radeon_overlay_off -= firegl_shift;
 #endif
       radeon_overlay_off &= 0xffff0000;
@@ -3110,7 +3110,7 @@
    for(;nfr>0; nfr--)
    {
       radeon_overlay_off = radeon_video_size - info->frame_size*nfr;
-#if !defined (RAGE128) && defined(HAVE_X11)
+#if !defined (RAGE128) && defined(CONFIG_X11)
       radeon_overlay_off -= firegl_shift;
 #endif
       radeon_overlay_off &= 0xffff0000;