[Mesa-dev] [PATCH 1/2] configure: Detect valgrind headers

Matt Turner mattst88 at gmail.com
Thu Apr 14 20:49:42 UTC 2016


On Thu, Apr 14, 2016 at 1:06 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> We have several places where the Vulkan driver explicitly hooks into
> valgrind when it's available.  We need to be able to detect it.
> ---
>  configure.ac | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index c426c72..40b08d3 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -2446,6 +2446,13 @@ AC_SUBST([XA_MINOR], $XA_MINOR)
>  AC_SUBST([XA_TINY], $XA_TINY)
>  AC_SUBST([XA_VERSION], "$XA_MAJOR.$XA_MINOR.$XA_TINY")
>
> +PKG_CHECK_MODULES(VALGRIND, [valgrind],
> +                  [have_valgrind=yes], [have_valgrind=no])
> +if test "x$have_valgrind" = "xyes"; then
> +    AC_DEFINE([HAVE_VALGRIND], 1,
> +              [Use valgrind intrinsics to suppress false warnings])
> +fi

We need to be able to request that valgrind support be disabled. Feel
free to copy the code used in libdrm's configure.ac.

See https://bugs.gentoo.org/show_bug.cgi?id=544596 for rationale.


More information about the mesa-dev mailing list