diff --git a/configure.ac b/configure.ac index ad0c0f522..e87a2c6c5 100644 --- a/configure.ac +++ b/configure.ac @@ -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 ] + )], [#include ] ) CPPFLAGS="$save_CPPFLAGS" diff --git a/libs/video/targets/dga_check.c b/libs/video/targets/dga_check.c index 6aca00bf5..ed5335eb7 100644 --- a/libs/video/targets/dga_check.c +++ b/libs/video/targets/dga_check.c @@ -38,8 +38,13 @@ static __attribute__ ((used)) const char rcsid[] = #include #ifdef HAVE_DGA -# include -# include +# ifdef DGA_OLD_HEADERS +# include +# include +# else +# include +# include +# 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 -# include +# include #endif #include "QF/sys.h" diff --git a/libs/video/targets/in_x11.c b/libs/video/targets/in_x11.c index 2c0924d1d..3584e046a 100644 --- a/libs/video/targets/in_x11.c +++ b/libs/video/targets/in_x11.c @@ -56,7 +56,11 @@ static __attribute__ ((used)) const char rcsid[] = #ifdef HAVE_DGA # include -# include +# ifdef DGA_OLD_HEADERS +# include +# else +# include +#endif #endif #include "QF/cdaudio.h" diff --git a/libs/video/targets/vid_glx.c b/libs/video/targets/vid_glx.c index 2bf309473..30bde633f 100644 --- a/libs/video/targets/vid_glx.c +++ b/libs/video/targets/vid_glx.c @@ -47,7 +47,11 @@ static __attribute__ ((used)) const char rcsid[] = #include #ifdef HAVE_DGA -# include +# ifdef DGA_OLD_HEADERS +# include +# else +# include +# 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)