From 0da1f19e0d4bfe57706a5f74de8301ae5e106381 Mon Sep 17 00:00:00 2001 From: Cheng Shao Date: Sun, 24 Jan 2021 13:38:04 +0000 Subject: Respect $AR in configure script Previously, the configure script doesn't respect $AR. This causes the nixpkgs GHC to capture "ar" instead of the absolute nix store path of ar in the global config. The original patch comes from https://github.com/input-output-hk/haskell.nix/blob/master/overlays/patches/ghc/respect-ar-path.patch. --- aclocal.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aclocal.m4 b/aclocal.m4 index c63f3b8c55..3e240eaaaa 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1235,7 +1235,8 @@ AC_SUBST([LdHasFilelist]) # thinks that target == host so it never checks the unqualified # tools for Windows. See #14274. AC_DEFUN([FP_PROG_AR], -[if test -z "$fp_prog_ar"; then +[AC_SUBST(fp_prog_ar,$AR) +if test -z "$fp_prog_ar"; then if test "$HostOS" = "mingw32" then AC_PATH_PROG([fp_prog_ar], [ar]) -- cgit v1.2.1