]> code.delx.au - gnu-emacs/blob - mac/INSTALL
9162ae6f08b345e8226ebb3d36a6f23f94d286d1
[gnu-emacs] / mac / INSTALL
1 * BUILDING EMACS ON MAC OS Classic AND MAC OS X -*- outline -*-
2
3 Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
4
5 Permission is granted to anyone to make or distribute verbatim
6 copies of this document as received, in any medium, provided that
7 the copyright notice and permission notice are preserved, and that
8 the distributor grants the recipient permission for further
9 redistribution as permitted by this notice.
10
11 Permission is granted to distribute modified versions of this
12 document, or of portions of it, under the above conditions,
13 provided also that they carry prominent notices stating who last
14 changed them.
15
16 * BUILDING EMACS ON MAC OS X
17
18 You should be able to build Emacs on Mac OS X by typing the following
19 commands at the top-level directory after the source distribution is
20 un-tarred.
21
22 ./configure --enable-carbon-app
23 make
24 make install
25
26 The last step may fail if you do not have permissions to install. If
27 you try to install into /usr (with ./configure --prefix=/usr), then you
28 must install as root using the sudo command. However, it is not
29 recommended; see the notes section below for more details.
30
31 The --enable-carbon-app specifies that the carbon GUI application
32 should be installed into /Application. If you want it to install in a
33 different location, specify --enable-carbon-app=<mydir>
34
35 If you have X Window installed on your Mac and you are building Emacs
36 to run under Carbon and not X Window, you need to type `./configure
37 --without-x' instead of `./configure'.
38
39 You can type `make bootstrap' instead of `make' to rebuild everything,
40 including byte-compiling the Lisp files.
41
42 If you are compiling on Mac OS X versions before 10.2 and have not
43 installed the GNU texinfo package on your system, the build will
44 complain that makeinfo cannot be found. Instructions for installing the
45 GNU texinfo package are given below. Alternatively, you can type `make
46 -k' instead of `make' and safely ignore the error messages and use the
47 existing info files.
48
49 After Emacs is installed, you can run it by typing `emacs -nw' from a
50 terminal (make sure your path contains /usr/local/bin) or by
51 double-clicking on /Applications/Emacs.app in the Finder. To start
52 Emacs as a GUI application from the terminal, the pathname to the
53 executable in the bundle, i.e.,
54
55 /Application/Emacs.app/Contents/MacOS/Emacs
56
57 must be typed to the shell to enable Emacs to locate its resources
58 correctly. You may want to create a symlink or alias to this path to
59 quickly access both the terminal and GUI versions.
60
61 If you are building Emacs to run on Mac OS X and X Window,
62 instead of typing `./configure' above, type
63
64 ./configure --without-carbon --with-x
65
66
67 To use colors in a terminal, put the following lines in the file
68 ~/.termcap and log in again.
69
70 -----
71 # added ANSI color
72 vt100|vt100-am|vt100am|dec vt100:\
73 :pa#64:Co#8:Sf=\E[3%dm:Sb=\E[4%dm:op=\E[m:AF=\E[3%dm:AB=\E[4%dm:\
74 :do=^J:co#80:li#24:cl=\E[;H\E[2J:sf=2*\ED:\
75 :le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:\
76 :ce=3\E[K:cd=50\E[J:so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:\
77 :md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m:\
78 :rf=/usr/share/tabset/vt100:\
79 :rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[;r\E[0m\E(B\E)B\E[2J:\
80 :ks=\E[?1h\E=:ke=\E[?1l\E>:\
81 :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:kb=^H:\
82 :ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=2*\EM:vt#3:xn:\
83 :sc=\E7:rc=\E8:cs=\E[%i%d;%dr:
84 -----
85
86 To build the `info' files in versions prior to Mac OS X 10.2, you need
87 to install the texinfo software.
88
89 To install from source, obtain texinfo-4.2.tar.gz from ftp.gnu.org or
90 a mirror. Un-tar it, enter its directory and type
91
92 ./configure
93 make
94 make install
95
96 The last step may need to be performed as root (sudo make install).
97
98 You may also like to install ispell, which will allow you to use
99 ispell and flyspell-mode. To install ispell from source, you first
100 need to install GNU textutils.
101
102 To do so, download textutils-2.0.tar.gz from ftp.gnu.org or a mirror.
103 Un-tar it, enter its directory, type
104
105 ./configure --host=powerpc-apple-bsd
106 make
107 make install
108
109 Again, the last step may need to be performed as root. Note that if you
110 run `make check', the test for `pr' will fail.
111
112 Get and un-tar ispell-3.2.06.tar.gz. Look for it here:
113
114 http://fmg-www.cs.ucla.edu/geoff/ispell.html
115
116 Go into its directory, type
117
118 cp local.h.samp local.h
119
120 Add a line `#define TERMLIB ""' to the end of local.h.
121
122 Set the environment variable TMPDIR to an existing directory. For
123 example since `/tmp' exists on my machine and I am using `bash', I
124 typed
125
126 export TMPDIR=/tmp
127
128 Run `make' and `make install', the latter as root.
129
130 * BUILDING BINARY DISTRIBUTIONS FOR MAC OS X
131
132 If you are intending to build a binary distribution of Emacs, there is
133 a script that will greatly simplify the process. It is called
134 make-package and it is contained in this directory. It will generate
135 a disc image containing a installer bundle. By default the installer
136 will place the emacs common files in /usr/local/* and the carbon
137 application in /Applications. Typical usage would be
138
139 ./make-package
140
141 After running, an compressed disk image of the installer will be placed
142 in a file called EmacsInstaller.dmg. This file can be then distributed
143 to whomever would like a binary distribution. Here are the common
144 options to user
145
146 --with-x - Use the X11 GUI instead of the Carbon GUI.
147 --prefix=DIR - Place the common emacs files in the given DIR. The
148 default is /usr/local. See note below if placing
149 in /usr
150 --self-contained - Place the common emacs files inside the Emacs.app
151 itself. This makes the application trivial to
152 uninstall and copy between computers.
153 --app-symlink - Use a symlink inside the Application to the
154 $prefix/bin/emacs to reduce disk space. Note, this
155 option may removed in the future.
156
157
158 For usage of other options, use the --help option.
159
160 * BUILDING EMACS ON MAC OS Classic
161
162 FIXME: You can use either Metrowerks CodeWarrior Pro 6 or MPW-GM
163 (Aug. 2001) to build Emacs. MPW-GM can be downloaded free of charge
164 from Apple.
165
166 In either case, you will need MPW-GM to build the make-docfile utility
167 and to generate the doc string file DOC.
168
169 ### IMPORTANT ### You can use StuffIt Expander to decompress and untar
170 the distribution. However, you *must* set the radio button in the
171 Preferences->Cross Platform->Convert text files to Macintosh format to
172 "Never". Otherwise the compiled Lisp files will be corrupted.
173
174 FIXME: (Optional) A subset of the fonts from the GNU intlfonts-1.2
175 distribution converted to NFNT format can be obtained from
176
177 ftp://mac-emacs.sourceforge.net/pub/mac-emacs/GNU-fonts.smi.bin
178
179 To build Emacs in the MPW Shell, simply set the directory to
180 ...:emacs:mac: and build the target Emacs of the make file
181 makefile.MPW. I.e., execute the commands
182
183 make Emacs -f makefile.MPW > Emacs.MakeScript
184 Emacs.MakeScript
185
186 The above commands create an executable that uses the Carbon API. The
187 non-Carbon version can also be created by replacing all the
188 occurrences of `Emacs' above with `NonCarbon'. Not that the
189 non-Carbon version does not support some features such as file
190 dialogs, drag-and-drop, and Unicode menus.
191
192 FIXME: To build Emacs using CodeWarrior, start up the CodeWarrior IDE,
193 choose File->Import Project... and select the file cw6-mcp.xml. When
194 prompted to save the project, navigate to same directory as the file
195 cw6-mcp.xml, name the project emacs-cw6.mcp, and save it there. Then
196 choose Project->Make. Note that this does not build the DOC file. To
197 do so, use MPW and build the target "Doc" in makefile.MPW.
198
199 FIXME: Once built, the Emacs application (Emacs CW or Emacs MPW) can
200 be launched where it is created.
201
202 FIXME: To build an optimized version of Emacs in CodeWarrior, change
203 the value in the Emacs Settings->Code Generation->Global Optimization
204 dialog. To build a version for profiling, check the Profiler
205 Information box in the Emacs Settings->Code Generation->PPC Processor
206 dialog and include the Profiler PPC.Lib library.
207
208 * NOTES
209
210 Emacs should build and run on a PowerMac running Mac OS 8.6 - 9.2 (but
211 only tested on 9.2.2), and Mac OS X 10.1 - 10.4.
212
213 You will need around 100 MB of disk space for the source files and
214 intermediate files.
215
216 Under Mac OS Classic, there is no support for building the LEIM
217 directory. However, it can be built on Mac OS X or another platform
218 and transferred to the Mac.
219
220 On Mac OS X, installing the emacs files in /usr can cause issues with
221 system software updates possibly overwriting the distribution. If this
222 is a concern, as it should be in normal binary distributions, please
223 use /usr/local as the prefix for installation.
224
225 Emacs supports both PowerPC and Intel-based Macintoshes. However,
226 due to the unexec process that Emacs uses to dump core, it is not
227 possible at this time to generate a universal binary that supports both
228 architectures. In addition, Rosetta doesn't appear to work correctly
229 with PowerPC builds of Emacs; you will have to recompile for Intel.
230 Therefore, builds of Emacs are architecture specific.
231
232 There are some compile-time flags that enable experimental features.
233 Please use them at your own risk after reading the corresponding
234 threads in the emacs-devel@gnu.org archive.
235
236 USE_ATSUI: Enable ATSUI (Apple Type Services for Unicode Imaging)
237 support. Available on Mac OS 9/Carbon and Mac OS X.
238 http://lists.gnu.org/archive/html/emacs-devel/2005-10/msg00005.html
239
240 SELECT_USE_CFSOCKET: Avoid polling in sys_select (in src/mac.c).
241 Available on Mac OS X.
242 http://lists.gnu.org/archive/html/emacs-devel/2004-12/msg00789.html
243
244 Enjoy!