Eglot: tweak previous change (bug#70036)
[emacs.git] / INSTALL
blob59a8063ba192e7aaf6bc7d585d04d2af4d7aae2f
1 GNU Emacs Installation Guide
2 Copyright (C) 1992, 1994, 1996-1997, 2000-2024 Free Software Foundation,
3 Inc.
4 See the end of the file for license conditions.
7 This file contains general information on building GNU Emacs.  If you
8 are building an Emacs release tarball on a Unix or a GNU system, the
9 instructions in this file should be sufficient.  For other
10 configurations, we have additional specialized files:
12   . INSTALL.REPO if you build from a Git checkout
13   . nt/INSTALL if you build for MS-Windows
14   . nextstep/INSTALL if you build for GNUstep/macOS
15   . java/INSTALL if you build for Android
16   . msdos/INSTALL if you build for MS-DOS
19 BASIC INSTALLATION
21 On most Unix systems, you build Emacs by first running the 'configure'
22 shell script.  This attempts to deduce the correct values for
23 various system-dependent variables and features, and find the
24 directories where certain system headers and libraries are kept.
25 In a few cases, you may need to explicitly tell configure where to
26 find some things, or what options to use.
28 'configure' creates a 'Makefile' in several subdirectories, and a
29 'src/config.h' file containing system-dependent definitions.
30 Running the 'make' utility then builds the package for your system.
32 Building Emacs requires GNU make, <https://www.gnu.org/software/make/>.
33 On most systems that Emacs supports, this is the default 'make' program.
35 Here's the procedure to build Emacs using 'configure' on systems which
36 are supported by it.  In some cases, if the simplified procedure fails,
37 you might need to use various non-default options, and maybe perform
38 some of the steps manually.  The more detailed description in the other
39 sections of this guide will help you do that, so please refer to those
40 sections if you need to.
42   1.  Obtain and unpack the Emacs release, with commands like this:
44                  wget https://ftp.gnu.org/gnu/emacs/emacs-VERSION.tar.xz
45                  tar -xf emacs-VERSION.tar.xz
47       where VERSION is the Emacs version number.
49   2a. 'cd' to the directory where you unpacked Emacs and invoke the
50       'configure' script:
52                  ./configure
54   2b. Alternatively, create a separate directory, outside the source
55       directory, where you want to build Emacs, and invoke 'configure'
56       from there:
58                  SOURCE-DIR/configure
60       where SOURCE-DIR is the top-level Emacs source directory.
62   2c. If you don't have write access to the default directory where
63       Emacs and its data files will be installed, specify an alternative
64       installation directory:
66                  ./configure --prefix=/SOME/OTHER/DIRECTORY
68       where /SOME/OTHER/DIRECTORY is a directory writeable by your user,
69       for example, a subdirectory of your home directory.
71   3. When 'configure' finishes, it prints several lines of details
72      about the system configuration.  Read those details carefully
73      looking for anything suspicious, such as wrong CPU and operating
74      system names, wrong places for headers or libraries, missing
75      libraries that you know are installed on your system, etc.
77      If you find anything wrong, you may have to pass to 'configure'
78      one or more options specifying the explicit machine configuration
79      name, where to find various headers and libraries, etc.
80      Refer to the section DETAILED BUILDING AND INSTALLATION below.
82      If 'configure' didn't find some image support libraries, such as
83      Xpm and jpeg, refer to "Image support libraries" below.
85      If the details printed by 'configure' don't make any sense to
86      you, but there are no obvious errors, assume that 'configure' did
87      its job and proceed.
89   4. Invoke the 'make' program:
91                  make
93   5. If 'make' succeeds, it will build an executable program 'emacs'
94      in the 'src' directory.  You can try this program, to make sure
95      it works:
97                  src/emacs -Q
99      To test Emacs further (intended mostly to help developers):
101                  make check
103   6. Assuming that the program 'src/emacs' starts and displays its
104      opening screen, you can install the program and its auxiliary
105      files into their installation directories:
107                  make install
109   You are now ready to use Emacs.  If you wish to conserve space,
110   you may remove the program binaries and object files from the
111   directory where you built Emacs:
113                  make clean
115   You can delete the entire build directory if you do not plan to
116   build Emacs again, but it can be useful to keep for debugging.
117   If you want to build Emacs again with different configure options,
118   first clean the source directories:
120                 make distclean
122   Note that the install automatically saves space by compressing
123   (provided you have the 'gzip' program) those installed Lisp source (.el)
124   files that have corresponding .elc versions, as well as the Info files.
126   You can read a brief summary about common make targets:
128                 make help
131 ADDITIONAL DISTRIBUTION FILES
133 * Complex Text Layout support libraries
135 On GNU and Unix systems, Emacs needs optional libraries to correctly
136 display such complex scripts as Indic and Khmer, and also for scripts
137 that require Arabic shaping support (Arabic and Farsi).  If the
138 HarfBuzz library is installed, Emacs will build with it and use it for
139 this purpose.  HarfBuzz is the preferred shaping engine, both on Posix
140 hosts and on MS-Windows, so we recommend installing it before building
141 Emacs.  The alternative for GNU/Linux and Posix systems is to use the
142 "m17n-db", "libm17n-flt", and "libotf" libraries.  (On some systems,
143 particularly GNU/Linux, these libraries may be already present or
144 available as additional packages.)  Note that if there is a separate
145 'dev' or 'devel' package, for use at compilation time rather than run
146 time, you will need that as well as the corresponding run time
147 package; typically the dev package will contain header files and a
148 library archive.  On MS-Windows, if HarfBuzz is not available, Emacs
149 will use the Uniscribe shaping engine that is part of the OS.
151 Note that Emacs cannot support complex scripts on a TTY, unless the
152 terminal includes such a support.  However, most modern terminal
153 emulators, such as xterm, do support such scripts.
155 * intlfonts-VERSION.tar.gz
157 The intlfonts distribution contains X11 fonts in various encodings
158 that Emacs can use to display international characters.  If you see a
159 non-ASCII character appear as a hollow box, that means you don't have
160 a font for it.  You might find one in the intlfonts distribution.  If
161 you do have a font for a non-ASCII character, but some characters
162 don't look right, or appear improperly aligned, a font from the
163 intlfonts distribution might look better.
165 The fonts in the intlfonts distribution are also used by the ps-print
166 package for printing international characters.  The file
167 lisp/ps-mule.el defines the *.bdf font files required for printing
168 each character set.
170 The intlfonts distribution contains its own installation instructions,
171 in the intlfonts/README file.  See also the Emacs Frequently Asked
172 Questions info pages "(efaq) How to add fonts" for installation
173 instructions.
175 * Image support libraries
177 Emacs needs libraries to display images, with the exception of PBM and
178 XBM images whose support is built-in.
180 On some systems, particularly on GNU/Linux, these libraries may
181 already be present or available as additional packages.  If
182 there is a separate 'dev' or 'devel' package, for use at compilation
183 time rather than run time, you will need that as well as the
184 corresponding run time package; typically the dev package will
185 contain header files and a library archive.  Otherwise, you can
186 download and build libraries from sources.  Although none of them are
187 essential for running Emacs, some are important enough that
188 'configure' will report an error if they are absent from a system that
189 has X11 support, unless 'configure' is specifically told to omit them.
191 Here's a list of some of these libraries, and the URLs where they
192 can be found (in the unlikely event that your distribution does not
193 provide them).  By default, libraries marked with an X are required if
194 X11 is being used.
196     libXaw3d          https://directory.fsf.org/project/Xaw3d
197   X libxpm for XPM:   https://www.x.org/releases/current/src/lib/
198   X libpng for PNG:   http://www.libpng.org/
199     libz (for PNG):   https://www.zlib.net/
200   X libjpeg for JPEG: https://www.ijg.org/
201   X libtiff for TIFF: http://www.simplesystems.org/libtiff/
202   X libgif for GIF:   https://giflib.sourceforge.net/
203     librsvg2 for SVG: https://wiki.gnome.org/Projects/LibRsvg
204     libwebp for WebP: https://developers.google.com/speed/webp/
206 If you supply the appropriate --without-LIB option, 'configure' will
207 omit the corresponding library from Emacs, even if that makes for a
208 less-pleasant user interface.  Otherwise, Emacs will configure itself
209 to build with these libraries if 'configure' finds them on your
210 system, and 'configure' will complain and exit if a library marked 'X'
211 is not found on a system that uses X11.  Use --without-LIB if your
212 version of a library won't work because some routines are missing.
214 * Extra fonts
216 The Emacs distribution does not include fonts and does not install
217 them.
219 On the GNU system, Emacs supports both X fonts and local fonts
220 (i.e. fonts managed by the fontconfig library).  If you need more
221 fonts than your distribution normally provides, you must install them
222 yourself.  See <https://www.gnu.org/software/freefont/> for a large
223 number of free Unicode fonts.
225 * GNU/Linux development packages
227 Many GNU/Linux systems do not come with development packages by default;
228 they include the files that you need to run Emacs, but not those you
229 need to compile it.  For example, to compile Emacs with support for X
230 and graphics libraries, you may need to install the X development
231 package(s), and development versions of the jpeg, png, etc. packages.
233 The names of the packages that you need vary according to the
234 GNU/Linux distribution that you use, and the options that you want to
235 configure Emacs with.  On Debian-based systems, you can install all the
236 packages needed to build the installed version of Emacs with a command
237 like 'apt-get build-dep emacs' (on older systems, replace 'emacs' with
238 e.g. 'emacs25').  On Red Hat-based systems, the corresponding command is
239 'dnf builddep emacs' (on older systems, use 'yum-builddep' instead).
241 On FreeBSD, the command is 'pkg install -y `pkg rquery %dn emacs-devel`'.
243 * Alternative window systems
245 If you want to use Emacs on one of the alternative window systems
246 available on GNU/Linux and some Unix systems, such as Wayland or
247 Broadway, you can build the PGTK ("Pure GTK") port of Emacs, which
248 utilizes the GTK+ toolkit to support those window systems.  To this
249 end, invoke the configure script with the '--with-pgtk' option, like
250 this:
252         ./configure --with-pgtk
254 This build is only supported with GTK+ version 3, and it is an error
255 to specify any other X-specific configuration option when PGTK is
256 enabled.
258 If you use exclusively X, do not use the PGTK port.  There are a
259 number of respects in which the regular --with-x-toolkit=gtk build
260 works better.  The PGTK port should not be considered a simple upgrade
261 from --with-x-toolkit=gtk.
263 With the PGTK build, you will be able to switch between running Emacs
264 on X, Wayland and Broadway using the 'GDK_BACKEND' environment
265 variable.  GTK+ should automatically detect and use the correct value
266 for your system, but you can also specify it manually.  For example,
267 to force GTK+ to run under Broadway, start Emacs like this:
269         GDK_BACKEND=broadway emacs ...
271 (where '...' denotes any further options you may want to pass to Emacs).
273 The GNUstep build also supports the Wayland window system.  If that is
274 what you want, see nextstep/INSTALL.
276 * Native compilation of Lisp files
278 In addition to byte-compiling files of Lisp code, Emacs can also produce
279 "native code", which usually runs several times faster than the
280 corresponding byte-compiled code.  To build Emacs with this feature,
281 your system must have not only GCC (the C compiler) and Binutils (the
282 assembler and linker) but also the 'libgccjit' shared library, which is
283 part of the GCC distribution.  If these components are available,
284 building Emacs will automatically produce natively compiled Lisp code.
286 By default, Emacs natively compiles only pre-loaded Lisp files during
287 the build process; other Lisp files are natively compiled
288 "just-in-time", i.e., the first time they are loaded into the running
289 Emacs.  If you want Emacs to natively compile all Lisp files during the
290 build ("ahead of time"), use the 'configure' option
291 '--with-native-compilation=aot'.  If you do not want natively compiled
292 Lisp code even if your system satisfies the build requirements, use the
293 'configure' option '--with-native-compilation=no'.
295 DETAILED BUILDING AND INSTALLATION:
297 (This is for a Unix or Unix-like system.  For GNUstep and macOS,
298 see nextstep/INSTALL.  For non-ancient versions of MS Windows, see
299 the file nt/INSTALL.  For MS-DOS and MS Windows 3.X, see msdos/INSTALL.)
301 1) See BASIC INSTALLATION above for getting and configuring Emacs.
303 2) In the unlikely event that 'configure' does not detect your system
304 type correctly, consult './etc/MACHINES' to see what --host, --build
305 options you should pass to 'configure'.  That file also offers hints
306 for getting around some possible installation problems.
308 3) You can build Emacs in the top-level Emacs source directory
309 or in a separate directory.
311 3a) To build in the top-level Emacs source directory, go to that
312 directory and run the program 'configure' as follows:
314     ./configure [--OPTION[=VALUE]] ...
316 If 'configure' cannot determine your system type, try again
317 specifying the proper --build, --host options explicitly.
319 If you don't want X support, specify '--with-x=no'.  If you omit this
320 option, 'configure' will try to figure out for itself whether your
321 system has X, and arrange to use it if present.
323 The '--x-includes=DIR' and '--x-libraries=DIR' options tell the build
324 process where the compiler should look for the include files and
325 object libraries used with the X Window System.  Normally, 'configure'
326 is able to find them; these options are necessary if you have your X
327 Window System files installed in unusual places.  These options also
328 accept a list of directories, separated with colons.
330 To get more attractive menus, you can specify an X toolkit when you
331 configure Emacs; use the option '--with-x-toolkit=TOOLKIT', where
332 TOOLKIT is 'gtk' (the default), 'athena', or 'motif' ('yes' and
333 'lucid' are synonyms for 'athena').  Compiling with Motif causes a
334 standard File Selection Dialog to pop up when you invoke file commands
335 with the mouse.  You can get fancy 3D-style scroll bars, even without
336 Gtk or Motif, if you have the Xaw3d library installed (see
337 "Image support libraries" above for Xaw3d availability).
339 You can tell configure where to search for GTK by giving it the
340 argument PKG_CONFIG='/full/name/of/pkg-config'.
342 Emacs will autolaunch a D-Bus session bus, when the environment
343 variable DISPLAY is set, but no session bus is running.  This might be
344 inconvenient for Emacs when running as daemon or running via a remote
345 ssh connection.  In order to completely prevent the use of D-Bus, configure
346 Emacs with the options '--without-dbus --without-gconf --without-gsettings'.
348 To read email via a network protocol like IMAP or POP, you can
349 configure Emacs with the option '--with-mailutils', so that it always
350 uses the GNU Mailutils 'movemail' program to retrieve mail; this is
351 the default if GNU Mailutils is installed.  Otherwise the Emacs build
352 procedure builds and installs an auxiliary 'movemail' program, a
353 limited and insecure substitute; when this happens, there are several
354 configure options such as --without-pop that provide fine-grained
355 control over Emacs 'movemail' construction.
357 The Emacs mail reader RMAIL is configured to be able to read mail from
358 a POP3 server by default.  Versions of the POP protocol older than
359 POP3 are not supported.  While POP3 support is typically enabled,
360 whether Emacs actually uses POP3 is controlled by individual users;
361 see the Rmail chapter of the Emacs manual.  Unless --with-mailutils is
362 in effect, it is a good idea to configure without POP3 support so that
363 users are less likely to inadvertently read email via insecure
364 channels.  On native MS-Windows, --with-pop is the default; on other
365 platforms, --without-pop is the default.
367 For image support you may have to download, build, and install the
368 appropriate image support libraries for image types other than XBM and
369 PBM, see the list of URLs in "Image support libraries" above.
370 (Note that PNG support requires libz in addition to libpng.)
372 To disable individual types of image support in Emacs for some reason,
373 even though configure finds the libraries, you can configure with one
374 or more of these options:
376   --without-xpm          for XPM image support
377   --without-jpeg         for JPEG image support
378   --without-tiff         for TIFF image support
379   --without-gif          for GIF image support
380   --without-png          for PNG image support
381   --without-rsvg         for SVG image support
382   --without-webp         for WebP image support
384 Although ImageMagick support is disabled by default due to security
385 and stability concerns, you can enable it with --with-imagemagick.
387 Use --without-toolkit-scroll-bars to disable Motif or Xaw3d scroll bars.
389 Use --without-xim to inhibit the default use of X Input Methods.
390 In this case, the X resource useXIM can be used to turn on use of XIM.
392 Use --without-xinput2 to disable the use of version 2 of the X Input
393 Extension.  This disables support for touchscreens, pinch gestures,
394 and scroll wheels that report scroll deltas at pixel-level precision.
396 Use --disable-largefile to omit support for files larger than 2GB, and
397 --disable-year2038 to omit support for timestamps past the year 2038,
398 on systems which allow omitting such support.  This may help when
399 linking Emacs to a library with an ABI that requires a particular
400 width for off_t or for time_t.
402 Use --without-sound to disable sound support.
404 Use --without-all for a smaller executable with fewer dependencies on
405 external libraries, at the cost of disabling many features.  Although
406 --without-all disables libraries not needed for ordinary Emacs
407 operation, it does enable X support, and using the GTK2 or GTK3
408 toolkit creates a lot of library dependencies.  So if you want to
409 build a small executable with very basic X support, use --without-all
410 --with-x-toolkit=no.  For the smallest possible executable without X,
411 use --without-all --without-x.  If you want to build with just a few
412 features enabled, you can combine --without-all with --with-FEATURE.
413 For example, you can use --without-all --without-x --with-dbus to
414 build with D-Bus support and nothing more.
416 Use --with-gnutls=ifavailable to use GnuTLS if available but go ahead
417 and build without it if not available.  This overrides Emacs's default
418 behavior of refusing to build if GnuTLS is absent.  When X11 support
419 is enabled, the libraries for gif, jpeg, png, tiff, and xpm are in the
420 same strongly-recommended category as GnuTLS, and have similar options.
422 Use --with-wide-int to implement Emacs values with the type 'long long',
423 even on hosts where a narrower type would do.  With this option, on a
424 typical 32-bit host, Emacs integers have 62 bits instead of 30.
426 Use --with-cairo to compile Emacs with Cairo drawing.
428 Use --with-cairo-xcb to also utilize the Cairo XCB backend on systems
429 where it is available.  While such a configuration is moderately
430 faster when running over X connections with high latency, it is likely
431 to crash when a new frame is created on a display connection opened
432 after a display connection is closed.
434 Use --with-modules to build Emacs with support for dynamic modules.
435 This needs a C compiler that supports '__attribute__ ((cleanup (...)))',
436 as in GCC 3.4 and later.
438 Use --enable-gcc-warnings to enable compile-time checks that warn
439 about possibly-questionable C code.  This is intended for developers
440 and is useful with GNU-compatible compilers.  On a recent GNU system
441 there should be no warnings; on older and on non-GNU systems the
442 generated warnings may still be useful, though you may prefer
443 configuring with --enable-gcc-warnings=warn-only so they are not
444 treated as errors.  The default is --enable-gcc-warnings=warn-only if
445 it appears to be a developer build, and is --disable-gcc-warnings
446 otherwise.
448 Use --disable-silent-rules to cause 'make' to give more details about
449 the commands it executes.  This can be helpful when debugging a build
450 that goes awry.  'make V=1' also enables the extra chatter.
452 Use --enable-link-time-optimization to enable link-time optimization.
453 With GCC, you need GCC 4.5.0 and later, and 'configure' arranges for
454 linking to be parallelized if possible.  With Clang, you need GNU
455 binutils with the gold linker and plugin support, along with the LLVM
456 gold plugin <https://llvm.org/docs/GoldPlugin.html>.  Link time
457 optimization is not the default as it tends to cause crashes and to
458 make Emacs slower.
460 The '--prefix=PREFIXDIR' option specifies where the installation process
461 should put emacs and its data files.  This defaults to '/usr/local'.
462 - Emacs (and the other utilities users run) go in PREFIXDIR/bin
463   (unless the '--exec-prefix' option says otherwise).
464 - The architecture-independent files go in PREFIXDIR/share/emacs/VERSION
465   (where VERSION is the version number of Emacs, like '23.2').
466 - The architecture-dependent files go in
467   PREFIXDIR/libexec/emacs/VERSION/CONFIGURATION
468   (where CONFIGURATION is the configuration name, like
469   i686-pc-linux-gnu), unless the '--exec-prefix' option says otherwise.
471 If you don't have write access to the default '/usr/local' tree, and
472 cannot have root access (without which "make install" will fail),
473 specify '--prefix=PREFIXDIR' where PREFIXDIR is a directyory writeable
474 by your user, for example your HOME directory or some subdirectory of
477 The '--exec-prefix=EXECDIR' option allows you to specify a separate
478 portion of the directory tree for installing architecture-specific
479 files, like executables and utility programs.  If specified,
480 - Emacs (and the other utilities users run) go in EXECDIR/bin, and
481 - The architecture-dependent files go in
482   EXECDIR/libexec/emacs/VERSION/CONFIGURATION.
483 EXECDIR/bin should be a directory that is normally in users' PATHs.
485 For example, the command
487     ./configure --build=i386-linux-gnu --without-sound
489 configures Emacs to build for a 32-bit GNU/Linux distribution,
490 without sound support.
492 'configure' doesn't do any compilation or installation itself.
493 It just creates the files that influence those things:
494 './Makefile' in the top-level directory and several subdirectories;
495 and './src/config.h'.
497 When it is done, 'configure' prints a description of what it did and
498 creates a shell script 'config.status' which, when run, recreates the
499 same configuration.  If 'configure' exits with an error after
500 disturbing the status quo, it removes 'config.status'.  'configure'
501 also creates a file 'config.cache' that saves the results of its tests
502 to make reconfiguring faster, and a file 'config.log' containing compiler
503 output (useful mainly for debugging 'configure').  You can give
504 'configure' the option '--cache-file=FILE' to use the results of the
505 tests in FILE instead of 'config.cache'.  Set FILE to '/dev/null' to
506 disable caching, for debugging 'configure'.
508 If the description of the system configuration printed by 'configure'
509 is not right, or if it claims some of the features or libraries are not
510 available when you know they are, look at the 'config.log' file for
511 the trace of the failed tests performed by 'configure' to check
512 whether these features are supported.  Typically, some test fails
513 because the compiler cannot find some function in the system
514 libraries, or some macro-processor definition in the system headers.
516 Some tests might fail because the compiler should look in special
517 directories for some header files, or link against optional
518 libraries, or use special compilation options.  You can force
519 'configure' and the build process which follows it to do that by
520 setting the variables CPPFLAGS, CFLAGS, LDFLAGS, LIBS, CPP and CC
521 before running 'configure'.  CPP is the command which invokes the
522 preprocessor, CPPFLAGS lists the options passed to it, CFLAGS are
523 compilation options, LDFLAGS are options used when linking, LIBS are
524 libraries to link against, and CC is the command which invokes the
525 compiler.  By default, gcc is used if available.
527 Here's an example of a 'configure' invocation, assuming a Bourne-like
528 shell such as Bash, which uses these variables:
530   ./configure \
531     CPPFLAGS='-I/foo/myinclude' LDFLAGS='-L/bar/mylib' \
532     CFLAGS='-Og' LIBS='-lfoo -lbar'
534 (this is all one shell command).  This tells 'configure' to instruct the
535 preprocessor to look in the '/foo/myinclude' directory for header
536 files (in addition to the standard directories), instruct the linker
537 to look in '/bar/mylib' for libraries, pass the -Og optimization
538 switch to the compiler, and link against libfoo and libbar
539 libraries in addition to the standard ones.
541 For some libraries, like Gtk+, fontconfig and ALSA, 'configure' uses
542 pkg-config to find where those libraries are installed.
543 If you want pkg-config to look in special directories, you have to set
544 PKG_CONFIG_PATH to point to the directories where the .pc-files for
545 those libraries are.  For example:
547   ./configure \
548     PKG_CONFIG_PATH='/usr/local/alsa/lib/pkgconfig:/opt/gtk+-2.8/lib/pkgconfig'
550 3b) To build in a separate directory, go to that directory
551 and run the program 'configure' as follows:
553     SOURCE-DIR/configure CONFIGURATION-NAME [--OPTION[=VALUE]] ...
555 SOURCE-DIR refers to the top-level Emacs source directory which is
556 where Emacs's configure script is located.  'configure' looks for the
557 Emacs source code in the directory that 'configure' is in.
559 4) Put into './lisp/site-init.el' or './lisp/site-load.el' any Emacs
560 Lisp code you want Emacs to load before it is dumped out.  Use
561 site-load.el for additional libraries if you arrange for their
562 documentation strings to be in the etc/DOC file (see
563 src/Makefile.in if you wish to figure out how to do that).  For all
564 else, use site-init.el.  Do not load byte-compiled code which
565 was built with a non-nil value of 'byte-compile-dynamic'.
567 It is not a good idea to edit the normal .el files that come with Emacs.
568 Instead, use a file like site-init.el to change settings.
570 To change the value of a variable that is already defined in Emacs,
571 you should use the Lisp function 'setq', not 'defvar'.  For example,
573      (setq news-inews-program "/usr/bin/inews")
575 is how you would override the default value of the variable
576 news-inews-program.
578 Before you override a variable this way, *look at the value* that the
579 variable gets by default!  Make sure you know what kind of value the
580 variable should have.  If you don't pay attention to what you are
581 doing, you'll make a mistake.
583 The 'site-*.el' files are nonexistent in the distribution.  You do not
584 need to create them if you have nothing to put in them.
586 5) Refer to the file './etc/TERMS' for information on fields you may
587 wish to add to various termcap entries.  (This is unlikely to be necessary.)
589 6) Run 'make' in the top directory of the Emacs distribution to finish
590 building Emacs in the standard way.  The final executable file is named
591 'src/emacs'.  You can execute this file "in place" without copying it,
592 if you wish; then it automatically uses the sibling directories ../lisp,
593 ../lib-src, ../info, ../native-lisp (if built with support for native
594 compilation).
596 If you build Emacs in a directory separate from the source directory
597 ("out-of-tree"), run 'make' in the build directory.  Then you can
598 execute the 'src/emacs' file under that directory "in place".  However,
599 in this case the Emacs executable, while still using the ../lisp and
600 ../info subdirectories of the source tree, will use the ../lib-src and
601 ../native-lisp subdirectories from the build tree.
603 Or you can "install" the executable and the other files into their
604 installed locations, with 'make install'.  By default, Emacs's files
605 are installed in the following directories:
607 '/usr/local/bin' holds the executable programs users normally run -
608                 'emacs', 'etags', 'ctags', 'emacsclient'.
610 '/usr/local/share/emacs/VERSION/lisp' holds the Emacs Lisp library;
611                 'VERSION' stands for the number of the Emacs version
612                 you are installing, like '23.1' or '23.2'.  Since the
613                 Lisp library changes from one version of Emacs to
614                 another, including the version number in the path
615                 allows you to have several versions of Emacs installed
616                 at the same time; in particular, you don't have to
617                 make Emacs unavailable while installing a new version.
619 '/usr/local/lib/emacs/VERSION/native-lisp' holds the natively compiled
620                 pre-loaded Emacs Lisp files.  If the build used the
621                 'configure' option '--with-native-compilation=aot', then
622                 this directory holds all natively compiled Lisp files.
624 '~/.emacs.d/eln-cache/' holds the just-in-time natively compiled Lisp files.
626 '/usr/local/share/emacs/VERSION/etc' holds the Emacs tutorial, the DOC
627                 file, and other architecture-independent files Emacs
628                 might need while running.
630 '/usr/local/libexec/emacs/VERSION/CONFIGURATION-NAME' contains executable
631                 programs used by Emacs that users are not expected to
632                 run themselves.
633                 'VERSION' is the number of the Emacs version you are
634                 installing, and 'CONFIGURATION-NAME' is the value
635                 deduced by the 'configure' program to identify the
636                 architecture and operating system of your machine,
637                 like 'i686-pc-linux-gnu' or 'sparc-sun-sunos'.  Since
638                 these files are specific to the version of Emacs,
639                 operating system, and architecture in use, including
640                 the configuration name in the path allows you to have
641                 several versions of Emacs for any mix of machines and
642                 operating systems installed at the same time; this is
643                 useful for sites at which different kinds of machines
644                 share the file system Emacs is installed on.
646 '/usr/local/share/info' holds the on-line documentation for Emacs,
647                 known as "info files".  Many other GNU programs are
648                 documented using info files as well, so this directory
649                 stands apart from the other, Emacs-specific directories.
651 '/usr/local/share/man/man1' holds the man pages for the programs installed
652                 in '/usr/local/bin'.
654 Any version of Emacs, whether installed or not, also looks for Lisp
655 files in these directories.
657 '/usr/local/share/emacs/VERSION/site-lisp' holds the local Emacs Lisp
658                 files installed for Emacs version VERSION only.
660 '/usr/local/share/emacs/site-lisp' holds the local Emacs Lisp
661                 files installed for all Emacs versions.
663                 When Emacs is installed, it searches for its Lisp files
664                 in '/usr/local/share/emacs/VERSION/site-lisp', then in
665                 '/usr/local/share/emacs/site-lisp', and finally in
666                 '/usr/local/share/emacs/VERSION/lisp'.
668 If these directories are not what you want, you can specify where to
669 install Emacs's libraries and data files or where Emacs should search
670 for its Lisp files by giving values for 'make' variables as part of
671 the command.  See the section below called 'MAKE VARIABLES' for more
672 information on this.
674 7) Check the file 'dir' in your site's info directory (usually
675 /usr/local/share/info) to make sure that it has a menu entry for the
676 Emacs info files.
678 8) If your system uses lock files to interlock access to mailer inbox files,
679 and if --with-mailutils is not in effect, then you might need to
680 make the Emacs-specific 'movemail' program setuid or setgid in order
681 to enable it to write the lock files.  We believe this is safe.
683 9) You are done!  You can remove executables and object files from
684 the build directory by typing 'make clean'.  To also remove the files
685 that 'configure' created (so you can compile Emacs for a different
686 configuration), type 'make distclean'.
689 MAKE VARIABLES
691 You can change where the build process installs Emacs and its data
692 files by specifying values for 'make' variables as part of the 'make'
693 command line.  For example, if you type
695     make install bindir=/usr/local/gnubin
697 the 'bindir=/usr/local/gnubin' argument indicates that the Emacs
698 executable files should go in '/usr/local/gnubin', not
699 '/usr/local/bin'.
701 Here is a complete list of the variables you may want to set.
703 'bindir' indicates where to put executable programs that users can
704         run.  This defaults to /usr/local/bin.
706 'datadir' indicates where to put the architecture-independent
707         read-only data files that Emacs refers to while it runs; it
708         defaults to /usr/local/share.  We create the following
709         subdirectories under 'datadir':
710         - 'emacs/VERSION/lisp', containing the Emacs Lisp library, and
711         - 'emacs/VERSION/etc', containing the tutorials, DOC file, etc.
712         'VERSION' is the number of the Emacs version you are installing,
713         like '23.1' or '23.2'.  Since these files vary from one version
714         of Emacs to another, including the version number in the path
715         allows you to have several versions of Emacs installed at the
716         same time; this means that you don't have to make Emacs
717         unavailable while installing a new version.
719 'libexecdir' indicates where to put architecture-specific data files that
720         Emacs refers to as it runs; it defaults to '/usr/local/libexec'.
721         We create the following subdirectories under 'libexecdir':
722         - 'emacs/VERSION/CONFIGURATION-NAME', containing executable
723                 programs used by Emacs that users are not expected to run
724                 themselves.
725         'VERSION' is the number of the Emacs version you are installing,
726         and 'CONFIGURATION-NAME' is the value deduced by the
727         'configure' program to identify the architecture and operating
728         system of your machine, like 'i686-pc-linux-gnu' or 'sparc-sun-sunos'.
729         Since these files are specific to the version of Emacs,
730         operating system, and architecture in use, including the
731         configuration name in the path allows you to have several
732         versions of Emacs for any mix of machines and operating
733         systems installed at the same time; this is useful for sites
734         at which different kinds of machines share the file system
735         Emacs is installed on.
737 'infodir' indicates where to put the info files distributed with
738         Emacs; it defaults to '/usr/local/share/info'.
740 'mandir' indicates where to put the man pages for Emacs and its
741         utilities (like 'etags'); it defaults to
742         '/usr/local/share/man/man1'.
744 'prefix' doesn't give a path for any specific part of Emacs; instead,
745         its value is used to determine the defaults for all the
746         architecture-independent path variables - 'datadir',
747         'sharedstatedir', 'infodir', and 'mandir'.  Its default value is
748         '/usr/local'; the other variables add on 'lib' or 'man' to it
749         by default.
751         For example, suppose your site generally places GNU software
752         under '/usr/users/software/gnusoft' instead of '/usr/local'.
753         By including
754             'prefix=/usr/users/software/gnusoft'
755         in the arguments to 'make', you can instruct the build process
756         to place all of the Emacs data files in the appropriate
757         directories under that path.
759 'exec_prefix' serves the same purpose as 'prefix', but instead
760         determines the default values for the architecture-dependent
761         path variables - 'bindir' and 'libexecdir'.
763 The above variables serve analogous purposes in the makefiles for all
764 GNU software; the following variables are specific to Emacs.
766 'archlibdir' indicates where Emacs installs and expects the executable
767         files and other architecture-dependent data it uses while
768         running.  Its default value, based on 'libexecdir' (which
769         see), is '/usr/local/libexec/emacs/VERSION/CONFIGURATION-NAME'
770         (where VERSION and CONFIGURATION-NAME are as described above).
772 'GZIP_PROG' is the name of the executable that compresses installed info,
773         manual, and .el files.  It defaults to gzip.  Setting it to
774         the empty string suppresses compression.
776 Remember that you must specify any variable values you need each time
777 you run 'make' in the top directory.  If you run 'make' once to build
778 emacs, test it, and then run 'make' again to install the files, you
779 must provide the same variable settings each time.  To make the
780 settings persist, you can edit them into the 'Makefile' in the top
781 directory, but be aware that running the 'configure' program erases
782 'Makefile' and rebuilds it from 'Makefile.in'.
784 The path for finding Lisp files is specified in src/epaths.h,
785 a file which is generated by running configure.  To change the path,
786 you can edit the definition of PATH_LOADSEARCH in that file
787 before you run 'make'.
789 The top-level Makefile stores the variable settings it used in the
790 Makefiles for the subdirectories, so you don't have to specify them
791 when running make in the subdirectories.
794 PROBLEMS
796 See the file './etc/PROBLEMS' for a list of various problems sometimes
797 encountered, and what to do about them.
799 This file is part of GNU Emacs.
801 GNU Emacs is free software: you can redistribute it and/or modify
802 it under the terms of the GNU General Public License as published by
803 the Free Software Foundation, either version 3 of the License, or
804 (at your option) any later version.
806 GNU Emacs is distributed in the hope that it will be useful,
807 but WITHOUT ANY WARRANTY; without even the implied warranty of
808 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
809 GNU General Public License for more details.
811 You should have received a copy of the GNU General Public License
812 along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.