Merged from "branches/vim7.1".
[MacVim/jjgod.git] / src / INSTALL
blob0c01ef27dcbcc649f6010b44c8c0949836cf1ceb
1 INSTALL - Installation of Vim on different machines.
3 This file contains instructions for compiling Vim. If you already have an
4 executable version of Vim, you don't need this.
6 Contents:
7 1. Generic
8 2. Unix
9 3. RISC OS
10 4. Macintosh
11 5. OS/2 (with EMX 0.9b)
12 6. Atari MiNT
14 For OS/390 Unix see ../runtime/doc/os_390.txt
15 For BeBox see ../runtime/doc/os_beos.txt.
16 For Amiga see INSTALLami.txt
17 For PC (MS-DOS, Windows NT, Windows 95) see INSTALLpc.txt
18 For Macintosh see INSTALLmac.txt
21 1. Generic
22 ==========
24 If you compile Vim without specifying anything, you will get the default
25 behaviour as is documented, which should be fine for most people.
27 For features that you can't enable/disable in another way, you can edit the
28 file "feature.h" to match your preferences.
31 2. Unix
32 =======
34 Summary:
35 1. make                 run configure, compile and link
36 2. make install         installation in /usr/local
38 This will include the GUI and X11 libraries, if you have them.  If you want a
39 version of Vim that is small and starts up quickly, see the Makefile for how
40 to disable the GUI and X11.  If you don't have Motif and/or X11, these
41 features will be disabled automatically.
43 See the start of Makefile for more detailed instructions about how to compile
44 Vim.
46 If you need extra compiler and/or linker arguments, set $CFLAGS and/or $LIBS
47 before starting configure.  Example:
49         env  CFLAGS=-I/usr/local/include  LIBS=-lm  make
51 This is only needed for things that configure doesn't offer a specific argument
52 for or figures out by itself.  First try running configure without extra
53 arguments.
55 GNU Autoconf and a few other tools have been used to make Vim work on many
56 different Unix systems.  The advantage of this is that Vim should compile
57 on most sytems without any adjustments.  The disadvantage is that when
58 adjustments are required, it takes some time to understand what is happening.
60 If configure finds all library files and then complains when linking that some
61 of them can't be found, your linker doesn't return an error code for missing
62 libraries.  Vim should be linked fine anyway, mostly you can just ignore these
63 errors.
65 If you run configure by hand (not using the Makefile), remember that any
66 changes in the Makefile have no influence on configure.  This may be what you
67 want, but maybe not!
69 The advantage of running configure separately, is that you can write a script
70 to build Vim, without changing the Makefile or feature.h.  Example (using sh):
72         CFLAGS=-DCOMPILER_FLAG ./configure --enable-gui=motif
74 One thing to watch out for: If the configure script itself changes, running
75 "make" will execute it again, but without your arguments.  Do "make clean" and
76 run configure again.
78 If you are compiling Vim for several machines, for each machine:
79   a.    make shadow
80   b.    mv shadow machine_name
81   c.    cd machine_name
82   d.    make; make install
84 [Don't use a path for machine_name, just a directory name, otherwise the links
85 that "make shadow" creates won't work.]
88 Unix: COMPILING WITH/WITHOUT GUI
90 These configure arguments can be used to select which GUI to use:
91 --enable-gui=   gtk, kde, motif, athena or auto
92 --disable-gtk-check
93 --disable-motif-check
94 --disable-athena-check
96 --enable-gui defaults to "auto", so it will automatically look for a GUI (in
97 the order of GTK, Motif, then Athena).  If one is found, then is uses it and
98 does not proceed to check any of the remaining ones.  Otherwise, it moves on
99 to the next one.
101 --enable-{gtk,kde,motif,athena}-check all default to "yes", such that if
102 --enable-gui is "auto" (which it is by default), GTK, Motif, and Athena will
103 be checked for.  If you want to *exclude* a certain check, then you use
104 --disable-{gtk,kde,motif,athena}-check.
106 For example, if --enable-gui is set to "auto", but you don't want it look for
107 Motif, you then also specify --disable-motif-check.  This results in only
108 checking for GTK and Athena.
110 Lastly, if you know which one you want to use, then you can just do
111 --enable-gui={gtk,kde,motif,athena}.  So if you wanted to only use Motif, then
112 you'd specify --enable-gui=motif.  Once you specify what you want, the
113 --enable-{gtk,kde,motif,athena}-check options are ignored.
115 For compiling with the GTK+ GUI, you need a recent version of glib and gtk+.
116 Configure checks for at least version 1.1.16, but below 2.0.  An older versions
117 is not selected automatically.  If you want to use it anyway, run configure
118 with "--disable-gtktest".  GTK 2.0 doesn't work yet.
119 GTK requires an ANSI C compiler.  If you fail to compile Vim with GTK+ (it
120 is the preferred choice), try selecting another one in the Makefile.
121 If you are sure you have GTK installed, but for some reason configure says you
122 do not, you may have left-over header files and/or library files from an older
123 (and incompatible) version of GTK.  if this is the case, please check
124 auto/config.log for any error messages that may give you a hint as to what's
125 happening.
127 For KDE see INSTALLkde.txt.
130 Unix: COMPILING WITH MULTI-BYTE
132 When you want to compile with the multi-byte features enabled, make sure you
133 compile on a machine where the locale settings actually work.  otherwise the
134 configure tests may fail.  You need to compile with "big" features:
136     ./configure --with-features=big
138 Unix: COMPILING ON LINUX
140 On Linux, when using -g to compile (which is default for gcc), the executable
141 will probably be statically linked.  If you don't want this, remove the -g
142 option from CFLAGS.
144 Unix: PUTTING vimrc IN /etc
146 Some Linux distributions prefer to put the global vimrc file in /etc, and the
147 Vim runtime files in /usr.  This can be done with:
148         ./configure --prefix=/usr
149         make VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim MAKE="make -e"
151 Unix: COMPILING ON NeXT
153 Add the "-posix" argument to the compiler by using one of these commands:
154         setenv CC 'cc -posix' (csh)
155         export CC='cc -posix' (sh)
156 And run configure with "--disable-motif-check".
159 3. RISC OS
160 =============
162 Much file renaming is needed before you can compile anything.
163 You'll need UnixLib to link against, GCC and GNU make.
165 I suggest you get the RISC OS binary distribution, which includes the
166 Templates file and the loader.
168 Try here: http://www.ecs.soton.ac.uk/~tal197
171     :help riscos
173 within the editor for more information, or read the os_riscos.txt help file.
176 4. Macintosh
177 ============
179 Vim should work on the Macintosh, but I don't have a makefile for it.
180 Work is being done to update the Macintosh port.  It's a lot of work; don't
181 expect it soon.
184 5. OS/2
185 =======
187 Summary:
188 ren Makefile Makefile.unix
189 ren makefile.os2 Makefile
190 make
192 This port of Vim to OS/2 is based on the emx environment together
193 with GNU C. The main design goal of emx is to simplify porting Unix
194 software to OS/2 and DOS. Because of this, almost all the Unix defines
195 etc. already existing in the Vim source code could be reused. Only where
196 OS/2 specifics came into play were additional changes necessary. Those
197 places can be found by searching for "OS2" and "__EMX__" (I've tried to
198 keep emx-specific things separate from generic OS/2 stuff).
200 Note: This OS/2 port works well for me and an additional OS/2 user on
201       the Vim development team (Karsten Sievert); however, since I
202       haven't had any other feedback from other people, that either
203       means no (OS/2-specific) bugs exist, or no one has yet created
204       a situation in which any bugs are apparent.
205       Report any problems or other comments to paul@wau.mis.ah.nl
206       (email valid up to at least September 1996, after that try
207       paul@wurtel.hobby.nl, paul@murphy.nl, or paulS@toecompst.nl).
208       Textmode/notextmode and binary mode both seem to work well.
210 Prerequisites:
211 - To compile, you need the emx environment (at least rev. 0.9b), GCC,
212   some make utility (GNU make works fine). These are generally
213   available as (ask Archie about them):
214     emxrt.zip     emx runtime package
215     emxdev.zip    emx development system (without compiler)
216   GNU programs compiled for emx, patches and patched sources:
217     gnudev1.zip   GNU development tools compiled for emx (part 1)
218     gnudev2.zip   GNU development tools compiled for emx (part 2)
219     gnumake.zip   GNU make
220 - Don't set a TERM environment variable; Vim defaults to os2ansi
221   which is available as a builtin termcap entry. Using other values
222   may give problems! (OS/2 ANSI emulation is quite limited.) If you
223   need to set TERM for other programs, you may consider putting
224   set term=os2ansi in the vimrc file.
226 Check vim_os2.txt for additional info on running Vim.
229 6. Atari MiNT
230 =============
233 To compile Vim for MiNT you may either copy makefile.mint to Makefile or use
234 the Unix Makefile adapted for the MiNT configuration.
236 Now proceed as described in the Unix section.
238 Prerequisites:
240 You need a curses or termcap library that supports non-alphanumeric
241 termcap names. If you don't have any, link with termlib.o.
243 -----------------------------------------------------------------------------
245 The rest of this file is based on the INSTALL file that comes with GNU
246 autoconf 2.12. Not everything applies to Vim. Read Makefile too!
249 Basic Installation
250 ==================
252    These are generic installation instructions.
254    The `configure' shell script attempts to guess correct values for
255 various system-dependent variables used during compilation.  It uses
256 those values to create a `Makefile' in each directory of the package.
257 It may also create one or more `.h' files containing system-dependent
258 definitions.  Finally, it creates a shell script `config.status' that
259 you can run in the future to recreate the current configuration, a file
260 `config.cache' that saves the results of its tests to speed up
261 reconfiguring, and a file `config.log' containing compiler output
262 (useful mainly for debugging `configure').
264    If you need to do unusual things to compile the package, please try
265 to figure out how `configure' could check whether to do them, and mail
266 diffs or instructions to the address given in the `README' so they can
267 be considered for the next release.  If at some point `config.cache'
268 contains results you don't want to keep, you may remove or edit it.
270    The file `configure.in' is used to create `configure' by a program
271 called `autoconf'.  You only need `configure.in' if you want to change
272 it or regenerate `configure' using a newer version of `autoconf'.
274 The simplest way to compile this package is:
276   1. `cd' to the directory containing the package's source code and type
277      `./configure' to configure the package for your system.  If you're
278      using `csh' on an old version of System V, you might need to type
279      `sh ./configure' instead to prevent `csh' from trying to execute
280      `configure' itself.
282      Running `configure' takes awhile.  While running, it prints some
283      messages telling which features it is checking for.
285   2. Type `make' to compile the package.
287   3. Optionally, type `make check' to run any self-tests that come with
288      the package.
290   4. Type `make install' to install the programs and any data files and
291      documentation.
293   5. You can remove the program binaries and object files from the
294      source code directory by typing `make clean'.  To also remove the
295      files that `configure' created (so you can compile the package for
296      a different kind of computer), type `make distclean'.  There is
297      also a `make maintainer-clean' target, but that is intended mainly
298      for the package's developers.  If you use it, you may have to get
299      all sorts of other programs in order to regenerate files that came
300      with the distribution.
302 Compilers and Options
303 =====================
305    Some systems require unusual options for compilation or linking that
306 the `configure' script does not know about.  You can give `configure'
307 initial values for variables by setting them in the environment.  Using
308 a Bourne-compatible shell, you can do that on the command line like
309 this:
310      CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
312 Or on systems that have the `env' program, you can do it like this:
313      env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
315 Compiling For Multiple Architectures
316 ====================================
318    You can compile the package for more than one kind of computer at the
319 same time, by placing the object files for each architecture in their
320 own directory.  To do this, you must use a version of `make' that
321 supports the `VPATH' variable, such as GNU `make'.  `cd' to the
322 directory where you want the object files and executables to go and run
323 the `configure' script.  `configure' automatically checks for the
324 source code in the directory that `configure' is in and in `..'.
326    If you have to use a `make' that does not supports the `VPATH'
327 variable, you have to compile the package for one architecture at a time
328 in the source code directory.  After you have installed the package for
329 one architecture, use `make distclean' before reconfiguring for another
330 architecture.
332 Installation Names
333 ==================
335    By default, `make install' will install the package's files in
336 `/usr/local/bin', `/usr/local/man', etc.  You can specify an
337 installation prefix other than `/usr/local' by giving `configure' the
338 option `--prefix=PATH'.
340    You can specify separate installation prefixes for
341 architecture-specific files and architecture-independent files.  If you
342 give `configure' the option `--exec-prefix=PATH', the package will use
343 PATH as the prefix for installing programs and libraries.
344 Documentation and other data files will still use the regular prefix.
346    In addition, if you use an unusual directory layout you can give
347 options like `--bindir=PATH' to specify different values for particular
348 kinds of files.  Run `configure --help' for a list of the directories
349 you can set and what kinds of files go in them.
351    If the package supports it, you can cause programs to be installed
352 with an extra prefix or suffix on their names by giving `configure' the
353 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
355 Optional Features
356 =================
358    Some packages pay attention to `--enable-FEATURE' options to
359 `configure', where FEATURE indicates an optional part of the package.
360 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
361 is something like `gnu-as' or `x' (for the X Window System).  The
362 `README' should mention any `--enable-' and `--with-' options that the
363 package recognizes.
365    For packages that use the X Window System, `configure' can usually
366 find the X include and library files automatically, but if it doesn't,
367 you can use the `configure' options `--x-includes=DIR' and
368 `--x-libraries=DIR' to specify their locations.
370 Specifying the System Type
371 ==========================
373    There may be some features `configure' can not figure out
374 automatically, but needs to determine by the type of host the package
375 will run on.  Usually `configure' can figure that out, but if it prints
376 a message saying it can not guess the host type, give it the
377 `--host=TYPE' option.  TYPE can either be a short name for the system
378 type, such as `sun4', or a canonical name with three fields:
379      CPU-COMPANY-SYSTEM
381 See the file `config.sub' for the possible values of each field.  If
382 `config.sub' isn't included in this package, then this package doesn't
383 need to know the host type.
385    If you are building compiler tools for cross-compiling, you can also
386 use the `--target=TYPE' option to select the type of system they will
387 produce code for and the `--build=TYPE' option to select the type of
388 system on which you are compiling the package.
390 Sharing Defaults
391 ================
393    If you want to set default values for `configure' scripts to share,
394 you can create a site shell script called `config.site' that gives
395 default values for variables like `CC', `cache_file', and `prefix'.
396 `configure' looks for `PREFIX/share/config.site' if it exists, then
397 `PREFIX/etc/config.site' if it exists.  Or, you can set the
398 `CONFIG_SITE' environment variable to the location of the site script.
399 A warning: not all `configure' scripts look for a site script.
401 Operation Controls
402 ==================
404    `configure' recognizes the following options to control how it
405 operates.
407 `--cache-file=FILE'
408      Use and save the results of the tests in FILE instead of
409      `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
410      debugging `configure'.
412 `--help'
413      Print a summary of the options to `configure', and exit.
415 `--quiet'
416 `--silent'
417 `-q'
418      Do not print messages saying which checks are being made.  To
419      suppress all normal output, redirect it to `/dev/null' (any error
420      messages will still be shown).
422 `--srcdir=DIR'
423      Look for the package's source code in directory DIR.  Usually
424      `configure' can determine that directory automatically.
426 `--version'
427      Print the version of Autoconf used to generate the `configure'
428      script, and exit.
430 `configure' also accepts some other, not widely useful, options.