From 5391d15256af65a0ba0ead4ee6d1ec16f7e362cc Mon Sep 17 00:00:00 2001 From: Guillaume Melquiond Date: Thu, 12 Jan 2017 14:03:47 +0100 Subject: Fix configure crash on some version strings of camlp5, e.g. "6.18-exp" (bug #5307). --- configure.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ml') diff --git a/configure.ml b/configure.ml index 42c2e2785..04b04979d 100644 --- a/configure.ml +++ b/configure.ml @@ -563,7 +563,7 @@ let check_camlp5 testcma = match !Prefs.camlp5dir with let check_camlp5_version camlp5o = let version_line, _ = run ~err:StdOut camlp5o ["-v"] in let version = List.nth (string_split ' ' version_line) 2 in - match string_split '.' version with + match numeric_prefix_list version with | major::minor::_ when s2i major > 6 || (s2i major, s2i minor) >= (6,6) -> printf "You have Camlp5 %s. Good!\n" version; version | _ -> die "Error: unsupported Camlp5 (version < 6.06 or unrecognized).\n" -- cgit v1.2.3