File: INSTALL

package info (click to toggle)
ocamlnet 4.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 51,764 kB
  • ctags: 16,446
  • sloc: ml: 148,419; ansic: 10,989; sh: 1,885; makefile: 1,355
file content (232 lines) | stat: -rw-r--r-- 7,819 bytes parent folder | download | duplicates (3)
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
How to install ocamlnet

ocamlnet is a quite large library, and is split up into several
parts. Usually, it is not necessary to install all of ocamlnet,
and there are configuration options allowing you to select what
you want.

There is now an oasis wrapper for the (custom) configure system.
So "ocaml setup.ml -configure; ocaml setup.ml -build" should also
work.

The following table gives a rough overview. The libraries you
must build at minimum are tagged as CORE. For the other libraries
the configuration option is shown that will select them for build:

Library 	Option		What it provides
----------------------------------------------------------------------
equeue		CORE		Event queues
equeue-gtk2	-enable-gtk2	Event queues - integration into lablgtk2
equeue-tcl	-enable-tcl	Event queues - integration into labltk
netcamlbox	CORE		Multiprocessing
netcgi2		CORE		Web applications (revised lib)
netcgi2-apache  -enable-apache  Web applications as Apache module
netcgi2-plex	CORE		Web applications - support for netplex
netclient	CORE		Clients for HTTP, FTP, Telnet, POP, SMTP
netgss-system   -enable-gssapi  GSSAPI bindings
nethttpd	-with-nethttpd	Web server
netmulticore    CORE 	        Multiprocessing
netplex		CORE		Generic server framework
netshm		CORE		Shared memory for IPC
netstring	CORE		String routines (e.g. URLs, HTML, Mail)
netstring-pcre  -enable[-full]-pcre   PCRE layer
netsys		CORE		System interfaces missing in Unix
nettls-gnutls   -enable-gnutls  TLS library
netunidata      CORE            Unicode tables
netzip	        -enable-zip     read/write gzip data using object channels
rpc		CORE		Sophisticated SunRPC/ONCRPC implementation
rpc-auth-local	CORE (*)	SunRPC/ONCRPC - Add-on for local auth
rpc-generator	CORE		SunRPC/ONCRPC - Stub generator
rpc-xti		CORE (*)	SunRPC/ONCRPC - Add-on for XTI-only transports
shell		CORE		Sophisticated version of Sys.command
----------------------------------------------------------------------
(*) If the operation system supports it

List of prerequisites:

Option		Prerequisite	Version/Where to get/What it is
----------------------------------------------------------------------
CORE		findlib		>= 1.0
				http://www.ocaml-programming.de/packages
				Library manager

-enable-pcre or
-enable-full-pcre pcre		>= 5
		 (pcre-ocaml)	http://www.ocaml.info/ocaml_sources
				Regular expressions library

                                CHANGED IN OCAMLNET-3.6.4 !!!

                                PLEASE READ doc/html-main/Regexp.html

-enanle-gnutls  gnutls          2.8 or better
                                http://www.gnutls.org

-enable-gssapi  gssapi          Any standard-compliant GSSAPI version should
                                do, e.g. MIT Kerberos or Heimdal

-enable-gtk2	lablgtk2	probably any (*)
				http://wwwfun.kurims.kyoto-u.ac.jp/soft/
				  olabl/lablgtk.html
				Bindings for gtk2 GUIs

-enable-tcl	labltk		probably any
				part of the O'Caml distribution
				Bindings for tcl/tk GUIs

-enable-zip     camlzip         >= 1.01
				http://pauillac.inria.fr/~xleroy/software.html
	                        Bindings for zlib

-with-nethttpd	none		none

   Note: nethttpd must be explicitly selected because it is distributed
   under different license conditions than the other libraries. See
   the file LICENSE for more.

   Note: At runtime, -with-auth-dh needs further prerequisites,
   namely the so-called keyserv daemon.
