summaryrefslogtreecommitdiff
path: root/m4/fp_prog_find.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_find.m4
parent6acadb79afe685c635fd255f90551a0fbfcbe3dc (diff)
downloadhaskell-7ffbdc3fa603c6411249ba9b758cf8f109c5fb30.tar.gz
Break up aclocal.m4
Diffstat (limited to 'm4/fp_prog_find.m4')
-rw-r--r--m4/fp_prog_find.m418
1 files changed, 18 insertions, 0 deletions
diff --git a/m4/fp_prog_find.m4 b/m4/fp_prog_find.m4
new file mode 100644
index 0000000000..77f4fbf5cc
--- /dev/null
+++ b/m4/fp_prog_find.m4
@@ -0,0 +1,18 @@
+# FP_PROG_FIND
+# ------------
+# Find a non-WinDoze version of the "find" utility.
+AC_DEFUN([FP_PROG_FIND],
+[AC_PATH_PROGS([fp_prog_find], [gfind find], find)
+echo foo > conftest.txt
+$fp_prog_find conftest.txt -print > conftest.out 2>&1
+if grep '^conftest.txt$' conftest.out > /dev/null 2>&1 ; then
+ # OK, looks like a real "find".
+ FindCmd="$fp_prog_find"
+else
+ # Found a poor WinDoze version of "find", ignore it.
+ AC_MSG_WARN([$fp_prog_find looks like a non-*nix find, ignoring it])
+ FP_CHECK_PROG([FindCmd], [find], [], [], [$fp_prog_find])
+fi
+rm -f conftest.txt conftest.out
+AC_SUBST([FindCmd])[]dnl
+])# FP_PROG_FIND