From patchwork Thu Oct 4 01:21:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Stone X-Patchwork-Id: 1544241 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id DACABDFF71 for ; Thu, 4 Oct 2012 01:22:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BBBD0A0B7D for ; Wed, 3 Oct 2012 18:22:13 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 5DD939E7FD for ; Wed, 3 Oct 2012 18:22:03 -0700 (PDT) Received: by padbi5 with SMTP id bi5so7482335pad.36 for ; Wed, 03 Oct 2012 18:22:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:x-mailer:x-gm-message-state; bh=gJDtOVfNeGKyDVqelSUAsn0856f22keQRzdCkVXVLHI=; b=F0oVhtRvCO6qTN6Zl9pjn2ghiFIiDDhriVpXqTpEBYwmxlAGe1wb0KXGaE5vffKH0m AcIwKzHnaG/22NWWxl4zlqw7y9vygnWDbx5uaE4PcdnofVaCk6MLxjS4w9BNroBdbMPj 3lygh05RWWv875DHLnBeaely5PVGQGjDsTjH8AT+d1VOIsoymL5UxhjO7H7nxhPeoflg yV08/DHJ1GMQQIZZNTwR3cM4z08L4M3XkmeFZTAYfQabdH3EmRbL1mh/7IVSSUE+y8So dKjTwGwyq+LtyyWwe/QJBV+t6d3YiyqUdb7JM5hgbt0R35J20JMW83VWVpylry1/W3u7 xn7g== Received: by 10.68.229.194 with SMTP id ss2mr17686372pbc.17.1349313723091; Wed, 03 Oct 2012 18:22:03 -0700 (PDT) Received: from swamp81.fooishbar.org (115-64-155-100.static.tpgi.com.au. [115.64.155.100]) by mx.google.com with ESMTPS id pj10sm3431913pbb.46.2012.10.03.18.22.01 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 03 Oct 2012 18:22:01 -0700 (PDT) Received: by swamp81.fooishbar.org (Postfix, from userid 1000) id 0799C2996D8B; Thu, 4 Oct 2012 11:21:58 +1000 (EST) From: Daniel Stone To: dri-devel@lists.freedesktop.org Subject: [PATCH v3] configure.ac: Allow forcible disabling of Cairo support Date: Thu, 4 Oct 2012 11:21:57 +1000 Message-Id: <1349313717-19329-1-git-send-email-daniel@fooishbar.org> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQlymzG5eig04aG3SPA5VVHFRlvlcZ/RkQLbxUe61hGKSvV9R1rkVorRmyDX51xmhOoxk+35 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org We don't want to build libdrm tests with Cairo support under Poky, since they're never used and also cause a build loop from libdrm -> cairo -> mesa-dri -> libdrm. To avoid variance in build results, introduce a --disable-cairo-tests switch. Signed-off-by: Daniel Stone --- configure.ac | 18 +++++++++++++++--- tests/modetest/Makefile.am | 11 +++++++---- 2 files changed, 22 insertions(+), 7 deletions(-) v3: Don't link against Cairo if it's been found but disabled. Last one, I promise. diff --git a/configure.ac b/configure.ac index 290362c..8c28107 100644 --- a/configure.ac +++ b/configure.ac @@ -222,11 +222,23 @@ if test "x$EXYNOS" = xyes; then AC_DEFINE(HAVE_EXYNOS, 1, [Have EXYNOS support]) fi +AC_ARG_ENABLE([cairo-tests], + [AS_HELP_STRING([--enable-cairo-tests], + [Enable support for Cairo rendering in tests (default: auto)])], + [CAIRO=$enableval], [CAIRO=auto]) PKG_CHECK_MODULES(CAIRO, cairo, [HAVE_CAIRO=yes], [HAVE_CAIRO=no]) -if test "x$HAVE_CAIRO" = xyes; then - AC_DEFINE(HAVE_CAIRO, 1, [Have cairo support]) +AC_MSG_CHECKING([whether to enable Cairo tests]) +if test "x$CAIRO" = xauto; then + CAIRO="$HAVE_CAIRO" fi -AM_CONDITIONAL(HAVE_CAIRO, [test "x$HAVE_CAIRO" = xyes]) +if test "x$CAIRO" = xyes; then + if ! test "x$HAVE_CAIRO" = xyes; then + AC_MSG_ERROR([Cairo support required but not present]) + fi + AC_DEFINE(HAVE_CAIRO, 1, [Have Cairo support]) +fi +AC_MSG_RESULT([$CAIRO]) +AM_CONDITIONAL(HAVE_CAIRO, [test "x$CAIRO" = xyes]) # For enumerating devices in test case PKG_CHECK_MODULES(LIBUDEV, libudev, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no]) diff --git a/tests/modetest/Makefile.am b/tests/modetest/Makefile.am index b5ec771..065ae13 100644 --- a/tests/modetest/Makefile.am +++ b/tests/modetest/Makefile.am @@ -1,8 +1,7 @@ AM_CFLAGS = \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)/libkms/ \ - -I$(top_srcdir) \ - $(CAIRO_CFLAGS) + -I$(top_srcdir) noinst_PROGRAMS = \ modetest @@ -12,5 +11,9 @@ modetest_SOURCES = \ modetest_LDADD = \ $(top_builddir)/libdrm.la \ - $(top_builddir)/libkms/libkms.la \ - $(CAIRO_LIBS) + $(top_builddir)/libkms/libkms.la + +if HAVE_CAIRO +AM_CFLAGS += $(CAIRO_CFLAGS) +modetest_LDADD += $(CAIRO_LIBS) +endif