* BUILDING EMACS ON MAC OS X -*- outline -*-Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.See the end of the file for license conditions.* BUILDING EMACS ON MAC OS XYou should be able to build Emacs on Mac OS X by typing the followingcommands at the top-level directory after the source distribution isun-tarred. ./configure --enable-carbon-app make make installThe last step may fail if you do not have permissions to install. Ifyou try to install into /usr (with ./configure --prefix=/usr), then youmust install as root using the sudo command. However, it is notrecommended; see the notes section below for more details.The --enable-carbon-app specifies that the Carbon GUI applicationshould be installed into /Applications. If you want it to install ina different location, specify --enable-carbon-app=<mydir>You can type `make bootstrap' instead of `make' to rebuild everything,including byte-compiling the Lisp files.If you are compiling on Mac OS X versions before 10.2 and have notinstalled the GNU texinfo package on your system, the build willcomplain that makeinfo cannot be found. Instructions for installing theGNU texinfo package are given below. Alternatively, you can type `make-k' instead of `make' and safely ignore the error messages and use theexisting info files.After Emacs is installed, you can run a text-only terminal version bytyping `emacs' from a terminal (make sure your path contains/usr/local/bin) or a GUI application by double-clicking on/Applications/Emacs.app in the Finder. Even in the terminal version,some Carbon-specific functions such as `mac-set-file-creator' arestill meaningful.To start Emacs as a GUI application from the terminal, the pathname tothe executable in the bundle, i.e., /Applications/Emacs.app/Contents/MacOS/Emacsmust be typed to the shell to enable Emacs to locate its resourcescorrectly. You may want to create an alias to this path to quicklyaccess both the terminal and GUI versions. You can specify somestandard Emacs options when invoking Emacs in this way.Emacs on Mac OS X is not configured to use X11 unless either it isrequested or the use of Carbon is disabled explicitly. So, if you arebuilding Emacs to run on X Window System, you need to specify like: ./configure --with-xNote that the Carbon-specific functions mentioned above are notavailable on the X11-enabled build.To use colors in Terminal.app on Mac OS X 10.1, put the followinglines in the file ~/.termcap and log in again.-----# added ANSI colorvt100|vt100-am|vt100am|dec vt100:\ :pa#64:Co#8:Sf=\E[3%dm:Sb=\E[4%dm:op=\E[m:AF=\E[3%dm:AB=\E[4%dm:\ :do=^J:co#80:li#24:cl=\E[;H\E[2J:sf=2*\ED:\ :le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\ :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\ :md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:\ :rf=/usr/share/tabset/vt100:\ :rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[;r\E[0m\E(B\E)B\E[2J:\ :ks=\E[?1h\E=:ke=\E[?1l\E>:\ :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\ :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=2*\EM:vt#3:xn:\ :sc=\E7:rc=\E8:cs=\E[%i%d;%dr:-----To build the `info' files in versions prior to Mac OS X 10.2, you needto install the texinfo software.To install from source, obtain texinfo-4.2.tar.gz from ftp.gnu.org ora mirror. Un-tar it, enter its directory and type ./configure make make installThe last step may need to be performed as root (sudo make install).You may also like to install ispell, which will allow you to useispell and flyspell-mode. To install ispell from source, you firstneed to install GNU textutils.To do so, download textutils-2.0.tar.gz from ftp.gnu.org or a mirror.Un-tar it, enter its directory, type ./configure --host=powerpc-apple-bsd make make installAgain, the last step may need to be performed as root. Note that if yourun `make check', the test for `pr' will fail.Get and un-tar ispell-3.2.06.tar.gz. Look for it here: http://fmg-www.cs.ucla.edu/geoff/ispell.htmlGo into its directory, type cp local.h.samp local.hAdd a line `#define TERMLIB ""' to the end of local.h.Set the environment variable TMPDIR to an existing directory. Forexample since `/tmp' exists on my machine and I am using `bash', Ityped export TMPDIR=/tmpRun `make' and `make install', the latter as root.* BUILDING BINARY DISTRIBUTIONS FOR MAC OS XIf you are intending to build a binary distribution of Emacs, there isa script that will greatly simplify the process. It is calledmake-package and it is contained in this directory. It will generatea disc image containing a installer bundle. By default the installerwill place the emacs common files in /usr/local/* and the Carbonapplication in /Applications. Typical usage would be./make-packageAfter running, an compressed disk image of the installer will be placedin a file called EmacsInstaller.dmg. This file can be then distributedto whomever would like a binary distribution. Here are the commonoptions to user--with-x - Use the X11 GUI instead of the Carbon GUI.--prefix=DIR - Place the common emacs files in the given DIR. The default is /usr/local. See note below if placing in /usr--self-contained - Place the common emacs files inside the Emacs.app itself. This makes the application trivial to uninstall and copy between computers.--app-symlink - Use a symlink inside the Application to the $prefix/bin/emacs to reduce disk space. Note, this option may removed in the future.For usage of other options, use the --help option.Note: due to the problem "Installing to a directory with non-ASCIIcharacters in the name fails" mentioned in etc/PROBLEMS, you may notmove a self-contained Emacs.app application bundle to a non-ASCIIdirectory.* NOTESEmacs should build and run on a PowerMac running Mac OS X 10.1 - 10.5.You will need around 100 MB of disk space for the source files andintermediate files.On Mac OS X, installing the emacs files in /usr can cause issues withsystem software updates possibly overwriting the distribution. If thisis a concern, as it should be in normal binary distributions, pleaseuse /usr/local as the prefix for installation.Emacs supports both PowerPC and Intel-based Macintoshes. However,due to the unexec process that Emacs uses to dump core, it is notpossible at this time to generate a universal binary that supports botharchitectures. In addition, Rosetta doesn't appear to work correctlywith PowerPC builds of Emacs; you will have to recompile for Intel.Therefore, builds of Emacs are architecture specific.Enjoy!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/>.