All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH libdrm] Add configure option --with/--without-valgrind
@ 2012-07-31 11:29 Daniel Martin
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Martin @ 2012-07-31 11:29 UTC (permalink / raw)
  To: dri-devel

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH libdrm] Add configure option --with/--without-valgrind
@ 2012-07-31 12:09 Daniel Martin
  2012-07-31 15:39 ` Eric Anholt
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Martin @ 2012-07-31 12:09 UTC (permalink / raw)
  To: dri-devel

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH libdrm] Add configure option --with/--without-valgrind
  2012-07-31 12:09 Daniel Martin
@ 2012-07-31 15:39 ` Eric Anholt
  2012-08-01  9:13   ` Daniel Martin
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Anholt @ 2012-07-31 15:39 UTC (permalink / raw)
  To: Daniel Martin, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 366 bytes --]

Daniel Martin <consume.noise@gmail.com> writes:

> 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.

How would you have the valgrind .pc file but be unable to build with
valgrind?  .pc files should come with the parts necessary to build.

[-- Attachment #1.2: Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH libdrm] Add configure option --with/--without-valgrind
  2012-07-31 15:39 ` Eric Anholt
@ 2012-08-01  9:13   ` Daniel Martin
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Martin @ 2012-08-01  9:13 UTC (permalink / raw)
  To: dri-devel

On 31 July 2012 17:39, Eric Anholt <eric@anholt.net> wrote:
> Daniel Martin <consume.noise@gmail.com> writes:
>> 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.
>
> How would you have the valgrind .pc file but be unable to build with
> valgrind?  .pc files should come with the parts necessary to build.

It was a bug in our build system, which didn't exported the include path
correctly.

But, regardless of this homebrewn bug. I like to leave decissions up to
the user: If it is possible to build without valgrind - make it an option.
The same goes for the tests. Where I would like to create a patch too.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-01  9:13 UTC | newest]

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.