From 348678888b59d7523942fa226bf208815b1157b0 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 25 May 2016 23:06:19 -0300 Subject: [PATCH] waf: allow to disable lttng at configuration We default to autodetection for LTTNG so if the libraries are available we enable it. However this may not always be desired. --- Tools/ardupilotwaf/cxx_checks.py | 4 ++++ wscript | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Tools/ardupilotwaf/cxx_checks.py b/Tools/ardupilotwaf/cxx_checks.py index 3679504594..425ab4974e 100644 --- a/Tools/ardupilotwaf/cxx_checks.py +++ b/Tools/ardupilotwaf/cxx_checks.py @@ -151,6 +151,10 @@ def check_librt(cfg, env): @conf def check_lttng(cfg, env): + if cfg.options.disable_lttng: + cfg.msg("Checking for 'lttng-ust':", 'disabled', color='YELLOW') + return False + cfg.check_cfg(package='lttng-ust', mandatory=False, global_define=True, args=['--libs', '--cflags']) env.LIB += cfg.env['LIB_LTTNG-UST'] diff --git a/wscript b/wscript index 78436415ec..903e384f66 100644 --- a/wscript +++ b/wscript @@ -82,6 +82,10 @@ revisions. default=False, help='Configure as debug variant.') + g.add_option('--disable-lttng', action='store_true', + default=False, + help="Don't use lttng even if supported by board and dependencies available") + def _collect_autoconfig_files(cfg): for m in sys.modules.values(): paths = []