1findlib.conf(5) File Formats Manual findlib.conf(5)
2
3
4
6 findlib.conf - [Configuration of findlib/ocamlfind]
7
9 There are three possibilities to configure the findlib library:
10
11 Build time:
12
13 Before findlib is compiled, a "configure" script is invoked to
14 figure out the settings that are most likely to work on the
15 system. Most settings are simply entered into text files and
16 can easily be changed after installation. The following proper‐
17 ties cannot be changed later because they are compiled into the
18 resulting binaries:
19
20 · The default location of the configuration file find‐
21 lib.conf. However, you can set a different location by
22 the environment variable OCAMLFIND_CONF.
23
24 · Whether the installed O'Caml version supports autolinking
25 or not.
26
27 Configuration file findlib.conf:
28
29 An initial version of this file is generated by the configure
30 script, but you are free to modify it later. Most important,
31 this file contains the system-wide search path used to look up
32 packages, and the default location where to install new pack‐
33 ages.
34
35 All files with the suffix ".conf" found in the directory find‐
36 lib.conf.d are also scanned for parameters.
37
38 Environment variables:
39
40 The settings of findlib.conf can be overridden by environment
41 variables.
42
43 Last but not least, several settings can also be passed as command-line
44 options, or by invoking the function Findlib.init.
45
47 The directory containing findlib.conf is determined at build time (by
48 running the configure script), the fallback default is /usr/local/etc.
49 You can set a different location by changing the environment variable
50 OCAMLFIND_CONF which must contain the absolute path of findlib.conf.
51
52 The file has the same syntax as META, i.e. it consists of a number of
53 lines with the format
54
55 variable = "value"
56
57 Here is the list of allowed variables:
58
59 path
60
61 The search path for META files/package directories. The variable
62 enumerates directories which are separated by colons (Windows:
63 semicolons), and these directories are tried in turn to find a
64 certain package. More exactly, if d is such a directory and p
65 the searched package, the search algorithm will first check
66 whether d/p/META exists. In this case, this META file is taken,
67 and d/p is the package directory. Second, the algorithm tries
68 d/META.p, but the package directory must be specified in this
69 META.p file by a directory directive.
70
71 Note that the first found META file is taken, so the order of
72 the directories in the search path counts.
73
74 This variable is required.
75
76 Example:
77
78 path = "/usr/local/lib/ocaml/site-lib:/usr/lib/ocaml/site-lib"
79
80
81 destdir
82
83 This variable determines the location where ocamlfind install
84 puts the packages by default: If d is this directory, and p the
85 package to install, a new subdirectory d/p will be created con‐
86 taining all the files of the package.
87
88 Example:
89
90 destdir = "/usr/local/lib/ocaml/site-lib"
91
92
93 This variable is required.
94
95 metadir
96
97 If set, the command ocamlfind install will put the META files
98 of packages into this directory (files are named META.p where
99 p=package name); otherwise the META files are put into the
100 package directories like any other file.
101
102 Example:
103
104 metadir = "/var/lib/findlib/metaregistry"
105
106
107 This variable is optional. It is not used by default.
108
109 ocamlc, ocamlopt, ocamlcp, ocamlmktop, ocamldoc, ocamldep,
110 ocamlbrowser
111
112 If you want to call other executables than "ocamlc", "ocamlopt",
113 "ocamlcp", "ocamlmktop", "ocamldoc", "ocamldep", and "ocaml‐
114 browser", you can set the names of the executables here. The
115 command ocamlfind looks into these four variables to determine
116 the names of the compilers to call.
117
118 Example:
119
120 ocamlc = "ocamlc.opt"
121 ocamlopt = "ocamlopt.opt"
122 ocamlcp = "ocamlcp.opt"
123 ocamlmktop = "ocamlmktop.opt"
124
125
126 This variable is optional. It is not used by default.
127
128 stdlib
129
130 This variable determines the location of the standard library.
131 This must be the same directory for which the O'Caml compilers
132 are configured.
133
134 This variable is optional. It is not recommend to set this vari‐
135 able unless you know what you are doing!
136
137 ldconf
138
139 This variable determines the location of the ld.conf file. This
140 must be the same file the O'Caml compilers read in; it is
141 updated by ocamlfind when installing and removing packages.
142 You can set this variable to the special value "ignore" to dis‐
143 able the automatic modification of the ld.conf file.
144
145 If not set, the ld.conf file is assumed to reside in the O'Caml
146 standard library directory.
147
148 This variable is optional. It is not recommended to set this
149 variable unless you know what you are doing!
150
151 Toolchains: It is possible to have variants of the original configura‐
152 tion. These variants are called "toolchains" because they are intended
153 to select different compilers, e.g. patched compilers. In order to set
154 a variable for a certain toolchain, use the syntax
155
156 variable(toolchain) = "value"
157 For example:
158
159 ocamlc(mypatch) = "ocamlc-mypatch"
160 When the toolchain "mypatch" is selected, this compiler will be used
161 instead of the standard one.
162
163 In order to switch to a certain toolchain, use the -toolchain option of
164 ocamlfind.
165
167 A number of environment variables modifies the behaviour of find‐
168 lib/ocamlfind:
169
170 OCAMLFIND_CONF
171
172 This variable overrides the location of the configuration file
173 findlib.conf. It must contain the absolute path name of this
174 file.
175
176 OCAMLFIND_TOOLCHAIN
177
178 This variable sets the currently selected toolchain when a
179 -toolchain option is not passed on the command line.
180
181 OCAMLPATH
182
183 This variable may contain an additional search path for package
184 directories. It is treated as if the directories were prepended
185 to the configuration variable path.
186
187 OCAMLFIND_DESTDIR
188
189 This variable overrides the configuration variable destdir.
190
191 OCAMLFIND_METADIR
192
193 This variable overrides the configuration variable metadir.
194
195 OCAMLFIND_COMMANDS
196
197 This variable overrides the configuration variables ocamlc,
198 ocamlopt, ocamlcp, ocamlmktop, ocamldoc, ocamldep, and/or
199 ocamlbrowser. Its value must conform to the syntax
200
201 ocamlc=name ocamlopt=name ocamlcp=name ocamlmktop=name ocamldoc=name ocamldep=name ocamlbrowser=name
202
203
204 Example:
205
206 ocamlc=ocamlc-3.00 ocamlopt=ocamlopt-3.00 ocamlcp=ocamlcp-3.00 ocamlmktop=ocamlmktop-3.00
207
208
209 CAMLLIB or OCAMLLIB
210
211 This variable overrides the configuration variable stdlib.
212
213 OCAMLFIND_LDCONF
214
215 This variable overrides the configuration variable ldconf.
216
217 OCAMLFIND_IGNORE_DUPS_IN
218
219 This variable instructs findlib not to emit warnings that pack‐
220 ages or module occur several times. The variable must be set to
221 the directory where the packages reside that are to be ignored
222 for this warning.
223
224User Manual The findlib package manager for OCaml findlib.conf(5)