File: INSTALL

package info (click to toggle)
findlib 1.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,868 kB
  • sloc: ml: 6,006; xml: 3,085; sh: 1,490; makefile: 378
file content (187 lines) | stat: -rw-r--r-- 5,310 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
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.

At the end of this file you find notes about MacOS and Windows.


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

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.

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

MACOS X:

Findlib can be installed as described. There is even a script to
create a MacOS X package, use "make package-macosx" to invoke it. As I
do not have access to a Mac box, I cannot test this script, but I
fully trust the author that it works.

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

WINDOWS:

Ocaml for Windows exists in three flavours:

(1) Ocaml as Cygwin program
(2) Ocaml as Mingw program (i.e. the gcc toolchain is used but
    Ocaml is a native Windows program)
(3) Ocaml as VC program

In all three cases you need Cygwin to build and install findlib,
because "configure" and the Makefile are both Cygwin scripts. The
golden rule to make everything work is this:

PASS CYGWIN-STYLE PATHS TO CONFIGURE!

Even in cases (2) and (3)! That means use something like
/cygdrive/c/path and not c:\path when you specify where -bindir,
-config etc. are. The point is that "configure" itself is a Cygwin
script, and therefore expects Cygwin input. At the right moment, the
paths are back-translated to their Windows counterparts.

Until O'Caml 3.08 you must specify whether you have (2) or (3) by
the configure switches

- "-system mingw" for (2)
- "-system win32" for (3)
- nothing for (1)

Since O'Caml 3.09 this is no longer necessary because "ocamlc -config"
outputs the required information.

In previous versions of Findlib there was a single switch -cygpath 
for both (2) and (3). It is now interpreted as -system mingw (as
it was meant as that).