----------------------------------------------------------------------
(*) The distribution of this prerequite does not include findlib
    support. It is, however, silently assumed the prerequisite
    library is installed in the findlib way. Sorry if this is
    inconvenient for you.



In order to configure ocamlnet, just run the "configure" script with
the mentioned options (-enable-X and -with-X). There are a few
other options, as listed below. By default, the library archives
are installed into the findlib default location. You can find out
this location with the command

    ocamlfind printconf destdir

For every ocamlnet library, a subdirectory is created where the 
files are installed. The few binary executables are installed into
the directory where the ocaml compilers are installed. The data
files are installed into the same directory as the netstring
archives. The "configure" run shows all effective options.

Option			What it changes
----------------------------------------------------------------------
-bindir <dir>		Binary executables are installed in <dir>

-datadir <dir> 		Data files are installed in <dir>.

			Note: This directory is compiled into the
			netstring library, and cannot be changed
			at runtime.

-equeue-tcl-defs <str>	Only if you have -enable-tcl:
 			Sets options for the C compiler so the
			include files for tcl are found. E.g.
			-equeue-tcl-defs -I/usr/include/tcl8.4

-equeue-tcl-libs <str>	Only if you have -enable-tcl:
			Sets options for the linker so the 
			tcl library is found. E.g.
			-equeue-tcl-libs -ltcl8.4

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

The directory where the library archives are installed can be
changed when you run "make install", see below.



After having configured ocamlnet, you can build it:

    make all

builds the bytecode version, and

    make opt

builds the native version (if posssible on your platform).



After the build you can install ocamlnet. It is not required to
become root for this, as it is sufficient that you have write
privileges in all directories where files are installed. Do
this with:

   make install

At this time, you can change the location where the library archives
are installed:

   env OCAMLFIND_DESTDIR="<dir>" make install

Here, <dir> is the replacement for what is output by
"ocamlfind printconf destdir".



In order to uninstall ocamlnet, run

    make uninstall



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

Special notes for distributors

The build system includes a few mechanisms making life easier to
build ocamlnet in package management environments.

First, it is suggested to distribute ocamlnet as several packages
in binary form:

- ocamlnet		CORE only
- ocamlnet-gnutls       Add-on libraries needing gnutls
- ocamlnet-gssapi       Add-on libraries needing GSSAPI
- ocamlnet-gtk2		Add-on libraries needing gtk2
- ocamlnet-tcl		Add-on libraries needing tcl
- ocamlnet-zip          Add-on libraries needing camlzip
- ocamlnet-pcre         Add-on libraries needing pcre
- ocamlnet-nethttpd	nethttpd (optional, if it makes the different
			licensing conditions clearer)

Second, you can completely separate the builds of the CORE and
the add-on stuff:

It is possible to build the add-on stuff later, i.e. after the
ocamlnet CORE is already installed. To do so, use the special
configuration option -disable-core, and run "make" with these
extra variables:

   INC_NETSYS="-package netsys"
   INC_NETSTRING="-package netstring"
   INC_EQUEUE="-package equeue"
   INC_NETCGI2="-package netcgi2"
   INC_NETCGI2_APACHE="-package netcgi2-apache"
   INC_NETPLEX="-package netplex"
   INC_NETCAMLBOX="-package netcamlbox"
   INC_RPC="-package rpc"
   INC_SHELL="-package shell"
   INC_NETGSSAPI="-package netgssapi"

i.e. "make all" becomes

   make all INC_NETSYS="..." INC_NETSTRING="..." ...

The effect is that the add-on libraries are built against the already
installed core.

Third, at installation time, it is possible to install into a
local directory hierarchy. To do so, use

   env DESTDIR="<root>" \
       OCAMLFIND_DESTDIR="<root>/$(ocamlfind printconf destdir)" \
       make install

where <root> is the local directory. You should ensure that
the direcories

   "<root>/$(ocamlfind printconf destdir)", and optionally,
   "<root>/$(ocamlfind printconf destdir)"/stublibs

already exist.