summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2020-02-14 07:29:33 +0200
committerGeorg Chini <georg@chini.tk>2020-12-09 11:07:09 +0000
commitdc79f304ddc4a2bfcaf7b2d69fa5f1c28dc95ce8 (patch)
treedbd5744218815b64d409ae2913e9673bd7d15454 /meson.build
parente43ca00d5255d81d2004bf33f30dab3843e8aa1d (diff)
build-sys: Add an option for enabling/disabling Valgrind
In OpenEmbedded the PulseAudio recipe currently disables Valgrind support by passing "ac_cv_header_valgrind_memcheck_h=no" to the configure script (this was added to make it deterministic whether Valgrdind support gets enabled or not). I'm converting the PulseAudio recipe to use Meson, and I needed an option to disable Valgrind.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 5 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 06c44d748..3adb876ff 100644
--- a/meson.build
+++ b/meson.build
@@ -221,7 +221,6 @@ check_headers = [
'sys/un.h',
'sys/wait.h',
'syslog.h',
- 'valgrind/memcheck.h',
'xlocale.h',
]
@@ -232,6 +231,10 @@ foreach h : check_headers
endif
endforeach
+if cc.has_header('valgrind/memcheck.h', required: get_option('valgrind'))
+ cdata.set('HAVE_VALGRIND_MEMCHECK_H', 1)
+endif
+
# FIXME: move this to the above set
if cc.has_header('pthread.h')
cdata.set('HAVE_PTHREAD', 1)
@@ -842,6 +845,7 @@ summary = [
'Enable SoXR (resampler): @0@'.format(soxr_dep.found()),
'Enable WebRTC echo canceller: @0@'.format(webrtc_dep.found()),
'Enable Gcov coverage: @0@'.format(get_option('gcov')),
+ 'Enable Valgrind: @0@'.format(cdata.has('HAVE_VALGRIND_MEMCHECK_H')),
'Enable man pages: @0@'.format(get_option('man')),
'Enable unit tests: @0@'.format(get_option('tests')),
'',