summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-07-16 11:26:14 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-07-16 11:26:14 +1000
commit09347dfc78b7f291313057863976bf4b679362d1 (patch)
treec3f2ff3634be864c77a5efe2af917e8f422c2601
parentf985346aef9c15eaa1669ab8317e5e470eb143dc (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/apm_driver.c5
2 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index b15f61e..5d76327 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,6 +55,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)
PKG_CHECK_MODULES(XF86RUSH, xxf86rush, have_xf86rush=yes, have_xf86rush=no)
diff --git a/src/apm_driver.c b/src/apm_driver.c
index 98c02d1..f9420a3 100644
--- a/src/apm_driver.c
+++ b/src/apm_driver.c
@@ -12,8 +12,13 @@
#include "vbe.h"
#include "opaque.h"
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
+
#define APM_VERSION 4000
#define APM_NAME "APM"