Appendix E. Obtaining and Building Emacs

Availability of Packages

All the software packages described in this book, with the exception of TEX, are GNU software from the Free Software Foundation. Their software and other packages can be retrieved via anonymous FTP from the Internet site ftp.gnu.ai.mit.edu in the directory /pub/gnu. There are numerous mirror sites, information about which is in GNUinfo/FTP.

If you cannot download the packages you want from the Internet, or if you wish an easier solution, you can order software distributions from the Free Software Foundation. They are available in diskette, tape, and CD-ROM form. You can also order printed, bound copies of many GNU manuals, including several about Emacs, plus the Texinfo manual mentioned in Appendix D. For more information, including prices, contact the FSF:

Free Software Foundation, Inc.
59 Temple Place – Suite 330
Boston, MA 02111-1307 USA
Telephone: +1-617-542-5942
Fax: +1-617-542-2652
Email:

The packages mentioned in this book that are available from the FSF are:

Emacs

The editor itself, plus a huge number of Lisp extensions. Available in source form as file emacs-x.y.tar.gz, where x and y are the major and minor version numbers of the latest version (presently 19.34).

Texinfo

The GNU documentation system, including makeinfo and a manual on writing Texinfo documents. Requires TEX to make printed manuals. Available as texinfo-x.y.gz. The present version is 3.7.

Emacs Lisp Reference Manual

The Texinfo document The Emacs Lisp Reference Manual is available in source form as elisp-manual-19-x.y.tar.gz. (The 19 refers to the major version of Emacs.) The present version of the manual is 2.4. An online copy of this manual, created from source with makeinfo, is indispensable for Emacs Lisp programmers.

Shar utilities

Includes shar and unshar, for creating and unpacking software distributions. Available as sharutils-x.y.gz. The present version is 4.2. Note that shar files can be unpacked without unshar; just feed them to the standard UNIX sh command.

Gzip Compression and decompression package

Available as gzip-x.y.shar. The present version is 1.2.4.

Tar—Another program for creating and unpacking software distributions

Available as tar-x.y.shar.gz. The present version is 1.11.8. Note that GNU tar, unlike most other implementations, can intrinsically handle .tar.gz files without requiring the use of Gzip.

The Jargon File

The On-line Hacker Jargon File (which was cited in the Introduction) is also available from the FSF as the file jargversion.txt.gz, where version is presently 400. There’s also an Info format version, jargversion.info.gz. It’s a treasure trove of hacker lore, and is periodically published in book form as The New Hacker’s Dictionary.

You can obtain TEX from the TEX Users’ Group:

TEX Users Group
1850 Union Street—Suite 1637
San Francisco, CA 94123 USA
Home page: http://www.tug.org/
Email:
Fax: +1-415-982-8559

Unpacking, Building, and Installing Emacs

Like most GNU software, Emacs is trivially easy to unpack, build, and install. In fact, the instructions that follow apply to nearly all GNU software packages, not merely Emacs.

Unpacking

If you have a compressed tar file (file name ending in .tar.gz, .tar.Z, or .tgz and you have GNU tar, run:

tar zxvf file

If you don’t have GNU tar, use this:

zcat file | tar xvf -

(You’ll find zcat in the Gzip package.) If you use the tar that comes with SVR4-derived variants of UNIX, you may need to use xvof in place of xvf. The o makes you the owner of the extracted files. (Otherwise, the owner is the tar file’s originator—who probably isn’t known on your computer.)

If you have a shar file (file name ending in .sh or .shar), run

unshar file

or simply

sh file

If the shar file is compressed (.Z or .gz), uncompress it first with gzip -d.

Building and Installing

First, in the top-level directory of the software package being built, configure the software by running the configure script.

Different software packages have different configuration options. See what the options are for a package with ./configure --help. The options for Emacs are:

--with-gcc

Use the GNU C compiler to compile Emacs.

--with-pop

Compile in support for the Post Office Protocol (POP), sometimes used for retrieving email (for those who read email with Emacs).

--with-kerberos

Use the Kerberos authentication extension to POP.

--with-hesiod

Use Hesiod for finding the POP server.

--with-x

Build in X Window support.

--with-x-toolkit

Fancier X Window support; uses toolkit widgets. The X Toolkit is used by default, but --with-x-toolkit=motif uses the Motif toolkit instead.

You may also want to watch what the configure script is doing while it runs—it can take a while—so you’ll probably want to use the --verbose option, too. Here’s how I always invoke configure:

./configure --verbose --with-x --with-x-toolkit

After configuring the package, run make. This will compile the program and can take a long time.

Next, run make check. This runs any self-tests that are included with the package.

Presuming that the software successfully compiled and passed its tests, install it with make install.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset