From patchwork Tue Jul 31 11:29:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Martin X-Patchwork-Id: 1263251 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 785C03FC23 for ; Wed, 1 Aug 2012 08:56:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 115AFA086F for ; Wed, 1 Aug 2012 01:56:35 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 1022 seconds by postgrey-1.32 at gabe; Tue, 31 Jul 2012 13:45:15 CEST Received: from a.mx.secunet.com (a.mx.secunet.com [195.81.216.161]) by gabe.freedesktop.org (Postfix) with ESMTP id C2D199F697 for ; Tue, 31 Jul 2012 04:45:15 -0700 (PDT) Received: from localhost (alg1 [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 1D8D81A008E for ; Tue, 31 Jul 2012 13:28:00 +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 109391A008C for ; Tue, 31 Jul 2012 13:27:58 +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 13:28:07 +0200 Date: Tue, 31 Jul 2012 13:29:31 +0200 From: Daniel Martin To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm] Add configure option --with/--without-valgrind Message-ID: <20120731112931.GA31874@dmn> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginalArrivalTime: 31 Jul 2012 11:28:07.0303 (UTC) FILETIME=[8EB4F970:01CD6F0F] X-Mailman-Approved-At: Wed, 01 Aug 2012 01:56:15 -0700 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"