dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Martin <daniel.martin@secunet.com>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH libdrm] Add configure option --with/--without-valgrind
Date: Tue, 31 Jul 2012 13:29:31 +0200	[thread overview]
Message-ID: <20120731112931.GA31874@dmn> (raw)

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

             reply	other threads:[~2012-07-31 11:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31 11:29 Daniel Martin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-07-31 12:09 [PATCH libdrm] Add configure option --with/--without-valgrind Daniel Martin
2012-07-31 15:39 ` Eric Anholt
2012-08-01  9:13   ` Daniel Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120731112931.GA31874@dmn \
    --to=daniel.martin@secunet.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox