Use xf86vmproto.h instead of xf86vmstr.h if it is installed
authorAlan Coopersmith <alan.coopersmith@sun.com>
Mon, 21 Sep 2009 23:27:55 +0000 (16:27 -0700)
committerAlan Coopersmith <alan.coopersmith@sun.com>
Tue, 22 Sep 2009 02:31:15 +0000 (19:31 -0700)
Clears warnings when built with xf86vidmodeproto 2.2.99.1 & later

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
configure.ac
xdpyinfo.c

index dfd8c83..0ed78b0 100644 (file)
@@ -60,7 +60,7 @@ PKG_CHECK_MODULES(DPY_XKB, x11,
 PKG_CHECK_MODULES(DPY_XF86VIDMODE, xxf86vm, 
        [SAVE_CPPFLAGS="$CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $DPY_XF86VIDMODE_CFLAGS $DPY_X11_CFLAGS"
-       AC_CHECK_HEADERS([X11/extensions/xf86vmode.h X11/extensions/xf86vmstr.h],,,[#include <X11/Xlib.h>])
+       AC_CHECK_HEADERS([X11/extensions/xf86vmode.h X11/extensions/xf86vmstr.h X11/extensions/xf86vmproto.h],,,[#include <X11/Xlib.h>])
        CPPFLAGS="$SAVE_CPPFLAGS"],[echo "not found"])
 
 AC_ARG_WITH(dga, AC_HELP_STRING([--without-dga],[Disable dga support.]), 
index 1125aa4..21b8412 100644 (file)
@@ -46,7 +46,8 @@ in this Software without prior written authorization from The Open Group.
 #  define XKB
 # endif
 
-# if HAVE_X11_EXTENSIONS_XF86VMODE_H && HAVE_X11_EXTENSIONS_XF86VMSTR_H
+# if HAVE_X11_EXTENSIONS_XF86VMODE_H && \
+       (HAVE_X11_EXTENSIONS_XF86VMSTR_H || HAVE_X11_EXTENSIONS_XF86VMPROTO_H)
 #  define XF86VIDMODE
 # endif
 
@@ -104,7 +105,11 @@ in this Software without prior written authorization from The Open Group.
 #endif
 #ifdef XF86VIDMODE
 #include <X11/extensions/xf86vmode.h>
-#include <X11/extensions/xf86vmstr.h>
+# if HAVE_X11_EXTENSIONS_XF86VMPROTO_H /* xf86vidmodeproto 2.2.99.1 & later */
+#  include <X11/extensions/xf86vmproto.h>
+# else
+#  include <X11/extensions/xf86vmstr.h>
+# endif
 #endif
 #ifdef XFreeXDGA
 #include <X11/extensions/xf86dga.h>