blob: c8f0e2c4fe4a3bf752b26a70206097a981d19a14 [file] [log] [blame]
From ecdcf0df6c28c65ca6d1e5638726e13e373c76c5 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 11 Nov 2020 22:58:55 -0800
Subject: [PATCH] Fix cross compilation using autoconf detected AR
currently its using 'ar' program from build host, which is not expected,
we need to respect AR passed in environment
Upstream-Status: Inappropriate [upstream hasn't been active since 1998]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.in | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/configure.in b/configure.in
index 4ddbe8b..b7c3c31 100644
--- a/configure.in
+++ b/configure.in
@@ -84,6 +84,13 @@ AC_ARG_ENABLE(syslog,
])
dnl Checks for programs.
+m4_ifndef([AC_PROG_AR],[dnl
+ AN_MAKEVAR([AR], [AC_PROG_AR])
+ AN_PROGRAM([ar], [AC_PROG_AR])
+ AC_DEFUN([AC_PROG_AR],
+ [AC_CHECK_TOOL(AR, ar, :)])
+])
+AC_PROG_AR
AC_PROG_CC
AC_PROG_GCC_TRADITIONAL
dnl AC_PROG_INSTALL included in AM_INIT_AUTOMAKE
--
2.29.2