summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-09-11 09:19:17 +1000
committerDave Airlie <airlied@redhat.com>2009-09-11 09:19:17 +1000
commit93df2faf1ea2008248566326f10ed737e7f6fc66 (patch)
tree6fb81603d01271287ffecba11a10ad14b375e7a8
parent9589d19eb8cbf7b1a978c7ea3eaacb328fb48cd8 (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> Conflicts: src/drmmode_display.c
-rw-r--r--configure.ac4
-rw-r--r--src/atombios_crtc.c5
-rw-r--r--src/atombios_output.c5
-rw-r--r--src/radeon_driver.c5
4 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 7c113e9a..40045c5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,6 +76,10 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
# Checks for pkg-config packages
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2 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/atombios_crtc.c b/src/atombios_crtc.c
index f060d8d7..cd98c215 100644
--- a/src/atombios_crtc.c
+++ b/src/atombios_crtc.c
@@ -33,8 +33,13 @@
#include "config.h"
#endif
/* DPMS */
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
+
#include "radeon.h"
#include "radeon_reg.h"
diff --git a/src/atombios_output.c b/src/atombios_output.c
index e6ef0252..57345b34 100644
--- a/src/atombios_output.c
+++ b/src/atombios_output.c
@@ -34,8 +34,13 @@
#include "config.h"
#endif
/* DPMS */
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
+
#include <unistd.h>
#include "radeon.h"
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 9d8bd39c..551cb7fb 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -106,8 +106,13 @@
#include "vgaHW.h"
#endif
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
+
#include "atipciids.h"
#include "radeon_chipset_gen.h"