From 575f1e2bf51131709f55d565568198f56a0cbdda Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Thu, 8 Sep 2016 14:03:02 -0700 Subject: [PATCH] lib/util: Fix build for lttng libraries that does not support tracef On a system that has older lttng-ust development headers installed that do not yet provide the tracef api, configure fails with: Checking for library lttng-ust : yes ERROR: Target 'lttng-ust' in directory /samba/lib/util re-defined as EMPTY - was SYSLIB Fix the initialization order in waf, to not redefine the lttng-ust target Signed-off-by: Christof Schmitt Reviewed-by: Ralph Boehme --- lib/util/wscript_configure | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/util/wscript_configure b/lib/util/wscript_configure index 7c176334c98..8e5a59c8480 100644 --- a/lib/util/wscript_configure +++ b/lib/util/wscript_configure @@ -122,6 +122,8 @@ if Options.options.enable_systemd != False: conf.CHECK_LIB('systemd-daemon', shlib=True) conf.CHECK_LIB('systemd-journal', shlib=True) +conf.SET_TARGET_TYPE('lttng-ust', 'EMPTY') + if Options.options.enable_lttng != False: conf.CHECK_CFG(package='lttng-ust', args='--cflags --libs', msg='Checking for lttng-ust', uselib_store="LTTNG-UST") @@ -132,9 +134,6 @@ if (conf.CONFIG_SET('HAVE_LTTNG_TRACEF_H') and conf.CONFIG_SET('HAVE_LTTNG_UST')): conf.DEFINE('HAVE_LTTNG_TRACEF', '1') conf.env['HAVE_LTTNG_TRACEF'] = True -else: - conf.SET_TARGET_TYPE('lttng-ust', 'EMPTY') - conf.undefine('HAVE_LTTNG_TRACEF') conf.env['CPPPATH_GPFS'] = Options.options.gpfs_headers_dir if conf.CHECK_HEADERS('gpfs.h', False, False, "gpfs"): -- 2.34.1