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