1			  INSTALLING gOCR
2
3
4INSTALLING BINARIES
5-------------------
6Be sure that you have all the libraries needed. To install a binary package,
7do the following:
8
91. Unpack the archive if you have not done so already:
10
11	tar -xzf gocr[version].tar.gz
12
13on older tar versions, the above line might not work. If so, try the following:
14
15	gzip -cd gocr[version].tgz | tar -xf -
16
17This creates the directory ./gocr[version] containing the source from
18the main archive.
19
202. Change to gocr directory and run make (use GNU Make).
21
22	cd gocr[version]; make install
23
24That's it.
25
26INSTALLING FROM SOURCE
27----------------------
28
29Requirements
30------------
31You'll need a compiler; we recommend gcc, but the code should compile in any
32good one. gcc is available at http://gcc.gnu.org. I had some problems with gcc
332.95.1 (it consumed a LOT of memory while compiling ocr0.c). 2.95.2 seems to
34be better.
35
36gOCR provides some simple functions to read/write pnm archives. Though not
37needed, we strongly suggest, however, that you install the NetPBM package. Its
38official URL is: http://download.sourceforge.net/netpbm/.
39
40Installing this package will add support to many different image formats.
41If you have a NetPBM version older than August 2000, we suggest that you
42download a more recent one, to take advantage of the new PAM functions.
43
44Depending on your distribution you may use
45  yum install netpbm-devel        # red-hat like
46or
47  apt-get install libnetpbm10-dev # debian like
48to get the necessary netpbm sources.
49
50To create some of the examples provided, you'll need transfig.
51This is completely optional.
52
53Procedure
54---------
551. Unpack the archive if you have not done so already:
56
57	tar -xzf gocr[version].tar.gz
58
59on older tar versions, the above line might not work. If so, try the following:
60
61	gzip -cd gocr[version].tgz | tar -xf -
62
63This creates the directory ./gocr[version] containing the source from
64the main archive.
65
662. Change to gocr directory and run configure.
67
68	cd gocr[version]; ./configure
69
70For a list of options, try ./configure --help.
71If something goes wrong, try to run autoconf.
72
733. Run make (GNU Make). This can take a while.
74
75	make
76
774. gOCR comes with some examples, which are generated from xfig-files.
78   If you have transfig installed, you can make them:
79
80	make examples
81
825. Install the binaries. You may need to do this as root.
83
84	make install
85
866. Run gocr, or the frontend you chose.
87
88	gocr -h			Shows help
89	gocr.tcl		Runs Tcl GUI
90