summaryrefslogtreecommitdiff
path: root/net-misc/rdate/files/rdate-1.10.2-respect-AR.patch
blob: 05289f3453c9704075078e62e7d680865bc08c70 (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
https://github.com/resurrecting-open-source-projects/openrdate/pull/4

From: Sam James <sam@gentoo.org>
Date: Thu, 3 Feb 2022 09:30:53 +0000
Subject: [PATCH] Respect AR from environment

Detect `AR` from the environment (first the AR environment variable, but
failing that, ${CHOST}-ar). This allows using different toolchains (e.g.
Clang and LLVM's tooling) and also facilitates cross-compilation.

Bug: https://bugs.gentoo.org/729998
Signed-off-by: Sam James <sam@gentoo.org>
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,8 @@ AC_CONFIG_SRCDIR([src/rdate.c])
 AC_CONFIG_HEADERS([config.h])
 AC_ARG_VAR([kernel_version], [the version of the kernel to build against])
 
+AC_CANONICAL_HOST
+
 # Checks for programs.
 AC_PROG_CC
 
@@ -22,6 +24,8 @@ AC_PROG_INSTALL
 AC_PROG_RANLIB
 AC_PROG_EGREP
 
+AM_PROG_AR
+
 # Checks for libraries.
 AC_CHECK_LIB([c], [fork])
 AC_CHECK_LIB([util], [malloc])
@@ -52,7 +56,6 @@ AC_CHECK_FUNCS([gettimeofday memset select socket])
 AC_PATH_PROG([UNAME], [uname],
                [:])
 
-AC_CANONICAL_HOST
 # Determine the particulars of the host
 case "${host}" in
 	*-*-linux*)