camlimages / INSTALL.txt

The default branch has multiple heads

Full commit
CamlImages - Objective Caml image processing library

This library is reliable but still under development.

*** Requirements

 To install CamlImages library, you need the following softwares:

        * ocaml 3.11.x or higher
	* findlib (aka ocamlfind,
        * omake (

Note that this is the minimum requirement: you can read/write BMP or
PXM (PPM, PGM, PBM) image formats but no other formats. If you want to
deal with other image formats, you need to install the corresponding
external libraries:

        * libpng for PNG format

        * libjpeg for JPEG format
                The Independent JPEG Group's software

        * libtiff for TIFF format

        * libxpm for XPM format (could be already by the X server installation)
                X contrib libraries ftp directory

        * freetype for drawing texts using truetype fonts
                The FREETYPE Project

        * libungif for GIF format
                Because of the GIF patent problem of Unisys, we do not
                recommend to use GIF file format. If you really want to
                use GIF, do it in your own risk.

                Libungif, a library for using GIFs without compression.

        * ghostscript for PS format

        * lablgtk2, an Objective Caml interface to gtk+

*** Installation procedure by omake

 % yes no | omake --install 
 % omake
 % omake install

*** OLD installation procedure by automake (not supported any more)

 * GNU make
 * automake (1.7.9 does not work. 1.9.6 works)

 Generating build scripts
  This is only needed if you're using CVS version directly.

  * make sure ocaml autoconf macros, available from bazar-ocaml/autoconf
   directory, are present in aclocal macro search path, by any of the following 
   - export ACLOCAL='aclocal -I <directory>' before invoking autoreconf
   - set up a dirlist file in automake macro directory, as explained in aclocal
  * run autoreconf --install


  Just run the standard configure script:
        % ./configure

  If the script can't find some installed external libraries, this is probably
  because they are installed in locations not included in linker or
  preprocessor configuration. You'll have to passe proper flags while running
  configure script:
        %./configure CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib 
        %./configure CFLAGS=-I/sw/include LDFLAGS=-L/sw/lib

  If problems persist, check config.log for failure details.
  The script allow some user configuration. Check help output for details:
        % ./configure --help


        % make

and wait.

  Before you actually install the library, you can check that it
really works, by running examples in the test directory. For the test

        % cd test
        % make
        % ./test
        % ./test.byt

(./test.byt is the bytecode executable and ./test the binary


  If there is no compilation error and the test works fine,
install the library,

        % make install

This installs all the required files into the $(LIBDIR) directory
specified in Makefile.config (usually /usr/local/lib/ocaml/camlimages
or /usr/lib/ocaml/camlimages).

  If you want to create a toplevel with camlimages, type in

        % make top

that creates a toplevel named "customtop". Then,

        % toplevel

executes customtop with the appropriate options.

 Example applications

  In the examples directory you can find several example applications
using Camlimages.

  Some of the programs use the lablgtk GUI (in particular liv and
gifanim): you cannot compile them if the lablgtk library has not
been installed.

  To compile the examples execute:

        % cd examples
        % make