Merge from emacs-24; up to 2014-05-26T10:21:18Z!rgm@gnu.org
[bpt/emacs.git] / nt / INSTALL
index 434327b..949a4e4 100644 (file)
@@ -1,7 +1,7 @@
                    Building and Installing Emacs on MS-Windows
                           using the MSYS and MinGW tools
 
-  Copyright (C) 2013 Free Software Foundation, Inc.
+  Copyright (C) 2013-2014 Free Software Foundation, Inc.
   See the end of the file for license conditions.
 
 The MSYS/MinGW build described here is supported on versions of
@@ -9,15 +9,15 @@ Windows starting with Windows 2000 and newer.  Windows 9X are not
 supported (but the Emacs binary produced by this build will run on
 Windows 9X as well).
 
+  Do not use this recipe with Cygwin.  For building on Cygwin, use the
+  normal installation instructions, ../INSTALL.
+
 * For the brave (a.k.a. "impatient"):
 
   For those who have a working MSYS/MinGW development environment and
   are comfortable with running Posix configure scripts, here are the
   concise instructions for configuring and building the native Windows
-  binary of Emacs with these tools.
-
-  Do not use this recipe with Cygwin.  For building on Cygwin, use the
-  normal installation instructions, ../INSTALL.
+  binary of Emacs with these tools:
 
   0. Start the MSYS Bash window.  Everything else below is done from
      that window's Bash prompt.
@@ -44,12 +44,12 @@ Windows 9X as well).
      It is always preferable to use --prefix to configure Emacs for
      some specific location of its installed tree; the default
      /usr/local is not suitable for Windows (see the detailed
-     instructions for the reasons).
+     instructions for the reasons).  The prefix must be absolute.
 
      You can pass other options to the configure script.  Here's a
      typical example (for an in-place debug build):
 
-       CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./configure --prefix=/d/usr/emacs --enable-checking
+       CFLAGS='-O0 -g3' ./configure --prefix=/d/usr/emacs --enable-checking='yes,glyphs'
 
   3. After the configure script finishes, it should display the
      resulting configuration.  After that, type
@@ -82,7 +82,7 @@ Windows 9X as well).
   A correct installation makes all the rest almost trivial; a botched
   installation will likely make you miserable for quite some time.
 
-  There are two alternative to installing MinGW + MSYS: using the GUI
+  There are two alternatives to installing MinGW + MSYS: using the GUI
   installer, called mingw-get, provided by the MinGW project, or
   manual installation.  The next two sections describe each one of
   these.
@@ -122,7 +122,7 @@ Windows 9X as well).
   optional libraries near the end of this document, before you start
   the build.  Also, consider installing additional MinGW packages that
   are required/recommended, especially if you are building from the
-  Bazaar repository, as described in the next section.
+  repository, as described in the next section.
 
 ** Installing MinGW and MSYS manually
 
@@ -166,21 +166,21 @@ Windows 9X as well).
   been warned!
 
   Additional MinGW packages are required/recommended, especially if
-  you are building from the Bazaar repository:
+  you are building from the repository:
 
    . Texinfo (needed to produce the Info manuals when building from
-     bzr, and for "make install")
+     bzr/git, and for "make install")
 
      Available from http://sourceforge.net/projects/ezwinports/files/.
 
-   . gzip (needed to compress files during "make install")
+   . pkg-config (invoked by the configure script to look for optional
+     packages)
 
-     Available from http://gnuwin32.sourceforge.net/packages/gzip.htm.
+     Available from http://www.gtk.org/download/win32.php
 
-   . pkg-config (needed for building with some optional libraries,
-     such as GnuTLS and libxml2)
+   . gzip (needed to compress files during "make install")
 
-     Available from http://www.gtk.org/download/win32.php
+     Available from http://gnuwin32.sourceforge.net/packages/gzip.htm.
 
   Each package might list other packages as prerequisites on its
   download page (under "Runtime requirements"); download those as
