Plasma GitLab Archive
Projects Blog Knowledge

.TH "findlib.conf" "5" "The findlib package manager for OCaml" "User Manual"
.SH "NAME"
.ft R
findlib.conf - [Configuration of findlib/ocamlfind]\c
.SH "GENERAL"
.ft R
.ft R
There are three possibilities to configure the findlib library:\c
\&  
\&  
.PP
.ft R
.RS "2m"
.ft R
Build time:\c
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
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
\&  
\&  
\&  
.PP
.ft R
.RS "7m"
.ft R
\&\h'-3m'\z\(bu\h'3m'\c
.ft R
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
\&  
\&  
.RE
.ft R
.sp
.RS "7m"
.ft R
\&\h'-3m'\z\(bu\h'3m'\c
.ft R
Whether the installed O'Caml version supports autolinking or not.\c
\&  
\&  
.RE
.ft R
.PP
.ft R
.RE
.ft R
.sp
.RS "2m"
.ft R
Configuration file findlib.conf:\c
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
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
\&  
\&  
.PP
.ft R
All files with the suffix ".conf" found in the directory\c
\&  
\& findlib.conf.d are also scanned for parameters.\c
\&  
\&  
.RE
.ft R
.sp
.RS "2m"
.ft R
Environment variables:\c
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
The settings of findlib.conf can be overridden by environment variables.\c
\&  
\&  
.RE
.ft R
.PP
.ft R
Last but not least, several settings can also be passed as\c
\&  
command-line options, or by invoking the function\c
\&  
Findlib.init\c
\&. 
.SH "findlib.conf"
.ft R
.ft R
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
.PP
.ft R
The file has the same syntax as 
META\c
, i.e. it consists of a\c
\&  
number of lines with the format\c
\&  
\&  
.PP
.ft R
.ft B
.nf
.ft I
variable\c
.ft B
\&\ =\ "\c
.ft I
value\c
.ft B
"\c
.ft R
.fi
.PP
.ft R
Here is the list of allowed variables:\c
\&  
\&  
.PP
.ft R
.RS "2m"
.ft R
path\c
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
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
\&  
\&  
.PP
.ft R
Note that the first found META file is taken, so the order of the\c
\&  
\& directories in the search path counts.\c
\&  
\&  
.PP
.ft R
This variable is required.\c
\&  
\&  
.PP
.ft R
Example:\c
\&  
\&  
\&  
.PP
.ft R
.ft B
.nf
path\ =\ "/usr/local/lib/ocaml/site-lib:/usr/lib/ocaml/site-lib"\c
.ft R
.fi
\&  
\&  
.RE
.ft R
.PP
.ft R
.ft R
.RS "2m"
.ft R
destdir\c
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
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
\&  
\&  
.PP
.ft R
Example:\c
\&  
\&  
.PP
.ft R
.ft B
.nf
destdir\ =\ "/usr/local/lib/ocaml/site-lib"\c
.ft R
.fi
\&  
\&  
.PP
.ft R
This variable is required.\c
\&  
\&  
.RE
.ft R
.PP
.ft R
.ft R
.RS "2m"
.ft R
metadir\c
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
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
\&  
\&  
.PP
.ft R
Example:\c
\&  
\&  
.PP
.ft R
.ft B
.nf
metadir\ =\ "/var/lib/findlib/metaregistry"\c
.ft R
.fi
\&  
\&  
.PP
.ft R
This variable is optional. It is not used by default.\c
\&  
\&  
.RE
.ft R
.PP
.ft R
.ft R
.RS "2m"
.ft R
ocamlc\c
,\c
\&  
\&  
ocamlopt\c
,\c
\&  
\&  
ocamlcp\c
,\c
\&  
\&  
ocamlmktop\c
,\c
\&  
\&  
ocamldoc\c
,\c
\&  
\&  
ocamldep\c
,\c
\&  
\&  
ocamlbrowser\c
\&  
\&  
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
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
\&  
\&  
.PP
.ft R
Example:\c
\&  
\&  
.PP
.ft R
.ft B
.nf
ocamlc\ \ \ \ \ =\ "ocamlc.opt"\c
\&
.br
ocamlopt\ \ \ =\ "ocamlopt.opt"\c
\&
.br
ocamlcp\ \ \ \ =\ "ocamlcp.opt"\c
\&
.br
ocamlmktop\ =\ "ocamlmktop.opt"\c
.ft R
.fi
\&  
\&  
.PP
.ft R
This variable is optional. It is not used by default.\c
\&  
\&  
.RE
.ft R
.PP
.ft R
.ft R
.RS "2m"
.ft R
stdlib\c
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
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
\&  
\&  
.PP
.ft R
This variable is optional. It is not recommend to set this variable\c
\&  
\& unless you know what you are doing!\c
\&  
\&  
.RE
.ft R
.PP
.ft R
.ft R
.RS "2m"
.ft R
ldconf\c
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
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
\&  
\&  
.PP
.ft R
If not set, the ld.conf file is assumed to reside in the O'Caml\c
\&  
\& standard library directory.\c
\&  
\&  
.PP
.ft R
This variable is optional. It is not recommended to set this variable\c
\&  
\& unless you know what you are doing!\c
\&  
\&  
.RE
.ft R
.PP
.ft R
.ft R
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
\&  
\&  
.PP
.ft R
.ft B
.nf
.ft I
variable\c
.ft B
(\c
.ft I
toolchain\c
.ft B
)\ =\ "\c
.ft I
value\c
.ft B
"\c
.ft R
.fi
\&  
\&  
For example:\c
\&  
\&  
.PP
.ft R
.ft B
.nf
ocamlc(mypatch)\ =\ "ocamlc-mypatch"\c
.ft R
.fi
\&  
\&  
When the toolchain "mypatch" is selected, this compiler will be used instead\c
\&  
of the standard one.\c
.PP
.ft R
In order to switch to a certain toolchain, use the -toolchain\c
\&  
option of 
ocamlfind\c
\&.\c
.SH "Environment"
.ft R
.ft R
A number of environment variables modifies the behaviour of\c
\&  
findlib/ocamlfind:\c
\&  
\&  
.PP
.ft R
.RS "2m"
.ft R
OCAMLFIND_CONF\c
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
This variable overrides the location of the configuration file\c
\&  
\& findlib.conf. It must contain the absolute path name of this file.\c
\&  
\&  
.RE
.ft R
.PP
.ft R
.ft R
.RS "2m"
.ft R
OCAMLPATH\c
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
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
\&  
\&  
.RE
.ft R
.PP
.ft R
.ft R
.RS "2m"
.ft R
OCAMLFIND_DESTDIR\c
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
This variable overrides the configuration variable\c
\&  
\&  
destdir\c
\&. 
\&  
\&  
.RE
.ft R
.PP
.ft R
.ft R
.RS "2m"
.ft R
OCAMLFIND_METADIR\c
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
This variable overrides the configuration variable\c
\&  
\&  
metadir\c
\&. 
\&  
\&  
.RE
.ft R
.PP
.ft R
.ft R
.RS "2m"
.ft R
OCAMLFIND_COMMANDS\c
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
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
\&  
\&  
\&  
.PP
.ft R
.ft B
.nf
ocamlc=\c
.ft I
name\c
.ft B
\&\ ocamlopt=\c
.ft I
name\c
.ft B
\&\ ocamlcp=\c
.ft I
name\c
.ft B
\&\ ocamlmktop=\c
.ft I
name\c
.ft B
\&\ ocamldoc=\c
.ft I
name\c
.ft B
\&\ ocamldep=\c
.ft I
name\c
.ft B
\&\ ocamlbrowser=\c
.ft I
name\c
.ft B
.ft R
.fi
\&  
\&  
.PP
.ft R
Example:\c
\&  
\&  
.PP
.ft R
.ft B
.nf
ocamlc=ocamlc-3.00\ ocamlopt=ocamlopt-3.00\ ocamlcp=ocamlcp-3.00\ ocamlmktop=ocamlmktop-3.00\c
.ft R
.fi
\&  
\&  
.RE
.ft R
.PP
.ft R
.ft R
.RS "2m"
.ft R
CAMLLIB\c
\& or 
OCAMLLIB\c
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
This variable overrides the configuration variable\c
\&  
\&  
stdlib\c
\&. 
\&  
\&  
.RE
.ft R
.PP
.ft R
.ft R
.RS "2m"
.ft R
OCAMLFIND_LDCONF\c
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
This variable overrides the configuration variable\c
\&  
\&  
ldconf\c
\&. 
\&  
\&  
.RE
.ft R
.PP
.ft R
.ft R
.RS "2m"
.ft R
OCAMLFIND_IGNORE_DUPS_IN\c
.RE
.ft R
.sp
.RS "7m"
.ft R
.ft R
This variable instructs findlib not to emit warnings that packages\c
\&  
\& or module occur several times. The variable must be set to the\c
\&  
\& directory where the packages reside that are to be ignored for this\c
\&  
\& warning.\c
\&  
\&  
.RE
.ft R
.PP
.ft R

This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml