]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/ocaml/contrib/utils/config.mlp
Update
[l4.git] / l4 / pkg / ocaml / ocaml / contrib / utils / config.mlp
1 (***********************************************************************)
2 (*                                                                     *)
3 (*                           Objective Caml                            *)
4 (*                                                                     *)
5 (*            Xavier Leroy, projet Cristal, INRIA Rocquencourt         *)
6 (*                                                                     *)
7 (*  Copyright 1996 Institut National de Recherche en Informatique et   *)
8 (*  en Automatique.  All rights reserved.  This file is distributed    *)
9 (*  under the terms of the Q Public License version 1.0.               *)
10 (*                                                                     *)
11 (***********************************************************************)
12
13 (* $Id: config.mlp 9260 2009-05-18 09:38:16Z doligez $ *)
14
15 (***********************************************************************)
16 (**                                                                   **)
17 (**               WARNING WARNING WARNING                             **)
18 (**                                                                   **)
19 (** When you change this file, you must make the parallel change      **)
20 (** in config.mlbuild                                                 **)
21 (**                                                                   **)
22 (***********************************************************************)
23
24
25 (* The main OCaml version string has moved to ../VERSION *)
26 let version = Sys.ocaml_version
27
28 let standard_library_default = "%%LIBDIR%%"
29
30 let standard_library =
31   try
32     Sys.getenv "OCAMLLIB"
33   with Not_found ->
34   try
35     Sys.getenv "CAMLLIB"
36   with Not_found ->
37     standard_library_default
38
39 let standard_runtime = "%%BYTERUN%%"
40 let ccomp_type = "%%CCOMPTYPE%%"
41 let bytecomp_c_compiler = "%%BYTECC%%"
42 let bytecomp_c_libraries = "%%BYTECCLIBS%%"
43 let native_c_compiler = "%%NATIVECC%%"
44 let native_c_libraries = "%%NATIVECCLIBS%%"
45 let native_pack_linker = "%%PACKLD%%"
46 let ranlib = "%%RANLIBCMD%%"
47 let cc_profile = "%%CC_PROFILE%%"
48 let mkdll = "%%MKDLL%%"
49 let mkexe = "%%MKEXE%%"
50 let mkmaindll = "%%MKMAINDLL%%"
51
52 let exec_magic_number = "Caml1999X008"
53 and cmi_magic_number = "Caml1999I011"
54 and cmo_magic_number = "Caml1999O007"
55 and cma_magic_number = "Caml1999A008"
56 and cmx_magic_number = "Caml1999Y011"
57 and cmxa_magic_number = "Caml1999Z010"
58 and ast_impl_magic_number = "Caml1999M012"
59 and ast_intf_magic_number = "Caml1999N011"
60
61 let load_path = ref ([] : string list)
62
63 let interface_suffix = ref ".mli"
64
65 let max_tag = 245
66 (* This is normally the same as in obj.ml, but we have to define it
67    separately because it can differ when we're in the middle of a
68    bootstrapping phase. *)
69 let lazy_tag = 246
70
71 let max_young_wosize = 256
72 let stack_threshold = 256 (* see byterun/config.h *)
73
74 let architecture = "%%ARCH%%"
75 let model = "%%MODEL%%"
76 let system = "%%SYSTEM%%"
77
78 let asm = "%%ASM%%"
79
80 let ext_obj = "%%EXT_OBJ%%"
81 let ext_asm = "%%EXT_ASM%%"
82 let ext_lib = "%%EXT_LIB%%"
83 let ext_dll = "%%EXT_DLL%%"
84
85 let default_executable_name =
86   match Sys.os_type with
87     "Unix" -> "a.out"
88   | "Win32" | "Cygwin" -> "camlprog.exe"
89   | _ -> "camlprog"
90
91 let systhread_supported = %%SYSTHREAD_SUPPORT%%;;
92
93 let print_config oc =
94   let p name valu = Printf.fprintf oc "%s: %s\n" name valu in
95   let p_bool name valu = Printf.fprintf oc "%s: %B\n" name valu in
96   p "version" version;
97   p "standard_library_default" standard_library_default;
98   p "standard_library" standard_library;
99   p "standard_runtime" standard_runtime;
100   p "ccomp_type" ccomp_type;
101   p "bytecomp_c_compiler" bytecomp_c_compiler;
102   p "bytecomp_c_libraries" bytecomp_c_libraries;
103   p "native_c_compiler" native_c_compiler;
104   p "native_c_libraries" native_c_libraries;
105   p "native_pack_linker" native_pack_linker;
106   p "ranlib" ranlib;
107   p "cc_profile" cc_profile;
108   p "architecture" architecture;
109   p "model" model;
110   p "system" system;
111   p "asm" asm;
112   p "ext_obj" ext_obj;
113   p "ext_asm" ext_asm;
114   p "ext_lib" ext_lib;
115   p "ext_dll" ext_dll;
116   p "os_type" Sys.os_type;
117   p "default_executable_name" default_executable_name;
118   p_bool "systhread_supported" systhread_supported;
119   flush oc;
120 ;;