From 957b8c1a240884b26ee5b91856c251622cc0b2a7 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 16 Jul 2009 11:49:24 +1000 Subject: 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 --- configure.ac | 4 ++++ src/g80_dac.c | 5 +++++ src/g80_driver.c | 5 +++++ src/g80_sor.c | 5 +++++ 4 files changed, 19 insertions(+) diff --git a/configure.ac b/configure.ac index 3c874fe..839512b 100644 --- a/configure.ac +++ b/configure.ac @@ -66,6 +66,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/g80_dac.c b/src/g80_dac.c index 404f178..307e412 100644 --- a/src/g80_dac.c +++ b/src/g80_dac.c @@ -27,8 +27,13 @@ #include +#ifdef HAVE_XEXTPROTO_71 +#include +#else #define DPMS_SERVER #include +#endif + #include #include "g80_type.h" diff --git a/src/g80_driver.c b/src/g80_driver.c index 5ecf895..7e06358 100644 --- a/src/g80_driver.c +++ b/src/g80_driver.c @@ -36,8 +36,13 @@ #include #include #include +#ifdef HAVE_XEXTPROTO_71 +#include +#else #define DPMS_SERVER #include +#endif + #include "nv_const.h" #include "g80_type.h" diff --git a/src/g80_sor.c b/src/g80_sor.c index c1ef42d..185761f 100644 --- a/src/g80_sor.c +++ b/src/g80_sor.c @@ -25,8 +25,13 @@ #include "config.h" #endif +#ifdef HAVE_XEXTPROTO_71 +#include +#else #define DPMS_SERVER #include +#endif + #include #include "g80_type.h" -- cgit v1.2.3