From 2d709fe2721e6e7f8c33e2973e623fcf44b19efe Mon Sep 17 00:00:00 2001 From: Dan Nicholson Date: Tue, 6 May 2008 10:51:49 -0700 Subject: [PATCH] autoconf: Allow XCB to be used for GLX Adds an --enable-xcb switch to use XCB in GLX. This only has an effect when the driver is DRI. --- configure.ac | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 86958843661..6aac482e1a8 100644 --- a/configure.ac +++ b/configure.ac @@ -356,6 +356,18 @@ xlib|dri) ;; esac +dnl XCB - this is only used for GLX right now +AC_ARG_ENABLE([xcb], + [AS_HELP_STRING([--enable-xcb], + [use XCB for GLX @<:@default=disabled@:>@])], + [enable_xcb="$enableval"], + [enable_xcb=no]) +if test "x$enable_xcb" = xyes; then + DEFINES="$DEFINES -DUSE_XCB" +else + enable_xcb=no +fi + # SELinux awareness. AC_ARG_ENABLE([selinux], [AS_HELP_STRING([--enable-selinux], @@ -406,13 +418,26 @@ dri) # find the DRI deps for libGL if test "$x11_pkgconfig" = yes; then - PKG_CHECK_MODULES([DRIGL], [x11 xext xxf86vm xdamage xfixes]) + # add xcb modules if necessary + dri_modules="x11 xext xxf86vm xdamage xfixes" + if test "$enable_xcb" = yes; then + dri_modules="$dri_modules x11-xcb xcb-glx" + fi + + PKG_CHECK_MODULES([DRIGL], [$dri_modules]) X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS" GL_LIB_DEPS="$DRIGL_LIBS" else # should check these... X11_INCLUDES="$X11_INCLUDES $X_CFLAGS" GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXxf86vm -lXdamage -lXfixes" + + # XCB can only be used from pkg-config + if test "$enable_xcb" = yes; then + PKG_CHECK_MODULES([XCB],[x11-xcb xcb-glx]) + X11_INCLUDES="$X11_INCLUDES $XCB_CFLAGS" + GL_LIB_DEPS="$GL_LIB_DEPS $XCB_LIBS" + fi fi # need DRM libs, -lpthread, etc. -- 2.30.2