aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ml
diff options
context:
space:
mode:
authorGravatar Paul Steckler <steck@stecksoft.com>2017-12-01 13:28:01 -0500
committerGravatar Paul Steckler <steck@stecksoft.com>2017-12-01 13:28:01 -0500
commit9879cc291512223c72a4cac2ef294c216cf64656 (patch)
treee104527f957e66ef5a1c0225f10f606def04cb80 /configure.ml
parente29993c250164b9486d4d7ffdebb9bfee4a2828f (diff)
check for Num lib if OCaml >= 4.06, #6162
Diffstat (limited to 'configure.ml')
-rw-r--r--configure.ml16
1 files changed, 16 insertions, 0 deletions
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 *)