summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheng Shao <cheng.shao@tweag.io>2021-01-24 13:38:04 +0000
committerBen Gamari <ben@smart-cactus.org>2021-01-26 09:49:54 -0500
commit2d73d02dd3ed470abd750e2afdc3763707698b77 (patch)
treef977733922704f948146536bd161c8ed31e4c81d
parent7942698466cd84876902936bd2c7d8373379aece (diff)
downloadhaskell-2d73d02dd3ed470abd750e2afdc3763707698b77.tar.gz
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. (cherry picked from commit 5608492ac294bb86a5232d539c97410f16a04531)
-rw-r--r--aclocal.m43
1 files changed, 2 insertions, 1 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index a3f83b64fe..f9e1331336 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1215,7 +1215,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])