Signed-off-by: Eric Engestrom <[email protected]>
---
configure.ac | 2 ++
freedreno/freedreno_priv.h | 2 +-
intel/intel_bufmgr_gem.c | 4 ++--
meson.build | 5 +----
4 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4ebebb4feb8073771ef9..321ab2c0fb4f18dad002 100644
--- a/configure.ac
+++ b/configure.ac
@@ -513,6 +513,8 @@ if test "x$VALGRIND" = "xyes"; then
AC_MSG_ERROR([Valgrind support required but not present])
fi
AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress
false warnings])
+else
+ AC_DEFINE([HAVE_VALGRIND], 0)
fi
AC_MSG_RESULT([$VALGRIND])
diff --git a/freedreno/freedreno_priv.h b/freedreno/freedreno_priv.h
index 273074727375c7d6ff01..3be5767d2ebd2566734f 100644
--- a/freedreno/freedreno_priv.h
+++ b/freedreno/freedreno_priv.h
@@ -200,7 +200,7 @@ offset_bytes(void *end, void *start)
return ((char *)end) - ((char *)start);
}
-#ifdef HAVE_VALGRIND
+#if HAVE_VALGRIND
# include <memcheck.h>
/*
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 71f140f54dd0e6116261..386da30e230627242be2 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -66,7 +66,7 @@
#include "i915_drm.h"
#include "uthash.h"
-#ifdef HAVE_VALGRIND
+#if HAVE_VALGRIND
#include <valgrind.h>
#include <memcheck.h>
#define VG(x) x
@@ -1629,7 +1629,7 @@ int
drm_intel_gem_bo_map_unsynchronized(drm_intel_bo *bo)
{
drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
-#ifdef HAVE_VALGRIND
+#if HAVE_VALGRIND
drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
#endif
int ret;
diff --git a/meson.build b/meson.build
index 31a7990bb3ee140c4de1..19413632464da9816ca1 100644
--- a/meson.build
+++ b/meson.build
@@ -257,16 +257,13 @@ foreach t : [[with_intel, 'INTEL'], [with_vmwgfx,
'VMWGFX'],
[with_vc4, 'VC4'],
[with_freedreno_kgsl, 'FREEDRENO_KGSL'],
[dep_cairo.found(), 'CAIRO'],
+ [dep_valgrind.found(), 'VALGRIND'],
[with_radeon, 'RADEON']]
config.set10('HAVE_@0@'.format(t[1]), t[0])
endforeach
if with_freedreno_kgsl and not with_freedreno
error('cannot enable freedreno-kgsl without freedreno support')
endif
-if dep_valgrind.found()
- config.set10('HAVE_VALGRIND', true)
-endif
-
config.set10('_GNU_SOURCE', true)
config_file = configure_file(
configuration : config,
--
Cheers,
Eric
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel