aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDan Nicholson <[email protected]>2008-05-06 10:51:49 -0700
committerDan Nicholson <[email protected]>2008-05-09 07:10:24 -0700
commit2d709fe2721e6e7f8c33e2973e623fcf44b19efe (patch)
tree0dad2c7fc2013fbb0011a55d9ffb655bb278661a /configure.ac
parent5dbbde5b222204fa8dfc086b88a8105516f7d727 (diff)
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 26 insertions, 1 deletions
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.