From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Martin Subject: [PATCH libdrm] Add configure option --with/--without-valgrind Date: Tue, 31 Jul 2012 13:29:31 +0200 Message-ID: <20120731112931.GA31874@dmn> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: 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) 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) Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@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" -- 1.7.2.5