1 (***********************************************************************)
5 (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
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. *)
11 (***********************************************************************)
13 (* $Id: config.mlbuild 9266 2009-05-19 14:41:21Z doligez $ *)
15 (***********************************************************************)
17 (** WARNING WARNING WARNING **)
19 (** When you change this file, you must make the parallel change **)
22 (***********************************************************************)
25 (* The main OCaml version string has moved to ../VERSION *)
26 let version = Sys.ocaml_version
28 module C = Myocamlbuild_config
30 let standard_library_default = C.libdir
32 let standard_library =
39 standard_library_default
42 match Sys.os_type with
46 let sf = Printf.sprintf
48 let standard_runtime =
49 if windows then "ocamlrun"
50 else C.bindir^"/ocamlrun"
51 let ccomp_type = C.ccomptype
52 let bytecomp_c_compiler = sf "%s %s %s" C.bytecc C.bytecccompopts C.sharedcccompopts
53 let bytecomp_c_libraries = C.bytecclibs
54 let native_c_compiler = sf "%s %s" C.nativecc C.nativecccompopts
55 let native_c_libraries = C.nativecclibs
56 let native_pack_linker = C.packld
57 let ranlib = C.ranlibcmd
58 let cc_profile = C.cc_profile
61 let mkmaindll = C.mkmaindll
63 let exec_magic_number = "Caml1999X008"
64 and cmi_magic_number = "Caml1999I011"
65 and cmo_magic_number = "Caml1999O007"
66 and cma_magic_number = "Caml1999A008"
67 and cmx_magic_number = "Caml1999Y011"
68 and cmxa_magic_number = "Caml1999Z010"
69 and ast_impl_magic_number = "Caml1999M012"
70 and ast_intf_magic_number = "Caml1999N011"
72 let load_path = ref ([] : string list)
74 let interface_suffix = ref ".mli"
77 (* This is normally the same as in obj.ml, but we have to define it
78 separately because it can differ when we're in the middle of a
79 bootstrapping phase. *)
82 let max_young_wosize = 256
83 let stack_threshold = 256 (* see byterun/config.h *)
85 let architecture = C.arch
91 let ext_obj = C.ext_obj
92 let ext_asm = C.ext_asm
93 let ext_lib = C.ext_lib
94 let ext_dll = C.ext_dll
96 let default_executable_name =
97 match Sys.os_type with
99 | "Win32" | "Cygwin" -> "camlprog.exe"
102 let systhread_supported = C.systhread_support;;
104 let print_config oc =
105 let p name valu = Printf.fprintf oc "%s: %s\n" name valu in
106 let p_bool name valu = Printf.fprintf oc "%s: %B\n" name valu in
108 p "standard_library_default" standard_library_default;
109 p "standard_library" standard_library;
110 p "standard_runtime" standard_runtime;
111 p "ccomp_type" ccomp_type;
112 p "bytecomp_c_compiler" bytecomp_c_compiler;
113 p "bytecomp_c_libraries" bytecomp_c_libraries;
114 p "native_c_compiler" native_c_compiler;
115 p "native_c_libraries" native_c_libraries;
116 p "native_pack_linker" native_pack_linker;
118 p "cc_profile" cc_profile;
119 p "architecture" architecture;
127 p "os_type" Sys.os_type;
128 p "default_executable_name" default_executable_name;
129 p_bool "systhread_supported" systhread_supported;