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])
#include "i915_drm.h"
#include "uthash.h"
-#ifdef HAVE_VALGRIND
+#if HAVE_VALGRIND
#include <valgrind.h>
#include <memcheck.h>
#define VG(x) x
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;
[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,