From patchwork Tue Jul 31 12:09:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Martin X-Patchwork-Id: 1259521 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 1E0553FC1A for ; Tue, 31 Jul 2012 12:35:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EA3FAA0873 for ; Tue, 31 Jul 2012 05:35:56 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 1635 seconds by postgrey-1.32 at gabe; Tue, 31 Jul 2012 14:35:16 CEST Received: from a.mx.secunet.com (a.mx.secunet.com [195.81.216.161]) by gabe.freedesktop.org (Postfix) with ESMTP id 2FDBDA02B4 for ; Tue, 31 Jul 2012 05:35:16 -0700 (PDT) Received: from localhost (alg1 [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 80D371A007E for ; Tue, 31 Jul 2012 14:07:47 +0200 (CEST) X-Virus-Scanned: by secunet Received: from mail-srv1.secumail.de (unknown [10.53.40.200]) by a.mx.secunet.com (Postfix) with ESMTP id C7D2E1A007D for ; Tue, 31 Jul 2012 14:07:42 +0200 (CEST) Received: from localhost ([10.182.7.55]) by mail-srv1.secumail.de over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 31 Jul 2012 14:07:53 +0200 Date: Tue, 31 Jul 2012 14:09:17 +0200 From: Daniel Martin To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] Add configure option --with/--without-valgrind Message-ID: <20120731120916.GA32123@dmn> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginalArrivalTime: 31 Jul 2012 12:07:53.0225 (UTC) FILETIME=[1CD3C790:01CD6F15] 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: , 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 Add a configure option --with/--without-valgrind to be able to compile libdrm with or without valgrind. The latter was not possible if pkgconfig found the valgrind package. --- configure.ac | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 09fed53..0776320 100644 --- a/configure.ac +++ b/configure.ac @@ -292,8 +292,21 @@ fi AC_SUBST(PCIACCESS_CFLAGS) AC_SUBST(PCIACCESS_LIBS) -PKG_CHECK_MODULES(VALGRIND, [valgrind], [have_valgrind=yes], [have_valgrind=no]) -if test "x$have_valgrind" = "xyes"; then +AC_ARG_WITH(valgrind, + AS_HELP_STRING([--with-valgrind], + [Enable support for valgrind (default: auto)]), + [VALGRIND=$with_valgrind], [VALGRIND=auto]) + +if test "x$VALGRIND" = "xauto"; then + PKG_CHECK_MODULES(VALGRIND, [valgrind], [VALGRIND=yes], [VALGRIND=no]) +else + if test "x$VALGRIND" = "xyes"; then + VALGRIND=yes + else + VALGRIND=no + fi +fi +if test "x$VALGRIND" = "xyes"; then AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warnings]) fi @@ -340,6 +353,7 @@ echo "" echo "$PACKAGE_STRING will be compiled with:" echo "" echo " libkms $LIBKMS" +echo " valgrind $VALGRIND" echo " Intel API $INTEL" echo " vmwgfx API $VMWGFX" echo " Radeon API $RADEON"