From bf15f63cad5c909890be6656743979c7a46ab56d Mon Sep 17 00:00:00 2001 From: Mohamad Gebai Date: Wed, 29 Jan 2014 22:47:54 -0500 Subject: Fix configure script for LTTng 2.x Signed-off-by: Mohamad Gebai Signed-off-by: Stefan Hajnoczi --- configure | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 4648117957..8c0ead9cd7 100755 --- a/configure +++ b/configure @@ -3379,15 +3379,25 @@ fi # For 'ust' backend, test if ust headers are present if test "$trace_backend" = "ust"; then cat > $TMPC << EOF -#include -#include +#include int main(void) { return 0; } EOF if compile_prog "" "" ; then - LIBS="-lust -lurcu-bp $LIBS" - libs_qga="-lust -lurcu-bp $libs_qga" + if $pkg_config lttng-ust --exists; then + lttng_ust_libs=`$pkg_config --libs lttng-ust` + else + lttng_ust_libs="-llttng-ust" + fi + if $pkg_config liburcu-bp --exists; then + urcu_bp_libs=`$pkg_config --libs liburcu-bp` + else + urcu_bp_libs="-lurcu-bp" + fi + + LIBS="$lttng_ust_libs $urcu_bp_libs $LIBS" + libs_qga="$lttng_ust_libs $urcu_bp_libs $libs_qga" else - error_exit "Trace backend 'ust' missing libust header files" + error_exit "Trace backend 'ust' missing lttng-ust header files" fi fi -- cgit v1.2.3-55-g7522