Mercurial > emacs
comparison INSTALL @ 34879:b37dd70cce0a
Add basic installation procedure which assumes `configure' does its job.
Elaborate on image support libraries. Add a pointer to Xaw3d library.
Add advice about solving configure-time problems by looking in
config.log and setting variables in the envoronment.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Wed, 27 Dec 2000 16:14:51 +0000 |
parents | 64dfbe3c76d5 |
children | 44564f6157cc |
comparison
equal
deleted
inserted
replaced
34878:0a202ba683f0 | 34879:b37dd70cce0a |
---|---|
1 GNU Emacs Installation Guide | 1 GNU Emacs Installation Guide |
2 Copyright (c) 1992, 1994, 1996, 1997 Free software Foundation, Inc. | 2 Copyright (c) 1992, 1994, 1996, 1997, 2000 Free software Foundation, Inc. |
3 | 3 |
4 Permission is granted to anyone to make or distribute verbatim copies | 4 Permission is granted to anyone to make or distribute verbatim copies |
5 of this document as received, in any medium, provided that the | 5 of this document as received, in any medium, provided that the |
6 copyright notice and permission notice are preserved, | 6 copyright notice and permission notice are preserved, |
7 and that the distributor grants the recipient permission | 7 and that the distributor grants the recipient permission |
12 under the above conditions, provided also that they | 12 under the above conditions, provided also that they |
13 carry prominent notices stating who last changed them, | 13 carry prominent notices stating who last changed them, |
14 and that any new or changed statements about the activities | 14 and that any new or changed statements about the activities |
15 of the Free Software Foundation are approved by the Foundation. | 15 of the Free Software Foundation are approved by the Foundation. |
16 | 16 |
17 BASIC INSTALLATION | |
18 | |
19 The simplest way to build Emacs is to use the `configure' shell script | |
20 which attempts to guess correct values for various system-dependent | |
21 variables and features and find the directories where various system | |
22 headers and libraries are kept. It then creates a `Makefile' in each | |
23 subdirectory and a `config.h' file containing system-dependent | |
24 definitions. Running the Make utility then builds the package for | |
25 your system. | |
26 | |
27 Here's the procedure to build Emacs using `configure' on systems which | |
28 are supported by it. If this simplified procedure fails, or if you | |
29 are using a platform such as MS-Windows where `configure' script | |
30 doesn't work, you might need to use various non-default options, and | |
31 maybe perform some of the steps manually. The more detailed | |
32 description in the rest of the sections of this guide will help you do | |
33 that, so please refer to them if the simple procedure does not work. | |
34 | |
35 1. If you want to be able to input international characters which | |
36 your keyboard doesn't support directly (i.e., you cannot type | |
37 them at the shell prompt), download the leim-M.N.tar.gz | |
38 distribution and unpack it into the same directory where you have | |
39 unpacked the main Emacs distribution. See ADDITIONAL | |
40 DISTRIBUTION FILES, below, for more about this. | |
41 | |
42 2. Make sure your system has at least 120 MB of free disk space. | |
43 | |
44 3a. `cd' to the directory where you unpacked Emacs and invoke the | |
45 `configure' script: | |
46 | |
47 ./configure | |
48 | |
49 3b. Alternatively, create a separate directory, outside the source | |
50 directory, where you want to build Emacs, and invoke `configure' | |
51 from there: | |
52 | |
53 SOURCE-DIR/configure | |
54 | |
55 where SOURCE-DIR is the top-level Emacs source directory. | |
56 | |
57 4. When `configure' finishes, it prints several lines of details | |
58 about the system configuration. Read those details carefully | |
59 looking for anything suspicious, such as wrong CPU and operating | |
60 system names, wrong places for headers or libraries, missing | |
61 libraries that you know are installed on your system, etc. | |
62 | |
63 If you find anything wrong, you will have to pass to `configure' | |
64 explicit machine configuration name, and one or more options | |
65 which tell it where to find various headers and libraries; refer | |
66 to DETAILED BUILDING AND INSTALLATION section below. | |
67 | |
68 If `configure' didn't find some image support libraries, such as | |
69 Xpm, jpeg, etc., refer to the subsection "Image support | |
70 libraries", below. | |
71 | |
72 If the details printed by `configure' don't make any sense to | |
73 you, assume that `configure' did its job and proceed. | |
74 | |
75 5. If you need to run the `configure' script more than once (e.g., | |
76 with some non-default options), always clean the source | |
77 directories before running `configure' again: | |
78 | |
79 make distclean | |
80 ./configure | |
81 | |
82 6. Invoke the Make program: | |
83 | |
84 make | |
85 | |
86 7. If Make succeeds, it will build an executable program `emacs' in | |
87 the `src' directory. You can try this program, to make sure it | |
88 works: | |
89 | |
90 src/emacs -q | |
91 | |
92 8. Assuming that the program `src/emacs' starts and displays its | |
93 opening screen, you can install the program and its auxiliary | |
94 files into their installation directories: | |
95 | |
96 make install | |
97 | |
98 You are now ready to use Emacs. If you wish to conserve disk space, | |
99 you may remove the program binaries and object files from the | |
100 directory where you built Emacs: | |
101 | |
102 make clean | |
103 | |
17 | 104 |
18 ADDITIONAL DISTRIBUTION FILES | 105 ADDITIONAL DISTRIBUTION FILES |
19 | 106 |
20 * leim-M.N.tar.gz | 107 * leim-M.N.tar.gz |
21 | 108 |
22 The Emacs Lisp code for input methods for various international | 109 The Emacs Lisp code for input methods for various international |
23 character scripts is distributed in a separate tar file because it | 110 character scripts allows you to input characters in scripts which are |
24 amounts to a significant fraction of the size of the distribution. | 111 not directly supported by your keyboard. It is distributed in a |
25 This tar file is called leim-M.N.tar.gz, with the same version number | 112 separate tar file because it amounts to a significant fraction of the |
26 as Emacs, and it unpacks into the directory emacs-M.N/leim. | 113 size of the distribution. This tar file is called leim-M.N.tar.gz, |
114 with the same version number as Emacs, and it unpacks into the | |
115 directory emacs-M.N/leim. | |
27 | 116 |
28 You should unpack leim-M.N.tar.gz into the same directory where you | 117 You should unpack leim-M.N.tar.gz into the same directory where you |
29 have previously unpacked the main Emacs distribution. It fills in the | 118 have previously unpacked the main Emacs distribution. It fills in the |
30 contents of one subdirectory, which is present in the main Emacs | 119 contents of one subdirectory, which is present in the main Emacs |
31 distribution only in dummy form. | 120 distribution only in dummy form. |
38 * intlfonts-VERSION.tar.gz | 127 * intlfonts-VERSION.tar.gz |
39 | 128 |
40 The intlfonts distribution contains X11 fonts that Emacs needs in | 129 The intlfonts distribution contains X11 fonts that Emacs needs in |
41 order to display international characters. If you see a non-ASCII | 130 order to display international characters. If you see a non-ASCII |
42 character appear as a hollow box, that means you don't have a font for | 131 character appear as a hollow box, that means you don't have a font for |
43 it. You might find a font in the intlfonts distribution. If some | 132 it. You might find a font in the intlfonts distribution. If you do |
44 characters don't look right, or appear improperly aligned, a font | 133 have a font for a non-ASCII character, but some characters don't look |
45 from the intlfonts distribution might look better. | 134 right, or appear improperly aligned, a font from the intlfonts |
135 distribution might look better. | |
46 | 136 |
47 The fonts in the intlfonts distribution are also used by the ps-print | 137 The fonts in the intlfonts distribution are also used by the ps-print |
48 package for printing international characters. The file | 138 package for printing international characters. The file |
49 lisp/ps-mule.el defines the .bdf font files required for printing | 139 lisp/ps-mule.el defines the *.bdf font files required for printing |
50 each character set. | 140 each character set. |
51 | 141 |
52 The intlfonts distribution contains its own installation instructions, | 142 The intlfonts distribution contains its own installation instructions, |
53 in the intlfonts/README file. | 143 in the intlfonts/README file. |
54 | 144 |
55 * elisp-manual-M.N.tar.gz | 145 * elisp-manual-M.N.tar.gz |
56 | 146 |
57 This distribution contains the Emacs Lisp Reference Manual which | 147 This distribution contains the Emacs Lisp Reference Manual which |
58 complements the Emacs Lisp Manual. It is a good idea to install the | 148 complements the Emacs Manual. (The Emacs Manual is accessible from |
59 Emacs Lisp Reference Manual after installing Emacs, to complete the | 149 within the editor by typing "C-h i", then selecting the "Emacs" item |
60 on-line documentation of Emacs in Info. | 150 from the menu, or by clicking "Help" in the menu bar and selecting |
151 "Read Emacs Manual".) It is a good idea to install the Emacs Lisp | |
152 Reference Manual after installing Emacs, to complete the on-line | |
153 documentation of Emacs in Info. | |
61 | 154 |
62 If you have installed Texinfo, you can install the Emacs Lisp | 155 If you have installed Texinfo, you can install the Emacs Lisp |
63 Reference Manual this way: | 156 Reference Manual this way (after unpacking the elisp-manual-M.N.tar.gz |
157 file): | |
64 | 158 |
65 cd elisp-manual-M.N | 159 cd elisp-manual-M.N |
66 ./configure --prefix=PREFIXDIR | 160 ./configure --prefix=PREFIXDIR |
67 make install | 161 make install |
68 | 162 |
74 * Elisp: (elisp). The Emacs Lisp Reference Manual. | 168 * Elisp: (elisp). The Emacs Lisp Reference Manual. |
75 | 169 |
76 * Image support libraries | 170 * Image support libraries |
77 | 171 |
78 Emacs needs optional libraries to be able to display images (with the | 172 Emacs needs optional libraries to be able to display images (with the |
79 exception of PBM and XBM images whose support is built-in). On some | 173 exception of PBM and XBM images whose support is built-in). |
80 systems these may already be present or available as additional | 174 |
81 packages, particularly on GNU/Linux. (In some cases older versions | 175 On some systems, particularly on GNU/Linux, these libraries may |
82 won't work because some routines are missing, and configure should | 176 already be present or available as additional packages. If not, you |
83 avoid such old versions.) | 177 can download and build them from sources. None of them are vital for |
84 | 178 running Emacs; however, note that Emacs will not be able to use color |
85 If necessary, you can build them from source. None are vital for | 179 icons in the toolbar if the XPM support is not available. |
86 running Emacs. Here's the list of these optional libraries, and the | 180 |
87 URLs where they can be found: | 181 Here's the list of these optional libraries, and the URLs where they |
88 | 182 can be found: |
183 | |
184 . libXaw3d for fancy 3D-style | |
185 scroll bars: ftp://ftp.x.org/contrib/widgets/Xaw3d/ | |
89 . libxpm for XPM: ftp://ftp.x.org/contrib/libraries/ | 186 . libxpm for XPM: ftp://ftp.x.org/contrib/libraries/ |
90 . libpng for PNG: ftp://www.libpng.org/pub/png/ | 187 . libpng for PNG: ftp://www.libpng.org/pub/png/ |
91 . libz (for PNG): http://www.info-zip.org/pub/infozip/zlib/ | 188 . libz (for PNG): http://www.info-zip.org/pub/infozip/zlib/ |
92 . libjpeg for JPEG: ftp://ftp.uu.net/graphics/jpeg/ | 189 . libjpeg for JPEG: ftp://ftp.uu.net/graphics/jpeg/ |
93 . libtiff for TIFF: http://www.libtiff.org/ | 190 . libtiff for TIFF: http://www.libtiff.org/ |
94 . libungif for GIF: | 191 . libungif for GIF: |
95 http://prtr-13.ucsc.edu/~badger/software/libungif/index.shtml | 192 http://prtr-13.ucsc.edu/~badger/software/libungif/index.shtml |
96 | 193 |
97 [libungif-4.1.0 can crash Emacs with uncompressed GIFs -- use | 194 Emacs will configure itself to build with these libraries if the |
98 libungif-4.1.0b1.] | 195 `configure' script finds them on your system, unless you supply the |
99 | 196 appropriate --without-LIB option. In some cases, older versions of |
100 Emacs will configure itself to build with these libraries if configure | 197 these libraries won't work because some routines are missing, and |
101 finds them on your system unless you supply the appropriate | 198 configure should avoid such old versions. If that happens, use the |
102 --without-LIB option. See below for more details. | 199 --without-LIB options to `configure'. See below for more details. |
103 | 200 |
104 | 201 |
105 BUILDING AND INSTALLATION: | 202 DETAILED BUILDING AND INSTALLATION: |
106 | 203 |
107 (This is for a Unix or Unix-like system. For MSDOS, see below; search | 204 (This is for a Unix or Unix-like system. For MS-DOS and Windows 3.X, |
108 for MSDOG. For Windows NT or Windows 95, see the file nt/INSTALL. | 205 see below; search for MSDOG. For Windows 9X, Windows ME, Windows NT, |
109 For the Mac, see the file mac/INSTALL.) | 206 and Windows 2000, see the file nt/INSTALL. For the Mac, see the file |
207 mac/INSTALL.) | |
110 | 208 |
111 1) Make sure your system has enough swapping space allocated to handle | 209 1) Make sure your system has enough swapping space allocated to handle |
112 a program whose pure code is 1.5 MB and whose data area is at | 210 a program whose pure code is 1.5 MB and whose data area is at |
113 least 2.5 MB and can reach 80 MB or more. If the swapping space is | 211 least 2.5 MB and can reach 80 MB or more. If the swapping space is |
114 insufficient, you will get an error in the command `temacs -batch -l | 212 insufficient, you will get an error in the command `temacs -batch -l |
119 sources), or 130 MB if Leim is used. Once installed, Emacs occupies | 217 sources), or 130 MB if Leim is used. Once installed, Emacs occupies |
120 about 60 MB (70 MB with Leim) in the file system where it is | 218 about 60 MB (70 MB with Leim) in the file system where it is |
121 installed; this includes the executable files, Lisp libraries, | 219 installed; this includes the executable files, Lisp libraries, |
122 miscellaneous data files, and on-line documentation. If the building | 220 miscellaneous data files, and on-line documentation. If the building |
123 and installation take place in different directories, then the | 221 and installation take place in different directories, then the |
124 installation procedure momentarily requires 95+60 MB (130+170 MB). | 222 installation procedure momentarily requires 95+60 MB (130+70 MB). |
125 | 223 |
126 2) Consult `./etc/MACHINES' to see what configuration name you should | 224 2) Consult `./etc/MACHINES' to see what configuration name you should |
127 give to the `configure' program. That file offers hints for | 225 give to the `configure' program. That file offers hints for |
128 getting around some possible installation problems. | 226 getting around some possible installation problems. The file lists |
227 many different configurations, but only the part for your machine and | |
228 operating system is relevant. (The list is arranged in alphabetical | |
229 order by the vendor name.) | |
129 | 230 |
130 3) You can build Emacs in the top-level Emacs source directory | 231 3) You can build Emacs in the top-level Emacs source directory |
131 or in a separate directory. | 232 or in a separate directory. |
132 | 233 |
133 3a) To build in the top-level Emacs source directory, go to that | 234 3a) To build in the top-level Emacs source directory, go to that |
157 To get more attractive menus, you can specify an X toolkit when you | 258 To get more attractive menus, you can specify an X toolkit when you |
158 configure Emacs; use the option `--with-x-toolkit=TOOLKIT', where | 259 configure Emacs; use the option `--with-x-toolkit=TOOLKIT', where |
159 TOOLKIT is `athena' or `motif' (`yes' and `lucid' are synonyms for | 260 TOOLKIT is `athena' or `motif' (`yes' and `lucid' are synonyms for |
160 `athena'). On some systems, it does not work to use a toolkit with | 261 `athena'). On some systems, it does not work to use a toolkit with |
161 shared libraries. A free implementation of Motif, called LessTif, is | 262 shared libraries. A free implementation of Motif, called LessTif, is |
162 available ftom <http://www.lesstif.org>. | 263 available ftom <http://www.lesstif.org>. You can get fancy 3D-style |
264 scroll bars, even without LessTif/Motif, if you have the Xaw3d library | |
265 installed (see "Image support libraries" above for Xaw3d | |
266 availability). | |
163 | 267 |
164 The `--with-gcc' option specifies that the build process should | 268 The `--with-gcc' option specifies that the build process should |
165 compile Emacs using GCC. If you don't want to use GCC, specify | 269 compile Emacs using GCC. If you don't want to use GCC, specify |
166 `--with-gcc=no'. If you omit this option, `configure' will search | 270 `--with-gcc=no'. If you omit this option, `configure' will search |
167 for GCC in your path, and use it if present. | 271 for GCC in your path, and use it if present. |
185 --without-xpm for XPM image support | 289 --without-xpm for XPM image support |
186 --without-jpeg for JPEG image support | 290 --without-jpeg for JPEG image support |
187 --without-tiff for TIFF image support | 291 --without-tiff for TIFF image support |
188 --without-gif for GIF image support | 292 --without-gif for GIF image support |
189 --without-png for PNG image support | 293 --without-png for PNG image support |
294 | |
295 Use --without-toolkit-scroll-bars to disable LessTif/Motif or Xaw3d | |
296 scroll bars. --without-xim disables the use of X Input Methods, and | |
297 --disable-largefile omits support for files larger than 2GB on systems | |
298 which support that. | |
190 | 299 |
191 The `--prefix=PREFIXDIR' option specifies where the installation process | 300 The `--prefix=PREFIXDIR' option specifies where the installation process |
192 should put emacs and its data files. This defaults to `/usr/local'. | 301 should put emacs and its data files. This defaults to `/usr/local'. |
193 - Emacs (and the other utilities users run) go in PREFIXDIR/bin | 302 - Emacs (and the other utilities users run) go in PREFIXDIR/bin |
194 (unless the `--exec-prefix' option says otherwise). | 303 (unless the `--exec-prefix' option says otherwise). |
229 to make reconfiguring faster, and a file `config.log' containing compiler | 338 to make reconfiguring faster, and a file `config.log' containing compiler |
230 output (useful mainly for debugging `configure'). You can give | 339 output (useful mainly for debugging `configure'). You can give |
231 `configure' the option `--cache-file=FILE' to use the results of the | 340 `configure' the option `--cache-file=FILE' to use the results of the |
232 tests in FILE instead of `config.cache'. Set FILE to `/dev/null' to | 341 tests in FILE instead of `config.cache'. Set FILE to `/dev/null' to |
233 disable caching, for debugging `configure'. | 342 disable caching, for debugging `configure'. |
343 | |
344 If the description of the system configuration printed by `configure' | |
345 is not right, or if it claims some of the fatures or libraries are not | |
346 available when you know they are, look at the `config.log' file for | |
347 the trace of the failed tests performed by `configure' to check | |
348 whether these features are supported. Typically, some test fails | |
349 because the compiler cannot find some function in the system | |
350 libraries, or some macro-processor definition in the system headers. | |
351 | |
352 Some tests might fail because the compiler should look in special | |
353 directories for some header files, or link against optional | |
354 directories, or use special compilation options. You can force | |
355 `configure' and the build process which follows it to do that by | |
356 setting the variables CPPFLAGS, CFLAGS, LDFLAGS, LIBS, and CC before | |
357 running `configure'. CPPFLAGS lists the options passed to the | |
358 preprocessor, CFLAGS are compilation options, LDFLAGS are options used | |
359 when linking, LIBS are libraries to link against, and CC is the | |
360 command which invokes the compiler. | |
361 | |
362 Here's an example of a `configure' invocation which uses these | |
363 variables: | |
364 | |
365 CPPFLAGS='-I/foo/myinclude' LDFLAGS='-L/bar/mylib' \ | |
366 CFLAGS='-O3' LIBS='-lfoo -lbar' ./configure | |
367 | |
368 (this is all one long line). This tells `configure' to instruct the | |
369 preprocessor to look in the `/foo/myinclude' directory for header | |
370 files (in addition to the standard directories), instruct the linker | |
371 to look in `/bar/mylib' for libraries, pass the -O3 optimization | |
372 switch to the compiler, and link against libfoo.a and libbar.a | |
373 libraries in addition to the standard ones. | |
234 | 374 |
235 The work of `configure' can be done by editing various files in the | 375 The work of `configure' can be done by editing various files in the |
236 distribution, but using `configure' is easier. See the section called | 376 distribution, but using `configure' is easier. See the section called |
237 "CONFIGURATION BY HAND" below if you want to do the configuration | 377 "CONFIGURATION BY HAND" below if you want to do the configuration |
238 yourself. | 378 yourself. |