Debian Codegraph @

INSTALL

raw
1 Short summary
2 -------------
3
4 ./configure && make && make install
5 # Optionally: make check, make installcheck
6
7 Requirements
8 ------------
9 Compilation: C header files, optionally libz and libpng header files.
10 Run-time: Optionally ghostscript (for any bitmap output) and
11 optionally one out of netpbm | ImageMagick | Graphicsmagick
12 program packages (to embed various image formats).
13
14
15 Installation under Windows
16 --------------------------
17
18 For compilation under Windows, a rudimentary Makefile is provided in the
19 fig2dev subdirectory. From the commandline, navigate to this subdirectory,
20 and issue the command
21
22 name /f Nmakefile
23
24 For installation, you would manually have to copy the folder i18n/ to the
25 location given in the Nmakefile. Chances are good that fig2dev works to
26 your satisfaction also without these files.
27
28 Requirements
29 ------------
30 At run-time, fig2dev needs ghostscript to convert fig-files to pdf, and
31 ghostscript and one out of the netpbm package, ImageMagick, or
32 GraphicsMagick, to convert to any bitmap file.
33
34
35 Installation under Unix, Linux, Darwin (MacOS)
36 ----------------------------------------------
37
38 To compile and install fig2dev, issue the commands
39
40 ./configure && make && make install
41
42 where "make install" must be given as root.
43 When compiling from the development sources, do
44
45 autoreconf -i
46
47 before giving the three commands above.
48
49 Optionally,
50
51 ./configure; make; make check; make install; make installcheck
52
53 will run tests (make check) with the freshly built executable still at
54 its location in the build tree, and (make installcheck) with the
55 executable installed in its final location.
56
57 The commands above will compile fig2dev and copy the executables fig2dev,
58 fig2ps2tex and pic2tpic to /usr/local/bin. Three man-pages for these
59 binaries are put into /usr/local/man/man1. Furthermore, files which may
60 be needed at runtime are put under /usr/local/share/fig2dev. These are
61 internationalization files, which may be used by the PostScript and all
62 bitmap output languages. They are stored under
63 /usr/local/share/fig2dev/i18n.
64
65
66 Requirements
67 ------------
68
69 Minimum requirement are the C library header files. On debian, these are
70 contained in the
71
72 libc6-dev, linux-libc-dev
73
74 packages. For rpm-based distributions, these packages have the string
75 "-devel-" in their name.
76
77 Optionally, to compress output to Postscript when embedding images in
78 fig files, the zlib header files are needed,
79
80 zlib1g-dev (zlib-devel for rpm).
81
82 To write fig files with embedded png images to PostScript, pdf or any
83 bitmap format, install
84
85 libpng-dev.
86
87
88 To run fig2dev, the packages
89
90 ghostscript, and one out of
91 netpbm | ImageMagick | GraphicsMagick
92
93 are needed to produce various bitmap output formats, or process fig files
94 with embedded images.
95
96
97 Darwin (MacOS)
98 --------------
99 Under Darwin, necessary libraries and header files are often installed
100 in non-standard locations. These locations must be given in the LDFLAGS
101 and CPPFLAGS variables. For instance, with packages installed from
102 macports, try
103
104 ./configure LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include
105
106 or with packages from fink, try
107
108 ./configure LDFLAGS=-L/sw/lib CPPFLAGS=-I/sw/include
109
110
111
112 Options
113 -------
114
115 The configure script and also the make-command can be customized in
116 many ways, either by giving options, e.g., ./configure --prefix=/usr,
117 or by setting variables, e.g., make CC=clang or ./configure CFLAGS=-O2.
118
119 Options relevant for fig2dev are, here given with their default
120 settings, are
121
122 --prefix=/usr/local
123 --bindir=${prefix}/bin
124 --datarootdir=${prefix}/share
125 --mandir=${prefix}/man
126
127 Compilation flags are typically
128
129 CC=gcc CFLAGS='-g -O2' LIBS='-lpng -lz -lm'
130
131 To check where files will be installed, after "./configure && make" try
132
133 make DESTDIR=/tmp/fig2dev install
134
135 This will move the intallation location to /tmp/fig2dev. The file tree under
136 /tmp/fig2dev then shows where files would be installed by "make install",
137
138 ls -R /tmp/fig2dev or tree /tmp/fig2dev
139
140 To get a list of possible features to enable or disable, type
141
142 ./configure --help
143
144 and see the "Optional Features" and "Optional Packages" sections.