Debian Codegraph @

texk/web2c/doc/install.texi

raw
1 @ifclear version
2 @defcodeindex cm
3 @defcodeindex fl
4 @defcodeindex op
5 @end ifclear
6
7 @node Installation
8 @chapter Installation
9
10 @cindex configuration
11 @cindex compilation
12 @cindex installation
13
14 @ifset version
15 (A copy of this chapter is in the distribution file @file{web2c/INSTALL}.)
16 @end ifset
17
18 Installing Web2c is mostly the same as installing any other
19 Kpathsea-using program. Therefore, for the basic steps involved,
20 see @ref{Installation,,, kpathsea, Kpathsea}. (A copy is in the file
21 @file{kpathsea/INSTALL}.)
22
23 One peculiarity to Web2c is that the source distribution comes in two
24 files: @file{web.tar.gz} and @file{web2c.tar.gz}. You must retrieve and
25 unpack them both. (We have two because the former archive contains the
26 very large and seldom-changing original WEB source files.)
27 @xref{unixtex.ftp,,, kpathsea, Kpathsea}.
28
29 @pindex mpost@r{, reason for name change}
30 Another peculiarity is the MetaPost program. Although it has been
31 installed previously as @code{mp}, as of Web2c 7.0 the installed name is
32 now @code{mpost}, to avoid conflict with the @code{mp} program that does
33 prettyprinting. This approach was recommended by the MetaPost author,
34 John Hobby. If you as the @TeX{} administrator wish to make it
35 available under its shorter name as well, you will have to set up a link
36 or some such yourself. And of course individual users can do the same.
37
38 For solutions to common installation problems and information on how to
39 report a bug, see the file @file{kpathsea/BUGS} (@pxref{Bugs,,,
40 kpathsea, Kpathsea}). See also the Web2c home page,
41 @url{http://www.tug.org/web2c}.
42
43 Points worth repeating:
44
45 @itemize @bullet
46 @item
47 @cindex directory structure
48 @cindex basic fonts and macros
49 @cindex fonts, basic
50 @cindex macros, basic
51 Before starting the standard compilation and installation you must
52 install the basic fonts, macros, and other library files.
53 @xref{Installation,,,kpathsea, Kpathsea}.
54
55 @item
56 If you do not wish to use the standard file locations, see @ref{Changing
57 search paths,,, kpathsea, Kpathsea}.
58
59 @item
60 Some Web2c features are enabled or disabled at @code{configure} time,
61 as described in the first section below.
62
63 @end itemize
64
65 @menu
66 * configure options:: Especially --with and --enable.
67 * Compile-time options:: Unusual -D's.
68 * Additional targets:: Breaking down the task.
69 * Triptrap:: Running the torture tests.
70 @end menu
71
72
73 @node configure options
74 @section @code{configure} options
75
76 @cindex configuration, compile-time
77 @cindex compile-time options
78 @pindex configure --with/--enable @r{options}
79 This section gives pointers to descriptions of the @samp{--with} and
80 @samp{--enable} @code{configure} arguments that Web2c accepts. Some are
81 specific to Web2c, others are generic to all Kpathsea-using programs.
82
83 For a list of all the options @code{configure} accepts, run
84 @samp{configure --help}. The generic options are listed first, and the
85 package-specific options come last.
86
87 For a description of the generic options (which mainly allow you to
88 specify installation directories) and basic @code{configure} usage,
89 see @ref{Invoking configure,, Running @code{configure} scripts, autoconf,
90 Autoconf}, a copy is in the file @file{kpathsea/CONFIGURE}.
91
92 @table @samp
93 @item --disable-dump-share
94 Do not make fmt/base/mem files sharable across different endian
95 architectures. @xref{Hardware and memory dumps}.
96
97 @item --without-maketexmf-default
98 @itemx --without-maketexpk-default
99 @itemx --without-maketextfm-default
100 @itemx --with-maketextex-default
101 Enable or disable the dynamic generation programs. @xref{mktex
102 configuration,,, kpathsea, Kpathsea}. The defaults are the inverse of
103 the options, i.e., everything is enabled except @code{mktextex}.
104
105 @item --enable-shared
106 Build Kpathsea as a shared library. @xref{Shared library,,, kpathsea,
107 Kpathsea}.
108
109 @item --with-editor=@var{cmd}
110 Change the default editor invoked by the @samp{e} interactive command.
111 @xref{Editor invocation}.
112
113 @item --with-epsfwin
114 @itemx --with-hp2627win
115 @itemx --with-mftalkwin
116 @itemx --with-nextwin
117 @itemx --with-regiswin
118 @itemx --with-suntoolswin
119 @itemx --with-tektronixwin
120 @itemx --with-unitermwin
121 @itemx --with-x
122 @itemx --with-x-toolkit=KIT
123 @itemx --with-x11win
124 @itemx --with-x11
125 Define Metafont graphics support; by default, no graphics support is
126 enabled. @xref{Online Metafont graphics}.
127
128 @item --x-includes=@var{dir}
129 @itemx --x-libraries=@var{dir}
130 Define the locations of the X11 include files and libraries; by default,
131 @code{configure} does its best to guess). @xref{Optional Features,,,
132 autoconf, Autoconf}. A copy is in @file{kpathsea/CONFIGURE}.
133 @end table
134
135
136 @node Compile-time options
137 @section Compile-time options
138
139 @cindex compile-time options
140 @cindex @samp{#define} options
141 @opindex -D @r{compiler options}
142 In addition to the @code{configure} options listed in the previous
143 section, there are a few things that can be affected at compile-time
144 with C definitions, rather than with @code{configure}. Using any of
145 these is unusual.
146
147 To specify extra compiler flags (@samp{-D@var{name}} in this case), the
148 simplest thing to do is:
149 @example
150 make XCFLAGS="@var{ccoptions}"
151 @end example
152 @noindent You can also set the @code{CFLAGS} environment variable before
153 running @code{configure}. @xref{configure environment,,, kpathsea, Kpathsea}.
154
155 Anyway, here are the possibilities:
156
157 @table @samp
158 @item -DFIXPT
159 @itemx -DNO_MF_ASM
160 @vindex FIXPT
161 @cindex fixed-point arithmetic
162 @cindex floating-point arithmetic
163 @cindex assembly language routines
164 @cindex fraction routines
165 Use the original WEB fixed-point routines for Metafont and MetaPost
166 arithmetic calculations regarding fractions. By default,
167 assembly-language routines are used on x86 hardware with GNU C (unless
168 @samp{NO_MF_ASM} is defined), and floating-point routines are used
169 otherwise.
170
171 @item -DIPC_DEBUG
172 @vindex IPC_DEBUG
173 Report on various interprocess communication activities. @xref{IPC and
174 TeX,, IPC and @TeX{}}.
175 @end table
176
177
178 @node Additional targets
179 @section Additional targets
180
181 @cindex additional Make targets
182 @cindex targets, additional Make
183 @cindex Make targets, additional
184
185 Web2c has several Make targets besides the standard ones. You can invoke
186 these either in the top level directory of the source distribution (the
187 one containing @file{kpathsea/} and @file{web2c/}), or in the
188 @file{web2c/} directory.
189
190 @table @samp
191 @item c-sources
192 @cmindex c-sources @r{Makefile target}
193 @cindex non-Unix system, compiling on
194 Make only the C files, translated from the Web sources, presumably
195 because you want to take them to a non-Unix machine.
196
197 @item formats
198 @itemx install-formats
199 @cmindex formats @r{Make target}
200 @cmindex install-formats @r{Make target}
201 Make or install all the memory dumps (@pxref{Memory dumps}). By
202 default, the standard plain formats plus @file{latex.fmt} are made. You
203 can add other formats by redefining the @code{fmts}, @code{bases}, and
204 @code{mems} variables. See the top of @file{web2c/Makefile} for the
205 possibilities.
206
207 @item fmts
208 @itemx install-fmts
209 @cmindex fmts @r{Make target}
210 @cmindex install-fmts @r{Make target}
211 Make or install the @TeX{} @file{.fmt} files. @xref{Initial TeX}.
212
213 @item bases
214 @itemx install-bases
215 @cmindex bases @r{Make target}
216 @cmindex install-bases @r{Make target}
217
218 Make or install the Metafont @file{.base} files. @xref{Initial Metafont}.
219
220 @item mems
221 @itemx install-mems
222 @cmindex mems @r{Make target}
223 @cmindex install-mems @r{Make target}
224 Make or install the MetaPost @file{.mem} files. @xref{Initial MetaPost}.
225
226 @item triptrap
227 @itemx trip
228 @itemx trap
229 @itemx mptrap
230 @cmindex triptrap @r{Make target}
231 @findex trip @r{Make target}
232 @findex trap @r{Make target}
233 @findex mptrap @r{Make target}
234 To run the torture tests for @TeX{}, Metafont, and MetaPost
235 (respectively). See the next section.
236
237 @end table
238
239
240 @node Triptrap
241 @section Trip, trap, and mptrap: Torture tests
242
243 @cindex Gruff, Billy Goat
244 @cindex trip test
245 @cindex trap test
246 @cindex mptrap test
247 @cindex torture tests
248
249 @flindex tripman.tex
250 @flindex trapman.tex
251 @flindex mptrap.readme
252 To validate your @TeX{}, Metafont, and MetaPost executables, run
253 @samp{make triptrap}. This runs the trip, trap, and mptrap ``torture
254 tests''. See the files @file{triptrap/tripman.tex},
255 @file{triptrap/trapman.tex}, and @file{triptrap/mptrap.readme} for
256 detailed information and background on the tests.
257
258 The differences between your executables' behavior and the standard
259 values will show up on your terminal. The usual differences (these are
260 all acceptable) are:
261
262 @itemize @bullet
263 @item string usage and table sizes;
264 @item glue set ratios;
265 @item @samp{down4}, @samp{right4}, and @samp{y4} commands in DVItype output;
266 @item dates and times.
267 @end itemize
268
269 @noindent Any other differences are trouble. The most common culprit in
270 the past has been compiler bugs, especially when optimizing.
271 @xref{TeX or Metafont failing,, @TeX{} or Metafont failing, kpathsea,
272 Kpathsea}.
273
274 The files @file{trip.diffs}, @file{mftrap.diffs}, and
275 @file{mptrap.diffs} in the @file{triptrap} directory show the standard
276 diffs against the original output. If you diff your diffs against these
277 files, you should come up clean. For example
278 @example
279 make trip >&mytrip.diffs
280 diff triptrap/trip.diffs mytrip.diffs
281 @end example
282
283 To run the tests separately, use the targets @code{trip}, @code{trap},
284 and @code{mptrap}.
285
286 To run simple tests for all the programs as well as the torture tests,
287 run @samp{make check}. You can compare the output to the distributed
288 file @file{tests/check.log} if you like.