diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2017-12-04 19:00:09 +0000 |
---|---|---|
committer | Vincent Laporte <Vincent.Laporte@gmail.com> | 2017-12-04 19:21:28 +0000 |
commit | 0dd793a14a0b0b593bff7d33c1f835fc5a38313e (patch) | |
tree | 48afee9b9cc27722f1ea9708252f153d355c5786 /configure.ml | |
parent | 0048cbe810c82a775558c14cd7fcae644e205c51 (diff) |
[configure] fix detection of `md5sum`
Diffstat (limited to 'configure.ml')
-rw-r--r-- | configure.ml | 13 |
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, ... *) |