summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--src/ch7017/ch7017.c5
-rw-r--r--src/ch7xxx/ch7xxx.c5
-rw-r--r--src/ivch/ivch.c5
-rw-r--r--src/sil164/sil164.c5
-rw-r--r--src/tfp410/tfp410.c5
-rw-r--r--uxa/uxa-priv.h31
7 files changed, 59 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 077c1ffe..38574708 100644
--- a/configure.ac
+++ b/configure.ac
@@ -101,6 +101,10 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
# Checks for pkg-config packages
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6 xproto fontsproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
+ HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
+ HAVE_XEXTPROTO_71="no")
+AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
drm_cflags=$(pkg-config --cflags libdrm)
diff --git a/src/ch7017/ch7017.c b/src/ch7017/ch7017.c
index 759fc24b..01e414f0 100644
--- a/src/ch7017/ch7017.c
+++ b/src/ch7017/ch7017.c
@@ -39,8 +39,13 @@
#include "miscstruct.h"
#include "xf86i2c.h"
#include "xf86Crtc.h"
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
+
#include "../i2c_vid.h"
#include "ch7017_reg.h"
diff --git a/src/ch7xxx/ch7xxx.c b/src/ch7xxx/ch7xxx.c
index 8a439e42..13ba1020 100644
--- a/src/ch7xxx/ch7xxx.c
+++ b/src/ch7xxx/ch7xxx.c
@@ -39,8 +39,13 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "miscstruct.h"
#include "xf86i2c.h"
#include "xf86Crtc.h"
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
+
#include "../i2c_vid.h"
#include "ch7xxx.h"
diff --git a/src/ivch/ivch.c b/src/ivch/ivch.c
index 873afcc9..dffe334a 100644
--- a/src/ivch/ivch.c
+++ b/src/ivch/ivch.c
@@ -36,8 +36,13 @@
#include "miscstruct.h"
#include "xf86i2c.h"
#include "xf86Crtc.h"
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
+
#include <unistd.h>
#include "../i2c_vid.h"
diff --git a/src/sil164/sil164.c b/src/sil164/sil164.c
index 410a681f..c90bed32 100644
--- a/src/sil164/sil164.c
+++ b/src/sil164/sil164.c
@@ -40,8 +40,13 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "miscstruct.h"
#include "xf86i2c.h"
#include "xf86Crtc.h"
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
+
#include "../i2c_vid.h"
#include "sil164.h"
diff --git a/src/tfp410/tfp410.c b/src/tfp410/tfp410.c
index c2c4fc3d..4d3bb8ad 100644
--- a/src/tfp410/tfp410.c
+++ b/src/tfp410/tfp410.c
@@ -39,8 +39,13 @@
#include "miscstruct.h"
#include "xf86i2c.h"
#include "xf86Crtc.h"
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
+
#include "../i2c_vid.h"
#include "tfp410.h"
diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h
index 3d2b7764..d469474d 100644
--- a/uxa/uxa-priv.h
+++ b/uxa/uxa-priv.h
@@ -42,9 +42,13 @@
#define NEED_EVENTS
#include <X11/Xproto.h>
#ifdef MITSHM
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/shm.h>
+#else
#define _XSHM_SERVER_
#include <X11/extensions/shmstr.h>
#endif
+#endif
#include "scrnintstr.h"
#include "pixmapstr.h"
#include "windowstr.h"
@@ -321,9 +325,34 @@ uxa_get_image (DrawablePtr pDrawable, int x, int y, int w, int h,
extern const GCOps uxa_ops;
#ifdef MITSHM
+/* XXX these come from shmint.h, which isn't exported by the server */
+
+#ifdef HAVE_XEXTPROTO_71
+/* Up to xextproto 7.1, these were provided in shmstr.h */
+typedef struct _ShmFuncs {
+ PixmapPtr (* CreatePixmap)(ScreenPtr pScreen,
+ int width,
+ int height,
+ int depth,
+ char *addr);
+ void (* PutImage)(DrawablePtr dst,
+ GCPtr pGC,
+ int depth,
+ unsigned int format,
+ int w,
+ int h,
+ int sx,
+ int sy,
+ int sw,
+ int sh,
+ int dx,
+ int dy,
+ char *data);
+} ShmFuncs, *ShmFuncsPtr;
+#endif
+
extern ShmFuncs uxa_shm_funcs;
-/* XXX these come from shmint.h, which isn't exported by the server */
void
ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs);