[lttng-dev] Question about use libbabeltrace

Hui Zhu teawater at gmail.com
Thu Dec 13 22:45:26 EST 2012


On Thu, Dec 13, 2012 at 7:35 PM, Mathieu Desnoyers
<mathieu.desnoyers at efficios.com> wrote:
> * Hui Zhu (teawater at gmail.com) wrote:
>> Hi guys,
>>
>> Maybe you had known that I am working on add CTF support to GDB that
>> use libbabeltrace from my prev mail.
>>
>> I use libbabeltrace in this patch
>> http://sourceware.org/ml/gdb-patches/2012-11/msg00717.html
>>
>> What I check if current machine have libbabeltrace in following way:
>> +    if test "x$enable_glibtest" = "xyes" ; then
>> +      ac_save_CFLAGS="$CFLAGS"
>> +      ac_save_LIBS="$LIBS"
>> +      CFLAGS="$CFLAGS $GLIB_CFLAGS"
>> +      LIBS="$LIBS -lbabeltrace -lbabeltrace-ctf"
>> +      rm -f conf.glibtest
>> +      if test "$cross_compiling" = yes; then :
>> +  $as_echo $ac_n "cross compiling; assumed OK... $ac_c"
>> +else
>> +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
>> +/* end confdefs.h.  */
>> +
>> +#include <babeltrace/babeltrace.h>
>> +#include <babeltrace/types.h>
>> +#include <babeltrace/ctf/events.h>
>> +#include <babeltrace/ctf/iterator.h>
>> +
>> +int
>> +main ()
>> +{
>> +  if (!bt_context_create())
>> +    return 1;
>> +  return 0;
>> +}
>> +
>> +_ACEOF
>> +if ac_fn_c_try_run "$LINENO"; then :
>> +
>> +else
>> +  no_glib=yes
>> +fi
>>
>> Just try to build example with -lbabeltrace -lbabeltrace-ctf.
>>
>> My question is does libbabeltrace have better way to handle it?  For
>> example: pkg-config
>
> We don't have pkg-config support in babeltrace yet, but we would gladly
> welcome a contribution adding it! :)
>
> Thanks,
>
> Mathieu

Thanks for your reply.

Best,
Hui

>
>>
>> Thanks,
>> Hui
>>
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev at lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
> --
> Mathieu Desnoyers
> Operating System Efficiency R&D Consultant
> EfficiOS Inc.
> http://www.efficios.com



More information about the lttng-dev mailing list