]> code.delx.au - gnu-emacs/blobdiff - INSTALL
* INSTALL: Remove the "by hand" sections.
[gnu-emacs] / INSTALL
diff --git a/INSTALL b/INSTALL
index 925c8b2de71f248975c94f49859e32fe373c66a0..8ecee65aaa56e07e25a626c1de7c026a6d30419b 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,14 +1,13 @@
 GNU Emacs Installation Guide
-Copyright (C) 1992, 1994, 1996-1997, 2000-2013
-  Free Software Foundation, Inc.
+Copyright (C) 1992, 1994, 1996-1997, 2000-2014 Free Software Foundation, Inc.
 See the end of the file for license conditions.
 
 
 This file contains general information on building GNU Emacs.
 For more information specific to the MS-Windows, GNUstep/Mac OS X, and
 MS-DOS ports, also read the files nt/INSTALL, nextstep/INSTALL, and
-msdos/INSTALL.  For information about building from a Bazaar checkout
-(rather than a release), also read the file INSTALL.BZR.
+msdos/INSTALL.  For information about building from a repository checkout
+(rather than a release), also read the file INSTALL.REPO.
 
 
 BASIC INSTALLATION
@@ -24,6 +23,9 @@ find some things, or what options to use.
 `src/config.h' file containing system-dependent definitions.
 Running the `make' utility then builds the package for your system.
 
+Building Emacs requires GNU make, <http://www.gnu.org/software/make/>.
+On most systems that Emacs supports, this is the default `make' program.
+
 Here's the procedure to build Emacs using `configure' on systems which
 are supported by it.  In some cases, if the simplified procedure fails,
 you might need to use various non-default options, and maybe perform
@@ -31,9 +33,9 @@ some of the steps manually.  The more detailed description in the other
 sections of this guide will help you do that, so please refer to those
 sections if you need to.
 
-  1. Unpacking the Emacs 24.1 release requires about 180 MB of free
-  disk space.  Building Emacs uses about another 70 MB of space.
-  The final installed Emacs uses about 110 MB of disk space.
+  1. Unpacking the Emacs 24 release requires about 200 MB of free
+  disk space.  Building Emacs uses about another 200 MB of space.
+  The final installed Emacs uses about 150 MB of disk space.
   This includes the space-saving that comes from automatically
   compressing the Lisp source files on installation.
 
@@ -49,7 +51,6 @@ sections if you need to.
                 SOURCE-DIR/configure
 
       where SOURCE-DIR is the top-level Emacs source directory.
-      This may not work unless you use GNU make.
 
   3. When `configure' finishes, it prints several lines of details
      about the system configuration.  Read those details carefully
@@ -62,32 +63,24 @@ sections if you need to.
      name, where to find various headers and libraries, etc.
      Refer to the section DETAILED BUILDING AND INSTALLATION below.
 
-     If `configure' didn't find some (optional) image support libraries,
-     such as Xpm, jpeg, etc., and you want to use them, refer to the
-     subsection "Image support libraries" below.
+     If `configure' didn't find some image support libraries, such as
+     Xpm and jpeg, refer to "Image support libraries" below.
 
      If the details printed by `configure' don't make any sense to
      you, but there are no obvious errors, assume that `configure' did
      its job and proceed.
 
-  4. If you need to run the `configure' script more than once (e.g.,
-     with some non-default options), always clean the source
-     directories before running `configure' again:
-
-               make distclean
-               ./configure
-
-  5. Invoke the `make' program:
+  4. Invoke the `make' program:
 
                 make
 
-  6. If `make' succeeds, it will build an executable program `emacs'
+  5. If `make' succeeds, it will build an executable program `emacs'
      in the `src' directory.  You can try this program, to make sure
      it works:
 
                 src/emacs -Q
 
-  7. Assuming that the program `src/emacs' starts and displays its
+  6. Assuming that the program `src/emacs' starts and displays its
      opening screen, you can install the program and its auxiliary
      files into their installation directories:
 
@@ -101,6 +94,10 @@ sections if you need to.
 
   You can delete the entire build directory if you do not plan to
   build Emacs again, but it can be useful to keep for debugging.
+  If you want to build Emacs again with different configure options,
+  first clean the source directories:
+
+               make distclean
 
   Note that the install automatically saves space by compressing
   (provided you have the `gzip' program) those installed Lisp source (.el)
