hc
2023-11-20 2e7bd41e4e8ab3d1efdabd9e263a2f7fe79bff8c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Fix detection of AR and RANLIB
 
The configure.in script assumes that ranlib and ar are necessarily
prefixed by ${ac_tool_prefix}, which is the value of --host. However,
it's not necessarily the case.
 
So instead, use AC_CHECK_TOOL to check for AR, and AC_PROG_RANLIB to
check for RANLIB.
 
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 
Index: b/configure.in
===================================================================
--- a/configure.in
+++ b/configure.in
@@ -621,10 +621,8 @@
 BUILDDIR=$(pwd)
 AC_SUBST(BUILDDIR)
 
-AR=${ac_tool_prefix}ar
-AC_SUBST([AR])
-RANLIB=${ac_tool_prefix}ranlib
-AC_SUBST([RANLIB])
+AC_CHECK_TOOL([AR], [ar])
+AC_PROG_RANLIB
 
 dnl =======================================================================
 dnl Output our results.