From 0dd793a14a0b0b593bff7d33c1f835fc5a38313e Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 4 Dec 2017 19:00:09 +0000 Subject: [configure] fix detection of `md5sum` --- configure.ml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'configure.ml') 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, ... *) -- cgit v1.2.3