@@ -120,19 +117,7 @@ packages.  Note that if there is a separate `dev' or `devel' package,
 for use at compilation time rather than run time, you will need that
 as well as the corresponding run time package; typically the dev
 package will contain header files and a library archive.  Otherwise,
-you can download and build libraries from sources.
-
-The sources of these libraries are available by anonymous CVS from
-cvs.m17n.org.
-
-    % cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/m17n login
-    % cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/m17n co m17n-db
-    % cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/m17n co m17n-lib
-    % cvs -d :pserver:anonymous@cvs.m17n.org:/cvs/m17n co libotf
-
-For m17n-lib, if you have problems with making the whole package
-because you lack some other packages on which m17n-lib depends, try to
-configure it with the option "--without-gui".
+you can download the libraries from <http://www.nongnu.org/m17n/>.
 
 Note that Emacs cannot support complex scripts on a TTY, unless the
 terminal includes such a support.
@@ -157,37 +142,41 @@ in the intlfonts/README file.
 
 * Image support libraries
 
-Emacs needs optional libraries to be able to display images (with the
-exception of PBM and XBM images whose support is built-in).
+Emacs needs libraries to display images, with the exception of PBM and
+XBM images whose support is built-in.
 
 On some systems, particularly on GNU/Linux, these libraries may
-already be present or available as additional packages.  Note that if
+already be present or available as additional packages.  If
 there is a separate `dev' or `devel' package, for use at compilation
 time rather than run time, you will need that as well as the
 corresponding run time package; typically the dev package will
 contain header files and a library archive.  Otherwise, you can
-download and build libraries from sources.  None of them are vital for
-running Emacs; however, note that Emacs will not be able to use
-colored icons in the toolbar if XPM support is not compiled in.
-
-Here's the list of some of these optional libraries, and the URLs
-where they can be found (in the unlikely event that your distribution
-does not provide them):
-
-  . libXaw3d          http://directory.fsf.org/project/xaw3d/
-  . libxpm for XPM:   http://www.x.org/releases/current/src/lib/
-  . libpng for PNG:   http://www.libpng.org/
-  . libz (for PNG):   http://www.zlib.net/
-  . libjpeg for JPEG: http://www.ijg.org/
-  . libtiff for TIFF: http://www.libtiff.org/
-  . libgif for GIF:   http://sourceforge.net/projects/giflib/
-
-Emacs will configure itself to build with these libraries if the
-`configure' script finds them on your system, unless you supply the
-appropriate --without-LIB option.  In some cases, older versions of
-these libraries won't work because some routines are missing, and
-configure should avoid such old versions.  If that happens, use the
---without-LIB options to `configure', if you need to.
+download and build libraries from sources.  Although none of them are
+essential for running Emacs, some are important enough that
+'configure' will report an error if they are absent from a system that
+has X11 support, unless 'configure' is specifically told to omit them.
+
+Here's a list of some of these libraries, and the URLs where they
+can be found (in the unlikely event that your distribution does not
+provide them).  By default, libraries marked with an X are required if
+X11 is being used.
+
+    libXaw3d          http://directory.fsf.org/project/xaw3d/
+  X libxpm for XPM:   http://www.x.org/releases/current/src/lib/
+  X libpng for PNG:   http://www.libpng.org/
+    libz (for PNG):   http://www.zlib.net/
+  X libjpeg for JPEG: http://www.ijg.org/
+  X libtiff for TIFF: http://www.remotesensing.org/libtiff/
+  X libgif for GIF:   http://sourceforge.net/projects/giflib/
+    librsvg2 for SVG: http://wiki.gnome.org/action/show/Projects/LibRsvg
+
+If you supply the appropriate --without-LIB option, 'configure' will
+omit the corresponding library from Emacs, even if that makes for a
+less-pleasant user interface.  Otherwise, Emacs will configure itself
+to build with these libraries if 'configure' finds them on your
+system, and 'configure' will complain and exit if a library marked 'X'
+is not found on a system that uses X11.  Use --without-LIB if your
+version of a library won't work because some routines are missing.
 
 * Extra fonts
 
