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