From f3ccaf7b094bce98b309263aac862413bbb86b2d Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Sun, 9 Dec 2018 20:33:46 +0100 Subject: Configuration: expand a version number to three fields when only 1 or 2 fields are given. --- configure.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'configure.ml') diff --git a/configure.ml b/configure.ml index 8b6fccb5e3..266abdf3b9 100644 --- a/configure.ml +++ b/configure.ml @@ -150,7 +150,10 @@ let numeric_prefix_list s = let max = String.length s in let i = ref 0 in while !i < max && isnum s.[!i] do incr i done; - string_split '.' (String.sub s 0 !i) + match string_split '.' (String.sub s 0 !i) with + | [v] -> [v;"0";"0"] + | [v1;v2] -> [v1;v2;"0"] + | v -> v (** Combined existence and directory tests *) -- cgit v1.2.3