Contents in 1999-06-04-13 of release-21-2.
[chise/xemacs-chise.git.1] / INSTALL
1 XEmacs Installation Guide
2 Copyright (c) 1994, 1995, 1996 Board of Trustees, University of Illinois
3 Copyright (c) 1994 Free Software Foundation, Inc.
4
5 Synched up with: FSF 19.30.
6
7    Permission is granted to anyone to make or distribute verbatim copies
8    of this document as received, in any medium, provided that the
9    copyright notice and permission notice are preserved,
10    and that the distributor grants the recipient permission
11    for further redistribution as permitted by this notice.
12
13    Permission is granted to distribute modified versions
14    of this document, or of portions of it,
15    under the above conditions, provided also that they
16    carry prominent notices stating who last changed them,
17    and that any new or changed statements about the activities
18    of the Free Software Foundation are approved by the Foundation.
19
20
21 BUILDING AND INSTALLATION (Unix and Cygwin, see the file nt/README
22 for instructions on building under Microsoft Windows):
23
24 1) Make sure your system has enough swapping space allocated to handle
25    a program whose pure code is 900k bytes and whose data area is at
26    least 400k and can reach 8Mb or more.  If the swapping space is
27    insufficient, you will get an error in the command `temacs -batch
28    -l loadup dump', found in `./src/Makefile.in.in', or possibly when
29    running the final dumped XEmacs.
30
31 Building XEmacs requires about 41 Mb of disk space (including the
32 XEmacs sources).  Once installed, XEmacs occupies about 16 Mb in the
33 file system where it is installed; this includes the executable files,
34 Lisp libraries, miscellaneous data files, and on-line documentation.
35 The amount of storage of the Lisp directories may be reduced by
36 compressing the .el files. If the building and installation take place
37 in different directories, then the installation procedure temporarily
38 requires 41+16 Mb.  Adjust this value upwards depending upon what
39 additional Lisp support is installed.
40
41 XEmacs requires an ANSI C compiler, such as GCC.  If you wish to build
42 the documentation yourself, you will need at least version 1.68 of
43 makeinfo (GNU texinfo-3.11).
44
45
46 2) Decide on what other software packages you would like to use with
47 XEmacs, but are not yet available on your system.  On some systems,
48 Motif and CDE are optional additions.  On Solaris, the SUNWaudmo
49 package enables native sound support.  There are also a number of free
50 software packages that XEmacs can use.  If these are not yet available
51 on your system, obtain, build and install those external packages
52 before building XEmacs.  The packages XEmacs can use are:
53
54    Xaw3d, XPM, JPEG, compface, PNG, zlib, GNU DBM, Berkeley DB, socks,
55    term, NAS, Canna, Kinput2, SJ3, Wnn.
56
57 You can get (most of) them from the XEmacs ftp site at
58 ftp://ftp.xemacs.org/pub/xemacs/aux
59
60 If you want users on other systems to be able to use the XEmacs you
61 have built, try to build those packages so that the generated
62 libraries are statically linked.
63
64 Use the --site-includes and --site-libraries options when building
65 XEmacs to allow configure to find the external software packages.
66 If you link with dynamic (``.so'') external package libraries, which
67 is not recommended, you will also need to add the library directories
68 to the --site-runtime-libraries option.
69
70
71 3) Decide what Initial Lisp you need with XEmacs.  XEmacs is
72 distributed separately from most of its runtime environment.  This is
73 done to make it easier for administrators to tune an installation for
74 what the local users need.  See the file etc/PACKAGES for an overview
75 of what is available and which packages need to be installed prior to
76 building XEmacs.  At this point you only need a minimum to get started
77 at which point you may install what you wish without further changes
78 to the XEmacs binary.  A sample minimum configuration for a Linux
79 system using Mule and Wnn6 from OMRON corporation would be the
80 packages `mule-base' and `egg-its'.  By default, packages will be
81 searched for in the path
82
83 ~/.xemacs::$prefix/lib/xemacs-${version}/mule-packages:$prefix/lib/xemacs/mule-packages:$prefix/lib/xemacs-${version}/xemacs-packages:$prefix/lib/xemacs/xemacs-packages
84
85 This may be changed by specifying a different value with the
86 --package-path configuration option.
87
88 4) In the top level directory of the XEmacs distribution, run the
89    program `configure' as follows:
90
91     ./configure [CONFIGURATION-NAME] [--OPTION[=VALUE]] ...
92
93 Almost always, you should let `configure' (actually the shell script
94 `config.guess') guess your host type, by omitting the
95 CONFIGURATION-NAME argument.  If you like to experiment, specify a
96 configuration name in the form MACHINE-VENDOR-OPSYS, for example:
97
98 sparc-sun-solaris2.6
99
100 See config.guess and configure.in for valid values for MACHINE,
101 VENDOR, and OPSYS.  Also check `./etc/MACHINES' for advice on building
102 on particular machines.
103
104 If you don't want X support, specify `--without-x'.  If you omit this
105 option, `configure' will try to autodetect whether your system has X,
106 and arrange to use it if present.
107
108 The `--x-includes=DIR' and `--x-libraries=DIR' options tell the build
109 process where the compiler should look for the include files and
110 object libraries used with the X Window System.  Normally, `configure'
111 is able to find them; these options are necessary if you have your X
112 Window System files installed in unusual places.
113
114 The `--site-includes=DIR' and `--site-libraries=DIR' options allow you
115 to specify additional places the compiler should look for include
116 files and object libraries.  You may specify multiple DIR's by
117 enclosing the list in quotes.  All the external packages you want to
118 use with XEmacs (e.g. xpm, wnn, ...) described later should have their
119 include and library directories defined using these options.
120
121 The `--site-runtime-libraries=DIR' option specifies directories to
122 search for shared libraries at run time.  This may be necessary if you
123 link with dynamic libraries that are installed in non-standard
124 directories, or if you expect some of the libraries used to build
125 XEmacs to be in a different directory at run time than at build time.
126 Usually this will add a `-R' to each directory specified and use that
127 when linking XEmacs.  If you use this option, you must specify ALL of
128 the directories containing shared libraries at run time, including
129 system directories.
130
131 Rationale: Some people think that directories in --site-libraries
132 should be automatically used to update --site-runtime-libraries.
133 Here's a real-life scenario that explains why this is not done: You
134 build binaries for your company using static libs in
135 /net/toy/hack/lib.  XEmacs adds /net/toy/hack/lib to the runpath of
136 the executable you've built.  Since there are only static libs there,
137 the system runtime loader will look in this dir, and ignore it,
138 causing only a .01 second delay in starting XEmacs.  You leave the
139 company for a job at a small Silicon Valley startup.  Time passes.
140 The next guy who inherits your machine objects to working on a machine
141 named `toy', and gets the sysadmin to rename the machine `godzilla'.
142 The SA forgets to remove the old entry for `toy' from the hosts file.
143 Now the system loader will still try to access /net/toy/, and the
144 automounter will hang trying to access /net/toy.  XEmacs suddenly
145 takes 30 seconds longer to start up, no one can figure out why, and
146 everyone at your old company curses your name, thinking that you've
147 put a time bomb into XEmacs.  And they're right!
148
149 The `--with-gcc' option specifies that the build process should
150 compile XEmacs using GCC.  The `--compiler' option allows you to
151 specify some other compiler to be used to compile XEmacs.  If neither
152 option is specified, the environment variable CC is used instead.
153 Otherwise the compiler will then default to 'cc'.
154
155 The `--cflags' option specifies the CFLAGS the build process should
156 use when compiling XEmacs.  Otherwise the value of the environment
157 variable CFLAGS is consulted.  If that is also undefined, CFLAGS
158 defaults to "-g -O" for gcc and "-g" for all other compilers.
159
160 The `--dynamic' option specifies that configure should try to link
161 emacs dynamically rather than statically.
162
163 The `--const-is-losing' option is for use if you have trouble
164 compiling due to the `const' storage class in C.  This is defined by
165 default.  Most users should have no need to change this.
166
167 You can build XEmacs for several different machine types from a single
168 source directory.  To do this, you must use a version of `make' that
169 supports the `VPATH' variable, such as GNU `make'.  Make separate
170 build directories for the different configuration types, and in each
171 one, run the XEmacs `configure' script.  `configure' looks for the
172 Emacs source code in the directory that `configure' is in.
173
174 The `--prefix=PREFIXDIR' option specifies where the installation process
175 should put XEmacs and its data files.  This defaults to `/usr/local'.
176 - XEmacs (and the other utilities users run) go in PREFIXDIR/bin
177   (unless the `--exec-prefix' option says otherwise).
178 - The architecture-independent files go in PREFIXDIR/lib/xemacs-VERSION
179   (where VERSION is the version number of XEmacs, like `21.0').
180 - The architecture-dependent files go in
181   PREFIXDIR/lib/xemacs-VERSION/CONFIGURATION-NAME
182   (where CONFIGURATION-NAME is the host type, like mips-dec-ultrix4.2),
183   unless the `--exec-prefix' option says otherwise.
184
185 The `--exec-prefix=EXECDIR' option allows you to specify a separate
186 portion of the directory tree for installing architecture-specific
187 files, like executables and utility programs.  If specified,
188 - XEmacs (and the other utilities users run) go in EXECDIR/bin, and
189 - The architecture-dependent files go in
190   EXECDIR/lib/xemacs-VERSION/CONFIGURATION-NAME.
191 EXECDIR/bin should be a directory that is normally in users' PATHs.
192
193 For example, the command
194
195     ./configure mips-dec-ultrix --with-x11=yes
196
197 configures XEmacs to build for a DECstation running Ultrix, with
198 support for the X11 window system.
199
200 The `--with-menubars=TYPE' option allows you to specify which X
201 toolkit you wish to use for the menubar.  The valid options are
202 `lucid', `motif' and `no'.  The default is `lucid' which is a
203 Motif-lookalike menubar.  We highly recommend its usage over the real
204 Motif menubar. (In fact, the Motif menubar is currently broken.)  If
205 `no' is specified then support for menubars will not be compiled in.
206
207 The `--with-scrollbars=TYPE' option allows you to specify which X
208 toolkit you wish to use for the scrollbars.  The valid options are
209 `lucid', `motif', `athena', `athena3d', and `no'.  The default is
210 `lucid' which is a Motif-lookalike scrollbar.  If `no' is specified
211 then support for scrollbars will not be compiled in.
212
213 The `--with-dialogs=TYPE' option allows you to specify which X toolkit
214 you wish to use for the dialog boxes.  The valid options are `athena',
215 `athena3d', `motif, and `no.  The `lucid' option is accepted and will
216 result in the `athena' toolkit being used.  If the Motif toolkit can be
217 found the default is `motif'.  Otherwise, the default is `athena'.  If
218 `no' is specified then support for dialog boxes will not be compiled
219 in.
220
221 The `--with-toolbars' option allows you to enable or disable toolbar
222 support.  The default is `yes' as long as support for a windowing
223 system is included.
224
225 The `--with-xpm' option specifies that XEmacs should support X11
226 Pixmaps.  `configure' will attempt to detect if you have the Xpm
227 libraries and define `--with-xpm' for you.
228
229 The `--with-xface' option specifies that XEmacs should support
230 X-Faces.  `configure' will attempt to detect if you have the compface
231 library and define `--with-xface' for you.
232
233 The `--with-database' option specifies that XEmacs should be built
234 with additional database support.  The valid options are `no' or a
235 comma-separated list of one or more of `dbm', `gnudbm' or `berkdb'.
236 `configure' will attempt to detect the necessary libraries and header
237 files and define `--with-database' for you.
238
239 The `--with-socks' option specifies that XEmacs should be built with
240 SOCKS support.  This requires the libsocks library.
241
242 The `--with-tooltalk' option specifies that XEmacs should be built
243 with ToolTalk support for interconnecting with other applications.
244 ToolTalk is not yet supported on all architectures.  If you use this
245 option, you should have the tooltalk package (see etc/PACKAGES)
246 installed prior to building XEmacs.
247
248 The `--with-sparcworks' option specifies that XEmacs should be built
249 with support for Sun Sparcworks 3.0.1 and up (including Sun WorkShop).
250 This functionality is only of use on SunOS 4.1.x and Solaris 2.x
251 systems.  If you use this option, you should have the Sun package (see
252 etc/PACKAGES) installed prior to building XEmacs.
253
254 The `--with-cde' option allows you to enable or disable CDE drag and
255 drop support.  `configure' will attempt to detect this option and
256 define `--with-cde' for you.
257
258 The `--with-offix' option allows you to enable or disable OffiX drag
259 and drop support.  This requires no external library support, so if
260 X11 support is available, then this option defaults to `yes'.  OffiX
261 support can be explicitly disabled via the `--with-offix=no' option.
262
263 The `--external-widget' option specifies that XEmacs should be built
264 with support for being used as a widget by other X11 applications.
265 This functionality should be considered beta.
266
267 The `--without-xmu' option can be used if your vendor doesn't ship
268 the Xmu library.
269
270 The `--puresize' option can be used to change the amount of purespace
271 allocated for the dumped XEmacs.  As of XEmacs 20.1 usage of this
272 parameter is deprecated and will be ignored.
273
274 The `--with-sound=TYPE' option specifies that XEmacs should be built
275 with sound support.  Native (`--with-sound=native') sound support is
276 currently available only on Sun SparcStations, SGI's, HP9000s, and
277 systems (such as Linux) with soundcard.h.  Network Audio Support (NAS)
278 (`--with-sound=nas' or `--with-sound=both') is an extension to X that
279 you may or may not have for your system.  For NAS, you will probably
280 need to provide the paths to the nas include and library directories
281 to configure.  If `--with-sound' is not specified, `configure' will
282 attempt to determine if your configuration supports native sound and
283 define --with-sound for you.  If your native sound library is not in a
284 standard location you can specify it with the `--native-sound-lib=LIB'
285 flag.  For Linux, `/dev/audio' is required for SunAudio files and
286 `/dev/dsp' is required for raw data and WAVE format files.
287
288 The `--rel-alloc' option can be used to either enable or disable use
289 of the relocating allocator.  Turning on --rel-alloc will allow XEmacs
290 to return unused memory to the operating system, thereby reducing its
291 memory footprint.  However, it may make XEmacs runs more slowly,
292 especially if your system's `mmap' implemntation is missing or
293 inefficient.  Generally, it's best to go with the default
294 configuration for your system.  You can tweak this based on how you
295 use XEmacs, and the memory and cpu resources available on your system.
296
297 The `--use-system-malloc' option can be use to either enable or
298 disable use of the system malloc.  Generally, it's best to go with the
299 default configuration for your system.  Note that on many systems
300 using the system malloc disables the use of the relocating allocator.
301
302 The `--use-debug-malloc' option can be used to link a special debugging
303 version of malloc.  Debug Malloc is not included with XEmacs, is
304 intended for use only by the developers and may be obtained from
305 <URL:http://www.letters.com/dmalloc/>.
306
307 The `--debug' and `--error-checking' options are intended for use only
308 by the developers.  `--debug' adds code to be compiled in for
309 performing various tests.  `--error-checking' adds additional tests to
310 many of the commonly used macros.
311
312 The `--verbose' and `--extra-verbose' options are intended for use
313 only by the developers.  `--verbose' causes the results of all
314 configure tests to be displayed.  `--extra-verbose' displays
315 additional information, useful for debugging.  Another help for
316 determining configure failures is the file `config.log', which
317 contains the results of the compile and link tests used by configure.
318
319 The `--with-mule' option enables (MUlti-Lingual Emacs) support, needed
320 to suport non-Latin-1 (including Asian) languages.  The Mule support
321 is not yet as stable or efficient as the `Latin1' support.   Enabling
322 Mule support requires the mule-base package installed prior to
323 building XEmacs.  The following options require Mule support:
324
325 The `--with-xim' option enables use of the X11 XIM mechanism to allow
326 an input method to input text into XEmacs.  The input method is shared
327 among all the X applications sharing an X display and using the same
328 language.  The XIM support comes in two flavors: `motif' and `xlib'.
329 The Motif support (the XmIm* functions) is preferred when available.
330 The xlib XIM support works reasonably well so long as the X11 libraries
331 are recent enough.  It has been fairly well tested on Linux with glibc
332 2.0.5 and 2.0.6 and Kinput2 as an XIM server.  In this configuration
333 X11 must be recompiled with X_LOCALE defined because glibc is lacking
334 localization for Japanese.  The XIM support defaults to `no' except
335 when Motif is detected where it is stable with OSF libraries.  The XIM
336 support in Lesstif (a Free Motif replacement) does not work as of
337 v0.82.  If you enable this option, you will probably wish to install
338 the `locale' package which contains localized Splash screens and
339 Menubars.
340
341 The `--with-xfs' option enables use of a multilingual Menubar.  At the
342 present time, only Japanese and French locales are supported.  In
343 order to use a multilingual Menubar you must have the `locale' package
344 installed.  The `locale' package does not have to be installed when
345 building XEmacs.
346
347 The `--with-canna' option enables the use of the Canna Japanese input
348 method.  This is stable code and fairly well tested.  In order to use
349 it, you will have to have the Canna server installed and running.
350 Canna versions 3.2pl2 and 3.5b2 are known to work.  Version 3.2pl2 is
351 considered most stable than version 3.5b2.  If Canna is already
352 installed, configure will autodetect it, so you never need to
353 explicitly use this option unless your Canna libraries are somewhere
354 strange.  Canna run time support is currently bundled with the
355 `mule-base' package so there is nothing additional to install in order
356 to use it.
357
358 The `--with-wnn' and `--with-wnn6' options are for compiling with the Wnn
359 multi-language input method.  `--with-wnn' is for compiling with Wnn-4.2,
360 the Free version of WNN.  `--with-wnn6' is for compiling against WNN6,
361 the commercial version of WNN available from OMRON Corporation.  This is
362 stable code and fairly well tested.  In order to build with this
363 option, you will need to have the `egg-its' lisp package already
364 installed.
365
366 Please note that it is safe to build with as many of the options
367 `--with-xim', `--with-canna' and `--with-wnn' as your system
368 supports.
369
370 `configure' doesn't do any compilation or installation itself.  It
371 just creates the files that influence those things: `./src/config.h',
372 and all the Makefile's in the build tree.
373
374 The `--with-pop', `--with-hesiod', and `--with-kerberos' options are used
375 in conjunction with movemail.  As of XEmacs 20.1, movemail is identical
376 to the one used in Emacs.
377
378 When it is done, `configure' prints a description of what it did and
379 creates a shell script `config.status' which, when run, recreates the
380 same configuration.  If `configure' exits with an error after
381 disturbing the status quo, it removes `config.status'.
382
383 4) Look at `./lisp/paths.el'; if some of those values are not right
384 for your system, set up the file `./lisp/site-init.el' with XEmacs
385 Lisp code to override them; it is not a good idea to edit paths.el
386 itself.  YOU MUST USE THE LISP FUNCTION `setq' TO ASSIGN VALUES,
387 rather than `defvar', as used by `./lisp/paths.el'.  For example,
388
389      (setq news-inews-program "/usr/bin/inews")
390
391 is how you would override the default value of the variable
392 news-inews-program (which is "/usr/local/inews").
393
394 Before you override a variable this way, *look at the value* that the
395 variable gets by default!  Make sure you know what kind of value the
396 variable should have.  If you don't pay attention to what you are
397 doing, you'll make a mistake.
398
399 Things may malfunction if the variable `directory-abbrev-alist' is not
400 set up to translate "temporary" automounter mount points into the
401 canonical form.  XEmacs tries to detect how your automounter is
402 configured.  If you have an unusual automounter configuration that
403 XEmacs cannot detect, you may need to change the value of
404 `directory-abbrev-alist'.
405
406 5) Put into `./lisp/site-init.el' or `./lisp/site-load.el' any Emacs
407 Lisp code you want XEmacs to load before it is dumped out.  Use
408 site-load.el for additional libraries if you arrange for their
409 documentation strings to be in the lib-src/DOC file (see
410 src/Makefile.in.in if you wish to figure out how to do that).  For all
411 else, use site-init.el.
412
413 If you set load-path to a different value in site-init.el or
414 site-load.el, XEmacs will use *precisely* that value when it starts up
415 again.  If you do this, you are on your own!
416
417 Note that, on some systems, the code you place in site-init.el must
418 not use expand-file-name or any other function which may look
419 something up in the system's password and user information database.
420 See `./PROBLEMS' for more details on which systems this affects.
421
422 The `site-*.el' files are nonexistent in the distribution.  You do not
423 need to create them if you have nothing to put in them.
424
425 6) Refer to the file `./etc/TERMS' for information on fields you may
426 wish to add to various termcap entries.  The files `./etc/termcap.ucb'
427 and `./etc/termcap.dat' may already contain appropriately-modified
428 entries.
429
430 7) Run `make' in the top directory of the XEmacs distribution to finish
431 building XEmacs in the standard way.  The final executable file is
432 named `src/emacs'.  You can execute this file "in place" without
433 copying it, if you wish; then it automatically uses the sibling
434 directories ../lisp, ../lib-src, ../info.
435
436 Or you can "install" the executable and the other XEmacs into their
437 installed locations, with `make install'.  By default, XEmacs's files
438 are installed in the following directories:
439
440 By default, XEmacs installs its files in the following directories:
441
442 `/usr/local/bin' holds the executable programs users normally run -
443                 `xemacs', `etags', `ctags', `b2m', `emacsclient', `ellcc',
444                 `gnuclient', `gnudoit', `gnuattach', and `rcs-checkin'.
445
446 `/usr/local/lib/xemacs-VERSION/lisp' holds the Emacs Lisp libraries;
447                 `VERSION' stands for the number of the XEmacs version
448                 you are installing, like `18.59' or `19.14'.  Since
449                 the lisp libraries change from one version of XEmacs to
450                 another, including the version number in the path
451                 allows you to have several versions of XEmacs installed
452                 at the same time; this means that you don't have to
453                 make XEmacs unavailable while installing a new version.
454
455                 XEmacs searches for its lisp files in these
456                 directories, and then in
457                 `/usr/local/lib/xemacs/site-lisp/*'.
458
459 `/usr/local/lib/xemacs-VERSION/etc' holds the XEmacs tutorial, the
460                 `yow' database, and other architecture-independent
461                 files XEmacs might need while running.  VERSION is as
462                 specified for `.../lisp'.
463
464 `/usr/local/lib/xemacs/lock' contains files indicating who is
465                 editing what, so XEmacs can detect editing clashes
466                 between users.
467
468 `/usr/local/lib/xemacs-VERSION/CONFIGURATION-NAME' contains executable
469                 programs used by XEmacs that users are not expected to
470                 run themselves, and the DOC file. `VERSION' is the
471                 number of the XEmacs version you are installing, and
472                 `CONFIGURATION-NAME' is the host type of your system.
473                 Since these files are specific to the version of
474                 XEmacs, operating system, and architecture in use,
475                 including the configuration name in the path allows
476                 you to have several versions of XEmacs for any mix of
477                 machines and operating systems installed at the same
478                 time; this is useful for sites at which different
479                 kinds of machines share the file system XEmacs is
480                 installed on.
481
482 `/usr/local/lib/xemacs-VERSION/CONFIGURATION-NAME/modules' holds the Emacs
483                 dynamically loadable modules.  These are special programs
484                 typically written in C that can be loaded in much the same
485                 way that Lisp packages are.  Not all systems support
486                 dynamic modules, so do not be alarmed if this directory
487                 does not exist or is empty.
488
489                 XEmacs searches for modules in this directory, or any
490                 sub-directory of it, and then in
491                 `/usr/local/lib/xemacs/site-modules/*'.
492
493 `/usr/local/lib/xemacs-VERSION/info' holds the on-line documentation
494                 for XEmacs, known as "info files".
495
496 `/usr/local/man/man1' holds the man pages for the programs installed
497                 in `/usr/local/bin'.
498
499 If these directories are not what you want, you can specify where to
500 install XEmacs's libraries and data files or where XEmacs should search
501 for its lisp files by giving values for `make' variables as part of
502 the command.  See the section below called `MAKE VARIABLES' for more
503 information on this.
504
505 Using GNU Make allows for simultaneous builds with and without the
506 --srcdir option.
507
508 8) If your system uses lock files to interlock access to mailer inbox files,
509 then you might need to make the movemail program setuid or setgid
510 to enable it to write the lock files.  We believe this is safe.
511 The setuid/setgid bits need not be set on any other XEmacs-related
512 executables.
513
514 9) You are done with the hard part!  You can remove executables and
515 object files from the build directory by typing `make clean'.  To also
516 remove the files that `configure' created (so you can compile XEmacs
517 for a different configuration), type `make distclean'.
518
519 10) You should now go to the XEmacs web page at http://www.xemacs.org/
520 and decide what additional Lisp support you wish to have.
521
522 MAKE VARIABLES
523
524 You can change where the build process installs XEmacs and its data
525 files by specifying values for `make' variables as part of the `make'
526 command line.  For example, if you type
527
528     make install bindir=/usr/local/gnubin
529
530 the `bindir=/usr/local/gnubin' argument indicates that the XEmacs
531 executable files should go in `/usr/local/gnubin', not
532 `/usr/local/bin'.
533
534 Here is a complete list of the variables you may want to set.
535
536 `bindir' indicates where to put executable programs that users can
537         run.  This defaults to /usr/local/bin.
538
539 `datadir' indicates where to put the architecture-independent
540         read-only data files that XEmacs refers to while it runs; it
541         defaults to /usr/local/lib.  We create the following
542         subdirectories under `datadir':
543         - `xemacs-VERSION/lisp', containing the XEmacs lisp libraries, and
544
545         - `xemacs-VERSION/etc', containing the XEmacs tutorial and the
546                 `yow' database.
547         `VERSION' is the number of the XEmacs version you are installing,
548         like `18.59' or `19.14'.  Since these files vary from one version
549         of XEmacs to another, including the version number in the path
550         allows you to have several versions of XEmacs installed at the
551         same time; this means that you don't have to make XEmacs
552         unavailable while installing a new version.
553
554 `statedir' indicates where to put architecture-independent data files
555         that XEmacs modifies while it runs; it defaults to
556         /usr/local/lib as well.  We create the following
557         subdirectories under `statedir':
558         - `xemacs/lock', containing files indicating who is editing
559                 what, so XEmacs can detect editing clashes between
560                 users.
561
562 `libdir' indicates where to put architecture-specific data files that
563         XEmacs refers to as it runs; it too defaults to `/usr/local/lib'.
564         We create the following subdirectories under `libdir':
565         - `xemacs-VERSION/CONFIGURATION-NAME', containing executable
566                 programs used by XEmacs that users are not expected to run
567                 themselves and the DOC file.
568         `VERSION' is the number of the XEmacs version you are installing,
569         and `CONFIGURATION-NAME' is the host type of your system.
570         Since these files are specific to the version of XEmacs,
571         operating system, and architecture in use, including the
572         configuration name in the path allows you to have several
573         versions of XEmacs for any mix of machines and operating
574         systems installed at the same time; this is useful for sites
575         at which different kinds of machines share the file system
576         XEmacs is installed on.
577
578 `infodir' indicates where to put the info files distributed with
579         XEmacs; it defaults to `/usr/local/lib/xemacs-VERSION/info'.
580
581 `mandir' indicates where to put the man pages for XEmacs and its
582         utilities (like `etags'); it defaults to
583         `/usr/local/man/man1'.
584
585 `prefix' doesn't give a path for any specific part of XEmacs; instead,
586         its value is used to determine the defaults for all the
587         architecture-independent path variables - `datadir',
588         `statedir', `infodir', and `mandir'.  Its default value is
589         `/usr/local'; the other variables add on `lib' or `man' to it
590         by default.
591
592         For example, suppose your site generally places GNU software
593         under `/usr/users/software/gnusoft' instead of `/usr/local'.
594         By including
595             `prefix=/usr/users/software/gnusoft'
596         in the arguments to `make', you can instruct the build process
597         to place all of the XEmacs data files in the appropriate
598         directories under that path.
599
600 `exec_prefix' serves the same purpose as `prefix', but instead
601         determines the default values for the architecture-dependent
602         path variables - `bindir' and `libdir'.
603
604 The above variables serve analogous purposes in the makefiles for all
605 GNU software; here are some variables specific to XEmacs.
606
607 `lispdir' indicates where XEmacs installs and expects its lisp
608         libraries.  Its default value, based on `datadir' (see above),
609         is `/usr/local/lib/xemacs-VERSION/lisp' (where `VERSION' is as
610         described above).
611
612 `sitelispdir' indicates where XEmacs should search for lisp libraries
613         specific to your site. XEmacs checks them in order before
614         checking `lispdir'.  Its default value, based on `datadir'
615         (see above), is `/usr/local/lib/xemacs/site-lisp'.
616
617 `etcdir' indicates where XEmacs should install and expect the rest of
618         its architecture-independent data, like the tutorial and yow
619         database.  Its default value, based on `datadir'
620         (see above), is `/usr/local/lib/xemacs-VERSION/etc' (where
621         `VERSION' is as described above).
622
623 `lockdir' indicates the directory where XEmacs keeps track of its
624         locking information.  Its default value, based on `statedir'
625         (see above), is `/usr/local/lib/xemacs/lock'.
626
627 `archlibdir' indicates where XEmacs installs and expects the
628         executable files and other architecture-dependent data it uses
629         while running.  Its default value, based on `libdir' (see
630         above), is `/usr/local/lib/xemacs-VERSION/CONFIGURATION-NAME'
631         (where VERSION and CONFIGURATION-NAME are as described above).
632
633 `moduledir' indicates where XEmacs installs and expects to find
634         any dynamic modules.  Its default value, based on
635         `archlibdir' (see above) is
636         `/usr/local/lib/xemacs-VERSION/CONFIGURATION-NAME/modules'
637         (where VERSION and CONFIGURATION-NAME are as described above).
638         By their very nature, dynamic loadable modules are architecture-
639         dependant, and care should be taken not to set this directory
640         to a system- or architecture-independant directory.
641
642 Remember that you must specify any variable values you need each time
643 you run `make' in the top directory.  If you run `make' once to build
644 xemacs, test it, and then run `make' again to install the files, you
645 must provide the same variable settings each time.  To make the
646 settings persist, you can edit them into the `Makefile' in the top
647 directory, but be aware that running the `configure' program erases
648 `Makefile' and rebuilds it from `Makefile.in'.
649
650 The top-level Makefile stores the variable settings it used in the
651 Makefiles for the subdirectories, so you don't have to specify them
652 when running make in the subdirectories.
653
654
655 CONFIGURATION BY HAND
656
657 Instead of running the `configure' program, you have to perform the
658 following steps.
659
660 1) Copy `./src/config.h.in' to `./src/config.h'.
661
662 2) Consult `./etc/MACHINES' to see what configuration name you should
663 use for your system.  Look at the code of the `configure' script to
664 see which operating system and architecture description files from
665 `src/s' and `src/m' should be used for that configuration name.  Edit
666 `src/config.h', and change the two `#include' directives to include
667 the appropriate system and architecture description files.
668
669 2) Edit `./src/config.h' to set the right options for your system.  If
670 you need to override any of the definitions in the s/*.h and m/*.h
671 files for your system and machine, do so by editing config.h, not by
672 changing the s/*.h and m/*.h files.  Occasionally you may need to
673 redefine parameters used in `./lib-src/movemail.c'.
674
675 3) If you're going to use the make utility to build XEmacs, you will
676 still need to run `configure' first, giving the appropriate values for
677 the variables in the sections entitled "Things `configure' Might Edit"
678 and "Where To Install Things."  Note that you may only need to change
679 the variables `prefix' and `exec_prefix', since the rest of the
680 variables have reasonable defaults based on them.  For each Makefile
681 variable of this type, there is a corresponding configure option; for
682 example, to change the location of the lock directory, you might use
683
684          ./configure --lockdir=/nfs/xemacslock
685
686 The `configure' script is built from `configure.in' by the `autoconf'
687 program.  However, since XEmacs has configuration requirements that
688 autoconf can't meet, `configure.in' uses a marriage of custom-baked
689 configuration code and autoconf macros.  New versions of autoconf
690 could very well break this arrangement, so it may be wise to avoid
691 rebuilding `configure' from `configure.in' when possible.
692
693
694 BUILDING XEMACS BY HAND
695
696 Once XEmacs is configured, running `make' in the top directory performs
697 the following steps.
698
699 1) Run `make src/paths.h' in the top directory.  This produces
700 `./src/paths.h' from the template file `./src/paths.h.in', changing
701 the paths to the values specified in `./Makefile'.
702
703 2) Cd to `./lib-src' and run `make'.  This creates executables named
704 `ctags' and `etags' and `wakeup' and `make-docfile' and `digest-doc'
705 and `test-distrib'.  And others.
706
707 3) Cd to `./src' and Run `make'.  This refers to files in the `./lisp'
708 and `./lib-src' subdirectories using names `../lisp' and
709 `../lib-src'.
710
711 This creates a file `./src/xemacs' which is the runnable XEmacs,
712 assigning it a new build version number by incrementing the build
713 version stored in `./lisp/version.el'.
714
715 It also creates a file in `./lib-src' whose name is `DOC' followed by
716 the current XEmacs version.  This file contains documentation strings
717 for all the functions in XEmacs.  Each time you run make to make a new
718 xemacs, a new DOC file with a new name is made.  You must keep the DOC
719 file for an XEmacs version as long as you keep using that XEmacs
720 version.
721
722
723 INSTALLATION BY HAND
724
725 The steps below are done by running `make install' in the main
726 directory of the XEmacs distribution.
727
728 1) Copy `./lisp' and its subdirectories, `./etc', and the executables
729 in `./lib-src' to their final destinations, as selected in `./src/paths.h'.
730
731 Strictly speaking, not all of the executables in `./lib-src' need be copied.
732 - The programs `cvtmail', `emacsserver', `env', `fakemail', `hexl',
733     `movemail', `timer', `vcdiff', `wakeup', and `yow' are used by
734     XEmacs; they do need to be copied.
735 - The programs `etags', `ctags', `emacsclient', `b2m', `rcs2log',
736     `gnuclient', `gnudoit', and `gnuattach' are intended to be run
737     by users; they are handled below.
738 - The programs `make-docfile' and `test-distrib' were
739     used in building XEmacs, and are not needed any more.
740 - The programs `digest-doc' and `sorted-doc' convert a `DOC' file into
741     a file for users to read.  There is no important reason to move them.
742
743 2) Copy the files in `./info' to the place specified in
744 `./lisp/site-init.el' or `./lisp/paths.el'.  Note that if the
745 destination directory already contains a file named `dir', you
746 probably don't want to replace it with the `dir' file in the XEmacs
747 distribution.  Instead, you should make sure that the existing `dir'
748 file contains an appropriate menu entry for the XEmacs info.
749
750 3) Create a directory for XEmacs to use for clash detection, named as
751 indicated by the PATH_LOCK macro in `./src/paths.h'.
752
753 4) Copy `./src/xemacs' to `/usr/local/bin', or to some other directory
754 in users' search paths.  `./src/xemacs' has an alternate name
755 `./src/emacs-EMACSVERSION'; you may wish to make a symbolic link named
756 `/usr/local/bin/xemacs' pointing to that alternate name, as an easy way
757 of installing different versions.
758
759 You can delete `./src/temacs'.
760
761 5) Copy the programs `b2m', `emacsclient', `ctags', `etags', `rcs2log',
762 `gnuclient', `gnudoit', and `gnuattach' from `./lib-src' to
763 `/usr/local/bin'.  These programs are intended for users to run.
764
765 6) Copy the man pages in `./etc' for xemacs, ctags, etags, and gnuserv
766 into the appropriate man directories.
767
768 7) The files in the `./src' subdirectory, except for `xemacs', are not
769 used by XEmacs once it is built.  The source would be handy for
770 debugging.
771
772
773 PROBLEMS
774
775 See the file PROBLEMS in this directory for a list of various
776 problems sometimes encountered, and what to do about them.
777
778
779 If all else fails, please see etc/InstallGuide courtesy
780 of Jonathan Seth Hayward.