summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac4
-rw-r--r--src/smi_501.c5
-rw-r--r--src/smi_driver.c5
3 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ec0e99e..e38433e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,6 +60,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/smi_501.c b/src/smi_501.c
index a392eb0..a605e0d 100644
--- a/src/smi_501.c
+++ b/src/smi_501.c
@@ -35,8 +35,13 @@ authorization from The XFree86 Project or Silicon Motion.
#include "smi_501.h"
#include "regsmi.h"
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
+
/* Want to see register dumps for now */
#undef VERBLEV
diff --git a/src/smi_driver.c b/src/smi_driver.c
index b47f774..b9b7b18 100644
--- a/src/smi_driver.c
+++ b/src/smi_driver.c
@@ -43,8 +43,13 @@ authorization from The XFree86 Project or Silicon Motion.
#include "smi_crtc.h"
#include "globals.h"
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
+
/*
* Internals