diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-09-15 08:15:04 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-09-15 08:46:46 +0100 |
commit | 0d451ee3891d87268322dc3b72b487fdd2fbade6 (patch) | |
tree | be2abcb48675ce2bb057baab970ae563e0a91674 | |
parent | 11444619457aa8121efc937291f1d944ac42265d (diff) |
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>
-rw-r--r-- | configure.ac | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 0191bd5c..8b34c773 100644 --- a/configure.ac +++ b/configure.ac @@ -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" |