GNU Emacs Installation Guide for the DJGPP (a.k.a. MS-DOS) portCopyright (C) 1992, 1994, 1996, 1997, 2000, 2001, 2002, 2003, 2004,2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.See the end of the file for license conditions.The DJGPP port of GNU Emacs builds and runs on plain DOS and also onall versions of MS-Windows from version 3.X on, including Windows XP,Vista, and Windows 7 (however, see below for issues with Windows Vistaand 7).To build and install the DJGPP port, you need to have the DJGPP portsof GCC (the GNU C compiler), GNU Make, rm, mv, and sed. See theremarks in CONFIG.BAT for more information about locations andversions. The Emacs FAQ (see info/efaq) includes pointers to Internetsites where you can find the necessary utilities; search for "MS-DOS".The configuration step (see below) will test for these utilities andwill refuse to continue if any of them isn't found.Bootstrapping Emacs or recompiling Lisp files in the `lisp'subdirectory using the various targets in the lisp/Makefile filerequires additional utilities: `find' (from Findutils), GNU `echo' and`test' (from Sh-utils or Coreutils), `ls' and `chmod' (from Fileutilsor Coreutils), `grep' (from Grep), and a port of Bash. However, youshould not normally need to run lisp/Makefile, as all the Lisp filesare distributed in byte-compiled form as well. As for bootstrappingitself, you will only need that if you check-out development sourcesfrom the Emacs source repository.If you are building the DJGPP version of Emacs on a DOS-like systemwhich supports long file names (e.g. Windows 9X or Windows XP), youneed to make sure that long file names are handled consistently bothwhen you unpack the distribution and compile it. With DJGPP v2.0 orlater, long file names support is by default, so you need to unpackEmacs distribution in a way that doesn't truncate the original longfilenames to the DOS 8.3 namespace; the easiest way to do this is touse djtar program which comes with DJGPP, since it will behaveconsistently with the rest of DJGPP tools. Alternatively, you canbuild Emacs with LFN=n, if some of your tools don't support long filenames: just ensure that LFN is set to `n' during both unpacking andcompiling.(By the time you read this, you have already unpacked the Emacsdistribution, but if the explanations above imply that you should havedone it differently, it's safer to delete the directory tree createdby the unpacking program and unpack Emacs again, than to risk runninginto strange problems during the build process.)It is important to understand that the runtime support of long filenames by the Emacs binary is NOT affected by the LFN setting duringcompilation; Emacs compiled with DJGPP v2.0 or later will alwayssupport long file names on Windows no matter what was the settingof LFN at compile time. However, if you compiled with LFN disabledand want to enable LFN support after Emacs was already built, you needto make sure that the support files in the lisp, etc and infodirectories are called by their original long names as found in thedistribution. You can do this either by renaming the files manually,or by extracting them from the original distribution archive withdjtar after you set LFN=y in the environment.To unpack Emacs with djtar, type this command: djtar -x emacs.tgz(This assumes that the Emacs distribution is called `emacs.tgz' onyour system.)When unpacking Emacs is done, a directory called `emacs-XX.YY' will becreated, where XX.YY is the Emacs version.On plain DOS, unpacking can complain about several directories andfiles in the `nextstep' subdirectory of the `emacs-XX.YY' top-leveldirectory. This is because the names of these files overflow the67-character limit on the file-name length imposed by DOS filesystems.When prompted by `djtar' for a different name for these files, justpress [Enter] to skip them: they are not needed for the DJGPP build.If you want to print international characters, install the intlfontsdistribution. For this, create a directory called `fonts' under the`emacs-XX.YY' top-level directory created by unpacking emacs.tgz,chdir into the directory `emacs-XX.YY/fonts', and type this: djtar -x intlfonts.tgzTo build and install Emacs, chdir to the `emacs-XX.YY' directory andtype these commands: config msdos make installRunning "config msdos" checks for several programs that are requiredto configure and build Emacs; if one of those programs is not found,CONFIG.BAT stops and prints an error message. If you have DJGPPversion 2.0 or 2.01, it will complain about a program calledDJECHO.EXE. These old versions of DJGPP shipped that program underthe name ECHO.EXE, so you can simply copy ECHO.EXE to DJECHO.EXE andrerun CONFIG.BAT. If you have neither ECHO.EXE nor DJECHO.EXE, youshould be able to find them in your djdevNNN.zip archive (where NNN isthe DJGPP version number).On Windows NT and Windows 2000/XP/Vista/7, running "config msdos"might print an error message like "VDM has been already loaded". Thisis because those systems have a program called `redir.exe' which isincompatible with a program by the same name supplied with DJGPP,which is used by config.bat. To resolve this, move the DJGPP's `bin'subdirectory to the front of your PATH environment variable.Windows Vista/7 has several bugs in its DPMI server related to memoryallocation: it fails DPMI resize memory block function, and itarbitrarily limits the default amount of DPMI memory to 32MB. To workaround these bugs, first configure Emacs to use the `malloc' functionfrom the DJGPP library. To this end, run CONFIG.BAT with the"--with-system-malloc" option: config --with-system-malloc msdos make installIn addition, for Windows Vista you'll need to install Service Pack 1(SP1) or later and enlarge its DPMI memory limit by setting the valueof this Registry key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Wow\DpmiLimitCreate this key if it does not exist. The value is a DWORD; settingit to 536870912 should let Emacs use up to 512MB of memory.If you have other problems, either building Emacs or running theproduced binary, look in the file etc/PROBLEMS for some known problemsrelated to the DJGPP port (search for "MS-DOS").To install the international fonts, chdir to the intlfonts-X.Ydirectory created when you unpacked the intlfonts distribution (X.Y isthe version number of the fonts' distribution), and type the followingcommand: make bdf INSTALLDIR=..After Make finishes, you may remove the directory intlfonts-X.Y; thefonts are installed into the fonts/bdf subdirectory of the top-levelEmacs directory, and that is where Emacs will look for them bydefault.Building Emacs creates executable files in the src and lib-srcdirectories. Installing the DJGPP port of Emacs moves theseexecutables to a sibling directory called bin. For example, if youbuild in directory C:/emacs, installing moves the executables fromC:/emacs/src and C:/emacs/lib-src to the directory C:/emacs/bin, soyou can then delete the subdirectories C:/emacs/src andC:/emacs/lib-src if you wish. The only subdirectories you need tokeep are bin, lisp, etc and info. (If you installed intlfonts, keepthe fonts directory and all its subdirectories as well.) The binsubdirectory should be added to your PATH. The msdos subdirectoryincludes a PIF and an icon file for Emacs which you might find usefulif you run Emacs under MS Windows.Emacs on MSDOS finds the lisp, etc and info directories by looking in../lisp, ../etc and ../info, starting from the directory where theEmacs executable was run from. You can override this by setting theenvironment variables EMACSDATA (for the location of `etc' directory),EMACSLOADPATH (for the location of `lisp' directory) and INFOPATH (forthe location of the `info' directory).Emacs features which require asynchronous subprocesses that depend onmultitasking do not work in the DJGPP port. Synchronous subprocessesdo work, so features such as compilation, grep, and Ispell runsynchronously, unlike on other platforms.Version 2.0 of djgpp has two bugs that affect Emacs. We've includedcorrected versions of two files from djgpp in the msdos subdirectory:is_exec.c and sigaction.c. To work around the bugs, compile thesefiles and link them into temacs. Djgpp versions 2.01 and later havethese bugs fixed, so upgrade if you can before building Emacs.This file is part of GNU Emacs.GNU Emacs is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation, either version 3 of the License, or(at your option) any later version.GNU Emacs is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.