[lttng-dev] Question about use libbabeltrace
Hui Zhu
teawater at gmail.com
Tue Dec 18 06:19:56 EST 2012
On Fri, Dec 14, 2012 at 2:13 PM, Yannick Brosseau
<yannick.brosseau at gmail.com> wrote:
> On 2012-12-13 06:35, Mathieu Desnoyers 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! :)
>>
>
> I finally did it...
>
> Yannick
It works OK in my part. It is great for me. Thanks for your work.
Best,
Hui
More information about the lttng-dev
mailing list