@@ -212,30 +201,17 @@ The names of the packages that you need varies according to the
 GNU/Linux distribution that you use, and the options that you want to
 configure Emacs with.  On Debian-based systems, you can install all the
 packages needed to build the installed version of Emacs with a command
-like `apt-get build-dep emacs23'.  On Red Hat systems, the
+like `apt-get build-dep emacs24'.  On Red Hat systems, the
 corresponding command is `yum-builddep emacs'.
 
 
 DETAILED BUILDING AND INSTALLATION:
 
-(This is for a Unix or Unix-like system.  For MS-DOS and MS Windows 3.X,
-see msdos/INSTALL.  For later versions of MS Windows, see the file
-nt/INSTALL.  For GNUstep and Mac OS X, see nextstep/INSTALL.)
-
-1) Make sure your system has enough swapping space allocated to handle
-a program whose pure code is 1.5 MB and whose data area is at
-least 2.8 MB and can reach 100 MB or more.  If the swapping space is
-insufficient, you will get an error in the command `temacs -batch -l
-loadup dump', found in `./src/Makefile.in', or possibly when
-running the final dumped Emacs.  (This should not be an issue
-on any recent system.)
-
-Building Emacs requires about 230 MB of disk space (including the
-Emacs sources).  Once installed, Emacs occupies about 120 MB in the file
-system where it is installed; this includes the executable files, Lisp
-libraries, miscellaneous data files, and on-line documentation.  If
-the building and installation take place in different directories,
-then the installation procedure momentarily requires 230+120 MB.
+(This is for a Unix or Unix-like system.  For GNUstep and Mac OS X,
+see nextstep/INSTALL.  For non-ancient versions of MS Windows, see
+the file nt/INSTALL.  For MS-DOS and MS Windows 3.X, see msdos/INSTALL.)
+
+1) See the basic installation summary above for the disk space requirements.
 
 2) In the unlikely event that `configure' does not detect your system
 type correctly, consult `./etc/MACHINES' to see what --host, --build
@@ -267,18 +243,14 @@ accept a list of directories, separated with colons.
 To get more attractive menus, you can specify an X toolkit when you
 configure Emacs; use the option `--with-x-toolkit=TOOLKIT', where
 TOOLKIT is `gtk' (the default), `athena', or `motif' (`yes' and
-`lucid' are synonyms for `athena').  On some systems, it does not work
-to use a toolkit with shared libraries.  A free implementation of
-Motif, called LessTif, is available from <http://www.lesstif.org>.
-Compiling with LessTif or Motif causes a standard File Selection
-Dialog to pop up when you invoke file commands with the mouse.  You
-can get fancy 3D-style scroll bars, even without Gtk or LessTif/Motif,
-if you have the Xaw3d library installed (see "Image support libraries"
-above for Xaw3d availability).
-
-You can tell configure where to search for GTK by specifying
-`--with-pkg-config-prog=PATH' where PATH is the pathname to
-pkg-config.  Note that GTK version 2.6 or newer is required for Emacs.
+`lucid' are synonyms for `athena').  Compiling with Motif causes a
+standard File Selection Dialog to pop up when you invoke file commands
+with the mouse.  You can get fancy 3D-style scroll bars, even without
+Gtk or Motif, if you have the Xaw3d library installed (see
+"Image support libraries" above for Xaw3d availability).
+
+You can tell configure where to search for GTK by giving it the
+argument PKG_CONFIG='/full/name/of/pkg-config'.
 
 Emacs will autolaunch a D-Bus session bus, when the environment
 variable DISPLAY is set, but no session bus is running.  This might be
@@ -295,7 +267,7 @@ individual users--see the Rmail chapter of the Emacs manual.
 
 For image support you may have to download, build, and install the
 appropriate image support libraries for image types other than XBM and
