diff --git a/Tools/ardupilotwaf/cxx_checks.py b/Tools/ardupilotwaf/cxx_checks.py index 2181a2f1e3..ca9fe7951a 100644 --- a/Tools/ardupilotwaf/cxx_checks.py +++ b/Tools/ardupilotwaf/cxx_checks.py @@ -179,9 +179,9 @@ def check_lttng(cfg, env): @conf def check_libiio(cfg, env): - if env.STATIC_LINKING: + if cfg.env.STATIC_LINKING: # libiio depends on libdl which means it can't be used in a static build - cfg.msg("libiio disabled for static build", 'disabled', color='YELLOW') + cfg.msg("Checking for 'libiio':", 'disabled for static build', color='YELLOW') return False if cfg.options.disable_libiio: cfg.msg("Checking for 'libiio':", 'disabled', color='YELLOW') @@ -192,9 +192,9 @@ def check_libiio(cfg, env): @conf def check_libdl(cfg, env): - if env.STATIC_LINKING: + if cfg.env.STATIC_LINKING: # using loadable modules for a static build is not recommended - cfg.msg("libdl disabled for static build", 'disabled', color='YELLOW') + cfg.msg("Checking for 'libdl':", 'disabled for static build', color='YELLOW') return False ret = cfg.check(compiler='cxx', lib='dl', mandatory=False, global_define=True, define_name='HAVE_LIBDL') if ret: diff --git a/wscript b/wscript index 269f8d681b..fa510d32ec 100644 --- a/wscript +++ b/wscript @@ -132,8 +132,8 @@ def configure(cfg): cfg.define('WAF_BUILD', 1) if cfg.options.static: - cfg.msg('Using static linking') - env.STATIC_LINKING = True + cfg.msg('Using static linking', 'yes', color='YELLOW') + cfg.env.STATIC_LINKING = True cfg.msg('Setting board to', cfg.options.board) cfg.get_board().configure(cfg)