xorg/st: fixup builds against later dpms headers.
authorDave Airlie <airlied@redhat.com>
Mon, 21 Sep 2009 03:26:48 +0000 (13:26 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 21 Sep 2009 03:26:48 +0000 (13:26 +1000)
configure.ac
src/gallium/state_trackers/xorg/xorg_crtc.c
src/gallium/state_trackers/xorg/xorg_output.c

index 7518976..2881bb6 100644 (file)
@@ -1148,6 +1148,11 @@ yes)
         if test "$tracker" = egl && test "x$enable_egl" != xyes; then
             AC_MSG_ERROR([cannot build egl state tracker without EGL library])
         fi
+        if test "$tracker" = xorg; then
+           PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
+                  HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71"
+                  HAVE_XEXTPROTO_71="no")
+       fi
     done
     GALLIUM_STATE_TRACKERS_DIRS="$state_trackers"
     ;;
index fe08bde..67fe29a 100644 (file)
 #include "xorg_tracker.h"
 #include "xf86Modes.h"
 
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
 #define DPMS_SERVER
 #include <X11/extensions/dpms.h>
+#endif
 
 #include "pipe/p_inlines.h"
 #include "util/u_rect.h"
index 950af94..26f45f8 100644 (file)
 #include <sys/stat.h>
 #include <sys/types.h>
 
+#ifdef HAVE_XEXTPROTO_71
+#include <X11/extensions/dpmsconst.h>
+#else
 #define DPMS_SERVER
 #include <X11/extensions/dpms.h>
+#endif
 
 #include "X11/Xatom.h"