avoid the old dga headers if we can (they're now deprecated)

This commit is contained in:
Bill Currie 2010-08-05 02:35:16 +00:00 committed by Jeff Teunissen
parent 96a507e8ea
commit 970dd0b872
4 changed files with 33 additions and 10 deletions

View file

@ -814,7 +814,7 @@ fi
dnl Check for XFree86-VidMode support
AC_ARG_ENABLE(vidmode,
[ --disable-vidmode don't use XFree86 VidMode extension],
[ --disable-vidmode do not use XFree86 VidMode extension],
HAVE_VIDMODE=$enable_vidmode, HAVE_VIDMODE=auto)
if test "x$HAVE_VIDMODE" != xno; then
save_CPPFLAGS="$CPPFLAGS"
@ -835,19 +835,29 @@ AC_SUBST(VIDMODE_LIBS)
dnl Check for DGA support
AC_ARG_ENABLE(dga,
[ --disable-dga don't use XFree86 DGA extension],
[ --disable-dga do not use XFree86 DGA extension],
HAVE_DGA=$enable_dga, HAVE_DGA=auto)
if test "x$HAVE_DGA" != xno; then
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$X_CFLAGS $CPPFLAGS"
AC_CHECK_HEADER(X11/extensions/xf86dga.h,
AC_CHECK_HEADER(X11/extensions/Xxf86dga.h,
dnl Make sure the library works
[AC_CHECK_LIB(Xxf86dga, XF86DGAQueryVersion,
AC_DEFINE(HAVE_DGA, 1, [Define if you have the XFree86 DGA extension])
DGA_LIBS="-lXxf86dga",,
[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS]
)],
[],
[AC_CHECK_HEADER(X11/extensions/xf86dga.h,
dnl Make sure the library works
[AC_CHECK_LIB(Xxf86dga, XF86DGAQueryVersion,
AC_DEFINE(HAVE_DGA, 1, [Define if you have the XFree86 DGA extension])
AC_DEFINE(DGA_OLD_HEADERS, 1, [Define if DGA uses old headers])
DGA_LIBS="-lXxf86dga",,
[$X_LIBS -lXext -lX11 $X_EXTRA_LIBS]
)],
[],
[#include <X11/Xlib.h>]
)],
[#include <X11/Xlib.h>]
)
CPPFLAGS="$save_CPPFLAGS"

View file

@ -38,8 +38,13 @@ static __attribute__ ((used)) const char rcsid[] =
#include <X11/Xproto.h>
#ifdef HAVE_DGA
# include <X11/extensions/xf86dga.h>
# include <X11/extensions/xf86dgastr.h>
# ifdef DGA_OLD_HEADERS
# include <X11/extensions/xf86dga.h>
# include <X11/extensions/xf86dgastr.h>
# else
# include <X11/extensions/Xxf86dga.h>
# include <X11/extensions/xf86dgaproto.h>
# endif
# ifndef XDGA_MAJOR_VERSION
# ifdef XF86DGA_MAJOR_VERSION
# define XDGA_MAJOR_VERSION XF86DGA_MAJOR_VERSION
@ -50,7 +55,7 @@ static __attribute__ ((used)) const char rcsid[] =
#endif
#ifdef HAVE_VIDMODE
# include <X11/extensions/xf86vmode.h>
# include <X11/extensions/xf86vmstr.h>
# include <X11/extensions/xf86vmproto.h>
#endif
#include "QF/sys.h"

View file

@ -56,7 +56,11 @@ static __attribute__ ((used)) const char rcsid[] =
#ifdef HAVE_DGA
# include <X11/extensions/XShm.h>
# include <X11/extensions/xf86dga.h>
# ifdef DGA_OLD_HEADERS
# include <X11/extensions/xf86dga.h>
# else
# include <X11/extensions/Xxf86dga.h>
#endif
#endif
#include "QF/cdaudio.h"

View file

@ -47,7 +47,11 @@ static __attribute__ ((used)) const char rcsid[] =
#include <X11/cursorfont.h>
#ifdef HAVE_DGA
# include <X11/extensions/xf86dga.h>
# ifdef DGA_OLD_HEADERS
# include <X11/extensions/xf86dga.h>
# else
# include <X11/extensions/Xxf86dga.h>
# endif
#endif
#include "QF/cmd.h"
@ -92,7 +96,7 @@ Bool (*qfglXMakeCurrent) (Display *dpy, GLXDrawable drawable, GLXContext ctx);
// ============================================================================
static int use_gl_procaddress = 0;
static int use_gl_procaddress = 0+0;
#if defined(HAVE_DLOPEN)