Use Xxf86dga.h & xf86dgaproto.h if present, to avoid warnings from old headers
authorAlan Coopersmith <alan.coopersmith@sun.com>
Tue, 13 Oct 2009 01:00:15 +0000 (18:00 -0700)
committerAlan Coopersmith <alan.coopersmith@sun.com>
Tue, 13 Oct 2009 01:00:15 +0000 (18:00 -0700)
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
configure.ac
xdpyinfo.c

index 0ed78b0..5d4e904 100644 (file)
@@ -69,7 +69,7 @@ if test "x$USE_DGA" != "xno" ; then
        PKG_CHECK_MODULES(DPY_XF86DGA, xxf86dga, 
                [SAVE_CPPFLAGS="$CPPFLAGS"
                CPPFLAGS="$CPPFLAGS $DPY_XF86DGA_CFLAGS $DPY_X11_CFLAGS"
-               AC_CHECK_HEADERS([X11/extensions/xf86dga.h X11/extensions/xf86dgastr.h],,,
+               AC_CHECK_HEADERS([X11/extensions/Xxf86dga.h X11/extensions/xf86dgaproto.h X11/extensions/xf86dga.h X11/extensions/xf86dgastr.h],,,
                                 [#include <X11/Xlib.h>
 #include <X11/Xproto.h>])
                CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
index 21b8412..dc9829a 100644 (file)
@@ -51,7 +51,8 @@ in this Software without prior written authorization from The Open Group.
 #  define XF86VIDMODE
 # endif
 
-# if HAVE_X11_EXTENSIONS_XF86DGA_H && HAVE_X11_EXTENSIONS_XF86DGASTR_H
+# if (HAVE_X11_EXTENSIONS_XXF86DGA_H && HAVE_X11_EXTENSIONS_XF86DGAPROTO_H) \
+  || (HAVE_X11_EXTENSIONS_XF86DGA_H && HAVE_X11_EXTENSIONS_XF86DGASTR_H)
 #  define XFreeXDGA
 # endif
 
@@ -112,8 +113,13 @@ in this Software without prior written authorization from The Open Group.
 # endif
 #endif
 #ifdef XFreeXDGA
-#include <X11/extensions/xf86dga.h>
-#include <X11/extensions/xf86dgastr.h>
+# if HAVE_X11_EXTENSIONS_XXF86DGA_H && HAVE_X11_EXTENSIONS_XF86DGAPROTO_H
+#  include <X11/extensions/Xxf86dga.h>
+#  include <X11/extensions/xf86dgaproto.h>
+# else
+#  include <X11/extensions/xf86dga.h>
+#  include <X11/extensions/xf86dgastr.h>
+# endif
 #endif
 #ifdef XF86MISC
 #include <X11/extensions/xf86misc.h>