Backported from the master branch with commit id:
4cbc1a04e8ac3c1dd4f9a4dc44b56ee8430189f0
Signed-off-by: David Goulet <email address hidden>
1d586c7...
by
Christian Babeux <email address hidden>
Fix: Missing libs dependencies in configure check for lttng-ust-ctl
The lttng-ust-ctl library depends on liburcu-{common,bp,cds}. The
AC_CHECK_LIBRARY macro can't automatically resolve dependents libraries
(ala libtool), so any additionnals dependencies must be manually
specified.
Also, the AC_CHECK_LIB action-if-found case for the lttng-ust-ctl check
is modified to have a similar behavior as the default action, which is
to define HAVE_LIBxxx and append -lxxx to $LIBS, *except* for the later
step. This is to ensure that any future addition of AC_CHECK_LIB after
the one for lttng-ust-ctl will not need to append the liburcu
dependencies or fail unexpectedly.
Acked-by: Mathieu Desnoyers <email address hidden>
Signed-off-by: Christian Babeux <email address hidden>
Signed-off-by: David Goulet <email address hidden>
b5e7bec...
by
Christian Babeux <email address hidden>
Fix: Libtool fails to find dependent libraries when cross-compiling lttng-tools
This problem arise when cross compiling and linking libraries with
indirect libraries dependencies (such as liblttng-ust). This "bug" is
caused by an upstream modification in the libtool package on Debian
system. The libtool "link_all_deplibs" flag is set to "no" by default
on linux targets (AFAIK, other distros set it to "unknown").
The chosen solution is to detect such cases via the configure script
and automagically patch the libtool.m4 by forcing the "link_all_deplibs"
to "unknown".
This fixup can be disabled with the appropriate configure flag:
./configure --disable-libtool-linkdep-fixup
Sample configure output on affected systems:
checking for occurence(s) of link_all_deplibs = no in
./config/libtool.m4... 3
configure: WARNING: the detected libtool will not link all
dependencies, forcing link_all_deplibs = unknown
Acked-by: Mathieu Desnoyers <email address hidden>
Signed-off-by: Christian Babeux <email address hidden>
Signed-off-by: David Goulet <email address hidden>