summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinay Bondhugula <vinayb@vmware.com>2008-04-22 14:18:45 -0400
committerVinay Bondhugula <vinayb@vmware.com>2008-04-22 14:18:45 -0400
commitdb027200474684c0aa4b9387f3ed53b2e5f24478 (patch)
tree4d5639a7df1f6633f247cde7a4e6f3f32ec768fd
parent6849c0a5fbf10722ca475d2ffcce7d0d95d2377a (diff)
More xorg and xfree86 backwards compatibility
Push most of the xorg-server version checking into the configure script. With this change, unmodified driver source compiles in the XFree86 4.3 tree.
-rw-r--r--configure.ac8
-rw-r--r--src/vmware.h9
-rw-r--r--src/vmwarevideo.c8
3 files changed, 16 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 8d20681..163a887 100644
--- a/configure.ac
+++ b/configure.ac
@@ -58,6 +58,14 @@ XORG_DRIVER_CHECK_EXT(XV, videoproto)
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.1 xproto fontsproto $REQUIRED_MODULES])
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
+PKG_CHECK_EXISTS([xorg-server >= 1.1.0],
+ [AC_DEFINE([HAVE_XORG_SERVER_1_1_0], 1,
+ [Has version 1.1.0 or greater of the Xserver])])
+
+PKG_CHECK_EXISTS([xorg-server >= 1.0.99.901],
+ [AC_DEFINE([HAVE_XORG_SERVER_1_0_99_901], 1,
+ [Has version 1.0.99.901 or greater of the Xserver])])
+
# Checks for libraries.
# Checks for header files.
diff --git a/src/vmware.h b/src/vmware.h
index 63bb831..bb1234d 100644
--- a/src/vmware.h
+++ b/src/vmware.h
@@ -8,8 +8,12 @@
#ifndef VMWARE_H
#define VMWARE_H
-#include "xorgVersion.h"
-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(7, 1, 0, 0, 0) || XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(2, 0, 0, 0, 0)
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef HAVE_XORG_SERVER_1_1_0
#include <string.h>
#endif
@@ -19,7 +23,6 @@
#include <X11/extensions/panoramiXproto.h>
-#include "xorg-server.h"
#ifdef XSERVER_LIBPCIACCESS
#include <pciaccess.h>
#endif
diff --git a/src/vmwarevideo.c b/src/vmwarevideo.c
index d6ff4b7..a0a7781 100644
--- a/src/vmwarevideo.c
+++ b/src/vmwarevideo.c
@@ -45,10 +45,6 @@
#include "svga_overlay.h"
#include <X11/extensions/Xv.h>
-/*
- * Need this to figure out which prototype to use for XvPutImage
- */
-#include "xorgVersion.h"
#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)
@@ -170,7 +166,7 @@ typedef VMWAREVideoRec *VMWAREVideoPtr;
/*
* Callback functions
*/
-#if XORG_VERSION_CURRENT > XORG_VERSION_NUMERIC(7, 0, 0, 0, 0) || XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(2, 0, 0, 0, 0)
+#ifdef HAVE_XORG_SERVER_1_0_99_901
static int vmwareXvPutImage(ScrnInfoPtr pScrn, short src_x, short src_y,
short drw_x, short drw_y, short src_w, short src_h,
short drw_w, short drw_h, int image,
@@ -968,7 +964,7 @@ static void vmwareVideoEndStream(ScrnInfoPtr pScrn, VMWAREVideoPtr pVid)
*-----------------------------------------------------------------------------
*/
-#if XORG_VERSION_CURRENT > XORG_VERSION_NUMERIC(7, 0, 0, 0, 0) || XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(4, 0, 0, 0, 0)
+#ifdef HAVE_XORG_SERVER_1_0_99_901
static int vmwareXvPutImage(ScrnInfoPtr pScrn, short src_x, short src_y,
short drw_x, short drw_y, short src_w, short src_h,
short drw_w, short drw_h, int format,