-PBM, see the list of URLs in "ADDITIONAL DISTRIBUTION FILES" above.
+PBM, see the list of URLs in "Image support libraries" above.
 (Note that PNG support requires libz in addition to libpng.)
 
 To disable individual types of image support in Emacs for some reason,
@@ -307,9 +279,9 @@ or more of these options:
   --without-tiff       for TIFF image support
   --without-gif        for GIF image support
   --without-png        for PNG image support
+  --without-rsvg       for SVG image support
 
-Use --without-toolkit-scroll-bars to disable LessTif/Motif or Xaw3d
-scroll bars.
+Use --without-toolkit-scroll-bars to disable Motif or Xaw3d scroll bars.
 
 Use --without-xim to inhibit the default use of X Input Methods.
 In this case, the X resource useXIM can be used to turn on use of XIM.
@@ -319,21 +291,17 @@ systems which support that.
 
 Use --without-sound to disable sound support.
 
-Use --without-all if you want to build a small executable with the minimal
-dependencies on external libraries, at the cost of disabling most of the
-features that are normally enabled by default.  Using --without-all is
-equivalent to --without-sound --without-dbus --without-libotf
---without-selinux --without-xft --without-gsettings --without-gnutls
---without-rsvg --without-xml2 --without-gconf --without-imagemagick
---without-m17n-flt --without-jpeg --without-tiff --without-gif
---without-png --without-gpm.  Note that --without-all leaves X support
-enabled, and using the GTK2 or GTK3 toolkit creates a lot of library
-dependencies.  So if you want to build a small executable with very basic
-X support, use --without-all --with-x-toolkit=no.  For the smallest possible
-executable without X, use --without-all --without-x.  If you want to build
-with just a few features enabled, you can combine --without-all with
---with-FEATURE.  For example, you can use --without-all --with-dbus
-to build with DBus support and nothing more.
+Use --without-all for a smaller executable with fewer dependencies on
+external libraries, at the cost of disabling many features.  Although
+--without-all disables libraries not needed for ordinary Emacs
+operation, it does enable X support, and using the GTK2 or GTK3
+toolkit creates a lot of library dependencies.  So if you want to
+build a small executable with very basic X support, use --without-all
+--with-x-toolkit=no.  For the smallest possible executable without X,
+use --without-all --without-x.  If you want to build with just a few
+features enabled, you can combine --without-all with --with-FEATURE.
+For example, you can use --without-all --without-x --with-dbus to
+build with DBus support and nothing more.
 
 Use --with-wide-int to implement Emacs values with the type 'long long',
 even on hosts where a narrower type would do.  With this option, on a
@@ -345,12 +313,22 @@ and is useful with GNU-compatible compilers.  On a recent GNU system
 there should be no warnings; on older and on non-GNU systems the
 generated warnings may still be useful.
 
-Use --enable-link-time-optimization to enable link-time optimizer, which
-is available in GNU compiler since version 4.5.0.  If your compiler is not
-GNU or older than version 4.5.0, this option does nothing.  If `configure'
-can determine number of online CPUS on your system, final link-time
-optimization and code generation is executed in parallel using one job
-per each available online CPU.
+Use --enable-silent-rules to cause 'make' to chatter less.  This is
+helpful when combined with options like --enable-gcc-warnings that
+generate long shell-command lines.  'make V=0' also suppresses the
+chatter.
+
+Use --enable-link-time-optimization to enable link-time optimizer.  If
+you're using GNU compiler, this feature is supported since version 4.5.0.
+If `configure' can determine number of online CPUS on your system, final
+link-time optimization and code generation is executed in parallel using
+one job per each available online CPU.
+
+This option is also supported for clang.  You should have GNU binutils
+with `gold' linker and plugin support, and clang with LLVMgold.so plugin.
+Read http://llvm.org/docs/GoldPlugin.html for details.  Also note that
+this feature is still experimental, so prepare to build binutils and
+clang from the corresponding source code repositories.
 
 The `--prefix=PREFIXDIR' option specifies where the installation process
 should put emacs and its data files.  This defaults to `/usr/local'.
@@ -381,8 +359,7 @@ without sound support.
 `configure' doesn't do any compilation or installation itself.
 It just creates the files that influence those things:
 `./Makefile' in the top-level directory and several subdirectories;
-and `./src/config.h'.  For details on exactly what it does, see the
-section called `CONFIGURATION BY HAND', below.
+and `./src/config.h'.
 
 When it is done, `configure' prints a description of what it did and
 creates a shell script `config.status' which, when run, recreates the
