summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-07-16 11:55:36 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-16 11:55:36 +1000
commit35789a14c0074bb5994deb890e0f3832f1d4a067 (patch)
treed709d3d4d5c421404bef41e70a1b2d8c5bd40b8b
parent89ca2b91468b13db7dda7984675013a6180feb97 (diff)
Update to xextproto 7.1 support.
DPMS header was split into dpms.h (client) and dpmsconst.h (server). Drivers need to include dpmsconst.h if xextproto 7.1 is available. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--configure.ac4
-rw-r--r--src/sisusb_driver.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ec498a0..63914e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,6 +57,10 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
# Checks for pkg-config packages
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 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)
# Checks for libraries.
diff --git a/src/sisusb_driver.c b/src/sisusb_driver.c
index 4424bd5..b6cd7f8 100644
--- a/src/sisusb_driver.c
+++ b/src/sisusb_driver.c
@@ -51,8 +51,13 @@
#include "globals.h"
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
+
/*
* This is intentionally screen-independent. It indicates the binding