configure: Require the presence of xorg/glamor.h for --enable-glamor

Check that we have the required Xorg headers for glamor if the user
requests --enable-glamor. There is a possiblity that the headers
mismatch as they don't have internal versioning, but this should catch
the majority of errors early on.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-09-15 08:15:04 +01:00
parent 1144461945
commit 0d451ee389
1 changed files with 10 additions and 4 deletions

View File

@ -424,6 +424,9 @@ if test "x$UXA" != "xno"; then
UXA=yes
fi
PKG_CHECK_MODULES(XORG, [xorg-server >= $required_xorg_server_version xproto fontsproto pixman-1 >= $required_pixman_version $REQUIRED_MODULES])
ABI_VERSION=`$PKG_CONFIG --variable=abi_videodrv xorg-server`
AC_ARG_ENABLE(glamor,
AS_HELP_STRING([--enable-glamor],
[Enable glamor, a new GL-based acceleration [default=no]]),
@ -434,7 +437,13 @@ if test "x$GLAMOR" != "xno"; then
AC_MSG_ERROR([Glamor acceleration requested but UXA is not enabled])
fi
if pkg-config --exists "xorg-server >= 1.15.99.901"; then
GLAMOR="yes (using Xorg glamor module)"
save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$XORG_CFLAGS"
AC_CHECK_HEADER([glamor.h],
[GLAMOR="yes (using Xorg glamor module)"],
[test "x$GLAMOR" != "xauto" && AC_MSG_ERROR("failed to find required Xorg headers for glamor")
GLAMOR="no"], [#include <xorg-server.h>])
CPPFLAGS=$save_CPPFLAGS
else
PKG_CHECK_MODULES(LIBGLAMOR, [glamor >= 0.6.0])
PKG_CHECK_MODULES(LIBGLAMOR_EGL, [glamor-egl])
@ -443,9 +452,6 @@ if test "x$GLAMOR" != "xno"; then
AC_DEFINE(USE_GLAMOR, 1, [Enable glamor acceleration])
fi
PKG_CHECK_MODULES(XORG, [xorg-server >= $required_xorg_server_version xproto fontsproto pixman-1 >= $required_pixman_version $REQUIRED_MODULES])
ABI_VERSION=`$PKG_CONFIG --variable=abi_videodrv xorg-server`
if test "x$ONLY_UMS" = "xyes"; then
UMS="yes"
KMS="no"