@@ -417,10 +394,11 @@ compiler.  By default, gcc is used if available.
 Here's an example of a `configure' invocation, assuming a Bourne-like
 shell such as Bash, which uses these variables:
 
- CPPFLAGS='-I/foo/myinclude' LDFLAGS='-L/bar/mylib' \
-  CFLAGS='-O3' LIBS='-lfoo -lbar' ./configure
+  ./configure \
+    CPPFLAGS='-I/foo/myinclude' LDFLAGS='-L/bar/mylib' \
+    CFLAGS='-O3' LIBS='-lfoo -lbar'
 
-(this is all one long line).  This tells `configure' to instruct the
+(this is all one shell command).  This tells `configure' to instruct the
 preprocessor to look in the `/foo/myinclude' directory for header
 files (in addition to the standard directories), instruct the linker
 to look in `/bar/mylib' for libraries, pass the -O3 optimization
@@ -430,17 +408,11 @@ libraries in addition to the standard ones.
 For some libraries, like Gtk+, fontconfig and ALSA, `configure' uses
 pkg-config to find where those libraries are installed.
 If you want pkg-config to look in special directories, you have to set
-the environment variable PKG_CONFIG_PATH to point to the directories
-where the .pc-files for those libraries are.
-For example:
-
- PKG_CONFIG_PATH='/usr/local/alsa/lib/pkgconfig:/opt/gtk+-2.8/lib/pkgconfig' \
-   ./configure
+PKG_CONFIG_PATH to point to the directories where the .pc-files for
+those libraries are.  For example:
 
-The work of `configure' can be done by editing various files in the
-distribution, but using `configure' is easier.  See the section called
-"CONFIGURATION BY HAND" below if you want to do the configuration
-yourself.
+  ./configure \
+    PKG_CONFIG_PATH='/usr/local/alsa/lib/pkgconfig:/opt/gtk+-2.8/lib/pkgconfig'
 
 3b) To build in a separate directory, go to that directory
 and run the program `configure' as follows:
@@ -451,13 +423,6 @@ SOURCE-DIR refers to the top-level Emacs source directory which is
 where Emacs's configure script is located.  `configure' looks for the
 Emacs source code in the directory that `configure' is in.
 
-To build in a separate directory, you must use a version of `make'
-that supports the `VPATH' variable, such as GNU `make'.
-
-(Do not try to build in a separate directory by creating many links
-to the real source directory--there is no need, and installation will
-fail.)
-
 4) Put into `./lisp/site-init.el' or `./lisp/site-load.el' any Emacs
 Lisp code you want Emacs to load before it is dumped out.  Use
 site-load.el for additional libraries if you arrange for their
@@ -482,10 +447,6 @@ variable gets by default!  Make sure you know what kind of value the
 variable should have.  If you don't pay attention to what you are
 doing, you'll make a mistake.
 
