aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ml
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ml')
-rw-r--r--configure.ml13
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.ml b/configure.ml
index 1ccb69106..1e729e97e 100644
--- a/configure.ml
+++ b/configure.ml
@@ -837,9 +837,16 @@ let strip =
(** * md5sum command *)
let md5sum =
- if List.mem arch ["Darwin"; "FreeBSD"; "OpenBSD"]
- then "md5 -q" else "md5sum"
-
+ let rec loop = function
+ | [] -> die "Don’t know how to compute MD5 checksums…"
+ | (p, ma, a) :: tl ->
+ if fst (tryrun p (ma @ a)) <> ""
+ then List.fold_left (Printf.sprintf "%s %s") p ma
+ else loop tl
+ in loop [
+ "md5sum", [], [ "--version" ];
+ "md5", ["-q"], [ "-s" ; "''" ];
+ ]
(** * Documentation : do we have latex, hevea, ... *)