diff mbox

[v5,1/5] Fix configure script for LTTng 2.x

Message ID 1382661967-23561-2-git-send-email-mohamad.gebai@polymtl.ca
State New
Headers show

Commit Message

Mohamad Gebai Oct. 25, 2013, 12:46 a.m. UTC
Signed-off-by: Mohamad Gebai <mohamad.gebai@polymtl.ca>
---
 configure | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

Comments

Alex Bennée Oct. 25, 2013, 1:18 p.m. UTC | #1
mohamad.gebai@gmail.com writes:

> Signed-off-by: Mohamad Gebai <mohamad.gebai@polymtl.ca>
> ---
<snip>

Tested on Ubuntu 12.04 with and without the LTTNG PPA and seems to work
well enough.

Reviewed-by: Alex Bennée <alex@bennee.com>
Mohamad Gebai Oct. 25, 2013, 1:50 p.m. UTC | #2
>> Signed-off-by: Mohamad Gebai <mohamad.gebai@polymtl.ca>
>> ---
> <snip>
>
> Tested on Ubuntu 12.04 with and without the LTTNG PPA and seems to work
> well enough.
>
> Reviewed-by: Alex Bennée <alex@bennee.com>
>
Yes, the bug is actually only in the Ubuntu package (missing liburcu*.pc 
files). It is fixed everywhere else, including the LTTng PPA. There is a 
bug report about it on Launchpad. Either ways, this fall back avoids 
getting an error with the Ubuntu packages.

Thanks!
Mohamad
Alex Bennée Oct. 25, 2013, 2:33 p.m. UTC | #3
mohamad.gebai@polymtl.ca writes:

>>> Signed-off-by: Mohamad Gebai <mohamad.gebai@polymtl.ca>
>>> ---
>> <snip>
>>
>> Tested on Ubuntu 12.04 with and without the LTTNG PPA and seems to work
>> well enough.
>>
>> Reviewed-by: Alex Bennée <alex@bennee.com>
>>
> Yes, the bug is actually only in the Ubuntu package (missing liburcu*.pc 
> files). It is fixed everywhere else, including the LTTng PPA. There is a 
> bug report about it on Launchpad. Either ways, this fall back avoids 
> getting an error with the Ubuntu packages.
<snip>

Hopefully Stefan will be able to check on the RPM based ones.

Did you identify a bug report against Ubuntu for these packages?
Mohamad Gebai Oct. 25, 2013, 4:22 p.m. UTC | #4
On 10/25/2013 10:33 AM, Alex Bennée wrote:
> mohamad.gebai@polymtl.ca writes:
>> Yes, the bug is actually only in the Ubuntu package (missing liburcu*.pc
>> files). It is fixed everywhere else, including the LTTng PPA. There is a
>> bug report about it on Launchpad. Either ways, this fall back avoids
>> getting an error with the Ubuntu packages.
> <snip>
>
> Hopefully Stefan will be able to check on the RPM based ones.
>
> Did you identify a bug report against Ubuntu for these packages?
>
Yes, you can find it here:
https://bugs.launchpad.net/ubuntu/+source/liburcu/+bug/1243391
Stefan Hajnoczi Jan. 14, 2014, 1:34 p.m. UTC | #5
On Thu, Oct 24, 2013 at 08:46:03PM -0400, Mohamad Gebai wrote:
> +    if $pkg_config liburcu-bp --exists; then
> +      urcu_bp_libs=`$pkg_config --libs liburcu-bp`
> +      else

Indentation is off, should be:

+    if $pkg_config liburcu-bp --exists; then
+      urcu_bp_libs=`$pkg_config --libs liburcu-bp`
+    else
diff mbox

Patch

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 <ust/tracepoint.h>
-#include <ust/marker.h>
+#include <lttng/tracepoint.h>
 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