doc: pass AR when building examples
As reported here [1], when cross-compiling lttng-ust, the
"hello-static-lib" example uses the ar tool made for the --build machine
instead of the prefixed one, for the --host machine.
The Makefiles in the subdirectories of doc/examples are written by hand,
so that they can be easily copied and modified by users. They are
therefore not integrated in the automake build system, and any value
detected by configure must be passed explicitly when invoking it.
For example, the CC value is already explicitly passed, so that the
compiler value found by configure is passed down. We just need to do
the same for AR.
This patch adds AM_PROG_AR in configure.ac, so that configure finds the
prefixed version of ar, if cross-compiling.
It then sets the AR variable in doc/examples/Makefile.am, when invoking
sub-Makefiles. I don't think we really need it in the cmake case, but
it doesn't hurt to have it there.
[1] https://lists.lttng.org/pipermail/lttng-dev/2019-November/029388.html
Reported-by: Rolf Eike Beer <eb@emlix.com>
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.025891 seconds and 4 git commands to generate.