1995-08-09 08:06:35 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Objective Caml *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
1999-11-17 10:59:06 -08:00
|
|
|
(* en Automatique. All rights reserved. This file is distributed *)
|
|
|
|
(* under the terms of the Q Public License version 1.0. *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $Id$ *)
|
|
|
|
|
2002-02-05 09:11:33 -08:00
|
|
|
(* The main OCaml version string has moved to stdlib/sys.ml *)
|
|
|
|
let version = Sys.ocaml_version
|
1996-02-15 08:19:09 -08:00
|
|
|
|
2005-05-09 06:39:17 -07:00
|
|
|
let standard_library_default = "%%LIBDIR%%"
|
|
|
|
|
1996-02-15 08:19:09 -08:00
|
|
|
let standard_library =
|
2001-10-30 01:32:32 -08:00
|
|
|
try
|
|
|
|
Sys.getenv "OCAMLLIB"
|
|
|
|
with Not_found ->
|
1996-02-15 08:19:09 -08:00
|
|
|
try
|
|
|
|
Sys.getenv "CAMLLIB"
|
|
|
|
with Not_found ->
|
2005-05-09 06:39:17 -07:00
|
|
|
standard_library_default
|
1995-05-04 03:15:53 -07:00
|
|
|
|
1998-04-14 07:48:34 -07:00
|
|
|
let standard_runtime = "%%BYTERUN%%"
|
2002-06-07 02:49:45 -07:00
|
|
|
let ccomp_type = "%%CCOMPTYPE%%"
|
1995-07-18 01:42:01 -07:00
|
|
|
let bytecomp_c_compiler = "%%BYTECC%%"
|
2000-04-16 07:34:58 -07:00
|
|
|
let bytecomp_c_linker = "%%BYTELINK%%"
|
2000-10-27 08:18:24 -07:00
|
|
|
let bytecomp_c_libraries = "%%BYTECCLIBS%%"
|
1995-07-18 01:42:01 -07:00
|
|
|
let native_c_compiler = "%%NATIVECC%%"
|
2000-04-16 07:34:58 -07:00
|
|
|
let native_c_linker = "%%NATIVELINK%%"
|
2000-10-27 08:18:24 -07:00
|
|
|
let native_c_libraries = "%%NATIVECCLIBS%%"
|
1997-03-17 05:01:04 -08:00
|
|
|
let native_partial_linker = "%%PARTIALLD%%"
|
2003-07-03 08:13:23 -07:00
|
|
|
let native_pack_linker = "%%PACKLD%%"
|
1996-11-07 03:01:32 -08:00
|
|
|
let ranlib = "%%RANLIBCMD%%"
|
2002-12-02 04:31:19 -08:00
|
|
|
let cc_profile = "%%CC_PROFILE%%"
|
1995-05-04 03:15:53 -07:00
|
|
|
|
2004-06-01 05:36:34 -07:00
|
|
|
let exec_magic_number = "Caml1999X008"
|
2004-06-12 01:55:49 -07:00
|
|
|
and cmi_magic_number = "Caml1999I010"
|
2004-06-01 05:36:34 -07:00
|
|
|
and cmo_magic_number = "Caml1999O006"
|
|
|
|
and cma_magic_number = "Caml1999A007"
|
2005-08-01 08:51:09 -07:00
|
|
|
and cmx_magic_number = "Caml1999Y010"
|
2004-06-01 05:36:34 -07:00
|
|
|
and cmxa_magic_number = "Caml1999Z010"
|
2002-11-01 09:06:47 -08:00
|
|
|
and ast_impl_magic_number = "Caml1999M010"
|
|
|
|
and ast_intf_magic_number = "Caml1999N009"
|
1995-05-04 03:15:53 -07:00
|
|
|
|
|
|
|
let load_path = ref ([] : string list)
|
|
|
|
|
1998-05-27 07:10:14 -07:00
|
|
|
let interface_suffix = ref ".mli"
|
|
|
|
|
2002-01-20 09:39:10 -08:00
|
|
|
let max_tag = 245
|
2002-12-19 07:49:53 -08:00
|
|
|
(* This is normally the same as in obj.ml, but we have to define it
|
|
|
|
separately because it can differ when we're in the middle of a
|
|
|
|
bootstrapping phase. *)
|
|
|
|
let lazy_tag = 246
|
|
|
|
|
1995-10-03 07:07:03 -07:00
|
|
|
let max_young_wosize = 256
|
2001-05-28 08:14:18 -07:00
|
|
|
let stack_threshold = 256 (* see byterun/config.h *)
|
1995-08-08 05:17:31 -07:00
|
|
|
|
|
|
|
let architecture = "%%ARCH%%"
|
1996-01-07 09:00:35 -08:00
|
|
|
let model = "%%MODEL%%"
|
1995-08-08 05:17:31 -07:00
|
|
|
let system = "%%SYSTEM%%"
|
1996-02-15 08:19:09 -08:00
|
|
|
|
|
|
|
let ext_obj = "%%EXT_OBJ%%"
|
|
|
|
let ext_asm = "%%EXT_ASM%%"
|
|
|
|
let ext_lib = "%%EXT_LIB%%"
|
2001-08-28 07:47:48 -07:00
|
|
|
let ext_dll = "%%EXT_DLL%%"
|
2002-06-11 07:15:12 -07:00
|
|
|
|
|
|
|
let default_executable_name =
|
|
|
|
match Sys.os_type with
|
|
|
|
"Unix" -> "a.out"
|
|
|
|
| "Win32" | "Cygwin" -> "camlprog.exe"
|
|
|
|
| _ -> "camlprog"
|
2005-05-09 06:39:17 -07:00
|
|
|
|
|
|
|
let systhread_supported = %%SYSTHREAD_SUPPORT%%;;
|
|
|
|
|
|
|
|
let print_config oc =
|
|
|
|
let p name valu = Printf.fprintf oc "%s: %s\n" name valu in
|
|
|
|
let p_bool name valu = Printf.fprintf oc "%s: %B\n" name valu in
|
|
|
|
p "version" version;
|
|
|
|
p "standard_library_default" standard_library_default;
|
|
|
|
p "standard_library" standard_library;
|
|
|
|
p "standard_runtime" standard_runtime;
|
|
|
|
p "ccomp_type" ccomp_type;
|
|
|
|
p "bytecomp_c_compiler" bytecomp_c_compiler;
|
|
|
|
p "bytecomp_c_linker" bytecomp_c_linker;
|
|
|
|
p "bytecomp_c_libraries" bytecomp_c_libraries;
|
|
|
|
p "native_c_compiler" native_c_compiler;
|
|
|
|
p "native_c_linker" native_c_linker;
|
|
|
|
p "native_c_libraries" native_c_libraries;
|
|
|
|
p "native_partial_linker" native_partial_linker;
|
|
|
|
p "ranlib" ranlib;
|
|
|
|
p "cc_profile" cc_profile;
|
|
|
|
p "architecture" architecture;
|
|
|
|
p "model" model;
|
|
|
|
p "system" system;
|
|
|
|
p "ext_obj" ext_obj;
|
|
|
|
p "ext_asm" ext_asm;
|
|
|
|
p "ext_lib" ext_lib;
|
|
|
|
p "ext_dll" ext_dll;
|
|
|
|
p "os_type" Sys.os_type;
|
|
|
|
p "default_executable_name" default_executable_name;
|
|
|
|
p_bool "systhread_supported" systhread_supported;
|
|
|
|
flush oc;
|
|
|
|
;;
|