findlib.conf

The directory containing findlib.conf is determined at build time (by running the configure script), the fallback default is /usr/local/etc . You can set a different location by changing the environment variable OCAMLFIND_CONF which must contain the absolute path of findlib.conf. .PP The file has the same syntax as META , i.e. it consists of a number of lines with the format

variable .ft B
 = " .ft I
value .ft B
" .ft R

Here is the list of allowed variables:

path .RE

The search path for META files/package directories. The variable enumerates directories which are separated by colons (Windows: semicolons), and these directories are tried in turn to find a certain package. More exactly, if d is such a directory and p the searched package, the search algorithm will first check whether d/p/META exists. In this case, this META file is taken, and d/p is the package directory. Second, the algorithm tries d/META.p, but the package directory must be specified in this META.p file by a

directory directive.

Note that the first found META file is taken, so the order of the directories in the search path counts.

This variable is required.

Example:

path = "/usr/local/lib/ocaml/site-lib:/usr/lib/ocaml/site-lib" .ft R

destdir .RE

This variable determines the location where ocamlfind install puts the packages by default: If d is this directory, and p the package to install, a new subdirectory d/p will be created containing all the files of the package.

Example:

destdir = "/usr/local/lib/ocaml/site-lib" .ft R

This variable is required.

metadir .RE

If set, the command ocamlfind install will put the META files of packages into this directory (files are named META.p where p=package name); otherwise the META files are put into the package directories like any other file.

Example:

metadir = "/var/lib/findlib/metaregistry" .ft R

This variable is optional. It is not used by default.

ocamlc ,

ocamlopt ,

ocamlcp ,

ocamlmktop ,

ocamldoc ,

ocamldep ,

ocamlbrowser

If you want to call other executables than "ocamlc", "ocamlopt", "ocamlcp", "ocamlmktop", "ocamldoc", "ocamldep", and "ocamlbrowser", you can set the names of the executables here. The command ocamlfind looks into these four variables to determine the names of the compilers to call.

Example:

ocamlc     = "ocamlc.opt" 

ocamlopt   = "ocamlopt.opt" 

ocamlcp    = "ocamlcp.opt" 

ocamlmktop = "ocamlmktop.opt" .ft R

This variable is optional. It is not used by default.

stdlib .RE

This variable determines the location of the standard library. This must be the same directory for which the O'Caml compilers are configured.

This variable is optional. It is not recommend to set this variable unless you know what you are doing!

ldconf .RE

This variable determines the location of the ld.conf file. This must be the same file the O'Caml compilers read in; it is updated by

ocamlfind when installing and removing packages. You can set this variable to the special value " ignore " to disable the automatic modification of the ld.conf file.

If not set, the ld.conf file is assumed to reside in the O'Caml standard library directory.

This variable is optional. It is not recommended to set this variable unless you know what you are doing!

Toolchains: It is possible to have variants of the original configuration. These variants are called "toolchains" because they are intended to select different compilers, e.g. patched compilers. In order to set a variable for a certain toolchain, use the syntax

variable .ft B
( .ft I
toolchain .ft B
) = " .ft I
value .ft B
" .ft R

For example:

ocamlc(mypatch) = "ocamlc-mypatch" .ft R

When the toolchain "mypatch" is selected, this compiler will be used instead of the standard one. .PP In order to switch to a certain toolchain, use the -toolchain option of ocamlfind . .SH "Environment" A number of environment variables modifies the behaviour of findlib/ocamlfind:

OCAMLFIND_CONF .RE

This variable overrides the location of the configuration file findlib.conf. It must contain the absolute path name of this file.

OCAMLPATH .RE

This variable may contain an additional search path for package directories. It is treated as if the directories were prepended to the configuration variable path .

OCAMLFIND_DESTDIR .RE

This variable overrides the configuration variable

destdir .

OCAMLFIND_METADIR .RE

This variable overrides the configuration variable

metadir .

OCAMLFIND_COMMANDS .RE

This variable overrides the configuration variables

ocamlc , ocamlopt ,

ocamlcp , ocamlmktop ,

ocamldoc , ocamldep , and/or

ocamlbrowser .

Its value must conform to the syntax

ocamlc= .ft I
name .ft B
 ocamlopt= .ft I
name .ft B
 ocamlcp= .ft I
name .ft B
 ocamlmktop= .ft I
name .ft B
 ocamldoc= .ft I
name .ft B
 ocamldep= .ft I
name .ft B
 ocamlbrowser= .ft I
name .ft B

Example:

ocamlc=ocamlc-3.00 ocamlopt=ocamlopt-3.00 ocamlcp=ocamlcp-3.00 ocamlmktop=ocamlmktop-3.00 .ft R

CAMLLIB or OCAMLLIB .RE

This variable overrides the configuration variable

stdlib .

OCAMLFIND_LDCONF .RE

This variable overrides the configuration variable

ldconf .

OCAMLFIND_IGNORE_DUPS_IN .RE

This variable instructs findlib not to emit warnings that packages or module occur several times. The variable must be set to the directory where the packages reside that are to be ignored for this warning.