1dnl Checks for X11 and XShm 2if test "x$mingw" != xyes; then 3 AC_PATH_XTRA 4 if test "x$no_x" = x; then 5 HAVE_X=yes 6 AC_CHECK_LIB(Xext, XShmQueryExtension, 7 X_SHM_LIB=-lXext, 8 HAVE_X=no, 9 [ $X_LIBS -lX11 $X_EXTRA_LIBS ] 10 ) 11 fi 12 AC_SUBST(X_SHM_LIB) 13fi 14 15dnl Check for XFree86-VidMode support 16AC_ARG_ENABLE(vidmode, 17[ --disable-vidmode do not use XFree86 VidMode extension], 18 HAVE_VIDMODE=$enable_vidmode, HAVE_VIDMODE=auto) 19if test "x$HAVE_VIDMODE" != xno; then 20 save_CPPFLAGS="$CPPFLAGS" 21 CPPFLAGS="$X_CFLAGS $CPPFLAGS" 22 AC_CHECK_HEADER(X11/extensions/xf86vmode.h, 23 dnl Make sure the library works 24 [AC_CHECK_LIB(Xxf86vm, XF86VidModeSwitchToMode, 25 AC_DEFINE(HAVE_VIDMODE, 1, [Define if you have the XFree86 VIDMODE extension]) 26 VIDMODE_LIBS="-lXxf86vm",, 27 [$X_LIBS -lXext -lX11 $X_EXTRA_LIBS] 28 )], 29 [], 30 [#include <X11/Xlib.h>] 31 ) 32 CPPFLAGS="$save_CPPFLAGS" 33fi 34AC_SUBST(VIDMODE_LIBS) 35 36dnl Check for DGA support 37AC_ARG_ENABLE(dga, 38[ --disable-dga do not use XFree86 DGA extension], 39HAVE_DGA=$enable_dga, HAVE_DGA=auto) 40if test "x$HAVE_DGA" != xno; then 41 save_CPPFLAGS="$CPPFLAGS" 42 CPPFLAGS="$X_CFLAGS $CPPFLAGS" 43 AC_CHECK_HEADER(X11/extensions/Xxf86dga.h, 44 dnl Make sure the library works 45 [AC_CHECK_LIB(Xxf86dga, XF86DGAQueryVersion, 46 AC_DEFINE(HAVE_DGA, 1, [Define if you have the XFree86 DGA extension]) 47 DGA_LIBS="-lXxf86dga",, 48 [$X_LIBS -lXext -lX11 $X_EXTRA_LIBS] 49 )], 50 [AC_CHECK_HEADER(X11/extensions/xf86dga.h, 51 dnl Make sure the library works 52 [AC_CHECK_LIB(Xxf86dga, XF86DGAQueryVersion, 53 AC_DEFINE(HAVE_DGA, 1, [Define if you have the XFree86 DGA extension]) 54 AC_DEFINE(DGA_OLD_HEADERS, 1, [Define if DGA uses old headers]) 55 DGA_LIBS="-lXxf86dga",, 56 [$X_LIBS -lXext -lX11 $X_EXTRA_LIBS] 57 )], 58 [], 59 [#include <X11/Xlib.h>] 60 )], 61 [#include <X11/Xlib.h>] 62 ) 63 CPPFLAGS="$save_CPPFLAGS" 64fi 65AC_SUBST(DGA_LIBS) 66