-If you set load-path to a different value in site-init.el or
-site-load.el, Emacs will use *precisely* that value when it starts up
-again.  If you do this, you are on your own!
-
 The `site-*.el' files are nonexistent in the distribution.  You do not
 need to create them if you have nothing to put in them.
 
@@ -574,11 +535,7 @@ to enable it to write the lock files.  We believe this is safe.
 9) You are done!  You can remove executables and object files from
 the build directory by typing `make clean'.  To also remove the files
 that `configure' created (so you can compile Emacs for a different
-configuration), type `make distclean'.  If you don't need some, or all
-of the input methods from the Leim package, you can remove the
-unneeded files in the leim subdirectories of your site's lisp
-directory (usually /usr/local/share/emacs/VERSION/).
-
+configuration), type `make distclean'.
 
 
 MAKE VARIABLES
@@ -686,94 +643,6 @@ Makefiles for the subdirectories, so you don't have to specify them
 when running make in the subdirectories.
 
 
-CONFIGURATION BY HAND
-
-This should not be necessary and is not recommended.  Instead of
-running the `configure' program, you have to perform the following steps.
-
-1) Copy `./src/config.in' to `./src/config.h'.
-
-2) Edit `./src/config.h' to set the right options for your system.
-
-3) Create `Makefile' files in various directories from the
-corresponding `Makefile.in' files.  This isn't so hard, just a matter
-of editing in appropriate substitutions for the @...@ constructs.
-
-The `configure' script is built from `configure.ac' by the
-`autogen.sh' script, which checks that `autoconf' and other build
-tools are sufficiently up to date and then runs the build tools.
-
-BUILDING GNU EMACS BY HAND
-
-Once Emacs is configured, running `make' in the top directory performs
-the following steps.
-
-1) Run `make epaths-force' in the top directory.  This produces
-`./src/epaths.h' from the template file `./src/epaths.in', changing
-the paths to the values specified in `./Makefile'.
-
-2) Go to directory `./lib' and run `make'.  This creates include files
-and libraries used in later steps.
-
-3) Go to directory `./lib-src' and run `make'.  This creates
-executables named `etags', `make-docfile', and others.
-
-4) Go to directory `./src' and run `make'.  This refers to files in
-the `./lisp', `./lib', and `./lib-src' subdirectories using names
-`../lisp', `../lib', and `../lib-src'.
-
-This creates a file `./src/emacs' which is the runnable Emacs,
-which has another name that contains a version number.
-Each time you do this, that version number increments in the last place.
-
-It also creates a file in `./etc' whose name is `DOC' followed by the
-current Emacs version.  This file contains documentation strings for
-all the functions in Emacs.  Each time you run make to make a new
-emacs, a new DOC file with a new name is made.  You must keep the DOC
-file for an Emacs version as long as you keep using that Emacs version.
-
-
-INSTALLATION BY HAND
-
-The steps below are done by running `make install' in the main
-directory of the Emacs distribution.
-
-1) Copy `./lisp' and its subdirectories, `./etc', and the executables
-in `./lib-src' to their final destinations, as selected in `./src/epaths.h'.
-
-Strictly speaking, not all of the executables in `./lib-src' need be copied.
-- The programs `hexl', `movemail', `profile', and `rcs2log'
-    are used by Emacs; they do need to be copied.
-- The programs `etags', `ctags', and `emacsclient' are intended to be
-    run by users; they are handled below.
-- The programs `make-docfile' and `test-distrib' were
-    used in building Emacs, and are not needed any more.
-
-2) Copy the files in `./info' to the place specified in
-`./lisp/site-init.el' or `./lisp/info.el'.  Note that if the
-destination directory already contains a file named `dir', you
-probably don't want to replace it with the `dir' file in the Emacs
-distribution.  Instead, you should make sure that the existing `dir'
-file contains an appropriate menu entry for the Emacs info.
-
-3) Copy `./src/emacs' to `/usr/local/bin', or to some other directory
-in users' search paths.  `./src/emacs' has an alternate name
-`./src/emacs-EMACSVERSION'; you may wish to make a symbolic link named
-`/usr/local/bin/emacs' pointing to that alternate name, as an easy way
-of installing different versions.
-
-You can delete `./src/temacs'.
-
-4) Copy the programs `emacsclient', `ctags', and `etags' from `./lib-src'
-to `/usr/local/bin'.  These programs are intended for users to run.
-
-5) Copy the man pages in `./doc/man' into the appropriate man directory.
-
-6) The files in the `./src' subdirectory, except for `emacs', are not
-used by Emacs once it is built.  However, it is very desirable to keep
-the source on line for debugging.
-
-
 PROBLEMS
 
 See the file `./etc/PROBLEMS' for a list of various problems sometimes