  Installing the RT library


1- Check:

- That Caml-Light 0.5 has been installed in your machine. For example, under
  shell, write: "camlc -v"
- That you have an installation of the X library. A directory /usr/include/X11
  must exist, and a file libX11.a, typically in /lib or in /usr/lib


2- Make the X toolkit library:

First, see where the Caml-Light library has been installed. Is usually resides
in /usr/local/lib/caml-light. If it is not the case, you must run the
make command with adding "LIBDIR=..." where ... is your caml-light library
path.

Then write:
	make
or:
	make LIBDIR=...

This command make the stubs library (in Xlib), named libx.a, then the
rt files (in rt), with a rt library, a toplevel and an example.


3- Try the test:
           ./rt/rtest

A window must appear on your display, with buttons. Try them, try to write
in the text windows.


4- Optionnally, try the examples:
	make examples
or
	make examples LIBDIR=...

then run the examples:

	./examples/xxx/xxx

where xxx is the subdirectories of "examples".



5- To install, become root, if necessary, and write:
	make install
or
	make install BINDIR=... LIBDIR=...

(the default value of BINDIR is /usr/local/bin)

This will create the command "camlrt" (the toplevel), and install the
library "librt.zo" and its interfaces "rt.zi", "rtdef.zi" and "xlib.zi"
and their sources (ending with .mli) in the Caml-Light library ($LIBDIR).

Check the toplevel. For example:

  camlrt
  >       Caml Light version 0.5

  ##open "rt";;
  #let xd = rt_initialize "";;
  xd : xdata = <abstract>
  #let wid = rt_create_widget (xd, "title", "icon",
     ButtonD ("hello", (fun _ -> prerr_endline "hello...")));;
  wid : widget = <abstract>
  #rt_map_widget wid;;
  - : unit = ()
  #rt_main_loop (rt_args [xd]);;
              	(* a window with a button should appear *)
  hello...	(* message printed each time you press the button *)
  hello...
  hello...
  hello...
		(* end by interrupting (control-c, delete...) *)
  Interrupted.
  #quit();;