@@ -218,9 +218,9 @@ Windows 9X as well).
       - mktemp
 
      These should only be needed if you intend to build development
-     versions of Emacs from the Bazaar repository.
+     versions of Emacs from the repository.
 
-   . Additional packages (needed only if building from the Bazaar
+   . Additional packages (needed only if building from the
      repository): Automake and Autoconf.  They are available from
      here:
 
@@ -231,6 +231,16 @@ Windows 9X as well).
   install the packages manually, we recommend to use the Windows port
   of the 'bsdtar' program, already mentioned above.
 
+  MSYS packages should be installed in a separate tree from MinGW.
+  For example, use D:\MSYS or D:\usr\MSYS as the top-level directory
+  from which you unpack all of the MSYS packages.
+
+  After installing Automake and Autoconf, make sure any of the *.m4
+  files you might have in your MinGW installation also exist in the
+  MSYS installation tree, in the share/aclocal directory.  Those *.m4
+  files which exist in the MinGW tree, but not in the MSYS tree should
+  be copied there.
+
   If/when you are confident in your MinGW/MSYS installation, and want
   to speed up the builds, we recommend installing a pre-release
   version of Make from here:
@@ -258,10 +268,6 @@ Windows 9X as well).
   states the missing or incompatible DLL; be sure to find and install
   these missing DLLs.
 
-  MSYS packages should be installed in a separate tree from MinGW.
-  For example, use D:\MSYS or D:\usr\MSYS as the top-level directory
-  from which you unpack all of the MSYS packages.
-
   Do NOT add the MSYS bin directory to your Windows Path!  Only the
   MinGW bin directory should be on Path.  When you install MSYS, it
   creates a shortcut on your desktop that invokes the MSYS Bash shell
@@ -279,7 +285,7 @@ Windows 9X as well).
   If you are building a release or pretest tarball, skip this section,
   because the configure script is already present in the tarball.
 
-  To build a development snapshot from the Emacs Bazaar repository,
+  To build a development snapshot from the Emacs repository,
   you will first need to generate the configure script and a few other
   auto-generated files.
 
@@ -292,7 +298,7 @@ Windows 9X as well).
 
      $ ./autogen.sh
      Checking whether you have the necessary tools...
-     (Read INSTALL.BZR for more details on building Emacs)
+     (Read INSTALL.REPO for more details on building Emacs)
 
      Checking for autoconf (need at least version 2.65)...
      ok
@@ -373,11 +379,11 @@ Windows 9X as well).
   A few frequently used options are needed when you want to produce an
   unoptimized binary with runtime checks enabled:
 
-     CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./configure --prefix=PREFIX --enable-checking
+     CFLAGS='-O0 -g3' ./configure --prefix=PREFIX --enable-checking='yes,glyphs'
 
   Once invoked, the configure script will run for some time, and, if
   successful, will eventually produce a summary of the configuration
-  like this:
+  similar to this:
 
      Configured for `i686-pc-mingw32'.
 
@@ -449,7 +455,7 @@ Windows 9X as well).
 * Make targets
 
   The following make targets may be used by users building the source
-  distribution, or users who have checked out of Bazaar after
+  distribution, or users who have checked out of the repository after
   an initial bootstrapping.
 
   make
@@ -471,7 +477,8 @@ Windows 9X as well).
   necessary to run the configure script followed by "make", in order
   to rebuild.
 
-  The following targets are intended only for use with the Bazaar sources.
+  The following targets are intended only for use with the repository
+  sources.
 
   make bootstrap
   Removes all the auto-generated files and all the *.elc byte-compiled
@@ -481,7 +488,7 @@ Windows 9X as well).
 
   make maintainer-clean
   Removes everything that can be recreated, including compiled Lisp
-  files, to get back to the state of a fresh Bazaar tree.  After make
+  files, to get back to the state of a fresh repository tree.  After make
   maintainer-clean, it is necessary to run configure and "make" or
   "make bootstrap" to rebuild.  Occasionally it may be necessary to
   run this target after an update.
@@ -534,7 +541,11 @@ Windows 9X as well).
   For PNG images, we recommend to use versions 1.4.x and later of
   libpng, because previous versions had security issues.  You can find
   precompiled libraries and headers on the GTK download page for
-  Windows (http://www.gtk.org/download/win32.php).
+  Windows (http://www.gtk.org/download/win32.php for 32-bit builds and
+  http://www.gtk.org/download/win64.php for 64-bit builds).  The
+  ezwinports site, http://sourceforge.net/projects/ezwinports/files/
+  also offers PNG (as well as other image libraries), which are
+  usually newer.
 
   Versions 1.4.0 and later of libpng are binary incompatible with
   earlier versions, so Emacs will only look for libpng libraries which
@@ -563,11 +574,106 @@ Windows 9X as well).
   libraries that are known to be compatible with the version given by
   `libgif-version'.
 
