diff mbox

[2/2] configure.ac: Add a configure arg for the overlay.

Message ID 1453747242-19964-2-git-send-email-eric@anholt.net (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Anholt Jan. 25, 2016, 6:40 p.m. UTC
It's autodetected if its dependencies are present, but it doesn't
build for ARM, nor am I interested in it for now.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 configure.ac | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

Comments

Daniel Stone Jan. 25, 2016, 7:44 p.m. UTC | #1
Hi,

On 25 January 2016 at 18:40, Eric Anholt <eric@anholt.net> wrote:
> It's autodetected if its dependencies are present, but it doesn't
> build for ARM, nor am I interested in it for now.

The one I just sent auto-disables it when not building on x86.

Cheers,
Daniel
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index ddfe696..41bf20d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,12 +87,21 @@  AC_SUBST(ASSEMBLER_WARN_CFLAGS)
 
 PKG_CHECK_MODULES(DRM, [libdrm_intel >= 2.4.64 libdrm])
 PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10])
-PKG_CHECK_MODULES(OVERLAY_XVLIB, [xv x11 xext dri2proto >= 2.6], enable_overlay_xvlib=yes, enable_overlay_xvlib=no)
-PKG_CHECK_MODULES(OVERLAY_XLIB, [cairo-xlib dri2proto >= 2.6], enable_overlay_xlib=yes, enable_overlay_xlib=no)
+
+AC_ARG_ENABLE(overlay, AS_HELP_STRING([--disable-overlay],
+	      [Disable the SNA GPU activity overlay (default: auto)]),
+	      [OVERLAY=$enableval], [OVERLAY=auto])
+if test x$OVERLAY = xno; then
+	enable_overlay_xvlib=no
+	enable_overlay_xlib=no
+else
+	PKG_CHECK_MODULES(OVERLAY_XVLIB, [xv x11 xext dri2proto >= 2.6], enable_overlay_xvlib=yes, enable_overlay_xvlib=no)
+	PKG_CHECK_MODULES(OVERLAY_XLIB, [cairo-xlib dri2proto >= 2.6], enable_overlay_xlib=yes, enable_overlay_xlib=no)
+fi
 
 AM_CONDITIONAL(BUILD_OVERLAY_XVLIB, [test "x$enable_overlay_xvlib" = xyes])
 AM_CONDITIONAL(BUILD_OVERLAY_XLIB, [test "x$enable_overlay_xlib" = xyes])
-AM_CONDITIONAL(BUILD_OVERLAY, [test "x$enable_overlay_xlib" = xyes -o "x$enable_overlay_xvlib"])
+AM_CONDITIONAL(BUILD_OVERLAY, [test "x$enable_overlay_xlib" = xyes -o "x$enable_overlay_xvlib" = xyes])
 if test x$enable_overlay_xvlib = xyes; then
 	AC_DEFINE(HAVE_OVERLAY_XVLIB, 1, [Enable XV backend])
 fi