diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2016-09-27 18:00:47 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2016-09-27 18:24:02 +0100 |
commit | 9791669ac32c5fe23ca1b07a623b49ec187537a2 (patch) | |
tree | ac9b1cb62b7770e0c4756b365e06058a4705ad81 /plugins | |
parent | c4aed66effd5cb530d70378a55880b03696f1f68 (diff) |
meson: tracers: signal availability of libunwind and backtrace() to code
Not setting cdata here on purpose because of .. complications.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/tracers/meson.build | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/tracers/meson.build b/plugins/tracers/meson.build index 6f7f9cc83b..4ca273359a 100644 --- a/plugins/tracers/meson.build +++ b/plugins/tracers/meson.build @@ -10,9 +10,20 @@ if have_getrusage gst_tracers_sources += ['gstrusage.c'] endif +tracers_args = gst_c_args + ['-DGST_USE_UNSTABLE_API'] + +unwind_dep = dependency('libunwind', required : false) +if unwind_dep.found() + tracers_args += ['-DHAVE_UNWIND'] +endif + +if cc.has_header('execinfo.h') and cc.has_function('backtrace', prefix : '#include <execinfo.h>') + tracers_args += ['-DHAVE_BACKTRACE'] +endif + gst_tracers = library('gstcoretracers', gst_tracers_sources, - c_args : gst_c_args + ['-DGST_USE_UNSTABLE_API'], + c_args : tracers_args, include_directories : [configinc], dependencies : [gst_dep, unwind_dep], link_with : printf_lib, |