aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2017-01-04 14:35:51 +0100
committerGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2017-05-23 10:48:28 +0200
commitb2b4e85ec6607d7364a0da9c65ae9303b9f73c03 (patch)
tree5653b4d5438ddead97fd8c285c772c429a758511 /lib
parentda5ac9169d0c65ff389104dfd983311b85e059e2 (diff)
Usage.print_config moved to Envars
Diffstat (limited to 'lib')
-rw-r--r--lib/envars.ml15
-rw-r--r--lib/envars.mli3
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/envars.ml b/lib/envars.ml
index 89ce52831..330b0fbd6 100644
--- a/lib/envars.ml
+++ b/lib/envars.ml
@@ -207,3 +207,18 @@ let xdg_config_dirs warn =
let xdg_dirs ~warn =
List.filter Sys.file_exists (xdg_data_dirs warn)
+
+(* Print the configuration information *)
+
+let print_config f =
+ let open Printf in
+ fprintf f "LOCAL=%s\n" (if Coq_config.local then "1" else "0");
+ fprintf f "COQLIB=%s/\n" (coqlib ());
+ fprintf f "DOCDIR=%s/\n" (docdir ());
+ fprintf f "OCAMLFIND=%s\n" (ocamlfind ());
+ fprintf f "CAMLP4=%s\n" Coq_config.camlp4;
+ fprintf f "CAMLP4O=%s\n" Coq_config.camlp4o;
+ fprintf f "CAMLP4BIN=%s/\n" (camlp4bin ());
+ fprintf f "CAMLP4LIB=%s\n" (camlp4lib ());
+ fprintf f "CAMLP4OPTIONS=%s\n" Coq_config.camlp4compat;
+ fprintf f "HASNATDYNLINK=%s\n" (if Coq_config.has_natdynlink then "true" else "false")
diff --git a/lib/envars.mli b/lib/envars.mli
index 90a42859b..b9cc534f9 100644
--- a/lib/envars.mli
+++ b/lib/envars.mli
@@ -69,3 +69,6 @@ val xdg_data_home : (string -> unit) -> string
val xdg_config_dirs : (string -> unit) -> string list
val xdg_data_dirs : (string -> unit) -> string list
val xdg_dirs : warn : (string -> unit) -> string list
+
+(** {6 Prints the configuration information } *)
+val print_config : out_channel -> unit