xorg/st: fixup builds against later dpms headers.
authorBrian Paul <brianp@vmware.com>
Wed, 18 Nov 2009 15:07:56 +0000 (08:07 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 18 Nov 2009 15:07:56 +0000 (08:07 -0700)
(cherry picked from master, commit e9d6ab72be065becf7a077c33919d37faa8db92e)

configure.ac
src/gallium/state_trackers/xorg/xorg_crtc.c
src/gallium/state_trackers/xorg/xorg_output.c

index 5d11cf8452735b5b95856b982276bf97cef99599..85385452c04b7451e8b9285e6009ffb438b5fb88 100644 (file)
@@ -1157,6 +1157,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 fe08bde9efc736de740e38cc1267234a50e89841..67fe29a69dab535eed641bdf6fc9d14d5a2e492e 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 950af942f5b1c822225aeebfa8383ad445c8af4f..26f45f8d64592b7ae1deefec210d815904f8633c 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"