blob: 9dbe31a50de5c9deccac599fa0eda92f0f8050cb [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001INSTALL - Installation of Vim on different machines.
2
3This file contains instructions for compiling Vim. If you already have an
4executable version of Vim, you don't need this.
5
6Contents:
71. Generic
82. Unix
Bram Moolenaarb07269a2011-05-19 13:41:14 +020093. OS/2 (with EMX 0.9b)
104. Atari MiNT
Bram Moolenaar071d4272004-06-13 20:20:40 +000011
Bram Moolenaar4e32e4b2007-05-12 14:46:25 +000012See INSTALLami.txt for Amiga
13See INSTALLmac.txt for Macintosh
Bram Moolenaarc4568ab2018-11-16 16:21:05 +010014See INSTALLpc.txt for PC (Windows XP/Vista/7/8/10)
Bram Moolenaar4e32e4b2007-05-12 14:46:25 +000015See INSTALLvms.txt for VMS
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +000016See INSTALLx.txt for cross-compiling on Unix
Bram Moolenaarc4568ab2018-11-16 16:21:05 +010017See ../READMEdir/README_390.txt for z/OS and OS/390 Unix
Bram Moolenaarb3f74062020-02-26 16:16:53 +010018See ../runtime/doc/os_haiku.txt for Haiku
Bram Moolenaar071d4272004-06-13 20:20:40 +000019
201. Generic
21==========
22
23If you compile Vim without specifying anything, you will get the default
24behaviour as is documented, which should be fine for most people.
25
26For features that you can't enable/disable in another way, you can edit the
27file "feature.h" to match your preferences.
28
29
302. Unix
31=======
32
33Summary:
341. make run configure, compile and link
352. make install installation in /usr/local
36
37This will include the GUI and X11 libraries, if you have them. If you want a
38version of Vim that is small and starts up quickly, see the Makefile for how
Bram Moolenaar4e32e4b2007-05-12 14:46:25 +000039to disable the GUI and X11. If you don't have GUI libraries and/or X11, these
Bram Moolenaar071d4272004-06-13 20:20:40 +000040features will be disabled automatically.
41
42See the start of Makefile for more detailed instructions about how to compile
43Vim.
44
45If you need extra compiler and/or linker arguments, set $CFLAGS and/or $LIBS
46before starting configure. Example:
47
48 env CFLAGS=-I/usr/local/include LIBS=-lm make
49
50This is only needed for things that configure doesn't offer a specific argument
51for or figures out by itself. First try running configure without extra
52arguments.
53
54GNU Autoconf and a few other tools have been used to make Vim work on many
55different Unix systems. The advantage of this is that Vim should compile
Bram Moolenaar64404472010-06-26 06:24:45 +020056on most systems without any adjustments. The disadvantage is that when
Bram Moolenaar071d4272004-06-13 20:20:40 +000057adjustments are required, it takes some time to understand what is happening.
58
59If configure finds all library files and then complains when linking that some
60of them can't be found, your linker doesn't return an error code for missing
61libraries. Vim should be linked fine anyway, mostly you can just ignore these
62errors.
63
64If you run configure by hand (not using the Makefile), remember that any
65changes in the Makefile have no influence on configure. This may be what you
66want, but maybe not!
67
68The advantage of running configure separately, is that you can write a script
69to build Vim, without changing the Makefile or feature.h. Example (using sh):
70
71 CFLAGS=-DCOMPILER_FLAG ./configure --enable-gui=motif
72
73One thing to watch out for: If the configure script itself changes, running
74"make" will execute it again, but without your arguments. Do "make clean" and
75run configure again.
76
77If you are compiling Vim for several machines, for each machine:
78 a. make shadow
79 b. mv shadow machine_name
80 c. cd machine_name
81 d. make; make install
82
83[Don't use a path for machine_name, just a directory name, otherwise the links
84that "make shadow" creates won't work.]
85
86
87Unix: COMPILING WITH/WITHOUT GUI
88
Bram Moolenaar4e32e4b2007-05-12 14:46:25 +000089NOTE: This is incomplete, look in Makefile for more info.
90
Bram Moolenaar071d4272004-06-13 20:20:40 +000091These configure arguments can be used to select which GUI to use:
Bram Moolenaar4e32e4b2007-05-12 14:46:25 +000092--enable-gui=gtk or: gtk2, motif, athena or auto
Bram Moolenaar071d4272004-06-13 20:20:40 +000093--disable-gtk-check
94--disable-motif-check
95--disable-athena-check
96
97--enable-gui defaults to "auto", so it will automatically look for a GUI (in
98the order of GTK, Motif, then Athena). If one is found, then is uses it and
99does not proceed to check any of the remaining ones. Otherwise, it moves on
100to the next one.
101
Bram Moolenaar4e32e4b2007-05-12 14:46:25 +0000102--enable-{gtk,gtk2,kde,motif,athena}-check all default to "yes", such that if
Bram Moolenaar071d4272004-06-13 20:20:40 +0000103--enable-gui is "auto" (which it is by default), GTK, Motif, and Athena will
104be checked for. If you want to *exclude* a certain check, then you use
Bram Moolenaar4e32e4b2007-05-12 14:46:25 +0000105--disable-{gtk,gtk2,kde,motif,athena}-check.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000106
107For example, if --enable-gui is set to "auto", but you don't want it look for
108Motif, you then also specify --disable-motif-check. This results in only
109checking for GTK and Athena.
110
111Lastly, if you know which one you want to use, then you can just do
Bram Moolenaar4e32e4b2007-05-12 14:46:25 +0000112--enable-gui={gtk,gtk2,kde,motif,athena}. So if you wanted to only use Motif,
113then you'd specify --enable-gui=motif. Once you specify what you want, the
114--enable-{gtk,gtk2,kde,motif,athena}-check options are ignored.
115
116On Linux you usually need GUI "-devel" packages. You may already have GTK
117libraries installed, but that doesn't mean you can compile Vim with GTK, you
118also need the header files.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000119
120For compiling with the GTK+ GUI, you need a recent version of glib and gtk+.
Bram Moolenaar4e32e4b2007-05-12 14:46:25 +0000121Configure checks for at least version 1.1.16. An older version is not selected
122automatically. If you want to use it anyway, run configure with
123"--disable-gtktest".
Bram Moolenaar071d4272004-06-13 20:20:40 +0000124GTK requires an ANSI C compiler. If you fail to compile Vim with GTK+ (it
125is the preferred choice), try selecting another one in the Makefile.
126If you are sure you have GTK installed, but for some reason configure says you
127do not, you may have left-over header files and/or library files from an older
128(and incompatible) version of GTK. if this is the case, please check
129auto/config.log for any error messages that may give you a hint as to what's
130happening.
131
Bram Moolenaar4e32e4b2007-05-12 14:46:25 +0000132There used to be a KDE version of Vim, using Qt libraries, but since it didn't
133work very well and there was no maintainer it was dropped.
Bram Moolenaar843ee412004-06-30 16:16:41 +0000134
135
Bram Moolenaar071d4272004-06-13 20:20:40 +0000136Unix: COMPILING WITH MULTI-BYTE
137
138When you want to compile with the multi-byte features enabled, make sure you
Bram Moolenaar64404472010-06-26 06:24:45 +0200139compile on a machine where the locale settings actually work, otherwise the
Bram Moolenaar071d4272004-06-13 20:20:40 +0000140configure tests may fail. You need to compile with "big" features:
141
142 ./configure --with-features=big
143
144Unix: COMPILING ON LINUX
145
146On Linux, when using -g to compile (which is default for gcc), the executable
147will probably be statically linked. If you don't want this, remove the -g
148option from CFLAGS.
149
150Unix: PUTTING vimrc IN /etc
151
152Some Linux distributions prefer to put the global vimrc file in /etc, and the
153Vim runtime files in /usr. This can be done with:
154 ./configure --prefix=/usr
155 make VIMRCLOC=/etc VIMRUNTIMEDIR=/usr/share/vim MAKE="make -e"
156
157Unix: COMPILING ON NeXT
158
159Add the "-posix" argument to the compiler by using one of these commands:
160 setenv CC 'cc -posix' (csh)
161 export CC='cc -posix' (sh)
162And run configure with "--disable-motif-check".
163
Bram Moolenaarc236c162008-07-13 17:41:49 +0000164Unix: LOCAL HEADERS AND LIBRARIES NOT IN /usr/local
165
166Sometimes it is necessary to search different path than /usr/local for locally
167installed headers (/usr/local/include) and libraries (/usr/local/lib).
168To search /stranger/include and /stranger/lib for locally installed
169headers and libraries, use:
170 ./configure --with-local-dir=/stranger
171And to not search for locally installed headers and libraries at all, use:
172 ./configure --without-local-dir
173
Bram Moolenaar071d4272004-06-13 20:20:40 +0000174
Bram Moolenaarb07269a2011-05-19 13:41:14 +02001753. OS/2
Bram Moolenaar071d4272004-06-13 20:20:40 +0000176=======
177
Bram Moolenaare7fedb62015-12-31 19:07:19 +0100178OS/2 support was removed in patch 7.4.1008
Bram Moolenaar071d4272004-06-13 20:20:40 +0000179
180
Bram Moolenaarb07269a2011-05-19 13:41:14 +02001814. Atari MiNT
Bram Moolenaar071d4272004-06-13 20:20:40 +0000182=============
183
Bram Moolenaare3f915d2020-07-14 23:02:44 +0200184Atari MiNT support was removed in patch 8.2.1215.