-  Binaries for the other image libraries can be found at the GnuWin32
-  project.  Note specifically that, due to some packaging snafus in
-  the GnuWin32-supplied image libraries, you will need to download
-  _source_ packages for some of the libraries in order to get the
-  header files necessary for building Emacs with image support.
+  For JPEG images, you will need libjpeg 6b or later, which will be
+  called libjpeg-N.dll, jpeg62.dll, libjpeg.dll, or jpeg.dll.  You can
+  find these on the ezwinports site.
+
+  TIFF images require libTIFF 3.0 or later, which will be called
+  libtiffN.dll or libtiff-N.dll or libtiff.dll.  These can be found on
+  the ezwinports site.
+
+  Pre-built versions of librsvg and its dependencies can be found in
+  one of these places:
+
+  1. http://sourceforge.net/projects/ezwinports/files/
+
+     This site includes a minimal (as much as possible for librsvg)
+     build of the library and its dependencies; it is also more
+     up-to-date with the latest upstream versions.  However, it
+     currently only offers 32-bit builds.  For building Emacs, you
+     need to download from this site all of the following *-bin.zip
+     archives:
+
+       librsvg, gdk-pixbuf, cairo, glib
+
+     The 'bin' archives on this site include both header files and the
+     libraries needed for building with librsvg and for running Emacs.
+     The librsvg archive includes all the shared libraries needed to
+     run Emacs with SVG support; the other 3 packages are required
+     because the compiler needs to see their header files when
+     building Emacs.
+
+  2. GTK project download site for Windows (see above for 2 URLs,
+     either for 32-bit builds or 64-bit builds)
+
+     This is the official Windows download site of the GTK project.
+     Its builds of librsvg are fatter, but are currently the only
+     alternative for 64-bit builds.  The easiest way to obtain the
+     dependencies required for building from this site is to download
+     a pre-bundled GTK+ development environment for Windows.  If you
+     would nevertheless like to download only the packages that are
+     strictly required, then, as of the time of this writing, here's
+     the list of GTK+ packages you will need:
+
+        librsvg, pango, freetype-2.4.11, freetype-2.4.2, croco, cairo,
+        glib, gdk-pixbuf, fontconfig, libpng-1.4.x, libpng-1.5.x,
+        libffi, libxml2, zlib
+
+     The GTK download page provides 2 separate archives for each
+     package: a 'bin' (binary) archive with programs and DLLs, and a
+     'dev' (development) archive with header files, import libraries,
+     and pkg-config files; download and install both archives for each
+     package you need.  (Sources of each package are available in a
+     separate, 3rd archive.)
+
+     As you see, some libraries for using this site's librsvg are
+     needed in more than one version -- this is because librsvg and
+     some of its dependencies were linked against different versions
+     of those libraries, and will look only for those DLLs when you
+     invoke SVG function.  So there's a bit of "DLL hell" involved
+     here, but at least in theory this should work, as each library
+     will dynamically link only against its dependencies, even if
+     another version of the same library is already loaded.  In
+     particular, at least 2 different versions of libpng will have to
+     be installed on your machine.  When you install these libpng
+     versions, be sure to keep the header files and the pkg-config
+     files in sync, i.e. install both the 'bin' and 'dev' archives of
+     the same libpng version together.
+
+  To use librsvg at runtime, ensure that librsvg and its dependencies
+  are on your PATH, or in the same directory as the emacs.exe binary.
+  If you are downloading from the ezwinports site, you only need to
+  install a single archive, librsvg-X.Y.Z-w32-bin.zip, which includes
+  all the dependency DLLs.  For the GTK project site, download the
+  'bin' archives for each of the libraries mentioned above.
+
+  If you think you've got all the dependencies and SVG support is
+  still not working, check your PATH for other libraries that shadow
+  the ones you downloaded.  Libraries of the same name from different
+  sources may not be compatible, this problem was encountered in the
+  past, e.g., with libcroco from gnome.org.
+
+  If you can see etc/images/splash.svg, then you have managed to get
+  SVG support working.  Congratulations for making it through DLL hell
+  to this point.  For some SVG images, you'll probably see error
+  messages from Glib about failed assertions, or warnings from Pango
+  about failure to load fonts (installing the missing fonts should fix
+  the latter kind of problems).  Problems have been observed in some
+  images that contain text, they seem to be a problem in the Windows
+  port of Pango, or maybe a problem with the way Cairo or librsvg is
+  using it that doesn't show up on other platforms.  However, Emacs
+  should not crash due to these issues.  If you eventually find the
+  SVG support too unstable to your taste, you can rebuild Emacs
+  without it by specifying the --without-rsvg switch to the configure
+  script.
+
+  Binaries for the other image libraries can be found on the
+  ezwinports site or at the GnuWin32 project (the latter are generally
+  very old, so not recommended).  Note specifically that, due to some
+  packaging snafus in the GnuWin32-supplied image libraries, you will
+  need to download _source_ packages for some of the libraries in
+  order to get the header files necessary for building Emacs with
+  image support.
 
 * Optional GnuTLS support
 
