summaryrefslogtreecommitdiff
path: root/m4/fp_prog_ar.m4
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-04-02 11:52:47 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-05-05 05:42:38 -0400
commit7ffbdc3fa603c6411249ba9b758cf8f109c5fb30 (patch)
tree8a05d6e03ce2790e6e59651c824e569fee088d33 /m4/fp_prog_ar.m4
parent6acadb79afe685c635fd255f90551a0fbfcbe3dc (diff)
downloadhaskell-7ffbdc3fa603c6411249ba9b758cf8f109c5fb30.tar.gz
Break up aclocal.m4
Diffstat (limited to 'm4/fp_prog_ar.m4')
-rw-r--r--m4/fp_prog_ar.m423
1 files changed, 23 insertions, 0 deletions
diff --git a/m4/fp_prog_ar.m4 b/m4/fp_prog_ar.m4
new file mode 100644
index 0000000000..0ad6c694ac
--- /dev/null
+++ b/m4/fp_prog_ar.m4
@@ -0,0 +1,23 @@
+# FP_PROG_AR
+# ----------
+# Sets fp_prog_ar to a path to ar. Exits if no ar can be found
+# The host normalization on Windows breaks autoconf, it no longer
+# thinks that target == host so it never checks the unqualified
+# tools for Windows. See #14274.
+AC_DEFUN([FP_PROG_AR],
+[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])
+ if test -n "$fp_prog_ar"; then
+ fp_prog_ar=$(cygpath -m $fp_prog_ar)
+ fi
+ else
+ AC_CHECK_TARGET_TOOL([fp_prog_ar], [ar])
+ fi
+fi
+if test -z "$fp_prog_ar"; then
+ AC_MSG_ERROR([cannot find ar in your PATH, no idea how to make a library])
+fi
+])# FP_PROG_AR