Received: from eggs.gnu.org ([2001:4830:134:3::10]:45978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZVYR-0006sC-Tg for qemu-devel@nongnu.org; Thu, 24 Oct 2013 20:47:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZVYM-0007n4-PO for qemu-devel@nongnu.org; Thu, 24 Oct 2013 20:47:07 -0400 Received: from mail-qc0-x231.google.com ([2607:f8b0:400d:c01::231]:39499) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZVYM-0007mx-L0 for qemu-devel@nongnu.org; Thu, 24 Oct 2013 20:47:02 -0400 Received: by mail-qc0-f177.google.com with SMTP id u18so1827585qcx.8 for ; Thu, 24 Oct 2013 17:47:02 -0700 (PDT) From: Mohamad Gebai Date: Thu, 24 Oct 2013 20:46:03 -0400 Message-Id: <1382661967-23561-2-git-send-email-mohamad.gebai@polymtl.ca> In-Reply-To: <1382661967-23561-1-git-send-email-mohamad.gebai@polymtl.ca> References: <1382661967-23561-1-git-send-email-mohamad.gebai@polymtl.ca> Subject: [Qemu-devel] [PATCH v5 1/5] Fix configure script for LTTng 2.x List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: stefanha@gmail.com, Mohamad Gebai , alex.bennee@linaro.org Signed-off-by: Mohamad Gebai --- configure | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 57ee62a..f20ceaa 100755 --- a/configure +++ b/configure @@ -3284,15 +3284,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 -- 1.8.4.rc3