1 Building and Installing Emacs on MS-Windows
2 using the MSYS and MinGW tools
4 Copyright (C) 2013-2015 Free Software Foundation, Inc.
5 See the end of the file for license conditions.
7 The MSYS/MinGW build described here is supported on versions of
8 Windows starting with Windows XP and newer. Building on Windows 2000
9 and Windows 9X is not supported (but the Emacs binary produced by this
10 build will run on Windows 9X and newer systems).
12 Do not use this recipe with Cygwin. For building on Cygwin, use the
13 normal installation instructions, ../INSTALL.
15 * For the brave (a.k.a. "impatient"):
17 For those who have a working MSYS/MinGW development environment and
18 are comfortable with running Posix configure scripts, here are the
19 concise instructions for configuring and building the native Windows
20 binary of Emacs with these tools:
22 0. Start the MSYS Bash window. Everything else below is done from
23 that window's Bash prompt.
25 0a. If you are building from the development trunk (as opposed to a
26 release tarball), produce the configure script, by typing from
27 the top-level Emacs source directory:
31 1. If you want to build Emacs outside of the source tree
32 (recommended), create the build directory and chdir there.
34 2. Invoke the configure script:
36 - If you are building outside the source tree:
38 /PATH/TO/EMACS/SOURCE/TREE/configure --prefix=PREFIX ...
40 - If you are building in-place, i.e. inside the source tree:
42 ./configure --prefix=PREFIX ...
44 It is always preferable to use --prefix to configure Emacs for
45 some specific location of its installed tree; the default
46 /usr/local is not suitable for Windows (see the detailed
47 instructions for the reasons). The prefix must be absolute.
49 You can pass other options to the configure script. Here's a
50 typical example (for an in-place debug build):
52 CFLAGS='-O0 -g3' ./configure --prefix=/d/usr/emacs --enable-checking='yes,glyphs'
54 3. After the configure script finishes, it should display the
55 resulting configuration. After that, type
59 Use "make -j N" if your MSYS Make supports parallel execution;
60 the build will take significantly less time in that case. Here N
61 is the number of simultaneous parallel jobs; use the number of
62 the cores on your system.
64 4. Install the produced binaries:
68 If you want the installation tree to go to a place that is
69 different from the one specified by --prefix, say
71 make install prefix=/where/ever/you/want
75 If these short instructions somehow fail, read the rest of this
78 * Installing Git for Windows
80 Skip this section if you already have Git installed and configured,
81 or if you are building from the release tarball, not from the
82 development repository.
84 Git for Windows is available from this download page:
86 https://github.com/git-for-windows/git/releases
88 That page offers both 32-bit and 64-bit installations; pick the one
89 suitable for your OS. In general, we recommend to install a 64-bit
90 Git if you have a 64-bit Windows system; the 32-bit Git will run on
91 64-bit Windows just fine, but might run into memory problems where
94 During Git installation, be sure to select the "Checkout as-is,
95 commit as-is" option from the "Configure line ending conversions"
96 dialog. Otherwise, Git will convert text files to DOS-style CRLF
97 end-of-line (EOL) format, which will cause subtle problems when
98 building Emacs, because MSYS tools (see below) used to build Emacs
99 use binary file I/O that preserves the CR characters that get in the
100 way of some text-processing tools, like 'makeinfo' and the commands
101 invoked by the autogen.sh script.
103 If you already have Git installed and configured with some other EOL
104 conversion option, you will need to reconfigure it, removing the
105 following variables from all of your .gitconfig files:
111 If you cloned the Emacs directory before changing these config
112 variables, you will have to delete the repository and re-clone it
115 The instructions for cloning the Emacs repository can be found on
116 the Emacs's Savannah project page:
118 https://savannah.gnu.org/projects/emacs
120 * Installing MinGW and MSYS
122 Make sure you carefully read the following two sections in their
123 entirety and install/configure the various packages as instructed.
124 A correct installation makes all the rest almost trivial; a botched
125 installation will likely make you miserable for quite some time.
127 There are two alternatives to installing MinGW + MSYS: using the GUI
128 installer, called mingw-get, provided by the MinGW project, or
129 manual installation. The next two sections describe each one of
132 ** Installing MinGW and MSYS using mingw-get
134 A nice installer, called mingw-get, is available for those who don't
135 like to mess with manual installations. You can download it from
138 https://sourceforge.net/projects/mingw/files/Installer/mingw-get/
140 (This installer only supports packages downloaded from the MinGW
141 site; for the rest you will still need the manual method.)
143 After installing mingw-get, invoke it to install the packages that
144 are already selected by default on the "Select Components" screen of
147 After that, use "mingw-get install PACKAGE" to install the following
151 . mingw-developer-toolkit
153 When the installation ends, perform the post-installation steps
154 described on this page of the MinGW site:
156 http://www.mingw.org/wiki/Getting_Started
158 in the "After Installing You Should ..." section. These steps are
159 important for making your installation complete, and in particular
160 will produce a desktop shortcut for running the MSYS Bash shell,
161 from which you will configure and build Emacs. Once you've made the
162 shortcut, double-click on it to open the MSYS Bash shell window,
163 where you will proceed with the rest of these instructions.
165 In addition, we suggest to modify your system-wide Path variable to
166 include the 'bin' subdirectory of your top-level MinGW installation
167 directory, the one you specified to mingw-get ("C:\MinGW" by
168 default). This will allow you to invoke the MinGW development
169 tools, like GCC, from the Windows cmd.exe shell windows or from
170 other Windows programs (including Emacs, after you build and install
173 (We recommend that you refrain from installing the MSYS Texinfo
174 package, which is part of msys-base, because it might produce mixed
175 EOL format when installing Info files. Instead, install the MinGW
176 port of Texinfo, see the ezwinports URL below. To uninstall the
177 MSYS Texinfo, after installing it as part of msys-base, invoke the
178 command "mingw-get remove msys-texinfo", or mark "msys-texinfo" for
179 removal in the mingw-get GUI, then select Installation->Apply Changes.)
181 At this point, you should be ready to configure and build Emacs in
182 its basic configuration. Skip to the "Generating the configure
183 script" section for the build instructions. If you want to build it
184 with image support and other optional libraries, read about the
185 optional libraries near the end of this document, before you start
186 the build. Also, consider installing additional MinGW packages that
187 are required/recommended, especially if you are building from the
188 development repository, as described in the next section.
190 ** Installing MinGW and MSYS manually
194 You will need to install the MinGW port of GCC and Binutils, and the
195 MinGW runtime and Windows API distributions, to compile Emacs. You
196 can find these on the MinGW download/Base page:
198 https://sourceforge.net/projects/mingw/files/MinGW/Base/
200 In general, install the latest stable versions of the following
201 MinGW packages from that page: gcc, binutils, mingw-rt, w32api. You
202 only need the 'bin' and the 'dll' tarballs of each of the above.
204 MinGW packages are distributed as .tar.lzma compressed archives. To
205 install the packages manually, we recommend to use the Windows port
206 of the 'bsdtar' program to unpack the tarballs. 'bsdtar' is
207 available as part of the 'libarchive' package from here:
209 http://sourceforge.net/projects/ezwinports/files/
211 The recommended place to install these packages is a single tree
212 starting from some directory on a drive other than the system drive
213 C:. A typical example would be D:\usr, with D:\usr\bin holding the
214 binaries and DLLs (should be added to your Path environment
215 variable), D:\usr\include holding the include files, D:\usr\lib
216 holding the static and import libraries, D:\usr\share holding docs,
217 message catalogs, and package-specific subdirectories, etc.
219 Having all the headers and libraries in a single place will greatly
220 reduce the number of -I and -L flags you will have to pass to the
221 configure script (see below), as these files will be right where the
222 compiler expects them.
224 We specifically do NOT recommend installing packages below
225 "C:\Program Files" or "C:\Program Files (x86)". These directories
226 are protected on versions of Windows from Vista and on, and you will
227 have difficulties updating and maintaining your installation later,
228 due to UAC elevation prompts, file virtualization, etc. You *have*
231 Additional MinGW packages are required/recommended, especially if
232 you are building from the development repository:
234 . Texinfo (needed to produce the Info manuals when building from
235 the repository, and for "make install")
237 Available from http://sourceforge.net/projects/ezwinports/files/.
239 . pkg-config (invoked by the configure script to look for optional
242 Available from http://sourceforge.net/projects/ezwinports/files/.
244 . gzip (needed to compress files during "make install")
246 Available from http://gnuwin32.sourceforge.net/packages/gzip.htm.
248 Each package might list other packages as prerequisites on its
249 download page (under "Runtime requirements"); download those as
250 well. (Using the mingw-get installer will fetch those prerequisites
251 automatically for you.) A missing prerequisite will manifest itself
252 by the program failing to run and presenting a pop-up dialog that
253 states the missing or incompatible DLL; be sure to find and install
256 Once you think you have MinGW installed, test the installation by
257 building a trivial "hello, world!" program, and make sure that it
258 builds without any error messages and the binary works when run.
262 You will need a reasonably full MSYS installation. MSYS is an
263 environment needed to run the Posix configure scripts and the
264 resulting Makefile's, in order to produce native Windows binaries
265 using the MinGW compiler and runtime libraries. Here's the list of
266 MSYS packages that are required:
268 . All the packages from the MSYS Base distribution, listed here:
270 https://sourceforge.net/projects/mingw/files/MSYS/Base/
272 . Additional packages listed below, from the MSYS Extension
275 https://sourceforge.net/projects/mingw/files/MSYS/Extension/
283 These should only be needed if you intend to build development
284 versions of Emacs from the repository.
286 . Additional packages (needed only if building from the
287 repository): Automake and Autoconf. They are available from
290 http://sourceforge.net/projects/ezwinports/files/automake-1.11.6-msys-bin.zip/download
291 http://sourceforge.net/projects/ezwinports/files/autoconf-2.65-msys-bin.zip/download
293 MSYS packages are distributed as .tar.lzma compressed archives. To
294 install the packages manually, we recommend to use the Windows port
295 of the 'bsdtar' program, already mentioned above.
297 MSYS packages should be installed in a separate tree from MinGW.
298 For example, use D:\MSYS or D:\usr\MSYS as the top-level directory
299 from which you unpack all of the MSYS packages.
301 After installing Automake and Autoconf, make sure any of the *.m4
302 files you might have in your MinGW installation also exist in the
303 MSYS installation tree, in the share/aclocal directory. Those *.m4
304 files which exist in the MinGW tree, but not in the MSYS tree should
307 If/when you are confident in your MinGW/MSYS installation, and want
308 to speed up the builds, we recommend installing a pre-release
309 version of Make from here:
311 https://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/
313 These are snapshot builds of many packages, but you only need
314 make.exe from there. The advantage of this make.exe is that it
315 supports parallel builds, so you can use "make -j N" to considerably
316 speed up your builds.
318 Several users reported that MSYS 1.0.18 causes Make to hang in
319 parallel builds. If you bump into this, we suggest to downgrade to
320 MSYS 1.0.17, which doesn't have that problem.
322 For each of these packages, install the 'bin' and 'dll' tarballs of
323 their latest stable releases. If there's an 'ext' tarball (e.g.,
324 msysCORE and Coreutils have it), download and install those as well.
326 Each package might list other packages as prerequisites on its
327 download page (under "Runtime requirements"); download those as
328 well. (Using the mingw-get installer will fetch those prerequisites
329 automatically for you.) A missing prerequisite will manifest itself
330 by the program failing to run and presenting a pop-up dialog that
331 states the missing or incompatible DLL; be sure to find and install
334 Do NOT add the MSYS bin directory to your Windows Path! Only the
335 MinGW bin directory should be on Path. When you install MSYS, it
336 creates a shortcut on your desktop that invokes the MSYS Bash shell
337 in a Command Prompt window; that shell is already set up so that the
338 MSYS bin directory is on PATH ahead of any other directory. Thus,
339 Bash will find MSYS executables first, which is exactly what you
342 * Starting the MSYS Bash shell
344 For most reliable and predictable results, we recommend to start
345 Bash by clicking the "MSYS" icon on your desktop. That icon is
346 created when you install MSYS, and using it is the official way of
347 running the MSYS tools.
349 For other methods of starting the shell, make sure Bash is invoked
350 with the "--login" command-line switch.
352 When the shell window opens and you get the shell prompt, change to
353 the directory where you intend to build Emacs.
355 At this point, you are ready to build Emacs in its basic
356 configuration. If you want to build it with image support and other
357 optional libraries, read about that near the end of this document.
359 * Generating the configure script
361 If you are building a release or pretest tarball, skip this section,
362 because the configure script is already present in the tarball.
364 To build a development snapshot from the Emacs repository,
365 you will first need to generate the configure script and a few other
366 auto-generated files.
368 To generate the configure script, type this at the MSYS Bash prompt
369 from the top-level directory of the Emacs source tree:
373 If successful, this command should produce the following output:
376 Checking whether you have the necessary tools...
377 (Read INSTALL.REPO for more details on building Emacs)
379 Checking for autoconf (need at least version 2.65)...
381 Checking for automake (need at least version 1.11)...
383 Your system has the required tools, running autoreconf...
384 Installing git hooks...
385 You can now run `./configure'.
387 If the script fails because it cannot find Git, you will need to
388 arrange for the MSYS Bash's PATH to include the Git's 'bin'
389 sibdirectory, where there's the git.exe executable.
391 * Configuring Emacs for MinGW:
393 Now it's time to run the configure script. You can do that either
394 from a separate build directory that is outside of the Emacs source
395 tree (recommended), or from inside the source tree. The former is
396 recommended because it allows you to have several different builds,
397 e.g., an optimized build and an unoptimized one, of the same
398 revision of the source tree; the source tree will be left in its
399 pristine state, without any build products.
401 You invoke the configure script like this:
403 /PATH/TO/EMACS/SOURCE/TREE/configure --prefix=PREFIX ...
405 or, if you are building in-place, i.e. inside the source tree:
407 ./configure --prefix=PREFIX ...
409 Here PREFIX is the place where you eventually want to install Emacs
410 once built, e.g. /d/usr. We recommend to always use --prefix when
411 building Emacs on Windows, because the default '/usr/local' is not
412 appropriate for Windows: it will be mapped by MSYS to something like
413 C:\MSYS\local, and it will defeat the purpose of PREFIX, which is to
414 install programs in a single coherent tree resembling Posix systems.
415 Such a single-tree installation makes sure all the other programs
416 and packages ported from GNU or Unix systems will work seamlessly
417 together. Where exactly is the root of that tree on your system is
418 something only you, the user who builds Emacs, can know, and the
419 Emacs build process cannot guess, because usually there's no
420 '/usr/local' directory on any drive on Windows systems.
422 Do NOT use Windows-style x:/foo/bar file names on the configure
423 script command line; use the MSYS-style /x/foo/bar instead. Using
424 Windows-style file names was reported to cause subtle and hard to
425 figure out problems during the build. This applies both to the
426 command switches, such as --prefix=, and to the absolute file name
427 of 'configure', if you are building outside of the source tree.
429 You can pass additional options to the configure script, for the
434 As explained in the help text, you may need to tell the script what
435 are the optional flags to invoke the compiler. This is needed if
436 some of your headers and libraries, e.g., those belonging to
437 optional image libraries, are installed in places where the compiler
438 normally doesn't look for them. (Remember that advice above to
439 avoid such situations? here's is where you will start paying for
440 disregarding that recommendation.) For example, if you have libpng
441 headers in C:\emacs\libs\libpng-1.2.37-lib\include and jpeg library
442 headers in C:\emacs\libs\jpeg-6b-4-lib\include, you will need to say
445 CPPFLAGS='-I/c/emacs/libs/libpng-1.2.37-lib/include -I/c/emacs/libs/jpeg-6b-4-lib/include' ./configure --prefix=PREFIX
447 which is quite a mouth-full, especially if you have more directories
448 to specify... Perhaps you may wish to revisit your installation
451 If you have a global site-lisp directory from previous Emacs
452 installation, and you want Emacs to continue using it, specify it
453 via the --enable-locallisppath switch to 'configure', like this:
455 ./configure --prefix=PREFIX --enable-locallisppath="/d/usr/share/emacs/VERSION/site-lisp:/d/wherever/site-lisp"
457 Use the normal MSYS /d/foo/bar style to specify directories by their
460 A few frequently used options are needed when you want to produce an
461 unoptimized binary with runtime checks enabled:
463 CFLAGS='-O0 -g3' ./configure --prefix=PREFIX --enable-checking='yes,glyphs'
465 Once invoked, the configure script will run for some time, and, if
466 successful, will eventually produce a summary of the configuration
469 Configured for `i686-pc-mingw32'.
471 Where should the build process find the source code? /path/to/emacs/sources
472 What compiler should emacs be built with? gcc -std=gnu99 -O0 -g3
473 Should Emacs use the GNU version of malloc? no
474 (The GNU allocators don't work with this system configuration.)
475 Should Emacs use a relocating allocator for buffers? no
476 Should Emacs use mmap(2) for buffer allocation? yes
477 What window system should Emacs use? w32
478 What toolkit should Emacs use? none
479 Where do we find X Windows header files? NONE
480 Where do we find X Windows libraries? NONE
481 Does Emacs use -lXaw3d? no
482 Does Emacs use -lXpm? yes
483 Does Emacs use -ljpeg? yes
484 Does Emacs use -ltiff? yes
485 Does Emacs use a gif library? yes
486 Does Emacs use a png library? yes
487 Does Emacs use -lrsvg-2? yes
488 Does Emacs use imagemagick? no
489 Does Emacs support sound? no
490 Does Emacs use -lgpm? no
491 Does Emacs use -ldbus? no
492 Does Emacs use -lgconf? no
493 Does Emacs use GSettings? no
494 Does Emacs use a file notification library? yes (w32)
495 Does Emacs use access control lists? yes
496 Does Emacs use -lselinux? no
497 Does Emacs use -lgnutls? yes
498 Does Emacs use -lxml2? yes
499 Does Emacs use -lfreetype? no
500 Does Emacs use -lm17n-flt? no
501 Does Emacs use -lotf? no
502 Does Emacs use -lxft? no
503 Does Emacs directly use zlib? yes
504 Does Emacs use toolkit scroll bars? yes
506 You are almost there, hang on.
508 If the output is significantly different, or if configure finishes
509 prematurely and displays some error message, you should examine the
510 configuration log in config.log and find the reason for the failure.
512 Once you succeeded in configuring Emacs, and just want to rebuild it
513 after updating your local repository from the main repository, you
514 don't need to re-run the configure script manually, unless you want
515 to change the configure-time options. Just typing "make" will
516 re-run configure if necessary with the exact same options you
517 specified originally, and then go on to invoking Make, described
522 This is simple: just type "make" and sit back, watching the fun.
524 If you installed a snapshot build of Make, the build will be much
525 faster if you type "make -j N" instead, where N is the number of
526 independent processing units on your machine. E.g., on a core i7
527 system try using N of 6 or even 8. (If this hangs, see the notes
528 above about downgrading to MSYS 1.0.17.)
530 When Make finishes, you can install the produced binaries:
534 or, if you want the installed tree to go in a place different from
535 the configured one, type
537 make install prefix=WHEREVER
539 Congrats! You have built and installed your own Emacs!
543 The following make targets may be used by users building the source
544 distribution, or users who have checked out of the repository after
545 an initial bootstrapping.
548 Builds Emacs from the available sources and pre-compiled lisp files.
551 Installs the built programs and the auxiliary files.
554 Removes object and executable files produced by the build process in
555 the current configuration. After "make clean", you can rebuild with
556 the same configuration using make. useful when you want to be sure
557 that all of the products are built from coherent sources.
560 In addition to the files removed by make clean, this also removes
561 Makefiles and other generated files to get back to the state of a
562 freshly unpacked source distribution. After make distclean, it is
563 necessary to run the configure script followed by "make", in order
566 The following targets are intended only for use with the repository
570 Removes all the auto-generated files and all the *.elc byte-compiled
571 files, and builds Emacs from scratch. Useful when some change in
572 basic Emacs functionality makes byte compilation of updated files
575 make maintainer-clean
576 Removes everything that can be recreated, including compiled Lisp
577 files, to get back to the state of a fresh repository tree. After make
578 maintainer-clean, it is necessary to run configure and "make" or
579 "make bootstrap" to rebuild. Occasionally it may be necessary to
580 run this target after an update.
582 * Optional image library support
584 In addition to its "native" image formats (pbm and xbm), Emacs can
585 handle other image types: xpm, tiff, gif, png, jpeg and experimental
588 To build Emacs with support for them, the corresponding headers must
589 be in the include path and libraries should be where the linker
590 looks for them, when the configure script is run. If needed, this
591 can be set up using the CPPFLAGS and CFLAGS variable specified on
592 the configure command line. The configure script will report
593 whether it was able to detect the headers and libraries. If the
594 results of this testing appear to be incorrect, please look for
595 details in the file config.log: it will show the failed test
596 programs and compiler error messages that should explain what is
597 wrong. (Usually, any such failures happen because some headers are
598 missing due to bad packaging of the image support libraries.)
600 Note that any file path passed to the compiler or linker must use
601 forward slashes, or double each backslash, as that is how Bash
604 If the configure script finds the necessary headers and libraries,
605 but they are for some reason incompatible, or if you want to omit
606 support for some image library that is installed on your system for
607 some other reason, use the --without-PACKAGE option to configure,
608 such as --without-gif to omit GIF, --without-tiff to omit TIFF, etc.
609 Passing the --help option to the configure script displays all of
610 the supported --without-PACKAGE options.
612 To use the external image support, the DLLs implementing the
613 functionality must be found when Emacs first needs them, either on the
614 PATH, or in the same directory as emacs.exe. Failure to find a
615 library is not an error; the associated image format will simply be
616 unavailable. Note that once Emacs has determined that a library can
617 not be found, there's no way to force it to try again, other than
618 restarting. See the variable `dynamic-library-alist' to configure the
619 expected names of the libraries.
621 Some image libraries have dependencies on one another, or on zlib.
622 For example, tiff support depends on the jpeg library. If you did not
623 compile the libraries yourself, you must make sure that any dependency
624 is in the PATH or otherwise accessible and that the binaries are
625 compatible (for example, that they were built with the same compiler).
627 To support XPM images (required for color tool-bar icons), you will
628 need the libXpm library. It is available from the ezwinports site,
629 http://sourceforge.net/projects/ezwinports/files/.
631 For PNG images, we recommend to use versions 1.4.x and later of
632 libpng, because previous versions had security issues. You can find
633 precompiled libraries and headers on the ezwinports site.
635 Versions 1.4.0 and later of libpng are binary incompatible with
636 earlier versions, so Emacs will only look for libpng libraries which
637 are compatible with the version it was compiled against. That
638 version is given by the value of the Lisp variable `libpng-version';
639 e.g., 10403 means version 1.4.3. The variable `dynamic-library-alist'
640 is automatically set to name only those DLL names that are known to
641 be compatible with the version given by `libpng-version'. If PNG
642 support does not work for you even though you have the support DLL
643 installed, check the name of the installed DLL against
644 `dynamic-library-alist' and the value of `libpng-version', and
645 download compatible DLLs if needed.
647 For GIF images, we recommend to use versions 5.0.0 or later of
648 giflib, as it is much enhanced wrt previous versions. You can find
649 precompiled binaries and headers for giflib on the ezwinports site,
650 http://sourceforge.net/projects/ezwinports/files/.
652 Version 5.0.0 and later of giflib are binary incompatible with
653 previous versions (the signatures of several functions have
654 changed), so Emacs will only look for giflib libraries that are
655 compatible with the version it was compiled against. Similar to
656 libpng, that version is given by the value of the Lisp variable
657 `libgif-version'; e.g., 50005 means version 5.0.5. The variable
658 `dynamic-library-alist' is automatically set to name only those DLL
659 libraries that are known to be compatible with the version given by
662 For JPEG images, you will need libjpeg 6b or later, which will be
663 called libjpeg-N.dll, jpeg62.dll, libjpeg.dll, or jpeg.dll. You can
664 find these on the ezwinports site.
666 TIFF images require libTIFF 3.0 or later, which will be called
667 libtiffN.dll or libtiff-N.dll or libtiff.dll. These can be found on
670 Pre-built versions of librsvg and its dependencies can be found
673 http://sourceforge.net/projects/ezwinports/files/
675 This site includes a minimal (as much as possible for librsvg)
676 build of the library and its dependencies; it is also more
677 up-to-date with the latest upstream versions. However, it
678 currently only offers 32-bit builds. For building Emacs, you need
679 to download from this site all of the following *-bin.zip
682 librsvg, gdk-pixbuf, cairo, glib
684 The 'bin' archives on this site include both header files and the
685 libraries needed for building with librsvg and for running Emacs.
686 The librsvg archive includes all the shared libraries needed to
687 run Emacs with SVG support; the other 3 packages are required
688 because the compiler needs to see their header files when building
691 To use librsvg at runtime, ensure that librsvg and its dependencies
692 are on your PATH, or in the same directory as the emacs.exe binary.
693 If you are downloading from the ezwinports site, you only need to
694 install a single archive, librsvg-X.Y.Z-w32-bin.zip, which includes
695 all the dependency DLLs.
697 If you think you've got all the dependencies and SVG support is
698 still not working, check your PATH for other libraries that shadow
699 the ones you downloaded. Libraries of the same name from different
700 sources may not be compatible, this problem was encountered in the
701 past, e.g., with libcroco from gnome.org.
703 If you can see etc/images/splash.svg, then you have managed to get
704 SVG support working. Congratulations for making it through DLL hell
705 to this point. For some SVG images, you'll probably see error
706 messages from Glib about failed assertions, or warnings from Pango
707 about failure to load fonts (installing the missing fonts should fix
708 the latter kind of problems). Problems have been observed in some
709 images that contain text, they seem to be a problem in the Windows
710 port of Pango, or maybe a problem with the way Cairo or librsvg is
711 using it that doesn't show up on other platforms. However, Emacs
712 should not crash due to these issues. If you eventually find the
713 SVG support too unstable to your taste, you can rebuild Emacs
714 without it by specifying the --without-rsvg switch to the configure
717 Binaries for the other image libraries can be found on the
718 ezwinports site or at the GnuWin32 project (the latter are generally
719 very old, so not recommended). Note specifically that, due to some
720 packaging snafus in the GnuWin32-supplied image libraries, you will
721 need to download _source_ packages for some of the libraries in
722 order to get the header files necessary for building Emacs with
725 * Optional GnuTLS support
727 To compile with GnuTLS, you will need pkg-config to be installed, as
728 the configure script invokes pkg-config to find out which compiler
729 switches to use for GnuTLS. See above for the URL where you can
730 find pkg-config for Windows.
732 You will also need to install the p11-kit package, which is a
733 dependency of GnuTLS, and its header files are needed for
734 compilation of programs that use GnuTLS. You can find p11-kit on
735 the same site as GnuTLS, see the URL below.
737 If the configure script finds the GnuTLS header files and libraries
738 on your system, Emacs is built with GnuTLS support by default; to
739 avoid that you can pass the argument --without-gnutls.
741 In order to support GnuTLS at runtime, a GnuTLS-enabled Emacs must
742 be able to find the relevant DLLs during startup; failure to do so
743 is not an error, but GnuTLS won't be available to the running
746 You can get pre-built binaries (including any required DLL and the
747 header files) at http://sourceforge.net/projects/ezwinports/files/.
749 * Optional libxml2 support
751 To compile with libxml2, you will need pkg-config to be installed,
752 as the configure script invokes pkg-config to find out which
753 compiler switches to use for libxml2. See above for the URL where
754 you can find pkg-config for Windows.
756 If the configure script finds the libxml2 header files and libraries
757 on your system, Emacs is built with libxml2 support by default; to
758 avoid that you can pass the argument --without-libxml2.
760 In order to support libxml2 at runtime, a libxml2-enabled Emacs must
761 be able to find the relevant DLLs during startup; failure to do so
762 is not an error, but libxml2 features won't be available to the
765 One place where you can get pre-built Windows binaries of libxml2
766 (including any required DLL and the header files) is here:
768 http://sourceforge.net/projects/ezwinports/files/
770 For runtime support of libxml2, you will also need to install the
771 libiconv "development" tarball, because the libiconv headers need to
772 be available to the compiler when you compile with libxml2 support.
773 A MinGW port of libiconv can be found on the MinGW site:
775 http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/
777 You need the libiconv-X.Y.Z-N-mingw32-dev.tar.lzma tarball from that
781 This file is part of GNU Emacs.
783 GNU Emacs is free software: you can redistribute it and/or modify
784 it under the terms of the GNU General Public License as published by
785 the Free Software Foundation, either version 3 of the License, or
786 (at your option) any later version.
788 GNU Emacs is distributed in the hope that it will be useful,
789 but WITHOUT ANY WARRANTY; without even the implied warranty of
790 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
791 GNU General Public License for more details.
793 You should have received a copy of the GNU General Public License
794 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.