Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > 403435dc5f97d3e723277b4335be0427 > files > 27

findlib-1.1.2-0.pl1.3mdv2008.1.x86_64.rpm

The installation procedure consists of the steps:

1) configure the "findlib" library
2) compile "findlib" and the "ocamlfind" frontend of "findlib"
3) install "findlib" and the core library configuration

Optionally, you can run ./itest after step 2 to check the
configuration. Problems with the configuration are unlikely, however.


----------------------------------------------------------------------

STEP 1: DEFAULT CONFIGURATION

The findlib module and its ocamlfind frontend come with a "configure"
script that should almost always be able to figure out a good
configuration.

Just type:

	./configure

First the linker options for the various core libraries are figured
out, then reasonable installation paths are checked.

If the results are not ok, you can modify them using the following
options:

	-bindir <path>

		set the location where the ocamlfind command should be
		installed.
		Default: same location as "ocamlc"

	-mandir <path>

		set the location where the man page should be installed.
		Default: a heuristics, and "/usr/local/man" as fallback.

	-sitelib <path>

		set the default "site-lib" directory.
		Default: For installations in the /usr hierarchy,
		"$stdlib/site-lib", where $stdlib is the location of
		Ocaml's  standard library.

		For installations in the /opt hierarchy,
		"$stdlib/../site-lib", i.e. parallel to $stdlib.

	-config <file>

		set the location of the configuration file.
		Default: <bindir>/../etc/findlib.conf

	-no-topfind

		the "topfind" script is not installed in the standard
		library directory. (This is not a good idea in general,
		because #use "topfind" will not work when this option
		is enabled.)

	-with-toolbox
		also compile and install the "toolbox". This requires
		that labltk is available. The toolbox contains the
		"make_wizard" to easily create findlib-enabled Makefiles.

	-cygpath
		Cygwin environment only: If "ocamlc -where" does not
		output a Unix-style path, this option can be used
		to apply the "cygpath" command to it. Use this option
		if you see backslashes or drive letters in Makefile.config.

ALTERNATIVES:

If the "configure" script does not work properly (very unlikely), do

	cp Makefile.config.pattern Makefile.config

and edit Makefile.config by hand.

If the generated META files do not work, edit them (this is very very unlikely).

Note: The META files are generated from the META.in files in the same
directories by m4:

	m4 -Dos=<os> <more parameters...> site-lib/<name>/META.in
		>site-lib/<name>/META

You may invoke m4 manually to create different META files, but this
is currently not documented.



----------------------------------------------------------------------

STEP 2: COMPILATION

After configuration has been done, compile with

	make all

This creates findlib.cma, findlib_mt.cma (the thread-safe version),
and ocamlfind.

If you have ocamlopt, do also

	make opt

This creates findlib.cmxa, findlib_mt.cmxa, and ocamlfind_opt.

----------------------------------------------------------------------

STEP 3: INSTALLATION

Install the findlib library, the ocamlfind frontend, and the core library
configurations with:

	make install

(A "make uninstall" removes them.)

With
	make clean

the build directory is cleaned up.


OPTIONAL (BUT RECOMMENDED):

If you want a separate directory for DLLs, create this directory
now: 

mkdir `ocamlfind printconf destdir`/stublibs

If you do this, you must also tell O'Caml that DLLs can be found in
this directory: Add the absolute path of this directory to
the ld.conf file (type "ocamlfind printconf ldconf" to get the
location of the ld.conf file). Every line of this text file lists
one possible directory for DLLs.

----------------------------------------------------------------------

WINDOWS AND MACOS:

Does anybody want to port findlib? I cannot do it because I don't have
access to the necessary systems/tools.

The ocamlfind command _should_ run at least for Windows, but I never
tested that. Maybe there are bugs in it.

A port would mostly have to rewrite the "configure" script which is
very Unixish.

Maybe findlib runs on a cygwin platform out of the box... I don't
know...