beta-0.89.2
[luatex.git] / source / texk / web2c / doc / install.texi
blobc570b0b0a46ae2d67a603fddfb8f021ae1c6e043
1 @ifclear version
2 @defcodeindex cm
3 @defcodeindex fl
4 @defcodeindex op
5 @end ifclear
7 @node Installation
8 @chapter Installation
10 @cindex configuration
11 @cindex compilation
12 @cindex installation
14 @ifset version
15 (A copy of this chapter is in the distribution file @file{web2c/INSTALL}.)
16 @end ifset
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}.)
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}.
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.
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}.
43 Points worth repeating:
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}.
55 @item
56 If you do not wish to use the standard file locations, see @ref{Changing
57 search paths,,, kpathsea, Kpathsea}.
59 @item
60 Some Web2c features are enabled or disabled at @code{configure} time,
61 as described in the first section below.
63 @end itemize
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 * Runtime options::             Array sizes and the like.
71 @end menu
74 @node configure options
75 @section @code{configure} options
77 @cindex configuration, compile-time
78 @cindex compile-time options
79 @pindex configure --with/--enable @r{options}
80 This section gives pointers to descriptions of the @samp{--with} and
81 @samp{--enable} @code{configure} arguments that Web2c accepts.  Some are
82 specific to Web2c, others are generic to all Kpathsea-using programs.
84 For a list of all the options @code{configure} accepts, run
85 @samp{configure --help}.  The generic options are listed first, and the
86 package-specific options come last.
88 For a description of the generic options (which mainly allow you to
89 specify installation directories) and basic @code{configure} usage,
90 see @ref{Invoking configure,, Running @code{configure} scripts, autoconf,
91 Autoconf}, a copy is in the file @file{kpathsea/CONFIGURE}.
93 @table @samp
94 @item --disable-dump-share
95 Do not make fmt/base/mem files sharable across different endian
96 architectures.  @xref{Hardware and memory dumps}.
98 @item --without-maketexmf-default
99 @itemx --without-maketexpk-default
100 @itemx --without-maketextfm-default
101 @itemx --with-maketextex-default
102 Enable or disable the dynamic generation programs.  @xref{mktex
103 configuration,,, kpathsea, Kpathsea}.  The defaults are the inverse of
104 the options, i.e., everything is enabled except @code{mktextex}.
106 @item --enable-shared
107 Build Kpathsea as a shared library.  @xref{Shared library,,, kpathsea,
108 Kpathsea}.
110 @item --with-editor=@var{cmd}
111 Change the default editor invoked by the @samp{e} interactive command.
112 @xref{Editor invocation}.
114 @item --with-epsfwin
115 @itemx --with-hp2627win
116 @itemx --with-mftalkwin
117 @itemx --with-nextwin
118 @itemx --with-regiswin
119 @itemx --with-suntoolswin
120 @itemx --with-tektronixwin
121 @itemx --with-unitermwin
122 @itemx --with-x
123 @itemx --with-x-toolkit=KIT
124 @itemx --with-x11win
125 @itemx --with-x11
126 Define Metafont graphics support; by default, no graphics support is
127 enabled.  @xref{Online Metafont graphics}.
129 @item --x-includes=@var{dir}
130 @itemx --x-libraries=@var{dir}
131 Define the locations of the X11 include files and libraries; by default,
132 @code{configure} does its best to guess).  @xref{Optional Features,,,
133 autoconf, Autoconf}.  A copy is in @file{kpathsea/CONFIGURE}.
134 @end table
137 @node Compile-time options
138 @section Compile-time options
140 @cindex compile-time options
141 @cindex @samp{#define} options
142 @opindex -D @r{compiler options}
143 In addition to the @code{configure} options listed in the previous
144 section, there are a few things that can be affected at compile-time
145 with C definitions, rather than with @code{configure}.  Using any of
146 these is unusual.
148 To specify extra compiler flags (@samp{-D@var{name}} in this case), the
149 simplest thing to do is:
150 @example
151 make XCFLAGS="@var{ccoptions}"
152 @end example
153 @noindent You can also set the @code{CFLAGS} environment variable before
154 running @code{configure}.  @xref{configure environment,,, kpathsea, Kpathsea}.
156 Anyway, here are the possibilities:
158 @table @samp
159 @item -DFIXPT
160 @itemx -DNO_MF_ASM
161 @vindex FIXPT
162 @cindex fixed-point arithmetic
163 @cindex floating-point arithmetic
164 @cindex assembly language routines
165 @cindex fraction routines
166 Use the original WEB fixed-point routines for Metafont and MetaPost
167 arithmetic calculations regarding fractions.  By default,
168 assembly-language routines are used on x86 hardware with GNU C (unless
169 @samp{NO_MF_ASM} is defined), and floating-point routines are used
170 otherwise.
172 @item -DIPC_DEBUG
173 @vindex IPC_DEBUG
174 Report on various interprocess communication activities.  @xref{IPC and
175 TeX,, IPC and @TeX{}}.
176 @end table
179 @node Additional targets
180 @section Additional targets
182 @cindex additional Make targets
183 @cindex targets, additional Make
184 @cindex Make targets, additional
186 Web2c has several Make targets besides the standard ones.  You can invoke
187 these either in the top level directory of the source distribution (the
188 one containing @file{kpathsea/} and @file{web2c/}), or in the
189 @file{web2c/} directory.
191 @table @samp
192 @item c-sources
193 @cmindex c-sources @r{Makefile target}
194 @cindex non-Unix system, compiling on
195 Make only the C files, translated from the Web sources, presumably
196 because you want to take them to a non-Unix machine.
198 @item formats
199 @itemx install-formats
200 @cmindex formats @r{Make target}
201 @cmindex install-formats @r{Make target}
202 Make or install all the memory dumps (@pxref{Memory dumps}).  By
203 default, the standard plain formats plus @file{latex.fmt} are made.  You
204 can add other formats by redefining the @code{fmts}, @code{bases}, and
205 @code{mems} variables.  See the top of @file{web2c/Makefile} for the
206 possibilities.
208 @item fmts
209 @itemx install-fmts
210 @cmindex fmts @r{Make target}
211 @cmindex install-fmts @r{Make target}
212 Make or install the @TeX{} @file{.fmt} files. @xref{Initial TeX}.
214 @item bases
215 @itemx install-bases
216 @cmindex bases @r{Make target}
217 @cmindex install-bases @r{Make target}
219 Make or install the Metafont @file{.base} files.  @xref{Initial Metafont}.
221 @item mems
222 @itemx install-mems
223 @cmindex mems @r{Make target}
224 @cmindex install-mems @r{Make target}
225 Make or install the MetaPost @file{.mem} files.  @xref{Initial MetaPost}.
227 @item triptrap
228 @itemx trip
229 @itemx trap
230 @itemx mptrap
231 @cmindex triptrap @r{Make target}
232 @findex trip @r{Make target}
233 @findex trap @r{Make target}
234 @findex mptrap @r{Make target}
235 To run the torture tests for @TeX{}, Metafont, and MetaPost
236 (respectively).  See the next section.
238 @end table
241 @node Triptrap
242 @section Trip, trap, and mptrap: Torture tests
244 @cindex Gruff, Billy Goat
245 @cindex trip test
246 @cindex trap test
247 @cindex mptrap test
248 @cindex torture tests
250 @flindex tripman.tex
251 @flindex trapman.tex
252 @flindex mptrap.readme
253 To validate your @TeX{}, Metafont, and MetaPost executables, run
254 @samp{make triptrap}.  This runs the trip, trap, and mptrap ``torture
255 tests''.  See the files @file{triptrap/tripman.tex},
256 @file{triptrap/trapman.tex}, and @file{triptrap/mptrap.readme} for
257 detailed information and background on the tests.
259 The differences between your executables' behavior and the standard
260 values will show up on your terminal.  The usual differences (these are
261 all acceptable) are:
263 @itemize @bullet
264 @item string usage and table sizes;
265 @item glue set ratios;
266 @item @samp{down4}, @samp{right4}, and @samp{y4} commands in DVItype output;
267 @item dates and times.
268 @end itemize
270 @noindent Any other differences are trouble. The most common culprit in
271 the past has been compiler bugs, especially when optimizing.
272 @xref{TeX or Metafont failing,, @TeX{} or Metafont failing, kpathsea,
273 Kpathsea}.
275 The files @file{trip.diffs}, @file{mftrap.diffs}, and
276 @file{mptrap.diffs} in the @file{triptrap} directory show the standard
277 diffs against the original output.  If you diff your diffs against these
278 files, you should come up clean.  For example
279 @example
280 make trip >&mytrip.diffs
281 diff triptrap/trip.diffs mytrip.diffs
282 @end example
284 To run the tests separately, use the targets @code{trip}, @code{trap},
285 and @code{mptrap}.
287 To run simple tests for all the programs as well as the torture tests,
288 run @samp{make check}.  You can compare the output to the distributed
289 file @file{tests/check.log} if you like.
292 @node Runtime options
293 @section Runtime options
295 @cindex runtime options
297 @cindex configuration file values
298 @cindex array sizes
299 Besides the configure- and compile-time options described in the
300 previous sections, you can control a number of parameters (in
301 particular, array sizes) in the @file{texmf.cnf} runtime file read by
302 Kpathsea (@pxref{Config files,,, kpathsea, Kpathsea}).
304 Rather than exhaustively listing them here, please see the last section
305 of the distributed @file{kpathsea/texmf.cnf}.  Some of the more
306 interesting values:
308 @vtable @samp
309 @item main_memory
310 Total words of memory available, for @TeX{}, Metafont, and MetaPost.
311 Must remake the format file after changing.
313 @item extra_mem_bot
314 @cindex boxes, memory for
315 @cindex glue, memory for
316 @cindex breakpoints, memory for
317 @cindex PiC@TeX{}, increasing memory for
318 Extra space for ``large'' @TeX{} data structures: boxes, glue,
319 breakpoints, et al.  If you use PiC@TeX{}, you may well want to set this.
321 @item font_mem_size
322 @cindex TFM files, memory for
323 Words of font info available for @TeX{}; this is approximately the total
324 size of all TFM files read.
326 @item hash_extra
327 @cindex control sequence names, space for
328 @cindex hash table, increasing size of
329 Additional space for the hash table of control sequence names.
330 Approximately 10,000 control sequences can be stored in the main hash
331 table; if you have a large book with numerous cross-references, 
332 this might not be enough, and thus you will want to set @code{hash_extra}.
334 @end vtable
336 @cindex array limit, fixed
337 @cindex swap space, as array limit
338 @cindex reallocation of arrays
339 @cindex dynamic array allocation
340 Of course, ideally all arrays would be dynamically expanded as
341 necessary, so the only limiting factor would be the amount of swap space
342 available.  Unfortunately, implementing this is extremely difficult, as
343 the fixed size of arrays is assumed in many places throughout the source
344 code.  These runtime limits are a practical compromise between the
345 compile-time limits in previous versions, and truly dynamic arrays.  (On
346 the other hand, the Web2c Bib@TeX{} implementation does do dynamic
347 reallocation of some arrays.)