File: INSTALL

package info (click to toggle)
ocamltk 41-1
  • links: PTS
  • area: non-free
  • in suites: hamm, slink
  • size: 1,096 kB
  • ctags: 2,142
  • sloc: ansic: 4,385; ml: 4,095; makefile: 441; sh: 5
file content (75 lines) | stat: -rw-r--r-- 2,661 bytes parent folder | download
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
PREREQUISITES

You must have already installed
 * Objective Caml 1.03 
    ftp://ftp.inria.fr/lang/caml-light

 * Tcl7.5/Tk4.1 or Tcl7.6/Tk4.2
    ftp://ftp.smli.com/pub/tcl or various mirrors


INSTALLATION INSTRUCTIONS

1- Extract the archive ocamltk41.tar.gz somewhere (for example in 
the .../otherslibs directory of your Objective Caml installation).
This will create the "camltk41" directory.

2- Configure the system. To complete this step, you need to know the
locations of
 * the installed Objective Caml libraries (e.g. /usr/local/lib/ocaml)
 * the sources of the Tk package (e.g. /usr/local/src/tk4.1)

Edit the file site.config, and set the corresponding variables
(OCAMLLIBDIR and TK_SRC). The rest of the configuration is supposed to
be automated by the "configure" script; this scripts attempts to find
the correct information for compiling and linking against Tk. It it fails,
e.g. because your installation uses exotic paths, then you can help
configure by setting other variables in site.config:
CPPFLAGS="-I/path/to/tclinclude -I/path/to/tkinclude"
LDFLAGS=-L/path/to/tcllib -L/path/to/tklib

If you are compiling for several platforms, you can of course keep several
site.config files. Don't forget to remove config.cache between compilation 
runs.

Then run
$ ./configure --with-config=site.config

This generates the files "Makefile.config",  "Makefile.camltk", and
"tkanim/ext/Makefile".

If the automatic configuration fails, look at config.log to see what
happened, check and edit site.config and rerun configure.

If you just can't get configure to work, then look at the files
Makefile.config.ex, Makefile.camltk.ex, tkanim/ext/Makefile.ex
and generate the required files Makefile.config, Makefile.camltk,
and tkanim/ext/Makefile following the indications.

Other settable variables in site.config are:
INSTALLDIR: the final location of libraries
LIBEXT: for japanese version of Tcl/Tk

3- Build the system. From the "camltk41" directory, do:
   make all

4- To be sure everything works well, you can try the examples
   cd examples; make; ./helloworld

If the examples program fail with error message
./helloworld: can't load library 'libtk4.2.so'
or something similar, this means that you must set the LD_LIBRARY_PATH
in your shell environment, e.g.
$ export LD_LIBRARY_PATH=/usr/local/lib
% setenv LD_LIBRARY_PATH /usr/local/lib


5- You can now install CamlTk41.
   make install

This will create /usr/local/lib/objective-caml/camltk41/ (or the equivalent
for your installation of Objective Caml) and copy there the various library
files, as well as Makefile.camltk and ocamltktop, an Objective Caml toplevel
with Tk linked-in.