From: Simon Marchi Date: Mon, 18 Nov 2019 17:07:50 +0000 (-0500) Subject: doc: pass AR when building examples X-Git-Tag: v2.12.0-rc1~6 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=8aeb3cae3d7a1c2cf0fb24d8d83c94e32d5622dd;hp=8aeb3cae3d7a1c2cf0fb24d8d83c94e32d5622dd;p=lttng-ust.git 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 Signed-off-by: Simon Marchi Signed-off-by: Mathieu Desnoyers ---