@@ -624,43 +730,6 @@ Windows 9X as well).
   You need the libiconv-X.Y.Z-N-mingw32-dev.tar.lzma tarball from that
   site.
 
-* Experimental SVG support
-
-  To compile with SVG, you will need pkg-config to be installed, as
-  the configure script invokes pkg-config to find out which compiler
-  switches to use for SVG.  See above for the URL where you can find
-  pkg-config for Windows.
-
-  SVG support is currently experimental, and not built by default.
-  Specify --with-rsvg and ensure you have all the dependencies in your
-  include path.  Unless you have built a minimalist librsvg yourself
-  (untested), librsvg depends on a significant chunk of GTK+ to build,
-  plus a few Gnome libraries, libxml2, libbz2 and zlib at runtime.  The
-  easiest way to obtain the dependencies required for building is to
-  download a pre-bundled GTK+ development environment for Windows.
-
-  To use librsvg at runtime, ensure that librsvg and its dependencies
-  are on your PATH.  If you didn't build librsvg yourself, you will
-  need to check with where you downloaded it from for the
-  dependencies, as there are different build options.  If it is a
-  short list, then it most likely only lists the immediate
-  dependencies of librsvg, but the dependencies themselves have
-  dependencies - so don't download individual libraries from GTK+,
-  download and install the whole thing.  If you think you've got all
-  the dependencies and SVG support is still not working, check your
-  PATH for other libraries that shadow the ones you downloaded.
-  Libraries of the same name from different sources may not be
-  compatible, this problem was encountered with libbzip2 from GnuWin32
-  with libcroco from gnome.org.
-
-  If you can see etc/images/splash.svg, then you have managed to get
-  SVG support working.  Congratulations for making it through DLL hell
-  to this point.  You'll probably find that some SVG images crash
-  Emacs.  Problems have been observed in some images that contain
-  text, they seem to be a problem in the Windows port of Pango, or
-  maybe a problem with the way Cairo or librsvg is using it that
-  doesn't show up on other platforms.
-
 \f
 This file is part of GNU Emacs.