NAME
findlib.conf - [Configuration of findlib/ocamlfind]\c
GENERAL
There are three possibilities to configure the findlib library:\c
Build time:\c
Before findlib is compiled, a "configure" script is invoked to figure\c
out the settings that are most likely to work on the system. Most\c
settings are simply entered into text files and can easily be changed\c
after installation. The following properties cannot be changed later\c
because they are compiled into the resulting binaries:\c
\h'-3m'\z\h'3m'\c
The default location of the configuration file findlib.conf. However,\c
you can set a different location by the environment variable\c
OCAMLFIND_CONF\c
.\c
\h'-3m'\z\h'3m'\c
Whether the installed O'Caml version supports autolinking or not.\c
Configuration file findlib.conf:\c
An initial version of this file is generated by the configure script,\c
but you are free to modify it later. Most important, this file\c
contains the system-wide search path used to look up packages, and the\c
default location where to install new packages.\c
All files with the suffix ".conf" found in the directory\c
findlib.conf.d are also scanned for parameters.\c
Environment variables:\c
The settings of findlib.conf can be overridden by environment variables.\c
Last but not least, several settings can also be passed as\c
command-line options, or by invoking the function\c
Findlib.init\c
.
findlib.conf
The directory containing findlib.conf is determined at build time (by\c
running the configure script), the fallback default is\c
/usr/local/etc\c
. You can set a different location by\c
changing the environment variable
OCAMLFIND_CONF\c
which must contain the absolute path of findlib.conf.\c
The file has the same syntax as
META\c
, i.e. it consists of a\c
number of lines with the format\c
variable\c
= "\c
value\c
"\c
Here is the list of allowed variables:\c
path\c
The search path for META files/package directories. The variable\c
enumerates directories which are separated by colons (Windows:\c
semicolons), and these directories are tried in turn to find a certain\c
package. More exactly, if d is such a directory and p the searched\c
package, the search algorithm will first check whether d/p/META\c
exists. In this case, this META file is taken, and d/p is the package\c
directory. Second, the algorithm tries d/META.p, but the package\c
directory must be specified in this META.p file by a\c
directory\c
directive.\c
Note that the first found META file is taken, so the order of the\c
directories in the search path counts.\c
This variable is required.\c
Example:\c
path = "/usr/local/lib/ocaml/site-lib:/usr/lib/ocaml/site-lib"\c
destdir\c
This variable determines the location where
ocamlfind\c
install\c
puts the packages by default: If d is this\c
directory, and p the package to install, a new subdirectory d/p will\c
be created containing all the files of the package.\c
Example:\c
destdir = "/usr/local/lib/ocaml/site-lib"\c
This variable is required.\c
metadir\c
If set, the command
ocamlfind install\c
will put the\c
META files of packages into this directory (files are named META.p\c
where p=package name); otherwise the META files are put into the\c
package directories like any other file.\c
Example:\c
metadir = "/var/lib/findlib/metaregistry"\c
This variable is optional. It is not used by default.\c
ocamlc\c
,\c
ocamlopt\c
,\c
ocamlcp\c
,\c
ocamlmktop\c
,\c
ocamldoc\c
,\c
ocamldep\c
,\c
ocamlbrowser\c
If you want to call other executables than "ocamlc", "ocamlopt",\c
"ocamlcp", "ocamlmktop", "ocamldoc", "ocamldep", and\c
"ocamlbrowser", you can\c
set the names of\c
the executables here. The command
ocamlfind\c
looks\c
into these four variables to determine the names of the compilers to\c
call.\c
Example:\c
ocamlc = "ocamlc.opt"\c
ocamlopt = "ocamlopt.opt"\c
ocamlcp = "ocamlcp.opt"\c
ocamlmktop = "ocamlmktop.opt"\c
This variable is optional. It is not used by default.\c
stdlib\c
This variable determines the location of the standard library. This must\c
be the same directory for which the O'Caml compilers are configured.\c
This variable is optional. It is not recommend to set this variable\c
unless you know what you are doing!\c
ldconf\c
This variable determines the location of the ld.conf file. This must\c
be the same file the O'Caml compilers read in; it is updated by
ocamlfind when installing and removing packages. You can set this\c
variable to the special value "\c
ignore\c
" to disable\c
the automatic modification of the ld.conf file.\c
If not set, the ld.conf file is assumed to reside in the O'Caml\c
standard library directory.\c
This variable is optional. It is not recommended to set this variable\c
unless you know what you are doing!\c
Toolchains: It is possible to have variants of the original configuration.\c
These variants are called "toolchains" because they are intended to\c
select different compilers, e.g. patched compilers. In order to\c
set a variable for a certain toolchain, use the syntax\c
variable\c
(\c
toolchain\c
) = "\c
value\c
"\c
For example:\c
ocamlc(mypatch) = "ocamlc-mypatch"\c
When the toolchain "mypatch" is selected, this compiler will be used instead\c
of the standard one.\c
In order to switch to a certain toolchain, use the -toolchain\c
option of
ocamlfind\c
.\c
Environment
A number of environment variables modifies the behaviour of\c
findlib/ocamlfind:\c
OCAMLFIND_CONF\c
This variable overrides the location of the configuration file\c
findlib.conf. It must contain the absolute path name of this file.\c
OCAMLPATH\c
This variable may contain an additional search path for package\c
directories. It is treated as if the directories were prepended to\c
the configuration variable
path\c
.\c
OCAMLFIND_DESTDIR\c
This variable overrides the configuration variable\c
destdir\c
.
OCAMLFIND_METADIR\c
This variable overrides the configuration variable\c
metadir\c
.
OCAMLFIND_COMMANDS\c
This variable overrides the configuration variables\c
ocamlc\c
,
ocamlopt\c
,\c
ocamlcp\c
,
ocamlmktop\c
,\c
ocamldoc\c
,
ocamldep\c
, and/or\c
ocamlbrowser\c
.
Its value must conform to the syntax\c
ocamlc=\c
name\c
ocamlopt=\c
name\c
ocamlcp=\c
name\c
ocamlmktop=\c
name\c
ocamldoc=\c
name\c
ocamldep=\c
name\c
ocamlbrowser=\c
name\c
Example:\c
ocamlc=ocamlc-3.00 ocamlopt=ocamlopt-3.00 ocamlcp=ocamlcp-3.00 ocamlmktop=ocamlmktop-3.00\c
CAMLLIB\c
or
OCAMLLIB\c
This variable overrides the configuration variable\c
stdlib\c
.
OCAMLFIND_LDCONF\c
This variable overrides the configuration variable\c
ldconf\c
.