-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
160 lines (102 loc) · 4.94 KB
/
INSTALL
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
1- PREREQUISITES
================
DjVuLibre-3.5 relies on various components available from the web.
Most recent Linux distribution already come with these.
You can also download and compile them if you wish.
Be sure to read the system specific notes
at the end of this file.
1.1 - C++ COMPILER
------------------
We strongly suggest to use the well known g++ compiler on all platforms. You
need at least version gcc-2.91.66 (also known as egcs-1.1.2). Development was
achieved using gcc-2.95.3, gcc-2.96-85, gcc-3.02, and gcc-3.2.2.
RedHat 7.x users should make sure they have the latest redhat updates of the
compiler. Early versions of gcc-2.96 have serious bugs. See
<http://www.redhat.com/support/errata/RHBA-2001-082.html>.
1.2 - LIBJPEG/LIBTIFF
---------------------
A small number of DjVu files internally use JPEG encoding instead
of IW44 wavelet encoding. These files are processed using either
version 6a or 6b of the IJG libjpeg library <http://www.ijg.org>.
Some utility programs are able to read TIFF files. These programs
rely on the LIBTIFF library <http://libtiff.org>.
You can also compile DjVuLibre with neither JPEG nor TIFF support.
You might never notice the difference.
1.3 - THREADS
-------------
The DjVu viewer makes heavy use of multiple threads of execution. Modern
Unix operating systems come with the standardized Posix threads.
DjVuLibre-3.5 fully supports detecting and using Posix threads.
For the sake of older operating systems, DjVuLibre-3.5 offers a custom
threading model called CoThreads. This should be considered obsolete.
1.4 - MAKE
----------
There are various kind of "make" programs around with various capabilities.
If you run into problems, get gnu-make !
2- COMPILE
==========
Chances are that everything will work by simply running
commands "configure", "make" and "make install".
2.1- CONFIGURE
-------------
Various options and environment variables affect the execution of the
configuration script. A complete list can be obtained by typing
"configure --help". Here are the most important ones.
* Option "--prefix=PREFIXDIR"
This option specifies where the DjVuLibre software will be installed.
The default prefix is /usr/local.
* Option "--enable-desktopfiles[=(yes|no)]"
Installs the scripts
/usr/share/djvu/osi/desktop/register-djvu-mime
to setup the xdg mime type database and menu entries.
* Options "--with-extra-includes=DIR"
and "--with-extra-libraries=DIR"
This option defines additional directories for
searching include files or libraries.
* Option "--with-jpeg=JPEGDIR"
This option specifies a directory where the JPEG library has been
compiled. This directory contains both the include files and the
library. Without this option, the configuration script will search
the JPEG library in standard places.
When everything else fails, you can simply define the environment
variables JPEG_CFLAGS and JPEG_LIBS.
* Option "--with-tiff=TIFFDIR"
This option specifies a directory where the LIBTIFF library has been
compiled. This directory contains both the include files and the
library. Without this option, the configuration script will search
the LIBTIFF library in standard places.
When everything else fails, you can simply define the environment
variables TIFF_CFLAGS and TIFF_LIBS.
* Option "--enable-threads=(posix|cothread)"
This option specifies which threading model should be used.
Without this option, the configuration script will first
try to detect how to use posix threads and fall back to cothreads.
You can help the search process by defining environment
variables PTHREAD_CFLAGS and PTHREAD_LIBS.
IMPORTANT:
Always check the output of the configuration script for warnings and errors.
In particular, the configuration script might disable the compilation of
djview if it cannot locate the required libraries and utilities. The warning
messages are the only way to know.
2.2- MAKE
---------
You can then perform the compilation by typing
$ make
The compilation can last a few minutes. Again check the output for warnings
and errors. Finally a brief message lets you know that the compilation was
successful. You can then proceed with the installation.
2.2- INSTALL
------------
The installation procedure will:
- install the executable programs into "${prefix}/bin".
- possibly install the shared library "${prefix}/lib/libdjvulibre-3.5.so".
- install the man pages under "${prefix}/man or ${prefix}/share/man".
- install various ancillary files under "${prefix}/share/djvu".
- optionally install information files for desktop environments.
The where ${prefix} refers to the directory specified by the prefix option of
the configuration script. The default prefix is /usr/local.
To perform the installation, simply type :
$ make install
Of course you must have the appropriate permissions to
perform the installation. Chances are that you need to
be root to install something into /usr or /usr/local.