waf: Fix for lttng linking

This commit is contained in:
Miguel Arroyo 2017-07-10 16:31:09 -04:00 committed by Lucas De Marchi
parent 8121091fb6
commit a2f327678b

View File

@ -182,7 +182,7 @@ def check_package(cfg, env, libname):
fragment='''int main() { return 0; }''', fragment='''int main() { return 0; }''',
msg='Testing link with %s' % libname, msg='Testing link with %s' % libname,
mandatory=False, mandatory=False,
lib='dl' lib=libname
) )
if ret: if ret:
@ -193,6 +193,8 @@ def check_package(cfg, env, libname):
cfg.env.revert() cfg.env.revert()
return ret
@conf @conf
def check_lttng(cfg, env): def check_lttng(cfg, env):
if cfg.env.STATIC_LINKING: if cfg.env.STATIC_LINKING:
@ -203,8 +205,12 @@ def check_lttng(cfg, env):
cfg.msg("Checking for 'lttng-ust':", 'disabled', color='YELLOW') cfg.msg("Checking for 'lttng-ust':", 'disabled', color='YELLOW')
return False return False
check_package(cfg, env, 'lttng-ust') ret = check_package(cfg, env, 'lttng-ust')
return True if ret:
cfg.define('HAVE_LTTNG_UST', 1)
return True
return False
@conf @conf
def check_libiio(cfg, env): def check_libiio(cfg, env):