From 9879cc291512223c72a4cac2ef294c216cf64656 Mon Sep 17 00:00:00 2001 From: Paul Steckler Date: Fri, 1 Dec 2017 13:28:01 -0500 Subject: check for Num lib if OCaml >= 4.06, #6162 --- configure.ml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'configure.ml') diff --git a/configure.ml b/configure.ml index 1ccb69106..e14eeac7b 100644 --- a/configure.ml +++ b/configure.ml @@ -678,6 +678,22 @@ let operating_system, osdeplibs = else (try Sys.getenv "OS" with Not_found -> ""), osdeplibs +(** Num library *) + +(* since 4.06, the Num library is no longer distributed with OCaml (replaced + by Zarith) +*) + +let check_for_numlib () = + if caml_version_nums >= [4;6;0] then + let numlib,_ = tryrun "ocamlfind" ["query";"num"] in + match numlib with + | "" -> + die "Num library not installed, required for OCaml 4.06 or later" + | _ -> printf "You have the Num library installed. Good!\n" + +let numlib = + check_for_numlib () (** * lablgtk2 and CoqIDE *) -- cgit v1.2.3